From 53d32a0bd2ca038c8fc6f82fac0009395c3d2490 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 25 Mar 2012 12:41:58 +0000 Subject: style cleanup: conform to style guide - mostly operator whitespace changes --- source/blender/blenlib/intern/math_base.c | 8 +- source/blender/blenlib/intern/math_base_inline.c | 41 +- source/blender/blenlib/intern/math_color.c | 436 ++--- source/blender/blenlib/intern/math_color_inline.c | 17 +- source/blender/blenlib/intern/math_geom.c | 1737 ++++++++++---------- source/blender/blenlib/intern/math_geom_inline.c | 66 +- source/blender/blenlib/intern/math_matrix.c | 1097 ++++++------ source/blender/blenlib/intern/math_rotation.c | 1540 ++++++++--------- source/blender/blenlib/intern/math_vector.c | 305 ++-- source/blender/blenlib/intern/math_vector_inline.c | 340 ++-- 10 files changed, 2848 insertions(+), 2739 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenlib/intern/math_base.c b/source/blender/blenlib/intern/math_base.c index f2df36202fe..9efcb3dbcae 100644 --- a/source/blender/blenlib/intern/math_base.c +++ b/source/blender/blenlib/intern/math_base.c @@ -60,7 +60,6 @@ double round(double x) double round(double x); #endif - /* from python 3.1 floatobject.c * ndigits must be between 0 and 21 */ double double_round(double x, int ndigits) @@ -69,7 +68,7 @@ double double_round(double x, int ndigits) if (ndigits >= 0) { pow1 = pow(10.0, (double)ndigits); pow2 = 1.0; - y = (x*pow1)*pow2; + y = (x * pow1) * pow2; /* if y overflows, then rounded value is exactly x */ if (!finite(y)) return x; @@ -81,9 +80,9 @@ double double_round(double x, int ndigits) } z = round(y); - if (fabs(y-z) == 0.5) + if (fabs(y - z) == 0.5) /* halfway between two integers; use round-half-even */ - z = 2.0*round(y/2.0); + z = 2.0 * round(y / 2.0); if (ndigits >= 0) z = (z / pow2) / pow1; @@ -93,4 +92,3 @@ double double_round(double x, int ndigits) /* if computation resulted in overflow, raise OverflowError */ return z; } - diff --git a/source/blender/blenlib/intern/math_base_inline.c b/source/blender/blenlib/intern/math_base_inline.c index d706f28e722..9e32ff5ad4e 100644 --- a/source/blender/blenlib/intern/math_base_inline.c +++ b/source/blender/blenlib/intern/math_base_inline.c @@ -43,61 +43,61 @@ MINLINE float sqrt3f(float f) { - if (f==0.0f) return 0.0f; - if (f<0) return (float)(-exp(log(-f)/3)); - else return (float)(exp(log(f)/3)); + if (f == 0.0f) return 0.0f; + if (f < 0) return (float)(-exp(log(-f) / 3)); + else return (float)(exp(log(f) / 3)); } MINLINE double sqrt3d(double d) { - if (d==0.0) return 0; - if (d<0) return -exp(log(-d)/3); - else return exp(log(d)/3); + if (d == 0.0) return 0; + if (d < 0) return -exp(log(-d) / 3); + else return exp(log(d) / 3); } MINLINE float saacos(float fac) { - if (fac<= -1.0f) return (float)M_PI; - else if (fac>=1.0f) return 0.0; + if (fac <= -1.0f) return (float)M_PI; + else if (fac >= 1.0f) return 0.0; else return (float)acos(fac); } MINLINE float saasin(float fac) { - if (fac<= -1.0f) return (float)-M_PI/2.0f; - else if (fac>=1.0f) return (float)M_PI/2.0f; + if (fac <= -1.0f) return (float)-M_PI / 2.0f; + else if (fac >= 1.0f) return (float)M_PI / 2.0f; else return (float)asin(fac); } MINLINE float sasqrt(float fac) { - if (fac<=0.0f) return 0.0f; + if (fac <= 0.0f) return 0.0f; return (float)sqrt(fac); } MINLINE float saacosf(float fac) { - if (fac<= -1.0f) return (float)M_PI; - else if (fac>=1.0f) return 0.0f; + if (fac <= -1.0f) return (float)M_PI; + else if (fac >= 1.0f) return 0.0f; else return (float)acosf(fac); } MINLINE float saasinf(float fac) { - if (fac<= -1.0f) return (float)-M_PI/2.0f; - else if (fac>=1.0f) return (float)M_PI/2.0f; + if (fac <= -1.0f) return (float)-M_PI / 2.0f; + else if (fac >= 1.0f) return (float)M_PI / 2.0f; else return (float)asinf(fac); } MINLINE float sasqrtf(float fac) { - if (fac<=0.0f) return 0.0f; + if (fac <= 0.0f) return 0.0f; return (float)sqrtf(fac); } MINLINE float interpf(float target, float origin, float fac) { - return (fac*target) + (1.0f-fac)*origin; + return (fac * target) + (1.0f - fac) * origin; } /* useful to calculate an even width shell, by taking the angle between 2 planes. @@ -139,20 +139,19 @@ MINLINE int power_of_2_min_i(int n) return n; } - MINLINE float minf(float a, float b) { - return (a < b)? a: b; + return (a < b) ? a : b; } MINLINE float maxf(float a, float b) { - return (a > b)? a: b; + return (a > b) ? a : b; } MINLINE float signf(float f) { - return (f < 0.f)? -1.f: 1.f; + return (f < 0.f) ? -1.f : 1.f; } diff --git a/source/blender/blenlib/intern/math_color.c b/source/blender/blenlib/intern/math_color.c index bef5b9e538b..7103ef6106d 100644 --- a/source/blender/blenlib/intern/math_color.c +++ b/source/blender/blenlib/intern/math_color.c @@ -41,51 +41,51 @@ void hsv_to_rgb(float h, float s, float v, float *r, float *g, float *b) int i; float f, p, q, t; - if (s==0.0f) { + if (s == 0.0f) { *r = v; *g = v; *b = v; } else { - h= (h - floorf(h))*6.0f; + h = (h - floorf(h)) * 6.0f; i = (int)floorf(h); f = h - i; - p = v*(1.0f-s); - q = v*(1.0f-(s*f)); - t = v*(1.0f-(s*(1.0f-f))); - + p = v * (1.0f - s); + q = v * (1.0f - (s * f)); + t = v * (1.0f - (s * (1.0f - f))); + switch (i) { - case 0 : - *r = v; - *g = t; - *b = p; - break; - case 1 : - *r = q; - *g = v; - *b = p; - break; - case 2 : - *r = p; - *g = v; - *b = t; - break; - case 3 : - *r = p; - *g = q; - *b = v; - break; - case 4 : - *r = t; - *g = p; - *b = v; - break; - case 5 : - *r = v; - *g = p; - *b = q; - break; + case 0: + *r = v; + *g = t; + *b = p; + break; + case 1: + *r = q; + *g = v; + *b = p; + break; + case 2: + *r = p; + *g = v; + *b = t; + break; + case 3: + *r = p; + *g = q; + *b = v; + break; + case 4: + *r = t; + *g = p; + *b = v; + break; + case 5: + *r = v; + *g = p; + *b = q; + break; } } } @@ -93,93 +93,95 @@ void hsv_to_rgb(float h, float s, float v, float *r, float *g, float *b) void rgb_to_yuv(float r, float g, float b, float *ly, float *lu, float *lv) { float y, u, v; - y= 0.299f*r + 0.587f*g + 0.114f*b; - u=-0.147f*r - 0.289f*g + 0.436f*b; - v= 0.615f*r - 0.515f*g - 0.100f*b; - - *ly=y; - *lu=u; - *lv=v; + y = 0.299f * r + 0.587f * g + 0.114f * b; + u = -0.147f * r - 0.289f * g + 0.436f * b; + v = 0.615f * r - 0.515f * g - 0.100f * b; + + *ly = y; + *lu = u; + *lv = v; } void yuv_to_rgb(float y, float u, float v, float *lr, float *lg, float *lb) { float r, g, b; - r=y+1.140f*v; - g=y-0.394f*u - 0.581f*v; - b=y+2.032f*u; - - *lr=r; - *lg=g; - *lb=b; + r = y + 1.140f * v; + g = y - 0.394f * u - 0.581f * v; + b = y + 2.032f * u; + + *lr = r; + *lg = g; + *lb = b; } -/* The RGB inputs are supposed gamma corrected and in the range 0 - 1.0f */ -/* Output YCC have a range of 16-235 and 16-240 except with JFIF_0_255 where the range is 0-255 */ +/* The RGB inputs are supposed gamma corrected and in the range 0 - 1.0f + * + * Output YCC have a range of 16-235 and 16-240 except with JFIF_0_255 where the range is 0-255 */ void rgb_to_ycc(float r, float g, float b, float *ly, float *lcb, float *lcr, int colorspace) { - float sr,sg, sb; + float sr, sg, sb; float y = 128.f, cr = 128.f, cb = 128.f; - - sr=255.0f*r; - sg=255.0f*g; - sb=255.0f*b; - + + sr = 255.0f * r; + sg = 255.0f * g; + sb = 255.0f * b; + switch (colorspace) { - case BLI_YCC_ITU_BT601 : - y=(0.257f*sr)+(0.504f*sg)+(0.098f*sb)+16.0f; - cb=(-0.148f*sr)-(0.291f*sg)+(0.439f*sb)+128.0f; - cr=(0.439f*sr)-(0.368f*sg)-(0.071f*sb)+128.0f; - break; - case BLI_YCC_ITU_BT709 : - y=(0.183f*sr)+(0.614f*sg)+(0.062f*sb)+16.0f; - cb=(-0.101f*sr)-(0.338f*sg)+(0.439f*sb)+128.0f; - cr=(0.439f*sr)-(0.399f*sg)-(0.040f*sb)+128.0f; - break; - case BLI_YCC_JFIF_0_255 : - y=(0.299f*sr)+(0.587f*sg)+(0.114f*sb); - cb=(-0.16874f*sr)-(0.33126f*sg)+(0.5f*sb)+128.0f; - cr=(0.5f*sr)-(0.41869f*sg)-(0.08131f*sb)+128.0f; - break; - default: - assert(!"invalid colorspace"); + case BLI_YCC_ITU_BT601: + y = (0.257f * sr) + (0.504f * sg) + (0.098f * sb) + 16.0f; + cb = (-0.148f * sr)-(0.291f * sg) + (0.439f * sb) + 128.0f; + cr = (0.439f * sr)-(0.368f * sg)-(0.071f * sb) + 128.0f; + break; + case BLI_YCC_ITU_BT709: + y = (0.183f * sr) + (0.614f * sg) + (0.062f * sb) + 16.0f; + cb = (-0.101f * sr)-(0.338f * sg) + (0.439f * sb) + 128.0f; + cr = (0.439f * sr)-(0.399f * sg)-(0.040f * sb) + 128.0f; + break; + case BLI_YCC_JFIF_0_255: + y = (0.299f * sr) + (0.587f * sg) + (0.114f * sb); + cb = (-0.16874f * sr)-(0.33126f * sg) + (0.5f * sb) + 128.0f; + cr = (0.5f * sr)-(0.41869f * sg)-(0.08131f * sb) + 128.0f; + break; + default: + assert(!"invalid colorspace"); } - - *ly=y; - *lcb=cb; - *lcr=cr; + + *ly = y; + *lcb = cb; + *lcr = cr; } /* YCC input have a range of 16-235 and 16-240 except with JFIF_0_255 where the range is 0-255 */ /* RGB outputs are in the range 0 - 1.0f */ + /* FIXME comment above must be wrong because BLI_YCC_ITU_BT601 y 16.0 cr 16.0 -> r -0.7009 */ void ycc_to_rgb(float y, float cb, float cr, float *lr, float *lg, float *lb, int colorspace) { float r = 128.f, g = 128.f, b = 128.f; - + switch (colorspace) { - case BLI_YCC_ITU_BT601 : - r=1.164f*(y-16.0f)+1.596f*(cr-128.0f); - g=1.164f*(y-16.0f)-0.813f*(cr-128.0f)-0.392f*(cb-128.0f); - b=1.164f*(y-16.0f)+2.017f*(cb-128.0f); - break; - case BLI_YCC_ITU_BT709 : - r=1.164f*(y-16.0f)+1.793f*(cr-128.0f); - g=1.164f*(y-16.0f)-0.534f*(cr-128.0f)-0.213f*(cb-128.0f); - b=1.164f*(y-16.0f)+2.115f*(cb-128.0f); - break; - case BLI_YCC_JFIF_0_255 : - r=y+1.402f*cr - 179.456f; - g=y-0.34414f*cb - 0.71414f*cr + 135.45984f; - b=y+1.772f*cb - 226.816f; - break; - default: - assert(!"invalid colorspace"); + case BLI_YCC_ITU_BT601: + r = 1.164f * (y - 16.0f) + 1.596f * (cr - 128.0f); + g = 1.164f * (y - 16.0f) - 0.813f * (cr - 128.0f) - 0.392f * (cb - 128.0f); + b = 1.164f * (y - 16.0f) + 2.017f * (cb - 128.0f); + break; + case BLI_YCC_ITU_BT709: + r = 1.164f * (y - 16.0f) + 1.793f * (cr - 128.0f); + g = 1.164f * (y - 16.0f) - 0.534f * (cr - 128.0f) - 0.213f * (cb - 128.0f); + b = 1.164f * (y - 16.0f) + 2.115f * (cb - 128.0f); + break; + case BLI_YCC_JFIF_0_255: + r = y + 1.402f * cr - 179.456f; + g = y - 0.34414f * cb - 0.71414f * cr + 135.45984f; + b = y + 1.772f * cb - 226.816f; + break; + default: + assert(!"invalid colorspace"); } - *lr=r/255.0f; - *lg=g/255.0f; - *lb=b/255.0f; + *lr = r / 255.0f; + *lg = g / 255.0f; + *lb = b / 255.0f; } void hex_to_rgb(char *hexcol, float *r, float *g, float *b) @@ -188,7 +190,7 @@ void hex_to_rgb(char *hexcol, float *r, float *g, float *b) if (hexcol[0] == '#') hexcol++; - if (sscanf(hexcol, "%02x%02x%02x", &ri, &gi, &bi)==3) { + if (sscanf(hexcol, "%02x%02x%02x", &ri, &gi, &bi) == 3) { *r = ri / 255.0f; *g = gi / 255.0f; *b = bi / 255.0f; @@ -198,7 +200,7 @@ void hex_to_rgb(char *hexcol, float *r, float *g, float *b) } else { /* avoid using un-initialized vars */ - *r= *g= *b= 0.0f; + *r = *g = *b = 0.0f; } } @@ -210,59 +212,59 @@ void rgb_to_hsv(float r, float g, float b, float *lh, float *ls, float *lv) cmax = r; cmin = r; - cmax = (g>cmax ? g:cmax); - cmin = (gcmax ? b:cmax); - cmin = (b cmax ? g : cmax); + cmin = (g < cmin ? g : cmin); + cmax = (b > cmax ? b : cmax); + cmin = (b < cmin ? b : cmin); - v = cmax; /* value */ + v = cmax; /* value */ if (cmax != 0.0f) - s = (cmax - cmin)/cmax; + s = (cmax - cmin) / cmax; else { s = 0.0f; } if (s == 0.0f) h = -1.0f; else { - cdelta = cmax-cmin; - rc = (cmax-r)/cdelta; - gc = (cmax-g)/cdelta; - bc = (cmax-b)/cdelta; - if (r==cmax) - h = bc-gc; + cdelta = cmax - cmin; + rc = (cmax - r) / cdelta; + gc = (cmax - g) / cdelta; + bc = (cmax - b) / cdelta; + if (r == cmax) + h = bc - gc; else - if (g==cmax) - h = 2.0f+rc-bc; + if (g == cmax) + h = 2.0f + rc - bc; else - h = 4.0f+gc-rc; - h = h*60.0f; + h = 4.0f + gc - rc; + h = h * 60.0f; if (h < 0.0f) h += 360.0f; } - + *ls = s; *lh = h / 360.0f; - if (*lh < 0.0f) *lh= 0.0f; + if (*lh < 0.0f) *lh = 0.0f; *lv = v; } void rgb_to_hsv_compat(float r, float g, float b, float *lh, float *ls, float *lv) { - float orig_h= *lh; - float orig_s= *ls; + float orig_h = *lh; + float orig_s = *ls; rgb_to_hsv(r, g, b, lh, ls, lv); if (*lv <= 0.0f) { - *lh= orig_h; - *ls= orig_s; + *lh = orig_h; + *ls = orig_s; } else if (*ls <= 0.0f) { - *lh= orig_h; + *lh = orig_h; } - if (*lh==0.0f && orig_h >= 1.0f) { - *lh= 1.0f; + if (*lh == 0.0f && orig_h >= 1.0f) { + *lh = 1.0f; } } @@ -270,22 +272,22 @@ void rgb_to_hsv_compat(float r, float g, float b, float *lh, float *ls, float *l void xyz_to_rgb(float xc, float yc, float zc, float *r, float *g, float *b, int colorspace) { - switch (colorspace) { - case BLI_XYZ_SMPTE: - *r = (3.50570f * xc) + (-1.73964f * yc) + (-0.544011f * zc); - *g = (-1.06906f * xc) + (1.97781f * yc) + (0.0351720f * zc); - *b = (0.0563117f * xc) + (-0.196994f * yc) + (1.05005f * zc); - break; - case BLI_XYZ_REC709_SRGB: - *r = (3.240476f * xc) + (-1.537150f * yc) + (-0.498535f * zc); - *g = (-0.969256f * xc) + (1.875992f * yc) + (0.041556f * zc); - *b = (0.055648f * xc) + (-0.204043f * yc) + (1.057311f * zc); - break; - case BLI_XYZ_CIE: - *r = (2.28783848734076f * xc) + (-0.833367677835217f * yc) + (-0.454470795871421f * zc); - *g = (-0.511651380743862f * xc) + (1.42275837632178f * yc) + (0.0888930017552939f * zc); - *b = (0.00572040983140966f * xc) + (-0.0159068485104036f * yc) + (1.0101864083734f * zc); - break; + switch (colorspace) { + case BLI_XYZ_SMPTE: + *r = (3.50570f * xc) + (-1.73964f * yc) + (-0.544011f * zc); + *g = (-1.06906f * xc) + (1.97781f * yc) + (0.0351720f * zc); + *b = (0.0563117f * xc) + (-0.196994f * yc) + (1.05005f * zc); + break; + case BLI_XYZ_REC709_SRGB: + *r = (3.240476f * xc) + (-1.537150f * yc) + (-0.498535f * zc); + *g = (-0.969256f * xc) + (1.875992f * yc) + (0.041556f * zc); + *b = (0.055648f * xc) + (-0.204043f * yc) + (1.057311f * zc); + break; + case BLI_XYZ_CIE: + *r = (2.28783848734076f * xc) + (-0.833367677835217f * yc) + (-0.454470795871421f * zc); + *g = (-0.511651380743862f * xc) + (1.42275837632178f * yc) + (0.0888930017552939f * zc); + *b = (0.00572040983140966f * xc) + (-0.0159068485104036f * yc) + (1.0101864083734f * zc); + break; } } @@ -298,58 +300,60 @@ unsigned int hsv_to_cpack(float h, float s, float v) short r, g, b; float rf, gf, bf; unsigned int col; - + hsv_to_rgb(h, s, v, &rf, &gf, &bf); - - r= (short)(rf*255.0f); - g= (short)(gf*255.0f); - b= (short)(bf*255.0f); - - col= ( r + (g*256) + (b*256*256) ); + + r = (short) (rf * 255.0f); + g = (short) (gf * 255.0f); + b = (short) (bf * 255.0f); + + col = (r + (g * 256) + (b * 256 * 256)); return col; } - unsigned int rgb_to_cpack(float r, float g, float b) { int ir, ig, ib; - - ir= (int)floor(255.0f*r); - if (ir<0) ir= 0; else if (ir>255) ir= 255; - ig= (int)floor(255.0f*g); - if (ig<0) ig= 0; else if (ig>255) ig= 255; - ib= (int)floor(255.0f*b); - if (ib<0) ib= 0; else if (ib>255) ib= 255; - - return (ir+ (ig*256) + (ib*256*256)); + + ir = (int)floor(255.0f * r); + if (ir < 0) ir = 0; + else if (ir > 255) ir = 255; + ig = (int)floor(255.0f * g); + if (ig < 0) ig = 0; + else if (ig > 255) ig = 255; + ib = (int)floor(255.0f * b); + if (ib < 0) ib = 0; + else if (ib > 255) ib = 255; + + return (ir + (ig * 256) + (ib * 256 * 256)); } void cpack_to_rgb(unsigned int col, float *r, float *g, float *b) { - - *r= (float)((col)&0xFF); + + *r = (float)((col)&0xFF); *r /= 255.0f; - *g= (float)(((col)>>8)&0xFF); + *g = (float)(((col) >> 8)&0xFF); *g /= 255.0f; - *b= (float)(((col)>>16)&0xFF); + *b = (float)(((col) >> 16)&0xFF); *b /= 255.0f; } void rgb_uchar_to_float(float col_r[3], const unsigned char col_ub[3]) { - col_r[0]= ((float)col_ub[0]) / 255.0f; - col_r[1]= ((float)col_ub[1]) / 255.0f; - col_r[2]= ((float)col_ub[2]) / 255.0f; + col_r[0] = ((float)col_ub[0]) / 255.0f; + col_r[1] = ((float)col_ub[1]) / 255.0f; + col_r[2] = ((float)col_ub[2]) / 255.0f; } void rgba_uchar_to_float(float col_r[4], const unsigned char col_ub[4]) { - col_r[0]= ((float)col_ub[0]) / 255.0f; - col_r[1]= ((float)col_ub[1]) / 255.0f; - col_r[2]= ((float)col_ub[2]) / 255.0f; - col_r[3]= ((float)col_ub[3]) / 255.0f; + col_r[0] = ((float)col_ub[0]) / 255.0f; + col_r[1] = ((float)col_ub[1]) / 255.0f; + col_r[2] = ((float)col_ub[2]) / 255.0f; + col_r[3] = ((float)col_ub[3]) / 255.0f; } void rgb_float_to_uchar(unsigned char col_r[3], const float col_f[3]) @@ -373,15 +377,15 @@ void gamma_correct(float *c, float gamma) float rec709_to_linearrgb(float c) { if (c < 0.081f) - return (c < 0.0f)? 0.0f: c * (1.0f/4.5f); + return (c < 0.0f) ? 0.0f : c * (1.0f / 4.5f); else - return powf((c + 0.099f)*(1.0f/1.099f), (1.0f/0.45f)); + return powf((c + 0.099f) * (1.0f / 1.099f), (1.0f / 0.45f)); } float linearrgb_to_rec709(float c) { if (c < 0.018f) - return (c < 0.0f)? 0.0f: c * 4.5f; + return (c < 0.0f) ? 0.0f : c * 4.5f; else return 1.099f * powf(c, 0.45f) - 0.099f; } @@ -389,31 +393,31 @@ float linearrgb_to_rec709(float c) float srgb_to_linearrgb(float c) { if (c < 0.04045f) - return (c < 0.0f)? 0.0f: c * (1.0f/12.92f); + return (c < 0.0f) ? 0.0f : c * (1.0f / 12.92f); else - return powf((c + 0.055f)*(1.0f/1.055f), 2.4f); + return powf((c + 0.055f) * (1.0f / 1.055f), 2.4f); } float linearrgb_to_srgb(float c) { if (c < 0.0031308f) - return (c < 0.0f)? 0.0f: c * 12.92f; + return (c < 0.0f) ? 0.0f : c * 12.92f; else - return 1.055f * powf(c, 1.0f/2.4f) - 0.055f; + return 1.055f * powf(c, 1.0f / 2.4f) - 0.055f; } void minmax_rgb(short c[]) { - if (c[0]>255) c[0]=255; - else if (c[0]<0) c[0]=0; - if (c[1]>255) c[1]=255; - else if (c[1]<0) c[1]=0; - if (c[2]>255) c[2]=255; - else if (c[2]<0) c[2]=0; + if (c[0] > 255) c[0] = 255; + else if (c[0] < 0) c[0] = 0; + if (c[1] > 255) c[1] = 255; + else if (c[1] < 0) c[1] = 0; + if (c[2] > 255) c[2] = 255; + else if (c[2] < 0) c[2] = 0; } /*If the requested RGB shade contains a negative weight for - * one of the primaries, it lies outside the color gamut + * one of the primaries, it lies outside the color gamut * accessible from the given triple of primaries. Desaturate * it by adding white, equal quantities of R, G, and B, enough * to make RGB all positive. The function returns 1 if the @@ -432,31 +436,33 @@ int constrain_rgb(float *r, float *g, float *b) /* Add just enough white to make r, g, b all positive. */ if (w > 0) { - *r += w; *g += w; *b += w; - return 1; /* Color modified to fit RGB gamut */ + *r += w; + *g += w; + *b += w; + return 1; /* Color modified to fit RGB gamut */ } - return 0; /* Color within RGB gamut */ + return 0; /* Color within RGB gamut */ } float rgb_to_grayscale(const float rgb[3]) { - return 0.3f*rgb[0] + 0.58f*rgb[1] + 0.12f*rgb[2]; + return 0.3f * rgb[0] + 0.58f * rgb[1] + 0.12f * rgb[2]; } unsigned char rgb_to_grayscale_byte(const unsigned char rgb[3]) { - return (76*(unsigned short)rgb[0] + 148*(unsigned short)rgb[1] + 31*(unsigned short)rgb[2]) / 255; + return (76 * (unsigned short) rgb[0] + 148 * (unsigned short) rgb[1] + 31 * (unsigned short) rgb[2]) / 255; } float rgb_to_luma(const float rgb[3]) { - return 0.299f*rgb[0] + 0.587f*rgb[1] + 0.114f*rgb[2]; + return 0.299f * rgb[0] + 0.587f * rgb[1] + 0.114f * rgb[2]; } unsigned char rgb_to_luma_byte(const unsigned char rgb[3]) { - return (76*(unsigned short)rgb[0] + 150*(unsigned short)rgb[1] + 29*(unsigned short)rgb[2]) / 255; + return (76 * (unsigned short) rgb[0] + 150 * (unsigned short) rgb[1] + 29 * (unsigned short) rgb[2]) / 255; } /* ********************************* lift/gamma/gain / ASC-CDL conversion ********************************* */ @@ -464,13 +470,13 @@ unsigned char rgb_to_luma_byte(const unsigned char rgb[3]) void lift_gamma_gain_to_asc_cdl(float *lift, float *gamma, float *gain, float *offset, float *slope, float *power) { int c; - for (c=0; c<3; c++) { - offset[c]= lift[c]*gain[c]; - slope[c]= gain[c]*(1.0f-lift[c]); + for (c = 0; c < 3; c++) { + offset[c] = lift[c] * gain[c]; + slope[c] = gain[c] * (1.0f - lift[c]); if (gamma[c] == 0) - power[c]= FLT_MAX; + power[c] = FLT_MAX; else - power[c]= 1.0f/gamma[c]; + power[c] = 1.0f / gamma[c]; } } @@ -480,21 +486,21 @@ void lift_gamma_gain_to_asc_cdl(float *lift, float *gamma, float *gain, float *o void rgb_float_set_hue_float_offset(float rgb[3], float hue_offset) { float hsv[3]; - - rgb_to_hsv(rgb[0], rgb[1], rgb[2], hsv, hsv+1, hsv+2); - - hsv[0]+= hue_offset; - if (hsv[0] > 1.0f) hsv[0] -= 1.0f; - else if (hsv[0] < 0.0f) hsv[0] += 1.0f; - - hsv_to_rgb(hsv[0], hsv[1], hsv[2], rgb, rgb+1, rgb+2); + + rgb_to_hsv(rgb[0], rgb[1], rgb[2], hsv, hsv + 1, hsv + 2); + + hsv[0] += hue_offset; + if (hsv[0] > 1.0f) hsv[0] -= 1.0f; + else if (hsv[0] < 0.0f) hsv[0] += 1.0f; + + hsv_to_rgb(hsv[0], hsv[1], hsv[2], rgb, rgb + 1, rgb + 2); } /* Applies an hue offset to a byte rgb color */ void rgb_byte_set_hue_float_offset(unsigned char rgb[3], float hue_offset) { float rgb_float[3]; - + rgb_uchar_to_float(rgb_float, rgb); rgb_float_set_hue_float_offset(rgb_float, hue_offset); rgb_float_to_uchar(rgb, rgb_float); @@ -527,16 +533,17 @@ static unsigned short hipart(const float f) static float index_to_float(const unsigned short i) { + union { float f; unsigned short us[2]; } tmp; /* positive and negative zeros, and all gradual underflow, turn into zero: */ - if (i<0x80 || (i >= 0x8000 && i < 0x8080)) return 0; + if (i < 0x80 || (i >= 0x8000 && i < 0x8080)) return 0; /* All NaN's and infinity turn into the largest possible legal float: */ - if (i>=0x7f80 && i<0x8000) return FLT_MAX; - if (i>=0xff80) return -FLT_MAX; + if (i >= 0x7f80 && i < 0x8000) return FLT_MAX; + if (i >= 0xff80) return -FLT_MAX; #ifdef __BIG_ENDIAN__ tmp.us[0] = i; @@ -551,7 +558,7 @@ static float index_to_float(const unsigned short i) void BLI_init_srgb_conversion(void) { - static int initialized= 0; + static int initialized = 0; int i, b; if (initialized) return; @@ -559,19 +566,18 @@ void BLI_init_srgb_conversion(void) /* Fill in the lookup table to convert floats to bytes: */ for (i = 0; i < 0x10000; i++) { - float f = linearrgb_to_srgb(index_to_float(i))*255.0f; + float f = linearrgb_to_srgb(index_to_float(i)) * 255.0f; if (f <= 0) BLI_color_to_srgb_table[i] = 0; - else if (f < 255) BLI_color_to_srgb_table[i] = (unsigned short)(f*0x100+0.5f); + else if (f < 255) BLI_color_to_srgb_table[i] = (unsigned short) (f * 0x100 + 0.5f); else BLI_color_to_srgb_table[i] = 0xff00; } /* Fill in the lookup table to convert bytes to float: */ for (b = 0; b <= 255; b++) { - float f = srgb_to_linearrgb(((float)b)*(1.0f/255.0f)); + float f = srgb_to_linearrgb(((float)b) * (1.0f / 255.0f)); BLI_color_from_srgb_table[b] = f; i = hipart(f); /* replace entries so byte->float->byte does not change the data: */ - BLI_color_to_srgb_table[i] = b*0x100; + BLI_color_to_srgb_table[i] = b * 0x100; } } - diff --git a/source/blender/blenlib/intern/math_color_inline.c b/source/blender/blenlib/intern/math_color_inline.c index 4f7a197e79b..1aebd8bda11 100644 --- a/source/blender/blenlib/intern/math_color_inline.c +++ b/source/blender/blenlib/intern/math_color_inline.c @@ -93,7 +93,7 @@ MINLINE void srgb_to_linearrgb_predivide_v4(float linear[4], const float srgb[4] } else { alpha = srgb[3]; - inv_alpha = 1.0f/alpha; + inv_alpha = 1.0f / alpha; } linear[0] = srgb_to_linearrgb(srgb[0] * inv_alpha) * alpha; @@ -112,7 +112,7 @@ MINLINE void linearrgb_to_srgb_predivide_v4(float srgb[4], const float linear[4] } else { alpha = linear[3]; - inv_alpha = 1.0f/alpha; + inv_alpha = 1.0f / alpha; } srgb[0] = linearrgb_to_srgb(linear[0] * inv_alpha) * alpha; @@ -128,6 +128,7 @@ extern unsigned short BLI_color_to_srgb_table[0x10000]; MINLINE unsigned short to_srgb_table_lookup(const float f) { + union { float f; unsigned short us[2]; @@ -159,11 +160,11 @@ MINLINE void linearrgb_to_srgb_ushort4_predivide(unsigned short srgb[4], const f } alpha = linear[3]; - inv_alpha = 1.0f/alpha; + inv_alpha = 1.0f / alpha; - for (i=0; i<3; ++i) { + for (i = 0; i < 3; ++i) { t = linear[i] * inv_alpha; - srgb[i] = (t < 1.0f)? (unsigned short)(to_srgb_table_lookup(t) * alpha) : FTOUSHORT(linearrgb_to_srgb(t) * alpha); + srgb[i] = (t < 1.0f) ? (unsigned short) (to_srgb_table_lookup(t) * alpha) : FTOUSHORT(linearrgb_to_srgb(t) * alpha); } srgb[3] = FTOUSHORT(linear[3]); @@ -174,7 +175,7 @@ MINLINE void srgb_to_linearrgb_uchar4(float linear[4], const unsigned char srgb[ linear[0] = BLI_color_from_srgb_table[srgb[0]]; linear[1] = BLI_color_from_srgb_table[srgb[1]]; linear[2] = BLI_color_from_srgb_table[srgb[2]]; - linear[3] = srgb[3] * (1.0f/255.0f); + linear[3] = srgb[3] * (1.0f / 255.0f); } MINLINE void srgb_to_linearrgb_uchar4_predivide(float linear[4], const unsigned char srgb[4]) @@ -187,8 +188,8 @@ MINLINE void srgb_to_linearrgb_uchar4_predivide(float linear[4], const unsigned return; } - for (i=0; i<4; i++) - fsrgb[i] = srgb[i] * (1.0f/255.0f); + for (i = 0; i < 4; i++) + fsrgb[i] = srgb[i] * (1.0f / 255.0f); srgb_to_linearrgb_predivide_v4(linear, fsrgb); } diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c index aa62df5ae3e..f84a79c544d 100644 --- a/source/blender/blenlib/intern/math_geom.c +++ b/source/blender/blenlib/intern/math_geom.c @@ -17,7 +17,7 @@ * * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. * All rights reserved. - + * The Original Code is: some of this file. * * ***** END GPL LICENSE BLOCK ***** @@ -39,31 +39,31 @@ void cent_tri_v3(float cent[3], const float v1[3], const float v2[3], const float v3[3]) { - cent[0]= 0.33333f*(v1[0]+v2[0]+v3[0]); - cent[1]= 0.33333f*(v1[1]+v2[1]+v3[1]); - cent[2]= 0.33333f*(v1[2]+v2[2]+v3[2]); + cent[0] = 0.33333f * (v1[0] + v2[0] + v3[0]); + cent[1] = 0.33333f * (v1[1] + v2[1] + v3[1]); + cent[2] = 0.33333f * (v1[2] + v2[2] + v3[2]); } void cent_quad_v3(float cent[3], const float v1[3], const float v2[3], const float v3[3], const float v4[3]) { - cent[0]= 0.25f*(v1[0]+v2[0]+v3[0]+v4[0]); - cent[1]= 0.25f*(v1[1]+v2[1]+v3[1]+v4[1]); - cent[2]= 0.25f*(v1[2]+v2[2]+v3[2]+v4[2]); + cent[0] = 0.25f * (v1[0] + v2[0] + v3[0] + v4[0]); + cent[1] = 0.25f * (v1[1] + v2[1] + v3[1] + v4[1]); + cent[2] = 0.25f * (v1[2] + v2[2] + v3[2] + v4[2]); } float normal_tri_v3(float n[3], const float v1[3], const float v2[3], const float v3[3]) { - float n1[3],n2[3]; + float n1[3], n2[3]; - n1[0]= v1[0]-v2[0]; - n2[0]= v2[0]-v3[0]; - n1[1]= v1[1]-v2[1]; - n2[1]= v2[1]-v3[1]; - n1[2]= v1[2]-v2[2]; - n2[2]= v2[2]-v3[2]; - n[0]= n1[1]*n2[2]-n1[2]*n2[1]; - n[1]= n1[2]*n2[0]-n1[0]*n2[2]; - n[2]= n1[0]*n2[1]-n1[1]*n2[0]; + n1[0] = v1[0] - v2[0]; + n2[0] = v2[0] - v3[0]; + n1[1] = v1[1] - v2[1]; + n2[1] = v2[1] - v3[1]; + n1[2] = v1[2] - v2[2]; + n2[2] = v2[2] - v3[2]; + n[0] = n1[1] * n2[2] - n1[2] * n2[1]; + n[1] = n1[2] * n2[0] - n1[0] * n2[2]; + n[2] = n1[0] * n2[1] - n1[1] * n2[0]; return normalize_v3(n); } @@ -71,88 +71,90 @@ float normal_tri_v3(float n[3], const float v1[3], const float v2[3], const floa float normal_quad_v3(float n[3], const float v1[3], const float v2[3], const float v3[3], const float v4[3]) { /* real cross! */ - float n1[3],n2[3]; + float n1[3], n2[3]; - n1[0]= v1[0]-v3[0]; - n1[1]= v1[1]-v3[1]; - n1[2]= v1[2]-v3[2]; + n1[0] = v1[0] - v3[0]; + n1[1] = v1[1] - v3[1]; + n1[2] = v1[2] - v3[2]; - n2[0]= v2[0]-v4[0]; - n2[1]= v2[1]-v4[1]; - n2[2]= v2[2]-v4[2]; + n2[0] = v2[0] - v4[0]; + n2[1] = v2[1] - v4[1]; + n2[2] = v2[2] - v4[2]; - n[0]= n1[1]*n2[2]-n1[2]*n2[1]; - n[1]= n1[2]*n2[0]-n1[0]*n2[2]; - n[2]= n1[0]*n2[1]-n1[1]*n2[0]; + n[0] = n1[1] * n2[2] - n1[2] * n2[1]; + n[1] = n1[2] * n2[0] - n1[0] * n2[2]; + n[2] = n1[0] * n2[1] - n1[1] * n2[0]; return normalize_v3(n); } float area_tri_v2(const float v1[2], const float v2[2], const float v3[2]) { - return 0.5f * fabsf((v1[0]-v2[0])*(v2[1]-v3[1]) + (v1[1]-v2[1])*(v3[0]-v2[0])); + return 0.5f * fabsf((v1[0] - v2[0]) * (v2[1] - v3[1]) + (v1[1] - v2[1]) * (v3[0] - v2[0])); } float area_tri_signed_v2(const float v1[2], const float v2[2], const float v3[2]) { - return 0.5f * ((v1[0]-v2[0])*(v2[1]-v3[1]) + (v1[1]-v2[1])*(v3[0]-v2[0])); + return 0.5f * ((v1[0] - v2[0]) * (v2[1] - v3[1]) + (v1[1] - v2[1]) * (v3[0] - v2[0])); } -float area_quad_v3(const float v1[3], const float v2[3], const float v3[3], const float v4[3]) /* only convex Quadrilaterals */ +/* only convex Quadrilaterals */ +float area_quad_v3(const float v1[3], const float v2[3], const float v3[3], const float v4[3]) { float len, vec1[3], vec2[3], n[3]; sub_v3_v3v3(vec1, v2, v1); sub_v3_v3v3(vec2, v4, v1); cross_v3_v3v3(n, vec1, vec2); - len= normalize_v3(n); + len = normalize_v3(n); sub_v3_v3v3(vec1, v4, v3); sub_v3_v3v3(vec2, v2, v3); cross_v3_v3v3(n, vec1, vec2); - len+= normalize_v3(n); + len += normalize_v3(n); - return (len/2.0f); + return (len / 2.0f); } -float area_tri_v3(const float v1[3], const float v2[3], const float v3[3]) /* Triangles */ +/* Triangles */ +float area_tri_v3(const float v1[3], const float v2[3], const float v3[3]) { float len, vec1[3], vec2[3], n[3]; sub_v3_v3v3(vec1, v3, v2); sub_v3_v3v3(vec2, v1, v2); cross_v3_v3v3(n, vec1, vec2); - len= normalize_v3(n); + len = normalize_v3(n); - return (len/2.0f); + return (len / 2.0f); } float area_poly_v3(int nr, float verts[][3], const float normal[3]) { float x, y, z, area, max; float *cur, *prev; - int a, px=0, py=1; + int a, px = 0, py = 1; /* first: find dominant axis: 0==X, 1==Y, 2==Z * don't use 'axis_dominant_v3()' because we need max axis too */ - x= fabsf(normal[0]); - y= fabsf(normal[1]); - z= fabsf(normal[2]); + x = fabsf(normal[0]); + y = fabsf(normal[1]); + z = fabsf(normal[2]); max = MAX3(x, y, z); - if (max==y) py=2; - else if (max==x) { - px=1; - py= 2; + if (max == y) py = 2; + else if (max == x) { + px = 1; + py = 2; } /* The Trapezium Area Rule */ - prev= verts[nr-1]; - cur= verts[0]; - area= 0; - for (a=0; a= 1.0f) { - pt[0]= v3[0]; - pt[1]= v3[1]; + pt[0] = v3[0]; + pt[1] = v3[1]; } else { - pt[0]= labda*rc[0]+v2[0]; - pt[1]= labda*rc[1]+v2[1]; + pt[0] = labda * rc[0] + v2[0]; + pt[1] = labda * rc[1] + v2[1]; } - rc[0]= pt[0]-v1[0]; - rc[1]= pt[1]-v1[1]; - return sqrtf(rc[0]*rc[0]+ rc[1]*rc[1]); + rc[0] = pt[0] - v1[0]; + rc[1] = pt[1] - v1[1]; + return sqrtf(rc[0] * rc[0] + rc[1] * rc[1]); } /* point closest to v1 on line v2-v3 in 2D */ @@ -213,7 +215,7 @@ void closest_to_line_segment_v2(float close_r[2], const float p[2], const float { float lambda, cp[2]; - lambda= closest_to_line_v2(cp,p, l1, l2); + lambda = closest_to_line_v2(cp, p, l1, l2); if (lambda <= 0.0f) copy_v2_v2(close_r, l1); @@ -228,7 +230,7 @@ void closest_to_line_segment_v3(float close_r[3], const float v1[3], const float { float lambda, cp[3]; - lambda= closest_to_line_v3(cp,v1, v2, v3); + lambda = closest_to_line_v3(cp, v1, v2, v3); if (lambda <= 0.0f) copy_v3_v3(close_r, v2); @@ -245,14 +247,13 @@ void closest_to_line_segment_v3(float close_r[3], const float v1[3], const float * pt: the point that you want the nearest of */ -// const float norm[3], const float coord[3], const float point[3], float dst_r[3] void closest_to_plane_v3(float close_r[3], const float plane_co[3], const float plane_no_unit[3], const float pt[3]) { float temp[3]; float dotprod; sub_v3_v3v3(temp, pt, plane_co); - dotprod= dot_v3v3(temp, plane_no_unit); + dotprod = dot_v3v3(temp, plane_no_unit); close_r[0] = pt[0] - (plane_no_unit[0] * dotprod); close_r[1] = pt[1] - (plane_no_unit[1] * dotprod); @@ -296,16 +297,16 @@ float dist_to_line_segment_v3(const float v1[3], const float v2[3], const float int isect_line_line_v2_int(const int v1[2], const int v2[2], const int v3[2], const int v4[2]) { float div, labda, mu; - - div= (float)((v2[0]-v1[0])*(v4[1]-v3[1])-(v2[1]-v1[1])*(v4[0]-v3[0])); - if (div==0.0f) return ISECT_LINE_LINE_COLINEAR; - - labda= ((float)(v1[1]-v3[1])*(v4[0]-v3[0])-(v1[0]-v3[0])*(v4[1]-v3[1]))/div; - - mu= ((float)(v1[1]-v3[1])*(v2[0]-v1[0])-(v1[0]-v3[0])*(v2[1]-v1[1]))/div; - - if (labda>=0.0f && labda<=1.0f && mu>=0.0f && mu<=1.0f) { - if (labda==0.0f || labda==1.0f || mu==0.0f || mu==1.0f) return ISECT_LINE_LINE_EXACT; + + div = (float)((v2[0] - v1[0]) * (v4[1] - v3[1])-(v2[1] - v1[1]) * (v4[0] - v3[0])); + if (div == 0.0f) return ISECT_LINE_LINE_COLINEAR; + + labda = ((float)(v1[1] - v3[1]) * (v4[0] - v3[0])-(v1[0] - v3[0]) * (v4[1] - v3[1])) / div; + + mu = ((float)(v1[1] - v3[1]) * (v2[0] - v1[0])-(v1[0] - v3[0]) * (v2[1] - v1[1])) / div; + + if (labda >= 0.0f && labda <= 1.0f && mu >= 0.0f && mu <= 1.0f) { + if (labda == 0.0f || labda == 1.0f || mu == 0.0f || mu == 1.0f) return ISECT_LINE_LINE_EXACT; return ISECT_LINE_LINE_CROSS; } return ISECT_LINE_LINE_NONE; @@ -315,16 +316,16 @@ int isect_line_line_v2_int(const int v1[2], const int v2[2], const int v3[2], co int isect_line_line_v2(const float v1[2], const float v2[2], const float v3[2], const float v4[2]) { float div, labda, mu; - - div= (v2[0]-v1[0])*(v4[1]-v3[1])-(v2[1]-v1[1])*(v4[0]-v3[0]); - if (div==0.0f) return ISECT_LINE_LINE_COLINEAR; - - labda= ((float)(v1[1]-v3[1])*(v4[0]-v3[0])-(v1[0]-v3[0])*(v4[1]-v3[1]))/div; - - mu= ((float)(v1[1]-v3[1])*(v2[0]-v1[0])-(v1[0]-v3[0])*(v2[1]-v1[1]))/div; - - if (labda>=0.0f && labda<=1.0f && mu>=0.0f && mu<=1.0f) { - if (labda==0.0f || labda==1.0f || mu==0.0f || mu==1.0f) return ISECT_LINE_LINE_EXACT; + + div = (v2[0] - v1[0]) * (v4[1] - v3[1])-(v2[1] - v1[1]) * (v4[0] - v3[0]); + if (div == 0.0f) return ISECT_LINE_LINE_COLINEAR; + + labda = ((float)(v1[1] - v3[1]) * (v4[0] - v3[0])-(v1[0] - v3[0]) * (v4[1] - v3[1])) / div; + + mu = ((float)(v1[1] - v3[1]) * (v2[0] - v1[0])-(v1[0] - v3[0]) * (v2[1] - v1[1])) / div; + + if (labda >= 0.0f && labda <= 1.0f && mu >= 0.0f && mu <= 1.0f) { + if (labda == 0.0f || labda == 1.0f || mu == 0.0f || mu == 1.0f) return ISECT_LINE_LINE_EXACT; return ISECT_LINE_LINE_CROSS; } return ISECT_LINE_LINE_NONE; @@ -338,25 +339,25 @@ int isect_seg_seg_v2_point(const float v1[2], const float v2[2], const float v3[ { float a1, a2, b1, b2, c1, c2, d; float u, v; - const float eps= 0.000001f; + const float eps = 0.000001f; - a1= v2[0]-v1[0]; - b1= v4[0]-v3[0]; - c1= v1[0]-v4[0]; + a1 = v2[0] - v1[0]; + b1 = v4[0] - v3[0]; + c1 = v1[0] - v4[0]; - a2= v2[1]-v1[1]; - b2= v4[1]-v3[1]; - c2= v1[1]-v4[1]; + a2 = v2[1] - v1[1]; + b2 = v4[1] - v3[1]; + c2 = v1[1] - v4[1]; - d= a1*b2-a2*b1; + d = a1 * b2 - a2 * b1; - if (d==0) { - if (a1*c2-a2*c1==0.0f && b1*c2-b2*c1==0.0f) { /* equal lines */ + if (d == 0) { + if (a1 * c2 - a2 * c1 == 0.0f && b1 * c2 - b2 * c1 == 0.0f) { /* equal lines */ float a[2], b[2], c[2]; float u2; - if (len_v2v2(v1, v2)==0.0f) { - if (len_v2v2(v3, v4)>eps) { + if (len_v2v2(v1, v2) == 0.0f) { + if (len_v2v2(v3, v4) > eps) { /* use non-point segment as basis */ SWAP(const float *, v1, v3); SWAP(const float *, v2, v4); @@ -375,14 +376,14 @@ int isect_seg_seg_v2_point(const float v1[2], const float v2[2], const float v3[ sub_v2_v2v2(a, v3, v1); sub_v2_v2v2(b, v2, v1); sub_v2_v2v2(c, v2, v1); - u= dot_v2v2(a, b) / dot_v2v2(c, c); + u = dot_v2v2(a, b) / dot_v2v2(c, c); sub_v2_v2v2(a, v4, v1); - u2= dot_v2v2(a, b) / dot_v2v2(c, c); + u2 = dot_v2v2(a, b) / dot_v2v2(c, c); - if (u>u2) SWAP(float, u, u2); + if (u > u2) SWAP(float, u, u2); - if (u>1.0f+eps || u2<-eps) return -1; /* non-ovlerlapping segments */ + if (u > 1.0f + eps || u2<-eps) return -1; /* non-ovlerlapping segments */ else if (maxf(0.0f, u) == minf(1.0f, u2)) { /* one common point: can return result */ interp_v2_v2v2(vi, v1, v2, maxf(0, u)); return 1; @@ -393,10 +394,10 @@ int isect_seg_seg_v2_point(const float v1[2], const float v2[2], const float v3[ return -1; } - u= (c2*b1-b2*c1)/d; - v= (c1*a2-a1*c2)/d; + u = (c2 * b1 - b2 * c1) / d; + v = (c1 * a2 - a1 * c2) / d; - if (u>=-eps && u<=1.0f+eps && v>=-eps && v<=1.0f+eps) { /* intersection */ + if (u >= -eps && u <= 1.0f + eps && v >= -eps && v <= 1.0f + eps) { /* intersection */ interp_v2_v2v2(vi, v1, v2, u); return 1; } @@ -427,20 +428,20 @@ int isect_line_sphere_v3(const float l1[3], const float l2[3], * Paul Bourke pbourke@swin.edu.au */ - const float ldir[3]= { + const float ldir[3] = { l2[0] - l1[0], l2[1] - l1[1], l2[2] - l1[2] }; - const float a= dot_v3v3(ldir, ldir); + const float a = dot_v3v3(ldir, ldir); - const float b= 2.0f * + const float b = 2.0f * (ldir[0] * (l1[0] - sp[0]) + ldir[1] * (l1[1] - sp[1]) + ldir[2] * (l1[2] - sp[2])); - const float c= + const float c = dot_v3v3(sp, sp) + dot_v3v3(l1, l1) - (2.0f * dot_v3v3(sp, l1)) - @@ -461,7 +462,7 @@ int isect_line_sphere_v3(const float l1[3], const float l2[3], return 1; } else if (i > 0.0f) { - const float i_sqrt= sqrt(i); /* avoid calc twice */ + const float i_sqrt = sqrt(i); /* avoid calc twice */ /* first intersection */ mu = (-b + i_sqrt) / (2.0f * a); @@ -483,18 +484,16 @@ int isect_line_sphere_v2(const float l1[2], const float l2[2], const float sp[2], const float r, float r_p1[2], float r_p2[2]) { - const float ldir[2]= { - l2[0] - l1[0], - l2[1] - l1[1] - }; + const float ldir[2] = {l2[0] - l1[0], + l2[1] - l1[1]}; - const float a= dot_v2v2(ldir, ldir); + const float a = dot_v2v2(ldir, ldir); - const float b= 2.0f * + const float b = 2.0f * (ldir[0] * (l1[0] - sp[0]) + - ldir[1] * (l1[1] - sp[1])); + ldir[1] * (l1[1] - sp[1])); - const float c= + const float c = dot_v2v2(sp, sp) + dot_v2v2(l1, l1) - (2.0f * dot_v2v2(sp, l1)) - @@ -515,7 +514,7 @@ int isect_line_sphere_v2(const float l1[2], const float l2[2], return 1; } else if (i > 0.0f) { - const float i_sqrt= sqrt(i); /* avoid calc twice */ + const float i_sqrt = sqrt(i); /* avoid calc twice */ /* first intersection */ mu = (-b + i_sqrt) / (2.0f * a); @@ -537,7 +536,7 @@ int isect_line_sphere_v2(const float l1[2], const float l2[2], * 1: intersection */ static short IsectLLPt2Df(const float x0, const float y0, const float x1, const float y1, - const float x2, const float y2, const float x3, const float y3, float *xi,float *yi) + const float x2, const float y2, const float x3, const float y3, float *xi, float *yi) { /* @@ -548,92 +547,93 @@ static short IsectLLPt2Df(const float x0, const float y0, const float x1, const * applies the math, but we don't need speed since this is a * pre-processing step */ - float c1,c2, // constants of linear equations - det_inv, // the inverse of the determinant of the coefficient - m1,m2; // the slopes of each line + float c1, c2; /* constants of linear equations */ + float det_inv; /* the inverse of the determinant of the coefficient */ + float m1, m2; /* the slopes of each line */ /* * compute slopes, note the cludge for infinity, however, this will * be close enough */ - if (fabs(x1-x0) > 0.000001) - m1 = (y1-y0) / (x1-x0); + if (fabs(x1 - x0) > 0.000001) + m1 = (y1 - y0) / (x1 - x0); else - return -1; /*m1 = (float) 1e+10;*/ // close enough to infinity + return -1; /*m1 = (float)1e+10;*/ // close enough to infinity - if (fabs(x3-x2) > 0.000001) - m2 = (y3-y2) / (x3-x2); + if (fabs(x3 - x2) > 0.000001) + m2 = (y3 - y2) / (x3 - x2); else - return -1; /*m2 = (float) 1e+10;*/ // close enough to infinity + return -1; /*m2 = (float)1e+10;*/ // close enough to infinity - if (fabs(m1-m2) < 0.000001) + if (fabs(m1 - m2) < 0.000001) return -1; /* parallel lines */ - -// compute constants - c1 = (y0-m1*x0); - c2 = (y2-m2*x2); + // compute constants + + c1 = (y0 - m1 * x0); + c2 = (y2 - m2 * x2); -// compute the inverse of the determinate + // compute the inverse of the determinate det_inv = 1.0f / (-m1 + m2); -// use Kramers rule to compute xi and yi + // use Kramers rule to compute xi and yi - *xi= ((-c2 + c1) *det_inv); - *yi= ((m2*c1 - m1*c2) *det_inv); - - return 1; -} // end Intersect_Lines + *xi = ((-c2 + c1) * det_inv); + *yi = ((m2 * c1 - m1 * c2) * det_inv); + + return 1; +} /* point in tri */ int isect_point_tri_v2(const float pt[2], const float v1[2], const float v2[2], const float v3[2]) { - if (line_point_side_v2(v1,v2,pt)>=0.0f) { - if (line_point_side_v2(v2,v3,pt)>=0.0f) { - if (line_point_side_v2(v3,v1,pt)>=0.0f) { + if (line_point_side_v2(v1, v2, pt) >= 0.0f) { + if (line_point_side_v2(v2, v3, pt) >= 0.0f) { + if (line_point_side_v2(v3, v1, pt) >= 0.0f) { return 1; } } } else { - if (! (line_point_side_v2(v2,v3,pt)>=0.0f)) { - if (! (line_point_side_v2(v3,v1,pt)>=0.0f)) { + if (!(line_point_side_v2(v2, v3, pt) >= 0.0f)) { + if (!(line_point_side_v2(v3, v1, pt) >= 0.0f)) { return -1; } } } - + return 0; } + /* point in quad - only convex quads */ int isect_point_quad_v2(const float pt[2], const float v1[2], const float v2[2], const float v3[2], const float v4[2]) { - if (line_point_side_v2(v1,v2,pt)>=0.0f) { - if (line_point_side_v2(v2,v3,pt)>=0.0f) { - if (line_point_side_v2(v3,v4,pt)>=0.0f) { - if (line_point_side_v2(v4,v1,pt)>=0.0f) { + if (line_point_side_v2(v1, v2, pt) >= 0.0f) { + if (line_point_side_v2(v2, v3, pt) >= 0.0f) { + if (line_point_side_v2(v3, v4, pt) >= 0.0f) { + if (line_point_side_v2(v4, v1, pt) >= 0.0f) { return 1; } } } } else { - if (! (line_point_side_v2(v2,v3,pt)>=0.0f)) { - if (! (line_point_side_v2(v3,v4,pt)>=0.0f)) { - if (! (line_point_side_v2(v4,v1,pt)>=0.0f)) { + if (!(line_point_side_v2(v2, v3, pt) >= 0.0f)) { + if (!(line_point_side_v2(v3, v4, pt) >= 0.0f)) { + if (!(line_point_side_v2(v4, v1, pt) >= 0.0f)) { return -1; } } } } - + return 0; } /* moved from effect.c * test if the line starting at p1 ending at p2 intersects the triangle v0..v2 - * return non zero if it does + * return non zero if it does */ int isect_line_tri_v3(const float p1[3], const float p2[3], const float v0[3], const float v1[3], const float v2[3], @@ -642,39 +642,40 @@ int isect_line_tri_v3(const float p1[3], const float p2[3], float p[3], s[3], d[3], e1[3], e2[3], q[3]; float a, f, u, v; - + sub_v3_v3v3(e1, v1, v0); sub_v3_v3v3(e2, v2, v0); sub_v3_v3v3(d, p2, p1); - + cross_v3_v3v3(p, d, e2); a = dot_v3v3(e1, p); if ((a > -0.000001f) && (a < 0.000001f)) return 0; - f = 1.0f/a; - + f = 1.0f / a; + sub_v3_v3v3(s, p1, v0); - + u = f * dot_v3v3(s, p); - if ((u < 0.0f)||(u > 1.0f)) return 0; - + if ((u < 0.0f) || (u > 1.0f)) return 0; + cross_v3_v3v3(q, s, e1); - + v = f * dot_v3v3(d, q); - if ((v < 0.0f)||((u + v) > 1.0f)) return 0; + if ((v < 0.0f) || ((u + v) > 1.0f)) return 0; *r_lambda = f * dot_v3v3(e2, q); - if ((*r_lambda < 0.0f)||(*r_lambda > 1.0f)) return 0; + if ((*r_lambda < 0.0f) || (*r_lambda > 1.0f)) return 0; if (r_uv) { - r_uv[0]= u; - r_uv[1]= v; + r_uv[0] = u; + r_uv[1] = v; } - + return 1; } + /* moved from effect.c * test if the ray starting at p1 going in d direction intersects the triangle v0..v2 - * return non zero if it does + * return non zero if it does */ int isect_ray_tri_v3(const float p1[3], const float d[3], const float v0[3], const float v1[3], const float v2[3], @@ -682,35 +683,35 @@ int isect_ray_tri_v3(const float p1[3], const float d[3], { float p[3], s[3], e1[3], e2[3], q[3]; float a, f, u, v; - + sub_v3_v3v3(e1, v1, v0); sub_v3_v3v3(e2, v2, v0); - + cross_v3_v3v3(p, d, e2); a = dot_v3v3(e1, p); /* note: these values were 0.000001 in 2.4x but for projection snapping on * a human head (1BU==1m), subsurf level 2, this gave many errors - campbell */ if ((a > -0.00000001f) && (a < 0.00000001f)) return 0; - f = 1.0f/a; - + f = 1.0f / a; + sub_v3_v3v3(s, p1, v0); - + u = f * dot_v3v3(s, p); - if ((u < 0.0f)||(u > 1.0f)) return 0; + if ((u < 0.0f) || (u > 1.0f)) return 0; cross_v3_v3v3(q, s, e1); - + v = f * dot_v3v3(d, q); - if ((v < 0.0f)||((u + v) > 1.0f)) return 0; + if ((v < 0.0f) || ((u + v) > 1.0f)) return 0; *r_lambda = f * dot_v3v3(e2, q); if ((*r_lambda < 0.0f)) return 0; if (r_uv) { - r_uv[0]= u; - r_uv[1]= v; + r_uv[0] = u; + r_uv[1] = v; } - + return 1; } @@ -724,20 +725,20 @@ int isect_ray_plane_v3(const float p1[3], const float d[3], sub_v3_v3v3(e1, v1, v0); sub_v3_v3v3(e2, v2, v0); - + cross_v3_v3v3(p, d, e2); a = dot_v3v3(e1, p); /* note: these values were 0.000001 in 2.4x but for projection snapping on * a human head (1BU==1m), subsurf level 2, this gave many errors - campbell */ if ((a > -0.00000001f) && (a < 0.00000001f)) return 0; - f = 1.0f/a; - + f = 1.0f / a; + sub_v3_v3v3(s, p1, v0); - + /* u = f * dot_v3v3(s, p); */ /*UNUSED*/ cross_v3_v3v3(q, s, e1); - + /* v = f * dot_v3v3(d, q); */ /*UNUSED*/ *r_lambda = f * dot_v3v3(e2, q); @@ -759,24 +760,24 @@ int isect_ray_tri_epsilon_v3(const float p1[3], const float d[3], cross_v3_v3v3(p, d, e2); a = dot_v3v3(e1, p); if (a == 0.0f) return 0; - f = 1.0f/a; + f = 1.0f / a; sub_v3_v3v3(s, p1, v0); u = f * dot_v3v3(s, p); - if ((u < -epsilon)||(u > 1.0f+epsilon)) return 0; + if ((u < -epsilon) || (u > 1.0f + epsilon)) return 0; cross_v3_v3v3(q, s, e1); v = f * dot_v3v3(d, q); - if ((v < -epsilon)||((u + v) > 1.0f+epsilon)) return 0; + if ((v < -epsilon) || ((u + v) > 1.0f + epsilon)) return 0; *r_lambda = f * dot_v3v3(e2, q); if ((*r_lambda < 0.0f)) return 0; if (uv) { - uv[0]= u; - uv[1]= v; + uv[0] = u; + uv[1] = v; } return 1; @@ -789,50 +790,52 @@ int isect_ray_tri_threshold_v3(const float p1[3], const float d[3], float p[3], s[3], e1[3], e2[3], q[3]; float a, f, u, v; float du = 0, dv = 0; - + sub_v3_v3v3(e1, v1, v0); sub_v3_v3v3(e2, v2, v0); - + cross_v3_v3v3(p, d, e2); a = dot_v3v3(e1, p); if ((a > -0.000001f) && (a < 0.000001f)) return 0; - f = 1.0f/a; - + f = 1.0f / a; + sub_v3_v3v3(s, p1, v0); - + cross_v3_v3v3(q, s, e1); *r_lambda = f * dot_v3v3(e2, q); if ((*r_lambda < 0.0f)) return 0; - + u = f * dot_v3v3(s, p); v = f * dot_v3v3(d, q); - + if (u < 0) du = u; if (u > 1) du = u - 1; if (v < 0) dv = v; if (v > 1) dv = v - 1; if (u > 0 && v > 0 && u + v > 1) { float t = u + v - 1; - du = u - t/2; - dv = v - t/2; + du = u - t / 2; + dv = v - t / 2; } mul_v3_fl(e1, du); mul_v3_fl(e2, dv); - + if (dot_v3v3(e1, e1) + dot_v3v3(e2, e2) > threshold * threshold) { return 0; } if (r_uv) { - r_uv[0]= u; - r_uv[1]= v; + r_uv[0] = u; + r_uv[1] = v; } - + return 1; } -int isect_line_plane_v3(float out[3], const float l1[3], const float l2[3], const float plane_co[3], const float plane_no[3], const short no_flip) +int isect_line_plane_v3(float out[3], + const float l1[3], const float l2[3], + const float plane_co[3], const float plane_no[3], const short no_flip) { float l_vec[3]; /* l1 -> l2 normalized vector */ float p_no[3]; /* 'plane_no' normalized */ @@ -843,7 +846,7 @@ int isect_line_plane_v3(float out[3], const float l1[3], const float l2[3], cons normalize_v3(l_vec); normalize_v3_v3(p_no, plane_no); - dot= dot_v3v3(l_vec, p_no); + dot = dot_v3v3(l_vec, p_no); if (dot == 0.0f) { return 0; } @@ -854,7 +857,7 @@ int isect_line_plane_v3(float out[3], const float l1[3], const float l2[3], cons /* for predictable flipping since the plane is only used to * define a direction, ignore its flipping and aligned with 'l_vec' */ if (dot < 0.0f) { - dot= -dot; + dot = -dot; negate_v3(p_no); } @@ -864,7 +867,7 @@ int isect_line_plane_v3(float out[3], const float l1[3], const float l2[3], cons /* treat line like a ray, when 'no_flip' is set */ if (no_flip && dist < 0.0f) { - dist= -dist; + dist = -dist; } mul_v3_fl(l_vec, dist / dot); @@ -889,20 +892,21 @@ void isect_plane_plane_v3(float r_isect_co[3], float r_isect_no[3], /* Adapted from the paper by Kasper Fauerby */ + /* "Improved Collision detection and Response" */ static int getLowestRoot(const float a, const float b, const float c, const float maxR, float *root) { // Check if a solution exists - float determinant = b*b - 4.0f*a*c; + float determinant = b * b - 4.0f * a * c; // If determinant is negative it means no solutions. if (determinant >= 0.0f) { // calculate the two roots: (if determinant == 0 then // x1==x2 but lets disregard that slight optimization) float sqrtD = (float)sqrt(determinant); - float r1 = (-b - sqrtD) / (2.0f*a); - float r2 = (-b + sqrtD) / (2.0f*a); - + float r1 = (-b - sqrtD) / (2.0f * a); + float r2 = (-b + sqrtD) / (2.0f * a); + // Sort so x1 <= x2 if (r1 > r2) SWAP(float, r1, r2); @@ -924,30 +928,29 @@ static int getLowestRoot(const float a, const float b, const float c, const floa return 0; } -int isect_sweeping_sphere_tri_v3( - const float p1[3], const float p2[3], const float radius, - const float v0[3], const float v1[3], const float v2[3], - float *r_lambda, float ipoint[3]) +int isect_sweeping_sphere_tri_v3(const float p1[3], const float p2[3], const float radius, + const float v0[3], const float v1[3], const float v2[3], + float *r_lambda, float ipoint[3]) { float e1[3], e2[3], e3[3], point[3], vel[3], /*dist[3],*/ nor[3], temp[3], bv[3]; - float a, b, c, d, e, x, y, z, radius2=radius*radius; - float elen2,edotv,edotbv,nordotv; + float a, b, c, d, e, x, y, z, radius2 = radius * radius; + float elen2, edotv, edotbv, nordotv; float newLambda; - int found_by_sweep=0; + int found_by_sweep = 0; - sub_v3_v3v3(e1,v1,v0); - sub_v3_v3v3(e2,v2,v0); - sub_v3_v3v3(vel,p2,p1); + sub_v3_v3v3(e1, v1, v0); + sub_v3_v3v3(e2, v2, v0); + sub_v3_v3v3(vel, p2, p1); -/*---test plane of tri---*/ - cross_v3_v3v3(nor,e1,e2); + /*---test plane of tri---*/ + cross_v3_v3v3(nor, e1, e2); normalize_v3(nor); /* flip normal */ - if (dot_v3v3(nor,vel)>0.0f) negate_v3(nor); - - a=dot_v3v3(p1,nor)-dot_v3v3(v0,nor); - nordotv=dot_v3v3(nor,vel); + if (dot_v3v3(nor, vel) > 0.0f) negate_v3(nor); + + a = dot_v3v3(p1, nor) - dot_v3v3(v0, nor); + nordotv = dot_v3v3(nor, vel); if (fabsf(nordotv) < 0.000001f) { if (fabsf(a) >= radius) { @@ -955,13 +958,13 @@ int isect_sweeping_sphere_tri_v3( } } else { - float t0=(-a+radius)/nordotv; - float t1=(-a-radius)/nordotv; + float t0 = (-a + radius) / nordotv; + float t1 = (-a - radius) / nordotv; - if (t0>t1) + if (t0 > t1) SWAP(float, t0, t1); - if (t0>1.0f || t1<0.0f) return 0; + if (t0 > 1.0f || t1 < 0.0f) return 0; /* clamp to [0,1] */ CLAMP(t0, 0.0f, 1.0f); @@ -970,115 +973,115 @@ int isect_sweeping_sphere_tri_v3( /*---test inside of tri---*/ /* plane intersection point */ - point[0] = p1[0] + vel[0]*t0 - nor[0]*radius; - point[1] = p1[1] + vel[1]*t0 - nor[1]*radius; - point[2] = p1[2] + vel[2]*t0 - nor[2]*radius; + point[0] = p1[0] + vel[0] * t0 - nor[0] * radius; + point[1] = p1[1] + vel[1] * t0 - nor[1] * radius; + point[2] = p1[2] + vel[2] * t0 - nor[2] * radius; /* is the point in the tri? */ - a=dot_v3v3(e1,e1); - b=dot_v3v3(e1,e2); - c=dot_v3v3(e2,e2); + a = dot_v3v3(e1, e1); + b = dot_v3v3(e1, e2); + c = dot_v3v3(e2, e2); - sub_v3_v3v3(temp,point,v0); - d=dot_v3v3(temp,e1); - e=dot_v3v3(temp,e2); - - x=d*c-e*b; - y=e*a-d*b; - z=x+y-(a*c-b*b); + sub_v3_v3v3(temp, point, v0); + d = dot_v3v3(temp, e1); + e = dot_v3v3(temp, e2); + + x = d * c - e * b; + y = e * a - d * b; + z = x + y - (a * c - b * b); if (z <= 0.0f && (x >= 0.0f && y >= 0.0f)) { - //(((unsigned int)z)& ~(((unsigned int)x)|((unsigned int)y))) & 0x80000000) { - *r_lambda=t0; - copy_v3_v3(ipoint,point); + //(((unsigned int)z)& ~(((unsigned int)x)|((unsigned int)y))) & 0x80000000) { + *r_lambda = t0; + copy_v3_v3(ipoint, point); return 1; } } - *r_lambda=1.0f; + *r_lambda = 1.0f; -/*---test points---*/ - a=dot_v3v3(vel,vel); + /*---test points---*/ + a = dot_v3v3(vel, vel); /*v0*/ - sub_v3_v3v3(temp,p1,v0); - b=2.0f*dot_v3v3(vel,temp); - c=dot_v3v3(temp,temp)-radius2; + sub_v3_v3v3(temp, p1, v0); + b = 2.0f * dot_v3v3(vel, temp); + c = dot_v3v3(temp, temp) - radius2; if (getLowestRoot(a, b, c, *r_lambda, r_lambda)) { - copy_v3_v3(ipoint,v0); - found_by_sweep=1; + copy_v3_v3(ipoint, v0); + found_by_sweep = 1; } /*v1*/ - sub_v3_v3v3(temp,p1,v1); - b=2.0f*dot_v3v3(vel,temp); - c=dot_v3v3(temp,temp)-radius2; + sub_v3_v3v3(temp, p1, v1); + b = 2.0f * dot_v3v3(vel, temp); + c = dot_v3v3(temp, temp) - radius2; if (getLowestRoot(a, b, c, *r_lambda, r_lambda)) { - copy_v3_v3(ipoint,v1); - found_by_sweep=1; + copy_v3_v3(ipoint, v1); + found_by_sweep = 1; } - + /*v2*/ - sub_v3_v3v3(temp,p1,v2); - b=2.0f*dot_v3v3(vel,temp); - c=dot_v3v3(temp,temp)-radius2; + sub_v3_v3v3(temp, p1, v2); + b = 2.0f * dot_v3v3(vel, temp); + c = dot_v3v3(temp, temp) - radius2; if (getLowestRoot(a, b, c, *r_lambda, r_lambda)) { - copy_v3_v3(ipoint,v2); - found_by_sweep=1; + copy_v3_v3(ipoint, v2); + found_by_sweep = 1; } -/*---test edges---*/ - sub_v3_v3v3(e3,v2,v1); //wasnt yet calculated + /*---test edges---*/ + sub_v3_v3v3(e3, v2, v1); //wasnt yet calculated /*e1*/ - sub_v3_v3v3(bv,v0,p1); + sub_v3_v3v3(bv, v0, p1); - elen2 = dot_v3v3(e1,e1); - edotv = dot_v3v3(e1,vel); - edotbv = dot_v3v3(e1,bv); + elen2 = dot_v3v3(e1, e1); + edotv = dot_v3v3(e1, vel); + edotbv = dot_v3v3(e1, bv); - a=elen2*(-dot_v3v3(vel,vel))+edotv*edotv; - b=2.0f*(elen2*dot_v3v3(vel,bv)-edotv*edotbv); - c=elen2*(radius2-dot_v3v3(bv,bv))+edotbv*edotbv; + a = elen2 * (-dot_v3v3(vel, vel)) + edotv * edotv; + b = 2.0f * (elen2 * dot_v3v3(vel, bv) - edotv * edotbv); + c = elen2 * (radius2 - dot_v3v3(bv, bv)) + edotbv * edotbv; if (getLowestRoot(a, b, c, *r_lambda, &newLambda)) { - e=(edotv*newLambda-edotbv)/elen2; + e = (edotv * newLambda - edotbv) / elen2; if (e >= 0.0f && e <= 1.0f) { *r_lambda = newLambda; - copy_v3_v3(ipoint,e1); - mul_v3_fl(ipoint,e); + copy_v3_v3(ipoint, e1); + mul_v3_fl(ipoint, e); add_v3_v3(ipoint, v0); - found_by_sweep=1; + found_by_sweep = 1; } } /*e2*/ /*bv is same*/ - elen2 = dot_v3v3(e2,e2); - edotv = dot_v3v3(e2,vel); - edotbv = dot_v3v3(e2,bv); + elen2 = dot_v3v3(e2, e2); + edotv = dot_v3v3(e2, vel); + edotbv = dot_v3v3(e2, bv); - a=elen2*(-dot_v3v3(vel,vel))+edotv*edotv; - b=2.0f*(elen2*dot_v3v3(vel,bv)-edotv*edotbv); - c=elen2*(radius2-dot_v3v3(bv,bv))+edotbv*edotbv; + a = elen2 * (-dot_v3v3(vel, vel)) + edotv * edotv; + b = 2.0f * (elen2 * dot_v3v3(vel, bv) - edotv * edotbv); + c = elen2 * (radius2 - dot_v3v3(bv, bv)) + edotbv * edotbv; if (getLowestRoot(a, b, c, *r_lambda, &newLambda)) { - e=(edotv*newLambda-edotbv)/elen2; + e = (edotv * newLambda - edotbv) / elen2; if (e >= 0.0f && e <= 1.0f) { *r_lambda = newLambda; - copy_v3_v3(ipoint,e2); - mul_v3_fl(ipoint,e); + copy_v3_v3(ipoint, e2); + mul_v3_fl(ipoint, e); add_v3_v3(ipoint, v0); - found_by_sweep=1; + found_by_sweep = 1; } } @@ -1088,36 +1091,37 @@ int isect_sweeping_sphere_tri_v3( /* edotv = dot_v3v3(e1,vel); */ /* UNUSED */ /* edotbv = dot_v3v3(e1,bv); */ /* UNUSED */ - sub_v3_v3v3(bv,v1,p1); - elen2 = dot_v3v3(e3,e3); - edotv = dot_v3v3(e3,vel); - edotbv = dot_v3v3(e3,bv); + sub_v3_v3v3(bv, v1, p1); + elen2 = dot_v3v3(e3, e3); + edotv = dot_v3v3(e3, vel); + edotbv = dot_v3v3(e3, bv); - a=elen2*(-dot_v3v3(vel,vel))+edotv*edotv; - b=2.0f*(elen2*dot_v3v3(vel,bv)-edotv*edotbv); - c=elen2*(radius2-dot_v3v3(bv,bv))+edotbv*edotbv; + a = elen2 * (-dot_v3v3(vel, vel)) + edotv * edotv; + b = 2.0f * (elen2 * dot_v3v3(vel, bv) - edotv * edotbv); + c = elen2 * (radius2 - dot_v3v3(bv, bv)) + edotbv * edotbv; if (getLowestRoot(a, b, c, *r_lambda, &newLambda)) { - e=(edotv*newLambda-edotbv)/elen2; + e = (edotv * newLambda - edotbv) / elen2; if (e >= 0.0f && e <= 1.0f) { *r_lambda = newLambda; - copy_v3_v3(ipoint,e3); - mul_v3_fl(ipoint,e); + copy_v3_v3(ipoint, e3); + mul_v3_fl(ipoint, e); add_v3_v3(ipoint, v1); - found_by_sweep=1; + found_by_sweep = 1; } } return found_by_sweep; } + int isect_axial_line_tri_v3(const int axis, const float p1[3], const float p2[3], const float v0[3], const float v1[3], const float v2[3], float *r_lambda) { float p[3], e1[3], e2[3]; float u, v, f; - int a0=axis, a1=(axis+1)%3, a2=(axis+2)%3; + int a0 = axis, a1 = (axis + 1) % 3, a2 = (axis + 2) % 3; //return isect_line_tri_v3(p1,p2,v0,v1,v2,lambda); @@ -1128,29 +1132,29 @@ int isect_axial_line_tri_v3(const int axis, const float p1[3], const float p2[3] //if(MAX3(v0[a2],v1[a2],v2[a2]) < p1[a2]) return 0; ///* then a full intersection test */ - - sub_v3_v3v3(e1,v1,v0); - sub_v3_v3v3(e2,v2,v0); - sub_v3_v3v3(p,v0,p1); - f= (e2[a1]*e1[a2]-e2[a2]*e1[a1]); + sub_v3_v3v3(e1, v1, v0); + sub_v3_v3v3(e2, v2, v0); + sub_v3_v3v3(p, v0, p1); + + f = (e2[a1] * e1[a2] - e2[a2] * e1[a1]); if ((f > -0.000001f) && (f < 0.000001f)) return 0; - v= (p[a2]*e1[a1]-p[a1]*e1[a2])/f; - if ((v < 0.0f)||(v > 1.0f)) return 0; - - f= e1[a1]; + v = (p[a2] * e1[a1] - p[a1] * e1[a2]) / f; + if ((v < 0.0f) || (v > 1.0f)) return 0; + + f = e1[a1]; if ((f > -0.000001f) && (f < 0.000001f)) { - f= e1[a2]; + f = e1[a2]; if ((f > -0.000001f) && (f < 0.000001f)) return 0; - u= (-p[a2]-v*e2[a2])/f; + u = (-p[a2] - v * e2[a2]) / f; } else - u= (-p[a1]-v*e2[a1])/f; + u = (-p[a1] - v * e2[a1]) / f; if ((u < 0.0f) || ((u + v) > 1.0f)) return 0; - *r_lambda = (p[a0]+u*e1[a0]+v*e2[a0])/(p2[a0]-p1[a0]); + *r_lambda = (p[a0] + u * e1[a0] + v * e2[a0]) / (p2[a0] - p1[a0]); if ((*r_lambda < 0.0f) || (*r_lambda > 1.0f)) return 0; @@ -1160,13 +1164,13 @@ int isect_axial_line_tri_v3(const int axis, const float p1[3], const float p2[3] /* Returns the number of point of interests * 0 - lines are colinear * 1 - lines are coplanar, i1 is set to intersection - * 2 - i1 and i2 are the nearest points on line 1 (v1, v2) and line 2 (v3, v4) respectively + * 2 - i1 and i2 are the nearest points on line 1 (v1, v2) and line 2 (v3, v4) respectively * */ int isect_line_line_v3(const float v1[3], const float v2[3], const float v3[3], const float v4[3], float i1[3], float i2[3]) { float a[3], b[3], c[3], ab[3], cb[3], dir1[3], dir2[3]; float d; - + sub_v3_v3v3(c, v3, v1); sub_v3_v3v3(a, v2, v1); sub_v3_v3v3(b, v4, v3); @@ -1189,7 +1193,7 @@ int isect_line_line_v3(const float v1[3], const float v2[3], const float v3[3], mul_v3_fl(a, dot_v3v3(cb, ab) / dot_v3v3(ab, ab)); add_v3_v3v3(i1, v1, a); copy_v3_v3(i2, i1); - + return 1; /* one intersection only */ } /* if not */ @@ -1205,7 +1209,7 @@ int isect_line_line_v3(const float v1[3], const float v2[3], const float v3[3], /* for the first line, offset the second line until it is coplanar */ add_v3_v3v3(v3t, v3, t); add_v3_v3v3(v4t, v4, t); - + sub_v3_v3v3(c, v3t, v1); sub_v3_v3v3(a, v2, v1); sub_v3_v3v3(b, v4t, v3t); @@ -1218,19 +1222,19 @@ int isect_line_line_v3(const float v1[3], const float v2[3], const float v3[3], /* for the second line, just substract the offset from the first intersection point */ sub_v3_v3v3(i2, i1, t); - + return 2; /* two nearest points */ } -} +} /* Intersection point strictly between the two lines - * 0 when no intersection is found + * 0 when no intersection is found * */ int isect_line_line_strict_v3(const float v1[3], const float v2[3], const float v3[3], const float v4[3], float vi[3], float *r_lambda) { float a[3], b[3], c[3], ab[3], cb[3], ca[3], dir1[3], dir2[3]; float d; - + sub_v3_v3v3(c, v3, v1); sub_v3_v3v3(a, v2, v1); sub_v3_v3v3(b, v4, v3); @@ -1254,9 +1258,9 @@ int isect_line_line_strict_v3(const float v1[3], const float v2[3], const float f1 = dot_v3v3(cb, ab) / dot_v3v3(ab, ab); f2 = dot_v3v3(ca, ab) / dot_v3v3(ab, ab); - + if (f1 >= 0 && f1 <= 1 && - f2 >= 0 && f2 <= 1) + f2 >= 0 && f2 <= 1) { mul_v3_fl(a, f1); add_v3_v3v3(vi, v1, a); @@ -1272,12 +1276,12 @@ int isect_line_line_strict_v3(const float v1[3], const float v2[3], const float else { return 0; } -} +} int isect_aabb_aabb_v3(const float min1[3], const float max1[3], const float min2[3], const float max2[3]) { - return (min1[0]=0.0f && inp2>=0.0f && inp3>=0.0f) return 1; - + + inp1 = (v2[0] - v1[0]) * (v1[1] - pt[1]) + (v1[1] - v2[1]) * (v1[0] - pt[0]); + inp2 = (v3[0] - v2[0]) * (v2[1] - pt[1]) + (v2[1] - v3[1]) * (v2[0] - pt[0]); + inp3 = (v1[0] - v3[0]) * (v3[1] - pt[1]) + (v3[1] - v1[1]) * (v3[0] - pt[0]); + + if (inp1 <= 0.0f && inp2 <= 0.0f && inp3 <= 0.0f) return 1; + if (inp1 >= 0.0f && inp2 >= 0.0f && inp3 >= 0.0f) return 1; + return 0; } #endif #if 0 + int isect_point_tri_v2(float v0[2], float v1[2], float v2[2], float pt[2]) { - /* not for quads, use for our abuse of LineIntersectsTriangleUV */ - float p1_3d[3], p2_3d[3], v0_3d[3], v1_3d[3], v2_3d[3]; - /* not used */ - float lambda, uv[3]; - - p1_3d[0] = p2_3d[0] = uv[0]= pt[0]; - p1_3d[1] = p2_3d[1] = uv[1]= uv[2]= pt[1]; - p1_3d[2] = 1.0f; - p2_3d[2] = -1.0f; - v0_3d[2] = v1_3d[2] = v2_3d[2] = 0.0; - - /* generate a new fuv, (this is possibly a non optimal solution, - * since we only need 2d calculation but use 3d func's) - * - * this method makes an imaginary triangle in 2d space using the UV's from the derived mesh face - * Then find new uv coords using the fuv and this face with LineIntersectsTriangleUV. - * This means the new values will be correct in relation to the derived meshes face. - */ - copy_v2_v2(v0_3d, v0); - copy_v2_v2(v1_3d, v1); - copy_v2_v2(v2_3d, v2); - - /* Doing this in 3D is not nice */ - return isect_line_tri_v3(p1_3d, p2_3d, v0_3d, v1_3d, v2_3d, &lambda, uv); + /* not for quads, use for our abuse of LineIntersectsTriangleUV */ + float p1_3d[3], p2_3d[3], v0_3d[3], v1_3d[3], v2_3d[3]; + /* not used */ + float lambda, uv[3]; + + p1_3d[0] = p2_3d[0] = uv[0] = pt[0]; + p1_3d[1] = p2_3d[1] = uv[1] = uv[2] = pt[1]; + p1_3d[2] = 1.0f; + p2_3d[2] = -1.0f; + v0_3d[2] = v1_3d[2] = v2_3d[2] = 0.0; + + /* generate a new fuv, (this is possibly a non optimal solution, + * since we only need 2d calculation but use 3d func's) + * + * this method makes an imaginary triangle in 2d space using the UV's from the derived mesh face + * Then find new uv coords using the fuv and this face with LineIntersectsTriangleUV. + * This means the new values will be correct in relation to the derived meshes face. + */ + copy_v2_v2(v0_3d, v0); + copy_v2_v2(v1_3d, v1); + copy_v2_v2(v2_3d, v2); + + /* Doing this in 3D is not nice */ + return isect_line_tri_v3(p1_3d, p2_3d, v0_3d, v1_3d, v2_3d, &lambda, uv); } #endif @@ -1526,19 +1543,19 @@ int isect_point_tri_v2(float v0[2], float v1[2], float v2[2], float pt[2]) int isect_point_tri_v2_int(const int x1, const int y1, const int x2, const int y2, const int a, const int b) { float v1[2], v2[2], v3[2], p[2]; - - v1[0]= (float)x1; - v1[1]= (float)y1; - - v2[0]= (float)x1; - v2[1]= (float)y2; - - v3[0]= (float)x2; - v3[1]= (float)y1; - - p[0]= (float)a; - p[1]= (float)b; - + + v1[0] = (float)x1; + v1[1] = (float)y1; + + v2[0] = (float)x1; + v2[1] = (float)y2; + + v3[0] = (float)x2; + v3[1] = (float)y1; + + p[0] = (float)a; + p[1] = (float)b; + return isect_point_tri_v2(p, v1, v2, v3); } @@ -1547,44 +1564,45 @@ static int point_in_slice(const float p[3], const float v1[3], const float l1[3] /* * what is a slice ? * some maths: - * a line including l1,l2 and a point not on the line + * a line including l1,l2 and a point not on the line * define a subset of R3 delimited by planes parallel to the line and orthogonal - * to the (point --> line) distance vector,one plane on the line one on the point, + * to the (point --> line) distance vector,one plane on the line one on the point, * the room inside usually is rather small compared to R3 though still infinte - * useful for restricting (speeding up) searches + * useful for restricting (speeding up) searches * e.g. all points of triangular prism are within the intersection of 3 'slices' - * onother trivial case : cube + * onother trivial case : cube * but see a 'spat' which is a deformed cube with paired parallel planes needs only 3 slices too */ - float h,rp[3],cp[3],q[3]; + float h, rp[3], cp[3], q[3]; - closest_to_line_v3(cp,v1,l1,l2); - sub_v3_v3v3(q,cp,v1); + closest_to_line_v3(cp, v1, l1, l2); + sub_v3_v3v3(q, cp, v1); - sub_v3_v3v3(rp,p,v1); - h=dot_v3v3(q,rp)/dot_v3v3(q,q); + sub_v3_v3v3(rp, p, v1); + h = dot_v3v3(q, rp) / dot_v3v3(q, q); if (h < 0.0f || h > 1.0f) return 0; return 1; } #if 0 + /* adult sister defining the slice planes by the origin and the normal * NOTE |normal| may not be 1 but defining the thickness of the slice */ -static int point_in_slice_as(float p[3],float origin[3],float normal[3]) +static int point_in_slice_as(float p[3], float origin[3], float normal[3]) { - float h,rp[3]; - sub_v3_v3v3(rp,p,origin); - h=dot_v3v3(normal,rp)/dot_v3v3(normal,normal); + float h, rp[3]; + sub_v3_v3v3(rp, p, origin); + h = dot_v3v3(normal, rp) / dot_v3v3(normal, normal); if (h < 0.0f || h > 1.0f) return 0; return 1; } /*mama (knowing the squared length of the normal)*/ -static int point_in_slice_m(float p[3],float origin[3],float normal[3],float lns) +static int point_in_slice_m(float p[3], float origin[3], float normal[3], float lns) { - float h,rp[3]; - sub_v3_v3v3(rp,p,origin); - h=dot_v3v3(normal,rp)/lns; + float h, rp[3]; + sub_v3_v3v3(rp, p, origin); + h = dot_v3v3(normal, rp) / lns; if (h < 0.0f || h > 1.0f) return 0; return 1; } @@ -1592,9 +1610,9 @@ static int point_in_slice_m(float p[3],float origin[3],float normal[3],float lns int isect_point_tri_prism_v3(const float p[3], const float v1[3], const float v2[3], const float v3[3]) { - if (!point_in_slice(p,v1,v2,v3)) return 0; - if (!point_in_slice(p,v2,v3,v1)) return 0; - if (!point_in_slice(p,v3,v1,v2)) return 0; + if (!point_in_slice(p, v1, v2, v3)) return 0; + if (!point_in_slice(p, v2, v3, v1)) return 0; + if (!point_in_slice(p, v3, v1, v2)) return 0; return 1; } @@ -1604,12 +1622,12 @@ int clip_line_plane(float p1[3], float p2[3], const float plane[4]) copy_v3_v3(n, plane); sub_v3_v3v3(dp, p2, p1); - div= dot_v3v3(dp, n); + div = dot_v3v3(dp, n); if (div == 0.0f) /* parallel */ return 1; - t= -(dot_v3v3(p1, n) + plane[3])/div; + t = -(dot_v3v3(p1, n) + plane[3]) / div; if (div > 0.0f) { /* behind plane, completely clipped */ @@ -1647,20 +1665,19 @@ int clip_line_plane(float p1[3], float p2[3], const float plane[4]) } } - void plot_line_v2v2i(const int p1[2], const int p2[2], int (*callback)(int, int, void *), void *userData) { - int x1= p1[0]; - int y1= p1[1]; - int x2= p2[0]; - int y2= p2[1]; + int x1 = p1[0]; + int y1 = p1[1]; + int x2 = p2[0]; + int y2 = p2[1]; signed char ix; signed char iy; // if x1 == x2 or y1 == y2, then it does not matter what we set here - int delta_x = (x2 > x1?(ix = 1, x2 - x1):(ix = -1, x1 - x2)) << 1; - int delta_y = (y2 > y1?(iy = 1, y2 - y1):(iy = -1, y1 - y2)) << 1; + int delta_x = (x2 > x1 ? (ix = 1, x2 - x1) : (ix = -1, x1 - x2)) << 1; + int delta_y = (y2 > y1 ? (iy = 1, y2 - y1) : (iy = -1, y1 - y2)) << 1; if (callback(x1, y1, userData) == 0) { return; @@ -1717,18 +1734,18 @@ void plot_line_v2v2i(const int p1[2], const int p2[2], int (*callback)(int, int, /* get the 2 dominant axis values, 0==X, 1==Y, 2==Z */ void axis_dominant_v3(int *axis_a, int *axis_b, const float axis[3]) { - const float xn= fabsf(axis[0]); - const float yn= fabsf(axis[1]); - const float zn= fabsf(axis[2]); + const float xn = fabsf(axis[0]); + const float yn = fabsf(axis[1]); + const float zn = fabsf(axis[2]); - if (zn >= xn && zn >= yn) { *axis_a= 0; *axis_b= 1; } - else if (yn >= xn && yn >= zn) { *axis_a= 0; *axis_b= 2; } - else { *axis_a= 1; *axis_b= 2; } + if (zn >= xn && zn >= yn) { *axis_a= 0; *axis_b = 1; } + else if (yn >= xn && yn >= zn) { *axis_a= 0; *axis_b = 2; } + else { *axis_a= 1; *axis_b = 2; } } static float tri_signed_area(const float v1[3], const float v2[3], const float v3[3], const int i, const int j) { - return 0.5f*((v1[i]-v2[i])*(v2[j]-v3[j]) + (v1[j]-v2[j])*(v3[i]-v2[i])); + return 0.5f * ((v1[i] - v2[i]) * (v2[j] - v3[j]) + (v1[j] - v2[j]) * (v3[i] - v2[i])); } /* return 1 when degenerate */ @@ -1760,17 +1777,17 @@ void interp_weights_face_v3(float w[4], const float v1[3], const float v2[3], co { float w2[3]; - w[0]= w[1]= w[2]= w[3]= 0.0f; + w[0] = w[1] = w[2] = w[3] = 0.0f; /* first check for exact match */ if (equals_v3v3(co, v1)) - w[0]= 1.0f; + w[0] = 1.0f; else if (equals_v3v3(co, v2)) - w[1]= 1.0f; + w[1] = 1.0f; else if (equals_v3v3(co, v3)) - w[2]= 1.0f; + w[2] = 1.0f; else if (v4 && equals_v3v3(co, v4)) - w[3]= 1.0f; + w[3] = 1.0f; else { /* otherwise compute barycentric interpolation weights */ float n1[3], n2[3], n[3]; @@ -1787,19 +1804,19 @@ void interp_weights_face_v3(float w[4], const float v1[3], const float v2[3], co /* OpenGL seems to split this way, so we do too */ if (v4) { - degenerate= barycentric_weights(v1, v2, v4, co, n, w); + degenerate = barycentric_weights(v1, v2, v4, co, n, w); SWAP(float, w[2], w[3]); if (degenerate || (w[0] < 0.0f)) { /* if w[1] is negative, co is on the other side of the v1-v3 edge, * so we interpolate using the other triangle */ - degenerate= barycentric_weights(v2, v3, v4, co, n, w2); + degenerate = barycentric_weights(v2, v3, v4, co, n, w2); if (!degenerate) { - w[0]= 0.0f; - w[1]= w2[0]; - w[2]= w2[1]; - w[3]= w2[2]; + w[0] = 0.0f; + w[1] = w2[0]; + w[2] = w2[1]; + w[3] = w2[2]; } } } @@ -1831,8 +1848,8 @@ void barycentric_weights_v2(const float v1[2], const float v2[2], const float v3 * calculate the location of a point in relation to the second triangle. * Useful for finding relative positions with geometry */ void barycentric_transform(float pt_tar[3], float const pt_src[3], - const float tri_tar_p1[3], const float tri_tar_p2[3], const float tri_tar_p3[3], - const float tri_src_p1[3], const float tri_src_p2[3], const float tri_src_p3[3]) + const float tri_tar_p1[3], const float tri_tar_p2[3], const float tri_tar_p3[3], + const float tri_src_p1[3], const float tri_src_p2[3], const float tri_src_p3[3]) { /* this works by moving the source triangle so its normal is pointing on the Z * axis where its barycentric wights can be calculated in 2D and its Z offset can @@ -1843,7 +1860,7 @@ void barycentric_transform(float pt_tar[3], float const pt_src[3], float no_tar[3], no_src[3]; float quat_src[4]; float pt_src_xy[3]; - float tri_xy_src[3][3]; + float tri_xy_src[3][3]; float w_src[3]; float area_tar, area_src; float z_ofs_src; @@ -1868,10 +1885,10 @@ void barycentric_transform(float pt_tar[3], float const pt_src[3], barycentric_weights_v2(tri_xy_src[0], tri_xy_src[1], tri_xy_src[2], pt_src_xy, w_src); interp_v3_v3v3v3(pt_tar, tri_tar_p1, tri_tar_p2, tri_tar_p3, w_src); - area_tar= sqrtf(area_tri_v3(tri_tar_p1, tri_tar_p2, tri_tar_p3)); - area_src= sqrtf(area_tri_v2(tri_xy_src[0], tri_xy_src[1], tri_xy_src[2])); + area_tar = sqrtf(area_tri_v3(tri_tar_p1, tri_tar_p2, tri_tar_p3)); + area_src = sqrtf(area_tri_v2(tri_xy_src[0], tri_xy_src[1], tri_xy_src[2])); - z_ofs_src= pt_src_xy[2] - tri_xy_src[0][2]; + z_ofs_src = pt_src_xy[2] - tri_xy_src[0][2]; madd_v3_v3v3fl(pt_tar, pt_tar, no_tar, (z_ofs_src / area_src) * area_tar); } @@ -1883,66 +1900,66 @@ int interp_sparse_array(float *array, int const list_size, const float skipval) int found_valid = 0; int i; - for (i=0; i < list_size; i++) { + for (i = 0; i < list_size; i++) { if (array[i] == skipval) - found_invalid= 1; + found_invalid = 1; else - found_valid= 1; + found_valid = 1; } - if (found_valid==0) { + if (found_valid == 0) { return -1; } - else if (found_invalid==0) { + else if (found_invalid == 0) { return 0; } else { /* found invalid depths, interpolate */ - float valid_last= skipval; - int valid_ofs= 0; + float valid_last = skipval; + int valid_ofs = 0; - float *array_up= MEM_callocN(sizeof(float) * list_size, "interp_sparse_array up"); - float *array_down= MEM_callocN(sizeof(float) * list_size, "interp_sparse_array up"); + float *array_up = MEM_callocN(sizeof(float)* list_size, "interp_sparse_array up"); + float *array_down = MEM_callocN(sizeof(float)* list_size, "interp_sparse_array up"); - int *ofs_tot_up= MEM_callocN(sizeof(int) * list_size, "interp_sparse_array tup"); - int *ofs_tot_down= MEM_callocN(sizeof(int) * list_size, "interp_sparse_array tdown"); + int *ofs_tot_up = MEM_callocN(sizeof(int)* list_size, "interp_sparse_array tup"); + int *ofs_tot_down = MEM_callocN(sizeof(int)* list_size, "interp_sparse_array tdown"); - for (i=0; i < list_size; i++) { + for (i = 0; i < list_size; i++) { if (array[i] == skipval) { - array_up[i]= valid_last; - ofs_tot_up[i]= ++valid_ofs; + array_up[i] = valid_last; + ofs_tot_up[i] = ++valid_ofs; } else { - valid_last= array[i]; - valid_ofs= 0; + valid_last = array[i]; + valid_ofs = 0; } } - valid_last= skipval; - valid_ofs= 0; + valid_last = skipval; + valid_ofs = 0; - for (i=list_size-1; i >= 0; i--) { + for (i = list_size - 1; i >= 0; i--) { if (array[i] == skipval) { - array_down[i]= valid_last; - ofs_tot_down[i]= ++valid_ofs; + array_down[i] = valid_last; + ofs_tot_down[i] = ++valid_ofs; } else { - valid_last= array[i]; - valid_ofs= 0; + valid_last = array[i]; + valid_ofs = 0; } } /* now blend */ - for (i=0; i < list_size; i++) { + for (i = 0; i < list_size; i++) { if (array[i] == skipval) { if (array_up[i] != skipval && array_down[i] != skipval) { - array[i]= ((array_up[i] * ofs_tot_down[i]) + (array_down[i] * ofs_tot_up[i])) / (float)(ofs_tot_down[i] + ofs_tot_up[i]); + array[i] = ((array_up[i] * ofs_tot_down[i]) + (array_down[i] * ofs_tot_up[i])) / (float)(ofs_tot_down[i] + ofs_tot_up[i]); } else if (array_up[i] != skipval) { - array[i]= array_up[i]; + array[i] = array_up[i]; } else if (array_down[i] != skipval) { - array[i]= array_down[i]; + array[i] = array_down[i]; } } } @@ -1967,14 +1984,14 @@ static float mean_value_half_tan(const float v1[3], const float v2[3], const flo sub_v3_v3v3(d3, v3, v1); cross_v3_v3v3(cross, d2, d3); - area= len_v3(cross); - dot= dot_v3v3(d2, d3); - len= len_v3(d2)*len_v3(d3); + area = len_v3(cross); + dot = dot_v3v3(d2, d3); + len = len_v3(d2) * len_v3(d3); if (area == 0.0f) return 0.0f; else - return (len - dot)/area; + return (len - dot) / area; } void interp_weights_poly_v3(float *w, float v[][3], const int n, const float co[3]) @@ -1982,49 +1999,49 @@ void interp_weights_poly_v3(float *w, float v[][3], const int n, const float co[ float totweight, t1, t2, len, *vmid, *vprev, *vnext; int i; - totweight= 0.0f; + totweight = 0.0f; - for (i=0; i (x,v)(t) */ void interp_cubic_v3(float x[3], float v[3], const float x1[3], const float v1[3], const float x2[3], const float v2[3], const float t) { - float a[3],b[3]; - float t2= t*t; - float t3= t2*t; + float a[3], b[3]; + float t2 = t * t; + float t3 = t2 * t; /* cubic interpolation */ - a[0]= v1[0] + v2[0] + 2*(x1[0] - x2[0]); - a[1]= v1[1] + v2[1] + 2*(x1[1] - x2[1]); - a[2]= v1[2] + v2[2] + 2*(x1[2] - x2[2]); + a[0] = v1[0] + v2[0] + 2 * (x1[0] - x2[0]); + a[1] = v1[1] + v2[1] + 2 * (x1[1] - x2[1]); + a[2] = v1[2] + v2[2] + 2 * (x1[2] - x2[2]); - b[0]= -2*v1[0] - v2[0] - 3*(x1[0] - x2[0]); - b[1]= -2*v1[1] - v2[1] - 3*(x1[1] - x2[1]); - b[2]= -2*v1[2] - v2[2] - 3*(x1[2] - x2[2]); + b[0] = -2 * v1[0] - v2[0] - 3 * (x1[0] - x2[0]); + b[1] = -2 * v1[1] - v2[1] - 3 * (x1[1] - x2[1]); + b[2] = -2 * v1[2] - v2[2] - 3 * (x1[2] - x2[2]); - x[0]= a[0]*t3 + b[0]*t2 + v1[0]*t + x1[0]; - x[1]= a[1]*t3 + b[1]*t2 + v1[1]*t + x1[1]; - x[2]= a[2]*t3 + b[2]*t2 + v1[2]*t + x1[2]; + x[0] = a[0] * t3 + b[0] * t2 + v1[0] * t + x1[0]; + x[1] = a[1] * t3 + b[1] * t2 + v1[1] * t + x1[1]; + x[2] = a[2] * t3 + b[2] * t2 + v1[2] * t + x1[2]; - v[0]= 3*a[0]*t2 + 2*b[0]*t + v1[0]; - v[1]= 3*a[1]*t2 + 2*b[1]*t + v1[1]; - v[2]= 3*a[2]*t2 + 2*b[2]*t + v1[2]; + v[0] = 3 * a[0] * t2 + 2 * b[0] * t + v1[0]; + v[1] = 3 * a[1] * t2 + 2 * b[1] * t + v1[1]; + v[2] = 3 * a[2] * t2 + 2 * b[2] * t + v1[2]; } /* unfortunately internal calculations have to be done at double precision to achieve correct/stable results. */ @@ -2035,17 +2052,17 @@ void interp_cubic_v3(float x[3], float v[3], const float x1[3], const float v1[3 void resolve_tri_uv(float r_uv[2], const float st[2], const float st0[2], const float st1[2], const float st2[2]) { /* find UV such that - * t= u*t0 + v*t1 + (1-u-v)*t2 - * u*(t0-t2) + v*(t1-t2)= t-t2 */ - const double a= st0[0]-st2[0], b= st1[0]-st2[0]; - const double c= st0[1]-st2[1], d= st1[1]-st2[1]; - const double det= a*d - c*b; + * t = u * t0 + v * t1 + (1 - u - v) * t2 + * u * (t0 - t2) + v * (t1 - t2) = t - t2 */ + const double a = st0[0] - st2[0], b = st1[0] - st2[0]; + const double c = st0[1] - st2[1], d = st1[1] - st2[1]; + const double det = a * d - c * b; - if (IS_ZERO(det)==0) { /* det should never be zero since the determinant is the signed ST area of the triangle. */ - const double x[]= {st[0]-st2[0], st[1]-st2[1]}; + if (IS_ZERO(det) == 0) { /* det should never be zero since the determinant is the signed ST area of the triangle. */ + const double x[] = {st[0] - st2[0], st[1] - st2[1]}; - r_uv[0]= (float)((d*x[0] - b*x[1])/det); - r_uv[1]= (float)(((-c)*x[0] + a*x[1])/det); + r_uv[0] = (float)((d * x[0] - b * x[1]) / det); + r_uv[1] = (float)(((-c) * x[0] + a * x[1]) / det); } else zero_v2(r_uv); } @@ -2053,51 +2070,52 @@ void resolve_tri_uv(float r_uv[2], const float st[2], const float st0[2], const /* bilinear reverse */ void resolve_quad_uv(float r_uv[2], const float st[2], const float st0[2], const float st1[2], const float st2[2], const float st3[2]) { - const double signed_area= (st0[0]*st1[1] - st0[1]*st1[0]) + (st1[0]*st2[1] - st1[1]*st2[0]) + - (st2[0]*st3[1] - st2[1]*st3[0]) + (st3[0]*st0[1] - st3[1]*st0[0]); + const double signed_area = (st0[0] * st1[1] - st0[1] * st1[0]) + (st1[0] * st2[1] - st1[1] * st2[0]) + + (st2[0] * st3[1] - st2[1] * st3[0]) + (st3[0] * st0[1] - st3[1] * st0[0]); /* X is 2D cross product (determinant) * A= (p0-p) X (p0-p3)*/ - const double a= (st0[0]-st[0])*(st0[1]-st3[1]) - (st0[1]-st[1])*(st0[0]-st3[0]); + const double a = (st0[0] - st[0]) * (st0[1] - st3[1]) - (st0[1] - st[1]) * (st0[0] - st3[0]); /* B= ( (p0-p) X (p1-p2) + (p1-p) X (p0-p3) ) / 2 */ - const double b= 0.5 * ( ((st0[0]-st[0])*(st1[1]-st2[1]) - (st0[1]-st[1])*(st1[0]-st2[0])) + - ((st1[0]-st[0])*(st0[1]-st3[1]) - (st1[1]-st[1])*(st0[0]-st3[0])) ); + const double b = 0.5 * (((st0[0] - st[0]) * (st1[1] - st2[1]) - (st0[1] - st[1]) * (st1[0] - st2[0])) + + ((st1[0] - st[0]) * (st0[1] - st3[1]) - (st1[1] - st[1]) * (st0[0] - st3[0]))); /* C = (p1-p) X (p1-p2) */ - const double fC= (st1[0]-st[0])*(st1[1]-st2[1]) - (st1[1]-st[1])*(st1[0]-st2[0]); - const double denom= a - 2*b + fC; + const double fC = (st1[0] - st[0]) * (st1[1] - st2[1]) - (st1[1] - st[1]) * (st1[0] - st2[0]); + const double denom = a - 2 * b + fC; // clear outputs zero_v2(r_uv); - if (IS_ZERO(denom)!=0) { - const double fDen= a-fC; - if (IS_ZERO(fDen)==0) - r_uv[0]= (float)(a / fDen); + if (IS_ZERO(denom) != 0) { + const double fDen = a - fC; + if (IS_ZERO(fDen) == 0) + r_uv[0] = (float)(a / fDen); } else { - const double desc_sq= b*b - a*fC; - const double desc= sqrt(desc_sq<0.0?0.0:desc_sq); - const double s= signed_area>0 ? (-1.0) : 1.0; + const double desc_sq = b * b - a * fC; + const double desc = sqrt(desc_sq < 0.0 ? 0.0 : desc_sq); + const double s = signed_area > 0 ? (-1.0) : 1.0; - r_uv[0]= (float)(( (a-b) + s * desc ) / denom); + r_uv[0] = (float)(((a - b) + s * desc) / denom); } /* find UV such that - * fST = (1-u)(1-v)*ST0 + u*(1-v)*ST1 + u*v*ST2 + (1-u)*v*ST3 */ + * fST = (1-u)(1-v) * ST0 + u * (1-v) * ST1 + u * v * ST2 + (1-u) * v * ST3 */ { - const double denom_s= (1-r_uv[0])*(st0[0]-st3[0]) + r_uv[0]*(st1[0]-st2[0]); - const double denom_t= (1-r_uv[0])*(st0[1]-st3[1]) + r_uv[0]*(st1[1]-st2[1]); - int i= 0; double denom= denom_s; - - if (fabs(denom_s) bounds[1]*vec[3]) fl |= 1; - if (vec[0]< bounds[0]*vec[3]) fl |= 2; - if (vec[1] > bounds[3]*vec[3]) fl |= 4; - if (vec[1]< bounds[2]*vec[3]) fl |= 8; + if (vec[0] > bounds[1] * vec[3]) fl |= 1; + if (vec[0] < bounds[0] * vec[3]) fl |= 2; + if (vec[1] > bounds[3] * vec[3]) fl |= 4; + if (vec[1] < bounds[2] * vec[3]) fl |= 8; } else { if (vec[0] < -vec[3]) fl |= 1; @@ -2286,7 +2303,7 @@ int box_clip_bounds_m4(float boundbox[2][3], const float bounds[4], float winmat if (vec[2] > vec[3]) fl |= 32; flag &= fl; - if (flag==0) return 0; + if (flag == 0) return 0; } return flag; @@ -2300,10 +2317,10 @@ void box_minmax_bounds_m4(float min[3], float max[3], float boundbox[2][3], floa copy_v3_v3(mn, min); copy_v3_v3(mx, max); - for (a=0; a<8; a++) { - vec[0]= (a & 1)? boundbox[0][0]: boundbox[1][0]; - vec[1]= (a & 2)? boundbox[0][1]: boundbox[1][1]; - vec[2]= (a & 4)? boundbox[0][2]: boundbox[1][2]; + for (a = 0; a < 8; a++) { + vec[0] = (a & 1) ? boundbox[0][0] : boundbox[1][0]; + vec[1] = (a & 2) ? boundbox[0][1] : boundbox[1][1]; + vec[2] = (a & 4) ? boundbox[0][2] : boundbox[1][2]; mul_m4_v3(mat, vec); DO_MINMAX(vec, mn, mx); @@ -2318,12 +2335,12 @@ void box_minmax_bounds_m4(float min[3], float max[3], float boundbox[2][3], floa void map_to_tube(float *r_u, float *r_v, const float x, const float y, const float z) { float len; - + *r_v = (z + 1.0f) / 2.0f; - + len = sqrtf(x * x + y * y); if (len > 0.0f) { - *r_u = (float)((1.0 - (atan2(x/len,y/len) / M_PI)) / 2.0); + *r_u = (float)((1.0 - (atan2(x / len, y / len) / M_PI)) / 2.0); } else { *r_v = *r_u = 0.0f; /* to avoid un-initialized variables */ @@ -2333,13 +2350,13 @@ void map_to_tube(float *r_u, float *r_v, const float x, const float y, const flo void map_to_sphere(float *r_u, float *r_v, const float x, const float y, const float z) { float len; - + len = sqrtf(x * x + y * y + z * z); if (len > 0.0f) { - if (x==0.0f && y==0.0f) *r_u= 0.0f; /* othwise domain error */ - else *r_u = (1.0f - atan2f(x,y) / (float)M_PI) / 2.0f; + if (x == 0.0f && y == 0.0f) *r_u = 0.0f; /* othwise domain error */ + else *r_u = (1.0f - atan2f(x, y) / (float)M_PI) / 2.0f; - *r_v = 1.0f - (float)saacos(z/len)/(float)M_PI; + *r_v = 1.0f - (float)saacos(z / len) / (float)M_PI; } else { *r_v = *r_u = 0.0f; /* to avoid un-initialized variables */ @@ -2349,17 +2366,17 @@ void map_to_sphere(float *r_u, float *r_v, const float x, const float y, const f /********************************* Normals **********************************/ void accumulate_vertex_normals(float n1[3], float n2[3], float n3[3], - float n4[3], const float f_no[3], const float co1[3], const float co2[3], - const float co3[3], const float co4[3]) + float n4[3], const float f_no[3], const float co1[3], const float co2[3], + const float co3[3], const float co4[3]) { float vdiffs[4][3]; - const int nverts= (n4!=NULL && co4!=NULL)? 4: 3; + const int nverts = (n4 != NULL && co4 != NULL) ? 4 : 3; /* compute normalized edge vectors */ sub_v3_v3v3(vdiffs[0], co2, co1); sub_v3_v3v3(vdiffs[1], co3, co2); - if (nverts==3) { + if (nverts == 3) { sub_v3_v3v3(vdiffs[2], co1, co3); } else { @@ -2374,13 +2391,13 @@ void accumulate_vertex_normals(float n1[3], float n2[3], float n3[3], /* accumulate angle weighted face normal */ { - float *vn[]= {n1, n2, n3, n4}; - const float *prev_edge = vdiffs[nverts-1]; + float *vn[] = {n1, n2, n3, n4}; + const float *prev_edge = vdiffs[nverts - 1]; int i; - for (i=0; inext) { - if (fabsf(uv[0]-vt->uv[0]) < STD_UV_CONNECT_LIMIT && fabsf(uv[1]-vt->uv[1]) < STD_UV_CONNECT_LIMIT) { + for (vt = *vtang; vt; vt = vt->next) { + if (fabsf(uv[0] - vt->uv[0]) < STD_UV_CONNECT_LIMIT && fabsf(uv[1] - vt->uv[1]) < STD_UV_CONNECT_LIMIT) { add_v3_v3(vt->tang, tang); return; } } /* if not found, append a new one */ - vt= BLI_memarena_alloc((MemArena *)arena, sizeof(VertexTangent)); + vt = BLI_memarena_alloc((MemArena *) arena, sizeof(VertexTangent)); copy_v3_v3(vt->tang, tang); - vt->uv[0]= uv[0]; - vt->uv[1]= uv[1]; + vt->uv[0] = uv[0]; + vt->uv[1] = uv[1]; if (*vtang) - vt->next= *vtang; - *vtang= vt; + vt->next = *vtang; + *vtang = vt; } float *find_vertex_tangent(VertexTangent *vtang, const float uv[2]) @@ -2460,44 +2477,44 @@ float *find_vertex_tangent(VertexTangent *vtang, const float uv[2]) VertexTangent *vt; static float nulltang[3] = {0.0f, 0.0f, 0.0f}; - for (vt= vtang; vt; vt=vt->next) - if (fabsf(uv[0]-vt->uv[0]) < STD_UV_CONNECT_LIMIT && fabsf(uv[1]-vt->uv[1]) < STD_UV_CONNECT_LIMIT) + for (vt = vtang; vt; vt = vt->next) + if (fabsf(uv[0] - vt->uv[0]) < STD_UV_CONNECT_LIMIT && fabsf(uv[1] - vt->uv[1]) < STD_UV_CONNECT_LIMIT) return vt->tang; - return nulltang; /* shouldn't happen, except for nan or so */ + return nulltang; /* shouldn't happen, except for nan or so */ } void tangent_from_uv(float uv1[2], float uv2[2], float uv3[3], float co1[3], float co2[3], float co3[3], float n[3], float tang[3]) { - float s1= uv2[0] - uv1[0]; - float s2= uv3[0] - uv1[0]; - float t1= uv2[1] - uv1[1]; - float t2= uv3[1] - uv1[1]; - float det= (s1 * t2 - s2 * t1); + float s1 = uv2[0] - uv1[0]; + float s2 = uv3[0] - uv1[0]; + float t1 = uv2[1] - uv1[1]; + float t2 = uv3[1] - uv1[1]; + float det = (s1 * t2 - s2 * t1); if (det != 0.0f) { /* otherwise 'tang' becomes nan */ float tangv[3], ct[3], e1[3], e2[3]; - det= 1.0f/det; + det = 1.0f / det; /* normals in render are inversed... */ sub_v3_v3v3(e1, co1, co2); sub_v3_v3v3(e2, co1, co3); - tang[0] = (t2*e1[0] - t1*e2[0])*det; - tang[1] = (t2*e1[1] - t1*e2[1])*det; - tang[2] = (t2*e1[2] - t1*e2[2])*det; - tangv[0] = (s1*e2[0] - s2*e1[0])*det; - tangv[1] = (s1*e2[1] - s2*e1[1])*det; - tangv[2] = (s1*e2[2] - s2*e1[2])*det; + tang[0] = (t2 * e1[0] - t1 * e2[0]) * det; + tang[1] = (t2 * e1[1] - t1 * e2[1]) * det; + tang[2] = (t2 * e1[2] - t1 * e2[2]) * det; + tangv[0] = (s1 * e2[0] - s2 * e1[0]) * det; + tangv[1] = (s1 * e2[1] - s2 * e1[1]) * det; + tangv[2] = (s1 * e2[2] - s2 * e1[2]) * det; cross_v3_v3v3(ct, tang, tangv); - + /* check flip */ if (dot_v3v3(ct, n) < 0.0f) { negate_v3(tang); } } else { - tang[0]= tang[1]= tang[2]= 0.0; + tang[0] = tang[1] = tang[2] = 0.0; } } @@ -2511,7 +2528,7 @@ void tangent_from_uv(float uv1[2], float uv2[2], float uv3[3], float co1[3], flo * ( * int list_size * 4 lists as pointer to array[list_size] - * 1. current pos array of 'new' positions + * 1. current pos array of 'new' positions * 2. current weight array of 'new'weights (may be NULL pointer if you have no weights ) * 3. reference rpos array of 'old' positions * 4. reference rweight array of 'old'weights (may be NULL pointer if you have no weights ) @@ -2531,19 +2548,18 @@ static float _det_m3(float m2[3][3]) { float det = 0.f; if (m2) { - det= m2[0][0]* (m2[1][1]*m2[2][2] - m2[1][2]*m2[2][1]) - -m2[1][0]* (m2[0][1]*m2[2][2] - m2[0][2]*m2[2][1]) - +m2[2][0]* (m2[0][1]*m2[1][2] - m2[0][2]*m2[1][1]); + det = (m2[0][0] * (m2[1][1] * m2[2][2] - m2[1][2] * m2[2][1]) - + m2[1][0] * (m2[0][1] * m2[2][2] - m2[0][2] * m2[2][1]) + + m2[2][0] * (m2[0][1] * m2[1][2] - m2[0][2] * m2[1][1])); } return det; } - -void vcloud_estimate_transform(int list_size, float (*pos)[3], float *weight,float (*rpos)[3], float *rweight, - float lloc[3],float rloc[3],float lrot[3][3],float lscale[3][3]) +void vcloud_estimate_transform(int list_size, float (*pos)[3], float *weight, float (*rpos)[3], float *rweight, + float lloc[3], float rloc[3], float lrot[3][3], float lscale[3][3]) { - float accu_com[3]= {0.0f,0.0f,0.0f}, accu_rcom[3]= {0.0f,0.0f,0.0f}; - float accu_weight = 0.0f,accu_rweight = 0.0f,eps = 0.000001f; + float accu_com[3] = {0.0f, 0.0f, 0.0f}, accu_rcom[3] = {0.0f, 0.0f, 0.0f}; + float accu_weight = 0.0f, accu_rweight = 0.0f, eps = 0.000001f; int a; /* first set up a nice default response */ @@ -2554,22 +2570,22 @@ void vcloud_estimate_transform(int list_size, float (*pos)[3], float *weight,flo /* do com for both clouds */ if (pos && rpos && (list_size > 0)) { /* paranoya check */ /* do com for both clouds */ - for (a=0; aPolardecompose*/ /* build 'projection' matrix */ - float m[3][3],mr[3][3],q[3][3],qi[3][3]; - float va[3],vb[3],stunt[3]; - float odet,ndet; - int i=0,imax=15; + float m[3][3], mr[3][3], q[3][3], qi[3][3]; + float va[3], vb[3], stunt[3]; + float odet, ndet; + int i = 0, imax = 15; zero_m3(m); zero_m3(mr); /* build 'projection' matrix */ - for (a=0; amass); mass needs renormalzation here ?? */ - sub_v3_v3v3(vb,pos[a],accu_com); + sub_v3_v3v3(vb, pos[a], accu_com); /* mul_v3_fl(va,rp->mass); */ m[0][0] += va[0] * vb[0]; m[0][1] += va[0] * vb[1]; @@ -2625,20 +2641,22 @@ void vcloud_estimate_transform(int list_size, float (*pos)[3], float *weight,flo mr[2][1] += va[2] * va[1]; mr[2][2] += va[2] * va[2]; } - copy_m3_m3(q,m); - stunt[0] = q[0][0]; stunt[1] = q[1][1]; stunt[2] = q[2][2]; + copy_m3_m3(q, m); + stunt[0] = q[0][0]; + stunt[1] = q[1][1]; + stunt[2] = q[2][2]; /* renormalizing for numeric stability */ - mul_m3_fl(q,1.f/len_v3(stunt)); + mul_m3_fl(q, 1.f / len_v3(stunt)); /* this is pretty much Polardecompose 'inline' the algo based on Higham's thesis */ /* without the far case ... but seems to work here pretty neat */ odet = 0.f; ndet = _det_m3(q); - while ((odet-ndet)*(odet-ndet) > eps && i eps && i < imax) { + invert_m3_m3(qi, q); transpose_m3(qi); - add_m3_m3m3(q,q,qi); - mul_m3_fl(q,0.5f); + add_m3_m3m3(q, q, qi); + mul_m3_fl(q, 0.5f); odet = ndet; ndet = _det_m3(q); i++; @@ -2647,12 +2665,12 @@ void vcloud_estimate_transform(int list_size, float (*pos)[3], float *weight,flo if (i) { float scale[3][3]; float irot[3][3]; - if (lrot) copy_m3_m3(lrot,q); - invert_m3_m3(irot,q); - invert_m3_m3(qi,mr); - mul_m3_m3m3(q,m,qi); - mul_m3_m3m3(scale,irot,q); - if (lscale) copy_m3_m3(lscale,scale); + if (lrot) copy_m3_m3(lrot, q); + invert_m3_m3(irot, q); + invert_m3_m3(qi, mr); + mul_m3_m3m3(q, m, qi); + mul_m3_m3m3(scale, irot, q); + if (lscale) copy_m3_m3(lscale, scale); } } @@ -2663,22 +2681,24 @@ void vcloud_estimate_transform(int list_size, float (*pos)[3], float *weight,flo static void vec_add_dir(float r[3], const float v1[3], const float v2[3], const float fac) { - r[0]= v1[0] + fac*(v2[0] - v1[0]); - r[1]= v1[1] + fac*(v2[1] - v1[1]); - r[2]= v1[2] + fac*(v2[2] - v1[2]); + r[0] = v1[0] + fac * (v2[0] - v1[0]); + r[1] = v1[1] + fac * (v2[1] - v1[1]); + r[2] = v1[2] + fac * (v2[2] - v1[2]); } -static int ff_visible_quad(const float p[3], const float n[3], const float v0[3], const float v1[3], const float v2[3], float q0[3], float q1[3], float q2[3], float q3[3]) +static int ff_visible_quad(const float p[3], const float n[3], + const float v0[3], const float v1[3], const float v2[3], + float q0[3], float q1[3], float q2[3], float q3[3]) { static const float epsilon = 1e-6f; float c, sd[3]; - - c= dot_v3v3(n, p); + + c = dot_v3v3(n, p); /* signed distances from the vertices to the plane. */ - sd[0]= dot_v3v3(n, v0) - c; - sd[1]= dot_v3v3(n, v1) - c; - sd[2]= dot_v3v3(n, v2) - c; + sd[0] = dot_v3v3(n, v0) - c; + sd[1] = dot_v3v3(n, v1) - c; + sd[2] = dot_v3v3(n, v2) - c; if (fabsf(sd[0]) < epsilon) sd[0] = 0.0f; if (fabsf(sd[1]) < epsilon) sd[1] = 0.0f; @@ -2697,8 +2717,8 @@ static int ff_visible_quad(const float p[3], const float n[3], const float v0[3] // ++- copy_v3_v3(q0, v0); copy_v3_v3(q1, v1); - vec_add_dir(q2, v1, v2, (sd[1]/(sd[1]-sd[2]))); - vec_add_dir(q3, v0, v2, (sd[0]/(sd[0]-sd[2]))); + vec_add_dir(q2, v1, v2, (sd[1] / (sd[1] - sd[2]))); + vec_add_dir(q3, v0, v2, (sd[0] / (sd[0] - sd[2]))); } else { // ++0 @@ -2712,21 +2732,21 @@ static int ff_visible_quad(const float p[3], const float n[3], const float v0[3] if (sd[2] > 0) { // +-+ copy_v3_v3(q0, v0); - vec_add_dir(q1, v0, v1, (sd[0]/(sd[0]-sd[1]))); - vec_add_dir(q2, v1, v2, (sd[1]/(sd[1]-sd[2]))); + vec_add_dir(q1, v0, v1, (sd[0] / (sd[0] - sd[1]))); + vec_add_dir(q2, v1, v2, (sd[1] / (sd[1] - sd[2]))); copy_v3_v3(q3, v2); } else if (sd[2] < 0) { // +-- copy_v3_v3(q0, v0); - vec_add_dir(q1, v0, v1, (sd[0]/(sd[0]-sd[1]))); - vec_add_dir(q2, v0, v2, (sd[0]/(sd[0]-sd[2]))); + vec_add_dir(q1, v0, v1, (sd[0] / (sd[0] - sd[1]))); + vec_add_dir(q2, v0, v2, (sd[0] / (sd[0] - sd[2]))); copy_v3_v3(q3, q2); } else { // +-0 copy_v3_v3(q0, v0); - vec_add_dir(q1, v0, v1, (sd[0]/(sd[0]-sd[1]))); + vec_add_dir(q1, v0, v1, (sd[0] / (sd[0] - sd[1]))); copy_v3_v3(q2, v2); copy_v3_v3(q3, q2); } @@ -2743,7 +2763,7 @@ static int ff_visible_quad(const float p[3], const float n[3], const float v0[3] // +0- copy_v3_v3(q0, v0); copy_v3_v3(q1, v1); - vec_add_dir(q2, v0, v2, (sd[0]/(sd[0]-sd[2]))); + vec_add_dir(q2, v0, v2, (sd[0] / (sd[0] - sd[2]))); copy_v3_v3(q3, q2); } else { @@ -2759,21 +2779,21 @@ static int ff_visible_quad(const float p[3], const float n[3], const float v0[3] if (sd[1] > 0) { if (sd[2] > 0) { // -++ - vec_add_dir(q0, v0, v1, (sd[0]/(sd[0]-sd[1]))); + vec_add_dir(q0, v0, v1, (sd[0] / (sd[0] - sd[1]))); copy_v3_v3(q1, v1); copy_v3_v3(q2, v2); - vec_add_dir(q3, v0, v2, (sd[0]/(sd[0]-sd[2]))); + vec_add_dir(q3, v0, v2, (sd[0] / (sd[0] - sd[2]))); } else if (sd[2] < 0) { // -+- - vec_add_dir(q0, v0, v1, (sd[0]/(sd[0]-sd[1]))); + vec_add_dir(q0, v0, v1, (sd[0] / (sd[0] - sd[1]))); copy_v3_v3(q1, v1); - vec_add_dir(q2, v1, v2, (sd[1]/(sd[1]-sd[2]))); + vec_add_dir(q2, v1, v2, (sd[1] / (sd[1] - sd[2]))); copy_v3_v3(q3, q2); } else { // -+0 - vec_add_dir(q0, v0, v1, (sd[0]/(sd[0]-sd[1]))); + vec_add_dir(q0, v0, v1, (sd[0] / (sd[0] - sd[1]))); copy_v3_v3(q1, v1); copy_v3_v3(q2, v2); copy_v3_v3(q3, q2); @@ -2782,8 +2802,8 @@ static int ff_visible_quad(const float p[3], const float n[3], const float v0[3] else if (sd[1] < 0) { if (sd[2] > 0) { // --+ - vec_add_dir(q0, v0, v2, (sd[0]/(sd[0]-sd[2]))); - vec_add_dir(q1, v1, v2, (sd[1]/(sd[1]-sd[2]))); + vec_add_dir(q0, v0, v2, (sd[0] / (sd[0] - sd[2]))); + vec_add_dir(q1, v1, v2, (sd[1] / (sd[1] - sd[2]))); copy_v3_v3(q2, v2); copy_v3_v3(q3, q2); } @@ -2799,7 +2819,7 @@ static int ff_visible_quad(const float p[3], const float n[3], const float v0[3] else { if (sd[2] > 0) { // -0+ - vec_add_dir(q0, v0, v2, (sd[0]/(sd[0]-sd[2]))); + vec_add_dir(q0, v0, v2, (sd[0] / (sd[0] - sd[2]))); copy_v3_v3(q1, v1); copy_v3_v3(q2, v2); copy_v3_v3(q3, q2); @@ -2827,7 +2847,7 @@ static int ff_visible_quad(const float p[3], const float n[3], const float v0[3] // 0+- copy_v3_v3(q0, v0); copy_v3_v3(q1, v1); - vec_add_dir(q2, v1, v2, (sd[1]/(sd[1]-sd[2]))); + vec_add_dir(q2, v1, v2, (sd[1] / (sd[1] - sd[2]))); copy_v3_v3(q3, q2); } else { @@ -2842,7 +2862,7 @@ static int ff_visible_quad(const float p[3], const float n[3], const float v0[3] if (sd[2] > 0) { // 0-+ copy_v3_v3(q0, v0); - vec_add_dir(q1, v1, v2, (sd[1]/(sd[1]-sd[2]))); + vec_add_dir(q1, v1, v2, (sd[1] / (sd[1] - sd[2]))); copy_v3_v3(q2, v2); copy_v3_v3(q3, q2); } @@ -2895,7 +2915,7 @@ static vFloat vec_splat_float(float val) static float ff_quad_form_factor(float *p, float *n, float *q0, float *q1, float *q2, float *q3) { vFloat vcos, rlen, vrx, vry, vrz, vsrx, vsry, vsrz, gx, gy, gz, vangle; - vUInt8 rotate = (vUInt8) {4,5,6,7,8,9,10,11,12,13,14,15,0,1,2,3}; + vUInt8 rotate = (vUInt8){4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3}; vFloatResult vresult; float result; @@ -2905,39 +2925,39 @@ static float ff_quad_form_factor(float *p, float *n, float *q0, float *q1, float vrz = (vFloat) {q0[2], q1[2], q2[2], q3[2]} - vec_splat_float(p[2]); /* normalize r* */ - rlen = vec_rsqrte(vrx*vrx + vry*vry + vrz*vrz + vec_splat_float(1e-16f)); - vrx = vrx*rlen; - vry = vry*rlen; - vrz = vrz*rlen; + rlen = vec_rsqrte(vrx * vrx + vry * vry + vrz * vrz + vec_splat_float(1e-16f)); + vrx = vrx * rlen; + vry = vry * rlen; + vrz = vrz * rlen; /* rotate r* for cross and dot */ - vsrx= vec_perm(vrx, vrx, rotate); - vsry= vec_perm(vry, vry, rotate); - vsrz= vec_perm(vrz, vrz, rotate); + vsrx = vec_perm(vrx, vrx, rotate); + vsry = vec_perm(vry, vry, rotate); + vsrz = vec_perm(vrz, vrz, rotate); /* cross product */ - gx = vsry*vrz - vsrz*vry; - gy = vsrz*vrx - vsrx*vrz; - gz = vsrx*vry - vsry*vrx; + gx = vsry * vrz - vsrz * vry; + gy = vsrz * vrx - vsrx * vrz; + gz = vsrx * vry - vsry * vrx; /* normalize */ - rlen = vec_rsqrte(gx*gx + gy*gy + gz*gz + vec_splat_float(1e-16f)); - gx = gx*rlen; - gy = gy*rlen; - gz = gz*rlen; + rlen = vec_rsqrte(gx * gx + gy * gy + gz * gz + vec_splat_float(1e-16f)); + gx = gx * rlen; + gy = gy * rlen; + gz = gz * rlen; /* angle */ - vcos = vrx*vsrx + vry*vsry + vrz*vsrz; - vcos= vec_max(vec_min(vcos, vec_splat_float(1.0f)), vec_splat_float(-1.0f)); - vangle= vacosf(vcos); + vcos = vrx * vsrx + vry * vsry + vrz * vsrz; + vcos = vec_max(vec_min(vcos, vec_splat_float(1.0f)), vec_splat_float(-1.0f)); + vangle = vacosf(vcos); /* dot */ - vresult.v = (vec_splat_float(n[0])*gx + - vec_splat_float(n[1])*gy + - vec_splat_float(n[2])*gz)*vangle; + vresult.v = (vec_splat_float(n[0]) * gx + + vec_splat_float(n[1]) * gy + + vec_splat_float(n[2]) * gz) * vangle; - result= (vresult.f[0] + vresult.f[1] + vresult.f[2] + vresult.f[3])*(0.5f/(float)M_PI); - result= MAX2(result, 0.0f); + result = (vresult.f[0] + vresult.f[1] + vresult.f[2] + vresult.f[3]) * (0.5f / (float)M_PI); + result = MAX2(result, 0.0f); return result; } @@ -2953,7 +2973,7 @@ static float ff_quad_form_factor(float *p, float *n, float *q0, float *q1, float static __m128 sse_approx_acos(__m128 x) { /* needs a better approximation than taylor expansion of acos, since that - * gives big erros for near 1.0 values, sqrt(2*x)*acos(1-x) should work + * gives big erros for near 1.0 values, sqrt(2 * x) * acos(1 - x) should work * better, see http://www.tom.womack.net/projects/sse-fast-arctrig.html */ return _mm_set_ps1(1.0f); @@ -2976,36 +2996,36 @@ static float ff_quad_form_factor(float *p, float *n, float *q0, float *q1, float rz = qz - _mm_set_ps1(p[2]); /* normalize r */ - rlen = _mm_rsqrt_ps(rx*rx + ry*ry + rz*rz + _mm_set_ps1(1e-16f)); - rx = rx*rlen; - ry = ry*rlen; - rz = rz*rlen; + rlen = _mm_rsqrt_ps(rx * rx + ry * ry + rz * rz + _mm_set_ps1(1e-16f)); + rx = rx * rlen; + ry = ry * rlen; + rz = rz * rlen; /* cross product */ - srx = _mm_shuffle_ps(rx, rx, _MM_SHUFFLE(0,3,2,1)); - sry = _mm_shuffle_ps(ry, ry, _MM_SHUFFLE(0,3,2,1)); - srz = _mm_shuffle_ps(rz, rz, _MM_SHUFFLE(0,3,2,1)); + srx = _mm_shuffle_ps(rx, rx, _MM_SHUFFLE(0, 3, 2, 1)); + sry = _mm_shuffle_ps(ry, ry, _MM_SHUFFLE(0, 3, 2, 1)); + srz = _mm_shuffle_ps(rz, rz, _MM_SHUFFLE(0, 3, 2, 1)); - gx = sry*rz - srz*ry; - gy = srz*rx - srx*rz; - gz = srx*ry - sry*rx; + gx = sry * rz - srz * ry; + gy = srz * rx - srx * rz; + gz = srx * ry - sry * rx; /* normalize g */ - glen = _mm_rsqrt_ps(gx*gx + gy*gy + gz*gz + _mm_set_ps1(1e-16f)); - gx = gx*glen; - gy = gy*glen; - gz = gz*glen; + glen = _mm_rsqrt_ps(gx * gx + gy * gy + gz * gz + _mm_set_ps1(1e-16f)); + gx = gx * glen; + gy = gy * glen; + gz = gz * glen; /* compute angle */ - rcos = rx*srx + ry*sry + rz*srz; - rcos= _mm_max_ps(_mm_min_ps(rcos, _mm_set_ps1(1.0f)), _mm_set_ps1(-1.0f)); + rcos = rx * srx + ry * sry + rz * srz; + rcos = _mm_max_ps(_mm_min_ps(rcos, _mm_set_ps1(1.0f)), _mm_set_ps1(-1.0f)); angle = sse_approx_cos(rcos); - aresult = (_mm_set_ps1(n[0])*gx + _mm_set_ps1(n[1])*gy + _mm_set_ps1(n[2])*gz)*angle; + aresult = (_mm_set_ps1(n[0]) * gx + _mm_set_ps1(n[1]) * gy + _mm_set_ps1(n[2]) * gz) * angle; /* sum together */ - result= (fresult[0] + fresult[1] + fresult[2] + fresult[3])*(0.5f/(float)M_PI); - result= MAX2(result, 0.0f); + result = (fresult[0] + fresult[1] + fresult[2] + fresult[3]) * (0.5f / (float)M_PI); + result = MAX2(result, 0.0f); return result; } @@ -3015,19 +3035,20 @@ static float ff_quad_form_factor(float *p, float *n, float *q0, float *q1, float static void ff_normalize(float n[3]) { float d; - - d= dot_v3v3(n, n); + + d = dot_v3v3(n, n); if (d > 1.0e-35F) { - d= 1.0f/sqrtf(d); + d = 1.0f / sqrtf(d); - n[0] *= d; - n[1] *= d; + n[0] *= d; + n[1] *= d; n[2] *= d; - } + } } -static float ff_quad_form_factor(const float p[3], const float n[3], const float q0[3], const float q1[3], const float q2[3], const float q3[3]) +static float ff_quad_form_factor(const float p[3], const float n[3], + const float q0[3], const float q1[3], const float q2[3], const float q3[3]) { float r0[3], r1[3], r2[3], r3[3], g0[3], g1[3], g2[3], g3[3]; float a1, a2, a3, a4, dot1, dot2, dot3, dot4, result; @@ -3042,23 +3063,27 @@ static float ff_quad_form_factor(const float p[3], const float n[3], const float ff_normalize(r2); ff_normalize(r3); - cross_v3_v3v3(g0, r1, r0); ff_normalize(g0); - cross_v3_v3v3(g1, r2, r1); ff_normalize(g1); - cross_v3_v3v3(g2, r3, r2); ff_normalize(g2); - cross_v3_v3v3(g3, r0, r3); ff_normalize(g3); + cross_v3_v3v3(g0, r1, r0); + ff_normalize(g0); + cross_v3_v3v3(g1, r2, r1); + ff_normalize(g1); + cross_v3_v3v3(g2, r3, r2); + ff_normalize(g2); + cross_v3_v3v3(g3, r0, r3); + ff_normalize(g3); - a1= saacosf(dot_v3v3(r0, r1)); - a2= saacosf(dot_v3v3(r1, r2)); - a3= saacosf(dot_v3v3(r2, r3)); - a4= saacosf(dot_v3v3(r3, r0)); + a1 = saacosf(dot_v3v3(r0, r1)); + a2 = saacosf(dot_v3v3(r1, r2)); + a3 = saacosf(dot_v3v3(r2, r3)); + a4 = saacosf(dot_v3v3(r3, r0)); - dot1= dot_v3v3(n, g0); - dot2= dot_v3v3(n, g1); - dot3= dot_v3v3(n, g2); - dot4= dot_v3v3(n, g3); + dot1 = dot_v3v3(n, g0); + dot2 = dot_v3v3(n, g1); + dot3 = dot_v3v3(n, g2); + dot4 = dot_v3v3(n, g3); - result= (a1*dot1 + a2*dot2 + a3*dot3 + a4*dot4)*0.5f/(float)M_PI; - result= MAX2(result, 0.0f); + result = (a1 * dot1 + a2 * dot2 + a3 * dot3 + a4 * dot4) * 0.5f / (float)M_PI; + result = MAX2(result, 0.0f); return result; } @@ -3067,11 +3092,11 @@ float form_factor_hemi_poly(float p[3], float n[3], float v1[3], float v2[3], fl { /* computes how much hemisphere defined by point and normal is * covered by a quad or triangle, cosine weighted */ - float q0[3], q1[3], q2[3], q3[3], contrib= 0.0f; + float q0[3], q1[3], q2[3], q3[3], contrib = 0.0f; if (ff_visible_quad(p, n, v1, v2, v3, q0, q1, q2, q3)) contrib += ff_quad_form_factor(p, n, q0, q1, q2, q3); - + if (v4 && ff_visible_quad(p, n, v1, v3, v4, q0, q1, q2, q3)) contrib += ff_quad_form_factor(p, n, q0, q1, q2, q3); @@ -3079,8 +3104,8 @@ float form_factor_hemi_poly(float p[3], float n[3], float v1[3], float v2[3], fl } /* evaluate if entire quad is a proper convex quad */ - int is_quad_convex_v3(const float v1[3], const float v2[3], const float v3[3], const float v4[3]) - { +int is_quad_convex_v3(const float v1[3], const float v2[3], const float v3[3], const float v4[3]) +{ float nor[3], nor1[3], nor2[3], vec[4][2]; int axis_a, axis_b; @@ -3102,11 +3127,15 @@ float form_factor_hemi_poly(float p[3], float n[3], float v1[3], float v2[3], fl axis_dominant_v3(&axis_a, &axis_b, nor); - vec[0][0]= v1[axis_a]; vec[0][1]= v1[axis_b]; - vec[1][0]= v2[axis_a]; vec[1][1]= v2[axis_b]; + vec[0][0] = v1[axis_a]; + vec[0][1] = v1[axis_b]; + vec[1][0] = v2[axis_a]; + vec[1][1] = v2[axis_b]; - vec[2][0]= v3[axis_a]; vec[2][1]= v3[axis_b]; - vec[3][0]= v4[axis_a]; vec[3][1]= v4[axis_b]; + vec[2][0] = v3[axis_a]; + vec[2][1] = v3[axis_b]; + vec[3][0] = v4[axis_a]; + vec[3][1] = v4[axis_b]; /* linetests, the 2 diagonals have to instersect to be convex */ return (isect_line_line_v2(vec[0], vec[2], vec[1], vec[3]) > 0) ? TRUE : FALSE; diff --git a/source/blender/blenlib/intern/math_geom_inline.c b/source/blender/blenlib/intern/math_geom_inline.c index 634e68d0ccf..0d4c797cefb 100644 --- a/source/blender/blenlib/intern/math_geom_inline.c +++ b/source/blender/blenlib/intern/math_geom_inline.c @@ -37,19 +37,19 @@ MINLINE void zero_sh(float r[9]) { - memset(r, 0, sizeof(float)*9); + memset(r, 0, sizeof(float) * 9); } MINLINE void copy_sh_sh(float r[9], const float a[9]) { - memcpy(r, a, sizeof(float)*9); + memcpy(r, a, sizeof(float) * 9); } MINLINE void mul_sh_fl(float r[9], const float f) { int i; - for (i=0; i<9; i++) + for (i = 0; i < 9; i++) r[i] *= f; } @@ -57,18 +57,18 @@ MINLINE void add_sh_shsh(float r[9], const float a[9], const float b[9]) { int i; - for (i=0; i<9; i++) - r[i]= a[i] + b[i]; + for (i = 0; i < 9; i++) + r[i] = a[i] + b[i]; } MINLINE float dot_shsh(float a[9], float b[9]) { - float r= 0.0f; + float r = 0.0f; int i; - for (i=0; i<9; i++) - r += a[i]*b[i]; - + for (i = 0; i < 9; i++) + r += a[i] * b[i]; + return r; } @@ -80,16 +80,16 @@ MINLINE float diffuse_shv3(float sh[9], const float v[3]) static const float c4 = 0.886227f, c5 = 0.247708f; float x, y, z, sum; - x= v[0]; - y= v[1]; - z= v[2]; + x = v[0]; + y = v[1]; + z = v[2]; - sum= c1*sh[8]*(x*x - y*y); - sum += c3*sh[6]*z*z; - sum += c4*sh[0]; - sum += -c5*sh[6]; - sum += 2.0f*c1*(sh[4]*x*y + sh[7]*x*z + sh[5]*y*z); - sum += 2.0f*c2*(sh[3]*x + sh[1]*y + sh[2]*z); + sum = c1 * sh[8] * (x * x - y * y); + sum += c3 * sh[6] * z * z; + sum += c4 * sh[0]; + sum += -c5 * sh[6]; + sum += 2.0f * c1 * (sh[4] * x * y + sh[7] * x * z + sh[5] * y * z); + sum += 2.0f * c2 * (sh[3] * x + sh[1] * y + sh[2] * z); return sum; } @@ -100,21 +100,21 @@ MINLINE void vec_fac_to_sh(float r[9], const float v[3], const float f) * "An Efficient Representation for Irradiance Environment Maps" */ float sh[9], x, y, z; - x= v[0]; - y= v[1]; - z= v[2]; - - sh[0]= 0.282095f; - - sh[1]= 0.488603f*y; - sh[2]= 0.488603f*z; - sh[3]= 0.488603f*x; - - sh[4]= 1.092548f*x*y; - sh[5]= 1.092548f*y*z; - sh[6]= 0.315392f*(3.0f*z*z - 1.0f); - sh[7]= 1.092548f*x*z; - sh[8]= 0.546274f*(x*x - y*y); + x = v[0]; + y = v[1]; + z = v[2]; + + sh[0] = 0.282095f; + + sh[1] = 0.488603f * y; + sh[2] = 0.488603f * z; + sh[3] = 0.488603f * x; + + sh[4] = 1.092548f * x * y; + sh[5] = 1.092548f * y * z; + sh[6] = 0.315392f * (3.0f * z * z - 1.0f); + sh[7] = 1.092548f * x * z; + sh[8] = 0.546274f * (x * x - y * y); mul_sh_fl(sh, f); copy_sh_sh(r, sh); diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c index fd49012491e..09b5ab4f62a 100644 --- a/source/blender/blenlib/intern/math_matrix.c +++ b/source/blender/blenlib/intern/math_matrix.c @@ -35,80 +35,80 @@ void zero_m3(float m[3][3]) { - memset(m, 0, 3*3*sizeof(float)); + memset(m, 0, 3 * 3 * sizeof(float)); } void zero_m4(float m[4][4]) { - memset(m, 0, 4*4*sizeof(float)); + memset(m, 0, 4 * 4 * sizeof(float)); } void unit_m3(float m[][3]) { - m[0][0]= m[1][1]= m[2][2]= 1.0; - m[0][1]= m[0][2]= 0.0; - m[1][0]= m[1][2]= 0.0; - m[2][0]= m[2][1]= 0.0; + m[0][0] = m[1][1] = m[2][2] = 1.0; + m[0][1] = m[0][2] = 0.0; + m[1][0] = m[1][2] = 0.0; + m[2][0] = m[2][1] = 0.0; } void unit_m4(float m[][4]) { - m[0][0]= m[1][1]= m[2][2]= m[3][3]= 1.0; - m[0][1]= m[0][2]= m[0][3]= 0.0; - m[1][0]= m[1][2]= m[1][3]= 0.0; - m[2][0]= m[2][1]= m[2][3]= 0.0; - m[3][0]= m[3][1]= m[3][2]= 0.0; + m[0][0] = m[1][1] = m[2][2] = m[3][3] = 1.0; + m[0][1] = m[0][2] = m[0][3] = 0.0; + m[1][0] = m[1][2] = m[1][3] = 0.0; + m[2][0] = m[2][1] = m[2][3] = 0.0; + m[3][0] = m[3][1] = m[3][2] = 0.0; } -void copy_m3_m3(float m1[][3], float m2[][3]) -{ +void copy_m3_m3(float m1[][3], float m2[][3]) +{ /* destination comes first: */ - memcpy(&m1[0], &m2[0], 9*sizeof(float)); + memcpy(&m1[0], &m2[0], 9 * sizeof(float)); } -void copy_m4_m4(float m1[][4], float m2[][4]) +void copy_m4_m4(float m1[][4], float m2[][4]) { - memcpy(m1, m2, 4*4*sizeof(float)); + memcpy(m1, m2, 4 * 4 * sizeof(float)); } void copy_m3_m4(float m1[][3], float m2[][4]) { - m1[0][0]= m2[0][0]; - m1[0][1]= m2[0][1]; - m1[0][2]= m2[0][2]; + m1[0][0] = m2[0][0]; + m1[0][1] = m2[0][1]; + m1[0][2] = m2[0][2]; - m1[1][0]= m2[1][0]; - m1[1][1]= m2[1][1]; - m1[1][2]= m2[1][2]; + m1[1][0] = m2[1][0]; + m1[1][1] = m2[1][1]; + m1[1][2] = m2[1][2]; - m1[2][0]= m2[2][0]; - m1[2][1]= m2[2][1]; - m1[2][2]= m2[2][2]; + m1[2][0] = m2[2][0]; + m1[2][1] = m2[2][1]; + m1[2][2] = m2[2][2]; } -void copy_m4_m3(float m1[][4], float m2[][3]) /* no clear */ +void copy_m4_m3(float m1[][4], float m2[][3]) /* no clear */ { - m1[0][0]= m2[0][0]; - m1[0][1]= m2[0][1]; - m1[0][2]= m2[0][2]; + m1[0][0] = m2[0][0]; + m1[0][1] = m2[0][1]; + m1[0][2] = m2[0][2]; - m1[1][0]= m2[1][0]; - m1[1][1]= m2[1][1]; - m1[1][2]= m2[1][2]; + m1[1][0] = m2[1][0]; + m1[1][1] = m2[1][1]; + m1[1][2] = m2[1][2]; - m1[2][0]= m2[2][0]; - m1[2][1]= m2[2][1]; - m1[2][2]= m2[2][2]; + m1[2][0] = m2[2][0]; + m1[2][1] = m2[2][1]; + m1[2][2] = m2[2][2]; /* Reevan's Bugfix */ - m1[0][3]=0.0F; - m1[1][3]=0.0F; - m1[2][3]=0.0F; + m1[0][3] = 0.0F; + m1[1][3] = 0.0F; + m1[2][3] = 0.0F; - m1[3][0]=0.0F; - m1[3][1]=0.0F; - m1[3][2]=0.0F; - m1[3][3]=1.0F; + m1[3][0] = 0.0F; + m1[3][1] = 0.0F; + m1[3][2] = 0.0F; + m1[3][3] = 1.0F; } @@ -119,7 +119,7 @@ void swap_m3m3(float m1[][3], float m2[][3]) for (i = 0; i < 3; i++) { for (j = 0; j < 3; j++) { - t = m1[i][j]; + t = m1[i][j]; m1[i][j] = m2[i][j]; m2[i][j] = t; } @@ -133,7 +133,7 @@ void swap_m4m4(float m1[][4], float m2[][4]) for (i = 0; i < 4; i++) { for (j = 0; j < 4; j++) { - t = m1[i][j]; + t = m1[i][j]; m1[i][j] = m2[i][j]; m2[i][j] = t; } @@ -151,25 +151,25 @@ void mult_m4_m4m4(float m1[][4], float m3_[][4], float m2_[][4]) copy_m4_m4(m3, m3_); /* matrix product: m1[j][k] = m2[j][i].m3[i][k] */ - m1[0][0] = m2[0][0]*m3[0][0] + m2[0][1]*m3[1][0] + m2[0][2]*m3[2][0] + m2[0][3]*m3[3][0]; - m1[0][1] = m2[0][0]*m3[0][1] + m2[0][1]*m3[1][1] + m2[0][2]*m3[2][1] + m2[0][3]*m3[3][1]; - m1[0][2] = m2[0][0]*m3[0][2] + m2[0][1]*m3[1][2] + m2[0][2]*m3[2][2] + m2[0][3]*m3[3][2]; - m1[0][3] = m2[0][0]*m3[0][3] + m2[0][1]*m3[1][3] + m2[0][2]*m3[2][3] + m2[0][3]*m3[3][3]; + m1[0][0] = m2[0][0] * m3[0][0] + m2[0][1] * m3[1][0] + m2[0][2] * m3[2][0] + m2[0][3] * m3[3][0]; + m1[0][1] = m2[0][0] * m3[0][1] + m2[0][1] * m3[1][1] + m2[0][2] * m3[2][1] + m2[0][3] * m3[3][1]; + m1[0][2] = m2[0][0] * m3[0][2] + m2[0][1] * m3[1][2] + m2[0][2] * m3[2][2] + m2[0][3] * m3[3][2]; + m1[0][3] = m2[0][0] * m3[0][3] + m2[0][1] * m3[1][3] + m2[0][2] * m3[2][3] + m2[0][3] * m3[3][3]; - m1[1][0] = m2[1][0]*m3[0][0] + m2[1][1]*m3[1][0] + m2[1][2]*m3[2][0] + m2[1][3]*m3[3][0]; - m1[1][1] = m2[1][0]*m3[0][1] + m2[1][1]*m3[1][1] + m2[1][2]*m3[2][1] + m2[1][3]*m3[3][1]; - m1[1][2] = m2[1][0]*m3[0][2] + m2[1][1]*m3[1][2] + m2[1][2]*m3[2][2] + m2[1][3]*m3[3][2]; - m1[1][3] = m2[1][0]*m3[0][3] + m2[1][1]*m3[1][3] + m2[1][2]*m3[2][3] + m2[1][3]*m3[3][3]; + m1[1][0] = m2[1][0] * m3[0][0] + m2[1][1] * m3[1][0] + m2[1][2] * m3[2][0] + m2[1][3] * m3[3][0]; + m1[1][1] = m2[1][0] * m3[0][1] + m2[1][1] * m3[1][1] + m2[1][2] * m3[2][1] + m2[1][3] * m3[3][1]; + m1[1][2] = m2[1][0] * m3[0][2] + m2[1][1] * m3[1][2] + m2[1][2] * m3[2][2] + m2[1][3] * m3[3][2]; + m1[1][3] = m2[1][0] * m3[0][3] + m2[1][1] * m3[1][3] + m2[1][2] * m3[2][3] + m2[1][3] * m3[3][3]; - m1[2][0] = m2[2][0]*m3[0][0] + m2[2][1]*m3[1][0] + m2[2][2]*m3[2][0] + m2[2][3]*m3[3][0]; - m1[2][1] = m2[2][0]*m3[0][1] + m2[2][1]*m3[1][1] + m2[2][2]*m3[2][1] + m2[2][3]*m3[3][1]; - m1[2][2] = m2[2][0]*m3[0][2] + m2[2][1]*m3[1][2] + m2[2][2]*m3[2][2] + m2[2][3]*m3[3][2]; - m1[2][3] = m2[2][0]*m3[0][3] + m2[2][1]*m3[1][3] + m2[2][2]*m3[2][3] + m2[2][3]*m3[3][3]; + m1[2][0] = m2[2][0] * m3[0][0] + m2[2][1] * m3[1][0] + m2[2][2] * m3[2][0] + m2[2][3] * m3[3][0]; + m1[2][1] = m2[2][0] * m3[0][1] + m2[2][1] * m3[1][1] + m2[2][2] * m3[2][1] + m2[2][3] * m3[3][1]; + m1[2][2] = m2[2][0] * m3[0][2] + m2[2][1] * m3[1][2] + m2[2][2] * m3[2][2] + m2[2][3] * m3[3][2]; + m1[2][3] = m2[2][0] * m3[0][3] + m2[2][1] * m3[1][3] + m2[2][2] * m3[2][3] + m2[2][3] * m3[3][3]; - m1[3][0] = m2[3][0]*m3[0][0] + m2[3][1]*m3[1][0] + m2[3][2]*m3[2][0] + m2[3][3]*m3[3][0]; - m1[3][1] = m2[3][0]*m3[0][1] + m2[3][1]*m3[1][1] + m2[3][2]*m3[2][1] + m2[3][3]*m3[3][1]; - m1[3][2] = m2[3][0]*m3[0][2] + m2[3][1]*m3[1][2] + m2[3][2]*m3[2][2] + m2[3][3]*m3[3][2]; - m1[3][3] = m2[3][0]*m3[0][3] + m2[3][1]*m3[1][3] + m2[3][2]*m3[2][3] + m2[3][3]*m3[3][3]; + m1[3][0] = m2[3][0] * m3[0][0] + m2[3][1] * m3[1][0] + m2[3][2] * m3[2][0] + m2[3][3] * m3[3][0]; + m1[3][1] = m2[3][0] * m3[0][1] + m2[3][1] * m3[1][1] + m2[3][2] * m3[2][1] + m2[3][3] * m3[3][1]; + m1[3][2] = m2[3][0] * m3[0][2] + m2[3][1] * m3[1][2] + m2[3][2] * m3[2][2] + m2[3][3] * m3[3][2]; + m1[3][3] = m2[3][0] * m3[0][3] + m2[3][1] * m3[1][3] + m2[3][2] * m3[2][3] + m2[3][3] * m3[3][3]; } @@ -181,18 +181,18 @@ void mul_m3_m3m3(float m1[][3], float m3_[][3], float m2_[][3]) copy_m3_m3(m2, m2_); copy_m3_m3(m3, m3_); - /* m1[i][j] = m2[i][k]*m3[k][j], args are flipped! */ - m1[0][0]= m2[0][0]*m3[0][0] + m2[0][1]*m3[1][0] + m2[0][2]*m3[2][0]; - m1[0][1]= m2[0][0]*m3[0][1] + m2[0][1]*m3[1][1] + m2[0][2]*m3[2][1]; - m1[0][2]= m2[0][0]*m3[0][2] + m2[0][1]*m3[1][2] + m2[0][2]*m3[2][2]; + /* m1[i][j] = m2[i][k] * m3[k][j], args are flipped! */ + m1[0][0] = m2[0][0] * m3[0][0] + m2[0][1] * m3[1][0] + m2[0][2] * m3[2][0]; + m1[0][1] = m2[0][0] * m3[0][1] + m2[0][1] * m3[1][1] + m2[0][2] * m3[2][1]; + m1[0][2] = m2[0][0] * m3[0][2] + m2[0][1] * m3[1][2] + m2[0][2] * m3[2][2]; - m1[1][0]= m2[1][0]*m3[0][0] + m2[1][1]*m3[1][0] + m2[1][2]*m3[2][0]; - m1[1][1]= m2[1][0]*m3[0][1] + m2[1][1]*m3[1][1] + m2[1][2]*m3[2][1]; - m1[1][2]= m2[1][0]*m3[0][2] + m2[1][1]*m3[1][2] + m2[1][2]*m3[2][2]; + m1[1][0] = m2[1][0] * m3[0][0] + m2[1][1] * m3[1][0] + m2[1][2] * m3[2][0]; + m1[1][1] = m2[1][0] * m3[0][1] + m2[1][1] * m3[1][1] + m2[1][2] * m3[2][1]; + m1[1][2] = m2[1][0] * m3[0][2] + m2[1][1] * m3[1][2] + m2[1][2] * m3[2][2]; - m1[2][0]= m2[2][0]*m3[0][0] + m2[2][1]*m3[1][0] + m2[2][2]*m3[2][0]; - m1[2][1]= m2[2][0]*m3[0][1] + m2[2][1]*m3[1][1] + m2[2][2]*m3[2][1]; - m1[2][2]= m2[2][0]*m3[0][2] + m2[2][1]*m3[1][2] + m2[2][2]*m3[2][2]; + m1[2][0] = m2[2][0] * m3[0][0] + m2[2][1] * m3[1][0] + m2[2][2] * m3[2][0]; + m1[2][1] = m2[2][0] * m3[0][1] + m2[2][1] * m3[1][1] + m2[2][2] * m3[2][1]; + m1[2][2] = m2[2][0] * m3[0][2] + m2[2][1] * m3[1][2] + m2[2][2] * m3[2][2]; } void mul_m4_m4m3(float (*m1)[4], float (*m3_)[4], float (*m2_)[3]) @@ -203,56 +203,56 @@ void mul_m4_m4m3(float (*m1)[4], float (*m3_)[4], float (*m2_)[3]) copy_m3_m3(m2, m2_); copy_m4_m4(m3, m3_); - m1[0][0]= m2[0][0]*m3[0][0] + m2[0][1]*m3[1][0] + m2[0][2]*m3[2][0]; - m1[0][1]= m2[0][0]*m3[0][1] + m2[0][1]*m3[1][1] + m2[0][2]*m3[2][1]; - m1[0][2]= m2[0][0]*m3[0][2] + m2[0][1]*m3[1][2] + m2[0][2]*m3[2][2]; - m1[1][0]= m2[1][0]*m3[0][0] + m2[1][1]*m3[1][0] + m2[1][2]*m3[2][0]; - m1[1][1]= m2[1][0]*m3[0][1] + m2[1][1]*m3[1][1] + m2[1][2]*m3[2][1]; - m1[1][2]= m2[1][0]*m3[0][2] + m2[1][1]*m3[1][2] + m2[1][2]*m3[2][2]; - m1[2][0]= m2[2][0]*m3[0][0] + m2[2][1]*m3[1][0] + m2[2][2]*m3[2][0]; - m1[2][1]= m2[2][0]*m3[0][1] + m2[2][1]*m3[1][1] + m2[2][2]*m3[2][1]; - m1[2][2]= m2[2][0]*m3[0][2] + m2[2][1]*m3[1][2] + m2[2][2]*m3[2][2]; + m1[0][0] = m2[0][0] * m3[0][0] + m2[0][1] * m3[1][0] + m2[0][2] * m3[2][0]; + m1[0][1] = m2[0][0] * m3[0][1] + m2[0][1] * m3[1][1] + m2[0][2] * m3[2][1]; + m1[0][2] = m2[0][0] * m3[0][2] + m2[0][1] * m3[1][2] + m2[0][2] * m3[2][2]; + m1[1][0] = m2[1][0] * m3[0][0] + m2[1][1] * m3[1][0] + m2[1][2] * m3[2][0]; + m1[1][1] = m2[1][0] * m3[0][1] + m2[1][1] * m3[1][1] + m2[1][2] * m3[2][1]; + m1[1][2] = m2[1][0] * m3[0][2] + m2[1][1] * m3[1][2] + m2[1][2] * m3[2][2]; + m1[2][0] = m2[2][0] * m3[0][0] + m2[2][1] * m3[1][0] + m2[2][2] * m3[2][0]; + m1[2][1] = m2[2][0] * m3[0][1] + m2[2][1] * m3[1][1] + m2[2][2] * m3[2][1]; + m1[2][2] = m2[2][0] * m3[0][2] + m2[2][1] * m3[1][2] + m2[2][2] * m3[2][2]; } -/* m1 = m2 * m3, ignore the elements on the 4th row/column of m3*/ +/* m1 = m2 * m3, ignore the elements on the 4th row/column of m3 */ void mult_m3_m3m4(float m1[][3], float m3[][4], float m2[][3]) { /* m1[i][j] = m2[i][k] * m3[k][j] */ - m1[0][0] = m2[0][0] * m3[0][0] + m2[0][1] * m3[1][0] +m2[0][2] * m3[2][0]; - m1[0][1] = m2[0][0] * m3[0][1] + m2[0][1] * m3[1][1] +m2[0][2] * m3[2][1]; - m1[0][2] = m2[0][0] * m3[0][2] + m2[0][1] * m3[1][2] +m2[0][2] * m3[2][2]; + m1[0][0] = m2[0][0] * m3[0][0] + m2[0][1] * m3[1][0] + m2[0][2] * m3[2][0]; + m1[0][1] = m2[0][0] * m3[0][1] + m2[0][1] * m3[1][1] + m2[0][2] * m3[2][1]; + m1[0][2] = m2[0][0] * m3[0][2] + m2[0][1] * m3[1][2] + m2[0][2] * m3[2][2]; - m1[1][0] = m2[1][0] * m3[0][0] + m2[1][1] * m3[1][0] +m2[1][2] * m3[2][0]; - m1[1][1] = m2[1][0] * m3[0][1] + m2[1][1] * m3[1][1] +m2[1][2] * m3[2][1]; - m1[1][2] = m2[1][0] * m3[0][2] + m2[1][1] * m3[1][2] +m2[1][2] * m3[2][2]; + m1[1][0] = m2[1][0] * m3[0][0] + m2[1][1] * m3[1][0] + m2[1][2] * m3[2][0]; + m1[1][1] = m2[1][0] * m3[0][1] + m2[1][1] * m3[1][1] + m2[1][2] * m3[2][1]; + m1[1][2] = m2[1][0] * m3[0][2] + m2[1][1] * m3[1][2] + m2[1][2] * m3[2][2]; - m1[2][0] = m2[2][0] * m3[0][0] + m2[2][1] * m3[1][0] +m2[2][2] * m3[2][0]; - m1[2][1] = m2[2][0] * m3[0][1] + m2[2][1] * m3[1][1] +m2[2][2] * m3[2][1]; - m1[2][2] = m2[2][0] * m3[0][2] + m2[2][1] * m3[1][2] +m2[2][2] * m3[2][2]; + m1[2][0] = m2[2][0] * m3[0][0] + m2[2][1] * m3[1][0] + m2[2][2] * m3[2][0]; + m1[2][1] = m2[2][0] * m3[0][1] + m2[2][1] * m3[1][1] + m2[2][2] * m3[2][1]; + m1[2][2] = m2[2][0] * m3[0][2] + m2[2][1] * m3[1][2] + m2[2][2] * m3[2][2]; } void mul_m4_m3m4(float (*m1)[4], float (*m3)[3], float (*m2)[4]) { - m1[0][0]= m2[0][0]*m3[0][0] + m2[0][1]*m3[1][0] + m2[0][2]*m3[2][0]; - m1[0][1]= m2[0][0]*m3[0][1] + m2[0][1]*m3[1][1] + m2[0][2]*m3[2][1]; - m1[0][2]= m2[0][0]*m3[0][2] + m2[0][1]*m3[1][2] + m2[0][2]*m3[2][2]; - m1[1][0]= m2[1][0]*m3[0][0] + m2[1][1]*m3[1][0] + m2[1][2]*m3[2][0]; - m1[1][1]= m2[1][0]*m3[0][1] + m2[1][1]*m3[1][1] + m2[1][2]*m3[2][1]; - m1[1][2]= m2[1][0]*m3[0][2] + m2[1][1]*m3[1][2] + m2[1][2]*m3[2][2]; - m1[2][0]= m2[2][0]*m3[0][0] + m2[2][1]*m3[1][0] + m2[2][2]*m3[2][0]; - m1[2][1]= m2[2][0]*m3[0][1] + m2[2][1]*m3[1][1] + m2[2][2]*m3[2][1]; - m1[2][2]= m2[2][0]*m3[0][2] + m2[2][1]*m3[1][2] + m2[2][2]*m3[2][2]; + m1[0][0] = m2[0][0] * m3[0][0] + m2[0][1] * m3[1][0] + m2[0][2] * m3[2][0]; + m1[0][1] = m2[0][0] * m3[0][1] + m2[0][1] * m3[1][1] + m2[0][2] * m3[2][1]; + m1[0][2] = m2[0][0] * m3[0][2] + m2[0][1] * m3[1][2] + m2[0][2] * m3[2][2]; + m1[1][0] = m2[1][0] * m3[0][0] + m2[1][1] * m3[1][0] + m2[1][2] * m3[2][0]; + m1[1][1] = m2[1][0] * m3[0][1] + m2[1][1] * m3[1][1] + m2[1][2] * m3[2][1]; + m1[1][2] = m2[1][0] * m3[0][2] + m2[1][1] * m3[1][2] + m2[1][2] * m3[2][2]; + m1[2][0] = m2[2][0] * m3[0][0] + m2[2][1] * m3[1][0] + m2[2][2] * m3[2][0]; + m1[2][1] = m2[2][0] * m3[0][1] + m2[2][1] * m3[1][1] + m2[2][2] * m3[2][1]; + m1[2][2] = m2[2][0] * m3[0][2] + m2[2][1] * m3[1][2] + m2[2][2] * m3[2][2]; } void mul_serie_m3(float answ[][3], - float m1[][3], float m2[][3], float m3[][3], - float m4[][3], float m5[][3], float m6[][3], - float m7[][3], float m8[][3]) +float m1[][3], float m2[][3], float m3[][3], +float m4[][3], float m5[][3], float m6[][3], +float m7[][3], float m8[][3]) { float temp[3][3]; - - if (m1==NULL || m2==NULL) return; - + + if (m1 == NULL || m2 == NULL) return; + mul_m3_m3m3(answ, m2, m1); if (m3) { mul_m3_m3m3(temp, m3, answ); @@ -278,14 +278,14 @@ void mul_serie_m3(float answ[][3], } void mul_serie_m4(float answ[][4], float m1[][4], - float m2[][4], float m3[][4], float m4[][4], - float m5[][4], float m6[][4], float m7[][4], - float m8[][4]) +float m2[][4], float m3[][4], float m4[][4], +float m5[][4], float m6[][4], float m7[][4], +float m8[][4]) { float temp[4][4]; - - if (m1==NULL || m2==NULL) return; - + + if (m1 == NULL || m2 == NULL) return; + mult_m4_m4m4(answ, m1, m2); if (m3) { mult_m4_m4m4(temp, answ, m3); @@ -312,41 +312,41 @@ void mul_serie_m4(float answ[][4], float m1[][4], void mul_m4_v3(float mat[][4], float vec[3]) { - float x,y; + float x, y; - x=vec[0]; - y=vec[1]; - vec[0]=x*mat[0][0] + y*mat[1][0] + mat[2][0]*vec[2] + mat[3][0]; - vec[1]=x*mat[0][1] + y*mat[1][1] + mat[2][1]*vec[2] + mat[3][1]; - vec[2]=x*mat[0][2] + y*mat[1][2] + mat[2][2]*vec[2] + mat[3][2]; + x = vec[0]; + y = vec[1]; + vec[0] = x * mat[0][0] + y * mat[1][0] + mat[2][0] * vec[2] + mat[3][0]; + vec[1] = x * mat[0][1] + y * mat[1][1] + mat[2][1] * vec[2] + mat[3][1]; + vec[2] = x * mat[0][2] + y * mat[1][2] + mat[2][2] * vec[2] + mat[3][2]; } void mul_v3_m4v3(float in[3], float mat[][4], const float vec[3]) { - float x,y; + float x, y; - x=vec[0]; - y=vec[1]; - in[0]= x*mat[0][0] + y*mat[1][0] + mat[2][0]*vec[2] + mat[3][0]; - in[1]= x*mat[0][1] + y*mat[1][1] + mat[2][1]*vec[2] + mat[3][1]; - in[2]= x*mat[0][2] + y*mat[1][2] + mat[2][2]*vec[2] + mat[3][2]; + x = vec[0]; + y = vec[1]; + in[0] = x * mat[0][0] + y * mat[1][0] + mat[2][0] * vec[2] + mat[3][0]; + in[1] = x * mat[0][1] + y * mat[1][1] + mat[2][1] * vec[2] + mat[3][1]; + in[2] = x * mat[0][2] + y * mat[1][2] + mat[2][2] * vec[2] + mat[3][2]; } /* same as mul_m4_v3() but doesnt apply translation component */ void mul_mat3_m4_v3(float mat[][4], float vec[3]) { - float x,y; + float x, y; - x= vec[0]; - y= vec[1]; - vec[0]= x*mat[0][0] + y*mat[1][0] + mat[2][0]*vec[2]; - vec[1]= x*mat[0][1] + y*mat[1][1] + mat[2][1]*vec[2]; - vec[2]= x*mat[0][2] + y*mat[1][2] + mat[2][2]*vec[2]; + x = vec[0]; + y = vec[1]; + vec[0] = x * mat[0][0] + y * mat[1][0] + mat[2][0] * vec[2]; + vec[1] = x * mat[0][1] + y * mat[1][1] + mat[2][1] * vec[2]; + vec[2] = x * mat[0][2] + y * mat[1][2] + mat[2][2] * vec[2]; } void mul_project_m4_v3(float mat[][4], float vec[3]) { - const float w= vec[0]*mat[0][3] + vec[1]*mat[1][3] + vec[2]*mat[2][3] + mat[3][3]; + const float w = vec[0] * mat[0][3] + vec[1] * mat[1][3] + vec[2] * mat[2][3] + mat[3][3]; mul_m4_v3(mat, vec); vec[0] /= w; @@ -358,14 +358,14 @@ void mul_v4_m4v4(float r[4], float mat[4][4], float v[4]) { float x, y, z; - x= v[0]; - y= v[1]; - z= v[2]; + x = v[0]; + y = v[1]; + z = v[2]; - r[0]= x*mat[0][0] + y*mat[1][0] + z*mat[2][0] + mat[3][0]*v[3]; - r[1]= x*mat[0][1] + y*mat[1][1] + z*mat[2][1] + mat[3][1]*v[3]; - r[2]= x*mat[0][2] + y*mat[1][2] + z*mat[2][2] + mat[3][2]*v[3]; - r[3]= x*mat[0][3] + y*mat[1][3] + z*mat[2][3] + mat[3][3]*v[3]; + r[0] = x * mat[0][0] + y * mat[1][0] + z * mat[2][0] + mat[3][0] * v[3]; + r[1] = x * mat[0][1] + y * mat[1][1] + z * mat[2][1] + mat[3][1] * v[3]; + r[2] = x * mat[0][2] + y * mat[1][2] + z * mat[2][2] + mat[3][2] * v[3]; + r[3] = x * mat[0][3] + y * mat[1][3] + z * mat[2][3] + mat[3][3] * v[3]; } void mul_m4_v4(float mat[4][4], float r[4]) @@ -377,14 +377,14 @@ void mul_v4d_m4v4d(double r[4], float mat[4][4], double v[4]) { double x, y, z; - x= v[0]; - y= v[1]; - z= v[2]; + x = v[0]; + y = v[1]; + z = v[2]; - r[0]= x*(double)mat[0][0] + y*(double)mat[1][0] + z*(double)mat[2][0] + (double)mat[3][0]*v[3]; - r[1]= x*(double)mat[0][1] + y*(double)mat[1][1] + z*(double)mat[2][1] + (double)mat[3][1]*v[3]; - r[2]= x*(double)mat[0][2] + y*(double)mat[1][2] + z*(double)mat[2][2] + (double)mat[3][2]*v[3]; - r[3]= x*(double)mat[0][3] + y*(double)mat[1][3] + z*(double)mat[2][3] + (double)mat[3][3]*v[3]; + r[0] = x * (double)mat[0][0] + y * (double)mat[1][0] + z * (double)mat[2][0] + (double)mat[3][0] * v[3]; + r[1] = x * (double)mat[0][1] + y * (double)mat[1][1] + z * (double)mat[2][1] + (double)mat[3][1] * v[3]; + r[2] = x * (double)mat[0][2] + y * (double)mat[1][2] + z * (double)mat[2][2] + (double)mat[3][2] * v[3]; + r[3] = x * (double)mat[0][3] + y * (double)mat[1][3] + z * (double)mat[2][3] + (double)mat[3][3] * v[3]; } void mul_m4_v4d(float mat[4][4], double r[4]) @@ -394,9 +394,9 @@ void mul_m4_v4d(float mat[4][4], double r[4]) void mul_v3_m3v3(float r[3], float M[3][3], float a[3]) { - r[0]= M[0][0]*a[0] + M[1][0]*a[1] + M[2][0]*a[2]; - r[1]= M[0][1]*a[0] + M[1][1]*a[1] + M[2][1]*a[2]; - r[2]= M[0][2]*a[0] + M[1][2]*a[1] + M[2][2]*a[2]; + r[0] = M[0][0] * a[0] + M[1][0] * a[1] + M[2][0] * a[2]; + r[1] = M[0][1] * a[0] + M[1][1] * a[1] + M[2][1] * a[2]; + r[2] = M[0][2] * a[0] + M[1][2] * a[1] + M[2][2] * a[2]; } void mul_m3_v3(float M[3][3], float r[3]) @@ -409,21 +409,21 @@ void mul_m3_v3(float M[3][3], float r[3]) void mul_transposed_m3_v3(float mat[][3], float vec[3]) { - float x,y; + float x, y; - x=vec[0]; - y=vec[1]; - vec[0]= x*mat[0][0] + y*mat[0][1] + mat[0][2]*vec[2]; - vec[1]= x*mat[1][0] + y*mat[1][1] + mat[1][2]*vec[2]; - vec[2]= x*mat[2][0] + y*mat[2][1] + mat[2][2]*vec[2]; + x = vec[0]; + y = vec[1]; + vec[0] = x * mat[0][0] + y * mat[0][1] + mat[0][2] * vec[2]; + vec[1] = x * mat[1][0] + y * mat[1][1] + mat[1][2] * vec[2]; + vec[2] = x * mat[2][0] + y * mat[2][1] + mat[2][2] * vec[2]; } void mul_m3_fl(float m[3][3], float f) { int i, j; - for (i=0;i<3;i++) - for (j=0;j<3;j++) + for (i = 0; i < 3; i++) + for (j = 0; j < 3; j++) m[i][j] *= f; } @@ -431,8 +431,8 @@ void mul_m4_fl(float m[4][4], float f) { int i, j; - for (i=0;i<4;i++) - for (j=0;j<4;j++) + for (i = 0; i < 4; i++) + for (j = 0; j < 4; j++) m[i][j] *= f; } @@ -440,56 +440,56 @@ void mul_mat3_m4_fl(float m[4][4], float f) { int i, j; - for (i=0; i<3; i++) - for (j=0; j<3; j++) + for (i = 0; i < 3; i++) + for (j = 0; j < 3; j++) m[i][j] *= f; } void mul_m3_v3_double(float mat[][3], double vec[3]) { - double x,y; + double x, y; - x=vec[0]; - y=vec[1]; - vec[0]= x*(double)mat[0][0] + y*(double)mat[1][0] + (double)mat[2][0]*vec[2]; - vec[1]= x*(double)mat[0][1] + y*(double)mat[1][1] + (double)mat[2][1]*vec[2]; - vec[2]= x*(double)mat[0][2] + y*(double)mat[1][2] + (double)mat[2][2]*vec[2]; + x = vec[0]; + y = vec[1]; + vec[0] = x * (double)mat[0][0] + y * (double)mat[1][0] + (double)mat[2][0] * vec[2]; + vec[1] = x * (double)mat[0][1] + y * (double)mat[1][1] + (double)mat[2][1] * vec[2]; + vec[2] = x * (double)mat[0][2] + y * (double)mat[1][2] + (double)mat[2][2] * vec[2]; } void add_m3_m3m3(float m1[][3], float m2[][3], float m3[][3]) { int i, j; - for (i=0;i<3;i++) - for (j=0;j<3;j++) - m1[i][j]= m2[i][j] + m3[i][j]; + for (i = 0; i < 3; i++) + for (j = 0; j < 3; j++) + m1[i][j] = m2[i][j] + m3[i][j]; } void add_m4_m4m4(float m1[][4], float m2[][4], float m3[][4]) { int i, j; - for (i=0;i<4;i++) - for (j=0;j<4;j++) - m1[i][j]= m2[i][j] + m3[i][j]; + for (i = 0; i < 4; i++) + for (j = 0; j < 4; j++) + m1[i][j] = m2[i][j] + m3[i][j]; } void sub_m3_m3m3(float m1[][3], float m2[][3], float m3[][3]) { int i, j; - for (i=0;i<3;i++) - for (j=0;j<3;j++) - m1[i][j]= m2[i][j] - m3[i][j]; + for (i = 0; i < 3; i++) + for (j = 0; j < 3; j++) + m1[i][j] = m2[i][j] - m3[i][j]; } void sub_m4_m4m4(float m1[][4], float m2[][4], float m3[][4]) { int i, j; - for (i=0;i<4;i++) - for (j=0;j<4;j++) - m1[i][j]= m2[i][j] - m3[i][j]; + for (i = 0; i < 4; i++) + for (j = 0; j < 4; j++) + m1[i][j] = m2[i][j] - m3[i][j]; } int invert_m3(float m[3][3]) @@ -497,7 +497,7 @@ int invert_m3(float m[3][3]) float tmp[3][3]; int success; - success= invert_m3_m3(tmp, m); + success = invert_m3_m3(tmp, m); copy_m3_m3(m, tmp); return success; @@ -509,20 +509,20 @@ int invert_m3_m3(float m1[3][3], float m2[3][3]) int a, b, success; /* calc adjoint */ - adjoint_m3_m3(m1,m2); + adjoint_m3_m3(m1, m2); /* then determinant old matrix! */ - det= m2[0][0]* (m2[1][1]*m2[2][2] - m2[1][2]*m2[2][1]) - -m2[1][0]* (m2[0][1]*m2[2][2] - m2[0][2]*m2[2][1]) - +m2[2][0]* (m2[0][1]*m2[1][2] - m2[0][2]*m2[1][1]); + det = (m2[0][0] * (m2[1][1] * m2[2][2] - m2[1][2] * m2[2][1]) - + m2[1][0] * (m2[0][1] * m2[2][2] - m2[0][2] * m2[2][1]) + + m2[2][0] * (m2[0][1] * m2[1][2] - m2[0][2] * m2[1][1])); - success= (det != 0); + success = (det != 0); - if (det==0) det=1; - det= 1/det; - for (a=0;a<3;a++) { - for (b=0;b<3;b++) { - m1[a][b]*=det; + if (det == 0) det = 1; + det = 1 / det; + for (a = 0; a < 3; a++) { + for (b = 0; b < 3; b++) { + m1[a][b] *= det; } } @@ -534,15 +534,15 @@ int invert_m4(float m[4][4]) float tmp[4][4]; int success; - success= invert_m4_m4(tmp, m); + success = invert_m4_m4(tmp, m); copy_m4_m4(m, tmp); return success; } /* - * invertmat - - * computes the inverse of mat and puts it in inverse. Returns + * invertmat - + * computes the inverse of mat and puts it in inverse. Returns * TRUE on success (i.e. can always find a pivot) and FALSE on failure. * Uses Gaussian Elimination with partial (maximal column) pivoting. * @@ -558,15 +558,15 @@ int invert_m4_m4(float inverse[4][4], float mat[4][4]) int maxj; /* Set inverse to identity */ - for (i=0; i<4; i++) - for (j=0; j<4; j++) + for (i = 0; i < 4; i++) + for (j = 0; j < 4; j++) inverse[i][j] = 0; - for (i=0; i<4; i++) + for (i = 0; i < 4; i++) inverse[i][i] = 1; /* Copy original matrix so we don't mess it up */ for (i = 0; i < 4; i++) - for (j = 0; j <4; j++) + for (j = 0; j < 4; j++) tempmat[i][j] = mat[i][j]; for (i = 0; i < 4; i++) { @@ -589,17 +589,17 @@ int invert_m4_m4(float inverse[4][4], float mat[4][4]) temp = tempmat[i][i]; if (temp == 0) - return 0; /* No non-zero pivot */ + return 0; /* No non-zero pivot */ for (k = 0; k < 4; k++) { - tempmat[i][k] = (float)(tempmat[i][k]/temp); - inverse[i][k] = (float)(inverse[i][k]/temp); + tempmat[i][k] = (float)(tempmat[i][k] / temp); + inverse[i][k] = (float)(inverse[i][k] / temp); } for (j = 0; j < 4; j++) { if (j != i) { temp = tempmat[j][i]; for (k = 0; k < 4; k++) { - tempmat[j][k] -= (float)(tempmat[i][k]*temp); - inverse[j][k] -= (float)(inverse[i][k]*temp); + tempmat[j][k] -= (float)(tempmat[i][k] * temp); + inverse[j][k] -= (float)(inverse[i][k] * temp); } } } @@ -655,8 +655,7 @@ void orthogonalize_m3(float mat[][3], int axis) float size[3]; mat3_to_size(size, mat); normalize_v3(mat[axis]); - switch(axis) - { + switch (axis) { case 0: if (dot_v3v3(mat[0], mat[1]) < 1) { cross_v3_v3v3(mat[2], mat[0], mat[1]); @@ -671,9 +670,9 @@ void orthogonalize_m3(float mat[][3], int axis) else { float vec[3]; - vec[0]= mat[0][1]; - vec[1]= mat[0][2]; - vec[2]= mat[0][0]; + vec[0] = mat[0][1]; + vec[1] = mat[0][2]; + vec[2] = mat[0][0]; cross_v3_v3v3(mat[2], mat[0], vec); normalize_v3(mat[2]); @@ -693,9 +692,9 @@ void orthogonalize_m3(float mat[][3], int axis) else { float vec[3]; - vec[0]= mat[1][1]; - vec[1]= mat[1][2]; - vec[2]= mat[1][0]; + vec[0] = mat[1][1]; + vec[1] = mat[1][2]; + vec[2] = mat[1][0]; cross_v3_v3v3(mat[0], mat[1], vec); normalize_v3(mat[0]); @@ -715,9 +714,9 @@ void orthogonalize_m3(float mat[][3], int axis) else { float vec[3]; - vec[0]= mat[2][1]; - vec[1]= mat[2][2]; - vec[2]= mat[2][0]; + vec[0] = mat[2][1]; + vec[1] = mat[2][2]; + vec[2] = mat[2][0]; cross_v3_v3v3(mat[0], vec, mat[2]); normalize_v3(mat[0]); @@ -734,8 +733,7 @@ void orthogonalize_m4(float mat[][4], int axis) float size[3]; mat4_to_size(size, mat); normalize_v3(mat[axis]); - switch(axis) - { + switch (axis) { case 0: if (dot_v3v3(mat[0], mat[1]) < 1) { cross_v3_v3v3(mat[2], mat[0], mat[1]); @@ -750,9 +748,9 @@ void orthogonalize_m4(float mat[][4], int axis) else { float vec[3]; - vec[0]= mat[0][1]; - vec[1]= mat[0][2]; - vec[2]= mat[0][0]; + vec[0] = mat[0][1]; + vec[1] = mat[0][2]; + vec[2] = mat[0][0]; cross_v3_v3v3(mat[2], mat[0], vec); normalize_v3(mat[2]); @@ -773,9 +771,9 @@ void orthogonalize_m4(float mat[][4], int axis) else { float vec[3]; - vec[0]= mat[1][1]; - vec[1]= mat[1][2]; - vec[2]= mat[1][0]; + vec[0] = mat[1][1]; + vec[1] = mat[1][2]; + vec[2] = mat[1][0]; cross_v3_v3v3(mat[0], mat[1], vec); normalize_v3(mat[0]); @@ -795,9 +793,9 @@ void orthogonalize_m4(float mat[][4], int axis) else { float vec[3]; - vec[0]= mat[2][1]; - vec[1]= mat[2][2]; - vec[2]= mat[2][0]; + vec[0] = mat[2][1]; + vec[1] = mat[2][2]; + vec[2] = mat[2][0]; cross_v3_v3v3(mat[0], vec, mat[2]); normalize_v3(mat[0]); @@ -844,121 +842,120 @@ int is_orthogonal_m4(float m[][4]) } void normalize_m3(float mat[][3]) -{ +{ normalize_v3(mat[0]); normalize_v3(mat[1]); normalize_v3(mat[2]); } void normalize_m3_m3(float rmat[][3], float mat[][3]) -{ +{ normalize_v3_v3(rmat[0], mat[0]); normalize_v3_v3(rmat[1], mat[1]); normalize_v3_v3(rmat[2], mat[2]); } - void normalize_m4(float mat[][4]) { float len; - - len= normalize_v3(mat[0]); - if (len!=0.0f) mat[0][3]/= len; - len= normalize_v3(mat[1]); - if (len!=0.0f) mat[1][3]/= len; - len= normalize_v3(mat[2]); - if (len!=0.0f) mat[2][3]/= len; + + len = normalize_v3(mat[0]); + if (len != 0.0f) mat[0][3] /= len; + len = normalize_v3(mat[1]); + if (len != 0.0f) mat[1][3] /= len; + len = normalize_v3(mat[2]); + if (len != 0.0f) mat[2][3] /= len; } void normalize_m4_m4(float rmat[][4], float mat[][4]) { float len; - - len= normalize_v3_v3(rmat[0], mat[0]); - if (len!=0.0f) rmat[0][3]= mat[0][3] / len; - len= normalize_v3_v3(rmat[1], mat[1]); - if (len!=0.0f) rmat[1][3]= mat[1][3] / len; - len= normalize_v3_v3(rmat[2], mat[2]); - if (len!=0.0f) rmat[2][3]= mat[2][3] / len; + + len = normalize_v3_v3(rmat[0], mat[0]); + if (len != 0.0f) rmat[0][3] = mat[0][3] / len; + len = normalize_v3_v3(rmat[1], mat[1]); + if (len != 0.0f) rmat[1][3] = mat[1][3] / len; + len = normalize_v3_v3(rmat[2], mat[2]); + if (len != 0.0f) rmat[2][3] = mat[2][3] / len; } void adjoint_m3_m3(float m1[][3], float m[][3]) { - m1[0][0]=m[1][1]*m[2][2]-m[1][2]*m[2][1]; - m1[0][1]= -m[0][1]*m[2][2]+m[0][2]*m[2][1]; - m1[0][2]=m[0][1]*m[1][2]-m[0][2]*m[1][1]; + m1[0][0] = m[1][1] * m[2][2] - m[1][2] * m[2][1]; + m1[0][1] = -m[0][1] * m[2][2] + m[0][2] * m[2][1]; + m1[0][2] = m[0][1] * m[1][2] - m[0][2] * m[1][1]; - m1[1][0]= -m[1][0]*m[2][2]+m[1][2]*m[2][0]; - m1[1][1]=m[0][0]*m[2][2]-m[0][2]*m[2][0]; - m1[1][2]= -m[0][0]*m[1][2]+m[0][2]*m[1][0]; + m1[1][0] = -m[1][0] * m[2][2] + m[1][2] * m[2][0]; + m1[1][1] = m[0][0] * m[2][2] - m[0][2] * m[2][0]; + m1[1][2] = -m[0][0] * m[1][2] + m[0][2] * m[1][0]; - m1[2][0]=m[1][0]*m[2][1]-m[1][1]*m[2][0]; - m1[2][1]= -m[0][0]*m[2][1]+m[0][1]*m[2][0]; - m1[2][2]=m[0][0]*m[1][1]-m[0][1]*m[1][0]; + m1[2][0] = m[1][0] * m[2][1] - m[1][1] * m[2][0]; + m1[2][1] = -m[0][0] * m[2][1] + m[0][1] * m[2][0]; + m1[2][2] = m[0][0] * m[1][1] - m[0][1] * m[1][0]; } -void adjoint_m4_m4(float out[][4], float in[][4]) /* out = ADJ(in) */ +void adjoint_m4_m4(float out[][4], float in[][4]) /* out = ADJ(in) */ { float a1, a2, a3, a4, b1, b2, b3, b4; float c1, c2, c3, c4, d1, d2, d3, d4; - a1= in[0][0]; - b1= in[0][1]; - c1= in[0][2]; - d1= in[0][3]; + a1 = in[0][0]; + b1 = in[0][1]; + c1 = in[0][2]; + d1 = in[0][3]; - a2= in[1][0]; - b2= in[1][1]; - c2= in[1][2]; - d2= in[1][3]; + a2 = in[1][0]; + b2 = in[1][1]; + c2 = in[1][2]; + d2 = in[1][3]; - a3= in[2][0]; - b3= in[2][1]; - c3= in[2][2]; - d3= in[2][3]; + a3 = in[2][0]; + b3 = in[2][1]; + c3 = in[2][2]; + d3 = in[2][3]; - a4= in[3][0]; - b4= in[3][1]; - c4= in[3][2]; - d4= in[3][3]; + a4 = in[3][0]; + b4 = in[3][1]; + c4 = in[3][2]; + d4 = in[3][3]; - out[0][0] = determinant_m3(b2, b3, b4, c2, c3, c4, d2, d3, d4); - out[1][0] = - determinant_m3(a2, a3, a4, c2, c3, c4, d2, d3, d4); - out[2][0] = determinant_m3(a2, a3, a4, b2, b3, b4, d2, d3, d4); - out[3][0] = - determinant_m3(a2, a3, a4, b2, b3, b4, c2, c3, c4); + out[0][0] = determinant_m3(b2, b3, b4, c2, c3, c4, d2, d3, d4); + out[1][0] = -determinant_m3(a2, a3, a4, c2, c3, c4, d2, d3, d4); + out[2][0] = determinant_m3(a2, a3, a4, b2, b3, b4, d2, d3, d4); + out[3][0] = -determinant_m3(a2, a3, a4, b2, b3, b4, c2, c3, c4); - out[0][1] = - determinant_m3(b1, b3, b4, c1, c3, c4, d1, d3, d4); - out[1][1] = determinant_m3(a1, a3, a4, c1, c3, c4, d1, d3, d4); - out[2][1] = - determinant_m3(a1, a3, a4, b1, b3, b4, d1, d3, d4); - out[3][1] = determinant_m3(a1, a3, a4, b1, b3, b4, c1, c3, c4); + out[0][1] = -determinant_m3(b1, b3, b4, c1, c3, c4, d1, d3, d4); + out[1][1] = determinant_m3(a1, a3, a4, c1, c3, c4, d1, d3, d4); + out[2][1] = -determinant_m3(a1, a3, a4, b1, b3, b4, d1, d3, d4); + out[3][1] = determinant_m3(a1, a3, a4, b1, b3, b4, c1, c3, c4); - out[0][2] = determinant_m3(b1, b2, b4, c1, c2, c4, d1, d2, d4); - out[1][2] = - determinant_m3(a1, a2, a4, c1, c2, c4, d1, d2, d4); - out[2][2] = determinant_m3(a1, a2, a4, b1, b2, b4, d1, d2, d4); - out[3][2] = - determinant_m3(a1, a2, a4, b1, b2, b4, c1, c2, c4); + out[0][2] = determinant_m3(b1, b2, b4, c1, c2, c4, d1, d2, d4); + out[1][2] = -determinant_m3(a1, a2, a4, c1, c2, c4, d1, d2, d4); + out[2][2] = determinant_m3(a1, a2, a4, b1, b2, b4, d1, d2, d4); + out[3][2] = -determinant_m3(a1, a2, a4, b1, b2, b4, c1, c2, c4); - out[0][3] = - determinant_m3(b1, b2, b3, c1, c2, c3, d1, d2, d3); - out[1][3] = determinant_m3(a1, a2, a3, c1, c2, c3, d1, d2, d3); - out[2][3] = - determinant_m3(a1, a2, a3, b1, b2, b3, d1, d2, d3); - out[3][3] = determinant_m3(a1, a2, a3, b1, b2, b3, c1, c2, c3); + out[0][3] = -determinant_m3(b1, b2, b3, c1, c2, c3, d1, d2, d3); + out[1][3] = determinant_m3(a1, a2, a3, c1, c2, c3, d1, d2, d3); + out[2][3] = -determinant_m3(a1, a2, a3, b1, b2, b3, d1, d2, d3); + out[3][3] = determinant_m3(a1, a2, a3, b1, b2, b3, c1, c2, c3); } -float determinant_m2(float a,float b,float c,float d) +float determinant_m2(float a, float b, float c, float d) { - return a*d - b*c; + return a * d - b * c; } float determinant_m3(float a1, float a2, float a3, - float b1, float b2, float b3, - float c1, float c2, float c3) + float b1, float b2, float b3, + float c1, float c2, float c3) { float ans; - ans = a1 * determinant_m2(b2, b3, c2, c3) - - b1 * determinant_m2(a2, a3, c2, c3) - + c1 * determinant_m2(a2, a3, b2, b3); + ans = (a1 * determinant_m2(b2, b3, c2, c3) - + b1 * determinant_m2(a2, a3, c2, c3) + + c1 * determinant_m2(a2, a3, b2, b3)); return ans; } @@ -966,32 +963,32 @@ float determinant_m3(float a1, float a2, float a3, float determinant_m4(float m[][4]) { float ans; - float a1,a2,a3,a4,b1,b2,b3,b4,c1,c2,c3,c4,d1,d2,d3,d4; + float a1, a2, a3, a4, b1, b2, b3, b4, c1, c2, c3, c4, d1, d2, d3, d4; - a1= m[0][0]; - b1= m[0][1]; - c1= m[0][2]; - d1= m[0][3]; + a1 = m[0][0]; + b1 = m[0][1]; + c1 = m[0][2]; + d1 = m[0][3]; - a2= m[1][0]; - b2= m[1][1]; - c2= m[1][2]; - d2= m[1][3]; + a2 = m[1][0]; + b2 = m[1][1]; + c2 = m[1][2]; + d2 = m[1][3]; - a3= m[2][0]; - b3= m[2][1]; - c3= m[2][2]; - d3= m[2][3]; + a3 = m[2][0]; + b3 = m[2][1]; + c3 = m[2][2]; + d3 = m[2][3]; - a4= m[3][0]; - b4= m[3][1]; - c4= m[3][2]; - d4= m[3][3]; + a4 = m[3][0]; + b4 = m[3][1]; + c4 = m[3][2]; + d4 = m[3][3]; - ans = a1 * determinant_m3(b2, b3, b4, c2, c3, c4, d2, d3, d4) - - b1 * determinant_m3(a2, a3, a4, c2, c3, c4, d2, d3, d4) - + c1 * determinant_m3(a2, a3, a4, b2, b3, b4, d2, d3, d4) - - d1 * determinant_m3(a2, a3, a4, b2, b3, b4, c2, c3, c4); + ans = (a1 * determinant_m3(b2, b3, b4, c2, c3, c4, d2, d3, d4) - + b1 * determinant_m3(a2, a3, a4, c2, c3, c4, d2, d3, d4) + + c1 * determinant_m3(a2, a3, a4, b2, b3, b4, d2, d3, d4) - + d1 * determinant_m3(a2, a3, a4, b2, b3, b4, c2, c3, c4)); return ans; } @@ -1000,38 +997,38 @@ float determinant_m4(float m[][4]) void size_to_mat3(float mat[][3], const float size[3]) { - mat[0][0]= size[0]; - mat[0][1]= 0.0f; - mat[0][2]= 0.0f; - mat[1][1]= size[1]; - mat[1][0]= 0.0f; - mat[1][2]= 0.0f; - mat[2][2]= size[2]; - mat[2][1]= 0.0f; - mat[2][0]= 0.0f; + mat[0][0] = size[0]; + mat[0][1] = 0.0f; + mat[0][2] = 0.0f; + mat[1][1] = size[1]; + mat[1][0] = 0.0f; + mat[1][2] = 0.0f; + mat[2][2] = size[2]; + mat[2][1] = 0.0f; + mat[2][0] = 0.0f; } void size_to_mat4(float mat[][4], const float size[3]) { float tmat[3][3]; - - size_to_mat3(tmat,size); + + size_to_mat3(tmat, size); unit_m4(mat); copy_m4_m3(mat, tmat); } void mat3_to_size(float size[3], float mat[][3]) { - size[0]= len_v3(mat[0]); - size[1]= len_v3(mat[1]); - size[2]= len_v3(mat[2]); + size[0] = len_v3(mat[0]); + size[1] = len_v3(mat[1]); + size[2] = len_v3(mat[2]); } void mat4_to_size(float size[3], float mat[][4]) { - size[0]= len_v3(mat[0]); - size[1]= len_v3(mat[1]); - size[2]= len_v3(mat[2]); + size[0] = len_v3(mat[0]); + size[1] = len_v3(mat[1]); + size[2] = len_v3(mat[2]); } /* this gets the average scale of a matrix, only use when your scaling @@ -1052,10 +1049,9 @@ float mat4_to_scale(float mat[][4]) return mat3_to_scale(tmat); } - void mat3_to_rot_size(float rot[3][3], float size[3], float mat3[3][3]) { - float mat3_n[3][3]; /* mat3 -> normalized, 3x3 */ + float mat3_n[3][3]; /* mat3 -> normalized, 3x3 */ float imat3_n[3][3]; /* mat3 -> normalized & inverted, 3x3 */ /* rotation & scale are linked, we need to create the mat's @@ -1079,14 +1075,14 @@ void mat3_to_rot_size(float rot[3][3], float size[3], float mat3[3][3]) invert_m3_m3(imat3_n, mat3_n); mul_m3_m3m3(mat3, imat3_n, mat3); - size[0]= mat3[0][0]; - size[1]= mat3[1][1]; - size[2]= mat3[2][2]; + size[0] = mat3[0][0]; + size[1] = mat3[1][1]; + size[2] = mat3[2][2]; } void mat4_to_loc_rot_size(float loc[3], float rot[3][3], float size[3], float wmat[][4]) { - float mat3[3][3]; /* wmat -> 3x3 */ + float mat3[3][3]; /* wmat -> 3x3 */ copy_m3_m4(mat3, wmat); mat3_to_rot_size(rot, size, mat3); @@ -1097,33 +1093,33 @@ void mat4_to_loc_rot_size(float loc[3], float rot[3][3], float size[3], float wm void scale_m3_fl(float m[][3], float scale) { - m[0][0]= m[1][1]= m[2][2]= scale; - m[0][1]= m[0][2]= 0.0; - m[1][0]= m[1][2]= 0.0; - m[2][0]= m[2][1]= 0.0; + m[0][0] = m[1][1] = m[2][2] = scale; + m[0][1] = m[0][2] = 0.0; + m[1][0] = m[1][2] = 0.0; + m[2][0] = m[2][1] = 0.0; } void scale_m4_fl(float m[][4], float scale) { - m[0][0]= m[1][1]= m[2][2]= scale; - m[3][3]= 1.0; - m[0][1]= m[0][2]= m[0][3]= 0.0; - m[1][0]= m[1][2]= m[1][3]= 0.0; - m[2][0]= m[2][1]= m[2][3]= 0.0; - m[3][0]= m[3][1]= m[3][2]= 0.0; + m[0][0] = m[1][1] = m[2][2] = scale; + m[3][3] = 1.0; + m[0][1] = m[0][2] = m[0][3] = 0.0; + m[1][0] = m[1][2] = m[1][3] = 0.0; + m[2][0] = m[2][1] = m[2][3] = 0.0; + m[3][0] = m[3][1] = m[3][2] = 0.0; } -void translate_m4(float mat[][4],float Tx, float Ty, float Tz) +void translate_m4(float mat[][4], float Tx, float Ty, float Tz) { - mat[3][0] += (Tx*mat[0][0] + Ty*mat[1][0] + Tz*mat[2][0]); - mat[3][1] += (Tx*mat[0][1] + Ty*mat[1][1] + Tz*mat[2][1]); - mat[3][2] += (Tx*mat[0][2] + Ty*mat[1][2] + Tz*mat[2][2]); + mat[3][0] += (Tx * mat[0][0] + Ty * mat[1][0] + Tz * mat[2][0]); + mat[3][1] += (Tx * mat[0][1] + Ty * mat[1][1] + Tz * mat[2][1]); + mat[3][2] += (Tx * mat[0][2] + Ty * mat[1][2] + Tz * mat[2][2]); } void rotate_m4(float mat[][4], const char axis, const float angle) { int col; - float temp[4]= {0.0f, 0.0f, 0.0f, 0.0f}; + float temp[4] = {0.0f, 0.0f, 0.0f, 0.0f}; float cosine, sine; assert(axis >= 'X' && axis <= 'Z'); @@ -1131,32 +1127,32 @@ void rotate_m4(float mat[][4], const char axis, const float angle) cosine = (float)cos(angle); sine = (float)sin(angle); switch (axis) { - case 'X': - for (col=0 ; col<4 ; col++) - temp[col] = cosine*mat[1][col] + sine*mat[2][col]; - for (col=0 ; col<4 ; col++) { - mat[2][col] = - sine*mat[1][col] + cosine*mat[2][col]; - mat[1][col] = temp[col]; - } - break; - - case 'Y': - for (col=0 ; col<4 ; col++) - temp[col] = cosine*mat[0][col] - sine*mat[2][col]; - for (col=0 ; col<4 ; col++) { - mat[2][col] = sine*mat[0][col] + cosine*mat[2][col]; - mat[0][col] = temp[col]; - } - break; - - case 'Z': - for (col=0 ; col<4 ; col++) - temp[col] = cosine*mat[0][col] + sine*mat[1][col]; - for (col=0 ; col<4 ; col++) { - mat[1][col] = - sine*mat[0][col] + cosine*mat[1][col]; - mat[0][col] = temp[col]; - } - break; + case 'X': + for (col = 0; col < 4; col++) + temp[col] = cosine * mat[1][col] + sine * mat[2][col]; + for (col = 0; col < 4; col++) { + mat[2][col] = -sine * mat[1][col] + cosine * mat[2][col]; + mat[1][col] = temp[col]; + } + break; + + case 'Y': + for (col = 0; col < 4; col++) + temp[col] = cosine * mat[0][col] - sine * mat[2][col]; + for (col = 0; col < 4; col++) { + mat[2][col] = sine * mat[0][col] + cosine * mat[2][col]; + mat[0][col] = temp[col]; + } + break; + + case 'Z': + for (col = 0; col < 4; col++) + temp[col] = cosine * mat[0][col] + sine * mat[1][col]; + for (col = 0; col < 4; col++) { + mat[1][col] = -sine * mat[0][col] + cosine * mat[1][col]; + mat[0][col] = temp[col]; + } + break; } } @@ -1166,7 +1162,7 @@ void blend_m3_m3m3(float out[][3], float dst[][3], float src[][3], const float s float squat[4], dquat[4], fquat[4]; float sscale[3], dscale[3], fsize[3]; float rmat[3][3], smat[3][3]; - + mat3_to_rot_size(drot, dscale, dst); mat3_to_rot_size(srot, sscale, src); @@ -1178,8 +1174,8 @@ void blend_m3_m3m3(float out[][3], float dst[][3], float src[][3], const float s interp_v3_v3v3(fsize, dscale, sscale, srcweight); /* compose new matrix */ - quat_to_mat3(rmat,fquat); - size_to_mat3(smat,fsize); + quat_to_mat3(rmat, fquat); + size_to_mat3(smat, fsize); mul_m3_m3m3(out, rmat, smat); } @@ -1205,7 +1201,6 @@ void blend_m4_m4m4(float out[][4], float dst[][4], float src[][4], const float s loc_quat_size_to_mat4(out, floc, fquat, fsize); } - int is_negative_m3(float mat[][3]) { float vec[3]; @@ -1223,21 +1218,22 @@ int is_negative_m4(float mat[][4]) /* make a 4x4 matrix out of 3 transform components */ /* matrices are made in the order: scale * rot * loc */ // TODO: need to have a version that allows for rotation order... + void loc_eul_size_to_mat4(float mat[4][4], const float loc[3], const float eul[3], const float size[3]) { float rmat[3][3], smat[3][3], tmat[3][3]; - + /* initialize new matrix */ unit_m4(mat); - + /* make rotation + scaling part */ - eul_to_mat3(rmat,eul); - size_to_mat3(smat,size); + eul_to_mat3(rmat, eul); + size_to_mat3(smat, size); mul_m3_m3m3(tmat, rmat, smat); - + /* copy rot/scale part to output matrix*/ copy_m4_m3(mat, tmat); - + /* copy location to matrix */ mat[3][0] = loc[0]; mat[3][1] = loc[1]; @@ -1245,22 +1241,23 @@ void loc_eul_size_to_mat4(float mat[4][4], const float loc[3], const float eul[3 } /* make a 4x4 matrix out of 3 transform components */ + /* matrices are made in the order: scale * rot * loc */ void loc_eulO_size_to_mat4(float mat[4][4], const float loc[3], const float eul[3], const float size[3], const short rotOrder) { float rmat[3][3], smat[3][3], tmat[3][3]; - + /* initialize new matrix */ unit_m4(mat); - + /* make rotation + scaling part */ - eulO_to_mat3(rmat,eul, rotOrder); - size_to_mat3(smat,size); + eulO_to_mat3(rmat, eul, rotOrder); + size_to_mat3(smat, size); mul_m3_m3m3(tmat, rmat, smat); - + /* copy rot/scale part to output matrix*/ copy_m4_m3(mat, tmat); - + /* copy location to matrix */ mat[3][0] = loc[0]; mat[3][1] = loc[1]; @@ -1269,22 +1266,23 @@ void loc_eulO_size_to_mat4(float mat[4][4], const float loc[3], const float eul[ /* make a 4x4 matrix out of 3 transform components */ + /* matrices are made in the order: scale * rot * loc */ void loc_quat_size_to_mat4(float mat[4][4], const float loc[3], const float quat[4], const float size[3]) { float rmat[3][3], smat[3][3], tmat[3][3]; - + /* initialize new matrix */ unit_m4(mat); - + /* make rotation + scaling part */ - quat_to_mat3(rmat,quat); - size_to_mat3(smat,size); + quat_to_mat3(rmat, quat); + size_to_mat3(smat, size); mul_m3_m3m3(tmat, rmat, smat); - + /* copy rot/scale part to output matrix*/ copy_m4_m3(mat, tmat); - + /* copy location to matrix */ mat[3][0] = loc[0]; mat[3][1] = loc[1]; @@ -1303,19 +1301,19 @@ void loc_axisangle_size_to_mat4(float mat[4][4], const float loc[3], const float void print_m3(const char *str, float m[][3]) { printf("%s\n", str); - printf("%f %f %f\n",m[0][0],m[1][0],m[2][0]); - printf("%f %f %f\n",m[0][1],m[1][1],m[2][1]); - printf("%f %f %f\n",m[0][2],m[1][2],m[2][2]); + printf("%f %f %f\n", m[0][0], m[1][0], m[2][0]); + printf("%f %f %f\n", m[0][1], m[1][1], m[2][1]); + printf("%f %f %f\n", m[0][2], m[1][2], m[2][2]); printf("\n"); } void print_m4(const char *str, float m[][4]) { printf("%s\n", str); - printf("%f %f %f %f\n",m[0][0],m[1][0],m[2][0],m[3][0]); - printf("%f %f %f %f\n",m[0][1],m[1][1],m[2][1],m[3][1]); - printf("%f %f %f %f\n",m[0][2],m[1][2],m[2][2],m[3][2]); - printf("%f %f %f %f\n",m[0][3],m[1][3],m[2][3],m[3][3]); + printf("%f %f %f %f\n", m[0][0], m[1][0], m[2][0], m[3][0]); + printf("%f %f %f %f\n", m[0][1], m[1][1], m[2][1], m[3][1]); + printf("%f %f %f %f\n", m[0][2], m[1][2], m[2][2], m[3][2]); + printf("%f %f %f %f\n", m[0][3], m[1][3], m[2][3], m[3][3]); printf("\n"); } @@ -1323,9 +1321,9 @@ void print_m4(const char *str, float m[][4]) * from TNT matrix library * * Compute the Single Value Decomposition of an arbitrary matrix A - * That is compute the 3 matrices U,W,V with U column orthogonal (m,n) - * ,W a diagonal matrix and V an orthogonal square matrix s.t. - * A = U.W.Vt. From this decomposition it is trivial to compute the + * That is compute the 3 matrices U,W,V with U column orthogonal (m,n) + * ,W a diagonal matrix and V an orthogonal square matrix s.t. + * A = U.W.Vt. From this decomposition it is trivial to compute the * (pseudo-inverse) of A as Ainv = V.Winv.tranpose(U). */ @@ -1336,25 +1334,25 @@ void svd_m4(float U[4][4], float s[4], float V[4][4], float A_[4][4]) int m = 4; int n = 4; int maxiter = 200; - int nu = minf(m,n); + int nu = minf(m, n); float *work = work1; float *e = work2; float eps; - int i=0, j=0, k=0, p, pp, iter; + int i = 0, j = 0, k = 0, p, pp, iter; // Reduce A to bidiagonal form, storing the diagonal elements // in s and the super-diagonal elements in e. - int nct = minf(m-1,n); - int nrt = maxf(0,minf(n-2,m)); + int nct = minf(m - 1, n); + int nrt = maxf(0, minf(n - 2, m)); copy_m4_m4(A, A_); zero_m4(U); zero_v4(s); - for (k = 0; k < maxf(nct,nrt); k++) { + for (k = 0; k < maxf(nct, nrt); k++) { if (k < nct) { // Compute the transformation for the k-th column and @@ -1362,14 +1360,14 @@ void svd_m4(float U[4][4], float s[4], float V[4][4], float A_[4][4]) // Compute 2-norm of k-th column without under/overflow. s[k] = 0; for (i = k; i < m; i++) { - s[k] = hypotf(s[k],A[i][k]); + s[k] = hypotf(s[k], A[i][k]); } if (s[k] != 0.0f) { float invsk; if (A[k][k] < 0.0f) { s[k] = -s[k]; } - invsk = 1.0f/s[k]; + invsk = 1.0f / s[k]; for (i = k; i < m; i++) { A[i][k] *= invsk; } @@ -1377,18 +1375,18 @@ void svd_m4(float U[4][4], float s[4], float V[4][4], float A_[4][4]) } s[k] = -s[k]; } - for (j = k+1; j < n; j++) { + for (j = k + 1; j < n; j++) { if ((k < nct) && (s[k] != 0.0f)) { - // Apply the transformation. + // Apply the transformation. float t = 0; for (i = k; i < m; i++) { - t += A[i][k]*A[i][j]; + t += A[i][k] * A[i][j]; } - t = -t/A[k][k]; + t = -t / A[k][k]; for (i = k; i < m; i++) { - A[i][j] += t*A[i][k]; + A[i][j] += t * A[i][k]; } } @@ -1411,39 +1409,39 @@ void svd_m4(float U[4][4], float s[4], float V[4][4], float A_[4][4]) // k-th super-diagonal in e[k]. // Compute 2-norm without under/overflow. e[k] = 0; - for (i = k+1; i < n; i++) { - e[k] = hypotf(e[k],e[i]); + for (i = k + 1; i < n; i++) { + e[k] = hypotf(e[k], e[i]); } if (e[k] != 0.0f) { float invek; - if (e[k+1] < 0.0f) { + if (e[k + 1] < 0.0f) { e[k] = -e[k]; } - invek = 1.0f/e[k]; - for (i = k+1; i < n; i++) { + invek = 1.0f / e[k]; + for (i = k + 1; i < n; i++) { e[i] *= invek; } - e[k+1] += 1.0f; + e[k + 1] += 1.0f; } e[k] = -e[k]; - if ((k+1 < m) & (e[k] != 0.0f)) { + if ((k + 1 < m) & (e[k] != 0.0f)) { float invek1; - // Apply the transformation. + // Apply the transformation. - for (i = k+1; i < m; i++) { + for (i = k + 1; i < m; i++) { work[i] = 0.0f; } - for (j = k+1; j < n; j++) { - for (i = k+1; i < m; i++) { - work[i] += e[j]*A[i][j]; + for (j = k + 1; j < n; j++) { + for (i = k + 1; i < m; i++) { + work[i] += e[j] * A[i][j]; } } - invek1 = 1.0f/e[k+1]; - for (j = k+1; j < n; j++) { - float t = -e[j]*invek1; - for (i = k+1; i < m; i++) { - A[i][j] += t*work[i]; + invek1 = 1.0f / e[k + 1]; + for (j = k + 1; j < n; j++) { + float t = -e[j] * invek1; + for (i = k + 1; i < m; i++) { + A[i][j] += t * work[i]; } } } @@ -1451,24 +1449,24 @@ void svd_m4(float U[4][4], float s[4], float V[4][4], float A_[4][4]) // Place the transformation in V for subsequent // back multiplication. - for (i = k+1; i < n; i++) + for (i = k + 1; i < n; i++) V[i][k] = e[i]; } } // Set up the final bidiagonal matrix or order p. - p = minf(n,m+1); + p = minf(n, m + 1); if (nct < n) { s[nct] = A[nct][nct]; } if (m < p) { - s[p-1] = 0.0f; + s[p - 1] = 0.0f; } - if (nrt+1 < p) { - e[nrt] = A[nrt][p-1]; + if (nrt + 1 < p) { + e[nrt] = A[nrt][p - 1]; } - e[p-1] = 0.0f; + e[p - 1] = 0.0f; // If required, generate U. @@ -1478,23 +1476,23 @@ void svd_m4(float U[4][4], float s[4], float V[4][4], float A_[4][4]) } U[j][j] = 1.0f; } - for (k = nct-1; k >= 0; k--) { + for (k = nct - 1; k >= 0; k--) { if (s[k] != 0.0f) { - for (j = k+1; j < nu; j++) { + for (j = k + 1; j < nu; j++) { float t = 0; for (i = k; i < m; i++) { - t += U[i][k]*U[i][j]; + t += U[i][k] * U[i][j]; } - t = -t/U[k][k]; + t = -t / U[k][k]; for (i = k; i < m; i++) { - U[i][j] += t*U[i][k]; + U[i][j] += t * U[i][k]; } } - for (i = k; i < m; i++ ) { + for (i = k; i < m; i++) { U[i][k] = -U[i][k]; } U[k][k] = 1.0f + U[k][k]; - for (i = 0; i < k-1; i++) { + for (i = 0; i < k - 1; i++) { U[i][k] = 0.0f; } } @@ -1508,16 +1506,16 @@ void svd_m4(float U[4][4], float s[4], float V[4][4], float A_[4][4]) // If required, generate V. - for (k = n-1; k >= 0; k--) { + for (k = n - 1; k >= 0; k--) { if ((k < nrt) & (e[k] != 0.0f)) { - for (j = k+1; j < nu; j++) { + for (j = k + 1; j < nu; j++) { float t = 0; - for (i = k+1; i < n; i++) { - t += V[i][k]*V[i][j]; + for (i = k + 1; i < n; i++) { + t += V[i][k] * V[i][j]; } - t = -t/V[k+1][k]; - for (i = k+1; i < n; i++) { - V[i][j] += t*V[i][k]; + t = -t / V[k + 1][k]; + for (i = k + 1; i < n; i++) { + V[i][j] += t * V[i][k]; } } } @@ -1529,11 +1527,11 @@ void svd_m4(float U[4][4], float s[4], float V[4][4], float A_[4][4]) // Main iteration loop for the singular values. - pp = p-1; + pp = p - 1; iter = 0; - eps = powf(2.0f,-52.0f); + eps = powf(2.0f, -52.0f); while (p > 0) { - int kase=0; + int kase = 0; // Test for maximum iterations to avoid infinite loop if (maxiter == 0) @@ -1544,34 +1542,34 @@ void svd_m4(float U[4][4], float s[4], float V[4][4], float A_[4][4]) // negligible elements in the s and e arrays. On // completion the variables kase and k are set as follows. - // kase = 1 if s(p) and e[k-1] are negligible and k

= -1; k--) { + for (k = p - 2; k >= -1; k--) { if (k == -1) { break; } - if (fabsf(e[k]) <= eps*(fabsf(s[k]) + fabsf(s[k+1]))) { + if (fabsf(e[k]) <= eps * (fabsf(s[k]) + fabsf(s[k + 1]))) { e[k] = 0.0f; break; } } - if (k == p-2) { + if (k == p - 2) { kase = 4; } else { int ks; - for (ks = p-1; ks >= k; ks--) { + for (ks = p - 1; ks >= k; ks--) { float t; if (ks == k) { break; } - t = (ks != p ? fabsf(e[ks]) : 0.f) + - (ks != k+1 ? fabsf(e[ks-1]) : 0.0f); - if (fabsf(s[ks]) <= eps*t) { + t = (ks != p ? fabsf(e[ks]) : 0.f) + + (ks != k + 1 ? fabsf(e[ks - 1]) : 0.0f); + if (fabsf(s[ks]) <= eps * t) { s[ks] = 0.0f; break; } @@ -1579,7 +1577,7 @@ void svd_m4(float U[4][4], float s[4], float V[4][4], float A_[4][4]) if (ks == k) { kase = 3; } - else if (ks == p-1) { + else if (ks == p - 1) { kase = 1; } else { @@ -1595,127 +1593,130 @@ void svd_m4(float U[4][4], float s[4], float V[4][4], float A_[4][4]) // Deflate negligible s(p). - case 1: { - float f = e[p-2]; - e[p-2] = 0.0f; - for (j = p-2; j >= k; j--) { - float t = hypotf(s[j],f); - float invt = 1.0f/t; - float cs = s[j]*invt; - float sn = f*invt; + case 1: + { + float f = e[p - 2]; + e[p - 2] = 0.0f; + for (j = p - 2; j >= k; j--) { + float t = hypotf(s[j], f); + float invt = 1.0f / t; + float cs = s[j] * invt; + float sn = f * invt; s[j] = t; if (j != k) { - f = -sn*e[j-1]; - e[j-1] = cs*e[j-1]; + f = -sn * e[j - 1]; + e[j - 1] = cs * e[j - 1]; } for (i = 0; i < n; i++) { - t = cs*V[i][j] + sn*V[i][p-1]; - V[i][p-1] = -sn*V[i][j] + cs*V[i][p-1]; + t = cs * V[i][j] + sn * V[i][p - 1]; + V[i][p - 1] = -sn * V[i][j] + cs * V[i][p - 1]; V[i][j] = t; } } + break; } - break; - // Split at negligible s(k). + // Split at negligible s(k). - case 2: { - float f = e[k-1]; - e[k-1] = 0.0f; + case 2: + { + float f = e[k - 1]; + e[k - 1] = 0.0f; for (j = k; j < p; j++) { - float t = hypotf(s[j],f); - float invt = 1.0f/t; - float cs = s[j]*invt; - float sn = f*invt; + float t = hypotf(s[j], f); + float invt = 1.0f / t; + float cs = s[j] * invt; + float sn = f * invt; s[j] = t; - f = -sn*e[j]; - e[j] = cs*e[j]; + f = -sn * e[j]; + e[j] = cs * e[j]; for (i = 0; i < m; i++) { - t = cs*U[i][j] + sn*U[i][k-1]; - U[i][k-1] = -sn*U[i][j] + cs*U[i][k-1]; + t = cs * U[i][j] + sn * U[i][k - 1]; + U[i][k - 1] = -sn * U[i][j] + cs * U[i][k - 1]; U[i][j] = t; } } + break; } - break; - // Perform one qr step. + // Perform one qr step. - case 3: { + case 3: + { // Calculate the shift. float scale = maxf(maxf(maxf(maxf( - fabsf(s[p-1]),fabsf(s[p-2])),fabsf(e[p-2])), - fabsf(s[k])),fabsf(e[k])); - float invscale = 1.0f/scale; - float sp = s[p-1]*invscale; - float spm1 = s[p-2]*invscale; - float epm1 = e[p-2]*invscale; - float sk = s[k]*invscale; - float ek = e[k]*invscale; - float b = ((spm1 + sp)*(spm1 - sp) + epm1*epm1)*0.5f; - float c = (sp*epm1)*(sp*epm1); + fabsf(s[p - 1]),fabsf(s[p - 2])),fabsf(e[p - 2])), + fabsf(s[k])),fabsf(e[k])); + float invscale = 1.0f / scale; + float sp = s[p - 1] * invscale; + float spm1 = s[p - 2] * invscale; + float epm1 = e[p - 2] * invscale; + float sk = s[k] * invscale; + float ek = e[k] * invscale; + float b = ((spm1 + sp) * (spm1 - sp) + epm1 * epm1) * 0.5f; + float c = (sp * epm1) * (sp * epm1); float shift = 0.0f; float f, g; if ((b != 0.0f) || (c != 0.0f)) { - shift = sqrtf(b*b + c); + shift = sqrtf(b * b + c); if (b < 0.0f) { shift = -shift; } - shift = c/(b + shift); + shift = c / (b + shift); } - f = (sk + sp)*(sk - sp) + shift; - g = sk*ek; + f = (sk + sp) * (sk - sp) + shift; + g = sk * ek; // Chase zeros. - for (j = k; j < p-1; j++) { - float t = hypotf(f,g); + for (j = k; j < p - 1; j++) { + float t = hypotf(f, g); /* division by zero checks added to avoid NaN (brecht) */ - float cs = (t == 0.0f)? 0.0f: f/t; - float sn = (t == 0.0f)? 0.0f: g/t; + float cs = (t == 0.0f) ? 0.0f : f / t; + float sn = (t == 0.0f) ? 0.0f : g / t; if (j != k) { - e[j-1] = t; + e[j - 1] = t; } - f = cs*s[j] + sn*e[j]; - e[j] = cs*e[j] - sn*s[j]; - g = sn*s[j+1]; - s[j+1] = cs*s[j+1]; + f = cs * s[j] + sn * e[j]; + e[j] = cs * e[j] - sn * s[j]; + g = sn * s[j + 1]; + s[j + 1] = cs * s[j + 1]; for (i = 0; i < n; i++) { - t = cs*V[i][j] + sn*V[i][j+1]; - V[i][j+1] = -sn*V[i][j] + cs*V[i][j+1]; + t = cs * V[i][j] + sn * V[i][j + 1]; + V[i][j + 1] = -sn * V[i][j] + cs * V[i][j + 1]; V[i][j] = t; } - t = hypotf(f,g); + t = hypotf(f, g); /* division by zero checks added to avoid NaN (brecht) */ - cs = (t == 0.0f)? 0.0f: f/t; - sn = (t == 0.0f)? 0.0f: g/t; + cs = (t == 0.0f) ? 0.0f : f / t; + sn = (t == 0.0f) ? 0.0f : g / t; s[j] = t; - f = cs*e[j] + sn*s[j+1]; - s[j+1] = -sn*e[j] + cs*s[j+1]; - g = sn*e[j+1]; - e[j+1] = cs*e[j+1]; - if (j < m-1) { + f = cs * e[j] + sn * s[j + 1]; + s[j + 1] = -sn * e[j] + cs * s[j + 1]; + g = sn * e[j + 1]; + e[j + 1] = cs * e[j + 1]; + if (j < m - 1) { for (i = 0; i < m; i++) { - t = cs*U[i][j] + sn*U[i][j+1]; - U[i][j+1] = -sn*U[i][j] + cs*U[i][j+1]; + t = cs * U[i][j] + sn * U[i][j + 1]; + U[i][j + 1] = -sn * U[i][j] + cs * U[i][j + 1]; U[i][j] = t; } } } - e[p-2] = f; + e[p - 2] = f; iter = iter + 1; + break; } - break; - - // Convergence. + // Convergence. - case 4: { + case 4: + { // Make the singular values positive. @@ -1730,28 +1731,32 @@ void svd_m4(float U[4][4], float s[4], float V[4][4], float A_[4][4]) while (k < pp) { float t; - if (s[k] >= s[k+1]) { + if (s[k] >= s[k + 1]) { break; } t = s[k]; - s[k] = s[k+1]; - s[k+1] = t; - if (k < n-1) { + s[k] = s[k + 1]; + s[k + 1] = t; + if (k < n - 1) { for (i = 0; i < n; i++) { - t = V[i][k+1]; V[i][k+1] = V[i][k]; V[i][k] = t; + t = V[i][k + 1]; + V[i][k + 1] = V[i][k]; + V[i][k] = t; } } - if (k < m-1) { + if (k < m - 1) { for (i = 0; i < m; i++) { - t = U[i][k+1]; U[i][k+1] = U[i][k]; U[i][k] = t; + t = U[i][k + 1]; + U[i][k + 1] = U[i][k]; + U[i][k] = t; } } k++; } iter = 0; p--; + break; } - break; } } } @@ -1769,8 +1774,8 @@ void pseudoinverse_m4_m4(float Ainv[4][4], float A[4][4], float epsilon) transpose_m4(V); zero_m4(Wm); - for (i=0; i<4; i++) - Wm[i][i]= (W[i] < epsilon)? 0.0f: 1.0f/W[i]; + for (i = 0; i < 4; i++) + Wm[i][i] = (W[i] < epsilon) ? 0.0f : 1.0f / W[i]; transpose_m4(V); diff --git a/source/blender/blenlib/intern/math_rotation.c b/source/blender/blenlib/intern/math_rotation.c index 5ae226bf6d5..25e7e451451 100644 --- a/source/blender/blenlib/intern/math_rotation.c +++ b/source/blender/blenlib/intern/math_rotation.c @@ -17,7 +17,7 @@ * * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. * All rights reserved. - + * The Original Code is: some of this file. * * ***** END GPL LICENSE BLOCK ***** @@ -40,25 +40,24 @@ /* convenience, avoids setting Y axis everywhere */ void unit_axis_angle(float axis[3], float *angle) { - axis[0]= 0.0f; - axis[1]= 1.0f; - axis[2]= 0.0f; - *angle= 0.0f; + axis[0] = 0.0f; + axis[1] = 1.0f; + axis[2] = 0.0f; + *angle = 0.0f; } - void unit_qt(float q[4]) { - q[0]= 1.0f; - q[1]= q[2]= q[3]= 0.0f; + q[0] = 1.0f; + q[1] = q[2] = q[3] = 0.0f; } void copy_qt_qt(float q1[4], const float q2[4]) { - q1[0]= q2[0]; - q1[1]= q2[1]; - q1[2]= q2[2]; - q1[3]= q2[3]; + q1[0] = q2[0]; + q1[1] = q2[1]; + q1[2] = q2[2]; + q1[3] = q2[3]; } int is_zero_qt(float *q) @@ -66,17 +65,17 @@ int is_zero_qt(float *q) return (q[0] == 0 && q[1] == 0 && q[2] == 0 && q[3] == 0); } -void mul_qt_qtqt(float *q, const float *q1, const float *q2) +void mul_qt_qtqt(float q[4], const float q1[4], const float q2[4]) { - float t0,t1,t2; + float t0, t1, t2; - t0= q1[0]*q2[0]-q1[1]*q2[1]-q1[2]*q2[2]-q1[3]*q2[3]; - t1= q1[0]*q2[1]+q1[1]*q2[0]+q1[2]*q2[3]-q1[3]*q2[2]; - t2= q1[0]*q2[2]+q1[2]*q2[0]+q1[3]*q2[1]-q1[1]*q2[3]; - q[3]= q1[0]*q2[3]+q1[3]*q2[0]+q1[1]*q2[2]-q1[2]*q2[1]; - q[0]=t0; - q[1]=t1; - q[2]=t2; + t0 = q1[0] * q2[0] - q1[1] * q2[1] - q1[2] * q2[2] - q1[3] * q2[3]; + t1 = q1[0] * q2[1] + q1[1] * q2[0] + q1[2] * q2[3] - q1[3] * q2[2]; + t2 = q1[0] * q2[2] + q1[2] * q2[0] + q1[3] * q2[1] - q1[1] * q2[3]; + q[3] = q1[0] * q2[3] + q1[3] * q2[0] + q1[1] * q2[2] - q1[2] * q2[1]; + q[0] = t0; + q[1] = t1; + q[2] = t2; } /* Assumes a unit quaternion */ @@ -84,18 +83,18 @@ void mul_qt_v3(const float q[4], float v[3]) { float t0, t1, t2; - t0= -q[1]*v[0]-q[2]*v[1]-q[3]*v[2]; - t1= q[0]*v[0]+q[2]*v[2]-q[3]*v[1]; - t2= q[0]*v[1]+q[3]*v[0]-q[1]*v[2]; - v[2]= q[0]*v[2]+q[1]*v[1]-q[2]*v[0]; - v[0]=t1; - v[1]=t2; + t0 = -q[1] * v[0] - q[2] * v[1] - q[3] * v[2]; + t1 = q[0] * v[0] + q[2] * v[2] - q[3] * v[1]; + t2 = q[0] * v[1] + q[3] * v[0] - q[1] * v[2]; + v[2] = q[0] * v[2] + q[1] * v[1] - q[2] * v[0]; + v[0] = t1; + v[1] = t2; - t1= t0*-q[1]+v[0]*q[0]-v[1]*q[3]+v[2]*q[2]; - t2= t0*-q[2]+v[1]*q[0]-v[2]*q[1]+v[0]*q[3]; - v[2]= t0*-q[3]+v[2]*q[0]-v[0]*q[2]+v[1]*q[1]; - v[0]=t1; - v[1]=t2; + t1 = t0 * -q[1] + v[0] * q[0] - v[1] * q[3] + v[2] * q[2]; + t2 = t0 * -q[2] + v[1] * q[0] - v[2] * q[1] + v[0] * q[3]; + v[2] = t0 * -q[3] + v[2] * q[0] - v[0] * q[2] + v[1] * q[1]; + v[0] = t1; + v[1] = t2; } void conjugate_qt(float q[4]) @@ -107,10 +106,10 @@ void conjugate_qt(float q[4]) float dot_qtqt(const float q1[4], const float q2[4]) { - return q1[0]*q2[0] + q1[1]*q2[1] + q1[2]*q2[2] + q1[3]*q2[3]; + return q1[0] * q2[0] + q1[1] * q2[1] + q1[2] * q2[2] + q1[3] * q2[3]; } -void invert_qt(float *q) +void invert_qt(float q[4]) { float f = dot_qtqt(q, q); @@ -118,17 +117,17 @@ void invert_qt(float *q) return; conjugate_qt(q); - mul_qt_fl(q, 1.0f/f); + mul_qt_fl(q, 1.0f / f); } -void invert_qt_qt(float *q1, const float *q2) +void invert_qt_qt(float q1[4], const float q2[4]) { copy_qt_qt(q1, q2); invert_qt(q1); } /* simple mult */ -void mul_qt_fl(float *q, const float f) +void mul_qt_fl(float q[4], const float f) { q[0] *= f; q[1] *= f; @@ -140,65 +139,64 @@ void sub_qt_qtqt(float q[4], const float q1[4], const float q2[4]) { float nq2[4]; - nq2[0]= -q2[0]; - nq2[1]= q2[1]; - nq2[2]= q2[2]; - nq2[3]= q2[3]; + nq2[0] = -q2[0]; + nq2[1] = q2[1]; + nq2[2] = q2[2]; + nq2[3] = q2[3]; mul_qt_qtqt(q, q1, nq2); } /* angular mult factor */ -void mul_fac_qt_fl(float *q, const float fac) +void mul_fac_qt_fl(float q[4], const float fac) { - float angle= fac*saacos(q[0]); /* quat[0]= cos(0.5*angle), but now the 0.5 and 2.0 rule out */ - - float co= (float)cos(angle); - float si= (float)sin(angle); - q[0]= co; - normalize_v3(q+1); - mul_v3_fl(q+1, si); + float angle = fac * saacos(q[0]); /* quat[0] = cos(0.5 * angle), but now the 0.5 and 2.0 rule out */ + + float co = (float)cos(angle); + float si = (float)sin(angle); + q[0] = co; + normalize_v3(q + 1); + mul_v3_fl(q + 1, si); } /* skip error check, currently only needed by mat3_to_quat_is_ok */ static void quat_to_mat3_no_error(float m[][3], const float q[4]) { - double q0, q1, q2, q3, qda,qdb,qdc,qaa,qab,qac,qbb,qbc,qcc; + double q0, q1, q2, q3, qda, qdb, qdc, qaa, qab, qac, qbb, qbc, qcc; - q0= M_SQRT2 * (double)q[0]; - q1= M_SQRT2 * (double)q[1]; - q2= M_SQRT2 * (double)q[2]; - q3= M_SQRT2 * (double)q[3]; + q0 = M_SQRT2 * (double)q[0]; + q1 = M_SQRT2 * (double)q[1]; + q2 = M_SQRT2 * (double)q[2]; + q3 = M_SQRT2 * (double)q[3]; - qda= q0*q1; - qdb= q0*q2; - qdc= q0*q3; - qaa= q1*q1; - qab= q1*q2; - qac= q1*q3; - qbb= q2*q2; - qbc= q2*q3; - qcc= q3*q3; + qda = q0 * q1; + qdb = q0 * q2; + qdc = q0 * q3; + qaa = q1 * q1; + qab = q1 * q2; + qac = q1 * q3; + qbb = q2 * q2; + qbc = q2 * q3; + qcc = q3 * q3; - m[0][0]= (float)(1.0-qbb-qcc); - m[0][1]= (float)(qdc+qab); - m[0][2]= (float)(-qdb+qac); + m[0][0] = (float)(1.0 - qbb - qcc); + m[0][1] = (float)(qdc + qab); + m[0][2] = (float)(-qdb + qac); - m[1][0]= (float)(-qdc+qab); - m[1][1]= (float)(1.0-qaa-qcc); - m[1][2]= (float)(qda+qbc); + m[1][0] = (float)(-qdc + qab); + m[1][1] = (float)(1.0 - qaa - qcc); + m[1][2] = (float)(qda + qbc); - m[2][0]= (float)(qdb+qac); - m[2][1]= (float)(-qda+qbc); - m[2][2]= (float)(1.0-qaa-qbb); + m[2][0] = (float)(qdb + qac); + m[2][1] = (float)(-qda + qbc); + m[2][2] = (float)(1.0 - qaa - qbb); } - void quat_to_mat3(float m[][3], const float q[4]) { #ifdef DEBUG float f; - if (!((f=dot_qtqt(q, q))==0.0f || (fabsf(f-1.0f) < (float)QUAT_EPSILON))) { + if (!((f = dot_qtqt(q, q)) == 0.0f || (fabsf(f - 1.0f) < (float)QUAT_EPSILON))) { fprintf(stderr, "Warning! quat_to_mat3() called with non-normalized: size %.8f *** report a bug ***\n", f); } #endif @@ -208,106 +206,106 @@ void quat_to_mat3(float m[][3], const float q[4]) void quat_to_mat4(float m[][4], const float q[4]) { - double q0, q1, q2, q3, qda,qdb,qdc,qaa,qab,qac,qbb,qbc,qcc; + double q0, q1, q2, q3, qda, qdb, qdc, qaa, qab, qac, qbb, qbc, qcc; #ifdef DEBUG - if (!((q0=dot_qtqt(q, q))==0.0f || (fabsf(q0-1.0) < QUAT_EPSILON))) { + if (!((q0 = dot_qtqt(q, q)) == 0.0f || (fabsf(q0 - 1.0) < QUAT_EPSILON))) { fprintf(stderr, "Warning! quat_to_mat4() called with non-normalized: size %.8f *** report a bug ***\n", (float)q0); } #endif - q0= M_SQRT2 * (double)q[0]; - q1= M_SQRT2 * (double)q[1]; - q2= M_SQRT2 * (double)q[2]; - q3= M_SQRT2 * (double)q[3]; - - qda= q0*q1; - qdb= q0*q2; - qdc= q0*q3; - qaa= q1*q1; - qab= q1*q2; - qac= q1*q3; - qbb= q2*q2; - qbc= q2*q3; - qcc= q3*q3; - - m[0][0]= (float)(1.0-qbb-qcc); - m[0][1]= (float)(qdc+qab); - m[0][2]= (float)(-qdb+qac); - m[0][3]= 0.0f; - - m[1][0]= (float)(-qdc+qab); - m[1][1]= (float)(1.0-qaa-qcc); - m[1][2]= (float)(qda+qbc); - m[1][3]= 0.0f; - - m[2][0]= (float)(qdb+qac); - m[2][1]= (float)(-qda+qbc); - m[2][2]= (float)(1.0-qaa-qbb); - m[2][3]= 0.0f; - - m[3][0]= m[3][1]= m[3][2]= 0.0f; - m[3][3]= 1.0f; -} - -void mat3_to_quat(float *q, float wmat[][3]) + q0 = M_SQRT2 * (double)q[0]; + q1 = M_SQRT2 * (double)q[1]; + q2 = M_SQRT2 * (double)q[2]; + q3 = M_SQRT2 * (double)q[3]; + + qda = q0 * q1; + qdb = q0 * q2; + qdc = q0 * q3; + qaa = q1 * q1; + qab = q1 * q2; + qac = q1 * q3; + qbb = q2 * q2; + qbc = q2 * q3; + qcc = q3 * q3; + + m[0][0] = (float)(1.0 - qbb - qcc); + m[0][1] = (float)(qdc + qab); + m[0][2] = (float)(-qdb + qac); + m[0][3] = 0.0f; + + m[1][0] = (float)(-qdc + qab); + m[1][1] = (float)(1.0 - qaa - qcc); + m[1][2] = (float)(qda + qbc); + m[1][3] = 0.0f; + + m[2][0] = (float)(qdb + qac); + m[2][1] = (float)(-qda + qbc); + m[2][2] = (float)(1.0 - qaa - qbb); + m[2][3] = 0.0f; + + m[3][0] = m[3][1] = m[3][2] = 0.0f; + m[3][3] = 1.0f; +} + +void mat3_to_quat(float q[4], float wmat[][3]) { double tr, s; float mat[3][3]; /* work on a copy */ copy_m3_m3(mat, wmat); - normalize_m3(mat); /* this is needed AND a 'normalize_qt' in the end */ - - tr= 0.25* (double)(1.0f+mat[0][0]+mat[1][1]+mat[2][2]); - - if (tr>(double)FLT_EPSILON) { - s= sqrt(tr); - q[0]= (float)s; - s= 1.0/(4.0*s); - q[1]= (float)((mat[1][2]-mat[2][1])*s); - q[2]= (float)((mat[2][0]-mat[0][2])*s); - q[3]= (float)((mat[0][1]-mat[1][0])*s); + normalize_m3(mat); /* this is needed AND a 'normalize_qt' in the end */ + + tr = 0.25 * (double)(1.0f + mat[0][0] + mat[1][1] + mat[2][2]); + + if (tr > (double)FLT_EPSILON) { + s = sqrt(tr); + q[0] = (float)s; + s = 1.0 / (4.0 * s); + q[1] = (float)((mat[1][2] - mat[2][1]) * s); + q[2] = (float)((mat[2][0] - mat[0][2]) * s); + q[3] = (float)((mat[0][1] - mat[1][0]) * s); } else { if (mat[0][0] > mat[1][1] && mat[0][0] > mat[2][2]) { - s= 2.0f*sqrtf(1.0f + mat[0][0] - mat[1][1] - mat[2][2]); - q[1]= (float)(0.25*s); + s = 2.0f * sqrtf(1.0f + mat[0][0] - mat[1][1] - mat[2][2]); + q[1] = (float)(0.25 * s); - s= 1.0/s; - q[0]= (float)((double)(mat[2][1] - mat[1][2])*s); - q[2]= (float)((double)(mat[1][0] + mat[0][1])*s); - q[3]= (float)((double)(mat[2][0] + mat[0][2])*s); + s = 1.0 / s; + q[0] = (float)((double)(mat[2][1] - mat[1][2]) * s); + q[2] = (float)((double)(mat[1][0] + mat[0][1]) * s); + q[3] = (float)((double)(mat[2][0] + mat[0][2]) * s); } else if (mat[1][1] > mat[2][2]) { - s= 2.0f*sqrtf(1.0f + mat[1][1] - mat[0][0] - mat[2][2]); - q[2]= (float)(0.25*s); + s = 2.0f * sqrtf(1.0f + mat[1][1] - mat[0][0] - mat[2][2]); + q[2] = (float)(0.25 * s); - s= 1.0/s; - q[0]= (float)((double)(mat[2][0] - mat[0][2])*s); - q[1]= (float)((double)(mat[1][0] + mat[0][1])*s); - q[3]= (float)((double)(mat[2][1] + mat[1][2])*s); + s = 1.0 / s; + q[0] = (float)((double)(mat[2][0] - mat[0][2]) * s); + q[1] = (float)((double)(mat[1][0] + mat[0][1]) * s); + q[3] = (float)((double)(mat[2][1] + mat[1][2]) * s); } else { - s= 2.0f*sqrtf(1.0f + mat[2][2] - mat[0][0] - mat[1][1]); - q[3]= (float)(0.25*s); + s = 2.0f * sqrtf(1.0f + mat[2][2] - mat[0][0] - mat[1][1]); + q[3] = (float)(0.25 * s); - s= 1.0/s; - q[0]= (float)((double)(mat[1][0] - mat[0][1])*s); - q[1]= (float)((double)(mat[2][0] + mat[0][2])*s); - q[2]= (float)((double)(mat[2][1] + mat[1][2])*s); + s = 1.0 / s; + q[0] = (float)((double)(mat[1][0] - mat[0][1]) * s); + q[1] = (float)((double)(mat[2][0] + mat[0][2]) * s); + q[2] = (float)((double)(mat[2][1] + mat[1][2]) * s); } } normalize_qt(q); } -void mat4_to_quat(float *q, float m[][4]) +void mat4_to_quat(float q[4], float m[][4]) { float mat[3][3]; - + copy_m3_m4(mat, m); - mat3_to_quat(q,mat); + mat3_to_quat(q, mat); } void mat3_to_quat_is_ok(float q[4], float wmat[3][3]) @@ -317,54 +315,53 @@ void mat3_to_quat_is_ok(float q[4], float wmat[3][3]) /* work on a copy */ copy_m3_m3(mat, wmat); normalize_m3(mat); - + /* rotate z-axis of matrix to z-axis */ - nor[0] = mat[2][1]; /* cross product with (0,0,1) */ - nor[1] = -mat[2][0]; + nor[0] = mat[2][1]; /* cross product with (0,0,1) */ + nor[1] = -mat[2][0]; nor[2] = 0.0; normalize_v3(nor); - - co= mat[2][2]; - angle= 0.5f*saacos(co); - - co= (float)cos(angle); - si= (float)sin(angle); - q1[0]= co; - q1[1]= -nor[0]*si; /* negative here, but why? */ - q1[2]= -nor[1]*si; - q1[3]= -nor[2]*si; + + co = mat[2][2]; + angle = 0.5f * saacos(co); + + co = (float)cos(angle); + si = (float)sin(angle); + q1[0] = co; + q1[1] = -nor[0] * si; /* negative here, but why? */ + q1[2] = -nor[1] * si; + q1[3] = -nor[2] * si; /* rotate back x-axis from mat, using inverse q1 */ - quat_to_mat3_no_error( matr,q1); + quat_to_mat3_no_error(matr, q1); invert_m3_m3(matn, matr); mul_m3_v3(matn, mat[0]); - + /* and align x-axes */ - angle= (float)(0.5*atan2(mat[0][1], mat[0][0])); - - co= (float)cos(angle); - si= (float)sin(angle); - q2[0]= co; - q2[1]= 0.0f; - q2[2]= 0.0f; - q2[3]= si; - + angle = (float)(0.5 * atan2(mat[0][1], mat[0][0])); + + co = (float)cos(angle); + si = (float)sin(angle); + q2[0] = co; + q2[1] = 0.0f; + q2[2] = 0.0f; + q2[3] = si; + mul_qt_qtqt(q, q1, q2); } - -float normalize_qt(float *q) +float normalize_qt(float q[4]) { float len; - - len= (float)sqrt(dot_qtqt(q, q)); - if (len!=0.0f) { - mul_qt_fl(q, 1.0f/len); + + len = (float)sqrt(dot_qtqt(q, q)); + if (len != 0.0f) { + mul_qt_fl(q, 1.0f / len); } else { - q[1]= 1.0f; - q[0]= q[2]= q[3]= 0.0f; + q[1] = 1.0f; + q[0] = q[2] = q[3] = 0.0f; } return len; @@ -377,19 +374,19 @@ float normalize_qt_qt(float r[4], const float q[4]) } /* note: expects vectors to be normalized */ -void rotation_between_vecs_to_quat(float *q, const float v1[3], const float v2[3]) +void rotation_between_vecs_to_quat(float q[4], const float v1[3], const float v2[3]) { float axis[3]; float angle; - + cross_v3_v3v3(axis, v1, v2); - + angle = angle_normalized_v3v3(v1, v2); - + axis_angle_to_quat(q, axis, angle); } -void rotation_between_quats_to_quat(float *q, const float q1[4], const float q2[4]) +void rotation_between_quats_to_quat(float q[4], const float q1[4], const float q2[4]) { float tquat[4]; double dot = 0.0f; @@ -405,141 +402,145 @@ void rotation_between_quats_to_quat(float *q, const float q1[4], const float q2[ mul_qt_qtqt(q, tquat, q2); } - void vec_to_quat(float q[4], const float vec[3], short axis, const short upflag) { float q2[4], nor[3], *fp, mat[3][3], angle, si, co, x2, y2, z2, len1; - + assert(axis >= 0 && axis <= 5); assert(upflag >= 0 && upflag <= 2); - + /* first rotate to axis */ - if (axis>2) { - x2= vec[0] ; y2= vec[1] ; z2= vec[2]; - axis-= 3; + if (axis > 2) { + x2 = vec[0]; + y2 = vec[1]; + z2 = vec[2]; + axis -= 3; } else { - x2= -vec[0] ; y2= -vec[1] ; z2= -vec[2]; + x2 = -vec[0]; + y2 = -vec[1]; + z2 = -vec[2]; } - - q[0]=1.0; - q[1]=q[2]=q[3]= 0.0; - len1= (float)sqrt(x2*x2+y2*y2+z2*z2); + q[0] = 1.0; + q[1] = q[2] = q[3] = 0.0; + + len1 = (float)sqrt(x2 * x2 + y2 * y2 + z2 * z2); if (len1 == 0.0f) return; /* nasty! I need a good routine for this... * problem is a rotation of an Y axis to the negative Y-axis for example. */ - if (axis==0) { /* x-axis */ - nor[0]= 0.0; - nor[1]= -z2; - nor[2]= y2; + if (axis == 0) { /* x-axis */ + nor[0] = 0.0; + nor[1] = -z2; + nor[2] = y2; - if (fabs(y2)+fabs(z2)<0.0001) - nor[1]= 1.0; + if (fabs(y2) + fabs(z2) < 0.0001) + nor[1] = 1.0; - co= x2; + co = x2; } - else if (axis==1) { /* y-axis */ - nor[0]= z2; - nor[1]= 0.0; - nor[2]= -x2; - - if (fabs(x2)+fabs(z2)<0.0001) - nor[2]= 1.0; - - co= y2; + else if (axis == 1) { /* y-axis */ + nor[0] = z2; + nor[1] = 0.0; + nor[2] = -x2; + + if (fabs(x2) + fabs(z2) < 0.0001) + nor[2] = 1.0; + + co = y2; } - else { /* z-axis */ - nor[0]= -y2; - nor[1]= x2; - nor[2]= 0.0; + else { /* z-axis */ + nor[0] = -y2; + nor[1] = x2; + nor[2] = 0.0; - if (fabs(x2)+fabs(y2)<0.0001) - nor[0]= 1.0; + if (fabs(x2) + fabs(y2) < 0.0001) + nor[0] = 1.0; - co= z2; + co = z2; } - co/= len1; + co /= len1; normalize_v3(nor); - - angle= 0.5f*saacos(co); - si= (float)sin(angle); - q[0]= (float)cos(angle); - q[1]= nor[0]*si; - q[2]= nor[1]*si; - q[3]= nor[2]*si; - - if (axis!=upflag) { - quat_to_mat3(mat,q); - - fp= mat[2]; - if (axis==0) { - if (upflag==1) angle= (float)(0.5*atan2(fp[2], fp[1])); - else angle= (float)(-0.5*atan2(fp[1], fp[2])); + + angle = 0.5f * saacos(co); + si = (float)sin(angle); + q[0] = (float)cos(angle); + q[1] = nor[0] * si; + q[2] = nor[1] * si; + q[3] = nor[2] * si; + + if (axis != upflag) { + quat_to_mat3(mat, q); + + fp = mat[2]; + if (axis == 0) { + if (upflag == 1) angle = (float)(0.5 * atan2(fp[2], fp[1])); + else angle = (float)(-0.5 * atan2(fp[1], fp[2])); } - else if (axis==1) { - if (upflag==0) angle= (float)(-0.5*atan2(fp[2], fp[0])); - else angle= (float)(0.5*atan2(fp[0], fp[2])); + else if (axis == 1) { + if (upflag == 0) angle = (float)(-0.5 * atan2(fp[2], fp[0])); + else angle = (float)(0.5 * atan2(fp[0], fp[2])); } else { - if (upflag==0) angle= (float)(0.5*atan2(-fp[1], -fp[0])); - else angle= (float)(-0.5*atan2(-fp[0], -fp[1])); + if (upflag == 0) angle = (float)(0.5 * atan2(-fp[1], -fp[0])); + else angle = (float)(-0.5 * atan2(-fp[0], -fp[1])); } - - co= cosf(angle); - si= sinf(angle)/len1; - q2[0]= co; - q2[1]= x2*si; - q2[2]= y2*si; - q2[3]= z2*si; - - mul_qt_qtqt(q,q2,q); + + co = cosf(angle); + si = sinf(angle) / len1; + q2[0] = co; + q2[1] = x2 * si; + q2[2] = y2 * si; + q2[3] = z2 * si; + + mul_qt_qtqt(q, q2, q); } } #if 0 + /* A & M Watt, Advanced animation and rendering techniques, 1992 ACM press */ -void QuatInterpolW(float *result, float *quat1, float *quat2, float t) +void QuatInterpolW(float *result, float quat1[4], float quat2[4], float t) { float omega, cosom, sinom, sc1, sc2; cosom = quat1[0] * quat2[0] + quat1[1] * quat2[1] + quat1[2] * quat2[2] + quat1[3] * quat2[3]; - + /* rotate around shortest angle */ if ((1.0f + cosom) > 0.0001f) { - + if ((1.0f - cosom) > 0.0001f) { omega = (float)acos(cosom); sinom = (float)sin(omega); sc1 = (float)sin((1.0 - t) * omega) / sinom; sc2 = (float)sin(t * omega) / sinom; - } + } else { sc1 = 1.0f - t; sc2 = t; } - result[0] = sc1*quat1[0] + sc2*quat2[0]; - result[1] = sc1*quat1[1] + sc2*quat2[1]; - result[2] = sc1*quat1[2] + sc2*quat2[2]; - result[3] = sc1*quat1[3] + sc2*quat2[3]; - } + result[0] = sc1 * quat1[0] + sc2 * quat2[0]; + result[1] = sc1 * quat1[1] + sc2 * quat2[1]; + result[2] = sc1 * quat1[2] + sc2 * quat2[2]; + result[3] = sc1 * quat1[3] + sc2 * quat2[3]; + } else { result[0] = quat2[3]; result[1] = -quat2[2]; result[2] = quat2[1]; result[3] = -quat2[0]; - - sc1 = (float)sin((1.0 - t)*M_PI_2); - sc2 = (float)sin(t*M_PI_2); - - result[0] = sc1*quat1[0] + sc2*result[0]; - result[1] = sc1*quat1[1] + sc2*result[1]; - result[2] = sc1*quat1[2] + sc2*result[2]; - result[3] = sc1*quat1[3] + sc2*result[3]; + + sc1 = (float)sin((1.0 - t) * M_PI_2); + sc2 = (float)sin(t * M_PI_2); + + result[0] = sc1 * quat1[0] + sc2 * result[0]; + result[1] = sc1 * quat1[1] + sc2 * result[1]; + result[2] = sc1 * quat1[2] + sc2 * result[2]; + result[3] = sc1 * quat1[3] + sc2 * result[3]; } } #endif @@ -553,18 +554,18 @@ void interp_qt_qtqt(float result[4], const float quat1[4], const float quat2[4], /* rotate around shortest angle */ if (cosom < 0.0f) { cosom = -cosom; - quat[0]= -quat1[0]; - quat[1]= -quat1[1]; - quat[2]= -quat1[2]; - quat[3]= -quat1[3]; - } + quat[0] = -quat1[0]; + quat[1] = -quat1[1]; + quat[2] = -quat1[2]; + quat[3] = -quat1[3]; + } else { - quat[0]= quat1[0]; - quat[1]= quat1[1]; - quat[2]= quat1[2]; - quat[3]= quat1[3]; + quat[0] = quat1[0]; + quat[1] = quat1[1]; + quat[2] = quat1[2]; + quat[3] = quat1[3]; } - + if ((1.0f - cosom) > 0.0001f) { omega = (float)acos(cosom); sinom = (float)sin(omega); @@ -572,10 +573,10 @@ void interp_qt_qtqt(float result[4], const float quat1[4], const float quat2[4], sc2 = (float)sin(t * omega) / sinom; } else { - sc1= 1.0f - t; - sc2= t; + sc1 = 1.0f - t; + sc2 = t; } - + result[0] = sc1 * quat[0] + sc2 * quat2[0]; result[1] = sc1 * quat[1] + sc2 * quat2[1]; result[2] = sc1 * quat[2] + sc2 * quat2[2]; @@ -584,57 +585,57 @@ void interp_qt_qtqt(float result[4], const float quat1[4], const float quat2[4], void add_qt_qtqt(float result[4], const float quat1[4], const float quat2[4], const float t) { - result[0]= quat1[0] + t*quat2[0]; - result[1]= quat1[1] + t*quat2[1]; - result[2]= quat1[2] + t*quat2[2]; - result[3]= quat1[3] + t*quat2[3]; + result[0] = quat1[0] + t * quat2[0]; + result[1] = quat1[1] + t * quat2[1]; + result[2] = quat1[2] + t * quat2[2]; + result[3] = quat1[3] + t * quat2[3]; } void tri_to_quat(float quat[4], const float v1[3], const float v2[3], const float v3[3]) { /* imaginary x-axis, y-axis triangle is being rotated */ float vec[3], q1[4], q2[4], n[3], si, co, angle, mat[3][3], imat[3][3]; - + /* move z-axis to face-normal */ - normal_tri_v3(vec,v1, v2, v3); + normal_tri_v3(vec, v1, v2, v3); - n[0]= vec[1]; - n[1]= -vec[0]; - n[2]= 0.0f; + n[0] = vec[1]; + n[1] = -vec[0]; + n[2] = 0.0f; normalize_v3(n); - - if (n[0]==0.0f && n[1]==0.0f) n[0]= 1.0f; - - angle= -0.5f*(float)saacos(vec[2]); - co= (float)cos(angle); - si= (float)sin(angle); - q1[0]= co; - q1[1]= n[0]*si; - q1[2]= n[1]*si; - q1[3]= 0.0f; - + + if (n[0] == 0.0f && n[1] == 0.0f) n[0] = 1.0f; + + angle = -0.5f * (float)saacos(vec[2]); + co = (float)cos(angle); + si = (float)sin(angle); + q1[0] = co; + q1[1] = n[0] * si; + q1[2] = n[1] * si; + q1[3] = 0.0f; + /* rotate back line v1-v2 */ - quat_to_mat3(mat,q1); + quat_to_mat3(mat, q1); invert_m3_m3(imat, mat); sub_v3_v3v3(vec, v2, v1); mul_m3_v3(imat, vec); /* what angle has this line with x-axis? */ - vec[2]= 0.0f; + vec[2] = 0.0f; normalize_v3(vec); - angle= (float)(0.5*atan2(vec[1], vec[0])); - co= (float)cos(angle); - si= (float)sin(angle); - q2[0]= co; - q2[1]= 0.0f; - q2[2]= 0.0f; - q2[3]= si; + angle = (float)(0.5 * atan2(vec[1], vec[0])); + co = (float)cos(angle); + si = (float)sin(angle); + q2[0] = co; + q2[1] = 0.0f; + q2[2] = 0.0f; + q2[3] = si; mul_qt_qtqt(quat, q1, q2); } -void print_qt(const char *str, const float q[4]) +void print_qt(const char *str, const float q[4]) { printf("%s: %.3f %.3f %.3f %.3f\n", str, q[0], q[1], q[2], q[3]); } @@ -657,7 +658,7 @@ void axis_angle_to_quat(float q[4], const float axis[3], float angle) q[0] = (float)cos(angle); q[1] = nor[0] * si; q[2] = nor[1] * si; - q[3] = nor[2] * si; + q[3] = nor[2] * si; } /* Quaternions to Axis Angle */ @@ -666,67 +667,67 @@ void quat_to_axis_angle(float axis[3], float *angle, const float q[4]) float ha, si; #ifdef DEBUG - if (!((ha=dot_qtqt(q, q))==0.0f || (fabsf(ha-1.0f) < (float)QUAT_EPSILON))) { + if (!((ha = dot_qtqt(q, q)) == 0.0f || (fabsf(ha - 1.0f) < (float)QUAT_EPSILON))) { fprintf(stderr, "Warning! quat_to_axis_angle() called with non-normalized: size %.8f *** report a bug ***\n", ha); } #endif /* calculate angle/2, and sin(angle/2) */ - ha= (float)acos(q[0]); - si= (float)sin(ha); - + ha = (float)acos(q[0]); + si = (float)sin(ha); + /* from half-angle to angle */ - *angle= ha * 2; - + *angle = ha * 2; + /* prevent division by zero for axis conversion */ if (fabs(si) < 0.0005) - si= 1.0f; - - axis[0]= q[1] / si; - axis[1]= q[2] / si; - axis[2]= q[3] / si; + si = 1.0f; + + axis[0] = q[1] / si; + axis[1] = q[2] / si; + axis[2] = q[3] / si; } /* Axis Angle to Euler Rotation */ void axis_angle_to_eulO(float eul[3], const short order, const float axis[3], const float angle) { float q[4]; - + /* use quaternions as intermediate representation for now... */ axis_angle_to_quat(q, axis, angle); - quat_to_eulO(eul, order,q); + quat_to_eulO(eul, order, q); } /* Euler Rotation to Axis Angle */ void eulO_to_axis_angle(float axis[3], float *angle, const float eul[3], const short order) { float q[4]; - + /* use quaternions as intermediate representation for now... */ - eulO_to_quat(q,eul, order); - quat_to_axis_angle(axis, angle,q); + eulO_to_quat(q, eul, order); + quat_to_axis_angle(axis, angle, q); } /* axis angle to 3x3 matrix - safer version (normalization of axis performed) */ void axis_angle_to_mat3(float mat[3][3], const float axis[3], const float angle) { float nor[3], nsi[3], co, si, ico; - + /* normalize the axis first (to remove unwanted scaling) */ if (normalize_v3_v3(nor, axis) == 0.0f) { unit_m3(mat); return; } - + /* now convert this to a 3x3 matrix */ - co= (float)cos(angle); - si= (float)sin(angle); - - ico= (1.0f - co); - nsi[0]= nor[0]*si; - nsi[1]= nor[1]*si; - nsi[2]= nor[2]*si; - + co = (float)cos(angle); + si = (float)sin(angle); + + ico = (1.0f - co); + nsi[0] = nor[0] * si; + nsi[1] = nor[1] * si; + nsi[2] = nor[2] * si; + mat[0][0] = ((nor[0] * nor[0]) * ico) + co; mat[0][1] = ((nor[0] * nor[1]) * ico) + nsi[2]; mat[0][2] = ((nor[0] * nor[2]) * ico) - nsi[1]; @@ -742,77 +743,75 @@ void axis_angle_to_mat3(float mat[3][3], const float axis[3], const float angle) void axis_angle_to_mat4(float mat[4][4], const float axis[3], const float angle) { float tmat[3][3]; - - axis_angle_to_mat3(tmat,axis, angle); + + axis_angle_to_mat3(tmat, axis, angle); unit_m4(mat); copy_m4_m3(mat, tmat); } /* 3x3 matrix to axis angle (see Mat4ToVecRot too) */ -void mat3_to_axis_angle(float axis[3], float *angle,float mat[3][3]) +void mat3_to_axis_angle(float axis[3], float *angle, float mat[3][3]) { float q[4]; - + /* use quaternions as intermediate representation */ // TODO: it would be nicer to go straight there... - mat3_to_quat(q,mat); - quat_to_axis_angle(axis, angle,q); + mat3_to_quat(q, mat); + quat_to_axis_angle(axis, angle, q); } /* 4x4 matrix to axis angle (see Mat4ToVecRot too) */ -void mat4_to_axis_angle(float axis[3], float *angle,float mat[4][4]) +void mat4_to_axis_angle(float axis[3], float *angle, float mat[4][4]) { float q[4]; - + /* use quaternions as intermediate representation */ // TODO: it would be nicer to go straight there... - mat4_to_quat(q,mat); - quat_to_axis_angle(axis, angle,q); + mat4_to_quat(q, mat); + quat_to_axis_angle(axis, angle, q); } - - void single_axis_angle_to_mat3(float mat[3][3], const char axis, const float angle) { - const float angle_cos= cosf(angle); - const float angle_sin= sinf(angle); - - switch(axis) { - case 'X': /* rotation around X */ - mat[0][0] = 1.0f; - mat[0][1] = 0.0f; - mat[0][2] = 0.0f; - mat[1][0] = 0.0f; - mat[1][1] = angle_cos; - mat[1][2] = angle_sin; - mat[2][0] = 0.0f; - mat[2][1] = -angle_sin; - mat[2][2] = angle_cos; - break; - case 'Y': /* rotation around Y */ - mat[0][0] = angle_cos; - mat[0][1] = 0.0f; - mat[0][2] = -angle_sin; - mat[1][0] = 0.0f; - mat[1][1] = 1.0f; - mat[1][2] = 0.0f; - mat[2][0] = angle_sin; - mat[2][1] = 0.0f; - mat[2][2] = angle_cos; - break; - case 'Z': /* rotation around Z */ - mat[0][0] = angle_cos; - mat[0][1] = angle_sin; - mat[0][2] = 0.0f; - mat[1][0] = -angle_sin; - mat[1][1] = angle_cos; - mat[1][2] = 0.0f; - mat[2][0] = 0.0f; - mat[2][1] = 0.0f; - mat[2][2] = 1.0f; - break; - default: - assert(0); + const float angle_cos = cosf(angle); + const float angle_sin = sinf(angle); + + switch (axis) { + case 'X': /* rotation around X */ + mat[0][0] = 1.0f; + mat[0][1] = 0.0f; + mat[0][2] = 0.0f; + mat[1][0] = 0.0f; + mat[1][1] = angle_cos; + mat[1][2] = angle_sin; + mat[2][0] = 0.0f; + mat[2][1] = -angle_sin; + mat[2][2] = angle_cos; + break; + case 'Y': /* rotation around Y */ + mat[0][0] = angle_cos; + mat[0][1] = 0.0f; + mat[0][2] = -angle_sin; + mat[1][0] = 0.0f; + mat[1][1] = 1.0f; + mat[1][2] = 0.0f; + mat[2][0] = angle_sin; + mat[2][1] = 0.0f; + mat[2][2] = angle_cos; + break; + case 'Z': /* rotation around Z */ + mat[0][0] = angle_cos; + mat[0][1] = angle_sin; + mat[0][2] = 0.0f; + mat[1][0] = -angle_sin; + mat[1][1] = angle_cos; + mat[1][2] = 0.0f; + mat[2][0] = 0.0f; + mat[2][1] = 0.0f; + mat[2][2] = 1.0f; + break; + default: + assert(0); } } @@ -824,33 +823,33 @@ void vec_rot_to_mat3(float mat[][3], const float vec[3], const float phi) { /* rotation of phi radials around vec */ float vx, vx2, vy, vy2, vz, vz2, co, si; - - vx= vec[0]; - vy= vec[1]; - vz= vec[2]; - vx2= vx*vx; - vy2= vy*vy; - vz2= vz*vz; - co= (float)cos(phi); - si= (float)sin(phi); - - mat[0][0]= vx2+co*(1.0f-vx2); - mat[0][1]= vx*vy*(1.0f-co)+vz*si; - mat[0][2]= vz*vx*(1.0f-co)-vy*si; - mat[1][0]= vx*vy*(1.0f-co)-vz*si; - mat[1][1]= vy2+co*(1.0f-vy2); - mat[1][2]= vy*vz*(1.0f-co)+vx*si; - mat[2][0]= vz*vx*(1.0f-co)+vy*si; - mat[2][1]= vy*vz*(1.0f-co)-vx*si; - mat[2][2]= vz2+co*(1.0f-vz2); + + vx = vec[0]; + vy = vec[1]; + vz = vec[2]; + vx2 = vx * vx; + vy2 = vy * vy; + vz2 = vz * vz; + co = (float)cos(phi); + si = (float)sin(phi); + + mat[0][0] = vx2 + co * (1.0f - vx2); + mat[0][1] = vx * vy * (1.0f - co) + vz * si; + mat[0][2] = vz * vx * (1.0f - co) - vy * si; + mat[1][0] = vx * vy * (1.0f - co) - vz * si; + mat[1][1] = vy2 + co * (1.0f - vy2); + mat[1][2] = vy * vz * (1.0f - co) + vx * si; + mat[2][0] = vz * vx * (1.0f - co) + vy * si; + mat[2][1] = vy * vz * (1.0f - co) - vx * si; + mat[2][2] = vz2 + co * (1.0f - vz2); } /* axis angle to 4x4 matrix */ void vec_rot_to_mat4(float mat[][4], const float vec[3], const float phi) { float tmat[3][3]; - - vec_rot_to_mat3(tmat,vec, phi); + + vec_rot_to_mat3(tmat, vec, phi); unit_m4(mat); copy_m4_m3(mat, tmat); } @@ -861,16 +860,16 @@ void vec_rot_to_quat(float *quat, const float vec[3], const float phi) /* rotation of phi radials around vec */ float si; - quat[1]= vec[0]; - quat[2]= vec[1]; - quat[3]= vec[2]; - - if (normalize_v3(quat+1) == 0.0f) { + quat[1] = vec[0]; + quat[2] = vec[1]; + quat[3] = vec[2]; + + if (normalize_v3(quat + 1) == 0.0f) { unit_qt(quat); } else { - quat[0]= (float)cos((double)phi/2.0); - si= (float)sin((double)phi/2.0); + quat[0] = (float)cos((double)phi / 2.0); + si = (float)sin((double)phi / 2.0); quat[1] *= si; quat[2] *= si; quat[3] *= si; @@ -883,27 +882,27 @@ void vec_rot_to_quat(float *quat, const float vec[3], const float phi) void eul_to_mat3(float mat[][3], const float eul[3]) { double ci, cj, ch, si, sj, sh, cc, cs, sc, ss; - - ci = cos(eul[0]); - cj = cos(eul[1]); + + ci = cos(eul[0]); + cj = cos(eul[1]); ch = cos(eul[2]); - si = sin(eul[0]); - sj = sin(eul[1]); + si = sin(eul[0]); + sj = sin(eul[1]); sh = sin(eul[2]); - cc = ci*ch; - cs = ci*sh; - sc = si*ch; - ss = si*sh; + cc = ci * ch; + cs = ci * sh; + sc = si * ch; + ss = si * sh; - mat[0][0] = (float)(cj*ch); - mat[1][0] = (float)(sj*sc-cs); - mat[2][0] = (float)(sj*cc+ss); - mat[0][1] = (float)(cj*sh); - mat[1][1] = (float)(sj*ss+cc); - mat[2][1] = (float)(sj*cs-sc); - mat[0][2] = (float)-sj; - mat[1][2] = (float)(cj*si); - mat[2][2] = (float)(cj*ci); + mat[0][0] = (float)(cj * ch); + mat[1][0] = (float)(sj * sc - cs); + mat[2][0] = (float)(sj * cc + ss); + mat[0][1] = (float)(cj * sh); + mat[1][1] = (float)(sj * ss + cc); + mat[2][1] = (float)(sj * cs - sc); + mat[0][2] = (float)-sj; + mat[1][2] = (float)(cj * si); + mat[2][2] = (float)(cj * ci); } @@ -911,75 +910,76 @@ void eul_to_mat3(float mat[][3], const float eul[3]) void eul_to_mat4(float mat[][4], const float eul[3]) { double ci, cj, ch, si, sj, sh, cc, cs, sc, ss; - - ci = cos(eul[0]); - cj = cos(eul[1]); + + ci = cos(eul[0]); + cj = cos(eul[1]); ch = cos(eul[2]); - si = sin(eul[0]); - sj = sin(eul[1]); + si = sin(eul[0]); + sj = sin(eul[1]); sh = sin(eul[2]); - cc = ci*ch; - cs = ci*sh; - sc = si*ch; - ss = si*sh; + cc = ci * ch; + cs = ci * sh; + sc = si * ch; + ss = si * sh; - mat[0][0] = (float)(cj*ch); - mat[1][0] = (float)(sj*sc-cs); - mat[2][0] = (float)(sj*cc+ss); - mat[0][1] = (float)(cj*sh); - mat[1][1] = (float)(sj*ss+cc); - mat[2][1] = (float)(sj*cs-sc); - mat[0][2] = (float)-sj; - mat[1][2] = (float)(cj*si); - mat[2][2] = (float)(cj*ci); + mat[0][0] = (float)(cj * ch); + mat[1][0] = (float)(sj * sc - cs); + mat[2][0] = (float)(sj * cc + ss); + mat[0][1] = (float)(cj * sh); + mat[1][1] = (float)(sj * ss + cc); + mat[2][1] = (float)(sj * cs - sc); + mat[0][2] = (float)-sj; + mat[1][2] = (float)(cj * si); + mat[2][2] = (float)(cj * ci); - mat[3][0]= mat[3][1]= mat[3][2]= mat[0][3]= mat[1][3]= mat[2][3]= 0.0f; - mat[3][3]= 1.0f; + mat[3][0] = mat[3][1] = mat[3][2] = mat[0][3] = mat[1][3] = mat[2][3] = 0.0f; + mat[3][3] = 1.0f; } /* returns two euler calculation methods, so we can pick the best */ + /* XYZ order */ static void mat3_to_eul2(float tmat[][3], float eul1[3], float eul2[3]) { float cy, quat[4], mat[3][3]; - - mat3_to_quat(quat,tmat); - quat_to_mat3(mat,quat); + + mat3_to_quat(quat, tmat); + quat_to_mat3(mat, quat); copy_m3_m3(mat, tmat); normalize_m3(mat); - - cy = (float)sqrt(mat[0][0]*mat[0][0] + mat[0][1]*mat[0][1]); - - if (cy > 16.0f*FLT_EPSILON) { - + + cy = (float)sqrt(mat[0][0] * mat[0][0] + mat[0][1] * mat[0][1]); + + if (cy > 16.0f * FLT_EPSILON) { + eul1[0] = (float)atan2(mat[1][2], mat[2][2]); eul1[1] = (float)atan2(-mat[0][2], cy); eul1[2] = (float)atan2(mat[0][1], mat[0][0]); - + eul2[0] = (float)atan2(-mat[1][2], -mat[2][2]); eul2[1] = (float)atan2(-mat[0][2], -cy); eul2[2] = (float)atan2(-mat[0][1], -mat[0][0]); - + } else { eul1[0] = (float)atan2(-mat[2][1], mat[1][1]); eul1[1] = (float)atan2(-mat[0][2], cy); eul1[2] = 0.0f; - + copy_v3_v3(eul2, eul1); } } /* XYZ order */ -void mat3_to_eul(float *eul,float tmat[][3]) +void mat3_to_eul(float *eul, float tmat[][3]) { float eul1[3], eul2[3]; - + mat3_to_eul2(tmat, eul1, eul2); - + /* return best, which is just the one with lowest values it in */ - if (fabs(eul1[0])+fabs(eul1[1])+fabs(eul1[2]) > fabs(eul2[0])+fabs(eul2[1])+fabs(eul2[2])) { + if (fabs(eul1[0]) + fabs(eul1[1]) + fabs(eul1[2]) > fabs(eul2[0]) + fabs(eul2[1]) + fabs(eul2[2])) { copy_v3_v3(eul, eul2); } else { @@ -988,13 +988,13 @@ void mat3_to_eul(float *eul,float tmat[][3]) } /* XYZ order */ -void mat4_to_eul(float *eul,float tmat[][4]) +void mat4_to_eul(float *eul, float tmat[][4]) { float tempMat[3][3]; copy_m3_m4(tempMat, tmat); normalize_m3(tempMat); - mat3_to_eul(eul,tempMat); + mat3_to_eul(eul, tempMat); } /* XYZ order */ @@ -1002,24 +1002,33 @@ void quat_to_eul(float *eul, const float quat[4]) { float mat[3][3]; - quat_to_mat3(mat,quat); - mat3_to_eul(eul,mat); + quat_to_mat3(mat, quat); + mat3_to_eul(eul, mat); } /* XYZ order */ void eul_to_quat(float *quat, const float eul[3]) { float ti, tj, th, ci, cj, ch, si, sj, sh, cc, cs, sc, ss; - - ti = eul[0]*0.5f; tj = eul[1]*0.5f; th = eul[2]*0.5f; - ci = (float)cos(ti); cj = (float)cos(tj); ch = (float)cos(th); - si = (float)sin(ti); sj = (float)sin(tj); sh = (float)sin(th); - cc = ci*ch; cs = ci*sh; sc = si*ch; ss = si*sh; - - quat[0] = cj*cc + sj*ss; - quat[1] = cj*sc - sj*cs; - quat[2] = cj*ss + sj*cc; - quat[3] = cj*cs - sj*sc; + + ti = eul[0] * 0.5f; + tj = eul[1] * 0.5f; + th = eul[2] * 0.5f; + ci = cosf(ti); + cj = cosf(tj); + ch = cosf(th); + si = sinf(ti); + sj = sinf(tj); + sh = sinf(th); + cc = ci * ch; + cs = ci * sh; + sc = si * ch; + ss = si * sh; + + quat[0] = cj * cc + sj * ss; + quat[1] = cj * sc - sj * cs; + quat[2] = cj * ss + sj * cc; + quat[3] = cj * cs - sj * sc; } /* XYZ order */ @@ -1029,99 +1038,116 @@ void rotate_eul(float *beul, const char axis, const float ang) assert(axis >= 'X' && axis <= 'Z'); - eul[0]= eul[1]= eul[2]= 0.0f; - if (axis=='X') eul[0]= ang; - else if (axis=='Y') eul[1]= ang; - else eul[2]= ang; - - eul_to_mat3(mat1,eul); - eul_to_mat3(mat2,beul); - + eul[0] = eul[1] = eul[2] = 0.0f; + if (axis == 'X') eul[0] = ang; + else if (axis == 'Y') eul[1] = ang; + else eul[2] = ang; + + eul_to_mat3(mat1, eul); + eul_to_mat3(mat2, beul); + mul_m3_m3m3(totmat, mat2, mat1); - - mat3_to_eul(beul,totmat); - + + mat3_to_eul(beul, totmat); + } /* exported to transform.c */ + /* order independent! */ void compatible_eul(float eul[3], const float oldrot[3]) { float dx, dy, dz; - + /* correct differences of about 360 degrees first */ - dx= eul[0] - oldrot[0]; - dy= eul[1] - oldrot[1]; - dz= eul[2] - oldrot[2]; - + dx = eul[0] - oldrot[0]; + dy = eul[1] - oldrot[1]; + dz = eul[2] - oldrot[2]; + while (fabs(dx) > 5.1) { - if (dx > 0.0f) eul[0] -= 2.0f*(float)M_PI; else eul[0]+= 2.0f*(float)M_PI; - dx= eul[0] - oldrot[0]; + if (dx > 0.0f) eul[0] -= 2.0f * (float)M_PI; + else eul[0] += 2.0f * (float)M_PI; + dx = eul[0] - oldrot[0]; } while (fabs(dy) > 5.1) { - if (dy > 0.0f) eul[1] -= 2.0f*(float)M_PI; else eul[1]+= 2.0f*(float)M_PI; - dy= eul[1] - oldrot[1]; + if (dy > 0.0f) eul[1] -= 2.0f * (float)M_PI; + else eul[1] += 2.0f * (float)M_PI; + dy = eul[1] - oldrot[1]; } while (fabs(dz) > 5.1) { - if (dz > 0.0f) eul[2] -= 2.0f*(float)M_PI; else eul[2]+= 2.0f*(float)M_PI; - dz= eul[2] - oldrot[2]; + if (dz > 0.0f) eul[2] -= 2.0f * (float)M_PI; + else eul[2] += 2.0f * (float)M_PI; + dz = eul[2] - oldrot[2]; } - - /* is 1 of the axis rotations larger than 180 degrees and the other small? NO ELSE IF!! */ - if (fabs(dx) > 3.2 && fabs(dy)<1.6 && fabs(dz)<1.6) { - if (dx > 0.0f) eul[0] -= 2.0f*(float)M_PI; else eul[0]+= 2.0f*(float)M_PI; + + /* is 1 of the axis rotations larger than 180 degrees and the other small? NO ELSE IF!! */ + if (fabs(dx) > 3.2 && fabs(dy) < 1.6 && fabs(dz) < 1.6) { + if (dx > 0.0f) eul[0] -= 2.0f * (float)M_PI; + else eul[0] += 2.0f * (float)M_PI; } - if (fabs(dy) > 3.2 && fabs(dz)<1.6 && fabs(dx)<1.6) { - if (dy > 0.0f) eul[1] -= 2.0f*(float)M_PI; else eul[1]+= 2.0f*(float)M_PI; + if (fabs(dy) > 3.2 && fabs(dz) < 1.6 && fabs(dx) < 1.6) { + if (dy > 0.0f) eul[1] -= 2.0f * (float)M_PI; + else eul[1] += 2.0f * (float)M_PI; } - if (fabs(dz) > 3.2 && fabs(dx)<1.6 && fabs(dy)<1.6) { - if (dz > 0.0f) eul[2] -= 2.0f*(float)M_PI; else eul[2]+= 2.0f*(float)M_PI; + if (fabs(dz) > 3.2 && fabs(dx) < 1.6 && fabs(dy) < 1.6) { + if (dz > 0.0f) eul[2] -= 2.0f * (float)M_PI; + else eul[2] += 2.0f * (float)M_PI; } - + /* the method below was there from ancient days... but why! probably because the code sucks :) */ -#if 0 +#if 0 /* calc again */ - dx= eul[0] - oldrot[0]; - dy= eul[1] - oldrot[1]; - dz= eul[2] - oldrot[2]; - + dx = eul[0] - oldrot[0]; + dy = eul[1] - oldrot[1]; + dz = eul[2] - oldrot[2]; + /* special case, tested for x-z */ - + if ((fabs(dx) > 3.1 && fabs(dz) > 1.5) || (fabs(dx) > 1.5 && fabs(dz) > 3.1)) { - if (dx > 0.0) eul[0] -= M_PI; else eul[0]+= M_PI; - if (eul[1] > 0.0) eul[1]= M_PI - eul[1]; else eul[1]= -M_PI - eul[1]; - if (dz > 0.0) eul[2] -= M_PI; else eul[2]+= M_PI; - + if (dx > 0.0) eul[0] -= M_PI; + else eul[0] += M_PI; + if (eul[1] > 0.0) eul[1] = M_PI - eul[1]; + else eul[1] = -M_PI - eul[1]; + if (dz > 0.0) eul[2] -= M_PI; + else eul[2] += M_PI; + } else if ((fabs(dx) > 3.1 && fabs(dy) > 1.5) || (fabs(dx) > 1.5 && fabs(dy) > 3.1)) { - if (dx > 0.0) eul[0] -= M_PI; else eul[0]+= M_PI; - if (dy > 0.0) eul[1] -= M_PI; else eul[1]+= M_PI; - if (eul[2] > 0.0) eul[2]= M_PI - eul[2]; else eul[2]= -M_PI - eul[2]; + if (dx > 0.0) eul[0] -= M_PI; + else eul[0] += M_PI; + if (dy > 0.0) eul[1] -= M_PI; + else eul[1] += M_PI; + if (eul[2] > 0.0) eul[2] = M_PI - eul[2]; + else eul[2] = -M_PI - eul[2]; } else if ((fabs(dy) > 3.1 && fabs(dz) > 1.5) || (fabs(dy) > 1.5 && fabs(dz) > 3.1)) { - if (eul[0] > 0.0) eul[0]= M_PI - eul[0]; else eul[0]= -M_PI - eul[0]; - if (dy > 0.0) eul[1] -= M_PI; else eul[1]+= M_PI; - if (dz > 0.0) eul[2] -= M_PI; else eul[2]+= M_PI; + if (eul[0] > 0.0) eul[0] = M_PI - eul[0]; + else eul[0] = -M_PI - eul[0]; + if (dy > 0.0) eul[1] -= M_PI; + else eul[1] += M_PI; + if (dz > 0.0) eul[2] -= M_PI; + else eul[2] += M_PI; } -#endif +#endif } /* uses 2 methods to retrieve eulers, and picks the closest */ + /* XYZ order */ void mat3_to_compatible_eul(float eul[3], const float oldrot[3], float mat[][3]) { float eul1[3], eul2[3]; float d1, d2; - + mat3_to_eul2(mat, eul1, eul2); - + compatible_eul(eul1, oldrot); compatible_eul(eul2, oldrot); - - d1= (float)fabs(eul1[0]-oldrot[0]) + (float)fabs(eul1[1]-oldrot[1]) + (float)fabs(eul1[2]-oldrot[2]); - d2= (float)fabs(eul2[0]-oldrot[0]) + (float)fabs(eul2[1]-oldrot[1]) + (float)fabs(eul2[2]-oldrot[2]); - + + d1 = (float)fabs(eul1[0] - oldrot[0]) + (float)fabs(eul1[1] - oldrot[1]) + (float)fabs(eul1[2] - oldrot[2]); + d2 = (float)fabs(eul2[0] - oldrot[0]) + (float)fabs(eul2[1] - oldrot[1]) + (float)fabs(eul2[2] - oldrot[2]); + /* return best, which is just the one with lowest difference */ if (d1 > d2) { copy_v3_v3(eul, eul2); @@ -1129,13 +1155,13 @@ void mat3_to_compatible_eul(float eul[3], const float oldrot[3], float mat[][3]) else { copy_v3_v3(eul, eul1); } - + } /************************** Arbitrary Order Eulers ***************************/ /* Euler Rotation Order Code: - * was adapted from + * was adapted from * ANSI C code from the article * "Euler Angle Conversion" * by Ken Shoemake, shoemake@graphics.cis.upenn.edu @@ -1146,10 +1172,10 @@ void mat3_to_compatible_eul(float eul[3], const float oldrot[3], float mat[][3]) /* Type for rotation order info - see wiki for derivation details */ typedef struct RotOrderInfo { short axis[3]; - short parity; /* parity of axis permutation (even=0, odd=1) - 'n' in original code */ + short parity; /* parity of axis permutation (even=0, odd=1) - 'n' in original code */ } RotOrderInfo; -/* Array of info for Rotation Order calculations +/* Array of info for Rotation Order calculations * WARNING: must be kept in same order as eEulerRotationOrders */ static RotOrderInfo rotOrders[]= { @@ -1162,8 +1188,8 @@ static RotOrderInfo rotOrders[]= { {{2, 1, 0}, 1} // ZYX }; -/* Get relevant pointer to rotation order set from the array - * NOTE: since we start at 1 for the values, but arrays index from 0, +/* Get relevant pointer to rotation order set from the array + * NOTE: since we start at 1 for the values, but arrays index from 0, * there is -1 factor involved in this process... */ #define GET_ROTATIONORDER_INFO(order) (assert(order>=0 && order<=6), (order < 1) ? &rotOrders[0] : &rotOrders[(order)-1]) @@ -1171,105 +1197,127 @@ static RotOrderInfo rotOrders[]= { /* Construct quaternion from Euler angles (in radians). */ void eulO_to_quat(float q[4], const float e[3], const short order) { - RotOrderInfo *R= GET_ROTATIONORDER_INFO(order); - short i=R->axis[0], j=R->axis[1], k=R->axis[2]; + RotOrderInfo *R = GET_ROTATIONORDER_INFO(order); + short i = R->axis[0], j = R->axis[1], k = R->axis[2]; double ti, tj, th, ci, cj, ch, si, sj, sh, cc, cs, sc, ss; double a[3]; - + ti = e[i] * 0.5f; tj = e[j] * (R->parity ? -0.5f : 0.5f); th = e[k] * 0.5f; - ci = cos(ti); cj = cos(tj); ch = cos(th); - si = sin(ti); sj = sin(tj); sh = sin(th); - - cc = ci*ch; cs = ci*sh; - sc = si*ch; ss = si*sh; - - a[i] = cj*sc - sj*cs; - a[j] = cj*ss + sj*cc; - a[k] = cj*cs - sj*sc; - - q[0] = cj*cc + sj*ss; + ci = cos(ti); + cj = cos(tj); + ch = cos(th); + si = sin(ti); + sj = sin(tj); + sh = sin(th); + + cc = ci * ch; + cs = ci * sh; + sc = si * ch; + ss = si * sh; + + a[i] = cj * sc - sj * cs; + a[j] = cj * ss + sj * cc; + a[k] = cj * cs - sj * sc; + + q[0] = cj * cc + sj * ss; q[1] = a[0]; q[2] = a[1]; q[3] = a[2]; - - if (R->parity) q[j+1] = -q[j+1]; + + if (R->parity) q[j + 1] = -q[j + 1]; } /* Convert quaternion to Euler angles (in radians). */ void quat_to_eulO(float e[3], short const order, const float q[4]) { float M[3][3]; - - quat_to_mat3(M,q); - mat3_to_eulO(e, order,M); + + quat_to_mat3(M, q); + mat3_to_eulO(e, order, M); } /* Construct 3x3 matrix from Euler angles (in radians). */ void eulO_to_mat3(float M[3][3], const float e[3], const short order) { - RotOrderInfo *R= GET_ROTATIONORDER_INFO(order); - short i=R->axis[0], j=R->axis[1], k=R->axis[2]; + RotOrderInfo *R = GET_ROTATIONORDER_INFO(order); + short i = R->axis[0], j = R->axis[1], k = R->axis[2]; double ti, tj, th, ci, cj, ch, si, sj, sh, cc, cs, sc, ss; - + if (R->parity) { - ti = -e[i]; tj = -e[j]; th = -e[k]; + ti = -e[i]; + tj = -e[j]; + th = -e[k]; } else { - ti = e[i]; tj = e[j]; th = e[k]; + ti = e[i]; + tj = e[j]; + th = e[k]; } - - ci = cos(ti); cj = cos(tj); ch = cos(th); - si = sin(ti); sj = sin(tj); sh = sin(th); - - cc = ci*ch; cs = ci*sh; - sc = si*ch; ss = si*sh; - - M[i][i] = cj*ch; M[j][i] = sj*sc-cs; M[k][i] = sj*cc+ss; - M[i][j] = cj*sh; M[j][j] = sj*ss+cc; M[k][j] = sj*cs-sc; - M[i][k] = -sj; M[j][k] = cj*si; M[k][k] = cj*ci; + + ci = cos(ti); + cj = cos(tj); + ch = cos(th); + si = sin(ti); + sj = sin(tj); + sh = sin(th); + + cc = ci * ch; + cs = ci * sh; + sc = si * ch; + ss = si * sh; + + M[i][i] = cj * ch; + M[j][i] = sj * sc - cs; + M[k][i] = sj * cc + ss; + M[i][j] = cj * sh; + M[j][j] = sj * ss + cc; + M[k][j] = sj * cs - sc; + M[i][k] = -sj; + M[j][k] = cj * si; + M[k][k] = cj * ci; } /* returns two euler calculation methods, so we can pick the best */ static void mat3_to_eulo2(float M[3][3], float *e1, float *e2, short order) { - RotOrderInfo *R= GET_ROTATIONORDER_INFO(order); - short i=R->axis[0], j=R->axis[1], k=R->axis[2]; + RotOrderInfo *R = GET_ROTATIONORDER_INFO(order); + short i = R->axis[0], j = R->axis[1], k = R->axis[2]; float m[3][3]; double cy; - + /* process the matrix first */ copy_m3_m3(m, M); normalize_m3(m); - - cy= sqrt(m[i][i]*m[i][i] + m[i][j]*m[i][j]); - - if (cy > 16.0*(double)FLT_EPSILON) { + + cy = sqrt(m[i][i] * m[i][i] + m[i][j] * m[i][j]); + + if (cy > 16.0 * (double)FLT_EPSILON) { e1[i] = atan2(m[j][k], m[k][k]); e1[j] = atan2(-m[i][k], cy); e1[k] = atan2(m[i][j], m[i][i]); - + e2[i] = atan2(-m[j][k], -m[k][k]); e2[j] = atan2(-m[i][k], -cy); e2[k] = atan2(-m[i][j], -m[i][i]); - } + } else { e1[i] = atan2(-m[k][j], m[j][j]); e1[j] = atan2(-m[i][k], cy); e1[k] = 0; - + copy_v3_v3(e2, e1); } - + if (R->parity) { - e1[0] = -e1[0]; - e1[1] = -e1[1]; + e1[0] = -e1[0]; + e1[1] = -e1[1]; e1[2] = -e1[2]; - - e2[0] = -e2[0]; - e2[1] = -e2[1]; + + e2[0] = -e2[0]; + e2[1] = -e2[1]; e2[2] = -e2[2]; } } @@ -1278,23 +1326,22 @@ static void mat3_to_eulo2(float M[3][3], float *e1, float *e2, short order) void eulO_to_mat4(float M[4][4], const float e[3], const short order) { float m[3][3]; - + /* for now, we'll just do this the slow way (i.e. copying matrices) */ normalize_m3(m); - eulO_to_mat3(m,e, order); + eulO_to_mat3(m, e, order); copy_m4_m3(M, m); } - /* Convert 3x3 matrix to Euler angles (in radians). */ -void mat3_to_eulO(float eul[3], const short order,float M[3][3]) +void mat3_to_eulO(float eul[3], const short order, float M[3][3]) { float eul1[3], eul2[3]; - + mat3_to_eulo2(M, eul1, eul2, order); - + /* return best, which is just the one with lowest values it in */ - if (fabs(eul1[0])+fabs(eul1[1])+fabs(eul1[2]) > fabs(eul2[0])+fabs(eul2[1])+fabs(eul2[2])) { + if (fabs(eul1[0]) + fabs(eul1[1]) + fabs(eul1[2]) > fabs(eul2[0]) + fabs(eul2[1]) + fabs(eul2[2])) { copy_v3_v3(eul, eul2); } else { @@ -1303,30 +1350,30 @@ void mat3_to_eulO(float eul[3], const short order,float M[3][3]) } /* Convert 4x4 matrix to Euler angles (in radians). */ -void mat4_to_eulO(float e[3], const short order,float M[4][4]) +void mat4_to_eulO(float e[3], const short order, float M[4][4]) { float m[3][3]; - + /* for now, we'll just do this the slow way (i.e. copying matrices) */ copy_m3_m4(m, M); normalize_m3(m); - mat3_to_eulO(e, order,m); + mat3_to_eulO(e, order, m); } /* uses 2 methods to retrieve eulers, and picks the closest */ -void mat3_to_compatible_eulO(float eul[3], float oldrot[3], short order,float mat[3][3]) +void mat3_to_compatible_eulO(float eul[3], float oldrot[3], short order, float mat[3][3]) { float eul1[3], eul2[3]; float d1, d2; - + mat3_to_eulo2(mat, eul1, eul2, order); - + compatible_eul(eul1, oldrot); compatible_eul(eul2, oldrot); - - d1= fabsf(eul1[0]-oldrot[0]) + fabsf(eul1[1]-oldrot[1]) + fabsf(eul1[2]-oldrot[2]); - d2= fabsf(eul2[0]-oldrot[0]) + fabsf(eul2[1]-oldrot[1]) + fabsf(eul2[2]-oldrot[2]); - + + d1 = fabsf(eul1[0] - oldrot[0]) + fabsf(eul1[1] - oldrot[1]) + fabsf(eul1[2] - oldrot[2]); + d2 = fabsf(eul2[0] - oldrot[0]) + fabsf(eul2[1] - oldrot[1]) + fabsf(eul2[2] - oldrot[2]); + /* return best, which is just the one with lowest difference */ if (d1 > d2) copy_v3_v3(eul, eul2); @@ -1334,10 +1381,10 @@ void mat3_to_compatible_eulO(float eul[3], float oldrot[3], short order,float ma copy_v3_v3(eul, eul1); } -void mat4_to_compatible_eulO(float eul[3], float oldrot[3], short order,float M[4][4]) +void mat4_to_compatible_eulO(float eul[3], float oldrot[3], short order, float M[4][4]) { float m[3][3]; - + /* for now, we'll just do this the slow way (i.e. copying matrices) */ copy_m3_m4(m, M); normalize_m3(m); @@ -1345,47 +1392,48 @@ void mat4_to_compatible_eulO(float eul[3], float oldrot[3], short order,float M[ } /* rotate the given euler by the given angle on the specified axis */ // NOTE: is this safe to do with different axis orders? + void rotate_eulO(float beul[3], short order, char axis, float ang) { float eul[3], mat1[3][3], mat2[3][3], totmat[3][3]; assert(axis >= 'X' && axis <= 'Z'); - eul[0]= eul[1]= eul[2]= 0.0f; - if (axis=='X') - eul[0]= ang; - else if (axis=='Y') - eul[1]= ang; - else - eul[2]= ang; - - eulO_to_mat3(mat1,eul, order); - eulO_to_mat3(mat2,beul, order); - + eul[0] = eul[1] = eul[2] = 0.0f; + if (axis == 'X') + eul[0] = ang; + else if (axis == 'Y') + eul[1] = ang; + else + eul[2] = ang; + + eulO_to_mat3(mat1, eul, order); + eulO_to_mat3(mat2, beul, order); + mul_m3_m3m3(totmat, mat2, mat1); - - mat3_to_eulO(beul, order,totmat); + + mat3_to_eulO(beul, order, totmat); } /* the matrix is written to as 3 axis vectors */ void eulO_to_gimbal_axis(float gmat[][3], const float eul[3], const short order) { - RotOrderInfo *R= GET_ROTATIONORDER_INFO(order); + RotOrderInfo *R = GET_ROTATIONORDER_INFO(order); float mat[3][3]; float teul[3]; /* first axis is local */ - eulO_to_mat3(mat,eul, order); + eulO_to_mat3(mat, eul, order); copy_v3_v3(gmat[R->axis[0]], mat[R->axis[0]]); - + /* second axis is local minus first rotation */ copy_v3_v3(teul, eul); teul[R->axis[0]] = 0; - eulO_to_mat3(mat,teul, order); + eulO_to_mat3(mat, teul, order); copy_v3_v3(gmat[R->axis[1]], mat[R->axis[1]]); - - + + /* Last axis is global */ gmat[R->axis[2]][0] = 0; gmat[R->axis[2]][1] = 0; @@ -1401,7 +1449,7 @@ void eulO_to_gimbal_axis(float gmat[][3], const float eul[3], const short order) * * Version 1.0.0, February 7th, 2007 * - * Copyright (C) 2006-2007 University of Dublin, Trinity College, All Rights + * Copyright (C) 2006-2007 University of Dublin, Trinity College, All Rights * Reserved * * This software is provided 'as-is', without any express or implied @@ -1427,7 +1475,7 @@ void eulO_to_gimbal_axis(float gmat[][3], const float eul[3], const short order) * - added support for scaling */ -void mat4_to_dquat(DualQuat *dq,float basemat[][4], float mat[][4]) +void mat4_to_dquat(DualQuat *dq, float basemat[][4], float mat[][4]) { float *t, *q, dscale[3], scale[3], basequat[4]; float baseRS[4][4], baseinv[4][4], baseR[4][4], baseRinv[4][4]; @@ -1436,16 +1484,18 @@ void mat4_to_dquat(DualQuat *dq,float basemat[][4], float mat[][4]) /* split scaling and rotation, there is probably a faster way to do * this, it's done like this now to correctly get negative scaling */ mult_m4_m4m4(baseRS, mat, basemat); - mat4_to_size(scale,baseRS); + mat4_to_size(scale, baseRS); copy_v3_v3(dscale, scale); - dscale[0] -= 1.0f; dscale[1] -= 1.0f; dscale[2] -= 1.0f; + dscale[0] -= 1.0f; + dscale[1] -= 1.0f; + dscale[2] -= 1.0f; if ((determinant_m4(mat) < 0.0f) || len_v3(dscale) > 1e-4f) { /* extract R and S */ float tmp[4][4]; - /* extra orthogonalize, to avoid flipping with stretched bones */ + /* extra orthogonalize, to avoid flipping with stretched bones */ copy_m4_m4(tmp, baseRS); orthogonalize_m4(tmp, 1); mat4_to_quat(basequat, tmp); @@ -1461,78 +1511,78 @@ void mat4_to_dquat(DualQuat *dq,float basemat[][4], float mat[][4]) /* set scaling part */ mul_serie_m4(dq->scale, basemat, S, baseinv, NULL, NULL, NULL, NULL, NULL); - dq->scale_weight= 1.0f; + dq->scale_weight = 1.0f; } else { /* matrix does not contain scaling */ copy_m4_m4(R, mat); - dq->scale_weight= 0.0f; + dq->scale_weight = 0.0f; } /* non-dual part */ - mat4_to_quat(dq->quat,R); + mat4_to_quat(dq->quat, R); /* dual part */ - t= R[3]; - q= dq->quat; - dq->trans[0]= -0.5f*(t[0]*q[1] + t[1]*q[2] + t[2]*q[3]); - dq->trans[1]= 0.5f*(t[0]*q[0] + t[1]*q[3] - t[2]*q[2]); - dq->trans[2]= 0.5f*(-t[0]*q[3] + t[1]*q[0] + t[2]*q[1]); - dq->trans[3]= 0.5f*(t[0]*q[2] - t[1]*q[1] + t[2]*q[0]); + t = R[3]; + q = dq->quat; + dq->trans[0] = -0.5f * (t[0] * q[1] + t[1] * q[2] + t[2] * q[3]); + dq->trans[1] = 0.5f * (t[0] * q[0] + t[1] * q[3] - t[2] * q[2]); + dq->trans[2] = 0.5f * (-t[0] * q[3] + t[1] * q[0] + t[2] * q[1]); + dq->trans[3] = 0.5f * (t[0] * q[2] - t[1] * q[1] + t[2] * q[0]); } void dquat_to_mat4(float mat[][4], DualQuat *dq) { float len, *t, q0[4]; - + /* regular quaternion */ copy_qt_qt(q0, dq->quat); /* normalize */ - len= (float)sqrt(dot_qtqt(q0, q0)); + len = (float)sqrt(dot_qtqt(q0, q0)); if (len != 0.0f) - mul_qt_fl(q0, 1.0f/len); - + mul_qt_fl(q0, 1.0f / len); + /* rotation */ - quat_to_mat4(mat,q0); + quat_to_mat4(mat, q0); /* translation */ - t= dq->trans; - mat[3][0]= 2.0f*(-t[0]*q0[1] + t[1]*q0[0] - t[2]*q0[3] + t[3]*q0[2]); - mat[3][1]= 2.0f*(-t[0]*q0[2] + t[1]*q0[3] + t[2]*q0[0] - t[3]*q0[1]); - mat[3][2]= 2.0f*(-t[0]*q0[3] - t[1]*q0[2] + t[2]*q0[1] + t[3]*q0[0]); + t = dq->trans; + mat[3][0] = 2.0f * (-t[0] * q0[1] + t[1] * q0[0] - t[2] * q0[3] + t[3] * q0[2]); + mat[3][1] = 2.0f * (-t[0] * q0[2] + t[1] * q0[3] + t[2] * q0[0] - t[3] * q0[1]); + mat[3][2] = 2.0f * (-t[0] * q0[3] - t[1] * q0[2] + t[2] * q0[1] + t[3] * q0[0]); /* note: this does not handle scaling */ -} +} void add_weighted_dq_dq(DualQuat *dqsum, DualQuat *dq, float weight) { - int flipped= 0; + int flipped = 0; /* make sure we interpolate quats in the right direction */ if (dot_qtqt(dq->quat, dqsum->quat) < 0) { - flipped= 1; - weight= -weight; + flipped = 1; + weight = -weight; } /* interpolate rotation and translation */ - dqsum->quat[0] += weight*dq->quat[0]; - dqsum->quat[1] += weight*dq->quat[1]; - dqsum->quat[2] += weight*dq->quat[2]; - dqsum->quat[3] += weight*dq->quat[3]; + dqsum->quat[0] += weight * dq->quat[0]; + dqsum->quat[1] += weight * dq->quat[1]; + dqsum->quat[2] += weight * dq->quat[2]; + dqsum->quat[3] += weight * dq->quat[3]; - dqsum->trans[0] += weight*dq->trans[0]; - dqsum->trans[1] += weight*dq->trans[1]; - dqsum->trans[2] += weight*dq->trans[2]; - dqsum->trans[3] += weight*dq->trans[3]; + dqsum->trans[0] += weight * dq->trans[0]; + dqsum->trans[1] += weight * dq->trans[1]; + dqsum->trans[2] += weight * dq->trans[2]; + dqsum->trans[3] += weight * dq->trans[3]; /* interpolate scale - but only if needed */ if (dq->scale_weight) { float wmat[4][4]; - - if (flipped) /* we don't want negative weights for scaling */ - weight= -weight; - + + if (flipped) /* we don't want negative weights for scaling */ + weight = -weight; + copy_m4_m4(wmat, dq->scale); mul_m4_fl(wmat, weight); add_m4_m4m4(dqsum->scale, dqsum->scale, wmat); @@ -1542,14 +1592,14 @@ void add_weighted_dq_dq(DualQuat *dqsum, DualQuat *dq, float weight) void normalize_dq(DualQuat *dq, float totweight) { - float scale= 1.0f/totweight; + float scale = 1.0f / totweight; mul_qt_fl(dq->quat, scale); mul_qt_fl(dq->trans, scale); - + if (dq->scale_weight) { - float addweight= totweight - dq->scale_weight; - + float addweight = totweight - dq->scale_weight; + if (addweight) { dq->scale[0][0] += addweight; dq->scale[1][1] += addweight; @@ -1558,47 +1608,47 @@ void normalize_dq(DualQuat *dq, float totweight) } mul_m4_fl(dq->scale, scale); - dq->scale_weight= 1.0f; + dq->scale_weight = 1.0f; } } -void mul_v3m3_dq(float *co, float mat[][3],DualQuat *dq) -{ +void mul_v3m3_dq(float *co, float mat[][3], DualQuat *dq) +{ float M[3][3], t[3], scalemat[3][3], len2; - float w= dq->quat[0], x= dq->quat[1], y= dq->quat[2], z= dq->quat[3]; - float t0= dq->trans[0], t1= dq->trans[1], t2= dq->trans[2], t3= dq->trans[3]; - + float w = dq->quat[0], x = dq->quat[1], y = dq->quat[2], z = dq->quat[3]; + float t0 = dq->trans[0], t1 = dq->trans[1], t2 = dq->trans[2], t3 = dq->trans[3]; + /* rotation matrix */ - M[0][0]= w*w + x*x - y*y - z*z; - M[1][0]= 2*(x*y - w*z); - M[2][0]= 2*(x*z + w*y); - - M[0][1]= 2*(x*y + w*z); - M[1][1]= w*w + y*y - x*x - z*z; - M[2][1]= 2*(y*z - w*x); - - M[0][2]= 2*(x*z - w*y); - M[1][2]= 2*(y*z + w*x); - M[2][2]= w*w + z*z - x*x - y*y; - - len2= dot_qtqt(dq->quat, dq->quat); + M[0][0] = w * w + x * x - y * y - z * z; + M[1][0] = 2 * (x * y - w * z); + M[2][0] = 2 * (x * z + w * y); + + M[0][1] = 2 * (x * y + w * z); + M[1][1] = w * w + y * y - x * x - z * z; + M[2][1] = 2 * (y * z - w * x); + + M[0][2] = 2 * (x * z - w * y); + M[1][2] = 2 * (y * z + w * x); + M[2][2] = w * w + z * z - x * x - y * y; + + len2 = dot_qtqt(dq->quat, dq->quat); if (len2 > 0.0f) - len2= 1.0f/len2; - + len2 = 1.0f / len2; + /* translation */ - t[0]= 2*(-t0*x + w*t1 - t2*z + y*t3); - t[1]= 2*(-t0*y + t1*z - x*t3 + w*t2); - t[2]= 2*(-t0*z + x*t2 + w*t3 - t1*y); + t[0] = 2 * (-t0 * x + w * t1 - t2 * z + y * t3); + t[1] = 2 * (-t0 * y + t1 * z - x * t3 + w * t2); + t[2] = 2 * (-t0 * z + x * t2 + w * t3 - t1 * y); /* apply scaling */ if (dq->scale_weight) mul_m4_v3(dq->scale, co); - + /* apply rotation and translation */ mul_m3_v3(M, co); - co[0]= (co[0] + t[0])*len2; - co[1]= (co[1] + t[1])*len2; - co[2]= (co[2] + t[2])*len2; + co[0] = (co[0] + t[0]) * len2; + co[1] = (co[1] + t[1]) * len2; + co[2] = (co[2] + t[2]) * len2; /* compute crazyspace correction mat */ if (mat) { @@ -1619,85 +1669,85 @@ void copy_dq_dq(DualQuat *dq1, DualQuat *dq2) /* axis matches eTrackToAxis_Modes */ void quat_apply_track(float quat[4], short axis, short upflag) -{ +{ /* rotations are hard coded to match vec_to_quat */ - const float quat_track[][4]= {{0.70710676908493, 0.0, -0.70710676908493, 0.0}, /* pos-y90 */ - {0.5, 0.5, 0.5, 0.5}, /* Quaternion((1,0,0), radians(90)) * Quaternion((0,1,0), radians(90)) */ - {0.70710676908493, 0.0, 0.0, 0.70710676908493}, /* pos-z90 */ - {0.70710676908493, 0.0, 0.70710676908493, 0.0}, /* neg-y90 */ - {0.5, -0.5, -0.5, 0.5}, /* Quaternion((1,0,0), radians(-90)) * Quaternion((0,1,0), radians(-90)) */ - {-3.0908619663705394e-08, 0.70710676908493, 0.70710676908493, 3.0908619663705394e-08}}; /* no rotation */ + const float quat_track[][4] = { + {0.70710676908493, 0.0, -0.70710676908493, 0.0}, /* pos-y90 */ + {0.5, 0.5, 0.5, 0.5}, /* Quaternion((1,0,0), radians(90)) * Quaternion((0,1,0), radians(90)) */ + {0.70710676908493, 0.0, 0.0, 0.70710676908493}, /* pos-z90 */ + {0.70710676908493, 0.0, 0.70710676908493, 0.0}, /* neg-y90 */ + {0.5, -0.5, -0.5, 0.5}, /* Quaternion((1,0,0), radians(-90)) * Quaternion((0,1,0), radians(-90)) */ + {-3.0908619663705394e-08, 0.70710676908493, 0.70710676908493, 3.0908619663705394e-08}}; /* no rotation */ assert(axis >= 0 && axis <= 5); assert(upflag >= 0 && upflag <= 2); - + mul_qt_qtqt(quat, quat, quat_track[axis]); - if (axis>2) - axis= axis-3; + if (axis > 2) + axis = axis - 3; /* there are 2 possible up-axis for each axis used, the 'quat_track' applies so the first * up axis is used X->Y, Y->X, Z->X, if this first up axis isn used then rotate 90d * the strange bit shift below just find the low axis {X:Y, Y:X, Z:X} */ - if (upflag != (2-axis)>>1) { - float q[4]= {0.70710676908493, 0.0, 0.0, 0.0}; /* assign 90d rotation axis */ - q[axis+1] = ((axis==1)) ? 0.70710676908493 : -0.70710676908493; /* flip non Y axis */ + if (upflag != (2 - axis) >> 1) { + float q[4] = {0.70710676908493, 0.0, 0.0, 0.0}; /* assign 90d rotation axis */ + q[axis + 1] = ((axis == 1)) ? 0.70710676908493 : -0.70710676908493; /* flip non Y axis */ mul_qt_qtqt(quat, quat, q); } } - void vec_apply_track(float vec[3], short axis) { float tvec[3]; assert(axis >= 0 && axis <= 5); - + copy_v3_v3(tvec, vec); - switch(axis) { - case 0: /* pos-x */ - /* vec[0]= 0.0; */ - vec[1]= tvec[2]; - vec[2]= -tvec[1]; - break; - case 1: /* pos-y */ - /* vec[0]= tvec[0]; */ - /* vec[1]= 0.0; */ - /* vec[2]= tvec[2]; */ - break; - case 2: /* pos-z */ - /* vec[0]= tvec[0]; */ - /* vec[1]= tvec[1]; */ - // vec[2]= 0.0; */ - break; - case 3: /* neg-x */ - /* vec[0]= 0.0; */ - vec[1]= tvec[2]; - vec[2]= -tvec[1]; - break; - case 4: /* neg-y */ - vec[0]= -tvec[2]; - /* vec[1]= 0.0; */ - vec[2]= tvec[0]; - break; - case 5: /* neg-z */ - vec[0]= -tvec[0]; - vec[1]= -tvec[1]; - /* vec[2]= 0.0; */ - break; + switch (axis) { + case 0: /* pos-x */ + /* vec[0]= 0.0; */ + vec[1] = tvec[2]; + vec[2] = -tvec[1]; + break; + case 1: /* pos-y */ + /* vec[0]= tvec[0]; */ + /* vec[1]= 0.0; */ + /* vec[2]= tvec[2]; */ + break; + case 2: /* pos-z */ + /* vec[0]= tvec[0]; */ + /* vec[1]= tvec[1]; */ + // vec[2]= 0.0; */ + break; + case 3: /* neg-x */ + /* vec[0]= 0.0; */ + vec[1] = tvec[2]; + vec[2] = -tvec[1]; + break; + case 4: /* neg-y */ + vec[0] = -tvec[2]; + /* vec[1]= 0.0; */ + vec[2] = tvec[0]; + break; + case 5: /* neg-z */ + vec[0] = -tvec[0]; + vec[1] = -tvec[1]; + /* vec[2]= 0.0; */ + break; } } /* lens/angle conversion (radians) */ float focallength_to_fov(float focal_length, float sensor) { - return 2.0f * atanf((sensor/2.0f) / focal_length); + return 2.0f * atanf((sensor / 2.0f) / focal_length); } float fov_to_focallength(float hfov, float sensor) { - return (sensor/2.0f) / tanf(hfov * 0.5f); + return (sensor / 2.0f) / tanf(hfov * 0.5f); } /* 'mod_inline(-3,4)= 1', 'fmod(-3,4)= -3' */ @@ -1708,7 +1758,7 @@ static float mod_inline(float a, float b) float angle_wrap_rad(float angle) { - return mod_inline(angle + (float)M_PI, (float)M_PI*2.0f) - (float)M_PI; + return mod_inline(angle + (float)M_PI, (float)M_PI * 2.0f) - (float)M_PI; } float angle_wrap_deg(float angle) diff --git a/source/blender/blenlib/intern/math_vector.c b/source/blender/blenlib/intern/math_vector.c index 63094d9cfd0..fcab5e75f39 100644 --- a/source/blender/blenlib/intern/math_vector.c +++ b/source/blender/blenlib/intern/math_vector.c @@ -35,78 +35,78 @@ void interp_v2_v2v2(float target[2], const float a[2], const float b[2], const float t) { - float s = 1.0f-t; + float s = 1.0f - t; - target[0]= s*a[0] + t*b[0]; - target[1]= s*a[1] + t*b[1]; + target[0] = s * a[0] + t * b[0]; + target[1] = s * a[1] + t * b[1]; } /* weight 3 2D vectors, * 'w' must be unit length but is not a vector, just 3 weights */ void interp_v2_v2v2v2(float p[2], const float v1[2], const float v2[2], const float v3[2], const float w[3]) { - p[0] = v1[0]*w[0] + v2[0]*w[1] + v3[0]*w[2]; - p[1] = v1[1]*w[0] + v2[1]*w[1] + v3[1]*w[2]; + p[0] = v1[0] * w[0] + v2[0] * w[1] + v3[0] * w[2]; + p[1] = v1[1] * w[0] + v2[1] * w[1] + v3[1] * w[2]; } void interp_v3_v3v3(float target[3], const float a[3], const float b[3], const float t) { - float s = 1.0f-t; + float s = 1.0f - t; - target[0]= s*a[0] + t*b[0]; - target[1]= s*a[1] + t*b[1]; - target[2]= s*a[2] + t*b[2]; + target[0] = s * a[0] + t * b[0]; + target[1] = s * a[1] + t * b[1]; + target[2] = s * a[2] + t * b[2]; } void interp_v4_v4v4(float target[4], const float a[4], const float b[4], const float t) { - float s = 1.0f-t; + float s = 1.0f - t; - target[0]= s*a[0] + t*b[0]; - target[1]= s*a[1] + t*b[1]; - target[2]= s*a[2] + t*b[2]; - target[3]= s*a[3] + t*b[3]; + target[0] = s * a[0] + t * b[0]; + target[1] = s * a[1] + t * b[1]; + target[2] = s * a[2] + t * b[2]; + target[3] = s * a[3] + t * b[3]; } /* weight 3 vectors, * 'w' must be unit length but is not a vector, just 3 weights */ void interp_v3_v3v3v3(float p[3], const float v1[3], const float v2[3], const float v3[3], const float w[3]) { - p[0] = v1[0]*w[0] + v2[0]*w[1] + v3[0]*w[2]; - p[1] = v1[1]*w[0] + v2[1]*w[1] + v3[1]*w[2]; - p[2] = v1[2]*w[0] + v2[2]*w[1] + v3[2]*w[2]; + p[0] = v1[0] * w[0] + v2[0] * w[1] + v3[0] * w[2]; + p[1] = v1[1] * w[0] + v2[1] * w[1] + v3[1] * w[2]; + p[2] = v1[2] * w[0] + v2[2] * w[1] + v3[2] * w[2]; } /* weight 3 vectors, * 'w' must be unit length but is not a vector, just 4 weights */ void interp_v3_v3v3v3v3(float p[3], const float v1[3], const float v2[3], const float v3[3], const float v4[3], const float w[4]) { - p[0] = v1[0]*w[0] + v2[0]*w[1] + v3[0]*w[2] + v4[0]*w[3]; - p[1] = v1[1]*w[0] + v2[1]*w[1] + v3[1]*w[2] + v4[1]*w[3]; - p[2] = v1[2]*w[0] + v2[2]*w[1] + v3[2]*w[2] + v4[2]*w[3]; + p[0] = v1[0] * w[0] + v2[0] * w[1] + v3[0] * w[2] + v4[0] * w[3]; + p[1] = v1[1] * w[0] + v2[1] * w[1] + v3[1] * w[2] + v4[1] * w[3]; + p[2] = v1[2] * w[0] + v2[2] * w[1] + v3[2] * w[2] + v4[2] * w[3]; } void interp_v4_v4v4v4(float p[4], const float v1[4], const float v2[4], const float v3[4], const float w[3]) { - p[0] = v1[0]*w[0] + v2[0]*w[1] + v3[0]*w[2]; - p[1] = v1[1]*w[0] + v2[1]*w[1] + v3[1]*w[2]; - p[2] = v1[2]*w[0] + v2[2]*w[1] + v3[2]*w[2]; - p[3] = v1[3]*w[0] + v2[3]*w[1] + v3[3]*w[2]; + p[0] = v1[0] * w[0] + v2[0] * w[1] + v3[0] * w[2]; + p[1] = v1[1] * w[0] + v2[1] * w[1] + v3[1] * w[2]; + p[2] = v1[2] * w[0] + v2[2] * w[1] + v3[2] * w[2]; + p[3] = v1[3] * w[0] + v2[3] * w[1] + v3[3] * w[2]; } void interp_v4_v4v4v4v4(float p[4], const float v1[4], const float v2[4], const float v3[4], const float v4[4], const float w[4]) { - p[0] = v1[0]*w[0] + v2[0]*w[1] + v3[0]*w[2] + v4[0]*w[3]; - p[1] = v1[1]*w[0] + v2[1]*w[1] + v3[1]*w[2] + v4[1]*w[3]; - p[2] = v1[2]*w[0] + v2[2]*w[1] + v3[2]*w[2] + v4[2]*w[3]; - p[3] = v1[3]*w[0] + v2[3]*w[1] + v3[3]*w[2] + v4[3]*w[3]; + p[0] = v1[0] * w[0] + v2[0] * w[1] + v3[0] * w[2] + v4[0] * w[3]; + p[1] = v1[1] * w[0] + v2[1] * w[1] + v3[1] * w[2] + v4[1] * w[3]; + p[2] = v1[2] * w[0] + v2[2] * w[1] + v3[2] * w[2] + v4[2] * w[3]; + p[3] = v1[3] * w[0] + v2[3] * w[1] + v3[3] * w[2] + v4[3] * w[3]; } void mid_v3_v3v3(float v[3], const float v1[3], const float v2[3]) { - v[0]= 0.5f*(v1[0] + v2[0]); - v[1]= 0.5f*(v1[1] + v2[1]); - v[2]= 0.5f*(v1[2] + v2[2]); + v[0] = 0.5f * (v1[0] + v2[0]); + v[1] = 0.5f * (v1[1] + v2[1]); + v[2] = 0.5f * (v1[2] + v2[2]); } /********************************** Angles ***********************************/ @@ -145,12 +145,12 @@ float angle_v2v2v2(const float v1[2], const float v2[2], const float v3[2]) { float vec1[2], vec2[2]; - vec1[0] = v2[0]-v1[0]; - vec1[1] = v2[1]-v1[1]; - - vec2[0] = v2[0]-v3[0]; - vec2[1] = v2[1]-v3[1]; - + vec1[0] = v2[0] - v1[0]; + vec1[1] = v2[1] - v1[1]; + + vec2[0] = v2[0] - v3[0]; + vec2[1] = v2[1] - v3[1]; + normalize_v2(vec1); normalize_v2(vec2); @@ -185,15 +185,15 @@ float angle_normalized_v3v3(const float v1[3], const float v2[3]) /* this is the same as acos(dot_v3v3(v1, v2)), but more accurate */ if (dot_v3v3(v1, v2) < 0.0f) { float vec[3]; - - vec[0]= -v2[0]; - vec[1]= -v2[1]; - vec[2]= -v2[2]; - - return (float)M_PI - 2.0f*(float)saasin(len_v3v3(vec, v1)/2.0f); + + vec[0] = -v2[0]; + vec[1] = -v2[1]; + vec[2] = -v2[2]; + + return (float)M_PI - 2.0f * (float)saasin(len_v3v3(vec, v1) / 2.0f); } else - return 2.0f*(float)saasin(len_v3v3(v2, v1)/2.0f); + return 2.0f * (float)saasin(len_v3v3(v2, v1) / 2.0f); } float angle_normalized_v2v2(const float v1[2], const float v2[2]) @@ -201,14 +201,14 @@ float angle_normalized_v2v2(const float v1[2], const float v2[2]) /* this is the same as acos(dot_v3v3(v1, v2)), but more accurate */ if (dot_v2v2(v1, v2) < 0.0f) { float vec[2]; - - vec[0]= -v2[0]; - vec[1]= -v2[1]; - - return (float)M_PI - 2.0f*saasin(len_v2v2(vec, v1)/2.0f); + + vec[0] = -v2[0]; + vec[1] = -v2[1]; + + return (float)M_PI - 2.0f * saasin(len_v2v2(vec, v1) / 2.0f); } else - return 2.0f*(float)saasin(len_v2v2(v2, v1)/2.0f); + return 2.0f * (float)saasin(len_v2v2(v2, v1) / 2.0f); } void angle_tri_v3(float angles[3], const float v1[3], const float v2[3], const float v3[3]) @@ -223,10 +223,10 @@ void angle_tri_v3(float angles[3], const float v1[3], const float v2[3], const f normalize_v3(ed2); normalize_v3(ed3); - angles[0]= (float)M_PI - angle_normalized_v3v3(ed1, ed2); - angles[1]= (float)M_PI - angle_normalized_v3v3(ed2, ed3); + angles[0] = (float)M_PI - angle_normalized_v3v3(ed1, ed2); + angles[1] = (float)M_PI - angle_normalized_v3v3(ed2, ed3); // face_angles[2] = M_PI - angle_normalized_v3v3(ed3, ed1); - angles[2]= (float)M_PI - (angles[0] + angles[1]); + angles[2] = (float)M_PI - (angles[0] + angles[1]); } void angle_quad_v3(float angles[4], const float v1[3], const float v2[3], const float v3[3], const float v4[3]) @@ -243,10 +243,10 @@ void angle_quad_v3(float angles[4], const float v1[3], const float v2[3], const normalize_v3(ed3); normalize_v3(ed4); - angles[0]= (float)M_PI - angle_normalized_v3v3(ed1, ed2); - angles[1]= (float)M_PI - angle_normalized_v3v3(ed2, ed3); - angles[2]= (float)M_PI - angle_normalized_v3v3(ed3, ed4); - angles[3]= (float)M_PI - angle_normalized_v3v3(ed4, ed1); + angles[0] = (float)M_PI - angle_normalized_v3v3(ed1, ed2); + angles[1] = (float)M_PI - angle_normalized_v3v3(ed2, ed3); + angles[2] = (float)M_PI - angle_normalized_v3v3(ed3, ed4); + angles[3] = (float)M_PI - angle_normalized_v3v3(ed4, ed1); } void angle_poly_v3(float *angles, const float *verts[3], int len) @@ -254,12 +254,12 @@ void angle_poly_v3(float *angles, const float *verts[3], int len) int i; float vec[3][3]; - sub_v3_v3v3(vec[2], verts[len-1], verts[0]); + sub_v3_v3v3(vec[2], verts[len - 1], verts[0]); normalize_v3(vec[2]); for (i = 0; i < len; i++) { - sub_v3_v3v3(vec[i%3], verts[i%len], verts[(i+1)%len]); - normalize_v3(vec[i%3]); - angles[i] = (float)M_PI - angle_normalized_v3v3(vec[(i+2)%3], vec[i%3]); + sub_v3_v3v3(vec[i % 3], verts[i % len], verts[(i + 1) % len]); + normalize_v3(vec[i % 3]); + angles[i] = (float)M_PI - angle_normalized_v3v3(vec[(i + 2) % 3], vec[i % 3]); } } @@ -280,7 +280,7 @@ void project_v3_v3v3(float c[3], const float v1[3], const float v2[3]) { float mul; mul = dot_v3v3(v1, v2) / dot_v3v3(v2, v2); - + c[0] = mul * v2[0]; c[1] = mul * v2[1]; c[2] = mul * v2[2]; @@ -321,7 +321,7 @@ void reflect_v3_v3v3(float out[3], const float v1[3], const float v2[3]) void ortho_basis_v3v3_v3(float v1[3], float v2[3], const float v[3]) { - const float f = (float)sqrt(v[0]*v[0] + v[1]*v[1]); + const float f = (float)sqrt(v[0] * v[0] + v[1] * v[1]); if (f < 1e-35f) { // degenerate case @@ -329,15 +329,15 @@ void ortho_basis_v3v3_v3(float v1[3], float v2[3], const float v[3]) v1[1] = v1[2] = v2[0] = v2[2] = 0.0f; v2[1] = 1.0f; } - else { - const float d= 1.0f/f; + else { + const float d = 1.0f / f; - v1[0] = v[1]*d; - v1[1] = -v[0]*d; + v1[0] = v[1] * d; + v1[1] = -v[0] * d; v1[2] = 0.0f; - v2[0] = -v[2]*v1[1]; - v2[1] = v[2]*v1[0]; - v2[2] = v[0]*v1[1] - v[1]*v1[0]; + v2[0] = -v[2] * v1[1]; + v2[1] = v[2] * v1[0]; + v2[2] = v[0] * v1[1] - v[1] * v1[0]; } } @@ -346,20 +346,20 @@ void ortho_basis_v3v3_v3(float v1[3], float v2[3], const float v[3]) */ void rotate_normalized_v3_v3v3fl(float r[3], const float p[3], const float axis[3], const float angle) { - const float costheta= cos(angle); - const float sintheta= sin(angle); + const float costheta = cos(angle); + const float sintheta = sin(angle); - r[0]= ((costheta + (1 - costheta) * axis[0] * axis[0]) * p[0]) + - (((1 - costheta) * axis[0] * axis[1] - axis[2] * sintheta) * p[1]) + - (((1 - costheta) * axis[0] * axis[2] + axis[1] * sintheta) * p[2]); + r[0] = ((costheta + (1 - costheta) * axis[0] * axis[0]) * p[0]) + + (((1 - costheta) * axis[0] * axis[1] - axis[2] * sintheta) * p[1]) + + (((1 - costheta) * axis[0] * axis[2] + axis[1] * sintheta) * p[2]); - r[1]= (((1 - costheta) * axis[0] * axis[1] + axis[2] * sintheta) * p[0]) + - ((costheta + (1 - costheta) * axis[1] * axis[1]) * p[1]) + - (((1 - costheta) * axis[1] * axis[2] - axis[0] * sintheta) * p[2]); + r[1] = (((1 - costheta) * axis[0] * axis[1] + axis[2] * sintheta) * p[0]) + + ((costheta + (1 - costheta) * axis[1] * axis[1]) * p[1]) + + (((1 - costheta) * axis[1] * axis[2] - axis[0] * sintheta) * p[2]); - r[2]= (((1 - costheta) * axis[0] * axis[2] - axis[1] * sintheta) * p[0]) + - (((1 - costheta) * axis[1] * axis[2] + axis[0] * sintheta) * p[1]) + - ((costheta + (1 - costheta) * axis[2] * axis[2]) * p[2]); + r[2] = (((1 - costheta) * axis[0] * axis[2] - axis[1] * sintheta) * p[0]) + + (((1 - costheta) * axis[1] * axis[2] + axis[0] * sintheta) * p[1]) + + ((costheta + (1 - costheta) * axis[2] * axis[2]) * p[2]); } void rotate_v3_v3v3fl(float r[3], const float p[3], const float axis[3], const float angle) @@ -390,39 +390,40 @@ void print_v4(const char *str, const float v[4]) void minmax_v3v3_v3(float min[3], float max[3], const float vec[3]) { - if (min[0]>vec[0]) min[0]= vec[0]; - if (min[1]>vec[1]) min[1]= vec[1]; - if (min[2]>vec[2]) min[2]= vec[2]; + if (min[0] > vec[0]) min[0] = vec[0]; + if (min[1] > vec[1]) min[1] = vec[1]; + if (min[2] > vec[2]) min[2] = vec[2]; - if (max[0] 1.0e-35) { - d_sqrt= (float)sqrt(d); - mul_vn_vn_fl(array_tar, array_src, size, 1.0f/d_sqrt); + d_sqrt = (float)sqrt(d); + mul_vn_vn_fl(array_tar, array_src, size, 1.0f / d_sqrt); } else { fill_vn_fl(array_tar, size, 0.0f); - d_sqrt= 0.0f; + d_sqrt = 0.0f; } return d_sqrt; } @@ -434,16 +435,18 @@ float normalize_vn(float *array_tar, const int size) void range_vn_i(int *array_tar, const int size, const int start) { - int *array_pt= array_tar + (size-1); - int j= start + (size-1); - int i= size; - while (i--) { *(array_pt--) = j--; } + int *array_pt = array_tar + (size - 1); + int j = start + (size - 1); + int i = size; + while (i--) { + *(array_pt--) = j--; + } } void range_vn_fl(float *array_tar, const int size, const float start, const float step) { - float *array_pt= array_tar + (size-1); - int i= size; + float *array_pt = array_tar + (size - 1); + int i = size; while (i--) { *(array_pt--) = start + step * (float)(i); } @@ -451,78 +454,98 @@ void range_vn_fl(float *array_tar, const int size, const float start, const floa void negate_vn(float *array_tar, const int size) { - float *array_pt= array_tar + (size-1); - int i= size; - while (i--) { *(array_pt--) *= -1.0f; } + float *array_pt = array_tar + (size - 1); + int i = size; + while (i--) { + *(array_pt--) *= -1.0f; + } } void negate_vn_vn(float *array_tar, const float *array_src, const int size) { - float *tar= array_tar + (size-1); - const float *src= array_src + (size-1); - int i= size; - while (i--) { *(tar--) = - *(src--); } + float *tar = array_tar + (size - 1); + const float *src = array_src + (size - 1); + int i = size; + while (i--) { + *(tar--) = - *(src--); + } } void mul_vn_fl(float *array_tar, const int size, const float f) { - float *array_pt= array_tar + (size-1); - int i= size; - while (i--) { *(array_pt--) *= f; } + float *array_pt = array_tar + (size - 1); + int i = size; + while (i--) { + *(array_pt--) *= f; + } } void mul_vn_vn_fl(float *array_tar, const float *array_src, const int size, const float f) { - float *tar= array_tar + (size-1); - const float *src= array_src + (size-1); - int i= size; - while (i--) { *(tar--) = *(src--) * f; } + float *tar = array_tar + (size - 1); + const float *src = array_src + (size - 1); + int i = size; + while (i--) { + *(tar--) = *(src--) * f; + } } void add_vn_vn(float *array_tar, const float *array_src, const int size) { - float *tar= array_tar + (size-1); - const float *src= array_src + (size-1); - int i= size; - while (i--) { *(tar--) += *(src--); } + float *tar = array_tar + (size - 1); + const float *src = array_src + (size - 1); + int i = size; + while (i--) { + *(tar--) += *(src--); + } } void add_vn_vnvn(float *array_tar, const float *array_src_a, const float *array_src_b, const int size) { - float *tar= array_tar + (size-1); - const float *src_a= array_src_a + (size-1); - const float *src_b= array_src_b + (size-1); - int i= size; - while (i--) { *(tar--) = *(src_a--) + *(src_b--); } + float *tar = array_tar + (size - 1); + const float *src_a = array_src_a + (size - 1); + const float *src_b = array_src_b + (size - 1); + int i = size; + while (i--) { + *(tar--) = *(src_a--) + *(src_b--); + } } void sub_vn_vn(float *array_tar, const float *array_src, const int size) { - float *tar= array_tar + (size-1); - const float *src= array_src + (size-1); - int i= size; - while (i--) { *(tar--) -= *(src--); } + float *tar = array_tar + (size - 1); + const float *src = array_src + (size - 1); + int i = size; + while (i--) { + *(tar--) -= *(src--); + } } void sub_vn_vnvn(float *array_tar, const float *array_src_a, const float *array_src_b, const int size) { - float *tar= array_tar + (size-1); - const float *src_a= array_src_a + (size-1); - const float *src_b= array_src_b + (size-1); - int i= size; - while (i--) { *(tar--) = *(src_a--) - *(src_b--); } + float *tar = array_tar + (size - 1); + const float *src_a = array_src_a + (size - 1); + const float *src_b = array_src_b + (size - 1); + int i = size; + while (i--) { + *(tar--) = *(src_a--) - *(src_b--); + } } void fill_vn_i(int *array_tar, const int size, const int val) { - int *tar= array_tar + (size-1); - int i= size; - while (i--) { *(tar--) = val; } + int *tar = array_tar + (size - 1); + int i = size; + while (i--) { + *(tar--) = val; + } } void fill_vn_fl(float *array_tar, const int size, const float val) { - float *tar= array_tar + (size-1); - int i= size; - while (i--) { *(tar--) = val; } + float *tar = array_tar + (size - 1); + int i = size; + while (i--) { + *(tar--) = val; + } } diff --git a/source/blender/blenlib/intern/math_vector_inline.c b/source/blender/blenlib/intern/math_vector_inline.c index 9c26c1ee79a..f1ab77a10e9 100644 --- a/source/blender/blenlib/intern/math_vector_inline.c +++ b/source/blender/blenlib/intern/math_vector_inline.c @@ -37,131 +37,131 @@ MINLINE void zero_v2(float r[2]) { - r[0]= 0.0f; - r[1]= 0.0f; + r[0] = 0.0f; + r[1] = 0.0f; } MINLINE void zero_v3(float r[3]) { - r[0]= 0.0f; - r[1]= 0.0f; - r[2]= 0.0f; + r[0] = 0.0f; + r[1] = 0.0f; + r[2] = 0.0f; } MINLINE void zero_v4(float r[4]) { - r[0]= 0.0f; - r[1]= 0.0f; - r[2]= 0.0f; - r[3]= 0.0f; + r[0] = 0.0f; + r[1] = 0.0f; + r[2] = 0.0f; + r[3] = 0.0f; } MINLINE void copy_v2_v2(float r[2], const float a[2]) { - r[0]= a[0]; - r[1]= a[1]; + r[0] = a[0]; + r[1] = a[1]; } MINLINE void copy_v3_v3(float r[3], const float a[3]) { - r[0]= a[0]; - r[1]= a[1]; - r[2]= a[2]; + r[0] = a[0]; + r[1] = a[1]; + r[2] = a[2]; } MINLINE void copy_v4_v4(float r[4], const float a[4]) { - r[0]= a[0]; - r[1]= a[1]; - r[2]= a[2]; - r[3]= a[3]; + r[0] = a[0]; + r[1] = a[1]; + r[2] = a[2]; + r[3] = a[3]; } MINLINE void copy_v2_fl(float r[2], float f) { - r[0]= f; - r[1]= f; + r[0] = f; + r[1] = f; } MINLINE void copy_v3_fl(float r[3], float f) { - r[0]= f; - r[1]= f; - r[2]= f; + r[0] = f; + r[1] = f; + r[2] = f; } MINLINE void copy_v4_fl(float r[4], float f) { - r[0]= f; - r[1]= f; - r[2]= f; - r[3]= f; + r[0] = f; + r[1] = f; + r[2] = f; + r[3] = f; } /* short */ MINLINE void copy_v2_v2_char(char r[2], const char a[2]) { - r[0]= a[0]; - r[1]= a[1]; + r[0] = a[0]; + r[1] = a[1]; } MINLINE void copy_v3_v3_char(char r[3], const char a[3]) { - r[0]= a[0]; - r[1]= a[1]; - r[2]= a[2]; + r[0] = a[0]; + r[1] = a[1]; + r[2] = a[2]; } MINLINE void copy_v4_v4_char(char r[4], const char a[4]) { - r[0]= a[0]; - r[1]= a[1]; - r[2]= a[2]; - r[3]= a[3]; + r[0] = a[0]; + r[1] = a[1]; + r[2] = a[2]; + r[3] = a[3]; } /* short */ MINLINE void copy_v2_v2_short(short r[2], const short a[2]) { - r[0]= a[0]; - r[1]= a[1]; + r[0] = a[0]; + r[1] = a[1]; } MINLINE void copy_v3_v3_short(short r[3], const short a[3]) { - r[0]= a[0]; - r[1]= a[1]; - r[2]= a[2]; + r[0] = a[0]; + r[1] = a[1]; + r[2] = a[2]; } MINLINE void copy_v4_v4_short(short r[4], const short a[4]) { - r[0]= a[0]; - r[1]= a[1]; - r[2]= a[2]; - r[3]= a[3]; + r[0] = a[0]; + r[1] = a[1]; + r[2] = a[2]; + r[3] = a[3]; } /* int */ MINLINE void copy_v2_v2_int(int r[2], const int a[2]) { - r[0]= a[0]; - r[1]= a[1]; + r[0] = a[0]; + r[1] = a[1]; } MINLINE void copy_v3_v3_int(int r[3], const int a[3]) { - r[0]= a[0]; - r[1]= a[1]; - r[2]= a[2]; + r[0] = a[0]; + r[1] = a[1]; + r[2] = a[2]; } MINLINE void copy_v4_v4_int(int r[4], const int a[4]) { - r[0]= a[0]; - r[1]= a[1]; - r[2]= a[2]; - r[3]= a[3]; + r[0] = a[0]; + r[1] = a[1]; + r[2] = a[2]; + r[3] = a[3]; } /* double -> float */ @@ -208,7 +208,6 @@ MINLINE void copy_v4db_v4fl(double r[4], const float a[4]) r[3] = (double)a[3]; } - MINLINE void swap_v2_v2(float a[2], float b[2]) { SWAP(float, a[0], b[0]); @@ -255,8 +254,8 @@ MINLINE void add_v2_v2(float r[2], const float a[2]) MINLINE void add_v2_v2v2(float r[2], const float a[2], const float b[2]) { - r[0]= a[0] + b[0]; - r[1]= a[1] + b[1]; + r[0] = a[0] + b[0]; + r[1] = a[1] + b[1]; } MINLINE void add_v3_v3(float r[3], const float a[3]) @@ -268,9 +267,9 @@ MINLINE void add_v3_v3(float r[3], const float a[3]) MINLINE void add_v3_v3v3(float r[3], const float a[3], const float b[3]) { - r[0]= a[0] + b[0]; - r[1]= a[1] + b[1]; - r[2]= a[2] + b[2]; + r[0] = a[0] + b[0]; + r[1] = a[1] + b[1]; + r[2] = a[2] + b[2]; } MINLINE void sub_v2_v2(float r[2], const float a[2]) @@ -281,8 +280,8 @@ MINLINE void sub_v2_v2(float r[2], const float a[2]) MINLINE void sub_v2_v2v2(float r[2], const float a[2], const float b[2]) { - r[0]= a[0] - b[0]; - r[1]= a[1] - b[1]; + r[0] = a[0] - b[0]; + r[1] = a[1] - b[1]; } MINLINE void sub_v3_v3(float r[3], const float a[3]) @@ -294,9 +293,9 @@ MINLINE void sub_v3_v3(float r[3], const float a[3]) MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3]) { - r[0]= a[0] - b[0]; - r[1]= a[1] - b[1]; - r[2]= a[2] - b[2]; + r[0] = a[0] - b[0]; + r[1] = a[1] - b[1]; + r[2] = a[2] - b[2]; } MINLINE void sub_v4_v4(float r[4], const float a[4]) @@ -309,23 +308,22 @@ MINLINE void sub_v4_v4(float r[4], const float a[4]) MINLINE void sub_v4_v4v4(float r[4], const float a[4], const float b[4]) { - r[0]= a[0] - b[0]; - r[1]= a[1] - b[1]; - r[2]= a[2] - b[2]; - r[3]= a[3] - b[3]; + r[0] = a[0] - b[0]; + r[1] = a[1] - b[1]; + r[2] = a[2] - b[2]; + r[3] = a[3] - b[3]; } - MINLINE void mul_v2_fl(float r[2], float f) { - r[0]*= f; - r[1]*= f; + r[0] *= f; + r[1] *= f; } MINLINE void mul_v2_v2fl(float r[2], const float a[2], float f) { - r[0]= a[0]*f; - r[1]= a[1]*f; + r[0] = a[0] * f; + r[1] = a[1] * f; } MINLINE void mul_v3_fl(float r[3], float f) @@ -337,9 +335,9 @@ MINLINE void mul_v3_fl(float r[3], float f) MINLINE void mul_v3_v3fl(float r[3], const float a[3], float f) { - r[0]= a[0]*f; - r[1]= a[1]*f; - r[2]= a[2]*f; + r[0] = a[0] * f; + r[1] = a[1] * f; + r[2] = a[2] * f; } MINLINE void mul_v2_v2(float r[2], const float a[2]) @@ -357,58 +355,58 @@ MINLINE void mul_v3_v3(float r[3], const float a[3]) MINLINE void mul_v4_fl(float r[4], float f) { - r[0]*= f; - r[1]*= f; - r[2]*= f; - r[3]*= f; + r[0] *= f; + r[1] *= f; + r[2] *= f; + r[3] *= f; } MINLINE void madd_v2_v2fl(float r[2], const float a[2], float f) { - r[0] += a[0]*f; - r[1] += a[1]*f; + r[0] += a[0] * f; + r[1] += a[1] * f; } MINLINE void madd_v3_v3fl(float r[3], const float a[3], float f) { - r[0] += a[0]*f; - r[1] += a[1]*f; - r[2] += a[2]*f; + r[0] += a[0] * f; + r[1] += a[1] * f; + r[2] += a[2] * f; } MINLINE void madd_v3_v3v3(float r[3], const float a[3], const float b[3]) { - r[0] += a[0]*b[0]; - r[1] += a[1]*b[1]; - r[2] += a[2]*b[2]; + r[0] += a[0] * b[0]; + r[1] += a[1] * b[1]; + r[2] += a[2] * b[2]; } MINLINE void madd_v2_v2v2fl(float r[2], const float a[2], const float b[2], float f) { - r[0] = a[0] + b[0]*f; - r[1] = a[1] + b[1]*f; + r[0] = a[0] + b[0] * f; + r[1] = a[1] + b[1] * f; } MINLINE void madd_v3_v3v3fl(float r[3], const float a[3], const float b[3], float f) { - r[0] = a[0] + b[0]*f; - r[1] = a[1] + b[1]*f; - r[2] = a[2] + b[2]*f; + r[0] = a[0] + b[0] * f; + r[1] = a[1] + b[1] * f; + r[2] = a[2] + b[2] * f; } MINLINE void madd_v3_v3v3v3(float r[3], const float a[3], const float b[3], const float c[3]) { - r[0] = a[0] + b[0]*c[0]; - r[1] = a[1] + b[1]*c[1]; - r[2] = a[2] + b[2]*c[2]; + r[0] = a[0] + b[0] * c[0]; + r[1] = a[1] + b[1] * c[1]; + r[2] = a[2] + b[2] * c[2]; } MINLINE void madd_v4_v4fl(float r[4], const float a[4], float f) { - r[0] += a[0]*f; - r[1] += a[1]*f; - r[2] += a[2]*f; - r[3] += a[3]*f; + r[0] += a[0] * f; + r[1] += a[1] * f; + r[2] += a[2] * f; + r[3] += a[3] * f; } MINLINE void mul_v3_v3v3(float r[3], const float v1[3], const float v2[3]) @@ -420,98 +418,98 @@ MINLINE void mul_v3_v3v3(float r[3], const float v1[3], const float v2[3]) MINLINE void negate_v2(float r[3]) { - r[0]= -r[0]; - r[1]= -r[1]; + r[0] = -r[0]; + r[1] = -r[1]; } MINLINE void negate_v2_v2(float r[2], const float a[2]) { - r[0]= -a[0]; - r[1]= -a[1]; + r[0] = -a[0]; + r[1] = -a[1]; } MINLINE void negate_v3(float r[3]) { - r[0]= -r[0]; - r[1]= -r[1]; - r[2]= -r[2]; + r[0] = -r[0]; + r[1] = -r[1]; + r[2] = -r[2]; } MINLINE void negate_v3_v3(float r[3], const float a[3]) { - r[0]= -a[0]; - r[1]= -a[1]; - r[2]= -a[2]; + r[0] = -a[0]; + r[1] = -a[1]; + r[2] = -a[2]; } MINLINE void negate_v4(float r[4]) { - r[0]= -r[0]; - r[1]= -r[1]; - r[2]= -r[2]; - r[3]= -r[3]; + r[0] = -r[0]; + r[1] = -r[1]; + r[2] = -r[2]; + r[3] = -r[3]; } MINLINE void negate_v4_v4(float r[4], const float a[4]) { - r[0]= -a[0]; - r[1]= -a[1]; - r[2]= -a[2]; - r[3]= -a[3]; + r[0] = -a[0]; + r[1] = -a[1]; + r[2] = -a[2]; + r[3] = -a[3]; } MINLINE float dot_v2v2(const float a[2], const float b[2]) { - return a[0]*b[0] + a[1]*b[1]; + return a[0] * b[0] + a[1] * b[1]; } MINLINE float dot_v3v3(const float a[3], const float b[3]) { - return a[0]*b[0] + a[1]*b[1] + a[2]*b[2]; + return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; } MINLINE float cross_v2v2(const float a[2], const float b[2]) { - return a[0]*b[1] - a[1]*b[0]; + return a[0] * b[1] - a[1] * b[0]; } MINLINE void cross_v3_v3v3(float r[3], const float a[3], const float b[3]) { - r[0]= a[1]*b[2] - a[2]*b[1]; - r[1]= a[2]*b[0] - a[0]*b[2]; - r[2]= a[0]*b[1] - a[1]*b[0]; + r[0] = a[1] * b[2] - a[2] * b[1]; + r[1] = a[2] * b[0] - a[0] * b[2]; + r[2] = a[0] * b[1] - a[1] * b[0]; } MINLINE void star_m3_v3(float rmat[][3], float a[3]) { - rmat[0][0]= rmat[1][1]= rmat[2][2]= 0.0; - rmat[0][1]= -a[2]; - rmat[0][2]= a[1]; - rmat[1][0]= a[2]; - rmat[1][2]= -a[0]; - rmat[2][0]= -a[1]; - rmat[2][1]= a[0]; + rmat[0][0] = rmat[1][1] = rmat[2][2] = 0.0; + rmat[0][1] = -a[2]; + rmat[0][2] = a[1]; + rmat[1][0] = a[2]; + rmat[1][2] = -a[0]; + rmat[2][0] = -a[1]; + rmat[2][1] = a[0]; } /*********************************** Length **********************************/ MINLINE float len_squared_v2(const float v[2]) { - return v[0]*v[0] + v[1]*v[1]; + return v[0] * v[0] + v[1] * v[1]; } MINLINE float len_v2(const float v[2]) { - return (float)sqrtf(v[0]*v[0] + v[1]*v[1]); + return (float)sqrtf(v[0] * v[0] + v[1] * v[1]); } MINLINE float len_v2v2(const float v1[2], const float v2[2]) { float x, y; - x = v1[0]-v2[0]; - y = v1[1]-v2[1]; - return (float)sqrtf(x*x+y*y); + x = v1[0] - v2[0]; + y = v1[1] - v2[1]; + return (float)sqrtf(x * x + y * y); } MINLINE float len_v3(const float a[3]) @@ -545,15 +543,15 @@ MINLINE float len_squared_v3v3(const float a[3], const float b[3]) MINLINE float normalize_v2_v2(float r[2], const float a[2]) { - float d= dot_v2v2(a, a); + float d = dot_v2v2(a, a); if (d > 1.0e-35f) { - d= sqrtf(d); - mul_v2_v2fl(r, a, 1.0f/d); + d = sqrtf(d); + mul_v2_v2fl(r, a, 1.0f / d); } else { zero_v2(r); - d= 0.0f; + d = 0.0f; } return d; @@ -566,17 +564,17 @@ MINLINE float normalize_v2(float n[2]) MINLINE float normalize_v3_v3(float r[3], const float a[3]) { - float d= dot_v3v3(a, a); + float d = dot_v3v3(a, a); /* a larger value causes normalize errors in a * scaled down models with camera xtreme close */ if (d > 1.0e-35f) { - d= sqrtf(d); - mul_v3_v3fl(r, a, 1.0f/d); + d = sqrtf(d); + mul_v3_v3fl(r, a, 1.0f / d); } else { zero_v3(r); - d= 0.0f; + d = 0.0f; } return d; @@ -584,14 +582,14 @@ MINLINE float normalize_v3_v3(float r[3], const float a[3]) MINLINE double normalize_v3_d(double n[3]) { - double d= n[0]*n[0] + n[1]*n[1] + n[2]*n[2]; + double d = n[0] * n[0] + n[1] * n[1] + n[2] * n[2]; /* a larger value causes normalize errors in a * scaled down models with camera xtreme close */ if (d > 1.0e-35) { double mul; - d= sqrt(d); + d = sqrt(d); mul = 1.0 / d; n[0] *= mul; @@ -600,7 +598,7 @@ MINLINE double normalize_v3_d(double n[3]) } else { n[0] = n[1] = n[2] = 0; - d= 0.0; + d = 0.0; } return d; @@ -613,16 +611,16 @@ MINLINE float normalize_v3(float n[3]) MINLINE void normal_short_to_float_v3(float out[3], const short in[3]) { - out[0] = in[0]*(1.0f/32767.0f); - out[1] = in[1]*(1.0f/32767.0f); - out[2] = in[2]*(1.0f/32767.0f); + out[0] = in[0] * (1.0f / 32767.0f); + out[1] = in[1] * (1.0f / 32767.0f); + out[2] = in[2] * (1.0f / 32767.0f); } MINLINE void normal_float_to_short_v3(short out[3], const float in[3]) { - out[0] = (short)(in[0]*32767.0f); - out[1] = (short)(in[1]*32767.0f); - out[2] = (short)(in[2]*32767.0f); + out[0] = (short) (in[0] * 32767.0f); + out[1] = (short) (in[1] * 32767.0f); + out[2] = (short) (in[2] * 32767.0f); } /********************************* Comparison ********************************/ @@ -650,24 +648,24 @@ MINLINE int is_one_v3(const float v[3]) MINLINE int equals_v2v2(const float v1[2], const float v2[2]) { - return ((v1[0]==v2[0]) && (v1[1]==v2[1])); + return ((v1[0] == v2[0]) && (v1[1] == v2[1])); } MINLINE int equals_v3v3(const float v1[3], const float v2[3]) { - return ((v1[0]==v2[0]) && (v1[1]==v2[1]) && (v1[2]==v2[2])); + return ((v1[0] == v2[0]) && (v1[1] == v2[1]) && (v1[2] == v2[2])); } MINLINE int equals_v4v4(const float v1[4], const float v2[4]) { - return ((v1[0]==v2[0]) && (v1[1]==v2[1]) && (v1[2]==v2[2]) && (v1[3]==v2[3])); + return ((v1[0] == v2[0]) && (v1[1] == v2[1]) && (v1[2] == v2[2]) && (v1[3] == v2[3])); } MINLINE int compare_v3v3(const float v1[3], const float v2[3], const float limit) { - if (fabsf(v1[0]-v2[0]) Date: Sun, 25 Mar 2012 13:53:12 +0000 Subject: inset tool now works better when insetting around corners - the 2 faces normals are now used to calculate the inset edge vector if the faces are different and not planer. --- source/blender/bmesh/operators/bmo_inset.c | 39 +++++++++++++++++++++---- source/blender/makesrna/intern/rna_object_api.c | 1 + 2 files changed, 34 insertions(+), 6 deletions(-) (limited to 'source/blender') diff --git a/source/blender/bmesh/operators/bmo_inset.c b/source/blender/bmesh/operators/bmo_inset.c index d64edada06d..0cc0678c4ce 100644 --- a/source/blender/bmesh/operators/bmo_inset.c +++ b/source/blender/bmesh/operators/bmo_inset.c @@ -269,15 +269,42 @@ void bmo_inset_exec(BMesh *bm, BMOperator *op) float tvec[3]; if (vert_edge_tag_tot >= 2) { /* 2 edge users - common case */ - const float *e_no_a = edge_info[vecpair[0]].no; - const float *e_no_b = edge_info[vecpair[1]].no; - - add_v3_v3v3(tvec, e_no_a, e_no_b); - normalize_v3(tvec); + /* now there are 2 cases to check for, + * + * if both edges use the same face OR both faces have the same normal, + * ...then we can calculate an edge that fits nicely between the 2 edge normals. + * + * Otherwise use the corner defined by these 2 edge-face normals, + * when both edges faces are adjacent this works best but even when this vertex + * fans out faces it should work ok. + */ + + SplitEdgeInfo *e_info_a = &edge_info[vecpair[0]]; + SplitEdgeInfo *e_info_b = &edge_info[vecpair[1]]; + + BMFace *f_a = e_info_a->l->f; + BMFace *f_b = e_info_b->l->f; + + /* we use this as either the normal OR to find the right direction for the + * crpss product between both face normals */ + add_v3_v3v3(tvec, e_info_a->no, e_info_b->no); + + if ((f_a == f_b) || compare_v3v3(f_a->no, f_b->no, 0.00001f)) { + normalize_v3(tvec); + } + else { + float tno[3]; + cross_v3_v3v3(tno, f_a->no, f_b->no); + if (dot_v3v3(tvec, tno) < 0.0f) { + negate_v3(tno); + } + copy_v3_v3(tvec, tno); + normalize_v3(tvec); + } /* scale by edge angle */ if (use_even_offset) { - mul_v3_fl(tvec, shell_angle_to_dist(angle_normalized_v3v3(e_no_a, e_no_b) / 2.0f)); + mul_v3_fl(tvec, shell_angle_to_dist(angle_normalized_v3v3(e_info_a->no, e_info_b->no) / 2.0f)); } /* scale relative to edge lengths */ diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c index 0e97729c52c..09e7d1d9be5 100644 --- a/source/blender/makesrna/intern/rna_object_api.c +++ b/source/blender/makesrna/intern/rna_object_api.c @@ -389,6 +389,7 @@ static void rna_Mesh_assign_verts_to_group(Object *ob, bDeformGroup *group, int } #endif +/* BMESH_TODO, return polygon index, not tessface */ void rna_Object_ray_cast(Object *ob, ReportList *reports, float ray_start[3], float ray_end[3], float r_location[3], float r_normal[3], int *index) { -- cgit v1.2.3 From fffe342d87548bc94f9258a1c8a2f7473b4bd8b2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 25 Mar 2012 14:44:48 +0000 Subject: bmesh inset: another small improvement - use the shared edge vector rather then the cross product between 2 faces if the faces infact share an edge - works best for non planer faces. also added utility function - BM_loop_other_vert_loop --- source/blender/bmesh/intern/bmesh_queries.c | 50 +++++++++++++++++++++++++++++ source/blender/bmesh/intern/bmesh_queries.h | 1 + source/blender/bmesh/operators/bmo_inset.c | 27 ++++++++++++---- 3 files changed, 72 insertions(+), 6 deletions(-) (limited to 'source/blender') diff --git a/source/blender/bmesh/intern/bmesh_queries.c b/source/blender/bmesh/intern/bmesh_queries.c index 8f1568119f8..24c60e22a90 100644 --- a/source/blender/bmesh/intern/bmesh_queries.c +++ b/source/blender/bmesh/intern/bmesh_queries.c @@ -151,6 +151,56 @@ BMLoop *BM_face_other_vert_loop(BMFace *f, BMVert *v_prev, BMVert *v) } } +/** + * \brief Other Loop in Face Sharing a Vert + * + * Finds the other loop that shares \a v with \a e loop in \a f. + * + * +----------+ <-- return the face loop of this vertex. + * | | + * | | + * | | + * +----------+ <-- This vertex defines the direction. + * l v + * ^ <------- This loop defines both the face to search + * and the edge, in combination with 'v' + * The faces loop direction is ignored. + */ + +BMLoop *BM_loop_other_vert_loop(BMLoop *l, BMVert *v) +{ +#if 0 /* works but slow */ + return BM_face_other_vert_loop(l->f, BM_edge_other_vert(l->e, v), v); +#else + BMEdge *e = l->e; + BMVert *v_prev = BM_edge_other_vert(e, v); + if (l->v == v) { + if (l->prev->v == v_prev) { + return l->next; + } + else { + BLI_assert(l->next->v == v_prev); + + return l->prev; + } + } + else { + BLI_assert(l->v == v_prev); + + if (l->prev->v == v) { + return l->prev->prev; + } + else { + BLI_assert(l->next->v == v); + return l->next->next; + } + } + + + +#endif +} + /** * Returns TRUE if the vertex is used in a given face. */ diff --git a/source/blender/bmesh/intern/bmesh_queries.h b/source/blender/bmesh/intern/bmesh_queries.h index c2a718b49ce..f3dfa754f00 100644 --- a/source/blender/bmesh/intern/bmesh_queries.h +++ b/source/blender/bmesh/intern/bmesh_queries.h @@ -43,6 +43,7 @@ int BM_edge_loop_pair(BMEdge *e, BMLoop **r_la, BMLoop **r_lb); BMVert *BM_edge_other_vert(BMEdge *e, BMVert *v); BMLoop *BM_face_other_edge_loop(BMFace *f, BMEdge *e, BMVert *v); BMLoop *BM_face_other_vert_loop(BMFace *f, BMVert *v_prev, BMVert *v); +BMLoop *BM_loop_other_vert_loop(BMLoop *l, BMVert *v); int BM_vert_edge_count_nonwire(BMVert *v); int BM_vert_edge_count(BMVert *v); diff --git a/source/blender/bmesh/operators/bmo_inset.c b/source/blender/bmesh/operators/bmo_inset.c index 0cc0678c4ce..c8804877723 100644 --- a/source/blender/bmesh/operators/bmo_inset.c +++ b/source/blender/bmesh/operators/bmo_inset.c @@ -274,7 +274,7 @@ void bmo_inset_exec(BMesh *bm, BMOperator *op) * if both edges use the same face OR both faces have the same normal, * ...then we can calculate an edge that fits nicely between the 2 edge normals. * - * Otherwise use the corner defined by these 2 edge-face normals, + * Otherwise use the shared edge OR the corner defined by these 2 face normals, * when both edges faces are adjacent this works best but even when this vertex * fans out faces it should work ok. */ @@ -293,12 +293,27 @@ void bmo_inset_exec(BMesh *bm, BMOperator *op) normalize_v3(tvec); } else { - float tno[3]; - cross_v3_v3v3(tno, f_a->no, f_b->no); - if (dot_v3v3(tvec, tno) < 0.0f) { - negate_v3(tno); + /* these lookups are very quick */ + BMLoop *l_other_a = BM_loop_other_vert_loop(e_info_a->l, v_split); + BMLoop *l_other_b = BM_loop_other_vert_loop(e_info_b->l, v_split); + + if (l_other_a->v == l_other_b->v) { + /* both edges faces are adjacent, but we don't need to know the shared edge + * having both verts is enough. */ + sub_v3_v3v3(tvec, l_other_a->v->co, v_split->co); } - copy_v3_v3(tvec, tno); + else { + /* faces don't touch, + * just get cross product of their normals, its *good enough* + */ + float tno[3]; + cross_v3_v3v3(tno, f_a->no, f_b->no); + if (dot_v3v3(tvec, tno) < 0.0f) { + negate_v3(tno); + } + copy_v3_v3(tvec, tno); + } + normalize_v3(tvec); } -- cgit v1.2.3 From 3f56ee3da7ca0d9500529e970e836fb2ff97068c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 25 Mar 2012 15:56:17 +0000 Subject: style cleanup: issues missed last commit --- source/blender/blenlib/intern/math_base_inline.c | 2 +- source/blender/blenlib/intern/math_color.c | 36 ++++++++-------- source/blender/blenlib/intern/math_geom.c | 48 +++++++++++----------- source/blender/blenlib/intern/math_matrix.c | 28 ++++++------- source/blender/blenlib/intern/math_rotation.c | 4 +- source/blender/blenlib/intern/math_vector.c | 16 ++++---- source/blender/blenlib/intern/math_vector_inline.c | 2 +- 7 files changed, 70 insertions(+), 66 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenlib/intern/math_base_inline.c b/source/blender/blenlib/intern/math_base_inline.c index 9e32ff5ad4e..58c882e894e 100644 --- a/source/blender/blenlib/intern/math_base_inline.c +++ b/source/blender/blenlib/intern/math_base_inline.c @@ -39,7 +39,7 @@ #define __MATH_BASE_INLINE_C__ /* A few small defines. Keep'em local! */ -#define SMALL_NUMBER 1.e-8f +#define SMALL_NUMBER 1.e-8f MINLINE float sqrt3f(float f) { diff --git a/source/blender/blenlib/intern/math_color.c b/source/blender/blenlib/intern/math_color.c index 7103ef6106d..abd9c1ea5b8 100644 --- a/source/blender/blenlib/intern/math_color.c +++ b/source/blender/blenlib/intern/math_color.c @@ -17,7 +17,7 @@ * * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. * All rights reserved. - + * * The Original Code is: some of this file. * * ***** END GPL LICENSE BLOCK ***** @@ -129,18 +129,18 @@ void rgb_to_ycc(float r, float g, float b, float *ly, float *lcb, float *lcr, in switch (colorspace) { case BLI_YCC_ITU_BT601: y = (0.257f * sr) + (0.504f * sg) + (0.098f * sb) + 16.0f; - cb = (-0.148f * sr)-(0.291f * sg) + (0.439f * sb) + 128.0f; - cr = (0.439f * sr)-(0.368f * sg)-(0.071f * sb) + 128.0f; + cb = (-0.148f * sr) - (0.291f * sg) + (0.439f * sb) + 128.0f; + cr = (0.439f * sr) - (0.368f * sg) - (0.071f * sb) + 128.0f; break; case BLI_YCC_ITU_BT709: y = (0.183f * sr) + (0.614f * sg) + (0.062f * sb) + 16.0f; - cb = (-0.101f * sr)-(0.338f * sg) + (0.439f * sb) + 128.0f; - cr = (0.439f * sr)-(0.399f * sg)-(0.040f * sb) + 128.0f; + cb = (-0.101f * sr) - (0.338f * sg) + (0.439f * sb) + 128.0f; + cr = (0.439f * sr) - (0.399f * sg) - (0.040f * sb) + 128.0f; break; case BLI_YCC_JFIF_0_255: y = (0.299f * sr) + (0.587f * sg) + (0.114f * sb); - cb = (-0.16874f * sr)-(0.33126f * sg) + (0.5f * sb) + 128.0f; - cr = (0.5f * sr)-(0.41869f * sg)-(0.08131f * sb) + 128.0f; + cb = (-0.16874f * sr) - (0.33126f * sg) + (0.5f * sb) + 128.0f; + cr = (0.5f * sr) - (0.41869f * sg) - (0.08131f * sb) + 128.0f; break; default: assert(!"invalid colorspace"); @@ -230,13 +230,17 @@ void rgb_to_hsv(float r, float g, float b, float *lh, float *ls, float *lv) rc = (cmax - r) / cdelta; gc = (cmax - g) / cdelta; bc = (cmax - b) / cdelta; - if (r == cmax) + + if (r == cmax) { h = bc - gc; - else - if (g == cmax) - h = 2.0f + rc - bc; - else - h = 4.0f + gc - rc; + } + else if (g == cmax) { + h = 2.0f + rc - bc; + } + else { + h = 4.0f + gc - rc; + } + h = h * 60.0f; if (h < 0.0f) h += 360.0f; @@ -331,13 +335,13 @@ unsigned int rgb_to_cpack(float r, float g, float b) void cpack_to_rgb(unsigned int col, float *r, float *g, float *b) { - *r = (float)((col)&0xFF); + *r = (float)((col) & 0xFF); *r /= 255.0f; - *g = (float)(((col) >> 8)&0xFF); + *g = (float)(((col) >> 8) & 0xFF); *g /= 255.0f; - *b = (float)(((col) >> 16)&0xFF); + *b = (float)(((col) >> 16) & 0xFF); *b /= 255.0f; } diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c index f84a79c544d..e76431e981e 100644 --- a/source/blender/blenlib/intern/math_geom.c +++ b/source/blender/blenlib/intern/math_geom.c @@ -17,7 +17,7 @@ * * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. * All rights reserved. - + * * The Original Code is: some of this file. * * ***** END GPL LICENSE BLOCK ***** @@ -173,7 +173,7 @@ float dist_to_line_v2(const float v1[2], const float v2[2], const float v3[2]) deler = (float)sqrt(a[0] * a[0] + a[1] * a[1]); if (deler == 0.0f) return 0; - return fabsf((v1[0] - v2[0]) * a[0]+(v1[1] - v2[1]) * a[1]) / deler; + return fabsf((v1[0] - v2[0]) * a[0] + (v1[1] - v2[1]) * a[1]) / deler; } @@ -298,12 +298,12 @@ int isect_line_line_v2_int(const int v1[2], const int v2[2], const int v3[2], co { float div, labda, mu; - div = (float)((v2[0] - v1[0]) * (v4[1] - v3[1])-(v2[1] - v1[1]) * (v4[0] - v3[0])); + div = (float)((v2[0] - v1[0]) * (v4[1] - v3[1]) - (v2[1] - v1[1]) * (v4[0] - v3[0])); if (div == 0.0f) return ISECT_LINE_LINE_COLINEAR; - labda = ((float)(v1[1] - v3[1]) * (v4[0] - v3[0])-(v1[0] - v3[0]) * (v4[1] - v3[1])) / div; + labda = ((float)(v1[1] - v3[1]) * (v4[0] - v3[0]) - (v1[0] - v3[0]) * (v4[1] - v3[1])) / div; - mu = ((float)(v1[1] - v3[1]) * (v2[0] - v1[0])-(v1[0] - v3[0]) * (v2[1] - v1[1])) / div; + mu = ((float)(v1[1] - v3[1]) * (v2[0] - v1[0]) - (v1[0] - v3[0]) * (v2[1] - v1[1])) / div; if (labda >= 0.0f && labda <= 1.0f && mu >= 0.0f && mu <= 1.0f) { if (labda == 0.0f || labda == 1.0f || mu == 0.0f || mu == 1.0f) return ISECT_LINE_LINE_EXACT; @@ -317,12 +317,12 @@ int isect_line_line_v2(const float v1[2], const float v2[2], const float v3[2], { float div, labda, mu; - div = (v2[0] - v1[0]) * (v4[1] - v3[1])-(v2[1] - v1[1]) * (v4[0] - v3[0]); + div = (v2[0] - v1[0]) * (v4[1] - v3[1]) - (v2[1] - v1[1]) * (v4[0] - v3[0]); if (div == 0.0f) return ISECT_LINE_LINE_COLINEAR; - labda = ((float)(v1[1] - v3[1]) * (v4[0] - v3[0])-(v1[0] - v3[0]) * (v4[1] - v3[1])) / div; + labda = ((float)(v1[1] - v3[1]) * (v4[0] - v3[0]) - (v1[0] - v3[0]) * (v4[1] - v3[1])) / div; - mu = ((float)(v1[1] - v3[1]) * (v2[0] - v1[0])-(v1[0] - v3[0]) * (v2[1] - v1[1])) / div; + mu = ((float)(v1[1] - v3[1]) * (v2[0] - v1[0]) - (v1[0] - v3[0]) * (v2[1] - v1[1])) / div; if (labda >= 0.0f && labda <= 1.0f && mu >= 0.0f && mu <= 1.0f) { if (labda == 0.0f || labda == 1.0f || mu == 0.0f || mu == 1.0f) return ISECT_LINE_LINE_EXACT; @@ -383,7 +383,7 @@ int isect_seg_seg_v2_point(const float v1[2], const float v2[2], const float v3[ if (u > u2) SWAP(float, u, u2); - if (u > 1.0f + eps || u2<-eps) return -1; /* non-ovlerlapping segments */ + if (u > 1.0f + eps || u2 < -eps) return -1; /* non-ovlerlapping segments */ else if (maxf(0.0f, u) == minf(1.0f, u2)) { /* one common point: can return result */ interp_v2_v2v2(vi, v1, v2, maxf(0, u)); return 1; @@ -491,7 +491,7 @@ int isect_line_sphere_v2(const float l1[2], const float l2[2], const float b = 2.0f * (ldir[0] * (l1[0] - sp[0]) + - ldir[1] * (l1[1] - sp[1])); + ldir[1] * (l1[1] - sp[1])); const float c = dot_v2v2(sp, sp) + @@ -565,7 +565,7 @@ static short IsectLLPt2Df(const float x0, const float y0, const float x1, const return -1; /*m2 = (float)1e+10;*/ // close enough to infinity if (fabs(m1 - m2) < 0.000001) - return -1; /* parallel lines */ + return -1; /* parallel lines */ // compute constants @@ -1918,11 +1918,11 @@ int interp_sparse_array(float *array, int const list_size, const float skipval) float valid_last = skipval; int valid_ofs = 0; - float *array_up = MEM_callocN(sizeof(float)* list_size, "interp_sparse_array up"); - float *array_down = MEM_callocN(sizeof(float)* list_size, "interp_sparse_array up"); + float *array_up = MEM_callocN(sizeof(float) * list_size, "interp_sparse_array up"); + float *array_down = MEM_callocN(sizeof(float) * list_size, "interp_sparse_array up"); - int *ofs_tot_up = MEM_callocN(sizeof(int)* list_size, "interp_sparse_array tup"); - int *ofs_tot_down = MEM_callocN(sizeof(int)* list_size, "interp_sparse_array tdown"); + int *ofs_tot_up = MEM_callocN(sizeof(int) * list_size, "interp_sparse_array tup"); + int *ofs_tot_down = MEM_callocN(sizeof(int) * list_size, "interp_sparse_array tdown"); for (i = 0; i < list_size; i++) { if (array[i] == skipval) { @@ -2046,7 +2046,7 @@ void interp_cubic_v3(float x[3], float v[3], const float x1[3], const float v1[3 /* unfortunately internal calculations have to be done at double precision to achieve correct/stable results. */ -#define IS_ZERO(x) ((x>(-DBL_EPSILON) && x (-DBL_EPSILON) && x < DBL_EPSILON) ? 1 : 0) /* Barycentric reverse */ void resolve_tri_uv(float r_uv[2], const float st[2], const float st0[2], const float st1[2], const float st2[2]) @@ -2353,7 +2353,7 @@ void map_to_sphere(float *r_u, float *r_v, const float x, const float y, const f len = sqrtf(x * x + y * y + z * z); if (len > 0.0f) { - if (x == 0.0f && y == 0.0f) *r_u = 0.0f; /* othwise domain error */ + if (x == 0.0f && y == 0.0f) *r_u = 0.0f; /* othwise domain error */ else *r_u = (1.0f - atan2f(x, y) / (float)M_PI) / 2.0f; *r_v = 1.0f - (float)saacos(z / len) / (float)M_PI; @@ -2447,7 +2447,7 @@ void accumulate_vertex_normals_poly(float **vertnos, float polyno[3], /* from BKE_mesh.h */ -#define STD_UV_CONNECT_LIMIT 0.0001f +#define STD_UV_CONNECT_LIMIT 0.0001f void sum_or_add_vertex_tangent(void *arena, VertexTangent **vtang, const float tang[3], const float uv[2]) { @@ -2915,14 +2915,14 @@ static vFloat vec_splat_float(float val) static float ff_quad_form_factor(float *p, float *n, float *q0, float *q1, float *q2, float *q3) { vFloat vcos, rlen, vrx, vry, vrz, vsrx, vsry, vsrz, gx, gy, gz, vangle; - vUInt8 rotate = (vUInt8){4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3}; + vUInt8 rotate = (vUInt8) {4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, 2, 3}; vFloatResult vresult; float result; /* compute r* */ - vrx = (vFloat) {q0[0], q1[0], q2[0], q3[0]} - vec_splat_float(p[0]); - vry = (vFloat) {q0[1], q1[1], q2[1], q3[1]} - vec_splat_float(p[1]); - vrz = (vFloat) {q0[2], q1[2], q2[2], q3[2]} - vec_splat_float(p[2]); + vrx = (vFloat) {q0[0], q1[0], q2[0], q3[0]} -vec_splat_float(p[0]); + vry = (vFloat) {q0[1], q1[1], q2[1], q3[1]} -vec_splat_float(p[1]); + vrz = (vFloat) {q0[2], q1[2], q2[2], q3[2]} -vec_splat_float(p[2]); /* normalize r* */ rlen = vec_rsqrte(vrx * vrx + vry * vry + vrz * vrz + vec_splat_float(1e-16f)); @@ -2973,8 +2973,8 @@ static float ff_quad_form_factor(float *p, float *n, float *q0, float *q1, float static __m128 sse_approx_acos(__m128 x) { /* needs a better approximation than taylor expansion of acos, since that - * gives big erros for near 1.0 values, sqrt(2 * x) * acos(1 - x) should work - * better, see http://www.tom.womack.net/projects/sse-fast-arctrig.html */ + * gives big erros for near 1.0 values, sqrt(2 * x) * acos(1 - x) should work + * better, see http://www.tom.womack.net/projects/sse-fast-arctrig.html */ return _mm_set_ps1(1.0f); } diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c index 09b5ab4f62a..e61a8ef041a 100644 --- a/source/blender/blenlib/intern/math_matrix.c +++ b/source/blender/blenlib/intern/math_matrix.c @@ -245,9 +245,9 @@ void mul_m4_m3m4(float (*m1)[4], float (*m3)[3], float (*m2)[4]) } void mul_serie_m3(float answ[][3], -float m1[][3], float m2[][3], float m3[][3], -float m4[][3], float m5[][3], float m6[][3], -float m7[][3], float m8[][3]) + float m1[][3], float m2[][3], float m3[][3], + float m4[][3], float m5[][3], float m6[][3], + float m7[][3], float m8[][3]) { float temp[3][3]; @@ -278,9 +278,9 @@ float m7[][3], float m8[][3]) } void mul_serie_m4(float answ[][4], float m1[][4], -float m2[][4], float m3[][4], float m4[][4], -float m5[][4], float m6[][4], float m7[][4], -float m8[][4]) + float m2[][4], float m3[][4], float m4[][4], + float m5[][4], float m6[][4], float m7[][4], + float m8[][4]) { float temp[4][4]; @@ -542,9 +542,9 @@ int invert_m4(float m[4][4]) /* * invertmat - - * computes the inverse of mat and puts it in inverse. Returns - * TRUE on success (i.e. can always find a pivot) and FALSE on failure. - * Uses Gaussian Elimination with partial (maximal column) pivoting. + * computes the inverse of mat and puts it in inverse. Returns + * TRUE on success (i.e. can always find a pivot) and FALSE on failure. + * Uses Gaussian Elimination with partial (maximal column) pivoting. * * Mark Segal - 1992 */ @@ -589,7 +589,7 @@ int invert_m4_m4(float inverse[4][4], float mat[4][4]) temp = tempmat[i][i]; if (temp == 0) - return 0; /* No non-zero pivot */ + return 0; /* No non-zero pivot */ for (k = 0; k < 4; k++) { tempmat[i][k] = (float)(tempmat[i][k] / temp); inverse[i][k] = (float)(inverse[i][k] / temp); @@ -1568,7 +1568,7 @@ void svd_m4(float U[4][4], float s[4], float V[4][4], float A_[4][4]) break; } t = (ks != p ? fabsf(e[ks]) : 0.f) + - (ks != k + 1 ? fabsf(e[ks - 1]) : 0.0f); + (ks != k + 1 ? fabsf(e[ks - 1]) : 0.0f); if (fabsf(s[ks]) <= eps * t) { s[ks] = 0.0f; break; @@ -1617,7 +1617,7 @@ void svd_m4(float U[4][4], float s[4], float V[4][4], float A_[4][4]) break; } - // Split at negligible s(k). + // Split at negligible s(k). case 2: { @@ -1641,7 +1641,7 @@ void svd_m4(float U[4][4], float s[4], float V[4][4], float A_[4][4]) break; } - // Perform one qr step. + // Perform one qr step. case 3: { @@ -1713,7 +1713,7 @@ void svd_m4(float U[4][4], float s[4], float V[4][4], float A_[4][4]) iter = iter + 1; break; } - // Convergence. + // Convergence. case 4: { diff --git a/source/blender/blenlib/intern/math_rotation.c b/source/blender/blenlib/intern/math_rotation.c index 25e7e451451..dbba672100e 100644 --- a/source/blender/blenlib/intern/math_rotation.c +++ b/source/blender/blenlib/intern/math_rotation.c @@ -1178,7 +1178,7 @@ typedef struct RotOrderInfo { /* Array of info for Rotation Order calculations * WARNING: must be kept in same order as eEulerRotationOrders */ -static RotOrderInfo rotOrders[]= { +static RotOrderInfo rotOrders[] = { /* i, j, k, n */ {{0, 1, 2}, 0}, // XYZ {{0, 2, 1}, 1}, // XZY @@ -1192,7 +1192,7 @@ static RotOrderInfo rotOrders[]= { * NOTE: since we start at 1 for the values, but arrays index from 0, * there is -1 factor involved in this process... */ -#define GET_ROTATIONORDER_INFO(order) (assert(order>=0 && order<=6), (order < 1) ? &rotOrders[0] : &rotOrders[(order)-1]) +#define GET_ROTATIONORDER_INFO(order) (assert(order >= 0 && order <= 6), (order < 1) ? &rotOrders[0] : &rotOrders[(order) - 1]) /* Construct quaternion from Euler angles (in radians). */ void eulO_to_quat(float q[4], const float e[3], const short order) diff --git a/source/blender/blenlib/intern/math_vector.c b/source/blender/blenlib/intern/math_vector.c index fcab5e75f39..ce387291dff 100644 --- a/source/blender/blenlib/intern/math_vector.c +++ b/source/blender/blenlib/intern/math_vector.c @@ -17,7 +17,7 @@ * * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. * All rights reserved. - + * * The Original Code is: some of this file. * * ***** END GPL LICENSE BLOCK ***** @@ -350,16 +350,16 @@ void rotate_normalized_v3_v3v3fl(float r[3], const float p[3], const float axis[ const float sintheta = sin(angle); r[0] = ((costheta + (1 - costheta) * axis[0] * axis[0]) * p[0]) + - (((1 - costheta) * axis[0] * axis[1] - axis[2] * sintheta) * p[1]) + - (((1 - costheta) * axis[0] * axis[2] + axis[1] * sintheta) * p[2]); + (((1 - costheta) * axis[0] * axis[1] - axis[2] * sintheta) * p[1]) + + (((1 - costheta) * axis[0] * axis[2] + axis[1] * sintheta) * p[2]); r[1] = (((1 - costheta) * axis[0] * axis[1] + axis[2] * sintheta) * p[0]) + - ((costheta + (1 - costheta) * axis[1] * axis[1]) * p[1]) + - (((1 - costheta) * axis[1] * axis[2] - axis[0] * sintheta) * p[2]); + ((costheta + (1 - costheta) * axis[1] * axis[1]) * p[1]) + + (((1 - costheta) * axis[1] * axis[2] - axis[0] * sintheta) * p[2]); r[2] = (((1 - costheta) * axis[0] * axis[2] - axis[1] * sintheta) * p[0]) + - (((1 - costheta) * axis[1] * axis[2] + axis[0] * sintheta) * p[1]) + - ((costheta + (1 - costheta) * axis[2] * axis[2]) * p[2]); + (((1 - costheta) * axis[1] * axis[2] + axis[0] * sintheta) * p[1]) + + ((costheta + (1 - costheta) * axis[2] * axis[2]) * p[2]); } void rotate_v3_v3v3fl(float r[3], const float p[3], const float axis[3], const float angle) @@ -467,7 +467,7 @@ void negate_vn_vn(float *array_tar, const float *array_src, const int size) const float *src = array_src + (size - 1); int i = size; while (i--) { - *(tar--) = - *(src--); + *(tar--) = -*(src--); } } diff --git a/source/blender/blenlib/intern/math_vector_inline.c b/source/blender/blenlib/intern/math_vector_inline.c index f1ab77a10e9..6d217b48d37 100644 --- a/source/blender/blenlib/intern/math_vector_inline.c +++ b/source/blender/blenlib/intern/math_vector_inline.c @@ -17,7 +17,7 @@ * * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. * All rights reserved. - + * * The Original Code is: some of this file. * * ***** END GPL LICENSE BLOCK ***** -- cgit v1.2.3 From 337be23cea3aac29a41c571fa345380c8a0fa404 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Sun, 25 Mar 2012 18:19:40 +0000 Subject: Fix bug #30673, "Crash: Bridge a pair of edges." Fix edge case for clamp_index() with any negative 'x' that is a multiple of 'len', was returning 'len' which is invalid index. Maybe the expression can be simplified back to a one-liner? --- source/blender/bmesh/operators/bmo_connect.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'source/blender') diff --git a/source/blender/bmesh/operators/bmo_connect.c b/source/blender/bmesh/operators/bmo_connect.c index e135473fc7e..20af3463891 100644 --- a/source/blender/bmesh/operators/bmo_connect.c +++ b/source/blender/bmesh/operators/bmo_connect.c @@ -141,7 +141,15 @@ static BMVert *get_outer_vert(BMesh *bm, BMEdge *e) /* Clamp x to the interval {0..len-1}, with wrap-around */ static int clamp_index(const int x, const int len) { - return (x < 0) ? (len - (-x % len)) : (x % len); + if (x >= 0) + return x % len; + else { + int r = len - (-x % len); + if(r == len) + return len - 1; + else + return r; + } } /* There probably is a better way to swap BLI_arrays, or if there -- cgit v1.2.3 From eb104023650f3e67c80f889df61060acc2c09123 Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Sun, 25 Mar 2012 19:02:28 +0000 Subject: Fix #30638 and part of #30646. Problem was that area calculation of polygons was done relative to the xy plane, and with a very obscure (to me at least) algorithm. That meant that vertical ngons would get 0 area. Commented initial code in case this is a strange optimization case that someone wants to use and used a cleaner algorithm: first project vertices to the ngon plane, defined by the normal of the ngon and the center (mean) of the ngon vertices. This will only be exact for convex and mostly planar ngons, still it is much better than the previous code. Also fixed memory leak when stretch display was on. --- source/blender/blenlib/BLI_math_vector.h | 2 + source/blender/blenlib/intern/math_vector.c | 14 +++++++ source/blender/blenlib/intern/math_vector_inline.c | 5 +++ source/blender/bmesh/intern/bmesh_polygon.c | 46 ++++++++++++++++------ source/blender/editors/uvedit/uvedit_draw.c | 3 ++ 5 files changed, 57 insertions(+), 13 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenlib/BLI_math_vector.h b/source/blender/blenlib/BLI_math_vector.h index b8b53f1ba7c..b4e1a71d45e 100644 --- a/source/blender/blenlib/BLI_math_vector.h +++ b/source/blender/blenlib/BLI_math_vector.h @@ -129,6 +129,7 @@ MINLINE void star_m3_v3(float rmat[3][3],float a[3]); /*********************************** Length **********************************/ MINLINE float len_squared_v2(const float v[2]); +MINLINE float len_squared_v3(const float v[3]); MINLINE float len_v2(const float a[2]); MINLINE float len_v2v2(const float a[2], const float b[2]); MINLINE float len_squared_v2v2(const float a[2], const float b[2]); @@ -190,6 +191,7 @@ void angle_poly_v3(float* angles, const float* verts[3], int len); void project_v2_v2v2(float c[2], const float v1[2], const float v2[2]); void project_v3_v3v3(float r[3], const float p[3], const float n[3]); +void project_v3_plane(float v[3], const float n[3], const float p[3]); void reflect_v3_v3v3(float r[3], const float v[3], const float n[3]); void ortho_basis_v3v3_v3(float r1[3], float r2[3], const float a[3]); void bisect_v3_v3v3v3(float r[3], const float a[3], const float b[3], const float c[3]); diff --git a/source/blender/blenlib/intern/math_vector.c b/source/blender/blenlib/intern/math_vector.c index ce387291dff..e7c96ce3dc3 100644 --- a/source/blender/blenlib/intern/math_vector.c +++ b/source/blender/blenlib/intern/math_vector.c @@ -286,6 +286,20 @@ void project_v3_v3v3(float c[3], const float v1[3], const float v2[3]) c[2] = mul * v2[2]; } +/* project a vector on a plane defined by normal and a plane point p */ +void project_v3_plane(float v[3], const float n[3], const float p[3]) +{ + float vector[3]; + float mul; + + sub_v3_v3v3(vector, v, p); + mul = dot_v3v3(vector, n)/len_squared_v3(n); + + mul_v3_v3fl(vector, n, mul); + + sub_v3_v3(v, vector); +} + /* Returns a vector bisecting the angle at v2 formed by v1, v2 and v3 */ void bisect_v3_v3v3v3(float out[3], const float v1[3], const float v2[3], const float v3[3]) { diff --git a/source/blender/blenlib/intern/math_vector_inline.c b/source/blender/blenlib/intern/math_vector_inline.c index 6d217b48d37..62e582c89c4 100644 --- a/source/blender/blenlib/intern/math_vector_inline.c +++ b/source/blender/blenlib/intern/math_vector_inline.c @@ -498,6 +498,11 @@ MINLINE float len_squared_v2(const float v[2]) return v[0] * v[0] + v[1] * v[1]; } +MINLINE float len_squared_v3(const float v[3]) +{ + return v[0] * v[0] + v[1] * v[1] + v[2] * v[2]; +} + MINLINE float len_v2(const float v[2]) { return (float)sqrtf(v[0] * v[0] + v[1] * v[1]); diff --git a/source/blender/bmesh/intern/bmesh_polygon.c b/source/blender/bmesh/intern/bmesh_polygon.c index bdecdfee850..34a6ac8ca69 100644 --- a/source/blender/bmesh/intern/bmesh_polygon.c +++ b/source/blender/bmesh/intern/bmesh_polygon.c @@ -160,40 +160,62 @@ static void bm_face_compute_poly_normal_vertex_cos(BMFace *f, float n[3], * \brief COMPUTE POLY CENTER * * Computes the centroid and - * area of a polygon in the X/Y - * plane. + * area of a polygon in the normal + * plane. This is not an exact method as we can't access the tesselated data. */ -static int compute_poly_center(float center[3], float *r_area, float (* const verts)[3], int nverts) +static void compute_poly_center(float center[3], float *r_area, float (* const verts)[3], int nverts, float normal[3]) { int i, j; - float atmp = 0.0f, xtmp = 0.0f, ytmp = 0.0f, ai; + float area = 0.0; zero_v3(center); if (nverts < 3) - return FALSE; + return; i = nverts - 1; - j = 0; - while (j < nverts) { + /* calculate face center */ + for (j = 0; j < nverts; j++){ + add_v3_v3(center, verts[j]); + } + mul_v3_fl(center, 1.0/nverts); + + /* project vertices to the normal plane */ + for (j = 0; j < nverts; j++){ + project_v3_plane(verts[j], normal, center); + } + + /* add triangle area of triangles formed by polygon edges and center. + * For each triangle Sum(Base * Height / 2) + * The expression for closed polygons is simplified */ + for (j = 0; j < nverts; j++) { + area += area_tri_v3(verts[j], verts[i], center); + i = j; + } + + if (r_area) + *r_area = area; + + /* + for (j = 0; j < nverts; j++) { ai = verts[i][0] * verts[j][1] - verts[j][0] * verts[i][1]; atmp += ai; xtmp += (verts[j][0] + verts[i][0]) * ai; ytmp += (verts[j][1] + verts[i][1]) * ai; i = j; - j += 1; } if (r_area) *r_area = atmp / 2.0f; - + if (atmp != 0) { center[0] = xtmp / (3.0f * atmp); center[1] = xtmp / (3.0f * atmp); return TRUE; } return FALSE; + */ } /** @@ -210,13 +232,11 @@ float BM_face_area_calc(BMesh *bm, BMFace *f) BLI_array_fixedstack_declare(verts, BM_NGON_STACK_SIZE, f->len, __func__); - i = 0; - BM_ITER(l, &iter, bm, BM_LOOPS_OF_FACE, f) { + BM_ITER_INDEX(l, &iter, bm, BM_LOOPS_OF_FACE, f, i) { copy_v3_v3(verts[i], l->v->co); - i++; } - compute_poly_center(center, &area, verts, f->len); + compute_poly_center(center, &area, verts, f->len, f->no); BLI_array_fixedstack_free(verts); diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c index 6767d543c5e..176c64439a7 100644 --- a/source/blender/editors/uvedit/uvedit_draw.c +++ b/source/blender/editors/uvedit/uvedit_draw.c @@ -422,6 +422,9 @@ static void draw_uvs_stretch(SpaceImage *sima, Scene *scene, BMEditMesh *em, MTe #endif } } + + BLI_array_free(tf_uv); + BLI_array_free(tf_uvorig); } static void draw_uvs_other(Scene *scene, Object *obedit, Image *curimage) -- cgit v1.2.3 From 8c6fc392c28d07ab83b799702c6e65e658f74603 Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Sun, 25 Mar 2012 19:13:50 +0000 Subject: Comment out the projection to ngon normal plane when calculating ngon area. This is hardly worth the cost since we use an approximation anyway. --- source/blender/bmesh/intern/bmesh_polygon.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender') diff --git a/source/blender/bmesh/intern/bmesh_polygon.c b/source/blender/bmesh/intern/bmesh_polygon.c index 34a6ac8ca69..d5e3d062809 100644 --- a/source/blender/bmesh/intern/bmesh_polygon.c +++ b/source/blender/bmesh/intern/bmesh_polygon.c @@ -181,14 +181,14 @@ static void compute_poly_center(float center[3], float *r_area, float (* const v } mul_v3_fl(center, 1.0/nverts); +#if 0 /* project vertices to the normal plane */ for (j = 0; j < nverts; j++){ project_v3_plane(verts[j], normal, center); } +#endif - /* add triangle area of triangles formed by polygon edges and center. - * For each triangle Sum(Base * Height / 2) - * The expression for closed polygons is simplified */ + /* add triangle area of triangles formed by polygon edges and center. */ for (j = 0; j < nverts; j++) { area += area_tri_v3(verts[j], verts[i], center); i = j; -- cgit v1.2.3 From c379b78d8a00a0960346656d3e38aacd56974572 Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Sun, 25 Mar 2012 21:18:44 +0000 Subject: fix #30668 and the rest of #30638. Port angle stretch code for uvs to bmesh. Also added comment to clarify previous commit. --- source/blender/bmesh/intern/bmesh_polygon.c | 4 +- source/blender/editors/uvedit/uvedit_draw.c | 182 ++++++++++------------------ 2 files changed, 63 insertions(+), 123 deletions(-) (limited to 'source/blender') diff --git a/source/blender/bmesh/intern/bmesh_polygon.c b/source/blender/bmesh/intern/bmesh_polygon.c index d5e3d062809..060dd4487c3 100644 --- a/source/blender/bmesh/intern/bmesh_polygon.c +++ b/source/blender/bmesh/intern/bmesh_polygon.c @@ -163,7 +163,7 @@ static void bm_face_compute_poly_normal_vertex_cos(BMFace *f, float n[3], * area of a polygon in the normal * plane. This is not an exact method as we can't access the tesselated data. */ -static void compute_poly_center(float center[3], float *r_area, float (* const verts)[3], int nverts, float normal[3]) +static void compute_poly_center(float center[3], float *r_area, float (* const verts)[3], int nverts, float UNUSED(normal[3])) { int i, j; float area = 0.0; @@ -181,7 +181,7 @@ static void compute_poly_center(float center[3], float *r_area, float (* const v } mul_v3_fl(center, 1.0/nverts); -#if 0 +#if 0 /* we are using an approximation anyway so do not project to normal plane. */ /* project vertices to the normal plane */ for (j = 0; j < nverts; j++){ project_v3_plane(verts[j], normal, center); diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c index 176c64439a7..383f97da6a0 100644 --- a/source/blender/editors/uvedit/uvedit_draw.c +++ b/source/blender/editors/uvedit/uvedit_draw.c @@ -172,7 +172,7 @@ static void draw_uvs_stretch(SpaceImage *sima, Scene *scene, BMEditMesh *em, MTe BLI_array_declare(tf_uv); BLI_array_declare(tf_uvorig); float aspx, aspy, col[4], (*tf_uv)[2] = NULL, (*tf_uvorig)[2] = NULL; - int i; + int i, j, nverts; ED_space_image_uv_aspect(sima, &aspx, &aspy); @@ -276,150 +276,90 @@ static void draw_uvs_stretch(SpaceImage *sima, Scene *scene, BMEditMesh *em, MTe } case SI_UVDT_STRETCH_ANGLE: { -#if 0 //BMESH_TODO - float uvang1,uvang2,uvang3,uvang4; - float ang1,ang2,ang3,ang4; - float av1[3], av2[3], av3[3], av4[3]; /* use for 2d and 3d angle vectors */ + float *uvang = NULL; + float *ang = NULL; + float (* av)[3] = NULL; /* use for 2d and 3d angle vectors */ + float (* auv)[2] = NULL; float a; - + + BLI_array_declare(uvang); + BLI_array_declare(ang); + BLI_array_declare(av); + BLI_array_declare(auv); + col[3] = 0.5; /* hard coded alpha, not that nice */ glShadeModel(GL_SMOOTH); - for (efa= em->faces.first; efa; efa= efa->next) { - tf= CustomData_em_get(&em->fdata, efa->head.data, CD_MTFACE); + BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) { + tf= CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY); if (uvedit_face_visible(scene, ima, efa, tf)) { - efa->tmp.p = tf; - uv_copy_aspect(tf->uv, tf_uv, aspx, aspy); - if (efa->v4) { - -#if 0 /* Simple but slow, better reuse normalized vectors */ + nverts = efa->len; + BM_elem_flag_enable(efa, BM_ELEM_TAG); + BLI_array_empty(tf_uv); + BLI_array_empty(tf_uvorig); + BLI_array_empty(uvang); + BLI_array_empty(ang); + BLI_array_empty(av); + BLI_array_empty(auv); + BLI_array_growitems(tf_uv, nverts); + BLI_array_growitems(tf_uvorig, nverts); + BLI_array_growitems(uvang, nverts); + BLI_array_growitems(ang, nverts); + BLI_array_growitems(av, nverts); + BLI_array_growitems(auv, nverts); + + BM_ITER_INDEX(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa, i) { + luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV); + copy_v2_v2(tf_uvorig[i], luv->uv); + } + + poly_copy_aspect(tf_uvorig, tf_uv, aspx, aspy, nverts); + + j = nverts - 1; + BM_ITER_INDEX(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa, i) { + sub_v2_v2v2(auv[i], tf_uv[j], tf_uv[i]); normalize_v2(auv[i]); + sub_v3_v3v3(av[i], l->prev->v->co, l->v->co); normalize_v3(av[i]); + j = i; + } + + for(i = 0; i < nverts; i++) { +#if 0 + /* Simple but slow, better reuse normalized vectors + * (Not ported to bmesh, copied for reference) */ uvang1 = RAD2DEG(angle_v2v2v2(tf_uv[3], tf_uv[0], tf_uv[1])); ang1 = RAD2DEG(angle_v3v3v3(efa->v4->co, efa->v1->co, efa->v2->co)); - - uvang2 = RAD2DEG(angle_v2v2v2(tf_uv[0], tf_uv[1], tf_uv[2])); - ang2 = RAD2DEG(angle_v3v3v3(efa->v1->co, efa->v2->co, efa->v3->co)); - - uvang3 = RAD2DEG(angle_v2v2v2(tf_uv[1], tf_uv[2], tf_uv[3])); - ang3 = RAD2DEG(angle_v3v3v3(efa->v2->co, efa->v3->co, efa->v4->co)); - - uvang4 = RAD2DEG(angle_v2v2v2(tf_uv[2], tf_uv[3], tf_uv[0])); - ang4 = RAD2DEG(angle_v3v3v3(efa->v3->co, efa->v4->co, efa->v1->co)); #endif - - /* uv angles */ - sub_v2_v2v2(av1, tf_uv[3], tf_uv[0]); normalize_v2(av1); - sub_v2_v2v2(av2, tf_uv[0], tf_uv[1]); normalize_v2(av2); - sub_v2_v2v2(av3, tf_uv[1], tf_uv[2]); normalize_v2(av3); - sub_v2_v2v2(av4, tf_uv[2], tf_uv[3]); normalize_v2(av4); - - /* This is the correct angle however we are only comparing angles - * uvang1 = 90-((angle_normalized_v2v2(av1, av2) * RAD2DEGF(1.0f))-90);*/ - uvang1 = angle_normalized_v2v2(av1, av2); - uvang2 = angle_normalized_v2v2(av2, av3); - uvang3 = angle_normalized_v2v2(av3, av4); - uvang4 = angle_normalized_v2v2(av4, av1); - - /* 3d angles */ - sub_v3_v3v3(av1, efa->v4->co, efa->v1->co); normalize_v3(av1); - sub_v3_v3v3(av2, efa->v1->co, efa->v2->co); normalize_v3(av2); - sub_v3_v3v3(av3, efa->v2->co, efa->v3->co); normalize_v3(av3); - sub_v3_v3v3(av4, efa->v3->co, efa->v4->co); normalize_v3(av4); - - /* This is the correct angle however we are only comparing angles - * ang1 = 90-((angle_normalized_v3v3(av1, av2) * RAD2DEGF(1.0f))-90);*/ - ang1 = angle_normalized_v3v3(av1, av2); - ang2 = angle_normalized_v3v3(av2, av3); - ang3 = angle_normalized_v3v3(av3, av4); - ang4 = angle_normalized_v3v3(av4, av1); - - glBegin(GL_QUADS); - - /* This simple makes the angles display worse then they really are ;) - * 1.0-powf((1.0-a), 2) */ - - a = fabsf(uvang1-ang1)/(float)M_PI; - weight_to_rgb(col, 1.0f-powf((1.0f-a), 2.0f)); - glColor3fv(col); - glVertex2fv(tf->uv[0]); - a = fabsf(uvang2-ang2)/(float)M_PI; - weight_to_rgb(col, 1.0f-powf((1.0f-a), 2.0f)); - glColor3fv(col); - glVertex2fv(tf->uv[1]); - a = fabsf(uvang3-ang3)/(float)M_PI; - weight_to_rgb(col, 1.0f-powf((1.0f-a), 2.0f)); - glColor3fv(col); - glVertex2fv(tf->uv[2]); - a = fabsf(uvang4-ang4)/(float)M_PI; - weight_to_rgb(col, 1.0f-powf((1.0f-a), 2.0f)); - glColor3fv(col); - glVertex2fv(tf->uv[3]); - + uvang[i] = angle_normalized_v2v2(auv[i], auv[(i+1)%nverts]); + ang[i] = angle_normalized_v3v3(av[i], av[(i+1)%nverts]); } - else { -#if 0 /* Simple but slow, better reuse normalized vectors */ - uvang1 = RAD2DEG(angle_v2v2v2(tf_uv[2], tf_uv[0], tf_uv[1])); - ang1 = RAD2DEG(angle_v3v3v3(efa->v3->co, efa->v1->co, efa->v2->co)); - - uvang2 = RAD2DEG(angle_v2v2v2(tf_uv[0], tf_uv[1], tf_uv[2])); - ang2 = RAD2DEG(angle_v3v3v3(efa->v1->co, efa->v2->co, efa->v3->co)); - - uvang3 = M_PI-(uvang1+uvang2); - ang3 = M_PI-(ang1+ang2); -#endif - - /* uv angles */ - sub_v2_v2v2(av1, tf_uv[2], tf_uv[0]); normalize_v2(av1); - sub_v2_v2v2(av2, tf_uv[0], tf_uv[1]); normalize_v2(av2); - sub_v2_v2v2(av3, tf_uv[1], tf_uv[2]); normalize_v2(av3); - - /* This is the correct angle however we are only comparing angles - * uvang1 = 90-((angle_normalized_v2v2(av1, av2) * 180.0/M_PI)-90); */ - uvang1 = angle_normalized_v2v2(av1, av2); - uvang2 = angle_normalized_v2v2(av2, av3); - uvang3 = angle_normalized_v2v2(av3, av1); - - /* 3d angles */ - sub_v3_v3v3(av1, efa->v3->co, efa->v1->co); normalize_v3(av1); - sub_v3_v3v3(av2, efa->v1->co, efa->v2->co); normalize_v3(av2); - sub_v3_v3v3(av3, efa->v2->co, efa->v3->co); normalize_v3(av3); - /* This is the correct angle however we are only comparing angles - * ang1 = 90-((angle_normalized_v3v3(av1, av2) * 180.0/M_PI)-90); */ - ang1 = angle_normalized_v3v3(av1, av2); - ang2 = angle_normalized_v3v3(av2, av3); - ang3 = angle_normalized_v3v3(av3, av1); - - /* This simple makes the angles display worse then they really are ;) - * 1.0f-powf((1.0-a), 2) */ - - glBegin(GL_TRIANGLES); - a = fabsf(uvang1-ang1)/(float)M_PI; - weight_to_rgb(col, 1.0f-powf((1.0f-a), 2.0f)); - glColor3fv(col); - glVertex2fv(tf->uv[0]); - a = fabsf(uvang2-ang2)/(float)M_PI; - weight_to_rgb(col, 1.0f-powf((1.0f-a), 2.0f)); - glColor3fv(col); - glVertex2fv(tf->uv[1]); - a = fabsf(uvang3-ang3)/(float)M_PI; + + glBegin(GL_POLYGON); + BM_ITER_INDEX(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa, i) { + luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV); + a = fabsf(uvang[i]-ang[i])/(float)M_PI; weight_to_rgb(col, 1.0f-powf((1.0f-a), 2.0f)); glColor3fv(col); - glVertex2fv(tf->uv[2]); + glVertex2fv(luv->uv); } glEnd(); } else { if (tf == activetf) activetf= NULL; - efa->tmp.p = NULL; + BM_elem_flag_disable(efa, BM_ELEM_TAG); } } glShadeModel(GL_FLAT); - break; -#endif + BLI_array_free(uvang); + BLI_array_free(ang); + BLI_array_free(av); + BLI_array_free(auv); + + break; } } -- cgit v1.2.3 From aede928bdc7902bb81ebb00b286dc5064cf54dd6 Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Sun, 25 Mar 2012 22:14:21 +0000 Subject: Patch: [#30652] Influence slider for Lattice Modifier * This patch adds a influence slider for the lattice modifier, which affects the strength of the deformation. Patch by Patrick Boelens (senshi), thanks a lot! --- source/blender/blenkernel/BKE_blender.h | 2 +- source/blender/blenkernel/BKE_lattice.h | 2 +- source/blender/blenkernel/intern/lattice.c | 10 +++++----- source/blender/blenloader/intern/readfile.c | 16 ++++++++++++++++ source/blender/makesdna/DNA_modifier_types.h | 2 ++ source/blender/makesrna/intern/rna_modifier.c | 6 ++++++ source/blender/modifiers/intern/MOD_lattice.c | 10 +++++++--- 7 files changed, 38 insertions(+), 10 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h index eb465ea814b..ffabbcf32f0 100644 --- a/source/blender/blenkernel/BKE_blender.h +++ b/source/blender/blenkernel/BKE_blender.h @@ -42,7 +42,7 @@ extern "C" { * and keep comment above the defines. * Use STRINGIFY() rather than defining with quotes */ #define BLENDER_VERSION 262 -#define BLENDER_SUBVERSION 2 +#define BLENDER_SUBVERSION 3 #define BLENDER_MINVERSION 250 #define BLENDER_MINSUBVERSION 0 diff --git a/source/blender/blenkernel/BKE_lattice.h b/source/blender/blenkernel/BKE_lattice.h index 8a1529a7ad0..29c78510fd8 100644 --- a/source/blender/blenkernel/BKE_lattice.h +++ b/source/blender/blenkernel/BKE_lattice.h @@ -63,7 +63,7 @@ void curve_deform_vector(struct Scene *scene, struct Object *cuOb, struct Object void lattice_deform_verts(struct Object *laOb, struct Object *target, struct DerivedMesh *dm, float (*vertexCos)[3], - int numVerts, const char *vgroup); + int numVerts, const char *vgroup, float influence); void armature_deform_verts(struct Object *armOb, struct Object *target, struct DerivedMesh *dm, float (*vertexCos)[3], float (*defMats)[3][3], int numVerts, int deformflag, diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c index b1513954667..a02f2cc1c5d 100644 --- a/source/blender/blenkernel/intern/lattice.c +++ b/source/blender/blenkernel/intern/lattice.c @@ -153,7 +153,7 @@ void resizelattice(Lattice *lt, int uNew, int vNew, int wNew, Object *ltOb) copy_m4_m4(mat, ltOb->obmat); unit_m4(ltOb->obmat); - lattice_deform_verts(ltOb, NULL, NULL, vertexCos, uNew*vNew*wNew, NULL); + lattice_deform_verts(ltOb, NULL, NULL, vertexCos, uNew*vNew*wNew, NULL, 1.0f); copy_m4_m4(ltOb->obmat, mat); lt->typeu = typeu; @@ -785,7 +785,7 @@ void curve_deform_vector(Scene *scene, Object *cuOb, Object *target, } void lattice_deform_verts(Object *laOb, Object *target, DerivedMesh *dm, - float (*vertexCos)[3], int numVerts, const char *vgroup) + float (*vertexCos)[3], int numVerts, const char *vgroup, float influence) { int a; int use_vgroups; @@ -824,13 +824,13 @@ void lattice_deform_verts(Object *laOb, Object *target, DerivedMesh *dm, weight= defvert_find_weight(dvert, index); if (weight > 0.0f) - calc_latt_deform(laOb, vertexCos[a], weight); + calc_latt_deform(laOb, vertexCos[a], weight*influence); } } } else { for (a = 0; a < numVerts; a++) { - calc_latt_deform(laOb, vertexCos[a], 1.0f); + calc_latt_deform(laOb, vertexCos[a], influence); } } end_latt_deform(laOb); @@ -843,7 +843,7 @@ int object_deform_mball(Object *ob, ListBase *dispbase) for (dl=dispbase->first; dl; dl=dl->next) { lattice_deform_verts(ob->parent, ob, NULL, - (float(*)[3]) dl->verts, dl->nr, NULL); + (float(*)[3]) dl->verts, dl->nr, NULL, 1.0f); } return 1; diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 6f4ceb78157..30ae9b6af52 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -13329,6 +13329,22 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } } } + + if (main->versionfile < 262 || (main->versionfile == 262 && main->subversionfile < 3)) + { + Object *ob; + ModifierData *md; + + for(ob = main->object.first; ob; ob = ob->id.next) { + for(md=ob->modifiers.first; md; md=md->next) { + if(md->type == eModifierType_Lattice) { + LatticeModifierData *lmd = (LatticeModifierData *)md; + lmd->influence = 1.0f; + } + } + } + } + { /* Default for old files is to save particle rotations to pointcache */ diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index f00bd338fd5..bb2d320aa04 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -135,6 +135,8 @@ typedef struct LatticeModifierData { struct Object *object; char name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */ + float influence; + char pad[4]; } LatticeModifierData; typedef struct CurveModifierData { diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index e40ed254dba..dae9c0ca044 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -960,6 +960,12 @@ static void rna_def_modifier_lattice(BlenderRNA *brna) "Name of Vertex Group which determines influence of modifier per point"); RNA_def_property_string_funcs(prop, NULL, NULL, "rna_LatticeModifier_vgroup_set"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); + + prop = RNA_def_property(srna, "influence", PROP_FLOAT, PROP_NONE); + RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); + RNA_def_property_ui_range(prop, 0, 1, 10, 2); + RNA_def_property_ui_text(prop, "Influence", "Strength of modifier effect"); + RNA_def_property_update(prop, 0, "rna_Modifier_update"); } static void rna_def_modifier_curve(BlenderRNA *brna) diff --git a/source/blender/modifiers/intern/MOD_lattice.c b/source/blender/modifiers/intern/MOD_lattice.c index 35503f9e462..5732fee7826 100644 --- a/source/blender/modifiers/intern/MOD_lattice.c +++ b/source/blender/modifiers/intern/MOD_lattice.c @@ -40,7 +40,6 @@ #include "BLI_utildefines.h" #include "BLI_string.h" - #include "BKE_cdderivedmesh.h" #include "BKE_lattice.h" #include "BKE_modifier.h" @@ -49,6 +48,11 @@ #include "MOD_util.h" +static void initData(ModifierData *md) +{ + LatticeModifierData *lmd = (LatticeModifierData*) md; + lmd->influence = 1.0f; +} static void copyData(ModifierData *md, ModifierData *target) { @@ -115,7 +119,7 @@ static void deformVerts(ModifierData *md, Object *ob, modifier_vgroup_cache(md, vertexCos); /* if next modifier needs original vertices */ lattice_deform_verts(lmd->object, ob, derivedData, - vertexCos, numVerts, lmd->name); + vertexCos, numVerts, lmd->name, lmd->influence); } static void deformVertsEM( @@ -146,7 +150,7 @@ ModifierTypeInfo modifierType_Lattice = { /* deformMatricesEM */ NULL, /* applyModifier */ NULL, /* applyModifierEM */ NULL, - /* initData */ NULL, + /* initData */ initData, /* requiredDataMask */ requiredDataMask, /* freeData */ NULL, /* isDisabled */ isDisabled, -- cgit v1.2.3 From 6faeac9fe2867aca9c111e4f86f74912c115eddd Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 25 Mar 2012 22:35:18 +0000 Subject: style cleanup: add braces around checks - 'if ELEM() {...}', confuses some parsers that done expand macros. --- source/blender/blenkernel/intern/action.c | 7 +-- source/blender/blenkernel/intern/anim_sys.c | 24 +++++----- source/blender/blenkernel/intern/curve.c | 6 +-- source/blender/blenkernel/intern/displist.c | 3 +- source/blender/blenkernel/intern/fcurve.c | 12 ++--- source/blender/blenkernel/intern/fmodifier.c | 18 +++---- source/blender/blenkernel/intern/ipo.c | 2 +- source/blender/blenkernel/intern/key.c | 4 +- source/blender/blenkernel/intern/material.c | 6 +-- source/blender/blenkernel/intern/nla.c | 56 +++++++++++----------- source/blender/blenkernel/intern/object.c | 20 +++++--- .../editors/animation/anim_channels_defines.c | 4 +- source/blender/editors/animation/anim_ipo_utils.c | 2 +- source/blender/editors/animation/drivers.c | 2 +- source/blender/editors/animation/fmodifier_ui.c | 2 +- source/blender/editors/animation/keyframes_draw.c | 8 ++-- source/blender/editors/animation/keyframes_edit.c | 12 +++-- .../blender/editors/animation/keyframes_general.c | 2 +- source/blender/editors/animation/keyframing.c | 4 +- source/blender/editors/armature/editarmature.c | 4 +- source/blender/editors/armature/poseobject.c | 8 ++-- source/blender/editors/gpencil/gpencil_edit.c | 2 +- source/blender/editors/gpencil/gpencil_paint.c | 2 +- .../blender/editors/interface/interface_handlers.c | 6 +-- .../blender/editors/interface/interface_widgets.c | 2 +- source/blender/editors/interface/view2d.c | 4 +- source/blender/editors/object/object_edit.c | 2 +- source/blender/editors/object/object_transform.c | 2 +- source/blender/editors/render/render_shading.c | 2 +- source/blender/editors/space_info/info_stats.c | 2 +- source/blender/editors/space_nla/nla_draw.c | 2 +- source/blender/editors/space_nla/nla_edit.c | 4 +- source/blender/editors/space_node/node_buttons.c | 2 +- .../editors/space_outliner/outliner_tools.c | 2 +- source/blender/editors/space_time/time_ops.c | 2 +- source/blender/editors/space_view3d/drawarmature.c | 8 ++-- source/blender/editors/space_view3d/drawobject.c | 6 +-- source/blender/editors/space_view3d/view3d_snap.c | 8 ++-- source/blender/editors/transform/transform.c | 4 +- .../editors/transform/transform_conversions.c | 2 +- .../blender/editors/transform/transform_generics.c | 4 +- .../editors/transform/transform_manipulator.c | 2 +- .../editors/transform/transform_orientations.c | 2 +- source/blender/editors/util/undo.c | 6 +-- source/blender/nodes/shader/node_shader_util.c | 3 +- .../blender/render/intern/source/convertblender.c | 2 +- .../blender/render/intern/source/render_texture.c | 2 +- 47 files changed, 153 insertions(+), 138 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index b78a11185cc..78668a5a2e4 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -464,10 +464,11 @@ bPoseChannel *get_active_posechannel (Object *ob) { bArmature *arm= (ob) ? ob->data : NULL; bPoseChannel *pchan; - - if ELEM3(NULL, ob, ob->pose, arm) + + if (ELEM3(NULL, ob, ob->pose, arm)) { return NULL; - + } + /* find active */ for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) { if ((pchan->bone) && (pchan->bone == arm->act_bone) && (pchan->bone->layer & arm->layer)) diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index a9267be4cc4..fd3fb6815f0 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -397,7 +397,7 @@ void action_move_fcurves_by_basepath (bAction *srcAct, bAction *dstAct, const ch FCurve *fcu, *fcn=NULL; /* sanity checks */ - if ELEM3(NULL, srcAct, dstAct, basepath) { + if (ELEM3(NULL, srcAct, dstAct, basepath)) { if (G.f & G_DEBUG) { printf("ERROR: action_partition_fcurves_by_basepath(%p, %p, %p) has insufficient info to work with\n", (void *)srcAct, (void *)dstAct, (void *)basepath); @@ -478,7 +478,7 @@ void BKE_animdata_separate_by_basepath (ID *srcID, ID *dstID, ListBase *basepath LinkData *ld; /* sanity checks */ - if ELEM(NULL, srcID, dstID) { + if (ELEM(NULL, srcID, dstID)) { if (G.f & G_DEBUG) printf("ERROR: no source or destination ID to separate AnimData with\n"); return; @@ -488,7 +488,7 @@ void BKE_animdata_separate_by_basepath (ID *srcID, ID *dstID, ListBase *basepath srcAdt = BKE_animdata_from_id(srcID); dstAdt = BKE_id_add_animdata(dstID); - if ELEM(NULL, srcAdt, dstAdt) { + if (ELEM(NULL, srcAdt, dstAdt)) { if (G.f & G_DEBUG) printf("ERROR: no AnimData for this pair of ID's\n"); return; @@ -903,7 +903,7 @@ KS_Path *BKE_keyingset_find_path (KeyingSet *ks, ID *id, const char group_name[] KS_Path *ksp; /* sanity checks */ - if ELEM3(NULL, ks, rna_path, id) + if (ELEM3(NULL, ks, rna_path, id)) return NULL; /* loop over paths in the current KeyingSet, finding the first one where all settings match @@ -976,7 +976,7 @@ KS_Path *BKE_keyingset_add_path (KeyingSet *ks, ID *id, const char group_name[], KS_Path *ksp; /* sanity checks */ - if ELEM(NULL, ks, rna_path) { + if (ELEM(NULL, ks, rna_path)) { printf("ERROR: no Keying Set and/or RNA Path to add path with \n"); return NULL; } @@ -1028,7 +1028,7 @@ KS_Path *BKE_keyingset_add_path (KeyingSet *ks, ID *id, const char group_name[], void BKE_keyingset_free_path (KeyingSet *ks, KS_Path *ksp) { /* sanity check */ - if ELEM(NULL, ks, ksp) + if (ELEM(NULL, ks, ksp)) return; /* free RNA-path info */ @@ -1338,7 +1338,7 @@ void animsys_evaluate_action_group (PointerRNA *ptr, bAction *act, bActionGroup FCurve *fcu; /* check if mapper is appropriate for use here (we set to NULL if it's inappropriate) */ - if ELEM(NULL, act, agrp) return; + if (ELEM(NULL, act, agrp)) return; if ((remap) && (remap->target != act)) remap= NULL; action_idcode_patch_check(ptr->id.data, act); @@ -1710,14 +1710,14 @@ static void nlaeval_fmodifiers_join_stacks (ListBase *result, ListBase *list1, L FModifier *fcm1, *fcm2; /* if list1 is invalid... */ - if ELEM(NULL, list1, list1->first) { + if (ELEM(NULL, list1, list1->first)) { if (list2 && list2->first) { result->first= list2->first; result->last= list2->last; } } /* if list 2 is invalid... */ - else if ELEM(NULL, list2, list2->first) { + else if (ELEM(NULL, list2, list2->first)) { result->first= list1->first; result->last= list1->last; } @@ -1742,9 +1742,9 @@ static void nlaeval_fmodifiers_split_stacks (ListBase *list1, ListBase *list2) FModifier *fcm1, *fcm2; /* if list1/2 is invalid... just skip */ - if ELEM(NULL, list1, list2) + if (ELEM(NULL, list1, list2)) return; - if ELEM(NULL, list1->first, list2->first) + if (ELEM(NULL, list1->first, list2->first)) return; /* get endpoints */ @@ -2182,7 +2182,7 @@ void BKE_animsys_evaluate_animdata (Scene *scene, ID *id, AnimData *adt, float c PointerRNA id_ptr; /* sanity checks */ - if ELEM(NULL, id, adt) + if (ELEM(NULL, id, adt)) return; /* get pointer to ID-block for RNA to use */ diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index 7aae0d52fe7..9232fe8ec04 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -1347,7 +1347,7 @@ void makebevelcurve(Scene *scene, Object *ob, ListBase *disp, int forRender) } while (dl) { - if ELEM(dl->type, DL_POLY, DL_SEGM) { + if (ELEM(dl->type, DL_POLY, DL_SEGM)) { dlnew= MEM_mallocN(sizeof(DispList), "makebevelcurve1"); *dlnew= *dl; dlnew->verts= MEM_mallocN(3*sizeof(float)*dl->parts*dl->nr, "makebevelcurve1"); @@ -2878,8 +2878,8 @@ void sethandlesNurb(ListBase *editnurb, short code) if (bezt->f1 & SELECT) bezt->h1= code; if (bezt->f3 & SELECT) bezt->h2= code; if (bezt->h1!=bezt->h2) { - if ELEM(bezt->h1, HD_ALIGN, HD_AUTO) bezt->h1= HD_FREE; - if ELEM(bezt->h2, HD_ALIGN, HD_AUTO) bezt->h2= HD_FREE; + if (ELEM(bezt->h1, HD_ALIGN, HD_AUTO)) bezt->h1 = HD_FREE; + if (ELEM(bezt->h2, HD_ALIGN, HD_AUTO)) bezt->h2 = HD_FREE; } } bezt++; diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c index 7a34df85bdc..692eadd6bd3 100644 --- a/source/blender/blenkernel/intern/displist.c +++ b/source/blender/blenkernel/intern/displist.c @@ -123,8 +123,9 @@ int displist_has_faces(ListBase *lb) { DispList *dl; for (dl= lb->first; dl; dl= dl->next) { - if ELEM3(dl->type, DL_INDEX3, DL_INDEX4, DL_SURF) + if (ELEM3(dl->type, DL_INDEX3, DL_INDEX4, DL_SURF)) { return 1; + } } return 0; } diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index 97e59df3353..5f1201ec378 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -156,7 +156,7 @@ void copy_fcurves (ListBase *dst, ListBase *src) FCurve *dfcu, *sfcu; /* sanity checks */ - if ELEM(NULL, dst, src) + if (ELEM(NULL, dst, src)) return; /* clear destination list first */ @@ -738,7 +738,7 @@ void fcurve_store_samples (FCurve *fcu, void *data, int start, int end, FcuSampl /* sanity checks */ // TODO: make these tests report errors using reports not printf's - if ELEM(NULL, fcu, sample_cb) { + if (ELEM(NULL, fcu, sample_cb)) { printf("Error: No F-Curve with F-Curve Modifiers to Bake\n"); return; } @@ -834,7 +834,7 @@ void testhandles_fcurve (FCurve *fcu, const short use_handle) unsigned int a; /* only beztriples have handles (bpoints don't though) */ - if ELEM(NULL, fcu, fcu->bezt) + if (ELEM(NULL, fcu, fcu->bezt)) return; /* loop over beztriples */ @@ -1001,7 +1001,7 @@ static float dtar_get_prop_val (ChannelDriver *driver, DriverTarget *dtar) float value= 0.0f; /* sanity check */ - if ELEM(NULL, driver, dtar) + if (ELEM(NULL, driver, dtar)) return 0.0f; id= dtar_id_ensure_proxy_from(dtar->id); @@ -1075,7 +1075,7 @@ static bPoseChannel *dtar_get_pchan_ptr (ChannelDriver *driver, DriverTarget *dt { ID *id; /* sanity check */ - if ELEM(NULL, driver, dtar) + if (ELEM(NULL, driver, dtar)) return NULL; id= dtar_id_ensure_proxy_from(dtar->id); @@ -1490,7 +1490,7 @@ void fcurve_free_driver(FCurve *fcu) DriverVar *dvar, *dvarn; /* sanity checks */ - if ELEM(NULL, fcu, fcu->driver) + if (ELEM(NULL, fcu, fcu->driver)) return; driver= fcu->driver; diff --git a/source/blender/blenkernel/intern/fmodifier.c b/source/blender/blenkernel/intern/fmodifier.c index bc587449853..693c036d124 100644 --- a/source/blender/blenkernel/intern/fmodifier.c +++ b/source/blender/blenkernel/intern/fmodifier.c @@ -590,7 +590,7 @@ static float fcm_cycles_time (FCurve *fcu, FModifier *fcm, float UNUSED(cvalue), ofs= lastkey[0]; } } - if ELEM(0, side, mode) + if ((ELEM(0, side, mode))) return evaltime; /* find relative place within a cycle */ @@ -1000,7 +1000,7 @@ FModifier *add_fmodifier (ListBase *modifiers, int type) FModifier *fcm; /* sanity checks */ - if ELEM(NULL, modifiers, fmi) + if (ELEM(NULL, modifiers, fmi)) return NULL; /* special checks for whether modifier can be added */ @@ -1063,7 +1063,7 @@ void copy_fmodifiers (ListBase *dst, ListBase *src) { FModifier *fcm, *srcfcm; - if ELEM(NULL, dst, src) + if (ELEM(NULL, dst, src)) return; dst->first= dst->last= NULL; @@ -1134,7 +1134,7 @@ FModifier *find_active_fmodifier (ListBase *modifiers) FModifier *fcm; /* sanity checks */ - if ELEM(NULL, modifiers, modifiers->first) + if (ELEM(NULL, modifiers, modifiers->first)) return NULL; /* loop over modifiers until 'active' one is found */ @@ -1153,7 +1153,7 @@ void set_active_fmodifier (ListBase *modifiers, FModifier *fcm) FModifier *fm; /* sanity checks */ - if ELEM(NULL, modifiers, modifiers->first) + if (ELEM(NULL, modifiers, modifiers->first)) return; /* deactivate all, and set current one active */ @@ -1178,7 +1178,7 @@ short list_has_suitable_fmodifier (ListBase *modifiers, int mtype, short acttype return (modifiers && modifiers->first); /* sanity checks */ - if ELEM(NULL, modifiers, modifiers->first) + if (ELEM(NULL, modifiers, modifiers->first)) return 0; /* find the first mdifier fitting these criteria */ @@ -1258,7 +1258,7 @@ float evaluate_time_fmodifiers (ListBase *modifiers, FCurve *fcu, float cvalue, FModifier *fcm; /* sanity checks */ - if ELEM(NULL, modifiers, modifiers->last) + if (ELEM(NULL, modifiers, modifiers->last)) return evaltime; /* Starting from the end of the stack, calculate the time effects of various stacked modifiers @@ -1307,7 +1307,7 @@ void evaluate_value_fmodifiers (ListBase *modifiers, FCurve *fcu, float *cvalue, FModifier *fcm; /* sanity checks */ - if ELEM(NULL, modifiers, modifiers->first) + if (ELEM(NULL, modifiers, modifiers->first)) return; /* evaluate modifiers */ @@ -1345,7 +1345,7 @@ void fcurve_bake_modifiers (FCurve *fcu, int start, int end) /* sanity checks */ // TODO: make these tests report errors using reports not printf's - if ELEM(NULL, fcu, fcu->modifiers.first) { + if (ELEM(NULL, fcu, fcu->modifiers.first)) { printf("Error: No F-Curve with F-Curve Modifiers to Bake\n"); return; } diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c index 57a2dc41f74..c454acd7c81 100644 --- a/source/blender/blenkernel/intern/ipo.c +++ b/source/blender/blenkernel/intern/ipo.c @@ -1518,7 +1518,7 @@ static void ipo_to_animdata (ID *id, Ipo *ipo, char actname[], char constname[], ListBase drivers = {NULL, NULL}; /* sanity check */ - if ELEM(NULL, id, ipo) + if (ELEM(NULL, id, ipo)) return; if (adt == NULL) { printf("ERROR ipo_to_animdata(): adt invalid \n"); diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c index 097e7a4eb5e..fe776bd5eae 100644 --- a/source/blender/blenkernel/intern/key.c +++ b/source/blender/blenkernel/intern/key.c @@ -1466,7 +1466,7 @@ Key *ob_get_key(Object *ob) Mesh *me= ob->data; return me->key; } - else if ELEM(ob->type, OB_CURVE, OB_SURF) { + else if (ELEM(ob->type, OB_CURVE, OB_SURF)) { Curve *cu= ob->data; return cu->key; } @@ -1589,7 +1589,7 @@ char *key_get_curValue_rnaPath(Key *key, KeyBlock *kb) PropertyRNA *prop; /* sanity checks */ - if ELEM(NULL, key, kb) + if (ELEM(NULL, key, kb)) return NULL; /* create the RNA pointer */ diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c index dd25092f7dd..f7351887b55 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -458,7 +458,7 @@ Material ***give_matarar(Object *ob) me= ob->data; return &(me->mat); } - else if ELEM3(ob->type, OB_CURVE, OB_FONT, OB_SURF) { + else if (ELEM3(ob->type, OB_CURVE, OB_FONT, OB_SURF)) { cu= ob->data; return &(cu->mat); } @@ -479,7 +479,7 @@ short *give_totcolp(Object *ob) me= ob->data; return &(me->totcol); } - else if ELEM3(ob->type, OB_CURVE, OB_FONT, OB_SURF) { + else if (ELEM3(ob->type, OB_CURVE, OB_FONT, OB_SURF)) { cu= ob->data; return &(cu->totcol); } @@ -903,7 +903,7 @@ static void do_init_render_material(Material *ma, int r_mode, float *amb) ma->mapto |= mtex->mapto; /* always get derivatives for these textures */ - if ELEM3(mtex->tex->type, TEX_IMAGE, TEX_PLUGIN, TEX_ENVMAP) ma->texco |= TEXCO_OSA; + if (ELEM3(mtex->tex->type, TEX_IMAGE, TEX_PLUGIN, TEX_ENVMAP)) ma->texco |= TEXCO_OSA; else if (mtex->texflag & (MTEX_COMPAT_BUMP|MTEX_3TAP_BUMP|MTEX_5TAP_BUMP|MTEX_BICUBIC_BUMP)) ma->texco |= TEXCO_OSA; if (ma->texco & (TEXCO_ORCO|TEXCO_REFL|TEXCO_NORM|TEXCO_STRAND|TEXCO_STRESS)) needuv= 1; diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c index f67d3274b34..9c8bda97435 100644 --- a/source/blender/blenkernel/intern/nla.c +++ b/source/blender/blenkernel/intern/nla.c @@ -140,7 +140,7 @@ void free_nladata (ListBase *tracks) NlaTrack *nlt, *nltn; /* sanity checks */ - if ELEM(NULL, tracks, tracks->first) + if (ELEM(NULL, tracks, tracks->first)) return; /* free tracks one by one */ @@ -221,7 +221,7 @@ void copy_nladata (ListBase *dst, ListBase *src) NlaTrack *nlt, *nlt_d; /* sanity checks */ - if ELEM(NULL, dst, src) + if (ELEM(NULL, dst, src)) return; /* clear out the destination list first for precautions... */ @@ -319,7 +319,7 @@ NlaStrip *add_nlastrip_to_stack (AnimData *adt, bAction *act) NlaTrack *nlt; /* sanity checks */ - if ELEM(NULL, adt, act) + if (ELEM(NULL, adt, act)) return NULL; /* create a new NLA strip */ @@ -586,7 +586,7 @@ void BKE_nlastrips_sort_strips (ListBase *strips) NlaStrip *strip, *sstrip, *stripn; /* sanity checks */ - if ELEM(NULL, strips, strips->first) + if (ELEM(NULL, strips, strips->first)) return; /* we simply perform insertion sort on this list, since it is assumed that per track, @@ -630,7 +630,7 @@ short BKE_nlastrips_add_strip (ListBase *strips, NlaStrip *strip) short not_added = 1; /* sanity checks */ - if ELEM(NULL, strips, strip) + if (ELEM(NULL, strips, strip)) return 0; /* check if any space to add */ @@ -668,7 +668,7 @@ void BKE_nlastrips_make_metas (ListBase *strips, short temp) NlaStrip *strip, *stripn; /* sanity checks */ - if ELEM(NULL, strips, strips->first) + if (ELEM(NULL, strips, strips->first)) return; /* group all continuous chains of selected strips into meta-strips */ @@ -719,7 +719,7 @@ void BKE_nlastrips_clear_metastrip (ListBase *strips, NlaStrip *strip) NlaStrip *cs, *csn; /* sanity check */ - if ELEM(NULL, strips, strip) + if (ELEM(NULL, strips, strip)) return; /* move each one of the meta-strip's children before the meta-strip @@ -744,7 +744,7 @@ void BKE_nlastrips_clear_metas (ListBase *strips, short onlySel, short onlyTemp) NlaStrip *strip, *stripn; /* sanity checks */ - if ELEM(NULL, strips, strips->first) + if (ELEM(NULL, strips, strips->first)) return; /* remove meta-strips fitting the criteria of the arguments */ @@ -769,7 +769,7 @@ void BKE_nlastrips_clear_metas (ListBase *strips, short onlySel, short onlyTemp) short BKE_nlameta_add_strip (NlaStrip *mstrip, NlaStrip *strip) { /* sanity checks */ - if ELEM(NULL, mstrip, strip) + if (ELEM(NULL, mstrip, strip)) return 0; /* firstly, check if the meta-strip has space for this */ @@ -827,7 +827,7 @@ void BKE_nlameta_flush_transforms (NlaStrip *mstrip) * - strip must exist * - strip must be a meta-strip with some contents */ - if ELEM(NULL, mstrip, mstrip->strips.first) + if (ELEM(NULL, mstrip, mstrip->strips.first)) return; if (mstrip->type != NLASTRIP_TYPE_META) return; @@ -899,7 +899,7 @@ NlaTrack *BKE_nlatrack_find_active (ListBase *tracks) NlaTrack *nlt; /* sanity check */ - if ELEM(NULL, tracks, tracks->first) + if (ELEM(NULL, tracks, tracks->first)) return NULL; /* try to find the first active track */ @@ -920,7 +920,7 @@ void BKE_nlatrack_solo_toggle (AnimData *adt, NlaTrack *nlt) NlaTrack *nt; /* sanity check */ - if ELEM(NULL, adt, adt->nla_tracks.first) + if (ELEM(NULL, adt, adt->nla_tracks.first)) return; /* firstly, make sure 'solo' flag for all tracks is disabled */ @@ -952,7 +952,7 @@ void BKE_nlatrack_set_active (ListBase *tracks, NlaTrack *nlt_a) NlaTrack *nlt; /* sanity check */ - if ELEM(NULL, tracks, tracks->first) + if (ELEM(NULL, tracks, tracks->first)) return; /* deactive all the rest */ @@ -990,7 +990,7 @@ short BKE_nlatrack_has_space (NlaTrack *nlt, float start, float end) void BKE_nlatrack_sort_strips (NlaTrack *nlt) { /* sanity checks */ - if ELEM(NULL, nlt, nlt->strips.first) + if (ELEM(NULL, nlt, nlt->strips.first)) return; /* sort the strips with a more generic function */ @@ -1003,7 +1003,7 @@ void BKE_nlatrack_sort_strips (NlaTrack *nlt) short BKE_nlatrack_add_strip (NlaTrack *nlt, NlaStrip *strip) { /* sanity checks */ - if ELEM(NULL, nlt, strip) + if (ELEM(NULL, nlt, strip)) return 0; /* try to add the strip to the track using a more generic function */ @@ -1024,7 +1024,7 @@ short BKE_nlatrack_get_bounds (NlaTrack *nlt, float bounds[2]) return 0; /* sanity checks */ - if ELEM(NULL, nlt, nlt->strips.first) + if (ELEM(NULL, nlt, nlt->strips.first)) return 0; /* lower bound is first strip's start frame */ @@ -1047,7 +1047,7 @@ NlaStrip *BKE_nlastrip_find_active (NlaTrack *nlt) NlaStrip *strip; /* sanity check */ - if ELEM(NULL, nlt, nlt->strips.first) + if (ELEM(NULL, nlt, nlt->strips.first)) return NULL; /* try to find the first active strip */ @@ -1146,7 +1146,7 @@ static short nlastrip_is_first (AnimData *adt, NlaStrip *strip) NlaStrip *ns; /* sanity checks */ - if ELEM(NULL, adt, strip) + if (ELEM(NULL, adt, strip)) return 0; /* check if strip has any strips before it */ @@ -1176,7 +1176,7 @@ short BKE_nlatrack_has_animated_strips (NlaTrack *nlt) NlaStrip *strip; /* sanity checks */ - if ELEM(NULL, nlt, nlt->strips.first) + if (ELEM(NULL, nlt, nlt->strips.first)) return 0; /* check each strip for F-Curves only (don't care about whether the flags are set) */ @@ -1195,7 +1195,7 @@ short BKE_nlatracks_have_animated_strips (ListBase *tracks) NlaTrack *nlt; /* sanity checks */ - if ELEM(NULL, tracks, tracks->first) + if (ELEM(NULL, tracks, tracks->first)) return 0; /* check each track, stopping on the first hit */ @@ -1279,7 +1279,7 @@ void BKE_nlastrip_validate_name (AnimData *adt, NlaStrip *strip) NlaTrack *nlt; /* sanity checks */ - if ELEM(NULL, adt, strip) + if (ELEM(NULL, adt, strip)) return; /* give strip a default name if none already */ @@ -1376,7 +1376,7 @@ static void BKE_nlastrip_validate_autoblends (NlaTrack *nlt, NlaStrip *nls) float *ns=NULL, *ne=NULL; /* sanity checks */ - if ELEM(NULL, nls, nlt) + if (ELEM(NULL, nls, nlt)) return; if ((nlt->prev == NULL) && (nlt->next == NULL)) return; @@ -1422,7 +1422,7 @@ void BKE_nla_validate_state (AnimData *adt) NlaTrack *nlt; /* sanity checks */ - if ELEM(NULL, adt, adt->nla_tracks.first) + if (ELEM(NULL, adt, adt->nla_tracks.first)) return; /* adjust blending values for auto-blending, and also do an initial pass to find the earliest strip */ @@ -1476,7 +1476,7 @@ void BKE_nla_action_pushdown (AnimData *adt) /* sanity checks */ // TODO: need to report the error for this - if ELEM(NULL, adt, adt->action) + if (ELEM(NULL, adt, adt->action)) return; /* if the action is empty, we also shouldn't try to add to stack, @@ -1524,7 +1524,7 @@ short BKE_nla_tweakmode_enter (AnimData *adt) NlaStrip *strip, *activeStrip=NULL; /* verify that data is valid */ - if ELEM(NULL, adt, adt->nla_tracks.first) + if (ELEM(NULL, adt, adt->nla_tracks.first)) return 0; /* if block is already in tweakmode, just leave, but we should report @@ -1575,7 +1575,7 @@ short BKE_nla_tweakmode_enter (AnimData *adt) } } - if ELEM3(NULL, activeTrack, activeStrip, activeStrip->act) { + if (ELEM3(NULL, activeTrack, activeStrip, activeStrip->act)) { if (G.f & G_DEBUG) { printf("NLA tweakmode enter - neither active requirement found \n"); printf("\tactiveTrack = %p, activeStrip = %p \n", (void *)activeTrack, (void *)activeStrip); @@ -1625,7 +1625,7 @@ void BKE_nla_tweakmode_exit (AnimData *adt) NlaTrack *nlt; /* verify that data is valid */ - if ELEM(NULL, adt, adt->nla_tracks.first) + if (ELEM(NULL, adt, adt->nla_tracks.first)) return; /* hopefully the flag is correct - skip if not on */ @@ -1667,7 +1667,7 @@ static void UNUSED_FUNCTION(BKE_nla_bake) (Scene *scene, ID *UNUSED(id), AnimDat * 1) Scene and AnimData must be provided * 2) there must be tracks to merge... */ - if ELEM3(NULL, scene, adt, adt->nla_tracks.first) + if (ELEM3(NULL, scene, adt, adt->nla_tracks.first)) return; /* if animdata currently has an action, 'push down' this onto the stack first */ diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 4a9b4978705..178c69af4d6 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -413,7 +413,7 @@ void unlink_object(Object *ob) modifiers_foreachObjectLink(obt, unlink_object__unlinkModifierLinks, ob); - if ELEM(obt->type, OB_CURVE, OB_FONT) { + if (ELEM(obt->type, OB_CURVE, OB_FONT)) { cu= obt->data; if (cu->bevobj==ob) { @@ -2950,11 +2950,19 @@ static KeyBlock *insert_curvekey(Scene *scene, Object *ob, const char *name, int } KeyBlock *object_insert_shape_key(Scene *scene, Object *ob, const char *name, int from_mix) -{ - if (ob->type==OB_MESH) return insert_meshkey(scene, ob, name, from_mix); - else if ELEM(ob->type, OB_CURVE, OB_SURF)return insert_curvekey(scene, ob, name, from_mix); - else if (ob->type==OB_LATTICE) return insert_lattkey(scene, ob, name, from_mix); - else return NULL; +{ + switch (ob->type) { + case OB_MESH: + return insert_meshkey(scene, ob, name, from_mix); + case OB_CURVE: + case OB_SURF: + return insert_curvekey(scene, ob, name, from_mix); + case OB_LATTICE: + return insert_lattkey(scene, ob, name, from_mix); + default: + return NULL; + } + } /* most important if this is modified it should _always_ return True, in certain diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index b2839db55cf..01ab36133fd 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -2730,7 +2730,7 @@ void ANIM_channel_draw (bAnimContext *ac, bAnimListElem *ale, float yminc, float float y, ymid, ytext; /* sanity checks - don't draw anything */ - if ELEM(NULL, acf, ale) + if (ELEM(NULL, acf, ale)) return; /* get initial offset */ @@ -3158,7 +3158,7 @@ void ANIM_channel_draw_widgets (bContext *C, bAnimContext *ac, bAnimListElem *al short offset; /* sanity checks - don't draw anything */ - if ELEM3(NULL, acf, ale, block) + if (ELEM3(NULL, acf, ale, block)) return; /* get initial offset */ diff --git a/source/blender/editors/animation/anim_ipo_utils.c b/source/blender/editors/animation/anim_ipo_utils.c index 169d6b94413..6f4d4c4a431 100644 --- a/source/blender/editors/animation/anim_ipo_utils.c +++ b/source/blender/editors/animation/anim_ipo_utils.c @@ -61,7 +61,7 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu) /* sanity checks */ if (name == NULL) return icon; - else if ELEM3(NULL, id, fcu, fcu->rna_path) { + else if (ELEM3(NULL, id, fcu, fcu->rna_path)) { if (fcu == NULL) strcpy(name, ""); else if (fcu->rna_path == NULL) diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c index 881de2904f7..9c4f96ebe6d 100644 --- a/source/blender/editors/animation/drivers.c +++ b/source/blender/editors/animation/drivers.c @@ -84,7 +84,7 @@ FCurve *verify_driver_fcurve (ID *id, const char rna_path[], const int array_ind FCurve *fcu; /* sanity checks */ - if ELEM(NULL, id, rna_path) + if (ELEM(NULL, id, rna_path)) return NULL; /* init animdata if none available yet */ diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c index 9b3e481d118..d19a137a6a8 100644 --- a/source/blender/editors/animation/fmodifier_ui.c +++ b/source/blender/editors/animation/fmodifier_ui.c @@ -784,7 +784,7 @@ short ANIM_fmodifiers_copy_to_buf (ListBase *modifiers, short active) short ok = 1; /* sanity checks */ - if ELEM(NULL, modifiers, modifiers->first) + if (ELEM(NULL, modifiers, modifiers->first)) return 0; /* copy the whole list, or just the active one? */ diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c index 1c0bb9beaa1..146aea401ec 100644 --- a/source/blender/editors/animation/keyframes_draw.c +++ b/source/blender/editors/animation/keyframes_draw.c @@ -189,7 +189,7 @@ static void nupdate_ak_gpframe (void *node, void *data) /* Add the given BezTriple to the given 'list' of Keyframes */ static void add_bezt_to_keycolumns_list(DLRBT_Tree *keys, BezTriple *bezt) { - if ELEM(NULL, keys, bezt) + if (ELEM(NULL, keys, bezt)) return; else BLI_dlrbTree_add(keys, compare_ak_bezt, nalloc_ak_bezt, nupdate_ak_bezt, bezt); @@ -198,7 +198,7 @@ static void add_bezt_to_keycolumns_list(DLRBT_Tree *keys, BezTriple *bezt) /* Add the given GPencil Frame to the given 'list' of Keyframes */ static void add_gpframe_to_keycolumns_list(DLRBT_Tree *keys, bGPDframe *gpf) { - if ELEM(NULL, keys, gpf) + if (ELEM(NULL, keys, gpf)) return; else BLI_dlrbTree_add(keys, compare_ak_gpframe, nalloc_ak_gpframe, nupdate_ak_gpframe, gpf); @@ -538,7 +538,7 @@ void draw_keyframe_shape (float x, float y, float xscale, float hsize, short sel glEnable(GL_LINE_SMOOTH); /* draw! */ - if ELEM(mode, KEYFRAME_SHAPE_INSIDE, KEYFRAME_SHAPE_BOTH) { + if (ELEM(mode, KEYFRAME_SHAPE_INSIDE, KEYFRAME_SHAPE_BOTH)) { /* interior - hardcoded colors (for selected and unselected only) */ switch (key_type) { case BEZT_KEYTYPE_BREAKDOWN: /* bluish frames for now */ @@ -574,7 +574,7 @@ void draw_keyframe_shape (float x, float y, float xscale, float hsize, short sel glCallList(displist2); } - if ELEM(mode, KEYFRAME_SHAPE_FRAME, KEYFRAME_SHAPE_BOTH) { + if (ELEM(mode, KEYFRAME_SHAPE_FRAME, KEYFRAME_SHAPE_BOTH)) { /* exterior - black frame */ glColor4f(0.0f, 0.0f, 0.0f, alpha); diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c index c6aed3133e2..4e59216a39c 100644 --- a/source/blender/editors/animation/keyframes_edit.c +++ b/source/blender/editors/animation/keyframes_edit.c @@ -760,11 +760,13 @@ KeyframeEditFunc ANIM_editkeyframes_mirror(short type) /* standard validation step for a few of these (implemented as macro for inlining without fn-call overhead): * "if the handles are not of the same type, set them to type free" */ -#define ENSURE_HANDLES_MATCH(bezt) \ - if (bezt->h1 != bezt->h2) { \ - if ELEM3(bezt->h1, HD_ALIGN, HD_AUTO, HD_AUTO_ANIM) bezt->h1= HD_FREE; \ - if ELEM3(bezt->h2, HD_ALIGN, HD_AUTO, HD_AUTO_ANIM) bezt->h2= HD_FREE; \ - } +#define ENSURE_HANDLES_MATCH(bezt) \ + if (bezt->h1 != bezt->h2) { \ + if (ELEM3(bezt->h1, HD_ALIGN, HD_AUTO, HD_AUTO_ANIM)) \ + bezt->h1= HD_FREE; \ + if (ELEM3(bezt->h2, HD_ALIGN, HD_AUTO, HD_AUTO_ANIM)) \ + bezt->h2= HD_FREE; \ + } /* Sets the selected bezier handles to type 'auto' */ static short set_bezier_auto(KeyframeEditData *UNUSED(ked), BezTriple *bezt) diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c index 5d6d02bef63..831b8d21b01 100644 --- a/source/blender/editors/animation/keyframes_general.c +++ b/source/blender/editors/animation/keyframes_general.c @@ -145,7 +145,7 @@ void duplicate_fcurve_keys(FCurve *fcu) int i; /* this can only work when there is an F-Curve, and also when there are some BezTriples */ - if ELEM(NULL, fcu, fcu->bezt) + if (ELEM(NULL, fcu, fcu->bezt)) return; for (i=0; i < fcu->totvert; i++) { diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 71e70536d15..ba413fda00c 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -156,7 +156,7 @@ FCurve *verify_fcurve (bAction *act, const char group[], const char rna_path[], FCurve *fcu; /* sanity checks */ - if ELEM(NULL, act, rna_path) + if (ELEM(NULL, act, rna_path)) return NULL; /* try to find f-curve matching for this setting @@ -980,7 +980,7 @@ short delete_keyframe (ReportList *reports, ID *id, bAction *act, const char gro int ret= 0; /* sanity checks */ - if ELEM(NULL, id, adt) { + if (ELEM(NULL, id, adt)) { BKE_report(reports, RPT_ERROR, "No ID-Block and/Or AnimData to delete keyframe from"); return 0; } diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index 4090fc1acaa..2211e6929a2 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -3055,7 +3055,7 @@ static int armature_merge_exec (bContext *C, wmOperator *op) short type= RNA_enum_get(op->ptr, "type"); /* sanity checks */ - if ELEM(NULL, obedit, arm) + if (ELEM(NULL, obedit, arm)) return OPERATOR_CANCELLED; /* for now, there's only really one type of merging that's performed... */ @@ -4898,7 +4898,7 @@ static int pose_clear_transform_generic_exec(bContext *C, wmOperator *op, short autokey = 0; /* sanity checks */ - if ELEM(NULL, clear_func, default_ksName) { + if (ELEM(NULL, clear_func, default_ksName)) { BKE_report(op->reports, RPT_ERROR, "Programming error: missing clear transform func or Keying Set Name"); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c index 3d33930fa49..6768c884868 100644 --- a/source/blender/editors/armature/poseobject.c +++ b/source/blender/editors/armature/poseobject.c @@ -256,7 +256,7 @@ static void ED_pose_clear_paths(Object *ob) bPoseChannel *pchan; short skipped = 0; - if ELEM(NULL, ob, ob->pose) + if (ELEM(NULL, ob, ob->pose)) return; /* free the motionpath blocks, but also take note of whether we skipped some... */ @@ -289,7 +289,7 @@ static int pose_clear_paths_exec (bContext *C, wmOperator *UNUSED(op)) ob= object_pose_armature_get(CTX_data_active_object(C)); /* only continue if there's an object */ - if ELEM(NULL, ob, ob->pose) + if (ELEM(NULL, ob, ob->pose)) return OPERATOR_CANCELLED; /* use the backend function for this */ @@ -1110,7 +1110,7 @@ static int pose_copy_exec (bContext *C, wmOperator *op) Object *ob= object_pose_armature_get(CTX_data_active_object(C)); /* sanity checking */ - if ELEM(NULL, ob, ob->pose) { + if (ELEM(NULL, ob, ob->pose)) { BKE_report(op->reports, RPT_ERROR, "No Pose to Copy"); return OPERATOR_CANCELLED; } @@ -1155,7 +1155,7 @@ static int pose_paste_exec (bContext *C, wmOperator *op) KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_LOC_ROT_SCALE_ID); /* sanity checks */ - if ELEM(NULL, ob, ob->pose) + if (ELEM(NULL, ob, ob->pose)) return OPERATOR_CANCELLED; if (g_posebuf == NULL) { diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index ced7dab91f4..d48cfaab63c 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -332,7 +332,7 @@ static int gp_actframe_delete_exec (bContext *C, wmOperator *op) BKE_report(op->reports, RPT_ERROR, "No Grease Pencil data"); return OPERATOR_CANCELLED; } - if ELEM(NULL, gpl, gpf) { + if (ELEM(NULL, gpl, gpf)) { BKE_report(op->reports, RPT_ERROR, "No active frame to delete"); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index b21c059fcc1..3cd764d2eb3 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -1313,7 +1313,7 @@ static void gp_paint_initstroke (tGPsdata *p, short paintmode) * * Admittedly, this is a bit hacky, but it works much nicer from an ergonomic standpoint! */ - if ELEM(NULL, sima, sima->image) { + if (ELEM(NULL, sima, sima->image)) { /* make strokes be drawn in screen space */ p->gpd->sbuffer_sflag &= ~GP_STROKE_2DSPACE; p->gpd->flag &= ~GP_DATA_VIEWALIGN; diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 21c3f4ca038..ce437fde69e 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -344,8 +344,8 @@ static void ui_apply_autokey_undo(bContext *C, uiBut *but) const char *str= NULL; /* define which string to use for undo */ - if ELEM(but->type, LINK, INLINK) str= "Add button link"; - else if ELEM(but->type, MENU, ICONTEXTROW) str= but->drawstr; + if (ELEM(but->type, LINK, INLINK)) str = "Add button link"; + else if (ELEM(but->type, MENU, ICONTEXTROW)) str = but->drawstr; else if (but->drawstr[0]) str= but->drawstr; else str= but->tip; @@ -1121,7 +1121,7 @@ static void ui_but_copy_paste(bContext *C, uiBut *but, uiHandleButtonData *data, } /* numeric value */ - if ELEM4(but->type, NUM, NUMABS, NUMSLI, HSVSLI) { + if (ELEM4(but->type, NUM, NUMABS, NUMSLI, HSVSLI)) { if (but->poin==NULL && but->rnapoin.data==NULL); else if (mode=='c') { diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 3baa672e42d..b7e2ba1c179 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -876,7 +876,7 @@ static void widget_draw_icon(uiBut *but, BIFIconID icon, float alpha, rcti *rect height= UI_DPI_ICON_SIZE; /* calculate blend color */ - if ELEM4(but->type, TOG, ROW, TOGN, LISTROW) { + if (ELEM4(but->type, TOG, ROW, TOGN, LISTROW)) { if (but->flag & UI_SELECT); else if (but->flag & UI_ACTIVE); else alpha= 0.5f; diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index 9072db77b6f..792ea88baa7 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -1776,8 +1776,10 @@ void UI_view2d_scrollers_free(View2DScrollers *scrollers) void UI_view2d_listview_cell_to_view(View2D *v2d, short columnwidth, short rowheight, float startx, float starty, int column, int row, rctf *rect) { /* sanity checks */ - if ELEM(NULL, v2d, rect) + if (ELEM(NULL, v2d, rect)) { return; + } + if ((columnwidth <= 0) && (rowheight <= 0)) { rect->xmin = rect->xmax = 0.0f; rect->ymin = rect->ymax = 0.0f; diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 09625e30eaf..03ded30fb59 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -1215,7 +1215,7 @@ static int shade_smooth_exec(bContext *C, wmOperator *op) done= 1; } - else if ELEM(ob->type, OB_SURF, OB_CURVE) { + else if (ELEM(ob->type, OB_SURF, OB_CURVE)) { cu= ob->data; for (nu=cu->nurb.first; nu; nu=nu->next) { diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c index 8200bbef2ee..1d502aeb55c 100644 --- a/source/blender/editors/object/object_transform.c +++ b/source/blender/editors/object/object_transform.c @@ -216,7 +216,7 @@ static int object_clear_transform_generic_exec(bContext *C, wmOperator *op, KeyingSet *ks; /* sanity checks */ - if ELEM(NULL, clear_func, default_ksName) { + if (ELEM(NULL, clear_func, default_ksName)) { BKE_report(op->reports, RPT_ERROR, "Programming error: missing clear transform func or Keying Set Name"); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index 0aeeb0f71e2..260817d743f 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -232,7 +232,7 @@ static int material_slot_de_select(bContext *C, int select) EDBM_deselect_by_material(em, ob->actcol-1, select); } } - else if ELEM(ob->type, OB_CURVE, OB_SURF) { + else if (ELEM(ob->type, OB_CURVE, OB_SURF)) { ListBase *nurbs= curve_editnurbs((Curve*)ob->data); Nurb *nu; BPoint *bp; diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c index 59e4a1aaf04..a736fd01b2c 100644 --- a/source/blender/editors/space_info/info_stats.c +++ b/source/blender/editors/space_info/info_stats.c @@ -176,7 +176,7 @@ static void stats_object_edit(Object *obedit, SceneStats *stats) stats->totvert+=2; } } - else if ELEM(obedit->type, OB_CURVE, OB_SURF) { /* OB_FONT has no cu->editnurb */ + else if (ELEM(obedit->type, OB_CURVE, OB_SURF)) { /* OB_FONT has no cu->editnurb */ /* Curve Edit */ Curve *cu= obedit->data; Nurb *nu; diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c index 0b8565b93a2..7ed49025814 100644 --- a/source/blender/editors/space_nla/nla_draw.c +++ b/source/blender/editors/space_nla/nla_draw.c @@ -121,7 +121,7 @@ static void nla_action_draw_keyframes (AnimData *adt, bAction *act, View2D *v2d, action_to_keylist(adt, act, &keys, NULL); BLI_dlrbTree_linkedlist_sync(&keys); - if ELEM(NULL, act, keys.first) + if (ELEM(NULL, act, keys.first)) return; /* draw a darkened region behind the strips diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index d191f1d1d35..0c2dc7493e2 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -520,7 +520,7 @@ static int nlaedit_add_transition_exec (bContext *C, wmOperator *op) NlaStrip *s1, *s2; /* get initial pair of strips */ - if ELEM(nlt->strips.first, NULL, nlt->strips.last) + if (ELEM(nlt->strips.first, NULL, nlt->strips.last)) continue; s1= nlt->strips.first; s2= s1->next; @@ -530,7 +530,7 @@ static int nlaedit_add_transition_exec (bContext *C, wmOperator *op) NlaStrip *strip; /* check if both are selected */ - if ELEM(0, (s1->flag & NLASTRIP_FLAG_SELECT), (s2->flag & NLASTRIP_FLAG_SELECT)) + if (ELEM(0, (s1->flag & NLASTRIP_FLAG_SELECT), (s2->flag & NLASTRIP_FLAG_SELECT))) continue; /* check if there's space between the two */ if (IS_EQF(s1->end, s2->start)) diff --git a/source/blender/editors/space_node/node_buttons.c b/source/blender/editors/space_node/node_buttons.c index 19eebe4d320..dac185bf46e 100644 --- a/source/blender/editors/space_node/node_buttons.c +++ b/source/blender/editors/space_node/node_buttons.c @@ -98,7 +98,7 @@ static void active_node_panel(const bContext *C, Panel *pa) PointerRNA ptr; /* verify pointers, and create RNA pointer for the node */ - if ELEM(NULL, ntree, node) + if (ELEM(NULL, ntree, node)) return; //if (node->id) /* for group nodes */ // RNA_pointer_create(node->id, &RNA_Node, node, &ptr); diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index 45830eed223..c4fe337ba58 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -1222,7 +1222,7 @@ static int do_outliner_operation_event(bContext *C, Scene *scene, ARegion *ar, S WM_operator_name_call(C, "OUTLINER_OT_animdata_operation", WM_OP_INVOKE_REGION_WIN, NULL); else if (datalevel == TSE_DRIVER_BASE) /* do nothing... no special ops needed yet */; - else if ELEM3(datalevel, TSE_R_LAYER_BASE, TSE_R_LAYER, TSE_R_PASS) + else if (ELEM3(datalevel, TSE_R_LAYER_BASE, TSE_R_LAYER, TSE_R_PASS)) /*WM_operator_name_call(C, "OUTLINER_OT_renderdata_operation", WM_OP_INVOKE_REGION_WIN, NULL)*/; else WM_operator_name_call(C, "OUTLINER_OT_data_operation", WM_OP_INVOKE_REGION_WIN, NULL); diff --git a/source/blender/editors/space_time/time_ops.c b/source/blender/editors/space_time/time_ops.c index 3eaf2b8100e..1c1f7a69865 100644 --- a/source/blender/editors/space_time/time_ops.c +++ b/source/blender/editors/space_time/time_ops.c @@ -143,7 +143,7 @@ static int time_view_all_exec (bContext *C, wmOperator *UNUSED(op)) View2D *v2d= (ar) ? &ar->v2d : NULL; float extra; - if ELEM(NULL, scene, ar) + if (ELEM(NULL, scene, ar)) return OPERATOR_CANCELLED; /* set extents of view to start/end frames (Preview Range too) */ diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c index aae0348de20..fae271e5bee 100644 --- a/source/blender/editors/space_view3d/drawarmature.c +++ b/source/blender/editors/space_view3d/drawarmature.c @@ -1875,7 +1875,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, /* wire draw over solid only in posemode */ if ((dt <= OB_WIRE) || (arm->flag & ARM_POSEMODE) || ELEM(arm->drawtype, ARM_LINE, ARM_WIRE)) { /* draw line check first. we do selection indices */ - if ELEM(arm->drawtype, ARM_LINE, ARM_WIRE) { + if (ELEM(arm->drawtype, ARM_LINE, ARM_WIRE)) { if (arm->flag & ARM_POSEMODE) index= base->selcol; } @@ -2139,7 +2139,7 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, int dt) /* if wire over solid, set offset */ index= -1; glLoadName(-1); - if ELEM(arm->drawtype, ARM_LINE, ARM_WIRE) { + if (ELEM(arm->drawtype, ARM_LINE, ARM_WIRE)) { if (G.f & G_PICKSEL) index= 0; } @@ -2203,7 +2203,7 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, int dt) /* restore */ if (index!=-1) glLoadName(-1); - if ELEM(arm->drawtype,ARM_LINE,ARM_WIRE); + if (ELEM(arm->drawtype,ARM_LINE,ARM_WIRE)); else if (dt>OB_WIRE) bglPolygonOffset(rv3d->dist, 0.0f); /* finally names and axes */ @@ -2462,7 +2462,7 @@ static void draw_ghost_poses(Scene *scene, View3D *v3d, ARegion *ar, Base *base) int cfrao, flago; /* pre conditions, get an action with sufficient frames */ - if ELEM(NULL, adt, adt->action) + if (ELEM(NULL, adt, adt->action)) return; calc_action_range(adt->action, &start, &end, 0); diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index e8e1083805a..00ce6897c2c 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -1365,7 +1365,7 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, glEnd(); } } - else if ELEM(la->type, LA_HEMI, LA_SUN) { + else if (ELEM(la->type, LA_HEMI, LA_SUN)) { /* draw the line from the circle along the dist */ glBegin(GL_LINE_STRIP); @@ -6123,7 +6123,7 @@ static void draw_bounding_volume(Scene *scene, Object *ob, char type) if (ob->type==OB_MESH) { bb= mesh_get_bb(ob); } - else if ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT) { + else if (ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT)) { bb= ob->bb ? ob->bb : ( (Curve *)ob->data )->bb; } else if (ob->type==OB_MBALL) { @@ -6157,7 +6157,7 @@ static void drawtexspace(Object *ob) if (ob->type==OB_MESH) { mesh_get_texspace(ob->data, loc, NULL, size); } - else if ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT) { + else if (ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT)) { Curve *cu= ob->data; copy_v3_v3(size, cu->size); copy_v3_v3(loc, cu->loc); diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c index fdaf34e2e3c..1d8395c0967 100644 --- a/source/blender/editors/space_view3d/view3d_snap.c +++ b/source/blender/editors/space_view3d/view3d_snap.c @@ -523,7 +523,7 @@ static int snap_sel_to_grid(bContext *C, wmOperator *UNUSED(op)) if (obedit) { tottrans= 0; - if ELEM6(obedit->type, OB_ARMATURE, OB_LATTICE, OB_MESH, OB_SURF, OB_CURVE, OB_MBALL) + if (ELEM6(obedit->type, OB_ARMATURE, OB_LATTICE, OB_MESH, OB_SURF, OB_CURVE, OB_MBALL)) make_trans_verts(obedit, bmat[0], bmat[1], 0); if (tottrans==0) return OPERATOR_CANCELLED; @@ -664,7 +664,7 @@ static int snap_sel_to_curs(bContext *C, wmOperator *UNUSED(op)) if (obedit) { tottrans= 0; - if ELEM6(obedit->type, OB_ARMATURE, OB_LATTICE, OB_MESH, OB_SURF, OB_CURVE, OB_MBALL) + if (ELEM6(obedit->type, OB_ARMATURE, OB_LATTICE, OB_MESH, OB_SURF, OB_CURVE, OB_MBALL)) make_trans_verts(obedit, bmat[0], bmat[1], 0); if (tottrans==0) return OPERATOR_CANCELLED; @@ -879,7 +879,7 @@ static int snap_curs_to_sel(bContext *C, wmOperator *UNUSED(op)) if (obedit) { tottrans=0; - if ELEM6(obedit->type, OB_ARMATURE, OB_LATTICE, OB_MESH, OB_SURF, OB_CURVE, OB_MBALL) + if (ELEM6(obedit->type, OB_ARMATURE, OB_LATTICE, OB_MESH, OB_SURF, OB_CURVE, OB_MBALL)) make_trans_verts(obedit, bmat[0], bmat[1], TM_ALL_JOINTS|TM_SKIP_HANDLES); if (tottrans==0) return OPERATOR_CANCELLED; @@ -1063,7 +1063,7 @@ int minmax_verts(Object *obedit, float *min, float *max) int a; tottrans=0; - if ELEM5(obedit->type, OB_ARMATURE, OB_LATTICE, OB_MESH, OB_SURF, OB_CURVE) + if (ELEM5(obedit->type, OB_ARMATURE, OB_LATTICE, OB_MESH, OB_SURF, OB_CURVE)) make_trans_verts(obedit, bmat[0], bmat[1], TM_ALL_JOINTS); if (tottrans==0) return 0; diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 04b6a095117..68b7268596c 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -1694,7 +1694,7 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int /* same as TFM_TIME_EXTEND, but we need the mode info for later * so that duplicate-culling will work properly */ - if ELEM(t->spacetype, SPACE_IPO, SPACE_NLA) + if (ELEM(t->spacetype, SPACE_IPO, SPACE_NLA)) initTranslation(t); else initTimeTranslate(t); @@ -1706,7 +1706,7 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int * (for Graph/NLA Editors only since they uses 'standard' transforms to get 2D movement) * depending on which editor this was called from */ - if ELEM(t->spacetype, SPACE_IPO, SPACE_NLA) + if (ELEM(t->spacetype, SPACE_IPO, SPACE_NLA)) initTranslation(t); else initTimeTranslate(t); diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 6669bfdb3ca..60ec08fcb5d 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -5927,7 +5927,7 @@ void createTransData(bContext *C, TransInfo *t) if (t->obedit->type == OB_MESH) { createTransEditVerts(C, t); } - else if ELEM(t->obedit->type, OB_CURVE, OB_SURF) { + else if (ELEM(t->obedit->type, OB_CURVE, OB_SURF)) { createTransCurveVerts(C, t); } else if (t->obedit->type==OB_LATTICE) { diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 8e22ccd943d..6dbab08ba7f 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -269,7 +269,7 @@ static void animrecord_check_state (Scene *scene, ID *id, wmTimer *animtimer) ScreenAnimData *sad= (animtimer) ? animtimer->customdata : NULL; /* sanity checks */ - if ELEM3(NULL, scene, id, sad) + if (ELEM3(NULL, scene, id, sad)) return; /* check if we need a new strip if: @@ -673,7 +673,7 @@ static void recalcData_view3d(TransInfo *t) Base *base = t->scene->basact; if (t->obedit) { - if ELEM(t->obedit->type, OB_CURVE, OB_SURF) { + if (ELEM(t->obedit->type, OB_CURVE, OB_SURF)) { Curve *cu= t->obedit->data; ListBase *nurbs= curve_editnurbs(cu); Nurb *nu= nurbs->first; diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c index eb1d8e1df5c..ece556f11ae 100644 --- a/source/blender/editors/transform/transform_manipulator.c +++ b/source/blender/editors/transform/transform_manipulator.c @@ -377,7 +377,7 @@ int calc_manipulator_stats(const bContext *C) } } } - else if ELEM(obedit->type, OB_CURVE, OB_SURF) { + else if (ELEM(obedit->type, OB_CURVE, OB_SURF)) { Curve *cu= obedit->data; float center[3]; diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c index 092b9c27929..2a53a8e4ad2 100644 --- a/source/blender/editors/transform/transform_orientations.c +++ b/source/blender/editors/transform/transform_orientations.c @@ -712,7 +712,7 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3], } } } /* end editmesh */ - else if ELEM(obedit->type, OB_CURVE, OB_SURF) { + else if (ELEM(obedit->type, OB_CURVE, OB_SURF)) { Curve *cu= obedit->data; Nurb *nu; BezTriple *bezt; diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c index e46fe19d306..40a95fc08ba 100644 --- a/source/blender/editors/util/undo.c +++ b/source/blender/editors/util/undo.c @@ -105,7 +105,7 @@ void ED_undo_push(bContext *C, const char *str) if (obedit->type==OB_MESH) undo_push_mesh(C, str); - else if ELEM(obedit->type, OB_CURVE, OB_SURF) + else if (ELEM(obedit->type, OB_CURVE, OB_SURF)) undo_push_curve(C, str); else if (obedit->type==OB_FONT) undo_push_font(C, str); @@ -168,7 +168,7 @@ static int ed_undo_step(bContext *C, int step, const char *undoname) ED_text_undo_step(C, step); } else if (obedit) { - if ELEM7(obedit->type, OB_MESH, OB_FONT, OB_CURVE, OB_SURF, OB_MBALL, OB_LATTICE, OB_ARMATURE) { + if (ELEM7(obedit->type, OB_MESH, OB_FONT, OB_CURVE, OB_SURF, OB_MBALL, OB_LATTICE, OB_ARMATURE)) { if (undoname) undo_editmode_name(C, undoname); else @@ -260,7 +260,7 @@ int ED_undo_valid(const bContext *C, const char *undoname) return 1; } else if (obedit) { - if ELEM7(obedit->type, OB_MESH, OB_FONT, OB_CURVE, OB_SURF, OB_MBALL, OB_LATTICE, OB_ARMATURE) { + if (ELEM7(obedit->type, OB_MESH, OB_FONT, OB_CURVE, OB_SURF, OB_MBALL, OB_LATTICE, OB_ARMATURE)) { return undo_editmode_valid(undoname); } } diff --git a/source/blender/nodes/shader/node_shader_util.c b/source/blender/nodes/shader/node_shader_util.c index df2f7879231..90c62bc47ac 100644 --- a/source/blender/nodes/shader/node_shader_util.c +++ b/source/blender/nodes/shader/node_shader_util.c @@ -88,8 +88,9 @@ void ntreeShaderGetTexcoMode(bNodeTree *ntree, int r_mode, short *texco, int *mo if (node->type==SH_NODE_TEXTURE) { if ((r_mode & R_OSA) && node->id) { Tex *tex= (Tex *)node->id; - if ELEM3(tex->type, TEX_IMAGE, TEX_PLUGIN, TEX_ENVMAP) + if (ELEM3(tex->type, TEX_IMAGE, TEX_PLUGIN, TEX_ENVMAP)) { *texco |= TEXCO_OSA|NEED_UV; + } } /* usability exception... without input we still give the node orcos */ sock= node->inputs.first; diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c index b6a25985d33..ff6f83cc946 100644 --- a/source/blender/render/intern/source/convertblender.c +++ b/source/blender/render/intern/source/convertblender.c @@ -4521,7 +4521,7 @@ static void init_render_object_data(Render *re, ObjectRen *obr, int timeoffset) render_new_particle_system(re, obr, psys, timeoffset); } else { - if ELEM(ob->type, OB_FONT, OB_CURVE) + if (ELEM(ob->type, OB_FONT, OB_CURVE)) init_render_curve(re, obr, timeoffset); else if (ob->type==OB_SURF) init_render_surf(re, obr, timeoffset); diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c index 3346cf3c261..453bb0aeeb6 100644 --- a/source/blender/render/intern/source/render_texture.c +++ b/source/blender/render/intern/source/render_texture.c @@ -1029,7 +1029,7 @@ static void do_2d_mapping(MTex *mtex, float *t, VlakRen *vlr, float *n, float *d dyt[1]/= 2.0f; dyt[2]/= 2.0f; } - else if ELEM(wrap, MTEX_TUBE, MTEX_SPHERE) { + else if (ELEM(wrap, MTEX_TUBE, MTEX_SPHERE)) { /* exception: the seam behind (y<0.0) */ ok= 1; if (t[1]<=0.0f) { -- cgit v1.2.3 From 4457e85442eea30bc6166e15da040188e77b5be7 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 25 Mar 2012 23:12:42 +0000 Subject: style cleanup: dont use 'else for' for extended blocks of code (quite confusing) --- source/blender/blenkernel/intern/pointcache.c | 94 +++---- source/blender/editors/space_view3d/drawobject.c | 310 ++++++++++++----------- 2 files changed, 206 insertions(+), 198 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 63135ea8641..e3b2e190f03 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -2839,40 +2839,44 @@ void BKE_ptcache_bake(PTCacheBaker* baker) cache->flag &= ~PTCACHE_BAKED; } } - else for (SETLOOPER(scene, sce_iter, base)) { - /* cache/bake everything in the scene */ - BKE_ptcache_ids_from_object(&pidlist, base->object, scene, MAX_DUPLI_RECUR); - - for (pid=pidlist.first; pid; pid=pid->next) { - cache = pid->cache; - if ((cache->flag & PTCACHE_BAKED)==0) { - if (pid->type==PTCACHE_TYPE_PARTICLES) { - ParticleSystem *psys = (ParticleSystem*)pid->calldata; - /* skip hair & keyed particles */ - if (psys->part->type == PART_HAIR || psys->part->phystype == PART_PHYS_KEYED) - continue; - - psys_get_pointcache_start_end(scene, pid->calldata, &cache->startframe, &cache->endframe); - } + else { + for (SETLOOPER(scene, sce_iter, base)) { + /* cache/bake everything in the scene */ + BKE_ptcache_ids_from_object(&pidlist, base->object, scene, MAX_DUPLI_RECUR); + + for (pid=pidlist.first; pid; pid=pid->next) { + cache = pid->cache; + if ((cache->flag & PTCACHE_BAKED)==0) { + if (pid->type==PTCACHE_TYPE_PARTICLES) { + ParticleSystem *psys = (ParticleSystem*)pid->calldata; + /* skip hair & keyed particles */ + if (psys->part->type == PART_HAIR || psys->part->phystype == PART_PHYS_KEYED) + continue; + + psys_get_pointcache_start_end(scene, pid->calldata, &cache->startframe, &cache->endframe); + } - if ((cache->flag & PTCACHE_REDO_NEEDED || (cache->flag & PTCACHE_SIMULATION_VALID)==0) - && ((cache->flag & PTCACHE_QUICK_CACHE)==0 || render || bake)) - BKE_ptcache_id_clear(pid, PTCACHE_CLEAR_ALL, 0); + if ((cache->flag & PTCACHE_REDO_NEEDED || (cache->flag & PTCACHE_SIMULATION_VALID)==0) && + ((cache->flag & PTCACHE_QUICK_CACHE)==0 || render || bake)) + { + BKE_ptcache_id_clear(pid, PTCACHE_CLEAR_ALL, 0); + } - startframe = MIN2(startframe, cache->startframe); + startframe = MIN2(startframe, cache->startframe); - if (bake || render) { - cache->flag |= PTCACHE_BAKING; + if (bake || render) { + cache->flag |= PTCACHE_BAKING; - if (bake) - thread_data.endframe = MAX2(thread_data.endframe, cache->endframe); - } + if (bake) + thread_data.endframe = MAX2(thread_data.endframe, cache->endframe); + } - cache->flag &= ~PTCACHE_BAKED; + cache->flag &= ~PTCACHE_BAKED; + } } + BLI_freelistN(&pidlist); } - BLI_freelistN(&pidlist); } CFRA = startframe; @@ -2928,30 +2932,32 @@ void BKE_ptcache_bake(PTCacheBaker* baker) BKE_ptcache_write(pid, 0); } } - else for (SETLOOPER(scene, sce_iter, base)) { - BKE_ptcache_ids_from_object(&pidlist, base->object, scene, MAX_DUPLI_RECUR); + else { + for (SETLOOPER(scene, sce_iter, base)) { + BKE_ptcache_ids_from_object(&pidlist, base->object, scene, MAX_DUPLI_RECUR); - for (pid=pidlist.first; pid; pid=pid->next) { - /* skip hair particles */ - if (pid->type==PTCACHE_TYPE_PARTICLES && ((ParticleSystem*)pid->calldata)->part->type == PART_HAIR) - continue; - - cache = pid->cache; + for (pid=pidlist.first; pid; pid=pid->next) { + /* skip hair particles */ + if (pid->type==PTCACHE_TYPE_PARTICLES && ((ParticleSystem*)pid->calldata)->part->type == PART_HAIR) + continue; - if (thread_data.step > 1) - cache->flag &= ~(PTCACHE_BAKING|PTCACHE_OUTDATED); - else - cache->flag &= ~(PTCACHE_BAKING|PTCACHE_REDO_NEEDED); + cache = pid->cache; - cache->flag |= PTCACHE_SIMULATION_VALID; + if (thread_data.step > 1) + cache->flag &= ~(PTCACHE_BAKING|PTCACHE_OUTDATED); + else + cache->flag &= ~(PTCACHE_BAKING|PTCACHE_REDO_NEEDED); - if (bake) { - cache->flag |= PTCACHE_BAKED; - if (cache->flag & PTCACHE_DISK_CACHE) - BKE_ptcache_write(pid, 0); + cache->flag |= PTCACHE_SIMULATION_VALID; + + if (bake) { + cache->flag |= PTCACHE_BAKED; + if (cache->flag & PTCACHE_DISK_CACHE) + BKE_ptcache_write(pid, 0); + } } + BLI_freelistN(&pidlist); } - BLI_freelistN(&pidlist); } scene->r.framelen = frameleno; diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 00ce6897c2c..b78d5b23e3f 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -4412,192 +4412,194 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv /* circles don't use drawdata, so have to add a special case here */ if ((pdd || draw_as==PART_DRAW_CIRC) && draw_as!=PART_DRAW_PATH) { -/* 5. */ + /* 5. */ if (pdd && (pdd->flag & PARTICLE_DRAW_DATA_UPDATED) && (pdd->vedata || part->draw & (PART_DRAW_SIZE|PART_DRAW_NUM|PART_DRAW_HEALTH))==0) { totpoint = pdd->totpoint; /* draw data is up to date */ } - else for (a=0,pa=pars; adraw&PART_DRAW_PARENT)==0) continue; - if (pa->flag & PARS_NO_DISP || pa->flag & PARS_UNEXIST) continue; - - pa_time=(cfra-pa->time)/pa->lifetime; - pa_birthtime=pa->time; - pa_dietime = pa->dietime; - pa_size=pa->size; - if (part->phystype==PART_PHYS_BOIDS) - pa_health = pa->boid->data.health; - else - pa_health = -1.0; - - r_tilt = 2.0f*(PSYS_FRAND(a + 21) - 0.5f); - r_length = PSYS_FRAND(a + 22); - - if (part->draw_col > PART_DRAW_COL_MAT) { - switch(part->draw_col) { - case PART_DRAW_COL_VEL: - intensity = len_v3(pa->state.vel)/part->color_vec_max; - break; - case PART_DRAW_COL_ACC: - intensity = len_v3v3(pa->state.vel, pa->prev_state.vel) / ((pa->state.time - pa->prev_state.time) * part->color_vec_max); - break; - default: - intensity= 1.0f; /* should never happen */ + else { + for (a=0,pa=pars; adraw&PART_DRAW_PARENT)==0) continue; + if (pa->flag & PARS_NO_DISP || pa->flag & PARS_UNEXIST) continue; + + pa_time=(cfra-pa->time)/pa->lifetime; + pa_birthtime=pa->time; + pa_dietime = pa->dietime; + pa_size=pa->size; + if (part->phystype==PART_PHYS_BOIDS) + pa_health = pa->boid->data.health; + else + pa_health = -1.0; + + r_tilt = 2.0f*(PSYS_FRAND(a + 21) - 0.5f); + r_length = PSYS_FRAND(a + 22); + + if (part->draw_col > PART_DRAW_COL_MAT) { + switch(part->draw_col) { + case PART_DRAW_COL_VEL: + intensity = len_v3(pa->state.vel)/part->color_vec_max; + break; + case PART_DRAW_COL_ACC: + intensity = len_v3v3(pa->state.vel, pa->prev_state.vel) / ((pa->state.time - pa->prev_state.time) * part->color_vec_max); + break; + default: + intensity= 1.0f; /* should never happen */ + } + CLAMP(intensity, 0.f, 1.f); + weight_to_rgb(ma_col, intensity); } - CLAMP(intensity, 0.f, 1.f); - weight_to_rgb(ma_col, intensity); } - } - else { - ChildParticle *cpa= &psys->child[a-totpart]; - - pa_time=psys_get_child_time(psys,cpa,cfra,&pa_birthtime,&pa_dietime); - pa_size=psys_get_child_size(psys,cpa,cfra,NULL); - - pa_health = -1.0; + else { + ChildParticle *cpa= &psys->child[a-totpart]; - r_tilt = 2.0f*(PSYS_FRAND(a + 21) - 0.5f); - r_length = PSYS_FRAND(a + 22); - } + pa_time=psys_get_child_time(psys,cpa,cfra,&pa_birthtime,&pa_dietime); + pa_size=psys_get_child_size(psys,cpa,cfra,NULL); - drawn = 0; - if (part->draw_as == PART_DRAW_REND && part->trail_count > 1) { - float length = part->path_end * (1.0f - part->randlength * r_length); - int trail_count = part->trail_count * (1.0f - part->randlength * r_length); - float ct = ((part->draw & PART_ABS_PATH_TIME) ? cfra : pa_time) - length; - float dt = length / (trail_count ? (float)trail_count : 1.0f); - int i=0; + pa_health = -1.0; - ct+=dt; - for (i=0; i < trail_count; i++, ct += dt) { - float pixsize; + r_tilt = 2.0f*(PSYS_FRAND(a + 21) - 0.5f); + r_length = PSYS_FRAND(a + 22); + } - if (part->draw & PART_ABS_PATH_TIME) { - if (ct < pa_birthtime || ct > pa_dietime) + drawn = 0; + if (part->draw_as == PART_DRAW_REND && part->trail_count > 1) { + float length = part->path_end * (1.0f - part->randlength * r_length); + int trail_count = part->trail_count * (1.0f - part->randlength * r_length); + float ct = ((part->draw & PART_ABS_PATH_TIME) ? cfra : pa_time) - length; + float dt = length / (trail_count ? (float)trail_count : 1.0f); + int i=0; + + ct+=dt; + for (i=0; i < trail_count; i++, ct += dt) { + float pixsize; + + if (part->draw & PART_ABS_PATH_TIME) { + if (ct < pa_birthtime || ct > pa_dietime) + continue; + } + else if (ct < 0.0f || ct > 1.0f) continue; - } - else if (ct < 0.0f || ct > 1.0f) - continue; - state.time = (part->draw & PART_ABS_PATH_TIME) ? -ct : -(pa_birthtime + ct * (pa_dietime - pa_birthtime)); - psys_get_particle_on_path(&sim,a,&state,need_v); - - if (psys->parent) - mul_m4_v3(psys->parent->obmat, state.co); - - /* create actiual particle data */ - if (draw_as == PART_DRAW_BB) { - bb.offset[0] = part->bb_offset[0]; - bb.offset[1] = part->bb_offset[1]; - bb.size[0] = part->bb_size[0] * pa_size; - if (part->bb_align==PART_BB_VEL) { - float pa_vel = len_v3(state.vel); - float head = part->bb_vel_head*pa_vel; - float tail = part->bb_vel_tail*pa_vel; - bb.size[1] = part->bb_size[1]*pa_size + head + tail; - /* use offset to adjust the particle center. this is relative to size, so need to divide! */ - if (bb.size[1] > 0.0f) - bb.offset[1] += (head-tail) / bb.size[1]; + state.time = (part->draw & PART_ABS_PATH_TIME) ? -ct : -(pa_birthtime + ct * (pa_dietime - pa_birthtime)); + psys_get_particle_on_path(&sim,a,&state,need_v); + + if (psys->parent) + mul_m4_v3(psys->parent->obmat, state.co); + + /* create actiual particle data */ + if (draw_as == PART_DRAW_BB) { + bb.offset[0] = part->bb_offset[0]; + bb.offset[1] = part->bb_offset[1]; + bb.size[0] = part->bb_size[0] * pa_size; + if (part->bb_align==PART_BB_VEL) { + float pa_vel = len_v3(state.vel); + float head = part->bb_vel_head*pa_vel; + float tail = part->bb_vel_tail*pa_vel; + bb.size[1] = part->bb_size[1]*pa_size + head + tail; + /* use offset to adjust the particle center. this is relative to size, so need to divide! */ + if (bb.size[1] > 0.0f) + bb.offset[1] += (head-tail) / bb.size[1]; + } + else + bb.size[1] = part->bb_size[1] * pa_size; + bb.tilt = part->bb_tilt * (1.0f - part->bb_rand_tilt * r_tilt); + bb.time = ct; } - else - bb.size[1] = part->bb_size[1] * pa_size; - bb.tilt = part->bb_tilt * (1.0f - part->bb_rand_tilt * r_tilt); - bb.time = ct; - } - pixsize = ED_view3d_pixel_size(rv3d, state.co) * pixsize_scale; + pixsize = ED_view3d_pixel_size(rv3d, state.co) * pixsize_scale; - draw_particle(&state, draw_as, part->draw, pixsize, imat, part->draw_line, &bb, psys->pdd); + draw_particle(&state, draw_as, part->draw, pixsize, imat, part->draw_line, &bb, psys->pdd); - totpoint++; - drawn = 1; + totpoint++; + drawn = 1; + } } - } - else { - state.time=cfra; - if (psys_get_particle_state(&sim,a,&state,0)) { - float pixsize; - - if (psys->parent) - mul_m4_v3(psys->parent->obmat, state.co); - - /* create actiual particle data */ - if (draw_as == PART_DRAW_BB) { - bb.offset[0] = part->bb_offset[0]; - bb.offset[1] = part->bb_offset[1]; - bb.size[0] = part->bb_size[0] * pa_size; - if (part->bb_align==PART_BB_VEL) { - float pa_vel = len_v3(state.vel); - float head = part->bb_vel_head*pa_vel; - float tail = part->bb_vel_tail*pa_vel; - bb.size[1] = part->bb_size[1]*pa_size + head + tail; - /* use offset to adjust the particle center. this is relative to size, so need to divide! */ - if (bb.size[1] > 0.0f) - bb.offset[1] += (head-tail) / bb.size[1]; + else { + state.time=cfra; + if (psys_get_particle_state(&sim,a,&state,0)) { + float pixsize; + + if (psys->parent) + mul_m4_v3(psys->parent->obmat, state.co); + + /* create actiual particle data */ + if (draw_as == PART_DRAW_BB) { + bb.offset[0] = part->bb_offset[0]; + bb.offset[1] = part->bb_offset[1]; + bb.size[0] = part->bb_size[0] * pa_size; + if (part->bb_align==PART_BB_VEL) { + float pa_vel = len_v3(state.vel); + float head = part->bb_vel_head*pa_vel; + float tail = part->bb_vel_tail*pa_vel; + bb.size[1] = part->bb_size[1]*pa_size + head + tail; + /* use offset to adjust the particle center. this is relative to size, so need to divide! */ + if (bb.size[1] > 0.0f) + bb.offset[1] += (head-tail) / bb.size[1]; + } + else + bb.size[1] = part->bb_size[1] * pa_size; + bb.tilt = part->bb_tilt * (1.0f - part->bb_rand_tilt * r_tilt); + bb.time = pa_time; } - else - bb.size[1] = part->bb_size[1] * pa_size; - bb.tilt = part->bb_tilt * (1.0f - part->bb_rand_tilt * r_tilt); - bb.time = pa_time; - } - pixsize = ED_view3d_pixel_size(rv3d, state.co) * pixsize_scale; + pixsize = ED_view3d_pixel_size(rv3d, state.co) * pixsize_scale; - draw_particle(&state, draw_as, part->draw, pixsize, imat, part->draw_line, &bb, pdd); + draw_particle(&state, draw_as, part->draw, pixsize, imat, part->draw_line, &bb, pdd); - totpoint++; - drawn = 1; + totpoint++; + drawn = 1; + } } - } - if (drawn) { - /* additional things to draw for each particle */ - /* (velocity, size and number) */ - if ((part->draw & PART_DRAW_VEL) && pdd && pdd->vedata) { - copy_v3_v3(pdd->ved,state.co); - pdd->ved += 3; - mul_v3_v3fl(vel, state.vel, timestep); - add_v3_v3v3(pdd->ved, state.co, vel); - pdd->ved+=3; - - totve++; - } + if (drawn) { + /* additional things to draw for each particle */ + /* (velocity, size and number) */ + if ((part->draw & PART_DRAW_VEL) && pdd && pdd->vedata) { + copy_v3_v3(pdd->ved,state.co); + pdd->ved += 3; + mul_v3_v3fl(vel, state.vel, timestep); + add_v3_v3v3(pdd->ved, state.co, vel); + pdd->ved+=3; + + totve++; + } - if (part->draw & PART_DRAW_SIZE) { - setlinestyle(3); - drawcircball(GL_LINE_LOOP, state.co, pa_size, imat); - setlinestyle(0); - } + if (part->draw & PART_DRAW_SIZE) { + setlinestyle(3); + drawcircball(GL_LINE_LOOP, state.co, pa_size, imat); + setlinestyle(0); + } - if ((part->draw & PART_DRAW_NUM || part->draw & PART_DRAW_HEALTH) && - (v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) - { - float vec_txt[3]; - char *val_pos= numstr; - numstr[0]= '\0'; + if ((part->draw & PART_DRAW_NUM || part->draw & PART_DRAW_HEALTH) && + (v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) + { + float vec_txt[3]; + char *val_pos= numstr; + numstr[0]= '\0'; - if (part->draw&PART_DRAW_NUM) { - if (a < totpart && (part->draw & PART_DRAW_HEALTH) && (part->phystype==PART_PHYS_BOIDS)) { - sprintf(val_pos, "%d:%.2f", a, pa_health); + if (part->draw&PART_DRAW_NUM) { + if (a < totpart && (part->draw & PART_DRAW_HEALTH) && (part->phystype==PART_PHYS_BOIDS)) { + sprintf(val_pos, "%d:%.2f", a, pa_health); + } + else { + sprintf(val_pos, "%d", a); + } } else { - sprintf(val_pos, "%d", a); - } - } - else { - if (a < totpart && (part->draw & PART_DRAW_HEALTH) && (part->phystype==PART_PHYS_BOIDS)) { - sprintf(val_pos, "%.2f", pa_health); + if (a < totpart && (part->draw & PART_DRAW_HEALTH) && (part->phystype==PART_PHYS_BOIDS)) { + sprintf(val_pos, "%.2f", pa_health); + } } - } - /* in path drawing state.co is the end point */ - /* use worldspace beause object matrix is already applied */ - mul_v3_m4v3(vec_txt, ob->imat, state.co); - view3d_cached_text_draw_add(vec_txt, numstr, 10, V3D_CACHE_TEXT_WORLDSPACE|V3D_CACHE_TEXT_ASCII, tcol); + /* in path drawing state.co is the end point */ + /* use worldspace beause object matrix is already applied */ + mul_v3_m4v3(vec_txt, ob->imat, state.co); + view3d_cached_text_draw_add(vec_txt, numstr, 10, V3D_CACHE_TEXT_WORLDSPACE|V3D_CACHE_TEXT_ASCII, tcol); + } } } } -- cgit v1.2.3 From 1ce2c73816be97f72484ffa40a3187b24968c6b3 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Sun, 25 Mar 2012 23:19:21 +0000 Subject: Code style cleaup for motion-tracking modules. Should be no functional changes. --- source/blender/blenkernel/BKE_movieclip.h | 2 +- source/blender/blenkernel/BKE_tracking.h | 30 +- source/blender/blenkernel/intern/constraint.c | 126 +- source/blender/blenkernel/intern/movieclip.c | 491 +++--- source/blender/blenkernel/intern/tracking.c | 1629 ++++++++++---------- source/blender/editors/space_clip/clip_buttons.c | 148 +- source/blender/editors/space_clip/clip_draw.c | 727 +++++---- source/blender/editors/space_clip/clip_editor.c | 128 +- .../blender/editors/space_clip/clip_graph_draw.c | 72 +- source/blender/editors/space_clip/clip_graph_ops.c | 161 +- source/blender/editors/space_clip/clip_intern.h | 2 +- source/blender/editors/space_clip/clip_ops.c | 291 ++-- source/blender/editors/space_clip/clip_toolbar.c | 80 +- source/blender/editors/space_clip/clip_utils.c | 82 +- source/blender/editors/space_clip/space_clip.c | 308 ++-- source/blender/editors/space_clip/tracking_ops.c | 1604 +++++++++---------- source/blender/editors/transform/transform.c | 8 +- .../editors/transform/transform_conversions.c | 137 +- .../blender/editors/transform/transform_generics.c | 10 +- 19 files changed, 3146 insertions(+), 2890 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/BKE_movieclip.h b/source/blender/blenkernel/BKE_movieclip.h index 27b377d8cd5..d7b2f271a83 100644 --- a/source/blender/blenkernel/BKE_movieclip.h +++ b/source/blender/blenkernel/BKE_movieclip.h @@ -61,7 +61,7 @@ void BKE_movieclip_update_scopes(struct MovieClip *clip, struct MovieClipUser *u void BKE_movieclip_get_cache_segments(struct MovieClip *clip, struct MovieClipUser *user, int *totseg_r, int **points_r); void BKE_movieclip_build_proxy_frame(struct MovieClip *clip, int clip_flag, struct MovieDistortion *distortion, - int cfra, int *build_sizes, int build_count, int undistorted); + int cfra, int *build_sizes, int build_count, int undistorted); /* cacheing flags */ #define MOVIECLIP_CACHE_SKIP (1<<0) diff --git a/source/blender/blenkernel/BKE_tracking.h b/source/blender/blenkernel/BKE_tracking.h index b853a5b4af9..2bb8fc691f0 100644 --- a/source/blender/blenkernel/BKE_tracking.h +++ b/source/blender/blenkernel/BKE_tracking.h @@ -52,9 +52,9 @@ void BKE_tracking_clamp_track(struct MovieTrackingTrack *track, int event); void BKE_tracking_track_flag(struct MovieTrackingTrack *track, int area, int flag, int clear); struct MovieTrackingTrack *BKE_tracking_add_track(struct MovieTracking *tracking, struct ListBase *tracksbase, - float x, float y, int framenr, int width, int height); + float x, float y, int framenr, int width, int height); struct MovieTrackingMarker *BKE_tracking_insert_marker(struct MovieTrackingTrack *track, - struct MovieTrackingMarker *marker); + struct MovieTrackingMarker *marker); void BKE_tracking_delete_marker(struct MovieTrackingTrack *track, int framenr); struct MovieTrackingMarker *BKE_tracking_get_marker(struct MovieTrackingTrack *track, int framenr); @@ -71,9 +71,11 @@ void BKE_tracking_join_tracks(struct MovieTrackingTrack *dst_track, struct Movie void BKE_tracking_free(struct MovieTracking *tracking); struct ImBuf *BKE_tracking_get_pattern_imbuf(struct ImBuf *ibuf, struct MovieTrackingTrack *track, - struct MovieTrackingMarker *marker, int margin, int anchored, float pos[2], int origin[2]); + struct MovieTrackingMarker *marker, int margin, int anchored, + float pos[2], int origin[2]); struct ImBuf *BKE_tracking_get_search_imbuf(struct ImBuf *ibuf, struct MovieTrackingTrack *track, - struct MovieTrackingMarker *marker, int margin, int anchored, float pos[2], int origin[2]); + struct MovieTrackingMarker *marker, int margin, int anchored, + float pos[2], int origin[2]); void BKE_track_unique_name(struct ListBase *tracksbase, struct MovieTrackingTrack *track); @@ -85,7 +87,7 @@ void BKE_tracking_camera_to_blender(struct MovieTracking *tracking, struct Scene void BKE_get_tracking_mat(struct Scene *scene, struct Object *ob, float mat[4][4]); void BKE_tracking_projection_matrix(struct MovieTracking *tracking, struct MovieTrackingObject *object, - int framenr, int winx, int winy, float mat[4][4]); + int framenr, int winx, int winy, float mat[4][4]); struct ListBase *BKE_tracking_get_tracks(struct MovieTracking *tracking); struct MovieTrackingReconstruction *BKE_tracking_get_reconstruction(struct MovieTracking *tracking); @@ -95,7 +97,7 @@ struct MovieTrackingObject *BKE_tracking_active_object(struct MovieTracking *tra struct MovieTrackingObject *BKE_tracking_get_camera_object(struct MovieTracking *tracking); struct ListBase *BKE_tracking_object_tracks(struct MovieTracking *tracking, struct MovieTrackingObject *object); struct MovieTrackingReconstruction *BKE_tracking_object_reconstruction(struct MovieTracking *tracking, - struct MovieTrackingObject *object); + struct MovieTrackingObject *object); void BKE_tracking_disable_imbuf_channels(struct ImBuf *ibuf, int disable_red, int disable_green, int disable_blue, int grayscale); @@ -115,24 +117,24 @@ int BKE_tracking_next(struct MovieTrackingContext *context); /* Camera solving */ int BKE_tracking_can_reconstruct(struct MovieTracking *tracking, struct MovieTrackingObject *object, - char *error_msg, int error_size); + char *error_msg, int error_size); struct MovieReconstructContext* BKE_tracking_reconstruction_context_new(struct MovieTracking *tracking, struct MovieTrackingObject *object, int keyframe1, int keyframe2, int width, int height); void BKE_tracking_reconstruction_context_free(struct MovieReconstructContext *context); -void BKE_tracking_solve_reconstruction(struct MovieReconstructContext *context, - short *stop, short *do_update, float *progress, char *stats_message, int message_size); +void BKE_tracking_solve_reconstruction(struct MovieReconstructContext *context, short *stop, short *do_update, + float *progress, char *stats_message, int message_size); int BKE_tracking_finish_reconstruction(struct MovieReconstructContext *context, struct MovieTracking *tracking); struct MovieReconstructedCamera *BKE_tracking_get_reconstructed_camera(struct MovieTracking *tracking, struct MovieTrackingObject *object, int framenr); -void BKE_tracking_get_interpolated_camera(struct MovieTracking *tracking, - struct MovieTrackingObject *object, int framenr, float mat[4][4]); +void BKE_tracking_get_interpolated_camera(struct MovieTracking *tracking, struct MovieTrackingObject *object, + int framenr, float mat[4][4]); /* Feature detection */ void BKE_tracking_detect_fast(struct MovieTracking *tracking, struct ListBase *tracksbase, struct ImBuf *imbuf, - int framenr, int margin, int min_trackness, int min_distance, struct bGPDlayer *layer, - int place_outside_layer); + int framenr, int margin, int min_trackness, int min_distance, struct bGPDlayer *layer, + int place_outside_layer); /* 2D stabilization */ void BKE_tracking_stabilization_data(struct MovieTracking *tracking, int framenr, int width, int height, float loc[2], float *scale, float *angle); @@ -146,7 +148,7 @@ void BKE_tracking_invert_intrinsics(struct MovieTracking *tracking, float co[2], struct MovieDistortion *BKE_tracking_distortion_create(void); struct MovieDistortion *BKE_tracking_distortion_copy(struct MovieDistortion *distortion); struct ImBuf *BKE_tracking_distortion_exec(struct MovieDistortion *distortion, struct MovieTracking *tracking, - struct ImBuf *ibuf, int width, int height, float overscan, int undistort); + struct ImBuf *ibuf, int width, int height, float overscan, int undistort); void BKE_tracking_distortion_destroy(struct MovieDistortion *distortion); struct ImBuf *BKE_tracking_undistort(struct MovieTracking *tracking, struct ImBuf *ibuf, int width, int height, float overscan); diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index 449376a3960..0126f1dc416 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -3927,28 +3927,28 @@ static bConstraintTypeInfo CTI_PIVOT = { /* ----------- Follow Track ------------- */ -static void followtrack_new_data (void *cdata) +static void followtrack_new_data(void *cdata) { - bFollowTrackConstraint *data= (bFollowTrackConstraint *)cdata; - - data->clip= NULL; + bFollowTrackConstraint *data = (bFollowTrackConstraint *)cdata; + + data->clip = NULL; data->flag |= FOLLOWTRACK_ACTIVECLIP; } -static void followtrack_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata) +static void followtrack_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata) { - bFollowTrackConstraint *data= con->data; - + bFollowTrackConstraint *data = con->data; + func(con, (ID**)&data->clip, userdata); func(con, (ID**)&data->camera, userdata); func(con, (ID**)&data->depth_ob, userdata); } -static void followtrack_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *UNUSED(targets)) +static void followtrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *UNUSED(targets)) { - Scene *scene= cob->scene; - bFollowTrackConstraint *data= con->data; - MovieClip *clip= data->clip; + Scene *scene = cob->scene; + bFollowTrackConstraint *data = con->data; + MovieClip *clip = data->clip; MovieTracking *tracking; MovieTrackingTrack *track; MovieTrackingObject *tracking_object; @@ -3960,17 +3960,17 @@ static void followtrack_evaluate (bConstraint *con, bConstraintOb *cob, ListBase if (!clip || !data->track[0] || !camob) return; - tracking= &clip->tracking; + tracking = &clip->tracking; if (data->object[0]) - tracking_object= BKE_tracking_named_object(tracking, data->object); + tracking_object = BKE_tracking_named_object(tracking, data->object); else - tracking_object= BKE_tracking_get_camera_object(tracking); + tracking_object = BKE_tracking_get_camera_object(tracking); if (!tracking_object) return; - track= BKE_tracking_named_track(tracking, tracking_object, data->track); + track = BKE_tracking_named_track(tracking, tracking_object, data->track); if (!track) return; @@ -3981,7 +3981,7 @@ static void followtrack_evaluate (bConstraint *con, bConstraintOb *cob, ListBase copy_m4_m4(obmat, cob->matrix); - if ((tracking_object->flag&TRACKING_OBJECT_CAMERA)==0) { + if ((tracking_object->flag & TRACKING_OBJECT_CAMERA)==0) { float imat[4][4]; copy_m4_m4(mat, camob->obmat); @@ -4003,15 +4003,15 @@ static void followtrack_evaluate (bConstraint *con, bConstraintOb *cob, ListBase else { MovieTrackingMarker *marker; float vec[3], disp[3], axis[3], mat[4][4]; - float aspect= (scene->r.xsch*scene->r.xasp) / (scene->r.ysch*scene->r.yasp); + float aspect= (scene->r.xsch * scene->r.xasp) / (scene->r.ysch * scene->r.yasp); float len, d; where_is_object_mat(scene, camob, mat); /* camera axis */ - vec[0]= 0.0f; - vec[1]= 0.0f; - vec[2]= 1.0f; + vec[0] = 0.0f; + vec[1] = 0.0f; + vec[2] = 1.0f; mul_v3_m4v3(axis, mat, vec); /* distance to projection plane */ @@ -4019,13 +4019,13 @@ static void followtrack_evaluate (bConstraint *con, bConstraintOb *cob, ListBase sub_v3_v3(vec, mat[3]); project_v3_v3v3(disp, vec, axis); - len= len_v3(disp); + len = len_v3(disp); if (len > FLT_EPSILON) { CameraParams params; float pos[2], rmat[4][4]; - marker= BKE_tracking_get_marker(track, scene->r.cfra); + marker = BKE_tracking_get_marker(track, scene->r.cfra); add_v2_v2v2(pos, marker->pos, track->offset); @@ -4033,12 +4033,14 @@ static void followtrack_evaluate (bConstraint *con, bConstraintOb *cob, ListBase camera_params_from_object(¶ms, camob); if (params.is_ortho) { - vec[0]= params.ortho_scale * (pos[0]-0.5f+params.shiftx); - vec[1]= params.ortho_scale * (pos[1]-0.5f+params.shifty); - vec[2]= -len; + vec[0] = params.ortho_scale * (pos[0] - 0.5f + params.shiftx); + vec[1] = params.ortho_scale * (pos[1] - 0.5f + params.shifty); + vec[2] = -len; - if (aspect > 1.0f) vec[1] /= aspect; - else vec[0] *= aspect; + if (aspect > 1.0f) + vec[1] /= aspect; + else + vec[0] *= aspect; mul_v3_m4v3(disp, camob->obmat, vec); @@ -4049,14 +4051,16 @@ static void followtrack_evaluate (bConstraint *con, bConstraintOb *cob, ListBase copy_v3_v3(cob->matrix[3], disp); } else { - d= (len*params.sensor_x) / (2.0f*params.lens); + d= (len * params.sensor_x) / (2.0f * params.lens); - vec[0]= d*(2.0f*(pos[0]+params.shiftx)-1.0f); - vec[1]= d*(2.0f*(pos[1]+params.shifty)-1.0f); - vec[2]= -len; + vec[0] = d * (2.0f * (pos[0] + params.shiftx) - 1.0f); + vec[1] = d * (2.0f * (pos[1] + params.shifty) - 1.0f); + vec[2] = -len; - if (aspect > 1.0f) vec[1] /= aspect; - else vec[0] *= aspect; + if (aspect > 1.0f) + vec[1] /= aspect; + else + vec[0] *= aspect; mul_v3_m4v3(disp, camob->obmat, vec); @@ -4069,8 +4073,8 @@ static void followtrack_evaluate (bConstraint *con, bConstraintOb *cob, ListBase } if (data->depth_ob && data->depth_ob->derivedFinal) { - Object *depth_ob= data->depth_ob; - BVHTreeFromMesh treeData= NULL_BVHTreeFromMesh; + Object *depth_ob = data->depth_ob; + BVHTreeFromMesh treeData = NULL_BVHTreeFromMesh; BVHTreeRayHit hit; float ray_start[3], ray_end[3], ray_nor[3], imat[4][4]; int result; @@ -4084,10 +4088,10 @@ static void followtrack_evaluate (bConstraint *con, bConstraintOb *cob, ListBase bvhtree_from_mesh_faces(&treeData, depth_ob->derivedFinal, 0.0f, 4, 6); - hit.dist= FLT_MAX; - hit.index= -1; + hit.dist = FLT_MAX; + hit.index = -1; - result= BLI_bvhtree_ray_cast(treeData.tree, ray_start, ray_nor, 0.0f, &hit, treeData.raycast_callback, &treeData); + result = BLI_bvhtree_ray_cast(treeData.tree, ray_start, ray_nor, 0.0f, &hit, treeData.raycast_callback, &treeData); if (result != -1) { mul_v3_m4v3(cob->matrix[3], depth_ob->obmat, hit.co); @@ -4117,34 +4121,34 @@ static bConstraintTypeInfo CTI_FOLLOWTRACK = { /* ----------- Camre Solver ------------- */ -static void camerasolver_new_data (void *cdata) +static void camerasolver_new_data(void *cdata) { - bCameraSolverConstraint *data= (bCameraSolverConstraint *)cdata; - + bCameraSolverConstraint *data = (bCameraSolverConstraint *)cdata; + data->clip = NULL; data->flag |= CAMERASOLVER_ACTIVECLIP; } -static void camerasolver_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata) +static void camerasolver_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata) { - bCameraSolverConstraint *data= con->data; - + bCameraSolverConstraint *data = con->data; + func(con, (ID**)&data->clip, userdata); } -static void camerasolver_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *UNUSED(targets)) +static void camerasolver_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *UNUSED(targets)) { - Scene *scene= cob->scene; - bCameraSolverConstraint *data= con->data; - MovieClip *clip= data->clip; + Scene *scene = cob->scene; + bCameraSolverConstraint *data = con->data; + MovieClip *clip = data->clip; if (data->flag & CAMERASOLVER_ACTIVECLIP) - clip= scene->clip; + clip = scene->clip; if (clip) { float mat[4][4], obmat[4][4]; - MovieTracking *tracking= &clip->tracking; - MovieTrackingObject *object= BKE_tracking_get_camera_object(tracking); + MovieTracking *tracking = &clip->tracking; + MovieTrackingObject *object = BKE_tracking_get_camera_object(tracking); BKE_tracking_get_interpolated_camera(tracking, object, scene->r.cfra, mat); @@ -4172,16 +4176,16 @@ static bConstraintTypeInfo CTI_CAMERASOLVER = { /* ----------- Object Solver ------------- */ -static void objectsolver_new_data (void *cdata) +static void objectsolver_new_data(void *cdata) { - bObjectSolverConstraint *data= (bObjectSolverConstraint *)cdata; + bObjectSolverConstraint *data = (bObjectSolverConstraint *)cdata; data->clip = NULL; data->flag |= OBJECTSOLVER_ACTIVECLIP; unit_m4(data->invmat); } -static void objectsolver_id_looper (bConstraint *con, ConstraintIDFunc func, void *userdata) +static void objectsolver_id_looper(bConstraint *con, ConstraintIDFunc func, void *userdata) { bObjectSolverConstraint *data= con->data; @@ -4189,12 +4193,12 @@ static void objectsolver_id_looper (bConstraint *con, ConstraintIDFunc func, voi func(con, (ID**)&data->camera, userdata); } -static void objectsolver_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *UNUSED(targets)) +static void objectsolver_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *UNUSED(targets)) { - Scene *scene= cob->scene; - bObjectSolverConstraint *data= con->data; - MovieClip *clip= data->clip; - Object *camob= data->camera ? data->camera : scene->camera; + Scene *scene = cob->scene; + bObjectSolverConstraint *data = con->data; + MovieClip *clip = data->clip; + Object *camob = data->camera ? data->camera : scene->camera; if (data->flag & OBJECTSOLVER_ACTIVECLIP) clip= scene->clip; @@ -4203,10 +4207,10 @@ static void objectsolver_evaluate (bConstraint *con, bConstraintOb *cob, ListBas return; if (clip) { - MovieTracking *tracking= &clip->tracking; + MovieTracking *tracking = &clip->tracking; MovieTrackingObject *object; - object= BKE_tracking_named_object(tracking, data->object); + object = BKE_tracking_named_object(tracking, data->object); if (object) { float mat[4][4], obmat[4][4], imat[4][4], cammat[4][4], camimat[4][4], parmat[4][4]; diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c index 0cecc09a9d7..bc147c52094 100644 --- a/source/blender/blenkernel/intern/movieclip.c +++ b/source/blender/blenkernel/intern/movieclip.c @@ -82,19 +82,19 @@ static int sequence_guess_offset(const char *full_name, int head_len, int numlen) { - char num[FILE_MAX]= {0}; + char num[FILE_MAX] = {0}; - BLI_strncpy(num, full_name+head_len, numlen+1); + BLI_strncpy(num, full_name + head_len, numlen + 1); return atoi(num); } static int rendersize_to_proxy(MovieClipUser *user, int flag) { - if ((flag&MCLIP_USE_PROXY)==0) + if ((flag & MCLIP_USE_PROXY) == 0) return IMB_PROXY_NONE; - switch(user->render_size) { + switch (user->render_size) { case MCLIP_PROXY_RENDER_SIZE_25: return IMB_PROXY_25; @@ -116,7 +116,7 @@ static int rendersize_to_proxy(MovieClipUser *user, int flag) static int rendersize_to_number(int render_size) { - switch(render_size) { + switch (render_size) { case MCLIP_PROXY_RENDER_SIZE_25: return 25; @@ -138,7 +138,7 @@ static int rendersize_to_number(int render_size) static int get_timecode(MovieClip *clip, int flag) { - if ((flag&MCLIP_USE_PROXY)==0) + if ((flag & MCLIP_USE_PROXY) == 0) return IMB_TC_NONE; return clip->proxy.tc; @@ -157,8 +157,10 @@ static void get_sequence_fname(MovieClip *clip, int framenr, char *name) * autoguess offset for now. could be something smarter in the future */ offset= sequence_guess_offset(clip->name, strlen(head), numlen); - if (numlen) BLI_stringenc(name, head, tail, numlen, offset+framenr-1); - else BLI_strncpy(name, clip->name, sizeof(clip->name)); + if (numlen) + BLI_stringenc(name, head, tail, numlen, offset + framenr - 1); + else + BLI_strncpy(name, clip->name, sizeof(clip->name)); BLI_path_abs(name, ID_BLEND_PATH(G.main, &clip->id)); } @@ -166,12 +168,12 @@ static void get_sequence_fname(MovieClip *clip, int framenr, char *name) /* supposed to work with sequences only */ static void get_proxy_fname(MovieClip *clip, int proxy_render_size, int undistorted, int framenr, char *name) { - int size= rendersize_to_number(proxy_render_size); + int size = rendersize_to_number(proxy_render_size); char dir[FILE_MAX], clipdir[FILE_MAX], clipfile[FILE_MAX]; BLI_split_dirfile(clip->name, clipdir, clipfile, FILE_MAX, FILE_MAX); - if (clip->flag&MCLIP_USE_PROXY_CUSTOM_DIR) { + if (clip->flag & MCLIP_USE_PROXY_CUSTOM_DIR) { BLI_strncpy(dir, clip->proxy.dir, sizeof(dir)); } else { @@ -195,27 +197,27 @@ static ImBuf *movieclip_load_sequence_file(MovieClip *clip, MovieClipUser *user, char name[FILE_MAX]; int loadflag, use_proxy= 0; - use_proxy= (flag&MCLIP_USE_PROXY) && user->render_size != MCLIP_PROXY_RENDER_SIZE_FULL; + use_proxy = (flag & MCLIP_USE_PROXY) && user->render_size != MCLIP_PROXY_RENDER_SIZE_FULL; if (use_proxy) { - int undistort= user->render_flag&MCLIP_PROXY_RENDER_UNDISTORT; + int undistort = user->render_flag & MCLIP_PROXY_RENDER_UNDISTORT; get_proxy_fname(clip, user->render_size, undistort, framenr, name); } else get_sequence_fname(clip, framenr, name); - loadflag= IB_rect|IB_multilayer; + loadflag = IB_rect|IB_multilayer; /* read ibuf */ - ibuf= IMB_loadiffname(name, loadflag); + ibuf = IMB_loadiffname(name, loadflag); return ibuf; } static ImBuf *movieclip_load_movie_file(MovieClip *clip, MovieClipUser *user, int framenr, int flag) { - ImBuf *ibuf= NULL; - int tc= get_timecode(clip, flag); - int proxy= rendersize_to_proxy(user, flag); + ImBuf *ibuf = NULL; + int tc = get_timecode(clip, flag); + int proxy = rendersize_to_proxy(user, flag); char str[FILE_MAX]; if (!clip->anim) { @@ -223,10 +225,10 @@ static ImBuf *movieclip_load_movie_file(MovieClip *clip, MovieClipUser *user, in BLI_path_abs(str, ID_BLEND_PATH(G.main, &clip->id)); /* FIXME: make several stream accessible in image editor, too */ - clip->anim= openanim(str, IB_rect, 0); + clip->anim = openanim(str, IB_rect, 0); if (clip->anim) { - if (clip->flag&MCLIP_USE_PROXY_CUSTOM_DIR) { + if (clip->flag & MCLIP_USE_PROXY_CUSTOM_DIR) { char dir[FILE_MAX]; BLI_strncpy(dir, clip->proxy.dir, sizeof(dir)); BLI_path_abs(dir, G.main->name); @@ -239,16 +241,16 @@ static ImBuf *movieclip_load_movie_file(MovieClip *clip, MovieClipUser *user, in int dur; int fra; - dur= IMB_anim_get_duration(clip->anim, tc); - fra= framenr-1; + dur = IMB_anim_get_duration(clip->anim, tc); + fra = framenr - 1; if (fra<0) - fra= 0; + fra = 0; - if (fra>(dur-1)) - fra= dur-1; + if (fra > (dur - 1)) + fra = dur - 1; - ibuf= IMB_anim_absolute(clip->anim, fra, tc, proxy); + ibuf = IMB_anim_absolute(clip->anim, fra, tc, proxy); } return ibuf; @@ -295,34 +297,40 @@ typedef struct MovieClipImBufCacheKey { static void moviecache_keydata(void *userkey, int *framenr, int *proxy, int *render_flags) { - MovieClipImBufCacheKey *key= (MovieClipImBufCacheKey*)userkey; + MovieClipImBufCacheKey *key = (MovieClipImBufCacheKey*)userkey; - *framenr= key->framenr; - *proxy= key->proxy; - *render_flags= key->render_flag; + *framenr = key->framenr; + *proxy = key->proxy; + *render_flags = key->render_flag; } static unsigned int moviecache_hashhash(const void *keyv) { - MovieClipImBufCacheKey *key= (MovieClipImBufCacheKey*)keyv; - int rval= key->framenr; + MovieClipImBufCacheKey *key = (MovieClipImBufCacheKey*)keyv; + int rval = key->framenr; return rval; } static int moviecache_hashcmp(const void *av, const void *bv) { - const MovieClipImBufCacheKey *a= (MovieClipImBufCacheKey*)av; - const MovieClipImBufCacheKey *b= (MovieClipImBufCacheKey*)bv; + const MovieClipImBufCacheKey *a = (MovieClipImBufCacheKey*)av; + const MovieClipImBufCacheKey *b = (MovieClipImBufCacheKey*)bv; - if (a->framenrframenr) return -1; - else if (a->framenr>b->framenr) return 1; + if (a->framenr < b->framenr) + return -1; + else if (a->framenr > b->framenr) + return 1; - if (a->proxyproxy) return -1; - else if (a->proxy>b->proxy) return 1; + if (a->proxy < b->proxy) + return -1; + else if (a->proxy > b->proxy) + return 1; - if (a->render_flagrender_flag) return -1; - else if (a->render_flag>b->render_flag) return 1; + if (a->render_flag < b->render_flag) + return -1; + else if (a->render_flag > b->render_flag) + return 1; return 0; } @@ -332,15 +340,15 @@ static ImBuf *get_imbuf_cache(MovieClip *clip, MovieClipUser *user, int flag) if (clip->cache) { MovieClipImBufCacheKey key; - key.framenr= user->framenr; + key.framenr = user->framenr; - if (flag&MCLIP_USE_PROXY) { - key.proxy= rendersize_to_proxy(user, flag); - key.render_flag= user->render_flag; + if (flag & MCLIP_USE_PROXY) { + key.proxy = rendersize_to_proxy(user, flag); + key.render_flag = user->render_flag; } else { - key.proxy= IMB_PROXY_NONE; - key.render_flag= 0; + key.proxy = IMB_PROXY_NONE; + key.render_flag = 0; } return IMB_moviecache_get(clip->cache->moviecache, &key); @@ -354,21 +362,21 @@ static void put_imbuf_cache(MovieClip *clip, MovieClipUser *user, ImBuf *ibuf, i MovieClipImBufCacheKey key; if (!clip->cache) { - clip->cache= MEM_callocN(sizeof(MovieClipCache), "movieClipCache"); + clip->cache = MEM_callocN(sizeof(MovieClipCache), "movieClipCache"); - clip->cache->moviecache= IMB_moviecache_create(sizeof(MovieClipImBufCacheKey), moviecache_hashhash, + clip->cache->moviecache = IMB_moviecache_create(sizeof(MovieClipImBufCacheKey), moviecache_hashhash, moviecache_hashcmp, moviecache_keydata); } - key.framenr= user->framenr; + key.framenr = user->framenr; - if (flag&MCLIP_USE_PROXY) { - key.proxy= rendersize_to_proxy(user, flag); - key.render_flag= user->render_flag; + if (flag & MCLIP_USE_PROXY) { + key.proxy = rendersize_to_proxy(user, flag); + key.render_flag = user->render_flag; } else { - key.proxy= IMB_PROXY_NONE; - key.render_flag= 0; + key.proxy = IMB_PROXY_NONE; + key.render_flag = 0; } IMB_moviecache_put(clip->cache->moviecache, &key, ibuf); @@ -381,18 +389,18 @@ static MovieClip *movieclip_alloc(const char *name) { MovieClip *clip; - clip= alloc_libblock(&G.main->movieclip, ID_MC, name); + clip = alloc_libblock(&G.main->movieclip, ID_MC, name); - clip->aspx= clip->aspy= 1.0f; + clip->aspx = clip->aspy= 1.0f; BKE_tracking_init_settings(&clip->tracking); - clip->proxy.build_size_flag= IMB_PROXY_25; - clip->proxy.build_tc_flag= IMB_TC_RECORD_RUN | - IMB_TC_FREE_RUN | - IMB_TC_INTERPOLATED_REC_DATE_FREE_RUN | - IMB_TC_RECORD_RUN_NO_GAPS; - clip->proxy.quality= 90; + clip->proxy.build_size_flag = IMB_PROXY_25; + clip->proxy.build_tc_flag = IMB_TC_RECORD_RUN | + IMB_TC_FREE_RUN | + IMB_TC_INTERPOLATED_REC_DATE_FREE_RUN | + IMB_TC_RECORD_RUN_NO_GAPS; + clip->proxy.quality = 90; return clip; } @@ -413,16 +421,17 @@ MovieClip *BKE_add_movieclip_file(const char *name) BLI_path_abs(str, G.main->name); /* exists? */ - file= BLI_open(str, O_BINARY|O_RDONLY,0); - if (file== -1) return NULL; + file = BLI_open(str, O_BINARY|O_RDONLY,0); + if (file == -1) + return NULL; close(file); /* ** first search an identical clip ** */ - for (clip= G.main->movieclip.first; clip; clip= clip->id.next) { + for (clip = G.main->movieclip.first; clip; clip = clip->id.next) { BLI_strncpy(strtest, clip->name, sizeof(clip->name)); BLI_path_abs(strtest, G.main->name); - if (strcmp(strtest, str)==0) { + if (strcmp(strtest, str) == 0) { BLI_strncpy(clip->name, name, sizeof(clip->name)); /* for stringcode */ clip->id.us++; /* officially should not, it doesn't link here! */ @@ -433,24 +442,27 @@ MovieClip *BKE_add_movieclip_file(const char *name) /* ** add new movieclip ** */ /* create a short library name */ - len= strlen(name); + len = strlen(name); - while (len > 0 && name[len - 1] != '/' && name[len - 1] != '\\') len--; - libname= name+len; + while (len > 0 && name[len - 1] != '/' && name[len - 1] != '\\') + len--; + libname = name + len; - clip= movieclip_alloc(libname); + clip = movieclip_alloc(libname); BLI_strncpy(clip->name, name, sizeof(clip->name)); - if (BLI_testextensie_array(name, imb_ext_movie)) clip->source= MCLIP_SRC_MOVIE; - else clip->source= MCLIP_SRC_SEQUENCE; + if (BLI_testextensie_array(name, imb_ext_movie)) + clip->source= MCLIP_SRC_MOVIE; + else + clip->source= MCLIP_SRC_SEQUENCE; - user.framenr= 1; + user.framenr = 1; BKE_movieclip_get_size(clip, &user, &width, &height); if (width && height) { - clip->tracking.camera.principal[0]= ((float)width)/2; - clip->tracking.camera.principal[1]= ((float)height)/2; + clip->tracking.camera.principal[0] = ((float)width) / 2.0f; + clip->tracking.camera.principal[1] = ((float)height) / 2.0f; - clip->tracking.camera.focal= 24.0f*width/clip->tracking.camera.sensor_width; + clip->tracking.camera.focal = 24.0f * width / clip->tracking.camera.sensor_width; } return clip; @@ -458,24 +470,24 @@ MovieClip *BKE_add_movieclip_file(const char *name) static void real_ibuf_size(MovieClip *clip, MovieClipUser *user, ImBuf *ibuf, int *width, int *height) { - *width= ibuf->x; - *height= ibuf->y; + *width = ibuf->x; + *height = ibuf->y; - if (clip->flag&MCLIP_USE_PROXY) { + if (clip->flag & MCLIP_USE_PROXY) { switch(user->render_size) { case MCLIP_PROXY_RENDER_SIZE_25: - (*width)*= 4; - (*height)*= 4; + (*width) *= 4; + (*height) *= 4; break; case MCLIP_PROXY_RENDER_SIZE_50: - (*width)*= 2.0f; - (*height)*= 2.0f; + (*width) *= 2.0f; + (*height) *= 2.0f; break; case MCLIP_PROXY_RENDER_SIZE_75: - *width= ((float)*width)*4.0f/3.0f; - *height= ((float)*height)*4.0f/3.0f; + *width = ((float)*width)*4.0f/3.0f; + *height = ((float)*height)*4.0f/3.0f; break; } } @@ -490,12 +502,12 @@ static ImBuf *get_undistorted_ibuf(MovieClip *clip, struct MovieDistortion *dist imb_freerectfloatImBuf(ibuf); if (distortion) - undistibuf= BKE_tracking_distortion_exec(distortion, &clip->tracking, ibuf, ibuf->x, ibuf->y, 0.0f, 1); + undistibuf = BKE_tracking_distortion_exec(distortion, &clip->tracking, ibuf, ibuf->x, ibuf->y, 0.0f, 1); else - undistibuf= BKE_tracking_undistort(&clip->tracking, ibuf, ibuf->x, ibuf->y, 0.0f); + undistibuf = BKE_tracking_undistort(&clip->tracking, ibuf, ibuf->x, ibuf->y, 0.0f); - if (undistibuf->userflags&IB_RECT_INVALID) { - ibuf->userflags&= ~IB_RECT_INVALID; + if (undistibuf->userflags & IB_RECT_INVALID) { + ibuf->userflags &= ~IB_RECT_INVALID; IMB_rect_from_float(undistibuf); } @@ -528,29 +540,29 @@ static int need_postprocessed_frame(MovieClipUser *user, int flag, int postproce static int check_undistortion_cache_flags(MovieClip *clip) { - MovieClipCache *cache= clip->cache; - MovieTrackingCamera *camera= &clip->tracking.camera; + MovieClipCache *cache = clip->cache; + MovieTrackingCamera *camera = &clip->tracking.camera; /* check for distortion model changes */ if (!equals_v2v2(camera->principal, cache->postprocessed.principal)) - return 0; + return FALSE; if (!equals_v3v3(&camera->k1, &cache->postprocessed.k1)) - return 0; + return FALSE; - return 1; + return TRUE; } static ImBuf *get_postprocessed_cached_frame(MovieClip *clip, MovieClipUser *user, int flag, int postprocess_flag) { - MovieClipCache *cache= clip->cache; - int framenr= user->framenr; - short proxy= IMB_PROXY_NONE; - int render_flag= 0; - - if (flag&MCLIP_USE_PROXY) { - proxy= rendersize_to_proxy(user, flag); - render_flag= user->render_flag; + MovieClipCache *cache = clip->cache; + int framenr = user->framenr; + short proxy = IMB_PROXY_NONE; + int render_flag = 0; + + if (flag & MCLIP_USE_PROXY) { + proxy = rendersize_to_proxy(user, flag); + render_flag = user->render_flag; } /* no cache or no cached postprocessed image */ @@ -582,19 +594,19 @@ static ImBuf *get_postprocessed_cached_frame(MovieClip *clip, MovieClipUser *use static ImBuf *put_postprocessed_frame_to_cache(MovieClip *clip, MovieClipUser *user, ImBuf *ibuf, int flag, int postprocess_flag) { - MovieClipCache *cache= clip->cache; - MovieTrackingCamera *camera= &clip->tracking.camera; + MovieClipCache *cache = clip->cache; + MovieTrackingCamera *camera = &clip->tracking.camera; ImBuf *postproc_ibuf = NULL; if (cache->postprocessed.ibuf) IMB_freeImBuf(cache->postprocessed.ibuf); - cache->postprocessed.framenr= user->framenr; + cache->postprocessed.framenr = user->framenr; cache->postprocessed.flag = postprocess_flag; - if (flag&MCLIP_USE_PROXY) { - cache->postprocessed.proxy= rendersize_to_proxy(user, flag); - cache->postprocessed.render_flag= user->render_flag; + if (flag & MCLIP_USE_PROXY) { + cache->postprocessed.proxy = rendersize_to_proxy(user, flag); + cache->postprocessed.render_flag = user->render_flag; } else { cache->postprocessed.proxy = IMB_PROXY_NONE; @@ -604,10 +616,12 @@ static ImBuf *put_postprocessed_frame_to_cache(MovieClip *clip, MovieClipUser *u if (need_undistortion_postprocess(user, flag)) { copy_v2_v2(cache->postprocessed.principal, camera->principal); copy_v3_v3(&cache->postprocessed.k1, &camera->k1); - cache->postprocessed.undistoriton_used = 1; + cache->postprocessed.undistoriton_used = TRUE; postproc_ibuf= get_undistorted_ibuf(clip, NULL, ibuf); } - else cache->postprocessed.undistoriton_used = 0; + else { + cache->postprocessed.undistoriton_used = FALSE; + } if (postprocess_flag) { int disable_red = postprocess_flag & MOVIECLIP_DISABLE_RED, @@ -624,12 +638,12 @@ static ImBuf *put_postprocessed_frame_to_cache(MovieClip *clip, MovieClipUser *u IMB_refImBuf(postproc_ibuf); - cache->postprocessed.ibuf= postproc_ibuf; + cache->postprocessed.ibuf = postproc_ibuf; if (cache->stabilized.ibuf) { /* force stable buffer be re-calculated */ IMB_freeImBuf(cache->stabilized.ibuf); - cache->stabilized.ibuf= NULL; + cache->stabilized.ibuf = NULL; } return postproc_ibuf; @@ -638,8 +652,8 @@ static ImBuf *put_postprocessed_frame_to_cache(MovieClip *clip, MovieClipUser *u static ImBuf *movieclip_get_postprocessed_ibuf(MovieClip *clip, MovieClipUser *user, int flag, int postprocess_flag, int cache_flag) { - ImBuf *ibuf= NULL; - int framenr= user->framenr, need_postprocess= 0; + ImBuf *ibuf = NULL; + int framenr = user->framenr, need_postprocess = FALSE; /* cache isn't threadsafe itself and also loading of movies * can't happen from concurent threads that's why we use lock here */ @@ -650,23 +664,24 @@ static ImBuf *movieclip_get_postprocessed_ibuf(MovieClip *clip, MovieClipUser *u ibuf= get_postprocessed_cached_frame(clip, user, flag, postprocess_flag); if (!ibuf) - need_postprocess= 1; + need_postprocess = TRUE; } if (!ibuf) ibuf= get_imbuf_cache(clip, user, flag); if (!ibuf) { - int use_sequence= 0; + int use_sequence = FALSE; /* undistorted proxies for movies should be read as image sequence */ - use_sequence= (user->render_flag&MCLIP_PROXY_RENDER_UNDISTORT) && - (user->render_size!=MCLIP_PROXY_RENDER_SIZE_FULL); + use_sequence = (user->render_flag & MCLIP_PROXY_RENDER_UNDISTORT) && + (user->render_size != MCLIP_PROXY_RENDER_SIZE_FULL); - if (clip->source==MCLIP_SRC_SEQUENCE || use_sequence) - ibuf= movieclip_load_sequence_file(clip, user, framenr, flag); + if (clip->source == MCLIP_SRC_SEQUENCE || use_sequence) { + ibuf = movieclip_load_sequence_file(clip, user, framenr, flag); + } else { - ibuf= movieclip_load_movie_file(clip, user, framenr, flag); + ibuf = movieclip_load_movie_file(clip, user, framenr, flag); } if (ibuf && (cache_flag & MOVIECLIP_CACHE_SKIP) == 0) @@ -674,13 +689,13 @@ static ImBuf *movieclip_get_postprocessed_ibuf(MovieClip *clip, MovieClipUser *u } if (ibuf) { - clip->lastframe= framenr; + clip->lastframe = framenr; real_ibuf_size(clip, user, ibuf, &clip->lastsize[0], &clip->lastsize[1]); /* postprocess frame and put to cache */ if (need_postprocess) { - ImBuf *tmpibuf= ibuf; - ibuf= put_postprocessed_frame_to_cache(clip, user, tmpibuf, flag, postprocess_flag); + ImBuf *tmpibuf = ibuf; + ibuf = put_postprocessed_frame_to_cache(clip, user, tmpibuf, flag, postprocess_flag); IMB_freeImBuf(tmpibuf); } } @@ -714,7 +729,7 @@ static ImBuf *get_stable_cached_frame(MovieClip *clip, MovieClipUser *user, int short proxy = IMB_PROXY_NONE; int render_flag = 0; - if (clip->flag&MCLIP_USE_PROXY) { + if (clip->flag & MCLIP_USE_PROXY) { proxy = rendersize_to_proxy(user, clip->flag); render_flag = user->render_flag; } @@ -724,7 +739,7 @@ static ImBuf *get_stable_cached_frame(MovieClip *clip, MovieClipUser *user, int return NULL; /* cached ibuf used different proxy settings */ - if (cache->stabilized.render_flag!=render_flag || cache->stabilized.proxy!=proxy) + if (cache->stabilized.render_flag != render_flag || cache->stabilized.proxy != proxy) return NULL; if (cache->stabilized.postprocess_flag != postprocess_flag) @@ -777,9 +792,9 @@ static ImBuf *put_stabilized_frame_to_cache(MovieClip *clip, MovieClipUser *user cache->stabilized.aspect = tracking->camera.pixel_aspect; cache->stabilized.filter = tracking->stabilization.filter; - if (clip->flag&MCLIP_USE_PROXY) { - cache->stabilized.proxy= rendersize_to_proxy(user, clip->flag); - cache->stabilized.render_flag= user->render_flag; + if (clip->flag & MCLIP_USE_PROXY) { + cache->stabilized.proxy = rendersize_to_proxy(user, clip->flag); + cache->stabilized.render_flag = user->render_flag; } else { cache->stabilized.proxy = IMB_PROXY_NONE; @@ -795,37 +810,47 @@ static ImBuf *put_stabilized_frame_to_cache(MovieClip *clip, MovieClipUser *user ImBuf *BKE_movieclip_get_stable_ibuf(MovieClip *clip, MovieClipUser *user, float loc[2], float *scale, float *angle, int postprocess_flag) { - ImBuf *ibuf, *stableibuf= NULL; - int framenr= user->framenr; + ImBuf *ibuf, *stableibuf = NULL; + int framenr = user->framenr; - ibuf= BKE_movieclip_get_postprocessed_ibuf(clip, user, postprocess_flag); + ibuf = BKE_movieclip_get_postprocessed_ibuf(clip, user, postprocess_flag); if (!ibuf) return NULL; - if (clip->tracking.stabilization.flag&TRACKING_2D_STABILIZATION) { + if (clip->tracking.stabilization.flag & TRACKING_2D_STABILIZATION) { MovieClipCache *cache= clip->cache; - stableibuf= get_stable_cached_frame(clip, user, framenr, postprocess_flag); + stableibuf = get_stable_cached_frame(clip, user, framenr, postprocess_flag); if (!stableibuf) - stableibuf= put_stabilized_frame_to_cache(clip, user, ibuf, framenr, postprocess_flag); + stableibuf = put_stabilized_frame_to_cache(clip, user, ibuf, framenr, postprocess_flag); + + if (loc) + copy_v2_v2(loc, cache->stabilized.loc); - if (loc) copy_v2_v2(loc, cache->stabilized.loc); - if (scale) *scale= cache->stabilized.scale; - if (angle) *angle= cache->stabilized.angle; + if (scale) + *scale= cache->stabilized.scale; + + if (angle) + *angle= cache->stabilized.angle; } else { - if (loc) zero_v2(loc); - if (scale) *scale= 1.0f; - if (angle) *angle= 0.0f; + if (loc) + zero_v2(loc); + + if (scale) + *scale= 1.0f; + + if (angle) + *angle= 0.0f; - stableibuf= ibuf; + stableibuf = ibuf; } - if (stableibuf!=ibuf) { + if (stableibuf != ibuf) { IMB_freeImBuf(ibuf); - ibuf= stableibuf; + ibuf = stableibuf; } return ibuf; @@ -834,31 +859,31 @@ ImBuf *BKE_movieclip_get_stable_ibuf(MovieClip *clip, MovieClipUser *user, float int BKE_movieclip_has_frame(MovieClip *clip, MovieClipUser *user) { - ImBuf *ibuf= BKE_movieclip_get_ibuf(clip, user); + ImBuf *ibuf = BKE_movieclip_get_ibuf(clip, user); if (ibuf) { IMB_freeImBuf(ibuf); - return 1; + return TRUE; } - return 0; + return FALSE; } void BKE_movieclip_get_size(MovieClip *clip, MovieClipUser *user, int *width, int *height) { - if (user->framenr==clip->lastframe) { - *width= clip->lastsize[0]; - *height= clip->lastsize[1]; + if (user->framenr == clip->lastframe) { + *width = clip->lastsize[0]; + *height = clip->lastsize[1]; } else { - ImBuf *ibuf= BKE_movieclip_get_ibuf(clip, user); + ImBuf *ibuf = BKE_movieclip_get_ibuf(clip, user); if (ibuf && ibuf->x && ibuf->y) { real_ibuf_size(clip, user, ibuf, width, height); } else { - *width= 0; - *height= 0; + *width = 0; + *height = 0; } if (ibuf) @@ -873,20 +898,20 @@ int BKE_movieclip_get_duration(struct MovieClip *clip) void BKE_movieclip_aspect(MovieClip *clip, float *aspx, float *aspy) { - *aspx= *aspy= 1.0; + *aspx = *aspy = 1.0; /* x is always 1 */ - *aspy = clip->aspy/clip->aspx/clip->tracking.camera.pixel_aspect; + *aspy = clip->aspy / clip->aspx / clip->tracking.camera.pixel_aspect; } /* get segments of cached frames. useful for debugging cache policies */ void BKE_movieclip_get_cache_segments(MovieClip *clip, MovieClipUser *user, int *totseg_r, int **points_r) { - *totseg_r= 0; - *points_r= NULL; + *totseg_r = 0; + *points_r = NULL; if (clip->cache) { - int proxy= rendersize_to_proxy(user, clip->flag); + int proxy = rendersize_to_proxy(user, clip->flag); IMB_moviecache_get_cache_segments(clip->cache->moviecache, proxy, user->render_flag, totseg_r, points_r); } @@ -896,7 +921,7 @@ void BKE_movieclip_user_set_frame(MovieClipUser *iuser, int framenr) { /* TODO: clamp framenr here? */ - iuser->framenr= framenr; + iuser->framenr = framenr; } static void free_buffers(MovieClip *clip) @@ -911,12 +936,12 @@ static void free_buffers(MovieClip *clip) IMB_freeImBuf(clip->cache->stabilized.ibuf); MEM_freeN(clip->cache); - clip->cache= NULL; + clip->cache = NULL; } if (clip->anim) { IMB_free_anim(clip->anim); - clip->anim= FALSE; + clip->anim = NULL; } BKE_free_animdata((ID *) clip); @@ -927,11 +952,13 @@ void BKE_movieclip_reload(MovieClip *clip) /* clear cache */ free_buffers(clip); - clip->tracking.stabilization.ok= 0; + clip->tracking.stabilization.ok = FALSE; /* update clip source */ - if (BLI_testextensie_array(clip->name, imb_ext_movie)) clip->source= MCLIP_SRC_MOVIE; - else clip->source= MCLIP_SRC_SEQUENCE; + if (BLI_testextensie_array(clip->name, imb_ext_movie)) + clip->source = MCLIP_SRC_MOVIE; + else + clip->source = MCLIP_SRC_SEQUENCE; } void BKE_movieclip_update_scopes(MovieClip *clip, MovieClipUser *user, MovieClipScopes *scopes) @@ -941,44 +968,44 @@ void BKE_movieclip_update_scopes(MovieClip *clip, MovieClipUser *user, MovieClip if (scopes->track_preview) { IMB_freeImBuf(scopes->track_preview); - scopes->track_preview= NULL; + scopes->track_preview = NULL; } - scopes->marker= NULL; - scopes->track= NULL; + scopes->marker = NULL; + scopes->track = NULL; if (clip) { - MovieTrackingTrack *act_track= BKE_tracking_active_track(&clip->tracking); + MovieTrackingTrack *act_track = BKE_tracking_active_track(&clip->tracking); if (act_track) { - MovieTrackingTrack *track= act_track; - MovieTrackingMarker *marker= BKE_tracking_get_marker(track, user->framenr); + MovieTrackingTrack *track = act_track; + MovieTrackingMarker *marker = BKE_tracking_get_marker(track, user->framenr); - if (marker->flag&MARKER_DISABLED) { - scopes->track_disabled= 1; + if (marker->flag & MARKER_DISABLED) { + scopes->track_disabled = TRUE; } else { - ImBuf *ibuf= BKE_movieclip_get_ibuf(clip, user); + ImBuf *ibuf = BKE_movieclip_get_ibuf(clip, user); - scopes->track_disabled= 0; + scopes->track_disabled = FALSE; if (ibuf && ibuf->rect) { ImBuf *tmpibuf; - MovieTrackingMarker undist_marker= *marker; + MovieTrackingMarker undist_marker = *marker; - if (user->render_flag&MCLIP_PROXY_RENDER_UNDISTORT) { + if (user->render_flag & MCLIP_PROXY_RENDER_UNDISTORT) { int width, height; - float aspy= 1.0f/clip->tracking.camera.pixel_aspect; + float aspy= 1.0f / clip->tracking.camera.pixel_aspect; BKE_movieclip_get_size(clip, user, &width, &height); - undist_marker.pos[0]*= width; - undist_marker.pos[1]*= height*aspy; + undist_marker.pos[0] *= width; + undist_marker.pos[1] *= height*aspy; BKE_tracking_invert_intrinsics(&clip->tracking, undist_marker.pos, undist_marker.pos); - undist_marker.pos[0]/= width; - undist_marker.pos[1]/= height*aspy; + undist_marker.pos[0] /= width; + undist_marker.pos[1] /= height*aspy; } /* NOTE: margin should be kept in sync with value from ui_draw_but_TRACKPREVIEW */ @@ -997,46 +1024,46 @@ void BKE_movieclip_update_scopes(MovieClip *clip, MovieClipUser *user, MovieClip IMB_freeImBuf(ibuf); } - if ((track->flag&TRACK_LOCKED)==0) { - scopes->marker= marker; - scopes->track= track; - scopes->slide_scale[0]= track->pat_max[0]-track->pat_min[0]; - scopes->slide_scale[1]= track->pat_max[1]-track->pat_min[1]; + if ((track->flag & TRACK_LOCKED)==0) { + scopes->marker = marker; + scopes->track = track; + scopes->slide_scale[0] = track->pat_max[0]-track->pat_min[0]; + scopes->slide_scale[1] = track->pat_max[1]-track->pat_min[1]; } } } - scopes->framenr= user->framenr; - scopes->ok= 1; + scopes->framenr = user->framenr; + scopes->ok = TRUE; } static void movieclip_build_proxy_ibuf(MovieClip *clip, ImBuf *ibuf, int cfra, int proxy_render_size, int undistorted) { char name[FILE_MAX]; int quality, rectx, recty; - int size= rendersize_to_number(proxy_render_size); + int size = rendersize_to_number(proxy_render_size); ImBuf *scaleibuf; get_proxy_fname(clip, proxy_render_size, undistorted, cfra, name); - rectx= ibuf->x*size/100.0f; - recty= ibuf->y*size/100.0f; + rectx = ibuf->x * size / 100.0f; + recty = ibuf->y * size / 100.0f; - scaleibuf= IMB_dupImBuf(ibuf); + scaleibuf = IMB_dupImBuf(ibuf); IMB_scaleImBuf(scaleibuf, (short)rectx, (short)recty); - quality= clip->proxy.quality; - scaleibuf->ftype= JPG | quality; + quality = clip->proxy.quality; + scaleibuf->ftype = JPG | quality; /* unsupported feature only confuses other s/w */ - if (scaleibuf->planes==32) - scaleibuf->planes= 24; + if (scaleibuf->planes == 32) + scaleibuf->planes = 24; BLI_lock_thread(LOCK_MOVIECLIP); BLI_make_existing_file(name); - if (IMB_saveiff(scaleibuf, name, IB_rect)==0) + if (IMB_saveiff(scaleibuf, name, IB_rect) == 0) perror(name); BLI_unlock_thread(LOCK_MOVIECLIP); @@ -1045,30 +1072,30 @@ static void movieclip_build_proxy_ibuf(MovieClip *clip, ImBuf *ibuf, int cfra, i } void BKE_movieclip_build_proxy_frame(MovieClip *clip, int clip_flag, struct MovieDistortion *distortion, - int cfra, int *build_sizes, int build_count, int undistorted) + int cfra, int *build_sizes, int build_count, int undistorted) { ImBuf *ibuf; MovieClipUser user; - user.framenr= cfra; - user.render_flag= 0; - user.render_size= MCLIP_PROXY_RENDER_SIZE_FULL; + user.framenr = cfra; + user.render_flag = 0; + user.render_size = MCLIP_PROXY_RENDER_SIZE_FULL; - ibuf= BKE_movieclip_get_ibuf_flag(clip, &user, clip_flag, MOVIECLIP_CACHE_SKIP); + ibuf = BKE_movieclip_get_ibuf_flag(clip, &user, clip_flag, MOVIECLIP_CACHE_SKIP); if (ibuf) { - ImBuf *tmpibuf= ibuf; + ImBuf *tmpibuf = ibuf; int i; if (undistorted) - tmpibuf= get_undistorted_ibuf(clip, distortion, ibuf); + tmpibuf = get_undistorted_ibuf(clip, distortion, ibuf); - for (i= 0; iscreen.first; scr; scr= scr->id.next) { - for (area= scr->areabase.first; area; area= area->next) { - for (sl= area->spacedata.first; sl; sl= sl->next) { - if (sl->spacetype==SPACE_CLIP) { - SpaceClip *sc= (SpaceClip *) sl; + for (scr = bmain->screen.first; scr; scr = scr->id.next) { + for (area = scr->areabase.first; area; area = area->next) { + for (sl = area->spacedata.first; sl; sl = sl->next) { + if (sl->spacetype == SPACE_CLIP) { + SpaceClip *sc = (SpaceClip *) sl; - if (sc->clip==clip) - sc->clip= NULL; + if (sc->clip == clip) + sc->clip = NULL; } - else if (sl->spacetype==SPACE_VIEW3D) { - View3D *v3d= (View3D *) sl; + else if (sl->spacetype == SPACE_VIEW3D) { + View3D *v3d = (View3D *) sl; BGpic *bgpic; - for (bgpic= v3d->bgpicbase.first; bgpic; bgpic= bgpic->next) { - if (bgpic->clip==clip) - bgpic->clip= NULL; + for (bgpic = v3d->bgpicbase.first; bgpic; bgpic = bgpic->next) { + if (bgpic->clip == clip) + bgpic->clip = NULL; } } } } } - for (sce= bmain->scene.first; sce; sce= sce->id.next) { - if (sce->clip==clip) - sce->clip= NULL; + for (sce = bmain->scene.first; sce; sce = sce->id.next) { + if (sce->clip == clip) + sce->clip = NULL; } - for (ob= bmain->object.first; ob; ob= ob->id.next) { + for (ob = bmain->object.first; ob; ob = ob->id.next) { bConstraint *con; - for (con= ob->constraints.first; con; con= con->next) { - bConstraintTypeInfo *cti= constraint_get_typeinfo(con); + for (con = ob->constraints.first; con; con = con->next) { + bConstraintTypeInfo *cti = constraint_get_typeinfo(con); - if (cti->type==CONSTRAINT_TYPE_FOLLOWTRACK) { - bFollowTrackConstraint *data= (bFollowTrackConstraint *) con->data; + if (cti->type == CONSTRAINT_TYPE_FOLLOWTRACK) { + bFollowTrackConstraint *data = (bFollowTrackConstraint *) con->data; - if (data->clip==clip) - data->clip= NULL; + if (data->clip == clip) + data->clip = NULL; } - else if (cti->type==CONSTRAINT_TYPE_CAMERASOLVER) { - bCameraSolverConstraint *data= (bCameraSolverConstraint *) con->data; + else if (cti->type == CONSTRAINT_TYPE_CAMERASOLVER) { + bCameraSolverConstraint *data = (bCameraSolverConstraint *) con->data; - if (data->clip==clip) - data->clip= NULL; + if (data->clip == clip) + data->clip = NULL; } } } - clip->id.us= 0; + clip->id.us = 0; } diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c index bdecc6884ea..b35b654a55b 100644 --- a/source/blender/blenkernel/intern/tracking.c +++ b/source/blender/blenkernel/intern/tracking.c @@ -55,7 +55,6 @@ #include "BKE_movieclip.h" #include "BKE_object.h" #include "BKE_scene.h" -#include "BKE_main.h" // XXX: ... #include "IMB_imbuf_types.h" #include "IMB_imbuf.h" @@ -78,24 +77,24 @@ static struct { void BKE_tracking_init_settings(MovieTracking *tracking) { - tracking->camera.sensor_width= 35.0f; - tracking->camera.pixel_aspect= 1.0f; - tracking->camera.units= CAMERA_UNITS_MM; - - tracking->settings.default_tracker= TRACKER_HYBRID; - tracking->settings.default_minimum_correlation= 0.75; - tracking->settings.default_pattern_size= 11; - tracking->settings.default_search_size= 51; - tracking->settings.default_pyramid_levels= 2; - tracking->settings.keyframe1= 1; - tracking->settings.keyframe2= 30; - tracking->settings.dist= 1; - tracking->settings.object_distance= 1; - - tracking->stabilization.scaleinf= 1.0f; - tracking->stabilization.locinf= 1.0f; - tracking->stabilization.rotinf= 1.0f; - tracking->stabilization.maxscale= 2.0f; + tracking->camera.sensor_width = 35.0f; + tracking->camera.pixel_aspect = 1.0f; + tracking->camera.units = CAMERA_UNITS_MM; + + tracking->settings.default_tracker = TRACKER_HYBRID; + tracking->settings.default_minimum_correlation = 0.75; + tracking->settings.default_pattern_size = 11; + tracking->settings.default_search_size = 51; + tracking->settings.default_pyramid_levels = 2; + tracking->settings.keyframe1 = 1; + tracking->settings.keyframe2 = 30; + tracking->settings.dist = 1; + tracking->settings.object_distance = 1; + + tracking->stabilization.scaleinf = 1.0f; + tracking->stabilization.locinf = 1.0f; + tracking->stabilization.rotinf = 1.0f; + tracking->stabilization.maxscale = 2.0f; BKE_tracking_new_object(tracking, "Camera"); } @@ -112,143 +111,152 @@ void BKE_tracking_clamp_track(MovieTrackingTrack *track, int event) } /* sort */ - for (a= 0; a<2; a++) { - if (track->pat_min[a]>track->pat_max[a]) + for (a = 0; a < 2; a++) { + if (track->pat_min[a] > track->pat_max[a]) SWAP(float, track->pat_min[a], track->pat_max[a]); - if (track->search_min[a]>track->search_max[a]) + if (track->search_min[a] > track->search_max[a]) SWAP(float, track->search_min[a], track->search_max[a]); } /* compute the effective pattern size, which differs from the fine resolution * pattern size for the pyramid KLT tracker */ - for (a= 0; a<2; a++) { + for (a = 0; a < 2; a++) { pat_min[a] = max_pyramid_level_factor * track->pat_min[a]; pat_max[a] = max_pyramid_level_factor * track->pat_max[a]; } - if (event==CLAMP_PAT_DIM) { - for (a= 0; a<2; a++) { + if (event == CLAMP_PAT_DIM) { + for (a = 0; a < 2; a++) { /* search shouldn't be resized smaller than pattern */ - track->search_min[a]= MIN2(pat_min[a], track->search_min[a]); - track->search_max[a]= MAX2(pat_max[a], track->search_max[a]); + track->search_min[a] = MIN2(pat_min[a], track->search_min[a]); + track->search_max[a] = MAX2(pat_max[a], track->search_max[a]); } } - else if (event==CLAMP_PAT_POS) { + else if (event == CLAMP_PAT_POS) { float dim[2]; + sub_v2_v2v2(dim, track->pat_max, track->pat_min); - for (a= 0; a<2; a++) { + for (a = 0; a < 2; a++) { /* pattern shouldn't be moved outside of search */ if (pat_min[a] < track->search_min[a]) { - track->pat_min[a]= track->search_min[a] - (pat_min[a] - track->pat_min[a]); - track->pat_max[a]= track->pat_min[a] + dim[a]; + track->pat_min[a] = track->search_min[a] - (pat_min[a] - track->pat_min[a]); + track->pat_max[a] = track->pat_min[a] + dim[a]; } if (track->pat_max[a] > track->search_max[a]) { - track->pat_max[a]= track->search_max[a] - (pat_max[a] - track->pat_max[a]); - track->pat_min[a]= track->pat_max[a] - dim[a]; + track->pat_max[a] = track->search_max[a] - (pat_max[a] - track->pat_max[a]); + track->pat_min[a] = track->pat_max[a] - dim[a]; } } } - else if (event==CLAMP_SEARCH_DIM) { - for (a= 0; a<2; a++) { + else if (event == CLAMP_SEARCH_DIM) { + for (a = 0; a < 2; a++) { /* search shouldn't be resized smaller than pattern */ - track->search_min[a]= MIN2(pat_min[a], track->search_min[a]); - track->search_max[a]= MAX2(pat_max[a], track->search_max[a]); + track->search_min[a] = MIN2(pat_min[a], track->search_min[a]); + track->search_max[a] = MAX2(pat_max[a], track->search_max[a]); } } - else if (event==CLAMP_SEARCH_POS) { + else if (event == CLAMP_SEARCH_POS) { float dim[2]; + sub_v2_v2v2(dim, track->search_max, track->search_min); - for (a= 0; a<2; a++) { + for (a = 0; a < 2; a++) { /* search shouldn't be moved inside pattern */ if (track->search_min[a] > pat_min[a]) { - track->search_min[a]= pat_min[a]; - track->search_max[a]= track->search_min[a]+dim[a]; + track->search_min[a] = pat_min[a]; + track->search_max[a] = track->search_min[a]+dim[a]; } if (track->search_max[a] < pat_max[a]) { - track->search_max[a]= pat_max[a]; - track->search_min[a]= track->search_max[a]-dim[a]; + track->search_max[a] = pat_max[a]; + track->search_min[a] = track->search_max[a]-dim[a]; } } } - else if (event==CLAMP_PYRAMID_LEVELS || (event==CLAMP_SEARCH_DIM && track->tracker == TRACKER_KLT)) { + else if (event == CLAMP_PYRAMID_LEVELS || (event == CLAMP_SEARCH_DIM && track->tracker == TRACKER_KLT)) { float dim[2]; sub_v2_v2v2(dim, track->pat_max, track->pat_min); { - float search_ratio= 2.3f * max_pyramid_level_factor; + float search_ratio = 2.3f * max_pyramid_level_factor; /* resize the search area to something sensible based * on the number of pyramid levels */ - for (a= 0; a<2; a++) { - track->search_min[a]= search_ratio * track->pat_min[a]; - track->search_max[a]= search_ratio * track->pat_max[a]; + for (a = 0; a < 2; a++) { + track->search_min[a] = search_ratio * track->pat_min[a]; + track->search_max[a] = search_ratio * track->pat_max[a]; } } } /* marker's center should be in center of pattern */ - if (event==CLAMP_PAT_DIM || event==CLAMP_PAT_POS) { + if (event == CLAMP_PAT_DIM || event == CLAMP_PAT_POS) { float dim[2]; + sub_v2_v2v2(dim, track->pat_max, track->pat_min); - for (a= 0; a<2; a++) { - track->pat_min[a]= -dim[a]/2.0f; - track->pat_max[a]= dim[a]/2.0f; + for (a = 0; a < 2; a++) { + track->pat_min[a] = -dim[a]/2.0f; + track->pat_max[a] = dim[a]/2.0f; } } } void BKE_tracking_track_flag(MovieTrackingTrack *track, int area, int flag, int clear) { - if (area==TRACK_AREA_NONE) + if (area == TRACK_AREA_NONE) return; if (clear) { - if (area&TRACK_AREA_POINT) track->flag&= ~flag; - if (area&TRACK_AREA_PAT) track->pat_flag&= ~flag; - if (area&TRACK_AREA_SEARCH) track->search_flag&= ~flag; + if (area & TRACK_AREA_POINT) + track->flag &= ~flag; + if (area & TRACK_AREA_PAT) + track->pat_flag &= ~flag; + if (area & TRACK_AREA_SEARCH) + track->search_flag &= ~flag; } else { - if (area&TRACK_AREA_POINT) track->flag|= flag; - if (area&TRACK_AREA_PAT) track->pat_flag|= flag; - if (area&TRACK_AREA_SEARCH) track->search_flag|= flag; + if (area & TRACK_AREA_POINT) + track->flag |= flag; + if (area & TRACK_AREA_PAT) + track->pat_flag |= flag; + if (area & TRACK_AREA_SEARCH) + track->search_flag |= flag; } } MovieTrackingTrack *BKE_tracking_add_track(MovieTracking *tracking, ListBase *tracksbase, float x, float y, - int framenr, int width, int height) + int framenr, int width, int height) { MovieTrackingTrack *track; MovieTrackingMarker marker; - MovieTrackingSettings *settings= &tracking->settings; + MovieTrackingSettings *settings = &tracking->settings; - float half_pattern= (float)settings->default_pattern_size/2.0f; - float half_search= (float)settings->default_search_size/2.0f; + float half_pattern = (float)settings->default_pattern_size / 2.0f; + float half_search = (float)settings->default_search_size / 2.0f; float pat[2], search[2]; - pat[0]= half_pattern/(float)width; - pat[1]= half_pattern/(float)height; + pat[0] = half_pattern / (float)width; + pat[1] = half_pattern / (float)height; - search[0]= half_search/(float)width; - search[1]= half_search/(float)height; + search[0] = half_search / (float)width; + search[1] = half_search / (float)height; - track= MEM_callocN(sizeof(MovieTrackingTrack), "add_marker_exec track"); + track = MEM_callocN(sizeof(MovieTrackingTrack), "add_marker_exec track"); strcpy(track->name, "Track"); - track->tracker= settings->default_tracker; - track->pyramid_levels= settings->default_pyramid_levels; - track->minimum_correlation= settings->default_minimum_correlation; - track->margin= settings->default_margin; - track->pattern_match= settings->default_pattern_match; - track->frames_limit= settings->default_frames_limit; - track->flag= settings->default_flag; + track->tracker = settings->default_tracker; + track->pyramid_levels = settings->default_pyramid_levels; + track->minimum_correlation = settings->default_minimum_correlation; + track->margin = settings->default_margin; + track->pattern_match = settings->default_pattern_match; + track->frames_limit = settings->default_frames_limit; + track->flag = settings->default_flag; memset(&marker, 0, sizeof(marker)); - marker.pos[0]= x; - marker.pos[1]= y; - marker.framenr= framenr; + marker.pos[0] = x; + marker.pos[1] = y; + marker.framenr = framenr; copy_v2_v2(track->pat_max, pat); negate_v2_v2(track->pat_min, pat); @@ -272,32 +280,34 @@ MovieTrackingMarker *BKE_tracking_insert_marker(MovieTrackingTrack *track, Movie MovieTrackingMarker *old_marker= NULL; if (track->markersnr) - old_marker= BKE_tracking_exact_marker(track, marker->framenr); + old_marker = BKE_tracking_exact_marker(track, marker->framenr); if (old_marker) { - *old_marker= *marker; + *old_marker = *marker; return old_marker; } else { - int a= track->markersnr; + int a = track->markersnr; while (a--) { - if (track->markers[a].framenrframenr) + if (track->markers[a].framenr < marker->framenr) break; } track->markersnr++; - if (track->markers) track->markers= MEM_reallocN(track->markers, sizeof(MovieTrackingMarker)*track->markersnr); - else track->markers= MEM_callocN(sizeof(MovieTrackingMarker), "MovieTracking markers"); + if (track->markers) + track->markers = MEM_reallocN(track->markers, sizeof(MovieTrackingMarker)*track->markersnr); + else + track->markers = MEM_callocN(sizeof(MovieTrackingMarker), "MovieTracking markers"); memmove(track->markers+a+2, track->markers+a+1, (track->markersnr-a-2)*sizeof(MovieTrackingMarker)); - track->markers[a+1]= *marker; + track->markers[a+1] = *marker; - track->last_marker= a+1; + track->last_marker = a + 1; - return &track->markers[a+1]; + return &track->markers[a + 1]; } } @@ -306,16 +316,16 @@ void BKE_tracking_delete_marker(MovieTrackingTrack *track, int framenr) int a= 0; while (amarkersnr) { - if (track->markers[a].framenr==framenr) { - if (track->markersnr>1) { + if (track->markers[a].framenr == framenr) { + if (track->markersnr > 1) { memmove(track->markers+a, track->markers+a+1, (track->markersnr-a-1)*sizeof(MovieTrackingMarker)); track->markersnr--; - track->markers= MEM_reallocN(track->markers, sizeof(MovieTrackingMarker)*track->markersnr); + track->markers = MEM_reallocN(track->markers, sizeof(MovieTrackingMarker)*track->markersnr); } else { MEM_freeN(track->markers); - track->markers= NULL; - track->markersnr= 0; + track->markers = NULL; + track->markersnr = 0; } break; @@ -327,22 +337,23 @@ void BKE_tracking_delete_marker(MovieTrackingTrack *track, int framenr) MovieTrackingMarker *BKE_tracking_get_marker(MovieTrackingTrack *track, int framenr) { - int a= track->markersnr-1; + int a = track->markersnr-1; if (!track->markersnr) return NULL; /* approximate pre-first framenr marker with first marker */ - if (framenrmarkers[0].framenr) + if (framenr < track->markers[0].framenr) return &track->markers[0]; - if (track->last_markermarkersnr) - a= track->last_marker; + if (track->last_marker < track->markersnr) + a = track->last_marker; + + if (track->markers[a].framenr <= framenr) { + while (a < track->markersnr && track->markers[a].framenr <= framenr) { + if (track->markers[a].framenr == framenr) { + track->last_marker = a; - if (track->markers[a].framenr<=framenr) { - while (amarkersnr && track->markers[a].framenr<=framenr) { - if (track->markers[a].framenr==framenr) { - track->last_marker= a; return &track->markers[a]; } a++; @@ -352,9 +363,10 @@ MovieTrackingMarker *BKE_tracking_get_marker(MovieTrackingTrack *track, int fram return &track->markers[a-1]; } else { - while (a>=0 && track->markers[a].framenr>=framenr) { - if (track->markers[a].framenr==framenr) { - track->last_marker= a; + while (a >= 0 && track->markers[a].framenr >= framenr) { + if (track->markers[a].framenr == framenr) { + track->last_marker = a; + return &track->markers[a]; } @@ -370,16 +382,16 @@ MovieTrackingMarker *BKE_tracking_get_marker(MovieTrackingTrack *track, int fram MovieTrackingMarker *BKE_tracking_ensure_marker(MovieTrackingTrack *track, int framenr) { - MovieTrackingMarker *marker= BKE_tracking_get_marker(track, framenr); + MovieTrackingMarker *marker = BKE_tracking_get_marker(track, framenr); - if (marker->framenr!=framenr) { + if (marker->framenr != framenr) { MovieTrackingMarker marker_new; - marker_new= *marker; - marker_new.framenr= framenr; + marker_new = *marker; + marker_new.framenr = framenr; BKE_tracking_insert_marker(track, &marker_new); - marker= BKE_tracking_get_marker(track, framenr); + marker = BKE_tracking_get_marker(track, framenr); } return marker; @@ -387,9 +399,9 @@ MovieTrackingMarker *BKE_tracking_ensure_marker(MovieTrackingTrack *track, int f MovieTrackingMarker *BKE_tracking_exact_marker(MovieTrackingTrack *track, int framenr) { - MovieTrackingMarker *marker= BKE_tracking_get_marker(track, framenr); + MovieTrackingMarker *marker = BKE_tracking_get_marker(track, framenr); - if (marker->framenr!=framenr) + if (marker->framenr != framenr) return NULL; return marker; @@ -409,19 +421,22 @@ int BKE_tracking_has_enabled_marker(MovieTrackingTrack *track, int framenr) void BKE_tracking_free_track(MovieTrackingTrack *track) { - if (track->markers) MEM_freeN(track->markers); + if (track->markers) + MEM_freeN(track->markers); } static void put_disabled_marker(MovieTrackingTrack *track, MovieTrackingMarker *ref_marker, int before, int overwrite) { MovieTrackingMarker marker_new; - marker_new= *ref_marker; - marker_new.flag&= ~MARKER_TRACKED; - marker_new.flag|= MARKER_DISABLED; + marker_new = *ref_marker; + marker_new.flag &= ~MARKER_TRACKED; + marker_new.flag |= MARKER_DISABLED; - if (before) marker_new.framenr--; - else marker_new.framenr++; + if (before) + marker_new.framenr--; + else + marker_new.framenr++; if (!BKE_tracking_has_marker(track, marker_new.framenr) || overwrite) BKE_tracking_insert_marker(track, &marker_new); @@ -431,12 +446,13 @@ void BKE_tracking_clear_path(MovieTrackingTrack *track, int ref_frame, int actio { int a; - if (action==TRACK_CLEAR_REMAINED) { - a= 1; - while (amarkersnr) { - if (track->markers[a].framenr>ref_frame) { - track->markersnr= a; - track->markers= MEM_reallocN(track->markers, sizeof(MovieTrackingMarker)*track->markersnr); + if (action == TRACK_CLEAR_REMAINED) { + a = 1; + + while (a < track->markersnr) { + if (track->markers[a].framenr > ref_frame) { + track->markersnr = a; + track->markers = MEM_reallocN(track->markers, sizeof(MovieTrackingMarker)*track->markersnr); break; } @@ -447,14 +463,15 @@ void BKE_tracking_clear_path(MovieTrackingTrack *track, int ref_frame, int actio if (track->markersnr) put_disabled_marker(track, &track->markers[track->markersnr-1], 0, 1); } - else if (action==TRACK_CLEAR_UPTO) { + else if (action == TRACK_CLEAR_UPTO) { a= track->markersnr-1; - while (a>=0) { - if (track->markers[a].framenr<=ref_frame) { + + while (a >= 0) { + if (track->markers[a].framenr <= ref_frame) { memmove(track->markers, track->markers+a, (track->markersnr-a)*sizeof(MovieTrackingMarker)); - track->markersnr= track->markersnr-a; - track->markers= MEM_reallocN(track->markers, sizeof(MovieTrackingMarker)*track->markersnr); + track->markersnr = track->markersnr-a; + track->markers = MEM_reallocN(track->markers, sizeof(MovieTrackingMarker)*track->markersnr); break; } @@ -465,15 +482,15 @@ void BKE_tracking_clear_path(MovieTrackingTrack *track, int ref_frame, int actio if (track->markersnr) put_disabled_marker(track, &track->markers[0], 1, 1); } - else if (action==TRACK_CLEAR_ALL) { + else if (action == TRACK_CLEAR_ALL) { MovieTrackingMarker *marker, marker_new; - marker= BKE_tracking_get_marker(track, ref_frame); - marker_new= *marker; + marker = BKE_tracking_get_marker(track, ref_frame); + marker_new = *marker; MEM_freeN(track->markers); - track->markers= NULL; - track->markersnr= 0; + track->markers = NULL; + track->markersnr = 0; BKE_tracking_insert_marker(track, &marker_new); @@ -484,27 +501,28 @@ void BKE_tracking_clear_path(MovieTrackingTrack *track, int ref_frame, int actio void BKE_tracking_join_tracks(MovieTrackingTrack *dst_track, MovieTrackingTrack *src_track) { - int i= 0, a= 0, b= 0; + int i = 0, a = 0, b = 0, tot; MovieTrackingMarker *markers; - markers= MEM_callocN((dst_track->markersnr+src_track->markersnr)*sizeof(MovieTrackingMarker), "tmp tracking joined tracks"); + tot = dst_track->markersnr + src_track->markersnr; + markers = MEM_callocN(tot * sizeof(MovieTrackingMarker), "tmp tracking joined tracks"); while (a < src_track->markersnr || b < dst_track->markersnr) { - if (b>=dst_track->markersnr) { - markers[i]= src_track->markers[a++]; + if (b >= dst_track->markersnr) { + markers[i] = src_track->markers[a++]; } - else if (a>=src_track->markersnr) { - markers[i]= dst_track->markers[b++]; + else if (a >= src_track->markersnr) { + markers[i] = dst_track->markers[b++]; } - else if (src_track->markers[a].framenrmarkers[b].framenr) { - markers[i]= src_track->markers[a++]; + else if (src_track->markers[a].framenr < dst_track->markers[b].framenr) { + markers[i] = src_track->markers[a++]; } - else if (src_track->markers[a].framenr>dst_track->markers[b].framenr) { - markers[i]= dst_track->markers[b++]; + else if (src_track->markers[a].framenr > dst_track->markers[b].framenr) { + markers[i] = dst_track->markers[b++]; } else { - if ((src_track->markers[a].flag&MARKER_DISABLED)==0) { - if ((dst_track->markers[b].flag&MARKER_DISABLED)==0) { + if ((src_track->markers[a].flag & MARKER_DISABLED)==0) { + if ((dst_track->markers[b].flag & MARKER_DISABLED)==0) { /* both tracks are enabled on this frame, so find the whole segment * on which tracks are intersecting and blend tracks using linear * interpolation to prevent jumps */ @@ -517,6 +535,7 @@ void BKE_tracking_join_tracks(MovieTrackingTrack *dst_track, MovieTrackingTrack (dst_track->markers[b-1].flag & MARKER_DISABLED) || (dst_track->markers[b-1].framenr != frame - 1); + /* find length of intersection */ while (a < src_track->markersnr && b < dst_track->markersnr) { marker_a = &src_track->markers[a]; marker_b = &dst_track->markers[b]; @@ -536,6 +555,7 @@ void BKE_tracking_join_tracks(MovieTrackingTrack *dst_track, MovieTrackingTrack a = start_a; b = start_b; + /* linear interpolation for intersecting frames */ for (j = 0; j < len; j++) { float fac = 0.5f; @@ -548,7 +568,7 @@ void BKE_tracking_join_tracks(MovieTrackingTrack *dst_track, MovieTrackingTrack marker_a = &src_track->markers[a]; marker_b = &dst_track->markers[b]; - markers[i]= dst_track->markers[b]; + markers[i] = dst_track->markers[b]; interp_v2_v2v2(markers[i].pos, marker_b->pos, marker_a->pos, fac); a++; b++; @@ -558,9 +578,9 @@ void BKE_tracking_join_tracks(MovieTrackingTrack *dst_track, MovieTrackingTrack /* this values will be incremented at the end of the loop cycle */ a--; b--; i--; } - else markers[i]= src_track->markers[a]; + else markers[i] = src_track->markers[a]; } - else markers[i]= dst_track->markers[b]; + else markers[i] = dst_track->markers[b]; a++; b++; @@ -571,10 +591,10 @@ void BKE_tracking_join_tracks(MovieTrackingTrack *dst_track, MovieTrackingTrack MEM_freeN(dst_track->markers); - dst_track->markers= MEM_callocN(i*sizeof(MovieTrackingMarker), "tracking joined tracks"); + dst_track->markers = MEM_callocN(i*sizeof(MovieTrackingMarker), "tracking joined tracks"); memcpy(dst_track->markers, markers, i*sizeof(MovieTrackingMarker)); - dst_track->markersnr= i; + dst_track->markersnr = i; MEM_freeN(markers); } @@ -583,7 +603,7 @@ static void tracking_tracks_free(ListBase *tracks) { MovieTrackingTrack *track; - for (track= tracks->first; track; track= track->next) { + for (track = tracks->first; track; track = track->next) { BKE_tracking_free_track(track); } @@ -606,7 +626,7 @@ static void tracking_objects_free(ListBase *objects) { MovieTrackingObject *object; - for (object= objects->first; object; object= object->next) + for (object = objects->first; object; object = object->next) tracking_object_free(object); BLI_freelistN(objects); @@ -631,7 +651,7 @@ static MovieTrackingTrack *duplicate_track(MovieTrackingTrack *track) new_track = MEM_callocN(sizeof(MovieTrackingTrack), "tracksMapMerge new_track"); - *new_track= *track; + *new_track = *track; new_track->next = new_track->prev = NULL; new_track->markers = MEM_dupallocN(new_track->markers); @@ -710,20 +730,20 @@ typedef struct TracksMap { static TracksMap *tracks_map_new(const char *object_name, int is_camera, int num_tracks, int customdata_size) { - TracksMap *map= MEM_callocN(sizeof(TracksMap), "TrackingsMap"); + TracksMap *map = MEM_callocN(sizeof(TracksMap), "TrackingsMap"); BLI_strncpy(map->object_name, object_name, sizeof(map->object_name)); - map->is_camera= is_camera; + map->is_camera = is_camera; - map->num_tracks= num_tracks; - map->customdata_size= customdata_size; + map->num_tracks = num_tracks; + map->customdata_size = customdata_size; - map->tracks= MEM_callocN(sizeof(MovieTrackingTrack)*num_tracks, "TrackingsMap tracks"); + map->tracks = MEM_callocN(sizeof(MovieTrackingTrack)*num_tracks, "TrackingsMap tracks"); if (customdata_size) - map->customdata= MEM_callocN(customdata_size*num_tracks, "TracksMap customdata"); + map->customdata = MEM_callocN(customdata_size*num_tracks, "TracksMap customdata"); - map->hash= BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "TracksMap hash"); + map->hash = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "TracksMap hash"); return map; } @@ -735,19 +755,19 @@ static int tracks_map_size(TracksMap *map) static void tracks_map_get(TracksMap *map, int index, MovieTrackingTrack **track, void **customdata) { - *track= &map->tracks[index]; + *track = &map->tracks[index]; if (map->customdata) - *customdata= &map->customdata[index*map->customdata_size]; + *customdata = &map->customdata[index*map->customdata_size]; } static void tracks_map_insert(TracksMap *map, MovieTrackingTrack *track, void *customdata) { MovieTrackingTrack new_track= *track; - new_track.markers= MEM_dupallocN(new_track.markers); + new_track.markers = MEM_dupallocN(new_track.markers); - map->tracks[map->ptr]= new_track; + map->tracks[map->ptr] = new_track; if (customdata) memcpy(&map->customdata[map->ptr*map->customdata_size], customdata, map->customdata_size); @@ -760,64 +780,64 @@ static void tracks_map_insert(TracksMap *map, MovieTrackingTrack *track, void *c static void tracks_map_merge(TracksMap *map, MovieTracking *tracking) { MovieTrackingTrack *track; - MovieTrackingTrack *act_track= BKE_tracking_active_track(tracking); - MovieTrackingTrack *rot_track= tracking->stabilization.rot_track; - ListBase tracks= {NULL, NULL}, new_tracks= {NULL, NULL}; + MovieTrackingTrack *act_track = BKE_tracking_active_track(tracking); + MovieTrackingTrack *rot_track = tracking->stabilization.rot_track; + ListBase tracks = {NULL, NULL}, new_tracks = {NULL, NULL}; ListBase *old_tracks; int a; if (map->is_camera) { - old_tracks= &tracking->tracks; + old_tracks = &tracking->tracks; } else { - MovieTrackingObject *object= BKE_tracking_named_object(tracking, map->object_name); + MovieTrackingObject *object = BKE_tracking_named_object(tracking, map->object_name); if (!object) { /* object was deleted by user, create new one */ - object= BKE_tracking_new_object(tracking, map->object_name); + object = BKE_tracking_new_object(tracking, map->object_name); } - old_tracks= &object->tracks; + old_tracks = &object->tracks; } /* duplicate currently operating tracks to temporary list. * this is needed to keep names in unique state and it's faster to change names * of currently operating tracks (if needed) */ - for (a= 0; anum_tracks; a++) { - int replace_sel= 0, replace_rot= 0; + for (a = 0; a < map->num_tracks; a++) { + int replace_sel = 0, replace_rot = 0; MovieTrackingTrack *new_track, *old; - track= &map->tracks[a]; + track = &map->tracks[a]; /* find original of operating track in list of previously displayed tracks */ - old= BLI_ghash_lookup(map->hash, track); + old = BLI_ghash_lookup(map->hash, track); if (old) { - MovieTrackingTrack *cur= old_tracks->first; + MovieTrackingTrack *cur = old_tracks->first; while (cur) { - if (cur==old) + if (cur == old) break; - cur= cur->next; + cur = cur->next; } /* original track was found, re-use flags and remove this track */ if (cur) { - if (cur==act_track) - replace_sel= 1; - if (cur==rot_track) - replace_rot= 1; + if (cur == act_track) + replace_sel = 1; + if (cur == rot_track) + replace_rot = 1; - track->flag= cur->flag; - track->pat_flag= cur->pat_flag; - track->search_flag= cur->search_flag; + track->flag = cur->flag; + track->pat_flag = cur->pat_flag; + track->search_flag = cur->search_flag; BKE_tracking_free_track(cur); BLI_freelinkN(old_tracks, cur); } } - new_track= duplicate_track(track); + new_track = duplicate_track(track); BLI_ghash_remove(map->hash, track, NULL, NULL); /* XXX: are we actually need this */ BLI_ghash_insert(map->hash, track, new_track); @@ -832,24 +852,24 @@ static void tracks_map_merge(TracksMap *map, MovieTracking *tracking) } /* move all tracks, which aren't operating */ - track= old_tracks->first; + track = old_tracks->first; while (track) { - MovieTrackingTrack *next= track->next; + MovieTrackingTrack *next = track->next; - track->next= track->prev= NULL; + track->next = track->prev = NULL; BLI_addtail(&new_tracks, track); track= next; } /* now move all tracks which are currently operating and keep their names unique */ - track= tracks.first; + track = tracks.first; while (track) { - MovieTrackingTrack *next= track->next; + MovieTrackingTrack *next = track->next; BLI_remlink(&tracks, track); - track->next= track->prev= NULL; + track->next = track->prev = NULL; BLI_addtail(&new_tracks, track); BLI_uniquename(&new_tracks, track, "Track", '.', offsetof(MovieTrackingTrack, name), sizeof(track->name)); @@ -866,7 +886,7 @@ static void tracks_map_free(TracksMap *map, void (*customdata_free) (void *custo BLI_ghash_free(map->hash, NULL, NULL); - for (i= 0; inum_tracks; i++) { + for (i = 0; i < map->num_tracks; i++) { if (map->customdata && customdata_free) customdata_free(&map->customdata[i*map->customdata_size]); @@ -915,48 +935,48 @@ typedef struct MovieTrackingContext { MovieTrackingContext *BKE_tracking_context_new(MovieClip *clip, MovieClipUser *user, short backwards, short sequence) { - MovieTrackingContext *context= MEM_callocN(sizeof(MovieTrackingContext), "trackingContext"); - MovieTracking *tracking= &clip->tracking; - MovieTrackingSettings *settings= &tracking->settings; - ListBase *tracksbase= BKE_tracking_get_tracks(tracking); + MovieTrackingContext *context = MEM_callocN(sizeof(MovieTrackingContext), "trackingContext"); + MovieTracking *tracking = &clip->tracking; + MovieTrackingSettings *settings = &tracking->settings; + ListBase *tracksbase = BKE_tracking_get_tracks(tracking); MovieTrackingTrack *track; - MovieTrackingObject *object= BKE_tracking_active_object(tracking); - int num_tracks= 0; + MovieTrackingObject *object = BKE_tracking_active_object(tracking); + int num_tracks = 0; - context->settings= *settings; - context->backwards= backwards; - context->sync_frame= user->framenr; - context->first_time= 1; - context->sequence= sequence; + context->settings = *settings; + context->backwards = backwards; + context->sync_frame = user->framenr; + context->first_time = TRUE; + context->sequence = sequence; /* count */ - track= tracksbase->first; + track = tracksbase->first; while (track) { if (TRACK_SELECTED(track) && (track->flag & (TRACK_LOCKED | TRACK_HIDDEN))==0) { - MovieTrackingMarker *marker= BKE_tracking_get_marker(track, user->framenr); + MovieTrackingMarker *marker = BKE_tracking_get_marker(track, user->framenr); - if ((marker->flag&MARKER_DISABLED)==0) + if ((marker->flag & MARKER_DISABLED) == 0) num_tracks++; } - track= track->next; + track = track->next; } if (num_tracks) { int width, height; - context->tracks_map= tracks_map_new(object->name, object->flag & TRACKING_OBJECT_CAMERA, - num_tracks, sizeof(TrackContext)); + context->tracks_map = tracks_map_new(object->name, object->flag & TRACKING_OBJECT_CAMERA, + num_tracks, sizeof(TrackContext)); BKE_movieclip_get_size(clip, user, &width, &height); /* create tracking data */ - track= tracksbase->first; + track = tracksbase->first; while (track) { - if (TRACK_SELECTED(track) && (track->flag & (TRACK_HIDDEN | TRACK_LOCKED))==0) { - MovieTrackingMarker *marker= BKE_tracking_get_marker(track, user->framenr); + if (TRACK_SELECTED(track) && (track->flag & (TRACK_HIDDEN | TRACK_LOCKED)) == 0) { + MovieTrackingMarker *marker = BKE_tracking_get_marker(track, user->framenr); - if ((marker->flag&MARKER_DISABLED)==0) { + if ((marker->flag & MARKER_DISABLED) == 0) { TrackContext track_context; memset(&track_context, 0, sizeof(TrackContext)); @@ -964,34 +984,39 @@ MovieTrackingContext *BKE_tracking_context_new(MovieClip *clip, MovieClipUser *u #ifdef WITH_LIBMV { float patx, paty; - patx= (int)((track->pat_max[0]-track->pat_min[0])*width); - paty= (int)((track->pat_max[1]-track->pat_min[1])*height); + patx = (int)((track->pat_max[0]-track->pat_min[0])*width); + paty = (int)((track->pat_max[1]-track->pat_min[1])*height); if (ELEM(track->tracker, TRACKER_KLT, TRACKER_HYBRID)) { - float search_size_x= (track->search_max[0]-track->search_min[0])*width; - float search_size_y= (track->search_max[1]-track->search_min[1])*height; - float pattern_size_x= (track->pat_max[0]-track->pat_min[0])*width; - float pattern_size_y= (track->pat_max[1]-track->pat_min[1])*height; - int wndx= (int)patx/2, wndy= (int)paty/2; + float search_size_x = (track->search_max[0]-track->search_min[0])*width; + float search_size_y = (track->search_max[1]-track->search_min[1])*height; + float pattern_size_x = (track->pat_max[0]-track->pat_min[0])*width; + float pattern_size_y = (track->pat_max[1]-track->pat_min[1])*height; + int wndx = (int)patx / 2, wndy = (int)paty / 2; + int half_wnd = MAX2(wndx, wndy); /* compute the maximum pyramid size */ - float search_to_pattern_ratio= MIN2(search_size_x, search_size_y) + float search_to_pattern_ratio = MIN2(search_size_x, search_size_y) / MAX2(pattern_size_x, pattern_size_y); float log2_search_to_pattern_ratio = log(floor(search_to_pattern_ratio)) / M_LN2; - int max_pyramid_levels= floor(log2_search_to_pattern_ratio + 1); + int max_pyramid_levels = floor(log2_search_to_pattern_ratio + 1); /* try to accommodate the user's choice of pyramid level in a way * that doesn't cause the coarsest pyramid pattern to be larger * than the search size */ - int level= MIN2(track->pyramid_levels, max_pyramid_levels); - - if (track->tracker==TRACKER_KLT) - track_context.region_tracker= libmv_pyramidRegionTrackerNew(100, level, MAX2(wndx, wndy), track->minimum_correlation); - else - track_context.region_tracker= libmv_hybridRegionTrackerNew(100, MAX2(wndx, wndy), track->minimum_correlation); + int level = MIN2(track->pyramid_levels, max_pyramid_levels); + + if (track->tracker==TRACKER_KLT) { + track_context.region_tracker = + libmv_pyramidRegionTrackerNew(100, level, half_wnd, track->minimum_correlation); + } + else { + track_context.region_tracker = + libmv_hybridRegionTrackerNew(100, half_wnd, track->minimum_correlation); + } } - else if (track->tracker==TRACKER_SAD) { - track_context.pattern_size= MAX2(patx, paty); + else if (track->tracker == TRACKER_SAD) { + track_context.pattern_size = MAX2(patx, paty); } } #endif @@ -1000,11 +1025,11 @@ MovieTrackingContext *BKE_tracking_context_new(MovieClip *clip, MovieClipUser *u } } - track= track->next; + track = track->next; } } - context->clip= clip; + context->clip = clip; /* store needed clip flags passing to get_buffer functions * - MCLIP_USE_PROXY is needed to because timecode affects on movie clip @@ -1014,11 +1039,11 @@ MovieTrackingContext *BKE_tracking_context_new(MovieClip *clip, MovieClipUser *u * - MCLIP_USE_PROXY_CUSTOM_DIR is needed because proxy/timecode files might * be stored in a different location * ignore all the rest possible flags for now */ - context->clip_flag= clip->flag&MCLIP_TIMECODE_FLAGS; + context->clip_flag = clip->flag&MCLIP_TIMECODE_FLAGS; - context->user= *user; - context->user.render_size= MCLIP_PROXY_RENDER_SIZE_FULL; - context->user.render_flag= 0; + context->user = *user; + context->user.render_size = MCLIP_PROXY_RENDER_SIZE_FULL; + context->user.render_flag = 0; if (!sequence) BLI_begin_threaded_malloc(); @@ -1028,7 +1053,7 @@ MovieTrackingContext *BKE_tracking_context_new(MovieClip *clip, MovieClipUser *u static void track_context_free(void *customdata) { - TrackContext *track_context= (TrackContext *)customdata; + TrackContext *track_context = (TrackContext *)customdata; #if WITH_LIBMV if (track_context->region_tracker) @@ -1074,17 +1099,19 @@ void BKE_tracking_disable_imbuf_channels(ImBuf *ibuf, int disable_red, int disab (disable_green ? 0.0f : 0.7152f) + (disable_blue ? 0.0f : 0.0722f); - for (y= 0; yy; y++) { - for (x= 0; xx; x++) { - int pixel= ibuf->x*y + x; + for (y = 0; y < ibuf->y; y++) { + for (x = 0; x < ibuf->x; x++) { + int pixel = ibuf->x*y + x; if (ibuf->rect_float) { - float *rrgbf= ibuf->rect_float + pixel*4; + float *rrgbf = ibuf->rect_float + pixel*4; float r = disable_red ? 0.0f : rrgbf[0]; float g = disable_green ? 0.0f : rrgbf[1]; float b = disable_blue ? 0.0f : rrgbf[2]; + if (grayscale) { float gray = (0.2126f*r + 0.7152f*g + 0.0722f*b) / scale; + rrgbf[0] = rrgbf[1] = rrgbf[2] = gray; } else { @@ -1094,12 +1121,14 @@ void BKE_tracking_disable_imbuf_channels(ImBuf *ibuf, int disable_red, int disab } } else { - char *rrgb= (char*)ibuf->rect + pixel*4; + char *rrgb = (char*)ibuf->rect + pixel*4; char r = disable_red ? 0 : rrgb[0]; char g = disable_green ? 0 : rrgb[1]; char b = disable_blue ? 0 : rrgb[2]; + if (grayscale) { float gray = (0.2126f*r + 0.7152f*g + 0.0722f*b) / scale; + rrgb[0] = rrgb[1] = rrgb[2] = gray; } else { @@ -1114,12 +1143,12 @@ void BKE_tracking_disable_imbuf_channels(ImBuf *ibuf, int disable_red, int disab static void disable_imbuf_channels(ImBuf *ibuf, MovieTrackingTrack *track, int grayscale) { - BKE_tracking_disable_imbuf_channels(ibuf, track->flag&TRACK_DISABLE_RED, - track->flag&TRACK_DISABLE_GREEN, track->flag&TRACK_DISABLE_BLUE, grayscale); + BKE_tracking_disable_imbuf_channels(ibuf, track->flag & TRACK_DISABLE_RED, + track->flag & TRACK_DISABLE_GREEN, track->flag & TRACK_DISABLE_BLUE, grayscale); } static ImBuf *get_area_imbuf(ImBuf *ibuf, MovieTrackingTrack *track, MovieTrackingMarker *marker, - float min[2], float max[2], int margin, int anchored, float pos[2], int origin[2]) + float min[2], float max[2], int margin, int anchored, float pos[2], int origin[2]) { ImBuf *tmpibuf; int x, y; @@ -1133,30 +1162,30 @@ static ImBuf *get_area_imbuf(ImBuf *ibuf, MovieTrackingTrack *track, MovieTracki if (pos) zero_v2(pos); - x= mpos[0]*ibuf->x; - y= mpos[1]*ibuf->y; + x = mpos[0]*ibuf->x; + y = mpos[1]*ibuf->y; - w= (max[0]-min[0])*ibuf->x; - h= (max[1]-min[1])*ibuf->y; + w = (max[0] - min[0]) * ibuf->x; + h = (max[1] - min[1]) * ibuf->y; /* dimensions should be odd */ - w= w|1; - h= h|1; + w = w|1; + h = h|1; - x1= x-(int)(w * (-min[0] / (max[0] - min[0]))); - y1= y-(int)(h * (-min[1] / (max[1] - min[1]))); + x1 = x-(int)(w * (-min[0] / (max[0] - min[0]))); + y1 = y-(int)(h * (-min[1] / (max[1] - min[1]))); - tmpibuf= IMB_allocImBuf(w+margin*2, h+margin*2, 32, IB_rect); - IMB_rectcpy(tmpibuf, ibuf, 0, 0, x1-margin, y1-margin, w+margin*2, h+margin*2); + tmpibuf = IMB_allocImBuf(w+margin*2, h+margin*2, 32, IB_rect); + IMB_rectcpy(tmpibuf, ibuf, 0, 0, x1 - margin, y1 - margin, w + margin * 2, h + margin * 2); if (pos != NULL) { - pos[0]= mpos[0]*ibuf->x-x1+margin; - pos[1]= mpos[1]*ibuf->y-y1+margin; + pos[0] = mpos[0] * ibuf->x - x1 + margin; + pos[1] = mpos[1] * ibuf->y - y1 + margin; } if (origin != NULL) { - origin[0]= x1-margin; - origin[1]= y1-margin; + origin[0] = x1 - margin; + origin[1] = y1 - margin; } if ((track->flag & TRACK_PREVIEW_GRAYSCALE) || @@ -1164,54 +1193,57 @@ static ImBuf *get_area_imbuf(ImBuf *ibuf, MovieTrackingTrack *track, MovieTracki (track->flag & TRACK_DISABLE_GREEN) || (track->flag & TRACK_DISABLE_BLUE)) { - disable_imbuf_channels(tmpibuf, track, 1 /* grayscale */); + disable_imbuf_channels(tmpibuf, track, TRUE /* grayscale */); } return tmpibuf; } ImBuf *BKE_tracking_get_pattern_imbuf(ImBuf *ibuf, MovieTrackingTrack *track, MovieTrackingMarker *marker, - int margin, int anchored, float pos[2], int origin[2]) + int margin, int anchored, float pos[2], int origin[2]) { return get_area_imbuf(ibuf, track, marker, track->pat_min, track->pat_max, margin, anchored, pos, origin); } ImBuf *BKE_tracking_get_search_imbuf(ImBuf *ibuf, MovieTrackingTrack *track, MovieTrackingMarker *marker, - int margin, int anchored, float pos[2], int origin[2]) + int margin, int anchored, float pos[2], int origin[2]) { return get_area_imbuf(ibuf, track, marker, track->search_min, track->search_max, margin, anchored, pos, origin); } #ifdef WITH_LIBMV static float *get_search_floatbuf(ImBuf *ibuf, MovieTrackingTrack *track, MovieTrackingMarker *marker, - int *width_r, int *height_r, float pos[2], int origin[2]) + int *width_r, int *height_r, float pos[2], int origin[2]) { ImBuf *tmpibuf; float *pixels, *fp; int x, y, width, height; - width= (track->search_max[0]-track->search_min[0])*ibuf->x; - height= (track->search_max[1]-track->search_min[1])*ibuf->y; + width = (track->search_max[0] - track->search_min[0]) * ibuf->x; + height = (track->search_max[1] - track->search_min[1]) * ibuf->y; - tmpibuf= BKE_tracking_get_search_imbuf(ibuf, track, marker, 0, 0, pos, origin); - disable_imbuf_channels(tmpibuf, track, 0 /* don't grayscale */); + tmpibuf = BKE_tracking_get_search_imbuf(ibuf, track, marker, 0, 0, pos, origin); + disable_imbuf_channels(tmpibuf, track, FALSE /* don't grayscale */); - *width_r= width; - *height_r= height; + *width_r = width; + *height_r = height; - fp= pixels= MEM_callocN(width*height*sizeof(float), "tracking floatBuf"); - for (y= 0; y<(int)height; y++) { - for (x= 0; x<(int)width; x++) { - int pixel= tmpibuf->x*y + x; + fp = pixels = MEM_callocN(width * height * sizeof(float), "tracking floatBuf"); + for (y = 0; y < (int)height; y++) { + for (x = 0; x < (int)width; x++) { + int pixel = tmpibuf->x * y + x; if (tmpibuf->rect_float) { - float *rrgbf= tmpibuf->rect_float + pixel*4; - *fp= 0.2126*rrgbf[0] + 0.7152*rrgbf[1] + 0.0722*rrgbf[2]; + float *rrgbf = tmpibuf->rect_float + pixel * 4; + + *fp = 0.2126 * rrgbf[0] + 0.7152 * rrgbf[1] + 0.0722 * rrgbf[2]; } else { - unsigned char *rrgb= (unsigned char*)tmpibuf->rect + pixel*4; - *fp= (0.2126*rrgb[0] + 0.7152*rrgb[1] + 0.0722*rrgb[2])/255.0f; + unsigned char *rrgb = (unsigned char*)tmpibuf->rect + pixel * 4; + + *fp = (0.2126 * rrgb[0] + 0.7152 * rrgb[1] + 0.0722 * rrgb[2]) / 255.0f; } + fp++; } } @@ -1226,20 +1258,23 @@ static unsigned char *get_ucharbuf(ImBuf *ibuf) int x, y; unsigned char *pixels, *cp; - cp= pixels= MEM_callocN(ibuf->x*ibuf->y*sizeof(unsigned char), "tracking ucharBuf"); - for (y= 0; yy; y++) { - for (x= 0; xx; x++) { - int pixel= ibuf->x*y + x; + cp = pixels = MEM_callocN(ibuf->x * ibuf->y * sizeof(unsigned char), "tracking ucharBuf"); + for (y = 0; y < ibuf->y; y++) { + for (x = 0; x < ibuf->x; x++) { + int pixel = ibuf->x * y + x; if (ibuf->rect_float) { - const float *rrgbf= ibuf->rect_float + pixel*4; - const float grey_f= 0.2126f*rrgbf[0] + 0.7152f*rrgbf[1] + 0.0722f*rrgbf[2]; - *cp= FTOCHAR(grey_f); + const float *rrgbf = ibuf->rect_float + pixel*4; + const float grey_f = 0.2126f * rrgbf[0] + 0.7152f * rrgbf[1] + 0.0722f * rrgbf[2]; + + *cp = FTOCHAR(grey_f); } else { - const unsigned char *rrgb= (unsigned char*)ibuf->rect + pixel*4; - *cp= 0.2126f*rrgb[0] + 0.7152f*rrgb[1] + 0.0722f*rrgb[2]; + const unsigned char *rrgb = (unsigned char*)ibuf->rect + pixel * 4; + + *cp = 0.2126f * rrgb[0] + 0.7152f * rrgb[1] + 0.0722f * rrgb[2]; } + cp++; } } @@ -1248,18 +1283,18 @@ static unsigned char *get_ucharbuf(ImBuf *ibuf) } static unsigned char *get_search_bytebuf(ImBuf *ibuf, MovieTrackingTrack *track, MovieTrackingMarker *marker, - int *width_r, int *height_r, float pos[2], int origin[2]) + int *width_r, int *height_r, float pos[2], int origin[2]) { ImBuf *tmpibuf; unsigned char *pixels; - tmpibuf= BKE_tracking_get_search_imbuf(ibuf, track, marker, 0, 0, pos, origin); - disable_imbuf_channels(tmpibuf, track, 0 /* don't grayscale */); + tmpibuf = BKE_tracking_get_search_imbuf(ibuf, track, marker, 0, 0, pos, origin); + disable_imbuf_channels(tmpibuf, track, FALSE /* don't grayscale */); - *width_r= tmpibuf->x; - *height_r= tmpibuf->y; + *width_r = tmpibuf->x; + *height_r = tmpibuf->y; - pixels= get_ucharbuf(tmpibuf); + pixels = get_ucharbuf(tmpibuf); IMB_freeImBuf(tmpibuf); @@ -1269,63 +1304,64 @@ static unsigned char *get_search_bytebuf(ImBuf *ibuf, MovieTrackingTrack *track, static ImBuf *get_frame_ibuf(MovieTrackingContext *context, int framenr) { ImBuf *ibuf; - MovieClipUser user= context->user; + MovieClipUser user = context->user; - user.framenr= framenr; + user.framenr = framenr; - ibuf= BKE_movieclip_get_ibuf_flag(context->clip, &user, context->clip_flag, MOVIECLIP_CACHE_SKIP); + ibuf = BKE_movieclip_get_ibuf_flag(context->clip, &user, context->clip_flag, MOVIECLIP_CACHE_SKIP); return ibuf; } static ImBuf *get_keyframed_ibuf(MovieTrackingContext *context, MovieTrackingTrack *track, - MovieTrackingMarker *marker, MovieTrackingMarker **marker_keyed) + MovieTrackingMarker *marker, MovieTrackingMarker **marker_keyed) { - int framenr= marker->framenr; - int a= marker-track->markers; + int framenr = marker->framenr; + int a = marker-track->markers; - *marker_keyed= marker; + *marker_keyed = marker; - while (a>=0 && amarkersnr) { - int next= (context->backwards) ? a+1 : a-1; - int is_keyframed= 0; - MovieTrackingMarker *cur_marker= &track->markers[a]; - MovieTrackingMarker *next_marker= NULL; + while (a >= 0 && a < track->markersnr) { + int next = (context->backwards) ? a+1 : a-1; + int is_keyframed = FALSE; + MovieTrackingMarker *cur_marker = &track->markers[a]; + MovieTrackingMarker *next_marker = NULL; if (next>=0 && nextmarkersnr) next_marker= &track->markers[next]; /* if next mrker is disabled, stop searching keyframe and use current frame as keyframe */ - if (next_marker && next_marker->flag&MARKER_DISABLED) - is_keyframed= 1; + if (next_marker && next_marker->flag & MARKER_DISABLED) + is_keyframed = TRUE; - is_keyframed|= (cur_marker->flag&MARKER_TRACKED)==0; + is_keyframed |= (cur_marker->flag & MARKER_TRACKED) == 0; if (is_keyframed) { - framenr= cur_marker->framenr; - *marker_keyed= cur_marker; + framenr = cur_marker->framenr; + *marker_keyed = cur_marker; + break; } - a= next; + a = next; } return get_frame_ibuf(context, framenr); } static ImBuf *get_adjust_ibuf(MovieTrackingContext *context, MovieTrackingTrack *track, MovieTrackingMarker *marker, - int curfra, MovieTrackingMarker **marker_keyed) + int curfra, MovieTrackingMarker **marker_keyed) { - ImBuf *ibuf= NULL; + ImBuf *ibuf = NULL; if (track->pattern_match == TRACK_MATCH_KEYFRAME) { - ibuf= get_keyframed_ibuf(context, track, marker, marker_keyed); + ibuf = get_keyframed_ibuf(context, track, marker, marker_keyed); } else { - ibuf= get_frame_ibuf(context, curfra); + ibuf = get_frame_ibuf(context, curfra); /* use current marker as keyframed position */ - *marker_keyed= marker; + *marker_keyed = marker; } return ibuf; @@ -1335,10 +1371,10 @@ static void get_warped(TrackContext *track_context, int x, int y, int width, uns { int i, j; - for (i=0; ipattern_size; i++) { - for (j=0; jpattern_size; j++) { - track_context->warped[i*track_context->pattern_size+j]= - image[(y+i-track_context->pattern_size/2)*width+x+j-track_context->pattern_size/2]; + for (i = 0; i < track_context->pattern_size; i++) { + for (j = 0; j < track_context->pattern_size; j++) { + track_context->warped[i * track_context->pattern_size + j] = + image[(y + i - track_context->pattern_size / 2) * width + x + j - track_context->pattern_size / 2]; } } } @@ -1347,130 +1383,139 @@ static void get_warped(TrackContext *track_context, int x, int y, int width, uns void BKE_tracking_sync(MovieTrackingContext *context) { - MovieTracking *tracking= &context->clip->tracking; + MovieTracking *tracking = &context->clip->tracking; int newframe; tracks_map_merge(context->tracks_map, tracking); - if (context->backwards) newframe= context->user.framenr+1; - else newframe= context->user.framenr-1; + if (context->backwards) + newframe = context->user.framenr + 1; + else + newframe = context->user.framenr - 1; - context->sync_frame= newframe; + context->sync_frame = newframe; } void BKE_tracking_sync_user(MovieClipUser *user, MovieTrackingContext *context) { - user->framenr= context->sync_frame; + user->framenr = context->sync_frame; } int BKE_tracking_next(MovieTrackingContext *context) { ImBuf *ibuf_new; - int curfra= context->user.framenr; - int a, ok= 0, map_size; + int curfra = context->user.framenr; + int a, ok = FALSE, map_size; - map_size= tracks_map_size(context->tracks_map); + map_size = tracks_map_size(context->tracks_map); /* nothing to track, avoid unneeded frames reading to save time and memory */ if (!map_size) - return 0; + return FALSE; - if (context->backwards) context->user.framenr--; - else context->user.framenr++; + if (context->backwards) + context->user.framenr--; + else + context->user.framenr++; - ibuf_new= BKE_movieclip_get_ibuf_flag(context->clip, &context->user, context->clip_flag, MOVIECLIP_CACHE_SKIP); + ibuf_new = BKE_movieclip_get_ibuf_flag(context->clip, &context->user, context->clip_flag, MOVIECLIP_CACHE_SKIP); if (!ibuf_new) - return 0; + return FALSE; #pragma omp parallel for private(a) shared(ibuf_new, ok) if (map_size>1) - for (a= 0; atracks_map, a, &track, (void**)&track_context); - marker= BKE_tracking_exact_marker(track, curfra); + marker = BKE_tracking_exact_marker(track, curfra); - if (marker && (marker->flag&MARKER_DISABLED)==0) { + if (marker && (marker->flag & MARKER_DISABLED) == 0) { #ifdef WITH_LIBMV - int width, height, origin[2], tracked= 0, need_readjust= 0; + int width, height, origin[2], tracked = 0, need_readjust = 0; float pos[2], margin[2], dim[2]; double x1, y1, x2, y2; - ImBuf *ibuf= NULL; + ImBuf *ibuf = NULL; MovieTrackingMarker marker_new, *marker_keyed; - int onbound= 0, nextfra; + int onbound = FALSE, nextfra; - if (track->pattern_match==TRACK_MATCH_KEYFRAME) - need_readjust= context->first_time; + if (track->pattern_match == TRACK_MATCH_KEYFRAME) + need_readjust = context->first_time; else - need_readjust= 1; + need_readjust = TRUE; - if (context->backwards) nextfra= curfra-1; - else nextfra= curfra+1; + if (context->backwards) + nextfra = curfra - 1; + else + nextfra = curfra + 1; /* margin from frame boundaries */ sub_v2_v2v2(dim, track->pat_max, track->pat_min); - margin[0]= margin[1]= MAX2(dim[0], dim[1]) / 2.0f; + margin[0] = margin[1] = MAX2(dim[0], dim[1]) / 2.0f; - margin[0]= MAX2(margin[0], (float)track->margin / ibuf_new->x); - margin[1]= MAX2(margin[1], (float)track->margin / ibuf_new->y); + margin[0] = MAX2(margin[0], (float)track->margin / ibuf_new->x); + margin[1] = MAX2(margin[1], (float)track->margin / ibuf_new->y); /* do not track markers which are too close to boundary */ if (marker->pos[0]pos[0]>1.0f-margin[0] || - marker->pos[1]pos[1]>1.0f-margin[1]) { - onbound= 1; + marker->pos[1]pos[1]>1.0f-margin[1]) + { + onbound = TRUE; } else if (ELEM(track->tracker, TRACKER_KLT, TRACKER_HYBRID)) { float *patch_new; if (need_readjust) { /* calculate patch for keyframed position */ - ibuf= get_adjust_ibuf(context, track, marker, curfra, &marker_keyed); + ibuf = get_adjust_ibuf(context, track, marker, curfra, &marker_keyed); if (track_context->patch) MEM_freeN(track_context->patch); - track_context->patch= get_search_floatbuf(ibuf, track, marker_keyed, &width, &height, track_context->keyframed_pos, origin); + track_context->patch = get_search_floatbuf(ibuf, track, marker_keyed, &width, &height, + track_context->keyframed_pos, origin); IMB_freeImBuf(ibuf); } - patch_new= get_search_floatbuf(ibuf_new, track, marker, &width, &height, pos, origin); + patch_new = get_search_floatbuf(ibuf_new, track, marker, &width, &height, pos, origin); - x1= track_context->keyframed_pos[0]; - y1= track_context->keyframed_pos[1]; + x1 = track_context->keyframed_pos[0]; + y1 = track_context->keyframed_pos[1]; - x2= pos[0]; - y2= pos[1]; + x2 = pos[0]; + y2 = pos[1]; - tracked= libmv_regionTrackerTrack(track_context->region_tracker, track_context->patch, patch_new, + tracked = libmv_regionTrackerTrack(track_context->region_tracker, track_context->patch, patch_new, width, height, x1, y1, &x2, &y2); MEM_freeN(patch_new); } - else if (track->tracker==TRACKER_SAD) { + else if (track->tracker == TRACKER_SAD) { unsigned char *image_new; float correlation; - float warp[3][2]={{0}}; + float warp[3][2] = {{0}}; if (need_readjust) { unsigned char *image; /* calculate pattern for keyframed position */ - ibuf= get_adjust_ibuf(context, track, marker, curfra, &marker_keyed); + ibuf = get_adjust_ibuf(context, track, marker, curfra, &marker_keyed); - image= get_search_bytebuf(ibuf, track, marker_keyed, &width, &height, pos, origin); + image = get_search_bytebuf(ibuf, track, marker_keyed, &width, &height, pos, origin); memset(warp, 0, sizeof(warp)); - warp[0][0]= 1; - warp[1][1]= 1; - warp[2][0]= pos[0]; - warp[2][1]= pos[1]; + warp[0][0] = 1; + warp[1][1] = 1; + warp[2][0] = pos[0]; + warp[2][1] = pos[1]; if (!track_context->pattern) { - int square= track_context->pattern_size*track_context->pattern_size; - track_context->pattern= MEM_callocN(sizeof(unsigned char)*square, "trackking pattern"); + int square = track_context->pattern_size*track_context->pattern_size; + + track_context->pattern = MEM_callocN(sizeof(unsigned char) * square, "trackking pattern"); } libmv_SADSamplePattern(image, width, warp, track_context->pattern, track_context->pattern_size); @@ -1479,37 +1524,39 @@ int BKE_tracking_next(MovieTrackingContext *context) IMB_freeImBuf(ibuf); } - image_new= get_search_bytebuf(ibuf_new, track, marker, &width, &height, pos, origin); + image_new = get_search_bytebuf(ibuf_new, track, marker, &width, &height, pos, origin); - if (track_context->warped==NULL) { + if (track_context->warped == NULL) { unsigned char *image_old; - ibuf= get_frame_ibuf(context, curfra); + ibuf = get_frame_ibuf(context, curfra); - if (track_context->warped==NULL) { - int square= track_context->pattern_size*track_context->pattern_size; - track_context->warped= MEM_callocN(sizeof(unsigned char)*square, "trackking warped"); + if (track_context->warped == NULL) { + int square = track_context->pattern_size * track_context->pattern_size; + + track_context->warped = MEM_callocN(sizeof(unsigned char)*square, "trackking warped"); } - image_old= get_search_bytebuf(ibuf, track, marker, &width, &height, pos, origin); + image_old = get_search_bytebuf(ibuf, track, marker, &width, &height, pos, origin); get_warped(track_context, pos[0], pos[1], width, image_old); IMB_freeImBuf(ibuf); MEM_freeN(image_old); } memset(warp, 0, sizeof(warp)); - warp[0][0]= 1; - warp[1][1]= 1; - warp[2][0]= pos[0]; - warp[2][1]= pos[1]; + warp[0][0] = 1; + warp[1][1] = 1; + warp[2][0] = pos[0]; + warp[2][1] = pos[1]; - correlation= libmv_SADTrackerTrack(track_context->pattern, track_context->warped, - track_context->pattern_size, image_new, width, width, height, warp); + correlation = libmv_SADTrackerTrack(track_context->pattern, track_context->warped, + track_context->pattern_size, image_new, + width, width, height, warp); - x2= warp[2][0]; - y2= warp[2][1]; + x2 = warp[2][0]; + y2 = warp[2][1]; - tracked= track->minimum_correlation < correlation; + tracked = track->minimum_correlation < correlation; if (tracked) get_warped(track_context, x2, y2, width, image_new); @@ -1530,14 +1577,14 @@ int BKE_tracking_next(MovieTrackingContext *context) memset(&marker_new, 0, sizeof(marker_new)); if (!onbound) { - marker_new.pos[0]= (origin[0]+x2)/ibuf_new->x; - marker_new.pos[1]= (origin[1]+y2)/ibuf_new->y; + marker_new.pos[0] = (origin[0] + x2) / ibuf_new->x; + marker_new.pos[1] = (origin[1] + y2) / ibuf_new->y; } else { copy_v2_v2(marker_new.pos, marker->pos); } - marker_new.flag|= MARKER_TRACKED; + marker_new.flag |= MARKER_TRACKED; marker_new.framenr= nextfra; #pragma omp critical @@ -1552,10 +1599,10 @@ int BKE_tracking_next(MovieTrackingContext *context) } } else { - marker_new= *marker; + marker_new = *marker; - marker_new.framenr= nextfra; - marker_new.flag|= MARKER_DISABLED; + marker_new.framenr = nextfra; + marker_new.flag |= MARKER_DISABLED; #pragma omp critical { @@ -1563,14 +1610,14 @@ int BKE_tracking_next(MovieTrackingContext *context) } } - ok= 1; + ok = TRUE; #endif } } IMB_freeImBuf(ibuf_new); - context->first_time= 0; + context->first_time = FALSE; context->frames++; return ok; @@ -1611,23 +1658,24 @@ typedef struct ReconstructProgressData { #if WITH_LIBMV static struct libmv_Tracks *create_libmv_tracks(ListBase *tracksbase, int width, int height) { - int tracknr= 0; + int tracknr = 0; MovieTrackingTrack *track; - struct libmv_Tracks *tracks= libmv_tracksNew(); + struct libmv_Tracks *tracks = libmv_tracksNew(); - track= tracksbase->first; + track = tracksbase->first; while (track) { - int a= 0; + int a = 0; - for (a= 0; amarkersnr; a++) { - MovieTrackingMarker *marker= &track->markers[a]; + for (a = 0; a < track->markersnr; a++) { + MovieTrackingMarker *marker = &track->markers[a]; - if ((marker->flag&MARKER_DISABLED)==0) + if ((marker->flag & MARKER_DISABLED) == 0) { libmv_tracksInsert(tracks, marker->framenr, tracknr, - marker->pos[0]*width, marker->pos[1]*height); + marker->pos[0] * width, marker->pos[1] * height); + } } - track= track->next; + track = track->next; tracknr++; } @@ -1636,124 +1684,123 @@ static struct libmv_Tracks *create_libmv_tracks(ListBase *tracksbase, int width, static void retrieve_libmv_reconstruct_intrinscis(MovieReconstructContext *context, MovieTracking *tracking) { - struct libmv_Reconstruction *libmv_reconstruction= context->reconstruction; + struct libmv_Reconstruction *libmv_reconstruction = context->reconstruction; struct libmv_CameraIntrinsics *libmv_intrinsics = libmv_ReconstructionExtractIntrinsics(libmv_reconstruction); - float aspy= 1.0f/tracking->camera.pixel_aspect; + float aspy = 1.0f / tracking->camera.pixel_aspect; double focal_length, principal_x, principal_y, k1, k2, k3; int width, height; libmv_CameraIntrinsicsExtract(libmv_intrinsics, &focal_length, &principal_x, &principal_y, - &k1, &k2, &k3, &width, &height); + &k1, &k2, &k3, &width, &height); - tracking->camera.focal= focal_length; - tracking->camera.principal[0]= principal_x; + tracking->camera.focal = focal_length; + tracking->camera.principal[0] = principal_x; - /* todo: verify divide by aspy is correct */ - tracking->camera.principal[1]= principal_y / aspy; - tracking->camera.k1= k1; - tracking->camera.k2= k2; + tracking->camera.principal[1] = principal_y / aspy; + tracking->camera.k1 = k1; + tracking->camera.k2 = k2; } static int retrieve_libmv_reconstruct_tracks(MovieReconstructContext *context, MovieTracking *tracking) { - struct libmv_Reconstruction *libmv_reconstruction= context->reconstruction; - MovieTrackingReconstruction *reconstruction= NULL; + struct libmv_Reconstruction *libmv_reconstruction = context->reconstruction; + MovieTrackingReconstruction *reconstruction = NULL; MovieReconstructedCamera *reconstructed; MovieTrackingTrack *track; - ListBase *tracksbase= NULL; - int ok= 1, tracknr= 0, a, origin_set= 0; - int sfra= context->sfra, efra= context->efra; + ListBase *tracksbase = NULL; + int ok = TRUE, tracknr = 0, a, origin_set = FALSE; + int sfra = context->sfra, efra = context->efra; float imat[4][4]; if (context->is_camera) { - tracksbase= &tracking->tracks; - reconstruction= &tracking->reconstruction; + tracksbase = &tracking->tracks; + reconstruction = &tracking->reconstruction; } else { - MovieTrackingObject *object= BKE_tracking_named_object(tracking, context->object_name); + MovieTrackingObject *object = BKE_tracking_named_object(tracking, context->object_name); - tracksbase= &object->tracks; - reconstruction= &object->reconstruction; + tracksbase = &object->tracks; + reconstruction = &object->reconstruction; } unit_m4(imat); - track= tracksbase->first; + track = tracksbase->first; while (track) { double pos[3]; if (libmv_reporojectionPointForTrack(libmv_reconstruction, tracknr, pos)) { - track->bundle_pos[0]= pos[0]; - track->bundle_pos[1]= pos[1]; - track->bundle_pos[2]= pos[2]; + track->bundle_pos[0] = pos[0]; + track->bundle_pos[1] = pos[1]; + track->bundle_pos[2] = pos[2]; - track->flag|= TRACK_HAS_BUNDLE; - track->error= libmv_reporojectionErrorForTrack(libmv_reconstruction, tracknr); + track->flag |= TRACK_HAS_BUNDLE; + track->error = libmv_reporojectionErrorForTrack(libmv_reconstruction, tracknr); } else { - track->flag&= ~TRACK_HAS_BUNDLE; - ok= 0; + track->flag &= ~TRACK_HAS_BUNDLE; + ok = FALSE; printf("No bundle for track #%d '%s'\n", tracknr, track->name); } - track= track->next; + track = track->next; tracknr++; } if (reconstruction->cameras) MEM_freeN(reconstruction->cameras); - reconstruction->camnr= 0; - reconstruction->cameras= NULL; - reconstructed= MEM_callocN((efra-sfra+1)*sizeof(MovieReconstructedCamera), "temp reconstructed camera"); + reconstruction->camnr = 0; + reconstruction->cameras = NULL; + reconstructed = MEM_callocN((efra-sfra+1)*sizeof(MovieReconstructedCamera), "temp reconstructed camera"); - for (a= sfra; a<=efra; a++) { + for (a = sfra; a <= efra; a++) { double matd[4][4]; if (libmv_reporojectionCameraForImage(libmv_reconstruction, a, matd)) { int i, j; float mat[4][4]; - float error= libmv_reporojectionErrorForImage(libmv_reconstruction, a); + float error = libmv_reporojectionErrorForImage(libmv_reconstruction, a); - for (i=0; i<4; i++) - for (j= 0; j<4; j++) - mat[i][j]= matd[i][j]; + for (i = 0; i < 4; i++) + for (j = 0; j < 4; j++) + mat[i][j] = matd[i][j]; if (!origin_set) { copy_m4_m4(imat, mat); invert_m4(imat); - origin_set= 1; + origin_set = TRUE; } if (origin_set) mult_m4_m4m4(mat, imat, mat); copy_m4_m4(reconstructed[reconstruction->camnr].mat, mat); - reconstructed[reconstruction->camnr].framenr= a; - reconstructed[reconstruction->camnr].error= error; + reconstructed[reconstruction->camnr].framenr = a; + reconstructed[reconstruction->camnr].error = error; reconstruction->camnr++; } else { - ok= 0; + ok = FALSE; printf("No camera for frame %d\n", a); } } if (reconstruction->camnr) { - reconstruction->cameras= MEM_callocN(reconstruction->camnr*sizeof(MovieReconstructedCamera), "reconstructed camera"); - memcpy(reconstruction->cameras, reconstructed, reconstruction->camnr*sizeof(MovieReconstructedCamera)); + reconstruction->cameras = MEM_callocN(reconstruction->camnr * sizeof(MovieReconstructedCamera), "reconstructed camera"); + memcpy(reconstruction->cameras, reconstructed, reconstruction->camnr * sizeof(MovieReconstructedCamera)); } if (origin_set) { - track= tracksbase->first; + track = tracksbase->first; while (track) { - if (track->flag&TRACK_HAS_BUNDLE) + if (track->flag & TRACK_HAS_BUNDLE) mul_v3_m4v3(track->bundle_pos, imat, track->bundle_pos); - track= track->next; + track = track->next; } } @@ -1772,40 +1819,40 @@ static int retrieve_libmv_reconstruct(MovieReconstructContext *context, MovieTra static int get_refine_intrinsics_flags(MovieTracking *tracking, MovieTrackingObject *object) { - int refine= tracking->settings.refine_camera_intrinsics; - int flags= 0; + int refine = tracking->settings.refine_camera_intrinsics; + int flags = 0; - if ((object->flag&TRACKING_OBJECT_CAMERA)==0) + if ((object->flag & TRACKING_OBJECT_CAMERA) == 0) return 0; - if (refine&REFINE_FOCAL_LENGTH) - flags|= LIBMV_REFINE_FOCAL_LENGTH; + if (refine & REFINE_FOCAL_LENGTH) + flags |= LIBMV_REFINE_FOCAL_LENGTH; - if (refine&REFINE_PRINCIPAL_POINT) - flags|= LIBMV_REFINE_PRINCIPAL_POINT; + if (refine & REFINE_PRINCIPAL_POINT) + flags |= LIBMV_REFINE_PRINCIPAL_POINT; - if (refine&REFINE_RADIAL_DISTORTION_K1) - flags|= REFINE_RADIAL_DISTORTION_K1; + if (refine & REFINE_RADIAL_DISTORTION_K1) + flags |= REFINE_RADIAL_DISTORTION_K1; - if (refine&REFINE_RADIAL_DISTORTION_K2) - flags|= REFINE_RADIAL_DISTORTION_K2; + if (refine & REFINE_RADIAL_DISTORTION_K2) + flags |= REFINE_RADIAL_DISTORTION_K2; return flags; } static int count_tracks_on_both_keyframes(MovieTracking *tracking, ListBase *tracksbase) { - int tot= 0; - int frame1= tracking->settings.keyframe1, frame2= tracking->settings.keyframe2; + int tot = 0; + int frame1 = tracking->settings.keyframe1, frame2= tracking->settings.keyframe2; MovieTrackingTrack *track; - track= tracksbase->first; + track = tracksbase->first; while (track) { if (BKE_tracking_has_enabled_marker(track, frame1)) if (BKE_tracking_has_enabled_marker(track, frame2)) tot++; - track= track->next; + track = track->next; } return tot; @@ -1815,76 +1862,78 @@ static int count_tracks_on_both_keyframes(MovieTracking *tracking, ListBase *tra int BKE_tracking_can_reconstruct(MovieTracking *tracking, MovieTrackingObject *object, char *error_msg, int error_size) { #if WITH_LIBMV - ListBase *tracksbase= BKE_tracking_object_tracks(tracking, object); + ListBase *tracksbase = BKE_tracking_object_tracks(tracking, object); if (count_tracks_on_both_keyframes(tracking, tracksbase)<8) { BLI_strncpy(error_msg, "At least 8 common tracks on both of keyframes are needed for reconstruction", error_size); - return 0; + + return FALSE; } - return 1; + return TRUE; #else BLI_strncpy(error_msg, "Blender is compiled without motion tracking library", error_size); - (void)tracking; - (void)object; + + (void) tracking; + (void) object; return 0; #endif } -MovieReconstructContext* BKE_tracking_reconstruction_context_new(MovieTracking *tracking, - MovieTrackingObject *object, int keyframe1, int keyframe2, int width, int height) +MovieReconstructContext* BKE_tracking_reconstruction_context_new(MovieTracking *tracking, MovieTrackingObject *object, + int keyframe1, int keyframe2, int width, int height) { - MovieReconstructContext *context= MEM_callocN(sizeof(MovieReconstructContext), "MovieReconstructContext data"); - MovieTrackingCamera *camera= &tracking->camera; - ListBase *tracksbase= BKE_tracking_object_tracks(tracking, object); - float aspy= 1.0f/tracking->camera.pixel_aspect; - int num_tracks= BLI_countlist(tracksbase); - int sfra= INT_MAX, efra= INT_MIN; + MovieReconstructContext *context = MEM_callocN(sizeof(MovieReconstructContext), "MovieReconstructContext data"); + MovieTrackingCamera *camera = &tracking->camera; + ListBase *tracksbase = BKE_tracking_object_tracks(tracking, object); + float aspy = 1.0f / tracking->camera.pixel_aspect; + int num_tracks = BLI_countlist(tracksbase); + int sfra = INT_MAX, efra = INT_MIN; MovieTrackingTrack *track; BLI_strncpy(context->object_name, object->name, sizeof(context->object_name)); context->is_camera = object->flag&TRACKING_OBJECT_CAMERA; - context->tracks_map= tracks_map_new(context->object_name, context->is_camera, num_tracks, 0); + context->tracks_map = tracks_map_new(context->object_name, context->is_camera, num_tracks, 0); - track= tracksbase->first; + track = tracksbase->first; while (track) { - int first= 0, last= track->markersnr-1; - MovieTrackingMarker *first_marker= &track->markers[0]; - MovieTrackingMarker *last_marker= &track->markers[track->markersnr-1]; + int first = 0, last = track->markersnr-1; + MovieTrackingMarker *first_marker = &track->markers[0]; + MovieTrackingMarker *last_marker = &track->markers[track->markersnr - 1]; /* find first not-disabled marker */ - while (first<=track->markersnr-1 && first_marker->flag&MARKER_DISABLED) { + while (first <= track->markersnr - 1 && first_marker->flag & MARKER_DISABLED) { first++; first_marker++; } /* find last not-disabled marker */ - while (last>=0 && last_marker->flag&MARKER_DISABLED) { + while (last >= 0 && last_marker->flag & MARKER_DISABLED) { last--; last_marker--; } - if (firstmarkersnr-1) - sfra= MIN2(sfra, first_marker->framenr); + if (firstmarkersnr - 1) + sfra = MIN2(sfra, first_marker->framenr); - if (last>=0) - efra= MAX2(efra, last_marker->framenr); + if (last >= 0) + efra = MAX2(efra, last_marker->framenr); tracks_map_insert(context->tracks_map, track, NULL); - track= track->next; + track = track->next; } - context->sfra= sfra; - context->efra= efra; + context->sfra = sfra; + context->efra = efra; #ifdef WITH_LIBMV - context->tracks= create_libmv_tracks(tracksbase, width, height*aspy); - context->keyframe1= keyframe1; - context->keyframe2= keyframe2; - context->refine_flags= get_refine_intrinsics_flags(tracking, object); + context->tracks = create_libmv_tracks(tracksbase, width, height*aspy); + context->keyframe1 = keyframe1; + context->keyframe2 = keyframe2; + context->refine_flags = get_refine_intrinsics_flags(tracking, object); #else (void) width; (void) height; @@ -1892,13 +1941,13 @@ MovieReconstructContext* BKE_tracking_reconstruction_context_new(MovieTracking * (void) keyframe2; #endif - context->focal_length= camera->focal; - context->principal_point[0]= camera->principal[0]; - context->principal_point[1]= camera->principal[1]*aspy; + context->focal_length = camera->focal; + context->principal_point[0] = camera->principal[0]; + context->principal_point[1] = camera->principal[1] * aspy; - context->k1= camera->k1; - context->k2= camera->k2; - context->k3= camera->k3; + context->k1 = camera->k1; + context->k2 = camera->k2; + context->k3 = camera->k3; return context; } @@ -1923,40 +1972,39 @@ static void solve_reconstruction_update_cb(void *customdata, double progress, co ReconstructProgressData *progressdata= customdata; if (progressdata->progress) { - *progressdata->progress= progress; - *progressdata->do_update= 1; + *progressdata->progress = progress; + *progressdata->do_update = TRUE; } - BLI_snprintf(progressdata->stats_message, progressdata->message_size, - "Solving camera | %s", message); + BLI_snprintf(progressdata->stats_message, progressdata->message_size, "Solving camera | %s", message); } #endif #if 0 static int solve_reconstruction_testbreak_cb(void *customdata) { - ReconstructProgressData *progressdata= customdata; + ReconstructProgressData *progressdata = customdata; if (progressdata->stop && *progressdata->stop) - return 1; + return TRUE; return G.afbreek; } #endif -void BKE_tracking_solve_reconstruction(MovieReconstructContext *context, short *stop, - short *do_update, float *progress, char *stats_message, int message_size) +void BKE_tracking_solve_reconstruction(MovieReconstructContext *context, short *stop, short *do_update, + float *progress, char *stats_message, int message_size) { #ifdef WITH_LIBMV float error; ReconstructProgressData progressdata; - progressdata.stop= stop; - progressdata.do_update= do_update; - progressdata.progress= progress; - progressdata.stats_message= stats_message; - progressdata.message_size= message_size; + progressdata.stop = stop; + progressdata.do_update = do_update; + progressdata.progress = progress; + progressdata.stats_message = stats_message; + progressdata.message_size = message_size; context->reconstruction = libmv_solveReconstruction(context->tracks, context->keyframe1, context->keyframe2, @@ -1966,9 +2014,9 @@ void BKE_tracking_solve_reconstruction(MovieReconstructContext *context, short * context->k1, context->k2, context->k3, solve_reconstruction_update_cb, &progressdata); - error= libmv_reprojectionError(context->reconstruction); + error = libmv_reprojectionError(context->reconstruction); - context->reprojection_error= error; + context->reprojection_error = error; #else (void) context; (void) stop; @@ -1986,24 +2034,24 @@ int BKE_tracking_finish_reconstruction(MovieReconstructContext *context, MovieTr tracks_map_merge(context->tracks_map, tracking); if (context->is_camera) { - reconstruction= &tracking->reconstruction; + reconstruction = &tracking->reconstruction; } else { MovieTrackingObject *object; - object= BKE_tracking_named_object(tracking, context->object_name); - reconstruction= &object->reconstruction; + object = BKE_tracking_named_object(tracking, context->object_name); + reconstruction = &object->reconstruction; } - reconstruction->error= context->reprojection_error; - reconstruction->flag|= TRACKING_RECONSTRUCTED; + reconstruction->error = context->reprojection_error; + reconstruction->flag |= TRACKING_RECONSTRUCTED; #ifdef WITH_LIBMV if (!retrieve_libmv_reconstruct(context, tracking)) - return 0; + return FALSE; #endif - return 1; + return TRUE; } void BKE_track_unique_name(ListBase *tracksbase, MovieTrackingTrack *track) @@ -2013,14 +2061,14 @@ void BKE_track_unique_name(ListBase *tracksbase, MovieTrackingTrack *track) MovieTrackingTrack *BKE_tracking_named_track(MovieTracking *tracking, MovieTrackingObject *object, const char *name) { - ListBase *tracksbase= BKE_tracking_object_tracks(tracking, object); - MovieTrackingTrack *track= tracksbase->first; + ListBase *tracksbase = BKE_tracking_object_tracks(tracking, object); + MovieTrackingTrack *track = tracksbase->first; while (track) { if (!strcmp(track->name, name)) return track; - track= track->next; + track = track->next; } return NULL; @@ -2029,51 +2077,59 @@ MovieTrackingTrack *BKE_tracking_named_track(MovieTracking *tracking, MovieTrack static int reconstruction_camera_index(MovieTrackingReconstruction *reconstruction, int framenr, int nearest) { MovieReconstructedCamera *cameras= reconstruction->cameras; - int a= 0, d= 1; + int a = 0, d = 1; if (!reconstruction->camnr) return -1; if (framenrcameras[reconstruction->camnr-1].framenr) { - if (nearest) return reconstruction->camnr-1; - else return -1; + if (framenr>cameras[reconstruction->camnr - 1].framenr) { + if (nearest) + return reconstruction->camnr - 1; + else + return -1; } if (reconstruction->last_cameracamnr) - a= reconstruction->last_camera; + a = reconstruction->last_camera; - if (cameras[a].framenr>=framenr) - d= -1; + if (cameras[a].framenr >= framenr) + d = -1; - while (a>=0 && acamnr) { - int cfra= cameras[a].framenr; + while (a >= 0 && a < reconstruction->camnr) { + int cfra = cameras[a].framenr; /* check if needed framenr was "skipped" -- no data for requested frame */ - if (d>0 && cfra>framenr) { + if (d > 0 && cfra > framenr) { /* interpolate with previous position */ - if (nearest) return a-1; - else break; + if (nearest) + return a - 1; + else + break; } - if (d<0 && cfralast_camera= a; + if (cfra == framenr) { + reconstruction->last_camera = a; return a; } - a+= d; + a += d; } return -1; @@ -2081,47 +2137,48 @@ static int reconstruction_camera_index(MovieTrackingReconstruction *reconstructi static void scale_reconstructed_camera(MovieTrackingObject *object, float mat[4][4]) { - if ((object->flag&TRACKING_OBJECT_CAMERA)==0) { + if ((object->flag & TRACKING_OBJECT_CAMERA) == 0) { float smat[4][4]; - scale_m4_fl(smat, 1.0f/object->scale); + scale_m4_fl(smat, 1.0f / object->scale); mult_m4_m4m4(mat, mat, smat); } } MovieReconstructedCamera *BKE_tracking_get_reconstructed_camera(MovieTracking *tracking, - MovieTrackingObject *object, int framenr) + MovieTrackingObject *object, int framenr) { MovieTrackingReconstruction *reconstruction; int a; - reconstruction= BKE_tracking_object_reconstruction(tracking, object); - a= reconstruction_camera_index(reconstruction, framenr, 0); + reconstruction = BKE_tracking_object_reconstruction(tracking, object); + a = reconstruction_camera_index(reconstruction, framenr, FALSE); - if (a==-1) + if (a ==-1) return NULL; return &reconstruction->cameras[a]; } void BKE_tracking_get_interpolated_camera(MovieTracking *tracking, MovieTrackingObject *object, - int framenr, float mat[4][4]) + int framenr, float mat[4][4]) { MovieTrackingReconstruction *reconstruction; MovieReconstructedCamera *cameras; int a; - reconstruction= BKE_tracking_object_reconstruction(tracking, object); - cameras= reconstruction->cameras; - a= reconstruction_camera_index(reconstruction, framenr, 1); + reconstruction = BKE_tracking_object_reconstruction(tracking, object); + cameras = reconstruction->cameras; + a = reconstruction_camera_index(reconstruction, framenr, 1); - if (a==-1) { + if (a == -1) { unit_m4(mat); + return; } - if (cameras[a].framenr!=framenr && a>0 && acamnr-1) { - float t= ((float)framenr-cameras[a].framenr) / (cameras[a+1].framenr-cameras[a].framenr); + if (cameras[a].framenr != framenr && a > 0 && a < reconstruction->camnr - 1) { + float t = ((float)framenr-cameras[a].framenr) / (cameras[a + 1].framenr-cameras[a].framenr); blend_m4_m4m4(mat, cameras[a].mat, cameras[a+1].mat, t); } @@ -2135,8 +2192,10 @@ void BKE_tracking_get_interpolated_camera(MovieTracking *tracking, MovieTracking void BKE_get_tracking_mat(Scene *scene, Object *ob, float mat[4][4]) { if (!ob) { - if (scene->camera) ob= scene->camera; - else ob= scene_find_camera(scene); + if (scene->camera) + ob = scene->camera; + else + ob = scene_find_camera(scene); } if (ob) @@ -2147,53 +2206,54 @@ void BKE_get_tracking_mat(Scene *scene, Object *ob, float mat[4][4]) void BKE_tracking_camera_shift(MovieTracking *tracking, int winx, int winy, float *shiftx, float *shifty) { - *shiftx= (0.5f*winx-tracking->camera.principal[0]) / winx; - *shifty= (0.5f*winy-tracking->camera.principal[1]) / winx; + /* indeed in both of cases it should be winx -- it's just how camera shift works for blender's camera */ + *shiftx = (0.5f * winx-tracking->camera.principal[0]) / winx; + *shifty = (0.5f * winy-tracking->camera.principal[1]) / winx; } void BKE_tracking_camera_to_blender(MovieTracking *tracking, Scene *scene, Camera *camera, int width, int height) { - float focal= tracking->camera.focal; + float focal = tracking->camera.focal; - camera->sensor_x= tracking->camera.sensor_width; - camera->sensor_fit= CAMERA_SENSOR_FIT_AUTO; - camera->lens= focal*camera->sensor_x/width; + camera->sensor_x = tracking->camera.sensor_width; + camera->sensor_fit = CAMERA_SENSOR_FIT_AUTO; + camera->lens = focal*camera->sensor_x/width; - scene->r.xsch= width*tracking->camera.pixel_aspect; - scene->r.ysch= height; + scene->r.xsch = width*tracking->camera.pixel_aspect; + scene->r.ysch = height; - scene->r.xasp= 1.0f; - scene->r.yasp= 1.0f; + scene->r.xasp = 1.0f; + scene->r.yasp = 1.0f; BKE_tracking_camera_shift(tracking, width, height, &camera->shiftx, &camera->shifty); } void BKE_tracking_projection_matrix(MovieTracking *tracking, MovieTrackingObject *object, - int framenr, int winx, int winy, float mat[4][4]) + int framenr, int winx, int winy, float mat[4][4]) { MovieReconstructedCamera *camera; - float lens= tracking->camera.focal*tracking->camera.sensor_width/(float)winx; + float lens = tracking->camera.focal*tracking->camera.sensor_width/(float)winx; float viewfac, pixsize, left, right, bottom, top, clipsta, clipend; float winmat[4][4]; - float ycor= 1.0f/tracking->camera.pixel_aspect; - float shiftx, shifty, winside= MAX2(winx, winy); + float ycor = 1.0f / tracking->camera.pixel_aspect; + float shiftx, shifty, winside = MAX2(winx, winy); BKE_tracking_camera_shift(tracking, winx, winy, &shiftx, &shifty); - clipsta= 0.1f; - clipend= 1000.0f; + clipsta = 0.1f; + clipend = 1000.0f; if (winx >= winy) - viewfac= (lens*winx)/tracking->camera.sensor_width; + viewfac = (lens*winx)/tracking->camera.sensor_width; else - viewfac= (ycor*lens*winy)/tracking->camera.sensor_width; + viewfac = (ycor*lens*winy)/tracking->camera.sensor_width; - pixsize= clipsta/viewfac; + pixsize = clipsta/viewfac; - left= -0.5f*(float)winx + shiftx*winside; - bottom= -0.5f*(ycor)*(float)winy + shifty*winside; - right= 0.5f*(float)winx + shiftx*winside; - top= 0.5f*(ycor)*(float)winy + shifty*winside; + left = -0.5f * (float)winx + shiftx * winside; + bottom = -0.5f * (ycor) * (float)winy + shifty * winside; + right = 0.5f * (float)winx + shiftx * winside; + top = 0.5f * (ycor) * (float)winy + shifty * winside; left *= pixsize; right *= pixsize; @@ -2202,7 +2262,7 @@ void BKE_tracking_projection_matrix(MovieTracking *tracking, MovieTrackingObject perspective_m4(winmat, left, right, bottom, top, clipsta, clipend); - camera= BKE_tracking_get_reconstructed_camera(tracking, object, framenr); + camera = BKE_tracking_get_reconstructed_camera(tracking, object, framenr); if (camera) { float imat[4][4]; @@ -2215,7 +2275,7 @@ void BKE_tracking_projection_matrix(MovieTracking *tracking, MovieTrackingObject ListBase *BKE_tracking_get_tracks(MovieTracking *tracking) { - MovieTrackingObject *object= BKE_tracking_active_object(tracking); + MovieTrackingObject *object = BKE_tracking_active_object(tracking); if (object && (object->flag & TRACKING_OBJECT_CAMERA) == 0) { return &object->tracks; @@ -2231,7 +2291,7 @@ MovieTrackingTrack *BKE_tracking_active_track(MovieTracking *tracking) if (!tracking->act_track) return NULL; - tracksbase= BKE_tracking_get_tracks(tracking); + tracksbase = BKE_tracking_get_tracks(tracking); /* check that active track is in current tracks list */ if (BLI_findindex(tracksbase, tracking->act_track) >= 0) @@ -2247,7 +2307,7 @@ MovieTrackingObject *BKE_tracking_active_object(MovieTracking *tracking) MovieTrackingObject *BKE_tracking_get_camera_object(MovieTracking *tracking) { - MovieTrackingObject *object= tracking->objects.first; + MovieTrackingObject *object = tracking->objects.first; while (object) { if (object->flag & TRACKING_OBJECT_CAMERA) @@ -2279,7 +2339,7 @@ MovieTrackingReconstruction *BKE_tracking_object_reconstruction(MovieTracking *t MovieTrackingReconstruction *BKE_tracking_get_reconstruction(MovieTracking *tracking) { - MovieTrackingObject *object= BKE_tracking_active_object(tracking); + MovieTrackingObject *object = BKE_tracking_active_object(tracking); return BKE_tracking_object_reconstruction(tracking, object); } @@ -2290,42 +2350,42 @@ void BKE_tracking_apply_intrinsics(MovieTracking *tracking, float co[2], float n #ifdef WITH_LIBMV double x, y; - float aspy= 1.0f/tracking->camera.pixel_aspect; + float aspy = 1.0f/tracking->camera.pixel_aspect; /* normalize coords */ - x= (co[0]-camera->principal[0]) / camera->focal; - y= (co[1]-camera->principal[1] * aspy) / camera->focal; + x = (co[0] - camera->principal[0]) / camera->focal; + y = (co[1] - camera->principal[1] * aspy) / camera->focal; libmv_applyCameraIntrinsics(camera->focal, camera->principal[0], camera->principal[1] * aspy, - camera->k1, camera->k2, camera->k3, x, y, &x, &y); + camera->k1, camera->k2, camera->k3, x, y, &x, &y); /* result is in image coords already */ - nco[0]= x; - nco[1]= y; + nco[0] = x; + nco[1] = y; #else - (void)camera; - (void)co; - (void)nco; + (void) camera; + (void) co; + (void) nco; #endif } void BKE_tracking_invert_intrinsics(MovieTracking *tracking, float co[2], float nco[2]) { - MovieTrackingCamera *camera= &tracking->camera; + MovieTrackingCamera *camera = &tracking->camera; #ifdef WITH_LIBMV - double x= co[0], y= co[1]; - float aspy= 1.0f/tracking->camera.pixel_aspect; + double x = co[0], y = co[1]; + float aspy = 1.0f / tracking->camera.pixel_aspect; libmv_InvertIntrinsics(camera->focal, camera->principal[0], camera->principal[1] * aspy, - camera->k1, camera->k2, camera->k3, x, y, &x, &y); + camera->k1, camera->k2, camera->k3, x, y, &x, &y); - nco[0]= x * camera->focal + camera->principal[0]; - nco[1]= y * camera->focal + camera->principal[1] * aspy; + nco[0] = x * camera->focal + camera->principal[0]; + nco[1] = y * camera->focal + camera->principal[1] * aspy; #else - (void)camera; - (void)co; - (void)nco; + (void) camera; + (void) co; + (void) nco; #endif } @@ -2333,125 +2393,126 @@ void BKE_tracking_invert_intrinsics(MovieTracking *tracking, float co[2], float static int point_in_stroke(bGPDstroke *stroke, float x, float y) { int i, prev; - int count= 0; - bGPDspoint *points= stroke->points; + int count = 0; + bGPDspoint *points = stroke->points; - prev= stroke->totpoints-1; + prev = stroke->totpoints - 1; - for (i= 0; itotpoints; i++) { - if ((points[i].y=y) || (points[prev].y=y)) { - float fac= (y-points[i].y)/(points[prev].y-points[i].y); + for (i = 0; itotpoints; i++) { + if ((points[i].y < y && points[prev].y >= y) || (points[prev].y < y && points[i].y >= y)) { + float fac = (y - points[i].y) / (points[prev].y - points[i].y); - if (points[i].x+fac*(points[prev].x-points[i].x)frames.first; + bGPDframe *frame = layer->frames.first; while (frame) { - bGPDstroke *stroke= frame->strokes.first; + bGPDstroke *stroke = frame->strokes.first; + while (stroke) { if (point_in_stroke(stroke, x, y)) - return 1; + return TRUE; - stroke= stroke->next; + stroke = stroke->next; } - frame= frame->next; + frame = frame->next; } - return 0; + return FALSE; } static void retrieve_libmv_features(MovieTracking *tracking, ListBase *tracksbase, - struct libmv_Features *features, int framenr, int width, int height, - bGPDlayer *layer, int place_outside_layer) + struct libmv_Features *features, int framenr, int width, int height, + bGPDlayer *layer, int place_outside_layer) { int a; - a= libmv_countFeatures(features); + a = libmv_countFeatures(features); while (a--) { MovieTrackingTrack *track; double x, y, size, score; - int ok= 1; + int ok = TRUE; float xu, yu; libmv_getFeature(features, a, &x, &y, &score, &size); - xu= x/width; - yu= y/height; + xu = x / width; + yu = y / height; if (layer) - ok= point_in_layer(layer, xu, yu)!=place_outside_layer; + ok = point_in_layer(layer, xu, yu) != place_outside_layer; if (ok) { - track= BKE_tracking_add_track(tracking, tracksbase, xu, yu, framenr, width, height); - track->flag|= SELECT; - track->pat_flag|= SELECT; - track->search_flag|= SELECT; + track = BKE_tracking_add_track(tracking, tracksbase, xu, yu, framenr, width, height); + track->flag |= SELECT; + track->pat_flag |= SELECT; + track->search_flag |= SELECT; } } } #endif void BKE_tracking_detect_fast(MovieTracking *tracking, ListBase *tracksbase, ImBuf *ibuf, - int framenr, int margin, int min_trackness, int min_distance, bGPDlayer *layer, - int place_outside_layer) + int framenr, int margin, int min_trackness, int min_distance, bGPDlayer *layer, + int place_outside_layer) { #ifdef WITH_LIBMV struct libmv_Features *features; - unsigned char *pixels= get_ucharbuf(ibuf); + unsigned char *pixels = get_ucharbuf(ibuf); - features= libmv_detectFeaturesFAST(pixels, ibuf->x, ibuf->y, ibuf->x, - margin, min_trackness, min_distance); + features = libmv_detectFeaturesFAST(pixels, ibuf->x, ibuf->y, ibuf->x, + margin, min_trackness, min_distance); MEM_freeN(pixels); retrieve_libmv_features(tracking, tracksbase, features, framenr, - ibuf->x, ibuf->y, layer, place_outside_layer); + ibuf->x, ibuf->y, layer, place_outside_layer); libmv_destroyFeatures(features); #else - (void)tracking; - (void)tracksbase; - (void)ibuf; - (void)framenr; - (void)margin; - (void)min_trackness; - (void)min_distance; - (void)layer; - (void)place_outside_layer; + (void) tracking; + (void) tracksbase; + (void) ibuf; + (void) framenr; + (void) margin; + (void) min_trackness; + (void) min_distance; + (void) layer; + (void) place_outside_layer; #endif } MovieTrackingTrack *BKE_tracking_indexed_track(MovieTracking *tracking, int tracknr, ListBase **tracksbase_r) { MovieTrackingObject *object; - int cur= 1; + int cur = 1; - object= tracking->objects.first; + object = tracking->objects.first; while (object) { - ListBase *tracksbase= BKE_tracking_object_tracks(tracking, object); - MovieTrackingTrack *track= tracksbase->first; + ListBase *tracksbase = BKE_tracking_object_tracks(tracking, object); + MovieTrackingTrack *track = tracksbase->first; while (track) { - if (track->flag&TRACK_HAS_BUNDLE) { - if (cur==tracknr) { - *tracksbase_r= tracksbase; + if (track->flag & TRACK_HAS_BUNDLE) { + if (cur == tracknr) { + *tracksbase_r = tracksbase; return track; } cur++; } - track= track->next; + track = track->next; } object= object->next; @@ -2464,104 +2525,103 @@ MovieTrackingTrack *BKE_tracking_indexed_track(MovieTracking *tracking, int trac static int stabilization_median_point(MovieTracking *tracking, int framenr, float median[2]) { - int ok= 0; + int ok = FALSE; float min[2], max[2]; MovieTrackingTrack *track; INIT_MINMAX2(min, max); - (void) tracking; - - track= tracking->tracks.first; + track = tracking->tracks.first; while (track) { - if (track->flag&TRACK_USE_2D_STAB) { - MovieTrackingMarker *marker= BKE_tracking_get_marker(track, framenr); + if (track->flag & TRACK_USE_2D_STAB) { + MovieTrackingMarker *marker = BKE_tracking_get_marker(track, framenr); DO_MINMAX2(marker->pos, min, max); - ok= 1; + ok = TRUE; } - track= track->next; + track = track->next; } - median[0]= (max[0]+min[0])/2.0f; - median[1]= (max[1]+min[1])/2.0f; + median[0] = (max[0] + min[0]) / 2.0f; + median[1] = (max[1] + min[1]) / 2.0f; return ok; } static void calculate_stabdata(MovieTracking *tracking, int framenr, float width, float height, - float firstmedian[2], float median[2], float loc[2], float *scale, float *angle) + float firstmedian[2], float median[2], float loc[2], float *scale, float *angle) { - MovieTrackingStabilization *stab= &tracking->stabilization; + MovieTrackingStabilization *stab = &tracking->stabilization; - *scale= (stab->scale-1.0f)*stab->scaleinf+1.0f; - *angle= 0.0f; + *scale = (stab->scale - 1.0f) * stab->scaleinf + 1.0f; + *angle = 0.0f; - loc[0]= (firstmedian[0]-median[0])*width*(*scale); - loc[1]= (firstmedian[1]-median[1])*height*(*scale); + loc[0] = (firstmedian[0] - median[0]) *width * (*scale); + loc[1] = (firstmedian[1] - median[1]) *height * (*scale); mul_v2_fl(loc, stab->locinf); - if ((stab->flag&TRACKING_STABILIZE_ROTATION) && stab->rot_track && stab->rotinf) { + if ((stab->flag & TRACKING_STABILIZE_ROTATION) && stab->rot_track && stab->rotinf) { MovieTrackingMarker *marker; float a[2], b[2]; - float x0= (float)width/2.0f, y0= (float)height/2.0f; - float x= median[0]*width, y= median[1]*height; + float x0 = (float)width / 2.0f, y0 = (float)height / 2.0f; + float x = median[0] * width, y = median[1] * height; - marker= BKE_tracking_get_marker(stab->rot_track, 1); + marker = BKE_tracking_get_marker(stab->rot_track, 1); sub_v2_v2v2(a, marker->pos, firstmedian); - a[0]*= width; - a[1]*= height; + a[0] *= width; + a[1] *= height; - marker= BKE_tracking_get_marker(stab->rot_track, framenr); + marker = BKE_tracking_get_marker(stab->rot_track, framenr); sub_v2_v2v2(b, marker->pos, median); - b[0]*= width; - b[1]*= height; + b[0] *= width; + b[1] *= height; - *angle= -atan2(a[0]*b[1]-a[1]*b[0], a[0]*b[0]+a[1]*b[1]); - *angle*= stab->rotinf; + *angle = -atan2(a[0]*b[1]-a[1]*b[0], a[0]*b[0]+a[1]*b[1]); + *angle *= stab->rotinf; /* convert to rotation around image center */ - loc[0]-= (x0 + (x-x0)*cosf(*angle)-(y-y0)*sinf(*angle) - x)*(*scale); - loc[1]-= (y0 + (x-x0)*sinf(*angle)+(y-y0)*cosf(*angle) - y)*(*scale); + loc[0] -= (x0 + (x - x0) * cosf(*angle) - (y - y0) * sinf(*angle) - x) * (*scale); + loc[1] -= (y0 + (x - x0) * sinf(*angle) + (y - y0) * cosf(*angle) - y) * (*scale); } } static float stabilization_auto_scale_factor(MovieTracking *tracking, int width, int height) { float firstmedian[2]; - MovieTrackingStabilization *stab= &tracking->stabilization; - float aspect= tracking->camera.pixel_aspect; + MovieTrackingStabilization *stab = &tracking->stabilization; + float aspect = tracking->camera.pixel_aspect; if (stab->ok) return stab->scale; if (stabilization_median_point(tracking, 1, firstmedian)) { - int sfra= INT_MAX, efra= INT_MIN, cfra; - float scale= 1.0f; + int sfra = INT_MAX, efra = INT_MIN, cfra; + float scale = 1.0f; MovieTrackingTrack *track; - stab->scale= 1.0f; + stab->scale = 1.0f; - track= tracking->tracks.first; + track = tracking->tracks.first; while (track) { - if (track->flag&TRACK_USE_2D_STAB || - ((stab->flag&TRACKING_STABILIZE_ROTATION) && track==stab->rot_track)) { - sfra= MIN2(sfra, track->markers[0].framenr); - efra= MAX2(efra, track->markers[track->markersnr-1].framenr); + if (track->flag & TRACK_USE_2D_STAB || + ((stab->flag & TRACKING_STABILIZE_ROTATION) && track == stab->rot_track)) + { + sfra = MIN2(sfra, track->markers[0].framenr); + efra = MAX2(efra, track->markers[track->markersnr - 1].framenr); } - track= track->next; + track = track->next; } - for (cfra=sfra; cfra<=efra; cfra++) { + for (cfra = sfra; cfra <= efra; cfra++) { float median[2]; float loc[2], angle, tmp_scale; int i; float mat[4][4]; - float points[4][2]={{0.0f, 0.0f}, {0.0f, height}, {width, height}, {width, 0.0f}}; + float points[4][2] = {{0.0f, 0.0f}, {0.0f, height}, {width, height}, {width, 0.0f}}; float si, co; stabilization_median_point(tracking, cfra, median); @@ -2573,9 +2633,9 @@ static float stabilization_auto_scale_factor(MovieTracking *tracking, int width, si = sin(angle); co = cos(angle); - for (i= 0; i<4; i++) { + for (i = 0; i < 4; i++) { int j; - float a[3]= {0.0f, 0.0f, 0.0f}, b[3]= {0.0f, 0.0f, 0.0f}; + float a[3] = {0.0f, 0.0f, 0.0f}, b[3]= {0.0f, 0.0f, 0.0f}; copy_v3_v3(a, points[i]); copy_v3_v3(b, points[(i+1)%4]); @@ -2583,8 +2643,8 @@ static float stabilization_auto_scale_factor(MovieTracking *tracking, int width, mul_m4_v3(mat, a); mul_m4_v3(mat, b); - for (j= 0; j<4; j++) { - float point[3]= {points[j][0], points[j][1], 0.0f}; + for (j = 0; j < 4; j++) { + float point[3] = {points[j][0], points[j][1], 0.0f}; float v1[3], v2[3]; sub_v3_v3v3(v1, b, a); @@ -2632,16 +2692,16 @@ static float stabilization_auto_scale_factor(MovieTracking *tracking, int width, } } - stab->scale= scale; + stab->scale = scale; if (stab->maxscale>0.0f) - stab->scale= MIN2(stab->scale, stab->maxscale); + stab->scale = MIN2(stab->scale, stab->maxscale); } else { - stab->scale= 1.0f; + stab->scale = 1.0f; } - stab->ok= 1; + stab->ok = TRUE; return stab->scale; } @@ -2652,23 +2712,24 @@ static ImBuf* stabilize_alloc_ibuf(ImBuf *cacheibuf, ImBuf *srcibuf, int fill) if (cacheibuf && (cacheibuf->x != srcibuf->x || cacheibuf->y != srcibuf->y)) { IMB_freeImBuf(cacheibuf); - cacheibuf= NULL; + cacheibuf = NULL; } - flags= IB_rect; + flags = IB_rect; if (srcibuf->rect_float) - flags|= IB_rectfloat; + flags |= IB_rectfloat; if (cacheibuf) { if (fill) { - float col[4]= {0.0f, 0.0f, 0.0f, 0.0f}; + float col[4] = {0.0f, 0.0f, 0.0f, 0.0f}; + IMB_rectfill(cacheibuf, col); } } else { - cacheibuf= IMB_allocImBuf(srcibuf->x, srcibuf->y, srcibuf->planes, flags); - cacheibuf->profile= srcibuf->profile; + cacheibuf = IMB_allocImBuf(srcibuf->x, srcibuf->y, srcibuf->planes, flags); + cacheibuf->profile = srcibuf->profile; } return cacheibuf; @@ -2677,9 +2738,9 @@ static ImBuf* stabilize_alloc_ibuf(ImBuf *cacheibuf, ImBuf *srcibuf, int fill) void BKE_tracking_stabilization_data(MovieTracking *tracking, int framenr, int width, int height, float loc[2], float *scale, float *angle) { float firstmedian[2], median[2]; - MovieTrackingStabilization *stab= &tracking->stabilization; + MovieTrackingStabilization *stab = &tracking->stabilization; - if ((stab->flag&TRACKING_2D_STABILIZATION)==0) { + if ((stab->flag & TRACKING_2D_STABILIZATION) == 0) { zero_v2(loc); *scale= 1.0f; *angle= 0.0f; @@ -2690,16 +2751,16 @@ void BKE_tracking_stabilization_data(MovieTracking *tracking, int framenr, int w if (stabilization_median_point(tracking, 1, firstmedian)) { stabilization_median_point(tracking, framenr, median); - if ((stab->flag&TRACKING_AUTOSCALE)==0) - stab->scale= 1.0f; + if ((stab->flag & TRACKING_AUTOSCALE) == 0) + stab->scale = 1.0f; if (!stab->ok) { - if (stab->flag&TRACKING_AUTOSCALE) + if (stab->flag & TRACKING_AUTOSCALE) stabilization_auto_scale_factor(tracking, width, height); calculate_stabdata(tracking, framenr, width, height, firstmedian, median, loc, scale, angle); - stab->ok= 1; + stab->ok = TRUE; } else { calculate_stabdata(tracking, framenr, width, height, firstmedian, median, loc, scale, angle); @@ -2707,56 +2768,65 @@ void BKE_tracking_stabilization_data(MovieTracking *tracking, int framenr, int w } else { zero_v2(loc); - *scale= 1.0f; - *angle= 0.0f; + *scale = 1.0f; + *angle = 0.0f; } } ImBuf *BKE_tracking_stabilize(MovieTracking *tracking, int framenr, ImBuf *ibuf, float loc[2], float *scale, float *angle) { float tloc[2], tscale, tangle; - MovieTrackingStabilization *stab= &tracking->stabilization; + MovieTrackingStabilization *stab = &tracking->stabilization; ImBuf *tmpibuf; - float width= ibuf->x, height= ibuf->y; - float aspect= tracking->camera.pixel_aspect; + float width = ibuf->x, height = ibuf->y; + float aspect = tracking->camera.pixel_aspect; - if (loc) copy_v2_v2(tloc, loc); - if (scale) tscale= *scale; + if (loc) + copy_v2_v2(tloc, loc); - if ((stab->flag&TRACKING_2D_STABILIZATION)==0) { - if (loc) zero_v2(loc); - if (scale) *scale= 1.0f; + if (scale) + tscale = *scale; + + if ((stab->flag & TRACKING_2D_STABILIZATION) == 0) { + if (loc) + zero_v2(loc); + + if (scale) + *scale = 1.0f; return ibuf; } BKE_tracking_stabilization_data(tracking, framenr, width, height, tloc, &tscale, &tangle); - tmpibuf= stabilize_alloc_ibuf(NULL, ibuf, 1); + tmpibuf = stabilize_alloc_ibuf(NULL, ibuf, TRUE); /* scale would be handled by matrix transformation when angle is non-zero */ - if (tscale!=1.0f && tangle==0.0f) { + if (tscale != 1.0f && tangle == 0.0f) { ImBuf *scaleibuf; stabilization_auto_scale_factor(tracking, width, height); - scaleibuf= stabilize_alloc_ibuf(stab->scaleibuf, ibuf, 0); - stab->scaleibuf= scaleibuf; + scaleibuf = stabilize_alloc_ibuf(stab->scaleibuf, ibuf, 0); + stab->scaleibuf = scaleibuf; IMB_rectcpy(scaleibuf, ibuf, 0, 0, 0, 0, ibuf->x, ibuf->y); IMB_scalefastImBuf(scaleibuf, ibuf->x*tscale, ibuf->y*tscale); - ibuf= scaleibuf; + ibuf = scaleibuf; } - if (tangle==0.0f) { + if (tangle == 0.0f) { /* if angle is zero, then it's much faster to use rect copy * but could be issues with subpixel precisions */ - IMB_rectcpy(tmpibuf, ibuf, tloc[0]-(tscale-1.0f)*width/2.0f, tloc[1]-(tscale-1.0f)*height/2.0f, 0, 0, ibuf->x, ibuf->y); + IMB_rectcpy(tmpibuf, ibuf, + tloc[0] - (tscale - 1.0f) * width / 2.0f, + tloc[1] - (tscale - 1.0f) * height / 2.0f, + 0, 0, ibuf->x, ibuf->y); } else { float mat[4][4]; - int i, j, filter= tracking->stabilization.filter; + int i, j, filter = tracking->stabilization.filter; void (*interpolation) (struct ImBuf*, struct ImBuf*, float, float, int, int) = NULL; BKE_tracking_stabdata_to_mat4(ibuf->x, ibuf->y, aspect, tloc, tscale, tangle, mat); @@ -2772,9 +2842,9 @@ ImBuf *BKE_tracking_stabilize(MovieTracking *tracking, int framenr, ImBuf *ibuf, /* fallback to default interpolation method */ interpolation = neareast_interpolation; - for (j=0; jy; j++) { - for (i=0; ix;i++) { - float vec[3]= {i, j, 0}; + for (j = 0; j < tmpibuf->y; j++) { + for (i = 0; i < tmpibuf->x;i++) { + float vec[3] = {i, j, 0}; mul_v3_m4v3(vec, mat, vec); @@ -2783,14 +2853,19 @@ ImBuf *BKE_tracking_stabilize(MovieTracking *tracking, int framenr, ImBuf *ibuf, } } - tmpibuf->userflags|= IB_MIPMAP_INVALID; + tmpibuf->userflags |= IB_MIPMAP_INVALID; if (tmpibuf->rect_float) - tmpibuf->userflags|= IB_RECT_INVALID; + tmpibuf->userflags |= IB_RECT_INVALID; + + if (loc) + copy_v2_v2(loc, tloc); - if (loc) copy_v2_v2(loc, tloc); - if (scale) *scale= tscale; - if (angle) *angle= tangle; + if (scale) + *scale= tscale; + + if (angle) + *angle= tangle; return tmpibuf; } @@ -2811,8 +2886,8 @@ void BKE_tracking_stabdata_to_mat4(int width, int height, float aspect, float lo invert_m4_m4(iamat, amat); /* image center as rotation center */ - cmat[3][0]= (float)width/2.0f; - cmat[3][1]= (float)height/2.0f; + cmat[3][0] = (float)width / 2.0f; + cmat[3][1] = (float)height / 2.0f; invert_m4_m4(icmat, cmat); size_to_mat4(smat, svec); /* scale matrix */ @@ -2827,7 +2902,7 @@ MovieDistortion *BKE_tracking_distortion_create(void) { MovieDistortion *distortion; - distortion= MEM_callocN(sizeof(MovieDistortion), "BKE_tracking_distortion_create"); + distortion = MEM_callocN(sizeof(MovieDistortion), "BKE_tracking_distortion_create"); return distortion; } @@ -2836,12 +2911,12 @@ MovieDistortion *BKE_tracking_distortion_copy(MovieDistortion *distortion) { MovieDistortion *new_distortion; - new_distortion= MEM_callocN(sizeof(MovieDistortion), "BKE_tracking_distortion_create"); + new_distortion = MEM_callocN(sizeof(MovieDistortion), "BKE_tracking_distortion_create"); #ifdef WITH_LIBMV - new_distortion->intrinsics= libmv_CameraIntrinsicsCopy(distortion->intrinsics); + new_distortion->intrinsics = libmv_CameraIntrinsicsCopy(distortion->intrinsics); #else - (void)distortion; + (void) distortion; #endif return new_distortion; @@ -2849,12 +2924,12 @@ MovieDistortion *BKE_tracking_distortion_copy(MovieDistortion *distortion) void BKE_tracking_distortion_update(MovieDistortion *distortion, MovieTracking *tracking, int width, int height) { - MovieTrackingCamera *camera= &tracking->camera; - float aspy= 1.0f/tracking->camera.pixel_aspect; + MovieTrackingCamera *camera = &tracking->camera; + float aspy = 1.0f / tracking->camera.pixel_aspect; #ifdef WITH_LIBMV if (!distortion->intrinsics) { - distortion->intrinsics= libmv_CameraIntrinsicsNew(camera->focal, + distortion->intrinsics = libmv_CameraIntrinsicsNew(camera->focal, camera->principal[0], camera->principal[1] * aspy, camera->k1, camera->k2, camera->k3, width, height * aspy); } @@ -2864,22 +2939,22 @@ void BKE_tracking_distortion_update(MovieDistortion *distortion, MovieTracking * camera->k1, camera->k2, camera->k3, width, height * aspy); } #else - (void)distortion; - (void)width; - (void)height; - (void)camera; - (void)aspy; + (void) distortion; + (void) width; + (void) height; + (void) camera; + (void) aspy; #endif } ImBuf *BKE_tracking_distortion_exec(MovieDistortion *distortion, MovieTracking *tracking, - ImBuf *ibuf, int width, int height, float overscan, int undistort) + ImBuf *ibuf, int width, int height, float overscan, int undistort) { ImBuf *resibuf; BKE_tracking_distortion_update(distortion, tracking, width, height); - resibuf= IMB_dupImBuf(ibuf); + resibuf = IMB_dupImBuf(ibuf); if (ibuf->rect_float) { #ifdef WITH_LIBMV @@ -2895,7 +2970,7 @@ ImBuf *BKE_tracking_distortion_exec(MovieDistortion *distortion, MovieTracking * } #endif - ibuf->userflags|= IB_RECT_INVALID; + ibuf->userflags |= IB_RECT_INVALID; } else { #ifdef WITH_LIBMV @@ -2913,8 +2988,8 @@ ImBuf *BKE_tracking_distortion_exec(MovieDistortion *distortion, MovieTracking * } #ifndef WITH_LIBMV - (void)overscan; - (void)undistort; + (void) overscan; + (void) undistort; #endif return resibuf; @@ -2931,20 +3006,20 @@ void BKE_tracking_distortion_destroy(MovieDistortion *distortion) ImBuf *BKE_tracking_undistort(MovieTracking *tracking, ImBuf *ibuf, int width, int height, float overscan) { - MovieTrackingCamera *camera= &tracking->camera; + MovieTrackingCamera *camera = &tracking->camera; if (camera->intrinsics == NULL) - camera->intrinsics= BKE_tracking_distortion_create(); + camera->intrinsics = BKE_tracking_distortion_create(); return BKE_tracking_distortion_exec(camera->intrinsics, tracking, ibuf, width, height, overscan, 1); } ImBuf *BKE_tracking_distort(MovieTracking *tracking, ImBuf *ibuf, int width, int height, float overscan) { - MovieTrackingCamera *camera= &tracking->camera; + MovieTrackingCamera *camera = &tracking->camera; if (camera->intrinsics == NULL) - camera->intrinsics= BKE_tracking_distortion_create(); + camera->intrinsics = BKE_tracking_distortion_create(); return BKE_tracking_distortion_exec(camera->intrinsics, tracking, ibuf, width, height, overscan, 0); } @@ -2956,11 +3031,11 @@ void BKE_tracking_select_track(ListBase *tracksbase, MovieTrackingTrack *track, BKE_tracking_track_flag(track, area, SELECT, 0); } else { - MovieTrackingTrack *cur= tracksbase->first; + MovieTrackingTrack *cur = tracksbase->first; while (cur) { if ((cur->flag & TRACK_HIDDEN) == 0) { - if (cur==track) { + if (cur == track) { BKE_tracking_track_flag(cur, TRACK_AREA_ALL, SELECT, 1); BKE_tracking_track_flag(cur, area, SELECT, 0); } @@ -2969,7 +3044,7 @@ void BKE_tracking_select_track(ListBase *tracksbase, MovieTrackingTrack *track, } } - cur= cur->next; + cur = cur->next; } } } @@ -2981,13 +3056,13 @@ void BKE_tracking_deselect_track(MovieTrackingTrack *track, int area) MovieTrackingObject *BKE_tracking_new_object(MovieTracking *tracking, const char *name) { - MovieTrackingObject *object= MEM_callocN(sizeof(MovieTrackingObject), "tracking object"); + MovieTrackingObject *object = MEM_callocN(sizeof(MovieTrackingObject), "tracking object"); - if (tracking->tot_object==0) { + if (tracking->tot_object == 0) { /* first object is always camera */ BLI_strncpy(object->name, "Camera", sizeof(object->name)); - object->flag|= TRACKING_OBJECT_CAMERA; + object->flag |= TRACKING_OBJECT_CAMERA; } else { BLI_strncpy(object->name, name, sizeof(object->name)); @@ -2996,9 +3071,9 @@ MovieTrackingObject *BKE_tracking_new_object(MovieTracking *tracking, const char BLI_addtail(&tracking->objects, object); tracking->tot_object++; - tracking->objectnr= BLI_countlist(&tracking->objects) - 1; + tracking->objectnr = BLI_countlist(&tracking->objects) - 1; - object->scale= 1.0f; + object->scale = 1.0f; BKE_tracking_object_unique_name(tracking, object); @@ -3008,7 +3083,7 @@ MovieTrackingObject *BKE_tracking_new_object(MovieTracking *tracking, const char void BKE_tracking_remove_object(MovieTracking *tracking, MovieTrackingObject *object) { MovieTrackingTrack *track; - int index= BLI_findindex(&tracking->objects, object); + int index = BLI_findindex(&tracking->objects, object); if (index<0) return; @@ -3018,10 +3093,10 @@ void BKE_tracking_remove_object(MovieTracking *tracking, MovieTrackingObject *ob return; } - track= object->tracks.first; + track = object->tracks.first; while (track) { - if (track==tracking->act_track) - tracking->act_track= NULL; + if (track == tracking->act_track) + tracking->act_track = NULL; track= track->next; } @@ -3032,9 +3107,9 @@ void BKE_tracking_remove_object(MovieTracking *tracking, MovieTrackingObject *ob tracking->tot_object--; if (index>0) - tracking->objectnr= index-1; + tracking->objectnr = index - 1; else - tracking->objectnr= 0; + tracking->objectnr = 0; } void BKE_tracking_object_unique_name(MovieTracking *tracking, MovieTrackingObject *object) @@ -3044,13 +3119,13 @@ void BKE_tracking_object_unique_name(MovieTracking *tracking, MovieTrackingObjec MovieTrackingObject *BKE_tracking_named_object(MovieTracking *tracking, const char *name) { - MovieTrackingObject *object= tracking->objects.first; + MovieTrackingObject *object = tracking->objects.first; while (object) { if (!strcmp(object->name, name)) return object; - object= object->next; + object = object->next; } return NULL; diff --git a/source/blender/editors/space_clip/clip_buttons.c b/source/blender/editors/space_clip/clip_buttons.c index bb816d1b8b2..eabd64bdc4f 100644 --- a/source/blender/editors/space_clip/clip_buttons.c +++ b/source/blender/editors/space_clip/clip_buttons.c @@ -67,11 +67,11 @@ void ED_clip_buttons_register(ARegionType *art) { PanelType *pt; - pt= MEM_callocN(sizeof(PanelType), "spacetype clip panel gpencil"); + pt = MEM_callocN(sizeof(PanelType), "spacetype clip panel gpencil"); strcpy(pt->idname, "CLIP_PT_gpencil"); strcpy(pt->label, "Grease Pencil"); - pt->draw= gpencil_panel_standard; - pt->flag|= PNL_DEFAULT_CLOSED; + pt->draw = gpencil_panel_standard; + pt->flag |= PNL_DEFAULT_CLOSED; BLI_addtail(&art->paneltypes, pt); } @@ -88,7 +88,7 @@ void uiTemplateMovieClip(uiLayout *layout, bContext *C, PointerRNA *ptr, const c if (!ptr->data) return; - prop= RNA_struct_find_property(ptr, propname); + prop = RNA_struct_find_property(ptr, propname); if (!prop) { printf("%s: property not found: %s.%s\n", __func__, RNA_struct_identifier(ptr->type), propname); @@ -101,8 +101,8 @@ void uiTemplateMovieClip(uiLayout *layout, bContext *C, PointerRNA *ptr, const c return; } - clipptr= RNA_property_pointer_get(ptr, prop); - clip= clipptr.data; + clipptr = RNA_property_pointer_get(ptr, prop); + clip = clipptr.data; uiLayoutSetContextPointer(layout, "edit_movieclip", &clipptr); @@ -110,13 +110,13 @@ void uiTemplateMovieClip(uiLayout *layout, bContext *C, PointerRNA *ptr, const c uiTemplateID(layout, C, ptr, propname, NULL, "CLIP_OT_open", NULL); if (clip) { - row= uiLayoutRow(layout, 0); - block= uiLayoutGetBlock(row); + row = uiLayoutRow(layout, 0); + block = uiLayoutGetBlock(row); uiDefBut(block, LABEL, 0, "File Path:", 0, 19, 145, 19, NULL, 0, 0, 0, 0, ""); - row= uiLayoutRow(layout, 0); + row = uiLayoutRow(layout, 0); split = uiLayoutSplit(row, 0.0, 0); - row= uiLayoutRow(split, 1); + row = uiLayoutRow(split, 1); uiItemR(row, &clipptr, "filepath", 0, "", ICON_NONE); uiItemO(row, "", ICON_FILE_REFRESH, "clip.reload"); @@ -136,7 +136,7 @@ void uiTemplateTrack(uiLayout *layout, PointerRNA *ptr, const char *propname) if (!ptr->data) return; - prop= RNA_struct_find_property(ptr, propname); + prop = RNA_struct_find_property(ptr, propname); if (!prop) { printf("%s: property not found: %s.%s\n", __func__, RNA_struct_identifier(ptr->type), propname); @@ -149,15 +149,15 @@ void uiTemplateTrack(uiLayout *layout, PointerRNA *ptr, const char *propname) return; } - scopesptr= RNA_property_pointer_get(ptr, prop); - scopes= (MovieClipScopes *)scopesptr.data; + scopesptr = RNA_property_pointer_get(ptr, prop); + scopes = (MovieClipScopes *)scopesptr.data; rect.xmin = 0; rect.xmax = 200; rect.ymin = 0; rect.ymax = 120; - block= uiLayoutAbsoluteBlock(layout); + block = uiLayoutAbsoluteBlock(layout); - scopes->track_preview_height= (scopes->track_preview_height<=UI_UNIT_Y)?UI_UNIT_Y:scopes->track_preview_height; + scopes->track_preview_height = (scopes->track_preview_height<=UI_UNIT_Y)?UI_UNIT_Y:scopes->track_preview_height; uiDefBut(block, TRACKPREVIEW, 0, "", rect.xmin, rect.ymin, rect.xmax-rect.xmin, scopes->track_preview_height, scopes, 0, 0, 0, 0, ""); } @@ -189,89 +189,89 @@ typedef struct { static void to_pixel_space(float r[2], float a[2], int width, int height) { copy_v2_v2(r, a); - r[0]*= width; - r[1]*= height; + r[0] *= width; + r[1] *= height; } static void marker_update_cb(bContext *C, void *arg_cb, void *UNUSED(arg)) { - MarkerUpdateCb *cb= (MarkerUpdateCb*) arg_cb; + MarkerUpdateCb *cb = (MarkerUpdateCb*) arg_cb; MovieTrackingMarker *marker; if (!cb->compact) return; - marker= BKE_tracking_ensure_marker(cb->track, cb->framenr); + marker = BKE_tracking_ensure_marker(cb->track, cb->framenr); - marker->flag= cb->marker_flag; + marker->flag = cb->marker_flag; WM_event_add_notifier(C, NC_MOVIECLIP|NA_EDITED, NULL); } static void marker_block_handler(bContext *C, void *arg_cb, int event) { - MarkerUpdateCb *cb= (MarkerUpdateCb*) arg_cb; + MarkerUpdateCb *cb = (MarkerUpdateCb*) arg_cb; MovieTrackingMarker *marker; - int width, height, ok= 0; + int width, height, ok = FALSE; BKE_movieclip_get_size(cb->clip, cb->user, &width, &height); - marker= BKE_tracking_ensure_marker(cb->track, cb->framenr); + marker = BKE_tracking_ensure_marker(cb->track, cb->framenr); - if (event==B_MARKER_POS) { - marker->pos[0]= cb->marker_pos[0]/width; - marker->pos[1]= cb->marker_pos[1]/height; + if (event == B_MARKER_POS) { + marker->pos[0] = cb->marker_pos[0]/width; + marker->pos[1] = cb->marker_pos[1]/height; /* to update position of "parented" objects */ DAG_id_tag_update(&cb->clip->id, 0); WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, NULL); - ok= 1; + ok = TRUE; } - else if (event==B_MARKER_PAT_DIM) { + else if (event == B_MARKER_PAT_DIM) { float dim[2], pat_dim[2]; sub_v2_v2v2(pat_dim, cb->track->pat_max, cb->track->pat_min); - dim[0]= cb->track_pat[0]/width; - dim[1]= cb->track_pat[1]/height; + dim[0] = cb->track_pat[0] / width; + dim[1] = cb->track_pat[1] / height; sub_v2_v2(dim, pat_dim); mul_v2_fl(dim, 0.5f); - cb->track->pat_min[0]-= dim[0]; - cb->track->pat_min[1]-= dim[1]; + cb->track->pat_min[0] -= dim[0]; + cb->track->pat_min[1] -= dim[1]; - cb->track->pat_max[0]+= dim[0]; - cb->track->pat_max[1]+= dim[1]; + cb->track->pat_max[0] += dim[0]; + cb->track->pat_max[1] += dim[1]; BKE_tracking_clamp_track(cb->track, CLAMP_PAT_DIM); - ok= 1; + ok = TRUE; } - else if (event==B_MARKER_SEARCH_POS) { + else if (event == B_MARKER_SEARCH_POS) { float delta[2], side[2]; sub_v2_v2v2(side, cb->track->search_max, cb->track->search_min); mul_v2_fl(side, 0.5f); - delta[0]= cb->track_search_pos[0]/width; - delta[1]= cb->track_search_pos[1]/height; + delta[0] = cb->track_search_pos[0] / width; + delta[1] = cb->track_search_pos[1] / height; sub_v2_v2v2(cb->track->search_min, delta, side); add_v2_v2v2(cb->track->search_max, delta, side); BKE_tracking_clamp_track(cb->track, CLAMP_SEARCH_POS); - ok= 1; + ok = TRUE; } - else if (event==B_MARKER_SEARCH_DIM) { + else if (event == B_MARKER_SEARCH_DIM) { float dim[2], search_dim[2]; sub_v2_v2v2(search_dim, cb->track->search_max, cb->track->search_min); - dim[0]= cb->track_search[0]/width; - dim[1]= cb->track_search[1]/height; + dim[0] = cb->track_search[0]/width; + dim[1] = cb->track_search[1]/height; sub_v2_v2(dim, search_dim); mul_v2_fl(dim, 0.5f); @@ -284,31 +284,31 @@ static void marker_block_handler(bContext *C, void *arg_cb, int event) BKE_tracking_clamp_track(cb->track, CLAMP_SEARCH_DIM); - ok= 1; + ok = TRUE; } - else if (event==B_MARKER_FLAG) { - marker->flag= cb->marker_flag; + else if (event == B_MARKER_FLAG) { + marker->flag = cb->marker_flag; - ok= 1; + ok = TRUE; } - else if (event==B_MARKER_OFFSET) { + else if (event == B_MARKER_OFFSET) { float offset[2], delta[2]; int i; - offset[0]= cb->track_offset[0]/width; - offset[1]= cb->track_offset[1]/height; + offset[0] = cb->track_offset[0] / width; + offset[1] = cb->track_offset[1] / height; sub_v2_v2v2(delta, offset, cb->track->offset); copy_v2_v2(cb->track->offset, offset); - for (i=0; itrack->markersnr; i++) + for (i = 0; i < cb->track->markersnr; i++) sub_v2_v2(cb->track->markers[i].pos, delta); /* to update position of "parented" objects */ DAG_id_tag_update(&cb->clip->id, 0); WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, NULL); - ok= 1; + ok = TRUE; } if (ok) @@ -331,7 +331,7 @@ void uiTemplateMarker(uiLayout *layout, PointerRNA *ptr, const char *propname, P if (!ptr->data) return; - prop= RNA_struct_find_property(ptr, propname); + prop = RNA_struct_find_property(ptr, propname); if (!prop) { printf("%s: property not found: %s.%s\n", __func__, RNA_struct_identifier(ptr->type), propname); @@ -344,30 +344,30 @@ void uiTemplateMarker(uiLayout *layout, PointerRNA *ptr, const char *propname, P return; } - clipptr= RNA_property_pointer_get(ptr, prop); - clip= (MovieClip *)clipptr.data; - user= userptr->data; - track= trackptr->data; + clipptr = RNA_property_pointer_get(ptr, prop); + clip = (MovieClip *)clipptr.data; + user = userptr->data; + track = trackptr->data; - marker= BKE_tracking_get_marker(track, user->framenr); + marker = BKE_tracking_get_marker(track, user->framenr); - cb= MEM_callocN(sizeof(MarkerUpdateCb), "uiTemplateMarker update_cb"); - cb->compact= compact; - cb->clip= clip; - cb->user= user; - cb->track= track; - cb->marker_flag= marker->flag; - cb->framenr= user->framenr; + cb = MEM_callocN(sizeof(MarkerUpdateCb), "uiTemplateMarker update_cb"); + cb->compact = compact; + cb->clip = clip; + cb->user = user; + cb->track = track; + cb->marker_flag = marker->flag; + cb->framenr = user->framenr; if (compact) { - block= uiLayoutGetBlock(layout); + block = uiLayoutGetBlock(layout); - if (cb->marker_flag&MARKER_DISABLED) + if (cb->marker_flag & MARKER_DISABLED) tip= "Marker is disabled at current frame"; else tip= "Marker is enabled at current frame"; - bt= uiDefIconButBitI(block, TOGN, MARKER_DISABLED, 0, ICON_RESTRICT_VIEW_OFF, 0, 0, 20, 20, &cb->marker_flag, 0, 0, 1, 0, tip); + bt = uiDefIconButBitI(block, TOGN, MARKER_DISABLED, 0, ICON_RESTRICT_VIEW_OFF, 0, 0, 20, 20, &cb->marker_flag, 0, 0, 1, 0, tip); uiButSetNFunc(bt, marker_update_cb, cb, NULL); } else { @@ -377,16 +377,16 @@ void uiTemplateMarker(uiLayout *layout, PointerRNA *ptr, const char *propname, P BKE_movieclip_get_size(clip, user, &width, &height); - if (track->flag&TRACK_LOCKED) { + if (track->flag & TRACK_LOCKED) { uiLayoutSetActive(layout, 0); - block= uiLayoutAbsoluteBlock(layout); + block = uiLayoutAbsoluteBlock(layout); uiDefBut(block, LABEL, 0, "Track is locked", 0, 0, 300, 19, NULL, 0, 0, 0, 0, ""); return; } step= 100; - digits= 2; + digits = 2; sub_v2_v2v2(pat_dim, track->pat_max, track->pat_min); sub_v2_v2v2(search_dim, track->search_max, track->search_min); @@ -403,13 +403,13 @@ void uiTemplateMarker(uiLayout *layout, PointerRNA *ptr, const char *propname, P to_pixel_space(cb->track_search_pos, search_pos, width, height); to_pixel_space(cb->track_offset, track->offset, width, height); - cb->marker_flag= marker->flag; + cb->marker_flag = marker->flag; block= uiLayoutAbsoluteBlock(layout); uiBlockSetHandleFunc(block, marker_block_handler, cb); uiBlockSetNFunc(block, marker_update_cb, cb, NULL); - if (cb->marker_flag&MARKER_DISABLED) + if (cb->marker_flag & MARKER_DISABLED) tip= "Marker is disabled at current frame"; else tip= "Marker is enabled at current frame"; @@ -417,10 +417,10 @@ void uiTemplateMarker(uiLayout *layout, PointerRNA *ptr, const char *propname, P uiDefButBitI(block, OPTIONN, MARKER_DISABLED, B_MARKER_FLAG, "Enabled", 10, 190, 145, 19, &cb->marker_flag, 0, 0, 0, 0, tip); - col= uiLayoutColumn(layout, 1); + col = uiLayoutColumn(layout, 1); uiLayoutSetActive(col, (cb->marker_flag&MARKER_DISABLED)==0); - block= uiLayoutAbsoluteBlock(col); + block = uiLayoutAbsoluteBlock(col); uiBlockBeginAlign(block); uiDefBut(block, LABEL, 0, "Position:", 0, 190, 300, 19, NULL, 0, 0, 0, 0, ""); diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c index ef83a62c290..019b23c231b 100644 --- a/source/blender/editors/space_clip/clip_draw.c +++ b/source/blender/editors/space_clip/clip_draw.c @@ -73,8 +73,8 @@ void clip_draw_curfra_label(SpaceClip *sc, float x, float y) { - uiStyle *style= UI_GetStyle(); - int fontid= style->widget.uifont_id; + uiStyle *style = UI_GetStyle(); + int fontid = style->widget.uifont_id; char numstr[32]; float font_dims[2] = {0.0f, 0.0f}; @@ -95,9 +95,9 @@ static void draw_movieclip_cache(SpaceClip *sc, ARegion *ar, MovieClip *clip, Sc { float x; int *points, totseg, i, a; - float sfra= SFRA, efra= EFRA, framelen= ar->winx/(efra-sfra+1); - MovieTrackingTrack *act_track= BKE_tracking_active_track(&clip->tracking); - MovieTrackingReconstruction *reconstruction= BKE_tracking_get_reconstruction(&clip->tracking); + float sfra = SFRA, efra = EFRA, framelen = ar->winx / (efra - sfra + 1); + MovieTrackingTrack *act_track = BKE_tracking_active_track(&clip->tracking); + MovieTrackingReconstruction *reconstruction = BKE_tracking_get_reconstruction(&clip->tracking); glEnable(GL_BLEND); @@ -110,11 +110,11 @@ static void draw_movieclip_cache(SpaceClip *sc, ARegion *ar, MovieClip *clip, Sc if (totseg) { glColor4ub(128, 128, 255, 128); - for (a= 0; awinx; - x2= (points[a*2+1]-sfra+1)/(efra-sfra+1)*ar->winx; + x1 = (points[a * 2] - sfra) / (efra - sfra + 1) * ar->winx; + x2 = (points[a * 2 + 1] - sfra + 1) / (efra - sfra + 1) * ar->winx; glRecti(x1, 0, x2, 8); } @@ -122,53 +122,58 @@ static void draw_movieclip_cache(SpaceClip *sc, ARegion *ar, MovieClip *clip, Sc /* track */ if (act_track) { - MovieTrackingTrack *track= act_track; + MovieTrackingTrack *track = act_track; - for (i= sfra, a= 0; i <= efra; i++) { + for (i = sfra, a = 0; i <= efra; i++) { int framenr; MovieTrackingMarker *marker; while (amarkersnr) { - if (track->markers[a].framenr>=i) + if (track->markers[a].framenr >= i) break; - if (amarkersnr-1 && track->markers[a+1].framenr>i) + if (a < track->markersnr - 1 && track->markers[a + 1].framenr > i) break; a++; } - if (amarkersnr) marker= &track->markers[a]; - else marker= &track->markers[track->markersnr-1]; + if (a < track->markersnr) + marker = &track->markers[a]; + else + marker = &track->markers[track->markersnr - 1]; - if ((marker->flag&MARKER_DISABLED)==0) { - framenr= marker->framenr; + if ((marker->flag & MARKER_DISABLED) == 0) { + framenr = marker->framenr; - if (framenr!=i) glColor4ub(128, 128, 0, 96); - else if ((marker->flag&MARKER_TRACKED)==0) glColor4ub(255, 255, 0, 196); - else glColor4ub(255, 255, 0, 96); + if (framenr != i) + glColor4ub(128, 128, 0, 96); + else if ((marker->flag & MARKER_TRACKED) == 0) + glColor4ub(255, 255, 0, 196); + else + glColor4ub(255, 255, 0, 96); - glRecti((i-sfra)*framelen, 0, (i-sfra+1)*framelen, 4); + glRecti((i - sfra) * framelen, 0, (i - sfra + 1)*framelen, 4); } } } /* failed frames */ - if (reconstruction->flag&TRACKING_RECONSTRUCTED) { - int n= reconstruction->camnr; - MovieReconstructedCamera *cameras= reconstruction->cameras; + if (reconstruction->flag & TRACKING_RECONSTRUCTED) { + int n = reconstruction->camnr; + MovieReconstructedCamera *cameras = reconstruction->cameras; glColor4ub(255, 0, 0, 96); - for (i= sfra, a= 0; i <= efra; i++) { - int ok= 0; + for (i = sfra, a = 0; i <= efra; i++) { + int ok = FALSE; - while (ai) { + else if (cameras[a].framenr > i) { break; } @@ -176,14 +181,14 @@ static void draw_movieclip_cache(SpaceClip *sc, ARegion *ar, MovieClip *clip, Sc } if (!ok) - glRecti((i-sfra)*framelen, 0, (i-sfra+1)*framelen, 8); + glRecti((i - sfra) * framelen, 0, (i - sfra + 1) * framelen, 8); } } glDisable(GL_BLEND); /* current frame */ - x= (sc->user.framenr-sfra)/(efra-sfra+1)*ar->winx; + x = (sc->user.framenr - sfra) / (efra - sfra + 1) * ar->winx; UI_ThemeColor(TH_CFRAME); glRecti(x, 0, x+framelen, 8); @@ -193,17 +198,17 @@ static void draw_movieclip_cache(SpaceClip *sc, ARegion *ar, MovieClip *clip, Sc static void draw_movieclip_notes(SpaceClip *sc, ARegion *ar) { - MovieClip *clip= ED_space_clip(sc); - MovieTracking *tracking= &clip->tracking; - char str[256]= {0}; - int block= 0; + MovieClip *clip = ED_space_clip(sc); + MovieTracking *tracking = &clip->tracking; + char str[256] = {0}; + int block = FALSE; if (tracking->stats) { BLI_strncpy(str, tracking->stats->message, sizeof(str)); - block= 1; + block = TRUE; } else { - if (sc->flag&SC_LOCK_SELECTION) + if (sc->flag & SC_LOCK_SELECTION) strcpy(str, "Locked"); } @@ -212,10 +217,10 @@ static void draw_movieclip_notes(SpaceClip *sc, ARegion *ar) } static void draw_movieclip_buffer(SpaceClip *sc, ARegion *ar, ImBuf *ibuf, - int width, int height, float zoomx, float zoomy) + int width, int height, float zoomx, float zoomy) { int x, y; - MovieClip *clip= ED_space_clip(sc); + MovieClip *clip = ED_space_clip(sc); /* set zoom */ glPixelZoom(zoomx*width/ibuf->x, zoomy*height/ibuf->y); @@ -223,9 +228,9 @@ static void draw_movieclip_buffer(SpaceClip *sc, ARegion *ar, ImBuf *ibuf, /* find window pixel coordinates of origin */ UI_view2d_to_region_no_clip(&ar->v2d, 0.0f, 0.0f, &x, &y); - if (sc->flag&SC_MUTE_FOOTAGE) { + if (sc->flag & SC_MUTE_FOOTAGE) { glColor3f(0.0f, 0.0f, 0.0f); - glRectf(x, y, x+zoomx*width, y+zoomy*height); + glRectf(x, y, x + zoomx * width, y + zoomy * height); } else { if (ibuf->rect_float && !ibuf->rect) { @@ -237,7 +242,7 @@ static void draw_movieclip_buffer(SpaceClip *sc, ARegion *ar, ImBuf *ibuf, } /* draw boundary border for frame if stabilization is enabled */ - if (sc->flag&SC_SHOW_STABLE && clip->tracking.stabilization.flag&TRACKING_2D_STABILIZATION) { + if (sc->flag & SC_SHOW_STABLE && clip->tracking.stabilization.flag & TRACKING_2D_STABILIZATION) { glColor3f(0.0f, 0.0f, 0.0f); glLineStipple(3, 0xaaaa); glEnable(GL_LINE_STIPPLE); @@ -270,35 +275,35 @@ static void draw_movieclip_buffer(SpaceClip *sc, ARegion *ar, ImBuf *ibuf, static void draw_track_path(SpaceClip *sc, MovieClip *UNUSED(clip), MovieTrackingTrack *track) { - int count= sc->path_length; - int i, a, b, curindex= -1; + int count = sc->path_length; + int i, a, b, curindex = -1; float path[102][2]; - int tiny= sc->flag&SC_SHOW_TINY_MARKER, framenr; + int tiny = sc->flag&SC_SHOW_TINY_MARKER, framenr; MovieTrackingMarker *marker; - if (count==0) + if (count == 0) return; - marker= BKE_tracking_get_marker(track, sc->user.framenr); - if (marker->framenr!=sc->user.framenr || marker->flag&MARKER_DISABLED) + marker = BKE_tracking_get_marker(track, sc->user.framenr); + if (marker->framenr != sc->user.framenr || marker->flag & MARKER_DISABLED) return; - framenr= marker->framenr; + framenr = marker->framenr; - a= count; - i= framenr-1; - while (i>=framenr-count) { - marker= BKE_tracking_get_marker(track, i); + a = count; + i = framenr - 1; + while (i >= framenr - count) { + marker = BKE_tracking_get_marker(track, i); - if (!marker || marker->flag&MARKER_DISABLED) + if (!marker || marker->flag & MARKER_DISABLED) break; - if (marker->framenr==i) { + if (marker->framenr == i) { add_v2_v2v2(path[--a], marker->pos, track->offset); ED_clip_point_undistorted_pos(sc, path[a], path[a]); - if (marker->framenr==sc->user.framenr) - curindex= a; + if (marker->framenr == sc->user.framenr) + curindex = a; } else { break; @@ -307,16 +312,16 @@ static void draw_track_path(SpaceClip *sc, MovieClip *UNUSED(clip), MovieTrackin i--; } - b= count; - i= framenr; - while (i<=framenr+count) { - marker= BKE_tracking_get_marker(track, i); + b = count; + i = framenr; + while (i <= framenr+count) { + marker = BKE_tracking_get_marker(track, i); - if (!marker || marker->flag&MARKER_DISABLED) + if (!marker || marker->flag & MARKER_DISABLED) break; - if (marker->framenr==i) { - if (marker->framenr==sc->user.framenr) + if (marker->framenr == i) { + if (marker->framenr == sc->user.framenr) curindex= b; add_v2_v2v2(path[b++], marker->pos, track->offset); @@ -334,8 +339,8 @@ static void draw_track_path(SpaceClip *sc, MovieClip *UNUSED(clip), MovieTrackin if (TRACK_VIEW_SELECTED(sc, track)) { glPointSize(5.0f); glBegin(GL_POINTS); - for (i= a; iflag&SC_SHOW_TINY_MARKER; - int show_search= 0; + int tiny = sc->flag&SC_SHOW_TINY_MARKER; + int show_search = FALSE; float px[2]; UI_ThemeColor(TH_MARKER_OUTLINE); - px[0]= 1.0f/width/sc->zoom; - px[1]= 1.0f/height/sc->zoom; + px[0] = 1.0f / width / sc->zoom; + px[1] = 1.0f / height / sc->zoom; - if ((marker->flag&MARKER_DISABLED)==0) { + if ((marker->flag & MARKER_DISABLED) == 0) { float pos[2]; rctf r; @@ -428,9 +433,10 @@ static void draw_marker_outline(SpaceClip *sc, MovieTrackingTrack *track, MovieT glPushMatrix(); glTranslatef(marker_pos[0], marker_pos[1], 0); - if (!tiny) glLineWidth(3.0f); + if (!tiny) + glLineWidth(3.0f); - if (sc->flag&SC_SHOW_MARKER_PATTERN) { + if (sc->flag & SC_SHOW_MARKER_PATTERN) { glBegin(GL_LINE_LOOP); glVertex2f(track->pat_min[0], track->pat_min[1]); glVertex2f(track->pat_max[0], track->pat_min[1]); @@ -439,8 +445,9 @@ static void draw_marker_outline(SpaceClip *sc, MovieTrackingTrack *track, MovieT glEnd(); } - show_search= TRACK_VIEW_SELECTED(sc, track) && ((marker->flag&MARKER_DISABLED)==0 || (sc->flag&SC_SHOW_MARKER_PATTERN)==0); - if (sc->flag&SC_SHOW_MARKER_SEARCH && show_search) { + show_search = TRACK_VIEW_SELECTED(sc, track) && + ((marker->flag & MARKER_DISABLED) == 0 || (sc->flag & SC_SHOW_MARKER_PATTERN) == 0); + if (sc->flag & SC_SHOW_MARKER_SEARCH && show_search) { glBegin(GL_LINE_LOOP); glVertex2f(track->search_min[0], track->search_min[1]); glVertex2f(track->search_max[0], track->search_min[1]); @@ -450,22 +457,27 @@ static void draw_marker_outline(SpaceClip *sc, MovieTrackingTrack *track, MovieT } glPopMatrix(); - if (!tiny) glLineWidth(1.0f); + if (!tiny) + glLineWidth(1.0f); } static void track_colors(MovieTrackingTrack *track, int act, float col[3], float scol[3]) { - if (track->flag&TRACK_CUSTOMCOLOR) { - if (act) UI_GetThemeColor3fv(TH_ACT_MARKER, scol); - else copy_v3_v3(scol, track->color); + if (track->flag & TRACK_CUSTOMCOLOR) { + if (act) + UI_GetThemeColor3fv(TH_ACT_MARKER, scol); + else + copy_v3_v3(scol, track->color); mul_v3_v3fl(col, track->color, 0.5f); } else { UI_GetThemeColor3fv(TH_MARKER, col); - if (act) UI_GetThemeColor3fv(TH_ACT_MARKER, scol); - else UI_GetThemeColor3fv(TH_SEL_MARKER, scol); + if (act) + UI_GetThemeColor3fv(TH_ACT_MARKER, scol); + else + UI_GetThemeColor3fv(TH_SEL_MARKER, scol); } } @@ -477,22 +489,27 @@ static void draw_marker_areas(SpaceClip *sc, MovieTrackingTrack *track, MovieTra track_colors(track, act, col, scol); - px[0]= 1.0f/width/sc->zoom; - px[1]= 1.0f/height/sc->zoom; + px[0]= 1.0f / width / sc->zoom; + px[1]= 1.0f / height / sc->zoom; /* marker position and offset position */ - if ((track->flag&SELECT)==sel && (marker->flag&MARKER_DISABLED)==0) { + if ((track->flag&SELECT) == sel && (marker->flag & MARKER_DISABLED) == 0) { float pos[2]; rctf r; - if (track->flag&TRACK_LOCKED) { - if (act) UI_ThemeColor(TH_ACT_MARKER); - else if (track->flag&SELECT) UI_ThemeColorShade(TH_LOCK_MARKER, 64); - else UI_ThemeColor(TH_LOCK_MARKER); + if (track->flag & TRACK_LOCKED) { + if (act) + UI_ThemeColor(TH_ACT_MARKER); + else if (track->flag & SELECT) + UI_ThemeColorShade(TH_LOCK_MARKER, 64); + else + UI_ThemeColor(TH_LOCK_MARKER); } else { - if (track->flag&SELECT) glColor3fv(scol); - else glColor3fv(col); + if (track->flag & SELECT) + glColor3fv(scol); + else + glColor3fv(col); } BLI_init_rctf(&r, track->pat_min[0], track->pat_max[0], track->pat_min[1], track->pat_max[1]); @@ -500,11 +517,15 @@ static void draw_marker_areas(SpaceClip *sc, MovieTrackingTrack *track, MovieTra ED_clip_point_undistorted_pos(sc, pos, pos); if (BLI_in_rctf(&r, pos[0]-marker_pos[0], pos[1]-marker_pos[1])) { - if (!tiny) glPointSize(2.0f); + if (!tiny) + glPointSize(2.0f); + glBegin(GL_POINTS); glVertex2f(pos[0], pos[1]); glEnd(); - if (!tiny) glPointSize(1.0f); + + if (!tiny) + glPointSize(1.0f); } else { glBegin(GL_LINES); @@ -546,19 +567,24 @@ static void draw_marker_areas(SpaceClip *sc, MovieTrackingTrack *track, MovieTra glEnable(GL_LINE_STIPPLE); } - if ((track->pat_flag&SELECT)==sel && (sc->flag&SC_SHOW_MARKER_PATTERN)) { - if (track->flag&TRACK_LOCKED) { - if (act) UI_ThemeColor(TH_ACT_MARKER); - else if (track->pat_flag&SELECT) UI_ThemeColorShade(TH_LOCK_MARKER, 64); + if ((track->pat_flag & SELECT) == sel && (sc->flag & SC_SHOW_MARKER_PATTERN)) { + if (track->flag & TRACK_LOCKED) { + if (act) + UI_ThemeColor(TH_ACT_MARKER); + else if (track->pat_flag & SELECT) + UI_ThemeColorShade(TH_LOCK_MARKER, 64); else UI_ThemeColor(TH_LOCK_MARKER); } - else if (marker->flag&MARKER_DISABLED) { - if (act) UI_ThemeColor(TH_ACT_MARKER); - else if (track->pat_flag&SELECT) UI_ThemeColorShade(TH_DIS_MARKER, 128); + else if (marker->flag & MARKER_DISABLED) { + if (act) + UI_ThemeColor(TH_ACT_MARKER); + else if (track->pat_flag & SELECT) + UI_ThemeColorShade(TH_DIS_MARKER, 128); else UI_ThemeColor(TH_DIS_MARKER); } else { - if (track->pat_flag&SELECT) glColor3fv(scol); + if (track->pat_flag & SELECT) + glColor3fv(scol); else glColor3fv(col); } @@ -571,21 +597,28 @@ static void draw_marker_areas(SpaceClip *sc, MovieTrackingTrack *track, MovieTra } /* search */ - show_search= TRACK_VIEW_SELECTED(sc, track) && ((marker->flag&MARKER_DISABLED)==0 || (sc->flag&SC_SHOW_MARKER_PATTERN)==0); - if ((track->search_flag&SELECT)==sel && (sc->flag&SC_SHOW_MARKER_SEARCH) && show_search) { - if (track->flag&TRACK_LOCKED) { - if (act) UI_ThemeColor(TH_ACT_MARKER); - else if (track->search_flag&SELECT) UI_ThemeColorShade(TH_LOCK_MARKER, 64); + show_search = TRACK_VIEW_SELECTED(sc, track) && + ((marker->flag & MARKER_DISABLED) == 0 || (sc->flag & SC_SHOW_MARKER_PATTERN) == 0); + if ((track->search_flag & SELECT) == sel && (sc->flag & SC_SHOW_MARKER_SEARCH) && show_search) { + if (track->flag & TRACK_LOCKED) { + if (act) + UI_ThemeColor(TH_ACT_MARKER); + else if (track->search_flag & SELECT) + UI_ThemeColorShade(TH_LOCK_MARKER, 64); else UI_ThemeColor(TH_LOCK_MARKER); } - else if (marker->flag&MARKER_DISABLED) { - if (act) UI_ThemeColor(TH_ACT_MARKER); - else if (track->search_flag&SELECT) UI_ThemeColorShade(TH_DIS_MARKER, 128); + else if (marker->flag & MARKER_DISABLED) { + if (act) + UI_ThemeColor(TH_ACT_MARKER); + else if (track->search_flag & SELECT) + UI_ThemeColorShade(TH_DIS_MARKER, 128); else UI_ThemeColor(TH_DIS_MARKER); } else { - if (track->search_flag&SELECT) glColor3fv(scol); - else glColor3fv(col); + if (track->search_flag & SELECT) + glColor3fv(scol); + else + glColor3fv(col); } glBegin(GL_LINE_LOOP); @@ -597,20 +630,29 @@ static void draw_marker_areas(SpaceClip *sc, MovieTrackingTrack *track, MovieTra } /* pyramid */ - if (sel && TRACK_VIEW_SELECTED(sc, track) && (track->tracker==TRACKER_KLT) && (marker->flag&MARKER_DISABLED)==0) { - if (track->flag&TRACK_LOCKED) { - if (act) UI_ThemeColor(TH_ACT_MARKER); - else if (track->pat_flag&SELECT) UI_ThemeColorShade(TH_LOCK_MARKER, 64); + if (sel && TRACK_VIEW_SELECTED(sc, track) && + (track->tracker == TRACKER_KLT) && + (marker->flag & MARKER_DISABLED) == 0) + { + if (track->flag & TRACK_LOCKED) { + if (act) + UI_ThemeColor(TH_ACT_MARKER); + else if (track->pat_flag & SELECT) + UI_ThemeColorShade(TH_LOCK_MARKER, 64); else UI_ThemeColor(TH_LOCK_MARKER); } - else if (marker->flag&MARKER_DISABLED) { - if (act) UI_ThemeColor(TH_ACT_MARKER); - else if (track->pat_flag&SELECT) UI_ThemeColorShade(TH_DIS_MARKER, 128); + else if (marker->flag & MARKER_DISABLED) { + if (act) + UI_ThemeColor(TH_ACT_MARKER); + else if (track->pat_flag & SELECT) + UI_ThemeColorShade(TH_DIS_MARKER, 128); else UI_ThemeColor(TH_DIS_MARKER); } else { - if (track->pat_flag&SELECT) glColor3fv(scol); - else glColor3fv(col); + if (track->pat_flag & SELECT) + glColor3fv(scol); + else + glColor3fv(col); } { @@ -639,16 +681,16 @@ static void draw_marker_areas(SpaceClip *sc, MovieTrackingTrack *track, MovieTra } static void draw_marker_slide_zones(SpaceClip *sc, MovieTrackingTrack *track, MovieTrackingMarker *marker, - float marker_pos[2], int outline, int sel, int act, int width, int height) + float marker_pos[2], int outline, int sel, int act, int width, int height) { float x, y, dx, dy, patdx, patdy, searchdx, searchdy, tdx, tdy; - int tiny= sc->flag&SC_SHOW_TINY_MARKER; + int tiny = sc->flag&SC_SHOW_TINY_MARKER; float col[3], scol[3], px[2]; - if ((tiny && outline) || (marker->flag&MARKER_DISABLED)) + if ((tiny && outline) || (marker->flag & MARKER_DISABLED)) return; - if (!TRACK_VIEW_SELECTED(sc, track) || track->flag&TRACK_LOCKED) + if (!TRACK_VIEW_SELECTED(sc, track) || track->flag & TRACK_LOCKED) return; track_colors(track, act, col, scol); @@ -661,34 +703,36 @@ static void draw_marker_slide_zones(SpaceClip *sc, MovieTrackingTrack *track, Mo glPushMatrix(); glTranslatef(marker_pos[0], marker_pos[1], 0); - dx= 6.0f/width/sc->zoom; - dy= 6.0f/height/sc->zoom; + dx = 6.0f / width / sc->zoom; + dy = 6.0f / height / sc->zoom; - patdx= MIN2(dx*2.0f/3.0f, (track->pat_max[0]-track->pat_min[0])/6.0f); - patdy= MIN2(dy*2.0f/3.0f, (track->pat_max[1]-track->pat_min[1])/6.0f); + patdx = MIN2(dx * 2.0f / 3.0f, (track->pat_max[0] - track->pat_min[0]) / 6.0f); + patdy = MIN2(dy * 2.0f / 3.0f, (track->pat_max[1] - track->pat_min[1]) / 6.0f); - searchdx= MIN2(dx, (track->search_max[0]-track->search_min[0])/6.0f); - searchdy= MIN2(dy, (track->search_max[1]-track->search_min[1])/6.0f); + searchdx = MIN2(dx, (track->search_max[0] - track->search_min[0]) / 6.0f); + searchdy = MIN2(dy, (track->search_max[1] - track->search_min[1]) / 6.0f); - px[0]= 1.0f/sc->zoom/width/sc->scale; - px[1]= 1.0f/sc->zoom/height/sc->scale; + px[0] = 1.0f / sc->zoom / width / sc->scale; + px[1] = 1.0f / sc->zoom / height / sc->scale; - if ((sc->flag&SC_SHOW_MARKER_SEARCH) && ((track->search_flag&SELECT)==sel || outline)) { + if ((sc->flag & SC_SHOW_MARKER_SEARCH) && ((track->search_flag & SELECT) == sel || outline)) { if (!outline) { - if (track->search_flag&SELECT) glColor3fv(scol); - else glColor3fv(col); + if (track->search_flag & SELECT) + glColor3fv(scol); + else + glColor3fv(col); } /* search offset square */ - x= track->search_min[0]; - y= track->search_max[1]; + x = track->search_min[0]; + y = track->search_max[1]; - tdx= searchdx; - tdy= searchdy; + tdx = searchdx; + tdy = searchdy; if (outline) { - tdx+= px[0]; - tdy+= px[1]; + tdx += px[0]; + tdy += px[1]; } glBegin(GL_QUADS); @@ -699,15 +743,15 @@ static void draw_marker_slide_zones(SpaceClip *sc, MovieTrackingTrack *track, Mo glEnd(); /* search re-sizing triangle */ - x= track->search_max[0]; - y= track->search_min[1]; + x = track->search_max[0]; + y = track->search_min[1]; - tdx= searchdx*2.0f; - tdy= searchdy*2.0f; + tdx = searchdx*2.0f; + tdy = searchdy*2.0f; if (outline) { - tdx+= px[0]; - tdy+= px[1]; + tdx += px[0]; + tdy += px[1]; } glBegin(GL_TRIANGLES); @@ -717,22 +761,24 @@ static void draw_marker_slide_zones(SpaceClip *sc, MovieTrackingTrack *track, Mo glEnd(); } - if ((sc->flag&SC_SHOW_MARKER_PATTERN) && ((track->pat_flag&SELECT)==sel || outline)) { + if ((sc->flag & SC_SHOW_MARKER_PATTERN) && ((track->pat_flag & SELECT)==sel || outline)) { if (!outline) { - if (track->pat_flag&SELECT) glColor3fv(scol); - else glColor3fv(col); + if (track->pat_flag & SELECT) + glColor3fv(scol); + else + glColor3fv(col); } /* pattern offset square */ - x= track->pat_min[0]; - y= track->pat_max[1]; + x = track->pat_min[0]; + y = track->pat_max[1]; - tdx= patdx; - tdy= patdy; + tdx = patdx; + tdy = patdy; if (outline) { - tdx+= px[0]; - tdy+= px[1]; + tdx += px[0]; + tdy += px[1]; } glBegin(GL_QUADS); @@ -743,15 +789,15 @@ static void draw_marker_slide_zones(SpaceClip *sc, MovieTrackingTrack *track, Mo glEnd(); /* pattern re-sizing triangle */ - x= track->pat_max[0]; - y= track->pat_min[1]; + x = track->pat_max[0]; + y = track->pat_min[1]; - tdx= patdx*2.0f; - tdy= patdy*2.0f; + tdx = patdx*2.0f; + tdy = patdy*2.0f; if (outline) { - tdx+= px[0]; - tdy+= px[1]; + tdx += px[0]; + tdy += px[1]; } glBegin(GL_TRIANGLES); @@ -768,52 +814,60 @@ static void draw_marker_slide_zones(SpaceClip *sc, MovieTrackingTrack *track, Mo } static void draw_marker_texts(SpaceClip *sc, MovieTrackingTrack *track, MovieTrackingMarker *marker, float marker_pos[2], int act, - int width, int height, float zoomx, float zoomy) + int width, int height, float zoomx, float zoomy) { - char str[128]= {0}, state[64]= {0}; - float dx= 0.0f, dy= 0.0f, fontsize, pos[3]; - uiStyle *style= U.uistyles.first; - int fontid= style->widget.uifont_id; + char str[128] = {0}, state[64] = {0}; + float dx= 0.0f, dy = 0.0f, fontsize, pos[3]; + uiStyle *style = U.uistyles.first; + int fontid = style->widget.uifont_id; if (!TRACK_VIEW_SELECTED(sc, track)) return; BLF_size(fontid, 11.0f, U.dpi); - fontsize= BLF_height_max(fontid); + fontsize = BLF_height_max(fontid); - if (marker->flag&MARKER_DISABLED) { - if (act) UI_ThemeColor(TH_ACT_MARKER); - else UI_ThemeColorShade(TH_DIS_MARKER, 128); + if (marker->flag & MARKER_DISABLED) { + if (act) + UI_ThemeColor(TH_ACT_MARKER); + else + UI_ThemeColorShade(TH_DIS_MARKER, 128); } else { - if (act) UI_ThemeColor(TH_ACT_MARKER); - else UI_ThemeColor(TH_SEL_MARKER); + if (act) + UI_ThemeColor(TH_ACT_MARKER); + else + UI_ThemeColor(TH_SEL_MARKER); } - if ((sc->flag&SC_SHOW_MARKER_SEARCH) && - ((marker->flag&MARKER_DISABLED)==0 || (sc->flag&SC_SHOW_MARKER_PATTERN)==0)) + if ((sc->flag & SC_SHOW_MARKER_SEARCH) && + ((marker->flag & MARKER_DISABLED) == 0 || (sc->flag & SC_SHOW_MARKER_PATTERN) == 0)) { - dx= track->search_min[0]; - dy= track->search_min[1]; + dx = track->search_min[0]; + dy = track->search_min[1]; } - else if (sc->flag&SC_SHOW_MARKER_PATTERN) { - dx= track->pat_min[0]; - dy= track->pat_min[1]; + else if (sc->flag & SC_SHOW_MARKER_PATTERN) { + dx = track->pat_min[0]; + dy = track->pat_min[1]; } - pos[0]= (marker_pos[0]+dx)*width; - pos[1]= (marker_pos[1]+dy)*height; - pos[2]= 0.0f; + pos[0] = (marker_pos[0] + dx) * width; + pos[1] = (marker_pos[1] + dy) * height; + pos[2] = 0.0f; mul_m4_v3(sc->stabmat, pos); - pos[0]= pos[0]*zoomx; - pos[1]= pos[1]*zoomy - fontsize; + pos[0] = pos[0]*zoomx; + pos[1] = pos[1]*zoomy - fontsize; - if (marker->flag&MARKER_DISABLED) strcpy(state, "disabled"); - else if (marker->framenr!=sc->user.framenr) strcpy(state, "estimated"); - else if (marker->flag&MARKER_TRACKED) strcpy(state, "tracked"); - else strcpy(state, "keyframed"); + if (marker->flag & MARKER_DISABLED) + strcpy(state, "disabled"); + else if (marker->framenr != sc->user.framenr) + strcpy(state, "estimated"); + else if (marker->flag & MARKER_TRACKED) + strcpy(state, "tracked"); + else + strcpy(state, "keyframed"); if (state[0]) BLI_snprintf(str, sizeof(str), "%s: %s", track->name, state); @@ -822,16 +876,16 @@ static void draw_marker_texts(SpaceClip *sc, MovieTrackingTrack *track, MovieTra BLF_position(fontid, pos[0], pos[1], 0.0f); BLF_draw(fontid, str, sizeof(str)); - pos[1]-= fontsize; + pos[1] -= fontsize; - if (track->flag&TRACK_HAS_BUNDLE) { + if (track->flag & TRACK_HAS_BUNDLE) { BLI_snprintf(str, sizeof(str), "Average error: %.3f", track->error); BLF_position(fontid, pos[0], pos[1], 0.0f); BLF_draw(fontid, str, sizeof(str)); - pos[1]-= fontsize; + pos[1] -= fontsize; } - if (track->flag&TRACK_LOCKED) { + if (track->flag & TRACK_LOCKED) { BLF_position(fontid, pos[0], pos[1], 0.0f); BLF_draw(fontid, "locked", 6); } @@ -840,25 +894,25 @@ static void draw_marker_texts(SpaceClip *sc, MovieTrackingTrack *track, MovieTra static void view2d_to_region_float(View2D *v2d, float x, float y, float *regionx, float *regiony) { /* express given coordinates as proportional values */ - x= -v2d->cur.xmin / (v2d->cur.xmax-v2d->cur.xmin); - y= -v2d->cur.ymin / (v2d->cur.ymax-v2d->cur.ymin); + x = -v2d->cur.xmin / (v2d->cur.xmax - v2d->cur.xmin); + y = -v2d->cur.ymin / (v2d->cur.ymax - v2d->cur.ymin); /* convert proportional distances to screen coordinates */ - *regionx= v2d->mask.xmin + x*(v2d->mask.xmax-v2d->mask.xmin); - *regiony= v2d->mask.ymin + y*(v2d->mask.ymax-v2d->mask.ymin); + *regionx = v2d->mask.xmin + x*(v2d->mask.xmax - v2d->mask.xmin); + *regiony = v2d->mask.ymin + y*(v2d->mask.ymax - v2d->mask.ymin); } static void draw_tracking_tracks(SpaceClip *sc, ARegion *ar, MovieClip *clip, - int width, int height, float zoomx, float zoomy) + int width, int height, float zoomx, float zoomy) { float x, y; - MovieTracking* tracking= &clip->tracking; - ListBase *tracksbase= BKE_tracking_get_tracks(tracking); + MovieTracking *tracking = &clip->tracking; + ListBase *tracksbase = BKE_tracking_get_tracks(tracking); MovieTrackingTrack *track, *act_track; MovieTrackingMarker *marker; - int framenr= sc->user.framenr; - int undistort= sc->user.render_flag&MCLIP_PROXY_RENDER_UNDISTORT; - float *marker_pos= NULL, *fp, *active_pos= NULL, cur_pos[2]; + int framenr = sc->user.framenr; + int undistort = sc->user.render_flag & MCLIP_PROXY_RENDER_UNDISTORT; + float *marker_pos = NULL, *fp, *active_pos = NULL, cur_pos[2]; /* ** find window pixel coordinates of origin ** */ @@ -877,65 +931,65 @@ static void draw_tracking_tracks(SpaceClip *sc, ARegion *ar, MovieClip *clip, glMultMatrixf(sc->stabmat); glScalef(width, height, 0); - act_track= BKE_tracking_active_track(tracking); + act_track = BKE_tracking_active_track(tracking); - if (sc->user.render_flag&MCLIP_PROXY_RENDER_UNDISTORT) { - int count= 0; + if (sc->user.render_flag & MCLIP_PROXY_RENDER_UNDISTORT) { + int count = 0; /* count */ - track= tracksbase->first; + track = tracksbase->first; while (track) { - if ((track->flag&TRACK_HIDDEN)==0) { - marker= BKE_tracking_get_marker(track, framenr); + if ((track->flag & TRACK_HIDDEN)==0) { + marker = BKE_tracking_get_marker(track, framenr); if (MARKER_VISIBLE(sc, marker)) count++; } - track= track->next; + track = track->next; } /* undistort */ if (count) { - marker_pos= MEM_callocN(2*sizeof(float)*count, "draw_tracking_tracks marker_pos"); + marker_pos = MEM_callocN(2*sizeof(float)*count, "draw_tracking_tracks marker_pos"); - track= tracksbase->first; - fp= marker_pos; + track = tracksbase->first; + fp = marker_pos; while (track) { - if ((track->flag&TRACK_HIDDEN)==0) { - marker= BKE_tracking_get_marker(track, framenr); + if ((track->flag & TRACK_HIDDEN)==0) { + marker = BKE_tracking_get_marker(track, framenr); if (MARKER_VISIBLE(sc, marker)) { ED_clip_point_undistorted_pos(sc, marker->pos, fp); - if (track==act_track) - active_pos= fp; + if (track == act_track) + active_pos = fp; - fp+= 2; + fp += 2; } } - track= track->next; + track = track->next; } } } - if (sc->flag&SC_SHOW_TRACK_PATH) { - track= tracksbase->first; + if (sc->flag & SC_SHOW_TRACK_PATH) { + track = tracksbase->first; while (track) { - if ((track->flag&TRACK_HIDDEN)==0) + if ((track->flag & TRACK_HIDDEN)==0) draw_track_path(sc, clip, track); - track= track->next; + track = track->next; } } /* markers outline and non-selected areas */ - track= tracksbase->first; - fp= marker_pos; + track = tracksbase->first; + fp = marker_pos; while (track) { - if ((track->flag&TRACK_HIDDEN)==0) { - marker= BKE_tracking_get_marker(track, framenr); + if ((track->flag & TRACK_HIDDEN)==0) { + marker = BKE_tracking_get_marker(track, framenr); if (MARKER_VISIBLE(sc, marker)) { copy_v2_v2(cur_pos, fp ? fp : marker->pos); @@ -946,21 +1000,21 @@ static void draw_tracking_tracks(SpaceClip *sc, ARegion *ar, MovieClip *clip, draw_marker_slide_zones(sc, track, marker, cur_pos, 0, 0, 0, width, height); if (fp) - fp+= 2; + fp += 2; } } - track= track->next; + track = track->next; } /* selected areas only, so selection wouldn't be overlapped by * non-selected areas */ - track= tracksbase->first; - fp= marker_pos; + track = tracksbase->first; + fp = marker_pos; while (track) { - if ((track->flag&TRACK_HIDDEN)==0) { - int act= track==act_track; - marker= BKE_tracking_get_marker(track, framenr); + if ((track->flag & TRACK_HIDDEN)==0) { + int act = track == act_track; + marker = BKE_tracking_get_marker(track, framenr); if (MARKER_VISIBLE(sc, marker)) { if (!act) { @@ -971,17 +1025,17 @@ static void draw_tracking_tracks(SpaceClip *sc, ARegion *ar, MovieClip *clip, } if (fp) - fp+= 2; + fp += 2; } } - track= track->next; + track = track->next; } /* active marker would be displayed on top of everything else */ if (act_track) { - if ((act_track->flag&TRACK_HIDDEN)==0) { - marker= BKE_tracking_get_marker(act_track, framenr); + if ((act_track->flag & TRACK_HIDDEN)==0) { + marker = BKE_tracking_get_marker(act_track, framenr); if (MARKER_VISIBLE(sc, marker)) { copy_v2_v2(cur_pos, active_pos ? active_pos : marker->pos); @@ -992,19 +1046,19 @@ static void draw_tracking_tracks(SpaceClip *sc, ARegion *ar, MovieClip *clip, } } - if (sc->flag&SC_SHOW_BUNDLES) { - MovieTrackingObject *object= BKE_tracking_active_object(tracking); + if (sc->flag & SC_SHOW_BUNDLES) { + MovieTrackingObject *object = BKE_tracking_active_object(tracking); float pos[4], vec[4], mat[4][4], aspy; glEnable(GL_POINT_SMOOTH); glPointSize(3.0f); - aspy= 1.0f/clip->tracking.camera.pixel_aspect; + aspy = 1.0f / clip->tracking.camera.pixel_aspect; BKE_tracking_projection_matrix(tracking, object, framenr, width, height, mat); - track= tracksbase->first; + track = tracksbase->first; while (track) { - if ((track->flag&TRACK_HIDDEN)==0 && track->flag&TRACK_HAS_BUNDLE) { + if ((track->flag & TRACK_HIDDEN) == 0 && track->flag & TRACK_HAS_BUNDLE) { marker= BKE_tracking_get_marker(track, framenr); if (MARKER_VISIBLE(sc, marker)) { @@ -1014,29 +1068,33 @@ static void draw_tracking_tracks(SpaceClip *sc, ARegion *ar, MovieClip *clip, mul_v4_m4v4(pos, mat, vec); - pos[0]= (pos[0]/(pos[3]*2.0f)+0.5f)*width; - pos[1]= (pos[1]/(pos[3]*2.0f)+0.5f)*height*aspy; + pos[0] = (pos[0] / (pos[3] * 2.0f) + 0.5f) * width; + pos[1] = (pos[1] / (pos[3] * 2.0f) + 0.5f) * height * aspy; BKE_tracking_apply_intrinsics(tracking, pos, npos); - if (npos[0]>=0.0f && npos[1]>=0.0f && npos[0]<=width && npos[1]<=height*aspy) { - vec[0]= (marker->pos[0]+track->offset[0])*width; - vec[1]= (marker->pos[1]+track->offset[1])*height*aspy; + if (npos[0] >= 0.0f && npos[1] >= 0.0f && npos[0] <= width && npos[1] <= height * aspy) { + vec[0] = (marker->pos[0] + track->offset[0]) * width; + vec[1] = (marker->pos[1] + track->offset[1]) * height * aspy; sub_v2_v2(vec, npos); - if (len_v2(vec)<3) glColor3f(0.0f, 1.0f, 0.0f); - else glColor3f(1.0f, 0.0f, 0.0f); + if (len_v2(vec)< 3.0f) + glColor3f(0.0f, 1.0f, 0.0f); + else + glColor3f(1.0f, 0.0f, 0.0f); glBegin(GL_POINTS); - if (undistort) glVertex3f(pos[0]/width, pos[1]/(height*aspy), 0); - else glVertex3f(npos[0]/width, npos[1]/(height*aspy), 0); + if (undistort) + glVertex3f(pos[0] / width, pos[1] / (height * aspy), 0); + else + glVertex3f(npos[0] / width, npos[1] / (height * aspy), 0); glEnd(); } } } - track= track->next; + track = track->next; } glPointSize(1.0f); @@ -1045,26 +1103,27 @@ static void draw_tracking_tracks(SpaceClip *sc, ARegion *ar, MovieClip *clip, glPopMatrix(); - if (sc->flag&SC_SHOW_NAMES) { + if (sc->flag & SC_SHOW_NAMES) { /* scaling should be cleared before drawing texts, otherwise font would also be scaled */ - track= tracksbase->first; - fp= marker_pos; + track = tracksbase->first; + fp = marker_pos; while (track) { - if ((track->flag&TRACK_HIDDEN)==0) { - marker= BKE_tracking_get_marker(track, framenr); + if ((track->flag & TRACK_HIDDEN) == 0) { + marker = BKE_tracking_get_marker(track, framenr); if (MARKER_VISIBLE(sc, marker)) { - int act= track==act_track; + int act = track == act_track; copy_v2_v2(cur_pos, fp ? fp : marker->pos); draw_marker_texts(sc, track, marker, cur_pos, act, width, height, zoomx, zoomy); - if (fp) fp+= 2; + if (fp) + fp += 2; } } - track= track->next; + track = track->next; } } @@ -1077,20 +1136,20 @@ static void draw_tracking_tracks(SpaceClip *sc, ARegion *ar, MovieClip *clip, static void draw_distortion(SpaceClip *sc, ARegion *ar, MovieClip *clip, int width, int height, float zoomx, float zoomy) { float x, y; - const int n= 10; + const int n = 10; int i, j, a; float pos[2], tpos[2], grid[11][11][2]; - MovieTracking *tracking= &clip->tracking; - float aspy= 1.0f/tracking->camera.pixel_aspect; - float dx= (float)width/n, dy= (float)height/n*aspy; + MovieTracking *tracking = &clip->tracking; + float aspy = 1.0f / tracking->camera.pixel_aspect; + float dx = (float)width / n, dy = (float)height / n * aspy; - if (sc->mode!=SC_MODE_DISTORTION) + if (sc->mode != SC_MODE_DISTORTION) return; if (!tracking->camera.focal) return; - if ((sc->flag&SC_SHOW_GRID)==0 && (sc->flag&SC_MANUAL_CALIBRATION)==0) + if ((sc->flag & SC_SHOW_GRID) == 0 && (sc->flag & SC_MANUAL_CALIBRATION) == 0) return; view2d_to_region_float(&ar->v2d, 0.0f, 0.0f, &x, &y); @@ -1102,47 +1161,51 @@ static void draw_distortion(SpaceClip *sc, ARegion *ar, MovieClip *clip, int wid glScalef(width, height, 0); /* grid */ - if (sc->flag&SC_SHOW_GRID) { + if (sc->flag & SC_SHOW_GRID) { float val[4][2], idx[4][2]; float min[2], max[2]; - for (a=0; a<4; a++) { - if (a<2) val[a][a%2]= FLT_MAX; - else val[a][a%2]= -FLT_MAX; + for (a = 0; a < 4; a++) { + if (a < 2) + val[a][a%2] = FLT_MAX; + else + val[a][a%2] = -FLT_MAX; } zero_v2(pos); - for (i= 0; i<=n; i++) { - for (j= 0; j<=n; j++) { - if (i==0 || j==0 || i==n || j==n) { + for (i = 0; i <= n; i++) { + for (j = 0; j <= n; j++) { + if (i == 0 || j == 0 || i == n || j == n) { BKE_tracking_apply_intrinsics(tracking, pos, tpos); - for (a=0; a<4; a++) { + for (a = 0; a < 4; a++) { int ok; - if (a<2) ok= tpos[a%2] < val[a][a%2]; - else ok= tpos[a%2] > val[a][a%2]; + if (a<2) + ok = tpos[a%2] < val[a][a%2]; + else + ok= tpos[a%2] > val[a][a%2]; if (ok) { copy_v2_v2(val[a], tpos); - idx[a][0]= j; - idx[a][1]= i; + idx[a][0] = j; + idx[a][1] = i; } } } - pos[0]+= dx; + pos[0] += dx; } - pos[0]= 0.0f; - pos[1]+= dy; + pos[0] = 0.0f; + pos[1] += dy; } INIT_MINMAX2(min, max); - for (a= 0; a<4; a++) { - pos[0]= idx[a][0]*dx; - pos[1]= idx[a][1]*dy; + for (a = 0; a < 4; a++) { + pos[0] = idx[a][0] * dx; + pos[1] = idx[a][1] * dy; BKE_tracking_invert_intrinsics(tracking, pos, tpos); @@ -1150,50 +1213,50 @@ static void draw_distortion(SpaceClip *sc, ARegion *ar, MovieClip *clip, int wid } copy_v2_v2(pos, min); - dx= (max[0]-min[0])/n; - dy= (max[1]-min[1])/n; + dx = (max[0] - min[0]) / n; + dy = (max[1] - min[1]) / n; - for (i= 0; i<=n; i++) { - for (j= 0; j<=n; j++) { + for (i = 0; i <= n; i++) { + for (j = 0; j <= n; j++) { BKE_tracking_apply_intrinsics(tracking, pos, grid[i][j]); - grid[i][j][0]/= width; - grid[i][j][1]/= height*aspy; + grid[i][j][0] /= width; + grid[i][j][1] /= height*aspy; - pos[0]+= dx; + pos[0] += dx; } - pos[0]= min[0]; - pos[1]+= dy; + pos[0] = min[0]; + pos[1] += dy; } glColor3f(1.0f, 0.0f, 0.0f); - for (i= 0; i<=n; i++) { + for (i = 0; i <= n; i++) { glBegin(GL_LINE_STRIP); - for (j= 0; j<=n; j++) { + for (j = 0; j <= n; j++) { glVertex2fv(grid[i][j]); } glEnd(); } - for (j= 0; j<=n; j++) { + for (j = 0; j <= n; j++) { glBegin(GL_LINE_STRIP); - for (i= 0; i<=n; i++) { + for (i = 0; i <= n; i++) { glVertex2fv(grid[i][j]); } glEnd(); } } - if (sc->flag&SC_MANUAL_CALIBRATION && clip->gpd) { + if (sc->flag & SC_MANUAL_CALIBRATION && clip->gpd) { bGPDlayer *layer= clip->gpd->layers.first; while (layer) { - bGPDframe *frame= layer->frames.first; + bGPDframe *frame = layer->frames.first; if (layer->flag & GP_LAYER_HIDE) { - layer= layer->next; + layer = layer->next; continue; } @@ -1202,27 +1265,27 @@ static void draw_distortion(SpaceClip *sc, ARegion *ar, MovieClip *clip, int wid glPointSize((float)(layer->thickness + 2)); while (frame) { - bGPDstroke *stroke= frame->strokes.first; + bGPDstroke *stroke = frame->strokes.first; while (stroke) { - if (stroke->flag&GP_STROKE_2DSPACE) { - if (stroke->totpoints>1) { + if (stroke->flag & GP_STROKE_2DSPACE) { + if (stroke->totpoints > 1) { glBegin(GL_LINE_STRIP); - for (i= 0; itotpoints-1; i++) { + for (i = 0; i < stroke->totpoints - 1; i++) { float npos[2], dpos[2], len; int steps; - pos[0]= stroke->points[i].x*width; - pos[1]= stroke->points[i].y*height*aspy; + pos[0] = stroke->points[i].x * width; + pos[1] = stroke->points[i].y * height * aspy; - npos[0]= stroke->points[i+1].x*width; - npos[1]= stroke->points[i+1].y*height*aspy; + npos[0] = stroke->points[i+1].x * width; + npos[1] = stroke->points[i+1].y * height * aspy; - len= len_v2v2(pos, npos); + len = len_v2v2(pos, npos); steps= ceil(len/5.0f); /* we want to distort only long straight lines */ - if (stroke->totpoints==2) { + if (stroke->totpoints == 2) { BKE_tracking_invert_intrinsics(tracking, pos, pos); BKE_tracking_invert_intrinsics(tracking, npos, npos); } @@ -1230,7 +1293,7 @@ static void draw_distortion(SpaceClip *sc, ARegion *ar, MovieClip *clip, int wid sub_v2_v2v2(dpos, npos, pos); mul_v2_fl(dpos, 1.0f/steps); - for (j= 0; j<=steps; j++) { + for (j = 0; j <= steps; j++) { BKE_tracking_apply_intrinsics(tracking, pos, tpos); glVertex2f(tpos[0]/width, tpos[1]/(height*aspy)); @@ -1239,20 +1302,20 @@ static void draw_distortion(SpaceClip *sc, ARegion *ar, MovieClip *clip, int wid } glEnd(); } - else if (stroke->totpoints==1) { + else if (stroke->totpoints == 1) { glBegin(GL_POINTS); glVertex2f(stroke->points[0].x, stroke->points[0].y); glEnd(); } } - stroke= stroke->next; + stroke = stroke->next; } - frame= frame->next; + frame = frame->next; } - layer= layer->next; + layer = layer->next; } glLineWidth(1.0f); @@ -1276,14 +1339,14 @@ void clip_draw_main(SpaceClip *sc, ARegion *ar, Scene *scene) ED_space_clip_size(sc, &width, &height); ED_space_clip_zoom(sc, ar, &zoomx, &zoomy); - if (sc->flag&SC_SHOW_STABLE) { + if (sc->flag & SC_SHOW_STABLE) { float smat[4][4], ismat[4][4]; - ibuf= ED_space_clip_get_stable_buffer(sc, sc->loc, &sc->scale, &sc->angle); + ibuf = ED_space_clip_get_stable_buffer(sc, sc->loc, &sc->scale, &sc->angle); if (ibuf) { float loc[2]; - float aspect= clip->tracking.camera.pixel_aspect; + float aspect = clip->tracking.camera.pixel_aspect; if (width != ibuf->x) mul_v2_v2fl(loc, sc->loc, (float)width / ibuf->x); @@ -1293,18 +1356,18 @@ void clip_draw_main(SpaceClip *sc, ARegion *ar, Scene *scene) BKE_tracking_stabdata_to_mat4(width, height, aspect, loc, sc->scale, sc->angle, sc->stabmat); unit_m4(smat); - smat[0][0]= 1.0f/width; - smat[1][1]= 1.0f/height; + smat[0][0] = 1.0f / width; + smat[1][1] = 1.0f / height; invert_m4_m4(ismat, smat); mul_serie_m4(sc->unistabmat, smat, sc->stabmat, ismat, NULL, NULL, NULL, NULL, NULL); } } else { - ibuf= ED_space_clip_get_buffer(sc); + ibuf = ED_space_clip_get_buffer(sc); zero_v2(sc->loc); - sc->scale= 1.0f; + sc->scale = 1.0f; unit_m4(sc->stabmat); unit_m4(sc->unistabmat); } @@ -1324,8 +1387,8 @@ void clip_draw_main(SpaceClip *sc, ARegion *ar, Scene *scene) /* draw grease pencil */ void clip_draw_grease_pencil(bContext *C, int onlyv2d) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); ImBuf *ibuf; if (!clip) @@ -1334,8 +1397,8 @@ void clip_draw_grease_pencil(bContext *C, int onlyv2d) if (onlyv2d) { /* if manual calibration is used then grease pencil data is already * drawed in draw_distortion */ - if ((sc->flag&SC_MANUAL_CALIBRATION)==0 || sc->mode!=SC_MODE_DISTORTION) { - ibuf= ED_space_clip_get_buffer(sc); + if ((sc->flag & SC_MANUAL_CALIBRATION)==0 || sc->mode != SC_MODE_DISTORTION) { + ibuf = ED_space_clip_get_buffer(sc); if (ibuf) { glPushMatrix(); diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c index 87b0ac1aac1..3946d4cc36d 100644 --- a/source/blender/editors/space_clip/clip_editor.c +++ b/source/blender/editors/space_clip/clip_editor.c @@ -57,20 +57,20 @@ int ED_space_clip_poll(bContext *C) { - SpaceClip *sc= CTX_wm_space_clip(C); + SpaceClip *sc = CTX_wm_space_clip(C); if (sc && sc->clip) - return 1; + return TRUE; - return 0; + return FALSE; } void ED_space_clip_set(bContext *C, SpaceClip *sc, MovieClip *clip) { - sc->clip= clip; + sc->clip = clip; if (sc->clip && sc->clip->id.us==0) - sc->clip->id.us= 1; + sc->clip->id.us = 1; if (C) WM_event_add_notifier(C, NC_MOVIECLIP|NA_SELECTED, sc->clip); @@ -86,7 +86,7 @@ ImBuf *ED_space_clip_get_buffer(SpaceClip *sc) if (sc->clip) { ImBuf *ibuf; - ibuf= BKE_movieclip_get_postprocessed_ibuf(sc->clip, &sc->user, sc->postproc_flag); + ibuf = BKE_movieclip_get_postprocessed_ibuf(sc->clip, &sc->user, sc->postproc_flag); if (ibuf && (ibuf->rect || ibuf->rect_float)) return ibuf; @@ -103,7 +103,7 @@ ImBuf *ED_space_clip_get_stable_buffer(SpaceClip *sc, float loc[2], float *scale if (sc->clip) { ImBuf *ibuf; - ibuf= BKE_movieclip_get_stable_ibuf(sc->clip, &sc->user, loc, scale, angle, sc->postproc_flag); + ibuf = BKE_movieclip_get_stable_ibuf(sc->clip, &sc->user, loc, scale, angle, sc->postproc_flag); if (ibuf && (ibuf->rect || ibuf->rect_float)) return ibuf; @@ -131,18 +131,18 @@ void ED_space_clip_zoom(SpaceClip *sc, ARegion *ar, float *zoomx, float *zoomy) ED_space_clip_size(sc, &width, &height); - *zoomx= (float)(ar->winrct.xmax - ar->winrct.xmin + 1)/(float)((ar->v2d.cur.xmax - ar->v2d.cur.xmin)*width); - *zoomy= (float)(ar->winrct.ymax - ar->winrct.ymin + 1)/(float)((ar->v2d.cur.ymax - ar->v2d.cur.ymin)*height); + *zoomx = (float)(ar->winrct.xmax - ar->winrct.xmin + 1)/(float)((ar->v2d.cur.xmax - ar->v2d.cur.xmin)*width); + *zoomy = (float)(ar->winrct.ymax - ar->winrct.ymin + 1)/(float)((ar->v2d.cur.ymax - ar->v2d.cur.ymin)*height); } void ED_space_clip_aspect(SpaceClip *sc, float *aspx, float *aspy) { - MovieClip *clip= ED_space_clip(sc); + MovieClip *clip = ED_space_clip(sc); if (clip) BKE_movieclip_aspect(clip, aspx, aspy); else - *aspx= *aspy= 1.0f; + *aspx = *aspy = 1.0f; } void ED_clip_update_frame(const Main *mainp, int cfra) @@ -151,14 +151,15 @@ void ED_clip_update_frame(const Main *mainp, int cfra) wmWindow *win; /* image window, compo node users */ - for (wm=mainp->wm.first; wm; wm= wm->id.next) { /* only 1 wm */ - for (win= wm->windows.first; win; win= win->next) { + for (wm = mainp->wm.first; wm; wm = wm->id.next) { /* only 1 wm */ + for (win = wm->windows.first; win; win = win->next) { ScrArea *sa; - for (sa= win->screen->areabase.first; sa; sa= sa->next) { - if (sa->spacetype==SPACE_CLIP) { - SpaceClip *sc= sa->spacedata.first; - sc->scopes.ok= 0; + for (sa = win->screen->areabase.first; sa; sa = sa->next) { + if (sa->spacetype == SPACE_CLIP) { + SpaceClip *sc = sa->spacedata.first; + + sc->scopes.ok = FALSE; BKE_movieclip_user_set_frame(&sc->user, cfra); } @@ -169,44 +170,45 @@ void ED_clip_update_frame(const Main *mainp, int cfra) static int selected_boundbox(SpaceClip *sc, float min[2], float max[2]) { - MovieClip *clip= ED_space_clip(sc); + MovieClip *clip = ED_space_clip(sc); MovieTrackingTrack *track; - int width, height, ok= 0; + int width, height, ok = FALSE; ListBase *tracksbase= BKE_tracking_get_tracks(&clip->tracking); INIT_MINMAX2(min, max); ED_space_clip_size(sc, &width, &height); - track= tracksbase->first; + track = tracksbase->first; while (track) { if (TRACK_VIEW_SELECTED(sc, track)) { - MovieTrackingMarker *marker= BKE_tracking_get_marker(track, sc->user.framenr); + MovieTrackingMarker *marker = BKE_tracking_get_marker(track, sc->user.framenr); if (marker) { float pos[3]; - pos[0]= marker->pos[0]+track->offset[0]; - pos[1]= marker->pos[1]+track->offset[1]; - pos[2]= 0.0f; + pos[0] = marker->pos[0] + track->offset[0]; + pos[1] = marker->pos[1] + track->offset[1]; + pos[2] = 0.0f; /* undistortion happens for normalized coords */ - if (sc->user.render_flag&MCLIP_PROXY_RENDER_UNDISTORT) + if (sc->user.render_flag & MCLIP_PROXY_RENDER_UNDISTORT) { /* undistortion happens for normalized coords */ ED_clip_point_undistorted_pos(sc, pos, pos); + } - pos[0]*= width; - pos[1]*= height; + pos[0] *= width; + pos[1] *= height; mul_v3_m4v3(pos, sc->stabmat, pos); DO_MINMAX2(pos, min, max); - ok= 1; + ok = TRUE; } } - track= track->next; + track = track->next; } return ok; @@ -219,90 +221,92 @@ int ED_clip_view_selection(SpaceClip *sc, ARegion *ar, int fit) ED_space_clip_size(sc, &frame_width, &frame_height); - if (frame_width==0 || frame_height==0) return 0; + if (frame_width == 0 || frame_height == 0) + return FALSE; if (!selected_boundbox(sc, min, max)) - return 0; + return FALSE; /* center view */ clip_view_center_to_point(sc, (max[0]+min[0])/(2*frame_width), (max[1]+min[1])/(2*frame_height)); - w= max[0]-min[0]; - h= max[1]-min[1]; + w = max[0] - min[0]; + h = max[1] - min[1]; /* set zoom to see all selection */ - if (w>0 && h>0) { + if (w > 0 && h > 0) { int width, height; float zoomx, zoomy, newzoom, aspx, aspy; ED_space_clip_aspect(sc, &aspx, &aspy); - width= ar->winrct.xmax - ar->winrct.xmin + 1; - height= ar->winrct.ymax - ar->winrct.ymin + 1; + width = ar->winrct.xmax - ar->winrct.xmin + 1; + height = ar->winrct.ymax - ar->winrct.ymin + 1; - zoomx= (float)width/w/aspx; - zoomy= (float)height/h/aspy; + zoomx = (float)width / w / aspx; + zoomy = (float)height / h / aspy; - newzoom= 1.0f/power_of_2(1/MIN2(zoomx, zoomy)); + newzoom = 1.0f / power_of_2(1.0f / MIN2(zoomx, zoomy)); if (fit || sc->zoom>newzoom) - sc->zoom= newzoom; + sc->zoom = newzoom; } - return 1; + return TRUE; } void ED_clip_point_undistorted_pos(SpaceClip *sc, float co[2], float nco[2]) { copy_v2_v2(nco, co); - if (sc->user.render_flag&MCLIP_PROXY_RENDER_UNDISTORT) { - MovieClip *clip= ED_space_clip(sc); - float aspy= 1.0f/clip->tracking.camera.pixel_aspect; + if (sc->user.render_flag & MCLIP_PROXY_RENDER_UNDISTORT) { + MovieClip *clip = ED_space_clip(sc); + float aspy = 1.0f / clip->tracking.camera.pixel_aspect; int width, height; ED_space_clip_size(sc, &width, &height); - nco[0]*= width; - nco[1]*= height*aspy; + nco[0] *= width; + nco[1] *= height * aspy; BKE_tracking_invert_intrinsics(&clip->tracking, nco, nco); - nco[0]/= width; - nco[1]/= height*aspy; + + nco[0] /= width; + nco[1] /= height * aspy; } } void ED_clip_point_stable_pos(bContext *C, float x, float y, float *xr, float *yr) { - ARegion *ar= CTX_wm_region(C); - SpaceClip *sc= CTX_wm_space_clip(C); + ARegion *ar = CTX_wm_region(C); + SpaceClip *sc = CTX_wm_space_clip(C); int sx, sy, width, height; - float zoomx, zoomy, pos[3]={0.0f, 0.0f, 0.0f}, imat[4][4]; + float zoomx, zoomy, pos[3] = {0.0f, 0.0f, 0.0f}, imat[4][4]; ED_space_clip_zoom(sc, ar, &zoomx, &zoomy); ED_space_clip_size(sc, &width, &height); UI_view2d_to_region_no_clip(&ar->v2d, 0.0f, 0.0f, &sx, &sy); - pos[0]= (x-sx)/zoomx; - pos[1]= (y-sy)/zoomy; + pos[0] = (x - sx) / zoomx; + pos[1] = (y - sy) / zoomy; invert_m4_m4(imat, sc->stabmat); mul_v3_m4v3(pos, imat, pos); - *xr= pos[0]/width; - *yr= pos[1]/height; + *xr = pos[0] / width; + *yr = pos[1] / height; - if (sc->user.render_flag&MCLIP_PROXY_RENDER_UNDISTORT) { - MovieClip *clip= ED_space_clip(sc); - MovieTracking *tracking= &clip->tracking; - float aspy= 1.0f/tracking->camera.pixel_aspect; - float tmp[2]= {*xr*width, *yr*height*aspy}; + if (sc->user.render_flag & MCLIP_PROXY_RENDER_UNDISTORT) { + MovieClip *clip = ED_space_clip(sc); + MovieTracking *tracking = &clip->tracking; + float aspy = 1.0f / tracking->camera.pixel_aspect; + float tmp[2] = {*xr * width, *yr * height * aspy}; BKE_tracking_apply_intrinsics(tracking, tmp, tmp); - *xr= tmp[0]/width; - *yr= tmp[1]/(height*aspy); + *xr = tmp[0] / width; + *yr = tmp[1] / (height * aspy); } } diff --git a/source/blender/editors/space_clip/clip_graph_draw.c b/source/blender/editors/space_clip/clip_graph_draw.c index c1089d2bbcf..df14491c9c9 100644 --- a/source/blender/editors/space_clip/clip_graph_draw.c +++ b/source/blender/editors/space_clip/clip_graph_draw.c @@ -67,10 +67,10 @@ static void draw_curve_knot(float x, float y, float xscale, float yscale, float if (displist == 0) { GLUquadricObj *qobj; - displist= glGenLists(1); + displist = glGenLists(1); glNewList(displist, GL_COMPILE); - qobj= gluNewQuadric(); + qobj = gluNewQuadric(); gluQuadricDrawStyle(qobj, GLU_SILHOUETTE); gluDisk(qobj, 0, 0.7, 8, 1); gluDeleteQuadric(qobj); @@ -89,21 +89,21 @@ static void draw_curve_knot(float x, float y, float xscale, float yscale, float static void draw_graph_cfra(SpaceClip *sc, ARegion *ar, Scene *scene) { - View2D *v2d= &ar->v2d; + View2D *v2d = &ar->v2d; float xscale, yscale; float vec[2]; /* Draw a light green line to indicate current frame */ - vec[0]= (float)(sc->user.framenr * scene->r.framelen); + vec[0] = (float)(sc->user.framenr * scene->r.framelen); UI_ThemeColor(TH_CFRAME); glLineWidth(2.0); glBegin(GL_LINE_STRIP); - vec[1]= v2d->cur.ymin; + vec[1] = v2d->cur.ymin; glVertex2fv(vec); - vec[1]= v2d->cur.ymax; + vec[1] = v2d->cur.ymax; glVertex2fv(vec); glEnd(); @@ -156,11 +156,11 @@ void tracking_segment_start_cb(void *userdata, MovieTrackingTrack *track, int co copy_v3_v3(col, colors[coord]); if (track==userdata) { - col[3]= 1.0f; + col[3] = 1.0f; glLineWidth(2.0f); } else { - col[3]= 0.5f; + col[3] = 0.5f; glLineWidth(1.0f); } @@ -182,15 +182,17 @@ static void tracking_segment_knot_cb(void *userdata, MovieTrackingTrack *track, struct { MovieTrackingTrack *act_track; int sel; float xscale, yscale, hsize; } *data = userdata; int sel= 0, sel_flag; - if (track!=data->act_track) + if (track != data->act_track) return; - sel_flag= coord == 0 ? MARKER_GRAPH_SEL_X : MARKER_GRAPH_SEL_Y; - sel= (marker->flag & sel_flag) ? 1 : 0; + sel_flag = coord == 0 ? MARKER_GRAPH_SEL_X : MARKER_GRAPH_SEL_Y; + sel = (marker->flag & sel_flag) ? 1 : 0; if (sel == data->sel) { - if (sel) UI_ThemeColor(TH_HANDLE_VERTEX_SELECT); - else UI_ThemeColor(TH_HANDLE_VERTEX); + if (sel) + UI_ThemeColor(TH_HANDLE_VERTEX_SELECT); + else + UI_ThemeColor(TH_HANDLE_VERTEX); draw_curve_knot(marker->framenr, val, data->xscale, data->yscale, data->hsize); } @@ -198,9 +200,9 @@ static void tracking_segment_knot_cb(void *userdata, MovieTrackingTrack *track, static void draw_tracks_curves(View2D *v2d, SpaceClip *sc) { - MovieClip *clip= ED_space_clip(sc); - MovieTracking *tracking= &clip->tracking; - MovieTrackingTrack *act_track= BKE_tracking_active_track(tracking); + MovieClip *clip = ED_space_clip(sc); + MovieTracking *tracking = &clip->tracking; + MovieTrackingTrack *act_track = BKE_tracking_active_track(tracking); int width, height; struct { MovieTrackingTrack *act_track; int sel; float xscale, yscale, hsize; } userdata; @@ -210,9 +212,9 @@ static void draw_tracks_curves(View2D *v2d, SpaceClip *sc) return; /* non-selected knot handles */ - userdata.hsize= UI_GetThemeValuef(TH_HANDLE_VERTEX_SIZE); - userdata.sel= 0; - userdata.act_track= act_track; + userdata.hsize = UI_GetThemeValuef(TH_HANDLE_VERTEX_SIZE); + userdata.sel = FALSE; + userdata.act_track = act_track; UI_view2d_getscale(v2d, &userdata.xscale, &userdata.yscale); clip_graph_tracking_values_iterate(sc, &userdata, tracking_segment_knot_cb, NULL, NULL); @@ -222,35 +224,35 @@ static void draw_tracks_curves(View2D *v2d, SpaceClip *sc) glDisable(GL_BLEND); /* selected knot handles on top of curves */ - userdata.sel= 1; + userdata.sel= TRUE; clip_graph_tracking_values_iterate(sc, &userdata, tracking_segment_knot_cb, NULL, NULL); } static void draw_frame_curves(SpaceClip *sc) { - MovieClip *clip= ED_space_clip(sc); - MovieTracking *tracking= &clip->tracking; - MovieTrackingReconstruction *reconstruction= BKE_tracking_get_reconstruction(tracking); - int i, lines= 0, prevfra= 0; + MovieClip *clip = ED_space_clip(sc); + MovieTracking *tracking = &clip->tracking; + MovieTrackingReconstruction *reconstruction = BKE_tracking_get_reconstruction(tracking); + int i, lines = 0, prevfra = 0; glColor3f(0.0f, 0.0f, 1.0f); - for (i= 0; icamnr; i++) { - MovieReconstructedCamera *camera= &reconstruction->cameras[i]; + for (i = 0; icamnr; i++) { + MovieReconstructedCamera *camera = &reconstruction->cameras[i]; if (lines && camera->framenr!=prevfra+1) { glEnd(); - lines= 0; + lines = 0; } if (!lines) { glBegin(GL_LINE_STRIP); - lines= 1; + lines = 1; } glVertex2f(camera->framenr, camera->error); - prevfra= camera->framenr; + prevfra = camera->framenr; } if (lines) @@ -259,21 +261,21 @@ static void draw_frame_curves(SpaceClip *sc) void clip_draw_graph(SpaceClip *sc, ARegion *ar, Scene *scene) { - MovieClip *clip= ED_space_clip(sc); - View2D *v2d= &ar->v2d; + MovieClip *clip = ED_space_clip(sc); + View2D *v2d = &ar->v2d; View2DGrid *grid; - short unitx= V2D_UNIT_FRAMESCALE, unity= V2D_UNIT_VALUES; + short unitx = V2D_UNIT_FRAMESCALE, unity = V2D_UNIT_VALUES; /* grid */ - grid= UI_view2d_grid_calc(scene, v2d, unitx, V2D_GRID_NOCLAMP, unity, V2D_GRID_NOCLAMP, ar->winx, ar->winy); + grid = UI_view2d_grid_calc(scene, v2d, unitx, V2D_GRID_NOCLAMP, unity, V2D_GRID_NOCLAMP, ar->winx, ar->winy); UI_view2d_grid_draw(v2d, grid, V2D_GRIDLINES_ALL); UI_view2d_grid_free(grid); if (clip) { - if (sc->flag&SC_SHOW_GRAPH_TRACKS) + if (sc->flag & SC_SHOW_GRAPH_TRACKS) draw_tracks_curves(v2d, sc); - if (sc->flag&SC_SHOW_GRAPH_FRAMES) + if (sc->flag & SC_SHOW_GRAPH_FRAMES) draw_frame_curves(sc); } diff --git a/source/blender/editors/space_clip/clip_graph_ops.c b/source/blender/editors/space_clip/clip_graph_ops.c index 4a1f2c56ee0..f8c81c2944a 100644 --- a/source/blender/editors/space_clip/clip_graph_ops.c +++ b/source/blender/editors/space_clip/clip_graph_ops.c @@ -80,17 +80,17 @@ typedef struct { static void toggle_selection_cb(void *userdata, MovieTrackingMarker *marker) { - SelectUserData *data= (SelectUserData *)userdata; + SelectUserData *data = (SelectUserData *)userdata; switch(data->action) { case SEL_SELECT: - marker->flag|= MARKER_GRAPH_SEL; + marker->flag |= MARKER_GRAPH_SEL; break; case SEL_DESELECT: - marker->flag&= ~MARKER_GRAPH_SEL; + marker->flag &= ~MARKER_GRAPH_SEL; break; case SEL_INVERT: - marker->flag^= MARKER_GRAPH_SEL; + marker->flag ^= MARKER_GRAPH_SEL; break; } } @@ -111,47 +111,47 @@ typedef struct { } MouseSelectUserData; static void find_nearest_tracking_segment_cb(void *userdata, MovieTrackingTrack *track, - MovieTrackingMarker *marker, int coord, float val) + MovieTrackingMarker *marker, int coord, float val) { - MouseSelectUserData *data= userdata; - float co[2]= {marker->framenr, val}; + MouseSelectUserData *data = userdata; + float co[2] = {marker->framenr, val}; if (data->has_prev) { - float d= dist_to_line_segment_v2(data->mouse_co, data->prev_co, co); + float d = dist_to_line_segment_v2(data->mouse_co, data->prev_co, co); - if (data->track==NULL || dmin_dist) { - data->track= track; - data->min_dist= d; - data->coord= coord; + if (data->track == NULL || d < data->min_dist) { + data->track = track; + data->min_dist = d; + data->coord = coord; copy_v2_v2(data->min_co, co); } } - data->has_prev= 1; + data->has_prev = TRUE; copy_v2_v2(data->prev_co, co); } void find_nearest_tracking_segment_end_cb(void *userdata) { - MouseSelectUserData *data= userdata; + MouseSelectUserData *data = userdata; - data->has_prev= 0; + data->has_prev = FALSE; } static void find_nearest_tracking_knot_cb(void *userdata, MovieTrackingTrack *track, - MovieTrackingMarker *marker, int coord, float val) + MovieTrackingMarker *marker, int coord, float val) { - MouseSelectUserData *data= userdata; - float dx= marker->framenr-data->mouse_co[0], dy= val-data->mouse_co[1]; - float d= dx*dx+dy*dy; + MouseSelectUserData *data = userdata; + float dx = marker->framenr - data->mouse_co[0], dy = val - data->mouse_co[1]; + float d = dx * dx + dy * dy; - if (data->marker==NULL || dmin_dist) { + if (data->marker == NULL || d < data->min_dist) { float co[2]= {marker->framenr, val}; - data->track= track; - data->marker= marker; - data->min_dist= d; - data->coord= coord; + data->track = track; + data->marker = marker; + data->min_dist = d; + data->coord = coord; copy_v2_v2(data->min_co, co); } @@ -160,26 +160,26 @@ static void find_nearest_tracking_knot_cb(void *userdata, MovieTrackingTrack *tr static void mouse_select_init_data(MouseSelectUserData *userdata, float *co) { memset(userdata, 0, sizeof(MouseSelectUserData)); - userdata->min_dist= FLT_MAX; + userdata->min_dist = FLT_MAX; copy_v2_v2(userdata->mouse_co, co); } static int mouse_select_knot(bContext *C, float co[2], int extend) { - SpaceClip *sc= CTX_wm_space_clip(C); + SpaceClip *sc = CTX_wm_space_clip(C); MovieClip *clip= ED_space_clip(sc); - ARegion *ar= CTX_wm_region(C); - View2D *v2d= &ar->v2d; - MovieTracking *tracking= &clip->tracking; - MovieTrackingTrack *act_track= BKE_tracking_active_track(tracking); - static const int delta= 6; + ARegion *ar = CTX_wm_region(C); + View2D *v2d = &ar->v2d; + MovieTracking *tracking = &clip->tracking; + MovieTrackingTrack *act_track = BKE_tracking_active_track(tracking); + static const int delta = 6; if (act_track) { MouseSelectUserData userdata; mouse_select_init_data(&userdata, co); - clip_graph_tracking_values_iterate_track(sc, act_track, - &userdata, find_nearest_tracking_knot_cb, NULL, NULL); + clip_graph_tracking_values_iterate_track(sc, act_track, &userdata, + find_nearest_tracking_knot_cb, NULL, NULL); if (userdata.marker) { int x1, y1, x2, y2; @@ -187,51 +187,53 @@ static int mouse_select_knot(bContext *C, float co[2], int extend) UI_view2d_view_to_region(v2d, co[0], co[1], &x1, &y1); UI_view2d_view_to_region(v2d, userdata.min_co[0], userdata.min_co[1], &x2, &y2); - if (abs(x2-x1)<=delta && abs(y2-y1)<=delta) { + if (abs(x2 - x1) <= delta && abs(y2 - y1) <= delta) { if (!extend) { SelectUserData selectdata = {SEL_DESELECT}; + clip_graph_tracking_iterate(sc, &selectdata, toggle_selection_cb); } - if (userdata.coord==0) - userdata.marker->flag|= MARKER_GRAPH_SEL_X; + if (userdata.coord == 0) + userdata.marker->flag |= MARKER_GRAPH_SEL_X; else - userdata.marker->flag|= MARKER_GRAPH_SEL_Y; + userdata.marker->flag |= MARKER_GRAPH_SEL_Y; - return 1; + return TRUE; } } } - return 0; + return FALSE; } static int mouse_select_curve(bContext *C, float co[2], int extend) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); - MovieTracking *tracking= &clip->tracking; - MovieTrackingTrack *act_track= BKE_tracking_active_track(tracking); + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); + MovieTracking *tracking = &clip->tracking; + MovieTrackingTrack *act_track = BKE_tracking_active_track(tracking); MouseSelectUserData userdata; mouse_select_init_data(&userdata, co); - clip_graph_tracking_values_iterate(sc, &userdata, find_nearest_tracking_segment_cb, NULL, find_nearest_tracking_segment_end_cb); + clip_graph_tracking_values_iterate(sc, &userdata, find_nearest_tracking_segment_cb, + NULL, find_nearest_tracking_segment_end_cb); if (userdata.track) { if (extend) { - if (act_track==userdata.track) { + if (act_track == userdata.track) { /* currently only single curve can be selected (selected curve represents active track) */ - act_track= NULL; + act_track = NULL; } } - else if (act_track!=userdata.track) { + else if (act_track != userdata.track) { MovieTrackingMarker *marker; SelectUserData selectdata = {SEL_DESELECT}; - tracking->act_track= userdata.track; + tracking->act_track = userdata.track; /* make active track be centered to screen */ - marker= BKE_tracking_get_marker(userdata.track, sc->user.framenr); + marker = BKE_tracking_get_marker(userdata.track, sc->user.framenr); clip_view_center_to_point(sc, marker->pos[0], marker->pos[1]); @@ -239,22 +241,22 @@ static int mouse_select_curve(bContext *C, float co[2], int extend) clip_graph_tracking_iterate(sc, &selectdata, toggle_selection_cb); } - return 1; + return TRUE; } - return 0; + return FALSE; } static int mouse_select(bContext *C, float co[2], int extend) { - int sel= 0; + int sel = FALSE; /* first try to select knot on selected curves */ - sel= mouse_select_knot(C, co, extend); + sel = mouse_select_knot(C, co, extend); if (!sel) { /* if there's no close enough knot to mouse osition, select nearest curve */ - sel= mouse_select_curve(C, co, extend); + sel = mouse_select_curve(C, co, extend); } if (sel) @@ -266,7 +268,7 @@ static int mouse_select(bContext *C, float co[2], int extend) static int select_exec(bContext *C, wmOperator *op) { float co[2]; - int extend= RNA_boolean_get(op->ptr, "extend"); + int extend = RNA_boolean_get(op->ptr, "extend"); RNA_float_get_array(op->ptr, "location", co); @@ -275,7 +277,7 @@ static int select_exec(bContext *C, wmOperator *op) static int select_invoke(bContext *C, wmOperator *op, wmEvent *event) { - ARegion *ar= CTX_wm_region(C); + ARegion *ar = CTX_wm_region(C); float co[2]; UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &co[0], &co[1]); @@ -343,8 +345,8 @@ static int border_select_graph_exec(bContext *C, wmOperator *op) SpaceClip *sc = CTX_wm_space_clip(C); ARegion *ar = CTX_wm_region(C); MovieClip *clip = ED_space_clip(sc); - MovieTracking *tracking= &clip->tracking; - MovieTrackingTrack *act_track= BKE_tracking_active_track(tracking); + MovieTracking *tracking = &clip->tracking; + MovieTrackingTrack *act_track = BKE_tracking_active_track(tracking); BorderSelectuserData userdata; rcti rect; @@ -399,7 +401,7 @@ static int graph_select_all_markers_exec(bContext *C, wmOperator *op) SpaceClip *sc = CTX_wm_space_clip(C); MovieClip *clip = ED_space_clip(sc); MovieTracking *tracking = &clip->tracking; - MovieTrackingTrack *act_track= BKE_tracking_active_track(tracking); + MovieTrackingTrack *act_track = BKE_tracking_active_track(tracking); MovieTrackingMarker *marker; int action = RNA_enum_get(op->ptr, "action"); int a; @@ -462,11 +464,11 @@ void CLIP_OT_graph_select_all_markers(wmOperatorType *ot) static int delete_curve_exec(bContext *C, wmOperator *UNUSED(op)) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); - MovieTracking *tracking= &clip->tracking; - ListBase *tracksbase= BKE_tracking_get_tracks(tracking); - MovieTrackingTrack *act_track= BKE_tracking_active_track(tracking); + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); + MovieTracking *tracking = &clip->tracking; + ListBase *tracksbase = BKE_tracking_get_tracks(tracking); + MovieTrackingTrack *act_track = BKE_tracking_active_track(tracking); if (act_track) clip_delete_track(C, clip, tracksbase, act_track); @@ -494,17 +496,17 @@ void CLIP_OT_graph_delete_curve(wmOperatorType *ot) static int delete_knot_exec(bContext *C, wmOperator *UNUSED(op)) { - SpaceClip *sc= CTX_wm_space_clip(C); + SpaceClip *sc = CTX_wm_space_clip(C); MovieClip *clip= ED_space_clip(sc); - MovieTracking *tracking= &clip->tracking; - ListBase *tracksbase= BKE_tracking_get_tracks(tracking); - MovieTrackingTrack *act_track= BKE_tracking_active_track(tracking); + MovieTracking *tracking = &clip->tracking; + ListBase *tracksbase = BKE_tracking_get_tracks(tracking); + MovieTrackingTrack *act_track = BKE_tracking_active_track(tracking); if (act_track) { - int a= 0; + int a = 0; - while (amarkersnr) { - MovieTrackingMarker *marker= &act_track->markers[a]; + while (a < act_track->markersnr) { + MovieTrackingMarker *marker = &act_track->markers[a]; if (marker->flag & MARKER_GRAPH_SEL) clip_delete_marker(C, clip, tracksbase, act_track, marker); @@ -540,10 +542,13 @@ typedef struct { static void view_all_cb(void *userdata, MovieTrackingTrack *UNUSED(track), MovieTrackingMarker *UNUSED(marker), int UNUSED(coord), float val) { - ViewAllUserData *data = (ViewAllUserData *)userdata; + ViewAllUserData *data = (ViewAllUserData *) userdata; + + if (val < data->min) + data->min = val; - if (val < data->min) data->min = val; - if (val > data->max) data->max = val; + if (val > data->max) + data->max = val; } static int view_all_exec(bContext *C, wmOperator *UNUSED(op)) @@ -561,8 +566,8 @@ static int view_all_exec(bContext *C, wmOperator *UNUSED(op)) clip_graph_tracking_values_iterate(sc, &userdata, view_all_cb, NULL, NULL); /* set extents of view to start/end frames */ - v2d->cur.xmin = (float)SFRA; - v2d->cur.xmax = (float)EFRA; + v2d->cur.xmin = (float) SFRA; + v2d->cur.xmax = (float) EFRA; if (userdata.min < userdata.max) { v2d->cur.ymin = userdata.min; @@ -574,11 +579,11 @@ static int view_all_exec(bContext *C, wmOperator *UNUSED(op)) } /* we need an extra "buffer" factor on either side so that the endpoints are visible */ - extra= 0.01f * (v2d->cur.xmax - v2d->cur.xmin); + extra = 0.01f * (v2d->cur.xmax - v2d->cur.xmin); v2d->cur.xmin -= extra; v2d->cur.xmax += extra; - extra= 0.01f * (v2d->cur.ymax - v2d->cur.ymin); + extra = 0.01f * (v2d->cur.ymax - v2d->cur.ymin); v2d->cur.ymin -= extra; v2d->cur.ymax += extra; diff --git a/source/blender/editors/space_clip/clip_intern.h b/source/blender/editors/space_clip/clip_intern.h index 8d4da7e995c..425a1da9ec5 100644 --- a/source/blender/editors/space_clip/clip_intern.h +++ b/source/blender/editors/space_clip/clip_intern.h @@ -97,7 +97,7 @@ void clip_graph_tracking_values_iterate(struct SpaceClip *sc, void *userdata, void (*segment_end) (void *userdata)); void clip_graph_tracking_iterate(struct SpaceClip *sc, void *userdata, - void (*func) (void *userdata, struct MovieTrackingMarker *marker)); + void (*func) (void *userdata, struct MovieTrackingMarker *marker)); void clip_delete_track(struct bContext *C, struct MovieClip *clip, struct ListBase *tracksbase, struct MovieTrackingTrack *track); void clip_delete_marker(struct bContext *C, struct MovieClip *clip, struct ListBase *tracksbase, struct MovieTrackingTrack *track, struct MovieTrackingMarker *marker); diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c index ff8feb69bd9..7e1bbc254e9 100644 --- a/source/blender/editors/space_clip/clip_ops.c +++ b/source/blender/editors/space_clip/clip_ops.c @@ -4,7 +4,7 @@ * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -70,31 +70,31 @@ static void sclip_zoom_set(SpaceClip *sc, ARegion *ar, float zoom, float location[2]) { - float oldzoom= sc->zoom; + float oldzoom = sc->zoom; int width, height; - sc->zoom= zoom; + sc->zoom = zoom; if (sc->zoom < 0.1f || sc->zoom > 4.0f) { /* check zoom limits */ ED_space_clip_size(sc, &width, &height); - width*= sc->zoom; - height*= sc->zoom; + width *= sc->zoom; + height *= sc->zoom; if ((width < 4) && (height < 4)) - sc->zoom= oldzoom; + sc->zoom = oldzoom; else if ((ar->winrct.xmax - ar->winrct.xmin) <= sc->zoom) - sc->zoom= oldzoom; + sc->zoom = oldzoom; else if ((ar->winrct.ymax - ar->winrct.ymin) <= sc->zoom) - sc->zoom= oldzoom; + sc->zoom = oldzoom; } if ((U.uiflag & USER_ZOOM_TO_MOUSEPOS) && location) { ED_space_clip_size(sc, &width, &height); - sc->xof+= ((location[0]-0.5f)*width-sc->xof)*(sc->zoom-oldzoom)/sc->zoom; - sc->yof+= ((location[1]-0.5f)*height-sc->yof)*(sc->zoom-oldzoom)/sc->zoom; + sc->xof += ((location[0] - 0.5f) * width-sc->xof) * (sc->zoom-oldzoom) / sc->zoom; + sc->yof += ((location[1] - 0.5f) * height-sc->yof) * (sc->zoom-oldzoom) / sc->zoom; } } @@ -105,8 +105,8 @@ static void sclip_zoom_set_factor(SpaceClip *sc, ARegion *ar, float zoomfac, flo static void sclip_zoom_set_factor_exec(bContext *C, wmEvent *event, float factor) { - SpaceClip *sc= CTX_wm_space_clip(C); - ARegion *ar= CTX_wm_region(C); + SpaceClip *sc = CTX_wm_space_clip(C); + ARegion *ar = CTX_wm_region(C); float location[2], *mpos = NULL; if (event) { @@ -124,6 +124,7 @@ static void sclip_zoom_set_factor_exec(bContext *C, wmEvent *event, float factor static void clip_filesel(bContext *C, wmOperator *op, const char *path) { RNA_string_set(op->ptr, "filepath", path); + WM_event_add_fileselect(C, op); } @@ -131,32 +132,32 @@ static void open_init(bContext *C, wmOperator *op) { PropertyPointerRNA *pprop; - op->customdata= pprop= MEM_callocN(sizeof(PropertyPointerRNA), "OpenPropertyPointerRNA"); + op->customdata = pprop = MEM_callocN(sizeof(PropertyPointerRNA), "OpenPropertyPointerRNA"); uiIDContextProperty(C, &pprop->ptr, &pprop->prop); } static int open_cancel(bContext *UNUSED(C), wmOperator *op) { MEM_freeN(op->customdata); - op->customdata= NULL; + op->customdata = NULL; return OPERATOR_CANCELLED; } static int open_exec(bContext *C, wmOperator *op) { - SpaceClip *sc= CTX_wm_space_clip(C); + SpaceClip *sc = CTX_wm_space_clip(C); PropertyPointerRNA *pprop; PointerRNA idptr; - MovieClip *clip= NULL; + MovieClip *clip = NULL; char str[FILE_MAX]; RNA_string_get(op->ptr, "filepath", str); /* default to frame 1 if there's no scene in context */ - errno= 0; + errno = 0; - clip= BKE_add_movieclip_file(str); + clip = BKE_add_movieclip_file(str); if (!clip) { if (op->customdata) @@ -171,7 +172,7 @@ static int open_exec(bContext *C, wmOperator *op) open_init(C, op); /* hook into UI */ - pprop= op->customdata; + pprop = op->customdata; if (pprop->prop) { /* when creating new ID blocks, use is already 1, but RNA @@ -195,15 +196,15 @@ static int open_exec(bContext *C, wmOperator *op) static int open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { - SpaceClip *sc= CTX_wm_space_clip(C); - char *path= U.textudir; - MovieClip *clip= NULL; + SpaceClip *sc = CTX_wm_space_clip(C); + char *path = U.textudir; + MovieClip *clip = NULL; if (sc) - clip= ED_space_clip(sc); + clip = ED_space_clip(sc); if (clip) - path= clip->name; + path = clip->name; if (!RNA_struct_property_is_set(op->ptr, "relative_path")) RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS); @@ -241,7 +242,7 @@ void CLIP_OT_open(wmOperatorType *ot) static int reload_exec(bContext *C, wmOperator *UNUSED(op)) { - MovieClip *clip= CTX_data_edit_movieclip(C); + MovieClip *clip = CTX_data_edit_movieclip(C); if (!clip) return OPERATOR_CANCELLED; @@ -275,17 +276,19 @@ typedef struct ViewPanData { static void view_pan_init(bContext *C, wmOperator *op, wmEvent *event) { - SpaceClip *sc= CTX_wm_space_clip(C); + SpaceClip *sc = CTX_wm_space_clip(C); ViewPanData *vpd; - op->customdata= vpd= MEM_callocN(sizeof(ViewPanData), "ClipViewPanData"); + op->customdata = vpd = MEM_callocN(sizeof(ViewPanData), "ClipViewPanData"); WM_cursor_modal(CTX_wm_window(C), BC_NSEW_SCROLLCURSOR); - vpd->x= event->x; - vpd->y= event->y; + vpd->x = event->x; + vpd->y = event->y; - if (sc->flag&SC_LOCK_SELECTION) vpd->vec= &sc->xlockof; - else vpd->vec= &sc->xof; + if (sc->flag & SC_LOCK_SELECTION) + vpd->vec= &sc->xlockof; + else + vpd->vec= &sc->xof; copy_v2_v2(&vpd->xof, vpd->vec); copy_v2_v2(&vpd->xorig, &vpd->xof); @@ -297,7 +300,7 @@ static void view_pan_init(bContext *C, wmOperator *op, wmEvent *event) static void view_pan_exit(bContext *C, wmOperator *op, int cancel) { - ViewPanData *vpd= op->customdata; + ViewPanData *vpd = op->customdata; if (cancel) { copy_v2_v2(vpd->vec, &vpd->xorig); @@ -311,18 +314,18 @@ static void view_pan_exit(bContext *C, wmOperator *op, int cancel) static int view_pan_exec(bContext *C, wmOperator *op) { - SpaceClip *sc= CTX_wm_space_clip(C); + SpaceClip *sc = CTX_wm_space_clip(C); float offset[2]; RNA_float_get_array(op->ptr, "offset", offset); - if (sc->flag&SC_LOCK_SELECTION) { - sc->xlockof+= offset[0]; - sc->ylockof+= offset[1]; + if (sc->flag & SC_LOCK_SELECTION) { + sc->xlockof += offset[0]; + sc->ylockof += offset[1]; } else { - sc->xof+= offset[0]; - sc->yof+= offset[1]; + sc->xof += offset[0]; + sc->yof += offset[1]; } ED_region_tag_redraw(CTX_wm_region(C)); @@ -332,47 +335,52 @@ static int view_pan_exec(bContext *C, wmOperator *op) static int view_pan_invoke(bContext *C, wmOperator *op, wmEvent *event) { - if (event->type==MOUSEPAN) { - SpaceClip *sc= CTX_wm_space_clip(C); + if (event->type == MOUSEPAN) { + SpaceClip *sc = CTX_wm_space_clip(C); float offset[2]; - offset[0]= (event->x - event->prevx)/sc->zoom; - offset[1]= (event->y - event->prevy)/sc->zoom; + offset[0] = (event->x - event->prevx) / sc->zoom; + offset[1] = (event->y - event->prevy) / sc->zoom; RNA_float_set_array(op->ptr, "offset", offset); view_pan_exec(C, op); + return OPERATOR_FINISHED; } else { view_pan_init(C, op, event); + return OPERATOR_RUNNING_MODAL; } } static int view_pan_modal(bContext *C, wmOperator *op, wmEvent *event) { - SpaceClip *sc= CTX_wm_space_clip(C); - ViewPanData *vpd= op->customdata; + SpaceClip *sc = CTX_wm_space_clip(C); + ViewPanData *vpd = op->customdata; float offset[2]; switch(event->type) { case MOUSEMOVE: copy_v2_v2(vpd->vec, &vpd->xorig); - offset[0]= (vpd->x - event->x)/sc->zoom; - offset[1]= (vpd->y - event->y)/sc->zoom; + offset[0] = (vpd->x - event->x) / sc->zoom; + offset[1] = (vpd->y - event->y) / sc->zoom; RNA_float_set_array(op->ptr, "offset", offset); view_pan_exec(C, op); break; case ESCKEY: view_pan_exit(C, op, 1); + return OPERATOR_CANCELLED; case SPACEKEY: view_pan_exit(C, op, 0); + return OPERATOR_FINISHED; default: - if (event->type==vpd->event_type && event->val==KM_RELEASE) { + if (event->type == vpd->event_type && event->val == KM_RELEASE) { view_pan_exit(C, op, 0); + return OPERATOR_FINISHED; } break; @@ -420,16 +428,16 @@ typedef struct ViewZoomData { static void view_zoom_init(bContext *C, wmOperator *op, wmEvent *event) { - SpaceClip *sc= CTX_wm_space_clip(C); + SpaceClip *sc = CTX_wm_space_clip(C); ViewZoomData *vpd; op->customdata= vpd= MEM_callocN(sizeof(ViewZoomData), "ClipViewZoomData"); WM_cursor_modal(CTX_wm_window(C), BC_NSEW_SCROLLCURSOR); - vpd->x= event->x; - vpd->y= event->y; - vpd->zoom= sc->zoom; - vpd->event_type= event->type; + vpd->x = event->x; + vpd->y = event->y; + vpd->zoom = sc->zoom; + vpd->event_type = event->type; ED_clip_mouse_pos(C, event, vpd->location); @@ -438,11 +446,11 @@ static void view_zoom_init(bContext *C, wmOperator *op, wmEvent *event) static void view_zoom_exit(bContext *C, wmOperator *op, int cancel) { - SpaceClip *sc= CTX_wm_space_clip(C); - ViewZoomData *vpd= op->customdata; + SpaceClip *sc = CTX_wm_space_clip(C); + ViewZoomData *vpd = op->customdata; if (cancel) { - sc->zoom= vpd->zoom; + sc->zoom = vpd->zoom; ED_region_tag_redraw(CTX_wm_region(C)); } @@ -452,8 +460,8 @@ static void view_zoom_exit(bContext *C, wmOperator *op, int cancel) static int view_zoom_exec(bContext *C, wmOperator *op) { - SpaceClip *sc= CTX_wm_space_clip(C); - ARegion *ar= CTX_wm_region(C); + SpaceClip *sc = CTX_wm_space_clip(C); + ARegion *ar = CTX_wm_region(C); sclip_zoom_set_factor(sc, ar, RNA_float_get(op->ptr, "factor"), NULL); @@ -464,10 +472,10 @@ static int view_zoom_exec(bContext *C, wmOperator *op) static int view_zoom_invoke(bContext *C, wmOperator *op, wmEvent *event) { - if (event->type==MOUSEZOOM) { + if (event->type == MOUSEZOOM) { float factor; - factor= 1.0f + (event->x-event->prevx+event->y-event->prevy)/300.0f; + factor = 1.0f + (event->x - event->prevx + event->y - event->prevy) / 300.0f; RNA_float_set(op->ptr, "factor", factor); sclip_zoom_set_factor_exec(C, event, factor); @@ -483,21 +491,22 @@ static int view_zoom_invoke(bContext *C, wmOperator *op, wmEvent *event) static int view_zoom_modal(bContext *C, wmOperator *op, wmEvent *event) { - SpaceClip *sc= CTX_wm_space_clip(C); - ARegion *ar= CTX_wm_region(C); - ViewZoomData *vpd= op->customdata; + SpaceClip *sc = CTX_wm_space_clip(C); + ARegion *ar = CTX_wm_region(C); + ViewZoomData *vpd = op->customdata; float factor; switch(event->type) { case MOUSEMOVE: - factor= 1.0f + (vpd->x-event->x+vpd->y-event->y)/300.0f; + factor = 1.0f + (vpd->x-event->x + vpd->y - event->y) / 300.0f; RNA_float_set(op->ptr, "factor", factor); - sclip_zoom_set(sc, ar, vpd->zoom*factor, vpd->location); + sclip_zoom_set(sc, ar, vpd->zoom * factor, vpd->location); ED_region_tag_redraw(CTX_wm_region(C)); break; default: - if (event->type==vpd->event_type && event->val==KM_RELEASE) { + if (event->type == vpd->event_type && event->val == KM_RELEASE) { view_zoom_exit(C, op, 0); + return OPERATOR_FINISHED; } break; @@ -509,6 +518,7 @@ static int view_zoom_modal(bContext *C, wmOperator *op, wmEvent *event) static int view_zoom_cancel(bContext *C, wmOperator *op) { view_zoom_exit(C, op, 1); + return OPERATOR_CANCELLED; } @@ -537,8 +547,8 @@ void CLIP_OT_view_zoom(wmOperatorType *ot) static int view_zoom_in_exec(bContext *C, wmOperator *op) { - SpaceClip *sc= CTX_wm_space_clip(C); - ARegion *ar= CTX_wm_region(C); + SpaceClip *sc = CTX_wm_space_clip(C); + ARegion *ar = CTX_wm_region(C); float location[2]; RNA_float_get_array(op->ptr, "location", location); @@ -577,8 +587,8 @@ void CLIP_OT_view_zoom_in(wmOperatorType *ot) static int view_zoom_out_exec(bContext *C, wmOperator *op) { - SpaceClip *sc= CTX_wm_space_clip(C); - ARegion *ar= CTX_wm_region(C); + SpaceClip *sc = CTX_wm_space_clip(C); + ARegion *ar = CTX_wm_region(C); float location[2]; RNA_float_get_array(op->ptr, "location", location); @@ -619,14 +629,14 @@ void CLIP_OT_view_zoom_out(wmOperatorType *ot) static int view_zoom_ratio_exec(bContext *C, wmOperator *op) { - SpaceClip *sc= CTX_wm_space_clip(C); - ARegion *ar= CTX_wm_region(C); + SpaceClip *sc = CTX_wm_space_clip(C); + ARegion *ar = CTX_wm_region(C); sclip_zoom_set(sc, ar, RNA_float_get(op->ptr, "ratio"), NULL); /* ensure pixel exact locations for draw */ - sc->xof= (int)sc->xof; - sc->yof= (int)sc->yof; + sc->xof= (int) sc->xof; + sc->yof= (int) sc->yof; ED_region_tag_redraw(CTX_wm_region(C)); @@ -660,31 +670,31 @@ static int view_all_exec(bContext *C, wmOperator *op) float zoomx, zoomy; /* retrieve state */ - sc= CTX_wm_space_clip(C); - ar= CTX_wm_region(C); + sc = CTX_wm_space_clip(C); + ar = CTX_wm_region(C); ED_space_clip_size(sc, &w, &h); ED_space_clip_aspect(sc, &aspx, &aspy); - w= w*aspx; - h= h*aspy; + w = w * aspx; + h = h * aspy; /* check if the image will fit in the image with zoom==1 */ - width= ar->winrct.xmax - ar->winrct.xmin + 1; - height= ar->winrct.ymax - ar->winrct.ymin + 1; + width = ar->winrct.xmax - ar->winrct.xmin + 1; + height = ar->winrct.ymax - ar->winrct.ymin + 1; if (fit_view) { const int margin = 5; /* margin from border */ - zoomx= (float)width / (w + 2*margin); - zoomy= (float)height / (h + 2*margin); + zoomx= (float) width / (w + 2 * margin); + zoomy= (float) height / (h + 2 * margin); sclip_zoom_set(sc, ar, MIN2(zoomx, zoomy), NULL); } else { if ((w >= width || h >= height) && (width > 0 && height > 0)) { - zoomx= (float)width/w; - zoomy= (float)height/h; + zoomx= (float) width / w; + zoomy= (float) height / h; /* find the zoom value that will fit the image in the image space */ sclip_zoom_set(sc, ar, 1.0f/power_of_2(1/MIN2(zoomx, zoomy)), NULL); @@ -693,7 +703,7 @@ static int view_all_exec(bContext *C, wmOperator *op) sclip_zoom_set(sc, ar, 1.0f, NULL); } - sc->xof= sc->yof= 0.0f; + sc->xof = sc->yof = 0.0f; ED_region_tag_redraw(CTX_wm_region(C)); @@ -718,11 +728,11 @@ void CLIP_OT_view_all(wmOperatorType *ot) static int view_selected_exec(bContext *C, wmOperator *UNUSED(op)) { - SpaceClip *sc= CTX_wm_space_clip(C); - ARegion *ar= CTX_wm_region(C); + SpaceClip *sc = CTX_wm_space_clip(C); + ARegion *ar = CTX_wm_region(C); - sc->xlockof= 0.0f; - sc->ylockof= 0.0f; + sc->xlockof = 0.0f; + sc->ylockof = 0.0f; ED_clip_view_selection(sc, ar, 1); ED_region_tag_redraw(CTX_wm_region(C)); @@ -754,10 +764,10 @@ static int change_frame_poll(bContext *C) static void change_frame_apply(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); /* set the new frame number */ - CFRA= RNA_int_get(op->ptr, "frame"); + CFRA = RNA_int_get(op->ptr, "frame"); FRAMENUMBER_MIN_CLAMP(CFRA); SUBFRA = 0.0f; @@ -775,21 +785,21 @@ static int change_frame_exec(bContext *C, wmOperator *op) static int frame_from_event(bContext *C, wmEvent *event) { - ARegion *ar= CTX_wm_region(C); - Scene *scene= CTX_data_scene(C); - int framenr= 0; + ARegion *ar = CTX_wm_region(C); + Scene *scene = CTX_data_scene(C); + int framenr = 0; if (ar->regiontype == RGN_TYPE_WINDOW) { - float sfra= SFRA, efra= EFRA, framelen= ar->winx/(efra-sfra+1); + float sfra = SFRA, efra = EFRA, framelen = ar->winx / (efra - sfra + 1); - framenr= sfra+event->mval[0]/framelen; + framenr = sfra + event->mval[0] / framelen; } else { float viewx, viewy; UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &viewx, &viewy); - framenr= (int)floor(viewx+0.5f); + framenr= (int) floor(viewx + 0.5f); } return framenr; @@ -797,10 +807,10 @@ static int frame_from_event(bContext *C, wmEvent *event) static int change_frame_invoke(bContext *C, wmOperator *op, wmEvent *event) { - ARegion *ar= CTX_wm_region(C); + ARegion *ar = CTX_wm_region(C); if (ar->regiontype == RGN_TYPE_WINDOW) { - if (event->mval[1]>16) + if (event->mval[1] > 16) return OPERATOR_PASS_THROUGH; } @@ -827,7 +837,7 @@ static int change_frame_modal(bContext *C, wmOperator *op, wmEvent *event) case LEFTMOUSE: case RIGHTMOUSE: - if (event->val==KM_RELEASE) + if (event->val == KM_RELEASE) return OPERATOR_FINISHED; break; } @@ -885,10 +895,17 @@ static int proxy_bitflag_to_array(int size_flag, int build_sizes[4], int undisto MCLIP_PROXY_UNDISTORTED_SIZE_100}}; int size_nr = undistort ? 1 : 0; - if (size_flag & size_flags[size_nr][0]) build_sizes[build_count++]= MCLIP_PROXY_RENDER_SIZE_25; - if (size_flag & size_flags[size_nr][1]) build_sizes[build_count++]= MCLIP_PROXY_RENDER_SIZE_50; - if (size_flag & size_flags[size_nr][2]) build_sizes[build_count++]= MCLIP_PROXY_RENDER_SIZE_75; - if (size_flag & size_flags[size_nr][3]) build_sizes[build_count++]= MCLIP_PROXY_RENDER_SIZE_100; + if (size_flag & size_flags[size_nr][0]) + build_sizes[build_count++]= MCLIP_PROXY_RENDER_SIZE_25; + + if (size_flag & size_flags[size_nr][1]) + build_sizes[build_count++]= MCLIP_PROXY_RENDER_SIZE_50; + + if (size_flag & size_flags[size_nr][2]) + build_sizes[build_count++]= MCLIP_PROXY_RENDER_SIZE_75; + + if (size_flag & size_flags[size_nr][3]) + build_sizes[build_count++]= MCLIP_PROXY_RENDER_SIZE_100; return build_count; } @@ -896,19 +913,19 @@ static int proxy_bitflag_to_array(int size_flag, int build_sizes[4], int undisto /* only this runs inside thread */ static void proxy_startjob(void *pjv, short *stop, short *do_update, float *progress) { - ProxyJob *pj= pjv; - Scene *scene=pj->scene; - MovieClip *clip= pj->clip; - struct MovieDistortion *distortion= NULL; + ProxyJob *pj = pjv; + Scene *scene = pj->scene; + MovieClip *clip = pj->clip; + struct MovieDistortion *distortion = NULL; short size_flag; - int cfra, sfra= SFRA, efra= EFRA; - int build_sizes[4], build_count= 0; - int build_undistort_sizes[4], build_undistort_count= 0; + int cfra, sfra = SFRA, efra = EFRA; + int build_sizes[4], build_count = 0; + int build_undistort_sizes[4], build_undistort_count = 0; - size_flag= clip->proxy.build_size_flag; + size_flag = clip->proxy.build_size_flag; - build_count= proxy_bitflag_to_array(size_flag, build_sizes, 0); - build_undistort_count= proxy_bitflag_to_array(size_flag, build_undistort_sizes, 1); + build_count = proxy_bitflag_to_array(size_flag, build_sizes, 0); + build_undistort_count = proxy_bitflag_to_array(size_flag, build_undistort_sizes, 1); if (clip->source == MCLIP_SRC_MOVIE) { if (pj->index_context) @@ -921,15 +938,15 @@ static void proxy_startjob(void *pjv, short *stop, short *do_update, float *prog return; } else { - sfra= 1; - efra= IMB_anim_get_duration(clip->anim, IMB_TC_NONE); + sfra = 1; + efra = IMB_anim_get_duration(clip->anim, IMB_TC_NONE); } } if (build_undistort_count) - distortion= BKE_tracking_distortion_create(); + distortion = BKE_tracking_distortion_create(); - for (cfra= sfra; cfra<=efra; cfra++) { + for (cfra = sfra; cfra <= efra; cfra++) { if (clip->source != MCLIP_SRC_MOVIE) BKE_movieclip_build_proxy_frame(clip, pj->clip_flag, NULL, cfra, build_sizes, build_count, 0); @@ -938,8 +955,8 @@ static void proxy_startjob(void *pjv, short *stop, short *do_update, float *prog if (*stop || G.afbreek) break; - *do_update= 1; - *progress= ((float)cfra)/(efra-sfra); + *do_update = TRUE; + *progress= ((float) cfra) / (efra - sfra); } if (distortion) @@ -968,21 +985,21 @@ static int clip_rebuild_proxy_exec(bContext *C, wmOperator *UNUSED(op)) { wmJob * steve; ProxyJob *pj; - Scene *scene= CTX_data_scene(C); - ScrArea *sa= CTX_wm_area(C); - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); + Scene *scene = CTX_data_scene(C); + ScrArea *sa = CTX_wm_area(C); + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); - if ((clip->flag&MCLIP_USE_PROXY)==0) + if ((clip->flag & MCLIP_USE_PROXY) == 0) return OPERATOR_CANCELLED; - steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), sa, "Building Proxies", WM_JOB_PROGRESS); + steve = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), sa, "Building Proxies", WM_JOB_PROGRESS); - pj= MEM_callocN(sizeof(ProxyJob), "proxy rebuild job"); - pj->scene= scene; - pj->main= CTX_data_main(C); - pj->clip= clip; - pj->clip_flag= clip->flag&MCLIP_TIMECODE_FLAGS; + pj = MEM_callocN(sizeof(ProxyJob), "proxy rebuild job"); + pj->scene = scene; + pj->main = CTX_data_main(C); + pj->clip = clip; + pj->clip_flag = clip->flag & MCLIP_TIMECODE_FLAGS; if (clip->anim) { pj->index_context = IMB_anim_index_rebuild_context(clip->anim, clip->proxy.build_tc_flag, @@ -993,7 +1010,7 @@ static int clip_rebuild_proxy_exec(bContext *C, wmOperator *UNUSED(op)) WM_jobs_timer(steve, 0.2, NC_MOVIECLIP|ND_DISPLAY, 0); WM_jobs_callbacks(steve, proxy_startjob, NULL, NULL, proxy_endjob); - G.afbreek= 0; + G.afbreek = 0; WM_jobs_start(CTX_wm_manager(C), steve); ED_area_tag_redraw(CTX_wm_area(C)); @@ -1020,16 +1037,16 @@ void CLIP_OT_rebuild_proxy(wmOperatorType *ot) static int mode_set_exec(bContext *C, wmOperator *op) { - SpaceClip *sc= CTX_wm_space_clip(C); - int mode= RNA_enum_get(op->ptr, "mode"); - int toggle= RNA_boolean_get(op->ptr, "toggle"); + SpaceClip *sc = CTX_wm_space_clip(C); + int mode = RNA_enum_get(op->ptr, "mode"); + int toggle = RNA_boolean_get(op->ptr, "toggle"); - if (sc->mode==mode) { + if (sc->mode == mode) { if (toggle) - sc->mode= SC_MODE_TRACKING; + sc->mode = SC_MODE_TRACKING; } else { - sc->mode= mode; + sc->mode = mode; } WM_event_add_notifier(C, NC_SPACE|ND_SPACE_CLIP, NULL); diff --git a/source/blender/editors/space_clip/clip_toolbar.c b/source/blender/editors/space_clip/clip_toolbar.c index b42b4137ea0..b80deb8260a 100644 --- a/source/blender/editors/space_clip/clip_toolbar.c +++ b/source/blender/editors/space_clip/clip_toolbar.c @@ -60,24 +60,24 @@ static ARegion *clip_has_properties_region(ScrArea *sa) { ARegion *ar, *arnew; - ar= BKE_area_find_region_type(sa, RGN_TYPE_UI); + ar = BKE_area_find_region_type(sa, RGN_TYPE_UI); if (ar) return ar; /* add subdiv level; after header */ - ar= BKE_area_find_region_type(sa, RGN_TYPE_HEADER); + ar = BKE_area_find_region_type(sa, RGN_TYPE_HEADER); /* is error! */ - if (ar==NULL) + if (ar == NULL) return NULL; - arnew= MEM_callocN(sizeof(ARegion), "clip properties region"); + arnew = MEM_callocN(sizeof(ARegion), "clip properties region"); BLI_insertlinkafter(&sa->regionbase, ar, arnew); - arnew->regiontype= RGN_TYPE_UI; - arnew->alignment= RGN_ALIGN_RIGHT; + arnew->regiontype = RGN_TYPE_UI; + arnew->alignment = RGN_ALIGN_RIGHT; - arnew->flag= RGN_FLAG_HIDDEN; + arnew->flag = RGN_FLAG_HIDDEN; return arnew; } @@ -89,8 +89,8 @@ static int properties_poll(bContext *C) static int properties_exec(bContext *C, wmOperator *UNUSED(op)) { - ScrArea *sa= CTX_wm_area(C); - ARegion *ar= clip_has_properties_region(sa); + ScrArea *sa = CTX_wm_area(C); + ARegion *ar = clip_has_properties_region(sa); if (ar) ED_region_toggle_hidden(C, ar); @@ -114,43 +114,44 @@ void CLIP_OT_properties(wmOperatorType *ot) static ARegion *clip_has_tools_region(ScrArea *sa) { - ARegion *ar, *artool=NULL, *arprops=NULL, *arhead; + ARegion *ar, *artool = NULL, *arprops = NULL, *arhead; - for (ar= sa->regionbase.first; ar; ar= ar->next) { - if (ar->regiontype==RGN_TYPE_TOOLS) - artool= ar; - if (ar->regiontype==RGN_TYPE_TOOL_PROPS) - arprops= ar; + for (ar = sa->regionbase.first; ar; ar = ar->next) { + if (ar->regiontype == RGN_TYPE_TOOLS) + artool = ar; + + if (ar->regiontype == RGN_TYPE_TOOL_PROPS) + arprops = ar; } /* tool region hide/unhide also hides props */ if (arprops && artool) return artool; - if (artool==NULL) { + if (artool == NULL) { /* add subdiv level; after header */ - arhead= BKE_area_find_region_type(sa, RGN_TYPE_HEADER); + arhead = BKE_area_find_region_type(sa, RGN_TYPE_HEADER); /* is error! */ - if (arhead==NULL) + if (arhead == NULL) return NULL; - artool= MEM_callocN(sizeof(ARegion), "clip tools region"); + artool = MEM_callocN(sizeof(ARegion), "clip tools region"); BLI_insertlinkafter(&sa->regionbase, arhead, artool); - artool->regiontype= RGN_TYPE_TOOLS; - artool->alignment= RGN_ALIGN_LEFT; + artool->regiontype = RGN_TYPE_TOOLS; + artool->alignment = RGN_ALIGN_LEFT; - artool->flag= RGN_FLAG_HIDDEN; + artool->flag = RGN_FLAG_HIDDEN; } - if (arprops==NULL) { + if (arprops == NULL) { /* add extra subdivided region for tool properties */ - arprops= MEM_callocN(sizeof(ARegion), "tool props for clip"); + arprops = MEM_callocN(sizeof(ARegion), "tool props for clip"); BLI_insertlinkafter(&sa->regionbase, artool, arprops); - arprops->regiontype= RGN_TYPE_TOOL_PROPS; - arprops->alignment= RGN_ALIGN_BOTTOM|RGN_SPLIT_PREV; + arprops->regiontype = RGN_TYPE_TOOL_PROPS; + arprops->alignment = RGN_ALIGN_BOTTOM|RGN_SPLIT_PREV; } return artool; @@ -163,8 +164,8 @@ static int tools_poll(bContext *C) static int tools_exec(bContext *C, wmOperator *UNUSED(op)) { - ScrArea *sa= CTX_wm_area(C); - ARegion *ar= clip_has_tools_region(sa); + ScrArea *sa = CTX_wm_area(C); + ARegion *ar = clip_has_tools_region(sa); if (ar) ED_region_toggle_hidden(C, ar); @@ -193,16 +194,18 @@ static void clip_panel_operator_redo_buts(const bContext *C, Panel *pa, wmOperat static void clip_panel_operator_redo_header(const bContext *C, Panel *pa) { - wmOperator *op= WM_operator_last_redo(C); + wmOperator *op = WM_operator_last_redo(C); - if (op) BLI_strncpy(pa->drawname, op->type->name, sizeof(pa->drawname)); - else BLI_strncpy(pa->drawname, "Operator", sizeof(pa->drawname)); + if (op) + BLI_strncpy(pa->drawname, op->type->name, sizeof(pa->drawname)); + else + BLI_strncpy(pa->drawname, "Operator", sizeof(pa->drawname)); } static void clip_panel_operator_redo_operator(const bContext *C, Panel *pa, wmOperator *op) { if (op->type->flag & OPTYPE_MACRO) { - for (op= op->macro.first; op; op= op->next) { + for (op = op->macro.first; op; op = op->next) { uiItemL(pa->layout, op->type->name, ICON_NONE); clip_panel_operator_redo_operator(C, pa, op); } @@ -215,15 +218,16 @@ static void clip_panel_operator_redo_operator(const bContext *C, Panel *pa, wmOp /* TODO de-duplicate redo panel functions - campbell */ static void clip_panel_operator_redo(const bContext *C, Panel *pa) { - wmOperator *op= WM_operator_last_redo(C); + wmOperator *op = WM_operator_last_redo(C); uiBlock *block; - if (op==NULL) + if (op == NULL) return; + if (WM_operator_poll((bContext*)C, op->type) == 0) return; - block= uiLayoutGetBlock(pa->layout); + block = uiLayoutGetBlock(pa->layout); if (!WM_operator_check_ui_enabled(C, op->type->name)) uiLayoutSetEnabled(pa->layout, 0); @@ -238,10 +242,10 @@ void ED_clip_tool_props_register(ARegionType *art) { PanelType *pt; - pt= MEM_callocN(sizeof(PanelType), "spacetype clip panel last operator"); + pt = MEM_callocN(sizeof(PanelType), "spacetype clip panel last operator"); strcpy(pt->idname, "CLIP_PT_last_operator"); strcpy(pt->label, "Operator"); - pt->draw_header= clip_panel_operator_redo_header; - pt->draw= clip_panel_operator_redo; + pt->draw_header = clip_panel_operator_redo_header; + pt->draw = clip_panel_operator_redo; BLI_addtail(&art->paneltypes, pt); } diff --git a/source/blender/editors/space_clip/clip_utils.c b/source/blender/editors/space_clip/clip_utils.c index c637bffe3ad..443a1d0cdd3 100644 --- a/source/blender/editors/space_clip/clip_utils.c +++ b/source/blender/editors/space_clip/clip_utils.c @@ -62,25 +62,25 @@ void clip_graph_tracking_values_iterate_track(SpaceClip *sc, MovieTrackingTrack void (*segment_start) (void *userdata, MovieTrackingTrack *track, int coord), void (*segment_end) (void *userdata)) { - MovieClip *clip= ED_space_clip(sc); + MovieClip *clip = ED_space_clip(sc); int width, height, coord; BKE_movieclip_get_size(clip, &sc->user, &width, &height); - for (coord= 0; coord<2; coord++) { - int i, open= 0, prevfra= 0; - float prevval= 0.0f; + for (coord = 0; coord < 2; coord++) { + int i, open = FALSE, prevfra = 0; + float prevval = 0.0f; - for (i= 0; imarkersnr; i++) { - MovieTrackingMarker *marker= &track->markers[i]; + for (i = 0; i < track->markersnr; i++) { + MovieTrackingMarker *marker = &track->markers[i]; float val; - if (marker->flag&MARKER_DISABLED) { + if (marker->flag & MARKER_DISABLED) { if (open) { if (segment_end) segment_end(userdata); - open= 0; + open = FALSE; } continue; @@ -90,19 +90,19 @@ void clip_graph_tracking_values_iterate_track(SpaceClip *sc, MovieTrackingTrack if (segment_start) segment_start(userdata, track, coord); - open= 1; - prevval= marker->pos[coord]; + open = TRUE; + prevval = marker->pos[coord]; } /* value is a pixels per frame speed */ - val= (marker->pos[coord] - prevval) * ((coord==0) ? (width) : (height)); - val/= marker->framenr-prevfra; + val = (marker->pos[coord] - prevval) * ((coord == 0) ? (width) : (height)); + val /= marker->framenr - prevfra; if (func) func(userdata, track, marker, coord, val); - prevval= marker->pos[coord]; - prevfra= marker->framenr; + prevval = marker->pos[coord]; + prevfra = marker->framenr; } if (open) { @@ -117,38 +117,38 @@ void clip_graph_tracking_values_iterate(SpaceClip *sc, void *userdata, void (*segment_start) (void *userdata, MovieTrackingTrack *track, int coord), void (*segment_end) (void *userdata)) { - MovieClip *clip= ED_space_clip(sc); - MovieTracking *tracking= &clip->tracking; - ListBase *tracksbase= BKE_tracking_get_tracks(tracking); + MovieClip *clip = ED_space_clip(sc); + MovieTracking *tracking = &clip->tracking; + ListBase *tracksbase = BKE_tracking_get_tracks(tracking); MovieTrackingTrack *track; - track= tracksbase->first; + track = tracksbase->first; while (track) { if (TRACK_VIEW_SELECTED(sc, track)) { clip_graph_tracking_values_iterate_track(sc, track, userdata, func, segment_start, segment_end); } - track= track->next; + track = track->next; } } void clip_graph_tracking_iterate(SpaceClip *sc, void *userdata, void (*func) (void *userdata, MovieTrackingMarker *marker)) { - MovieClip *clip= ED_space_clip(sc); - MovieTracking *tracking= &clip->tracking; - ListBase *tracksbase= BKE_tracking_get_tracks(tracking); + MovieClip *clip = ED_space_clip(sc); + MovieTracking *tracking = &clip->tracking; + ListBase *tracksbase = BKE_tracking_get_tracks(tracking); MovieTrackingTrack *track; - track= tracksbase->first; + track = tracksbase->first; while (track) { if (TRACK_VIEW_SELECTED(sc, track)) { int i; - for (i= 0; imarkersnr; i++) { - MovieTrackingMarker *marker= &track->markers[i]; + for (i = 0; i < track->markersnr; i++) { + MovieTrackingMarker *marker = &track->markers[i]; - if (marker->flag&MARKER_DISABLED) + if (marker->flag & MARKER_DISABLED) continue; if (func) @@ -156,30 +156,30 @@ void clip_graph_tracking_iterate(SpaceClip *sc, void *userdata, } } - track= track->next; + track = track->next; } } void clip_delete_track(bContext *C, MovieClip *clip, ListBase *tracksbase, MovieTrackingTrack *track) { - MovieTracking *tracking= &clip->tracking; - MovieTrackingStabilization *stab= &tracking->stabilization; - MovieTrackingTrack *act_track= BKE_tracking_active_track(tracking); + MovieTracking *tracking = &clip->tracking; + MovieTrackingStabilization *stab = &tracking->stabilization; + MovieTrackingTrack *act_track = BKE_tracking_active_track(tracking); - int has_bundle= 0, update_stab= 0; + int has_bundle = FALSE, update_stab = FALSE; if (track==act_track) - tracking->act_track= NULL; + tracking->act_track = NULL; - if (track==stab->rot_track) { - stab->rot_track= NULL; + if (track == stab->rot_track) { + stab->rot_track = NULL; - update_stab= 1; + update_stab = TRUE; } /* handle reconstruction display in 3d viewport */ - if (track->flag&TRACK_HAS_BUNDLE) - has_bundle= 1; + if (track->flag & TRACK_HAS_BUNDLE) + has_bundle = TRUE; BKE_tracking_free_track(track); BLI_freelinkN(tracksbase, track); @@ -187,7 +187,7 @@ void clip_delete_track(bContext *C, MovieClip *clip, ListBase *tracksbase, Movie WM_event_add_notifier(C, NC_MOVIECLIP|NA_EDITED, clip); if (update_stab) { - tracking->stabilization.ok= 0; + tracking->stabilization.ok = FALSE; DAG_id_tag_update(&clip->id, 0); WM_event_add_notifier(C, NC_MOVIECLIP|ND_DISPLAY, clip); @@ -199,7 +199,7 @@ void clip_delete_track(bContext *C, MovieClip *clip, ListBase *tracksbase, Movie void clip_delete_marker(bContext *C, MovieClip *clip, ListBase *tracksbase, MovieTrackingTrack *track, MovieTrackingMarker *marker) { - if (track->markersnr==1) { + if (track->markersnr == 1) { clip_delete_track(C, clip, tracksbase, track); } else { @@ -217,6 +217,6 @@ void clip_view_center_to_point(SpaceClip *sc, float x, float y) ED_space_clip_size(sc, &width, &height); ED_space_clip_aspect(sc, &aspx, &aspy); - sc->xof= (x-0.5f)*width*aspx; - sc->yof= (y-0.5f)*height*aspy; + sc->xof = (x - 0.5f) * width * aspx; + sc->yof = (y - 0.5f) * height * aspy; } diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c index ca66248682c..228c716e3b6 100644 --- a/source/blender/editors/space_clip/space_clip.c +++ b/source/blender/editors/space_clip/space_clip.c @@ -71,47 +71,47 @@ static void init_preview_region(const bContext *C, ARegion *ar) { - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); - ar->regiontype= RGN_TYPE_PREVIEW; - ar->alignment= RGN_ALIGN_TOP; - ar->flag|= RGN_FLAG_HIDDEN; + ar->regiontype = RGN_TYPE_PREVIEW; + ar->alignment = RGN_ALIGN_TOP; + ar->flag |= RGN_FLAG_HIDDEN; ar->v2d.tot.xmin = 0.0f; ar->v2d.tot.ymin = -10.0f; ar->v2d.tot.xmax = (float)scene->r.efra; ar->v2d.tot.ymax = 10.0f; - ar->v2d.cur= ar->v2d.tot; + ar->v2d.cur = ar->v2d.tot; - ar->v2d.min[0]= FLT_MIN; - ar->v2d.min[1]= FLT_MIN; + ar->v2d.min[0] = FLT_MIN; + ar->v2d.min[1] = FLT_MIN; - ar->v2d.max[0]= MAXFRAMEF; - ar->v2d.max[1]= FLT_MAX; + ar->v2d.max[0] = MAXFRAMEF; + ar->v2d.max[1] = FLT_MAX; - ar->v2d.scroll= (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL); + ar->v2d.scroll = (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL); ar->v2d.scroll |= (V2D_SCROLL_LEFT|V2D_SCROLL_SCALE_VERTICAL); - ar->v2d.keeptot= 0; + ar->v2d.keeptot = 0; } static ARegion *clip_has_preview_region(const bContext *C, ScrArea *sa) { ARegion *ar, *arnew; - ar= BKE_area_find_region_type(sa, RGN_TYPE_PREVIEW); + ar = BKE_area_find_region_type(sa, RGN_TYPE_PREVIEW); if (ar) return ar; /* add subdiv level; after header */ - ar= BKE_area_find_region_type(sa, RGN_TYPE_WINDOW); + ar = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW); /* is error! */ - if (ar==NULL) + if (ar == NULL) return NULL; - arnew= MEM_callocN(sizeof(ARegion), "clip preview region"); + arnew = MEM_callocN(sizeof(ARegion), "clip preview region"); BLI_insertlinkbefore(&sa->regionbase, ar, arnew); init_preview_region(C, arnew); @@ -121,30 +121,30 @@ static ARegion *clip_has_preview_region(const bContext *C, ScrArea *sa) static void clip_scopes_tag_refresh(ScrArea *sa) { - SpaceClip *sc= (SpaceClip *)sa->spacedata.first; + SpaceClip *sc = (SpaceClip *)sa->spacedata.first; ARegion *ar; - if (sc->mode!=SC_MODE_TRACKING) + if (sc->mode != SC_MODE_TRACKING) return; /* only while proeprties are visible */ - for (ar=sa->regionbase.first; ar; ar=ar->next) { + for (ar = sa->regionbase.first; ar; ar = ar->next) { if (ar->regiontype == RGN_TYPE_UI && ar->flag & RGN_FLAG_HIDDEN) return; } - sc->scopes.ok= 0; + sc->scopes.ok = FALSE; } static void clip_stabilization_tag_refresh(ScrArea *sa) { - SpaceClip *sc= (SpaceClip *)sa->spacedata.first; - MovieClip *clip= ED_space_clip(sc); + SpaceClip *sc = (SpaceClip *) sa->spacedata.first; + MovieClip *clip = ED_space_clip(sc); if (clip) { - MovieTrackingStabilization *stab= &clip->tracking.stabilization; + MovieTrackingStabilization *stab = &clip->tracking.stabilization; - stab->ok= 0; + stab->ok = FALSE; } } @@ -155,62 +155,62 @@ static SpaceLink *clip_new(const bContext *C) ARegion *ar; SpaceClip *sc; - sc= MEM_callocN(sizeof(SpaceClip), "initclip"); - sc->spacetype= SPACE_CLIP; - sc->flag= SC_SHOW_MARKER_PATTERN|SC_SHOW_TRACK_PATH|SC_MANUAL_CALIBRATION|SC_SHOW_GRAPH_TRACKS|SC_SHOW_GRAPH_FRAMES; - sc->zoom= 1.0f; - sc->path_length= 20; - sc->scopes.track_preview_height= 120; + sc = MEM_callocN(sizeof(SpaceClip), "initclip"); + sc->spacetype = SPACE_CLIP; + sc->flag = SC_SHOW_MARKER_PATTERN|SC_SHOW_TRACK_PATH|SC_MANUAL_CALIBRATION|SC_SHOW_GRAPH_TRACKS|SC_SHOW_GRAPH_FRAMES; + sc->zoom = 1.0f; + sc->path_length = 20; + sc->scopes.track_preview_height = 120; /* header */ - ar= MEM_callocN(sizeof(ARegion), "header for clip"); + ar = MEM_callocN(sizeof(ARegion), "header for clip"); BLI_addtail(&sc->regionbase, ar); - ar->regiontype= RGN_TYPE_HEADER; - ar->alignment= RGN_ALIGN_BOTTOM; + ar->regiontype = RGN_TYPE_HEADER; + ar->alignment = RGN_ALIGN_BOTTOM; /* tools view */ - ar= MEM_callocN(sizeof(ARegion), "tools for clip"); + ar = MEM_callocN(sizeof(ARegion), "tools for clip"); BLI_addtail(&sc->regionbase, ar); - ar->regiontype= RGN_TYPE_TOOLS; - ar->alignment= RGN_ALIGN_LEFT; + ar->regiontype = RGN_TYPE_TOOLS; + ar->alignment = RGN_ALIGN_LEFT; /* tool properties */ - ar= MEM_callocN(sizeof(ARegion), "tool properties for clip"); + ar = MEM_callocN(sizeof(ARegion), "tool properties for clip"); BLI_addtail(&sc->regionbase, ar); - ar->regiontype= RGN_TYPE_TOOL_PROPS; - ar->alignment= RGN_ALIGN_BOTTOM|RGN_SPLIT_PREV; + ar->regiontype = RGN_TYPE_TOOL_PROPS; + ar->alignment = RGN_ALIGN_BOTTOM|RGN_SPLIT_PREV; /* properties view */ - ar= MEM_callocN(sizeof(ARegion), "properties for clip"); + ar = MEM_callocN(sizeof(ARegion), "properties for clip"); BLI_addtail(&sc->regionbase, ar); - ar->regiontype= RGN_TYPE_UI; - ar->alignment= RGN_ALIGN_RIGHT; + ar->regiontype = RGN_TYPE_UI; + ar->alignment = RGN_ALIGN_RIGHT; /* preview view */ - ar= MEM_callocN(sizeof(ARegion), "preview for clip"); + ar = MEM_callocN(sizeof(ARegion), "preview for clip"); BLI_addtail(&sc->regionbase, ar); init_preview_region(C, ar); /* main area */ - ar= MEM_callocN(sizeof(ARegion), "main area for clip"); + ar = MEM_callocN(sizeof(ARegion), "main area for clip"); BLI_addtail(&sc->regionbase, ar); - ar->regiontype= RGN_TYPE_WINDOW; + ar->regiontype = RGN_TYPE_WINDOW; - return (SpaceLink *)sc; + return (SpaceLink *) sc; } /* not spacelink itself */ static void clip_free(SpaceLink *sl) { - SpaceClip *sc= (SpaceClip*) sl; + SpaceClip *sc = (SpaceClip*) sl; - sc->clip= NULL; + sc->clip = NULL; if (sc->scopes.track_preview) IMB_freeImBuf(sc->scopes.track_preview); @@ -224,11 +224,11 @@ static void clip_init(struct wmWindowManager *UNUSED(wm), ScrArea *UNUSED(sa)) static SpaceLink *clip_duplicate(SpaceLink *sl) { - SpaceClip *scn= MEM_dupallocN(sl); + SpaceClip *scn = MEM_dupallocN(sl); /* clear or remove stuff from old */ - scn->scopes.track_preview= NULL; - scn->scopes.ok= 0; + scn->scopes.track_preview = NULL; + scn->scopes.ok = FALSE; return (SpaceLink *)scn; } @@ -278,12 +278,12 @@ static void clip_listener(ScrArea *sa, wmNotifier *wmn) } break; case NC_SCREEN: - if (wmn->data==ND_ANIMPLAY) { + if (wmn->data ==ND_ANIMPLAY) { ED_area_tag_redraw(sa); } break; case NC_SPACE: - if (wmn->data==ND_SPACE_CLIP) { + if (wmn->data ==ND_SPACE_CLIP) { clip_scopes_tag_refresh(sa); clip_stabilization_tag_refresh(sa); ED_area_tag_redraw(sa); @@ -615,29 +615,29 @@ const char *clip_context_dir[]= {"edit_movieclip", NULL}; static int clip_context(const bContext *C, const char *member, bContextDataResult *result) { - SpaceClip *sc= CTX_wm_space_clip(C); + SpaceClip *sc = CTX_wm_space_clip(C); if (CTX_data_dir(member)) { CTX_data_dir_set(result, clip_context_dir); - return 1; + return TRUE; } else if (CTX_data_equals(member, "edit_movieclip")) { CTX_data_id_pointer_set(result, &sc->clip->id); - return 1; + return TRUE; } - return 0; + return FALSE; } static void clip_refresh(const bContext *C, ScrArea *sa) { - wmWindowManager *wm= CTX_wm_manager(C); - wmWindow *window= CTX_wm_window(C); + wmWindowManager *wm = CTX_wm_manager(C); + wmWindow *window = CTX_wm_window(C); Scene *scene = CTX_data_scene(C); - SpaceClip *sc= (SpaceClip *)sa->spacedata.first; - ARegion *ar_main= BKE_area_find_region_type(sa, RGN_TYPE_WINDOW); - ARegion *ar_preview= clip_has_preview_region(C, sa); - int view_changed= 0; + SpaceClip *sc = (SpaceClip *)sa->spacedata.first; + ARegion *ar_main = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW); + ARegion *ar_preview = clip_has_preview_region(C, sa); + int view_changed = FALSE; switch (sc->view) { case SC_VIEW_CLIP: @@ -645,11 +645,11 @@ static void clip_refresh(const bContext *C, ScrArea *sa) ar_preview->flag |= RGN_FLAG_HIDDEN; ar_preview->v2d.flag &= ~V2D_IS_INITIALISED; WM_event_remove_handlers((bContext*)C, &ar_preview->handlers); - view_changed= 1; + view_changed = TRUE; } if (ar_main && ar_main->alignment != RGN_ALIGN_NONE) { - ar_main->alignment= RGN_ALIGN_NONE; - view_changed= 1; + ar_main->alignment = RGN_ALIGN_NONE; + view_changed = TRUE; } if (ar_preview && ar_preview->alignment != RGN_ALIGN_NONE) { /* store graph region align */ @@ -658,8 +658,8 @@ static void clip_refresh(const bContext *C, ScrArea *sa) else sc->runtime_flag |= SC_GRAPH_BOTTOM; - ar_preview->alignment= RGN_ALIGN_NONE; - view_changed= 1; + ar_preview->alignment = RGN_ALIGN_NONE; + view_changed = TRUE; } break; case SC_VIEW_GRAPH: @@ -667,19 +667,19 @@ static void clip_refresh(const bContext *C, ScrArea *sa) ar_preview->flag &= ~RGN_FLAG_HIDDEN; ar_preview->v2d.flag &= ~V2D_IS_INITIALISED; ar_preview->v2d.cur = ar_preview->v2d.tot; - view_changed= 1; + view_changed = TRUE; } if (ar_main && ar_main->alignment != RGN_ALIGN_NONE) { - ar_main->alignment= RGN_ALIGN_NONE; - view_changed= 1; + ar_main->alignment = RGN_ALIGN_NONE; + view_changed = TRUE; } if (ar_preview && !ELEM(ar_preview->alignment, RGN_ALIGN_TOP, RGN_ALIGN_BOTTOM)) { if (sc->runtime_flag & SC_GRAPH_BOTTOM) - ar_preview->alignment= RGN_ALIGN_BOTTOM; + ar_preview->alignment = RGN_ALIGN_BOTTOM; else - ar_preview->alignment= RGN_ALIGN_TOP; + ar_preview->alignment = RGN_ALIGN_TOP; - view_changed= 1; + view_changed = TRUE; } break; } @@ -697,20 +697,20 @@ static void clip_refresh(const bContext *C, ScrArea *sa) /* sets up the fields of the View2D from zoom and offset */ static void movieclip_main_area_set_view2d(SpaceClip *sc, ARegion *ar) { - MovieClip *clip= ED_space_clip(sc); + MovieClip *clip = ED_space_clip(sc); float x1, y1, w, h; int width, height, winx, winy; ED_space_clip_size(sc, &width, &height); - w= width; - h= height; + w = width; + h = height; if (clip) - h*= clip->aspy/clip->aspx/clip->tracking.camera.pixel_aspect; + h *= clip->aspy / clip->aspx / clip->tracking.camera.pixel_aspect; - winx= ar->winrct.xmax - ar->winrct.xmin + 1; - winy= ar->winrct.ymax - ar->winrct.ymin + 1; + winx = ar->winrct.xmax - ar->winrct.xmin + 1; + winy = ar->winrct.ymax - ar->winrct.ymin + 1; ar->v2d.tot.xmin = 0; ar->v2d.tot.ymin = 0; @@ -722,19 +722,19 @@ static void movieclip_main_area_set_view2d(SpaceClip *sc, ARegion *ar) ar->v2d.mask.ymax = winy; /* which part of the image space do we see? */ - x1= ar->winrct.xmin+(winx-sc->zoom*w)/2.0f; - y1= ar->winrct.ymin+(winy-sc->zoom*h)/2.0f; + x1= ar->winrct.xmin + (winx-sc->zoom * w) / 2.0f; + y1= ar->winrct.ymin + (winy-sc->zoom * h) / 2.0f; - x1-= sc->zoom*sc->xof; - y1-= sc->zoom*sc->yof; + x1-= sc->zoom * sc->xof; + y1-= sc->zoom * sc->yof; /* relative display right */ - ar->v2d.cur.xmin = ((ar->winrct.xmin - (float)x1)/sc->zoom); - ar->v2d.cur.xmax = ar->v2d.cur.xmin + ((float)winx/sc->zoom); + ar->v2d.cur.xmin = (ar->winrct.xmin - (float)x1) / sc->zoom; + ar->v2d.cur.xmax = ar->v2d.cur.xmin + ((float)winx / sc->zoom); /* relative display left */ - ar->v2d.cur.ymin = ((ar->winrct.ymin-(float)y1)/sc->zoom); - ar->v2d.cur.ymax = ar->v2d.cur.ymin + ((float)winy/sc->zoom); + ar->v2d.cur.ymin = (ar->winrct.ymin - (float)y1) / sc->zoom; + ar->v2d.cur.ymax = ar->v2d.cur.ymin + ((float)winy / sc->zoom); /* normalize 0.0..1.0 */ ar->v2d.cur.xmin /= w; @@ -761,25 +761,25 @@ static void clip_main_area_init(wmWindowManager *wm, ARegion *ar) static void clip_main_area_draw(const bContext *C, ARegion *ar) { /* draw entirely, view changes should be handled here */ - SpaceClip *sc= CTX_wm_space_clip(C); - Scene *scene= CTX_data_scene(C); - MovieClip *clip= ED_space_clip(sc); + SpaceClip *sc = CTX_wm_space_clip(C); + Scene *scene = CTX_data_scene(C); + MovieClip *clip = ED_space_clip(sc); /* if tracking is in progress, we should synchronize framenr from clipuser * so latest tracked frame would be shown */ if (clip && clip->tracking_context) BKE_tracking_sync_user(&sc->user, clip->tracking_context); - if (sc->flag&SC_LOCK_SELECTION) { - ImBuf *tmpibuf= NULL; + if (sc->flag & SC_LOCK_SELECTION) { + ImBuf *tmpibuf = NULL; - if (clip && clip->tracking.stabilization.flag&TRACKING_2D_STABILIZATION) { - tmpibuf= ED_space_clip_get_stable_buffer(sc, NULL, NULL, NULL); + if (clip && clip->tracking.stabilization.flag & TRACKING_2D_STABILIZATION) { + tmpibuf = ED_space_clip_get_stable_buffer(sc, NULL, NULL, NULL); } if (ED_clip_view_selection(sc, ar, 0)) { - sc->xof+= sc->xlockof; - sc->yof+= sc->ylockof; + sc->xof += sc->xlockof; + sc->yof += sc->ylockof; } if (tmpibuf) @@ -810,7 +810,7 @@ static void clip_main_area_listener(ARegion *ar, wmNotifier *wmn) /* context changes */ switch(wmn->category) { case NC_SCREEN: - if (wmn->data==ND_GPENCIL) + if (wmn->data == ND_GPENCIL) ED_region_tag_redraw(ar); break; } @@ -834,11 +834,11 @@ static void clip_preview_area_init(wmWindowManager *wm, ARegion *ar) static void clip_preview_area_draw(const bContext *C, ARegion *ar) { - View2D *v2d= &ar->v2d; + View2D *v2d = &ar->v2d; View2DScrollers *scrollers; - SpaceClip *sc= CTX_wm_space_clip(C); - Scene *scene= CTX_data_scene(C); - short unitx= V2D_UNIT_FRAMESCALE, unity= V2D_UNIT_VALUES; + SpaceClip *sc = CTX_wm_space_clip(C); + Scene *scene = CTX_data_scene(C); + short unitx = V2D_UNIT_FRAMESCALE, unity = V2D_UNIT_VALUES; if (sc->flag & SC_LOCK_TIMECURSOR) ED_clip_graph_center_current_frame(scene, ar); @@ -856,7 +856,7 @@ static void clip_preview_area_draw(const bContext *C, ARegion *ar) UI_view2d_view_restore(C); /* scrollers */ - scrollers= UI_view2d_scrollers_calc(C, v2d, unitx, V2D_GRID_NOCLAMP, unity, V2D_GRID_NOCLAMP); + scrollers = UI_view2d_scrollers_calc(C, v2d, unitx, V2D_GRID_NOCLAMP, unity, V2D_GRID_NOCLAMP); UI_view2d_scrollers_draw(C, v2d, scrollers); UI_view2d_scrollers_free(scrollers); } @@ -931,7 +931,7 @@ static void clip_properties_area_init(wmWindowManager *wm, ARegion *ar) static void clip_properties_area_draw(const bContext *C, ARegion *ar) { - SpaceClip *sc= CTX_wm_space_clip(C); + SpaceClip *sc = CTX_wm_space_clip(C); BKE_movieclip_update_scopes(sc->clip, &sc->user, &sc->scopes); @@ -943,11 +943,11 @@ static void clip_properties_area_listener(ARegion *ar, wmNotifier *wmn) /* context changes */ switch(wmn->category) { case NC_SCREEN: - if (wmn->data==ND_GPENCIL) + if (wmn->data ==ND_GPENCIL) ED_region_tag_redraw(ar); break; case NC_BRUSH: - if (wmn->action==NA_EDITED) + if (wmn->action ==NA_EDITED) ED_region_tag_redraw(ar); break; } @@ -958,86 +958,86 @@ static void clip_properties_area_listener(ARegion *ar, wmNotifier *wmn) /* only called once, from space/spacetypes.c */ void ED_spacetype_clip(void) { - SpaceType *st= MEM_callocN(sizeof(SpaceType), "spacetype clip"); + SpaceType *st = MEM_callocN(sizeof(SpaceType), "spacetype clip"); ARegionType *art; - st->spaceid= SPACE_CLIP; + st->spaceid = SPACE_CLIP; strncpy(st->name, "Clip", BKE_ST_MAXNAME); - st->new= clip_new; - st->free= clip_free; - st->init= clip_init; - st->duplicate= clip_duplicate; - st->operatortypes= clip_operatortypes; - st->keymap= clip_keymap; - st->listener= clip_listener; - st->context= clip_context; - st->refresh= clip_refresh; + st->new = clip_new; + st->free = clip_free; + st->init = clip_init; + st->duplicate = clip_duplicate; + st->operatortypes = clip_operatortypes; + st->keymap = clip_keymap; + st->listener = clip_listener; + st->context = clip_context; + st->refresh = clip_refresh; /* regions: main window */ - art= MEM_callocN(sizeof(ARegionType), "spacetype clip region"); - art->regionid= RGN_TYPE_WINDOW; - art->init= clip_main_area_init; - art->draw= clip_main_area_draw; - art->listener= clip_main_area_listener; - art->keymapflag= ED_KEYMAP_FRAMES|ED_KEYMAP_UI|ED_KEYMAP_GPENCIL; + art = MEM_callocN(sizeof(ARegionType), "spacetype clip region"); + art->regionid = RGN_TYPE_WINDOW; + art->init = clip_main_area_init; + art->draw = clip_main_area_draw; + art->listener = clip_main_area_listener; + art->keymapflag = ED_KEYMAP_FRAMES|ED_KEYMAP_UI|ED_KEYMAP_GPENCIL; BLI_addhead(&st->regiontypes, art); /* preview */ - art= MEM_callocN(sizeof(ARegionType), "spacetype clip region preview"); + art = MEM_callocN(sizeof(ARegionType), "spacetype clip region preview"); art->regionid = RGN_TYPE_PREVIEW; art->prefsizey = 240; - art->init= clip_preview_area_init; - art->draw= clip_preview_area_draw; - art->listener= clip_preview_area_listener; - art->keymapflag= ED_KEYMAP_FRAMES|ED_KEYMAP_UI|ED_KEYMAP_VIEW2D; + art->init = clip_preview_area_init; + art->draw = clip_preview_area_draw; + art->listener = clip_preview_area_listener; + art->keymapflag = ED_KEYMAP_FRAMES|ED_KEYMAP_UI|ED_KEYMAP_VIEW2D; BLI_addhead(&st->regiontypes, art); /* regions: properties */ - art= MEM_callocN(sizeof(ARegionType), "spacetype clip region properties"); - art->regionid= RGN_TYPE_UI; - art->prefsizex= UI_COMPACT_PANEL_WIDTH; - art->keymapflag= ED_KEYMAP_FRAMES|ED_KEYMAP_UI; - art->init= clip_properties_area_init; - art->draw= clip_properties_area_draw; - art->listener= clip_properties_area_listener; + art = MEM_callocN(sizeof(ARegionType), "spacetype clip region properties"); + art->regionid = RGN_TYPE_UI; + art->prefsizex = UI_COMPACT_PANEL_WIDTH; + art->keymapflag = ED_KEYMAP_FRAMES|ED_KEYMAP_UI; + art->init = clip_properties_area_init; + art->draw = clip_properties_area_draw; + art->listener = clip_properties_area_listener; BLI_addhead(&st->regiontypes, art); ED_clip_buttons_register(art); /* regions: tools */ - art= MEM_callocN(sizeof(ARegionType), "spacetype clip region tools"); - art->regionid= RGN_TYPE_TOOLS; - art->prefsizex= UI_COMPACT_PANEL_WIDTH; - art->keymapflag= ED_KEYMAP_FRAMES|ED_KEYMAP_UI; - art->listener= clip_props_area_listener; - art->init= clip_tools_area_init; - art->draw= clip_tools_area_draw; + art = MEM_callocN(sizeof(ARegionType), "spacetype clip region tools"); + art->regionid = RGN_TYPE_TOOLS; + art->prefsizex = UI_COMPACT_PANEL_WIDTH; + art->keymapflag = ED_KEYMAP_FRAMES|ED_KEYMAP_UI; + art->listener = clip_props_area_listener; + art->init = clip_tools_area_init; + art->draw = clip_tools_area_draw; BLI_addhead(&st->regiontypes, art); /* tool properties */ - art= MEM_callocN(sizeof(ARegionType), "spacetype clip tool properties region"); + art = MEM_callocN(sizeof(ARegionType), "spacetype clip tool properties region"); art->regionid = RGN_TYPE_TOOL_PROPS; - art->prefsizex= 0; - art->prefsizey= 120; - art->keymapflag= ED_KEYMAP_FRAMES|ED_KEYMAP_UI; - art->listener= clip_props_area_listener; - art->init= clip_tools_area_init; - art->draw= clip_tools_area_draw; + art->prefsizex = 0; + art->prefsizey = 120; + art->keymapflag = ED_KEYMAP_FRAMES|ED_KEYMAP_UI; + art->listener = clip_props_area_listener; + art->init = clip_tools_area_init; + art->draw = clip_tools_area_draw; ED_clip_tool_props_register(art); BLI_addhead(&st->regiontypes, art); /* regions: header */ - art= MEM_callocN(sizeof(ARegionType), "spacetype clip region"); - art->regionid= RGN_TYPE_HEADER; - art->prefsizey= HEADERY; - art->keymapflag= ED_KEYMAP_FRAMES|ED_KEYMAP_UI|ED_KEYMAP_VIEW2D|ED_KEYMAP_HEADER; + art = MEM_callocN(sizeof(ARegionType), "spacetype clip region"); + art->regionid = RGN_TYPE_HEADER; + art->prefsizey = HEADERY; + art->keymapflag = ED_KEYMAP_FRAMES|ED_KEYMAP_UI|ED_KEYMAP_VIEW2D|ED_KEYMAP_HEADER; - art->init= clip_header_area_init; - art->draw= clip_header_area_draw; + art->init = clip_header_area_init; + art->draw = clip_header_area_draw; BLI_addhead(&st->regiontypes, art); diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c index 6cb7536b1ae..79569b82476 100644 --- a/source/blender/editors/space_clip/tracking_ops.c +++ b/source/blender/editors/space_clip/tracking_ops.c @@ -80,41 +80,41 @@ static int space_clip_frame_poll(bContext *C) { - SpaceClip *sc= CTX_wm_space_clip(C); + SpaceClip *sc = CTX_wm_space_clip(C); if (sc) { - MovieClip *clip= ED_space_clip(sc); + MovieClip *clip = ED_space_clip(sc); if (clip) return BKE_movieclip_has_frame(clip, &sc->user); } - return 0; + return FALSE; } /********************** add marker operator *********************/ static void add_marker(SpaceClip *sc, float x, float y) { - MovieClip *clip= ED_space_clip(sc); - MovieTracking *tracking= &clip->tracking; - ListBase *tracksbase= BKE_tracking_get_tracks(tracking); + MovieClip *clip = ED_space_clip(sc); + MovieTracking *tracking = &clip->tracking; + ListBase *tracksbase = BKE_tracking_get_tracks(tracking); MovieTrackingTrack *track; int width, height; - + ED_space_clip_size(sc, &width, &height); - track= BKE_tracking_add_track(tracking, tracksbase, x, y, sc->user.framenr, width, height); + track = BKE_tracking_add_track(tracking, tracksbase, x, y, sc->user.framenr, width, height); BKE_tracking_select_track(tracksbase, track, TRACK_AREA_ALL, 0); - clip->tracking.act_track= track; + clip->tracking.act_track = track; } static int add_marker_exec(bContext *C, wmOperator *op) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); float pos[2]; int width, height; @@ -127,8 +127,8 @@ static int add_marker_exec(bContext *C, wmOperator *op) add_marker(sc, pos[0], pos[1]); /* reset offset from locked position, so frame jumping wouldn't be so confusing */ - sc->xlockof= 0; - sc->ylockof= 0; + sc->xlockof = 0; + sc->ylockof = 0; WM_event_add_notifier(C, NC_MOVIECLIP|NA_EDITED, clip); @@ -170,23 +170,23 @@ void CLIP_OT_add_marker(wmOperatorType *ot) static int delete_track_exec(bContext *C, wmOperator *UNUSED(op)) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); - MovieTracking *tracking= &clip->tracking; - ListBase *tracksbase= BKE_tracking_get_tracks(tracking); - MovieTrackingTrack *track= tracksbase->first, *next; + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); + MovieTracking *tracking = &clip->tracking; + ListBase *tracksbase = BKE_tracking_get_tracks(tracking); + MovieTrackingTrack *track = tracksbase->first, *next; while (track) { - next= track->next; + next = track->next; if (TRACK_VIEW_SELECTED(sc, track)) clip_delete_track(C, clip, tracksbase, track); - track= next; + track = next; } /* nothing selected now, unlock view so it can be scrolled nice again */ - sc->flag&= ~SC_LOCK_SELECTION; + sc->flag &= ~SC_LOCK_SELECTION; return OPERATOR_FINISHED; } @@ -211,32 +211,32 @@ void CLIP_OT_delete_track(wmOperatorType *ot) static int delete_marker_exec(bContext *C, wmOperator *UNUSED(op)) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); - ListBase *tracksbase= BKE_tracking_get_tracks(&clip->tracking); - MovieTrackingTrack *track= tracksbase->first, *next; - int framenr= sc->user.framenr; - int has_selection= 0; + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); + ListBase *tracksbase = BKE_tracking_get_tracks(&clip->tracking); + MovieTrackingTrack *track = tracksbase->first, *next; + int framenr = sc->user.framenr; + int has_selection = 0; while (track) { - next= track->next; + next = track->next; if (TRACK_VIEW_SELECTED(sc, track)) { - MovieTrackingMarker *marker= BKE_tracking_exact_marker(track, framenr); + MovieTrackingMarker *marker = BKE_tracking_exact_marker(track, framenr); if (marker) { - has_selection|= track->markersnr>1; + has_selection |= track->markersnr>1; clip_delete_marker(C, clip, tracksbase, track, marker); } } - track= next; + track = next; } if (!has_selection) { /* nothing selected now, unlock view so it can be scrolled nice again */ - sc->flag&= ~SC_LOCK_SELECTION; + sc->flag &= ~SC_LOCK_SELECTION; } return OPERATOR_FINISHED; @@ -281,57 +281,57 @@ typedef struct { static SlideMarkerData *create_slide_marker_data(SpaceClip *sc, MovieTrackingTrack *track, MovieTrackingMarker *marker, wmEvent *event, int area, int action, int width, int height) { - SlideMarkerData *data= MEM_callocN(sizeof(SlideMarkerData), "slide marker data"); + SlideMarkerData *data = MEM_callocN(sizeof(SlideMarkerData), "slide marker data"); - marker= BKE_tracking_ensure_marker(track, sc->user.framenr); + marker = BKE_tracking_ensure_marker(track, sc->user.framenr); - data->area= area; - data->action= action; - data->track= track; - data->marker= marker; + data->area = area; + data->action = action; + data->track = track; + data->marker = marker; - if (area==TRACK_AREA_POINT) { - data->pos= marker->pos; - data->offset= track->offset; + if (area == TRACK_AREA_POINT) { + data->pos = marker->pos; + data->offset = track->offset; copy_v2_v2(data->spos, marker->pos); copy_v2_v2(data->soff, track->offset); } - else if (area==TRACK_AREA_PAT) { - if (action==SLIDE_ACTION_SIZE) { - data->min= track->pat_min; - data->max= track->pat_max; + else if (area == TRACK_AREA_PAT) { + if (action == SLIDE_ACTION_SIZE) { + data->min = track->pat_min; + data->max = track->pat_max; } else { int a; - data->pos= marker->pos; - data->offset= track->offset; + data->pos = marker->pos; + data->offset = track->offset; copy_v2_v2(data->soff, track->offset); - data->smarkers= MEM_callocN(sizeof(*data->smarkers)*track->markersnr, "slide marekrs"); - for (a= 0; amarkersnr; a++) + data->smarkers = MEM_callocN(sizeof(*data->smarkers)*track->markersnr, "slide marekrs"); + for (a = 0; a < track->markersnr; a++) copy_v2_v2(data->smarkers[a], track->markers[a].pos); } } - else if (area==TRACK_AREA_SEARCH) { - data->min= track->search_min; - data->max= track->search_max; + else if (area == TRACK_AREA_SEARCH) { + data->min = track->search_min; + data->max = track->search_max; } - if (area==TRACK_AREA_SEARCH || (area==TRACK_AREA_PAT && action!=SLIDE_ACTION_OFFSET)) { + if (area == TRACK_AREA_SEARCH || (area == TRACK_AREA_PAT && action != SLIDE_ACTION_OFFSET)) { copy_v2_v2(data->smin, data->min); copy_v2_v2(data->smax, data->max); } - data->mval[0]= event->mval[0]; - data->mval[1]= event->mval[1]; + data->mval[0] = event->mval[0]; + data->mval[1] = event->mval[1]; - data->width= width; - data->height= height; + data->width = width; + data->height = height; - if (action==SLIDE_ACTION_SIZE) - data->lock= 1; + if (action == SLIDE_ACTION_SIZE) + data->lock = 1; return data; } @@ -339,14 +339,14 @@ static SlideMarkerData *create_slide_marker_data(SpaceClip *sc, MovieTrackingTra /* corner = 0: right-bottom corner, * corner = 1: left-top corner */ static int mouse_on_corner(SpaceClip *sc, MovieTrackingTrack *track, MovieTrackingMarker *marker, - int area, float co[2], int corner, int width, int height) + int area, float co[2], int corner, int width, int height) { - int inside= 0; - float size= 12.0f; + int inside = 0; + float size = 12.0f; float min[2], max[2]; float crn[2], dx, dy, tdx, tdy; - if (area==TRACK_AREA_SEARCH) { + if (area == TRACK_AREA_SEARCH) { copy_v2_v2(min, track->search_min); copy_v2_v2(max, track->search_max); } @@ -355,26 +355,26 @@ static int mouse_on_corner(SpaceClip *sc, MovieTrackingTrack *track, MovieTracki copy_v2_v2(max, track->pat_max); } - dx= size/width/sc->zoom; - dy= size/height/sc->zoom; + dx = size / width / sc->zoom; + dy = size / height / sc->zoom; - tdx= 5.0f/width/sc->zoom; - tdy= 5.0f/height/sc->zoom; + tdx = 5.0f / width / sc->zoom; + tdy = 5.0f / height / sc->zoom; - dx= MIN2(dx, (max[0]-min[0])/6.0f) + tdx; - dy= MIN2(dy, (max[1]-min[1])/6.0f) + tdy; + dx = MIN2(dx, (max[0] - min[0]) / 6.0f) + tdx; + dy = MIN2(dy, (max[1] - min[1]) / 6.0f) + tdy; - if (corner==0) { - crn[0]= marker->pos[0]+max[0]; - crn[1]= marker->pos[1]+min[1]; + if (corner == 0) { + crn[0] = marker->pos[0] + max[0]; + crn[1] = marker->pos[1] + min[1]; - inside= co[0]>=crn[0]-dx && co[0]<=crn[0]+tdx && co[1]>=crn[1]-tdy && co[1]<=crn[1]+dy; + inside = co[0] >= crn[0] - dx && co[0] <= crn[0] + tdx && co[1] >= crn[1] - tdy && co[1] <= crn[1] + dy; } else { - crn[0]= marker->pos[0]+min[0]; - crn[1]= marker->pos[1]+max[1]; + crn[0] = marker->pos[0]+min[0]; + crn[1] = marker->pos[1]+max[1]; - inside= co[0]>=crn[0]-dx && co[0]<=crn[0]+dx && co[1]>=crn[1]-dy && co[1]<=crn[1]+dy; + inside = co[0] >= crn[0] - dx && co[0] <= crn[0] + dx && co[1] >= crn[1] - dy && co[1] <= crn[1] + dy; } return inside; @@ -387,69 +387,69 @@ static int mouse_on_offset(SpaceClip *sc, MovieTrackingTrack *track, MovieTracki add_v2_v2v2(pos, marker->pos, track->offset); - dx= 12.0f/width/sc->zoom; - dy= 12.0f/height/sc->zoom; + dx = 12.0f / width / sc->zoom; + dy = 12.0f / height /sc->zoom; - dx=MIN2(dx, (track->pat_max[0]-track->pat_min[0])/2.0f); - dy=MIN2(dy, (track->pat_max[1]-track->pat_min[1])/2.0f); + dx = MIN2(dx, (track->pat_max[0] - track->pat_min[0]) / 2.0f); + dy = MIN2(dy, (track->pat_max[1] - track->pat_min[1]) / 2.0f); - return co[0]>=pos[0]-dx && co[0]<=pos[0]+dx && co[1]>=pos[1]-dy && co[1]<=pos[1]+dy; + return co[0] >= pos[0] - dx && co[0] <= pos[0] + dx && co[1] >= pos[1] - dy && co[1] <= pos[1] + dy; } static void hide_cursor(bContext *C) { - wmWindow *win= CTX_wm_window(C); + wmWindow *win = CTX_wm_window(C); WM_cursor_set(win, CURSOR_NONE); } static void show_cursor(bContext *C) { - wmWindow *win= CTX_wm_window(C); + wmWindow *win = CTX_wm_window(C); WM_cursor_set(win, CURSOR_STD); } static void *slide_marker_customdata(bContext *C, wmEvent *event) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); MovieTrackingTrack *track; int width, height; float co[2]; - void *customdata= NULL; - ListBase *tracksbase= BKE_tracking_get_tracks(&clip->tracking); + void *customdata = NULL; + ListBase *tracksbase = BKE_tracking_get_tracks(&clip->tracking); ED_space_clip_size(sc, &width, &height); - if (width==0 || height==0) + if (width == 0 || height == 0) return NULL; ED_clip_mouse_pos(C, event, co); - track= tracksbase->first; + track = tracksbase->first; while (track) { - if (TRACK_VIEW_SELECTED(sc, track) && (track->flag&TRACK_LOCKED)==0) { - MovieTrackingMarker *marker= BKE_tracking_get_marker(track, sc->user.framenr); + if (TRACK_VIEW_SELECTED(sc, track) && (track->flag & TRACK_LOCKED) == 0) { + MovieTrackingMarker *marker = BKE_tracking_get_marker(track, sc->user.framenr); - if ((marker->flag&MARKER_DISABLED)==0) { + if ((marker->flag & MARKER_DISABLED) == 0) { if (!customdata) if (mouse_on_offset(sc, track, marker, co, width, height)) - customdata= create_slide_marker_data(sc, track, marker, event, TRACK_AREA_POINT, SLIDE_ACTION_POS, width, height); + customdata = create_slide_marker_data(sc, track, marker, event, TRACK_AREA_POINT, SLIDE_ACTION_POS, width, height); - if (sc->flag&SC_SHOW_MARKER_SEARCH) { + if (sc->flag & SC_SHOW_MARKER_SEARCH) { if (mouse_on_corner(sc, track, marker, TRACK_AREA_SEARCH, co, 1, width, height)) - customdata= create_slide_marker_data(sc, track, marker, event, TRACK_AREA_SEARCH, SLIDE_ACTION_OFFSET, width, height); + customdata = create_slide_marker_data(sc, track, marker, event, TRACK_AREA_SEARCH, SLIDE_ACTION_OFFSET, width, height); else if (mouse_on_corner(sc, track, marker, TRACK_AREA_SEARCH, co, 0, width, height)) - customdata= create_slide_marker_data(sc, track, marker, event, TRACK_AREA_SEARCH, SLIDE_ACTION_SIZE, width, height); + customdata = create_slide_marker_data(sc, track, marker, event, TRACK_AREA_SEARCH, SLIDE_ACTION_SIZE, width, height); } - if (!customdata && sc->flag&SC_SHOW_MARKER_PATTERN) { + if (!customdata && (sc->flag & SC_SHOW_MARKER_PATTERN)) { if (mouse_on_corner(sc, track, marker, TRACK_AREA_PAT, co, 1, width, height)) - customdata= create_slide_marker_data(sc, track, marker, event, TRACK_AREA_PAT, SLIDE_ACTION_OFFSET, width, height); + customdata = create_slide_marker_data(sc, track, marker, event, TRACK_AREA_PAT, SLIDE_ACTION_OFFSET, width, height); if (!customdata && mouse_on_corner(sc, track, marker, TRACK_AREA_PAT, co, 0, width, height)) - customdata= create_slide_marker_data(sc, track, marker, event, TRACK_AREA_PAT, SLIDE_ACTION_SIZE, width, height); + customdata = create_slide_marker_data(sc, track, marker, event, TRACK_AREA_PAT, SLIDE_ACTION_SIZE, width, height); } if (customdata) @@ -457,7 +457,7 @@ static void *slide_marker_customdata(bContext *C, wmEvent *event) } } - track= track->next; + track = track->next; } return customdata; @@ -465,16 +465,16 @@ static void *slide_marker_customdata(bContext *C, wmEvent *event) static int slide_marker_invoke(bContext *C, wmOperator *op, wmEvent *event) { - SlideMarkerData *slidedata= slide_marker_customdata(C, event); + SlideMarkerData *slidedata = slide_marker_customdata(C, event); if (slidedata) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); - MovieTracking *tracking= &clip->tracking; + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); + MovieTracking *tracking = &clip->tracking; - tracking->act_track= slidedata->track; + tracking->act_track = slidedata->track; - op->customdata= slidedata; + op->customdata = slidedata; hide_cursor(C); WM_event_add_modal_handler(C, op); @@ -491,20 +491,20 @@ static void cancel_mouse_slide(SlideMarkerData *data) { /* cancel sliding */ if (data->area == TRACK_AREA_POINT) { - if (data->action==SLIDE_ACTION_OFFSET) + if (data->action == SLIDE_ACTION_OFFSET) copy_v2_v2(data->offset, data->soff); else copy_v2_v2(data->pos, data->spos); } else { - if (data->action==SLIDE_ACTION_SIZE) { + if (data->action == SLIDE_ACTION_SIZE) { copy_v2_v2(data->min, data->smin); copy_v2_v2(data->max, data->smax); } else { int a; - for (a= 0; atrack->markersnr; a++) + for (a = 0; atrack->markersnr; a++) copy_v2_v2(data->track->markers[a].pos, data->smarkers[a]); copy_v2_v2(data->offset, data->soff); @@ -514,14 +514,16 @@ static void cancel_mouse_slide(SlideMarkerData *data) static void free_slide_data(SlideMarkerData *data) { - if (data->smarkers) MEM_freeN(data->smarkers); + if (data->smarkers) + MEM_freeN(data->smarkers); + MEM_freeN(data); } static int slide_marker_modal(bContext *C, wmOperator *op, wmEvent *event) { - SpaceClip *sc= CTX_wm_space_clip(C); - SlideMarkerData *data= (SlideMarkerData *)op->customdata; + SpaceClip *sc = CTX_wm_space_clip(C); + SlideMarkerData *data = (SlideMarkerData *)op->customdata; float dx, dy, mdelta[2]; switch(event->type) { @@ -529,72 +531,76 @@ static int slide_marker_modal(bContext *C, wmOperator *op, wmEvent *event) case RIGHTCTRLKEY: case LEFTSHIFTKEY: case RIGHTSHIFTKEY: - if (data->action==SLIDE_ACTION_SIZE) + if (data->action == SLIDE_ACTION_SIZE) if (ELEM(event->type, LEFTCTRLKEY, RIGHTCTRLKEY)) - data->lock= event->val==KM_RELEASE; + data->lock = event->val == KM_RELEASE; if (ELEM(event->type, LEFTSHIFTKEY, RIGHTSHIFTKEY)) - data->accurate= event->val==KM_PRESS; + data->accurate = event->val == KM_PRESS; /* no break! update area size */ case MOUSEMOVE: - mdelta[0]= event->mval[0]-data->mval[0]; - mdelta[1]= event->mval[1]-data->mval[1]; + mdelta[0] = event->mval[0]-data->mval[0]; + mdelta[1] = event->mval[1]-data->mval[1]; - dx= mdelta[0]/data->width/sc->zoom; + dx = mdelta[0] / data->width / sc->zoom; - if (data->lock) dy= -dx/data->height*data->width; - else dy= mdelta[1]/data->height/sc->zoom; + if (data->lock) + dy = -dx / data->height * data->width; + else + dy = mdelta[1] / data->height / sc->zoom; if (data->accurate) { - dx/= 5; - dy/= 5; + dx /= 5; + dy /= 5; } - if (data->area==TRACK_AREA_POINT) { - if (data->action==SLIDE_ACTION_OFFSET) { - data->offset[0]= data->soff[0]+dx; - data->offset[1]= data->soff[1]+dy; + if (data->area == TRACK_AREA_POINT) { + if (data->action == SLIDE_ACTION_OFFSET) { + data->offset[0] = data->soff[0] + dx; + data->offset[1] = data->soff[1] + dy; } else { - data->pos[0]= data->spos[0]+dx; - data->pos[1]= data->spos[1]+dy; + data->pos[0] = data->spos[0] + dx; + data->pos[1] = data->spos[1] + dy; - data->marker->flag&= ~MARKER_TRACKED; + data->marker->flag &= ~MARKER_TRACKED; } WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL); DAG_id_tag_update(&sc->clip->id, 0); } else { - if (data->action==SLIDE_ACTION_SIZE) { - data->min[0]= data->smin[0]-dx; - data->max[0]= data->smax[0]+dx; + if (data->action == SLIDE_ACTION_SIZE) { + data->min[0] = data->smin[0] - dx; + data->max[0] = data->smax[0] + dx; - data->min[1]= data->smin[1]+dy; - data->max[1]= data->smax[1]-dy; + data->min[1] = data->smin[1] + dy; + data->max[1] = data->smax[1] - dy; - if (data->area==TRACK_AREA_SEARCH) BKE_tracking_clamp_track(data->track, CLAMP_SEARCH_DIM); - else BKE_tracking_clamp_track(data->track, CLAMP_PAT_DIM); + if (data->area == TRACK_AREA_SEARCH) + BKE_tracking_clamp_track(data->track, CLAMP_SEARCH_DIM); + else + BKE_tracking_clamp_track(data->track, CLAMP_PAT_DIM); } else { - float d[2]={dx, dy}; + float d[2] = {dx, dy}; - if (data->area==TRACK_AREA_SEARCH) { + if (data->area == TRACK_AREA_SEARCH) { add_v2_v2v2(data->min, data->smin, d); add_v2_v2v2(data->max, data->smax, d); } else { int a; - for (a= 0; atrack->markersnr; a++) + for (a = 0; atrack->markersnr; a++) add_v2_v2v2(data->track->markers[a].pos, data->smarkers[a], d); sub_v2_v2v2(data->offset, data->soff, d); } - if (data->area==TRACK_AREA_SEARCH) + if (data->area == TRACK_AREA_SEARCH) BKE_tracking_clamp_track(data->track, CLAMP_SEARCH_POS); } } @@ -604,7 +610,7 @@ static int slide_marker_modal(bContext *C, wmOperator *op, wmEvent *event) break; case LEFTMOUSE: - if (event->val==KM_RELEASE) { + if (event->val == KM_RELEASE) { free_slide_data(op->customdata); show_cursor(C); @@ -653,10 +659,14 @@ void CLIP_OT_slide_marker(wmOperatorType *ot) static int mouse_on_side(float co[2], float x1, float y1, float x2, float y2, float epsx, float epsy) { - if (x1>x2) SWAP(float, x1, x2); - if (y1>y2) SWAP(float, y1, y2); + if (x1 > x2) + + SWAP(float, x1, x2); - return (co[0]>=x1-epsx && co[0]<=x2+epsx) && (co[1]>=y1-epsy && co[1]<=y2+epsy); + if (y1 > y2) + SWAP(float, y1, y2); + + return (co[0] >= x1 - epsx && co[0] <= x2 + epsx) && (co[1] >= y1 - epsy && co[1] <= y2 + epsy); } static int mouse_on_rect(float co[2], float pos[2], float min[2], float max[2], float epsx, float epsy) @@ -669,31 +679,32 @@ static int mouse_on_rect(float co[2], float pos[2], float min[2], float max[2], static int track_mouse_area(SpaceClip *sc, float co[2], MovieTrackingTrack *track) { - MovieTrackingMarker *marker= BKE_tracking_get_marker(track, sc->user.framenr); + MovieTrackingMarker *marker = BKE_tracking_get_marker(track, sc->user.framenr); float epsx, epsy; int width, height; ED_space_clip_size(sc, &width, &height); - epsx= MIN4(track->pat_min[0]-track->search_min[0], track->search_max[0]-track->pat_max[0], + epsx = MIN4(track->pat_min[0]-track->search_min[0], track->search_max[0]-track->pat_max[0], fabsf(track->pat_min[0]), fabsf(track->pat_max[0])) / 2; - epsy= MIN4(track->pat_min[1]-track->search_min[1], track->search_max[1]-track->pat_max[1], + epsy = MIN4(track->pat_min[1]-track->search_min[1], track->search_max[1]-track->pat_max[1], fabsf(track->pat_min[1]), fabsf(track->pat_max[1])) / 2; - epsx= MAX2(epsx, 2.0f / width); - epsy= MAX2(epsy, 2.0f / height); + epsx = MAX2(epsx, 2.0f / width); + epsy = MAX2(epsy, 2.0f / height); - if (sc->flag&SC_SHOW_MARKER_SEARCH) + if (sc->flag & SC_SHOW_MARKER_SEARCH) { if (mouse_on_rect(co, marker->pos, track->search_min, track->search_max, epsx, epsy)) return TRACK_AREA_SEARCH; + } - if ((marker->flag&MARKER_DISABLED)==0) { - if (sc->flag&SC_SHOW_MARKER_PATTERN) + if ((marker->flag & MARKER_DISABLED)== 0) { + if (sc->flag & SC_SHOW_MARKER_PATTERN) if (mouse_on_rect(co, marker->pos, track->pat_min, track->pat_max, epsx, epsy)) return TRACK_AREA_PAT; - epsx= 12.0f/width; - epsy= 12.0f/height; + epsx = 12.0f / width; + epsy = 12.0f / height; if (fabsf(co[0]-marker->pos[0]-track->offset[0])< epsx && fabsf(co[1]-marker->pos[1]-track->offset[1])<=epsy) return TRACK_AREA_POINT; @@ -705,51 +716,51 @@ static int track_mouse_area(SpaceClip *sc, float co[2], MovieTrackingTrack *trac static float dist_to_rect(float co[2], float pos[2], float min[2], float max[2]) { float d1, d2, d3, d4; - float p[2]= {co[0]-pos[0], co[1]-pos[1]}; - float v1[2]= {min[0], min[1]}, v2[2]= {max[0], min[1]}, - v3[2]= {max[0], max[1]}, v4[2]= {min[0], max[1]}; + float p[2] = {co[0]-pos[0], co[1]-pos[1]}; + float v1[2] = {min[0], min[1]}, v2[2] = {max[0], min[1]}, + v3[2] = {max[0], max[1]}, v4[2] = {min[0], max[1]}; - d1= dist_to_line_segment_v2(p, v1, v2); - d2= dist_to_line_segment_v2(p, v2, v3); - d3= dist_to_line_segment_v2(p, v3, v4); - d4= dist_to_line_segment_v2(p, v4, v1); + d1 = dist_to_line_segment_v2(p, v1, v2); + d2 = dist_to_line_segment_v2(p, v2, v3); + d3 = dist_to_line_segment_v2(p, v3, v4); + d4 = dist_to_line_segment_v2(p, v4, v1); return MIN4(d1, d2, d3, d4); } static MovieTrackingTrack *find_nearest_track(SpaceClip *sc, ListBase *tracksbase, float co[2]) { - MovieTrackingTrack *track= NULL, *cur; - float mindist= 0.0f; + MovieTrackingTrack *track = NULL, *cur; + float mindist = 0.0f; - cur= tracksbase->first; + cur = tracksbase->first; while (cur) { - MovieTrackingMarker *marker= BKE_tracking_get_marker(cur, sc->user.framenr); + MovieTrackingMarker *marker = BKE_tracking_get_marker(cur, sc->user.framenr); - if (((cur->flag&TRACK_HIDDEN)==0) && MARKER_VISIBLE(sc, marker)) { - float dist, d1, d2=FLT_MAX, d3=FLT_MAX; + if (((cur->flag & TRACK_HIDDEN) == 0) && MARKER_VISIBLE(sc, marker)) { + float dist, d1, d2 = FLT_MAX, d3 = FLT_MAX; d1= sqrtf((co[0]-marker->pos[0]-cur->offset[0])*(co[0]-marker->pos[0]-cur->offset[0])+ (co[1]-marker->pos[1]-cur->offset[1])*(co[1]-marker->pos[1]-cur->offset[1])); /* distance to marker point */ /* distance to pattern boundbox */ - if (sc->flag&SC_SHOW_MARKER_PATTERN) + if (sc->flag & SC_SHOW_MARKER_PATTERN) d2= dist_to_rect(co, marker->pos, cur->pat_min, cur->pat_max); /* distance to search boundbox */ - if (sc->flag&SC_SHOW_MARKER_SEARCH && TRACK_VIEW_SELECTED(sc, cur)) + if (sc->flag & SC_SHOW_MARKER_SEARCH && TRACK_VIEW_SELECTED(sc, cur)) d3= dist_to_rect(co, marker->pos, cur->search_min, cur->search_max); /* choose minimal distance. useful for cases of overlapped markers. */ - dist= MIN3(d1, d2, d3); + dist = MIN3(d1, d2, d3); - if (track==NULL || distnext; + cur = cur->next; } return track; @@ -757,39 +768,39 @@ static MovieTrackingTrack *find_nearest_track(SpaceClip *sc, ListBase *tracksbas static int mouse_select(bContext *C, float co[2], int extend) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); - MovieTracking *tracking= &clip->tracking; - ListBase *tracksbase= BKE_tracking_get_tracks(tracking); - MovieTrackingTrack *act_track= BKE_tracking_active_track(tracking); - MovieTrackingTrack *track= NULL; /* selected marker */ + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); + MovieTracking *tracking = &clip->tracking; + ListBase *tracksbase = BKE_tracking_get_tracks(tracking); + MovieTrackingTrack *act_track = BKE_tracking_active_track(tracking); + MovieTrackingTrack *track = NULL; /* selected marker */ - track= find_nearest_track(sc, tracksbase, co); + track = find_nearest_track(sc, tracksbase, co); if (track) { - int area= track_mouse_area(sc, co, track); + int area = track_mouse_area(sc, co, track); if (!extend || !TRACK_VIEW_SELECTED(sc, track)) - area= TRACK_AREA_ALL; + area = TRACK_AREA_ALL; if (extend && TRACK_AREA_SELECTED(track, area)) { - if (track==act_track) + if (track == act_track) BKE_tracking_deselect_track(track, area); else - clip->tracking.act_track= track; + clip->tracking.act_track = track; } else { - if (area==TRACK_AREA_POINT) - area= TRACK_AREA_ALL; + if (area == TRACK_AREA_POINT) + area = TRACK_AREA_ALL; BKE_tracking_select_track(tracksbase, track, area, extend); - clip->tracking.act_track= track; + clip->tracking.act_track = track; } } if (!extend) { - sc->xlockof= 0.0f; - sc->ylockof= 0.0f; + sc->xlockof = 0.0f; + sc->ylockof = 0.0f; } WM_event_add_notifier(C, NC_GEOM|ND_SELECT, NULL); @@ -803,7 +814,7 @@ static int select_exec(bContext *C, wmOperator *op) int extend; RNA_float_get_array(op->ptr, "location", co); - extend= RNA_boolean_get(op->ptr, "extend"); + extend = RNA_boolean_get(op->ptr, "extend"); return mouse_select(C, co, extend); } @@ -811,16 +822,16 @@ static int select_exec(bContext *C, wmOperator *op) static int select_invoke(bContext *C, wmOperator *op, wmEvent *event) { float co[2]; - int extend= RNA_boolean_get(op->ptr, "extend"); + int extend = RNA_boolean_get(op->ptr, "extend"); if (!extend) { - SlideMarkerData *slidedata= slide_marker_customdata(C, event); + SlideMarkerData *slidedata = slide_marker_customdata(C, event); if (slidedata) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); - clip->tracking.act_track= slidedata->track; + clip->tracking.act_track = slidedata->track; WM_event_add_notifier(C, NC_GEOM|ND_SELECT, NULL); @@ -862,13 +873,13 @@ void CLIP_OT_select(wmOperatorType *ot) static int border_select_exec(bContext *C, wmOperator *op) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); MovieTrackingTrack *track; - ListBase *tracksbase= BKE_tracking_get_tracks(&clip->tracking); + ListBase *tracksbase = BKE_tracking_get_tracks(&clip->tracking); rcti rect; rctf rectf; - int change= 0, mode, extend; + int change = FALSE, mode, extend; /* get rectangle from operator */ rect.xmin = RNA_int_get(op->ptr, "xmin"); @@ -879,14 +890,14 @@ static int border_select_exec(bContext *C, wmOperator *op) ED_clip_point_stable_pos(C, rect.xmin, rect.ymin, &rectf.xmin, &rectf.ymin); ED_clip_point_stable_pos(C, rect.xmax, rect.ymax, &rectf.xmax, &rectf.ymax); - mode= RNA_int_get(op->ptr, "gesture_mode"); - extend= RNA_boolean_get(op->ptr, "extend"); + mode = RNA_int_get(op->ptr, "gesture_mode"); + extend = RNA_boolean_get(op->ptr, "extend"); /* do actual selection */ - track= tracksbase->first; + track = tracksbase->first; while (track) { - if ((track->flag&TRACK_HIDDEN)==0) { - MovieTrackingMarker *marker= BKE_tracking_get_marker(track, sc->user.framenr); + if ((track->flag & TRACK_HIDDEN) == 0) { + MovieTrackingMarker *marker = BKE_tracking_get_marker(track, sc->user.framenr); if (MARKER_VISIBLE(sc, marker)) { if (BLI_in_rctf(&rectf, marker->pos[0], marker->pos[1])) { @@ -896,11 +907,11 @@ static int border_select_exec(bContext *C, wmOperator *op) BKE_tracking_track_flag(track, TRACK_AREA_ALL, SELECT, 1); } - change= 1; + change = TRUE; } } - track= track->next; + track = track->next; } if (change) { @@ -939,52 +950,52 @@ static int marker_inside_ellipse(MovieTrackingMarker *marker, float offset[2], f /* normalized ellipse: ell[0] = scaleX, ell[1] = scaleY */ float x, y; - x= (marker->pos[0] - offset[0])*ellipse[0]; - y= (marker->pos[1] - offset[1])*ellipse[1]; + x = (marker->pos[0] - offset[0])*ellipse[0]; + y = (marker->pos[1] - offset[1])*ellipse[1]; return x*x + y*y < 1.0f; } static int circle_select_exec(bContext *C, wmOperator *op) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); - ARegion *ar= CTX_wm_region(C); + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); + ARegion *ar = CTX_wm_region(C); MovieTrackingTrack *track; - ListBase *tracksbase= BKE_tracking_get_tracks(&clip->tracking); - int x, y, radius, width, height, mode, change= 0; + ListBase *tracksbase = BKE_tracking_get_tracks(&clip->tracking); + int x, y, radius, width, height, mode, change = FALSE; float zoomx, zoomy, offset[2], ellipse[2]; /* get operator properties */ - x= RNA_int_get(op->ptr, "x"); - y= RNA_int_get(op->ptr, "y"); - radius= RNA_int_get(op->ptr, "radius"); + x = RNA_int_get(op->ptr, "x"); + y = RNA_int_get(op->ptr, "y"); + radius = RNA_int_get(op->ptr, "radius"); - mode= RNA_int_get(op->ptr, "gesture_mode"); + mode = RNA_int_get(op->ptr, "gesture_mode"); /* compute ellipse and position in unified coordinates */ ED_space_clip_size(sc, &width, &height); ED_space_clip_zoom(sc, ar, &zoomx, &zoomy); - ellipse[0]= width*zoomx/radius; - ellipse[1]= height*zoomy/radius; + ellipse[0] = width * zoomx / radius; + ellipse[1] = height * zoomy / radius; ED_clip_point_stable_pos(C, x, y, &offset[0], &offset[1]); /* do selection */ - track= tracksbase->first; + track = tracksbase->first; while (track) { - if ((track->flag&TRACK_HIDDEN)==0) { - MovieTrackingMarker *marker= BKE_tracking_get_marker(track, sc->user.framenr); + if ((track->flag & TRACK_HIDDEN) == 0) { + MovieTrackingMarker *marker = BKE_tracking_get_marker(track, sc->user.framenr); if (MARKER_VISIBLE(sc, marker) && marker_inside_ellipse(marker, offset, ellipse)) { BKE_tracking_track_flag(track, TRACK_AREA_ALL, SELECT, mode!=GESTURE_MODAL_SELECT); - change= 1; + change = TRUE; } } - track= track->next; + track = track->next; } if (change) { @@ -1023,66 +1034,66 @@ void CLIP_OT_select_circle(wmOperatorType *ot) static int select_all_exec(bContext *C, wmOperator *op) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); - MovieTrackingTrack *track= NULL; /* selected track */ + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); + MovieTrackingTrack *track = NULL; /* selected track */ MovieTrackingMarker *marker; - ListBase *tracksbase= BKE_tracking_get_tracks(&clip->tracking); - int action= RNA_enum_get(op->ptr, "action"); - int framenr= sc->user.framenr; - int has_selection= 0; + ListBase *tracksbase = BKE_tracking_get_tracks(&clip->tracking); + int action = RNA_enum_get(op->ptr, "action"); + int framenr = sc->user.framenr; + int has_selection = FALSE; if (action == SEL_TOGGLE) { - action= SEL_SELECT; - track= tracksbase->first; + action = SEL_SELECT; + track = tracksbase->first; while (track) { if (TRACK_VIEW_SELECTED(sc, track)) { - marker= BKE_tracking_get_marker(track, framenr); + marker = BKE_tracking_get_marker(track, framenr); if (MARKER_VISIBLE(sc, marker)) { - action= SEL_DESELECT; + action = SEL_DESELECT; break; } } - track= track->next; + track = track->next; } } - track= tracksbase->first; + track = tracksbase->first; while (track) { - if ((track->flag&TRACK_HIDDEN)==0) { - marker= BKE_tracking_get_marker(track, framenr); + if ((track->flag & TRACK_HIDDEN)==0) { + marker = BKE_tracking_get_marker(track, framenr); if (MARKER_VISIBLE(sc, marker)) { switch (action) { case SEL_SELECT: - track->flag|= SELECT; - track->pat_flag|= SELECT; - track->search_flag|= SELECT; + track->flag |= SELECT; + track->pat_flag |= SELECT; + track->search_flag |= SELECT; break; case SEL_DESELECT: - track->flag&= ~SELECT; - track->pat_flag&= ~SELECT; - track->search_flag&= ~SELECT; + track->flag &= ~SELECT; + track->pat_flag &= ~SELECT; + track->search_flag &= ~SELECT; break; case SEL_INVERT: - track->flag^= SELECT; - track->pat_flag^= SELECT; - track->search_flag^= SELECT; + track->flag ^= SELECT; + track->pat_flag ^= SELECT; + track->search_flag ^= SELECT; break; } } } if (TRACK_VIEW_SELECTED(sc, track)) - has_selection= 1; + has_selection = TRUE; - track= track->next; + track = track->next; } if (!has_selection) - sc->flag&= ~SC_LOCK_SELECTION; + sc->flag &= ~SC_LOCK_SELECTION; WM_event_add_notifier(C, NC_GEOM|ND_SELECT, NULL); @@ -1110,56 +1121,58 @@ void CLIP_OT_select_all(wmOperatorType *ot) static int select_groped_exec(bContext *C, wmOperator *op) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); MovieTrackingTrack *track; MovieTrackingMarker *marker; - MovieTracking *tracking= &clip->tracking; - ListBase *tracksbase= BKE_tracking_get_tracks(tracking); - int group= RNA_enum_get(op->ptr, "group"); + MovieTracking *tracking = &clip->tracking; + ListBase *tracksbase = BKE_tracking_get_tracks(tracking); + int group = RNA_enum_get(op->ptr, "group"); - track= tracksbase->first; + track = tracksbase->first; while (track) { - int ok= 0; + int ok = FALSE; - marker= BKE_tracking_get_marker(track, sc->user.framenr); + marker = BKE_tracking_get_marker(track, sc->user.framenr); - if (group==0) { /* Keyframed */ - ok= marker->framenr==sc->user.framenr && (marker->flag&MARKER_TRACKED)==0; + if (group == 0) { /* Keyframed */ + ok = marker->framenr == sc->user.framenr && (marker->flag & MARKER_TRACKED)==0; } - else if (group==1) { /* Estimated */ - ok= marker->framenr!=sc->user.framenr; + else if (group == 1) { /* Estimated */ + ok = marker->framenr != sc->user.framenr; } - else if (group==2) { /* tracked */ - ok= marker->framenr==sc->user.framenr && (marker->flag&MARKER_TRACKED); + else if (group == 2) { /* tracked */ + ok = marker->framenr == sc->user.framenr && (marker->flag & MARKER_TRACKED); } - else if (group==3) { /* locked */ - ok= track->flag&TRACK_LOCKED; + else if (group == 3) { /* locked */ + ok = track->flag & TRACK_LOCKED; } - else if (group==4) { /* disabled */ - ok= marker->flag&MARKER_DISABLED; + else if (group == 4) { /* disabled */ + ok = marker->flag & MARKER_DISABLED; } - else if (group==5) { /* color */ - MovieTrackingTrack *act_track= BKE_tracking_active_track(tracking); + else if (group == 5) { /* color */ + MovieTrackingTrack *act_track = BKE_tracking_active_track(tracking); if (act_track) { - ok= (track->flag&TRACK_CUSTOMCOLOR) == (act_track->flag&TRACK_CUSTOMCOLOR); + ok = (track->flag & TRACK_CUSTOMCOLOR) == (act_track->flag & TRACK_CUSTOMCOLOR); - if (ok && track->flag&TRACK_CUSTOMCOLOR) - ok= equals_v3v3(track->color, act_track->color); + if (ok && track->flag & TRACK_CUSTOMCOLOR) + ok = equals_v3v3(track->color, act_track->color); } } - else if (group==6) { /* failed */ - ok= (track->flag&TRACK_HAS_BUNDLE) == 0; + else if (group == 6) { /* failed */ + ok = (track->flag & TRACK_HAS_BUNDLE) == 0; } if (ok) { - track->flag|= SELECT; - if (sc->flag&SC_SHOW_MARKER_PATTERN) track->pat_flag|= SELECT; - if (sc->flag&SC_SHOW_MARKER_SEARCH) track->search_flag|= SELECT; + track->flag |= SELECT; + if (sc->flag & SC_SHOW_MARKER_PATTERN) + track->pat_flag |= SELECT; + if (sc->flag & SC_SHOW_MARKER_SEARCH) + track->search_flag |= SELECT; } - track= track->next; + track = track->next; } WM_event_add_notifier(C, NC_MOVIECLIP|ND_DISPLAY, clip); @@ -1217,21 +1230,21 @@ static int track_markers_testbreak(void) static int track_count_markers(SpaceClip *sc, MovieClip *clip) { - int tot= 0; - ListBase *tracksbase= BKE_tracking_get_tracks(&clip->tracking); + int tot = 0; + ListBase *tracksbase = BKE_tracking_get_tracks(&clip->tracking); MovieTrackingTrack *track; - int framenr= sc->user.framenr; + int framenr = sc->user.framenr; - track= tracksbase->first; + track = tracksbase->first; while (track) { - if (TRACK_VIEW_SELECTED(sc, track) && (track->flag&TRACK_LOCKED)==0) { - MovieTrackingMarker *marker= BKE_tracking_get_marker(track, framenr); + if (TRACK_VIEW_SELECTED(sc, track) && (track->flag & TRACK_LOCKED) == 0) { + MovieTrackingMarker *marker = BKE_tracking_get_marker(track, framenr); - if (!marker || (marker->flag&MARKER_DISABLED) == 0) + if (!marker || (marker->flag & MARKER_DISABLED) == 0) tot++; } - track= track->next; + track = track->next; } return tot; @@ -1239,13 +1252,13 @@ static int track_count_markers(SpaceClip *sc, MovieClip *clip) static void clear_invisible_track_selection(SpaceClip *sc, MovieClip *clip) { - ListBase *tracksbase= BKE_tracking_get_tracks(&clip->tracking); + ListBase *tracksbase = BKE_tracking_get_tracks(&clip->tracking); int hidden = 0; - if ((sc->flag&SC_SHOW_MARKER_PATTERN)==0) + if ((sc->flag & SC_SHOW_MARKER_PATTERN)==0) hidden |= TRACK_AREA_PAT; - if ((sc->flag&SC_SHOW_MARKER_SEARCH)==0) + if ((sc->flag & SC_SHOW_MARKER_SEARCH)==0) hidden |= TRACK_AREA_SEARCH; if (hidden) { @@ -1262,128 +1275,139 @@ static void clear_invisible_track_selection(SpaceClip *sc, MovieClip *clip) static void track_init_markers(SpaceClip *sc, MovieClip *clip, int *frames_limit_r) { - ListBase *tracksbase= BKE_tracking_get_tracks(&clip->tracking); + ListBase *tracksbase = BKE_tracking_get_tracks(&clip->tracking); MovieTrackingTrack *track; - int framenr= sc->user.framenr; - int frames_limit= 0; + int framenr = sc->user.framenr; + int frames_limit = 0; clear_invisible_track_selection(sc, clip); - track= tracksbase->first; + track = tracksbase->first; while (track) { if (TRACK_VIEW_SELECTED(sc, track)) { - if ((track->flag&TRACK_HIDDEN)==0 && (track->flag&TRACK_LOCKED)==0) { + if ((track->flag & TRACK_HIDDEN)==0 && (track->flag & TRACK_LOCKED)==0) { BKE_tracking_ensure_marker(track, framenr); if (track->frames_limit) { - if (frames_limit==0) - frames_limit= track->frames_limit; + if (frames_limit == 0) + frames_limit = track->frames_limit; else - frames_limit= MIN2(frames_limit, track->frames_limit); + frames_limit = MIN2(frames_limit, track->frames_limit); } } } - track= track->next; + track = track->next; } - *frames_limit_r= frames_limit; + *frames_limit_r = frames_limit; } static int track_markers_check_direction(int backwards, int curfra, int efra) { if (backwards) { - if (curfraefra) return 0; + if (curfra > efra) + return FALSE; } - return 1; + return TRUE; } static int track_markers_initjob(bContext *C, TrackMarkersJob *tmj, int backwards) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); - Scene *scene= CTX_data_scene(C); - MovieTrackingSettings *settings= &clip->tracking.settings; + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); + Scene *scene = CTX_data_scene(C); + MovieTrackingSettings *settings = &clip->tracking.settings; int frames_limit; track_init_markers(sc, clip, &frames_limit); - tmj->sfra= sc->user.framenr; - tmj->clip= clip; - tmj->backwards= backwards; + tmj->sfra = sc->user.framenr; + tmj->clip = clip; + tmj->backwards = backwards; - if (backwards) tmj->efra= SFRA; - else tmj->efra= EFRA; + if (backwards) + tmj->efra = SFRA; + else + tmj->efra = EFRA; /* limit frames to be tracked by user setting */ if (frames_limit) { - if (backwards) tmj->efra= MAX2(tmj->efra, tmj->sfra-frames_limit); - else tmj->efra= MIN2(tmj->efra, tmj->sfra+frames_limit); + if (backwards) + tmj->efra = MAX2(tmj->efra, tmj->sfra - frames_limit); + else + tmj->efra = MIN2(tmj->efra, tmj->sfra + frames_limit); } - if (settings->speed!=TRACKING_SPEED_FASTEST) { - tmj->delay= 1.0f/scene->r.frs_sec*1000.0f; + if (settings->speed != TRACKING_SPEED_FASTEST) { + tmj->delay = 1.0f / scene->r.frs_sec * 1000.0f; - if (settings->speed==TRACKING_SPEED_HALF) tmj->delay*= 2; - else if (settings->speed==TRACKING_SPEED_QUARTER) tmj->delay*= 4; - else if (settings->speed==TRACKING_SPEED_DOUBLE) tmj->delay/= 2; + if (settings->speed == TRACKING_SPEED_HALF) + tmj->delay *= 2; + else if (settings->speed == TRACKING_SPEED_QUARTER) + tmj->delay *= 4; + else if (settings->speed == TRACKING_SPEED_DOUBLE) + tmj->delay /= 2; } - tmj->context= BKE_tracking_context_new(clip, &sc->user, backwards, 1); + tmj->context = BKE_tracking_context_new(clip, &sc->user, backwards, 1); - clip->tracking_context= tmj->context; + clip->tracking_context = tmj->context; - tmj->lastfra= tmj->sfra; + tmj->lastfra = tmj->sfra; /* XXX: silly to store this, but this data is needed to update scene and movie-clip * frame numbers when tracking is finished. This introduces better feedback for artists. * Maybe there's another way to solve this problem, but can't think better way atm. * Anyway, this way isn't more unstable as animation rendering animation * which uses the same approach (except storing screen). */ - tmj->scene= scene; - tmj->main= CTX_data_main(C); - tmj->screen= CTX_wm_screen(C); + tmj->scene = scene; + tmj->main = CTX_data_main(C); + tmj->screen = CTX_wm_screen(C); return track_markers_check_direction(backwards, tmj->sfra, tmj->efra); } static void track_markers_startjob(void *tmv, short *stop, short *do_update, float *progress) { - TrackMarkersJob *tmj= (TrackMarkersJob *)tmv; - int framenr= tmj->sfra; - //double t= PIL_check_seconds_timer(); + TrackMarkersJob *tmj = (TrackMarkersJob *)tmv; + int framenr = tmj->sfra; + //double t = PIL_check_seconds_timer(); while (framenr != tmj->efra) { - if (tmj->delay>0) { + if (tmj->delay > 0) { /* tracking should happen with fixed fps. Calculate time * using current timer value before tracking frame and after. * * Small (and maybe unneeded optimization): do not calculate exec_time * for "Fastest" tracking */ - double start_time= PIL_check_seconds_timer(), exec_time; + double start_time = PIL_check_seconds_timer(), exec_time; if (!BKE_tracking_next(tmj->context)) break; - exec_time= PIL_check_seconds_timer()-start_time; + exec_time = PIL_check_seconds_timer()-start_time; if (tmj->delay > (float)exec_time) PIL_sleep_ms(tmj->delay-(float)exec_time); } else if (!BKE_tracking_next(tmj->context)) break; - *do_update= 1; - *progress=(float)(framenr-tmj->sfra) / (tmj->efra-tmj->sfra); + *do_update = TRUE; + *progress = (float)(framenr-tmj->sfra) / (tmj->efra-tmj->sfra); - if (tmj->backwards) framenr--; - else framenr++; + if (tmj->backwards) + framenr--; + else + framenr++; - tmj->lastfra= framenr; + tmj->lastfra = framenr; if (*stop || track_markers_testbreak()) break; @@ -1394,17 +1418,17 @@ static void track_markers_startjob(void *tmv, short *stop, short *do_update, flo static void track_markers_updatejob(void *tmv) { - TrackMarkersJob *tmj= (TrackMarkersJob *)tmv; + TrackMarkersJob *tmj = (TrackMarkersJob *)tmv; BKE_tracking_sync(tmj->context); } static void track_markers_freejob(void *tmv) { - TrackMarkersJob *tmj= (TrackMarkersJob *)tmv; + TrackMarkersJob *tmj = (TrackMarkersJob *)tmv; - tmj->clip->tracking_context= NULL; - tmj->scene->r.cfra= tmj->lastfra; + tmj->clip->tracking_context = NULL; + tmj->scene->r.cfra = tmj->lastfra; ED_update_for_newframe(tmj->main, tmj->scene, tmj->screen, 0); BKE_tracking_sync(tmj->context); @@ -1417,14 +1441,14 @@ static void track_markers_freejob(void *tmv) static int track_markers_exec(bContext *C, wmOperator *op) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); - Scene *scene= CTX_data_scene(C); + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); + Scene *scene = CTX_data_scene(C); struct MovieTrackingContext *context; - int framenr= sc->user.framenr; - int sfra= framenr, efra; - int backwards= RNA_boolean_get(op->ptr, "backwards"); - int sequence= RNA_boolean_get(op->ptr, "sequence"); + int framenr = sc->user.framenr; + int sfra = framenr, efra; + int backwards = RNA_boolean_get(op->ptr, "backwards"); + int sequence = RNA_boolean_get(op->ptr, "sequence"); int frames_limit; if (track_count_markers(sc, clip)==0) @@ -1432,20 +1456,22 @@ static int track_markers_exec(bContext *C, wmOperator *op) track_init_markers(sc, clip, &frames_limit); - if (backwards) efra= SFRA; - else efra= EFRA; + if (backwards) + efra = SFRA; + else + efra = EFRA; /* limit frames to be tracked by user setting */ if (frames_limit) { - if (backwards) efra= MAX2(efra, sfra-frames_limit); - else efra= MIN2(efra, sfra+frames_limit); + if (backwards) efra = MAX2(efra, sfra-frames_limit); + else efra = MIN2(efra, sfra+frames_limit); } if (!track_markers_check_direction(backwards, framenr, efra)) return OPERATOR_CANCELLED; /* do not disable tracks due to threshold when tracking frame-by-frame */ - context= BKE_tracking_context_new(clip, &sc->user, backwards, sequence); + context = BKE_tracking_context_new(clip, &sc->user, backwards, sequence); while (framenr != efra) { if (!BKE_tracking_next(context)) @@ -1462,7 +1488,7 @@ static int track_markers_exec(bContext *C, wmOperator *op) BKE_tracking_context_free(context); /* update scene current frame to the lastes tracked frame */ - scene->r.cfra= framenr; + scene->r.cfra = framenr; WM_event_add_notifier(C, NC_MOVIECLIP|NA_EVALUATED, clip); WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene); @@ -1473,12 +1499,12 @@ static int track_markers_exec(bContext *C, wmOperator *op) static int track_markers_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { TrackMarkersJob *tmj; - ScrArea *sa= CTX_wm_area(C); - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); + ScrArea *sa = CTX_wm_area(C); + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); wmJob *steve; - int backwards= RNA_boolean_get(op->ptr, "backwards"); - int sequence= RNA_boolean_get(op->ptr, "sequence"); + int backwards = RNA_boolean_get(op->ptr, "backwards"); + int sequence = RNA_boolean_get(op->ptr, "sequence"); if (WM_jobs_test(CTX_wm_manager(C), CTX_wm_area(C))) { /* only one tracking is allowed at a time */ @@ -1494,7 +1520,7 @@ static int track_markers_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve if (!sequence) return track_markers_exec(C, op); - tmj= MEM_callocN(sizeof(TrackMarkersJob), "TrackMarkersJob data"); + tmj = MEM_callocN(sizeof(TrackMarkersJob), "TrackMarkersJob data"); if (!track_markers_initjob(C, tmj, backwards)) { track_markers_freejob(tmj); @@ -1502,7 +1528,7 @@ static int track_markers_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve } /* setup job */ - steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), sa, "Track Markers", WM_JOB_PROGRESS); + steve = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), sa, "Track Markers", WM_JOB_PROGRESS); WM_jobs_customdata(steve, tmj, track_markers_freejob); /* if there's delay set in tracking job, tracking should happen @@ -1514,7 +1540,7 @@ static int track_markers_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve WM_jobs_callbacks(steve, track_markers_startjob, NULL, track_markers_updatejob, NULL); - G.afbreek= 0; + G.afbreek = 0; WM_jobs_start(CTX_wm_manager(C), steve); WM_cursor_wait(0); @@ -1578,12 +1604,12 @@ typedef struct { static int solve_camera_initjob(bContext *C, SolveCameraJob *scj, wmOperator *op, char *error_msg, int max_error) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); - Scene *scene= CTX_data_scene(C); - MovieTracking *tracking= &clip->tracking; - MovieTrackingSettings *settings= &clip->tracking.settings; - MovieTrackingObject *object= BKE_tracking_active_object(tracking); + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); + Scene *scene = CTX_data_scene(C); + MovieTracking *tracking = &clip->tracking; + MovieTrackingSettings *settings = &clip->tracking.settings; + MovieTrackingObject *object = BKE_tracking_active_object(tracking); int width, height; if (!BKE_tracking_can_reconstruct(tracking, object, error_msg, max_error)) @@ -1592,30 +1618,30 @@ static int solve_camera_initjob(bContext *C, SolveCameraJob *scj, wmOperator *op /* could fail if footage uses images with different sizes */ BKE_movieclip_get_size(clip, &sc->user, &width, &height); - scj->clip= clip; - scj->scene= scene; - scj->reports= op->reports; - scj->user= sc->user; + scj->clip = clip; + scj->scene = scene; + scj->reports = op->reports; + scj->user = sc->user; - scj->context= BKE_tracking_reconstruction_context_new(tracking, object, + scj->context = BKE_tracking_reconstruction_context_new(tracking, object, settings->keyframe1, settings->keyframe2, width, height); - tracking->stats= MEM_callocN(sizeof(MovieTrackingStats), "solve camera stats"); + tracking->stats = MEM_callocN(sizeof(MovieTrackingStats), "solve camera stats"); return 1; } static void solve_camera_updatejob(void *scv) { - SolveCameraJob *scj= (SolveCameraJob *)scv; - MovieTracking *tracking= &scj->clip->tracking; + SolveCameraJob *scj = (SolveCameraJob *)scv; + MovieTracking *tracking = &scj->clip->tracking; BLI_strncpy(tracking->stats->message, scj->stats_message, sizeof(tracking->stats->message)); } static void solve_camera_startjob(void *scv, short *stop, short *do_update, float *progress) { - SolveCameraJob *scj= (SolveCameraJob *)scv; + SolveCameraJob *scj = (SolveCameraJob *)scv; BKE_tracking_solve_reconstruction(scj->context, stop, do_update, progress, scj->stats_message, sizeof(scj->stats_message)); @@ -1623,10 +1649,10 @@ static void solve_camera_startjob(void *scv, short *stop, short *do_update, floa static void solve_camera_freejob(void *scv) { - SolveCameraJob *scj= (SolveCameraJob *)scv; - MovieTracking *tracking= &scj->clip->tracking; - Scene *scene= scj->scene; - MovieClip *clip= scj->clip; + SolveCameraJob *scj = (SolveCameraJob *)scv; + MovieTracking *tracking = &scj->clip->tracking; + Scene *scene = scj->scene; + MovieClip *clip = scj->clip; int solved; if (!scj->context) { @@ -1635,7 +1661,7 @@ static void solve_camera_freejob(void *scv) return; } - solved= BKE_tracking_finish_reconstruction(scj->context, tracking); + solved = BKE_tracking_finish_reconstruction(scj->context, tracking); if (!solved) BKE_report(scj->reports, RPT_WARNING, "Some data failed to reconstruct, see console for details"); @@ -1646,12 +1672,12 @@ static void solve_camera_freejob(void *scv) if (scene->clip) id_us_min(&clip->id); - scene->clip= clip; + scene->clip = clip; id_us_plus(&clip->id); /* set blender camera focal length so result would look fine there */ if (scene->camera) { - Camera *camera= (Camera*)scene->camera->data; + Camera *camera = (Camera*)scene->camera->data; int width, height; BKE_movieclip_get_size(clip, &scj->user, &width, &height); @@ -1662,7 +1688,7 @@ static void solve_camera_freejob(void *scv) } MEM_freeN(tracking->stats); - tracking->stats= NULL; + tracking->stats = NULL; DAG_id_tag_update(&clip->id, 0); @@ -1679,9 +1705,9 @@ static void solve_camera_freejob(void *scv) static int solve_camera_exec(bContext *C, wmOperator *op) { SolveCameraJob *scj; - char error_msg[256]= "\0"; + char error_msg[256] = "\0"; - scj= MEM_callocN(sizeof(SolveCameraJob), "SolveCameraJob data"); + scj = MEM_callocN(sizeof(SolveCameraJob), "SolveCameraJob data"); if (!solve_camera_initjob(C, scj, op, error_msg, sizeof(error_msg))) { if (error_msg[0]) BKE_report(op->reports, RPT_ERROR, error_msg); @@ -1701,20 +1727,20 @@ static int solve_camera_exec(bContext *C, wmOperator *op) static int solve_camera_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { SolveCameraJob *scj; - ScrArea *sa= CTX_wm_area(C); - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); - MovieTracking *tracking= &clip->tracking; - MovieTrackingReconstruction *reconstruction= BKE_tracking_get_reconstruction(tracking); + ScrArea *sa = CTX_wm_area(C); + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); + MovieTracking *tracking = &clip->tracking; + MovieTrackingReconstruction *reconstruction = BKE_tracking_get_reconstruction(tracking); wmJob *steve; - char error_msg[256]= "\0"; + char error_msg[256] = "\0"; if (WM_jobs_test(CTX_wm_manager(C), CTX_wm_area(C))) { /* only one solve is allowed at a time */ return OPERATOR_CANCELLED; } - scj= MEM_callocN(sizeof(SolveCameraJob), "SolveCameraJob data"); + scj = MEM_callocN(sizeof(SolveCameraJob), "SolveCameraJob data"); if (!solve_camera_initjob(C, scj, op, error_msg, sizeof(error_msg))) { if (error_msg[0]) BKE_report(op->reports, RPT_ERROR, error_msg); @@ -1727,16 +1753,16 @@ static int solve_camera_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even BLI_strncpy(tracking->stats->message, "Solving camera | Preparing solve", sizeof(tracking->stats->message)); /* hide reconstruction statistics from previous solve */ - reconstruction->flag&= ~TRACKING_RECONSTRUCTED; + reconstruction->flag &= ~TRACKING_RECONSTRUCTED; WM_event_add_notifier(C, NC_MOVIECLIP|NA_EVALUATED, clip); /* setup job */ - steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), sa, "Solve Camera", WM_JOB_PROGRESS); + steve = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), sa, "Solve Camera", WM_JOB_PROGRESS); WM_jobs_customdata(steve, scj, solve_camera_freejob); WM_jobs_timer(steve, 0.1, NC_MOVIECLIP|NA_EVALUATED, 0); WM_jobs_callbacks(steve, solve_camera_startjob, NULL, solve_camera_updatejob, NULL); - G.afbreek= 0; + G.afbreek = 0; WM_jobs_start(CTX_wm_manager(C), steve); WM_cursor_wait(0); @@ -1750,7 +1776,7 @@ static int solve_camera_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even static int solve_camera_modal(bContext *C, wmOperator *UNUSED(op), wmEvent *event) { /* no running solver, remove handler and pass through */ - if (0==WM_jobs_test(CTX_wm_manager(C), CTX_wm_area(C))) + if (0 == WM_jobs_test(CTX_wm_manager(C), CTX_wm_area(C))) return OPERATOR_FINISHED|OPERATOR_PASS_THROUGH; /* running tracking */ @@ -1784,26 +1810,26 @@ void CLIP_OT_solve_camera(wmOperatorType *ot) static int clear_solution_exec(bContext *C, wmOperator *UNUSED(op)) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); - MovieTracking *tracking= &clip->tracking; - ListBase *tracksbase= BKE_tracking_get_tracks(&clip->tracking); - MovieTrackingReconstruction *reconstruction= BKE_tracking_get_reconstruction(tracking); - MovieTrackingTrack *track= tracksbase->first; + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); + MovieTracking *tracking = &clip->tracking; + ListBase *tracksbase = BKE_tracking_get_tracks(&clip->tracking); + MovieTrackingReconstruction *reconstruction = BKE_tracking_get_reconstruction(tracking); + MovieTrackingTrack *track = tracksbase->first; while (track) { - track->flag&= ~TRACK_HAS_BUNDLE; + track->flag &= ~TRACK_HAS_BUNDLE; - track= track->next; + track = track->next; } if (reconstruction->cameras) MEM_freeN(reconstruction->cameras); - reconstruction->cameras= NULL; - reconstruction->camnr= 0; + reconstruction->cameras = NULL; + reconstruction->camnr = 0; - reconstruction->flag&= ~TRACKING_RECONSTRUCTED; + reconstruction->flag &= ~TRACKING_RECONSTRUCTED; DAG_id_tag_update(&clip->id, 0); @@ -1832,24 +1858,24 @@ void CLIP_OT_clear_solution(wmOperatorType *ot) static int clear_track_path_exec(bContext *C, wmOperator *op) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); MovieTrackingTrack *track; - ListBase *tracksbase= BKE_tracking_get_tracks(&clip->tracking); - int action= RNA_enum_get(op->ptr, "action"); - int clear_active= RNA_boolean_get(op->ptr, "clear_active"); + ListBase *tracksbase = BKE_tracking_get_tracks(&clip->tracking); + int action = RNA_enum_get(op->ptr, "action"); + int clear_active = RNA_boolean_get(op->ptr, "clear_active"); if (clear_active) { - track= BKE_tracking_active_track(&clip->tracking); + track = BKE_tracking_active_track(&clip->tracking); BKE_tracking_clear_path(track, sc->user.framenr, action); } else { - track= tracksbase->first; + track = tracksbase->first; while (track) { if (TRACK_VIEW_SELECTED(sc, track)) BKE_tracking_clear_path(track, sc->user.framenr, action); - track= track->next; + track = track->next; } } @@ -1888,23 +1914,25 @@ void CLIP_OT_clear_track_path(wmOperatorType *ot) static int disable_markers_exec(bContext *C, wmOperator *op) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); - MovieTracking *tracking= &clip->tracking; - ListBase *tracksbase= BKE_tracking_get_tracks(tracking); - MovieTrackingTrack *track= tracksbase->first; - int action= RNA_enum_get(op->ptr, "action"); + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); + MovieTracking *tracking = &clip->tracking; + ListBase *tracksbase = BKE_tracking_get_tracks(tracking); + MovieTrackingTrack *track = tracksbase->first; + int action = RNA_enum_get(op->ptr, "action"); while (track) { - if (TRACK_VIEW_SELECTED(sc, track) && (track->flag&TRACK_LOCKED)==0) { - MovieTrackingMarker *marker= BKE_tracking_ensure_marker(track, sc->user.framenr); - - if (action==0) marker->flag|= MARKER_DISABLED; - else if (action==1) marker->flag&= ~MARKER_DISABLED; - else marker->flag^= MARKER_DISABLED; + if (TRACK_VIEW_SELECTED(sc, track) && (track->flag & TRACK_LOCKED)==0) { + MovieTrackingMarker *marker = BKE_tracking_ensure_marker(track, sc->user.framenr); + + if (action == 0) + marker->flag |= MARKER_DISABLED; + else if (action == 1) + marker->flag &= ~MARKER_DISABLED; + else marker->flag ^= MARKER_DISABLED; } - track= track->next; + track = track->next; } DAG_id_tag_update(&clip->id, 0); @@ -1943,22 +1971,22 @@ void CLIP_OT_disable_markers(wmOperatorType *ot) static Object *get_camera_with_movieclip(Scene *scene, MovieClip *clip) { - Object *camera= scene->camera; + Object *camera = scene->camera; Base *base; if (camera && object_get_movieclip(scene, camera, 0)==clip) return camera; - base= scene->base.first; + base = scene->base.first; while (base) { if (base->object->type == OB_CAMERA) { if (object_get_movieclip(scene, base->object, 0)==clip) { - camera= base->object; + camera = base->object; break; } } - base= base->next; + base = base->next; } return camera; @@ -1966,22 +1994,22 @@ static Object *get_camera_with_movieclip(Scene *scene, MovieClip *clip) static Object *get_orientation_object(bContext *C) { - Scene *scene= CTX_data_scene(C); - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); - MovieTracking *tracking= &clip->tracking; - MovieTrackingObject *tracking_object= BKE_tracking_active_object(tracking); - Object *object= NULL; + Scene *scene = CTX_data_scene(C); + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); + MovieTracking *tracking = &clip->tracking; + MovieTrackingObject *tracking_object = BKE_tracking_active_object(tracking); + Object *object = NULL; - if (tracking_object->flag&TRACKING_OBJECT_CAMERA) { - object= get_camera_with_movieclip(scene, clip); + if (tracking_object->flag & TRACKING_OBJECT_CAMERA) { + object = get_camera_with_movieclip(scene, clip); } else { - object= OBACT; + object = OBACT; } if (object && object->parent) - object= object->parent; + object = object->parent; return object; } @@ -1989,37 +2017,37 @@ static Object *get_orientation_object(bContext *C) static int set_orientation_poll(bContext *C) { if (space_clip_frame_poll(C)) { - Scene *scene= CTX_data_scene(C); - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); - MovieTracking *tracking= &clip->tracking; - MovieTrackingObject *tracking_object= BKE_tracking_active_object(tracking); - - if (tracking_object->flag&TRACKING_OBJECT_CAMERA) { - return 1; + Scene *scene = CTX_data_scene(C); + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); + MovieTracking *tracking = &clip->tracking; + MovieTrackingObject *tracking_object = BKE_tracking_active_object(tracking); + + if (tracking_object->flag & TRACKING_OBJECT_CAMERA) { + return TRUE; } else { return OBACT != NULL; } } - return 0; + return FALSE; } static int count_selected_bundles(bContext *C) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); - ListBase *tracksbase= BKE_tracking_get_tracks(&clip->tracking); + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); + ListBase *tracksbase = BKE_tracking_get_tracks(&clip->tracking); MovieTrackingTrack *track; - int tot= 0; + int tot = 0; - track= tracksbase->first; + track = tracksbase->first; while (track) { - if (TRACK_VIEW_SELECTED(sc, track) && (track->flag&TRACK_HAS_BUNDLE)) + if (TRACK_VIEW_SELECTED(sc, track) && (track->flag & TRACK_HAS_BUNDLE)) tot++; - track= track->next; + track = track->next; } return tot; @@ -2028,26 +2056,26 @@ static int count_selected_bundles(bContext *C) static void object_solver_inverted_matrix(Scene *scene, Object *ob, float invmat[4][4]) { bConstraint *con; - int found= 0; + int found = FALSE; - for (con= ob->constraints.first; con; con=con->next) { - bConstraintTypeInfo *cti= constraint_get_typeinfo(con); + for (con = ob->constraints.first; con; con = con->next) { + bConstraintTypeInfo *cti = constraint_get_typeinfo(con); if (!cti) continue; - if (cti->type==CONSTRAINT_TYPE_OBJECTSOLVER) { - bObjectSolverConstraint *data= (bObjectSolverConstraint *)con->data; + if (cti->type == CONSTRAINT_TYPE_OBJECTSOLVER) { + bObjectSolverConstraint *data = (bObjectSolverConstraint *)con->data; if (!found) { - Object *cam= data->camera ? data->camera : scene->camera; + Object *cam = data->camera ? data->camera : scene->camera; where_is_object_mat(scene, cam, invmat); } mult_m4_m4m4(invmat, invmat, data->invmat); - found= 1; + found = TRUE; } } @@ -2061,14 +2089,14 @@ static Object *object_solver_camera(Scene *scene, Object *ob) { bConstraint *con; - for (con= ob->constraints.first; con; con=con->next) { - bConstraintTypeInfo *cti= constraint_get_typeinfo(con); + for (con = ob->constraints.first; con; con = con->next) { + bConstraintTypeInfo *cti = constraint_get_typeinfo(con); if (!cti) continue; - if (cti->type==CONSTRAINT_TYPE_OBJECTSOLVER) { - bObjectSolverConstraint *data= (bObjectSolverConstraint *)con->data; + if (cti->type == CONSTRAINT_TYPE_OBJECTSOLVER) { + bObjectSolverConstraint *data = (bObjectSolverConstraint *)con->data; return data->camera ? data->camera : scene->camera; } @@ -2079,43 +2107,43 @@ static Object *object_solver_camera(Scene *scene, Object *ob) static int set_origin_exec(bContext *C, wmOperator *op) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); - MovieTracking *tracking= &clip->tracking; + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); + MovieTracking *tracking = &clip->tracking; MovieTrackingTrack *track; MovieTrackingObject *tracking_object; - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); Object *object; - Object *camera= get_camera_with_movieclip(scene, clip); + Object *camera = get_camera_with_movieclip(scene, clip); ListBase *tracksbase; float mat[4][4], vec[3], median[3]; - int selected_count= count_selected_bundles(C); + int selected_count = count_selected_bundles(C); - if (selected_count==0) { + if (selected_count == 0) { BKE_report(op->reports, RPT_ERROR, "At least one track with bundle should be selected to define origin position"); return OPERATOR_CANCELLED; } - object= get_orientation_object(C); + object = get_orientation_object(C); if (!object) { BKE_report(op->reports, RPT_ERROR, "No object to apply orientation on"); return OPERATOR_CANCELLED; } - tracking_object= BKE_tracking_active_object(tracking); + tracking_object = BKE_tracking_active_object(tracking); - tracksbase= BKE_tracking_object_tracks(tracking, tracking_object); + tracksbase = BKE_tracking_object_tracks(tracking, tracking_object); - track= tracksbase->first; + track = tracksbase->first; zero_v3(median); while (track) { - if (TRACK_VIEW_SELECTED(sc, track) && (track->flag&TRACK_HAS_BUNDLE)) { + if (TRACK_VIEW_SELECTED(sc, track) && (track->flag & TRACK_HAS_BUNDLE)) { add_v3_v3(median, track->bundle_pos); } - track= track->next; + track = track->next; } mul_v3_fl(median, 1.0f/selected_count); @@ -2123,7 +2151,7 @@ static int set_origin_exec(bContext *C, wmOperator *op) mul_v3_m4v3(vec, mat, median); - if (tracking_object->flag&TRACKING_OBJECT_CAMERA) { + if (tracking_object->flag & TRACKING_OBJECT_CAMERA) { sub_v3_v3(object->loc, vec); } else { @@ -2164,9 +2192,9 @@ void CLIP_OT_set_origin(wmOperatorType *ot) static void set_axis(Scene *scene, Object *ob, MovieClip *clip, MovieTrackingObject *tracking_object, MovieTrackingTrack *track, char axis) { - Object *camera= get_camera_with_movieclip(scene, clip); - int is_camera= tracking_object->flag&TRACKING_OBJECT_CAMERA; - int flip= 0; + Object *camera = get_camera_with_movieclip(scene, clip); + int is_camera = tracking_object->flag & TRACKING_OBJECT_CAMERA; + int flip = FALSE; float mat[4][4], vec[3], obmat[4][4], dvec[3]; object_to_mat4(ob, obmat); @@ -2192,24 +2220,24 @@ static void set_axis(Scene *scene, Object *ob, MovieClip *clip, MovieTrackingOb unit_m4(mat); - if (axis=='X') { - if (fabsf(dvec[1])<1e-3f) { - flip= 1; + if (axis == 'X') { + if (fabsf(dvec[1]) < 1e-3f) { + flip = TRUE; - mat[0][0]= -1.0f; mat[0][1]= 0.0f; mat[0][2]= 0.0f; - mat[1][0]= 0.0f; mat[1][1]= -1.0f; mat[1][2]= 0.0f; - mat[2][0]= 0.0f; mat[2][1]= 0.0f; mat[2][2]= 1.0f; + mat[0][0] = -1.0f; mat[0][1] = 0.0f; mat[0][2] = 0.0f; + mat[1][0] = 0.0f; mat[1][1] = -1.0f; mat[1][2] = 0.0f; + mat[2][0] = 0.0f; mat[2][1] = 0.0f; mat[2][2] = 1.0f; } else { copy_v3_v3(mat[0], vec); - if (is_camera || fabsf(vec[2])<1e-3f) { - mat[0][2]= 0.0f; - mat[2][0]= 0.0f; mat[2][1]= 0.0f; mat[2][2]= 1.0f; + if (is_camera || fabsf(vec[2]) < 1e-3f) { + mat[0][2] = 0.0f; + mat[2][0] = 0.0f; mat[2][1] = 0.0f; mat[2][2] = 1.0f; cross_v3_v3v3(mat[1], mat[2], mat[0]); } else { - vec[2]= 0.0f; + vec[2] = 0.0f; cross_v3_v3v3(mat[1], mat[0], vec); cross_v3_v3v3(mat[2], mat[0], mat[1]); @@ -2217,23 +2245,23 @@ static void set_axis(Scene *scene, Object *ob, MovieClip *clip, MovieTrackingOb } } else { - if (fabsf(dvec[0])<1e-3f) { - flip= 1; + if (fabsf(dvec[0]) < 1e-3f) { + flip = TRUE; - mat[0][0]= -1.0f; mat[0][1]= 0.0f; mat[0][2]= 0.0f; - mat[1][0]= 0.0f; mat[1][1]= -1.0f; mat[1][2]= 0.0f; - mat[2][0]= 0.0f; mat[2][1]= 0.0f; mat[2][2]= 1.0f; + mat[0][0] = -1.0f; mat[0][1] = 0.0f; mat[0][2] = 0.0f; + mat[1][0] = 0.0f; mat[1][1] = -1.0f; mat[1][2] = 0.0f; + mat[2][0] = 0.0f; mat[2][1] = 0.0f; mat[2][2] = 1.0f; } else { copy_v3_v3(mat[1], vec); if (is_camera || fabsf(vec[2])<1e-3f) { - mat[1][2]= 0.0f; - mat[2][0]= 0.0f; mat[2][1]= 0.0f; mat[2][2]= 1.0f; + mat[1][2] = 0.0f; + mat[2][0] = 0.0f; mat[2][1] = 0.0f; mat[2][2] = 1.0f; cross_v3_v3v3(mat[0], mat[1], mat[2]); } else { - vec[2]= 0.0f; + vec[2] = 0.0f; cross_v3_v3v3(mat[0], vec, mat[1]); cross_v3_v3v3(mat[2], mat[0], mat[1]); @@ -2274,22 +2302,22 @@ static void set_axis(Scene *scene, Object *ob, MovieClip *clip, MovieTrackingOb static int set_plane_exec(bContext *C, wmOperator *op) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); - Scene *scene= CTX_data_scene(C); - MovieTracking *tracking= &clip->tracking; + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); + Scene *scene = CTX_data_scene(C); + MovieTracking *tracking = &clip->tracking; MovieTrackingObject *tracking_object; - MovieTrackingTrack *track, *axis_track= NULL, *act_track; + MovieTrackingTrack *track, *axis_track = NULL, *act_track; ListBase *tracksbase; Object *object; - Object *camera= get_camera_with_movieclip(scene, clip); - int tot= 0; - float vec[3][3], mat[4][4], obmat[4][4], newmat[4][4], orig[3]= {0.0f, 0.0f, 0.0f}; - int plane= RNA_enum_get(op->ptr, "plane"); - float rot[4][4]={{0.0f, 0.0f, -1.0f, 0.0f}, - {0.0f, 1.0f, 0.0f, 0.0f}, - {1.0f, 0.0f, 0.0f, 0.0f}, - {0.0f, 0.0f, 0.0f, 1.0f}}; /* 90 degrees Y-axis rotation matrix */ + Object *camera = get_camera_with_movieclip(scene, clip); + int tot = 0; + float vec[3][3], mat[4][4], obmat[4][4], newmat[4][4], orig[3] = {0.0f, 0.0f, 0.0f}; + int plane = RNA_enum_get(op->ptr, "plane"); + float rot[4][4] = {{0.0f, 0.0f, -1.0f, 0.0f}, + {0.0f, 1.0f, 0.0f, 0.0f}, + {1.0f, 0.0f, 0.0f, 0.0f}, + {0.0f, 0.0f, 0.0f, 1.0f}}; /* 90 degrees Y-axis rotation matrix */ if (count_selected_bundles(C)!=3) { BKE_report(op->reports, RPT_ERROR, "Three tracks with bundles are needed to orient the floor"); @@ -2297,11 +2325,11 @@ static int set_plane_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - tracking_object= BKE_tracking_active_object(tracking); - tracksbase= BKE_tracking_object_tracks(tracking, tracking_object); - act_track= BKE_tracking_active_track(tracking); + tracking_object = BKE_tracking_active_object(tracking); + tracksbase = BKE_tracking_object_tracks(tracking, tracking_object); + act_track = BKE_tracking_active_track(tracking); - object= get_orientation_object(C); + object = get_orientation_object(C); if (!object) { BKE_report(op->reports, RPT_ERROR, "No object to apply orientation on"); @@ -2311,20 +2339,20 @@ static int set_plane_exec(bContext *C, wmOperator *op) BKE_get_tracking_mat(scene, camera, mat); /* get 3 bundles to use as reference */ - track= tracksbase->first; + track = tracksbase->first; while (track && tot<3) { - if (track->flag&TRACK_HAS_BUNDLE && TRACK_VIEW_SELECTED(sc, track)) { + if (track->flag & TRACK_HAS_BUNDLE && TRACK_VIEW_SELECTED(sc, track)) { mul_v3_m4v3(vec[tot], mat, track->bundle_pos); - if (tot==0 || track==act_track) + if (tot == 0 || track == act_track) copy_v3_v3(orig, vec[tot]); else - axis_track= track; + axis_track = track; tot++; } - track= track->next; + track = track->next; } sub_v3_v3(vec[1], vec[0]); @@ -2349,11 +2377,11 @@ static int set_plane_exec(bContext *C, wmOperator *op) normalize_v3(mat[2]); /* move to origin point */ - mat[3][0]= orig[0]; - mat[3][1]= orig[1]; - mat[3][2]= orig[2]; + mat[3][0] = orig[0]; + mat[3][1] = orig[1]; + mat[3][2] = orig[2]; - if (tracking_object->flag&TRACKING_OBJECT_CAMERA) { + if (tracking_object->flag & TRACKING_OBJECT_CAMERA) { invert_m4(mat); object_to_mat4(object, obmat); @@ -2412,15 +2440,15 @@ void CLIP_OT_set_plane(wmOperatorType *ot) static int set_axis_exec(bContext *C, wmOperator *op) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); - MovieTracking *tracking= &clip->tracking; - MovieTrackingObject *tracking_object= BKE_tracking_active_object(tracking); + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); + MovieTracking *tracking = &clip->tracking; + MovieTrackingObject *tracking_object = BKE_tracking_active_object(tracking); MovieTrackingTrack *track; - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); Object *object; ListBase *tracksbase; - int axis= RNA_enum_get(op->ptr, "axis"); + int axis = RNA_enum_get(op->ptr, "axis"); if (count_selected_bundles(C)!=1) { BKE_report(op->reports, RPT_ERROR, "Single track with bundle should be selected to define axis"); @@ -2428,24 +2456,24 @@ static int set_axis_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - object= get_orientation_object(C); + object = get_orientation_object(C); if (!object) { BKE_report(op->reports, RPT_ERROR, "No object to apply orientation on"); return OPERATOR_CANCELLED; } - tracksbase= BKE_tracking_object_tracks(tracking, tracking_object); + tracksbase = BKE_tracking_object_tracks(tracking, tracking_object); - track=tracksbase->first; + track = tracksbase->first; while (track) { if (TRACK_VIEW_SELECTED(sc, track)) break; - track= track->next; + track = track->next; } - set_axis(scene, object, clip, tracking_object, track, axis==0?'X':'Y'); + set_axis(scene, object, clip, tracking_object, track, axis == 0 ? 'X' : 'Y'); DAG_id_tag_update(&clip->id, 0); DAG_id_tag_update(&object->id, OB_RECALC_OB); @@ -2484,26 +2512,26 @@ void CLIP_OT_set_axis(wmOperatorType *ot) static int do_set_scale(bContext *C, wmOperator *op, int scale_solution) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); - MovieTracking *tracking= &clip->tracking; - MovieTrackingObject *tracking_object= BKE_tracking_active_object(tracking); + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); + MovieTracking *tracking = &clip->tracking; + MovieTrackingObject *tracking_object = BKE_tracking_active_object(tracking); MovieTrackingTrack *track; - Scene *scene= CTX_data_scene(C); - Object *object= NULL; - Object *camera= get_camera_with_movieclip(scene, clip); - ListBase *tracksbase= BKE_tracking_get_tracks(tracking); - int tot= 0; + Scene *scene = CTX_data_scene(C); + Object *object = NULL; + Object *camera = get_camera_with_movieclip(scene, clip); + ListBase *tracksbase = BKE_tracking_get_tracks(tracking); + int tot = 0; float vec[2][3], mat[4][4], scale; - float dist= RNA_float_get(op->ptr, "distance"); + float dist = RNA_float_get(op->ptr, "distance"); - if (count_selected_bundles(C)!=2) { + if (count_selected_bundles(C) != 2) { BKE_report(op->reports, RPT_ERROR, "Two tracks with bundles should be selected to set scale"); return OPERATOR_CANCELLED; } - object= get_orientation_object(C); + object = get_orientation_object(C); if (!object) { BKE_report(op->reports, RPT_ERROR, "No object to apply orientation on"); @@ -2512,38 +2540,38 @@ static int do_set_scale(bContext *C, wmOperator *op, int scale_solution) BKE_get_tracking_mat(scene, camera, mat); - track= tracksbase->first; + track = tracksbase->first; while (track) { if (TRACK_VIEW_SELECTED(sc, track)) { mul_v3_m4v3(vec[tot], mat, track->bundle_pos); tot++; } - track= track->next; + track = track->next; } sub_v3_v3(vec[0], vec[1]); if (len_v3(vec[0])>1e-5f) { - scale= dist / len_v3(vec[0]); + scale = dist / len_v3(vec[0]); - if (tracking_object->flag&TRACKING_OBJECT_CAMERA) { + if (tracking_object->flag & TRACKING_OBJECT_CAMERA) { mul_v3_fl(object->size, scale); mul_v3_fl(object->loc, scale); } else if (!scale_solution) { - Object *solver_camera= object_solver_camera(scene, object); + Object *solver_camera = object_solver_camera(scene, object); - object->size[0]= object->size[1]= object->size[2]= 1.0f/scale; + object->size[0] = object->size[1] = object->size[2] = 1.0f/scale; if (solver_camera) { - object->size[0]/= solver_camera->size[0]; - object->size[1]/= solver_camera->size[1]; - object->size[2]/= solver_camera->size[2]; + object->size[0] /= solver_camera->size[0]; + object->size[1] /= solver_camera->size[1]; + object->size[2] /= solver_camera->size[2]; } } else { - tracking_object->scale= scale; + tracking_object->scale = scale; } DAG_id_tag_update(&clip->id, 0); @@ -2565,8 +2593,8 @@ static int set_scale_exec(bContext *C, wmOperator *op) static int set_scale_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); if (!RNA_struct_property_is_set(op->ptr, "distance")) RNA_float_set(op->ptr, "distance", clip->tracking.settings.dist); @@ -2599,12 +2627,12 @@ void CLIP_OT_set_scale(wmOperatorType *ot) static int set_solution_scale_poll(bContext *C) { if (space_clip_frame_poll(C)) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); - MovieTracking *tracking= &clip->tracking; - MovieTrackingObject *tracking_object= BKE_tracking_active_object(tracking); + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); + MovieTracking *tracking = &clip->tracking; + MovieTrackingObject *tracking_object = BKE_tracking_active_object(tracking); - return (tracking_object->flag&TRACKING_OBJECT_CAMERA) == 0; + return (tracking_object->flag & TRACKING_OBJECT_CAMERA) == 0; } return 0; @@ -2617,8 +2645,8 @@ static int set_solution_scale_exec(bContext *C, wmOperator *op) static int set_solution_scale_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); if (!RNA_struct_property_is_set(op->ptr, "distance")) RNA_float_set(op->ptr, "distance", clip->tracking.settings.object_distance); @@ -2650,17 +2678,17 @@ void CLIP_OT_set_solution_scale(wmOperatorType *ot) static int set_center_principal_exec(bContext *C, wmOperator *UNUSED(op)) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); int width, height; BKE_movieclip_get_size(clip, &sc->user, &width, &height); - if (width==0 || height==0) + if (width == 0 || height == 0) return OPERATOR_CANCELLED; - clip->tracking.camera.principal[0]= ((float)width)/2.0f; - clip->tracking.camera.principal[1]= ((float)height)/2.0f; + clip->tracking.camera.principal[0] = ((float)width)/2.0f; + clip->tracking.camera.principal[1] = ((float)height)/2.0f; WM_event_add_notifier(C, NC_MOVIECLIP|NA_EDITED, clip); @@ -2686,34 +2714,34 @@ void CLIP_OT_set_center_principal(wmOperatorType *ot) static int hide_tracks_exec(bContext *C, wmOperator *op) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); MovieTrackingTrack *track; - MovieTracking *tracking= &clip->tracking; - ListBase *tracksbase= BKE_tracking_get_tracks(tracking); - MovieTrackingTrack *act_track= BKE_tracking_active_track(tracking); + MovieTracking *tracking = &clip->tracking; + ListBase *tracksbase = BKE_tracking_get_tracks(tracking); + MovieTrackingTrack *act_track = BKE_tracking_active_track(tracking); int unselected; - unselected= RNA_boolean_get(op->ptr, "unselected"); + unselected = RNA_boolean_get(op->ptr, "unselected"); - track= tracksbase->first; + track = tracksbase->first; while (track) { - if (unselected==0 && TRACK_VIEW_SELECTED(sc, track)) { - track->flag|= TRACK_HIDDEN; + if (unselected == 0 && TRACK_VIEW_SELECTED(sc, track)) { + track->flag |= TRACK_HIDDEN; } - else if (unselected==1 && !TRACK_VIEW_SELECTED(sc, track)) { - track->flag|= TRACK_HIDDEN; + else if (unselected == 1 && !TRACK_VIEW_SELECTED(sc, track)) { + track->flag |= TRACK_HIDDEN; } - track= track->next; + track = track->next; } - if (act_track && act_track->flag&TRACK_HIDDEN) - clip->tracking.act_track= NULL; + if (act_track && act_track->flag & TRACK_HIDDEN) + clip->tracking.act_track = NULL; - if (unselected==0) { + if (unselected == 0) { /* no selection on screen now, unlock view so it can be scrolled nice again */ - sc->flag&= ~SC_LOCK_SELECTION; + sc->flag &= ~SC_LOCK_SELECTION; } WM_event_add_notifier(C, NC_MOVIECLIP|ND_DISPLAY, NULL); @@ -2743,16 +2771,16 @@ void CLIP_OT_hide_tracks(wmOperatorType *ot) static int hide_tracks_clear_exec(bContext *C, wmOperator *UNUSED(op)) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); - ListBase *tracksbase= BKE_tracking_get_tracks(&clip->tracking); + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); + ListBase *tracksbase = BKE_tracking_get_tracks(&clip->tracking); MovieTrackingTrack *track; - track= tracksbase->first; + track = tracksbase->first; while (track) { - track->flag&= ~TRACK_HIDDEN; + track->flag &= ~TRACK_HIDDEN; - track= track->next; + track = track->next; } WM_event_add_notifier(C, NC_MOVIECLIP|ND_DISPLAY, NULL); @@ -2784,12 +2812,12 @@ static bGPDlayer *detect_get_layer(MovieClip *clip) if (!clip->gpd) return NULL; - layer= clip->gpd->layers.first; + layer = clip->gpd->layers.first; while (layer) { - if (layer->flag&GP_LAYER_ACTIVE) + if (layer->flag & GP_LAYER_ACTIVE) return layer; - layer= layer->next; + layer = layer->next; } return NULL; @@ -2797,32 +2825,32 @@ static bGPDlayer *detect_get_layer(MovieClip *clip) static int detect_features_exec(bContext *C, wmOperator *op) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); - int clip_flag= clip->flag&MCLIP_TIMECODE_FLAGS; - ImBuf *ibuf= BKE_movieclip_get_ibuf_flag(clip, &sc->user, clip_flag, MOVIECLIP_CACHE_SKIP); - MovieTracking *tracking= &clip->tracking; - ListBase *tracksbase= BKE_tracking_get_tracks(tracking); - MovieTrackingTrack *track= tracksbase->first; - int placement= RNA_enum_get(op->ptr, "placement"); - int margin= RNA_int_get(op->ptr, "margin"); - int min_trackability= RNA_int_get(op->ptr, "min_trackability"); - int min_distance= RNA_int_get(op->ptr, "min_distance"); - int place_outside_layer= 0; - bGPDlayer *layer= NULL; - - if (placement!=0) { - layer= detect_get_layer(clip); - place_outside_layer= placement==2; + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); + int clip_flag = clip->flag & MCLIP_TIMECODE_FLAGS; + ImBuf *ibuf = BKE_movieclip_get_ibuf_flag(clip, &sc->user, clip_flag, MOVIECLIP_CACHE_SKIP); + MovieTracking *tracking = &clip->tracking; + ListBase *tracksbase = BKE_tracking_get_tracks(tracking); + MovieTrackingTrack *track = tracksbase->first; + int placement = RNA_enum_get(op->ptr, "placement"); + int margin = RNA_int_get(op->ptr, "margin"); + int min_trackability = RNA_int_get(op->ptr, "min_trackability"); + int min_distance = RNA_int_get(op->ptr, "min_distance"); + int place_outside_layer = 0; + bGPDlayer *layer = NULL; + + if (placement != 0) { + layer = detect_get_layer(clip); + place_outside_layer = placement == 2; } /* deselect existing tracks */ while (track) { - track->flag&= ~SELECT; - track->pat_flag&= ~SELECT; - track->search_flag&= ~SELECT; + track->flag &= ~SELECT; + track->pat_flag &= ~SELECT; + track->search_flag &= ~SELECT; - track= track->next; + track = track->next; } BKE_tracking_detect_fast(tracking, tracksbase, ibuf, sc->user.framenr, margin, @@ -2867,58 +2895,58 @@ void CLIP_OT_detect_features(wmOperatorType *ot) static int frame_jump_exec(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); + Scene *scene = CTX_data_scene(C); + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); MovieTrackingTrack *track; - int pos= RNA_enum_get(op->ptr, "position"); + int pos = RNA_enum_get(op->ptr, "position"); int delta; - if (pos<=1) { /* jump to path */ - track= BKE_tracking_active_track(&clip->tracking); + if (pos <= 1) { /* jump to path */ + track = BKE_tracking_active_track(&clip->tracking); if (!track) return OPERATOR_CANCELLED; - delta= pos == 1 ? 1 : -1; + delta = pos == 1 ? 1 : -1; while (sc->user.framenr+delta >= SFRA && sc->user.framenr+delta <= EFRA) { - MovieTrackingMarker *marker= BKE_tracking_exact_marker(track, sc->user.framenr+delta); + MovieTrackingMarker *marker = BKE_tracking_exact_marker(track, sc->user.framenr+delta); - if (!marker || marker->flag&MARKER_DISABLED) + if (!marker || marker->flag & MARKER_DISABLED) break; - sc->user.framenr+= delta; + sc->user.framenr += delta; } } else { /* to to failed frame */ - if (clip->tracking.reconstruction.flag&TRACKING_RECONSTRUCTED) { - int a= sc->user.framenr; - MovieTracking *tracking= &clip->tracking; - MovieTrackingObject *object= BKE_tracking_active_object(tracking); + if (clip->tracking.reconstruction.flag & TRACKING_RECONSTRUCTED) { + int a = sc->user.framenr; + MovieTracking *tracking = &clip->tracking; + MovieTrackingObject *object = BKE_tracking_active_object(tracking); - delta= pos == 3 ? 1 : -1; + delta = pos == 3 ? 1 : -1; - a+= delta; + a += delta; while (a+delta >= SFRA && a+delta <= EFRA) { MovieReconstructedCamera *cam; - cam= BKE_tracking_get_reconstructed_camera(tracking, object, a); + cam = BKE_tracking_get_reconstructed_camera(tracking, object, a); if (!cam) { - sc->user.framenr= a; + sc->user.framenr = a; break; } - a+= delta; + a += delta; } } } - if (CFRA!=sc->user.framenr) { - CFRA= sc->user.framenr; + if (CFRA != sc->user.framenr) { + CFRA = sc->user.framenr; sound_seek_scene(CTX_data_main(C), CTX_data_scene(C)); WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene); @@ -2959,34 +2987,34 @@ void CLIP_OT_frame_jump(wmOperatorType *ot) static int join_tracks_exec(bContext *C, wmOperator *op) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); - MovieTracking *tracking= &clip->tracking; - ListBase *tracksbase= BKE_tracking_get_tracks(tracking); + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); + MovieTracking *tracking = &clip->tracking; + ListBase *tracksbase = BKE_tracking_get_tracks(tracking); MovieTrackingTrack *act_track, *track, *next; - act_track= BKE_tracking_active_track(tracking); + act_track = BKE_tracking_active_track(tracking); if (!act_track) { BKE_report(op->reports, RPT_ERROR, "No active track to join to"); return OPERATOR_CANCELLED; } - track= tracksbase->first; + track = tracksbase->first; while (track) { - next= track->next; + next = track->next; - if (TRACK_VIEW_SELECTED(sc, track) && track!=act_track) { + if (TRACK_VIEW_SELECTED(sc, track) && track != act_track) { BKE_tracking_join_tracks(act_track, track); if (tracking->stabilization.rot_track == track) - tracking->stabilization.rot_track= act_track; + tracking->stabilization.rot_track = act_track; BKE_tracking_free_track(track); BLI_freelinkN(tracksbase, track); } - track= next; + track = next; } WM_event_add_notifier(C, NC_MOVIECLIP|NA_EDITED, clip); @@ -3013,21 +3041,23 @@ void CLIP_OT_join_tracks(wmOperatorType *ot) static int lock_tracks_exec(bContext *C, wmOperator *op) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); - MovieTracking *tracking= &clip->tracking; - ListBase *tracksbase= BKE_tracking_get_tracks(tracking); - MovieTrackingTrack *track= tracksbase->first; - int action= RNA_enum_get(op->ptr, "action"); + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); + MovieTracking *tracking = &clip->tracking; + ListBase *tracksbase = BKE_tracking_get_tracks(tracking); + MovieTrackingTrack *track = tracksbase->first; + int action = RNA_enum_get(op->ptr, "action"); while (track) { if (TRACK_VIEW_SELECTED(sc, track)) { - if (action==0) track->flag|= TRACK_LOCKED; - else if (action==1) track->flag&= ~TRACK_LOCKED; - else track->flag^= TRACK_LOCKED; + if (action == 0) + track->flag |= TRACK_LOCKED; + else if (action == 1) + track->flag &= ~TRACK_LOCKED; + else track->flag ^= TRACK_LOCKED; } - track= track->next; + track = track->next; } WM_event_add_notifier(C, NC_MOVIECLIP|NA_EVALUATED, clip); @@ -3064,27 +3094,27 @@ void CLIP_OT_lock_tracks(wmOperatorType *ot) static int track_copy_color_exec(bContext *C, wmOperator *UNUSED(op)) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); - MovieTracking *tracking= &clip->tracking; - ListBase *tracksbase= BKE_tracking_get_tracks(tracking); - MovieTrackingTrack *track, *act_track= BKE_tracking_active_track(tracking); + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); + MovieTracking *tracking = &clip->tracking; + ListBase *tracksbase = BKE_tracking_get_tracks(tracking); + MovieTrackingTrack *track, *act_track = BKE_tracking_active_track(tracking); if (!act_track) return OPERATOR_CANCELLED; - track= tracksbase->first; + track = tracksbase->first; while (track) { - if (TRACK_VIEW_SELECTED(sc, track) && track!=act_track) { - track->flag&= ~TRACK_CUSTOMCOLOR; + if (TRACK_VIEW_SELECTED(sc, track) && track != act_track) { + track->flag &= ~TRACK_CUSTOMCOLOR; - if (act_track->flag&TRACK_CUSTOMCOLOR) { + if (act_track->flag & TRACK_CUSTOMCOLOR) { copy_v3_v3(track->color, act_track->color); - track->flag|= TRACK_CUSTOMCOLOR; + track->flag |= TRACK_CUSTOMCOLOR; } } - track= track->next; + track = track->next; } WM_event_add_notifier(C, NC_MOVIECLIP|ND_DISPLAY, clip); @@ -3111,28 +3141,28 @@ void CLIP_OT_track_copy_color(wmOperatorType *ot) static int stabilize_2d_add_exec(bContext *C, wmOperator *UNUSED(op)) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); - MovieTracking *tracking= &clip->tracking; - ListBase *tracksbase= BKE_tracking_get_tracks(tracking); + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); + MovieTracking *tracking = &clip->tracking; + ListBase *tracksbase = BKE_tracking_get_tracks(tracking); MovieTrackingTrack *track; - MovieTrackingStabilization *stab= &tracking->stabilization; - int update= 0; + MovieTrackingStabilization *stab = &tracking->stabilization; + int update = 0; - track= tracksbase->first; + track = tracksbase->first; while (track) { - if (TRACK_VIEW_SELECTED(sc, track) && (track->flag&TRACK_USE_2D_STAB)==0) { - track->flag|= TRACK_USE_2D_STAB; + if (TRACK_VIEW_SELECTED(sc, track) && (track->flag & TRACK_USE_2D_STAB)==0) { + track->flag |= TRACK_USE_2D_STAB; stab->tot_track++; - update= 1; + update = 1; } - track= track->next; + track = track->next; } if (update) { - stab->ok= 0; + stab->ok = 0; DAG_id_tag_update(&clip->id, 0); WM_event_add_notifier(C, NC_MOVIECLIP|ND_DISPLAY, clip); @@ -3160,27 +3190,27 @@ void CLIP_OT_stabilize_2d_add(wmOperatorType *ot) static int stabilize_2d_remove_exec(bContext *C, wmOperator *UNUSED(op)) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); - MovieTracking *tracking= &clip->tracking; - MovieTrackingStabilization *stab= &tracking->stabilization; - ListBase *tracksbase= BKE_tracking_get_tracks(tracking); + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); + MovieTracking *tracking = &clip->tracking; + MovieTrackingStabilization *stab = &tracking->stabilization; + ListBase *tracksbase = BKE_tracking_get_tracks(tracking); MovieTrackingTrack *track; - int a= 0, update= 0; + int a = 0, update = 0; - track= tracksbase->first; + track = tracksbase->first; while (track) { - if (track->flag&TRACK_USE_2D_STAB) { - if (a==stab->act_track) { - track->flag&= ~TRACK_USE_2D_STAB; + if (track->flag & TRACK_USE_2D_STAB) { + if (a == stab->act_track) { + track->flag &= ~TRACK_USE_2D_STAB; stab->act_track--; stab->tot_track--; if (stab->act_track<0) - stab->act_track= 0; + stab->act_track = 0; - update= 1; + update = 1; break; } @@ -3188,11 +3218,11 @@ static int stabilize_2d_remove_exec(bContext *C, wmOperator *UNUSED(op)) a++; } - track= track->next; + track = track->next; } if (update) { - stab->ok= 0; + stab->ok = 0; DAG_id_tag_update(&clip->id, 0); WM_event_add_notifier(C, NC_MOVIECLIP|ND_DISPLAY, clip); @@ -3220,22 +3250,22 @@ void CLIP_OT_stabilize_2d_remove(wmOperatorType *ot) static int stabilize_2d_select_exec(bContext *C, wmOperator *UNUSED(op)) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); - MovieTracking *tracking= &clip->tracking; - ListBase *tracksbase= BKE_tracking_get_tracks(tracking); + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); + MovieTracking *tracking = &clip->tracking; + ListBase *tracksbase = BKE_tracking_get_tracks(tracking); MovieTrackingTrack *track; - int update= 0; + int update = 0; - track= tracksbase->first; + track = tracksbase->first; while (track) { - if (track->flag&TRACK_USE_2D_STAB) { + if (track->flag & TRACK_USE_2D_STAB) { BKE_tracking_track_flag(track, TRACK_AREA_ALL, SELECT, 0); - update= 1; + update = 1; } - track= track->next; + track = track->next; } if (update) @@ -3263,16 +3293,16 @@ void CLIP_OT_stabilize_2d_select(wmOperatorType *ot) static int stabilize_2d_set_rotation_exec(bContext *C, wmOperator *UNUSED(op)) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); - MovieTracking *tracking= &clip->tracking; - MovieTrackingTrack *act_track= BKE_tracking_active_track(tracking); + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); + MovieTracking *tracking = &clip->tracking; + MovieTrackingTrack *act_track = BKE_tracking_active_track(tracking); if (act_track) { - MovieTrackingStabilization *stab= &tracking->stabilization; + MovieTrackingStabilization *stab = &tracking->stabilization; - stab->rot_track= act_track; - stab->ok= 0; + stab->rot_track = act_track; + stab->ok = 0; DAG_id_tag_update(&clip->id, 0); WM_event_add_notifier(C, NC_MOVIECLIP|ND_DISPLAY, clip); @@ -3300,43 +3330,43 @@ void CLIP_OT_stabilize_2d_set_rotation(wmOperatorType *ot) static int is_track_clean(MovieTrackingTrack *track, int frames, int del) { - int ok= 1, a, prev= -1, count= 0; - MovieTrackingMarker *markers= track->markers, *new_markers= NULL; - int start_disabled= 0; - int markersnr= track->markersnr; + int ok = 1, a, prev = -1, count = 0; + MovieTrackingMarker *markers = track->markers, *new_markers = NULL; + int start_disabled = 0; + int markersnr = track->markersnr; if (del) - new_markers= MEM_callocN(markersnr*sizeof(MovieTrackingMarker), "track cleaned markers"); + new_markers = MEM_callocN(markersnr*sizeof(MovieTrackingMarker), "track cleaned markers"); - for (a= 0; a= 0) { - end= a == markersnr-1; - end|= (a < markersnr-1) && (markers[a].framenr != markers[a+1].framenr-1 || - markers[a].flag&MARKER_DISABLED); + end = a == markersnr-1; + end |= (a < markersnr-1) && (markers[a].framenr != markers[a+1].framenr-1 || + markers[a].flag & MARKER_DISABLED); } if (end) { - int segok= 1, len= 0; + int segok = 1, len = 0; if (a != prev && markers[a].framenr != markers[a-1].framenr+1) - len= a-prev; - else if (markers[a].flag&MARKER_DISABLED) - len= a-prev; - else len= a-prev+1; + len = a-prev; + else if (markers[a].flag & MARKER_DISABLED) + len = a-prev; + else len = a-prev+1; if (frames) { if (len < frames) { - segok= 0; - ok= 0; + segok = 0; + ok = 0; if (!del) break; @@ -3345,32 +3375,32 @@ static int is_track_clean(MovieTrackingTrack *track, int frames, int del) if (del) { if (segok) { - int t= len; + int t = len; - if (markers[a].flag&MARKER_DISABLED) + if (markers[a].flag & MARKER_DISABLED) t++; /* place disabled marker in front of current segment */ if (start_disabled) { memcpy(new_markers+count, markers+prev, sizeof(MovieTrackingMarker)); new_markers[count].framenr--; - new_markers[count].flag|= MARKER_DISABLED; + new_markers[count].flag |= MARKER_DISABLED; count++; - start_disabled= 0; + start_disabled = 0; } memcpy(new_markers+count, markers+prev, t*sizeof(MovieTrackingMarker)); - count+= t; + count += t; } - else if (markers[a].flag&MARKER_DISABLED) { + else if (markers[a].flag & MARKER_DISABLED) { /* current segment which would be deleted was finished by disabled marker, * so next segment should be started from disabled marker */ - start_disabled= 1; + start_disabled = 1; } } - prev= -1; + prev = -1; } } @@ -3378,14 +3408,14 @@ static int is_track_clean(MovieTrackingTrack *track, int frames, int del) MEM_freeN(track->markers); if (count) { - track->markers= new_markers; + track->markers = new_markers; } else { - track->markers= NULL; + track->markers = NULL; MEM_freeN(new_markers); } - track->markersnr= count; + track->markersnr = count; } return ok; @@ -3393,45 +3423,45 @@ static int is_track_clean(MovieTrackingTrack *track, int frames, int del) static int clean_tracks_exec(bContext *C, wmOperator *op) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); - MovieTracking *tracking= &clip->tracking; - ListBase *tracksbase= BKE_tracking_get_tracks(tracking); - MovieTrackingTrack *track, *next, *act_track= BKE_tracking_active_track(tracking); - int frames= RNA_int_get(op->ptr, "frames"); - int action= RNA_enum_get(op->ptr, "action"); - float error= RNA_float_get(op->ptr, "error"); + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); + MovieTracking *tracking = &clip->tracking; + ListBase *tracksbase = BKE_tracking_get_tracks(tracking); + MovieTrackingTrack *track, *next, *act_track = BKE_tracking_active_track(tracking); + int frames = RNA_int_get(op->ptr, "frames"); + int action = RNA_enum_get(op->ptr, "action"); + float error = RNA_float_get(op->ptr, "error"); - if (error && action==TRACKING_CLEAN_DELETE_SEGMENT) - action= TRACKING_CLEAN_DELETE_TRACK; + if (error && action == TRACKING_CLEAN_DELETE_SEGMENT) + action = TRACKING_CLEAN_DELETE_TRACK; - track= tracksbase->first; + track = tracksbase->first; while (track) { - next= track->next; + next = track->next; - if ((track->flag&TRACK_HIDDEN)==0 && (track->flag&TRACK_LOCKED)==0) { - int ok= 1; + if ((track->flag & TRACK_HIDDEN)==0 && (track->flag & TRACK_LOCKED)==0) { + int ok = 1; - ok= (is_track_clean(track, frames, action==TRACKING_CLEAN_DELETE_SEGMENT)) && - (error == 0.0f || (track->flag&TRACK_HAS_BUNDLE)==0 || track->error < error); + ok = (is_track_clean(track, frames, action == TRACKING_CLEAN_DELETE_SEGMENT)) && + (error == 0.0f || (track->flag & TRACK_HAS_BUNDLE)==0 || track->error < error); if (!ok) { - if (action==TRACKING_CLEAN_SELECT) { + if (action == TRACKING_CLEAN_SELECT) { BKE_tracking_track_flag(track, TRACK_AREA_ALL, SELECT, 0); } - else if (action==TRACKING_CLEAN_DELETE_TRACK) { - if (track==act_track) - clip->tracking.act_track= NULL; + else if (action == TRACKING_CLEAN_DELETE_TRACK) { + if (track == act_track) + clip->tracking.act_track = NULL; BKE_tracking_free_track(track); BLI_freelinkN(tracksbase, track); - track= NULL; + track = NULL; } /* happens when all tracking segments are not long enough */ - if (track && track->markersnr==0) { - if (track==act_track) - clip->tracking.act_track= NULL; + if (track && track->markersnr == 0) { + if (track == act_track) + clip->tracking.act_track = NULL; BKE_tracking_free_track(track); BLI_freelinkN(tracksbase, track); @@ -3439,7 +3469,7 @@ static int clean_tracks_exec(bContext *C, wmOperator *op) } } - track= next; + track = next; } WM_event_add_notifier(C, NC_MOVIECLIP|ND_SELECT, clip); @@ -3449,8 +3479,8 @@ static int clean_tracks_exec(bContext *C, wmOperator *op) static int clean_tracks_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); if (!RNA_struct_property_is_set(op->ptr, "frames")) RNA_int_set(op->ptr, "frames", clip->tracking.settings.clean_frames); @@ -3496,9 +3526,9 @@ void CLIP_OT_clean_tracks(wmOperatorType *ot) static int tracking_object_new_exec(bContext *C, wmOperator *UNUSED(op)) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); - MovieTracking *tracking= &clip->tracking; + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); + MovieTracking *tracking = &clip->tracking; BKE_tracking_new_object(tracking, "Object"); @@ -3526,14 +3556,14 @@ void CLIP_OT_tracking_object_new(wmOperatorType *ot) static int tracking_object_remove_exec(bContext *C, wmOperator *op) { - SpaceClip *sc= CTX_wm_space_clip(C); - MovieClip *clip= ED_space_clip(sc); - MovieTracking *tracking= &clip->tracking; + SpaceClip *sc = CTX_wm_space_clip(C); + MovieClip *clip = ED_space_clip(sc); + MovieTracking *tracking = &clip->tracking; MovieTrackingObject *object; - object= BKE_tracking_active_object(tracking); + object = BKE_tracking_active_object(tracking); - if (object->flag&TRACKING_OBJECT_CAMERA) { + if (object->flag & TRACKING_OBJECT_CAMERA) { BKE_report(op->reports, RPT_WARNING, "Object used for camera tracking can't be deleted"); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 68b7268596c..71bca7bfce8 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -163,8 +163,8 @@ void convertViewVec(TransInfo *t, float r_vec[3], int dx, int dy) View2D *v2d = t->view; float divx, divy; - divx= v2d->mask.xmax-v2d->mask.xmin; - divy= v2d->mask.ymax-v2d->mask.ymin; + divx = v2d->mask.xmax-v2d->mask.xmin; + divy = v2d->mask.ymax-v2d->mask.ymin; r_vec[0] = (v2d->cur.xmax-v2d->cur.xmin)*(dx)/divx; r_vec[1] = (v2d->cur.ymax-v2d->cur.ymin)*(dy)/divy; @@ -337,8 +337,8 @@ static void viewRedrawForce(const bContext *C, TransInfo *t) else ED_area_tag_redraw(t->sa); } else if (t->spacetype==SPACE_CLIP) { - SpaceClip *sc= (SpaceClip*)t->sa->spacedata.first; - MovieClip *clip= ED_space_clip(sc); + SpaceClip *sc = (SpaceClip*)t->sa->spacedata.first; + MovieClip *clip = ED_space_clip(sc); /* objects could be parented to tracking data, so send this for viewport refresh */ WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL); diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 60ec08fcb5d..3f15a05d843 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -4941,8 +4941,8 @@ void special_aftertrans_update(bContext *C, TransInfo *t) ED_node_link_intersect_test(t->sa, 0); } else if (t->spacetype == SPACE_CLIP) { - SpaceClip *sc= t->sa->spacedata.first; - MovieClip *clip= ED_space_clip(sc); + SpaceClip *sc = t->sa->spacedata.first; + MovieClip *clip = ED_space_clip(sc); if (t->scene->nodetree) { /* tracks can be used for stabilization nodes, @@ -5448,10 +5448,10 @@ typedef struct TransDataTracking { short coord; } TransDataTracking; -static void markerToTransDataInit(TransData *td, TransData2D *td2d, - TransDataTracking *tdt, MovieTrackingTrack *track, int area, float *loc, float *rel, float *off) +static void markerToTransDataInit(TransData *td, TransData2D *td2d, TransDataTracking *tdt, MovieTrackingTrack *track, + int area, float *loc, float *rel, float *off) { - int anchor = area==TRACK_AREA_POINT && off; + int anchor = area == TRACK_AREA_POINT && off; tdt->mode = transDataTracking_ModeTracks; @@ -5470,16 +5470,16 @@ static void markerToTransDataInit(TransData *td, TransData2D *td2d, } td2d->loc[2] = 0.0f; - tdt->relative= rel; - tdt->area= area; + tdt->relative = rel; + tdt->area = area; - tdt->markersnr= track->markersnr; - tdt->markers= track->markers; + tdt->markersnr = track->markersnr; + tdt->markers = track->markers; if (rel) { if (!anchor) { - td2d->loc[0]+= rel[0]; - td2d->loc[1]+= rel[1]; + td2d->loc[0] += rel[0]; + td2d->loc[1] += rel[1]; } copy_v2_v2(tdt->srelative, rel); @@ -5496,34 +5496,35 @@ static void markerToTransDataInit(TransData *td, TransData2D *td2d, memset(td->axismtx, 0, sizeof(td->axismtx)); td->axismtx[2][2] = 1.0f; - td->ext= NULL; td->val= NULL; + td->ext= NULL; + td->val= NULL; td->flag |= TD_SELECTED; - td->dist= 0.0; + td->dist = 0.0; unit_m3(td->mtx); unit_m3(td->smtx); } static void trackToTransData(SpaceClip *sc, TransData *td, TransData2D *td2d, - TransDataTracking *tdt, MovieTrackingTrack *track) + TransDataTracking *tdt, MovieTrackingTrack *track) { - MovieTrackingMarker *marker= BKE_tracking_ensure_marker(track, sc->user.framenr); + MovieTrackingMarker *marker = BKE_tracking_ensure_marker(track, sc->user.framenr); - tdt->flag= marker->flag; - marker->flag&= ~(MARKER_DISABLED|MARKER_TRACKED); + tdt->flag = marker->flag; + marker->flag &= ~(MARKER_DISABLED|MARKER_TRACKED); markerToTransDataInit(td++, td2d++, tdt++, track, TRACK_AREA_POINT, track->offset, marker->pos, track->offset); - if (track->flag&SELECT) + if (track->flag & SELECT) markerToTransDataInit(td++, td2d++, tdt++, track, TRACK_AREA_POINT, marker->pos, NULL, NULL); - if (track->pat_flag&SELECT) { + if (track->pat_flag & SELECT) { markerToTransDataInit(td++, td2d++, tdt++, track, TRACK_AREA_PAT, track->pat_min, marker->pos, NULL); markerToTransDataInit(td++, td2d++, tdt++, track, TRACK_AREA_PAT, track->pat_max, marker->pos, NULL); } - if (track->search_flag&SELECT) { + if (track->search_flag & SELECT) { markerToTransDataInit(td++, td2d++, tdt++, track, TRACK_AREA_SEARCH, track->search_min, marker->pos, NULL); markerToTransDataInit(td++, td2d++, tdt++, track, TRACK_AREA_SEARCH, track->search_max, marker->pos, NULL); } @@ -5531,10 +5532,12 @@ static void trackToTransData(SpaceClip *sc, TransData *td, TransData2D *td2d, static void transDataTrackingFree(TransInfo *t) { - TransDataTracking *tdt= t->customData; + TransDataTracking *tdt = t->customData; if (tdt) { - if (tdt->smarkers) MEM_freeN(tdt->smarkers); + if (tdt->smarkers) + MEM_freeN(tdt->smarkers); + MEM_freeN(tdt); } } @@ -5545,7 +5548,7 @@ static void createTransTrackingTracksData(bContext *C, TransInfo *t) TransData2D *td2d; SpaceClip *sc = CTX_wm_space_clip(C); MovieClip *clip = ED_space_clip(sc); - ListBase *tracksbase= BKE_tracking_get_tracks(&clip->tracking); + ListBase *tracksbase = BKE_tracking_get_tracks(&clip->tracking); MovieTrackingTrack *track; MovieTrackingMarker *marker; TransDataTracking *tdt; @@ -5556,33 +5559,38 @@ static void createTransTrackingTracksData(bContext *C, TransInfo *t) track = tracksbase->first; while (track) { - if (TRACK_VIEW_SELECTED(sc, track) && (track->flag&TRACK_LOCKED)==0) { - marker= BKE_tracking_get_marker(track, framenr); + if (TRACK_VIEW_SELECTED(sc, track) && (track->flag & TRACK_LOCKED)==0) { + marker = BKE_tracking_get_marker(track, framenr); t->total++; /* offset */ - if (track->flag&SELECT) t->total++; - if (track->pat_flag&SELECT) t->total+= 2; - if (track->search_flag&SELECT) t->total+= 2; + if (track->flag & SELECT) + t->total++; + + if (track->pat_flag & SELECT) + t->total+= 2; + + if (track->search_flag & SELECT) + t->total+= 2; } track = track->next; } - if (t->total==0) + if (t->total == 0) return; td = t->data = MEM_callocN(t->total*sizeof(TransData), "TransTracking TransData"); td2d = t->data2d = MEM_callocN(t->total*sizeof(TransData2D), "TransTracking TransData2D"); tdt = t->customData = MEM_callocN(t->total*sizeof(TransDataTracking), "TransTracking TransDataTracking"); - t->customFree= transDataTrackingFree; + t->customFree = transDataTrackingFree; /* create actual data */ track = tracksbase->first; while (track) { - if (TRACK_VIEW_SELECTED(sc, track) && (track->flag&TRACK_LOCKED)==0) { - marker= BKE_tracking_get_marker(track, framenr); + if (TRACK_VIEW_SELECTED(sc, track) && (track->flag & TRACK_LOCKED) == 0) { + marker = BKE_tracking_get_marker(track, framenr); trackToTransData(sc, td, td2d, tdt, track); @@ -5591,20 +5599,29 @@ static void createTransTrackingTracksData(bContext *C, TransInfo *t) td2d++; tdt++; - if ((marker->flag&MARKER_DISABLED)==0) { - if (track->flag&SELECT) {td++; td2d++; tdt++;} - if (track->pat_flag&SELECT) {td+= 2; td2d+= 2;tdt+=2;} + if ((marker->flag & MARKER_DISABLED) == 0) { + if (track->flag & SELECT) { + td++; + td2d++; + tdt++; + } + + if (track->pat_flag & SELECT) { + td += 2; + td2d += 2; + tdt +=2; + } } - if (track->search_flag&SELECT) { - td+= 2; - td2d+= 2; - tdt+= 2; + if (track->search_flag & SELECT) { + td += 2; + td2d += 2; + tdt += 2; - if (marker->flag&MARKER_DISABLED) { - td+= 3; - td2d+= 3; - tdt+= 3; + if (marker->flag & MARKER_DISABLED) { + td += 3; + td2d += 3; + tdt += 3; }; } } @@ -5614,7 +5631,7 @@ static void createTransTrackingTracksData(bContext *C, TransInfo *t) } static void markerToTransCurveDataInit(TransData *td, TransData2D *td2d, TransDataTracking *tdt, - MovieTrackingMarker *marker, MovieTrackingMarker *prev_marker, + MovieTrackingMarker *marker, MovieTrackingMarker *prev_marker, short coord, float size) { float frames_delta = (marker->framenr - prev_marker->framenr); @@ -5642,10 +5659,11 @@ static void markerToTransCurveDataInit(TransData *td, TransData2D *td2d, TransDa memset(td->axismtx, 0, sizeof(td->axismtx)); td->axismtx[2][2] = 1.0f; - td->ext= NULL; td->val= NULL; + td->ext= NULL; + td->val= NULL; td->flag |= TD_SELECTED; - td->dist= 0.0; + td->dist = 0.0; unit_m3(td->mtx); unit_m3(td->smtx); @@ -5689,7 +5707,7 @@ static void createTransTrackingCurvesData(bContext *C, TransInfo *t) track = track->next; } - if (t->total==0) + if (t->total == 0) return; td = t->data = MEM_callocN(t->total*sizeof(TransData), "TransTracking TransData"); @@ -5756,9 +5774,9 @@ static void createTransTrackingData(bContext *C, TransInfo *t) static void cancelTransTracking(TransInfo *t) { TransDataTracking *tdt = t->customData; - SpaceClip *sc= t->sa->spacedata.first; - MovieClip *clip= ED_space_clip(sc); - ListBase *tracksbase= BKE_tracking_get_tracks(&clip->tracking); + SpaceClip *sc = t->sa->spacedata.first; + MovieClip *clip = ED_space_clip(sc); + ListBase *tracksbase = BKE_tracking_get_tracks(&clip->tracking); MovieTrackingTrack *track; MovieTrackingMarker *marker; int a, framenr = sc->user.framenr; @@ -5772,9 +5790,14 @@ static void cancelTransTracking(TransInfo *t) tdt++; - if (track->flag&SELECT) tdt++; - if (track->pat_flag&SELECT) tdt += 2; - if (track->search_flag&SELECT) tdt += 2; + if (track->flag & SELECT) + tdt++; + + if (track->pat_flag & SELECT) + tdt += 2; + + if (track->search_flag & SELECT) + tdt += 2; } track = track->next; @@ -5817,13 +5840,13 @@ void flushTransTracking(TransInfo *t) /* flush to 2d vector from internally used 3d vector */ for (a=0, td= t->data, td2d= t->data2d, tdt= t->customData; atotal; a++, td2d++, td++, tdt++) { if (tdt->mode == transDataTracking_ModeTracks) { - if (t->flag&T_ALT_TRANSFORM) { - if (tdt->area==TRACK_AREA_POINT && tdt->relative) { + if (t->flag & T_ALT_TRANSFORM) { + if (tdt->area == TRACK_AREA_POINT && tdt->relative) { float d[2], d2[2]; if (!tdt->smarkers) { - tdt->smarkers= MEM_callocN(sizeof(*tdt->smarkers)*tdt->markersnr, "flushTransTracking markers"); - for (a= 0; amarkersnr; a++) + tdt->smarkers = MEM_callocN(sizeof(*tdt->smarkers)*tdt->markersnr, "flushTransTracking markers"); + for (a = 0; a < tdt->markersnr; a++) copy_v2_v2(tdt->smarkers[a], tdt->markers[a].pos); } diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 6dbab08ba7f..19dc968a8d2 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -637,14 +637,14 @@ static void recalcData_image(TransInfo *t) /* helper for recalcData() - for Movie Clip transforms */ static void recalcData_clip(TransInfo *t) { - SpaceClip *sc= t->sa->spacedata.first; - MovieClip *clip= ED_space_clip(sc); - ListBase *tracksbase= BKE_tracking_get_tracks(&clip->tracking); + SpaceClip *sc = t->sa->spacedata.first; + MovieClip *clip = ED_space_clip(sc); + ListBase *tracksbase = BKE_tracking_get_tracks(&clip->tracking); MovieTrackingTrack *track; flushTransTracking(t); - track= tracksbase->first; + track = tracksbase->first; while (track) { if (TRACK_VIEW_SELECTED(sc, track) && (track->flag & TRACK_LOCKED)==0) { if (t->mode == TFM_TRANSLATION) { @@ -661,7 +661,7 @@ static void recalcData_clip(TransInfo *t) } } - track= track->next; + track = track->next; } DAG_id_tag_update(&clip->id, 0); -- cgit v1.2.3 From 09144c3756f7b9b23461b522cf9711eb1c8db775 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 25 Mar 2012 23:54:33 +0000 Subject: style cleanup: mostly whitespace around operators --- source/blender/editors/space_view3d/drawanimviz.c | 92 +- source/blender/editors/space_view3d/drawarmature.c | 1125 ++++----- source/blender/editors/space_view3d/drawmesh.c | 290 +-- source/blender/editors/space_view3d/drawobject.c | 2585 ++++++++++---------- source/blender/editors/space_view3d/drawvolume.c | 111 +- source/blender/editors/space_view3d/space_view3d.c | 443 ++-- .../blender/editors/space_view3d/view3d_buttons.c | 288 +-- source/blender/editors/space_view3d/view3d_draw.c | 1177 ++++----- source/blender/editors/space_view3d/view3d_edit.c | 1140 ++++----- source/blender/editors/space_view3d/view3d_fly.c | 66 +- .../blender/editors/space_view3d/view3d_header.c | 334 +-- source/blender/editors/space_view3d/view3d_ops.c | 28 +- .../blender/editors/space_view3d/view3d_select.c | 1232 +++++----- source/blender/editors/space_view3d/view3d_snap.c | 491 ++-- .../blender/editors/space_view3d/view3d_toolbar.c | 76 +- source/blender/editors/space_view3d/view3d_view.c | 828 +++---- 16 files changed, 5161 insertions(+), 5145 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/space_view3d/drawanimviz.c b/source/blender/editors/space_view3d/drawanimviz.c index 545ec42e72f..d0e344ef0d5 100644 --- a/source/blender/editors/space_view3d/drawanimviz.c +++ b/source/blender/editors/space_view3d/drawanimviz.c @@ -70,7 +70,7 @@ /* Set up drawing environment for drawing motion paths */ void draw_motion_paths_init(View3D *v3d, ARegion *ar) { - RegionView3D *rv3d= ar->regiondata; + RegionView3D *rv3d = ar->regiondata; if (v3d->zbuf) glDisable(GL_DEPTH_TEST); @@ -79,15 +79,15 @@ void draw_motion_paths_init(View3D *v3d, ARegion *ar) } /* Draw the given motion path for an Object or a Bone - * - assumes that the viewport has already been initialized properly + * - assumes that the viewport has already been initialized properly * i.e. draw_motion_paths_init() has been called */ void draw_motion_path_instance(Scene *scene, - Object *ob, bPoseChannel *pchan, bAnimVizSettings *avs, bMotionPath *mpath) + Object *ob, bPoseChannel *pchan, bAnimVizSettings *avs, bMotionPath *mpath) { //RegionView3D *rv3d= ar->regiondata; bMotionPathVert *mpv, *mpv_start; - int i, stepsize= avs->path_step; + int i, stepsize = avs->path_step; int sfra, efra, len; @@ -99,21 +99,21 @@ void draw_motion_path_instance(Scene *scene, * the current frame to draw. However, this range is still * restricted by the limits of the original path. */ - sfra= CFRA - avs->path_bc; - efra= CFRA + avs->path_ac; - if (sfra < mpath->start_frame) sfra= mpath->start_frame; - if (efra > mpath->end_frame) efra= mpath->end_frame; + sfra = CFRA - avs->path_bc; + efra = CFRA + avs->path_ac; + if (sfra < mpath->start_frame) sfra = mpath->start_frame; + if (efra > mpath->end_frame) efra = mpath->end_frame; - len= efra - sfra; + len = efra - sfra; - sind= sfra - mpath->start_frame; - mpv_start= (mpath->points + sind); + sind = sfra - mpath->start_frame; + mpv_start = (mpath->points + sind); } else { - sfra= mpath->start_frame; + sfra = mpath->start_frame; efra = sfra + mpath->length; len = mpath->length; - mpv_start= mpath->points; + mpv_start = mpath->points; } if (len <= 0) { @@ -124,17 +124,17 @@ void draw_motion_path_instance(Scene *scene, glShadeModel(GL_SMOOTH); glBegin(GL_LINE_STRIP); - for (i=0, mpv=mpv_start; i < len; i++, mpv++) { - short sel= (pchan) ? (pchan->bone->flag & BONE_SELECTED) : (ob->flag & SELECT); + for (i = 0, mpv = mpv_start; i < len; i++, mpv++) { + short sel = (pchan) ? (pchan->bone->flag & BONE_SELECTED) : (ob->flag & SELECT); float intensity; /* how faint */ /* set color - * - more intense for active/selected bones, less intense for unselected bones - * - black for before current frame, green for current frame, blue for after current frame - * - intensity decreases as distance from current frame increases + * - more intense for active/selected bones, less intense for unselected bones + * - black for before current frame, green for current frame, blue for after current frame + * - intensity decreases as distance from current frame increases */ - #define SET_INTENSITY(A, B, C, min, max) (((1.0f - ((C - B) / (C - A))) * (max-min)) + min) - if ((sfra+i) < CFRA) { + #define SET_INTENSITY(A, B, C, min, max) (((1.0f - ((C - B) / (C - A))) * (max - min)) + min) + if ((sfra + i) < CFRA) { /* black - before cfra */ if (sel) { // intensity= 0.5f; @@ -146,7 +146,7 @@ void draw_motion_path_instance(Scene *scene, } UI_ThemeColorBlend(TH_WIRE, TH_BACK, intensity); } - else if ((sfra+i) > CFRA) { + else if ((sfra + i) > CFRA) { /* blue - after cfra */ if (sel) { //intensity = 0.5f; @@ -161,10 +161,10 @@ void draw_motion_path_instance(Scene *scene, else { /* green - on cfra */ if (sel) { - intensity= 0.5f; + intensity = 0.5f; } else { - intensity= 0.99f; + intensity = 0.99f; } UI_ThemeColorBlendShade(TH_CFRAME, TH_BACK, intensity, 10); } @@ -182,28 +182,28 @@ void draw_motion_path_instance(Scene *scene, * NOTE: this is not really visible/noticeable */ glBegin(GL_POINTS); - for (i=0, mpv=mpv_start; i < len; i++, mpv++) + for (i = 0, mpv = mpv_start; i < len; i++, mpv++) glVertex3fv(mpv->co); glEnd(); /* Draw little white dots at each framestep value */ UI_ThemeColor(TH_TEXT_HI); glBegin(GL_POINTS); - for (i=0, mpv=mpv_start; i < len; i+=stepsize, mpv+=stepsize) + for (i = 0, mpv = mpv_start; i < len; i += stepsize, mpv += stepsize) glVertex3fv(mpv->co); glEnd(); /* Draw big green dot where the current frame is */ // NOTE: only do this when drawing keyframes for now... if ((avs->path_viewflag & MOTIONPATH_VIEW_KFRAS) && - (sfra < CFRA) && (CFRA <= efra)) + (sfra < CFRA) && (CFRA <= efra)) { UI_ThemeColor(TH_CFRAME); glPointSize(6.0f); glBegin(GL_POINTS); - mpv = mpv_start + (CFRA - sfra); - glVertex3fv(mpv->co); + mpv = mpv_start + (CFRA - sfra); + glVertex3fv(mpv->co); glEnd(); glPointSize(1.0f); @@ -217,26 +217,26 @@ void draw_motion_path_instance(Scene *scene, if (avs->path_viewflag & MOTIONPATH_VIEW_FNUMS) { unsigned char col[4]; UI_GetThemeColor3ubv(TH_TEXT_HI, col); - col[3]= 255; + col[3] = 255; - for (i=0, mpv=mpv_start; i < len; i+=stepsize, mpv+=stepsize) { + for (i = 0, mpv = mpv_start; i < len; i += stepsize, mpv += stepsize) { char numstr[32]; float co[3]; /* only draw framenum if several consecutive highlighted points don't occur on same point */ if (i == 0) { - sprintf(numstr, "%d", (i+sfra)); + sprintf(numstr, "%d", (i + sfra)); mul_v3_m4v3(co, ob->imat, mpv->co); - view3d_cached_text_draw_add(co, numstr, 0, V3D_CACHE_TEXT_WORLDSPACE|V3D_CACHE_TEXT_ASCII, col); + view3d_cached_text_draw_add(co, numstr, 0, V3D_CACHE_TEXT_WORLDSPACE | V3D_CACHE_TEXT_ASCII, col); } - else if ((i > stepsize) && (i < len-stepsize)) { + else if ((i > stepsize) && (i < len - stepsize)) { bMotionPathVert *mpvP = (mpv - stepsize); bMotionPathVert *mpvN = (mpv + stepsize); - if ((equals_v3v3(mpv->co, mpvP->co)==0) || (equals_v3v3(mpv->co, mpvN->co)==0)) { - sprintf(numstr, "%d", (sfra+i)); + if ((equals_v3v3(mpv->co, mpvP->co) == 0) || (equals_v3v3(mpv->co, mpvN->co) == 0)) { + sprintf(numstr, "%d", (sfra + i)); mul_v3_m4v3(co, ob->imat, mpv->co); - view3d_cached_text_draw_add(co, numstr, 0, V3D_CACHE_TEXT_WORLDSPACE|V3D_CACHE_TEXT_ASCII, col); + view3d_cached_text_draw_add(co, numstr, 0, V3D_CACHE_TEXT_WORLDSPACE | V3D_CACHE_TEXT_ASCII, col); } } } @@ -246,7 +246,7 @@ void draw_motion_path_instance(Scene *scene, if (avs->path_viewflag & MOTIONPATH_VIEW_KFRAS) { unsigned char col[4]; - AnimData *adt= BKE_animdata_from_id(&ob->id); + AnimData *adt = BKE_animdata_from_id(&ob->id); DLRBT_Tree keys; /* build list of all keyframes in active action for object or pchan */ @@ -256,8 +256,8 @@ void draw_motion_path_instance(Scene *scene, /* it is assumed that keyframes for bones are all grouped in a single group * unless an option is set to always use the whole action */ - if ((pchan) && (avs->path_viewflag & MOTIONPATH_VIEW_KFACT)==0) { - bActionGroup *agrp= action_groups_find_named(adt->action, pchan->name); + if ((pchan) && (avs->path_viewflag & MOTIONPATH_VIEW_KFACT) == 0) { + bActionGroup *agrp = action_groups_find_named(adt->action, pchan->name); if (agrp) { agroup_to_keylist(adt, agrp, &keys, NULL); @@ -272,14 +272,14 @@ void draw_motion_path_instance(Scene *scene, /* Draw slightly-larger yellow dots at each keyframe */ UI_GetThemeColor3ubv(TH_VERTEX_SELECT, col); - col[3]= 255; + col[3] = 255; glPointSize(4.0f); // XXX perhaps a bit too big glColor3ubv(col); glBegin(GL_POINTS); - for (i=0, mpv=mpv_start; i < len; i++, mpv++) { - float mframe= (float)(sfra + i); + for (i = 0, mpv = mpv_start; i < len; i++, mpv++) { + float mframe = (float)(sfra + i); if (BLI_dlrbTree_search_exact(&keys, compare_ak_cfraPtr, &mframe)) glVertex3fv(mpv->co); @@ -291,15 +291,15 @@ void draw_motion_path_instance(Scene *scene, /* Draw frame numbers of keyframes */ if (avs->path_viewflag & MOTIONPATH_VIEW_KFNOS) { float co[3]; - for (i=0, mpv=mpv_start; i < len; i++, mpv++) { - float mframe= (float)(sfra + i); + for (i = 0, mpv = mpv_start; i < len; i++, mpv++) { + float mframe = (float)(sfra + i); if (BLI_dlrbTree_search_exact(&keys, compare_ak_cfraPtr, &mframe)) { char numstr[32]; - sprintf(numstr, "%d", (sfra+i)); + sprintf(numstr, "%d", (sfra + i)); mul_v3_m4v3(co, ob->imat, mpv->co); - view3d_cached_text_draw_add(co, numstr, 0, V3D_CACHE_TEXT_WORLDSPACE|V3D_CACHE_TEXT_ASCII, col); + view3d_cached_text_draw_add(co, numstr, 0, V3D_CACHE_TEXT_WORLDSPACE | V3D_CACHE_TEXT_ASCII, col); } } } diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c index fae271e5bee..fec93b3b9aa 100644 --- a/source/blender/editors/space_view3d/drawarmature.c +++ b/source/blender/editors/space_view3d/drawarmature.c @@ -72,30 +72,30 @@ /* *************** Armature Drawing - Coloring API ***************************** */ /* global here is reset before drawing each bone */ -static ThemeWireColor *bcolor= NULL; +static ThemeWireColor *bcolor = NULL; /* values of colCode for set_pchan_glcolor */ enum { - PCHAN_COLOR_NORMAL = 0, /* normal drawing */ - PCHAN_COLOR_SOLID, /* specific case where "solid" color is needed */ - PCHAN_COLOR_CONSTS, /* "constraint" colors (which may/may-not be suppressed) */ - - PCHAN_COLOR_SPHEREBONE_BASE, /* for the 'stick' of sphere (envelope) bones */ - PCHAN_COLOR_SPHEREBONE_END, /* for the ends of sphere (envelope) bones */ - PCHAN_COLOR_LINEBONE /* for the middle of line-bones */ + PCHAN_COLOR_NORMAL = 0, /* normal drawing */ + PCHAN_COLOR_SOLID, /* specific case where "solid" color is needed */ + PCHAN_COLOR_CONSTS, /* "constraint" colors (which may/may-not be suppressed) */ + + PCHAN_COLOR_SPHEREBONE_BASE, /* for the 'stick' of sphere (envelope) bones */ + PCHAN_COLOR_SPHEREBONE_END, /* for the ends of sphere (envelope) bones */ + PCHAN_COLOR_LINEBONE /* for the middle of line-bones */ }; /* This function sets the color-set for coloring a certain bone */ -static void set_pchan_colorset (Object *ob, bPoseChannel *pchan) +static void set_pchan_colorset(Object *ob, bPoseChannel *pchan) { - bPose *pose= (ob) ? ob->pose : NULL; - bArmature *arm= (ob) ? ob->data : NULL; - bActionGroup *grp= NULL; - short color_index= 0; + bPose *pose = (ob) ? ob->pose : NULL; + bArmature *arm = (ob) ? ob->data : NULL; + bActionGroup *grp = NULL; + short color_index = 0; /* sanity check */ if (ELEM4(NULL, ob, arm, pose, pchan)) { - bcolor= NULL; + bcolor = NULL; return; } @@ -105,9 +105,9 @@ static void set_pchan_colorset (Object *ob, bPoseChannel *pchan) * has been set to use one */ if (pchan->agrp_index) { - grp= (bActionGroup *)BLI_findlink(&pose->agroups, (pchan->agrp_index - 1)); + grp = (bActionGroup *)BLI_findlink(&pose->agroups, (pchan->agrp_index - 1)); if (grp) - color_index= grp->customCol; + color_index = grp->customCol; } } @@ -115,181 +115,181 @@ static void set_pchan_colorset (Object *ob, bPoseChannel *pchan) * color set (based on the theme colors for 3d-view) is used. */ if (color_index > 0) { - bTheme *btheme= UI_GetTheme(); - bcolor= &btheme->tarm[(color_index - 1)]; + bTheme *btheme = UI_GetTheme(); + bcolor = &btheme->tarm[(color_index - 1)]; } else if (color_index == -1) { /* use the group's own custom color set */ - bcolor= (grp)? &grp->cs : NULL; + bcolor = (grp) ? &grp->cs : NULL; } else - bcolor= NULL; + bcolor = NULL; } /* This function is for brightening/darkening a given color (like UI_ThemeColorShade()) */ -static void cp_shade_color3ub (unsigned char cp[3], const int offset) +static void cp_shade_color3ub(unsigned char cp[3], const int offset) { int r, g, b; - r= offset + (int) cp[0]; + r = offset + (int) cp[0]; CLAMP(r, 0, 255); - g= offset + (int) cp[1]; + g = offset + (int) cp[1]; CLAMP(g, 0, 255); - b= offset + (int) cp[2]; + b = offset + (int) cp[2]; CLAMP(b, 0, 255); - cp[0]= r; - cp[1]= g; - cp[2]= b; + cp[0] = r; + cp[1] = g; + cp[2] = b; } /* This function sets the gl-color for coloring a certain bone (based on bcolor) */ -static short set_pchan_glColor (short colCode, int boneflag, short constflag) +static short set_pchan_glColor(short colCode, int boneflag, short constflag) { switch (colCode) { - case PCHAN_COLOR_NORMAL: - { - if (bcolor) { - unsigned char cp[3]; + case PCHAN_COLOR_NORMAL: + { + if (bcolor) { + unsigned char cp[3]; - if (boneflag & BONE_DRAW_ACTIVE) { - copy_v3_v3_char((char *)cp, bcolor->active); - if (!(boneflag & BONE_SELECTED)) { - cp_shade_color3ub(cp, -80); + if (boneflag & BONE_DRAW_ACTIVE) { + copy_v3_v3_char((char *)cp, bcolor->active); + if (!(boneflag & BONE_SELECTED)) { + cp_shade_color3ub(cp, -80); + } + } + else if (boneflag & BONE_SELECTED) { + copy_v3_v3_char((char *)cp, bcolor->select); + } + else { + /* a bit darker than solid */ + copy_v3_v3_char((char *)cp, bcolor->solid); + cp_shade_color3ub(cp, -50); } - } - else if (boneflag & BONE_SELECTED) { - copy_v3_v3_char((char *)cp, bcolor->select); - } - else { - /* a bit darker than solid */ - copy_v3_v3_char((char *)cp, bcolor->solid); - cp_shade_color3ub(cp, -50); - } - glColor3ubv(cp); - } - else { - if ((boneflag & BONE_DRAW_ACTIVE) && (boneflag & BONE_SELECTED)) { - UI_ThemeColorShade(TH_BONE_POSE, 40); - } - else if (boneflag & BONE_DRAW_ACTIVE) { - UI_ThemeColorBlend(TH_WIRE, TH_BONE_POSE, 0.15f); /* unselected active */ - } - else if (boneflag & BONE_SELECTED) { - UI_ThemeColor(TH_BONE_POSE); + glColor3ubv(cp); } else { - UI_ThemeColor(TH_WIRE); + if ((boneflag & BONE_DRAW_ACTIVE) && (boneflag & BONE_SELECTED)) { + UI_ThemeColorShade(TH_BONE_POSE, 40); + } + else if (boneflag & BONE_DRAW_ACTIVE) { + UI_ThemeColorBlend(TH_WIRE, TH_BONE_POSE, 0.15f); /* unselected active */ + } + else if (boneflag & BONE_SELECTED) { + UI_ThemeColor(TH_BONE_POSE); + } + else { + UI_ThemeColor(TH_WIRE); + } } - } - - return 1; - } - break; - case PCHAN_COLOR_SOLID: - { - if (bcolor) { - glColor3ubv((unsigned char *)bcolor->solid); + return 1; } - else - UI_ThemeColor(TH_BONE_SOLID); - - return 1; - } break; - case PCHAN_COLOR_CONSTS: - { - if ((bcolor == NULL) || (bcolor->flag & TH_WIRECOLOR_CONSTCOLS)) { - if (constflag & PCHAN_HAS_TARGET) glColor4ub(255, 150, 0, 80); - else if (constflag & PCHAN_HAS_IK) glColor4ub(255, 255, 0, 80); - else if (constflag & PCHAN_HAS_SPLINEIK) glColor4ub(200, 255, 0, 80); - else if (constflag & PCHAN_HAS_CONST) glColor4ub(0, 255, 120, 80); + case PCHAN_COLOR_SOLID: + { + if (bcolor) { + glColor3ubv((unsigned char *)bcolor->solid); + } + else + UI_ThemeColor(TH_BONE_SOLID); return 1; } - else - return 0; - } break; - case PCHAN_COLOR_SPHEREBONE_BASE: - { - if (bcolor) { - unsigned char cp[3]; + case PCHAN_COLOR_CONSTS: + { + if ((bcolor == NULL) || (bcolor->flag & TH_WIRECOLOR_CONSTCOLS)) { + if (constflag & PCHAN_HAS_TARGET) glColor4ub(255, 150, 0, 80); + else if (constflag & PCHAN_HAS_IK) glColor4ub(255, 255, 0, 80); + else if (constflag & PCHAN_HAS_SPLINEIK) glColor4ub(200, 255, 0, 80); + else if (constflag & PCHAN_HAS_CONST) glColor4ub(0, 255, 120, 80); - if (boneflag & BONE_DRAW_ACTIVE) { - copy_v3_v3_char((char *)cp, bcolor->active); + return 1; } - else if (boneflag & BONE_SELECTED) { - copy_v3_v3_char((char *)cp, bcolor->select); + else + return 0; + } + break; + + case PCHAN_COLOR_SPHEREBONE_BASE: + { + if (bcolor) { + unsigned char cp[3]; + + if (boneflag & BONE_DRAW_ACTIVE) { + copy_v3_v3_char((char *)cp, bcolor->active); + } + else if (boneflag & BONE_SELECTED) { + copy_v3_v3_char((char *)cp, bcolor->select); + } + else { + copy_v3_v3_char((char *)cp, bcolor->solid); + } + + glColor3ubv(cp); } else { - copy_v3_v3_char((char *)cp, bcolor->solid); + if (boneflag & BONE_DRAW_ACTIVE) UI_ThemeColorShade(TH_BONE_POSE, 40); + else if (boneflag & BONE_SELECTED) UI_ThemeColor(TH_BONE_POSE); + else UI_ThemeColor(TH_BONE_SOLID); } - glColor3ubv(cp); - } - else { - if (boneflag & BONE_DRAW_ACTIVE) UI_ThemeColorShade(TH_BONE_POSE, 40); - else if (boneflag & BONE_SELECTED) UI_ThemeColor(TH_BONE_POSE); - else UI_ThemeColor(TH_BONE_SOLID); + return 1; } - - return 1; - } break; - case PCHAN_COLOR_SPHEREBONE_END: - { - if (bcolor) { - unsigned char cp[3]; + case PCHAN_COLOR_SPHEREBONE_END: + { + if (bcolor) { + unsigned char cp[3]; + + if (boneflag & BONE_DRAW_ACTIVE) { + copy_v3_v3_char((char *)cp, bcolor->active); + cp_shade_color3ub(cp, 10); + } + else if (boneflag & BONE_SELECTED) { + copy_v3_v3_char((char *)cp, bcolor->select); + cp_shade_color3ub(cp, -30); + } + else { + copy_v3_v3_char((char *)cp, bcolor->solid); + cp_shade_color3ub(cp, -30); + } - if (boneflag & BONE_DRAW_ACTIVE) { - copy_v3_v3_char((char *)cp, bcolor->active); - cp_shade_color3ub(cp, 10); - } - else if (boneflag & BONE_SELECTED) { - copy_v3_v3_char((char *)cp, bcolor->select); - cp_shade_color3ub(cp, -30); + glColor3ubv(cp); } else { - copy_v3_v3_char((char *)cp, bcolor->solid); - cp_shade_color3ub(cp, -30); + if (boneflag & BONE_DRAW_ACTIVE) UI_ThemeColorShade(TH_BONE_POSE, 10); + else if (boneflag & BONE_SELECTED) UI_ThemeColorShade(TH_BONE_POSE, -30); + else UI_ThemeColorShade(TH_BONE_SOLID, -30); } - - glColor3ubv(cp); - } - else { - if (boneflag & BONE_DRAW_ACTIVE) UI_ThemeColorShade(TH_BONE_POSE, 10); - else if (boneflag & BONE_SELECTED) UI_ThemeColorShade(TH_BONE_POSE, -30); - else UI_ThemeColorShade(TH_BONE_SOLID, -30); } - } break; - case PCHAN_COLOR_LINEBONE: - { - /* inner part in background color or constraint */ - if ( (constflag) && ((bcolor==NULL) || (bcolor->flag & TH_WIRECOLOR_CONSTCOLS)) ) { - if (constflag & PCHAN_HAS_TARGET) glColor3ub(255, 150, 0); - else if (constflag & PCHAN_HAS_IK) glColor3ub(255, 255, 0); - else if (constflag & PCHAN_HAS_SPLINEIK) glColor3ub(200, 255, 0); - else if (constflag & PCHAN_HAS_CONST) glColor3ub(0, 255, 120); - else if (constflag) UI_ThemeColor(TH_BONE_POSE); /* PCHAN_HAS_ACTION */ - } - else { - if (bcolor) { - char *cp= bcolor->solid; - glColor4ub(cp[0], cp[1], cp[2], 204); + case PCHAN_COLOR_LINEBONE: + { + /* inner part in background color or constraint */ + if ( (constflag) && ((bcolor == NULL) || (bcolor->flag & TH_WIRECOLOR_CONSTCOLS)) ) { + if (constflag & PCHAN_HAS_TARGET) glColor3ub(255, 150, 0); + else if (constflag & PCHAN_HAS_IK) glColor3ub(255, 255, 0); + else if (constflag & PCHAN_HAS_SPLINEIK) glColor3ub(200, 255, 0); + else if (constflag & PCHAN_HAS_CONST) glColor3ub(0, 255, 120); + else if (constflag) UI_ThemeColor(TH_BONE_POSE); /* PCHAN_HAS_ACTION */ + } + else { + if (bcolor) { + char *cp = bcolor->solid; + glColor4ub(cp[0], cp[1], cp[2], 204); + } + else + UI_ThemeColorShade(TH_BACK, -30); } - else - UI_ThemeColorShade(TH_BACK, -30); - } - return 1; - } + return 1; + } break; } @@ -316,48 +316,48 @@ static void set_ebone_glColor(const unsigned int boneflag) /* half the cube, in Y */ static float cube[8][3] = { -{-1.0, 0.0, -1.0}, -{-1.0, 0.0, 1.0}, -{-1.0, 1.0, 1.0}, -{-1.0, 1.0, -1.0}, -{ 1.0, 0.0, -1.0}, -{ 1.0, 0.0, 1.0}, -{ 1.0, 1.0, 1.0}, -{ 1.0, 1.0, -1.0}, + {-1.0, 0.0, -1.0}, + {-1.0, 0.0, 1.0}, + {-1.0, 1.0, 1.0}, + {-1.0, 1.0, -1.0}, + { 1.0, 0.0, -1.0}, + { 1.0, 0.0, 1.0}, + { 1.0, 1.0, 1.0}, + { 1.0, 1.0, -1.0}, }; static void drawsolidcube_size(float xsize, float ysize, float zsize) { - static GLuint displist=0; - float n[3]= {0.0f}; + static GLuint displist = 0; + float n[3] = {0.0f}; glScalef(xsize, ysize, zsize); - if (displist==0) { - displist= glGenLists(1); + if (displist == 0) { + displist = glGenLists(1); glNewList(displist, GL_COMPILE); glBegin(GL_QUADS); - n[0]= -1.0; + n[0] = -1.0; glNormal3fv(n); glVertex3fv(cube[0]); glVertex3fv(cube[1]); glVertex3fv(cube[2]); glVertex3fv(cube[3]); - n[0]=0; - n[1]= -1.0; + n[0] = 0; + n[1] = -1.0; glNormal3fv(n); glVertex3fv(cube[0]); glVertex3fv(cube[4]); glVertex3fv(cube[5]); glVertex3fv(cube[1]); - n[1]=0; - n[0]= 1.0; + n[1] = 0; + n[0] = 1.0; glNormal3fv(n); glVertex3fv(cube[4]); glVertex3fv(cube[7]); glVertex3fv(cube[6]); glVertex3fv(cube[5]); - n[0]=0; - n[1]= 1.0; + n[0] = 0; + n[1] = 1.0; glNormal3fv(n); glVertex3fv(cube[7]); glVertex3fv(cube[3]); glVertex3fv(cube[2]); glVertex3fv(cube[6]); - n[1]=0; - n[2]= 1.0; + n[1] = 0; + n[2] = 1.0; glNormal3fv(n); glVertex3fv(cube[1]); glVertex3fv(cube[5]); glVertex3fv(cube[6]); glVertex3fv(cube[2]); - n[2]= -1.0; + n[2] = -1.0; glNormal3fv(n); glVertex3fv(cube[7]); glVertex3fv(cube[4]); glVertex3fv(cube[0]); glVertex3fv(cube[3]); glEnd(); @@ -370,15 +370,15 @@ static void drawsolidcube_size(float xsize, float ysize, float zsize) static void drawcube_size(float xsize, float ysize, float zsize) { - static GLuint displist=0; + static GLuint displist = 0; if (displist == 0) { - displist= glGenLists(1); + displist = glGenLists(1); glNewList(displist, GL_COMPILE); glBegin(GL_LINE_STRIP); - glVertex3fv(cube[0]); glVertex3fv(cube[1]);glVertex3fv(cube[2]); glVertex3fv(cube[3]); - glVertex3fv(cube[0]); glVertex3fv(cube[4]);glVertex3fv(cube[5]); glVertex3fv(cube[6]); + glVertex3fv(cube[0]); glVertex3fv(cube[1]); glVertex3fv(cube[2]); glVertex3fv(cube[3]); + glVertex3fv(cube[0]); glVertex3fv(cube[4]); glVertex3fv(cube[5]); glVertex3fv(cube[6]); glVertex3fv(cube[7]); glVertex3fv(cube[4]); glEnd(); @@ -399,17 +399,17 @@ static void drawcube_size(float xsize, float ysize, float zsize) static void draw_bonevert(void) { - static GLuint displist=0; + static GLuint displist = 0; if (displist == 0) { - GLUquadricObj *qobj; + GLUquadricObj *qobj; - displist= glGenLists(1); + displist = glGenLists(1); glNewList(displist, GL_COMPILE); glPushMatrix(); - qobj = gluNewQuadric(); + qobj = gluNewQuadric(); gluQuadricDrawStyle(qobj, GLU_SILHOUETTE); gluDisk(qobj, 0.0, 0.05, 16, 1); @@ -430,15 +430,15 @@ static void draw_bonevert(void) static void draw_bonevert_solid(void) { - static GLuint displist=0; + static GLuint displist = 0; if (displist == 0) { - GLUquadricObj *qobj; + GLUquadricObj *qobj; - displist= glGenLists(1); + displist = glGenLists(1); glNewList(displist, GL_COMPILE); - qobj = gluNewQuadric(); + qobj = gluNewQuadric(); gluQuadricDrawStyle(qobj, GLU_FILL); glShadeModel(GL_SMOOTH); gluSphere(qobj, 0.05, 8, 5); @@ -451,7 +451,7 @@ static void draw_bonevert_solid(void) glCallList(displist); } -static float bone_octahedral_verts[6][3]= { +static float bone_octahedral_verts[6][3] = { { 0.0f, 0.0f, 0.0f}, { 0.1f, 0.1f, 0.1f}, { 0.1f, 0.1f, -0.1f}, @@ -460,10 +460,10 @@ static float bone_octahedral_verts[6][3]= { { 0.0f, 1.0f, 0.0f} }; -static unsigned int bone_octahedral_wire_sides[8]= {0, 1, 5, 3, 0, 4, 5, 2}; -static unsigned int bone_octahedral_wire_square[8]= {1, 2, 3, 4, 1}; +static unsigned int bone_octahedral_wire_sides[8] = {0, 1, 5, 3, 0, 4, 5, 2}; +static unsigned int bone_octahedral_wire_square[8] = {1, 2, 3, 4, 1}; -static unsigned int bone_octahedral_solid_tris[8][3]= { +static unsigned int bone_octahedral_solid_tris[8][3] = { {2, 1, 0}, /* bottom */ {3, 2, 0}, {4, 3, 0}, @@ -476,7 +476,7 @@ static unsigned int bone_octahedral_solid_tris[8][3]= { }; /* aligned with bone_octahedral_solid_tris */ -static float bone_octahedral_solid_normals[8][3]= { +static float bone_octahedral_solid_normals[8][3] = { { 0.70710683f, -0.70710683f, 0.00000000f}, {-0.00000000f, -0.70710683f, -0.70710683f}, {-0.70710683f, -0.70710683f, 0.00000000f}, @@ -489,23 +489,23 @@ static float bone_octahedral_solid_normals[8][3]= { static void draw_bone_octahedral(void) { - static GLuint displist=0; + static GLuint displist = 0; if (displist == 0) { - displist= glGenLists(1); + displist = glGenLists(1); glNewList(displist, GL_COMPILE); /* Section 1, sides */ glEnableClientState(GL_VERTEX_ARRAY); glVertexPointer(3, GL_FLOAT, 0, bone_octahedral_verts); glDrawElements(GL_LINE_LOOP, - sizeof(bone_octahedral_wire_sides)/sizeof(*bone_octahedral_wire_sides), + sizeof(bone_octahedral_wire_sides) / sizeof(*bone_octahedral_wire_sides), GL_UNSIGNED_INT, bone_octahedral_wire_sides); /* Section 1, square */ glDrawElements(GL_LINE_LOOP, - sizeof(bone_octahedral_wire_square)/sizeof(*bone_octahedral_wire_square), + sizeof(bone_octahedral_wire_square) / sizeof(*bone_octahedral_wire_square), GL_UNSIGNED_INT, bone_octahedral_wire_square); glDisableClientState(GL_VERTEX_ARRAY); @@ -518,17 +518,17 @@ static void draw_bone_octahedral(void) static void draw_bone_solid_octahedral(void) { - static GLuint displist=0; + static GLuint displist = 0; if (displist == 0) { int i; - displist= glGenLists(1); + displist = glGenLists(1); glNewList(displist, GL_COMPILE); #if 1 glBegin(GL_TRIANGLES); - for (i= 0; i < 8; i++) { + for (i = 0; i < 8; i++) { glNormal3fv(bone_octahedral_solid_normals[i]); glVertex3fv(bone_octahedral_verts[bone_octahedral_solid_tris[i][0]]); glVertex3fv(bone_octahedral_verts[bone_octahedral_solid_tris[i][1]]); @@ -537,12 +537,12 @@ static void draw_bone_solid_octahedral(void) glEnd(); -#else /* not working because each vert needs a different normal */ +#else /* not working because each vert needs a different normal */ glEnableClientState(GL_NORMAL_ARRAY); glEnableClientState(GL_VERTEX_ARRAY); glNormalPointer(GL_FLOAT, 0, bone_octahedral_solid_normals); glVertexPointer(3, GL_FLOAT, 0, bone_octahedral_verts); - glDrawElements(GL_TRIANGLES, sizeof(bone_octahedral_solid_tris)/sizeof(unsigned int), + glDrawElements(GL_TRIANGLES, sizeof(bone_octahedral_solid_tris) / sizeof(unsigned int), GL_UNSIGNED_INT, bone_octahedral_solid_tris); glDisableClientState(GL_NORMAL_ARRAY); glDisableClientState(GL_VERTEX_ARRAY); @@ -560,7 +560,7 @@ static void draw_bone_solid_octahedral(void) static void draw_bone_points(int dt, int armflag, unsigned int boneflag, int id) { /* Draw root point if we are not connected */ - if ((boneflag & BONE_CONNECTED)==0) { + if ((boneflag & BONE_CONNECTED) == 0) { if (id != -1) glLoadName(id | BONESEL_ROOT); @@ -622,7 +622,7 @@ static float si[16] = { 0.10116832f }; /* 16 values of cos function (still same result!) */ -static float co[16] ={ +static float co[16] = { 1.00000000f, 0.97952994f, 0.91895781f, 0.82076344f, 0.68896691f, @@ -648,25 +648,25 @@ static void draw_sphere_bone_dist(float smat[][4], float imat[][4], bPoseChannel ebone->length = len_v3v3(ebone->head, ebone->tail); /*length= ebone->length;*/ /*UNUSED*/ - tail= ebone->rad_tail; - dist= ebone->dist; + tail = ebone->rad_tail; + dist = ebone->dist; if (ebone->parent && (ebone->flag & BONE_CONNECTED)) - head= ebone->parent->rad_tail; + head = ebone->parent->rad_tail; else - head= ebone->rad_head; - headvec= ebone->head; - tailvec= ebone->tail; + head = ebone->rad_head; + headvec = ebone->head; + tailvec = ebone->tail; } else { /*length= pchan->bone->length;*/ /*UNUSED*/ - tail= pchan->bone->rad_tail; - dist= pchan->bone->dist; + tail = pchan->bone->rad_tail; + dist = pchan->bone->dist; if (pchan->parent && (pchan->bone->flag & BONE_CONNECTED)) - head= pchan->parent->bone->rad_tail; + head = pchan->parent->bone->rad_tail; else - head= pchan->bone->rad_head; - headvec= pchan->pose_head; - tailvec= pchan->pose_tail; + head = pchan->bone->rad_head; + headvec = pchan->pose_head; + tailvec = pchan->pose_tail; } /* ***** draw it ***** */ @@ -675,24 +675,24 @@ static void draw_sphere_bone_dist(float smat[][4], float imat[][4], bPoseChannel sub_v3_v3v3(dirvec, tailvec, headvec); mul_mat3_m4_v3(smat, dirvec); /* clear zcomp */ - dirvec[2]= 0.0f; + dirvec[2] = 0.0f; if (head != tail) { - /* correction when viewing along the bones axis - * it pops in and out but better then artifacts, [#23841] */ - float view_dist= len_v2(dirvec); + /* correction when viewing along the bones axis + * it pops in and out but better then artifacts, [#23841] */ + float view_dist = len_v2(dirvec); if (head - view_dist > tail) { - tailvec= headvec; + tailvec = headvec; tail = head; zero_v3(dirvec); - dirvec[0]= 0.00001; // XXX. weak but ok + dirvec[0] = 0.00001; // XXX. weak but ok } else if (tail - view_dist > head) { - headvec= tailvec; + headvec = tailvec; head = tail; zero_v3(dirvec); - dirvec[0]= 0.00001; // XXX. weak but ok + dirvec[0] = 0.00001; // XXX. weak but ok } } @@ -708,10 +708,10 @@ static void draw_sphere_bone_dist(float smat[][4], float imat[][4], bPoseChannel glBegin(GL_QUAD_STRIP); - for (a=0; a<16; a++) { - vec[0]= - *(si+a) * dirvec[0] + *(co+a) * norvec[0]; - vec[1]= - *(si+a) * dirvec[1] + *(co+a) * norvec[1]; - vec[2]= - *(si+a) * dirvec[2] + *(co+a) * norvec[2]; + for (a = 0; a < 16; a++) { + vec[0] = -*(si + a) * dirvec[0] + *(co + a) * norvec[0]; + vec[1] = -*(si + a) * dirvec[1] + *(co + a) * norvec[1]; + vec[2] = -*(si + a) * dirvec[2] + *(co + a) * norvec[2]; madd_v3_v3v3fl(vec1, headvec, vec, head); madd_v3_v3v3fl(vec2, headvec, vec, head + dist); @@ -722,10 +722,10 @@ static void draw_sphere_bone_dist(float smat[][4], float imat[][4], bPoseChannel glVertex3fv(vec2); } - for (a=15; a>=0; a--) { - vec[0]= *(si+a) * dirvec[0] + *(co+a) * norvec[0]; - vec[1]= *(si+a) * dirvec[1] + *(co+a) * norvec[1]; - vec[2]= *(si+a) * dirvec[2] + *(co+a) * norvec[2]; + for (a = 15; a >= 0; a--) { + vec[0] = *(si + a) * dirvec[0] + *(co + a) * norvec[0]; + vec[1] = *(si + a) * dirvec[1] + *(co + a) * norvec[1]; + vec[2] = *(si + a) * dirvec[2] + *(co + a) * norvec[2]; madd_v3_v3v3fl(vec1, tailvec, vec, tail); madd_v3_v3v3fl(vec2, tailvec, vec, tail + dist); @@ -737,9 +737,9 @@ static void draw_sphere_bone_dist(float smat[][4], float imat[][4], bPoseChannel } /* make it cyclic... */ - vec[0]= - *(si) * dirvec[0] + *(co) * norvec[0]; - vec[1]= - *(si) * dirvec[1] + *(co) * norvec[1]; - vec[2]= - *(si) * dirvec[2] + *(co) * norvec[2]; + vec[0] = -*(si) * dirvec[0] + *(co) * norvec[0]; + vec[1] = -*(si) * dirvec[1] + *(co) * norvec[1]; + vec[2] = -*(si) * dirvec[2] + *(co) * norvec[2]; madd_v3_v3v3fl(vec1, headvec, vec, head); madd_v3_v3v3fl(vec2, headvec, vec, head + dist); @@ -768,23 +768,23 @@ static void draw_sphere_bone_wire(float smat[][4], float imat[][4], ebone->length = len_v3v3(ebone->head, ebone->tail); /*length= ebone->length;*/ /*UNUSED*/ - tail= ebone->rad_tail; + tail = ebone->rad_tail; if (ebone->parent && (boneflag & BONE_CONNECTED)) - head= ebone->parent->rad_tail; + head = ebone->parent->rad_tail; else - head= ebone->rad_head; - headvec= ebone->head; - tailvec= ebone->tail; + head = ebone->rad_head; + headvec = ebone->head; + tailvec = ebone->tail; } else { /*length= pchan->bone->length;*/ /*UNUSED*/ - tail= pchan->bone->rad_tail; + tail = pchan->bone->rad_tail; if ((pchan->parent) && (boneflag & BONE_CONNECTED)) - head= pchan->parent->bone->rad_tail; + head = pchan->parent->bone->rad_tail; else - head= pchan->bone->rad_head; - headvec= pchan->pose_head; - tailvec= pchan->pose_tail; + head = pchan->bone->rad_head; + headvec = pchan->pose_head; + tailvec = pchan->pose_tail; } /* sphere root color */ @@ -796,7 +796,7 @@ static void draw_sphere_bone_wire(float smat[][4], float imat[][4], set_pchan_glColor(PCHAN_COLOR_NORMAL, boneflag, constflag); /* Draw root point if we are not connected */ - if ((boneflag & BONE_CONNECTED)==0) { + if ((boneflag & BONE_CONNECTED) == 0) { if (id != -1) glLoadName(id | BONESEL_ROOT); @@ -825,7 +825,7 @@ static void draw_sphere_bone_wire(float smat[][4], float imat[][4], /* move vector to viewspace */ mul_mat3_m4_v3(smat, dirvec); /* clear zcomp */ - dirvec[2]= 0.0f; + dirvec[2] = 0.0f; /* move vector back */ mul_mat3_m4_v3(imat, dirvec); @@ -865,35 +865,35 @@ static void draw_sphere_bone_wire(float smat[][4], float imat[][4], static void draw_sphere_bone(int dt, int armflag, int boneflag, short constflag, unsigned int id, bPoseChannel *pchan, EditBone *ebone) { - GLUquadricObj *qobj; + GLUquadricObj *qobj; float head, tail, length; float fac1, fac2; glPushMatrix(); - qobj = gluNewQuadric(); + qobj = gluNewQuadric(); /* figure out the sizes of spheres */ if (ebone) { - length= ebone->length; - tail= ebone->rad_tail; + length = ebone->length; + tail = ebone->rad_tail; if (ebone->parent && (boneflag & BONE_CONNECTED)) - head= ebone->parent->rad_tail; + head = ebone->parent->rad_tail; else - head= ebone->rad_head; + head = ebone->rad_head; } else { - length= pchan->bone->length; - tail= pchan->bone->rad_tail; + length = pchan->bone->length; + tail = pchan->bone->rad_tail; if (pchan->parent && (boneflag & BONE_CONNECTED)) - head= pchan->parent->bone->rad_tail; + head = pchan->parent->bone->rad_tail; else - head= pchan->bone->rad_head; + head = pchan->bone->rad_head; } /* move to z-axis space */ glRotatef(-90.0f, 1.0f, 0.0f, 0.0f); - if (dt==OB_SOLID) { + if (dt == OB_SOLID) { /* set up solid drawing */ glEnable(GL_COLOR_MATERIAL); glEnable(GL_LIGHTING); @@ -912,11 +912,11 @@ static void draw_sphere_bone(int dt, int armflag, int boneflag, short constflag, } else if (armflag & ARM_POSEMODE) set_pchan_glColor(PCHAN_COLOR_SPHEREBONE_END, boneflag, constflag); - else if (dt==OB_SOLID) + else if (dt == OB_SOLID) UI_ThemeColorShade(TH_BONE_SOLID, -30); /* Draw root point if we are not connected */ - if ((boneflag & BONE_CONNECTED)==0) { + if ((boneflag & BONE_CONNECTED) == 0) { if (id != -1) glLoadName(id | BONESEL_ROOT); gluSphere(qobj, head, 16, 10); @@ -945,38 +945,38 @@ static void draw_sphere_bone(int dt, int armflag, int boneflag, short constflag, else if (dt == OB_SOLID) UI_ThemeColor(TH_BONE_SOLID); - fac1= (length-head)/length; - fac2= (length-tail)/length; + fac1 = (length - head) / length; + fac2 = (length - tail) / length; - if (length > (head+tail)) { + if (length > (head + tail)) { if (id != -1) - glLoadName (id | BONESEL_BONE); + glLoadName(id | BONESEL_BONE); glEnable(GL_POLYGON_OFFSET_FILL); glPolygonOffset(-1.0f, -1.0f); glTranslatef(0.0f, 0.0f, head); - gluCylinder(qobj, fac1*head + (1.0f-fac1)*tail, fac2*tail + (1.0f-fac2)*head, length-head-tail, 16, 1); + gluCylinder(qobj, fac1 * head + (1.0f - fac1) * tail, fac2 * tail + (1.0f - fac2) * head, length - head - tail, 16, 1); glTranslatef(0.0f, 0.0f, -head); glDisable(GL_POLYGON_OFFSET_FILL); /* draw sphere on extrema */ - glTranslatef(0.0f, 0.0f, length-tail); - gluSphere(qobj, fac2*tail + (1.0f-fac2)*head, 16, 10); - glTranslatef(0.0f, 0.0f, -length+tail); + glTranslatef(0.0f, 0.0f, length - tail); + gluSphere(qobj, fac2 * tail + (1.0f - fac2) * head, 16, 10); + glTranslatef(0.0f, 0.0f, -length + tail); glTranslatef(0.0f, 0.0f, head); - gluSphere(qobj, fac1*head + (1.0f-fac1)*tail, 16, 10); + gluSphere(qobj, fac1 * head + (1.0f - fac1) * tail, 16, 10); } else { /* 1 sphere in center */ - glTranslatef(0.0f, 0.0f, (head + length-tail)/2.0f); - gluSphere(qobj, fac1*head + (1.0f-fac1)*tail, 16, 10); + glTranslatef(0.0f, 0.0f, (head + length - tail) / 2.0f); + gluSphere(qobj, fac1 * head + (1.0f - fac1) * tail, 16, 10); } /* restore */ - if (dt==OB_SOLID) { + if (dt == OB_SOLID) { glShadeModel(GL_FLAT); glDisable(GL_LIGHTING); glDisable(GL_COLOR_MATERIAL); @@ -986,11 +986,11 @@ static void draw_sphere_bone(int dt, int armflag, int boneflag, short constflag, gluDeleteQuadric(qobj); } -static GLubyte bm_dot6[]= {0x0, 0x18, 0x3C, 0x7E, 0x7E, 0x3C, 0x18, 0x0}; -static GLubyte bm_dot8[]= {0x3C, 0x7E, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x3C}; +static GLubyte bm_dot6[] = {0x0, 0x18, 0x3C, 0x7E, 0x7E, 0x3C, 0x18, 0x0}; +static GLubyte bm_dot8[] = {0x3C, 0x7E, 0xFF, 0xFF, 0xFF, 0xFF, 0x7E, 0x3C}; -static GLubyte bm_dot5[]= {0x0, 0x0, 0x10, 0x38, 0x7c, 0x38, 0x10, 0x0}; -static GLubyte bm_dot7[]= {0x0, 0x38, 0x7C, 0xFE, 0xFE, 0xFE, 0x7C, 0x38}; +static GLubyte bm_dot5[] = {0x0, 0x0, 0x10, 0x38, 0x7c, 0x38, 0x10, 0x0}; +static GLubyte bm_dot7[] = {0x0, 0x38, 0x7C, 0xFE, 0xFE, 0xFE, 0x7C, 0x38}; static void draw_line_bone(int armflag, int boneflag, short constflag, unsigned int id, @@ -1001,15 +1001,15 @@ static void draw_line_bone(int armflag, int boneflag, short constflag, unsigned glPixelStorei(GL_UNPACK_ALIGNMENT, 1); if (pchan) - length= pchan->bone->length; + length = pchan->bone->length; else - length= ebone->length; + length = ebone->length; glPushMatrix(); glScalef(length, length, length); /* this chunk not in object mode */ - if (armflag & (ARM_EDITMODE|ARM_POSEMODE)) { + if (armflag & (ARM_EDITMODE | ARM_POSEMODE)) { glLineWidth(4.0f); if (armflag & ARM_POSEMODE) set_pchan_glColor(PCHAN_COLOR_NORMAL, boneflag, constflag); @@ -1018,9 +1018,9 @@ static void draw_line_bone(int armflag, int boneflag, short constflag, unsigned } /* Draw root point if we are not connected */ - if ((boneflag & BONE_CONNECTED)==0) { - if (G.f & G_PICKSEL) { // no bitmap in selection mode, crashes 3d cards... - glLoadName (id | BONESEL_ROOT); + if ((boneflag & BONE_CONNECTED) == 0) { + if (G.f & G_PICKSEL) { // no bitmap in selection mode, crashes 3d cards... + glLoadName(id | BONESEL_ROOT); glBegin(GL_POINTS); glVertex3f(0.0f, 0.0f, 0.0f); glEnd(); @@ -1032,7 +1032,7 @@ static void draw_line_bone(int armflag, int boneflag, short constflag, unsigned } if (id != -1) - glLoadName((GLuint) id|BONESEL_BONE); + glLoadName((GLuint) id | BONESEL_BONE); glBegin(GL_LINES); glVertex3f(0.0f, 0.0f, 0.0f); @@ -1054,7 +1054,7 @@ static void draw_line_bone(int armflag, int boneflag, short constflag, unsigned /* further we send no names */ if (id != -1) - glLoadName(id & 0xFFFF); /* object tag, for bordersel optim */ + glLoadName(id & 0xFFFF); /* object tag, for bordersel optim */ if (armflag & ARM_POSEMODE) set_pchan_glColor(PCHAN_COLOR_LINEBONE, boneflag, constflag); @@ -1063,8 +1063,8 @@ static void draw_line_bone(int armflag, int boneflag, short constflag, unsigned glLineWidth(2.0); /*Draw root point if we are not connected */ - if ((boneflag & BONE_CONNECTED)==0) { - if ((G.f & G_PICKSEL)==0) { + if ((boneflag & BONE_CONNECTED) == 0) { + if ((G.f & G_PICKSEL) == 0) { /* no bitmap in selection mode, crashes 3d cards... */ if (armflag & ARM_EDITMODE) { if (boneflag & BONE_ROOTSEL) UI_ThemeColor(TH_VERTEX_SELECT); @@ -1085,7 +1085,7 @@ static void draw_line_bone(int armflag, int boneflag, short constflag, unsigned glEnd(); /* tip */ - if ((G.f & G_PICKSEL)==0) { + if ((G.f & G_PICKSEL) == 0) { /* no bitmap in selection mode, crashes 3d cards... */ if (armflag & ARM_EDITMODE) { if (boneflag & BONE_TIPSEL) UI_ThemeColor(TH_VERTEX_SELECT); @@ -1102,27 +1102,27 @@ static void draw_line_bone(int armflag, int boneflag, short constflag, unsigned static void draw_b_bone_boxes(int dt, bPoseChannel *pchan, float xwidth, float length, float zwidth) { - int segments= 0; + int segments = 0; if (pchan) - segments= pchan->bone->segments; + segments = pchan->bone->segments; if ((segments > 1) && (pchan)) { - float dlen= length/(float)segments; - Mat4 *bbone= b_bone_spline_setup(pchan, 0); + float dlen = length / (float)segments; + Mat4 *bbone = b_bone_spline_setup(pchan, 0); int a; - for (a=0; amat); - if (dt==OB_SOLID) drawsolidcube_size(xwidth, dlen, zwidth); + if (dt == OB_SOLID) drawsolidcube_size(xwidth, dlen, zwidth); else drawcube_size(xwidth, dlen, zwidth); glPopMatrix(); } } else { glPushMatrix(); - if (dt==OB_SOLID) drawsolidcube_size(xwidth, length, zwidth); + if (dt == OB_SOLID) drawsolidcube_size(xwidth, length, zwidth); else drawcube_size(xwidth, length, zwidth); glPopMatrix(); } @@ -1134,14 +1134,14 @@ static void draw_b_bone(int dt, int armflag, int boneflag, short constflag, unsi float xwidth, length, zwidth; if (pchan) { - xwidth= pchan->bone->xwidth; - length= pchan->bone->length; - zwidth= pchan->bone->zwidth; + xwidth = pchan->bone->xwidth; + length = pchan->bone->length; + zwidth = pchan->bone->zwidth; } else { - xwidth= ebone->xwidth; - length= ebone->length; - zwidth= ebone->zwidth; + xwidth = ebone->xwidth; + length = ebone->length; + zwidth = ebone->zwidth; } /* draw points only if... */ @@ -1151,7 +1151,7 @@ static void draw_b_bone(int dt, int armflag, int boneflag, short constflag, unsi glScalef(length, length, length); draw_bone_points(dt, armflag, boneflag, id); glPopMatrix(); - length*= 0.95f; // make vertices visible + length *= 0.95f; // make vertices visible } /* colors for modes */ @@ -1162,7 +1162,7 @@ static void draw_b_bone(int dt, int armflag, int boneflag, short constflag, unsi set_pchan_glColor(PCHAN_COLOR_SOLID, boneflag, constflag); } else if (armflag & ARM_EDITMODE) { - if (dt==OB_WIRE) { + if (dt == OB_WIRE) { set_ebone_glColor(boneflag); } else @@ -1170,7 +1170,7 @@ static void draw_b_bone(int dt, int armflag, int boneflag, short constflag, unsi } if (id != -1) { - glLoadName ((GLuint) id|BONESEL_BONE); + glLoadName((GLuint) id | BONESEL_BONE); } /* set up solid drawing */ @@ -1214,11 +1214,11 @@ static void draw_b_bone(int dt, int armflag, int boneflag, short constflag, unsi static void draw_wire_bone_segments(bPoseChannel *pchan, Mat4 *bbones, float length, int segments) { if ((segments > 1) && (pchan)) { - float dlen= length/(float)segments; + float dlen = length / (float)segments; Mat4 *bbone = bbones; int a; - for (a=0; amat); @@ -1250,14 +1250,14 @@ static void draw_wire_bone(int dt, int armflag, int boneflag, short constflag, u float length; if (pchan) { - segments= pchan->bone->segments; - length= pchan->bone->length; + segments = pchan->bone->segments; + length = pchan->bone->length; if (segments > 1) bbones = b_bone_spline_setup(pchan, 0); } else - length= ebone->length; + length = ebone->length; /* draw points only if... */ if (armflag & ARM_EDITMODE) { @@ -1266,19 +1266,19 @@ static void draw_wire_bone(int dt, int armflag, int boneflag, short constflag, u glScalef(length, length, length); draw_bone_points(dt, armflag, boneflag, id); glPopMatrix(); - length *= 0.95f; // make vertices visible + length *= 0.95f; // make vertices visible } /* this chunk not in object mode */ - if (armflag & (ARM_EDITMODE|ARM_POSEMODE)) { + if (armflag & (ARM_EDITMODE | ARM_POSEMODE)) { if (id != -1) - glLoadName((GLuint) id|BONESEL_BONE); + glLoadName((GLuint) id | BONESEL_BONE); draw_wire_bone_segments(pchan, bbones, length, segments); /* further we send no names */ if (id != -1) - glLoadName(id & 0xFFFF); /* object tag, for bordersel optim */ + glLoadName(id & 0xFFFF); /* object tag, for bordersel optim */ } /* colors for modes */ @@ -1321,7 +1321,7 @@ static void draw_bone(int dt, int armflag, int boneflag, short constflag, unsign /* now draw the bone itself */ if (id != -1) { - glLoadName((GLuint) id|BONESEL_BONE); + glLoadName((GLuint) id | BONESEL_BONE); } /* wire? */ @@ -1366,7 +1366,7 @@ static void draw_bone(int dt, int armflag, int boneflag, short constflag, unsign static void draw_custom_bone(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob, int dt, int armflag, int boneflag, unsigned int id, float length) { - if (ob==NULL) return; + if (ob == NULL) return; glScalef(length, length, length); @@ -1376,7 +1376,7 @@ static void draw_custom_bone(Scene *scene, View3D *v3d, RegionView3D *rv3d, Obje } if (id != -1) { - glLoadName((GLuint) id|BONESEL_BONE); + glLoadName((GLuint) id | BONESEL_BONE); } draw_object_instance(scene, v3d, rv3d, ob, dt, armflag & ARM_POSEMODE); @@ -1388,15 +1388,15 @@ static void pchan_draw_IK_root_lines(bPoseChannel *pchan, short only_temp) bConstraint *con; bPoseChannel *parchan; - for (con= pchan->constraints.first; con; con= con->next) { + for (con = pchan->constraints.first; con; con = con->next) { if (con->enforce == 0.0f) continue; switch (con->type) { case CONSTRAINT_TYPE_KINEMATIC: { - bKinematicConstraint *data = (bKinematicConstraint*)con->data; - int segcount= 0; + bKinematicConstraint *data = (bKinematicConstraint *)con->data; + int segcount = 0; /* if only_temp, only draw if it is a temporary ik-chain */ if ((only_temp) && !(data->flag & CONSTRAINT_IK_TEMP)) @@ -1406,18 +1406,18 @@ static void pchan_draw_IK_root_lines(bPoseChannel *pchan, short only_temp) glBegin(GL_LINES); /* exclude tip from chain? */ - if ((data->flag & CONSTRAINT_IK_TIP)==0) - parchan= pchan->parent; + if ((data->flag & CONSTRAINT_IK_TIP) == 0) + parchan = pchan->parent; else - parchan= pchan; + parchan = pchan; glVertex3fv(parchan->pose_tail); /* Find the chain's root */ while (parchan->parent) { segcount++; - if (segcount==data->rootbone || segcount>255) break; // 255 is weak - parchan= parchan->parent; + if (segcount == data->rootbone || segcount > 255) break; // 255 is weak + parchan = parchan->parent; } if (parchan) glVertex3fv(parchan->pose_head); @@ -1425,24 +1425,24 @@ static void pchan_draw_IK_root_lines(bPoseChannel *pchan, short only_temp) glEnd(); setlinestyle(0); } - break; + break; case CONSTRAINT_TYPE_SPLINEIK: { - bSplineIKConstraint *data = (bSplineIKConstraint*)con->data; - int segcount= 0; + bSplineIKConstraint *data = (bSplineIKConstraint *)con->data; + int segcount = 0; setlinestyle(3); glBegin(GL_LINES); - parchan= pchan; + parchan = pchan; glVertex3fv(parchan->pose_tail); /* Find the chain's root */ while (parchan->parent) { segcount++; // FIXME: revise the breaking conditions - if (segcount==data->chainlen || segcount>255) break; // 255 is weak - parchan= parchan->parent; + if (segcount == data->chainlen || segcount > 255) break; // 255 is weak + parchan = parchan->parent; } if (parchan) // XXX revise the breaking conditions to only stop at the tail? glVertex3fv(parchan->pose_head); @@ -1450,7 +1450,7 @@ static void pchan_draw_IK_root_lines(bPoseChannel *pchan, short only_temp) glEnd(); setlinestyle(0); } - break; + break; } } } @@ -1459,12 +1459,12 @@ static void bgl_sphere_project(float ax, float az) { float dir[3], sine, q3; - sine= 1.0f - ax*ax - az*az; - q3= (sine < 0.0f)? 0.0f: (float)(2.0*sqrt(sine)); + sine = 1.0f - ax * ax - az * az; + q3 = (sine < 0.0f) ? 0.0f : (float)(2.0 * sqrt(sine)); - dir[0]= -az*q3; - dir[1]= 1.0f - 2.0f*sine; - dir[2]= ax*q3; + dir[0] = -az * q3; + dir[1] = 1.0f - 2.0f * sine; + dir[2] = ax * q3; glVertex3fv(dir); } @@ -1479,7 +1479,7 @@ static void draw_dof_ellipse(float ax, float az) 0.994521895368f, 1.0f }; - int i, j, n=16; + int i, j, n = 16; float x, z, px, pz; glEnable(GL_BLEND); @@ -1488,33 +1488,33 @@ static void draw_dof_ellipse(float ax, float az) glColor4ub(70, 70, 70, 50); glBegin(GL_QUADS); - pz= 0.0f; - for (i=1; idata; + bArmature *arm = ob->data; bPoseChannel *pchan; Bone *bone; - for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) { - bone= pchan->bone; + for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { + bone = pchan->bone; - if ( (bone) && !(bone->flag & (BONE_HIDDEN_P|BONE_HIDDEN_PG))) { + if ( (bone) && !(bone->flag & (BONE_HIDDEN_P | BONE_HIDDEN_PG))) { if (bone->flag & BONE_SELECTED) { if (bone->layer & arm->layer) { - if (pchan->ikflag & (BONE_IK_XLIMIT|BONE_IK_ZLIMIT)) { + if (pchan->ikflag & (BONE_IK_XLIMIT | BONE_IK_ZLIMIT)) { if (ED_pose_channel_in_IK_chain(ob, pchan)) { float corner[4][3], posetrans[3], mat[4][4]; - float phi=0.0f, theta=0.0f, scale; + float phi = 0.0f, theta = 0.0f, scale; int a, i; /* in parent-bone pose, but own restspace */ @@ -1555,24 +1555,24 @@ static void draw_pose_dofs(Object *ob) if (pchan->parent) { copy_m4_m4(mat, pchan->parent->pose_mat); - mat[3][0]= mat[3][1]= mat[3][2]= 0.0f; + mat[3][0] = mat[3][1] = mat[3][2] = 0.0f; glMultMatrixf(mat); } copy_m4_m3(mat, pchan->bone->bone_mat); glMultMatrixf(mat); - scale= bone->length*pchan->size[1]; + scale = bone->length * pchan->size[1]; glScalef(scale, scale, scale); if (pchan->ikflag & BONE_IK_XLIMIT) { if (pchan->ikflag & BONE_IK_ZLIMIT) { float amin[3], amax[3]; - for (i=0; i<3; i++) { + for (i = 0; i < 3; i++) { /* *0.5f here comes from M_PI/360.0f when rotations were still in degrees */ - amin[i]= (float)sin(pchan->limitmin[i]*0.5f); - amax[i]= (float)sin(pchan->limitmax[i]*0.5f); + amin[i] = (float)sin(pchan->limitmin[i] * 0.5f); + amax[i] = (float)sin(pchan->limitmax[i] * 0.5f); } glScalef(1.0f, -1.0f, 1.0f); @@ -1591,21 +1591,21 @@ static void draw_pose_dofs(Object *ob) /* arcs */ if (pchan->ikflag & BONE_IK_ZLIMIT) { /* OpenGL requires rotations in degrees; so we're taking the average angle here */ - theta= RAD2DEGF(0.5f * (pchan->limitmin[2]+pchan->limitmax[2])); + theta = RAD2DEGF(0.5f * (pchan->limitmin[2] + pchan->limitmax[2])); glRotatef(theta, 0.0f, 0.0f, 1.0f); - glColor3ub(50, 50, 255); // blue, Z axis limit + glColor3ub(50, 50, 255); // blue, Z axis limit glBegin(GL_LINE_STRIP); - for (a=-16; a<=16; a++) { + for (a = -16; a <= 16; a++) { /* *0.5f here comes from M_PI/360.0f when rotations were still in degrees */ - float fac= ((float)a)/16.0f * 0.5f; + float fac = ((float)a) / 16.0f * 0.5f; - phi= fac * (pchan->limitmax[2] - pchan->limitmin[2]); + phi = fac * (pchan->limitmax[2] - pchan->limitmin[2]); - i= (a == -16) ? 0 : 1; - corner[i][0]= (float)sin(phi); - corner[i][1]= (float)cos(phi); - corner[i][2]= 0.0f; + i = (a == -16) ? 0 : 1; + corner[i][0] = (float)sin(phi); + corner[i][1] = (float)cos(phi); + corner[i][2] = 0.0f; glVertex3fv(corner[i]); } glEnd(); @@ -1615,20 +1615,20 @@ static void draw_pose_dofs(Object *ob) if (pchan->ikflag & BONE_IK_XLIMIT) { /* OpenGL requires rotations in degrees; so we're taking the average angle here */ - theta= RAD2DEGF(0.5f * (pchan->limitmin[0] + pchan->limitmax[0])); + theta = RAD2DEGF(0.5f * (pchan->limitmin[0] + pchan->limitmax[0])); glRotatef(theta, 1.0f, 0.0f, 0.0f); - glColor3ub(255, 50, 50); // Red, X axis limit + glColor3ub(255, 50, 50); // Red, X axis limit glBegin(GL_LINE_STRIP); - for (a=-16; a<=16; a++) { + for (a = -16; a <= 16; a++) { /* *0.5f here comes from M_PI/360.0f when rotations were still in degrees */ - float fac= ((float)a)/16.0f * 0.5f; - phi= (float)(0.5*M_PI) + fac * (pchan->limitmax[0] - pchan->limitmin[0]); + float fac = ((float)a) / 16.0f * 0.5f; + phi = (float)(0.5 * M_PI) + fac * (pchan->limitmax[0] - pchan->limitmin[0]); - i= (a == -16) ? 2 : 3; - corner[i][0]= 0.0f; - corner[i][1]= (float)sin(phi); - corner[i][2]= (float)cos(phi); + i = (a == -16) ? 2 : 3; + corner[i][0] = 0.0f; + corner[i][1] = (float)sin(phi); + corner[i][2] = (float)cos(phi); glVertex3fv(corner[i]); } glEnd(); @@ -1659,19 +1659,19 @@ static void bone_matrix_translate_y(float mat[][4], float y) static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, int dt, const short is_ghost, const short is_outline) { - RegionView3D *rv3d= ar->regiondata; - Object *ob= base->object; - bArmature *arm= ob->data; + RegionView3D *rv3d = ar->regiondata; + Object *ob = base->object; + bArmature *arm = ob->data; bPoseChannel *pchan; Bone *bone; GLfloat tmp; float smat[4][4], imat[4][4], bmat[4][4]; - int index= -1; - short do_dashed= 3, draw_wire= 0; + int index = -1; + short do_dashed = 3, draw_wire = 0; int flag; /* being set below */ - arm->layer_used= 0; + arm->layer_used = 0; /* hacky... prevent outline select from drawing dashed helplines */ glGetFloatv(GL_LINE_WIDTH, &tmp); @@ -1679,10 +1679,10 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, if (v3d->flag & V3D_HIDE_HELPLINES) do_dashed &= ~2; /* precalc inverse matrix for drawing screen aligned */ - if (arm->drawtype==ARM_ENVELOPE) { + if (arm->drawtype == ARM_ENVELOPE) { /* precalc inverse matrix for drawing screen aligned */ copy_m4_m4(smat, rv3d->viewmatob); - mul_mat3_m4_fl(smat, 1.0f/len_v3(ob->obmat[0])); + mul_mat3_m4_fl(smat, 1.0f / len_v3(ob->obmat[0])); invert_m4_m4(imat, smat); /* and draw blended distances */ @@ -1692,14 +1692,14 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, if (v3d->zbuf) glDisable(GL_DEPTH_TEST); - for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) { - bone= pchan->bone; + for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { + bone = pchan->bone; if (bone) { /* 1) bone must be visible, 2) for OpenGL select-drawing cannot have unselectable [#27194] * NOTE: this is the only case with NO_DEFORM==0 flag, as this is for envelope influence drawing */ - if ( (bone->flag & (BONE_HIDDEN_P|BONE_NO_DEFORM|BONE_HIDDEN_PG))==0 && - ((G.f & G_PICKSEL)==0 || (bone->flag & BONE_UNSELECTABLE)==0) ) + if ( (bone->flag & (BONE_HIDDEN_P | BONE_NO_DEFORM | BONE_HIDDEN_PG)) == 0 && + ((G.f & G_PICKSEL) == 0 || (bone->flag & BONE_UNSELECTABLE) == 0) ) { if (bone->flag & (BONE_SELECTED)) { if (bone->layer & arm->layer) @@ -1722,15 +1722,15 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, /* if solid we draw that first, with selection codes, but without names, axes etc */ if (dt > OB_WIRE) { if (arm->flag & ARM_POSEMODE) - index= base->selcol; + index = base->selcol; - for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) { - bone= pchan->bone; + for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { + bone = pchan->bone; arm->layer_used |= bone->layer; /* 1) bone must be visible, 2) for OpenGL select-drawing cannot have unselectable [#27194] */ - if ( (bone->flag & (BONE_HIDDEN_P|BONE_HIDDEN_PG))==0 && - ((G.f & G_PICKSEL)==0 || (bone->flag & BONE_UNSELECTABLE)==0) ) + if ( (bone->flag & (BONE_HIDDEN_P | BONE_HIDDEN_PG)) == 0 && + ((G.f & G_PICKSEL) == 0 || (bone->flag & BONE_UNSELECTABLE) == 0) ) { if (bone->layer & arm->layer) { int use_custom = (pchan->custom) && !(arm->flag & ARM_NO_CUSTOM); @@ -1744,8 +1744,8 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, } /* catch exception for bone with hidden parent */ - flag= bone->flag; - if ( (bone->parent) && (bone->parent->flag & (BONE_HIDDEN_P|BONE_HIDDEN_PG)) ) + flag = bone->flag; + if ( (bone->parent) && (bone->parent->flag & (BONE_HIDDEN_P | BONE_HIDDEN_PG)) ) flag &= ~BONE_CONNECTED; /* set temporary flag for drawing bone as active, but only if selected */ @@ -1758,7 +1758,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, if (use_custom) { /* if drawwire, don't try to draw in solid */ if (pchan->bone->flag & BONE_DRAWWIRE) { - draw_wire= 1; + draw_wire = 1; } else { draw_custom_bone(scene, v3d, rv3d, pchan->custom, @@ -1785,34 +1785,34 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, } } - if (index!= -1) - index+= 0x10000; // pose bones count in higher 2 bytes only + if (index != -1) + index += 0x10000; // pose bones count in higher 2 bytes only } /* very very confusing... but in object mode, solid draw, we cannot do glLoadName yet, * stick bones and/or wire custom-shapes are drawn in next loop */ - if (ELEM(arm->drawtype,ARM_LINE,ARM_WIRE)==0 && (draw_wire == 0)) { + if (ELEM(arm->drawtype, ARM_LINE, ARM_WIRE) == 0 && (draw_wire == 0)) { /* object tag, for bordersel optim */ glLoadName(index & 0xFFFF); - index= -1; + index = -1; } } /* draw custom bone shapes as wireframes */ - if ( !(arm->flag & ARM_NO_CUSTOM) && - ((draw_wire) || (dt <= OB_WIRE)) ) + if (!(arm->flag & ARM_NO_CUSTOM) && + ((draw_wire) || (dt <= OB_WIRE)) ) { if (arm->flag & ARM_POSEMODE) - index= base->selcol; + index = base->selcol; /* only draw custom bone shapes that need to be drawn as wires */ - for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) { - bone= pchan->bone; + for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { + bone = pchan->bone; /* 1) bone must be visible, 2) for OpenGL select-drawing cannot have unselectable [#27194] */ - if ( (bone->flag & (BONE_HIDDEN_P|BONE_HIDDEN_PG))==0 && - ((G.f & G_PICKSEL)==0 || (bone->flag & BONE_UNSELECTABLE)==0) ) + if ( (bone->flag & (BONE_HIDDEN_P | BONE_HIDDEN_PG)) == 0 && + ((G.f & G_PICKSEL) == 0 || (bone->flag & BONE_UNSELECTABLE) == 0) ) { if (bone->layer & arm->layer) { if (pchan->custom) { @@ -1833,19 +1833,19 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, else if (arm->flag & ARM_POSEMODE) set_pchan_colorset(ob, pchan); else { - if ((scene->basact)==base) { - if (base->flag & (SELECT+BA_WAS_SEL)) UI_ThemeColor(TH_ACTIVE); + if ((scene->basact) == base) { + if (base->flag & (SELECT + BA_WAS_SEL)) UI_ThemeColor(TH_ACTIVE); else UI_ThemeColor(TH_WIRE); } else { - if (base->flag & (SELECT+BA_WAS_SEL)) UI_ThemeColor(TH_SELECT); + if (base->flag & (SELECT + BA_WAS_SEL)) UI_ThemeColor(TH_SELECT); else UI_ThemeColor(TH_WIRE); } } /* catch exception for bone with hidden parent */ - flag= bone->flag; - if ((bone->parent) && (bone->parent->flag & (BONE_HIDDEN_P|BONE_HIDDEN_PG))) + flag = bone->flag; + if ((bone->parent) && (bone->parent->flag & (BONE_HIDDEN_P | BONE_HIDDEN_PG))) flag &= ~BONE_CONNECTED; /* set temporary flag for drawing bone as active, but only if selected */ @@ -1862,13 +1862,13 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, } if (index != -1) - index+= 0x10000; // pose bones count in higher 2 bytes only + index += 0x10000; // pose bones count in higher 2 bytes only } /* stick or wire bones have not been drawn yet so don't clear object selection in this case */ - if (ELEM(arm->drawtype, ARM_LINE, ARM_WIRE)==0 && draw_wire) { + if (ELEM(arm->drawtype, ARM_LINE, ARM_WIRE) == 0 && draw_wire) { /* object tag, for bordersel optim */ glLoadName(index & 0xFFFF); - index= -1; + index = -1; } } @@ -1877,7 +1877,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, /* draw line check first. we do selection indices */ if (ELEM(arm->drawtype, ARM_LINE, ARM_WIRE)) { if (arm->flag & ARM_POSEMODE) - index= base->selcol; + index = base->selcol; } /* if solid && posemode, we draw again with polygonoffset */ else if ((dt > OB_WIRE) && (arm->flag & ARM_POSEMODE)) { @@ -1886,26 +1886,26 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, else { /* and we use selection indices if not done yet */ if (arm->flag & ARM_POSEMODE) - index= base->selcol; + index = base->selcol; } - for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) { - bone= pchan->bone; + for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { + bone = pchan->bone; arm->layer_used |= bone->layer; /* 1) bone must be visible, 2) for OpenGL select-drawing cannot have unselectable [#27194] */ - if ( (bone->flag & (BONE_HIDDEN_P|BONE_HIDDEN_PG))==0 && - ((G.f & G_PICKSEL)==0 || (bone->flag & BONE_UNSELECTABLE)==0) ) + if ( (bone->flag & (BONE_HIDDEN_P | BONE_HIDDEN_PG)) == 0 && + ((G.f & G_PICKSEL) == 0 || (bone->flag & BONE_UNSELECTABLE) == 0) ) { if (bone->layer & arm->layer) { - const short constflag= pchan->constflag; + const short constflag = pchan->constflag; if ((do_dashed & 1) && (pchan->parent)) { /* Draw a line from our root to the parent's tip * - only if V3D_HIDE_HELPLINES is enabled... */ - if ( (do_dashed & 2) && ((bone->flag & BONE_CONNECTED)==0) ) { + if ( (do_dashed & 2) && ((bone->flag & BONE_CONNECTED) == 0) ) { if (arm->flag & ARM_POSEMODE) { - glLoadName(index & 0xFFFF); // object tag, for bordersel optim + glLoadName(index & 0xFFFF); // object tag, for bordersel optim UI_ThemeColor(TH_WIRE); } setlinestyle(3); @@ -1917,13 +1917,13 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, } /* Draw a line to IK root bone - * - only if temporary chain (i.e. "autoik") + * - only if temporary chain (i.e. "autoik") */ if (arm->flag & ARM_POSEMODE) { if (constflag & PCHAN_HAS_IK) { if (bone->flag & BONE_SELECTED) { if (constflag & PCHAN_HAS_TARGET) glColor3ub(200, 120, 0); - else glColor3ub(200, 200, 50); // add theme! + else glColor3ub(200, 200, 50); // add theme! glLoadName(index & 0xFFFF); pchan_draw_IK_root_lines(pchan, !(do_dashed & 2)); @@ -1931,7 +1931,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, } else if (constflag & PCHAN_HAS_SPLINEIK) { if (bone->flag & BONE_SELECTED) { - glColor3ub(150, 200, 50); // add theme! + glColor3ub(150, 200, 50); // add theme! glLoadName(index & 0xFFFF); pchan_draw_IK_root_lines(pchan, !(do_dashed & 2)); @@ -1945,8 +1945,8 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, glMultMatrixf(pchan->pose_mat); /* catch exception for bone with hidden parent */ - flag= bone->flag; - if ((bone->parent) && (bone->parent->flag & (BONE_HIDDEN_P|BONE_HIDDEN_PG))) + flag = bone->flag; + if ((bone->parent) && (bone->parent->flag & (BONE_HIDDEN_P | BONE_HIDDEN_PG))) flag &= ~BONE_CONNECTED; /* set temporary flag for drawing bone as active, but only if selected */ @@ -1961,15 +1961,15 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, if ((pchan->custom) && !(arm->flag & ARM_NO_CUSTOM)) { /* custom bone shapes should not be drawn here! */ } - else if (arm->drawtype==ARM_ENVELOPE) { + else if (arm->drawtype == ARM_ENVELOPE) { if (dt < OB_SOLID) draw_sphere_bone_wire(smat, imat, arm->flag, flag, constflag, index, pchan, NULL); } - else if (arm->drawtype==ARM_LINE) + else if (arm->drawtype == ARM_LINE) draw_line_bone(arm->flag, flag, constflag, index, pchan, NULL); - else if (arm->drawtype==ARM_WIRE) + else if (arm->drawtype == ARM_WIRE) draw_wire_bone(dt, arm->flag, flag, constflag, index, pchan, NULL); - else if (arm->drawtype==ARM_B_BONE) + else if (arm->drawtype == ARM_B_BONE) draw_b_bone(OB_WIRE, arm->flag, flag, constflag, index, pchan, NULL); else draw_bone(OB_WIRE, arm->flag, flag, constflag, index, bone->length); @@ -1980,10 +1980,10 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, /* pose bones count in higher 2 bytes only */ if (index != -1) - index+= 0x10000; + index += 0x10000; } /* restore things */ - if (!ELEM(arm->drawtype, ARM_WIRE, ARM_LINE) && (dt>OB_WIRE) && (arm->flag & ARM_POSEMODE)) + if (!ELEM(arm->drawtype, ARM_WIRE, ARM_LINE) && (dt > OB_WIRE) && (arm->flag & ARM_POSEMODE)) bglPolygonOffset(rv3d->dist, 0.0); } @@ -1995,7 +1995,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, draw_pose_dofs(ob); /* finally names and axes */ - if ((arm->flag & (ARM_DRAWNAMES|ARM_DRAWAXES)) && (is_outline == 0)) { + if ((arm->flag & (ARM_DRAWNAMES | ARM_DRAWAXES)) && (is_outline == 0)) { /* patch for several 3d cards (IBM mostly) that crash on glSelect with text drawing */ if ((G.f & G_PICKSEL) == 0) { float vec[3]; @@ -2004,22 +2004,22 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, float col_f[4]; glGetFloatv(GL_CURRENT_COLOR, col_f); /* in case this is not set below */ rgb_float_to_uchar(col, col_f); - col[3]= 255; + col[3] = 255; if (v3d->zbuf) glDisable(GL_DEPTH_TEST); - for (pchan=ob->pose->chanbase.first; pchan; pchan=pchan->next) { - if ((pchan->bone->flag & (BONE_HIDDEN_P|BONE_HIDDEN_PG))==0) { + for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { + if ((pchan->bone->flag & (BONE_HIDDEN_P | BONE_HIDDEN_PG)) == 0) { if (pchan->bone->layer & arm->layer) { - if (arm->flag & (ARM_EDITMODE|ARM_POSEMODE)) { - bone= pchan->bone; + if (arm->flag & (ARM_EDITMODE | ARM_POSEMODE)) { + bone = pchan->bone; UI_GetThemeColor3ubv((bone->flag & BONE_SELECTED) ? TH_TEXT_HI : TH_TEXT, col); } else if (dt > OB_WIRE) { UI_GetThemeColor3ubv(TH_TEXT, col); } - /* Draw names of bone */ + /* Draw names of bone */ if (arm->flag & ARM_DRAWNAMES) { mid_v3_v3v3(vec, pchan->pose_head, pchan->pose_tail); view3d_cached_text_draw_add(vec, pchan->name, 10, 0, col); @@ -2033,7 +2033,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, glMultMatrixf(bmat); glColor3ubv(col); - drawaxes(pchan->bone->length*0.25f, OB_ARROWS); + drawaxes(pchan->bone->length * 0.25f, OB_ARROWS); glPopMatrix(); } @@ -2049,13 +2049,13 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, /* in editmode, we don't store the bone matrix... */ static void get_matrix_editbone(EditBone *eBone, float bmat[][4]) { - float delta[3]; - float mat[3][3]; + float delta[3]; + float mat[3][3]; /* Compose the parent transforms (i.e. their translations) */ sub_v3_v3v3(delta, eBone->tail, eBone->head); - eBone->length = (float)sqrt(delta[0]*delta[0] + delta[1]*delta[1] +delta[2]*delta[2]); + eBone->length = (float)sqrt(delta[0] * delta[0] + delta[1] * delta[1] + delta[2] * delta[2]); vec_roll_to_mat3(delta, eBone->roll, mat); copy_m4_m3(bmat, mat); @@ -2065,21 +2065,21 @@ static void get_matrix_editbone(EditBone *eBone, float bmat[][4]) static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, int dt) { - RegionView3D *rv3d= ar->regiondata; + RegionView3D *rv3d = ar->regiondata; EditBone *eBone; - bArmature *arm= ob->data; + bArmature *arm = ob->data; float smat[4][4], imat[4][4], bmat[4][4]; unsigned int index; int flag; /* being set in code below */ - arm->layer_used= 0; + arm->layer_used = 0; /* envelope (deform distance) */ - if (arm->drawtype==ARM_ENVELOPE) { + if (arm->drawtype == ARM_ENVELOPE) { /* precalc inverse matrix for drawing screen aligned */ copy_m4_m4(smat, rv3d->viewmatob); - mul_mat3_m4_fl(smat, 1.0f/len_v3(ob->obmat[0])); + mul_mat3_m4_fl(smat, 1.0f / len_v3(ob->obmat[0])); invert_m4_m4(imat, smat); /* and draw blended distances */ @@ -2088,10 +2088,10 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, int dt) if (v3d->zbuf) glDisable(GL_DEPTH_TEST); - for (eBone=arm->edbo->first; eBone; eBone=eBone->next) { + for (eBone = arm->edbo->first; eBone; eBone = eBone->next) { if (eBone->layer & arm->layer) { - if ((eBone->flag & (BONE_HIDDEN_A|BONE_NO_DEFORM))==0) { - if (eBone->flag & (BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL)) + if ((eBone->flag & (BONE_HIDDEN_A | BONE_NO_DEFORM)) == 0) { + if (eBone->flag & (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL)) draw_sphere_bone_dist(smat, imat, NULL, eBone); } } @@ -2104,15 +2104,15 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, int dt) /* if solid we draw it first */ if ((dt > OB_WIRE) && (arm->drawtype != ARM_LINE)) { - for (eBone=arm->edbo->first, index=0; eBone; eBone=eBone->next, index++) { + for (eBone = arm->edbo->first, index = 0; eBone; eBone = eBone->next, index++) { if (eBone->layer & arm->layer) { - if ((eBone->flag & BONE_HIDDEN_A)==0) { + if ((eBone->flag & BONE_HIDDEN_A) == 0) { glPushMatrix(); get_matrix_editbone(eBone, bmat); glMultMatrixf(bmat); /* catch exception for bone with hidden parent */ - flag= eBone->flag; + flag = eBone->flag; if ( (eBone->parent) && !EBONE_VISIBLE(arm, eBone->parent)) flag &= ~BONE_CONNECTED; @@ -2120,11 +2120,11 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, int dt) if (eBone == arm->act_edbone) flag |= BONE_DRAW_ACTIVE; - if (arm->drawtype==ARM_ENVELOPE) + if (arm->drawtype == ARM_ENVELOPE) draw_sphere_bone(OB_SOLID, arm->flag, flag, 0, index, NULL, eBone); - else if (arm->drawtype==ARM_B_BONE) + else if (arm->drawtype == ARM_B_BONE) draw_b_bone(OB_SOLID, arm->flag, flag, 0, index, NULL, eBone); - else if (arm->drawtype==ARM_WIRE) + else if (arm->drawtype == ARM_WIRE) draw_wire_bone(OB_SOLID, arm->flag, flag, 0, index, NULL, eBone); else { draw_bone(OB_SOLID, arm->flag, flag, 0, index, eBone->length); @@ -2137,24 +2137,24 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, int dt) } /* if wire over solid, set offset */ - index= -1; + index = -1; glLoadName(-1); if (ELEM(arm->drawtype, ARM_LINE, ARM_WIRE)) { if (G.f & G_PICKSEL) - index= 0; + index = 0; } else if (dt > OB_WIRE) bglPolygonOffset(rv3d->dist, 1.0f); else if (arm->flag & ARM_EDITMODE) - index= 0; /* do selection codes */ + index = 0; /* do selection codes */ - for (eBone=arm->edbo->first; eBone; eBone=eBone->next) { + for (eBone = arm->edbo->first; eBone; eBone = eBone->next) { arm->layer_used |= eBone->layer; if (eBone->layer & arm->layer) { - if ((eBone->flag & BONE_HIDDEN_A)==0) { + if ((eBone->flag & BONE_HIDDEN_A) == 0) { /* catch exception for bone with hidden parent */ - flag= eBone->flag; + flag = eBone->flag; if ( (eBone->parent) && !EBONE_VISIBLE(arm, eBone->parent)) flag &= ~BONE_CONNECTED; @@ -2173,7 +2173,7 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, int dt) if (arm->drawtype == ARM_LINE) draw_line_bone(arm->flag, flag, 0, index, NULL, eBone); - else if (arm->drawtype==ARM_WIRE) + else if (arm->drawtype == ARM_WIRE) draw_wire_bone(OB_WIRE, arm->flag, flag, 0, index, NULL, eBone); else if (arm->drawtype == ARM_B_BONE) draw_b_bone(OB_WIRE, arm->flag, flag, 0, index, NULL, eBone); @@ -2186,7 +2186,7 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, int dt) /* offset to parent */ if (eBone->parent) { UI_ThemeColor(TH_WIRE); - glLoadName (-1); // -1 here is OK! + glLoadName(-1); // -1 here is OK! setlinestyle(3); glBegin(GL_LINES); @@ -2198,27 +2198,27 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, int dt) } } } - if (index!=-1) index++; + if (index != -1) index++; } /* restore */ - if (index!=-1) glLoadName(-1); - if (ELEM(arm->drawtype,ARM_LINE,ARM_WIRE)); - else if (dt>OB_WIRE) bglPolygonOffset(rv3d->dist, 0.0f); + if (index != -1) glLoadName(-1); + if (ELEM(arm->drawtype, ARM_LINE, ARM_WIRE)) ; + else if (dt > OB_WIRE) bglPolygonOffset(rv3d->dist, 0.0f); /* finally names and axes */ - if (arm->flag & (ARM_DRAWNAMES|ARM_DRAWAXES)) { + if (arm->flag & (ARM_DRAWNAMES | ARM_DRAWAXES)) { // patch for several 3d cards (IBM mostly) that crash on glSelect with text drawing if ((G.f & G_PICKSEL) == 0) { float vec[3]; unsigned char col[4]; - col[3]= 255; + col[3] = 255; if (v3d->zbuf) glDisable(GL_DEPTH_TEST); - for (eBone=arm->edbo->first; eBone; eBone=eBone->next) { + for (eBone = arm->edbo->first; eBone; eBone = eBone->next) { if (eBone->layer & arm->layer) { - if ((eBone->flag & BONE_HIDDEN_A)==0) { + if ((eBone->flag & BONE_HIDDEN_A) == 0) { UI_GetThemeColor3ubv((eBone->flag & BONE_SELECTED) ? TH_TEXT_HI : TH_TEXT, col); @@ -2236,7 +2236,7 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, int dt) glMultMatrixf(bmat); glColor3ubv(col); - drawaxes(eBone->length*0.25f, OB_ARROWS); + drawaxes(eBone->length * 0.25f, OB_ARROWS); glPopMatrix(); } @@ -2259,15 +2259,15 @@ static void draw_ebones(View3D *v3d, ARegion *ar, Object *ob, int dt) */ static void draw_pose_paths(Scene *scene, View3D *v3d, ARegion *ar, Object *ob) { - bAnimVizSettings *avs= &ob->pose->avs; - bArmature *arm= ob->data; + bAnimVizSettings *avs = &ob->pose->avs; + bArmature *arm = ob->data; bPoseChannel *pchan; /* setup drawing environment for paths */ draw_motion_paths_init(v3d, ar); /* draw paths where they exist and they releated bone is visible */ - for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) { + for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { if ((pchan->bone->layer & arm->layer) && (pchan->mpath)) draw_motion_path_instance(scene, ob, pchan, avs, pchan->mpath); } @@ -2284,16 +2284,16 @@ static void draw_pose_paths(Scene *scene, View3D *v3d, ARegion *ar, Object *ob) */ static void ghost_poses_tag_unselected(Object *ob, short unset) { - bArmature *arm= ob->data; - bPose *pose= ob->pose; + bArmature *arm = ob->data; + bPose *pose = ob->pose; bPoseChannel *pchan; /* don't do anything if no hiding any bones */ - if ((arm->flag & ARM_GHOST_ONLYSEL)==0) + if ((arm->flag & ARM_GHOST_ONLYSEL) == 0) return; /* loop over all pchans, adding/removing tags as appropriate */ - for (pchan= pose->chanbase.first; pchan; pchan= pchan->next) { + for (pchan = pose->chanbase.first; pchan; pchan = pchan->next) { if ((pchan->bone) && (arm->layer & pchan->bone->layer)) { if (unset) { /* remove tags from all pchans if cleaning up */ @@ -2301,7 +2301,7 @@ static void ghost_poses_tag_unselected(Object *ob, short unset) } else { /* set tags on unselected pchans only */ - if ((pchan->bone->flag & BONE_SELECTED)==0) + if ((pchan->bone->flag & BONE_SELECTED) == 0) pchan->bone->flag |= BONE_HIDDEN_PG; } } @@ -2309,13 +2309,13 @@ static void ghost_poses_tag_unselected(Object *ob, short unset) } /* draw ghosts that occur within a frame range - * note: object should be in posemode + * note: object should be in posemode */ static void draw_ghost_poses_range(Scene *scene, View3D *v3d, ARegion *ar, Base *base) { - Object *ob= base->object; - AnimData *adt= BKE_animdata_from_id(&ob->id); - bArmature *arm= ob->data; + Object *ob = base->object; + AnimData *adt = BKE_animdata_from_id(&ob->id); + bArmature *arm = ob->data; bPose *posen, *poseo; float start, end, stepsize, range, colfac; int cfrao, flago, ipoflago; @@ -2325,31 +2325,31 @@ static void draw_ghost_poses_range(Scene *scene, View3D *v3d, ARegion *ar, Base if (end <= start) return; - stepsize= (float)(arm->ghostsize); - range= (float)(end - start); + stepsize = (float)(arm->ghostsize); + range = (float)(end - start); /* store values */ ob->mode &= ~OB_MODE_POSE; - cfrao= CFRA; - flago= arm->flag; - arm->flag &= ~(ARM_DRAWNAMES|ARM_DRAWAXES); - ipoflago= ob->ipoflag; + cfrao = CFRA; + flago = arm->flag; + arm->flag &= ~(ARM_DRAWNAMES | ARM_DRAWAXES); + ipoflago = ob->ipoflag; ob->ipoflag |= OB_DISABLE_PATH; /* copy the pose */ - poseo= ob->pose; + poseo = ob->pose; copy_pose(&posen, ob->pose, 1); - ob->pose= posen; - armature_rebuild_pose(ob, ob->data); /* child pointers for IK */ - ghost_poses_tag_unselected(ob, 0); /* hide unselected bones if need be */ + ob->pose = posen; + armature_rebuild_pose(ob, ob->data); /* child pointers for IK */ + ghost_poses_tag_unselected(ob, 0); /* hide unselected bones if need be */ glEnable(GL_BLEND); if (v3d->zbuf) glDisable(GL_DEPTH_TEST); /* draw from first frame of range to last */ - for (CFRA= (int)start; CFRA < end; CFRA += (int)stepsize) { + for (CFRA = (int)start; CFRA < end; CFRA += (int)stepsize) { colfac = (end - (float)CFRA) / range; - UI_ThemeColorShadeAlpha(TH_WIRE, 0, -128-(int)(120.0*sqrt(colfac))); + UI_ThemeColorShadeAlpha(TH_WIRE, 0, -128 - (int)(120.0 * sqrt(colfac))); BKE_animsys_evaluate_animdata(scene, &ob->id, adt, (float)CFRA, ADT_RECALC_ALL); where_is_pose(scene, ob); @@ -2358,16 +2358,16 @@ static void draw_ghost_poses_range(Scene *scene, View3D *v3d, ARegion *ar, Base glDisable(GL_BLEND); if (v3d->zbuf) glEnable(GL_DEPTH_TEST); - ghost_poses_tag_unselected(ob, 1); /* unhide unselected bones if need be */ + ghost_poses_tag_unselected(ob, 1); /* unhide unselected bones if need be */ free_pose(posen); /* restore */ - CFRA= cfrao; - ob->pose= poseo; - arm->flag= flago; + CFRA = cfrao; + ob->pose = poseo; + arm->flag = flago; armature_rebuild_pose(ob, ob->data); ob->mode |= OB_MODE_POSE; - ob->ipoflag= ipoflago; + ob->ipoflag = ipoflago; } /* draw ghosts on keyframes in action within range @@ -2375,10 +2375,10 @@ static void draw_ghost_poses_range(Scene *scene, View3D *v3d, ARegion *ar, Base */ static void draw_ghost_poses_keys(Scene *scene, View3D *v3d, ARegion *ar, Base *base) { - Object *ob= base->object; - AnimData *adt= BKE_animdata_from_id(&ob->id); - bAction *act= (adt) ? adt->action : NULL; - bArmature *arm= ob->data; + Object *ob = base->object; + AnimData *adt = BKE_animdata_from_id(&ob->id); + bAction *act = (adt) ? adt->action : NULL; + bArmature *arm = ob->data; bPose *posen, *poseo; DLRBT_Tree keys; ActKeyColumn *ak, *akn; @@ -2395,9 +2395,9 @@ static void draw_ghost_poses_keys(Scene *scene, View3D *v3d, ARegion *ar, Base * action_to_keylist(adt, act, &keys, NULL); BLI_dlrbTree_linkedlist_sync(&keys); - range= 0; - for (ak= keys.first; ak; ak= akn) { - akn= ak->next; + range = 0; + for (ak = keys.first; ak; ak = akn) { + akn = ak->next; if ((ak->cfra < start) || (ak->cfra > end)) BLI_freelinkN((ListBase *)&keys, ak); @@ -2408,27 +2408,27 @@ static void draw_ghost_poses_keys(Scene *scene, View3D *v3d, ARegion *ar, Base * /* store values */ ob->mode &= ~OB_MODE_POSE; - cfrao= CFRA; - flago= arm->flag; - arm->flag &= ~(ARM_DRAWNAMES|ARM_DRAWAXES); + cfrao = CFRA; + flago = arm->flag; + arm->flag &= ~(ARM_DRAWNAMES | ARM_DRAWAXES); ob->ipoflag |= OB_DISABLE_PATH; /* copy the pose */ - poseo= ob->pose; + poseo = ob->pose; copy_pose(&posen, ob->pose, 1); - ob->pose= posen; - armature_rebuild_pose(ob, ob->data); /* child pointers for IK */ - ghost_poses_tag_unselected(ob, 0); /* hide unselected bones if need be */ + ob->pose = posen; + armature_rebuild_pose(ob, ob->data); /* child pointers for IK */ + ghost_poses_tag_unselected(ob, 0); /* hide unselected bones if need be */ glEnable(GL_BLEND); if (v3d->zbuf) glDisable(GL_DEPTH_TEST); /* draw from first frame of range to last */ - for (ak=keys.first, i=0; ak; ak=ak->next, i++) { - colfac = i/range; - UI_ThemeColorShadeAlpha(TH_WIRE, 0, -128-(int)(120.0*sqrt(colfac))); + for (ak = keys.first, i = 0; ak; ak = ak->next, i++) { + colfac = i / range; + UI_ThemeColorShadeAlpha(TH_WIRE, 0, -128 - (int)(120.0 * sqrt(colfac))); - CFRA= (int)ak->cfra; + CFRA = (int)ak->cfra; BKE_animsys_evaluate_animdata(scene, &ob->id, adt, (float)CFRA, ADT_RECALC_ALL); where_is_pose(scene, ob); @@ -2437,26 +2437,26 @@ static void draw_ghost_poses_keys(Scene *scene, View3D *v3d, ARegion *ar, Base * glDisable(GL_BLEND); if (v3d->zbuf) glEnable(GL_DEPTH_TEST); - ghost_poses_tag_unselected(ob, 1); /* unhide unselected bones if need be */ + ghost_poses_tag_unselected(ob, 1); /* unhide unselected bones if need be */ BLI_dlrbTree_free(&keys); free_pose(posen); /* restore */ - CFRA= cfrao; - ob->pose= poseo; - arm->flag= flago; + CFRA = cfrao; + ob->pose = poseo; + arm->flag = flago; armature_rebuild_pose(ob, ob->data); ob->mode |= OB_MODE_POSE; } /* draw ghosts around current frame - * - object is supposed to be armature in posemode + * - object is supposed to be armature in posemode */ static void draw_ghost_poses(Scene *scene, View3D *v3d, ARegion *ar, Base *base) { - Object *ob= base->object; - AnimData *adt= BKE_animdata_from_id(&ob->id); - bArmature *arm= ob->data; + Object *ob = base->object; + AnimData *adt = BKE_animdata_from_id(&ob->id); + bArmature *arm = ob->data; bPose *posen, *poseo; float cur, start, end, stepsize, range, colfac, actframe, ctime; int cfrao, flago; @@ -2469,35 +2469,35 @@ static void draw_ghost_poses(Scene *scene, View3D *v3d, ARegion *ar, Base *base) if (start == end) return; - stepsize= (float)(arm->ghostsize); - range= (float)(arm->ghostep)*stepsize + 0.5f; /* plus half to make the for loop end correct */ + stepsize = (float)(arm->ghostsize); + range = (float)(arm->ghostep) * stepsize + 0.5f; /* plus half to make the for loop end correct */ /* store values */ ob->mode &= ~OB_MODE_POSE; - cfrao= CFRA; - actframe= BKE_nla_tweakedit_remap(adt, (float)CFRA, 0); - flago= arm->flag; - arm->flag &= ~(ARM_DRAWNAMES|ARM_DRAWAXES); + cfrao = CFRA; + actframe = BKE_nla_tweakedit_remap(adt, (float)CFRA, 0); + flago = arm->flag; + arm->flag &= ~(ARM_DRAWNAMES | ARM_DRAWAXES); /* copy the pose */ - poseo= ob->pose; + poseo = ob->pose; copy_pose(&posen, ob->pose, 1); - ob->pose= posen; - armature_rebuild_pose(ob, ob->data); /* child pointers for IK */ - ghost_poses_tag_unselected(ob, 0); /* hide unselected bones if need be */ + ob->pose = posen; + armature_rebuild_pose(ob, ob->data); /* child pointers for IK */ + ghost_poses_tag_unselected(ob, 0); /* hide unselected bones if need be */ glEnable(GL_BLEND); if (v3d->zbuf) glDisable(GL_DEPTH_TEST); /* draw from darkest blend to lowest */ - for (cur= stepsize; cur= start && actframe+ctime <= end) { - CFRA= (int)BKE_nla_tweakedit_remap(adt, actframe+ctime, NLATIME_CONVERT_MAP); + if (actframe + ctime >= start && actframe + ctime <= end) { + CFRA = (int)BKE_nla_tweakedit_remap(adt, actframe + ctime, NLATIME_CONVERT_MAP); if (CFRA != cfrao) { BKE_animsys_evaluate_animdata(scene, &ob->id, adt, (float)CFRA, ADT_RECALC_ALL); @@ -2506,13 +2506,13 @@ static void draw_ghost_poses(Scene *scene, View3D *v3d, ARegion *ar, Base *base) } } - ctime= cur + (float)fmod((float)cfrao, stepsize) - stepsize+1.0f; /* ensures consistent stepping */ - colfac= ctime/range; - UI_ThemeColorShadeAlpha(TH_WIRE, 0, -128-(int)(120.0*sqrt(colfac))); + ctime = cur + (float)fmod((float)cfrao, stepsize) - stepsize + 1.0f; /* ensures consistent stepping */ + colfac = ctime / range; + UI_ThemeColorShadeAlpha(TH_WIRE, 0, -128 - (int)(120.0 * sqrt(colfac))); /* only within action range */ - if ((actframe-ctime >= start) && (actframe-ctime <= end)) { - CFRA= (int)BKE_nla_tweakedit_remap(adt, actframe-ctime, NLATIME_CONVERT_MAP); + if ((actframe - ctime >= start) && (actframe - ctime <= end)) { + CFRA = (int)BKE_nla_tweakedit_remap(adt, actframe - ctime, NLATIME_CONVERT_MAP); if (CFRA != cfrao) { BKE_animsys_evaluate_animdata(scene, &ob->id, adt, (float)CFRA, ADT_RECALC_ALL); @@ -2524,13 +2524,13 @@ static void draw_ghost_poses(Scene *scene, View3D *v3d, ARegion *ar, Base *base) glDisable(GL_BLEND); if (v3d->zbuf) glEnable(GL_DEPTH_TEST); - ghost_poses_tag_unselected(ob, 1); /* unhide unselected bones if need be */ + ghost_poses_tag_unselected(ob, 1); /* unhide unselected bones if need be */ free_pose(posen); /* restore */ - CFRA= cfrao; - ob->pose= poseo; - arm->flag= flago; + CFRA = cfrao; + ob->pose = poseo; + arm->flag = flago; armature_rebuild_pose(ob, ob->data); ob->mode |= OB_MODE_POSE; } @@ -2540,22 +2540,22 @@ static void draw_ghost_poses(Scene *scene, View3D *v3d, ARegion *ar, Base *base) /* called from drawobject.c, return 1 if nothing was drawn */ int draw_armature(Scene *scene, View3D *v3d, ARegion *ar, Base *base, int dt, int flag, const short is_outline) { - Object *ob= base->object; - bArmature *arm= ob->data; - int retval= 0; + Object *ob = base->object; + bArmature *arm = ob->data; + int retval = 0; if (v3d->flag2 & V3D_RENDER_OVERRIDE) return 1; - if (dt>OB_WIRE && !ELEM(arm->drawtype, ARM_LINE, ARM_WIRE)) { + if (dt > OB_WIRE && !ELEM(arm->drawtype, ARM_LINE, ARM_WIRE)) { /* we use color for solid lighting */ glColorMaterial(GL_FRONT_AND_BACK, GL_SPECULAR); glEnable(GL_COLOR_MATERIAL); - glColor3ub(255,255,255); // clear spec + glColor3ub(255, 255, 255); // clear spec glDisable(GL_COLOR_MATERIAL); glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE); - glFrontFace((ob->transflag&OB_NEG_SCALE)?GL_CW:GL_CCW); // only for lighting... + glFrontFace((ob->transflag & OB_NEG_SCALE) ? GL_CW : GL_CCW); // only for lighting... } /* arm->flag is being used to detect mode... */ @@ -2571,9 +2571,10 @@ int draw_armature(Scene *scene, View3D *v3d, ARegion *ar, Base *base, int dt, in /* drawing posemode selection indices or colors only in these cases */ if (!(base->flag & OB_FROMDUPLI)) { if (G.f & G_PICKSEL) { -#if 0 /* nifty but actually confusing to allow bone selection out of posemode */ +#if 0 + /* nifty but actually confusing to allow bone selection out of posemode */ if (OBACT && (OBACT->mode & OB_MODE_WEIGHT_PAINT)) { - if (ob==modifiers_isDeformedByArmature(OBACT)) + if (ob == modifiers_isDeformedByArmature(OBACT)) arm->flag |= ARM_POSEMODE; } else @@ -2593,11 +2594,11 @@ int draw_armature(Scene *scene, View3D *v3d, ARegion *ar, Base *base, int dt, in if (arm->ghostep) draw_ghost_poses(scene, v3d, ar, base); } - if ((flag & DRAW_SCENESET)==0) { - if (ob==OBACT) + if ((flag & DRAW_SCENESET) == 0) { + if (ob == OBACT) arm->flag |= ARM_POSEMODE; else if (OBACT && (OBACT->mode & OB_MODE_WEIGHT_PAINT)) { - if (ob==modifiers_isDeformedByArmature(OBACT)) + if (ob == modifiers_isDeformedByArmature(OBACT)) arm->flag |= ARM_POSEMODE; } draw_pose_paths(scene, v3d, ar, ob); @@ -2608,9 +2609,11 @@ int draw_armature(Scene *scene, View3D *v3d, ARegion *ar, Base *base, int dt, in arm->flag &= ~ARM_POSEMODE; if (ob->mode & OB_MODE_POSE) - UI_ThemeColor(TH_WIRE); /* restore, for extra draw stuff */ + UI_ThemeColor(TH_WIRE); /* restore, for extra draw stuff */ + } + else { + retval = 1; } - else retval= 1; } /* restore */ glFrontFace(GL_CCW); diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c index 0ec9e9664f6..211104e60f0 100644 --- a/source/blender/editors/space_view3d/drawmesh.c +++ b/source/blender/editors/space_view3d/drawmesh.c @@ -71,7 +71,7 @@ #include "ED_mesh.h" #include "ED_uvedit.h" -#include "view3d_intern.h" // own include +#include "view3d_intern.h" // own include /* user data structures for derived mesh callbacks */ typedef struct drawMeshFaceSelect_userData { @@ -96,8 +96,8 @@ typedef struct drawTFace_userData { /* Flags for marked edges */ enum { - eEdge_Visible = (1<<0), - eEdge_Select = (1<<1), + eEdge_Visible = (1 << 0), + eEdge_Select = (1 << 1), }; /* Creates a hash of edges to flags indicating selected/visible */ @@ -108,7 +108,7 @@ static void get_marked_edge_info__orFlags(EdgeHash *eh, int v0, int v1, int flag if (!BLI_edgehash_haskey(eh, v0, v1)) BLI_edgehash_insert(eh, v0, v1, NULL); - flags_p = (int*) BLI_edgehash_lookup_p(eh, v0, v1); + flags_p = (int *) BLI_edgehash_lookup_p(eh, v0, v1); *flags_p |= flags; } @@ -120,7 +120,7 @@ static EdgeHash *get_tface_mesh_marked_edge_info(Mesh *me) MLoop *ml_next; int i, j; - for (i=0; itotpoly; i++) { + for (i = 0; i < me->totpoly; i++) { mp = &me->mpoly[i]; if (!(mp->flag & ME_HIDE)) { @@ -128,7 +128,7 @@ static EdgeHash *get_tface_mesh_marked_edge_info(Mesh *me) if (mp->flag & ME_FACE_SEL) flags |= eEdge_Select; ml = me->mloop + mp->loopstart; - for (j=0; jtotloop; j++, ml++) { + for (j = 0; j < mp->totloop; j++, ml++) { ml_next = ME_POLY_LOOP_NEXT(me->mloop, mp, j); get_marked_edge_info__orFlags(eh, ml->v, ml_next->v, flags); } @@ -142,7 +142,7 @@ static EdgeHash *get_tface_mesh_marked_edge_info(Mesh *me) static DMDrawOption draw_mesh_face_select__setHiddenOpts(void *userData, int index) { drawMeshFaceSelect_userData *data = userData; - Mesh *me= data->me; + Mesh *me = data->me; MEdge *med = &me->medge[index]; uintptr_t flags = (intptr_t) BLI_edgehash_lookup(data->eh, med->v1, med->v2); @@ -170,11 +170,11 @@ static DMDrawOption draw_mesh_face_select__setSelectOpts(void *userData, int ind /* draws unselected */ static DMDrawOption draw_mesh_face_select__drawFaceOptsInv(void *userData, int index) { - Mesh *me = (Mesh*)userData; + Mesh *me = (Mesh *)userData; MPoly *mface = &me->mpoly[index]; - if (!(mface->flag&ME_HIDE) && !(mface->flag&ME_FACE_SEL)) - return DM_DRAW_OPTION_NO_MCOL; /* Don't set color */ + if (!(mface->flag & ME_HIDE) && !(mface->flag & ME_FACE_SEL)) + return DM_DRAW_OPTION_NO_MCOL; /* Don't set color */ else return DM_DRAW_OPTION_SKIP; } @@ -202,20 +202,20 @@ static void draw_mesh_face_select(RegionView3D *rv3d, Mesh *me, DerivedMesh *dm) glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); /* dull unselected faces so as not to get in the way of seeing color */ glColor4ub(96, 96, 96, 64); - dm->drawMappedFacesTex(dm, draw_mesh_face_select__drawFaceOptsInv, NULL, (void*)me); + dm->drawMappedFacesTex(dm, draw_mesh_face_select__drawFaceOptsInv, NULL, (void *)me); glDisable(GL_BLEND); } bglPolygonOffset(rv3d->dist, 1.0); - /* Draw Stippled Outline for selected faces */ + /* Draw Stippled Outline for selected faces */ glColor3ub(255, 255, 255); setlinestyle(1); dm->drawMappedEdges(dm, draw_mesh_face_select__setSelectOpts, &data); setlinestyle(0); - bglPolygonOffset(rv3d->dist, 0.0); // resets correctly now, even after calling accumulated offsets + bglPolygonOffset(rv3d->dist, 0.0); // resets correctly now, even after calling accumulated offsets BLI_edgehash_free(data.eh, NULL); } @@ -224,10 +224,10 @@ static void draw_mesh_face_select(RegionView3D *rv3d, Mesh *me, DerivedMesh *dm) static Material *give_current_material_or_def(Object *ob, int matnr) { - extern Material defmaterial; // render module abuse... - Material *ma= give_current_material(ob, matnr); + extern Material defmaterial; // render module abuse... + Material *ma = give_current_material(ob, matnr); - return ma?ma:&defmaterial; + return ma ? ma : &defmaterial; } /* Icky globals, fix with userdata parameter */ @@ -255,9 +255,9 @@ static int set_draw_settings_cached(int clearcache, MTFace *texface, Material *m int lit = 0; if (clearcache) { - c_textured= c_lit= c_backculled= -1; - c_texface= (MTFace*) -1; - c_badtex= 0; + c_textured = c_lit = c_backculled = -1; + c_texface = (MTFace *) -1; + c_badtex = 0; } else { textured = gtexdraw.istex; @@ -284,35 +284,35 @@ static int set_draw_settings_cached(int clearcache, MTFace *texface, Material *m else textured = 0; - if (backculled!=c_backculled) { + if (backculled != c_backculled) { if (backculled) glEnable(GL_CULL_FACE); else glDisable(GL_CULL_FACE); - c_backculled= backculled; + c_backculled = backculled; } - if (textured!=c_textured || texface!=c_texface) { - if (textured ) { - c_badtex= !GPU_set_tpage(texface, !(litob->mode & OB_MODE_TEXTURE_PAINT), alphablend); + if (textured != c_textured || texface != c_texface) { + if (textured) { + c_badtex = !GPU_set_tpage(texface, !(litob->mode & OB_MODE_TEXTURE_PAINT), alphablend); } else { GPU_set_tpage(NULL, 0, 0); - c_badtex= 0; + c_badtex = 0; } - c_textured= textured; - c_texface= texface; + c_textured = textured; + c_texface = texface; } - if (c_badtex) lit= 0; - if (lit!=c_lit || ma!=c_ma) { + if (c_badtex) lit = 0; + if (lit != c_lit || ma != c_ma) { if (lit) { float spec[4]; - if (!ma)ma= give_current_material_or_def(NULL, 0); //default material + if (!ma) ma = give_current_material_or_def(NULL, 0); //default material - spec[0]= ma->spec*ma->specr; - spec[1]= ma->spec*ma->specg; - spec[2]= ma->spec*ma->specb; - spec[3]= 1.0; + spec[0] = ma->spec * ma->specr; + spec[1] = ma->spec * ma->specg; + spec[2] = ma->spec * ma->specb; + spec[3] = 1.0; glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, spec); glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE); @@ -324,7 +324,7 @@ static int set_draw_settings_cached(int clearcache, MTFace *texface, Material *m glDisable(GL_LIGHTING); glDisable(GL_COLOR_MATERIAL); } - c_lit= lit; + c_lit = lit; } return c_badtex; @@ -340,25 +340,25 @@ static void draw_textured_begin(Scene *scene, View3D *v3d, RegionView3D *rv3d, O /* texture draw is abused for mask selection mode, do this so wire draw * with face selection in weight paint is not lit. */ if ((v3d->drawtype <= OB_WIRE) && (ob->mode & OB_MODE_WEIGHT_PAINT)) { - solidtex= FALSE; - Gtexdraw.islit= 0; + solidtex = FALSE; + Gtexdraw.islit = 0; } - else if (v3d->drawtype==OB_SOLID || ((ob->mode & OB_MODE_EDIT) && v3d->drawtype!=OB_TEXTURE)) { + else if (v3d->drawtype == OB_SOLID || ((ob->mode & OB_MODE_EDIT) && v3d->drawtype != OB_TEXTURE)) { /* draw with default lights in solid draw mode and edit mode */ - solidtex= TRUE; - Gtexdraw.islit= -1; + solidtex = TRUE; + Gtexdraw.islit = -1; } else { /* draw with lights in the scene otherwise */ - solidtex= FALSE; - Gtexdraw.islit= GPU_scene_object_lights(scene, ob, v3d->lay, rv3d->viewmat, !rv3d->is_persp); + solidtex = FALSE; + Gtexdraw.islit = GPU_scene_object_lights(scene, ob, v3d->lay, rv3d->viewmat, !rv3d->is_persp); } rgba_float_to_uchar(obcol, ob->col); glCullFace(GL_BACK); glEnable(GL_CULL_FACE); - if (solidtex || v3d->drawtype==OB_TEXTURE) istex= 1; - else istex= 0; + if (solidtex || v3d->drawtype == OB_TEXTURE) istex = 1; + else istex = 0; Gtexdraw.ob = ob; Gtexdraw.istex = istex; @@ -393,8 +393,8 @@ static void draw_textured_end(void) static DMDrawOption draw_tface__set_draw_legacy(MTFace *tface, int has_mcol, int matnr) { - Material *ma= give_current_material(Gtexdraw.ob, matnr+1); - int validtexture=0; + Material *ma = give_current_material(Gtexdraw.ob, matnr + 1); + int validtexture = 0; if (ma && (ma->game.flag & GEMAT_INVISIBLE)) return DM_DRAW_OPTION_SKIP; @@ -405,7 +405,7 @@ static DMDrawOption draw_tface__set_draw_legacy(MTFace *tface, int has_mcol, int glColor3ub(0xFF, 0x00, 0xFF); return DM_DRAW_OPTION_NO_MCOL; /* Don't set color */ } - else if (ma && (ma->shade_flag&MA_OBCOLOR)) { + else if (ma && (ma->shade_flag & MA_OBCOLOR)) { glColor3ubv(Gtexdraw.obcol); return DM_DRAW_OPTION_NO_MCOL; /* Don't set color */ } @@ -438,7 +438,7 @@ static DMDrawOption draw_mcol__set_draw_legacy(MTFace *UNUSED(tface), int has_mc static DMDrawOption draw_tface__set_draw(MTFace *tface, int has_mcol, int matnr) { - Material *ma= give_current_material(Gtexdraw.ob, matnr+1); + Material *ma = give_current_material(Gtexdraw.ob, matnr + 1); if (ma && (ma->game.flag & GEMAT_INVISIBLE)) return 0; @@ -461,78 +461,78 @@ static void add_tface_color_layer(DerivedMesh *dm) MTFace *tface = DM_get_poly_data_layer(dm, CD_MTFACE); MFace *mface = dm->getTessFaceArray(dm); MCol *finalCol; - int i,j; + int i, j; MCol *mcol = dm->getTessFaceDataArray(dm, CD_PREVIEW_MCOL); if (!mcol) mcol = dm->getTessFaceDataArray(dm, CD_MCOL); - finalCol = MEM_mallocN(sizeof(MCol)*4*dm->getNumTessFaces(dm),"add_tface_color_layer"); - for (i=0;igetNumTessFaces(dm);i++) { - Material *ma= give_current_material(Gtexdraw.ob, mface[i].mat_nr+1); + finalCol = MEM_mallocN(sizeof(MCol) * 4 * dm->getNumTessFaces(dm), "add_tface_color_layer"); + for (i = 0; i < dm->getNumTessFaces(dm); i++) { + Material *ma = give_current_material(Gtexdraw.ob, mface[i].mat_nr + 1); - if (ma && (ma->game.flag&GEMAT_INVISIBLE)) { - if ( mcol ) - memcpy(&finalCol[i*4],&mcol[i*4],sizeof(MCol)*4); + if (ma && (ma->game.flag & GEMAT_INVISIBLE)) { + if (mcol) + memcpy(&finalCol[i * 4], &mcol[i * 4], sizeof(MCol) * 4); else - for (j=0;j<4;j++) { - finalCol[i*4+j].b = 255; - finalCol[i*4+j].g = 255; - finalCol[i*4+j].r = 255; + for (j = 0; j < 4; j++) { + finalCol[i * 4 + j].b = 255; + finalCol[i * 4 + j].g = 255; + finalCol[i * 4 + j].r = 255; } } else if (tface && mface && set_draw_settings_cached(0, tface, ma, Gtexdraw)) { - for (j=0;j<4;j++) { - finalCol[i*4+j].b = 255; - finalCol[i*4+j].g = 0; - finalCol[i*4+j].r = 255; + for (j = 0; j < 4; j++) { + finalCol[i * 4 + j].b = 255; + finalCol[i * 4 + j].g = 0; + finalCol[i * 4 + j].r = 255; } } else if (tface && (tface->mode & TF_OBCOL)) { - for (j=0;j<4;j++) { - finalCol[i*4+j].b = FTOCHAR(Gtexdraw.obcol[0]); - finalCol[i*4+j].g = FTOCHAR(Gtexdraw.obcol[1]); - finalCol[i*4+j].r = FTOCHAR(Gtexdraw.obcol[2]); + for (j = 0; j < 4; j++) { + finalCol[i * 4 + j].b = FTOCHAR(Gtexdraw.obcol[0]); + finalCol[i * 4 + j].g = FTOCHAR(Gtexdraw.obcol[1]); + finalCol[i * 4 + j].r = FTOCHAR(Gtexdraw.obcol[2]); } } else if (!mcol) { if (tface) { - for (j=0;j<4;j++) { - finalCol[i*4+j].b = 255; - finalCol[i*4+j].g = 255; - finalCol[i*4+j].r = 255; + for (j = 0; j < 4; j++) { + finalCol[i * 4 + j].b = 255; + finalCol[i * 4 + j].g = 255; + finalCol[i * 4 + j].r = 255; } } else { float col[3]; - Material *ma= give_current_material(Gtexdraw.ob, mface[i].mat_nr+1); + Material *ma = give_current_material(Gtexdraw.ob, mface[i].mat_nr + 1); if (ma) { if (Gtexdraw.color_profile) linearrgb_to_srgb_v3_v3(col, &ma->r); else copy_v3_v3(col, &ma->r); - for (j=0;j<4;j++) { - finalCol[i*4+j].b = FTOCHAR(col[0]); - finalCol[i*4+j].g = FTOCHAR(col[1]); - finalCol[i*4+j].r = FTOCHAR(col[2]); + for (j = 0; j < 4; j++) { + finalCol[i * 4 + j].b = FTOCHAR(col[0]); + finalCol[i * 4 + j].g = FTOCHAR(col[1]); + finalCol[i * 4 + j].r = FTOCHAR(col[2]); } } else - for (j=0;j<4;j++) { - finalCol[i*4+j].b = 255; - finalCol[i*4+j].g = 255; - finalCol[i*4+j].r = 255; + for (j = 0; j < 4; j++) { + finalCol[i * 4 + j].b = 255; + finalCol[i * 4 + j].g = 255; + finalCol[i * 4 + j].r = 255; } } } else { - for (j=0;j<4;j++) { - finalCol[i*4+j].r = mcol[i*4+j].r; - finalCol[i*4+j].g = mcol[i*4+j].g; - finalCol[i*4+j].b = mcol[i*4+j].b; + for (j = 0; j < 4; j++) { + finalCol[i * 4 + j].r = mcol[i * 4 + j].r; + finalCol[i * 4 + j].g = mcol[i * 4 + j].g; + finalCol[i * 4 + j].b = mcol[i * 4 + j].b; } } } - CustomData_add_layer( &dm->faceData, CD_TEXTURE_MCOL, CD_ASSIGN, finalCol, dm->numTessFaceData ); + CustomData_add_layer(&dm->faceData, CD_TEXTURE_MCOL, CD_ASSIGN, finalCol, dm->numTessFaceData); } static DMDrawOption draw_tface_mapped__set_draw(void *userData, int index) @@ -549,7 +549,7 @@ static DMDrawOption draw_tface_mapped__set_draw(void *userData, int index) } else { MTexPoly *tpoly = (me->mtpoly) ? &me->mtpoly[index] : NULL; - MTFace mtf= {{{0}}}; + MTFace mtf = {{{0}}}; int matnr = mpoly->mat_nr; if (tpoly) { @@ -564,13 +564,13 @@ static DMDrawOption draw_em_tf_mapped__set_draw(void *userData, int index) { drawEMTFMapped_userData *data = userData; BMEditMesh *em = data->em; - BMFace *efa= EDBM_get_face_for_index(em, index); + BMFace *efa = EDBM_get_face_for_index(em, index); - if (efa==NULL || BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) { + if (efa == NULL || BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) { return DM_DRAW_OPTION_SKIP; } else { - MTFace mtf= {{{0}}}; + MTFace mtf = {{{0}}}; int matnr = efa->mat_nr; if (data->has_mtface) { @@ -579,16 +579,16 @@ static DMDrawOption draw_em_tf_mapped__set_draw(void *userData, int index) } return draw_tface__set_draw_legacy(data->has_mtface ? &mtf : NULL, - data->has_mcol, matnr); + data->has_mcol, matnr); } } static DMDrawOption wpaint__setSolidDrawOptions_material(void *userData, int index) { - Mesh *me = (Mesh*)userData; + Mesh *me = (Mesh *)userData; if (me->mat && me->mpoly) { - Material *ma= me->mat[me->mpoly[index].mat_nr]; + Material *ma = me->mat[me->mpoly[index].mat_nr]; if (ma && (ma->game.flag & GEMAT_INVISIBLE)) { return DM_DRAW_OPTION_SKIP; } @@ -600,7 +600,7 @@ static DMDrawOption wpaint__setSolidDrawOptions_material(void *userData, int ind /* when face select is on, use face hidden flag */ static DMDrawOption wpaint__setSolidDrawOptions_facemask(void *userData, int index) { - Mesh *me = (Mesh*)userData; + Mesh *me = (Mesh *)userData; MPoly *mp = &me->mpoly[index]; if (mp->flag & ME_HIDE) return DM_DRAW_OPTION_SKIP; @@ -615,7 +615,7 @@ static void draw_mesh_text(Scene *scene, Object *ob, int glsl) MTexPoly *mtpoly = me->mtpoly; MLoopUV *mloopuv = me->mloopuv; MLoopUV *luv; - MLoopCol *mloopcol = me->mloopcol; /* why does mcol exist? */ + MLoopCol *mloopcol = me->mloopcol; /* why does mcol exist? */ MLoopCol *lcol; bProperty *prop = get_ob_property(ob, "Text"); @@ -623,7 +623,7 @@ static void draw_mesh_text(Scene *scene, Object *ob, int glsl) int a, totpoly = me->totpoly; /* fake values to pass to GPU_render_text() */ - MCol tmp_mcol[4] = {{0}}; + MCol tmp_mcol[4] = {{0}}; MCol *tmp_mcol_pt = mloopcol ? tmp_mcol : NULL; MTFace tmp_tf = {{{0}}}; @@ -634,33 +634,33 @@ static void draw_mesh_text(Scene *scene, Object *ob, int glsl) /* don't draw when editing */ if (ob->mode & OB_MODE_EDIT) return; - else if (ob==OBACT) + else if (ob == OBACT) if (paint_facesel_test(ob) || paint_vertsel_test(ob)) return; ddm = mesh_get_derived_deform(scene, ob, CD_MASK_BAREMESH); - for (a=0, mp=mface; amat_nr; - int mf_smooth= mp->flag & ME_SMOOTH; + for (a = 0, mp = mface; a < totpoly; a++, mtpoly++, mp++) { + short matnr = mp->mat_nr; + int mf_smooth = mp->flag & ME_SMOOTH; Material *mat = me->mat[matnr]; - int mode= mat->game.flag; + int mode = mat->game.flag; - if (!(mode&GEMAT_INVISIBLE) && (mode&GEMAT_TEXT) && mp->totloop >= 3) { + if (!(mode & GEMAT_INVISIBLE) && (mode & GEMAT_TEXT) && mp->totloop >= 3) { /* get the polygon as a tri/quad */ int mp_vi[4]; float v1[3], v2[3], v3[3], v4[3]; char string[MAX_PROPSTRING]; - int characters, i, glattrib= -1, badtex= 0; + int characters, i, glattrib = -1, badtex = 0; /* TEXFACE */ ME_MTEXFACE_CPY(&tmp_tf, mtpoly); if (glsl) { - GPU_enable_material(matnr+1, &gattribs); + GPU_enable_material(matnr + 1, &gattribs); - for (i=0; imloop[mp->loopstart + 0].v; - mp_vi[1] = me->mloop[mp->loopstart + 1].v; - mp_vi[2] = me->mloop[mp->loopstart + 2].v; - mp_vi[3] = (mp->totloop >= 4) ? me->mloop[mp->loopstart + 3].v : 0; + mp_vi[1] = me->mloop[mp->loopstart + 1].v; + mp_vi[2] = me->mloop[mp->loopstart + 2].v; + mp_vi[3] = (mp->totloop >= 4) ? me->mloop[mp->loopstart + 3].v : 0; /* UV */ luv = &mloopuv[mp->loopstart]; @@ -721,13 +721,13 @@ static void draw_mesh_text(Scene *scene, Object *ob, int glsl) if (!mf_smooth) { float nor[3]; - normal_tri_v3( nor,v1, v2, v3); + normal_tri_v3(nor, v1, v2, v3); glNormal3fv(nor); } GPU_render_text(&tmp_tf, mode, string, characters, - (unsigned int*)tmp_mcol_pt, v1, v2, v3, (mp->totloop >= 4 ? v4: NULL), glattrib); + (unsigned int *)tmp_mcol_pt, v1, v2, v3, (mp->totloop >= 4 ? v4 : NULL), glattrib); } } @@ -749,7 +749,7 @@ static int compareDrawOptions(void *userData, int cur_index, int next_index) static int compareDrawOptionsEm(void *userData, int cur_index, int next_index) { - drawEMTFMapped_userData *data= userData; + drawEMTFMapped_userData *data = userData; if (data->mf && data->mf[cur_index].mat_nr != data->mf[next_index].mat_nr) return 0; @@ -762,7 +762,7 @@ static int compareDrawOptionsEm(void *userData, int cur_index, int next_index) void draw_mesh_textured_old(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob, DerivedMesh *dm, int draw_flags) { - Mesh *me= ob->data; + Mesh *me = ob->data; /* correct for negative scale */ if (ob->transflag & OB_NEG_SCALE) glFrontFace(GL_CW); @@ -771,23 +771,23 @@ void draw_mesh_textured_old(Scene *scene, View3D *v3d, RegionView3D *rv3d, Objec /* draw the textured mesh */ draw_textured_begin(scene, v3d, rv3d, ob); - glColor4f(1.0f,1.0f,1.0f,1.0f); + glColor4f(1.0f, 1.0f, 1.0f, 1.0f); if (ob->mode & OB_MODE_EDIT) { drawEMTFMapped_userData data; - data.em= me->edit_btmesh; - data.has_mcol= CustomData_has_layer(&me->edit_btmesh->bm->ldata, CD_MLOOPCOL); - data.has_mtface= CustomData_has_layer(&me->edit_btmesh->bm->pdata, CD_MTEXPOLY); - data.mf= DM_get_tessface_data_layer(dm, CD_MFACE); - data.tf= DM_get_tessface_data_layer(dm, CD_MTFACE); + data.em = me->edit_btmesh; + data.has_mcol = CustomData_has_layer(&me->edit_btmesh->bm->ldata, CD_MLOOPCOL); + data.has_mtface = CustomData_has_layer(&me->edit_btmesh->bm->pdata, CD_MTEXPOLY); + data.mf = DM_get_tessface_data_layer(dm, CD_MFACE); + data.tf = DM_get_tessface_data_layer(dm, CD_MTFACE); dm->drawMappedFacesTex(dm, draw_em_tf_mapped__set_draw, compareDrawOptionsEm, &data); } else if (draw_flags & DRAW_FACE_SELECT) { if (ob->mode & OB_MODE_WEIGHT_PAINT) dm->drawMappedFaces(dm, wpaint__setSolidDrawOptions_facemask, GPU_enable_material, NULL, me, - DM_DRAW_USE_COLORS | DM_DRAW_ALWAYS_SMOOTH); + DM_DRAW_USE_COLORS | DM_DRAW_ALWAYS_SMOOTH); else dm->drawMappedFacesTex(dm, me->mpoly ? draw_tface_mapped__set_draw : NULL, NULL, me); } @@ -801,7 +801,7 @@ void draw_mesh_textured_old(Scene *scene, View3D *v3d, RegionView3D *rv3d, Objec else { drawTFace_userData userData; - if (!CustomData_has_layer(&dm->faceData,CD_TEXTURE_MCOL)) + if (!CustomData_has_layer(&dm->faceData, CD_TEXTURE_MCOL)) add_tface_color_layer(dm); userData.mf = DM_get_tessface_data_layer(dm, CD_MFACE); @@ -849,22 +849,22 @@ static void tex_mat_set_material_cb(void *UNUSED(userData), int mat_nr, void *at static void tex_mat_set_texture_cb(void *userData, int mat_nr, void *attribs) { /* texture draw mode without GLSL */ - TexMatCallback *data= (TexMatCallback*)userData; + TexMatCallback *data = (TexMatCallback *)userData; GPUVertexAttribs *gattribs = attribs; Image *ima; ImageUser *iuser; bNode *node; - int texture_set= 0; + int texture_set = 0; /* draw image texture if we find one */ if (ED_object_get_active_image(data->ob, mat_nr, &ima, &iuser, &node)) { /* get openl texture */ - int mipmap= 1; - int bindcode= (ima)? GPU_verify_image(ima, iuser, 0, 0, mipmap): 0; + int mipmap = 1; + int bindcode = (ima) ? GPU_verify_image(ima, iuser, 0, 0, mipmap) : 0; float zero[4] = {0.0f, 0.0f, 0.0f, 0.0f}; if (bindcode) { - NodeTexBase *texbase= node->storage; + NodeTexBase *texbase = node->storage; /* disable existing material */ GPU_disable_material(); @@ -886,12 +886,12 @@ static void tex_mat_set_texture_cb(void *userData, int mat_nr, void *attribs) /* use active UV texture layer */ memset(gattribs, 0, sizeof(*gattribs)); - gattribs->layer[0].type= CD_MTFACE; - gattribs->layer[0].name[0]= '\0'; - gattribs->layer[0].gltexco= 1; - gattribs->totlayer= 1; + gattribs->layer[0].type = CD_MTFACE; + gattribs->layer[0].name[0] = '\0'; + gattribs->layer[0].gltexco = 1; + gattribs->totlayer = 1; - texture_set= 1; + texture_set = 1; } } @@ -912,8 +912,8 @@ static void tex_mat_set_texture_cb(void *userData, int mat_nr, void *attribs) static int tex_mat_set_face_mesh_cb(void *userData, int index) { /* faceselect mode face hiding */ - TexMatCallback *data= (TexMatCallback*)userData; - Mesh *me = (Mesh*)data->me; + TexMatCallback *data = (TexMatCallback *)userData; + Mesh *me = (Mesh *)data->me; MPoly *mp = &me->mpoly[index]; return !(mp->flag & ME_HIDE); @@ -922,9 +922,9 @@ static int tex_mat_set_face_mesh_cb(void *userData, int index) static int tex_mat_set_face_editmesh_cb(void *userData, int index) { /* editmode face hiding */ - TexMatCallback *data= (TexMatCallback*)userData; - Mesh *me = (Mesh*)data->me; - BMFace *efa= EDBM_get_face_for_index(me->edit_btmesh, index); + TexMatCallback *data = (TexMatCallback *)userData; + Mesh *me = (Mesh *)data->me; + BMFace *efa = EDBM_get_face_for_index(me->edit_btmesh, index); return !BM_elem_flag_test(efa, BM_ELEM_HIDDEN); } @@ -945,32 +945,32 @@ void draw_mesh_textured(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *o if (ob->mode & OB_MODE_WEIGHT_PAINT) { /* weight paint mode exception */ dm->drawMappedFaces(dm, wpaint__setSolidDrawOptions_material, - GPU_enable_material, NULL, ob->data, DM_DRAW_USE_COLORS | DM_DRAW_ALWAYS_SMOOTH); + GPU_enable_material, NULL, ob->data, DM_DRAW_USE_COLORS | DM_DRAW_ALWAYS_SMOOTH); } else { - Mesh *me= ob->data; + Mesh *me = ob->data; TexMatCallback data = {scene, ob, me, dm}; - int (*set_face_cb)(void*, int); + int (*set_face_cb)(void *, int); int glsl; /* face hiding callback depending on mode */ if (ob == scene->obedit) - set_face_cb= tex_mat_set_face_editmesh_cb; + set_face_cb = tex_mat_set_face_editmesh_cb; else if (draw_flags & DRAW_FACE_SELECT) - set_face_cb= tex_mat_set_face_mesh_cb; + set_face_cb = tex_mat_set_face_mesh_cb; else - set_face_cb= NULL; + set_face_cb = NULL; /* test if we can use glsl */ - glsl= (v3d->drawtype == OB_MATERIAL) && GPU_glsl_support(); + glsl = (v3d->drawtype == OB_MATERIAL) && GPU_glsl_support(); GPU_begin_object_materials(v3d, rv3d, scene, ob, glsl, NULL); if (glsl) { /* draw glsl */ dm->drawMappedFacesMat(dm, - tex_mat_set_material_cb, - set_face_cb, &data); + tex_mat_set_material_cb, + set_face_cb, &data); } else { float zero[4] = {0.0f, 0.0f, 0.0f, 0.0f}; @@ -981,8 +981,8 @@ void draw_mesh_textured(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *o glMateriali(GL_FRONT_AND_BACK, GL_SHININESS, 0); dm->drawMappedFacesMat(dm, - tex_mat_set_texture_cb, - set_face_cb, &data); + tex_mat_set_texture_cb, + set_face_cb, &data); } GPU_end_object_materials(); diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index b78d5b23e3f..0332bd0bdb7 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -55,7 +55,7 @@ #include "BLI_rand.h" #include "BLI_utildefines.h" -#include "BKE_anim.h" //for the where_on_path function +#include "BKE_anim.h" //for the where_on_path function #include "BKE_armature.h" #include "BKE_camera.h" #include "BKE_constraint.h" // for the get_constraint_target function @@ -107,18 +107,18 @@ #include "wm_subwindow.h" #include "BLF_api.h" -#include "view3d_intern.h" // own include +#include "view3d_intern.h" // own include /* this condition has been made more complex since editmode can draw textures */ #define CHECK_OB_DRAWTEXTURE(vd, dt) \ - ((ELEM(vd->drawtype, OB_TEXTURE, OB_MATERIAL) && dt>OB_SOLID) || \ - (vd->drawtype==OB_SOLID && vd->flag2 & V3D_SOLID_TEX)) + ((ELEM(vd->drawtype, OB_TEXTURE, OB_MATERIAL) && dt > OB_SOLID) || \ + (vd->drawtype == OB_SOLID && vd->flag2 & V3D_SOLID_TEX)) typedef enum eWireDrawMode { - OBDRAW_WIRE_OFF= 0, - OBDRAW_WIRE_ON= 1, - OBDRAW_WIRE_ON_DEPTH= 2 + OBDRAW_WIRE_OFF = 0, + OBDRAW_WIRE_ON = 1, + OBDRAW_WIRE_ON_DEPTH = 2 } eWireDrawMode; /* user data structures for derived mesh callbacks */ @@ -195,7 +195,7 @@ static int check_ob_drawface_dot(Scene *sce, View3D *vd, char dt) return 1; /* if its drawing textures with zbuf sel, then don't draw dots */ - if (dt==OB_TEXTURE && vd->drawtype==OB_TEXTURE) + if (dt == OB_TEXTURE && vd->drawtype == OB_TEXTURE) return 0; if ((vd->drawtype >= OB_SOLID) && (vd->flag2 & V3D_SOLID_TEX)) @@ -209,10 +209,10 @@ static int check_ob_drawface_dot(Scene *sce, View3D *vd, char dt) * */ static void view3d_project_short_clip(ARegion *ar, const float vec[3], short adr[2], int is_local) { - RegionView3D *rv3d= ar->regiondata; + RegionView3D *rv3d = ar->regiondata; float fx, fy, vec4[4]; - adr[0]= IS_CLIPPED; + adr[0] = IS_CLIPPED; /* clipplanes in eye space */ if (rv3d->rflag & RV3D_CLIPPING) { @@ -221,21 +221,21 @@ static void view3d_project_short_clip(ARegion *ar, const float vec[3], short adr } copy_v3_v3(vec4, vec); - vec4[3]= 1.0; + vec4[3] = 1.0; mul_m4_v4(rv3d->persmatob, vec4); /* clipplanes in window space */ - if ( vec4[3] > (float)BL_NEAR_CLIP ) { /* is the NEAR clipping cutoff for picking */ - fx= (ar->winx/2)*(1 + vec4[0]/vec4[3]); + if (vec4[3] > (float)BL_NEAR_CLIP) { /* is the NEAR clipping cutoff for picking */ + fx = (ar->winx / 2) * (1 + vec4[0] / vec4[3]); - if ( fx>0 && fxwinx) { + if (fx > 0 && fx < ar->winx) { - fy= (ar->winy/2)*(1 + vec4[1]/vec4[3]); + fy = (ar->winy / 2) * (1 + vec4[1] / vec4[3]); if (fy > 0.0f && fy < (float)ar->winy) { - adr[0]= (short)floorf(fx); - adr[1]= (short)floorf(fy); + adr[0] = (short)floorf(fx); + adr[1] = (short)floorf(fy); } } } @@ -244,28 +244,28 @@ static void view3d_project_short_clip(ARegion *ar, const float vec[3], short adr /* BMESH NOTE: this function is unused in bmesh only */ /* only use while object drawing */ -static void UNUSED_FUNCTION(view3d_project_short_noclip)(ARegion *ar, const float vec[3], short adr[2]) +static void UNUSED_FUNCTION(view3d_project_short_noclip) (ARegion * ar, const float vec[3], short adr[2]) { - RegionView3D *rv3d= ar->regiondata; + RegionView3D *rv3d = ar->regiondata; float fx, fy, vec4[4]; - adr[0]= IS_CLIPPED; + adr[0] = IS_CLIPPED; copy_v3_v3(vec4, vec); - vec4[3]= 1.0; + vec4[3] = 1.0; mul_m4_v4(rv3d->persmatob, vec4); - if ( vec4[3] > (float)BL_NEAR_CLIP ) { /* is the NEAR clipping cutoff for picking */ - fx= (ar->winx/2)*(1 + vec4[0]/vec4[3]); + if (vec4[3] > (float)BL_NEAR_CLIP) { /* is the NEAR clipping cutoff for picking */ + fx = (ar->winx / 2) * (1 + vec4[0] / vec4[3]); - if ( fx>-32700 && fx<32700) { + if (fx > -32700 && fx < 32700) { - fy= (ar->winy/2)*(1 + vec4[1]/vec4[3]); + fy = (ar->winy / 2) * (1 + vec4[1] / vec4[3]); if (fy > -32700.0f && fy < 32700.0f) { - adr[0]= (short)floorf(fx); - adr[1]= (short)floorf(fy); + adr[0] = (short)floorf(fx); + adr[1] = (short)floorf(fy); } } } @@ -274,10 +274,10 @@ static void UNUSED_FUNCTION(view3d_project_short_noclip)(ARegion *ar, const floa /* same as view3d_project_short_clip but use persmat instead of persmatob for projection */ static void view3d_project_short_clip_persmat(ARegion *ar, const float vec[3], short adr[2], int is_local) { - RegionView3D *rv3d= ar->regiondata; + RegionView3D *rv3d = ar->regiondata; float fx, fy, vec4[4]; - adr[0]= IS_CLIPPED; + adr[0] = IS_CLIPPED; /* clipplanes in eye space */ if (rv3d->rflag & RV3D_CLIPPING) { @@ -286,21 +286,21 @@ static void view3d_project_short_clip_persmat(ARegion *ar, const float vec[3], s } copy_v3_v3(vec4, vec); - vec4[3]= 1.0; + vec4[3] = 1.0; mul_m4_v4(rv3d->persmat, vec4); /* clipplanes in window space */ - if ( vec4[3] > (float)BL_NEAR_CLIP ) { /* is the NEAR clipping cutoff for picking */ - fx= (ar->winx/2)*(1 + vec4[0]/vec4[3]); + if (vec4[3] > (float)BL_NEAR_CLIP) { /* is the NEAR clipping cutoff for picking */ + fx = (ar->winx / 2) * (1 + vec4[0] / vec4[3]); - if ( fx>0 && fxwinx) { + if (fx > 0 && fx < ar->winx) { - fy= (ar->winy/2)*(1 + vec4[1]/vec4[3]); + fy = (ar->winy / 2) * (1 + vec4[1] / vec4[3]); if (fy > 0.0f && fy < (float)ar->winy) { - adr[0]= (short)floorf(fx); - adr[1]= (short)floorf(fy); + adr[0] = (short)floorf(fx); + adr[1] = (short)floorf(fy); } } } @@ -317,7 +317,7 @@ int draw_glsl_material(Scene *scene, Object *ob, View3D *v3d, int dt) return 0; if (!CHECK_OB_DRAWTEXTURE(v3d, dt)) return 0; - if (ob==OBACT && (ob && ob->mode & OB_MODE_WEIGHT_PAINT)) + if (ob == OBACT && (ob && ob->mode & OB_MODE_WEIGHT_PAINT)) return 0; if (scene_use_new_shading_nodes(scene)) return 0; @@ -336,14 +336,13 @@ static int check_alpha_pass(Base *base) return (base->object->dtx & OB_DRAWTRANSP); } - /***/ -static unsigned int colortab[24]= - {0x0, 0xFF88FF, 0xFFBBFF, - 0x403000, 0xFFFF88, 0xFFFFBB, - 0x104040, 0x66CCCC, 0x77CCCC, - 0x104010, 0x55BB55, 0x66FF66, - 0xFFFFFF -}; +/***/ +static unsigned int colortab[24] = +{0x0, 0xFF88FF, 0xFFBBFF, + 0x403000, 0xFFFF88, 0xFFFFBB, + 0x104040, 0x66CCCC, 0x77CCCC, + 0x104010, 0x55BB55, 0x66FF66, + 0xFFFFFF}; static float cube[8][3] = { @@ -434,16 +433,16 @@ static const float cosval[CIRCLE_RESOL] = { static void draw_xyz_wire(const float c[3], float size, int axis) { - float v1[3]= {0.f, 0.f, 0.f}, v2[3] = {0.f, 0.f, 0.f}; + float v1[3] = {0.f, 0.f, 0.f}, v2[3] = {0.f, 0.f, 0.f}; float dim = size * 0.1f; float dx[3], dy[3], dz[3]; - dx[0]=dim; dx[1]=0.f; dx[2]=0.f; - dy[0]=0.f; dy[1]=dim; dy[2]=0.f; - dz[0]=0.f; dz[1]=0.f; dz[2]=dim; + dx[0] = dim; dx[1] = 0.f; dx[2] = 0.f; + dy[0] = 0.f; dy[1] = dim; dy[2] = 0.f; + dz[0] = 0.f; dz[1] = 0.f; dz[2] = dim; - switch(axis) { - case 0: /* x axis */ + switch (axis) { + case 0: /* x axis */ glBegin(GL_LINES); /* bottom left to top right */ @@ -465,7 +464,7 @@ static void draw_xyz_wire(const float c[3], float size, int axis) glEnd(); break; - case 1: /* y axis */ + case 1: /* y axis */ glBegin(GL_LINES); /* bottom left to top right */ @@ -488,7 +487,7 @@ static void draw_xyz_wire(const float c[3], float size, int axis) glEnd(); break; - case 2: /* z axis */ + case 2: /* z axis */ glBegin(GL_LINE_STRIP); /* start at top left */ @@ -521,23 +520,23 @@ static void draw_xyz_wire(const float c[3], float size, int axis) void drawaxes(float size, char drawtype) { int axis; - float v1[3]= {0.0, 0.0, 0.0}; - float v2[3]= {0.0, 0.0, 0.0}; - float v3[3]= {0.0, 0.0, 0.0}; + float v1[3] = {0.0, 0.0, 0.0}; + float v2[3] = {0.0, 0.0, 0.0}; + float v3[3] = {0.0, 0.0, 0.0}; - switch(drawtype) { + switch (drawtype) { case OB_PLAINAXES: - for (axis=0; axis<3; axis++) { + for (axis = 0; axis < 3; axis++) { glBegin(GL_LINES); - v1[axis]= size; - v2[axis]= -size; + v1[axis] = size; + v2[axis] = -size; glVertex3fv(v1); glVertex3fv(v2); /* reset v1 & v2 to zero */ - v1[axis]= v2[axis]= 0.0f; + v1[axis] = v2[axis] = 0.0f; glEnd(); } @@ -546,7 +545,7 @@ void drawaxes(float size, char drawtype) glBegin(GL_LINES); /* in positive z direction only */ - v1[2]= size; + v1[2] = size; glVertex3fv(v1); glVertex3fv(v2); glEnd(); @@ -554,11 +553,11 @@ void drawaxes(float size, char drawtype) /* square pyramid */ glBegin(GL_TRIANGLES); - v2[0]= size * 0.035f; v2[1] = size * 0.035f; - v3[0]= size * -0.035f; v3[1] = size * 0.035f; - v2[2]= v3[2]= size * 0.75f; + v2[0] = size * 0.035f; v2[1] = size * 0.035f; + v3[0] = size * -0.035f; v3[1] = size * 0.035f; + v2[2] = v3[2] = size * 0.75f; - for (axis=0; axis<4; axis++) { + for (axis = 0; axis < 4; axis++) { if (axis % 2 == 1) { v2[0] = -v2[0]; v3[1] = -v3[1]; @@ -595,33 +594,33 @@ void drawaxes(float size, char drawtype) case OB_ARROWS: default: { - for (axis=0; axis<3; axis++) { - const int arrow_axis= (axis==0) ? 1:0; + for (axis = 0; axis < 3; axis++) { + const int arrow_axis = (axis == 0) ? 1 : 0; glBegin(GL_LINES); - v2[axis]= size; + v2[axis] = size; glVertex3fv(v1); glVertex3fv(v2); - v1[axis]= size*0.85f; - v1[arrow_axis]= -size*0.08f; + v1[axis] = size * 0.85f; + v1[arrow_axis] = -size * 0.08f; glVertex3fv(v1); glVertex3fv(v2); - v1[arrow_axis]= size*0.08f; + v1[arrow_axis] = size * 0.08f; glVertex3fv(v1); glVertex3fv(v2); glEnd(); - v2[axis]+= size*0.125f; + v2[axis] += size * 0.125f; draw_xyz_wire(v2, size, axis); /* reset v1 & v2 to zero */ - v1[arrow_axis]= v1[axis]= v2[axis]= 0.0f; + v1[arrow_axis] = v1[axis] = v2[axis] = 0.0f; } break; } @@ -632,7 +631,7 @@ void drawaxes(float size, char drawtype) /* Function to draw an Image on a empty Object */ static void draw_empty_image(Object *ob) { - Image *ima = (Image*)ob->data; + Image *ima = (Image *)ob->data; ImBuf *ibuf = ima ? BKE_image_get_ibuf(ima, NULL) : NULL; float scale, ofs_x, ofs_y, sca_x, sca_y; @@ -644,37 +643,37 @@ static void draw_empty_image(Object *ob) /* Get the buffer dimensions so we can fallback to fake ones */ if (ibuf && ibuf->rect) { - ima_x= ibuf->x; - ima_y= ibuf->y; + ima_x = ibuf->x; + ima_y = ibuf->y; } else { - ima_x= 1; - ima_y= 1; + ima_x = 1; + ima_y = 1; } /* Get the image aspect even if the buffer is invalid */ if (ima) { if (ima->aspx > ima->aspy) { - sca_x= 1.0f; - sca_y= ima->aspy / ima->aspx; + sca_x = 1.0f; + sca_y = ima->aspy / ima->aspx; } else if (ima->aspx < ima->aspy) { - sca_x= ima->aspx / ima->aspy; - sca_y= 1.0f; + sca_x = ima->aspx / ima->aspy; + sca_y = 1.0f; } else { - sca_x= 1.0f; - sca_y= 1.0f; + sca_x = 1.0f; + sca_y = 1.0f; } } else { - sca_x= 1.0f; - sca_y= 1.0f; + sca_x = 1.0f; + sca_y = 1.0f; } /* Calculate the scale center based on objects origin */ - ofs_x= ob->ima_ofs[0] * ima_x; - ofs_y= ob->ima_ofs[1] * ima_y; + ofs_x = ob->ima_ofs[0] * ima_x; + ofs_y = ob->ima_ofs[1] * ima_y; glMatrixMode(GL_MODELVIEW); glPushMatrix(); @@ -683,7 +682,7 @@ static void draw_empty_image(Object *ob) glTranslatef(0.0f, 0.0f, 0.0f); /* Calculate Image scale */ - scale= (ob->empty_drawsize / (float)MAX2(ima_x * sca_x, ima_y * sca_y)); + scale = (ob->empty_drawsize / (float)MAX2(ima_x * sca_x, ima_y * sca_y)); /* Set the object scale */ glScalef(scale * sca_x, scale * sca_y, 1.0f); @@ -721,16 +720,16 @@ static void draw_empty_image(Object *ob) static void circball_array_fill(float verts[CIRCLE_RESOL][3], const float cent[3], float rad, float tmat[][4]) { float vx[3], vy[3]; - float *viter= (float *)verts; + float *viter = (float *)verts; unsigned int a; mul_v3_v3fl(vx, tmat[0], rad); mul_v3_v3fl(vy, tmat[1], rad); - for (a=0; a < CIRCLE_RESOL; a++, viter += 3) { - viter[0]= cent[0] + sinval[a] * vx[0] + cosval[a] * vy[0]; - viter[1]= cent[1] + sinval[a] * vx[1] + cosval[a] * vy[1]; - viter[2]= cent[2] + sinval[a] * vx[2] + cosval[a] * vy[2]; + for (a = 0; a < CIRCLE_RESOL; a++, viter += 3) { + viter[0] = cent[0] + sinval[a] * vx[0] + cosval[a] * vy[0]; + viter[1] = cent[1] + sinval[a] * vx[1] + cosval[a] * vy[1]; + viter[2] = cent[2] + sinval[a] * vx[2] + cosval[a] * vy[2]; } } @@ -749,16 +748,16 @@ void drawcircball(int mode, const float cent[3], float rad, float tmat[][4]) /* circle for object centers, special_color is for library or ob users */ static void drawcentercircle(View3D *v3d, RegionView3D *rv3d, const float co[3], int selstate, int special_color) { - const float size= ED_view3d_pixel_size(rv3d, co) * (float)U.obcenter_dia * 0.5f; + const float size = ED_view3d_pixel_size(rv3d, co) * (float)U.obcenter_dia * 0.5f; float verts[CIRCLE_RESOL][3]; /* using gldepthfunc guarantees that it does write z values, * but not checks for it, so centers remain visible independent order of drawing */ - if (v3d->zbuf) glDepthFunc(GL_ALWAYS); + if (v3d->zbuf) glDepthFunc(GL_ALWAYS); glEnable(GL_BLEND); if (special_color) { - if (selstate==ACTIVE || selstate==SELECT) glColor4ub(0x88, 0xFF, 0xFF, 155); + if (selstate == ACTIVE || selstate == SELECT) glColor4ub(0x88, 0xFF, 0xFF, 155); else glColor4ub(0x55, 0xCC, 0xCC, 155); } @@ -786,12 +785,12 @@ static void drawcentercircle(View3D *v3d, RegionView3D *rv3d, const float co[3], glDisable(GL_BLEND); - if (v3d->zbuf) glDepthFunc(GL_LEQUAL); + if (v3d->zbuf) glDepthFunc(GL_LEQUAL); } /* *********** text drawing for object/particles/armature ************* */ static ListBase CachedText[3]; -static int CachedTextLevel= 0; +static int CachedTextLevel = 0; typedef struct ViewCachedString { struct ViewCachedString *next, *prev; @@ -809,8 +808,8 @@ typedef struct ViewCachedString { void view3d_cached_text_draw_begin(void) { - ListBase *strings= &CachedText[CachedTextLevel]; - strings->first= strings->last= NULL; + ListBase *strings = &CachedText[CachedTextLevel]; + strings->first = strings->last = NULL; CachedTextLevel++; } @@ -819,17 +818,17 @@ void view3d_cached_text_draw_add(const float co[3], short xoffs, short flag, const unsigned char col[4]) { - int alloc_len= strlen(str) + 1; - ListBase *strings= &CachedText[CachedTextLevel-1]; + int alloc_len = strlen(str) + 1; + ListBase *strings = &CachedText[CachedTextLevel - 1]; /* TODO, replace with more efficient malloc, perhaps memarena per draw? */ - ViewCachedString *vos= MEM_callocN(sizeof(ViewCachedString) + alloc_len, "ViewCachedString"); + ViewCachedString *vos = MEM_callocN(sizeof(ViewCachedString) + alloc_len, "ViewCachedString"); BLI_addtail(strings, vos); copy_v3_v3(vos->vec, co); - vos->col.pack= *((int *)col); - vos->xoffs= xoffs; - vos->flag= flag; - vos->str_len= alloc_len-1; + vos->col.pack = *((int *)col); + vos->xoffs = xoffs; + vos->flag = flag; + vos->str_len = alloc_len - 1; /* allocate past the end */ memcpy(++vos, str, alloc_len); @@ -837,13 +836,13 @@ void view3d_cached_text_draw_add(const float co[3], void view3d_cached_text_draw_end(View3D *v3d, ARegion *ar, int depth_write, float mat[][4]) { - RegionView3D *rv3d= ar->regiondata; - ListBase *strings= &CachedText[CachedTextLevel-1]; + RegionView3D *rv3d = ar->regiondata; + ListBase *strings = &CachedText[CachedTextLevel - 1]; ViewCachedString *vos; - int tot= 0; + int tot = 0; /* project first and test */ - for (vos= strings->first; vos; vos= vos->next) { + for (vos = strings->first; vos; vos = vos->next) { if (mat && !(vos->flag & V3D_CACHE_TEXT_WORLDSPACE)) mul_m4_v3(mat, vos->vec); @@ -852,12 +851,12 @@ void view3d_cached_text_draw_end(View3D *v3d, ARegion *ar, int depth_write, floa else view3d_project_short_clip(ar, vos->vec, vos->sco, (vos->flag & V3D_CACHE_TEXT_LOCALCLIP) != 0); - if (vos->sco[0]!=IS_CLIPPED) + if (vos->sco[0] != IS_CLIPPED) tot++; } if (tot) { - int col_pack_prev= 0; + int col_pack_prev = 0; #if 0 bglMats mats; /* ZBuffer depth vars */ @@ -884,34 +883,34 @@ void view3d_cached_text_draw_end(View3D *v3d, ARegion *ar, int depth_write, floa glDepthMask(0); } - for (vos= strings->first; vos; vos= vos->next) { + for (vos = strings->first; vos; vos = vos->next) { /* too slow, reading opengl info while drawing is very bad, * better to see if we can use the zbuffer while in pixel space - campbell */ #if 0 if (v3d->zbuf && (vos->flag & V3D_CACHE_TEXT_ZBUF)) { gluProject(vos->vec[0], vos->vec[1], vos->vec[2], mats.modelview, mats.projection, (GLint *)mats.viewport, &ux, &uy, &uz); - glReadPixels(ar->winrct.xmin+vos->mval[0]+vos->xoffs, ar->winrct.ymin+vos->mval[1], 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &depth); + glReadPixels(ar->winrct.xmin + vos->mval[0] + vos->xoffs, ar->winrct.ymin + vos->mval[1], 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &depth); if (uz > depth) continue; } #endif - if (vos->sco[0]!=IS_CLIPPED) { - const char *str= (char *)(vos+1); + if (vos->sco[0] != IS_CLIPPED) { + const char *str = (char *)(vos + 1); if (col_pack_prev != vos->col.pack) { glColor3ubv(vos->col.ub); - col_pack_prev= vos->col.pack; + col_pack_prev = vos->col.pack; } ((vos->flag & V3D_CACHE_TEXT_ASCII) ? - BLF_draw_default_ascii : - BLF_draw_default - ) ( (float)vos->sco[0] + vos->xoffs, - (float)vos->sco[1], - (depth_write) ? 0.0f: 2.0f, - str, - vos->str_len); + BLF_draw_default_ascii : + BLF_draw_default + )( (float)vos->sco[0] + vos->xoffs, + (float)vos->sco[1], + (depth_write) ? 0.0f : 2.0f, + str, + vos->str_len); } } @@ -942,8 +941,8 @@ static void drawcube(void) { glBegin(GL_LINE_STRIP); - glVertex3fv(cube[0]); glVertex3fv(cube[1]);glVertex3fv(cube[2]); glVertex3fv(cube[3]); - glVertex3fv(cube[0]); glVertex3fv(cube[4]);glVertex3fv(cube[5]); glVertex3fv(cube[6]); + glVertex3fv(cube[0]); glVertex3fv(cube[1]); glVertex3fv(cube[2]); glVertex3fv(cube[3]); + glVertex3fv(cube[0]); glVertex3fv(cube[4]); glVertex3fv(cube[5]); glVertex3fv(cube[6]); glVertex3fv(cube[7]); glVertex3fv(cube[4]); glEnd(); @@ -966,25 +965,25 @@ static void drawcube(void) static void drawcube_size(float size) { glBegin(GL_LINE_STRIP); - glVertex3f(-size,-size,-size); glVertex3f(-size,-size,size); - glVertex3f(-size,size,size); glVertex3f(-size,size,-size); + glVertex3f(-size, -size, -size); glVertex3f(-size, -size, size); + glVertex3f(-size, size, size); glVertex3f(-size, size, -size); - glVertex3f(-size,-size,-size); glVertex3f(size,-size,-size); - glVertex3f(size,-size,size); glVertex3f(size,size,size); + glVertex3f(-size, -size, -size); glVertex3f(size, -size, -size); + glVertex3f(size, -size, size); glVertex3f(size, size, size); - glVertex3f(size,size,-size); glVertex3f(size,-size,-size); + glVertex3f(size, size, -size); glVertex3f(size, -size, -size); glEnd(); glBegin(GL_LINE_STRIP); - glVertex3f(-size,-size,size); glVertex3f(size,-size,size); + glVertex3f(-size, -size, size); glVertex3f(size, -size, size); glEnd(); glBegin(GL_LINE_STRIP); - glVertex3f(-size,size,size); glVertex3f(size,size,size); + glVertex3f(-size, size, size); glVertex3f(size, size, size); glEnd(); glBegin(GL_LINE_STRIP); - glVertex3f(-size,size,-size); glVertex3f(size,size,-size); + glVertex3f(-size, size, -size); glVertex3f(size, size, -size); glEnd(); } @@ -998,8 +997,8 @@ static void drawcube_size(const float size[3]) glBegin(GL_LINE_STRIP); - glVertex3fv(cube[0]); glVertex3fv(cube[1]);glVertex3fv(cube[2]); glVertex3fv(cube[3]); - glVertex3fv(cube[0]); glVertex3fv(cube[4]);glVertex3fv(cube[5]); glVertex3fv(cube[6]); + glVertex3fv(cube[0]); glVertex3fv(cube[1]); glVertex3fv(cube[2]); glVertex3fv(cube[3]); + glVertex3fv(cube[0]); glVertex3fv(cube[4]); glVertex3fv(cube[5]); glVertex3fv(cube[6]); glVertex3fv(cube[7]); glVertex3fv(cube[4]); glEnd(); @@ -1047,17 +1046,17 @@ static void drawshadbuflimits(Lamp *la, float mat[][4]) static void spotvolume(float lvec[3], float vvec[3], const float inp) { /* camera is at 0,0,0 */ - float temp[3],plane[3],mat1[3][3],mat2[3][3],mat3[3][3],mat4[3][3],q[4],co,si,angle; + float temp[3], plane[3], mat1[3][3], mat2[3][3], mat3[3][3], mat4[3][3], q[4], co, si, angle; normalize_v3(lvec); - normalize_v3(vvec); /* is this the correct vector ? */ + normalize_v3(vvec); /* is this the correct vector ? */ - cross_v3_v3v3(temp,vvec,lvec); /* equation for a plane through vvec en lvec */ - cross_v3_v3v3(plane,lvec,temp); /* a plane perpendicular to this, parrallel with lvec */ + cross_v3_v3v3(temp, vvec, lvec); /* equation for a plane through vvec en lvec */ + cross_v3_v3v3(plane, lvec, temp); /* a plane perpendicular to this, parrallel with lvec */ /* vectors are exactly aligned, use the X axis, this is arbitrary */ if (normalize_v3(plane) == 0.0f) - plane[1]= 1.0f; + plane[1] = 1.0f; /* now we've got two equations: one of a cone and one of a plane, but we have * three unknowns. We remove one unknown by rotating the plane to z=0 (the plane normal) */ @@ -1072,46 +1071,46 @@ static void spotvolume(float lvec[3], float vvec[3], const float inp) q[3] = 0; normalize_v3(&q[1]); - angle = saacos(plane[2])/2.0f; + angle = saacos(plane[2]) / 2.0f; co = cosf(angle); - si = sqrtf(1-co*co); + si = sqrtf(1 - co * co); q[0] = co; q[1] *= si; q[2] *= si; q[3] = 0; - quat_to_mat3(mat1,q); + quat_to_mat3(mat1, q); /* rotate lamp vector now over acos(inp) degrees */ copy_v3_v3(vvec, lvec); unit_m3(mat2); co = inp; - si = sqrtf(1.0f-inp*inp); + si = sqrtf(1.0f - inp * inp); mat2[0][0] = co; mat2[1][0] = -si; mat2[0][1] = si; mat2[1][1] = co; - mul_m3_m3m3(mat3,mat2,mat1); + mul_m3_m3m3(mat3, mat2, mat1); mat2[1][0] = si; mat2[0][1] = -si; - mul_m3_m3m3(mat4,mat2,mat1); + mul_m3_m3m3(mat4, mat2, mat1); transpose_m3(mat1); - mul_m3_m3m3(mat2,mat1,mat3); - mul_m3_v3(mat2,lvec); - mul_m3_m3m3(mat2,mat1,mat4); - mul_m3_v3(mat2,vvec); + mul_m3_m3m3(mat2, mat1, mat3); + mul_m3_v3(mat2, lvec); + mul_m3_m3m3(mat2, mat1, mat4); + mul_m3_v3(mat2, vvec); return; } static void draw_spot_cone(Lamp *la, float x, float z) { - z= fabs(z); + z = fabs(z); glBegin(GL_TRIANGLE_FAN); glVertex3f(0.0f, 0.0f, -x); @@ -1127,9 +1126,9 @@ static void draw_spot_cone(Lamp *la, float x, float z) float angle; int a; - for (a=0; a<33; a++) { - angle= a*M_PI*2/(33-1); - glVertex3f(z*cosf(angle), z*sinf(angle), 0); + for (a = 0; a < 33; a++) { + angle = a * M_PI * 2 / (33 - 1); + glVertex3f(z * cosf(angle), z * sinf(angle), 0); } } @@ -1168,22 +1167,22 @@ static void draw_transp_spot_volume(Lamp *la, float x, float z) static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, int dt, int flag) { - Object *ob= base->object; - const float pixsize= ED_view3d_pixel_size(rv3d, ob->obmat[3]); - Lamp *la= ob->data; - float vec[3], lvec[3], vvec[3], circrad, x,y,z; + Object *ob = base->object; + const float pixsize = ED_view3d_pixel_size(rv3d, ob->obmat[3]); + Lamp *la = ob->data; + float vec[3], lvec[3], vvec[3], circrad, x, y, z; float lampsize; float imat[4][4], curcol[4]; unsigned char col[4]; /* cone can't be drawn for duplicated lamps, because duplilist would be freed to */ /* the moment of view3d_draw_transp() call */ - const short is_view= (rv3d->persp==RV3D_CAMOB && v3d->camera == base->object); - const short drawcone= ((dt > OB_WIRE) && - !(G.f & G_PICKSEL) && - (la->type == LA_SPOT) && - (la->mode & LA_SHOW_CONE) && - !(base->flag & OB_FROMDUPLI) && - !is_view); + const short is_view = (rv3d->persp == RV3D_CAMOB && v3d->camera == base->object); + const short drawcone = ((dt > OB_WIRE) && + !(G.f & G_PICKSEL) && + (la->type == LA_SPOT) && + (la->mode & LA_SHOW_CONE) && + !(base->flag & OB_FROMDUPLI) && + !is_view); if (drawcone && !v3d->transp) { /* in this case we need to draw delayed */ @@ -1196,7 +1195,7 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, glLoadMatrixf(rv3d->viewmat); /* lets calculate the scale: */ - lampsize= pixsize*((float)U.obcenter_dia*0.5f); + lampsize = pixsize * ((float)U.obcenter_dia * 0.5f); /* and view aligned matrix: */ copy_m4_m4(imat, rv3d->viewinv); @@ -1208,13 +1207,13 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, /* for AA effects */ glGetFloatv(GL_CURRENT_COLOR, curcol); - curcol[3]= 0.6; + curcol[3] = 0.6; glColor4fv(curcol); if (lampsize > 0.0f) { - if (ob->id.us>1) { - if (ob==OBACT || (ob->flag & SELECT)) glColor4ub(0x88, 0xFF, 0xFF, 155); + if (ob->id.us > 1) { + if (ob == OBACT || (ob->flag & SELECT)) glColor4ub(0x88, 0xFF, 0xFF, 155); else glColor4ub(0x77, 0xCC, 0xCC, 155); } @@ -1225,19 +1224,19 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, drawcircball(GL_POLYGON, vec, lampsize, imat); /* restore */ - if (ob->id.us>1) + if (ob->id.us > 1) glColor4fv(curcol); /* Outer circle */ - circrad = 3.0f*lampsize; + circrad = 3.0f * lampsize; setlinestyle(3); drawcircball(GL_LINE_LOOP, vec, circrad, imat); /* draw dashed outer circle if shadow is on. remember some lamps can't have certain shadows! */ - if (la->type!=LA_HEMI) { + if (la->type != LA_HEMI) { if ((la->mode & LA_SHAD_RAY) || ((la->mode & LA_SHAD_BUF) && (la->type == LA_SPOT))) { - drawcircball(GL_LINE_LOOP, vec, circrad + 3.0f*pixsize, imat); + drawcircball(GL_LINE_LOOP, vec, circrad + 3.0f * pixsize, imat); } } } @@ -1247,12 +1246,12 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, } /* draw the pretty sun rays */ - if (la->type==LA_SUN) { + if (la->type == LA_SUN) { float v1[3], v2[3], mat[3][3]; short axis; /* setup a 45 degree rotation matrix */ - vec_rot_to_mat3(mat, imat[2], (float)M_PI/4.0f); + vec_rot_to_mat3(mat, imat[2], (float)M_PI / 4.0f); /* vectors */ mul_v3_v3fl(v1, imat[0], circrad * 1.2f); @@ -1264,7 +1263,7 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, setlinestyle(3); glBegin(GL_LINES); - for (axis=0; axis<8; axis++) { + for (axis = 0; axis < 8; axis++) { glVertex3fv(v1); glVertex3fv(v2); mul_m3_v3(mat, v1); @@ -1276,30 +1275,30 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, } - if (la->type==LA_LOCAL) { + if (la->type == LA_LOCAL) { if (la->mode & LA_SPHERE) { drawcircball(GL_LINE_LOOP, vec, la->dist, imat); } /* yafray: for photonlight also draw lightcone as for spot */ } - glPopMatrix(); /* back in object space */ + glPopMatrix(); /* back in object space */ zero_v3(vec); if (is_view) { /* skip drawing extra info */ } - else if ((la->type==LA_SPOT) || (la->type==LA_YF_PHOTON)) { - lvec[0]=lvec[1]= 0.0; + else if ((la->type == LA_SPOT) || (la->type == LA_YF_PHOTON)) { + lvec[0] = lvec[1] = 0.0; lvec[2] = 1.0; x = rv3d->persmat[0][2]; y = rv3d->persmat[1][2]; z = rv3d->persmat[2][2]; - vvec[0]= x*ob->obmat[0][0] + y*ob->obmat[0][1] + z*ob->obmat[0][2]; - vvec[1]= x*ob->obmat[1][0] + y*ob->obmat[1][1] + z*ob->obmat[1][2]; - vvec[2]= x*ob->obmat[2][0] + y*ob->obmat[2][1] + z*ob->obmat[2][2]; + vvec[0] = x * ob->obmat[0][0] + y * ob->obmat[0][1] + z * ob->obmat[0][2]; + vvec[1] = x * ob->obmat[1][0] + y * ob->obmat[1][1] + z * ob->obmat[1][2]; + vvec[2] = x * ob->obmat[2][0] + y * ob->obmat[2][1] + z * ob->obmat[2][2]; - y = cosf(la->spotsize*(float)(M_PI/360.0)); + y = cosf(la->spotsize * (float)(M_PI / 360.0)); spotvolume(lvec, vvec, y); x = -la->dist; mul_v3_fl(lvec, x); @@ -1312,33 +1311,33 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, glVertex3fv(lvec); glEnd(); - z = x*sqrtf(1.0f - y*y); + z = x * sqrtf(1.0f - y * y); x *= y; /* draw the circle/square at the end of the cone */ - glTranslatef(0.0, 0.0 , x); + glTranslatef(0.0, 0.0, x); if (la->mode & LA_SQUARE) { float tvec[3]; - float z_abs= fabs(z); + float z_abs = fabs(z); - tvec[0]= tvec[1]= z_abs; - tvec[2]= 0.0; + tvec[0] = tvec[1] = z_abs; + tvec[2] = 0.0; glBegin(GL_LINE_LOOP); glVertex3fv(tvec); - tvec[1]= -z_abs; /* neg */ + tvec[1] = -z_abs; /* neg */ glVertex3fv(tvec); - tvec[0]= -z_abs; /* neg */ + tvec[0] = -z_abs; /* neg */ glVertex3fv(tvec); - tvec[1]= z_abs; /* pos */ + tvec[1] = z_abs; /* pos */ glVertex3fv(tvec); glEnd(); } else circ(0.0, 0.0, fabsf(z)); /* draw the circle/square representing spotbl */ - if (la->type==LA_SPOT) { - float spotblcirc = fabs(z)*(1 - pow(la->spotblend, 2)); + if (la->type == LA_SPOT) { + float spotblcirc = fabs(z) * (1 - pow(la->spotblend, 2)); /* hide line if it is zero size or overlaps with outer border, * previously it adjusted to always to show it but that seems * confusing because it doesn't show the actual blend size */ @@ -1350,11 +1349,11 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, draw_transp_spot_volume(la, x, z); /* draw clip start, useful for wide cones where its not obvious where the start is */ - glTranslatef(0.0, 0.0 , -x); /* reverse translation above */ - if (la->type==LA_SPOT && (la->mode & LA_SHAD_BUF) ) { + glTranslatef(0.0, 0.0, -x); /* reverse translation above */ + if (la->type == LA_SPOT && (la->mode & LA_SHAD_BUF) ) { float lvec_clip[3]; float vvec_clip[3]; - float clipsta_fac= la->clipsta / -x; + float clipsta_fac = la->clipsta / -x; interp_v3_v3v3(lvec_clip, vec, lvec, clipsta_fac); interp_v3_v3v3(vvec_clip, vec, vvec, clipsta_fac); @@ -1371,11 +1370,11 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, glBegin(GL_LINE_STRIP); vec[2] = -circrad; glVertex3fv(vec); - vec[2]= -la->dist; + vec[2] = -la->dist; glVertex3fv(vec); glEnd(); - if (la->type==LA_HEMI) { + if (la->type == LA_HEMI) { /* draw the hemisphere curves */ short axis, steps, dir; float outdist, zdist, mul; @@ -1384,24 +1383,24 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, setlinestyle(4); /* loop over the 4 compass points, and draw each arc as a LINE_STRIP */ - for (axis=0; axis<4; axis++) { - float v[3]= {0.0, 0.0, 0.0}; + for (axis = 0; axis < 4; axis++) { + float v[3] = {0.0, 0.0, 0.0}; zdist = 0.02; glBegin(GL_LINE_STRIP); - for (steps=0; steps<6; steps++) { - if (axis == 0 || axis == 1) { /* x axis up, x axis down */ + for (steps = 0; steps < 6; steps++) { + if (axis == 0 || axis == 1) { /* x axis up, x axis down */ /* make the arcs start at the edge of the energy circle */ - if (steps == 0) v[0] = dir*circrad; - else v[0] = v[0] + dir*(steps*outdist); + if (steps == 0) v[0] = dir * circrad; + else v[0] = v[0] + dir * (steps * outdist); } - else if (axis == 2 || axis == 3) { /* y axis up, y axis down */ + else if (axis == 2 || axis == 3) { /* y axis up, y axis down */ /* make the arcs start at the edge of the energy circle */ v[1] = (steps == 0) ? (dir * circrad) : (v[1] + dir * (steps * outdist)); } - v[2] = v[2] - steps*zdist; + v[2] = v[2] - steps * zdist; glVertex3fv(v); @@ -1414,16 +1413,16 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, } } } - else if (la->type==LA_AREA) { + else if (la->type == LA_AREA) { setlinestyle(3); - if (la->area_shape==LA_AREA_SQUARE) - fdrawbox(-la->area_size*0.5f, -la->area_size*0.5f, la->area_size*0.5f, la->area_size*0.5f); - else if (la->area_shape==LA_AREA_RECT) - fdrawbox(-la->area_size*0.5f, -la->area_sizey*0.5f, la->area_size*0.5f, la->area_sizey*0.5f); + if (la->area_shape == LA_AREA_SQUARE) + fdrawbox(-la->area_size * 0.5f, -la->area_size * 0.5f, la->area_size * 0.5f, la->area_size * 0.5f); + else if (la->area_shape == LA_AREA_RECT) + fdrawbox(-la->area_size * 0.5f, -la->area_sizey * 0.5f, la->area_size * 0.5f, la->area_sizey * 0.5f); glBegin(GL_LINE_STRIP); - glVertex3f(0.0,0.0,-circrad); - glVertex3f(0.0,0.0,-la->dist); + glVertex3f(0.0, 0.0, -circrad); + glVertex3f(0.0, 0.0, -la->dist); glEnd(); } @@ -1442,12 +1441,12 @@ static void drawlamp(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, glEnable(GL_BLEND); - if (vec[2]>0) vec[2] -= circrad; + if (vec[2] > 0) vec[2] -= circrad; else vec[2] += circrad; glBegin(GL_LINE_STRIP); glVertex3fv(vec); - vec[2]= 0; + vec[2] = 0; glVertex3fv(vec); glEnd(); @@ -1495,22 +1494,22 @@ static void draw_focus_cross(float dist, float size) #ifdef VIEW3D_CAMERA_BORDER_HACK float view3d_camera_border_hack_col[4]; -short view3d_camera_border_hack_test= FALSE; +short view3d_camera_border_hack_test = FALSE; #endif /* ****************** draw clip data *************** */ static void draw_bundle_sphere(void) { - static GLuint displist= 0; + static GLuint displist = 0; if (displist == 0) { GLUquadricObj *qobj; - displist= glGenLists(1); + displist = glGenLists(1); glNewList(displist, GL_COMPILE); - qobj= gluNewQuadric(); + qobj = gluNewQuadric(); gluQuadricDrawStyle(qobj, GLU_FILL); glShadeModel(GL_SMOOTH); gluSphere(qobj, 0.05, 8, 8); @@ -1527,12 +1526,12 @@ static void draw_viewport_object_reconstruction(Scene *scene, Base *base, View3D MovieClip *clip, MovieTrackingObject *tracking_object, int flag, int *global_track_index, int draw_selected) { - MovieTracking *tracking= &clip->tracking; + MovieTracking *tracking = &clip->tracking; MovieTrackingTrack *track; float mat[4][4], imat[4][4]; unsigned char col[4], scol[4]; - int tracknr= *global_track_index; - ListBase *tracksbase= BKE_tracking_object_tracks(tracking, tracking_object); + int tracknr = *global_track_index; + ListBase *tracksbase = BKE_tracking_object_tracks(tracking, tracking_object); UI_GetThemeColor4ubv(TH_TEXT, col); UI_GetThemeColor4ubv(TH_SELECT, scol); @@ -1559,31 +1558,31 @@ static void draw_viewport_object_reconstruction(Scene *scene, Base *base, View3D glMultMatrixf(imat); } - for (track= tracksbase->first; track; track= track->next) { - int selected= TRACK_SELECTED(track); + for (track = tracksbase->first; track; track = track->next) { + int selected = TRACK_SELECTED(track); if (draw_selected && !selected) continue; - if ((track->flag&TRACK_HAS_BUNDLE)==0) + if ((track->flag & TRACK_HAS_BUNDLE) == 0) continue; - if (flag&DRAW_PICKING) - glLoadName(base->selcol + (tracknr<<16)); + if (flag & DRAW_PICKING) + glLoadName(base->selcol + (tracknr << 16)); glPushMatrix(); glTranslatef(track->bundle_pos[0], track->bundle_pos[1], track->bundle_pos[2]); - glScalef(v3d->bundle_size/0.05f, v3d->bundle_size/0.05f, v3d->bundle_size/0.05f); + glScalef(v3d->bundle_size / 0.05f, v3d->bundle_size / 0.05f, v3d->bundle_size / 0.05f); - if (v3d->drawtype==OB_WIRE) { + if (v3d->drawtype == OB_WIRE) { glDisable(GL_LIGHTING); if (selected) { - if (base==BASACT) UI_ThemeColor(TH_ACTIVE); + if (base == BASACT) UI_ThemeColor(TH_ACTIVE); else UI_ThemeColor(TH_SELECT); } else { - if (track->flag&TRACK_CUSTOMCOLOR) glColor3fv(track->color); + if (track->flag & TRACK_CUSTOMCOLOR) glColor3fv(track->color); else UI_ThemeColor(TH_WIRE); } @@ -1591,11 +1590,11 @@ static void draw_viewport_object_reconstruction(Scene *scene, Base *base, View3D glEnable(GL_LIGHTING); } - else if (v3d->drawtype>OB_WIRE) { - if (v3d->bundle_drawtype==OB_EMPTY_SPHERE) { + else if (v3d->drawtype > OB_WIRE) { + if (v3d->bundle_drawtype == OB_EMPTY_SPHERE) { /* selection outline */ if (selected) { - if (base==BASACT) UI_ThemeColor(TH_ACTIVE); + if (base == BASACT) UI_ThemeColor(TH_ACTIVE); else UI_ThemeColor(TH_SELECT); glLineWidth(2.f); @@ -1609,7 +1608,7 @@ static void draw_viewport_object_reconstruction(Scene *scene, Base *base, View3D glLineWidth(1.f); } - if (track->flag&TRACK_CUSTOMCOLOR) glColor3fv(track->color); + if (track->flag & TRACK_CUSTOMCOLOR) glColor3fv(track->color); else UI_ThemeColor(TH_BUNDLE_SOLID); draw_bundle_sphere(); @@ -1618,11 +1617,11 @@ static void draw_viewport_object_reconstruction(Scene *scene, Base *base, View3D glDisable(GL_LIGHTING); if (selected) { - if (base==BASACT) UI_ThemeColor(TH_ACTIVE); + if (base == BASACT) UI_ThemeColor(TH_ACTIVE); else UI_ThemeColor(TH_SELECT); } else { - if (track->flag&TRACK_CUSTOMCOLOR) glColor3fv(track->color); + if (track->flag & TRACK_CUSTOMCOLOR) glColor3fv(track->color); else UI_ThemeColor(TH_WIRE); } @@ -1634,7 +1633,7 @@ static void draw_viewport_object_reconstruction(Scene *scene, Base *base, View3D glPopMatrix(); - if ((flag & DRAW_PICKING)==0 && (v3d->flag2&V3D_SHOW_BUNDLENAME)) { + if ((flag & DRAW_PICKING) == 0 && (v3d->flag2 & V3D_SHOW_BUNDLENAME)) { float pos[3]; unsigned char tcol[4]; @@ -1648,21 +1647,21 @@ static void draw_viewport_object_reconstruction(Scene *scene, Base *base, View3D tracknr++; } - if ((flag & DRAW_PICKING)==0) { - if ((v3d->flag2&V3D_SHOW_CAMERAPATH) && (tracking_object->flag&TRACKING_OBJECT_CAMERA)) { + if ((flag & DRAW_PICKING) == 0) { + if ((v3d->flag2 & V3D_SHOW_CAMERAPATH) && (tracking_object->flag & TRACKING_OBJECT_CAMERA)) { MovieTrackingReconstruction *reconstruction; - reconstruction= BKE_tracking_object_reconstruction(tracking, tracking_object); + reconstruction = BKE_tracking_object_reconstruction(tracking, tracking_object); if (reconstruction->camnr) { - MovieReconstructedCamera *camera= reconstruction->cameras; - int a= 0; + MovieReconstructedCamera *camera = reconstruction->cameras; + int a = 0; glDisable(GL_LIGHTING); UI_ThemeColor(TH_CAMERA_PATH); glLineWidth(2.0f); glBegin(GL_LINE_STRIP); - for (a= 0; acamnr; a++, camera++) { + for (a = 0; a < reconstruction->camnr; a++, camera++) { glVertex3fv(camera->mat[3]); } glEnd(); @@ -1675,21 +1674,21 @@ static void draw_viewport_object_reconstruction(Scene *scene, Base *base, View3D glPopMatrix(); - *global_track_index= tracknr; + *global_track_index = tracknr; } static void draw_viewport_reconstruction(Scene *scene, Base *base, View3D *v3d, MovieClip *clip, int flag, int draw_selected) { - MovieTracking *tracking= &clip->tracking; + MovieTracking *tracking = &clip->tracking; MovieTrackingObject *tracking_object; float curcol[4]; - int global_track_index= 1; + int global_track_index = 1; - if ((v3d->flag2&V3D_SHOW_RECONSTRUCTION)==0) + if ((v3d->flag2 & V3D_SHOW_RECONSTRUCTION) == 0) return; - if (v3d->flag2&V3D_RENDER_OVERRIDE) + if (v3d->flag2 & V3D_RENDER_OVERRIDE) return; glGetFloatv(GL_CURRENT_COLOR, curcol); @@ -1699,12 +1698,12 @@ static void draw_viewport_reconstruction(Scene *scene, Base *base, View3D *v3d, glEnable(GL_COLOR_MATERIAL); glShadeModel(GL_SMOOTH); - tracking_object= tracking->objects.first; + tracking_object = tracking->objects.first; while (tracking_object) { draw_viewport_object_reconstruction(scene, base, v3d, clip, tracking_object, flag, &global_track_index, draw_selected); - tracking_object= tracking_object->next; + tracking_object = tracking_object->next; } /* restore */ @@ -1714,7 +1713,7 @@ static void draw_viewport_reconstruction(Scene *scene, Base *base, View3D *v3d, glColor4fv(curcol); - if (flag&DRAW_PICKING) + if (flag & DRAW_PICKING) glLoadName(base->selcol); } @@ -1723,13 +1722,13 @@ static void drawcamera(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base { /* a standing up pyramid with (0,0,0) as top */ Camera *cam; - Object *ob= base->object; + Object *ob = base->object; float tvec[3]; float vec[4][3], asp[2], shift[2], scale[3]; int i; float drawsize; - const short is_view= (rv3d->persp==RV3D_CAMOB && ob==v3d->camera); - MovieClip *clip= object_get_movieclip(scene, base->object, 0); + const short is_view = (rv3d->persp == RV3D_CAMOB && ob == v3d->camera); + MovieClip *clip = object_get_movieclip(scene, base->object, 0); /* draw data for movie clip set as active for scene */ if (clip) { @@ -1740,16 +1739,16 @@ static void drawcamera(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base #ifdef VIEW3D_CAMERA_BORDER_HACK if (is_view && !(G.f & G_PICKSEL)) { glGetFloatv(GL_CURRENT_COLOR, view3d_camera_border_hack_col); - view3d_camera_border_hack_test= TRUE; + view3d_camera_border_hack_test = TRUE; return; } #endif - cam= ob->data; + cam = ob->data; - scale[0]= 1.0f / len_v3(ob->obmat[0]); - scale[1]= 1.0f / len_v3(ob->obmat[1]); - scale[2]= 1.0f / len_v3(ob->obmat[2]); + scale[0] = 1.0f / len_v3(ob->obmat[0]); + scale[1] = 1.0f / len_v3(ob->obmat[1]); + scale[2] = 1.0f / len_v3(ob->obmat[2]); camera_view_frame_ex(scene, cam, cam->drawsize, is_view, scale, asp, shift, &drawsize, vec); @@ -1782,33 +1781,33 @@ static void drawcamera(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base /* arrow on top */ - tvec[2]= vec[1][2]; /* copy the depth */ + tvec[2] = vec[1][2]; /* copy the depth */ /* draw an outline arrow for inactive cameras and filled * for active cameras. We actually draw both outline+filled * for active cameras so the wire can be seen side-on */ - for (i=0;i<2;i++) { - if (i==0) glBegin(GL_LINE_LOOP); - else if (i==1 && (ob == v3d->camera)) glBegin(GL_TRIANGLES); + for (i = 0; i < 2; i++) { + if (i == 0) glBegin(GL_LINE_LOOP); + else if (i == 1 && (ob == v3d->camera)) glBegin(GL_TRIANGLES); else break; - tvec[0]= shift[0] + ((-0.7f * drawsize) * scale[0]); - tvec[1]= shift[1] + ((drawsize * (asp[1] + 0.1f)) * scale[1]); + tvec[0] = shift[0] + ((-0.7f * drawsize) * scale[0]); + tvec[1] = shift[1] + ((drawsize * (asp[1] + 0.1f)) * scale[1]); glVertex3fv(tvec); /* left */ - tvec[0]= shift[0] + ((0.7f * drawsize) * scale[0]); + tvec[0] = shift[0] + ((0.7f * drawsize) * scale[0]); glVertex3fv(tvec); /* right */ - tvec[0]= shift[0]; - tvec[1]= shift[1] + ((1.1f * drawsize * (asp[1] + 0.7f)) * scale[1]); + tvec[0] = shift[0]; + tvec[1] = shift[1] + ((1.1f * drawsize * (asp[1] + 0.7f)) * scale[1]); glVertex3fv(tvec); /* top */ glEnd(); } - if (flag==0) { - if (cam->flag & (CAM_SHOWLIMITS+CAM_SHOWMIST)) { + if (flag == 0) { + if (cam->flag & (CAM_SHOWLIMITS + CAM_SHOWMIST)) { float nobmat[4][4]; World *wrld; @@ -1826,9 +1825,9 @@ static void drawcamera(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base draw_focus_cross(object_camera_dof_distance(ob), cam->drawsize); } - wrld= scene->world; + wrld = scene->world; if (cam->flag & CAM_SHOWMIST) - if (wrld) draw_limit_line(wrld->miststa, wrld->miststa+wrld->mistdist, 0xFFFFFF); + if (wrld) draw_limit_line(wrld->miststa, wrld->miststa + wrld->mistdist, 0xFFFFFF); glPopMatrix(); } @@ -1847,7 +1846,7 @@ static void drawspeaker(Scene *UNUSED(scene), View3D *UNUSED(v3d), RegionView3D glEnable(GL_BLEND); for (j = 0; j < 3; j++) { - vec[2] = 0.25f * j -0.125f; + vec[2] = 0.25f * j - 0.125f; glBegin(GL_LINE_LOOP); for (i = 0; i < 16; i++) { @@ -1868,7 +1867,7 @@ static void drawspeaker(Scene *UNUSED(scene), View3D *UNUSED(v3d), RegionView3D vec[1] *= 0.5f; } - vec[2] = 0.25f * i -0.125f; + vec[2] = 0.25f * i - 0.125f; glVertex3fv(vec); } glEnd(); @@ -1880,23 +1879,23 @@ static void drawspeaker(Scene *UNUSED(scene), View3D *UNUSED(v3d), RegionView3D static void lattice_draw_verts(Lattice *lt, DispList *dl, short sel) { BPoint *bp = lt->def; - float *co = dl?dl->verts:NULL; + float *co = dl ? dl->verts : NULL; int u, v, w; - UI_ThemeColor(sel?TH_VERTEX_SELECT:TH_VERTEX); + UI_ThemeColor(sel ? TH_VERTEX_SELECT : TH_VERTEX); glPointSize(UI_GetThemeValuef(TH_VERTEX_SIZE)); bglBegin(GL_POINTS); - for (w=0; wpntsw; w++) { - int wxt = (w==0 || w==lt->pntsw-1); - for (v=0; vpntsv; v++) { - int vxt = (v==0 || v==lt->pntsv-1); - for (u=0; upntsu; u++, bp++, co+=3) { - int uxt = (u==0 || u==lt->pntsu-1); + for (w = 0; w < lt->pntsw; w++) { + int wxt = (w == 0 || w == lt->pntsw - 1); + for (v = 0; v < lt->pntsv; v++) { + int vxt = (v == 0 || v == lt->pntsv - 1); + for (u = 0; u < lt->pntsu; u++, bp++, co += 3) { + int uxt = (u == 0 || u == lt->pntsu - 1); if (!(lt->flag & LT_OUTSIDE) || uxt || vxt || wxt) { - if (bp->hide==0) { - if ((bp->f1 & SELECT)==sel) { - bglVertex3fv(dl?co:bp->vec); + if (bp->hide == 0) { + if ((bp->f1 & SELECT) == sel) { + bglVertex3fv(dl ? co : bp->vec); } } } @@ -1910,19 +1909,19 @@ static void lattice_draw_verts(Lattice *lt, DispList *dl, short sel) void lattice_foreachScreenVert(ViewContext *vc, void (*func)(void *userData, BPoint *bp, int x, int y), void *userData) { - Object *obedit= vc->obedit; - Lattice *lt= obedit->data; + Object *obedit = vc->obedit; + Lattice *lt = obedit->data; BPoint *bp = lt->editlatt->latt->def; DispList *dl = find_displist(&obedit->disp, DL_VERTS); - float *co = dl?dl->verts:NULL; - int i, N = lt->editlatt->latt->pntsu*lt->editlatt->latt->pntsv*lt->editlatt->latt->pntsw; + float *co = dl ? dl->verts : NULL; + int i, N = lt->editlatt->latt->pntsu * lt->editlatt->latt->pntsv * lt->editlatt->latt->pntsw; short s[2] = {IS_CLIPPED, 0}; ED_view3d_clipping_local(vc->rv3d, obedit->obmat); /* for local clipping lookups */ - for (i=0; ihide==0) { - view3d_project_short_clip(vc->ar, dl?co:bp->vec, s, TRUE); + for (i = 0; i < N; i++, bp++, co += 3) { + if (bp->hide == 0) { + view3d_project_short_clip(vc->ar, dl ? co : bp->vec, s, TRUE); if (s[0] != IS_CLIPPED) func(userData, bp, s[0], s[1]); } @@ -1931,19 +1930,19 @@ void lattice_foreachScreenVert(ViewContext *vc, void (*func)(void *userData, BPo static void drawlattice__point(Lattice *lt, DispList *dl, int u, int v, int w, int use_wcol) { - int index = ((w*lt->pntsv + v)*lt->pntsu) + u; + int index = ((w * lt->pntsv + v) * lt->pntsu) + u; if (use_wcol) { float col[3]; - MDeformWeight *mdw= defvert_find_index (lt->dvert+index, use_wcol-1); + MDeformWeight *mdw = defvert_find_index(lt->dvert + index, use_wcol - 1); - weight_to_rgb(col, mdw?mdw->weight:0.0f); + weight_to_rgb(col, mdw ? mdw->weight : 0.0f); glColor3fv(col); } if (dl) { - glVertex3fv(&dl->verts[index*3]); + glVertex3fv(&dl->verts[index * 3]); } else { glVertex3fv(lt->def[index].vec); @@ -1953,45 +1952,45 @@ static void drawlattice__point(Lattice *lt, DispList *dl, int u, int v, int w, i /* lattice color is hardcoded, now also shows weightgroup values in edit mode */ static void drawlattice(Scene *scene, View3D *v3d, Object *ob) { - Lattice *lt= ob->data; + Lattice *lt = ob->data; DispList *dl; int u, v, w; - int use_wcol= 0, is_edit= (lt->editlatt != NULL); + int use_wcol = 0, is_edit = (lt->editlatt != NULL); /* now we default make displist, this will modifiers work for non animated case */ - if (ob->disp.first==NULL) + if (ob->disp.first == NULL) lattice_calc_modifiers(scene, ob); - dl= find_displist(&ob->disp, DL_VERTS); + dl = find_displist(&ob->disp, DL_VERTS); if (is_edit) { - lt= lt->editlatt->latt; + lt = lt->editlatt->latt; cpack(0x004000); if (ob->defbase.first && lt->dvert) { - use_wcol= ob->actdef; + use_wcol = ob->actdef; glShadeModel(GL_SMOOTH); } } glBegin(GL_LINES); - for (w=0; wpntsw; w++) { - int wxt = (w==0 || w==lt->pntsw-1); - for (v=0; vpntsv; v++) { - int vxt = (v==0 || v==lt->pntsv-1); - for (u=0; upntsu; u++) { - int uxt = (u==0 || u==lt->pntsu-1); + for (w = 0; w < lt->pntsw; w++) { + int wxt = (w == 0 || w == lt->pntsw - 1); + for (v = 0; v < lt->pntsv; v++) { + int vxt = (v == 0 || v == lt->pntsv - 1); + for (u = 0; u < lt->pntsu; u++) { + int uxt = (u == 0 || u == lt->pntsu - 1); if (w && ((uxt || vxt) || !(lt->flag & LT_OUTSIDE))) { - drawlattice__point(lt, dl, u, v, w-1, use_wcol); + drawlattice__point(lt, dl, u, v, w - 1, use_wcol); drawlattice__point(lt, dl, u, v, w, use_wcol); } if (v && ((uxt || wxt) || !(lt->flag & LT_OUTSIDE))) { - drawlattice__point(lt, dl, u, v-1, w, use_wcol); + drawlattice__point(lt, dl, u, v - 1, w, use_wcol); drawlattice__point(lt, dl, u, v, w, use_wcol); } if (u && ((vxt || wxt) || !(lt->flag & LT_OUTSIDE))) { - drawlattice__point(lt, dl, u-1, v, w, use_wcol); + drawlattice__point(lt, dl, u - 1, v, w, use_wcol); drawlattice__point(lt, dl, u, v, w, use_wcol); } } @@ -2025,7 +2024,7 @@ static void mesh_foreachScreenVert__mapFunc(void *userData, int index, float *co BMVert *eve = EDBM_get_vert_for_index(data->vc.em, index); if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) { - short s[2]= {IS_CLIPPED, 0}; + short s[2] = {IS_CLIPPED, 0}; if (data->clipVerts != V3D_CLIP_TEST_OFF) { view3d_project_short_clip(data->vc.ar, co, s, TRUE); @@ -2036,26 +2035,26 @@ static void mesh_foreachScreenVert__mapFunc(void *userData, int index, float *co project_short_noclip(data->vc.ar, co2, s); } - if (s[0]!=IS_CLIPPED) + if (s[0] != IS_CLIPPED) data->func(data->userData, eve, s[0], s[1], index); } } void mesh_foreachScreenVert( - ViewContext *vc, - void (*func)(void *userData, BMVert *eve, int x, int y, int index), - void *userData, eV3DClipTest clipVerts) + ViewContext *vc, + void (*func)(void *userData, BMVert *eve, int x, int y, int index), + void *userData, eV3DClipTest clipVerts) { foreachScreenVert_userData data; DerivedMesh *dm = editbmesh_get_derived_cage(vc->scene, vc->obedit, vc->em, CD_MASK_BAREMESH); - data.vc= *vc; + data.vc = *vc; data.func = func; data.userData = userData; data.clipVerts = clipVerts; if (clipVerts != V3D_CLIP_TEST_OFF) - ED_view3d_clipping_local(vc->rv3d, vc->obedit->obmat); /* for local clipping lookups */ + ED_view3d_clipping_local(vc->rv3d, vc->obedit->obmat); /* for local clipping lookups */ EDBM_init_index_arrays(vc->em, 1, 0, 0); dm->foreachMappedVert(dm, mesh_foreachScreenVert__mapFunc, &data); @@ -2070,7 +2069,7 @@ static void drawSelectedVertices__mapFunc(void *userData, int index, float *co, MVert *mv = &((MVert *)userData)[index]; if (!(mv->flag & ME_HIDE)) { - const char sel= mv->flag & SELECT; + const char sel = mv->flag & SELECT; // TODO define selected color if (sel) { @@ -2120,8 +2119,8 @@ static void mesh_foreachScreenEdge__mapFunc(void *userData, int index, float *v0 project_short_noclip(data->vc.ar, v2_co, s[1]); if (data->clipVerts == V3D_CLIP_TEST_REGION) { - if ( !is_co_in_region(data->vc.ar, s[0]) && - !is_co_in_region(data->vc.ar, s[1])) + if (!is_co_in_region(data->vc.ar, s[0]) && + !is_co_in_region(data->vc.ar, s[1])) { return; } @@ -2133,20 +2132,20 @@ static void mesh_foreachScreenEdge__mapFunc(void *userData, int index, float *v0 } void mesh_foreachScreenEdge( - ViewContext *vc, - void (*func)(void *userData, BMEdge *eed, int x0, int y0, int x1, int y1, int index), - void *userData, eV3DClipTest clipVerts) + ViewContext *vc, + void (*func)(void *userData, BMEdge *eed, int x0, int y0, int x1, int y1, int index), + void *userData, eV3DClipTest clipVerts) { foreachScreenEdge_userData data; DerivedMesh *dm = editbmesh_get_derived_cage(vc->scene, vc->obedit, vc->em, CD_MASK_BAREMESH); - data.vc= *vc; + data.vc = *vc; data.func = func; data.userData = userData; data.clipVerts = clipVerts; if (clipVerts != V3D_CLIP_TEST_OFF) - ED_view3d_clipping_local(vc->rv3d, vc->obedit->obmat); /* for local clipping lookups */ + ED_view3d_clipping_local(vc->rv3d, vc->obedit->obmat); /* for local clipping lookups */ EDBM_init_index_arrays(vc->em, 0, 1, 0); dm->foreachMappedEdge(dm, mesh_foreachScreenEdge__mapFunc, &data); @@ -2174,14 +2173,14 @@ static void mesh_foreachScreenFace__mapFunc(void *userData, int index, float *ce } void mesh_foreachScreenFace( - ViewContext *vc, - void (*func)(void *userData, BMFace *efa, int x, int y, int index), - void *userData) + ViewContext *vc, + void (*func)(void *userData, BMFace *efa, int x, int y, int index), + void *userData) { foreachScreenFace_userData data; DerivedMesh *dm = editbmesh_get_derived_cage(vc->scene, vc->obedit, vc->em, CD_MASK_BAREMESH); - data.vc= *vc; + data.vc = *vc; data.func = func; data.userData = userData; @@ -2196,24 +2195,24 @@ void mesh_foreachScreenFace( } void nurbs_foreachScreenVert( - ViewContext *vc, - void (*func)(void *userData, Nurb *nu, BPoint *bp, BezTriple *bezt, int beztindex, int x, int y), - void *userData) + ViewContext *vc, + void (*func)(void *userData, Nurb *nu, BPoint *bp, BezTriple *bezt, int beztindex, int x, int y), + void *userData) { - Curve *cu= vc->obedit->data; + Curve *cu = vc->obedit->data; short s[2] = {IS_CLIPPED, 0}; Nurb *nu; int i; - ListBase *nurbs= curve_editnurbs(cu); + ListBase *nurbs = curve_editnurbs(cu); ED_view3d_clipping_local(vc->rv3d, vc->obedit->obmat); /* for local clipping lookups */ - for (nu= nurbs->first; nu; nu=nu->next) { + for (nu = nurbs->first; nu; nu = nu->next) { if (nu->type == CU_BEZIER) { - for (i=0; ipntsu; i++) { + for (i = 0; i < nu->pntsu; i++) { BezTriple *bezt = &nu->bezt[i]; - if (bezt->hide==0) { + if (bezt->hide == 0) { if (cu->drawflag & CU_HIDE_HANDLES) { view3d_project_short_clip(vc->ar, bezt->vec[1], s, TRUE); @@ -2235,10 +2234,10 @@ void nurbs_foreachScreenVert( } } else { - for (i=0; ipntsu*nu->pntsv; i++) { + for (i = 0; i < nu->pntsu * nu->pntsv; i++) { BPoint *bp = &nu->bp[i]; - if (bp->hide==0) { + if (bp->hide == 0) { view3d_project_short_clip(vc->ar, bp->vec, s, TRUE); if (s[0] != IS_CLIPPED) func(userData, nu, bp, NULL, -1, s[0], s[1]); @@ -2288,7 +2287,7 @@ static void draw_dm_face_centers__mapFunc(void *userData, int index, float *cent BMFace *efa = EDBM_get_face_for_index(((void **)userData)[0], index); int sel = *(((int **)userData)[1]); - if (efa && !BM_elem_flag_test(efa, BM_ELEM_HIDDEN) && BM_elem_flag_test(efa, BM_ELEM_SELECT)==sel) { + if (efa && !BM_elem_flag_test(efa, BM_ELEM_HIDDEN) && BM_elem_flag_test(efa, BM_ELEM_SELECT) == sel) { bglVertex3fv(cent); } } @@ -2336,12 +2335,12 @@ static void draw_dm_vert_normals(BMEditMesh *em, Scene *scene, DerivedMesh *dm) /* Draw verts with color set based on selection */ static void draw_dm_verts__mapFunc(void *userData, int index, float *co, float *UNUSED(no_f), short *UNUSED(no_s)) { - drawDMVerts_userData * data = userData; + drawDMVerts_userData *data = userData; BMVert *eve = EDBM_get_vert_for_index(data->em, index); - if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN) && BM_elem_flag_test(eve, BM_ELEM_SELECT)==data->sel) { + if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN) && BM_elem_flag_test(eve, BM_ELEM_SELECT) == data->sel) { /* draw active larger - need to stop/start point drawing for this :/ */ - if (eve==data->eve_act) { + if (eve == data->eve_act) { float size = UI_GetThemeValuef(TH_VERTEX_SIZE); UI_ThemeColor4(TH_EDITMESH_ACTIVE); @@ -2352,7 +2351,7 @@ static void draw_dm_verts__mapFunc(void *userData, int index, float *co, float * bglVertex3fv(co); bglEnd(); - UI_ThemeColor4(data->sel?TH_VERTEX_SELECT:TH_VERTEX); + UI_ThemeColor4(data->sel ? TH_VERTEX_SELECT : TH_VERTEX); glPointSize(size); bglBegin(GL_POINTS); } @@ -2379,13 +2378,13 @@ static DMDrawOption draw_dm_edges_sel__setDrawOptions(void *userData, int index) { BMEdge *eed; //unsigned char **cols = userData, *col; - drawDMEdgesSel_userData * data = userData; + drawDMEdgesSel_userData *data = userData; unsigned char *col; eed = EDBM_get_edge_for_index(data->em, index); if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN)) { - if (eed==data->eed_act) { + if (eed == data->eed_act) { glColor4ubv(data->actCol); } else { @@ -2396,7 +2395,7 @@ static DMDrawOption draw_dm_edges_sel__setDrawOptions(void *userData, int index) col = data->baseCol; } /* no alpha, this is used so a transparent color can disable drawing unselected edges in editmode */ - if (col[3]==0) + if (col[3] == 0) return DM_DRAW_OPTION_SKIP; glColor4ubv(col); @@ -2437,17 +2436,17 @@ static void draw_dm_edges(BMEditMesh *em, DerivedMesh *dm) /* Draw edges with color interpolated based on selection */ static DMDrawOption draw_dm_edges_sel_interp__setDrawOptions(void *userData, int index) { - if (BM_elem_flag_test(EDBM_get_edge_for_index(((void**)userData)[0], index), BM_ELEM_HIDDEN)) + if (BM_elem_flag_test(EDBM_get_edge_for_index(((void **)userData)[0], index), BM_ELEM_HIDDEN)) return DM_DRAW_OPTION_SKIP; else return DM_DRAW_OPTION_NORMAL; } static void draw_dm_edges_sel_interp__setDrawInterpOptions(void *userData, int index, float t) { - BMEdge *eed = EDBM_get_edge_for_index(((void**)userData)[0], index); + BMEdge *eed = EDBM_get_edge_for_index(((void **)userData)[0], index); unsigned char **cols = userData; - unsigned char *col0 = cols[(BM_elem_flag_test(eed->v1, BM_ELEM_SELECT))?2:1]; - unsigned char *col1 = cols[(BM_elem_flag_test(eed->v2, BM_ELEM_SELECT))?2:1]; + unsigned char *col0 = cols[(BM_elem_flag_test(eed->v1, BM_ELEM_SELECT)) ? 2 : 1]; + unsigned char *col1 = cols[(BM_elem_flag_test(eed->v2, BM_ELEM_SELECT)) ? 2 : 1]; glColor4ub(col0[0] + (col1[0] - col0[0]) * t, col0[1] + (col1[1] - col0[1]) * t, @@ -2496,10 +2495,10 @@ static void draw_dm_edges_sharp(BMEditMesh *em, DerivedMesh *dm) /* Draw faces with color set based on selection - * return 2 for the active face so it renders with stipple enabled */ + * return 2 for the active face so it renders with stipple enabled */ static DMDrawOption draw_dm_faces_sel__setDrawOptions(void *userData, int index) { - drawDMFacesSel_userData * data = userData; + drawDMFacesSel_userData *data = userData; BMFace *efa = EDBM_get_face_for_index(data->em, index); unsigned char *col; @@ -2512,8 +2511,8 @@ static DMDrawOption draw_dm_faces_sel__setDrawOptions(void *userData, int index) return DM_DRAW_OPTION_STIPPLE; } else { - col = data->cols[BM_elem_flag_test(efa, BM_ELEM_SELECT)?1:0]; - if (col[3]==0) + col = data->cols[BM_elem_flag_test(efa, BM_ELEM_SELECT) ? 1 : 0]; + if (col[3] == 0) return DM_DRAW_OPTION_SKIP; glColor4ubv(col); return DM_DRAW_OPTION_NORMAL; @@ -2534,8 +2533,8 @@ static int draw_dm_faces_sel__compareDrawOptions(void *userData, int index, int if (!data->orig_index) return 0; - efa= EDBM_get_face_for_index(data->em, data->orig_index[index]); - next_efa= EDBM_get_face_for_index(data->em, data->orig_index[next_index]); + efa = EDBM_get_face_for_index(data->em, data->orig_index[index]); + next_efa = EDBM_get_face_for_index(data->em, data->orig_index[next_index]); if (efa == next_efa) return 1; @@ -2543,10 +2542,10 @@ static int draw_dm_faces_sel__compareDrawOptions(void *userData, int index, int if (efa == data->efa_act || next_efa == data->efa_act) return 0; - col = data->cols[BM_elem_flag_test(efa, BM_ELEM_SELECT)?1:0]; - next_col = data->cols[BM_elem_flag_test(next_efa, BM_ELEM_SELECT)?1:0]; + col = data->cols[BM_elem_flag_test(efa, BM_ELEM_SELECT) ? 1 : 0]; + next_col = data->cols[BM_elem_flag_test(next_efa, BM_ELEM_SELECT) ? 1 : 0]; - if (col[3]==0 || next_col[3]==0) + if (col[3] == 0 || next_col[3] == 0) return 0; return col == next_col; @@ -2557,7 +2556,7 @@ static void draw_dm_faces_sel(BMEditMesh *em, DerivedMesh *dm, unsigned char *ba unsigned char *selCol, unsigned char *actCol, BMFace *efa_act) { drawDMFacesSel_userData data; - data.dm= dm; + data.dm = dm; data.cols[0] = baseCol; data.em = em; data.cols[1] = selCol; @@ -2577,7 +2576,7 @@ static DMDrawOption draw_dm_creases__setDrawOptions(void *userData, int index) if (!crease) return DM_DRAW_OPTION_SKIP; - if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN) && *crease!=0.0f) { + if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN) && *crease != 0.0f) { UI_ThemeColorBlend(TH_WIRE, TH_EDGE_CREASE, *crease); return DM_DRAW_OPTION_NORMAL; } @@ -2601,7 +2600,7 @@ static DMDrawOption draw_dm_bweights__setDrawOptions(void *userData, int index) if (!bweight) return DM_DRAW_OPTION_SKIP; - if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN) && *bweight!=0.0f) { + if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN) && *bweight != 0.0f) { UI_ThemeColorBlend(TH_WIRE, TH_EDGE_SELECT, *bweight); return DM_DRAW_OPTION_NORMAL; } @@ -2618,14 +2617,14 @@ static void draw_dm_bweights__mapFunc(void *userData, int index, float *co, floa if (!bweight) return; - if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN) && *bweight!=0.0f) { + if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN) && *bweight != 0.0f) { UI_ThemeColorBlend(TH_VERTEX, TH_VERTEX_SELECT, *bweight); bglVertex3fv(co); } } static void draw_dm_bweights(BMEditMesh *em, Scene *scene, DerivedMesh *dm) { - ToolSettings *ts= scene->toolsettings; + ToolSettings *ts = scene->toolsettings; if (ts->selectmode & SCE_SELECT_VERTEX) { glPointSize(UI_GetThemeValuef(TH_VERTEX_SIZE) + 2); @@ -2652,24 +2651,24 @@ static void draw_dm_bweights(BMEditMesh *em, Scene *scene, DerivedMesh *dm) static void draw_em_fancy_verts(Scene *scene, View3D *v3d, Object *obedit, BMEditMesh *em, DerivedMesh *cageDM, BMVert *eve_act) { - ToolSettings *ts= scene->toolsettings; + ToolSettings *ts = scene->toolsettings; int sel; - if (v3d->zbuf) glDepthMask(0); // disable write in zbuffer, zbuf select + if (v3d->zbuf) glDepthMask(0); // disable write in zbuffer, zbuf select - for (sel=0; sel<2; sel++) { + for (sel = 0; sel < 2; sel++) { unsigned char col[4], fcol[4]; int pass; - UI_GetThemeColor3ubv(sel?TH_VERTEX_SELECT:TH_VERTEX, col); - UI_GetThemeColor3ubv(sel?TH_FACE_DOT:TH_WIRE, fcol); + UI_GetThemeColor3ubv(sel ? TH_VERTEX_SELECT : TH_VERTEX, col); + UI_GetThemeColor3ubv(sel ? TH_FACE_DOT : TH_WIRE, fcol); - for (pass=0; pass<2; pass++) { + for (pass = 0; pass < 2; pass++) { float size = UI_GetThemeValuef(TH_VERTEX_SIZE); float fsize = UI_GetThemeValuef(TH_FACEDOT_SIZE); - if (pass==0) { - if (v3d->zbuf && !(v3d->flag&V3D_ZBUF_SELECT)) { + if (pass == 0) { + if (v3d->zbuf && !(v3d->flag & V3D_ZBUF_SELECT)) { glDisable(GL_DEPTH_TEST); glEnable(GL_BLEND); @@ -2678,8 +2677,8 @@ static void draw_em_fancy_verts(Scene *scene, View3D *v3d, Object *obedit, continue; } - size = (size > 2.1f ? size/2.0f:size); - fsize = (fsize > 2.1f ? fsize/2.0f:fsize); + size = (size > 2.1f ? size / 2.0f : size); + fsize = (fsize > 2.1f ? fsize / 2.0f : fsize); col[3] = fcol[3] = 100; } else { @@ -2698,7 +2697,7 @@ static void draw_em_fancy_verts(Scene *scene, View3D *v3d, Object *obedit, draw_dm_face_centers(em, cageDM, sel); } - if (pass==0) { + if (pass == 0) { glDisable(GL_BLEND); glEnable(GL_DEPTH_TEST); } @@ -2713,7 +2712,7 @@ static void draw_em_fancy_edges(BMEditMesh *em, Scene *scene, View3D *v3d, Mesh *me, DerivedMesh *cageDM, short sel_only, BMEdge *eed_act) { - ToolSettings *ts= scene->toolsettings; + ToolSettings *ts = scene->toolsettings; int pass; unsigned char wireCol[4], selCol[4], actCol[4]; @@ -2727,10 +2726,10 @@ static void draw_em_fancy_edges(BMEditMesh *em, Scene *scene, View3D *v3d, if (sel_only) wireCol[3] = 0; - for (pass=0; pass<2; pass++) { + for (pass = 0; pass < 2; pass++) { /* show wires in transparant when no zbuf clipping for select */ - if (pass==0) { - if (v3d->zbuf && (v3d->flag & V3D_ZBUF_SELECT)==0) { + if (pass == 0) { + if (v3d->zbuf && (v3d->flag & V3D_ZBUF_SELECT) == 0) { glEnable(GL_BLEND); glDisable(GL_DEPTH_TEST); selCol[3] = 85; @@ -2765,7 +2764,7 @@ static void draw_em_fancy_edges(BMEditMesh *em, Scene *scene, View3D *v3d, } } - if (pass==0) { + if (pass == 0) { glDisable(GL_BLEND); glEnable(GL_DEPTH_TEST); } @@ -2775,27 +2774,27 @@ static void draw_em_fancy_edges(BMEditMesh *em, Scene *scene, View3D *v3d, static void draw_em_measure_stats(View3D *v3d, Object *ob, BMEditMesh *em, UnitSettings *unit) { const short txt_flag = V3D_CACHE_TEXT_ASCII | V3D_CACHE_TEXT_LOCALCLIP; - Mesh *me= ob->data; + Mesh *me = ob->data; float v1[3], v2[3], v3[3], vmid[3], fvec[3]; char numstr[32]; /* Stores the measurement display text here */ const char *conv_float; /* Use a float conversion matching the grid size */ - unsigned char col[4]= {0, 0, 0, 255}; /* color of the text to draw */ + unsigned char col[4] = {0, 0, 0, 255}; /* color of the text to draw */ float area; /* area of the face */ - float grid= unit->system ? unit->scale_length : v3d->grid; - const int do_split= unit->flag & USER_UNIT_OPT_SPLIT; - const int do_global= v3d->flag & V3D_GLOBAL_STATS; - const int do_moving= G.moving; + float grid = unit->system ? unit->scale_length : v3d->grid; + const int do_split = unit->flag & USER_UNIT_OPT_SPLIT; + const int do_global = v3d->flag & V3D_GLOBAL_STATS; + const int do_moving = G.moving; BMIter iter; int i; /* make the precision of the pronted value proportionate to the gridsize */ - if (grid < 0.01f) conv_float= "%.6g"; - else if (grid < 0.1f) conv_float= "%.5g"; - else if (grid < 1.0f) conv_float= "%.4g"; - else if (grid < 10.0f) conv_float= "%.3g"; - else conv_float= "%.2g"; + if (grid < 0.01f) conv_float = "%.6g"; + else if (grid < 0.1f) conv_float = "%.5g"; + else if (grid < 1.0f) conv_float = "%.4g"; + else if (grid < 10.0f) conv_float = "%.3g"; + else conv_float = "%.2g"; if (me->drawflag & ME_DRAWEXTRA_EDGELEN) { BMEdge *eed; @@ -2803,7 +2802,7 @@ static void draw_em_measure_stats(View3D *v3d, Object *ob, BMEditMesh *em, UnitS UI_GetThemeColor3ubv(TH_DRAWEXTRA_EDGELEN, col); eed = BM_iter_new(&iter, em->bm, BM_EDGES_OF_MESH, NULL); - for (; eed; eed=BM_iter_step(&iter)) { + for (; eed; eed = BM_iter_step(&iter)) { /* draw selected edges, or edges next to selected verts while draging */ if (BM_elem_flag_test(eed, BM_ELEM_SELECT) || (do_moving && (BM_elem_flag_test(eed->v1, BM_ELEM_SELECT) || @@ -2839,16 +2838,16 @@ static void draw_em_measure_stats(View3D *v3d, Object *ob, BMEditMesh *em, UnitS BMFace *f; int n; -#define DRAW_EM_MEASURE_STATS_FACEAREA() \ - if (BM_elem_flag_test(f, BM_ELEM_SELECT)) { \ - mul_v3_fl(vmid, 1.0/n); \ - if (unit->system) \ - bUnit_AsString(numstr, sizeof(numstr), area*unit->scale_length, \ - 3, unit->system, B_UNIT_LENGTH, do_split, FALSE); \ - else \ - BLI_snprintf(numstr, sizeof(numstr), conv_float, area); \ - view3d_cached_text_draw_add(vmid, numstr, 0, txt_flag, col); \ - } +#define DRAW_EM_MEASURE_STATS_FACEAREA() \ + if (BM_elem_flag_test(f, BM_ELEM_SELECT)) { \ + mul_v3_fl(vmid, 1.0 / n); \ + if (unit->system) \ + bUnit_AsString(numstr, sizeof(numstr), area * unit->scale_length, \ + 3, unit->system, B_UNIT_LENGTH, do_split, FALSE); \ + else \ + BLI_snprintf(numstr, sizeof(numstr), conv_float, area); \ + view3d_cached_text_draw_add(vmid, numstr, 0, txt_flag, col); \ + } UI_GetThemeColor3ubv(TH_DRAWEXTRA_FACEAREA, col); @@ -2894,7 +2893,7 @@ static void draw_em_measure_stats(View3D *v3d, Object *ob, BMEditMesh *em, UnitS for (efa = BM_iter_new(&iter, em->bm, BM_FACES_OF_MESH, NULL); - efa; efa=BM_iter_step(&iter)) + efa; efa = BM_iter_step(&iter)) { BMIter liter; BMLoop *loop; @@ -2940,10 +2939,10 @@ static void draw_em_indices(BMEditMesh *em) unsigned char col[4]; BMIter iter; - BMesh *bm= em->bm; + BMesh *bm = em->bm; /* For now, reuse appropriate theme colors from stats text colors */ - i= 0; + i = 0; if (em->selectmode & SCE_SELECT_VERTEX) { UI_GetThemeColor3ubv(TH_DRAWEXTRA_FACEANG, col); BM_ITER(v, &iter, bm, BM_VERTS_OF_MESH, NULL) { @@ -2956,7 +2955,7 @@ static void draw_em_indices(BMEditMesh *em) } if (em->selectmode & SCE_SELECT_EDGE) { - i= 0; + i = 0; UI_GetThemeColor3ubv(TH_DRAWEXTRA_EDGELEN, col); BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) { if (BM_elem_flag_test(e, BM_ELEM_SELECT)) { @@ -2969,7 +2968,7 @@ static void draw_em_indices(BMEditMesh *em) } if (em->selectmode & SCE_SELECT_FACE) { - i= 0; + i = 0; UI_GetThemeColor3ubv(TH_DRAWEXTRA_FACEAREA, col); BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) { if (BM_elem_flag_test(f, BM_ELEM_SELECT)) { @@ -2987,7 +2986,7 @@ static DMDrawOption draw_em_fancy__setFaceOpts(void *userData, int index) BMFace *efa = EDBM_get_face_for_index(userData, index); if (efa && !BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) { - GPU_enable_material(efa->mat_nr+1, NULL); + GPU_enable_material(efa->mat_nr + 1, NULL); return DM_DRAW_OPTION_NORMAL; } else @@ -3014,28 +3013,28 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d, BMVert *eve_act = NULL; if (em->bm->selected.last) { - BMEditSelection *ese= em->bm->selected.last; + BMEditSelection *ese = em->bm->selected.last; /* face is handeled above */ #if 0 - if (ese->type == BM_FACE ) { + if (ese->type == BM_FACE) { efa_act = (BMFace *)ese->data; } else #endif - if ( ese->htype == BM_EDGE ) { + if (ese->htype == BM_EDGE) { eed_act = (BMEdge *)ese->ele; } - else if ( ese->htype == BM_VERT ) { + else if (ese->htype == BM_VERT) { eve_act = (BMVert *)ese->ele; } } EDBM_init_index_arrays(em, 1, 1, 1); - if (dt>OB_WIRE) { + if (dt > OB_WIRE) { if (CHECK_OB_DRAWTEXTURE(v3d, dt)) { if (draw_glsl_material(scene, ob, v3d, dt)) { - glFrontFace((ob->transflag&OB_NEG_SCALE)?GL_CW:GL_CCW); + glFrontFace((ob->transflag & OB_NEG_SCALE) ? GL_CW : GL_CCW); finalDM->drawMappedFacesGLSL(finalDM, GPU_enable_material, draw_em_fancy__setGLSLFaceOpts, em); @@ -3053,7 +3052,7 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d, glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, (me->flag & ME_TWOSIDED) ? GL_TRUE : GL_FALSE); glEnable(GL_LIGHTING); - glFrontFace((ob->transflag&OB_NEG_SCALE)?GL_CW:GL_CCW); + glFrontFace((ob->transflag & OB_NEG_SCALE) ? GL_CW : GL_CCW); finalDM->drawMappedFaces(finalDM, draw_em_fancy__setFaceOpts, GPU_enable_material, NULL, me->edit_btmesh, 0); glFrontFace(GL_CCW); @@ -3069,13 +3068,13 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d, glDepthMask(0); } else { - if (cageDM!=finalDM) { + if (cageDM != finalDM) { UI_ThemeColorBlend(TH_WIRE, TH_BACK, 0.7); finalDM->drawEdges(finalDM, 1, 0); } } - if (me->drawflag & ME_DRAWFACES) { /* transp faces */ + if (me->drawflag & ME_DRAWFACES) { /* transp faces */ unsigned char col1[4], col2[4], col3[4]; UI_GetThemeColor4ubv(TH_FACE, col1); @@ -3083,7 +3082,7 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d, UI_GetThemeColor4ubv(TH_EDITMESH_ACTIVE, col3); glEnable(GL_BLEND); - glDepthMask(0); // disable write in zbuffer, needed for nice transp + glDepthMask(0); // disable write in zbuffer, needed for nice transp /* don't draw unselected faces, only selected, this is MUCH nicer when texturing */ if (CHECK_OB_DRAWTEXTURE(v3d, dt)) @@ -3092,7 +3091,7 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d, draw_dm_faces_sel(em, cageDM, col1, col2, col3, efa_act); glDisable(GL_BLEND); - glDepthMask(1); // restore write in zbuffer + glDepthMask(1); // restore write in zbuffer } else if (efa_act) { /* even if draw faces is off it would be nice to draw the stipple face @@ -3103,17 +3102,17 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d, UI_GetThemeColor4ubv(TH_EDITMESH_ACTIVE, col3); glEnable(GL_BLEND); - glDepthMask(0); // disable write in zbuffer, needed for nice transp + glDepthMask(0); // disable write in zbuffer, needed for nice transp draw_dm_faces_sel(em, cageDM, col1, col2, col3, efa_act); glDisable(GL_BLEND); - glDepthMask(1); // restore write in zbuffer + glDepthMask(1); // restore write in zbuffer } /* here starts all fancy draw-extra over */ - if ((me->drawflag & ME_DRAWEDGES)==0 && CHECK_OB_DRAWTEXTURE(v3d, dt)) { + if ((me->drawflag & ME_DRAWEDGES) == 0 && CHECK_OB_DRAWTEXTURE(v3d, dt)) { /* we are drawing textures and 'ME_DRAWEDGES' is disabled, don't draw any edges */ /* only draw selected edges otherwise there is no way of telling if a face is selected */ @@ -3127,7 +3126,7 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d, draw_dm_edges_seams(em, cageDM); - glColor3ub(0,0,0); + glColor3ub(0, 0, 0); glLineWidth(1); } @@ -3137,7 +3136,7 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d, draw_dm_edges_sharp(em, cageDM); - glColor3ub(0,0,0); + glColor3ub(0, 0, 0); glLineWidth(1); } @@ -3162,7 +3161,7 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d, draw_dm_vert_normals(em, scene, cageDM); } - if ( (me->drawflag & (ME_DRAWEXTRA_EDGELEN|ME_DRAWEXTRA_FACEAREA|ME_DRAWEXTRA_FACEANG)) && + if ( (me->drawflag & (ME_DRAWEXTRA_EDGELEN | ME_DRAWEXTRA_FACEAREA | ME_DRAWEXTRA_FACEANG)) && !(v3d->flag2 & V3D_RENDER_OVERRIDE)) { draw_em_measure_stats(v3d, ob, em, &scene->unit); @@ -3174,7 +3173,7 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d, } } - if (dt>OB_WIRE) { + if (dt > OB_WIRE) { glDepthMask(1); bglPolygonOffset(rv3d->dist, 0.0); GPU_disable_material(); @@ -3213,14 +3212,14 @@ static void draw_mesh_object_outline(View3D *v3d, Object *ob, DerivedMesh *dm) static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D *rv3d, Base *base, int dt, int flag) { - Object *ob= base->object; + Object *ob = base->object; Mesh *me = ob->data; - Material *ma= give_current_material(ob, 1); + Material *ma = give_current_material(ob, 1); const short hasHaloMat = (ma && (ma->material_type == MA_TYPE_HALO)); - eWireDrawMode draw_wire= OBDRAW_WIRE_OFF; + eWireDrawMode draw_wire = OBDRAW_WIRE_OFF; int /* totvert,*/ totedge, totface; - DerivedMesh *dm= mesh_get_derived_final(scene, ob, scene->customdata_mask); - const short is_obact= (ob == OBACT); + DerivedMesh *dm = mesh_get_derived_final(scene, ob, scene->customdata_mask); + const short is_obact = (ob == OBACT); int draw_flags = (is_obact && paint_facesel_test(ob)) ? DRAW_FACE_SELECT : 0; if (!dm) @@ -3233,10 +3232,10 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D /* Unwanted combination */ if (draw_flags & DRAW_FACE_SELECT) { - draw_wire= OBDRAW_WIRE_OFF; + draw_wire = OBDRAW_WIRE_OFF; } else if (ob->dtx & OB_DRAWWIRE) { - draw_wire= OBDRAW_WIRE_ON_DEPTH; /* draw wire after solid using zoffset and depth buffer adjusment */ + draw_wire = OBDRAW_WIRE_ON_DEPTH; /* draw wire after solid using zoffset and depth buffer adjusment */ } /* totvert = dm->getNumVerts(dm); */ /*UNUSED*/ @@ -3244,25 +3243,25 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D totface = dm->getNumTessFaces(dm); /* vertexpaint, faceselect wants this, but it doesnt work for shaded? */ - glFrontFace((ob->transflag&OB_NEG_SCALE)?GL_CW:GL_CCW); + glFrontFace((ob->transflag & OB_NEG_SCALE) ? GL_CW : GL_CCW); - if (dt==OB_BOUNDBOX) { - if (((v3d->flag2 & V3D_RENDER_OVERRIDE) && v3d->drawtype >= OB_WIRE)==0) + if (dt == OB_BOUNDBOX) { + if (((v3d->flag2 & V3D_RENDER_OVERRIDE) && v3d->drawtype >= OB_WIRE) == 0) draw_bounding_volume(scene, ob, ob->boundtype); } - else if (hasHaloMat || (totface==0 && totedge==0)) { + else if (hasHaloMat || (totface == 0 && totedge == 0)) { glPointSize(1.5); dm->drawVerts(dm); glPointSize(1.0); } - else if (dt==OB_WIRE || totface==0) { - draw_wire= OBDRAW_WIRE_ON; /* draw wire only, no depth buffer stuff */ + else if (dt == OB_WIRE || totface == 0) { + draw_wire = OBDRAW_WIRE_ON; /* draw wire only, no depth buffer stuff */ } else if ( (draw_flags & DRAW_FACE_SELECT || (is_obact && ob->mode & OB_MODE_TEXTURE_PAINT)) || CHECK_OB_DRAWTEXTURE(v3d, dt)) { if ( (v3d->flag & V3D_SELECT_OUTLINE) && - ((v3d->flag2 & V3D_RENDER_OVERRIDE)==0) && + ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) && (base->flag & SELECT) && !(G.f & G_PICKSEL || (draw_flags & DRAW_FACE_SELECT)) && (draw_wire == OBDRAW_WIRE_OFF)) @@ -3271,7 +3270,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D } if (draw_glsl_material(scene, ob, v3d, dt) && !(draw_flags & DRAW_MODIFIERS_PREVIEW)) { - glFrontFace((ob->transflag&OB_NEG_SCALE)?GL_CW:GL_CCW); + glFrontFace((ob->transflag & OB_NEG_SCALE) ? GL_CW : GL_CCW); dm->drawFacesGLSL(dm, GPU_enable_material); // if (get_ob_property(ob, "Text")) @@ -3290,11 +3289,11 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D else UI_ThemeColor(TH_WIRE); - if ((v3d->flag2 & V3D_RENDER_OVERRIDE)==0) + if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) dm->drawLooseEdges(dm); } } - else if (dt==OB_SOLID) { + else if (dt == OB_SOLID) { if (is_obact && ob->mode & OB_MODE_WEIGHT_PAINT) { /* weight paint in solid mode, special case. focus on making the weights clear * rather than the shading, this is also forced in wire view */ @@ -3303,7 +3302,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D DM_DRAW_USE_COLORS | DM_DRAW_ALWAYS_SMOOTH); bglPolygonOffset(rv3d->dist, 1.0); - glDepthMask(0); // disable write in zbuffer, selected edge wires show better + glDepthMask(0); // disable write in zbuffer, selected edge wires show better glEnable(GL_BLEND); glColor4ub(255, 255, 255, 96); @@ -3320,17 +3319,17 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D GPU_disable_material(); /* since we already draw wire as wp guide, don't draw over the top */ - draw_wire= OBDRAW_WIRE_OFF; + draw_wire = OBDRAW_WIRE_OFF; } else if (draw_flags & DRAW_MODIFIERS_PREVIEW) { /* for object selection draws no shade */ - if (flag & (DRAW_PICKING|DRAW_CONSTCOLOR)) { + if (flag & (DRAW_PICKING | DRAW_CONSTCOLOR)) { dm->drawFacesSolid(dm, NULL, 0, GPU_enable_material); } else { /* draw outline */ if ( (v3d->flag & V3D_SELECT_OUTLINE) && - ((v3d->flag2 & V3D_RENDER_OVERRIDE)==0) && + ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) && (base->flag & SELECT) && (draw_wire == OBDRAW_WIRE_OFF) && (ob->sculpt == NULL)) @@ -3345,7 +3344,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D /* set default spec */ glColorMaterial(GL_FRONT_AND_BACK, GL_SPECULAR); - glEnable(GL_COLOR_MATERIAL); /* according manpages needed */ + glEnable(GL_COLOR_MATERIAL); /* according manpages needed */ glColor3ub(120, 120, 120); glDisable(GL_COLOR_MATERIAL); /* diffuse */ @@ -3364,7 +3363,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D Paint *p; if ( (v3d->flag & V3D_SELECT_OUTLINE) && - ((v3d->flag2 & V3D_RENDER_OVERRIDE)==0) && + ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) && (base->flag & SELECT) && (draw_wire == OBDRAW_WIRE_OFF) && (ob->sculpt == NULL)) @@ -3375,12 +3374,12 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, (me->flag & ME_TWOSIDED) ? GL_TRUE : GL_FALSE); glEnable(GL_LIGHTING); - glFrontFace((ob->transflag&OB_NEG_SCALE)?GL_CW:GL_CCW); + glFrontFace((ob->transflag & OB_NEG_SCALE) ? GL_CW : GL_CCW); - if (ob->sculpt && (p=paint_get_active(scene))) { + if (ob->sculpt && (p = paint_get_active(scene))) { float planes[4][4]; float (*fpl)[4] = NULL; - int fast= (p->flags & PAINT_FAST_NAVIGATE) && (rv3d->rflag & RV3D_NAVIGATING); + int fast = (p->flags & PAINT_FAST_NAVIGATE) && (rv3d->rflag & RV3D_NAVIGATING); if (ob->sculpt->partial_redraw) { if (ar->do_draw & RGN_DRAW_PARTIAL) { @@ -3408,11 +3407,11 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D else { UI_ThemeColor(TH_WIRE); } - if (!ob->sculpt && (v3d->flag2 & V3D_RENDER_OVERRIDE)==0) + if (!ob->sculpt && (v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) dm->drawLooseEdges(dm); } } - else if (dt==OB_PAINT) { + else if (dt == OB_PAINT) { if (is_obact) { if (ob && ob->mode & OB_MODE_WEIGHT_PAINT) { /* enforce default material settings */ @@ -3420,7 +3419,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D /* but set default spec */ glColorMaterial(GL_FRONT_AND_BACK, GL_SPECULAR); - glEnable(GL_COLOR_MATERIAL); /* according manpages needed */ + glEnable(GL_COLOR_MATERIAL); /* according manpages needed */ glColor3ub(120, 120, 120); glDisable(GL_COLOR_MATERIAL); /* diffuse */ @@ -3435,7 +3434,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D GPU_disable_material(); } - else if (ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_TEXTURE_PAINT)) { + else if (ob->mode & (OB_MODE_VERTEX_PAINT | OB_MODE_TEXTURE_PAINT)) { if (me->mloopcol) dm->drawMappedFaces(dm, NULL, GPU_enable_material, NULL, NULL, DM_DRAW_USE_COLORS | DM_DRAW_ALWAYS_SMOOTH); @@ -3449,23 +3448,23 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D } /* set default draw color back for wire or for draw-extra later on */ - if (dt!=OB_WIRE) { + if (dt != OB_WIRE) { if (base->flag & SELECT) { if (is_obact && ob->flag & OB_FROMGROUP) UI_ThemeColor(TH_GROUP_ACTIVE); else if (ob->flag & OB_FROMGROUP) UI_ThemeColorShade(TH_GROUP_ACTIVE, -16); - else if (flag!=DRAW_CONSTCOLOR) + else if (flag != DRAW_CONSTCOLOR) UI_ThemeColor(is_obact ? TH_ACTIVE : TH_SELECT); else - glColor3ub(80,80,80); + glColor3ub(80, 80, 80); } else { if (ob->flag & OB_FROMGROUP) UI_ThemeColor(TH_GROUP); else { - if (ob->dtx & OB_DRAWWIRE && flag==DRAW_CONSTCOLOR) - glColor3ub(80,80,80); + if (ob->dtx & OB_DRAWWIRE && flag == DRAW_CONSTCOLOR) + glColor3ub(80, 80, 80); else UI_ThemeColor(TH_WIRE); } @@ -3494,15 +3493,15 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D * if draw wire is 1 then just drawing wire, no need for depth buffer stuff, * otherwise this wire is to overlay solid mode faces so do some depth buffer tricks. */ - if (dt!=OB_WIRE && (draw_wire == OBDRAW_WIRE_ON_DEPTH)) { + if (dt != OB_WIRE && (draw_wire == OBDRAW_WIRE_ON_DEPTH)) { bglPolygonOffset(rv3d->dist, 1.0); - glDepthMask(0); // disable write in zbuffer, selected edge wires show better + glDepthMask(0); // disable write in zbuffer, selected edge wires show better } - if (((v3d->flag2 & V3D_RENDER_OVERRIDE) && v3d->drawtype >= OB_SOLID)==0) - dm->drawEdges(dm, (dt==OB_WIRE || totface==0), me->drawflag & ME_ALLEDGES); + if (((v3d->flag2 & V3D_RENDER_OVERRIDE) && v3d->drawtype >= OB_SOLID) == 0) + dm->drawEdges(dm, (dt == OB_WIRE || totface == 0), me->drawflag & ME_ALLEDGES); - if (dt!=OB_WIRE && (draw_wire == OBDRAW_WIRE_ON_DEPTH)) { + if (dt != OB_WIRE && (draw_wire == OBDRAW_WIRE_ON_DEPTH)) { glDepthMask(1); bglPolygonOffset(rv3d->dist, 0.0); } @@ -3523,39 +3522,39 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D /* returns 1 if nothing was drawn, for detecting to draw an object center */ static int draw_mesh_object(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D *rv3d, Base *base, int dt, int flag) { - Object *ob= base->object; - Object *obedit= scene->obedit; - Mesh *me= ob->data; - BMEditMesh *em= me->edit_btmesh; - int do_alpha_after= 0, drawlinked= 0, retval= 0, glsl, check_alpha, i; + Object *ob = base->object; + Object *obedit = scene->obedit; + Mesh *me = ob->data; + BMEditMesh *em = me->edit_btmesh; + int do_alpha_after = 0, drawlinked = 0, retval = 0, glsl, check_alpha, i; /* If we are drawing shadows and any of the materials don't cast a shadow, * then don't draw the object */ if (v3d->flag2 & V3D_RENDER_SHADOW) { - for (i=0; itotcol; ++i) { - Material *ma= give_current_material(ob, i); + for (i = 0; i < ob->totcol; ++i) { + Material *ma = give_current_material(ob, i); if (ma && !(ma->mode & MA_SHADBUF)) { return 1; } } } - if (obedit && ob!=obedit && ob->data==obedit->data) { + if (obedit && ob != obedit && ob->data == obedit->data) { if (ob_get_key(ob) || ob_get_key(obedit)) {} else if (ob->modifiers.first || obedit->modifiers.first) {} - else drawlinked= 1; + else drawlinked = 1; } - if (ob==obedit || drawlinked) { + if (ob == obedit || drawlinked) { DerivedMesh *finalDM, *cageDM; - if (obedit!=ob) + if (obedit != ob) finalDM = cageDM = editbmesh_get_derived_base(ob, em); else cageDM = editbmesh_get_derived_cage_and_final(scene, ob, em, &finalDM, scene->customdata_mask); - if (dt>OB_WIRE) { + if (dt > OB_WIRE) { glsl = draw_glsl_material(scene, ob, v3d, dt); GPU_begin_object_materials(v3d, rv3d, scene, ob, glsl, NULL); @@ -3565,25 +3564,25 @@ static int draw_mesh_object(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D GPU_end_object_materials(); - if (obedit!=ob && finalDM) + if (obedit != ob && finalDM) finalDM->release(finalDM); } else { /* don't create boundbox here with mesh_get_bb(), the derived system will make it, puts deformed bb's OK */ - if (me->totpoly <= 4 || ED_view3d_boundbox_clip(rv3d, ob->obmat, (ob->bb)? ob->bb: me->bb)) { + if (me->totpoly <= 4 || ED_view3d_boundbox_clip(rv3d, ob->obmat, (ob->bb) ? ob->bb : me->bb)) { glsl = draw_glsl_material(scene, ob, v3d, dt); check_alpha = check_alpha_pass(base); - if (dt==OB_SOLID || glsl) { + if (dt == OB_SOLID || glsl) { GPU_begin_object_materials(v3d, rv3d, scene, ob, glsl, - (check_alpha)? &do_alpha_after: NULL); + (check_alpha) ? &do_alpha_after : NULL); } draw_mesh_fancy(scene, ar, v3d, rv3d, base, dt, flag); GPU_end_object_materials(); - if (me->totvert==0) retval= 1; + if (me->totvert == 0) retval = 1; } } @@ -3608,8 +3607,8 @@ static int draw_mesh_object(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D /* ************** DRAW DISPLIST ****************** */ -static int draw_index_wire= 1; -static int index3_nors_incr= 1; +static int draw_index_wire = 1; +static int index3_nors_incr = 1; /* returns 1 when nothing was drawn */ static int drawDispListwire(ListBase *dlbase) @@ -3618,57 +3617,57 @@ static int drawDispListwire(ListBase *dlbase) int parts, nr; float *data; - if (dlbase==NULL) return 1; + if (dlbase == NULL) return 1; glEnableClientState(GL_VERTEX_ARRAY); glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - for (dl= dlbase->first; dl; dl= dl->next) { - if (dl->parts==0 || dl->nr==0) + for (dl = dlbase->first; dl; dl = dl->next) { + if (dl->parts == 0 || dl->nr == 0) continue; - data= dl->verts; + data = dl->verts; - switch(dl->type) { + switch (dl->type) { case DL_SEGM: glVertexPointer(3, GL_FLOAT, 0, data); - for (parts=0; partsparts; parts++) - glDrawArrays(GL_LINE_STRIP, parts*dl->nr, dl->nr); + for (parts = 0; parts < dl->parts; parts++) + glDrawArrays(GL_LINE_STRIP, parts * dl->nr, dl->nr); break; case DL_POLY: glVertexPointer(3, GL_FLOAT, 0, data); - for (parts=0; partsparts; parts++) - glDrawArrays(GL_LINE_LOOP, parts*dl->nr, dl->nr); + for (parts = 0; parts < dl->parts; parts++) + glDrawArrays(GL_LINE_LOOP, parts * dl->nr, dl->nr); break; case DL_SURF: glVertexPointer(3, GL_FLOAT, 0, data); - for (parts=0; partsparts; parts++) { + for (parts = 0; parts < dl->parts; parts++) { if (dl->flag & DL_CYCL_U) - glDrawArrays(GL_LINE_LOOP, parts*dl->nr, dl->nr); + glDrawArrays(GL_LINE_LOOP, parts * dl->nr, dl->nr); else - glDrawArrays(GL_LINE_STRIP, parts*dl->nr, dl->nr); + glDrawArrays(GL_LINE_STRIP, parts * dl->nr, dl->nr); } - for (nr=0; nrnr; nr++) { - int ofs= 3*dl->nr; + for (nr = 0; nr < dl->nr; nr++) { + int ofs = 3 * dl->nr; - data= ( dl->verts )+3*nr; - parts= dl->parts; + data = (dl->verts) + 3 * nr; + parts = dl->parts; if (dl->flag & DL_CYCL_V) glBegin(GL_LINE_LOOP); else glBegin(GL_LINE_STRIP); while (parts--) { glVertex3fv(data); - data+=ofs; + data += ofs; } glEnd(); @@ -3684,14 +3683,14 @@ static int drawDispListwire(ListBase *dlbase) case DL_INDEX3: if (draw_index_wire) { glVertexPointer(3, GL_FLOAT, 0, dl->verts); - glDrawElements(GL_TRIANGLES, 3*dl->parts, GL_UNSIGNED_INT, dl->index); + glDrawElements(GL_TRIANGLES, 3 * dl->parts, GL_UNSIGNED_INT, dl->index); } break; case DL_INDEX4: if (draw_index_wire) { glVertexPointer(3, GL_FLOAT, 0, dl->verts); - glDrawElements(GL_QUADS, 4*dl->parts, GL_UNSIGNED_INT, dl->index); + glDrawElements(GL_QUADS, 4 * dl->parts, GL_UNSIGNED_INT, dl->index); } break; } @@ -3710,7 +3709,7 @@ static void drawDispListsolid(ListBase *lb, Object *ob, int glsl) float *data, curcol[4]; float *ndata; - if (lb==NULL) return; + if (lb == NULL) return; /* for drawing wire */ glGetFloatv(GL_CURRENT_COLOR, curcol); @@ -3721,18 +3720,18 @@ static void drawDispListsolid(ListBase *lb, Object *ob, int glsl) if (ob->transflag & OB_NEG_SCALE) glFrontFace(GL_CW); else glFrontFace(GL_CCW); - if (ob->type==OB_MBALL) { // mball always smooth shaded + if (ob->type == OB_MBALL) { // mball always smooth shaded glShadeModel(GL_SMOOTH); } - dl= lb->first; + dl = lb->first; while (dl) { - data= dl->verts; - ndata= dl->nors; + data = dl->verts; + ndata = dl->nors; - switch(dl->type) { + switch (dl->type) { case DL_SEGM: - if (ob->type==OB_SURF) { + if (ob->type == OB_SURF) { int nr; glDisable(GL_LIGHTING); @@ -3742,7 +3741,7 @@ static void drawDispListsolid(ListBase *lb, Object *ob, int glsl) // glDrawArrays(GL_LINE_STRIP, 0, dl->nr); glBegin(GL_LINE_STRIP); - for (nr= dl->nr; nr; nr--, data+=3) + for (nr = dl->nr; nr; nr--, data += 3) glVertex3fv(data); glEnd(); @@ -3750,7 +3749,7 @@ static void drawDispListsolid(ListBase *lb, Object *ob, int glsl) } break; case DL_POLY: - if (ob->type==OB_SURF) { + if (ob->type == OB_SURF) { int nr; glDisable(GL_LIGHTING); @@ -3760,7 +3759,7 @@ static void drawDispListsolid(ListBase *lb, Object *ob, int glsl) //glDrawArrays(GL_LINE_LOOP, 0, dl->nr); glBegin(GL_LINE_LOOP); - for (nr= dl->nr; nr; nr--, data+=3) + for (nr = dl->nr; nr; nr--, data += 3) glVertex3fv(data); glEnd(); @@ -3770,7 +3769,7 @@ static void drawDispListsolid(ListBase *lb, Object *ob, int glsl) case DL_SURF: if (dl->index) { - GPU_enable_material(dl->col+1, (glsl)? &gattribs: NULL); + GPU_enable_material(dl->col + 1, (glsl) ? &gattribs : NULL); if (dl->rt & CU_SMOOTH) glShadeModel(GL_SMOOTH); else glShadeModel(GL_FLAT); @@ -3778,13 +3777,13 @@ static void drawDispListsolid(ListBase *lb, Object *ob, int glsl) glEnableClientState(GL_NORMAL_ARRAY); glVertexPointer(3, GL_FLOAT, 0, dl->verts); glNormalPointer(GL_FLOAT, 0, dl->nors); - glDrawElements(GL_QUADS, 4*dl->totindex, GL_UNSIGNED_INT, dl->index); + glDrawElements(GL_QUADS, 4 * dl->totindex, GL_UNSIGNED_INT, dl->index); glDisableClientState(GL_NORMAL_ARRAY); } break; case DL_INDEX3: - GPU_enable_material(dl->col+1, (glsl)? &gattribs: NULL); + GPU_enable_material(dl->col + 1, (glsl) ? &gattribs : NULL); glVertexPointer(3, GL_FLOAT, 0, dl->verts); @@ -3796,7 +3795,7 @@ static void drawDispListsolid(ListBase *lb, Object *ob, int glsl) else glNormal3fv(ndata); - glDrawElements(GL_TRIANGLES, 3*dl->parts, GL_UNSIGNED_INT, dl->index); + glDrawElements(GL_TRIANGLES, 3 * dl->parts, GL_UNSIGNED_INT, dl->index); if (index3_nors_incr) glDisableClientState(GL_NORMAL_ARRAY); @@ -3804,17 +3803,17 @@ static void drawDispListsolid(ListBase *lb, Object *ob, int glsl) break; case DL_INDEX4: - GPU_enable_material(dl->col+1, (glsl)? &gattribs: NULL); + GPU_enable_material(dl->col + 1, (glsl) ? &gattribs : NULL); glEnableClientState(GL_NORMAL_ARRAY); glVertexPointer(3, GL_FLOAT, 0, dl->verts); glNormalPointer(GL_FLOAT, 0, dl->nors); - glDrawElements(GL_QUADS, 4*dl->parts, GL_UNSIGNED_INT, dl->index); + glDrawElements(GL_QUADS, 4 * dl->parts, GL_UNSIGNED_INT, dl->index); glDisableClientState(GL_NORMAL_ARRAY); break; } - dl= dl->next; + dl = dl->next; } glDisableClientState(GL_VERTEX_ARRAY); @@ -3826,20 +3825,20 @@ static void drawDispListsolid(ListBase *lb, Object *ob, int glsl) static void drawCurveDMWired(Object *ob) { DerivedMesh *dm = ob->derivedFinal; - dm->drawEdges (dm, 1, 0); + dm->drawEdges(dm, 1, 0); } /* return 1 when nothing was drawn */ static int drawCurveDerivedMesh(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, int dt) { - Object *ob= base->object; + Object *ob = base->object; DerivedMesh *dm = ob->derivedFinal; if (!dm) { return 1; } - if (dt>OB_WIRE && dm->getNumTessFaces(dm)) { + if (dt > OB_WIRE && dm->getNumTessFaces(dm)) { int glsl = draw_glsl_material(scene, ob, v3d, dt); GPU_begin_object_materials(v3d, rv3d, scene, ob, glsl, NULL); @@ -3854,8 +3853,8 @@ static int drawCurveDerivedMesh(Scene *scene, View3D *v3d, RegionView3D *rv3d, B GPU_end_object_materials(); } else { - if (((v3d->flag2 & V3D_RENDER_OVERRIDE) && v3d->drawtype >= OB_SOLID)==0) - drawCurveDMWired (ob); + if (((v3d->flag2 & V3D_RENDER_OVERRIDE) && v3d->drawtype >= OB_SOLID) == 0) + drawCurveDMWired(ob); } return 0; @@ -3864,37 +3863,37 @@ static int drawCurveDerivedMesh(Scene *scene, View3D *v3d, RegionView3D *rv3d, B /* returns 1 when nothing was drawn */ static int drawDispList(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, int dt) { - Object *ob= base->object; - ListBase *lb=NULL; + Object *ob = base->object; + ListBase *lb = NULL; DispList *dl; Curve *cu; - const short render_only= (v3d->flag2 & V3D_RENDER_OVERRIDE); - const short solid= (dt > OB_WIRE); - int retval= 0; + const short render_only = (v3d->flag2 & V3D_RENDER_OVERRIDE); + const short solid = (dt > OB_WIRE); + int retval = 0; if (drawCurveDerivedMesh(scene, v3d, rv3d, base, dt) == 0) { return 0; } - switch(ob->type) { + switch (ob->type) { case OB_FONT: case OB_CURVE: - cu= ob->data; + cu = ob->data; - lb= &ob->disp; + lb = &ob->disp; if (solid) { - dl= lb->first; - if (dl==NULL) return 1; + dl = lb->first; + if (dl == NULL) return 1; - if (dl->nors==NULL) addnormalsDispList(lb); - index3_nors_incr= 0; + if (dl->nors == NULL) addnormalsDispList(lb); + index3_nors_incr = 0; - if ( displist_has_faces(lb)==0) { + if (displist_has_faces(lb) == 0) { if (!render_only) { - draw_index_wire= 0; + draw_index_wire = 0; drawDispListwire(lb); - draw_index_wire= 1; + draw_index_wire = 1; } } else { @@ -3908,32 +3907,32 @@ static int drawDispList(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *bas drawDispListsolid(lb, ob, 0); GPU_end_object_materials(); } - if (cu->editnurb && cu->bevobj==NULL && cu->taperobj==NULL && cu->ext1 == 0.0f && cu->ext2 == 0.0f) { + if (cu->editnurb && cu->bevobj == NULL && cu->taperobj == NULL && cu->ext1 == 0.0f && cu->ext2 == 0.0f) { cpack(0); - draw_index_wire= 0; + draw_index_wire = 0; drawDispListwire(lb); - draw_index_wire= 1; + draw_index_wire = 1; } } - index3_nors_incr= 1; + index3_nors_incr = 1; } else { if (!render_only || (render_only && displist_has_faces(lb))) { - draw_index_wire= 0; - retval= drawDispListwire(lb); - draw_index_wire= 1; + draw_index_wire = 0; + retval = drawDispListwire(lb); + draw_index_wire = 1; } } break; case OB_SURF: - lb= &ob->disp; + lb = &ob->disp; if (solid) { - dl= lb->first; - if (dl==NULL) return 1; + dl = lb->first; + if (dl == NULL) return 1; - if (dl->nors==NULL) addnormalsDispList(lb); + if (dl->nors == NULL) addnormalsDispList(lb); if (draw_glsl_material(scene, ob, v3d, dt)) { GPU_begin_object_materials(v3d, rv3d, scene, ob, 1, NULL); @@ -3947,15 +3946,15 @@ static int drawDispList(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *bas } } else { - retval= drawDispListwire(lb); + retval = drawDispListwire(lb); } break; case OB_MBALL: - if ( is_basis_mball(ob)) { - lb= &ob->disp; - if (lb->first==NULL) makeDispListMBall(scene, ob); - if (lb->first==NULL) return 1; + if (is_basis_mball(ob)) { + lb = &ob->disp; + if (lb->first == NULL) makeDispListMBall(scene, ob); + if (lb->first == NULL) return 1; if (solid) { @@ -3972,7 +3971,7 @@ static int drawDispList(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *bas } else { /* MetaBalls use DL_INDEX4 type of DispList */ - retval= drawDispListwire(lb); + retval = drawDispListwire(lb); } } break; @@ -3985,21 +3984,21 @@ static int drawDispList(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *bas static void draw_particle_arrays(int draw_as, int totpoint, int ob_dt, int select) { /* draw created data arrays */ - switch(draw_as) { + switch (draw_as) { case PART_DRAW_AXIS: case PART_DRAW_CROSS: - glDrawArrays(GL_LINES, 0, 6*totpoint); + glDrawArrays(GL_LINES, 0, 6 * totpoint); break; case PART_DRAW_LINE: - glDrawArrays(GL_LINES, 0, 2*totpoint); + glDrawArrays(GL_LINES, 0, 2 * totpoint); break; case PART_DRAW_BB: - if (ob_dt<=OB_WIRE || select) - glPolygonMode(GL_FRONT_AND_BACK,GL_LINE); + if (ob_dt <= OB_WIRE || select) + glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); else glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - glDrawArrays(GL_QUADS, 0, 4*totpoint); + glDrawArrays(GL_QUADS, 0, 4 * totpoint); break; default: glDrawArrays(GL_POINTS, 0, totpoint); @@ -4012,7 +4011,7 @@ static void draw_particle(ParticleKey *state, int draw_as, short draw, float pix float vec[3], vec2[3]; float *vd = NULL; float *cd = NULL; - float ma_col[3]= {0.0f, 0.0f, 0.0f}; + float ma_col[3] = {0.0f, 0.0f, 0.0f}; /* null only for PART_DRAW_CIRC */ if (pdd) { @@ -4024,90 +4023,90 @@ static void draw_particle(ParticleKey *state, int draw_as, short draw, float pix } } - switch(draw_as) { + switch (draw_as) { case PART_DRAW_DOT: { if (vd) { - copy_v3_v3(vd,state->co); pdd->vd+=3; + copy_v3_v3(vd, state->co); pdd->vd += 3; } if (cd) { copy_v3_v3(cd, pdd->ma_col); - pdd->cd+=3; + pdd->cd += 3; } break; } case PART_DRAW_CROSS: case PART_DRAW_AXIS: { - vec[0]=2.0f*pixsize; - vec[1]=vec[2]=0.0; - mul_qt_v3(state->rot,vec); - if (draw_as==PART_DRAW_AXIS) { + vec[0] = 2.0f * pixsize; + vec[1] = vec[2] = 0.0; + mul_qt_v3(state->rot, vec); + if (draw_as == PART_DRAW_AXIS) { if (cd) { - cd[1]=cd[2]=cd[4]=cd[5]=0.0; - cd[0]=cd[3]=1.0; - cd[6]=cd[8]=cd[9]=cd[11]=0.0; - cd[7]=cd[10]=1.0; - cd[13]=cd[12]=cd[15]=cd[16]=0.0; - cd[14]=cd[17]=1.0; - pdd->cd+=18; + cd[1] = cd[2] = cd[4] = cd[5] = 0.0; + cd[0] = cd[3] = 1.0; + cd[6] = cd[8] = cd[9] = cd[11] = 0.0; + cd[7] = cd[10] = 1.0; + cd[13] = cd[12] = cd[15] = cd[16] = 0.0; + cd[14] = cd[17] = 1.0; + pdd->cd += 18; } - copy_v3_v3(vec2,state->co); + copy_v3_v3(vec2, state->co); } else { if (cd) { - cd[0]=cd[3]=cd[6]=cd[ 9]=cd[12]=cd[15]= ma_col[0]; - cd[1]=cd[4]=cd[7]=cd[10]=cd[13]=cd[16]= ma_col[1]; - cd[2]=cd[5]=cd[8]=cd[11]=cd[14]=cd[17]= ma_col[2]; - pdd->cd+=18; + cd[0] = cd[3] = cd[6] = cd[9] = cd[12] = cd[15] = ma_col[0]; + cd[1] = cd[4] = cd[7] = cd[10] = cd[13] = cd[16] = ma_col[1]; + cd[2] = cd[5] = cd[8] = cd[11] = cd[14] = cd[17] = ma_col[2]; + pdd->cd += 18; } sub_v3_v3v3(vec2, state->co, vec); } add_v3_v3(vec, state->co); - copy_v3_v3(pdd->vd,vec); pdd->vd+=3; - copy_v3_v3(pdd->vd,vec2); pdd->vd+=3; + copy_v3_v3(pdd->vd, vec); pdd->vd += 3; + copy_v3_v3(pdd->vd, vec2); pdd->vd += 3; - vec[1]=2.0f*pixsize; - vec[0]=vec[2]=0.0; - mul_qt_v3(state->rot,vec); - if (draw_as==PART_DRAW_AXIS) { - copy_v3_v3(vec2,state->co); + vec[1] = 2.0f * pixsize; + vec[0] = vec[2] = 0.0; + mul_qt_v3(state->rot, vec); + if (draw_as == PART_DRAW_AXIS) { + copy_v3_v3(vec2, state->co); } else sub_v3_v3v3(vec2, state->co, vec); add_v3_v3(vec, state->co); - copy_v3_v3(pdd->vd,vec); pdd->vd+=3; - copy_v3_v3(pdd->vd,vec2); pdd->vd+=3; + copy_v3_v3(pdd->vd, vec); pdd->vd += 3; + copy_v3_v3(pdd->vd, vec2); pdd->vd += 3; - vec[2]=2.0f*pixsize; - vec[0]=vec[1]=0.0; - mul_qt_v3(state->rot,vec); - if (draw_as==PART_DRAW_AXIS) { - copy_v3_v3(vec2,state->co); + vec[2] = 2.0f * pixsize; + vec[0] = vec[1] = 0.0; + mul_qt_v3(state->rot, vec); + if (draw_as == PART_DRAW_AXIS) { + copy_v3_v3(vec2, state->co); } else sub_v3_v3v3(vec2, state->co, vec); add_v3_v3(vec, state->co); - copy_v3_v3(pdd->vd,vec); pdd->vd+=3; - copy_v3_v3(pdd->vd,vec2); pdd->vd+=3; + copy_v3_v3(pdd->vd, vec); pdd->vd += 3; + copy_v3_v3(pdd->vd, vec2); pdd->vd += 3; break; } case PART_DRAW_LINE: { - copy_v3_v3(vec,state->vel); + copy_v3_v3(vec, state->vel); normalize_v3(vec); if (draw & PART_DRAW_VEL_LENGTH) - mul_v3_fl(vec,len_v3(state->vel)); - madd_v3_v3v3fl(pdd->vd, state->co, vec, -draw_line[0]); pdd->vd+=3; - madd_v3_v3v3fl(pdd->vd, state->co, vec, draw_line[1]); pdd->vd+=3; + mul_v3_fl(vec, len_v3(state->vel)); + madd_v3_v3v3fl(pdd->vd, state->co, vec, -draw_line[0]); pdd->vd += 3; + madd_v3_v3v3fl(pdd->vd, state->co, vec, draw_line[1]); pdd->vd += 3; if (cd) { - cd[0]=cd[3]= ma_col[0]; - cd[1]=cd[4]= ma_col[1]; - cd[2]=cd[5]= ma_col[2]; - pdd->cd+=6; + cd[0] = cd[3] = ma_col[0]; + cd[1] = cd[4] = ma_col[1]; + cd[2] = cd[5] = ma_col[2]; + pdd->cd += 6; } break; } @@ -4120,10 +4119,10 @@ static void draw_particle(ParticleKey *state, int draw_as, short draw, float pix { float xvec[3], yvec[3], zvec[3], bb_center[3]; if (cd) { - cd[0]=cd[3]=cd[6]=cd[ 9]= ma_col[0]; - cd[1]=cd[4]=cd[7]=cd[10]= ma_col[1]; - cd[2]=cd[5]=cd[8]=cd[11]= ma_col[2]; - pdd->cd+=12; + cd[0] = cd[3] = cd[6] = cd[9] = ma_col[0]; + cd[1] = cd[4] = cd[7] = cd[10] = ma_col[1]; + cd[2] = cd[5] = cd[8] = cd[11] = ma_col[2]; + pdd->cd += 12; } @@ -4133,21 +4132,21 @@ static void draw_particle(ParticleKey *state, int draw_as, short draw, float pix psys_make_billboard(bb, xvec, yvec, zvec, bb_center); add_v3_v3v3(pdd->vd, bb_center, xvec); - add_v3_v3(pdd->vd, yvec); pdd->vd+=3; + add_v3_v3(pdd->vd, yvec); pdd->vd += 3; sub_v3_v3v3(pdd->vd, bb_center, xvec); - add_v3_v3(pdd->vd, yvec); pdd->vd+=3; + add_v3_v3(pdd->vd, yvec); pdd->vd += 3; sub_v3_v3v3(pdd->vd, bb_center, xvec); - sub_v3_v3v3(pdd->vd, pdd->vd,yvec); pdd->vd+=3; + sub_v3_v3v3(pdd->vd, pdd->vd, yvec); pdd->vd += 3; add_v3_v3v3(pdd->vd, bb_center, xvec); - sub_v3_v3v3(pdd->vd, pdd->vd, yvec); pdd->vd+=3; + sub_v3_v3v3(pdd->vd, pdd->vd, yvec); pdd->vd += 3; - copy_v3_v3(pdd->nd, zvec); pdd->nd+=3; - copy_v3_v3(pdd->nd, zvec); pdd->nd+=3; - copy_v3_v3(pdd->nd, zvec); pdd->nd+=3; - copy_v3_v3(pdd->nd, zvec); pdd->nd+=3; + copy_v3_v3(pdd->nd, zvec); pdd->nd += 3; + copy_v3_v3(pdd->nd, zvec); pdd->nd += 3; + copy_v3_v3(pdd->nd, zvec); pdd->nd += 3; + copy_v3_v3(pdd->nd, zvec); pdd->nd += 3; break; } } @@ -4165,35 +4164,35 @@ static void draw_particle(ParticleKey *state, int draw_as, short draw, float pix static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, ParticleSystem *psys, int ob_dt) { - Object *ob=base->object; + Object *ob = base->object; ParticleEditSettings *pset = PE_settings(scene); ParticleSettings *part = psys->part; ParticleData *pars = psys->particles; ParticleData *pa; - ParticleKey state, *states=NULL; + ParticleKey state, *states = NULL; ParticleBillboardData bb; - ParticleSimulationData sim= {NULL}; + ParticleSimulationData sim = {NULL}; ParticleDrawData *pdd = psys->pdd; Material *ma; float vel[3], imat[4][4]; float timestep, pixsize_scale, pa_size, r_tilt, r_length; float pa_time, pa_birthtime, pa_dietime, pa_health, intensity; float cfra; - float ma_col[3]= {0.0f, 0.0f, 0.0f}; - int a, totpart, totpoint=0, totve=0, drawn, draw_as, totchild=0; - int select=ob->flag&SELECT, create_cdata=0, need_v=0; + float ma_col[3] = {0.0f, 0.0f, 0.0f}; + int a, totpart, totpoint = 0, totve = 0, drawn, draw_as, totchild = 0; + int select = ob->flag & SELECT, create_cdata = 0, need_v = 0; GLint polygonmode[2]; char numstr[32]; - unsigned char tcol[4]= {0, 0, 0, 255}; + unsigned char tcol[4] = {0, 0, 0, 255}; /* 1. */ - if (part==NULL || !psys_check_enabled(ob, psys)) + if (part == NULL || !psys_check_enabled(ob, psys)) return; - if (pars==NULL) return; + if (pars == NULL) return; /* don't draw normal paths in edit mode */ - if (psys_in_edit_mode(scene, psys) && (pset->flag & PE_DRAW_PART)==0) + if (psys_in_edit_mode(scene, psys) && (pset->flag & PE_DRAW_PART) == 0) return; if (part->draw_as == PART_DRAW_REND) @@ -4205,33 +4204,33 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv return; /* 2. */ - sim.scene= scene; - sim.ob= ob; - sim.psys= psys; - sim.psmd = psys_get_modifier(ob,psys); + sim.scene = scene; + sim.ob = ob; + sim.psys = psys; + sim.psmd = psys_get_modifier(ob, psys); - if (part->phystype==PART_PHYS_KEYED) { - if (psys->flag&PSYS_KEYED) { + if (part->phystype == PART_PHYS_KEYED) { + if (psys->flag & PSYS_KEYED) { psys_count_keyed_targets(&sim); - if (psys->totkeyed==0) + if (psys->totkeyed == 0) return; } } if (select) { - select=0; - if (psys_get_current(ob)==psys) - select=1; + select = 0; + if (psys_get_current(ob) == psys) + select = 1; } - psys->flag|=PSYS_DRAWING; + psys->flag |= PSYS_DRAWING; - if (part->type==PART_HAIR && !psys->childcache) - totchild=0; + if (part->type == PART_HAIR && !psys->childcache) + totchild = 0; else - totchild=psys->totchild*part->disp/100; + totchild = psys->totchild * part->disp / 100; - ma= give_current_material(ob,part->omat); + ma = give_current_material(ob, part->omat); if (v3d->zbuf) glDepthMask(1); @@ -4242,7 +4241,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv glColor3ubv(tcol); - timestep= psys_get_timestep(&sim); + timestep = psys_get_timestep(&sim); if ( (base->flag & OB_FROMDUPLI) && (ob->flag & OB_FROMGROUP) ) { float mat[4][4]; @@ -4253,27 +4252,27 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv /* needed for text display */ invert_m4_m4(ob->imat, ob->obmat); - totpart=psys->totpart; + totpart = psys->totpart; - cfra= BKE_curframe(scene); + cfra = BKE_curframe(scene); - if (draw_as==PART_DRAW_PATH && psys->pathcache==NULL && psys->childcache==NULL) - draw_as=PART_DRAW_DOT; + if (draw_as == PART_DRAW_PATH && psys->pathcache == NULL && psys->childcache == NULL) + draw_as = PART_DRAW_DOT; /* 3. */ - switch(draw_as) { + switch (draw_as) { case PART_DRAW_DOT: if (part->draw_size) glPointSize(part->draw_size); else - glPointSize(2.0); /* default dot size */ + glPointSize(2.0); /* default dot size */ break; case PART_DRAW_CIRC: /* calculate view aligned matrix: */ copy_m4_m4(imat, rv3d->viewinv); normalize_v3(imat[0]); normalize_v3(imat[1]); - /* no break! */ + /* no break! */ case PART_DRAW_CROSS: case PART_DRAW_AXIS: /* lets calculate the scale: */ @@ -4283,36 +4282,36 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv else pixsize_scale = part->draw_size; - if (draw_as==PART_DRAW_AXIS) + if (draw_as == PART_DRAW_AXIS) create_cdata = 1; break; case PART_DRAW_OB: - if (part->dup_ob==NULL) - draw_as=PART_DRAW_DOT; + if (part->dup_ob == NULL) + draw_as = PART_DRAW_DOT; else - draw_as=0; + draw_as = 0; break; case PART_DRAW_GR: - if (part->dup_group==NULL) - draw_as=PART_DRAW_DOT; + if (part->dup_group == NULL) + draw_as = PART_DRAW_DOT; else - draw_as=0; + draw_as = 0; break; case PART_DRAW_BB: - if (v3d->camera==NULL && part->bb_ob==NULL) { + if (v3d->camera == NULL && part->bb_ob == NULL) { printf("Billboards need an active camera or a target object!\n"); - draw_as=part->draw_as=PART_DRAW_DOT; + draw_as = part->draw_as = PART_DRAW_DOT; if (part->draw_size) glPointSize(part->draw_size); else - glPointSize(2.0); /* default dot size */ + glPointSize(2.0); /* default dot size */ } else if (part->bb_ob) - bb.ob=part->bb_ob; + bb.ob = part->bb_ob; else - bb.ob=v3d->camera; + bb.ob = v3d->camera; bb.align = part->bb_align; bb.anim = part->bb_anim; @@ -4321,10 +4320,10 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv case PART_DRAW_PATH: break; case PART_DRAW_LINE: - need_v=1; + need_v = 1; break; } - if (part->draw & PART_DRAW_SIZE && part->draw_as!=PART_DRAW_CIRC) { + if (part->draw & PART_DRAW_SIZE && part->draw_as != PART_DRAW_CIRC) { copy_m4_m4(imat, rv3d->viewinv); normalize_v3(imat[0]); normalize_v3(imat[1]); @@ -4342,7 +4341,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv } /* 4. */ - if (draw_as && ELEM(draw_as, PART_DRAW_PATH, PART_DRAW_CIRC)==0) { + if (draw_as && ELEM(draw_as, PART_DRAW_PATH, PART_DRAW_CIRC) == 0) { int tot_vec_size = (totpart + totchild) * 3 * sizeof(float); int create_ndata = 0; @@ -4354,7 +4353,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv psys_make_temp_pointcache(ob, psys); } - switch(draw_as) { + switch (draw_as) { case PART_DRAW_AXIS: case PART_DRAW_CROSS: tot_vec_size *= 6; @@ -4389,14 +4388,14 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv else if (pdd->vedata) { /* velocity data not needed, so free it */ MEM_freeN(pdd->vedata); - pdd->vedata= NULL; + pdd->vedata = NULL; } - pdd->vd= pdd->vdata; - pdd->ved= pdd->vedata; - pdd->cd= pdd->cdata; - pdd->nd= pdd->ndata; - pdd->tot_vec_size= tot_vec_size; + pdd->vd = pdd->vdata; + pdd->ved = pdd->vedata; + pdd->cd = pdd->cdata; + pdd->nd = pdd->ndata; + pdd->tot_vec_size = tot_vec_size; } else if (psys->pdd) { psys_free_pdd(psys); @@ -4405,62 +4404,62 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv } if (pdd) { - pdd->ma_col= ma_col; + pdd->ma_col = ma_col; } - psys->lattice= psys_get_lattice(&sim); + psys->lattice = psys_get_lattice(&sim); /* circles don't use drawdata, so have to add a special case here */ - if ((pdd || draw_as==PART_DRAW_CIRC) && draw_as!=PART_DRAW_PATH) { + if ((pdd || draw_as == PART_DRAW_CIRC) && draw_as != PART_DRAW_PATH) { /* 5. */ if (pdd && (pdd->flag & PARTICLE_DRAW_DATA_UPDATED) && - (pdd->vedata || part->draw & (PART_DRAW_SIZE|PART_DRAW_NUM|PART_DRAW_HEALTH))==0) + (pdd->vedata || part->draw & (PART_DRAW_SIZE | PART_DRAW_NUM | PART_DRAW_HEALTH)) == 0) { totpoint = pdd->totpoint; /* draw data is up to date */ } else { - for (a=0,pa=pars; adraw&PART_DRAW_PARENT)==0) continue; + if (a < totpart) { + if (totchild && (part->draw & PART_DRAW_PARENT) == 0) continue; if (pa->flag & PARS_NO_DISP || pa->flag & PARS_UNEXIST) continue; - pa_time=(cfra-pa->time)/pa->lifetime; - pa_birthtime=pa->time; + pa_time = (cfra - pa->time) / pa->lifetime; + pa_birthtime = pa->time; pa_dietime = pa->dietime; - pa_size=pa->size; - if (part->phystype==PART_PHYS_BOIDS) + pa_size = pa->size; + if (part->phystype == PART_PHYS_BOIDS) pa_health = pa->boid->data.health; else pa_health = -1.0; - r_tilt = 2.0f*(PSYS_FRAND(a + 21) - 0.5f); + r_tilt = 2.0f * (PSYS_FRAND(a + 21) - 0.5f); r_length = PSYS_FRAND(a + 22); if (part->draw_col > PART_DRAW_COL_MAT) { - switch(part->draw_col) { + switch (part->draw_col) { case PART_DRAW_COL_VEL: - intensity = len_v3(pa->state.vel)/part->color_vec_max; + intensity = len_v3(pa->state.vel) / part->color_vec_max; break; case PART_DRAW_COL_ACC: intensity = len_v3v3(pa->state.vel, pa->prev_state.vel) / ((pa->state.time - pa->prev_state.time) * part->color_vec_max); break; default: - intensity= 1.0f; /* should never happen */ + intensity = 1.0f; /* should never happen */ } CLAMP(intensity, 0.f, 1.f); weight_to_rgb(ma_col, intensity); } } else { - ChildParticle *cpa= &psys->child[a-totpart]; + ChildParticle *cpa = &psys->child[a - totpart]; - pa_time=psys_get_child_time(psys,cpa,cfra,&pa_birthtime,&pa_dietime); - pa_size=psys_get_child_size(psys,cpa,cfra,NULL); + pa_time = psys_get_child_time(psys, cpa, cfra, &pa_birthtime, &pa_dietime); + pa_size = psys_get_child_size(psys, cpa, cfra, NULL); pa_health = -1.0; - r_tilt = 2.0f*(PSYS_FRAND(a + 21) - 0.5f); + r_tilt = 2.0f * (PSYS_FRAND(a + 21) - 0.5f); r_length = PSYS_FRAND(a + 22); } @@ -4470,10 +4469,10 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv int trail_count = part->trail_count * (1.0f - part->randlength * r_length); float ct = ((part->draw & PART_ABS_PATH_TIME) ? cfra : pa_time) - length; float dt = length / (trail_count ? (float)trail_count : 1.0f); - int i=0; + int i = 0; - ct+=dt; - for (i=0; i < trail_count; i++, ct += dt) { + ct += dt; + for (i = 0; i < trail_count; i++, ct += dt) { float pixsize; if (part->draw & PART_ABS_PATH_TIME) { @@ -4484,7 +4483,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv continue; state.time = (part->draw & PART_ABS_PATH_TIME) ? -ct : -(pa_birthtime + ct * (pa_dietime - pa_birthtime)); - psys_get_particle_on_path(&sim,a,&state,need_v); + psys_get_particle_on_path(&sim, a, &state, need_v); if (psys->parent) mul_m4_v3(psys->parent->obmat, state.co); @@ -4494,14 +4493,14 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv bb.offset[0] = part->bb_offset[0]; bb.offset[1] = part->bb_offset[1]; bb.size[0] = part->bb_size[0] * pa_size; - if (part->bb_align==PART_BB_VEL) { + if (part->bb_align == PART_BB_VEL) { float pa_vel = len_v3(state.vel); - float head = part->bb_vel_head*pa_vel; - float tail = part->bb_vel_tail*pa_vel; - bb.size[1] = part->bb_size[1]*pa_size + head + tail; + float head = part->bb_vel_head * pa_vel; + float tail = part->bb_vel_tail * pa_vel; + bb.size[1] = part->bb_size[1] * pa_size + head + tail; /* use offset to adjust the particle center. this is relative to size, so need to divide! */ if (bb.size[1] > 0.0f) - bb.offset[1] += (head-tail) / bb.size[1]; + bb.offset[1] += (head - tail) / bb.size[1]; } else bb.size[1] = part->bb_size[1] * pa_size; @@ -4518,8 +4517,8 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv } } else { - state.time=cfra; - if (psys_get_particle_state(&sim,a,&state,0)) { + state.time = cfra; + if (psys_get_particle_state(&sim, a, &state, 0)) { float pixsize; if (psys->parent) @@ -4530,14 +4529,14 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv bb.offset[0] = part->bb_offset[0]; bb.offset[1] = part->bb_offset[1]; bb.size[0] = part->bb_size[0] * pa_size; - if (part->bb_align==PART_BB_VEL) { + if (part->bb_align == PART_BB_VEL) { float pa_vel = len_v3(state.vel); - float head = part->bb_vel_head*pa_vel; - float tail = part->bb_vel_tail*pa_vel; - bb.size[1] = part->bb_size[1]*pa_size + head + tail; + float head = part->bb_vel_head * pa_vel; + float tail = part->bb_vel_tail * pa_vel; + bb.size[1] = part->bb_size[1] * pa_size + head + tail; /* use offset to adjust the particle center. this is relative to size, so need to divide! */ if (bb.size[1] > 0.0f) - bb.offset[1] += (head-tail) / bb.size[1]; + bb.offset[1] += (head - tail) / bb.size[1]; } else bb.size[1] = part->bb_size[1] * pa_size; @@ -4558,11 +4557,11 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv /* additional things to draw for each particle */ /* (velocity, size and number) */ if ((part->draw & PART_DRAW_VEL) && pdd && pdd->vedata) { - copy_v3_v3(pdd->ved,state.co); + copy_v3_v3(pdd->ved, state.co); pdd->ved += 3; mul_v3_v3fl(vel, state.vel, timestep); add_v3_v3v3(pdd->ved, state.co, vel); - pdd->ved+=3; + pdd->ved += 3; totve++; } @@ -4578,11 +4577,11 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv (v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) { float vec_txt[3]; - char *val_pos= numstr; - numstr[0]= '\0'; + char *val_pos = numstr; + numstr[0] = '\0'; - if (part->draw&PART_DRAW_NUM) { - if (a < totpart && (part->draw & PART_DRAW_HEALTH) && (part->phystype==PART_PHYS_BOIDS)) { + if (part->draw & PART_DRAW_NUM) { + if (a < totpart && (part->draw & PART_DRAW_HEALTH) && (part->phystype == PART_PHYS_BOIDS)) { sprintf(val_pos, "%d:%.2f", a, pa_health); } else { @@ -4590,7 +4589,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv } } else { - if (a < totpart && (part->draw & PART_DRAW_HEALTH) && (part->phystype==PART_PHYS_BOIDS)) { + if (a < totpart && (part->draw & PART_DRAW_HEALTH) && (part->phystype == PART_PHYS_BOIDS)) { sprintf(val_pos, "%.2f", pa_health); } } @@ -4598,7 +4597,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv /* in path drawing state.co is the end point */ /* use worldspace beause object matrix is already applied */ mul_v3_m4v3(vec_txt, ob->imat, state.co); - view3d_cached_text_draw_add(vec_txt, numstr, 10, V3D_CACHE_TEXT_WORLDSPACE|V3D_CACHE_TEXT_ASCII, tcol); + view3d_cached_text_draw_add(vec_txt, numstr, 10, V3D_CACHE_TEXT_WORLDSPACE | V3D_CACHE_TEXT_ASCII, tcol); } } } @@ -4609,9 +4608,9 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv glGetIntegerv(GL_POLYGON_MODE, polygonmode); glEnableClientState(GL_VERTEX_ARRAY); - if (draw_as==PART_DRAW_PATH) { + if (draw_as == PART_DRAW_PATH) { ParticleCacheKey **cache, *path; - float /* *cd2=NULL, */ /* UNUSED */ *cdata2=NULL; + float /* *cd2=NULL, */ /* UNUSED */ *cdata2 = NULL; /* setup gl flags */ if (1) { //ob_dt > OB_WIRE) { @@ -4634,15 +4633,15 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv } #endif - if (totchild && (part->draw&PART_DRAW_PARENT)==0) - totpart=0; - else if (psys->pathcache==NULL) - totpart=0; + if (totchild && (part->draw & PART_DRAW_PARENT) == 0) + totpart = 0; + else if (psys->pathcache == NULL) + totpart = 0; /* draw actual/parent particles */ - cache=psys->pathcache; - for (a=0, pa=psys->particles; apathcache; + for (a = 0, pa = psys->particles; a < totpart; a++, pa++) { + path = cache[a]; if (path->steps > 0) { glVertexPointer(3, GL_FLOAT, sizeof(ParticleCacheKey), path->co); @@ -4657,9 +4656,9 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv } /* draw child particles */ - cache=psys->childcache; - for (a=0; achildcache; + for (a = 0; a < totchild; a++) { + path = cache[a]; glVertexPointer(3, GL_FLOAT, sizeof(ParticleCacheKey), path->co); if (1) { //ob_dt > OB_WIRE) { @@ -4681,23 +4680,23 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv if (cdata2) MEM_freeN(cdata2); - /* cd2= */ /* UNUSED */ cdata2=NULL; + /* cd2= */ /* UNUSED */ cdata2 = NULL; glLineWidth(1.0f); - if ((part->draw & PART_DRAW_NUM) && (v3d->flag2 & V3D_RENDER_OVERRIDE)==0) { - cache=psys->pathcache; + if ((part->draw & PART_DRAW_NUM) && (v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) { + cache = psys->pathcache; - for (a=0, pa=psys->particles; aparticles; a < totpart; a++, pa++) { float vec_txt[3]; BLI_snprintf(numstr, sizeof(numstr), "%i", a); /* use worldspace beause object matrix is already applied */ mul_v3_m4v3(vec_txt, ob->imat, cache[a]->co); - view3d_cached_text_draw_add(vec_txt, numstr, 10, V3D_CACHE_TEXT_WORLDSPACE|V3D_CACHE_TEXT_ASCII, tcol); + view3d_cached_text_draw_add(vec_txt, numstr, 10, V3D_CACHE_TEXT_WORLDSPACE | V3D_CACHE_TEXT_ASCII, tcol); } } } - else if (pdd && ELEM(draw_as, 0, PART_DRAW_CIRC)==0) { + else if (pdd && ELEM(draw_as, 0, PART_DRAW_CIRC) == 0) { glDisableClientState(GL_COLOR_ARRAY); /* enable point data array */ @@ -4729,7 +4728,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv /* enable other data arrays */ /* billboards are drawn this way */ - if (pdd->ndata && ob_dt>OB_WIRE) { + if (pdd->ndata && ob_dt > OB_WIRE) { glEnableClientState(GL_NORMAL_ARRAY); glNormalPointer(GL_FLOAT, 0, pdd->ndata); glEnable(GL_LIGHTING); @@ -4756,7 +4755,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv glVertexPointer(3, GL_FLOAT, 0, pdd->vedata); - glDrawArrays(GL_LINES, 0, 2*totve); + glDrawArrays(GL_LINES, 0, 2 * totve); } glPolygonMode(GL_FRONT, polygonmode[0]); @@ -4782,12 +4781,12 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv if (psys->lattice) { end_latt_deform(psys->lattice); - psys->lattice= NULL; + psys->lattice = NULL; } if (pdd) { /* drop references to stack memory */ - pdd->ma_col= NULL; + pdd->ma_col = NULL; } if ( (base->flag & OB_FROMDUPLI) && (ob->flag & OB_FROMGROUP) ) { @@ -4812,7 +4811,7 @@ static void draw_ptcache_edit(Scene *scene, View3D *v3d, PTCacheEdit *edit) PTCacheEditKey *key; ParticleEditSettings *pset = PE_settings(scene); int i, k, totpoint = edit->totpoint, timed = pset->flag & PE_FADE_TIME ? pset->fade_frames : 0; - int steps=1; + int steps = 1; float sel_col[3]; float nosel_col[3]; float *pathcol = NULL, *pcol; @@ -4823,7 +4822,7 @@ static void draw_ptcache_edit(Scene *scene, View3D *v3d, PTCacheEdit *edit) PE_hide_keys_time(scene, edit, CFRA); /* opengl setup */ - if ((v3d->flag & V3D_ZBUF_SELECT)==0) + if ((v3d->flag & V3D_ZBUF_SELECT) == 0) glDisable(GL_DEPTH_TEST); /* get selection theme colors */ @@ -4834,7 +4833,7 @@ static void draw_ptcache_edit(Scene *scene, View3D *v3d, PTCacheEdit *edit) if (timed) { glEnable(GL_BLEND); steps = (*edit->pathcache)->steps + 1; - pathcol = MEM_callocN(steps*4*sizeof(float), "particle path color data"); + pathcol = MEM_callocN(steps * 4 * sizeof(float), "particle path color data"); } glEnableClientState(GL_VERTEX_ARRAY); @@ -4849,18 +4848,18 @@ static void draw_ptcache_edit(Scene *scene, View3D *v3d, PTCacheEdit *edit) glDisable(GL_LIGHTING); } - cache=edit->pathcache; - for (i=0; ipathcache; + for (i = 0; i < totpoint; i++) { path = cache[i]; glVertexPointer(3, GL_FLOAT, sizeof(ParticleCacheKey), path->co); if (timed) { - for (k=0, pcol=pathcol, pkey=path; kcol); - pcol[3] = 1.0f - fabsf((float)(CFRA) - pkey->time)/(float)pset->fade_frames; + pcol[3] = 1.0f - fabsf((float)(CFRA) -pkey->time) / (float)pset->fade_frames; } - glColorPointer(4, GL_FLOAT, 4*sizeof(float), pathcol); + glColorPointer(4, GL_FLOAT, 4 * sizeof(float), pathcol); } else glColorPointer(3, GL_FLOAT, sizeof(ParticleCacheKey), path->col); @@ -4872,69 +4871,69 @@ static void draw_ptcache_edit(Scene *scene, View3D *v3d, PTCacheEdit *edit) /* draw edit vertices */ - if (pset->selectmode!=SCE_SELECT_PATH) { + if (pset->selectmode != SCE_SELECT_PATH) { glPointSize(UI_GetThemeValuef(TH_VERTEX_SIZE)); - if (pset->selectmode==SCE_SELECT_POINT) { - float *pd=NULL,*pdata=NULL; - float *cd=NULL,*cdata=NULL; + if (pset->selectmode == SCE_SELECT_POINT) { + float *pd = NULL, *pdata = NULL; + float *cd = NULL, *cdata = NULL; int totkeys = 0; - for (i=0, point=edit->points; ipoints; i < totpoint; i++, point++) if (!(point->flag & PEP_HIDE)) totkeys += point->totkey; if (edit->points && !(edit->points->keys->flag & PEK_USE_WCO)) - pd=pdata=MEM_callocN(totkeys*3*sizeof(float), "particle edit point data"); - cd=cdata=MEM_callocN(totkeys*(timed?4:3)*sizeof(float), "particle edit color data"); + pd = pdata = MEM_callocN(totkeys * 3 * sizeof(float), "particle edit point data"); + cd = cdata = MEM_callocN(totkeys * (timed ? 4 : 3) * sizeof(float), "particle edit color data"); - for (i=0, point=edit->points; ipoints; i < totpoint; i++, point++) { if (point->flag & PEP_HIDE) continue; - for (k=0, key=point->keys; ktotkey; k++, key++) { + for (k = 0, key = point->keys; k < point->totkey; k++, key++) { if (pd) { copy_v3_v3(pd, key->co); pd += 3; } - if (key->flag&PEK_SELECT) { - copy_v3_v3(cd,sel_col); + if (key->flag & PEK_SELECT) { + copy_v3_v3(cd, sel_col); } else { - copy_v3_v3(cd,nosel_col); + copy_v3_v3(cd, nosel_col); } if (timed) - *(cd+3) = 1.0f - fabsf((float)CFRA - *key->time)/(float)pset->fade_frames; + *(cd + 3) = 1.0f - fabsf((float)CFRA - *key->time) / (float)pset->fade_frames; - cd += (timed?4:3); + cd += (timed ? 4 : 3); } } - cd=cdata; - pd=pdata; - for (i=0, point=edit->points; ipoints; i < totpoint; i++, point++) { if (point->flag & PEP_HIDE || point->totkey == 0) continue; if (point->keys->flag & PEK_USE_WCO) glVertexPointer(3, GL_FLOAT, sizeof(PTCacheEditKey), point->keys->world_co); else - glVertexPointer(3, GL_FLOAT, 3*sizeof(float), pd); + glVertexPointer(3, GL_FLOAT, 3 * sizeof(float), pd); - glColorPointer((timed?4:3), GL_FLOAT, (timed?4:3)*sizeof(float), cd); + glColorPointer((timed ? 4 : 3), GL_FLOAT, (timed ? 4 : 3) * sizeof(float), cd); glDrawArrays(GL_POINTS, 0, point->totkey); pd += pd ? 3 * point->totkey : 0; - cd += (timed?4:3) * point->totkey; + cd += (timed ? 4 : 3) * point->totkey; } - if (pdata) { MEM_freeN(pdata); pd=pdata=NULL; } - if (cdata) { MEM_freeN(cdata); cd=cdata=NULL; } + if (pdata) { MEM_freeN(pdata); pd = pdata = NULL; } + if (cdata) { MEM_freeN(cdata); cd = cdata = NULL; } } else if (pset->selectmode == SCE_SELECT_END) { - for (i=0, point=edit->points; iflag & PEP_HIDE)==0 && point->totkey) { + for (i = 0, point = edit->points; i < totpoint; i++, point++) { + if ((point->flag & PEP_HIDE) == 0 && point->totkey) { key = point->keys + point->totkey - 1; if (key->flag & PEK_SELECT) glColor3fv(sel_col); @@ -4961,13 +4960,13 @@ static void draw_ptcache_edit(Scene *scene, View3D *v3d, PTCacheEdit *edit) glPointSize(1.0); } //static void ob_draw_RE_motion(float com[3],float rotscale[3][3],float tw,float th) -static void ob_draw_RE_motion(float com[3],float rotscale[3][3],float itw,float ith,float drw_size) +static void ob_draw_RE_motion(float com[3], float rotscale[3][3], float itw, float ith, float drw_size) { float tr[3][3]; - float root[3],tip[3]; - float tw,th; + float root[3], tip[3]; + float tw, th; /* take a copy for not spoiling original */ - copy_m3_m3(tr,rotscale); + copy_m3_m3(tr, rotscale); tw = itw * drw_size; th = ith * drw_size; @@ -4975,29 +4974,29 @@ static void ob_draw_RE_motion(float com[3],float rotscale[3][3],float itw,float glBegin(GL_LINES); root[1] = root[2] = 0.0f; root[0] = -drw_size; - mul_m3_v3(tr,root); + mul_m3_v3(tr, root); add_v3_v3(root, com); glVertex3fv(root); tip[1] = tip[2] = 0.0f; tip[0] = drw_size; - mul_m3_v3(tr,tip); + mul_m3_v3(tr, tip); add_v3_v3(tip, com); glVertex3fv(tip); glEnd(); - root[1] =0.0f; root[2] = tw; + root[1] = 0.0f; root[2] = tw; root[0] = th; glBegin(GL_LINES); - mul_m3_v3(tr,root); + mul_m3_v3(tr, root); add_v3_v3(root, com); glVertex3fv(root); glVertex3fv(tip); glEnd(); - root[1] =0.0f; root[2] = -tw; + root[1] = 0.0f; root[2] = -tw; root[0] = th; glBegin(GL_LINES); - mul_m3_v3(tr,root); + mul_m3_v3(tr, root); add_v3_v3(root, com); glVertex3fv(root); glVertex3fv(tip); @@ -5006,16 +5005,16 @@ static void ob_draw_RE_motion(float com[3],float rotscale[3][3],float itw,float root[1] = tw; root[2] = 0.0f; root[0] = th; glBegin(GL_LINES); - mul_m3_v3(tr,root); + mul_m3_v3(tr, root); add_v3_v3(root, com); glVertex3fv(root); glVertex3fv(tip); glEnd(); - root[1] =-tw; root[2] = 0.0f; + root[1] = -tw; root[2] = 0.0f; root[0] = th; glBegin(GL_LINES); - mul_m3_v3(tr,root); + mul_m3_v3(tr, root); add_v3_v3(root, com); glVertex3fv(root); glVertex3fv(tip); @@ -5026,20 +5025,20 @@ static void ob_draw_RE_motion(float com[3],float rotscale[3][3],float itw,float glBegin(GL_LINES); root[0] = root[2] = 0.0f; root[1] = -drw_size; - mul_m3_v3(tr,root); + mul_m3_v3(tr, root); add_v3_v3(root, com); glVertex3fv(root); tip[0] = tip[2] = 0.0f; tip[1] = drw_size; - mul_m3_v3(tr,tip); + mul_m3_v3(tr, tip); add_v3_v3(tip, com); glVertex3fv(tip); glEnd(); - root[0] =0.0f; root[2] = tw; + root[0] = 0.0f; root[2] = tw; root[1] = th; glBegin(GL_LINES); - mul_m3_v3(tr,root); + mul_m3_v3(tr, root); add_v3_v3(root, com); glVertex3fv(root); glVertex3fv(tip); @@ -5048,7 +5047,7 @@ static void ob_draw_RE_motion(float com[3],float rotscale[3][3],float itw,float root[0] = 0.0f; root[2] = -tw; root[1] = th; glBegin(GL_LINES); - mul_m3_v3(tr,root); + mul_m3_v3(tr, root); add_v3_v3(root, com); glVertex3fv(root); glVertex3fv(tip); @@ -5057,16 +5056,16 @@ static void ob_draw_RE_motion(float com[3],float rotscale[3][3],float itw,float root[0] = tw; root[2] = 0.0f; root[1] = th; glBegin(GL_LINES); - mul_m3_v3(tr,root); + mul_m3_v3(tr, root); add_v3_v3(root, com); glVertex3fv(root); glVertex3fv(tip); glEnd(); - root[0] =-tw; root[2] = 0.0f; + root[0] = -tw; root[2] = 0.0f; root[1] = th; glBegin(GL_LINES); - mul_m3_v3(tr,root); + mul_m3_v3(tr, root); add_v3_v3(root, com); glVertex3fv(root); glVertex3fv(tip); @@ -5076,29 +5075,29 @@ static void ob_draw_RE_motion(float com[3],float rotscale[3][3],float itw,float glBegin(GL_LINES); root[0] = root[1] = 0.0f; root[2] = -drw_size; - mul_m3_v3(tr,root); + mul_m3_v3(tr, root); add_v3_v3(root, com); glVertex3fv(root); tip[0] = tip[1] = 0.0f; tip[2] = drw_size; - mul_m3_v3(tr,tip); + mul_m3_v3(tr, tip); add_v3_v3(tip, com); glVertex3fv(tip); glEnd(); - root[0] =0.0f; root[1] = tw; + root[0] = 0.0f; root[1] = tw; root[2] = th; glBegin(GL_LINES); - mul_m3_v3(tr,root); + mul_m3_v3(tr, root); add_v3_v3(root, com); glVertex3fv(root); glVertex3fv(tip); glEnd(); - root[0] =0.0f; root[1] = -tw; + root[0] = 0.0f; root[1] = -tw; root[2] = th; glBegin(GL_LINES); - mul_m3_v3(tr,root); + mul_m3_v3(tr, root); add_v3_v3(root, com); glVertex3fv(root); glVertex3fv(tip); @@ -5107,7 +5106,7 @@ static void ob_draw_RE_motion(float com[3],float rotscale[3][3],float itw,float root[0] = tw; root[1] = 0.0f; root[2] = th; glBegin(GL_LINES); - mul_m3_v3(tr,root); + mul_m3_v3(tr, root); add_v3_v3(root, com); glVertex3fv(root); glVertex3fv(tip); @@ -5116,7 +5115,7 @@ static void ob_draw_RE_motion(float com[3],float rotscale[3][3],float itw,float root[0] = -tw; root[1] = 0.0f; root[2] = th; glBegin(GL_LINES); - mul_m3_v3(tr,root); + mul_m3_v3(tr, root); add_v3_v3(root, com); glVertex3fv(root); glVertex3fv(tip); @@ -5140,40 +5139,40 @@ static void tekenhandlesN(Nurb *nu, short sel, short hide_handles) #define TH_HANDLE_COL_TOT ((TH_HANDLE_SEL_FREE - TH_HANDLE_FREE) + 1) /* use MIN2 when indexing to ensure newer files don't read outside the array */ unsigned char handle_cols[TH_HANDLE_COL_TOT][3]; - const int basecol= sel ? TH_HANDLE_SEL_FREE : TH_HANDLE_FREE; + const int basecol = sel ? TH_HANDLE_SEL_FREE : TH_HANDLE_FREE; - for (a=0; a < TH_HANDLE_COL_TOT; a++) { + for (a = 0; a < TH_HANDLE_COL_TOT; a++) { UI_GetThemeColor3ubv(basecol + a, handle_cols[a]); } - bezt= nu->bezt; - a= nu->pntsu; + bezt = nu->bezt; + a = nu->pntsu; while (a--) { - if (bezt->hide==0) { - if ( (bezt->f2 & SELECT)==sel) { - fp= bezt->vec[0]; + if (bezt->hide == 0) { + if ( (bezt->f2 & SELECT) == sel) { + fp = bezt->vec[0]; - glColor3ubv(handle_cols[MIN2(bezt->h1, TH_HANDLE_COL_TOT-1)]); + glColor3ubv(handle_cols[MIN2(bezt->h1, TH_HANDLE_COL_TOT - 1)]); glVertex3fv(fp); - glVertex3fv(fp+3); + glVertex3fv(fp + 3); - glColor3ubv(handle_cols[MIN2(bezt->h2, TH_HANDLE_COL_TOT-1)]); - glVertex3fv(fp+3); - glVertex3fv(fp+6); + glColor3ubv(handle_cols[MIN2(bezt->h2, TH_HANDLE_COL_TOT - 1)]); + glVertex3fv(fp + 3); + glVertex3fv(fp + 6); } - else if ( (bezt->f1 & SELECT)==sel) { - fp= bezt->vec[0]; + else if ( (bezt->f1 & SELECT) == sel) { + fp = bezt->vec[0]; - glColor3ubv(handle_cols[MIN2(bezt->h1, TH_HANDLE_COL_TOT-1)]); + glColor3ubv(handle_cols[MIN2(bezt->h1, TH_HANDLE_COL_TOT - 1)]); glVertex3fv(fp); - glVertex3fv(fp+3); + glVertex3fv(fp + 3); } - else if ( (bezt->f3 & SELECT)==sel) { - fp= bezt->vec[1]; + else if ( (bezt->f3 & SELECT) == sel) { + fp = bezt->vec[1]; - glColor3ubv(handle_cols[MIN2(bezt->h2, TH_HANDLE_COL_TOT-1)]); + glColor3ubv(handle_cols[MIN2(bezt->h2, TH_HANDLE_COL_TOT - 1)]); glVertex3fv(fp); - glVertex3fv(fp+3); + glVertex3fv(fp + 3); } } bezt++; @@ -5199,24 +5198,24 @@ static void tekenhandlesN_active(Nurb *nu) glBegin(GL_LINES); if (nu->type == CU_BEZIER) { - bezt= nu->bezt; - a= nu->pntsu; + bezt = nu->bezt; + a = nu->pntsu; while (a--) { - if (bezt->hide==0) { - fp= bezt->vec[0]; + if (bezt->hide == 0) { + fp = bezt->vec[0]; glVertex3fv(fp); - glVertex3fv(fp+3); + glVertex3fv(fp + 3); - glVertex3fv(fp+3); - glVertex3fv(fp+6); + glVertex3fv(fp + 3); + glVertex3fv(fp + 6); } bezt++; } } glEnd(); - glColor3ub(0,0,0); + glColor3ub(0, 0, 0); glLineWidth(1); } @@ -5229,22 +5228,22 @@ static void tekenvertsN(Nurb *nu, short sel, short hide_handles, void *lastsel) if (nu->hide) return; - if (sel) color= TH_VERTEX_SELECT; - else color= TH_VERTEX; + if (sel) color = TH_VERTEX_SELECT; + else color = TH_VERTEX; UI_ThemeColor(color); - size= UI_GetThemeValuef(TH_VERTEX_SIZE); + size = UI_GetThemeValuef(TH_VERTEX_SIZE); glPointSize(size); bglBegin(GL_POINTS); if (nu->type == CU_BEZIER) { - bezt= nu->bezt; - a= nu->pntsu; + bezt = nu->bezt; + a = nu->pntsu; while (a--) { - if (bezt->hide==0) { + if (bezt->hide == 0) { if (sel == 1 && bezt == lastsel) { UI_ThemeColor(TH_LASTSEL_POINT); bglVertex3fv(bezt->vec[1]); @@ -5257,29 +5256,29 @@ static void tekenvertsN(Nurb *nu, short sel, short hide_handles, void *lastsel) UI_ThemeColor(color); } else if (hide_handles) { - if ((bezt->f2 & SELECT)==sel) bglVertex3fv(bezt->vec[1]); + if ((bezt->f2 & SELECT) == sel) bglVertex3fv(bezt->vec[1]); } else { - if ((bezt->f1 & SELECT)==sel) bglVertex3fv(bezt->vec[0]); - if ((bezt->f2 & SELECT)==sel) bglVertex3fv(bezt->vec[1]); - if ((bezt->f3 & SELECT)==sel) bglVertex3fv(bezt->vec[2]); + if ((bezt->f1 & SELECT) == sel) bglVertex3fv(bezt->vec[0]); + if ((bezt->f2 & SELECT) == sel) bglVertex3fv(bezt->vec[1]); + if ((bezt->f3 & SELECT) == sel) bglVertex3fv(bezt->vec[2]); } } bezt++; } } else { - bp= nu->bp; - a= nu->pntsu*nu->pntsv; + bp = nu->bp; + a = nu->pntsu * nu->pntsv; while (a--) { - if (bp->hide==0) { + if (bp->hide == 0) { if (bp == lastsel) { UI_ThemeColor(TH_LASTSEL_POINT); bglVertex3fv(bp->vec); UI_ThemeColor(color); } else { - if ((bp->f1 & SELECT)==sel) bglVertex3fv(bp->vec); + if ((bp->f1 & SELECT) == sel) bglVertex3fv(bp->vec); } } bp++; @@ -5298,19 +5297,19 @@ static void editnurb_draw_active_poly(Nurb *nu) UI_ThemeColor(TH_ACTIVE_SPLINE); glLineWidth(2); - bp= nu->bp; - for (b=0; bpntsv; b++) { + bp = nu->bp; + for (b = 0; b < nu->pntsv; b++) { if (nu->flagu & 1) glBegin(GL_LINE_LOOP); else glBegin(GL_LINE_STRIP); - for (a=0; apntsu; a++, bp++) { + for (a = 0; a < nu->pntsu; a++, bp++) { glVertex3fv(bp->vec); } glEnd(); } - glColor3ub(0,0,0); + glColor3ub(0, 0, 0); glLineWidth(1); } @@ -5323,39 +5322,39 @@ static void editnurb_draw_active_nurbs(Nurb *nu) glLineWidth(2); glBegin(GL_LINES); - bp= nu->bp; - for (b=0; bpntsv; b++) { - bp1= bp; + bp = nu->bp; + for (b = 0; b < nu->pntsv; b++) { + bp1 = bp; bp++; - for (a=nu->pntsu-1; a>0; a--, bp++) { - if (bp->hide==0 && bp1->hide==0) { + for (a = nu->pntsu - 1; a > 0; a--, bp++) { + if (bp->hide == 0 && bp1->hide == 0) { glVertex3fv(bp->vec); glVertex3fv(bp1->vec); } - bp1= bp; + bp1 = bp; } } - if (nu->pntsv > 1) { /* surface */ + if (nu->pntsv > 1) { /* surface */ - ofs= nu->pntsu; - for (b=0; bpntsu; b++) { - bp1= nu->bp+b; - bp= bp1+ofs; - for (a=nu->pntsv-1; a>0; a--, bp+=ofs) { - if (bp->hide==0 && bp1->hide==0) { + ofs = nu->pntsu; + for (b = 0; b < nu->pntsu; b++) { + bp1 = nu->bp + b; + bp = bp1 + ofs; + for (a = nu->pntsv - 1; a > 0; a--, bp += ofs) { + if (bp->hide == 0 && bp1->hide == 0) { glVertex3fv(bp->vec); glVertex3fv(bp1->vec); } - bp1= bp; + bp1 = bp; } } } glEnd(); - glColor3ub(0,0,0); + glColor3ub(0, 0, 0); glLineWidth(1); } @@ -5364,26 +5363,26 @@ static void draw_editnurb(Object *ob, Nurb *nurb, int sel) Nurb *nu; BPoint *bp, *bp1; int a, b, ofs, index; - Curve *cu= (Curve*)ob->data; + Curve *cu = (Curve *)ob->data; - index= 0; - nu= nurb; + index = 0; + nu = nurb; while (nu) { - if (nu->hide==0) { - switch(nu->type) { + if (nu->hide == 0) { + switch (nu->type) { case CU_POLY: - if (!sel && index== cu->actnu) { + if (!sel && index == cu->actnu) { /* we should draw active spline highlight below everything */ editnurb_draw_active_poly(nu); } UI_ThemeColor(TH_NURB_ULINE); - bp= nu->bp; - for (b=0; bpntsv; b++) { + bp = nu->bp; + for (b = 0; b < nu->pntsv; b++) { if (nu->flagu & 1) glBegin(GL_LINE_LOOP); else glBegin(GL_LINE_STRIP); - for (a=0; apntsu; a++, bp++) { + for (a = 0; a < nu->pntsu; a++, bp++) { glVertex3fv(bp->vec); } @@ -5391,19 +5390,19 @@ static void draw_editnurb(Object *ob, Nurb *nurb, int sel) } break; case CU_NURBS: - if (!sel && index== cu->actnu) { + if (!sel && index == cu->actnu) { /* we should draw active spline highlight below everything */ editnurb_draw_active_nurbs(nu); } - bp= nu->bp; - for (b=0; bpntsv; b++) { - bp1= bp; + bp = nu->bp; + for (b = 0; b < nu->pntsv; b++) { + bp1 = bp; bp++; - for (a=nu->pntsu-1; a>0; a--, bp++) { - if (bp->hide==0 && bp1->hide==0) { + for (a = nu->pntsu - 1; a > 0; a--, bp++) { + if (bp->hide == 0 && bp1->hide == 0) { if (sel) { - if ( (bp->f1 & SELECT) && ( bp1->f1 & SELECT ) ) { + if ( (bp->f1 & SELECT) && (bp1->f1 & SELECT) ) { UI_ThemeColor(TH_NURB_SEL_ULINE); glBegin(GL_LINE_STRIP); @@ -5426,19 +5425,19 @@ static void draw_editnurb(Object *ob, Nurb *nurb, int sel) } } } - bp1= bp; + bp1 = bp; } } - if (nu->pntsv > 1) { /* surface */ - - ofs= nu->pntsu; - for (b=0; bpntsu; b++) { - bp1= nu->bp+b; - bp= bp1+ofs; - for (a=nu->pntsv-1; a>0; a--, bp+=ofs) { - if (bp->hide==0 && bp1->hide==0) { + if (nu->pntsv > 1) { /* surface */ + + ofs = nu->pntsu; + for (b = 0; b < nu->pntsu; b++) { + bp1 = nu->bp + b; + bp = bp1 + ofs; + for (a = nu->pntsv - 1; a > 0; a--, bp += ofs) { + if (bp->hide == 0 && bp1->hide == 0) { if (sel) { - if ( (bp->f1 & SELECT) && ( bp1->f1 & SELECT) ) { + if ( (bp->f1 & SELECT) && (bp1->f1 & SELECT) ) { UI_ThemeColor(TH_NURB_SEL_VLINE); glBegin(GL_LINE_STRIP); @@ -5461,7 +5460,7 @@ static void draw_editnurb(Object *ob, Nurb *nurb, int sel) } } } - bp1= bp; + bp1 = bp; } } @@ -5471,14 +5470,14 @@ static void draw_editnurb(Object *ob, Nurb *nurb, int sel) } ++index; - nu= nu->next; + nu = nu->next; } } static void drawnurb(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, Nurb *nurb, int dt) { - ToolSettings *ts= scene->toolsettings; - Object *ob= base->object; + ToolSettings *ts = scene->toolsettings; + Object *ob = base->object; Curve *cu = ob->data; Nurb *nu; BevList *bl; @@ -5492,8 +5491,8 @@ static void drawnurb(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, if (v3d->zbuf) glDisable(GL_DEPTH_TEST); /* first non-selected and active handles */ - index= 0; - for (nu=nurb; nu; nu=nu->next) { + index = 0; + for (nu = nurb; nu; nu = nu->next) { if (nu->type == CU_BEZIER) { if (index == cu->actnu && !hide_handles) tekenhandlesN_active(nu); @@ -5504,8 +5503,8 @@ static void drawnurb(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, draw_editnurb(ob, nurb, 0); draw_editnurb(ob, nurb, 1); /* selected handles */ - for (nu=nurb; nu; nu=nu->next) { - if (nu->type == CU_BEZIER && (cu->drawflag & CU_HIDE_HANDLES)==0) + for (nu = nurb; nu; nu = nu->next) { + if (nu->type == CU_BEZIER && (cu->drawflag & CU_HIDE_HANDLES) == 0) tekenhandlesN(nu, 1, hide_handles); tekenvertsN(nu, 0, hide_handles, NULL); } @@ -5514,26 +5513,26 @@ static void drawnurb(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, /* direction vectors for 3d curve paths * when at its lowest, don't render normals */ - if ((cu->flag & CU_3D) && (ts->normalsize > 0.0015f) && (cu->drawflag & CU_HIDE_NORMALS)==0) { + if ((cu->flag & CU_3D) && (ts->normalsize > 0.0015f) && (cu->drawflag & CU_HIDE_NORMALS) == 0) { UI_ThemeColor(TH_WIRE); - for (bl=cu->bev.first,nu=nurb; nu && bl; bl=bl->next,nu=nu->next) { - BevPoint *bevp= (BevPoint *)(bl + 1); - int nr= bl->nr; - int skip= nu->resolu/16; + for (bl = cu->bev.first, nu = nurb; nu && bl; bl = bl->next, nu = nu->next) { + BevPoint *bevp = (BevPoint *)(bl + 1); + int nr = bl->nr; + int skip = nu->resolu / 16; - while (nr-->0) { /* accounts for empty bevel lists */ - const float fac= bevp->radius * ts->normalsize; + while (nr-- > 0) { /* accounts for empty bevel lists */ + const float fac = bevp->radius * ts->normalsize; float vec_a[3]; // Offset perpendicular to the curve float vec_b[3]; // Delta along the curve - vec_a[0]= fac; - vec_a[1]= 0.0f; - vec_a[2]= 0.0f; + vec_a[0] = fac; + vec_a[1] = 0.0f; + vec_a[2] = 0.0f; - vec_b[0]= -fac; - vec_b[1]= 0.0f; - vec_b[2]= 0.0f; + vec_b[0] = -fac; + vec_b[1] = 0.0f; + vec_b[2] = 0.0f; mul_qt_v3(bevp->quat, vec_a); mul_qt_v3(bevp->quat, vec_b); @@ -5549,7 +5548,7 @@ static void drawnurb(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, glVertex3fv(vec_b); glEnd(); - bevp += skip+1; + bevp += skip + 1; nr -= skip; } } @@ -5557,7 +5556,7 @@ static void drawnurb(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, if (v3d->zbuf) glDisable(GL_DEPTH_TEST); - for (nu=nurb; nu; nu=nu->next) { + for (nu = nurb; nu; nu = nu->next) { tekenvertsN(nu, 1, hide_handles, cu->lastsel); } @@ -5565,14 +5564,14 @@ static void drawnurb(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, } /* draw a sphere for use as an empty drawtype */ -static void draw_empty_sphere (float size) +static void draw_empty_sphere(float size) { - static GLuint displist=0; + static GLuint displist = 0; if (displist == 0) { - GLUquadricObj *qobj; + GLUquadricObj *qobj; - displist= glGenLists(1); + displist = glGenLists(1); glNewList(displist, GL_COMPILE); glPushMatrix(); @@ -5595,13 +5594,13 @@ static void draw_empty_sphere (float size) glScalef(size, size, size); glCallList(displist); - glScalef(1.0f/size, 1.0f/size, 1.0f/size); + glScalef(1.0f / size, 1.0f / size, 1.0f / size); } /* draw a cone for use as an empty drawtype */ -static void draw_empty_cone (float size) +static void draw_empty_cone(float size) { - float cent=0; + float cent = 0; float radius; GLUquadricObj *qobj = gluNewQuadric(); gluQuadricDrawStyle(qobj, GLU_SILHOUETTE); @@ -5610,7 +5609,7 @@ static void draw_empty_cone (float size) glPushMatrix(); radius = size; - glTranslatef(cent,cent, cent); + glTranslatef(cent, cent, cent); glScalef(radius, size * 2.0f, radius); glRotatef(-90., 1.0, 0.0, 0.0); gluCylinder(qobj, 1.0, 0.0, 1.0, 8, 1); @@ -5624,25 +5623,25 @@ static void draw_empty_cone (float size) #if 0 // XXX old animation system stuff static void curve_draw_speed(Scene *scene, Object *ob) { - Curve *cu= ob->data; + Curve *cu = ob->data; IpoCurve *icu; BezTriple *bezt; float loc[4], dir[3]; int a; - if (cu->ipo==NULL) + if (cu->ipo == NULL) return; - icu= cu->ipo->curve.first; - if (icu==NULL || icu->totvert<2) + icu = cu->ipo->curve.first; + if (icu == NULL || icu->totvert < 2) return; - glPointSize( UI_GetThemeValuef(TH_VERTEX_SIZE) ); + glPointSize(UI_GetThemeValuef(TH_VERTEX_SIZE) ); bglBegin(GL_POINTS); - for (a=0, bezt= icu->bezt; atotvert; a++, bezt++) { - if ( where_on_path(ob, bezt->vec[1][1], loc, dir)) { - UI_ThemeColor((bezt->f2 & SELECT) && ob==OBACT?TH_VERTEX_SELECT:TH_VERTEX); + for (a = 0, bezt = icu->bezt; a < icu->totvert; a++, bezt++) { + if (where_on_path(ob, bezt->vec[1][1], loc, dir)) { + UI_ThemeColor((bezt->f2 & SELECT) && ob == OBACT ? TH_VERTEX_SELECT : TH_VERTEX); bglVertex3fv(loc); } } @@ -5670,14 +5669,14 @@ static void draw_textcurs(float textcurs[4][2]) static void drawspiral(const float cent[3], float rad, float tmat[][4], int start) { float vec[3], vx[3], vy[3]; - const float tot_inv= (1.0f / (float)CIRCLE_RESOL); + const float tot_inv = (1.0f / (float)CIRCLE_RESOL); int a; - char inverse= FALSE; + char inverse = FALSE; float x, y, fac; if (start < 0) { inverse = TRUE; - start= -start; + start = -start; } mul_v3_v3fl(vx, tmat[0], rad); @@ -5685,47 +5684,47 @@ static void drawspiral(const float cent[3], float rad, float tmat[][4], int star glBegin(GL_LINE_STRIP); - if (inverse==0) { + if (inverse == 0) { copy_v3_v3(vec, cent); glVertex3fv(vec); - for (a=0; a=CIRCLE_RESOL) - start=-a + 1; + for (a = 0; a < CIRCLE_RESOL; a++) { + if (a + start >= CIRCLE_RESOL) + start = -a + 1; - fac= (float)a * tot_inv; - x= sinval[a+start] * fac; - y= cosval[a+start] * fac; + fac = (float)a * tot_inv; + x = sinval[a + start] * fac; + y = cosval[a + start] * fac; - vec[0]= cent[0] + (x * vx[0] + y * vy[0]); - vec[1]= cent[1] + (x * vx[1] + y * vy[1]); - vec[2]= cent[2] + (x * vx[2] + y * vy[2]); + vec[0] = cent[0] + (x * vx[0] + y * vy[0]); + vec[1] = cent[1] + (x * vx[1] + y * vy[1]); + vec[2] = cent[2] + (x * vx[2] + y * vy[2]); glVertex3fv(vec); } } else { - fac= (float)(CIRCLE_RESOL-1) * tot_inv; - x= sinval[start] * fac; - y= cosval[start] * fac; + fac = (float)(CIRCLE_RESOL - 1) * tot_inv; + x = sinval[start] * fac; + y = cosval[start] * fac; - vec[0]= cent[0] + (x * vx[0] + y * vy[0]); - vec[1]= cent[1] + (x * vx[1] + y * vy[1]); - vec[2]= cent[2] + (x * vx[2] + y * vy[2]); + vec[0] = cent[0] + (x * vx[0] + y * vy[0]); + vec[1] = cent[1] + (x * vx[1] + y * vy[1]); + vec[2] = cent[2] + (x * vx[2] + y * vy[2]); glVertex3fv(vec); - for (a=0; a=CIRCLE_RESOL) - start=-a + 1; + for (a = 0; a < CIRCLE_RESOL; a++) { + if (a + start >= CIRCLE_RESOL) + start = -a + 1; - fac= (float)(-a+(CIRCLE_RESOL-1)) * tot_inv; - x= sinval[a+start] * fac; - y= cosval[a+start] * fac; + fac = (float)(-a + (CIRCLE_RESOL - 1)) * tot_inv; + x = sinval[a + start] * fac; + y = cosval[a + start] * fac; - vec[0]= cent[0] + (x * vx[0] + y * vy[0]); - vec[1]= cent[1] + (x * vx[1] + y * vy[1]); - vec[2]= cent[2] + (x * vx[2] + y * vy[2]); + vec[0] = cent[0] + (x * vx[0] + y * vy[0]); + vec[1] = cent[1] + (x * vx[1] + y * vy[1]); + vec[2] = cent[2] + (x * vx[2] + y * vy[2]); glVertex3fv(vec); } } @@ -5744,11 +5743,11 @@ static void drawcircle_size(float size) glBegin(GL_LINE_LOOP); /* coordinates are: cos(degrees*11.25)=x, sin(degrees*11.25)=y, 0.0f=z */ - for (degrees=0; degreesobject; + Object *ob = base->object; MetaBall *mb; MetaElem *ml; float imat[4][4]; - int code= 1; + int code = 1; - mb= ob->data; + mb = ob->data; if (mb->editelems) { UI_ThemeColor(TH_WIRE); - if ((G.f & G_PICKSEL)==0 ) drawDispList(scene, v3d, rv3d, base, dt); - ml= mb->editelems->first; + if ((G.f & G_PICKSEL) == 0) drawDispList(scene, v3d, rv3d, base, dt); + ml = mb->editelems->first; } else { - if ((base->flag & OB_FROMDUPLI)==0) + if ((base->flag & OB_FROMDUPLI) == 0) drawDispList(scene, v3d, rv3d, base, dt); - ml= mb->elems.first; + ml = mb->elems.first; } - if (ml==NULL) return 1; + if (ml == NULL) return 1; if (v3d->flag2 & V3D_RENDER_OVERRIDE) return 0; /* in case solid draw, reset wire colors */ if (ob->flag & SELECT) { - if (ob==OBACT) UI_ThemeColor(TH_ACTIVE); + if (ob == OBACT) UI_ThemeColor(TH_ACTIVE); else UI_ThemeColor(TH_SELECT); } else UI_ThemeColor(TH_WIRE); @@ -5843,7 +5842,7 @@ static int drawmball(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, else cpack(0x3030A0); if (G.f & G_PICKSEL) { - ml->selcol1= code; + ml->selcol1 = code; glLoadName(code++); } } @@ -5855,31 +5854,31 @@ static int drawmball(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base, else cpack(0x30A030); if (G.f & G_PICKSEL) { - ml->selcol2= code; + ml->selcol2 = code; glLoadName(code++); } - drawcircball(GL_LINE_LOOP, &(ml->x), ml->rad*atanf(ml->s)/(float)M_PI_2, imat); + drawcircball(GL_LINE_LOOP, &(ml->x), ml->rad * atanf(ml->s) / (float)M_PI_2, imat); } - ml= ml->next; + ml = ml->next; } return 0; } static void draw_forcefield(Scene *scene, Object *ob, RegionView3D *rv3d) { - PartDeflect *pd= ob->pd; + PartDeflect *pd = ob->pd; float imat[4][4], tmat[4][4]; - float vec[3]= {0.0, 0.0, 0.0}; + float vec[3] = {0.0, 0.0, 0.0}; int curcol; float size; /* XXX why? */ - if (ob!=scene->obedit && (ob->flag & SELECT)) { - if (ob==OBACT) curcol= TH_ACTIVE; - else curcol= TH_SELECT; + if (ob != scene->obedit && (ob->flag & SELECT)) { + if (ob == OBACT) curcol = TH_ACTIVE; + else curcol = TH_SELECT; } - else curcol= TH_EMPTY; + else curcol = TH_EMPTY; /* scale size of circle etc with the empty drawsize */ if (ob->type == OB_EMPTY) size = ob->empty_drawsize; @@ -5904,11 +5903,11 @@ static void draw_forcefield(Scene *scene, Object *ob, RegionView3D *rv3d) } force_val *= 0.1f; drawcircball(GL_LINE_LOOP, vec, size, tmat); - vec[2]= 0.5f * force_val; + vec[2] = 0.5f * force_val; drawcircball(GL_LINE_LOOP, vec, size, tmat); - vec[2]= 1.0f * force_val; + vec[2] = 1.0f * force_val; drawcircball(GL_LINE_LOOP, vec, size, tmat); - vec[2]= 1.5f * force_val; + vec[2] = 1.5f * force_val; drawcircball(GL_LINE_LOOP, vec, size, tmat); vec[2] = 0.0f; /* reset vec for max dist circle */ @@ -5928,7 +5927,7 @@ static void draw_forcefield(Scene *scene, Object *ob, RegionView3D *rv3d) UI_ThemeColorBlend(curcol, TH_BACK, 0.9f - 0.4f / powf(1.5f, ffall_val)); drawcircball(GL_LINE_LOOP, vec, size * 1.5f, imat); UI_ThemeColorBlend(curcol, TH_BACK, 0.9f - 0.4f / powf(2.0f, ffall_val)); - drawcircball(GL_LINE_LOOP, vec, size*2.0f, imat); + drawcircball(GL_LINE_LOOP, vec, size * 2.0f, imat); } else if (pd->forcefield == PFIELD_VORTEX) { float /*ffall_val,*/ force_val; @@ -5956,8 +5955,8 @@ static void draw_forcefield(Scene *scene, Object *ob, RegionView3D *rv3d) drawspiral(vec, size, tmat, -16); } } - else if (pd->forcefield == PFIELD_GUIDE && ob->type==OB_CURVE) { - Curve *cu= ob->data; + else if (pd->forcefield == PFIELD_GUIDE && ob->type == OB_CURVE) { + Curve *cu = ob->data; if ((cu->flag & CU_PATH) && cu->path && cu->path->data) { float mindist, guidevec1[4], guidevec2[3]; @@ -5980,14 +5979,14 @@ static void draw_forcefield(Scene *scene, Object *ob, RegionView3D *rv3d) UI_ThemeColorBlend(curcol, TH_BACK, 0.5); drawcircball(GL_LINE_LOOP, guidevec1, mindist, imat); - copy_v3_v3(vec, guidevec1); /* max center */ + copy_v3_v3(vec, guidevec1); /* max center */ } } setlinestyle(3); UI_ThemeColorBlend(curcol, TH_BACK, 0.5); - if (pd->falloff==PFIELD_FALL_SPHERE) { + if (pd->falloff == PFIELD_FALL_SPHERE) { /* as last, guide curve alters it */ if (pd->flag & PFIELD_USEMAX) drawcircball(GL_LINE_LOOP, vec, pd->maxdist, imat); @@ -5995,48 +5994,48 @@ static void draw_forcefield(Scene *scene, Object *ob, RegionView3D *rv3d) if (pd->flag & PFIELD_USEMIN) drawcircball(GL_LINE_LOOP, vec, pd->mindist, imat); } - else if (pd->falloff==PFIELD_FALL_TUBE) { - float radius,distance; + else if (pd->falloff == PFIELD_FALL_TUBE) { + float radius, distance; unit_m4(tmat); - vec[0]=vec[1]=0.0f; - radius=(pd->flag&PFIELD_USEMAXR)?pd->maxrad:1.0f; - distance=(pd->flag&PFIELD_USEMAX)?pd->maxdist:0.0f; - vec[2]=distance; - distance=(pd->flag&PFIELD_POSZ)?-distance:-2.0f*distance; + vec[0] = vec[1] = 0.0f; + radius = (pd->flag & PFIELD_USEMAXR) ? pd->maxrad : 1.0f; + distance = (pd->flag & PFIELD_USEMAX) ? pd->maxdist : 0.0f; + vec[2] = distance; + distance = (pd->flag & PFIELD_POSZ) ? -distance : -2.0f * distance; - if (pd->flag & (PFIELD_USEMAX|PFIELD_USEMAXR)) - drawtube(vec,radius,distance,tmat); + if (pd->flag & (PFIELD_USEMAX | PFIELD_USEMAXR)) + drawtube(vec, radius, distance, tmat); - radius=(pd->flag&PFIELD_USEMINR)?pd->minrad:1.0f; - distance=(pd->flag&PFIELD_USEMIN)?pd->mindist:0.0f; - vec[2]=distance; - distance=(pd->flag&PFIELD_POSZ)?-distance:-2.0f*distance; + radius = (pd->flag & PFIELD_USEMINR) ? pd->minrad : 1.0f; + distance = (pd->flag & PFIELD_USEMIN) ? pd->mindist : 0.0f; + vec[2] = distance; + distance = (pd->flag & PFIELD_POSZ) ? -distance : -2.0f * distance; - if (pd->flag & (PFIELD_USEMIN|PFIELD_USEMINR)) - drawtube(vec,radius,distance,tmat); + if (pd->flag & (PFIELD_USEMIN | PFIELD_USEMINR)) + drawtube(vec, radius, distance, tmat); } - else if (pd->falloff==PFIELD_FALL_CONE) { - float radius,distance; + else if (pd->falloff == PFIELD_FALL_CONE) { + float radius, distance; unit_m4(tmat); - radius= DEG2RADF((pd->flag&PFIELD_USEMAXR) ? pd->maxrad : 1.0f); - distance=(pd->flag&PFIELD_USEMAX)?pd->maxdist:0.0f; + radius = DEG2RADF((pd->flag & PFIELD_USEMAXR) ? pd->maxrad : 1.0f); + distance = (pd->flag & PFIELD_USEMAX) ? pd->maxdist : 0.0f; - if (pd->flag & (PFIELD_USEMAX|PFIELD_USEMAXR)) { - drawcone(vec, distance * sinf(radius),distance * cosf(radius), tmat); - if ((pd->flag & PFIELD_POSZ)==0) - drawcone(vec, distance * sinf(radius),-distance * cosf(radius),tmat); + if (pd->flag & (PFIELD_USEMAX | PFIELD_USEMAXR)) { + drawcone(vec, distance * sinf(radius), distance * cosf(radius), tmat); + if ((pd->flag & PFIELD_POSZ) == 0) + drawcone(vec, distance * sinf(radius), -distance * cosf(radius), tmat); } - radius= DEG2RADF((pd->flag&PFIELD_USEMINR) ? pd->minrad : 1.0f); - distance=(pd->flag&PFIELD_USEMIN)?pd->mindist:0.0f; + radius = DEG2RADF((pd->flag & PFIELD_USEMINR) ? pd->minrad : 1.0f); + distance = (pd->flag & PFIELD_USEMIN) ? pd->mindist : 0.0f; - if (pd->flag & (PFIELD_USEMIN|PFIELD_USEMINR)) { - drawcone(vec,distance*sinf(radius),distance*cosf(radius),tmat); - if ((pd->flag & PFIELD_POSZ)==0) + if (pd->flag & (PFIELD_USEMIN | PFIELD_USEMINR)) { + drawcone(vec, distance * sinf(radius), distance * cosf(radius), tmat); + if ((pd->flag & PFIELD_POSZ) == 0) drawcone(vec, distance * sinf(radius), -distance * cosf(radius), tmat); } } @@ -6046,8 +6045,8 @@ static void draw_forcefield(Scene *scene, Object *ob, RegionView3D *rv3d) static void draw_box(float vec[8][3]) { glBegin(GL_LINE_STRIP); - glVertex3fv(vec[0]); glVertex3fv(vec[1]);glVertex3fv(vec[2]); glVertex3fv(vec[3]); - glVertex3fv(vec[0]); glVertex3fv(vec[4]);glVertex3fv(vec[5]); glVertex3fv(vec[6]); + glVertex3fv(vec[0]); glVertex3fv(vec[1]); glVertex3fv(vec[2]); glVertex3fv(vec[3]); + glVertex3fv(vec[0]); glVertex3fv(vec[4]); glVertex3fv(vec[5]); glVertex3fv(vec[6]); glVertex3fv(vec[7]); glVertex3fv(vec[4]); glEnd(); @@ -6062,20 +6061,20 @@ static void draw_box(float vec[8][3]) #if 0 static void get_local_bounds(Object *ob, float center[3], float size[3]) { - BoundBox *bb= object_get_boundbox(ob); + BoundBox *bb = object_get_boundbox(ob); - if (bb==NULL) { + if (bb == NULL) { zero_v3(center); copy_v3_v3(size, ob->size); } else { - size[0]= 0.5*fabs(bb->vec[0][0] - bb->vec[4][0]); - size[1]= 0.5*fabs(bb->vec[0][1] - bb->vec[2][1]); - size[2]= 0.5*fabs(bb->vec[0][2] - bb->vec[1][2]); - - center[0]= (bb->vec[0][0] + bb->vec[4][0])/2.0; - center[1]= (bb->vec[0][1] + bb->vec[2][1])/2.0; - center[2]= (bb->vec[0][2] + bb->vec[1][2])/2.0; + size[0] = 0.5 * fabs(bb->vec[0][0] - bb->vec[4][0]); + size[1] = 0.5 * fabs(bb->vec[0][1] - bb->vec[2][1]); + size[2] = 0.5 * fabs(bb->vec[0][2] - bb->vec[1][2]); + + center[0] = (bb->vec[0][0] + bb->vec[4][0]) / 2.0; + center[1] = (bb->vec[0][1] + bb->vec[2][1]) / 2.0; + center[2] = (bb->vec[0][2] + bb->vec[1][2]) / 2.0; } } #endif @@ -6087,29 +6086,29 @@ static void draw_bb_quadric(BoundBox *bb, char type) gluQuadricDrawStyle(qobj, GLU_SILHOUETTE); - size[0]= 0.5f*fabsf(bb->vec[0][0] - bb->vec[4][0]); - size[1]= 0.5f*fabsf(bb->vec[0][1] - bb->vec[2][1]); - size[2]= 0.5f*fabsf(bb->vec[0][2] - bb->vec[1][2]); - - cent[0]= 0.5f*(bb->vec[0][0] + bb->vec[4][0]); - cent[1]= 0.5f*(bb->vec[0][1] + bb->vec[2][1]); - cent[2]= 0.5f*(bb->vec[0][2] + bb->vec[1][2]); + size[0] = 0.5f * fabsf(bb->vec[0][0] - bb->vec[4][0]); + size[1] = 0.5f * fabsf(bb->vec[0][1] - bb->vec[2][1]); + size[2] = 0.5f * fabsf(bb->vec[0][2] - bb->vec[1][2]); + + cent[0] = 0.5f * (bb->vec[0][0] + bb->vec[4][0]); + cent[1] = 0.5f * (bb->vec[0][1] + bb->vec[2][1]); + cent[2] = 0.5f * (bb->vec[0][2] + bb->vec[1][2]); glPushMatrix(); - if (type==OB_BOUND_SPHERE) { + if (type == OB_BOUND_SPHERE) { glTranslatef(cent[0], cent[1], cent[2]); glScalef(size[0], size[1], size[2]); gluSphere(qobj, 1.0, 8, 5); } - else if (type==OB_BOUND_CYLINDER) { + else if (type == OB_BOUND_CYLINDER) { float radius = size[0] > size[1] ? size[0] : size[1]; - glTranslatef(cent[0], cent[1], cent[2]-size[2]); + glTranslatef(cent[0], cent[1], cent[2] - size[2]); glScalef(radius, radius, 2.0f * size[2]); gluCylinder(qobj, 1.0, 1.0, 1.0, 8, 1); } - else if (type==OB_BOUND_CONE) { + else if (type == OB_BOUND_CONE) { float radius = size[0] > size[1] ? size[0] : size[1]; - glTranslatef(cent[0], cent[1], cent[2]-size[2]); + glTranslatef(cent[0], cent[1], cent[2] - size[2]); glScalef(radius, radius, 2.0f * size[2]); gluCylinder(qobj, 1.0, 0.0, 1.0, 8, 1); } @@ -6120,20 +6119,20 @@ static void draw_bb_quadric(BoundBox *bb, char type) static void draw_bounding_volume(Scene *scene, Object *ob, char type) { - BoundBox *bb= NULL; + BoundBox *bb = NULL; - if (ob->type==OB_MESH) { - bb= mesh_get_bb(ob); + if (ob->type == OB_MESH) { + bb = mesh_get_bb(ob); } else if (ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT)) { - bb= ob->bb ? ob->bb : ( (Curve *)ob->data )->bb; + bb = ob->bb ? ob->bb : ( (Curve *)ob->data)->bb; } - else if (ob->type==OB_MBALL) { + else if (ob->type == OB_MBALL) { if (is_basis_mball(ob)) { - bb= ob->bb; - if (bb==NULL) { + bb = ob->bb; + if (bb == NULL) { makeDispListMBall(scene, ob); - bb= ob->bb; + bb = ob->bb; } } } @@ -6145,9 +6144,9 @@ static void draw_bounding_volume(Scene *scene, Object *ob, char type) return; } - if (bb==NULL) return; + if (bb == NULL) return; - if (type==OB_BOUND_BOX) draw_box(bb->vec); + if (type == OB_BOUND_BOX) draw_box(bb->vec); else draw_bb_quadric(bb, type); } @@ -6156,29 +6155,29 @@ static void drawtexspace(Object *ob) { float vec[8][3], loc[3], size[3]; - if (ob->type==OB_MESH) { + if (ob->type == OB_MESH) { mesh_get_texspace(ob->data, loc, NULL, size); } else if (ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT)) { - Curve *cu= ob->data; + Curve *cu = ob->data; copy_v3_v3(size, cu->size); copy_v3_v3(loc, cu->loc); } - else if (ob->type==OB_MBALL) { - MetaBall *mb= ob->data; + else if (ob->type == OB_MBALL) { + MetaBall *mb = ob->data; copy_v3_v3(size, mb->size); copy_v3_v3(loc, mb->loc); } else return; - vec[0][0]=vec[1][0]=vec[2][0]=vec[3][0]= loc[0]-size[0]; - vec[4][0]=vec[5][0]=vec[6][0]=vec[7][0]= loc[0]+size[0]; + vec[0][0] = vec[1][0] = vec[2][0] = vec[3][0] = loc[0] - size[0]; + vec[4][0] = vec[5][0] = vec[6][0] = vec[7][0] = loc[0] + size[0]; - vec[0][1]=vec[1][1]=vec[4][1]=vec[5][1]= loc[1]-size[1]; - vec[2][1]=vec[3][1]=vec[6][1]=vec[7][1]= loc[1]+size[1]; + vec[0][1] = vec[1][1] = vec[4][1] = vec[5][1] = loc[1] - size[1]; + vec[2][1] = vec[3][1] = vec[6][1] = vec[7][1] = loc[1] + size[1]; - vec[0][2]=vec[3][2]=vec[4][2]=vec[7][2]= loc[2]-size[2]; - vec[1][2]=vec[2][2]=vec[5][2]=vec[6][2]= loc[2]+size[2]; + vec[0][2] = vec[3][2] = vec[4][2] = vec[7][2] = loc[2] - size[2]; + vec[1][2] = vec[2][2] = vec[5][2] = vec[6][2] = loc[2] + size[2]; setlinestyle(2); @@ -6190,42 +6189,42 @@ static void drawtexspace(Object *ob) /* draws wire outline */ static void drawObjectSelect(Scene *scene, View3D *v3d, ARegion *ar, Base *base) { - RegionView3D *rv3d= ar->regiondata; - Object *ob= base->object; + RegionView3D *rv3d = ar->regiondata; + Object *ob = base->object; glLineWidth(2.0); glDepthMask(0); - if (ELEM3(ob->type, OB_FONT,OB_CURVE, OB_SURF)) { + if (ELEM3(ob->type, OB_FONT, OB_CURVE, OB_SURF)) { Curve *cu = ob->data; DerivedMesh *dm = ob->derivedFinal; - int hasfaces= 0; + int hasfaces = 0; if (dm) { - hasfaces= dm->getNumTessFaces(dm); + hasfaces = dm->getNumTessFaces(dm); } else { - hasfaces= displist_has_faces(&ob->disp); + hasfaces = displist_has_faces(&ob->disp); } if (hasfaces && ED_view3d_boundbox_clip(rv3d, ob->obmat, ob->bb ? ob->bb : cu->bb)) { - draw_index_wire= 0; + draw_index_wire = 0; if (dm) { draw_mesh_object_outline(v3d, ob, dm); } else { drawDispListwire(&ob->disp); } - draw_index_wire= 1; + draw_index_wire = 1; } } - else if (ob->type==OB_MBALL) { + else if (ob->type == OB_MBALL) { if (is_basis_mball(ob)) { - if ((base->flag & OB_FROMDUPLI)==0) + if ((base->flag & OB_FROMDUPLI) == 0) drawDispListwire(&ob->disp); } } - else if (ob->type==OB_ARMATURE) { + else if (ob->type == OB_ARMATURE) { if (!(ob->mode & OB_MODE_POSE && base == scene->basact)) draw_armature(scene, v3d, ar, base, OB_WIRE, FALSE, TRUE); } @@ -6236,8 +6235,8 @@ static void drawObjectSelect(Scene *scene, View3D *v3d, ARegion *ar, Base *base) static void drawWireExtra(Scene *scene, RegionView3D *rv3d, Object *ob) { - if (ob!=scene->obedit && (ob->flag & SELECT)) { - if (ob==OBACT) { + if (ob != scene->obedit && (ob->flag & SELECT)) { + if (ob == OBACT) { if (ob->flag & OB_FROMGROUP) UI_ThemeColor(TH_GROUP_ACTIVE); else UI_ThemeColor(TH_ACTIVE); } @@ -6251,7 +6250,7 @@ static void drawWireExtra(Scene *scene, RegionView3D *rv3d, Object *ob) UI_ThemeColor(TH_GROUP); else { if (ob->dtx & OB_DRAWWIRE) { - glColor3ub(80,80,80); + glColor3ub(80, 80, 80); } else { UI_ThemeColor(TH_WIRE); @@ -6260,13 +6259,13 @@ static void drawWireExtra(Scene *scene, RegionView3D *rv3d, Object *ob) } bglPolygonOffset(rv3d->dist, 1.0); - glDepthMask(0); // disable write in zbuffer, selected edge wires show better + glDepthMask(0); // disable write in zbuffer, selected edge wires show better if (ELEM3(ob->type, OB_FONT, OB_CURVE, OB_SURF)) { Curve *cu = ob->data; if (ED_view3d_boundbox_clip(rv3d, ob->obmat, ob->bb ? ob->bb : cu->bb)) { - if (ob->type==OB_CURVE) - draw_index_wire= 0; + if (ob->type == OB_CURVE) + draw_index_wire = 0; if (ob->derivedFinal) { drawCurveDMWired(ob); @@ -6275,11 +6274,11 @@ static void drawWireExtra(Scene *scene, RegionView3D *rv3d, Object *ob) drawDispListwire(&ob->disp); } - if (ob->type==OB_CURVE) - draw_index_wire= 1; + if (ob->type == OB_CURVE) + draw_index_wire = 1; } } - else if (ob->type==OB_MBALL) { + else if (ob->type == OB_MBALL) { if (is_basis_mball(ob)) { drawDispListwire(&ob->disp); } @@ -6295,9 +6294,9 @@ static void draw_hooks(Object *ob) ModifierData *md; float vec[3]; - for (md=ob->modifiers.first; md; md=md->next) { - if (md->type==eModifierType_Hook) { - HookModifierData *hmd = (HookModifierData*) md; + for (md = ob->modifiers.first; md; md = md->next) { + if (md->type == eModifierType_Hook) { + HookModifierData *hmd = (HookModifierData *) md; mul_v3_m4v3(vec, ob->obmat, hmd->cent); @@ -6331,20 +6330,20 @@ static void drawRBpivot(bRigidBodyJointConstraint *data) glGetFloatv(GL_CURRENT_COLOR, curcol); rgb_float_to_uchar(tcol, curcol); - tcol[3]= 255; + tcol[3] = 255; - eul_to_mat4(mat,&data->axX); - glLineWidth (4.0f); + eul_to_mat4(mat, &data->axX); + glLineWidth(4.0f); setlinestyle(2); - for (axis=0; axis<3; axis++) { - float dir[3] = {0,0,0}; + for (axis = 0; axis < 3; axis++) { + float dir[3] = {0, 0, 0}; float v[3]; copy_v3_v3(v, &data->pivX); dir[axis] = 1.f; glBegin(GL_LINES); - mul_m4_v3(mat,dir); + mul_m4_v3(mat, dir); add_v3_v3(v, dir); glVertex3fv(&data->pivX); glVertex3fv(v); @@ -6352,29 +6351,29 @@ static void drawRBpivot(bRigidBodyJointConstraint *data) view3d_cached_text_draw_add(v, axis_str[axis], 0, V3D_CACHE_TEXT_ASCII, tcol); } - glLineWidth (1.0f); + glLineWidth(1.0f); setlinestyle(0); } /* flag can be DRAW_PICKING and/or DRAW_CONSTCOLOR, DRAW_SCENESET */ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) { - static int warning_recursive= 0; + static int warning_recursive = 0; ModifierData *md = NULL; - Object *ob= base->object; + Object *ob = base->object; Curve *cu; - RegionView3D *rv3d= ar->regiondata; + RegionView3D *rv3d = ar->regiondata; float vec1[3], vec2[3]; - unsigned int col=0; - int /*sel, drawtype,*/ colindex= 0; - int i, selstart, selend, empty_object=0; - short dt, dtx, zbufoff= 0; - const short is_obact= (ob == OBACT); + unsigned int col = 0; + int /*sel, drawtype,*/ colindex = 0; + int i, selstart, selend, empty_object = 0; + short dt, dtx, zbufoff = 0; + const short is_obact = (ob == OBACT); /* only once set now, will be removed too, should become a global standard */ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - if (ob!=scene->obedit) { + if (ob != scene->obedit) { if (ob->restrictflag & OB_RESTRICT_VIEW) { return; } @@ -6390,7 +6389,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) return; /* xray delay? */ - if ((flag & DRAW_PICKING)==0 && (base->flag & OB_FROMDUPLI)==0) { + if ((flag & DRAW_PICKING) == 0 && (base->flag & OB_FROMDUPLI) == 0) { /* don't do xray in particle mode, need the z-buffer */ if (!(ob->mode & OB_MODE_PARTICLE_EDIT)) { /* xray and transp are set when it is drawing the 2nd/3rd pass */ @@ -6408,8 +6407,8 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) /* if ( ((int)ob->ctime) != F_(scene->r.cfra)) where_is_object(scene, ob); */ /* draw motion paths (in view space) */ - if (ob->mpath && (v3d->flag2 & V3D_RENDER_OVERRIDE)==0) { - bAnimVizSettings *avs= &ob->avs; + if (ob->mpath && (v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) { + bAnimVizSettings *avs = &ob->avs; /* setup drawing environment for paths */ draw_motion_paths_init(v3d, ar); @@ -6431,25 +6430,25 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) * 'colortab[colindex]' and 'theme_id', colindex overrides theme_id. * * note: no theme yet for 'colindex' */ - int theme_id= TH_WIRE; - int theme_shade= 0; + int theme_id = TH_WIRE; + int theme_shade = 0; project_short(ar, ob->obmat[3], &base->sx); if ((scene->obedit == NULL) && (G.moving & G_TRANSFORM_OBJ) && - (base->flag & (SELECT+BA_WAS_SEL))) + (base->flag & (SELECT + BA_WAS_SEL))) { - theme_id= TH_TRANSFORM; + theme_id = TH_TRANSFORM; } else { /* Sets the 'colindex' */ if (ob->id.lib) { - colindex= (base->flag & (SELECT+BA_WAS_SEL)) ? 4 : 3; + colindex = (base->flag & (SELECT + BA_WAS_SEL)) ? 4 : 3; } - else if (warning_recursive==1) { - if (base->flag & (SELECT+BA_WAS_SEL)) { - colindex= (scene->basact==base) ? 8 : 7; + else if (warning_recursive == 1) { + if (base->flag & (SELECT + BA_WAS_SEL)) { + colindex = (scene->basact == base) ? 8 : 7; } else { colindex = 6; @@ -6458,27 +6457,27 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) /* Sets the 'theme_id' or fallback to wire */ else { if (ob->flag & OB_FROMGROUP) { - if (base->flag & (SELECT+BA_WAS_SEL)) { + if (base->flag & (SELECT + BA_WAS_SEL)) { /* uses darker active color for non-active + selected*/ - theme_id= TH_GROUP_ACTIVE; + theme_id = TH_GROUP_ACTIVE; if (scene->basact != base) { - theme_shade= -16; + theme_shade = -16; } } else { - theme_id= TH_GROUP; + theme_id = TH_GROUP; } } else { - if (base->flag & (SELECT+BA_WAS_SEL)) { - theme_id= scene->basact == base ? TH_ACTIVE : TH_SELECT; + if (base->flag & (SELECT + BA_WAS_SEL)) { + theme_id = scene->basact == base ? TH_ACTIVE : TH_SELECT; } else { - if (ob->type==OB_LAMP) theme_id= TH_LAMP; - else if (ob->type==OB_SPEAKER) theme_id= TH_SPEAKER; - else if (ob->type==OB_CAMERA) theme_id= TH_CAMERA; - else if (ob->type==OB_EMPTY) theme_id= TH_EMPTY; + if (ob->type == OB_LAMP) theme_id = TH_LAMP; + else if (ob->type == OB_SPEAKER) theme_id = TH_SPEAKER; + else if (ob->type == OB_CAMERA) theme_id = TH_CAMERA; + else if (ob->type == OB_EMPTY) theme_id = TH_EMPTY; /* fallback to TH_WIRE */ } } @@ -6488,56 +6487,56 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) /* finally set the color */ if (colindex == 0) { if (theme_shade == 0) UI_ThemeColor(theme_id); - else UI_ThemeColorShade(theme_id, theme_shade); + else UI_ThemeColorShade(theme_id, theme_shade); } else { - col= colortab[colindex]; + col = colortab[colindex]; cpack(col); } } /* maximum drawtype */ - dt= v3d->drawtype; - if (dt==OB_RENDER) dt= OB_SOLID; - dt= MIN2(dt, ob->dt); - if (v3d->zbuf==0 && dt>OB_WIRE) dt= OB_WIRE; - dtx= 0; + dt = v3d->drawtype; + if (dt == OB_RENDER) dt = OB_SOLID; + dt = MIN2(dt, ob->dt); + if (v3d->zbuf == 0 && dt > OB_WIRE) dt = OB_WIRE; + dtx = 0; /* faceselect exception: also draw solid when dt==wire, except in editmode */ - if (is_obact && (ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT))) { - if (ob->type==OB_MESH) { + if (is_obact && (ob->mode & (OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT | OB_MODE_TEXTURE_PAINT))) { + if (ob->type == OB_MESH) { if (ob->mode & OB_MODE_EDIT) { /* pass */ } else { - if (dt=OB_BOUNDBOX ) { + if (dt >= OB_BOUNDBOX) { - dtx= ob->dtx; + dtx = ob->dtx; if (ob->mode & OB_MODE_EDIT) { // the only 2 extra drawtypes alowed in editmode - dtx= dtx & (OB_DRAWWIRE|OB_TEXSPACE); + dtx = dtx & (OB_DRAWWIRE | OB_TEXSPACE); } } @@ -6545,27 +6544,27 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) /* bad exception, solve this! otherwise outline shows too late */ if (ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT)) { /* still needed for curves hidden in other layers. depgraph doesnt handle that yet */ - if (ob->disp.first==NULL) makeDispListCurveTypes(scene, ob, 0); + if (ob->disp.first == NULL) makeDispListCurveTypes(scene, ob, 0); } /* draw outline for selected objects, mesh does itself */ - if ((v3d->flag & V3D_SELECT_OUTLINE) && ((v3d->flag2 & V3D_RENDER_OVERRIDE)==0) && ob->type!=OB_MESH) { - if (dt>OB_WIRE && (ob->mode & OB_MODE_EDIT)==0 && (flag & DRAW_SCENESET)==0) { - if (!(ob->dtx&OB_DRAWWIRE) && (ob->flag&SELECT) && !(flag&DRAW_PICKING)) { + if ((v3d->flag & V3D_SELECT_OUTLINE) && ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) && ob->type != OB_MESH) { + if (dt > OB_WIRE && (ob->mode & OB_MODE_EDIT) == 0 && (flag & DRAW_SCENESET) == 0) { + if (!(ob->dtx & OB_DRAWWIRE) && (ob->flag & SELECT) && !(flag & DRAW_PICKING)) { drawObjectSelect(scene, v3d, ar, base); } } } - switch( ob->type) { + switch (ob->type) { case OB_MESH: - empty_object= draw_mesh_object(scene, ar, v3d, rv3d, base, dt, flag); - if (flag!=DRAW_CONSTCOLOR) dtx &= ~OB_DRAWWIRE; // mesh draws wire itself + empty_object = draw_mesh_object(scene, ar, v3d, rv3d, base, dt, flag); + if (flag != DRAW_CONSTCOLOR) dtx &= ~OB_DRAWWIRE; // mesh draws wire itself break; case OB_FONT: - cu= ob->data; + cu = ob->data; if (cu->editfont) { draw_textcurs(cu->editfont->textcurs); @@ -6596,9 +6595,9 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) } setlinestyle(3); - for (i=0; itotbox; i++) { + for (i = 0; i < cu->totbox; i++) { if (cu->tb[i].w != 0.0f) { - UI_ThemeColor(i == (cu->actbox-1) ? TH_ACTIVE : TH_WIRE); + UI_ThemeColor(i == (cu->actbox - 1) ? TH_ACTIVE : TH_WIRE); vec1[0] = (cu->xof * cu->fsize) + cu->tb[i].x; vec1[1] = (cu->yof * cu->fsize) + cu->tb[i].y + cu->fsize; vec1[2] = 0.001; @@ -6623,75 +6622,75 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) cpack(0xffffff); set_inverted_drawing(1); - for (i=0; i<(selend-selstart+1); i++) { + for (i = 0; i < (selend - selstart + 1); i++) { SelBox *sb = &(cu->selboxes[i]); - if (i<(selend-selstart)) { - if (cu->selboxes[i+1].y == sb->y) - selboxw= cu->selboxes[i+1].x - sb->x; + if (i < (selend - selstart)) { + if (cu->selboxes[i + 1].y == sb->y) + selboxw = cu->selboxes[i + 1].x - sb->x; else - selboxw= sb->w; + selboxw = sb->w; } else { - selboxw= sb->w; + selboxw = sb->w; } glBegin(GL_QUADS); glVertex3f(sb->x, sb->y, 0.001); - glVertex3f(sb->x+selboxw, sb->y, 0.001); - glVertex3f(sb->x+selboxw, sb->y+sb->h, 0.001); - glVertex3f(sb->x, sb->y+sb->h, 0.001); + glVertex3f(sb->x + selboxw, sb->y, 0.001); + glVertex3f(sb->x + selboxw, sb->y + sb->h, 0.001); + glVertex3f(sb->x, sb->y + sb->h, 0.001); glEnd(); } set_inverted_drawing(0); } } - else if (dt==OB_BOUNDBOX) { + else if (dt == OB_BOUNDBOX) { if (((v3d->flag2 & V3D_RENDER_OVERRIDE) && v3d->drawtype >= OB_WIRE) == 0) { draw_bounding_volume(scene, ob, ob->boundtype); } } else if (ED_view3d_boundbox_clip(rv3d, ob->obmat, ob->bb ? ob->bb : cu->bb)) { - empty_object= drawDispList(scene, v3d, rv3d, base, dt); + empty_object = drawDispList(scene, v3d, rv3d, base, dt); } break; case OB_CURVE: case OB_SURF: - cu= ob->data; + cu = ob->data; if (cu->editnurb) { - ListBase *nurbs= curve_editnurbs(cu); + ListBase *nurbs = curve_editnurbs(cu); drawnurb(scene, v3d, rv3d, base, nurbs->first, dt); } - else if (dt==OB_BOUNDBOX) { + else if (dt == OB_BOUNDBOX) { if (((v3d->flag2 & V3D_RENDER_OVERRIDE) && (v3d->drawtype >= OB_WIRE)) == 0) { draw_bounding_volume(scene, ob, ob->boundtype); } } else if (ED_view3d_boundbox_clip(rv3d, ob->obmat, ob->bb ? ob->bb : cu->bb)) { - empty_object= drawDispList(scene, v3d, rv3d, base, dt); + empty_object = drawDispList(scene, v3d, rv3d, base, dt); //XXX old animsys if (cu->path) -// curve_draw_speed(scene, ob); +// curve_draw_speed(scene, ob); } break; case OB_MBALL: { - MetaBall *mb= ob->data; + MetaBall *mb = ob->data; if (mb->editelems) drawmball(scene, v3d, rv3d, base, dt); - else if (dt==OB_BOUNDBOX) { + else if (dt == OB_BOUNDBOX) { if (((v3d->flag2 & V3D_RENDER_OVERRIDE) && (v3d->drawtype >= OB_WIRE)) == 0) { draw_bounding_volume(scene, ob, ob->boundtype); } } else - empty_object= drawmball(scene, v3d, rv3d, base, dt); + empty_object = drawmball(scene, v3d, rv3d, base, dt); break; } case OB_EMPTY: - if ((v3d->flag2 & V3D_RENDER_OVERRIDE)==0) { + if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) { if (ob->empty_drawtype == OB_EMPTY_IMAGE) { draw_empty_image(ob); } @@ -6701,24 +6700,24 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) } break; case OB_LAMP: - if ((v3d->flag2 & V3D_RENDER_OVERRIDE)==0) { + if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) { drawlamp(scene, v3d, rv3d, base, dt, flag); if (dtx || (base->flag & SELECT)) glMultMatrixf(ob->obmat); } break; case OB_CAMERA: - if ((v3d->flag2 & V3D_RENDER_OVERRIDE)==0 || - (rv3d->persp==RV3D_CAMOB && v3d->camera==ob)) /* special exception for active camera */ + if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0 || + (rv3d->persp == RV3D_CAMOB && v3d->camera == ob)) /* special exception for active camera */ { drawcamera(scene, v3d, rv3d, base, flag); break; } case OB_SPEAKER: - if ((v3d->flag2 & V3D_RENDER_OVERRIDE)==0) + if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) drawspeaker(scene, v3d, rv3d, ob, flag); break; case OB_LATTICE: - if ((v3d->flag2 & V3D_RENDER_OVERRIDE)==0) { + if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) { drawlattice(scene, v3d, ob); } break; @@ -6731,16 +6730,16 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) draw_bounding_volume(scene, ob, ob->boundtype); } else { - if (dt>OB_WIRE) - GPU_enable_material(0, NULL); /* we use default material */ + if (dt > OB_WIRE) + GPU_enable_material(0, NULL); /* we use default material */ empty_object = draw_armature(scene, v3d, ar, base, dt, flag, FALSE); - if (dt>OB_WIRE) + if (dt > OB_WIRE) GPU_disable_material(); } } break; default: - if ((v3d->flag2 & V3D_RENDER_OVERRIDE)==0) { + if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) { drawaxes(1.0, OB_ARROWS); } } @@ -6748,17 +6747,17 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) { if (ob->soft /*&& flag & OB_SBMOTION*/) { - float mrt[3][3],msc[3][3],mtr[3][3]; - SoftBody *sb= NULL; - float tipw = 0.5f, tiph = 0.5f,drawsize = 4.0f; - if ((sb= ob->soft)) { + float mrt[3][3], msc[3][3], mtr[3][3]; + SoftBody *sb = NULL; + float tipw = 0.5f, tiph = 0.5f, drawsize = 4.0f; + if ((sb = ob->soft)) { if (sb->solverflags & SBSO_ESTIMATEIPO) { glLoadMatrixf(rv3d->viewmat); - copy_m3_m3(msc,sb->lscale); - copy_m3_m3(mrt,sb->lrot); - mul_m3_m3m3(mtr,mrt,msc); - ob_draw_RE_motion(sb->lcom,mtr,tipw,tiph,drawsize); + copy_m3_m3(msc, sb->lscale); + copy_m3_m3(mrt, sb->lrot); + mul_m3_m3m3(mtr, mrt, msc); + ob_draw_RE_motion(sb->lcom, mtr, tipw, tiph, drawsize); glMultMatrixf(ob->obmat); } } @@ -6770,22 +6769,22 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) } /* code for new particle system */ - if ((warning_recursive==0) && + if ((warning_recursive == 0) && (ob->particlesystem.first) && - (flag & DRAW_PICKING)==0 && - (ob!=scene->obedit) + (flag & DRAW_PICKING) == 0 && + (ob != scene->obedit) ) { ParticleSystem *psys; - if (col || (ob->flag & SELECT)) cpack(0xFFFFFF); /* for visibility, also while wpaint */ + if (col || (ob->flag & SELECT)) cpack(0xFFFFFF); /* for visibility, also while wpaint */ //glDepthMask(GL_FALSE); glLoadMatrixf(rv3d->viewmat); view3d_cached_text_draw_begin(); - for (psys=ob->particlesystem.first; psys; psys=psys->next) { + for (psys = ob->particlesystem.first; psys; psys = psys->next) { /* run this so that possible child particles get cached */ if (ob->mode & OB_MODE_PARTICLE_EDIT && is_obact) { PTCacheEdit *edit = PE_create_current(scene, ob); @@ -6805,8 +6804,8 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) } /* draw edit particles last so that they can draw over child particles */ - if ( (warning_recursive==0) && - (flag & DRAW_PICKING)==0 && + if ( (warning_recursive == 0) && + (flag & DRAW_PICKING) == 0 && (!scene->obedit)) { @@ -6844,7 +6843,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) for (i = 0; i < scs->numpoints; i++) { - bglVertex3fv(&scs->points[3*i]); + bglVertex3fv(&scs->points[3 * i]); } bglEnd(); @@ -6930,19 +6929,19 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) } } - if ((v3d->flag2 & V3D_RENDER_OVERRIDE)==0) { + if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) { bConstraint *con; - for (con=ob->constraints.first; con; con= con->next) { - if (con->type==CONSTRAINT_TYPE_RIGIDBODYJOINT) { - bRigidBodyJointConstraint *data = (bRigidBodyJointConstraint*)con->data; - if (data->flag&CONSTRAINT_DRAW_PIVOT) + for (con = ob->constraints.first; con; con = con->next) { + if (con->type == CONSTRAINT_TYPE_RIGIDBODYJOINT) { + bRigidBodyJointConstraint *data = (bRigidBodyJointConstraint *)con->data; + if (data->flag & CONSTRAINT_DRAW_PIVOT) drawRBpivot(data); } } if (ob->gameflag & OB_BOUNDS) { - if (ob->boundtype!=ob->collision_boundtype || (dtx & OB_BOUNDBOX)==0) { + if (ob->boundtype != ob->collision_boundtype || (dtx & OB_BOUNDBOX) == 0) { setlinestyle(2); draw_bounding_volume(scene, ob, ob->collision_boundtype); setlinestyle(0); @@ -6950,7 +6949,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) } /* draw extra: after normal draw because of makeDispList */ - if (dtx && (G.f & G_RENDER_OGL)==0) { + if (dtx && (G.f & G_RENDER_OGL) == 0) { if (dtx & OB_AXIS) { drawaxes(1.0f, OB_ARROWS); @@ -6965,27 +6964,27 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) /* patch for several 3d cards (IBM mostly) that crash on glSelect with text drawing */ /* but, we also don't draw names for sets or duplicators */ if (flag == 0) { - float zero[3]= {0,0,0}; + float zero[3] = {0, 0, 0}; float curcol[4]; unsigned char tcol[4]; glGetFloatv(GL_CURRENT_COLOR, curcol); rgb_float_to_uchar(tcol, curcol); - tcol[3]= 255; - view3d_cached_text_draw_add(zero, ob->id.name+2, 10, 0, tcol); + tcol[3] = 255; + view3d_cached_text_draw_add(zero, ob->id.name + 2, 10, 0, tcol); } } /*if (dtx & OB_DRAWIMAGE) drawDispListwire(&ob->disp);*/ - if ((dtx & OB_DRAWWIRE) && dt>=OB_SOLID) { + if ((dtx & OB_DRAWWIRE) && dt >= OB_SOLID) { drawWireExtra(scene, rv3d, ob); } } } - if (dt<=OB_SOLID && (v3d->flag2 & V3D_RENDER_OVERRIDE)==0) { + if (dt <= OB_SOLID && (v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) { if ((ob->gameflag & OB_DYNAMIC) || ((ob->gameflag & OB_BOUNDS) && (ob->boundtype == OB_BOUND_SPHERE))) { - float imat[4][4], vec[3]= {0.0f, 0.0f, 0.0f}; + float imat[4][4], vec[3] = {0.0f, 0.0f, 0.0f}; invert_m4_m4(imat, rv3d->viewmatob); @@ -7013,18 +7012,18 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) } /* object centers, need to be drawn in viewmat space for speed, but OK for picking select */ - if (!is_obact || !(ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT))) { - int do_draw_center= -1; /* defines below are zero or positive... */ + if (!is_obact || !(ob->mode & (OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT | OB_MODE_TEXTURE_PAINT))) { + int do_draw_center = -1; /* defines below are zero or positive... */ if (v3d->flag2 & V3D_RENDER_OVERRIDE) { /* don't draw */ } - else if ((scene->basact)==base) - do_draw_center= ACTIVE; + else if ((scene->basact) == base) + do_draw_center = ACTIVE; else if (base->flag & SELECT) - do_draw_center= SELECT; + do_draw_center = SELECT; else if (empty_object || (v3d->flag & V3D_DRAW_CENTERS)) - do_draw_center= DESELECT; + do_draw_center = DESELECT; if (do_draw_center != -1) { if (flag & DRAW_PICKING) { @@ -7033,25 +7032,25 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) glVertex3fv(ob->obmat[3]); glEnd(); } - else if ((flag & DRAW_CONSTCOLOR)==0) { + else if ((flag & DRAW_CONSTCOLOR) == 0) { /* we don't draw centers for duplicators and sets */ if (U.obcenter_dia > 0) { /* check > 0 otherwise grease pencil can draw into the circle select which is annoying. */ - drawcentercircle(v3d, rv3d, ob->obmat[3], do_draw_center, ob->id.lib || ob->id.us>1); + drawcentercircle(v3d, rv3d, ob->obmat[3], do_draw_center, ob->id.lib || ob->id.us > 1); } } } } /* not for sets, duplicators or picking */ - if (flag==0 && (v3d->flag & V3D_HIDE_HELPLINES)== 0 && (v3d->flag2 & V3D_RENDER_OVERRIDE)== 0) { + if (flag == 0 && (v3d->flag & V3D_HIDE_HELPLINES) == 0 && (v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) { ListBase *list; /* draw hook center and offset line */ - if (ob!=scene->obedit) draw_hooks(ob); + if (ob != scene->obedit) draw_hooks(ob); /* help lines and so */ - if (ob!=scene->obedit && ob->parent && (ob->parent->lay & v3d->lay)) { + if (ob != scene->obedit && ob->parent && (ob->parent->lay & v3d->lay)) { setlinestyle(3); glBegin(GL_LINES); glVertex3fv(ob->obmat[3]); @@ -7072,10 +7071,10 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) UI_make_axis_color(col1, col2, 'Z'); glColor3ubv(col2); - cob= constraints_make_evalob(scene, ob, NULL, CONSTRAINT_OBTYPE_OBJECT); + cob = constraints_make_evalob(scene, ob, NULL, CONSTRAINT_OBTYPE_OBJECT); - for (curcon = list->first; curcon; curcon=curcon->next) { - bConstraintTypeInfo *cti= constraint_get_typeinfo(curcon); + for (curcon = list->first; curcon; curcon = curcon->next) { + bConstraintTypeInfo *cti = constraint_get_typeinfo(curcon); ListBase targets = {NULL, NULL}; bConstraintTarget *ct; @@ -7084,17 +7083,17 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) * constraint targets properly (design limitation -- scene is needed for their target * but it can't be accessed from get_targets callvack) */ - Object *camob= NULL; + Object *camob = NULL; - if (cti->type==CONSTRAINT_TYPE_FOLLOWTRACK) { - bFollowTrackConstraint *data= (bFollowTrackConstraint *)curcon->data; + if (cti->type == CONSTRAINT_TYPE_FOLLOWTRACK) { + bFollowTrackConstraint *data = (bFollowTrackConstraint *)curcon->data; - camob= data->camera ? data->camera : scene->camera; + camob = data->camera ? data->camera : scene->camera; } - else if (cti->type==CONSTRAINT_TYPE_OBJECTSOLVER) { - bObjectSolverConstraint *data= (bObjectSolverConstraint *)curcon->data; + else if (cti->type == CONSTRAINT_TYPE_OBJECTSOLVER) { + bObjectSolverConstraint *data = (bObjectSolverConstraint *)curcon->data; - camob= data->camera ? data->camera : scene->camera; + camob = data->camera ? data->camera : scene->camera; } if (camob) { @@ -7109,7 +7108,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) else if ((curcon->flag & CONSTRAINT_EXPAND) && (cti) && (cti->get_constraint_targets)) { cti->get_constraint_targets(curcon, &targets); - for (ct= targets.first; ct; ct= ct->next) { + for (ct = targets.first; ct; ct = ct->next) { /* calculate target's matrix */ if (cti->get_target_matrix) cti->get_target_matrix(curcon, cob, ct, BKE_curframe(scene)); @@ -7145,7 +7144,7 @@ static void bbs_obmode_mesh_verts__mapFunc(void *userData, int index, float *co, int offset = (intptr_t) data->offset; if (!(mv->flag & ME_HIDE)) { - WM_set_framebuffer_index_color(offset+index); + WM_set_framebuffer_index_color(offset + index); bglVertex3fv(co); } } @@ -7156,8 +7155,8 @@ static void bbs_obmode_mesh_verts(Object *ob, DerivedMesh *dm, int offset) Mesh *me = ob->data; MVert *mvert = me->mvert; data.mvert = mvert; - data.offset = (void*)(intptr_t) offset; - glPointSize( UI_GetThemeValuef(TH_VERTEX_SIZE) ); + data.offset = (void *)(intptr_t) offset; + glPointSize(UI_GetThemeValuef(TH_VERTEX_SIZE) ); bglBegin(GL_POINTS); dm->foreachMappedVert(dm, bbs_obmode_mesh_verts__mapFunc, &data); bglEnd(); @@ -7171,15 +7170,15 @@ static void bbs_mesh_verts__mapFunc(void *userData, int index, float *co, float BMVert *eve = EDBM_get_vert_for_index(ptrs[1], index); if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) { - WM_set_framebuffer_index_color(offset+index); + WM_set_framebuffer_index_color(offset + index); bglVertex3fv(co); } } static void bbs_mesh_verts(BMEditMesh *em, DerivedMesh *dm, int offset) { - void *ptrs[2] = {(void*)(intptr_t) offset, em}; + void *ptrs[2] = {(void *)(intptr_t) offset, em}; - glPointSize( UI_GetThemeValuef(TH_VERTEX_SIZE) ); + glPointSize(UI_GetThemeValuef(TH_VERTEX_SIZE) ); bglBegin(GL_POINTS); dm->foreachMappedVert(dm, bbs_mesh_verts__mapFunc, ptrs); bglEnd(); @@ -7193,7 +7192,7 @@ static DMDrawOption bbs_mesh_wire__setDrawOptions(void *userData, int index) BMEdge *eed = EDBM_get_edge_for_index(ptrs[1], index); if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN)) { - WM_set_framebuffer_index_color(offset+index); + WM_set_framebuffer_index_color(offset + index); return DM_DRAW_OPTION_NORMAL; } else { @@ -7202,17 +7201,17 @@ static DMDrawOption bbs_mesh_wire__setDrawOptions(void *userData, int index) } static void bbs_mesh_wire(BMEditMesh *em, DerivedMesh *dm, int offset) { - void *ptrs[2] = {(void*)(intptr_t) offset, em}; + void *ptrs[2] = {(void *)(intptr_t) offset, em}; dm->drawMappedEdges(dm, bbs_mesh_wire__setDrawOptions, ptrs); } static DMDrawOption bbs_mesh_solid__setSolidDrawOptions(void *userData, int index) { - BMFace *efa = EDBM_get_face_for_index(((void**)userData)[0], index); + BMFace *efa = EDBM_get_face_for_index(((void **)userData)[0], index); if (efa && !BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) { - if (((void**)userData)[1]) { - WM_set_framebuffer_index_color(index+1); + if (((void **)userData)[1]) { + WM_set_framebuffer_index_color(index + 1); } return DM_DRAW_OPTION_NORMAL; } @@ -7223,10 +7222,10 @@ static DMDrawOption bbs_mesh_solid__setSolidDrawOptions(void *userData, int inde static void bbs_mesh_solid__drawCenter(void *userData, int index, float *cent, float *UNUSED(no)) { - BMFace *efa = EDBM_get_face_for_index(((void**)userData)[0], index); + BMFace *efa = EDBM_get_face_for_index(((void **)userData)[0], index); if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) { - WM_set_framebuffer_index_color(index+1); + WM_set_framebuffer_index_color(index + 1); bglVertex3fv(cent); } @@ -7240,7 +7239,7 @@ static void bbs_mesh_solid_EM(BMEditMesh *em, Scene *scene, View3D *v3d, cpack(0); if (facecol) { - ptrs[1] = (void*)(intptr_t) 1; + ptrs[1] = (void *)(intptr_t) 1; dm->drawMappedFaces(dm, bbs_mesh_solid__setSolidDrawOptions, GPU_enable_material, NULL, ptrs, 0); if (check_ob_drawface_dot(scene, v3d, ob->dt)) { @@ -7259,7 +7258,7 @@ static void bbs_mesh_solid_EM(BMEditMesh *em, Scene *scene, View3D *v3d, static DMDrawOption bbs_mesh_solid__setDrawOpts(void *UNUSED(userData), int index) { - WM_set_framebuffer_index_color(index+1); + WM_set_framebuffer_index_color(index + 1); return DM_DRAW_OPTION_NORMAL; } @@ -7267,8 +7266,8 @@ static DMDrawOption bbs_mesh_solid_hide__setDrawOpts(void *userData, int index) { Mesh *me = userData; - if (!(me->mpoly[index].flag&ME_HIDE)) { - WM_set_framebuffer_index_color(index+1); + if (!(me->mpoly[index].flag & ME_HIDE)) { + WM_set_framebuffer_index_color(index + 1); return DM_DRAW_OPTION_NORMAL; } else { @@ -7291,7 +7290,7 @@ static DMDrawOption bbs_mesh_solid_hide2__setDrawOpts(void *userData, int index) static void bbs_mesh_solid(Scene *scene, Object *ob) { DerivedMesh *dm = mesh_get_derived_final(scene, ob, scene->customdata_mask); - Mesh *me = (Mesh*)ob->data; + Mesh *me = (Mesh *)ob->data; glColor3ub(0, 0, 0); @@ -7305,18 +7304,18 @@ static void bbs_mesh_solid(Scene *scene, Object *ob) void draw_object_backbufsel(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob) { - ToolSettings *ts= scene->toolsettings; + ToolSettings *ts = scene->toolsettings; glMultMatrixf(ob->obmat); glClearDepth(1.0); glClear(GL_DEPTH_BUFFER_BIT); glEnable(GL_DEPTH_TEST); - switch( ob->type) { + switch (ob->type) { case OB_MESH: if (ob->mode & OB_MODE_EDIT) { - Mesh *me= ob->data; - BMEditMesh *em= me->edit_btmesh; + Mesh *me = ob->data; + BMEditMesh *em = me->edit_btmesh; DerivedMesh *dm = editbmesh_get_derived_cage(scene, ob, em, CD_MASK_BAREMESH); @@ -7324,22 +7323,24 @@ void draw_object_backbufsel(Scene *scene, View3D *v3d, RegionView3D *rv3d, Objec bbs_mesh_solid_EM(em, scene, v3d, ob, dm, ts->selectmode & SCE_SELECT_FACE); if (ts->selectmode & SCE_SELECT_FACE) - bm_solidoffs = 1+em->bm->totface; + bm_solidoffs = 1 + em->bm->totface; else - bm_solidoffs= 1; + bm_solidoffs = 1; bglPolygonOffset(rv3d->dist, 1.0); // we draw edges always, for loop (select) tools bbs_mesh_wire(em, dm, bm_solidoffs); - bm_wireoffs= bm_solidoffs + em->bm->totedge; + bm_wireoffs = bm_solidoffs + em->bm->totedge; // we draw verts if vert select mode or if in transform (for snap). if ((ts->selectmode & SCE_SELECT_VERTEX) || (G.moving & G_TRANSFORM_EDIT)) { bbs_mesh_verts(em, dm, bm_wireoffs); - bm_vertoffs= bm_wireoffs + em->bm->totvert; + bm_vertoffs = bm_wireoffs + em->bm->totvert; + } + else { + bm_vertoffs = bm_wireoffs; } - else bm_vertoffs= bm_wireoffs; bglPolygonOffset(rv3d->dist, 0.0); @@ -7348,10 +7349,10 @@ void draw_object_backbufsel(Scene *scene, View3D *v3d, RegionView3D *rv3d, Objec EDBM_free_index_arrays(em); } else { - Mesh *me= ob->data; - if ( (me->editflag & ME_EDIT_VERT_SEL) && - /* currently vertex select only supports weight paint */ - (ob->mode & OB_MODE_WEIGHT_PAINT)) + Mesh *me = ob->data; + if ((me->editflag & ME_EDIT_VERT_SEL) && + /* currently vertex select only supports weight paint */ + (ob->mode & OB_MODE_WEIGHT_PAINT)) { DerivedMesh *dm = mesh_get_derived_final(scene, ob, scene->customdata_mask); glColor3ub(0, 0, 0); @@ -7360,7 +7361,7 @@ void draw_object_backbufsel(Scene *scene, View3D *v3d, RegionView3D *rv3d, Objec bbs_obmode_mesh_verts(ob, dm, 1); - bm_vertoffs = me->totvert+1; + bm_vertoffs = me->totvert + 1; dm->release(dm); } else { @@ -7384,16 +7385,16 @@ void draw_object_backbufsel(Scene *scene, View3D *v3d, RegionView3D *rv3d, Objec static void draw_object_mesh_instance(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob, int dt, int outline) { - Mesh *me= ob->data; - DerivedMesh *dm=NULL, *edm=NULL; + Mesh *me = ob->data; + DerivedMesh *dm = NULL, *edm = NULL; int glsl; if (ob->mode & OB_MODE_EDIT) - edm= editbmesh_get_derived_base(ob, me->edit_btmesh); + edm = editbmesh_get_derived_base(ob, me->edit_btmesh); else dm = mesh_get_derived_final(scene, ob, CD_MASK_BAREMESH); - if (dt<=OB_WIRE) { + if (dt <= OB_WIRE) { if (dm) dm->drawEdges(dm, 1, 0); else if (edm) @@ -7401,7 +7402,7 @@ static void draw_object_mesh_instance(Scene *scene, View3D *v3d, RegionView3D *r } else { if (outline) - draw_mesh_object_outline(v3d, ob, dm?dm:edm); + draw_mesh_object_outline(v3d, ob, dm ? dm : edm); if (dm) { glsl = draw_glsl_material(scene, ob, v3d, dt); @@ -7413,7 +7414,7 @@ static void draw_object_mesh_instance(Scene *scene, View3D *v3d, RegionView3D *r glDisable(GL_COLOR_MATERIAL); } - glFrontFace((ob->transflag&OB_NEG_SCALE)?GL_CW:GL_CCW); + glFrontFace((ob->transflag & OB_NEG_SCALE) ? GL_CW : GL_CCW); glEnable(GL_LIGHTING); if (dm) { diff --git a/source/blender/editors/space_view3d/drawvolume.c b/source/blender/editors/space_view3d/drawvolume.c index 52f432c2e7d..2289216c2a8 100644 --- a/source/blender/editors/space_view3d/drawvolume.c +++ b/source/blender/editors/space_view3d/drawvolume.c @@ -77,7 +77,7 @@ #include "BLF_api.h" -#include "view3d_intern.h" // own include +#include "view3d_intern.h" // own include #ifdef _WIN32 @@ -90,38 +90,38 @@ static LARGE_INTEGER liFrequency; static LARGE_INTEGER liStartTime; static LARGE_INTEGER liCurrentTime; -static void tstart ( void ) +static void tstart(void) { - QueryPerformanceFrequency ( &liFrequency ); - QueryPerformanceCounter ( &liStartTime ); + QueryPerformanceFrequency(&liFrequency); + QueryPerformanceCounter(&liStartTime); } -static void tend ( void ) +static void tend(void) { - QueryPerformanceCounter ( &liCurrentTime ); + QueryPerformanceCounter(&liCurrentTime); } -static double tval( void ) +static double tval(void) { - return ((double)( (liCurrentTime.QuadPart - liStartTime.QuadPart)* (double)1000.0/(double)liFrequency.QuadPart )); + return ((double)( (liCurrentTime.QuadPart - liStartTime.QuadPart) * (double)1000.0 / (double)liFrequency.QuadPart)); } #else #include static struct timeval _tstart, _tend; static struct timezone tz; -static void tstart ( void ) +static void tstart(void) { - gettimeofday ( &_tstart, &tz ); + gettimeofday(&_tstart, &tz); } -static void tend ( void ) +static void tend(void) { - gettimeofday ( &_tend,&tz ); + gettimeofday(&_tend, &tz); } #if 0 static double tval() { double t1, t2; - t1 = ( double ) _tstart.tv_sec*1000 + ( double ) _tstart.tv_usec/ ( 1000 ); - t2 = ( double ) _tend.tv_sec*1000 + ( double ) _tend.tv_usec/ ( 1000 ); - return t2-t1; + t1 = ( double ) _tstart.tv_sec * 1000 + ( double ) _tstart.tv_usec / (1000); + t2 = ( double ) _tend.tv_sec * 1000 + ( double ) _tend.tv_usec / (1000); + return t2 - t1; } #endif #endif @@ -134,13 +134,13 @@ static int intersect_edges(float *points, float a, float b, float c, float d, fl float t; int numpoints = 0; - for (i=0; i<12; i++) { - t = -(a*edges[i][0][0] + b*edges[i][0][1] + c*edges[i][0][2] + d) - / (a*edges[i][1][0] + b*edges[i][1][1] + c*edges[i][1][2]); - if ((t>0)&&(t<1)) { - points[numpoints * 3 + 0] = edges[i][0][0] + edges[i][1][0]*t; - points[numpoints * 3 + 1] = edges[i][0][1] + edges[i][1][1]*t; - points[numpoints * 3 + 2] = edges[i][0][2] + edges[i][1][2]*t; + for (i = 0; i < 12; i++) { + t = -(a * edges[i][0][0] + b * edges[i][0][1] + c * edges[i][0][2] + d) / + (a * edges[i][1][0] + b * edges[i][1][1] + c * edges[i][1][2]); + if ((t > 0) && (t < 1)) { + points[numpoints * 3 + 0] = edges[i][0][0] + edges[i][1][0] * t; + points[numpoints * 3 + 1] = edges[i][0][1] + edges[i][1][1] * t; + points[numpoints * 3 + 2] = edges[i][0][2] + edges[i][1][2] * t; numpoints++; } } @@ -159,14 +159,14 @@ static int convex(float *p0, float *up, float *a, float *b) void draw_volume(ARegion *ar, GPUTexture *tex, float *min, float *max, int res[3], float dx, GPUTexture *tex_shadow) { - RegionView3D *rv3d= ar->regiondata; + RegionView3D *rv3d = ar->regiondata; float viewnormal[3]; int i, j, n, good_index; float d /*, d0 */ /* UNUSED */, dd, ds; float *points = NULL; int numpoints = 0; - float cor[3] = {1.,1.,1.}; + float cor[3] = {1., 1., 1.}; int gl_depth = 0, gl_blend = 0; /* draw slices of smoke is adapted from c++ code authored @@ -197,22 +197,22 @@ void draw_volume(ARegion *ar, GPUTexture *tex, float *min, float *max, int res[3 /* Fragment program to calculate the view3d of smoke */ /* using 2 textures, density and shadow */ const char *text = "!!ARBfp1.0\n" - "PARAM dx = program.local[0];\n" - "PARAM darkness = program.local[1];\n" - "PARAM f = {1.442695041, 1.442695041, 1.442695041, 0.01};\n" - "TEMP temp, shadow, value;\n" - "TEX temp, fragment.texcoord[0], texture[0], 3D;\n" - "TEX shadow, fragment.texcoord[0], texture[1], 3D;\n" - "MUL value, temp, darkness;\n" - "MUL value, value, dx;\n" - "MUL value, value, f;\n" - "EX2 temp, -value.r;\n" - "SUB temp.a, 1.0, temp.r;\n" - "MUL temp.r, temp.r, shadow.r;\n" - "MUL temp.g, temp.g, shadow.r;\n" - "MUL temp.b, temp.b, shadow.r;\n" - "MOV result.color, temp;\n" - "END\n"; + "PARAM dx = program.local[0];\n" + "PARAM darkness = program.local[1];\n" + "PARAM f = {1.442695041, 1.442695041, 1.442695041, 0.01};\n" + "TEMP temp, shadow, value;\n" + "TEX temp, fragment.texcoord[0], texture[0], 3D;\n" + "TEX shadow, fragment.texcoord[0], texture[1], 3D;\n" + "MUL value, temp, darkness;\n" + "MUL value, value, dx;\n" + "MUL value, value, f;\n" + "EX2 temp, -value.r;\n" + "SUB temp.a, 1.0, temp.r;\n" + "MUL temp.r, temp.r, shadow.r;\n" + "MUL temp.g, temp.g, shadow.r;\n" + "MUL temp.b, temp.b, shadow.r;\n" + "MOV result.color, temp;\n" + "END\n"; GLuint prog; @@ -317,23 +317,24 @@ void draw_volume(ARegion *ar, GPUTexture *tex, float *min, float *max, int res[3 normalize_v3(viewnormal); // find cube vertex that is closest to the viewer - for (i=0; i<8; i++) { - float x,y,z; + for (i = 0; i < 8; i++) { + float x, y, z; x = cv[i][0] - viewnormal[0]; y = cv[i][1] - viewnormal[1]; z = cv[i][2] - viewnormal[2]; - if ((x>=min[0])&&(x<=max[0]) - &&(y>=min[1])&&(y<=max[1]) - &&(z>=min[2])&&(z<=max[2])) { + if ((x >= min[0]) && (x <= max[0]) && + (y >= min[1]) && (y <= max[1]) && + (z >= min[2]) && (z <= max[2])) + { break; } } if (i >= 8) { /* fallback, avoid using buffer over-run */ - i= 0; + i = 0; } // printf("i: %d\n", i); @@ -347,9 +348,9 @@ void draw_volume(ARegion *ar, GPUTexture *tex, float *min, float *max, int res[3 glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, (GLsizei)strlen(text), text); // cell spacing - glProgramLocalParameter4fARB (GL_FRAGMENT_PROGRAM_ARB, 0, dx, dx, dx, 1.0); + glProgramLocalParameter4fARB(GL_FRAGMENT_PROGRAM_ARB, 0, dx, dx, dx, 1.0); // custom parameter for smoke style (higher = thicker) - glProgramLocalParameter4fARB (GL_FRAGMENT_PROGRAM_ARB, 1, 7.0, 7.0, 7.0, 1.0); + glProgramLocalParameter4fARB(GL_FRAGMENT_PROGRAM_ARB, 1, 7.0, 7.0, 7.0, 1.0); } else printf("Your gfx card does not support 3D View smoke drawing.\n"); @@ -361,9 +362,9 @@ void draw_volume(ARegion *ar, GPUTexture *tex, float *min, float *max, int res[3 printf("No volume shadow\n"); if (!GPU_non_power_of_two_support()) { - cor[0] = (float)res[0]/(float)power_of_2_max_i(res[0]); - cor[1] = (float)res[1]/(float)power_of_2_max_i(res[1]); - cor[2] = (float)res[2]/(float)power_of_2_max_i(res[2]); + cor[0] = (float)res[0] / (float)power_of_2_max_i(res[0]); + cor[1] = (float)res[1] / (float)power_of_2_max_i(res[1]); + cor[2] = (float)res[2] / (float)power_of_2_max_i(res[2]); } // our slices are defined by the plane equation a*x + b*y +c*z + d = 0 @@ -372,24 +373,24 @@ void draw_volume(ARegion *ar, GPUTexture *tex, float *min, float *max, int res[3 // inserting previously found vertex into the plane equation /* d0 = (viewnormal[0]*cv[i][0] + viewnormal[1]*cv[i][1] + viewnormal[2]*cv[i][2]); */ /* UNUSED */ - ds = (ABS(viewnormal[0])*size[0] + ABS(viewnormal[1])*size[1] + ABS(viewnormal[2])*size[2]); + ds = (ABS(viewnormal[0]) * size[0] + ABS(viewnormal[1]) * size[1] + ABS(viewnormal[2]) * size[2]); dd = 0.05; // ds/512.0f; n = 0; good_index = i; // printf("d0: %f, dd: %f, ds: %f\n\n", d0, dd, ds); - points = MEM_callocN(sizeof(float)*12*3, "smoke_points_preview"); + points = MEM_callocN(sizeof(float) * 12 * 3, "smoke_points_preview"); while (1) { float p0[3]; float tmp_point[3], tmp_point2[3]; - if (dd*(float)n > ds) + if (dd * (float)n > ds) break; copy_v3_v3(tmp_point, viewnormal); - mul_v3_fl(tmp_point, -dd*((ds/dd)-(float)n)); + mul_v3_fl(tmp_point, -dd * ((ds / dd) - (float)n)); add_v3_v3v3(tmp_point2, cv[good_index], tmp_point); d = dot_v3v3(tmp_point2, viewnormal); diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index 0d0d1bd3139..72b67c2a716 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -62,7 +62,7 @@ #include "UI_resources.h" -#include "view3d_intern.h" // own include +#include "view3d_intern.h" // own include /* ******************** manage regions ********************* */ @@ -70,20 +70,20 @@ ARegion *view3d_has_buttons_region(ScrArea *sa) { ARegion *ar, *arnew; - ar= BKE_area_find_region_type(sa, RGN_TYPE_UI); + ar = BKE_area_find_region_type(sa, RGN_TYPE_UI); if (ar) return ar; /* add subdiv level; after header */ - ar= BKE_area_find_region_type(sa, RGN_TYPE_HEADER); + ar = BKE_area_find_region_type(sa, RGN_TYPE_HEADER); /* is error! */ - if (ar==NULL) return NULL; + if (ar == NULL) return NULL; - arnew= MEM_callocN(sizeof(ARegion), "buttons for view3d"); + arnew = MEM_callocN(sizeof(ARegion), "buttons for view3d"); BLI_insertlinkafter(&sa->regionbase, ar, arnew); - arnew->regiontype= RGN_TYPE_UI; - arnew->alignment= RGN_ALIGN_RIGHT; + arnew->regiontype = RGN_TYPE_UI; + arnew->alignment = RGN_ALIGN_RIGHT; arnew->flag = RGN_FLAG_HIDDEN; @@ -92,42 +92,42 @@ ARegion *view3d_has_buttons_region(ScrArea *sa) ARegion *view3d_has_tools_region(ScrArea *sa) { - ARegion *ar, *artool=NULL, *arprops=NULL, *arhead; + ARegion *ar, *artool = NULL, *arprops = NULL, *arhead; - for (ar= sa->regionbase.first; ar; ar= ar->next) { - if (ar->regiontype==RGN_TYPE_TOOLS) - artool= ar; - if (ar->regiontype==RGN_TYPE_TOOL_PROPS) - arprops= ar; + for (ar = sa->regionbase.first; ar; ar = ar->next) { + if (ar->regiontype == RGN_TYPE_TOOLS) + artool = ar; + if (ar->regiontype == RGN_TYPE_TOOL_PROPS) + arprops = ar; } /* tool region hide/unhide also hides props */ if (arprops && artool) return artool; - if (artool==NULL) { + if (artool == NULL) { /* add subdiv level; after header */ - for (arhead= sa->regionbase.first; arhead; arhead= arhead->next) - if (arhead->regiontype==RGN_TYPE_HEADER) + for (arhead = sa->regionbase.first; arhead; arhead = arhead->next) + if (arhead->regiontype == RGN_TYPE_HEADER) break; /* is error! */ - if (arhead==NULL) return NULL; + if (arhead == NULL) return NULL; - artool= MEM_callocN(sizeof(ARegion), "tools for view3d"); + artool = MEM_callocN(sizeof(ARegion), "tools for view3d"); BLI_insertlinkafter(&sa->regionbase, arhead, artool); - artool->regiontype= RGN_TYPE_TOOLS; - artool->alignment= RGN_ALIGN_LEFT; //RGN_OVERLAP_LEFT; + artool->regiontype = RGN_TYPE_TOOLS; + artool->alignment = RGN_ALIGN_LEFT; //RGN_OVERLAP_LEFT; artool->flag = RGN_FLAG_HIDDEN; } - if (arprops==NULL) { + if (arprops == NULL) { /* add extra subdivided region for tool properties */ - arprops= MEM_callocN(sizeof(ARegion), "tool props for view3d"); + arprops = MEM_callocN(sizeof(ARegion), "tool props for view3d"); BLI_insertlinkafter(&sa->regionbase, artool, arprops); - arprops->regiontype= RGN_TYPE_TOOL_PROPS; - arprops->alignment= RGN_ALIGN_BOTTOM|RGN_SPLIT_PREV; + arprops->regiontype = RGN_TYPE_TOOL_PROPS; + arprops->alignment = RGN_ALIGN_BOTTOM | RGN_SPLIT_PREV; } return artool; @@ -138,12 +138,12 @@ ARegion *view3d_has_tools_region(ScrArea *sa) /* function to always find a regionview3d context inside 3D window */ RegionView3D *ED_view3d_context_rv3d(bContext *C) { - RegionView3D *rv3d= CTX_wm_region_view3d(C); + RegionView3D *rv3d = CTX_wm_region_view3d(C); - if (rv3d==NULL) { + if (rv3d == NULL) { ScrArea *sa = CTX_wm_area(C); if (sa && sa->spacetype == SPACE_VIEW3D) { - ARegion *ar= BKE_area_find_region_type(sa, RGN_TYPE_WINDOW); + ARegion *ar = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW); if (ar) { rv3d = ar->regiondata; } @@ -156,33 +156,33 @@ RegionView3D *ED_view3d_context_rv3d(bContext *C) * so return that, the caller can then access the ar->regiondata */ int ED_view3d_context_user_region(bContext *C, View3D **v3d_r, ARegion **ar_r) { - ScrArea *sa= CTX_wm_area(C); + ScrArea *sa = CTX_wm_area(C); *v3d_r = NULL; *ar_r = NULL; - if (sa && sa->spacetype==SPACE_VIEW3D) { - ARegion *ar= CTX_wm_region(C); + if (sa && sa->spacetype == SPACE_VIEW3D) { + ARegion *ar = CTX_wm_region(C); View3D *v3d = (View3D *)sa->spacedata.first; if (ar) { - RegionView3D *rv3d= ar->regiondata; + RegionView3D *rv3d = ar->regiondata; if (rv3d && rv3d->viewlock == 0) { *v3d_r = v3d; *ar_r = ar; return 1; } else { - ARegion *ar_unlock_user= NULL; - ARegion *ar_unlock= NULL; - for (ar= sa->regionbase.first; ar; ar= ar->next) { + ARegion *ar_unlock_user = NULL; + ARegion *ar_unlock = NULL; + for (ar = sa->regionbase.first; ar; ar = ar->next) { /* find the first unlocked rv3d */ if (ar->regiondata && ar->regiontype == RGN_TYPE_WINDOW) { - rv3d= ar->regiondata; + rv3d = ar->regiondata; if (rv3d->viewlock == 0) { - ar_unlock= ar; - if (rv3d->persp==RV3D_PERSP || rv3d->persp==RV3D_CAMOB) { - ar_unlock_user= ar; + ar_unlock = ar; + if (rv3d->persp == RV3D_PERSP || rv3d->persp == RV3D_CAMOB) { + ar_unlock_user = ar; break; } } @@ -243,24 +243,24 @@ void ED_view3d_init_mats_rv3d_gl(struct Object *ob, struct RegionView3D *rv3d) static SpaceLink *view3d_new(const bContext *C) { - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); ARegion *ar; View3D *v3d; RegionView3D *rv3d; - v3d= MEM_callocN(sizeof(View3D), "initview3d"); - v3d->spacetype= SPACE_VIEW3D; - v3d->blockscale= 0.7f; - v3d->lay= v3d->layact= 1; + v3d = MEM_callocN(sizeof(View3D), "initview3d"); + v3d->spacetype = SPACE_VIEW3D; + v3d->blockscale = 0.7f; + v3d->lay = v3d->layact = 1; if (scene) { - v3d->lay= v3d->layact= scene->lay; - v3d->camera= scene->camera; + v3d->lay = v3d->layact = scene->lay; + v3d->camera = scene->camera; } - v3d->scenelock= TRUE; - v3d->grid= 1.0f; - v3d->gridlines= 16; + v3d->scenelock = TRUE; + v3d->grid = 1.0f; + v3d->gridlines = 16; v3d->gridsubdiv = 10; - v3d->drawtype= OB_SOLID; + v3d->drawtype = OB_SOLID; v3d->gridflag |= V3D_SHOW_X; v3d->gridflag |= V3D_SHOW_Y; @@ -270,60 +270,60 @@ static SpaceLink *view3d_new(const bContext *C) v3d->flag |= V3D_SELECT_OUTLINE; v3d->flag2 |= V3D_SHOW_RECONSTRUCTION; - v3d->lens= 35.0f; - v3d->near= 0.01f; - v3d->far= 1000.0f; + v3d->lens = 35.0f; + v3d->near = 0.01f; + v3d->far = 1000.0f; v3d->twflag |= U.tw_flag & V3D_USE_MANIPULATOR; - v3d->twtype= V3D_MANIP_TRANSLATE; - v3d->around= V3D_CENTROID; + v3d->twtype = V3D_MANIP_TRANSLATE; + v3d->around = V3D_CENTROID; - v3d->bundle_size= 0.2f; - v3d->bundle_drawtype= OB_PLAINAXES; + v3d->bundle_size = 0.2f; + v3d->bundle_drawtype = OB_PLAINAXES; /* header */ - ar= MEM_callocN(sizeof(ARegion), "header for view3d"); + ar = MEM_callocN(sizeof(ARegion), "header for view3d"); BLI_addtail(&v3d->regionbase, ar); - ar->regiontype= RGN_TYPE_HEADER; - ar->alignment= RGN_ALIGN_BOTTOM; + ar->regiontype = RGN_TYPE_HEADER; + ar->alignment = RGN_ALIGN_BOTTOM; /* tool shelf */ - ar= MEM_callocN(sizeof(ARegion), "toolshelf for view3d"); + ar = MEM_callocN(sizeof(ARegion), "toolshelf for view3d"); BLI_addtail(&v3d->regionbase, ar); - ar->regiontype= RGN_TYPE_TOOLS; - ar->alignment= RGN_ALIGN_LEFT; + ar->regiontype = RGN_TYPE_TOOLS; + ar->alignment = RGN_ALIGN_LEFT; ar->flag = RGN_FLAG_HIDDEN; /* tool properties */ - ar= MEM_callocN(sizeof(ARegion), "tool properties for view3d"); + ar = MEM_callocN(sizeof(ARegion), "tool properties for view3d"); BLI_addtail(&v3d->regionbase, ar); - ar->regiontype= RGN_TYPE_TOOL_PROPS; - ar->alignment= RGN_ALIGN_BOTTOM|RGN_SPLIT_PREV; + ar->regiontype = RGN_TYPE_TOOL_PROPS; + ar->alignment = RGN_ALIGN_BOTTOM | RGN_SPLIT_PREV; ar->flag = RGN_FLAG_HIDDEN; /* buttons/list view */ - ar= MEM_callocN(sizeof(ARegion), "buttons for view3d"); + ar = MEM_callocN(sizeof(ARegion), "buttons for view3d"); BLI_addtail(&v3d->regionbase, ar); - ar->regiontype= RGN_TYPE_UI; - ar->alignment= RGN_ALIGN_RIGHT; + ar->regiontype = RGN_TYPE_UI; + ar->alignment = RGN_ALIGN_RIGHT; ar->flag = RGN_FLAG_HIDDEN; /* main area */ - ar= MEM_callocN(sizeof(ARegion), "main area for view3d"); + ar = MEM_callocN(sizeof(ARegion), "main area for view3d"); BLI_addtail(&v3d->regionbase, ar); - ar->regiontype= RGN_TYPE_WINDOW; + ar->regiontype = RGN_TYPE_WINDOW; - ar->regiondata= MEM_callocN(sizeof(RegionView3D), "region view3d"); - rv3d= ar->regiondata; - rv3d->viewquat[0]= 1.0f; - rv3d->persp= RV3D_PERSP; - rv3d->view= RV3D_VIEW_PERSPORTHO; - rv3d->dist= 10.0; + ar->regiondata = MEM_callocN(sizeof(RegionView3D), "region view3d"); + rv3d = ar->regiondata; + rv3d->viewquat[0] = 1.0f; + rv3d->persp = RV3D_PERSP; + rv3d->view = RV3D_VIEW_PERSPORTHO; + rv3d->dist = 10.0; return (SpaceLink *)v3d; } @@ -331,7 +331,7 @@ static SpaceLink *view3d_new(const bContext *C) /* not spacelink itself */ static void view3d_free(SpaceLink *sl) { - View3D *vd= (View3D *) sl; + View3D *vd = (View3D *) sl; BLI_freelistN(&vd->bgpicbase); @@ -349,17 +349,17 @@ static void view3d_init(struct wmWindowManager *UNUSED(wm), ScrArea *UNUSED(sa)) static SpaceLink *view3d_duplicate(SpaceLink *sl) { - View3D *v3do= (View3D *)sl; - View3D *v3dn= MEM_dupallocN(sl); + View3D *v3do = (View3D *)sl; + View3D *v3dn = MEM_dupallocN(sl); /* clear or remove stuff from old */ // XXX BIF_view3d_previewrender_free(v3do); if (v3do->localvd) { - v3do->localvd= NULL; - v3do->properties_storage= NULL; - v3do->lay= v3dn->localvd->lay; + v3do->localvd = NULL; + v3do->properties_storage = NULL; + v3do->lay = v3dn->localvd->lay; v3do->lay &= 0xFFFFFF; } @@ -370,7 +370,7 @@ static SpaceLink *view3d_duplicate(SpaceLink *sl) BLI_duplicatelist(&v3dn->bgpicbase, &v3do->bgpicbase); - v3dn->properties_storage= NULL; + v3dn->properties_storage = NULL; return (SpaceLink *)v3dn; } @@ -453,7 +453,7 @@ static void view3d_main_area_init(wmWindowManager *wm, ARegion *ar) WM_event_add_keymap_handler(&ar->handlers, keymap); /* add drop boxes */ - lb= WM_dropboxmap_find("View3D", SPACE_VIEW3D, RGN_TYPE_WINDOW); + lb = WM_dropboxmap_find("View3D", SPACE_VIEW3D, RGN_TYPE_WINDOW); WM_event_add_dropbox_handler(&ar->handlers, lb); @@ -461,9 +461,9 @@ static void view3d_main_area_init(wmWindowManager *wm, ARegion *ar) static int view3d_ob_drop_poll(bContext *UNUSED(C), wmDrag *drag, wmEvent *UNUSED(event)) { - if (drag->type==WM_DRAG_ID) { - ID *id= (ID *)drag->poin; - if ( GS(id->name)==ID_OB ) + if (drag->type == WM_DRAG_ID) { + ID *id = (ID *)drag->poin; + if (GS(id->name) == ID_OB) return 1; } return 0; @@ -471,9 +471,9 @@ static int view3d_ob_drop_poll(bContext *UNUSED(C), wmDrag *drag, wmEvent *UNUSE static int view3d_mat_drop_poll(bContext *UNUSED(C), wmDrag *drag, wmEvent *UNUSED(event)) { - if (drag->type==WM_DRAG_ID) { - ID *id= (ID *)drag->poin; - if ( GS(id->name)==ID_MA ) + if (drag->type == WM_DRAG_ID) { + ID *id = (ID *)drag->poin; + if (GS(id->name) == ID_MA) return 1; } return 0; @@ -481,13 +481,13 @@ static int view3d_mat_drop_poll(bContext *UNUSED(C), wmDrag *drag, wmEvent *UNUS static int view3d_ima_drop_poll(bContext *UNUSED(C), wmDrag *drag, wmEvent *UNUSED(event)) { - if (drag->type==WM_DRAG_ID) { - ID *id= (ID *)drag->poin; - if ( GS(id->name)==ID_IM ) + if (drag->type == WM_DRAG_ID) { + ID *id = (ID *)drag->poin; + if (GS(id->name) == ID_IM) return 1; } - else if (drag->type==WM_DRAG_PATH) { - if (ELEM(drag->icon, 0, ICON_FILE_IMAGE)) /* rule might not work? */ + else if (drag->type == WM_DRAG_PATH) { + if (ELEM(drag->icon, 0, ICON_FILE_IMAGE)) /* rule might not work? */ return 1; } return 0; @@ -496,7 +496,7 @@ static int view3d_ima_drop_poll(bContext *UNUSED(C), wmDrag *drag, wmEvent *UNUS static int view3d_ima_bg_drop_poll(bContext *C, wmDrag *drag, wmEvent *event) { - if ( ED_view3d_give_base_under_cursor(C, event->mval) ) { + if (ED_view3d_give_base_under_cursor(C, event->mval) ) { return 0; } return view3d_ima_drop_poll(C, drag, event); @@ -504,7 +504,7 @@ static int view3d_ima_bg_drop_poll(bContext *C, wmDrag *drag, wmEvent *event) static int view3d_ima_ob_drop_poll(bContext *C, wmDrag *drag, wmEvent *event) { - if ( ED_view3d_give_base_under_cursor(C, event->mval) ) { + if (ED_view3d_give_base_under_cursor(C, event->mval) ) { return view3d_ima_drop_poll(C, drag, event); } return 0; @@ -512,30 +512,30 @@ static int view3d_ima_ob_drop_poll(bContext *C, wmDrag *drag, wmEvent *event) static void view3d_ob_drop_copy(wmDrag *drag, wmDropBox *drop) { - ID *id= (ID *)drag->poin; + ID *id = (ID *)drag->poin; PointerRNA ptr; /* need to put name in sub-operator in macro */ - ptr= RNA_pointer_get(drop->ptr, "OBJECT_OT_add_named"); + ptr = RNA_pointer_get(drop->ptr, "OBJECT_OT_add_named"); if (ptr.data) - RNA_string_set(&ptr, "name", id->name+2); + RNA_string_set(&ptr, "name", id->name + 2); else - RNA_string_set(drop->ptr, "name", id->name+2); + RNA_string_set(drop->ptr, "name", id->name + 2); } static void view3d_id_drop_copy(wmDrag *drag, wmDropBox *drop) { - ID *id= (ID *)drag->poin; + ID *id = (ID *)drag->poin; - RNA_string_set(drop->ptr, "name", id->name+2); + RNA_string_set(drop->ptr, "name", id->name + 2); } static void view3d_id_path_drop_copy(wmDrag *drag, wmDropBox *drop) { - ID *id= (ID *)drag->poin; + ID *id = (ID *)drag->poin; if (id) - RNA_string_set(drop->ptr, "name", id->name+2); + RNA_string_set(drop->ptr, "name", id->name + 2); if (drag->path[0]) RNA_string_set(drop->ptr, "filepath", drag->path); } @@ -544,7 +544,7 @@ static void view3d_id_path_drop_copy(wmDrag *drag, wmDropBox *drop) /* region dropbox definition */ static void view3d_dropboxes(void) { - ListBase *lb= WM_dropboxmap_find("View3D", SPACE_VIEW3D, RGN_TYPE_WINDOW); + ListBase *lb = WM_dropboxmap_find("View3D", SPACE_VIEW3D, RGN_TYPE_WINDOW); WM_dropbox_add(lb, "OBJECT_OT_add_named_cursor", view3d_ob_drop_poll, view3d_ob_drop_copy); WM_dropbox_add(lb, "OBJECT_OT_drop_named_material", view3d_mat_drop_poll, view3d_id_drop_copy); @@ -557,7 +557,7 @@ static void view3d_dropboxes(void) /* type callback, not region itself */ static void view3d_main_area_free(ARegion *ar) { - RegionView3D *rv3d= ar->regiondata; + RegionView3D *rv3d = ar->regiondata; if (rv3d) { if (rv3d->localvd) MEM_freeN(rv3d->localvd); @@ -575,7 +575,7 @@ static void view3d_main_area_free(ARegion *ar) MEM_freeN(rv3d->depths); } MEM_freeN(rv3d); - ar->regiondata= NULL; + ar->regiondata = NULL; } } @@ -583,20 +583,20 @@ static void view3d_main_area_free(ARegion *ar) static void *view3d_main_area_duplicate(void *poin) { if (poin) { - RegionView3D *rv3d= poin, *new; + RegionView3D *rv3d = poin, *new; - new= MEM_dupallocN(rv3d); + new = MEM_dupallocN(rv3d); if (rv3d->localvd) - new->localvd= MEM_dupallocN(rv3d->localvd); + new->localvd = MEM_dupallocN(rv3d->localvd); if (rv3d->clipbb) - new->clipbb= MEM_dupallocN(rv3d->clipbb); + new->clipbb = MEM_dupallocN(rv3d->clipbb); - new->depths= NULL; - new->ri= NULL; - new->render_engine= NULL; - new->gpd= NULL; - new->sms= NULL; - new->smooth_timer= NULL; + new->depths = NULL; + new->ri = NULL; + new->render_engine = NULL; + new->gpd = NULL; + new->sms = NULL; + new->smooth_timer = NULL; return new; } @@ -605,28 +605,28 @@ static void *view3d_main_area_duplicate(void *poin) static void view3d_recalc_used_layers(ARegion *ar, wmNotifier *wmn, Scene *scene) { - wmWindow *win= wmn->wm->winactive; + wmWindow *win = wmn->wm->winactive; ScrArea *sa; - unsigned int lay_used= 0; + unsigned int lay_used = 0; Base *base; if (!win) return; - base= scene->base.first; + base = scene->base.first; while (base) { - lay_used |= base->lay & ((1<<20)-1); /* ignore localview */ + lay_used |= base->lay & ((1 << 20) - 1); /* ignore localview */ - if (lay_used == (1<<20)-1) + if (lay_used == (1 << 20) - 1) break; - base= base->next; + base = base->next; } - for (sa= win->screen->areabase.first; sa; sa= sa->next) { + for (sa = win->screen->areabase.first; sa; sa = sa->next) { if (sa->spacetype == SPACE_VIEW3D) { if (BLI_findindex(&sa->regionbase, ar) != -1) { - View3D *v3d= sa->spacedata.first; - v3d->lay_used= lay_used; + View3D *v3d = sa->spacedata.first; + v3d->lay_used = lay_used; break; } } @@ -638,9 +638,9 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn) bScreen *sc; /* context changes */ - switch(wmn->category) { + switch (wmn->category) { case NC_ANIMATION: - switch(wmn->data) { + switch (wmn->data) { case ND_KEYFRAME_PROP: case ND_NLA_ACTCHANGE: ED_region_tag_redraw(ar); @@ -657,7 +657,7 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn) } break; case NC_SCENE: - switch(wmn->data) { + switch (wmn->data) { case ND_LAYER_CONTENT: view3d_recalc_used_layers(ar, wmn, wmn->reference); ED_region_tag_redraw(ar); @@ -680,7 +680,7 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn) ED_region_tag_redraw(ar); break; case NC_OBJECT: - switch(wmn->data) { + switch (wmn->data) { case ND_BONE_ACTIVE: case ND_BONE_SELECT: case ND_TRANSFORM: @@ -693,20 +693,20 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn) ED_region_tag_redraw(ar); break; } - switch(wmn->action) { + switch (wmn->action) { case NA_ADDED: ED_region_tag_redraw(ar); break; } break; case NC_GEOM: - switch(wmn->data) { + switch (wmn->data) { case ND_DATA: case ND_SELECT: ED_region_tag_redraw(ar); break; } - switch(wmn->action) { + switch (wmn->action) { case NA_EDITED: ED_region_tag_redraw(ar); break; @@ -721,20 +721,20 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn) ED_region_tag_redraw_overlay(ar); break; case NC_MATERIAL: - switch(wmn->data) { + switch (wmn->data) { case ND_SHADING_DRAW: ED_region_tag_redraw(ar); break; } break; case NC_WORLD: - switch(wmn->data) { + switch (wmn->data) { case ND_WORLD_DRAW: /* handled by space_view3d_listener() for v3d access */ break; case ND_WORLD_STARS: { - RegionView3D *rv3d= ar->regiondata; + RegionView3D *rv3d = ar->regiondata; if (rv3d->persp == RV3D_CAMOB) { ED_region_tag_redraw(ar); } @@ -742,7 +742,7 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn) } break; case NC_LAMP: - switch(wmn->data) { + switch (wmn->data) { case ND_LIGHTING_DRAW: ED_region_tag_redraw(ar); break; @@ -758,13 +758,13 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn) ED_region_tag_redraw(ar); break; case NC_MOVIECLIP: - if (wmn->data==ND_DISPLAY) + if (wmn->data == ND_DISPLAY) ED_region_tag_redraw(ar); break; case NC_SPACE: if (wmn->data == ND_SPACE_VIEW3D) { if (wmn->subtype == NS_VIEW3D_GPU) { - RegionView3D *rv3d= ar->regiondata; + RegionView3D *rv3d = ar->regiondata; rv3d->rflag |= RV3D_GPULIGHT_UPDATE; } ED_region_tag_redraw(ar); @@ -775,7 +775,7 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn) ED_region_tag_redraw(ar); break; case NC_SCREEN: - switch(wmn->data) { + switch (wmn->data) { case ND_GPENCIL: case ND_ANIMPLAY: case ND_SKETCH: @@ -786,7 +786,7 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn) case ND_SCREENSET: /* screen was changed, need to update used layers due to NC_SCENE|ND_LAYER_CONTENT */ /* updates used layers only for View3D in active screen */ - sc= wmn->reference; + sc = wmn->reference; view3d_recalc_used_layers(ar, wmn, sc->scene); ED_region_tag_redraw(ar); break; @@ -799,7 +799,7 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn) /* concept is to retrieve cursor type context-less */ static void view3d_main_area_cursor(wmWindow *win, ScrArea *UNUSED(sa), ARegion *UNUSED(ar)) { - Scene *scene= win->screen->scene; + Scene *scene = win->screen->scene; if (scene->obedit) { WM_cursor_set(win, CURSOR_EDIT); @@ -827,9 +827,9 @@ static void view3d_header_area_draw(const bContext *C, ARegion *ar) static void view3d_header_area_listener(ARegion *ar, wmNotifier *wmn) { /* context changes */ - switch(wmn->category) { + switch (wmn->category) { case NC_SCENE: - switch(wmn->data) { + switch (wmn->data) { case ND_FRAME: case ND_OB_ACTIVE: case ND_OB_SELECT: @@ -868,9 +868,9 @@ static void view3d_buttons_area_draw(const bContext *C, ARegion *ar) static void view3d_buttons_area_listener(ARegion *ar, wmNotifier *wmn) { /* context changes */ - switch(wmn->category) { + switch (wmn->category) { case NC_ANIMATION: - switch(wmn->data) { + switch (wmn->data) { case ND_KEYFRAME_PROP: case ND_NLA_ACTCHANGE: ED_region_tag_redraw(ar); @@ -883,7 +883,7 @@ static void view3d_buttons_area_listener(ARegion *ar, wmNotifier *wmn) } break; case NC_SCENE: - switch(wmn->data) { + switch (wmn->data) { case ND_FRAME: case ND_OB_ACTIVE: case ND_OB_SELECT: @@ -895,14 +895,14 @@ static void view3d_buttons_area_listener(ARegion *ar, wmNotifier *wmn) ED_region_tag_redraw(ar); break; } - switch(wmn->action) { + switch (wmn->action) { case NA_EDITED: ED_region_tag_redraw(ar); break; } break; case NC_OBJECT: - switch(wmn->data) { + switch (wmn->data) { case ND_BONE_ACTIVE: case ND_BONE_SELECT: case ND_TRANSFORM: @@ -915,7 +915,7 @@ static void view3d_buttons_area_listener(ARegion *ar, wmNotifier *wmn) } break; case NC_GEOM: - switch(wmn->data) { + switch (wmn->data) { case ND_DATA: case ND_SELECT: ED_region_tag_redraw(ar); @@ -930,7 +930,7 @@ static void view3d_buttons_area_listener(ARegion *ar, wmNotifier *wmn) ED_region_tag_redraw(ar); break; case NC_BRUSH: - if (wmn->action==NA_EDITED) + if (wmn->action == NA_EDITED) ED_region_tag_redraw(ar); break; case NC_SPACE: @@ -967,7 +967,7 @@ static void view3d_tools_area_draw(const bContext *C, ARegion *ar) static void view3d_props_area_listener(ARegion *ar, wmNotifier *wmn) { /* context changes */ - switch(wmn->category) { + switch (wmn->category) { case NC_WM: if (wmn->data == ND_HISTORY) ED_region_tag_redraw(ar); @@ -989,9 +989,9 @@ static void space_view3d_listener(struct ScrArea *sa, struct wmNotifier *wmn) View3D *v3d = sa->spacedata.first; /* context changes */ - switch(wmn->category) { + switch (wmn->category) { case NC_SCENE: - switch(wmn->data) { + switch (wmn->data) { case ND_WORLD: if (v3d->flag2 & V3D_RENDER_OVERRIDE) ED_area_tag_redraw_regiontype(sa, RGN_TYPE_WINDOW); @@ -999,7 +999,7 @@ static void space_view3d_listener(struct ScrArea *sa, struct wmNotifier *wmn) } break; case NC_WORLD: - switch(wmn->data) { + switch (wmn->data) { case ND_WORLD_DRAW: if (v3d->flag2 & V3D_RENDER_OVERRIDE) ED_area_tag_redraw_regiontype(sa, RGN_TYPE_WINDOW); @@ -1007,7 +1007,7 @@ static void space_view3d_listener(struct ScrArea *sa, struct wmNotifier *wmn) } break; case NC_MATERIAL: - switch(wmn->data) { + switch (wmn->data) { case ND_NODES: if (v3d->drawtype == OB_TEXTURE) ED_area_tag_redraw_regiontype(sa, RGN_TYPE_WINDOW); @@ -1035,25 +1035,26 @@ static void space_view3d_listener(struct ScrArea *sa, struct wmNotifier *wmn) const char *view3d_context_dir[] = { "selected_objects", "selected_bases", "selected_editable_objects", "selected_editable_bases", "visible_objects", "visible_bases", "selectable_objects", "selectable_bases", - "active_base", "active_object", NULL}; + "active_base", "active_object", NULL +}; static int view3d_context(const bContext *C, const char *member, bContextDataResult *result) { - View3D *v3d= CTX_wm_view3d(C); - Scene *scene= CTX_data_scene(C); + View3D *v3d = CTX_wm_view3d(C); + Scene *scene = CTX_data_scene(C); Base *base; /* fallback to the scene layer, allows duplicate and other object operators to run outside the 3d view */ - unsigned int lay = v3d ? v3d->lay:scene->lay; + unsigned int lay = v3d ? v3d->lay : scene->lay; if (CTX_data_dir(member)) { CTX_data_dir_set(result, view3d_context_dir); } else if (CTX_data_equals(member, "selected_objects") || CTX_data_equals(member, "selected_bases")) { - int selected_objects= CTX_data_equals(member, "selected_objects"); + int selected_objects = CTX_data_equals(member, "selected_objects"); - for (base=scene->base.first; base; base=base->next) { + for (base = scene->base.first; base; base = base->next) { if ((base->flag & SELECT) && (base->lay & lay)) { - if ((base->object->restrictflag & OB_RESTRICT_VIEW)==0) { + if ((base->object->restrictflag & OB_RESTRICT_VIEW) == 0) { if (selected_objects) CTX_data_id_list_add(result, &base->object->id); else @@ -1065,12 +1066,12 @@ static int view3d_context(const bContext *C, const char *member, bContextDataRes return 1; } else if (CTX_data_equals(member, "selected_editable_objects") || CTX_data_equals(member, "selected_editable_bases")) { - int selected_editable_objects= CTX_data_equals(member, "selected_editable_objects"); + int selected_editable_objects = CTX_data_equals(member, "selected_editable_objects"); - for (base=scene->base.first; base; base=base->next) { + for (base = scene->base.first; base; base = base->next) { if ((base->flag & SELECT) && (base->lay & lay)) { - if ((base->object->restrictflag & OB_RESTRICT_VIEW)==0) { - if (0==object_is_libdata(base->object)) { + if ((base->object->restrictflag & OB_RESTRICT_VIEW) == 0) { + if (0 == object_is_libdata(base->object)) { if (selected_editable_objects) CTX_data_id_list_add(result, &base->object->id); else @@ -1083,11 +1084,11 @@ static int view3d_context(const bContext *C, const char *member, bContextDataRes return 1; } else if (CTX_data_equals(member, "visible_objects") || CTX_data_equals(member, "visible_bases")) { - int visible_objects= CTX_data_equals(member, "visible_objects"); + int visible_objects = CTX_data_equals(member, "visible_objects"); - for (base=scene->base.first; base; base=base->next) { + for (base = scene->base.first; base; base = base->next) { if (base->lay & lay) { - if ((base->object->restrictflag & OB_RESTRICT_VIEW)==0) { + if ((base->object->restrictflag & OB_RESTRICT_VIEW) == 0) { if (visible_objects) CTX_data_id_list_add(result, &base->object->id); else @@ -1099,11 +1100,11 @@ static int view3d_context(const bContext *C, const char *member, bContextDataRes return 1; } else if (CTX_data_equals(member, "selectable_objects") || CTX_data_equals(member, "selectable_bases")) { - int selectable_objects= CTX_data_equals(member, "selectable_objects"); + int selectable_objects = CTX_data_equals(member, "selectable_objects"); - for (base=scene->base.first; base; base=base->next) { + for (base = scene->base.first; base; base = base->next) { if (base->lay & lay) { - if ((base->object->restrictflag & OB_RESTRICT_VIEW)==0 && (base->object->restrictflag & OB_RESTRICT_SELECT)==0) { + if ((base->object->restrictflag & OB_RESTRICT_VIEW) == 0 && (base->object->restrictflag & OB_RESTRICT_SELECT) == 0) { if (selectable_objects) CTX_data_id_list_add(result, &base->object->id); else @@ -1116,14 +1117,14 @@ static int view3d_context(const bContext *C, const char *member, bContextDataRes } else if (CTX_data_equals(member, "active_base")) { if (scene->basact && (scene->basact->lay & lay)) - if ((scene->basact->object->restrictflag & OB_RESTRICT_VIEW)==0) + if ((scene->basact->object->restrictflag & OB_RESTRICT_VIEW) == 0) CTX_data_pointer_set(result, &scene->id, &RNA_ObjectBase, scene->basact); return 1; } else if (CTX_data_equals(member, "active_object")) { if (scene->basact && (scene->basact->lay & lay)) - if ((scene->basact->object->restrictflag & OB_RESTRICT_VIEW)==0) + if ((scene->basact->object->restrictflag & OB_RESTRICT_VIEW) == 0) CTX_data_id_pointer_set(result, &scene->basact->object->id); return 1; @@ -1139,56 +1140,56 @@ static int view3d_context(const bContext *C, const char *member, bContextDataRes /* only called once, from space/spacetypes.c */ void ED_spacetype_view3d(void) { - SpaceType *st= MEM_callocN(sizeof(SpaceType), "spacetype view3d"); + SpaceType *st = MEM_callocN(sizeof(SpaceType), "spacetype view3d"); ARegionType *art; - st->spaceid= SPACE_VIEW3D; + st->spaceid = SPACE_VIEW3D; strncpy(st->name, "View3D", BKE_ST_MAXNAME); - st->new= view3d_new; - st->free= view3d_free; - st->init= view3d_init; + st->new = view3d_new; + st->free = view3d_free; + st->init = view3d_init; st->listener = space_view3d_listener; - st->duplicate= view3d_duplicate; - st->operatortypes= view3d_operatortypes; - st->keymap= view3d_keymap; - st->dropboxes= view3d_dropboxes; - st->context= view3d_context; + st->duplicate = view3d_duplicate; + st->operatortypes = view3d_operatortypes; + st->keymap = view3d_keymap; + st->dropboxes = view3d_dropboxes; + st->context = view3d_context; /* regions: main window */ - art= MEM_callocN(sizeof(ARegionType), "spacetype view3d main region"); + art = MEM_callocN(sizeof(ARegionType), "spacetype view3d main region"); art->regionid = RGN_TYPE_WINDOW; - art->keymapflag= ED_KEYMAP_GPENCIL; - art->draw= view3d_main_area_draw; - art->init= view3d_main_area_init; - art->free= view3d_main_area_free; - art->duplicate= view3d_main_area_duplicate; - art->listener= view3d_main_area_listener; - art->cursor= view3d_main_area_cursor; - art->lock= 1; /* can become flag, see BKE_spacedata_draw_locks */ + art->keymapflag = ED_KEYMAP_GPENCIL; + art->draw = view3d_main_area_draw; + art->init = view3d_main_area_init; + art->free = view3d_main_area_free; + art->duplicate = view3d_main_area_duplicate; + art->listener = view3d_main_area_listener; + art->cursor = view3d_main_area_cursor; + art->lock = 1; /* can become flag, see BKE_spacedata_draw_locks */ BLI_addhead(&st->regiontypes, art); /* regions: listview/buttons */ - art= MEM_callocN(sizeof(ARegionType), "spacetype view3d buttons region"); + art = MEM_callocN(sizeof(ARegionType), "spacetype view3d buttons region"); art->regionid = RGN_TYPE_UI; - art->prefsizex= 180; // XXX - art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_FRAMES; - art->listener= view3d_buttons_area_listener; - art->init= view3d_buttons_area_init; - art->draw= view3d_buttons_area_draw; + art->prefsizex = 180; // XXX + art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_FRAMES; + art->listener = view3d_buttons_area_listener; + art->init = view3d_buttons_area_init; + art->draw = view3d_buttons_area_draw; BLI_addhead(&st->regiontypes, art); view3d_buttons_register(art); /* regions: tool(bar) */ - art= MEM_callocN(sizeof(ARegionType), "spacetype view3d tools region"); + art = MEM_callocN(sizeof(ARegionType), "spacetype view3d tools region"); art->regionid = RGN_TYPE_TOOLS; - art->prefsizex= 160; // XXX - art->prefsizey= 50; // XXX - art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_FRAMES; - art->listener= view3d_buttons_area_listener; - art->init= view3d_tools_area_init; - art->draw= view3d_tools_area_draw; + art->prefsizex = 160; // XXX + art->prefsizey = 50; // XXX + art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_FRAMES; + art->listener = view3d_buttons_area_listener; + art->init = view3d_tools_area_init; + art->draw = view3d_tools_area_draw; BLI_addhead(&st->regiontypes, art); #if 0 @@ -1197,27 +1198,27 @@ void ED_spacetype_view3d(void) #endif /* regions: tool properties */ - art= MEM_callocN(sizeof(ARegionType), "spacetype view3d tool properties region"); + art = MEM_callocN(sizeof(ARegionType), "spacetype view3d tool properties region"); art->regionid = RGN_TYPE_TOOL_PROPS; - art->prefsizex= 0; - art->prefsizey= 120; - art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_FRAMES; - art->listener= view3d_props_area_listener; - art->init= view3d_tools_area_init; - art->draw= view3d_tools_area_draw; + art->prefsizex = 0; + art->prefsizey = 120; + art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_FRAMES; + art->listener = view3d_props_area_listener; + art->init = view3d_tools_area_init; + art->draw = view3d_tools_area_draw; BLI_addhead(&st->regiontypes, art); view3d_tool_props_register(art); /* regions: header */ - art= MEM_callocN(sizeof(ARegionType), "spacetype view3d header region"); + art = MEM_callocN(sizeof(ARegionType), "spacetype view3d header region"); art->regionid = RGN_TYPE_HEADER; - art->prefsizey= HEADERY; - art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D|ED_KEYMAP_FRAMES|ED_KEYMAP_HEADER; - art->listener= view3d_header_area_listener; - art->init= view3d_header_area_init; - art->draw= view3d_header_area_draw; + art->prefsizey = HEADERY; + art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES | ED_KEYMAP_HEADER; + art->listener = view3d_header_area_listener; + art->init = view3d_header_area_init; + art->draw = view3d_header_area_draw; BLI_addhead(&st->regiontypes, art); BKE_spacetype_register(st); diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c index 953f22a2b65..f714260ed41 100644 --- a/source/blender/editors/space_view3d/view3d_buttons.c +++ b/source/blender/editors/space_view3d/view3d_buttons.c @@ -83,44 +83,44 @@ /* ******************* view3d space & buttons ************** */ -#define B_NOP 1 -#define B_REDR 2 -#define B_OBJECTPANELROT 1007 +#define B_NOP 1 +#define B_REDR 2 +#define B_OBJECTPANELROT 1007 #define B_OBJECTPANELMEDIAN 1008 -#define B_ARMATUREPANEL1 1009 -#define B_ARMATUREPANEL2 1010 +#define B_ARMATUREPANEL1 1009 +#define B_ARMATUREPANEL2 1010 #define B_OBJECTPANELPARENT 1011 -#define B_OBJECTPANEL 1012 -#define B_ARMATUREPANEL3 1013 -#define B_OBJECTPANELSCALE 1014 -#define B_OBJECTPANELDIMS 1015 -#define B_TRANSFORMSPACEADD 1016 -#define B_TRANSFORMSPACECLEAR 1017 -#define B_SETPT_AUTO 2125 -#define B_SETPT_VECTOR 2126 -#define B_SETPT_ALIGN 2127 -#define B_SETPT_FREE 2128 -#define B_RECALCMBALL 2501 - -#define B_WEIGHT0_0 2840 -#define B_WEIGHT1_4 2841 -#define B_WEIGHT1_2 2842 -#define B_WEIGHT3_4 2843 -#define B_WEIGHT1_0 2844 - -#define B_OPA1_8 2845 -#define B_OPA1_4 2846 -#define B_OPA1_2 2847 -#define B_OPA3_4 2848 -#define B_OPA1_0 2849 - -#define B_CLR_WPAINT 2850 - -#define B_RV3D_LOCKED 2900 -#define B_RV3D_BOXVIEW 2901 -#define B_RV3D_BOXCLIP 2902 - -#define B_IDNAME 3000 +#define B_OBJECTPANEL 1012 +#define B_ARMATUREPANEL3 1013 +#define B_OBJECTPANELSCALE 1014 +#define B_OBJECTPANELDIMS 1015 +#define B_TRANSFORMSPACEADD 1016 +#define B_TRANSFORMSPACECLEAR 1017 +#define B_SETPT_AUTO 2125 +#define B_SETPT_VECTOR 2126 +#define B_SETPT_ALIGN 2127 +#define B_SETPT_FREE 2128 +#define B_RECALCMBALL 2501 + +#define B_WEIGHT0_0 2840 +#define B_WEIGHT1_4 2841 +#define B_WEIGHT1_2 2842 +#define B_WEIGHT3_4 2843 +#define B_WEIGHT1_0 2844 + +#define B_OPA1_8 2845 +#define B_OPA1_4 2846 +#define B_OPA1_2 2847 +#define B_OPA3_4 2848 +#define B_OPA1_0 2849 + +#define B_CLR_WPAINT 2850 + +#define B_RV3D_LOCKED 2900 +#define B_RV3D_BOXVIEW 2901 +#define B_RV3D_BOXCLIP 2902 + +#define B_IDNAME 3000 /* temporary struct for storing transform properties */ typedef struct { @@ -167,8 +167,8 @@ static float compute_scale_factor(const float ve_median, const float median) /* is used for both read and write... */ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float lim) { - uiBlock *block = (layout)? uiLayoutAbsoluteBlock(layout): NULL; - MDeformVert *dvert =NULL; + uiBlock *block = (layout) ? uiLayoutAbsoluteBlock(layout) : NULL; + MDeformVert *dvert = NULL; TransformProperties *tfp; float median[7], ve_median[7]; int tot, totw, totweight, totedge, totradius; @@ -221,8 +221,8 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float int i, max = 1, init = 1; char str[320]; - for (i = 0; itotweight; i++) { - dg = BLI_findlink (&ob->defbase, dvert->dw[i].def_nr); + for (i = 0; i < dvert->totweight; i++) { + dg = BLI_findlink(&ob->defbase, dvert->dw[i].def_nr); if (dg) { max += BLI_snprintf(str, sizeof(str), "%s %%x%d|", dg->name, dvert->dw[i].def_nr); if (max < sizeof(str)) strcat(defstr, str); @@ -281,7 +281,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float } else { bp = nu->bp; - a = nu->pntsu*nu->pntsv; + a = nu->pntsu * nu->pntsv; while (a--) { if (bp->f1 & SELECT) { add_v3_v3(median, bp->vec); @@ -405,7 +405,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, IFACE_("Bevel Weight:"), 0, 20, 200, 20, &(tfp->ve_median[6]), 0.0, 1.0, 1, 3, TIP_("Weight used by Bevel modifier")); } - else if (totedge>1) { + else if (totedge > 1) { uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, IFACE_("Mean Crease:"), 0, 40, 200, 20, &(tfp->ve_median[3]), 0.0, 1.0, 1, 3, TIP_("Weight used by SubSurf modifier")); uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, IFACE_("Mean Bevel Weight:"), 0, 20, 200, 20, @@ -571,7 +571,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float } else { bp = nu->bp; - a = nu->pntsu*nu->pntsv; + a = nu->pntsu * nu->pntsv; while (a--) { if (bp->f1 & SELECT) { add_v3_v3(bp->vec, median); @@ -605,7 +605,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float int a; const float scale_w = compute_scale_factor(ve_median[4], median[4]); - a = lt->editlatt->latt->pntsu*lt->editlatt->latt->pntsv*lt->editlatt->latt->pntsw; + a = lt->editlatt->latt->pntsu * lt->editlatt->latt->pntsv * lt->editlatt->latt->pntsw; bp = lt->editlatt->latt->def; while (a--) { if (bp->f1 & SELECT) { @@ -820,7 +820,7 @@ static void do_view3d_vgroup_buttons(bContext *C, void *UNUSED(arg), int event) /* default for now */ DAG_id_tag_update(&ob->id, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); } static int view3d_panel_vgroup_poll(const bContext *C, PanelType *UNUSED(pt)) @@ -862,7 +862,7 @@ static void view3d_panel_vgroup(const bContext *C, Panel *pa) uiBlockBeginAlign(block); for (i = dv->totweight; i != 0; i--, dw++) { - dg = BLI_findlink (&ob->defbase, dw->def_nr); + dg = BLI_findlink(&ob->defbase, dw->def_nr); if (dg) { uiDefButF(block, NUM, B_VGRP_PNL_EDIT_SINGLE + dw->def_nr, dg->name, 0, yco, 180, 20, &dw->weight, 0.0, 1.0, 1, 3, ""); @@ -912,7 +912,7 @@ static void v3d_transform_butsR(uiLayout *layout, PointerRNA *ptr) colsub = uiLayoutColumn(split, 1); uiItemR(colsub, ptr, "lock_rotations_4d", UI_ITEM_R_TOGGLE, IFACE_("4L"), ICON_NONE); if (RNA_boolean_get(ptr, "lock_rotations_4d")) - uiItemR(colsub, ptr, "lock_rotation_w", UI_ITEM_R_TOGGLE+UI_ITEM_R_ICON_ONLY, "", ICON_NONE); + uiItemR(colsub, ptr, "lock_rotation_w", UI_ITEM_R_TOGGLE + UI_ITEM_R_ICON_ONLY, "", ICON_NONE); else uiItemL(colsub, "", ICON_NONE); uiItemR(colsub, ptr, "lock_rotation", UI_ITEM_R_TOGGLE | UI_ITEM_R_ICON_ONLY, "", ICON_NONE); @@ -970,7 +970,7 @@ static void v3d_posearmature_buts(uiLayout *layout, Object *ob) /* row = uiLayoutRow(layout, 0); */ - if (!pchan) { + if (!pchan) { uiItemL(layout, IFACE_("No Bone Active"), ICON_NONE); return; } @@ -991,57 +991,57 @@ static void v3d_posearmature_buts(uiLayout *layout, Object *ob) float quat[4]; /* convert to euler, passing through quats... */ axis_angle_to_quat(quat, pchan->rotAxis, pchan->rotAngle); - quat_to_eul( tfp->ob_eul,quat); + quat_to_eul(tfp->ob_eul, quat); } else if (pchan->rotmode == ROT_MODE_QUAT) - quat_to_eul( tfp->ob_eul,pchan->quat); + quat_to_eul(tfp->ob_eul, pchan->quat); else copy_v3_v3(tfp->ob_eul, pchan->eul); - tfp->ob_eul[0]*= RAD2DEGF(1.0f); - tfp->ob_eul[1]*= RAD2DEGF(1.0f); - tfp->ob_eul[2]*= RAD2DEGF(1.0f); + tfp->ob_eul[0] *= RAD2DEGF(1.0f); + tfp->ob_eul[1] *= RAD2DEGF(1.0f); + tfp->ob_eul[2] *= RAD2DEGF(1.0f); uiDefBut(block, LABEL, 0, "Location:", 0, 240, 100, 20, 0, 0, 0, 0, 0, ""); uiBlockBeginAlign(block); - but = uiDefButF(block, NUM, B_ARMATUREPANEL2, "X:", 0, 220, 120, 19, pchan->loc, -lim, lim, 100, 3, ""); + but = uiDefButF(block, NUM, B_ARMATUREPANEL2, "X:", 0, 220, 120, 19, pchan->loc, -lim, lim, 100, 3, ""); uiButSetUnitType(but, PROP_UNIT_LENGTH); - but = uiDefButF(block, NUM, B_ARMATUREPANEL2, "Y:", 0, 200, 120, 19, pchan->loc+1, -lim, lim, 100, 3, ""); + but = uiDefButF(block, NUM, B_ARMATUREPANEL2, "Y:", 0, 200, 120, 19, pchan->loc + 1, -lim, lim, 100, 3, ""); uiButSetUnitType(but, PROP_UNIT_LENGTH); - but = uiDefButF(block, NUM, B_ARMATUREPANEL2, "Z:", 0, 180, 120, 19, pchan->loc+2, -lim, lim, 100, 3, ""); + but = uiDefButF(block, NUM, B_ARMATUREPANEL2, "Z:", 0, 180, 120, 19, pchan->loc + 2, -lim, lim, 100, 3, ""); uiButSetUnitType(but, PROP_UNIT_LENGTH); uiBlockEndAlign(block); uiBlockBeginAlign(block); - uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCX, B_REDR, ICON_UNLOCKED, 125, 220, 25, 19, &(pchan->protectflag), 0, 0, 0, 0, "Protects X Location value from being Transformed"); - uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCY, B_REDR, ICON_UNLOCKED, 125, 200, 25, 19, &(pchan->protectflag), 0, 0, 0, 0, "Protects Y Location value from being Transformed"); - uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCZ, B_REDR, ICON_UNLOCKED, 125, 180, 25, 19, &(pchan->protectflag), 0, 0, 0, 0, "Protects Z Location value from being Transformed"); + uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCX, B_REDR, ICON_UNLOCKED, 125, 220, 25, 19, &(pchan->protectflag), 0, 0, 0, 0, "Protects X Location value from being Transformed"); + uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCY, B_REDR, ICON_UNLOCKED, 125, 200, 25, 19, &(pchan->protectflag), 0, 0, 0, 0, "Protects Y Location value from being Transformed"); + uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCZ, B_REDR, ICON_UNLOCKED, 125, 180, 25, 19, &(pchan->protectflag), 0, 0, 0, 0, "Protects Z Location value from being Transformed"); uiBlockEndAlign(block); - uiDefBut(block, LABEL, 0, "Rotation:", 0, 160, 100, 20, 0, 0, 0, 0, 0, ""); + uiDefBut(block, LABEL, 0, "Rotation:", 0, 160, 100, 20, 0, 0, 0, 0, 0, ""); uiBlockBeginAlign(block); - uiDefButF(block, NUM, B_ARMATUREPANEL3, "X:", 0, 140, 120, 19, tfp->ob_eul, -1000.0, 1000.0, 100, 3, ""); - uiDefButF(block, NUM, B_ARMATUREPANEL3, "Y:", 0, 120, 120, 19, tfp->ob_eul+1, -1000.0, 1000.0, 100, 3, ""); - uiDefButF(block, NUM, B_ARMATUREPANEL3, "Z:", 0, 100, 120, 19, tfp->ob_eul+2, -1000.0, 1000.0, 100, 3, ""); + uiDefButF(block, NUM, B_ARMATUREPANEL3, "X:", 0, 140, 120, 19, tfp->ob_eul, -1000.0, 1000.0, 100, 3, ""); + uiDefButF(block, NUM, B_ARMATUREPANEL3, "Y:", 0, 120, 120, 19, tfp->ob_eul + 1, -1000.0, 1000.0, 100, 3, ""); + uiDefButF(block, NUM, B_ARMATUREPANEL3, "Z:", 0, 100, 120, 19, tfp->ob_eul + 2, -1000.0, 1000.0, 100, 3, ""); uiBlockEndAlign(block); uiBlockBeginAlign(block); - uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTX, B_REDR, ICON_UNLOCKED, 125, 140, 25, 19, &(pchan->protectflag), 0, 0, 0, 0, "Protects X Rotation value from being Transformed"); - uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTY, B_REDR, ICON_UNLOCKED, 125, 120, 25, 19, &(pchan->protectflag), 0, 0, 0, 0, "Protects Y Rotation value from being Transformed"); - uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTZ, B_REDR, ICON_UNLOCKED, 125, 100, 25, 19, &(pchan->protectflag), 0, 0, 0, 0, "Protects Z Rotation value from being Transformed"); + uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTX, B_REDR, ICON_UNLOCKED, 125, 140, 25, 19, &(pchan->protectflag), 0, 0, 0, 0, "Protects X Rotation value from being Transformed"); + uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTY, B_REDR, ICON_UNLOCKED, 125, 120, 25, 19, &(pchan->protectflag), 0, 0, 0, 0, "Protects Y Rotation value from being Transformed"); + uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTZ, B_REDR, ICON_UNLOCKED, 125, 100, 25, 19, &(pchan->protectflag), 0, 0, 0, 0, "Protects Z Rotation value from being Transformed"); uiBlockEndAlign(block); - uiDefBut(block, LABEL, 0, "Scale:", 0, 80, 100, 20, 0, 0, 0, 0, 0, ""); + uiDefBut(block, LABEL, 0, "Scale:", 0, 80, 100, 20, 0, 0, 0, 0, 0, ""); uiBlockBeginAlign(block); - uiDefButF(block, NUM, B_ARMATUREPANEL2, "X:", 0, 60, 120, 19, pchan->size, -lim, lim, 10, 3, ""); - uiDefButF(block, NUM, B_ARMATUREPANEL2, "Y:", 0, 40, 120, 19, pchan->size+1, -lim, lim, 10, 3, ""); - uiDefButF(block, NUM, B_ARMATUREPANEL2, "Z:", 0, 20, 120, 19, pchan->size+2, -lim, lim, 10, 3, ""); + uiDefButF(block, NUM, B_ARMATUREPANEL2, "X:", 0, 60, 120, 19, pchan->size, -lim, lim, 10, 3, ""); + uiDefButF(block, NUM, B_ARMATUREPANEL2, "Y:", 0, 40, 120, 19, pchan->size + 1, -lim, lim, 10, 3, ""); + uiDefButF(block, NUM, B_ARMATUREPANEL2, "Z:", 0, 20, 120, 19, pchan->size + 2, -lim, lim, 10, 3, ""); uiBlockEndAlign(block); uiBlockBeginAlign(block); - uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEX, B_REDR, ICON_UNLOCKED, 125, 60, 25, 19, &(pchan->protectflag), 0, 0, 0, 0, "Protects X Scale value from being Transformed"); - uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEY, B_REDR, ICON_UNLOCKED, 125, 40, 25, 19, &(pchan->protectflag), 0, 0, 0, 0, "Protects Y Scale value from being Transformed"); - uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEZ, B_REDR, ICON_UNLOCKED, 125, 20, 25, 19, &(pchan->protectflag), 0, 0, 0, 0, "Protects z Scale value from being Transformed"); + uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEX, B_REDR, ICON_UNLOCKED, 125, 60, 25, 19, &(pchan->protectflag), 0, 0, 0, 0, "Protects X Scale value from being Transformed"); + uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEY, B_REDR, ICON_UNLOCKED, 125, 40, 25, 19, &(pchan->protectflag), 0, 0, 0, 0, "Protects Y Scale value from being Transformed"); + uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEZ, B_REDR, ICON_UNLOCKED, 125, 20, 25, 19, &(pchan->protectflag), 0, 0, 0, 0, "Protects z Scale value from being Transformed"); uiBlockEndAlign(block); #endif } @@ -1085,7 +1085,7 @@ static void v3d_editarmature_buts(uiLayout *layout, Object *ob) col = uiLayoutColumn(layout, 0); uiItemR(col, &eboneptr, "head", 0, NULL, ICON_NONE); - if (ebone->parent && ebone->flag & BONE_CONNECTED ) { + if (ebone->parent && ebone->flag & BONE_CONNECTED) { PointerRNA parptr = RNA_pointer_get(&eboneptr, "parent"); uiItemR(col, &parptr, "tail_radius", 0, IFACE_("Radius (Parent)"), ICON_NONE); } @@ -1164,34 +1164,34 @@ static void do_view3d_region_buttons(bContext *C, void *UNUSED(index), int event switch (event) { - case B_REDR: - ED_area_tag_redraw(CTX_wm_area(C)); - return; /* no notifier! */ + case B_REDR: + ED_area_tag_redraw(CTX_wm_area(C)); + return; /* no notifier! */ - case B_OBJECTPANEL: - DAG_id_tag_update(&ob->id, OB_RECALC_OB); - break; + case B_OBJECTPANEL: + DAG_id_tag_update(&ob->id, OB_RECALC_OB); + break; - case B_OBJECTPANELMEDIAN: - if (ob) { - v3d_editvertex_buts(NULL, v3d, ob, 1.0); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); - } - break; + case B_OBJECTPANELMEDIAN: + if (ob) { + v3d_editvertex_buts(NULL, v3d, ob, 1.0); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + } + break; /* note; this case also used for parbone */ - case B_OBJECTPANELPARENT: - if (ob) { - if (ob->id.lib || BKE_object_parent_loop_check(ob->parent, ob)) - ob->parent = NULL; - else { - DAG_scene_sort(bmain, scene); - DAG_id_tag_update(&ob->id, OB_RECALC_OB); + case B_OBJECTPANELPARENT: + if (ob) { + if (ob->id.lib || BKE_object_parent_loop_check(ob->parent, ob)) + ob->parent = NULL; + else { + DAG_scene_sort(bmain, scene); + DAG_id_tag_update(&ob->id, OB_RECALC_OB); + } } - } - break; + break; - case B_ARMATUREPANEL3: /* rotate button on channel */ + case B_ARMATUREPANEL3: /* rotate button on channel */ { bPoseChannel *pchan; float eul[3]; @@ -1218,73 +1218,73 @@ static void do_view3d_region_buttons(bContext *C, void *UNUSED(index), int event } /* no break, pass on */ - case B_ARMATUREPANEL2: - ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK); - DAG_id_tag_update(&ob->id, OB_RECALC_DATA); - break; + case B_ARMATUREPANEL2: + ob->pose->flag |= (POSE_LOCKED | POSE_DO_UNLOCK); + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + break; - case B_TRANSFORMSPACEADD: + case B_TRANSFORMSPACEADD: { char names[sizeof(((TransformOrientation *)NULL)->name)] = ""; BIF_createTransformOrientation(C, NULL, names, 1, 0); } break; - case B_TRANSFORMSPACECLEAR: - BIF_clearTransformOrientation(C); - break; + case B_TRANSFORMSPACECLEAR: + BIF_clearTransformOrientation(C); + break; #if 0 /* XXX */ - case B_WEIGHT0_0: - wpaint->weight = 0.0f; - break; + case B_WEIGHT0_0: + wpaint->weight = 0.0f; + break; - case B_WEIGHT1_4: - wpaint->weight = 0.25f; - break; - case B_WEIGHT1_2: - wpaint->weight = 0.5f; - break; - case B_WEIGHT3_4: - wpaint->weight = 0.75f; - break; - case B_WEIGHT1_0: - wpaint->weight = 1.0f; - break; + case B_WEIGHT1_4: + wpaint->weight = 0.25f; + break; + case B_WEIGHT1_2: + wpaint->weight = 0.5f; + break; + case B_WEIGHT3_4: + wpaint->weight = 0.75f; + break; + case B_WEIGHT1_0: + wpaint->weight = 1.0f; + break; - case B_OPA1_8: - wpaint->a = 0.125f; - break; - case B_OPA1_4: - wpaint->a = 0.25f; - break; - case B_OPA1_2: - wpaint->a = 0.5f; - break; - case B_OPA3_4: - wpaint->a = 0.75f; - break; - case B_OPA1_0: - wpaint->a = 1.0f; - break; + case B_OPA1_8: + wpaint->a = 0.125f; + break; + case B_OPA1_4: + wpaint->a = 0.25f; + break; + case B_OPA1_2: + wpaint->a = 0.5f; + break; + case B_OPA3_4: + wpaint->a = 0.75f; + break; + case B_OPA1_0: + wpaint->a = 1.0f; + break; #endif - case B_CLR_WPAINT: + case B_CLR_WPAINT: /* if (!multires_level1_test()) { */ { - bDeformGroup *defGroup = BLI_findlink(&ob->defbase, ob->actdef-1); + bDeformGroup *defGroup = BLI_findlink(&ob->defbase, ob->actdef - 1); if (defGroup) { Mesh *me = ob->data; int a; for (a = 0; a < me->totvert; a++) - ED_vgroup_vert_remove (ob, defGroup, a); + ED_vgroup_vert_remove(ob, defGroup, a); DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } } break; - case B_RV3D_LOCKED: - case B_RV3D_BOXVIEW: - case B_RV3D_BOXCLIP: + case B_RV3D_LOCKED: + case B_RV3D_BOXVIEW: + case B_RV3D_BOXCLIP: { ScrArea *sa = CTX_wm_area(C); ARegion *ar = sa->regionbase.last; @@ -1316,7 +1316,7 @@ static void do_view3d_region_buttons(bContext *C, void *UNUSED(index), int event } /* default for now */ - WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, v3d); + WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d); } static void view3d_panel_object(const bContext *C, Panel *pa) @@ -1343,7 +1343,7 @@ static void view3d_panel_object(const bContext *C, Panel *pa) /* XXX uiSetButLock(object_is_libdata(ob), ERROR_LIBDATA_MESSAGE); */ - if (ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT)) { + if (ob->mode & (OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT | OB_MODE_TEXTURE_PAINT)) { } else { if ((ob->mode & OB_MODE_PARTICLE_EDIT) == 0) { @@ -1388,8 +1388,8 @@ static void view3d_panel_preview(bContext *C, ARegion *ar, short cntrl) /* VIEW3 uiPanelControl(UI_PNL_SOLID | UI_PNL_CLOSE | UI_PNL_SCALE | cntrl); uiSetPanelHandler(VIEW3D_HANDLER_PREVIEW); /* for close and esc */ - ofsx = -150 + (sa->winx/2) / v3d->blockscale; - ofsy = -100 + (sa->winy/2) / v3d->blockscale; + ofsx = -150 + (sa->winx / 2) / v3d->blockscale; + ofsy = -100 + (sa->winy / 2) / v3d->blockscale; if (uiNewPanel(C, ar, block, "Preview", "View3d", ofsx, ofsy, 300, 200) == 0) return; diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 1f6ec45f908..b6ed8f65c68 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -65,7 +65,7 @@ #include "BKE_movieclip.h" #include "RE_engine.h" -#include "RE_pipeline.h" // make_stars +#include "RE_pipeline.h" // make_stars #include "IMB_imbuf_types.h" #include "IMB_imbuf.h" @@ -92,7 +92,7 @@ #include "GPU_material.h" #include "GPU_extensions.h" -#include "view3d_intern.h" // own include +#include "view3d_intern.h" // own include @@ -102,7 +102,7 @@ static void star_stuff_init_func(void) glPointSize(1.0); glBegin(GL_POINTS); } -static void star_stuff_vertex_func(float* i) +static void star_stuff_vertex_func(float*i) { glVertex3fv(i); } @@ -121,7 +121,7 @@ void circf(float x, float y, float rad) glTranslatef(x, y, 0.); - gluDisk( qobj, 0.0, rad, 32, 1); + gluDisk(qobj, 0.0, rad, 32, 1); glPopMatrix(); @@ -138,7 +138,7 @@ void circ(float x, float y, float rad) glTranslatef(x, y, 0.); - gluDisk( qobj, 0.0, rad, 32, 1); + gluDisk(qobj, 0.0, rad, 32, 1); glPopMatrix(); @@ -150,21 +150,21 @@ void circ(float x, float y, float rad) static void view3d_draw_clipping(RegionView3D *rv3d) { - BoundBox *bb= rv3d->clipbb; + BoundBox *bb = rv3d->clipbb; if (bb) { - static unsigned int clipping_index[6][4]= {{0, 1, 2, 3}, - {0, 4, 5, 1}, - {4, 7, 6, 5}, - {7, 3, 2, 6}, - {1, 5, 6, 2}, - {7, 4, 0, 3}}; + static unsigned int clipping_index[6][4] = {{0, 1, 2, 3}, + {0, 4, 5, 1}, + {4, 7, 6, 5}, + {7, 3, 2, 6}, + {1, 5, 6, 2}, + {7, 4, 0, 3}}; UI_ThemeColorShade(TH_BACK, -8); glEnableClientState(GL_VERTEX_ARRAY); glVertexPointer(3, GL_FLOAT, 0, bb->vec); - glDrawElements(GL_QUADS, sizeof(clipping_index)/sizeof(unsigned int), GL_UNSIGNED_INT, clipping_index); + glDrawElements(GL_QUADS, sizeof(clipping_index) / sizeof(unsigned int), GL_UNSIGNED_INT, clipping_index); glDisableClientState(GL_VERTEX_ARRAY); } @@ -229,15 +229,15 @@ static void drawgrid_draw(ARegion *ar, double wx, double wy, double x, double y, { double verts[2][2]; - x+= (wx); - y+= (wy); + x += (wx); + y += (wy); /* set fixed 'Y' */ - verts[0][1]= 0.0f; - verts[1][1]= (double)ar->winy; + verts[0][1] = 0.0f; + verts[1][1] = (double)ar->winy; /* iter over 'X' */ - verts[0][0] = verts[1][0] = x-dx*floor(x/dx); + verts[0][0] = verts[1][0] = x - dx *floor(x / dx); glEnableClientState(GL_VERTEX_ARRAY); glVertexPointer(2, GL_DOUBLE, 0, verts); @@ -247,11 +247,11 @@ static void drawgrid_draw(ARegion *ar, double wx, double wy, double x, double y, } /* set fixed 'X' */ - verts[0][0]= 0.0f; - verts[1][0]= (double)ar->winx; + verts[0][0] = 0.0f; + verts[1][0] = (double)ar->winx; /* iter over 'Y' */ - verts[0][1]= verts[1][1]= y-dx*floor(y/dx); + verts[0][1] = verts[1][1] = y - dx *floor(y / dx); while (verts[0][1] < ar->winy) { glDrawArrays(GL_LINES, 0, 2); verts[0][1] = verts[1][1] = verts[0][1] + dx; @@ -265,34 +265,34 @@ static void drawgrid_draw(ARegion *ar, double wx, double wy, double x, double y, static void drawgrid(UnitSettings *unit, ARegion *ar, View3D *v3d, const char **grid_unit) { /* extern short bgpicmode; */ - RegionView3D *rv3d= ar->regiondata; + RegionView3D *rv3d = ar->regiondata; double wx, wy, x, y, fw, fx, fy, dx; double vec4[4]; unsigned char col[3], col2[3]; - fx= rv3d->persmat[3][0]; - fy= rv3d->persmat[3][1]; - fw= rv3d->persmat[3][3]; + fx = rv3d->persmat[3][0]; + fy = rv3d->persmat[3][1]; + fw = rv3d->persmat[3][3]; - wx= (ar->winx/2.0); /* because of rounding errors, grid at wrong location */ - wy= (ar->winy/2.0); + wx = (ar->winx / 2.0); /* because of rounding errors, grid at wrong location */ + wy = (ar->winy / 2.0); - x= (wx)*fx/fw; - y= (wy)*fy/fw; + x = (wx) * fx / fw; + y = (wy) * fy / fw; - vec4[0]=vec4[1]= v3d->grid; + vec4[0] = vec4[1] = v3d->grid; - vec4[2]= 0.0; - vec4[3]= 1.0; + vec4[2] = 0.0; + vec4[3] = 1.0; mul_m4_v4d(rv3d->persmat, vec4); - fx= vec4[0]; - fy= vec4[1]; - fw= vec4[3]; + fx = vec4[0]; + fy = vec4[1]; + fw = vec4[3]; - dx= fabs(x-(wx)*fx/fw); - if (dx==0) dx= fabs(y-(wy)*fy/fw); + dx = fabs(x - (wx) * fx / fw); + if (dx == 0) dx = fabs(y - (wy) * fy / fw); - glDepthMask(0); // disable write in zbuffer + glDepthMask(0); // disable write in zbuffer /* check zoom out */ UI_ThemeColor(TH_GRID); @@ -308,23 +308,23 @@ static void drawgrid(UnitSettings *unit, ARegion *ar, View3D *v3d, const char ** bUnit_GetSystem(&usys, &len, unit->system, B_UNIT_LENGTH); if (usys) { - i= len; + i = len; while (i--) { - double scalar= bUnit_GetScaler(usys, i); + double scalar = bUnit_GetScaler(usys, i); dx_scalar = dx * scalar / unit->scale_length; - if (dx_scalar < (GRID_MIN_PX*2)) + if (dx_scalar < (GRID_MIN_PX * 2)) continue; /* Store the smallest drawn grid size units name so users know how big each grid cell is */ - if (*grid_unit==NULL) { - *grid_unit= bUnit_GetNameDisplay(usys, i); - rv3d->gridview= (scalar * v3d->grid) / unit->scale_length; + if (*grid_unit == NULL) { + *grid_unit = bUnit_GetNameDisplay(usys, i); + rv3d->gridview = (scalar * v3d->grid) / unit->scale_length; } - blend_fac= 1-((GRID_MIN_PX*2)/dx_scalar); + blend_fac = 1 - ((GRID_MIN_PX * 2) / dx_scalar); /* tweak to have the fade a bit nicer */ - blend_fac= (blend_fac * blend_fac) * 2.0f; + blend_fac = (blend_fac * blend_fac) * 2.0f; CLAMP(blend_fac, 0.3f, 1.0f); @@ -337,83 +337,83 @@ static void drawgrid(UnitSettings *unit, ARegion *ar, View3D *v3d, const char ** else { short sublines = v3d->gridsubdiv; - if (dxgridview*= sublines; - dx*= sublines; - - if (dxgridview*= sublines; - dx*= sublines; - - if (dxgridview*= sublines; - dx*=sublines; - if (dxgridview *= sublines; + dx *= sublines; + + if (dx < GRID_MIN_PX) { + rv3d->gridview *= sublines; + dx *= sublines; + + if (dx < GRID_MIN_PX) { + rv3d->gridview *= sublines; + dx *= sublines; + if (dx < GRID_MIN_PX) ; else { UI_ThemeColor(TH_GRID); drawgrid_draw(ar, wx, wy, x, y, dx); } } - else { // start blending out - UI_ThemeColorBlend(TH_BACK, TH_GRID, dx/(GRID_MIN_PX*6)); + else { // start blending out + UI_ThemeColorBlend(TH_BACK, TH_GRID, dx / (GRID_MIN_PX * 6)); drawgrid_draw(ar, wx, wy, x, y, dx); UI_ThemeColor(TH_GRID); - drawgrid_draw(ar, wx, wy, x, y, sublines*dx); + drawgrid_draw(ar, wx, wy, x, y, sublines * dx); } } - else { // start blending out (GRID_MIN_PX < dx < (GRID_MIN_PX*10)) - UI_ThemeColorBlend(TH_BACK, TH_GRID, dx/(GRID_MIN_PX*6)); + else { // start blending out (GRID_MIN_PX < dx < (GRID_MIN_PX*10)) + UI_ThemeColorBlend(TH_BACK, TH_GRID, dx / (GRID_MIN_PX * 6)); drawgrid_draw(ar, wx, wy, x, y, dx); UI_ThemeColor(TH_GRID); - drawgrid_draw(ar, wx, wy, x, y, sublines*dx); + drawgrid_draw(ar, wx, wy, x, y, sublines * dx); } } else { - if (dx>(GRID_MIN_PX*10)) { // start blending in - rv3d->gridview/= sublines; - dx/= sublines; - if (dx>(GRID_MIN_PX*10)) { // start blending in - rv3d->gridview/= sublines; - dx/= sublines; - if (dx>(GRID_MIN_PX*10)) { + if (dx > (GRID_MIN_PX * 10)) { // start blending in + rv3d->gridview /= sublines; + dx /= sublines; + if (dx > (GRID_MIN_PX * 10)) { // start blending in + rv3d->gridview /= sublines; + dx /= sublines; + if (dx > (GRID_MIN_PX * 10)) { UI_ThemeColor(TH_GRID); drawgrid_draw(ar, wx, wy, x, y, dx); } else { - UI_ThemeColorBlend(TH_BACK, TH_GRID, dx/(GRID_MIN_PX*6)); + UI_ThemeColorBlend(TH_BACK, TH_GRID, dx / (GRID_MIN_PX * 6)); drawgrid_draw(ar, wx, wy, x, y, dx); UI_ThemeColor(TH_GRID); - drawgrid_draw(ar, wx, wy, x, y, dx*sublines); + drawgrid_draw(ar, wx, wy, x, y, dx * sublines); } } else { - UI_ThemeColorBlend(TH_BACK, TH_GRID, dx/(GRID_MIN_PX*6)); + UI_ThemeColorBlend(TH_BACK, TH_GRID, dx / (GRID_MIN_PX * 6)); drawgrid_draw(ar, wx, wy, x, y, dx); UI_ThemeColor(TH_GRID); - drawgrid_draw(ar, wx, wy, x, y, dx*sublines); + drawgrid_draw(ar, wx, wy, x, y, dx * sublines); } } else { - UI_ThemeColorBlend(TH_BACK, TH_GRID, dx/(GRID_MIN_PX*6)); + UI_ThemeColorBlend(TH_BACK, TH_GRID, dx / (GRID_MIN_PX * 6)); drawgrid_draw(ar, wx, wy, x, y, dx); UI_ThemeColor(TH_GRID); - drawgrid_draw(ar, wx, wy, x, y, dx*sublines); + drawgrid_draw(ar, wx, wy, x, y, dx * sublines); } } } - x+= (wx); - y+= (wy); + x += (wx); + y += (wy); UI_GetThemeColor3ubv(TH_GRID, col); setlinestyle(0); /* center cross */ /* horizontal line */ - if ( ELEM(rv3d->view, RV3D_VIEW_RIGHT, RV3D_VIEW_LEFT)) + if (ELEM(rv3d->view, RV3D_VIEW_RIGHT, RV3D_VIEW_LEFT)) UI_make_axis_color(col, col2, 'Y'); else UI_make_axis_color(col, col2, 'X'); glColor3ubv(col2); @@ -421,14 +421,14 @@ static void drawgrid(UnitSettings *unit, ARegion *ar, View3D *v3d, const char ** fdrawline(0.0, y, (float)ar->winx, y); /* vertical line */ - if ( ELEM(rv3d->view, RV3D_VIEW_TOP, RV3D_VIEW_BOTTOM)) + if (ELEM(rv3d->view, RV3D_VIEW_TOP, RV3D_VIEW_BOTTOM)) UI_make_axis_color(col, col2, 'Y'); else UI_make_axis_color(col, col2, 'Z'); glColor3ubv(col2); fdrawline(x, 0.0, x, (float)ar->winy); - glDepthMask(1); // enable write in zbuffer + glDepthMask(1); // enable write in zbuffer } #undef GRID_MIN_PX @@ -436,11 +436,11 @@ static void drawfloor(Scene *scene, View3D *v3d, const char **grid_unit) { float grid, grid_scale; unsigned char col_grid[3]; - const int gridlines= v3d->gridlines/2; + const int gridlines = v3d->gridlines / 2; - if (v3d->gridlines<3) return; + if (v3d->gridlines < 3) return; - grid_scale= v3d->grid; + grid_scale = v3d->grid; /* use 'grid_scale' instead of 'v3d->grid' from now on */ /* apply units */ @@ -451,53 +451,53 @@ static void drawfloor(Scene *scene, View3D *v3d, const char **grid_unit) bUnit_GetSystem(&usys, &len, scene->unit.system, B_UNIT_LENGTH); if (usys) { - int i= bUnit_GetBaseUnit(usys); - *grid_unit= bUnit_GetNameDisplay(usys, i); + int i = bUnit_GetBaseUnit(usys); + *grid_unit = bUnit_GetNameDisplay(usys, i); grid_scale = (grid_scale * (float)bUnit_GetScaler(usys, i)) / scene->unit.scale_length; } } - grid= gridlines * grid_scale; + grid = gridlines * grid_scale; - if (v3d->zbuf && scene->obedit) glDepthMask(0); // for zbuffer-select + if (v3d->zbuf && scene->obedit) glDepthMask(0); // for zbuffer-select UI_GetThemeColor3ubv(TH_GRID, col_grid); /* draw the Y axis and/or grid lines */ if (v3d->gridflag & V3D_SHOW_FLOOR) { - float vert[4][3]= {{0.0f}}; + float vert[4][3] = {{0.0f}}; unsigned char col_bg[3]; unsigned char col_grid_emphasise[3], col_grid_light[3]; int a; - int prev_emphasise= -1; + int prev_emphasise = -1; UI_GetThemeColor3ubv(TH_BACK, col_bg); /* emphasise division lines lighter instead of darker, if background is darker than grid */ UI_GetColorPtrShade3ubv(col_grid, col_grid_light, 10); UI_GetColorPtrShade3ubv(col_grid, col_grid_emphasise, - (((col_grid[0]+col_grid[1]+col_grid[2])+30) > - (col_bg[0]+col_bg[1]+col_bg[2])) ? 20 : -10); + (((col_grid[0] + col_grid[1] + col_grid[2]) + 30) > + (col_bg[0] + col_bg[1] + col_bg[2])) ? 20 : -10); /* set fixed axis */ - vert[0][0]= vert[2][1]= grid; - vert[1][0]= vert[3][1]= -grid; + vert[0][0] = vert[2][1] = grid; + vert[1][0] = vert[3][1] = -grid; glEnableClientState(GL_VERTEX_ARRAY); glVertexPointer(3, GL_FLOAT, 0, vert); - for (a= -gridlines;a<=gridlines;a++) { - const float line= a * grid_scale; - const int is_emphasise= (a % 10) == 0; + for (a = -gridlines; a <= gridlines; a++) { + const float line = a * grid_scale; + const int is_emphasise = (a % 10) == 0; if (is_emphasise != prev_emphasise) { glColor3ubv(is_emphasise ? col_grid_emphasise : col_grid_light); - prev_emphasise= is_emphasise; + prev_emphasise = is_emphasise; } /* set variable axis */ - vert[0][1]= vert[1][1]= - vert[2][0]= vert[3][0]= line; + vert[0][1] = vert[1][1] = + vert[2][0] = vert[3][0] = line; glDrawArrays(GL_LINES, 0, 4); } @@ -511,21 +511,22 @@ static void drawfloor(Scene *scene, View3D *v3d, const char **grid_unit) /* check for the 'show Z axis' preference */ if (v3d->gridflag & (V3D_SHOW_X | V3D_SHOW_Y | V3D_SHOW_Z)) { int axis; - for (axis= 0; axis < 3; axis++) - if (v3d->gridflag & (V3D_SHOW_X << axis)) { - float vert[3]; - unsigned char tcol[3]; - - UI_make_axis_color(col_grid, tcol, 'X' + axis); - glColor3ubv(tcol); - - glBegin(GL_LINE_STRIP); - zero_v3(vert); - vert[axis]= grid; - glVertex3fv(vert ); - vert[axis]= -grid; - glVertex3fv(vert); - glEnd(); + for (axis = 0; axis < 3; axis++) { + if (v3d->gridflag & (V3D_SHOW_X << axis)) { + float vert[3]; + unsigned char tcol[3]; + + UI_make_axis_color(col_grid, tcol, 'X' + axis); + glColor3ubv(tcol); + + glBegin(GL_LINE_STRIP); + zero_v3(vert); + vert[axis] = grid; + glVertex3fv(vert); + vert[axis] = -grid; + glVertex3fv(vert); + glEnd(); + } } } @@ -542,15 +543,15 @@ static void drawcursor(Scene *scene, ARegion *ar, View3D *v3d) int flag; /* we don't want the clipping for cursor */ - flag= v3d->flag; - v3d->flag= 0; + flag = v3d->flag; + v3d->flag = 0; project_int(ar, give_cursor(scene, v3d), co); - v3d->flag= flag; + v3d->flag = flag; mx = co[0]; my = co[1]; - if (mx!=IS_CLIPPED) { + if (mx != IS_CLIPPED) { setlinestyle(0); cpack(0xFF); circ((float)mx, (float)my, 10.0); @@ -560,10 +561,10 @@ static void drawcursor(Scene *scene, ARegion *ar, View3D *v3d) setlinestyle(0); cpack(0x0); - sdrawline(mx-20, my, mx-5, my); - sdrawline(mx+5, my, mx+20, my); - sdrawline(mx, my-20, mx, my-5); - sdrawline(mx, my+5, mx, my+20); + sdrawline(mx - 20, my, mx - 5, my); + sdrawline(mx + 5, my, mx + 20, my); + sdrawline(mx, my - 20, mx, my - 5); + sdrawline(mx, my + 5, mx, my + 20); } } @@ -573,9 +574,9 @@ static void draw_view_axis(RegionView3D *rv3d) { const float k = U.rvisize; /* axis size */ const float toll = 0.5; /* used to see when view is quasi-orthogonal */ - const float start = k + 1.0f;/* axis center in screen coordinates, x=y */ + const float start = k + 1.0f; /* axis center in screen coordinates, x=y */ float ydisp = 0.0; /* vertical displacement to allow obj info text */ - int bright = 25*(float)U.rvibright + 5; /* axis alpha (rvibright has range 0-10) */ + int bright = 25 * (float)U.rvibright + 5; /* axis alpha (rvibright has range 0-10) */ float vec[3]; float dx, dy; @@ -654,7 +655,7 @@ static void draw_rotation_guide(RegionView3D *rv3d) float o[3]; // center of rotation float end[3]; // endpoints for drawing - float color[4] = {0.f ,0.4235f, 1.f, 1.f}; // bright blue so it matches device LEDs + float color[4] = {0.0f, 0.4235f, 1.0f, 1.0f}; // bright blue so it matches device LEDs negate_v3_v3(o, rv3d->ofs); @@ -693,7 +694,7 @@ static void draw_rotation_guide(RegionView3D *rv3d) // -- draw ring around rotation center -- { -#define ROT_AXIS_DETAIL 13 +#define ROT_AXIS_DETAIL 13 const float s = 0.05f * scale; const float step = 2.f * (float)(M_PI / ROT_AXIS_DETAIL); @@ -726,18 +727,18 @@ static void draw_rotation_guide(RegionView3D *rv3d) } glEnd(); -#undef ROT_AXIS_DETAIL +#undef ROT_AXIS_DETAIL } color[3] = 1.f; // solid dot } else - color[3] = 0.5f; // see-through dot + color[3] = 0.5f; // see-through dot // -- draw rotation center -- glColor4fv(color); glBegin(GL_POINTS); - glVertex3fv(o); + glVertex3fv(o); glEnd(); // find screen coordinates for rotation center, then draw pretty icon @@ -754,12 +755,12 @@ static void draw_view_icon(RegionView3D *rv3d) { BIFIconID icon; - if ( ELEM(rv3d->view, RV3D_VIEW_TOP, RV3D_VIEW_BOTTOM)) - icon= ICON_AXIS_TOP; - else if ( ELEM(rv3d->view, RV3D_VIEW_FRONT, RV3D_VIEW_BACK)) - icon= ICON_AXIS_FRONT; - else if ( ELEM(rv3d->view, RV3D_VIEW_RIGHT, RV3D_VIEW_LEFT)) - icon= ICON_AXIS_SIDE; + if (ELEM(rv3d->view, RV3D_VIEW_TOP, RV3D_VIEW_BOTTOM)) + icon = ICON_AXIS_TOP; + else if (ELEM(rv3d->view, RV3D_VIEW_FRONT, RV3D_VIEW_BACK)) + icon = ICON_AXIS_FRONT; + else if (ELEM(rv3d->view, RV3D_VIEW_RIGHT, RV3D_VIEW_LEFT)) + icon = ICON_AXIS_SIDE; else return; glEnable(GL_BLEND); @@ -801,7 +802,7 @@ static const char *view3d_get_name(View3D *v3d, RegionView3D *rv3d) break; default: - if (rv3d->persp==RV3D_CAMOB) { + if (rv3d->persp == RV3D_CAMOB) { if ((v3d->camera) && (v3d->camera->type == OB_CAMERA)) { Camera *cam; cam = v3d->camera->data; @@ -822,18 +823,18 @@ static const char *view3d_get_name(View3D *v3d, RegionView3D *rv3d) static void draw_viewport_name(ARegion *ar, View3D *v3d) { - RegionView3D *rv3d= ar->regiondata; - const char *name= view3d_get_name(v3d, rv3d); + RegionView3D *rv3d = ar->regiondata; + const char *name = view3d_get_name(v3d, rv3d); char tmpstr[24]; if (v3d->localvd) { BLI_snprintf(tmpstr, sizeof(tmpstr), "%s (Local)", name); - name= tmpstr; + name = tmpstr; } if (name) { UI_ThemeColor(TH_TEXT_HI); - BLF_draw_default_ascii(22, ar->winy-17, 0.0f, name, sizeof(tmpstr)); + BLF_draw_default_ascii(22, ar->winy - 17, 0.0f, name, sizeof(tmpstr)); } } @@ -843,42 +844,42 @@ static void draw_viewport_name(ARegion *ar, View3D *v3d) static void draw_selected_name(Scene *scene, Object *ob) { char info[256], *markern; - short offset=30; + short offset = 30; /* get name of marker on current frame (if available) */ - markern= scene_find_marker_name(scene, CFRA); + markern = scene_find_marker_name(scene, CFRA); /* check if there is an object */ if (ob) { /* name(s) to display depends on type of object */ - if (ob->type==OB_ARMATURE) { - bArmature *arm= ob->data; - char *name= NULL; + if (ob->type == OB_ARMATURE) { + bArmature *arm = ob->data; + char *name = NULL; /* show name of active bone too (if possible) */ if (arm->edbo) { if (arm->act_edbone) - name= ((EditBone *)arm->act_edbone)->name; + name = ((EditBone *)arm->act_edbone)->name; } else if (ob->mode & OB_MODE_POSE) { if (arm->act_bone) { if (arm->act_bone->layer & arm->layer) - name= arm->act_bone->name; + name = arm->act_bone->name; } } if (name && markern) - BLI_snprintf(info, sizeof(info), "(%d) %s %s <%s>", CFRA, ob->id.name+2, name, markern); + BLI_snprintf(info, sizeof(info), "(%d) %s %s <%s>", CFRA, ob->id.name + 2, name, markern); else if (name) - BLI_snprintf(info, sizeof(info), "(%d) %s %s", CFRA, ob->id.name+2, name); + BLI_snprintf(info, sizeof(info), "(%d) %s %s", CFRA, ob->id.name + 2, name); else - BLI_snprintf(info, sizeof(info), "(%d) %s", CFRA, ob->id.name+2); + BLI_snprintf(info, sizeof(info), "(%d) %s", CFRA, ob->id.name + 2); } else if (ELEM3(ob->type, OB_MESH, OB_LATTICE, OB_CURVE)) { - Key *key= NULL; + Key *key = NULL; KeyBlock *kb = NULL; char shapes[MAX_NAME + 10]; @@ -886,7 +887,7 @@ static void draw_selected_name(Scene *scene, Object *ob) shapes[0] = '\0'; key = ob_get_key(ob); if (key) { - kb = BLI_findlink(&key->block, ob->shapenr-1); + kb = BLI_findlink(&key->block, ob->shapenr - 1); if (kb) { BLI_snprintf(shapes, sizeof(shapes), ": %s ", kb->name); if (ob->shapeflag == OB_SHAPE_LOCK) { @@ -896,20 +897,20 @@ static void draw_selected_name(Scene *scene, Object *ob) } if (markern) - BLI_snprintf(info, sizeof(info), "(%d) %s %s <%s>", CFRA, ob->id.name+2, shapes, markern); + BLI_snprintf(info, sizeof(info), "(%d) %s %s <%s>", CFRA, ob->id.name + 2, shapes, markern); else - BLI_snprintf(info, sizeof(info), "(%d) %s %s", CFRA, ob->id.name+2, shapes); + BLI_snprintf(info, sizeof(info), "(%d) %s %s", CFRA, ob->id.name + 2, shapes); } else { /* standard object */ if (markern) - BLI_snprintf(info, sizeof(info), "(%d) %s <%s>", CFRA, ob->id.name+2, markern); + BLI_snprintf(info, sizeof(info), "(%d) %s <%s>", CFRA, ob->id.name + 2, markern); else - BLI_snprintf(info, sizeof(info), "(%d) %s", CFRA, ob->id.name+2); + BLI_snprintf(info, sizeof(info), "(%d) %s", CFRA, ob->id.name + 2); } /* color depends on whether there is a keyframe */ - if (id_frame_has_keyframe((ID *)ob, /*BKE_curframe(scene)*/(float)(CFRA), ANIMFILTER_KEYS_LOCAL)) + if (id_frame_has_keyframe((ID *)ob, /*BKE_curframe(scene)*/ (float)(CFRA), ANIMFILTER_KEYS_LOCAL)) UI_ThemeColor(TH_VERTEX_SELECT); else UI_ThemeColor(TH_TEXT_HI); @@ -941,25 +942,25 @@ static void view3d_camera_border(Scene *scene, ARegion *ar, View3D *v3d, RegionV camera_params_init(¶ms); camera_params_from_view3d(¶ms, v3d, rv3d); if (no_zoom) - params.zoom= 1.0f; + params.zoom = 1.0f; camera_params_compute_viewplane(¶ms, ar->winx, ar->winy, 1.0f, 1.0f); - rect_view= params.viewplane; + rect_view = params.viewplane; /* get camera viewplane */ camera_params_init(¶ms); camera_params_from_object(¶ms, v3d->camera); if (no_shift) { - params.shiftx= 0.0f; - params.shifty= 0.0f; + params.shiftx = 0.0f; + params.shifty = 0.0f; } camera_params_compute_viewplane(¶ms, scene->r.xsch, scene->r.ysch, scene->r.xasp, scene->r.yasp); - rect_camera= params.viewplane; + rect_camera = params.viewplane; /* get camera border within viewport */ - viewborder_r->xmin = ((rect_camera.xmin - rect_view.xmin)/(rect_view.xmax - rect_view.xmin))*ar->winx; - viewborder_r->xmax = ((rect_camera.xmax - rect_view.xmin)/(rect_view.xmax - rect_view.xmin))*ar->winx; - viewborder_r->ymin = ((rect_camera.ymin - rect_view.ymin)/(rect_view.ymax - rect_view.ymin))*ar->winy; - viewborder_r->ymax = ((rect_camera.ymax - rect_view.ymin)/(rect_view.ymax - rect_view.ymin))*ar->winy; + viewborder_r->xmin = ((rect_camera.xmin - rect_view.xmin) / (rect_view.xmax - rect_view.xmin)) * ar->winx; + viewborder_r->xmax = ((rect_camera.xmax - rect_view.xmin) / (rect_view.xmax - rect_view.xmin)) * ar->winx; + viewborder_r->ymin = ((rect_camera.ymin - rect_view.ymin) / (rect_view.ymax - rect_view.ymin)) * ar->winy; + viewborder_r->ymax = ((rect_camera.ymax - rect_view.ymin) / (rect_view.ymax - rect_view.ymin)) * ar->winy; } void ED_view3d_calc_camera_border_size(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D *rv3d, float size_r[2]) @@ -967,8 +968,8 @@ void ED_view3d_calc_camera_border_size(Scene *scene, ARegion *ar, View3D *v3d, R rctf viewborder; view3d_camera_border(scene, ar, v3d, rv3d, &viewborder, TRUE, TRUE); - size_r[0]= viewborder.xmax - viewborder.xmin; - size_r[1]= viewborder.ymax - viewborder.ymin; + size_r[0] = viewborder.xmax - viewborder.xmin; + size_r[1] = viewborder.ymax - viewborder.ymin; } void ED_view3d_calc_camera_border(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D *rv3d, @@ -981,10 +982,10 @@ static void drawviewborder_grid3(float x1, float x2, float y1, float y2, float f { float x3, y3, x4, y4; - x3= x1 + fac * (x2-x1); - y3= y1 + fac * (y2-y1); - x4= x1 + (1.0f - fac) * (x2-x1); - y4= y1 + (1.0f - fac) * (y2-y1); + x3 = x1 + fac * (x2 - x1); + y3 = y1 + fac * (y2 - y1); + x4 = x1 + (1.0f - fac) * (x2 - x1); + y4 = y1 + (1.0f - fac) * (y2 - y1); glBegin(GL_LINES); glVertex2f(x1, y3); @@ -1005,13 +1006,13 @@ static void drawviewborder_grid3(float x1, float x2, float y1, float y2, float f static void drawviewborder_triangle(float x1, float x2, float y1, float y2, const char golden, const char dir) { float ofs; - float w= x2 - x1; - float h= y2 - y1; + float w = x2 - x1; + float h = y2 - y1; glBegin(GL_LINES); if (w > h) { if (golden) { - ofs = w * (1.0f-(1.0f/1.61803399f)); + ofs = w * (1.0f - (1.0f / 1.61803399f)); } else { ofs = h * (h / w); @@ -1029,7 +1030,7 @@ static void drawviewborder_triangle(float x1, float x2, float y1, float y2, cons } else { if (golden) { - ofs = h * (1.0f-(1.0f/1.61803399f)); + ofs = h * (1.0f - (1.0f / 1.61803399f)); } else { ofs = w * (w / h); @@ -1055,20 +1056,20 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d) float x1i, x2i, y1i, y2i; float x3, y3, x4, y4; rctf viewborder; - Camera *ca= NULL; - RegionView3D *rv3d= (RegionView3D *)ar->regiondata; + Camera *ca = NULL; + RegionView3D *rv3d = (RegionView3D *)ar->regiondata; - if (v3d->camera==NULL) + if (v3d->camera == NULL) return; - if (v3d->camera->type==OB_CAMERA) + if (v3d->camera->type == OB_CAMERA) ca = v3d->camera->data; ED_view3d_calc_camera_border(scene, ar, v3d, rv3d, &viewborder, FALSE); /* the offsets */ - x1= viewborder.xmin; - y1= viewborder.ymin; - x2= viewborder.xmax; - y2= viewborder.ymax; + x1 = viewborder.xmin; + y1 = viewborder.ymin; + x2 = viewborder.xmax; + y2 = viewborder.ymax; /* apply offsets so the real 3D camera shows through */ @@ -1077,10 +1078,10 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d) * obscures the 3D camera border */ /* note: with VIEW3D_CAMERA_BORDER_HACK defined this error isn't noticeable * but keep it here in case we need to remove the workaround */ - x1i= (int)(x1 - 1.0001f); - y1i= (int)(y1 - 1.0001f); - x2i= (int)(x2 + (1.0f-0.0001f)); - y2i= (int)(y2 + (1.0f-0.0001f)); + x1i = (int)(x1 - 1.0001f); + y1i = (int)(y1 - 1.0001f); + x2i = (int)(x2 + (1.0f - 0.0001f)); + y2i = (int)(y2 + (1.0f - 0.0001f)); /* passepartout, specified in camera edit buttons */ if (ca && (ca->flag & CAM_SHOWPASSEPARTOUT) && ca->passepartalpha > 0.000001f) { @@ -1088,7 +1089,7 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d) glColor3f(0, 0, 0); } else { - glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_BLEND); glColor4f(0, 0, 0, ca->passepartalpha); } @@ -1116,8 +1117,8 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d) #ifdef VIEW3D_CAMERA_BORDER_HACK if (view3d_camera_border_hack_test == TRUE) { glColor4fv(view3d_camera_border_hack_col); - glRectf(x1i+1, y1i+1, x2i-1, y2i-1); - view3d_camera_border_hack_test= FALSE; + glRectf(x1i + 1, y1i + 1, x2i - 1, y2i - 1); + view3d_camera_border_hack_test = FALSE; } #endif @@ -1136,10 +1137,10 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d) if (scene->r.mode & R_BORDER) { cpack(0); - x3= x1+ scene->r.border.xmin*(x2-x1); - y3= y1+ scene->r.border.ymin*(y2-y1); - x4= x1+ scene->r.border.xmax*(x2-x1); - y4= y1+ scene->r.border.ymax*(y2-y1); + x3 = x1 + scene->r.border.xmin * (x2 - x1); + y3 = y1 + scene->r.border.ymin * (y2 - y1); + x4 = x1 + scene->r.border.xmax * (x2 - x1); + y4 = y1 + scene->r.border.ymax * (y2 - y1); cpack(0x4040FF); glRectf(x3, y3, x4, y4); @@ -1150,8 +1151,8 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d) if (ca->dtx & CAM_DTX_CENTER) { UI_ThemeColorBlendShade(TH_WIRE, TH_BACK, 0.25, 0); - x3= x1+ 0.5f*(x2-x1); - y3= y1+ 0.5f*(y2-y1); + x3 = x1 + 0.5f * (x2 - x1); + y3 = y1 + 0.5f * (y2 - y1); glBegin(GL_LINES); glVertex2f(x1, y3); @@ -1176,12 +1177,12 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d) if (ca->dtx & CAM_DTX_THIRDS) { UI_ThemeColorBlendShade(TH_WIRE, TH_BACK, 0.25, 0); - drawviewborder_grid3(x1, x2, y1, y2, 1.0f/3.0f); + drawviewborder_grid3(x1, x2, y1, y2, 1.0f / 3.0f); } if (ca->dtx & CAM_DTX_GOLDEN) { UI_ThemeColorBlendShade(TH_WIRE, TH_BACK, 0.25, 0); - drawviewborder_grid3(x1, x2, y1, y2, 1.0f-(1.0f/1.61803399f)); + drawviewborder_grid3(x1, x2, y1, y2, 1.0f - (1.0f / 1.61803399f)); } if (ca->dtx & CAM_DTX_GOLDEN_TRI_A) { @@ -1205,15 +1206,15 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d) } if (ca->flag & CAM_SHOWTITLESAFE) { - fac= 0.1; + fac = 0.1; - a= fac*(x2-x1); - x1+= a; - x2-= a; + a = fac * (x2 - x1); + x1 += a; + x2 -= a; - a= fac*(y2-y1); - y1+= a; - y2-= a; + a = fac * (y2 - y1); + y1 += a; + y2 -= a; UI_ThemeColorBlendShade(TH_WIRE, TH_BACK, 0.25, 0); @@ -1223,29 +1224,29 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d) if (ca && (ca->flag & CAM_SHOWSENSOR)) { /* determine sensor fit, and get sensor x/y, for auto fit we * assume and square sensor and only use sensor_x */ - float sizex= scene->r.xsch*scene->r.xasp; - float sizey= scene->r.ysch*scene->r.yasp; + float sizex = scene->r.xsch * scene->r.xasp; + float sizey = scene->r.ysch * scene->r.yasp; int sensor_fit = camera_sensor_fit(ca->sensor_fit, sizex, sizey); - float sensor_x= ca->sensor_x; - float sensor_y= (ca->sensor_fit == CAMERA_SENSOR_FIT_AUTO)? ca->sensor_x: ca->sensor_y; + float sensor_x = ca->sensor_x; + float sensor_y = (ca->sensor_fit == CAMERA_SENSOR_FIT_AUTO) ? ca->sensor_x : ca->sensor_y; /* determine sensor plane */ rctf rect; if (sensor_fit == CAMERA_SENSOR_FIT_HOR) { - float sensor_scale = (x2i-x1i) / sensor_x; + float sensor_scale = (x2i - x1i) / sensor_x; float sensor_height = sensor_scale * sensor_y; rect.xmin = x1i; rect.xmax = x2i; - rect.ymin = (y1i + y2i)*0.5f - sensor_height*0.5f; + rect.ymin = (y1i + y2i) * 0.5f - sensor_height * 0.5f; rect.ymax = rect.ymin + sensor_height; } else { - float sensor_scale = (y2i-y1i) / sensor_y; + float sensor_scale = (y2i - y1i) / sensor_y; float sensor_width = sensor_scale * sensor_x; - rect.xmin = (x1i + x2i)*0.5f - sensor_width*0.5f; + rect.xmin = (x1i + x2i) * 0.5f - sensor_width * 0.5f; rect.xmax = rect.xmin + sensor_width; rect.ymin = y1i; rect.ymax = y2i; @@ -1263,7 +1264,7 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d) /* camera name - draw in highlighted text color */ if (ca && (ca->flag & CAM_SHOWNAME)) { UI_ThemeColor(TH_TEXT_HI); - BLF_draw_default(x1i, y1i-15, 0.0f, v3d->camera->id.name+2, sizeof(v3d->camera->id.name)-2); + BLF_draw_default(x1i, y1i - 15, 0.0f, v3d->camera->id.name + 2, sizeof(v3d->camera->id.name) - 2); UI_ThemeColor(TH_WIRE); } } @@ -1272,30 +1273,30 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d) static void backdrawview3d(Scene *scene, ARegion *ar, View3D *v3d) { - RegionView3D *rv3d= ar->regiondata; + RegionView3D *rv3d = ar->regiondata; struct Base *base = scene->basact; int multisample_enabled; rcti winrct; BLI_assert(ar->regiontype == RGN_TYPE_WINDOW); - if (base && (base->object->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT) || - paint_facesel_test(base->object))) + if (base && (base->object->mode & (OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT) || + paint_facesel_test(base->object))) { /* do nothing */ } else if ((base && (base->object->mode & OB_MODE_TEXTURE_PAINT)) && - scene->toolsettings && (scene->toolsettings->imapaint.flag & IMAGEPAINT_PROJECT_DISABLE)) + scene->toolsettings && (scene->toolsettings->imapaint.flag & IMAGEPAINT_PROJECT_DISABLE)) { /* do nothing */ } else if ((base && (base->object->mode & OB_MODE_PARTICLE_EDIT)) && - v3d->drawtype > OB_WIRE && (v3d->flag & V3D_ZBUF_SELECT)) + v3d->drawtype > OB_WIRE && (v3d->flag & V3D_ZBUF_SELECT)) { /* do nothing */ } - else if (scene->obedit && v3d->drawtype>OB_WIRE && - (v3d->flag & V3D_ZBUF_SELECT)) { + else if (scene->obedit && v3d->drawtype > OB_WIRE && + (v3d->flag & V3D_ZBUF_SELECT)) { /* do nothing */ } else { @@ -1303,7 +1304,7 @@ static void backdrawview3d(Scene *scene, ARegion *ar, View3D *v3d) return; } - if ( !(v3d->flag & V3D_INVALID_BACKBUF) ) return; + if (!(v3d->flag & V3D_INVALID_BACKBUF) ) return; // if (test) { // if (qtest()) { @@ -1312,12 +1313,12 @@ static void backdrawview3d(Scene *scene, ARegion *ar, View3D *v3d) // } // } - if (v3d->drawtype > OB_WIRE) v3d->zbuf= TRUE; + if (v3d->drawtype > OB_WIRE) v3d->zbuf = TRUE; /* dithering and AA break color coding, so disable */ glDisable(GL_DITHER); - multisample_enabled= glIsEnabled(GL_MULTISAMPLE_ARB); + multisample_enabled = glIsEnabled(GL_MULTISAMPLE_ARB); if (multisample_enabled) glDisable(GL_MULTISAMPLE_ARB); @@ -1343,10 +1344,10 @@ static void backdrawview3d(Scene *scene, ARegion *ar, View3D *v3d) draw_object_backbufsel(scene, v3d, rv3d, base->object); v3d->flag &= ~V3D_INVALID_BACKBUF; - ar->swap= 0; /* mark invalid backbuf for wm draw */ + ar->swap = 0; /* mark invalid backbuf for wm draw */ G.f &= ~G_BACKBUFSEL; - v3d->zbuf= FALSE; + v3d->zbuf = FALSE; glDisable(GL_DEPTH_TEST); glEnable(GL_DITHER); if (multisample_enabled) @@ -1372,15 +1373,15 @@ unsigned int view3d_sample_backbuf(ViewContext *vc, int x, int y) unsigned int col; if (x >= vc->ar->winx || y >= vc->ar->winy) return 0; - x+= vc->ar->winrct.xmin; - y+= vc->ar->winrct.ymin; + x += vc->ar->winrct.xmin; + y += vc->ar->winrct.ymin; view3d_validate_backbuf(vc); glReadPixels(x, y, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &col); glReadBuffer(GL_BACK); - if (ENDIAN_ORDER==B_ENDIAN) SWITCH_INT(col); + if (ENDIAN_ORDER == B_ENDIAN) SWITCH_INT(col); return WM_framebuffer_to_index(col); } @@ -1394,47 +1395,47 @@ ImBuf *view3d_read_backbuf(ViewContext *vc, short xmin, short ymin, short xmax, short xminc, yminc, xmaxc, ymaxc, xs, ys; /* clip */ - if (xmin<0) xminc= 0; else xminc= xmin; - if (xmax >= vc->ar->winx) xmaxc= vc->ar->winx-1; else xmaxc= xmax; + if (xmin < 0) xminc = 0; else xminc = xmin; + if (xmax >= vc->ar->winx) xmaxc = vc->ar->winx - 1; else xmaxc = xmax; if (xminc > xmaxc) return NULL; - if (ymin<0) yminc= 0; else yminc= ymin; - if (ymax >= vc->ar->winy) ymaxc= vc->ar->winy-1; else ymaxc= ymax; + if (ymin < 0) yminc = 0; else yminc = ymin; + if (ymax >= vc->ar->winy) ymaxc = vc->ar->winy - 1; else ymaxc = ymax; if (yminc > ymaxc) return NULL; - ibuf= IMB_allocImBuf((xmaxc-xminc+1), (ymaxc-yminc+1), 32, IB_rect); + ibuf = IMB_allocImBuf((xmaxc - xminc + 1), (ymaxc - yminc + 1), 32, IB_rect); view3d_validate_backbuf(vc); glReadPixels(vc->ar->winrct.xmin + xminc, vc->ar->winrct.ymin + yminc, - (xmaxc-xminc + 1), - (ymaxc-yminc + 1), + (xmaxc - xminc + 1), + (ymaxc - yminc + 1), GL_RGBA, GL_UNSIGNED_BYTE, ibuf->rect); glReadBuffer(GL_BACK); - if (ENDIAN_ORDER==B_ENDIAN) IMB_convert_rgba_to_abgr(ibuf); + if (ENDIAN_ORDER == B_ENDIAN) IMB_convert_rgba_to_abgr(ibuf); - a= (xmaxc-xminc+1)*(ymaxc-yminc+1); - dr= ibuf->rect; + a = (xmaxc - xminc + 1) * (ymaxc - yminc + 1); + dr = ibuf->rect; while (a--) { - if (*dr) *dr= WM_framebuffer_to_index(*dr); + if (*dr) *dr = WM_framebuffer_to_index(*dr); dr++; } /* put clipped result back, if needed */ - if (xminc==xmin && xmaxc==xmax && yminc==ymin && ymaxc==ymax) + if (xminc == xmin && xmaxc == xmax && yminc == ymin && ymaxc == ymax) return ibuf; - ibuf1= IMB_allocImBuf( (xmax-xmin+1),(ymax-ymin+1),32,IB_rect); - rd= ibuf->rect; - dr= ibuf1->rect; - - for (ys= ymin; ys<=ymax; ys++) { - for (xs= xmin; xs<=xmax; xs++, dr++) { - if ( xs>=xminc && xs<=xmaxc && ys>=yminc && ys<=ymaxc) { - *dr= *rd; + ibuf1 = IMB_allocImBuf( (xmax - xmin + 1), (ymax - ymin + 1), 32, IB_rect); + rd = ibuf->rect; + dr = ibuf1->rect; + + for (ys = ymin; ys <= ymax; ys++) { + for (xs = xmin; xs <= xmax; xs++, dr++) { + if (xs >= xminc && xs <= xmaxc && ys >= yminc && ys <= ymaxc) { + *dr = *rd; rd++; } } @@ -1445,59 +1446,59 @@ ImBuf *view3d_read_backbuf(ViewContext *vc, short xmin, short ymin, short xmax, /* smart function to sample a rect spiralling outside, nice for backbuf selection */ unsigned int view3d_sample_backbuf_rect(ViewContext *vc, const int mval[2], int size, - unsigned int min, unsigned int max, int *dist, short strict, - void *handle, unsigned int (*indextest)(void *handle, unsigned int index)) + unsigned int min, unsigned int max, int *dist, short strict, + void *handle, unsigned int (*indextest)(void *handle, unsigned int index)) { struct ImBuf *buf; unsigned int *bufmin, *bufmax, *tbuf; int minx, miny; int a, b, rc, nr, amount, dirvec[4][2]; - int distance=0; + int distance = 0; unsigned int index = 0; short indexok = 0; - amount= (size-1)/2; + amount = (size - 1) / 2; - minx = mval[0]-(amount+1); - miny = mval[1]-(amount+1); - buf = view3d_read_backbuf(vc, minx, miny, minx+size-1, miny+size-1); + minx = mval[0] - (amount + 1); + miny = mval[1] - (amount + 1); + buf = view3d_read_backbuf(vc, minx, miny, minx + size - 1, miny + size - 1); if (!buf) return 0; - rc= 0; + rc = 0; - dirvec[0][0]= 1; dirvec[0][1]= 0; - dirvec[1][0]= 0; dirvec[1][1]= -size; - dirvec[2][0]= -1; dirvec[2][1]= 0; - dirvec[3][0]= 0; dirvec[3][1]= size; + dirvec[0][0] = 1; dirvec[0][1] = 0; + dirvec[1][0] = 0; dirvec[1][1] = -size; + dirvec[2][0] = -1; dirvec[2][1] = 0; + dirvec[3][0] = 0; dirvec[3][1] = size; bufmin = buf->rect; tbuf = buf->rect; - bufmax = buf->rect + size*size; - tbuf+= amount*size+ amount; + bufmax = buf->rect + size * size; + tbuf += amount * size + amount; - for (nr=1; nr<=size; nr++) { + for (nr = 1; nr <= size; nr++) { - for (a=0; a<2; a++) { - for (b=0; b=min && *tbuf= min && *tbuf < max) { //we got a hit if (strict) { - indexok = indextest(handle, *tbuf - min+1); + indexok = indextest(handle, *tbuf - min + 1); if (indexok) { - *dist= (short) sqrt( (float)distance ); - index = *tbuf - min+1; + *dist = (short) sqrt( (float)distance); + index = *tbuf - min + 1; goto exit; } } else { - *dist= (short) sqrt( (float)distance ); // XXX, this distance is wrong - - index = *tbuf - min+1; // messy yah, but indices start at 1 + *dist = (short) sqrt( (float)distance); // XXX, this distance is wrong - + index = *tbuf - min + 1; // messy yah, but indices start at 1 goto exit; } } - tbuf+= (dirvec[rc][0]+dirvec[rc][1]); + tbuf += (dirvec[rc][0] + dirvec[rc][1]); - if (tbuf=bufmax) { + if (tbuf < bufmin || tbuf >= bufmax) { goto exit; } } @@ -1516,98 +1517,98 @@ exit: static void draw_bgpic(Scene *scene, ARegion *ar, View3D *v3d) { - RegionView3D *rv3d= ar->regiondata; + RegionView3D *rv3d = ar->regiondata; BGpic *bgpic; Image *ima; MovieClip *clip; - ImBuf *ibuf= NULL, *freeibuf; + ImBuf *ibuf = NULL, *freeibuf; float vec[4], fac, asp, zoomx, zoomy; float x1, y1, x2, y2, cx, cy; - for ( bgpic= v3d->bgpicbase.first; bgpic; bgpic= bgpic->next ) { + for (bgpic = v3d->bgpicbase.first; bgpic; bgpic = bgpic->next) { - if ( (bgpic->view == 0) || /* zero for any */ - (bgpic->view & (1<view)) || /* check agaist flags */ - (rv3d->persp==RV3D_CAMOB && bgpic->view == (1<view == 0) || /* zero for any */ + (bgpic->view & (1 << rv3d->view)) || /* check agaist flags */ + (rv3d->persp == RV3D_CAMOB && bgpic->view == (1 << RV3D_VIEW_CAMERA))) + { /* disable individual images */ - if ((bgpic->flag&V3D_BGPIC_DISABLED)) + if ((bgpic->flag & V3D_BGPIC_DISABLED)) continue; - freeibuf= NULL; - if (bgpic->source==V3D_BGPIC_IMAGE) { - ima= bgpic->ima; - if (ima==NULL) + freeibuf = NULL; + if (bgpic->source == V3D_BGPIC_IMAGE) { + ima = bgpic->ima; + if (ima == NULL) continue; BKE_image_user_calc_frame(&bgpic->iuser, CFRA, 0); - ibuf= BKE_image_get_ibuf(ima, &bgpic->iuser); + ibuf = BKE_image_get_ibuf(ima, &bgpic->iuser); } else { - clip= NULL; + clip = NULL; - if (bgpic->flag&V3D_BGPIC_CAMERACLIP) { + if (bgpic->flag & V3D_BGPIC_CAMERACLIP) { if (scene->camera) - clip= object_get_movieclip(scene, scene->camera, 1); + clip = object_get_movieclip(scene, scene->camera, 1); } - else clip= bgpic->clip; + else clip = bgpic->clip; - if (clip==NULL) + if (clip == NULL) continue; BKE_movieclip_user_set_frame(&bgpic->cuser, CFRA); - ibuf= BKE_movieclip_get_ibuf(clip, &bgpic->cuser); + ibuf = BKE_movieclip_get_ibuf(clip, &bgpic->cuser); /* working with ibuf from image and clip has got different workflow now. * ibuf acquired from clip is referenced by cache system and should * be dereferenced after usage. */ - freeibuf= ibuf; + freeibuf = ibuf; } - if (ibuf==NULL) + if (ibuf == NULL) continue; - if ((ibuf->rect==NULL && ibuf->rect_float==NULL) || ibuf->channels!=4) { /* invalid image format */ + if ((ibuf->rect == NULL && ibuf->rect_float == NULL) || ibuf->channels != 4) { /* invalid image format */ if (freeibuf) IMB_freeImBuf(freeibuf); continue; } - if (ibuf->rect==NULL) + if (ibuf->rect == NULL) IMB_rect_from_float(ibuf); - if (rv3d->persp==RV3D_CAMOB) { + if (rv3d->persp == RV3D_CAMOB) { rctf vb; ED_view3d_calc_camera_border(scene, ar, v3d, rv3d, &vb, FALSE); - x1= vb.xmin; - y1= vb.ymin; - x2= vb.xmax; - y2= vb.ymax; + x1 = vb.xmin; + y1 = vb.ymin; + x2 = vb.xmax; + y2 = vb.ymax; } else { float sco[2]; - const float mval_f[2]= {1.0f, 0.0f}; + const float mval_f[2] = {1.0f, 0.0f}; /* calc window coord */ initgrabz(rv3d, 0.0, 0.0, 0.0); ED_view3d_win_to_delta(ar, mval_f, vec); - fac= maxf(fabsf(vec[0]), maxf(fabsf(vec[1]), fabsf(vec[2]))); /* largest abs axis */ - fac= 1.0f/fac; + fac = maxf(fabsf(vec[0]), maxf(fabsf(vec[1]), fabsf(vec[2]))); /* largest abs axis */ + fac = 1.0f / fac; - asp= ( (float)ibuf->y)/(float)ibuf->x; + asp = ( (float)ibuf->y) / (float)ibuf->x; zero_v3(vec); ED_view3d_project_float_v2(ar, vec, sco, rv3d->persmat); cx = sco[0]; cy = sco[1]; - x1= cx+ fac*(bgpic->xof-bgpic->size); - y1= cy+ asp*fac*(bgpic->yof-bgpic->size); - x2= cx+ fac*(bgpic->xof+bgpic->size); - y2= cy+ asp*fac*(bgpic->yof+bgpic->size); + x1 = cx + fac * (bgpic->xof - bgpic->size); + y1 = cy + asp * fac * (bgpic->yof - bgpic->size); + x2 = cx + fac * (bgpic->xof + bgpic->size); + y2 = cy + asp * fac * (bgpic->yof + bgpic->size); } /* complete clip? */ @@ -1619,29 +1620,29 @@ static void draw_bgpic(Scene *scene, ARegion *ar, View3D *v3d) continue; } - zoomx= (x2-x1)/ibuf->x; - zoomy= (y2-y1)/ibuf->y; + zoomx = (x2 - x1) / ibuf->x; + zoomy = (y2 - y1) / ibuf->y; /* for some reason; zoomlevels down refuses to use GL_ALPHA_SCALE */ if (zoomx < 1.0f || zoomy < 1.0f) { - float tzoom= MIN2(zoomx, zoomy); - int mip= 0; + float tzoom = MIN2(zoomx, zoomy); + int mip = 0; - if ((ibuf->userflags&IB_MIPMAP_INVALID) != 0) { + if ((ibuf->userflags & IB_MIPMAP_INVALID) != 0) { IMB_remakemipmap(ibuf, 0); - ibuf->userflags&= ~IB_MIPMAP_INVALID; + ibuf->userflags &= ~IB_MIPMAP_INVALID; } - else if (ibuf->mipmap[0]==NULL) + else if (ibuf->mipmap[0] == NULL) IMB_makemipmap(ibuf, 0); - while (tzoom < 1.0f && mip<8 && ibuf->mipmap[mip]) { - tzoom*= 2.0f; - zoomx*= 2.0f; - zoomy*= 2.0f; + while (tzoom < 1.0f && mip < 8 && ibuf->mipmap[mip]) { + tzoom *= 2.0f; + zoomx *= 2.0f; + zoomy *= 2.0f; mip++; } - if (mip>0) - ibuf= ibuf->mipmap[mip-1]; + if (mip > 0) + ibuf = ibuf->mipmap[mip - 1]; } if (v3d->zbuf) glDisable(GL_DEPTH_TEST); @@ -1657,7 +1658,7 @@ static void draw_bgpic(Scene *scene, ARegion *ar, View3D *v3d) ED_region_pixelspace(ar); glPixelZoom(zoomx, zoomy); - glColor4f(1.0f, 1.0f, 1.0f, 1.0f-bgpic->blend); + glColor4f(1.0f, 1.0f, 1.0f, 1.0f - bgpic->blend); glaDrawPixelsTex(x1, y1, ibuf->x, ibuf->y, GL_UNSIGNED_BYTE, ibuf->rect); glPixelZoom(1.0, 1.0); @@ -1690,10 +1691,10 @@ typedef struct View3DAfter { /* temp storage of Objects that need to be drawn as last */ void add_view3d_after(ListBase *lb, Base *base, int flag) { - View3DAfter *v3da= MEM_callocN(sizeof(View3DAfter), "View 3d after"); + View3DAfter *v3da = MEM_callocN(sizeof(View3DAfter), "View 3d after"); BLI_addtail(lb, v3da); - v3da->base= base; - v3da->flag= flag; + v3da->base = base; + v3da->flag = flag; } /* disables write in zbuffer and draws it over */ @@ -1702,15 +1703,15 @@ static void view3d_draw_transp(Scene *scene, ARegion *ar, View3D *v3d) View3DAfter *v3da, *next; glDepthMask(0); - v3d->transp= TRUE; + v3d->transp = TRUE; - for (v3da= v3d->afterdraw_transp.first; v3da; v3da= next) { - next= v3da->next; + for (v3da = v3d->afterdraw_transp.first; v3da; v3da = next) { + next = v3da->next; draw_object(scene, ar, v3d, v3da->base, v3da->flag); BLI_remlink(&v3d->afterdraw_transp, v3da); MEM_freeN(v3da); } - v3d->transp= FALSE; + v3d->transp = FALSE; glDepthMask(1); @@ -1724,14 +1725,14 @@ static void view3d_draw_xray(Scene *scene, ARegion *ar, View3D *v3d, int clear) if (clear && v3d->zbuf) glClear(GL_DEPTH_BUFFER_BIT); - v3d->xray= TRUE; - for (v3da= v3d->afterdraw_xray.first; v3da; v3da= next) { - next= v3da->next; + v3d->xray = TRUE; + for (v3da = v3d->afterdraw_xray.first; v3da; v3da = next) { + next = v3da->next; draw_object(scene, ar, v3d, v3da->base, v3da->flag); BLI_remlink(&v3d->afterdraw_xray, v3da); MEM_freeN(v3da); } - v3d->xray= FALSE; + v3d->xray = FALSE; } @@ -1743,18 +1744,18 @@ static void view3d_draw_xraytransp(Scene *scene, ARegion *ar, View3D *v3d, int c if (clear && v3d->zbuf) glClear(GL_DEPTH_BUFFER_BIT); - v3d->xray= TRUE; - v3d->transp= TRUE; + v3d->xray = TRUE; + v3d->transp = TRUE; - for (v3da= v3d->afterdraw_xraytransp.first; v3da; v3da= next) { - next= v3da->next; + for (v3da = v3d->afterdraw_xraytransp.first; v3da; v3da = next) { + next = v3da->next; draw_object(scene, ar, v3d, v3da->base, v3da->flag); BLI_remlink(&v3d->afterdraw_xraytransp, v3da); MEM_freeN(v3da); } - v3d->transp= FALSE; - v3d->xray= FALSE; + v3d->transp = FALSE; + v3d->xray = FALSE; } @@ -1769,11 +1770,11 @@ static void view3d_draw_xraytransp(Scene *scene, ARegion *ar, View3D *v3d, int c #if 0 int dupli_ob_sort(void *arg1, void *arg2) { - void *p1= ((DupliObject *)arg1)->ob; - void *p2= ((DupliObject *)arg2)->ob; + void *p1 = ((DupliObject *)arg1)->ob; + void *p2 = ((DupliObject *)arg2)->ob; int val = 0; - if (p1 < p2) val = -1; - else if (p1 > p2) val = 1; + if (p1 < p2) val = -1; + else if (p1 > p2) val = 1; return val; } #endif @@ -1782,40 +1783,40 @@ int dupli_ob_sort(void *arg1, void *arg2) static DupliObject *dupli_step(DupliObject *dob) { while (dob && dob->no_draw) - dob= dob->next; + dob = dob->next; return dob; } static void draw_dupli_objects_color(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int color) { - RegionView3D *rv3d= ar->regiondata; + RegionView3D *rv3d = ar->regiondata; ListBase *lb; - DupliObject *dob_prev= NULL, *dob, *dob_next= NULL; + DupliObject *dob_prev = NULL, *dob, *dob_next = NULL; Base tbase; BoundBox bb, *bb_tmp; /* use a copy because draw_object, calls clear_mesh_caches */ - GLuint displist=0; - short transflag, use_displist= -1; /* -1 is initialize */ + GLuint displist = 0; + short transflag, use_displist = -1; /* -1 is initialize */ char dt, dtx; if (base->object->restrictflag & OB_RESTRICT_VIEW) return; - tbase.flag= OB_FROMDUPLI|base->flag; - lb= object_duplilist(scene, base->object); + tbase.flag = OB_FROMDUPLI | base->flag; + lb = object_duplilist(scene, base->object); // BLI_sortlist(lb, dupli_ob_sort); // might be nice to have if we have a dupli list with mixed objects. - dob=dupli_step(lb->first); - if (dob) dob_next= dupli_step(dob->next); + dob = dupli_step(lb->first); + if (dob) dob_next = dupli_step(dob->next); - for ( ; dob ; dob_prev= dob, dob= dob_next, dob_next= dob_next ? dupli_step(dob_next->next) : NULL) { - tbase.object= dob->ob; + for (; dob; dob_prev = dob, dob = dob_next, dob_next = dob_next ? dupli_step(dob_next->next) : NULL) { + tbase.object = dob->ob; /* extra service: draw the duplicator in drawtype of parent */ /* MIN2 for the drawtype to allow bounding box objects in groups for lods */ - dt= tbase.object->dt; tbase.object->dt= MIN2(tbase.object->dt, base->object->dt); - dtx= tbase.object->dtx; tbase.object->dtx= base->object->dtx; + dt = tbase.object->dt; tbase.object->dt = MIN2(tbase.object->dt, base->object->dt); + dtx = tbase.object->dtx; tbase.object->dtx = base->object->dtx; /* negative scale flag has to propagate */ - transflag= tbase.object->transflag; + transflag = tbase.object->transflag; if (base->object->transflag & OB_NEG_SCALE) tbase.object->transflag ^= OB_NEG_SCALE; @@ -1823,10 +1824,10 @@ static void draw_dupli_objects_color(Scene *scene, ARegion *ar, View3D *v3d, Bas /* generate displist, test for new object */ if (dob_prev && dob_prev->ob != dob->ob) { - if (use_displist==1) + if (use_displist == 1) glDeleteLists(displist, 1); - use_displist= -1; + use_displist = -1; } /* generate displist */ @@ -1837,31 +1838,31 @@ static void draw_dupli_objects_color(Scene *scene, ARegion *ar, View3D *v3d, Bas * offset feature (used in group-duplicate.blend but no longer works in 2.5) * so for now it should be ok to - campbell */ - if ( /* if this is the last no need to make a displist */ - (dob_next==NULL || dob_next->ob != dob->ob) || - /* lamp drawing messes with matrices, could be handled smarter... but this works */ - (dob->ob->type == OB_LAMP) || - (dob->type == OB_DUPLIGROUP && dob->animated) || - !(bb_tmp= object_get_boundbox(dob->ob))) + if (/* if this is the last no need to make a displist */ + (dob_next == NULL || dob_next->ob != dob->ob) || + /* lamp drawing messes with matrices, could be handled smarter... but this works */ + (dob->ob->type == OB_LAMP) || + (dob->type == OB_DUPLIGROUP && dob->animated) || + !(bb_tmp = object_get_boundbox(dob->ob))) { // printf("draw_dupli_objects_color: skipping displist for %s\n", dob->ob->id.name+2); - use_displist= 0; + use_displist = 0; } else { // printf("draw_dupli_objects_color: using displist for %s\n", dob->ob->id.name+2); - bb= *bb_tmp; /* must make a copy */ + bb = *bb_tmp; /* must make a copy */ /* disable boundbox check for list creation */ object_boundbox_flag(dob->ob, OB_BB_DISABLED, 1); /* need this for next part of code */ - unit_m4(dob->ob->obmat); /* obmat gets restored */ + unit_m4(dob->ob->obmat); /* obmat gets restored */ - displist= glGenLists(1); + displist = glGenLists(1); glNewList(displist, GL_COMPILE); draw_object(scene, ar, v3d, &tbase, DRAW_CONSTCOLOR); glEndList(); - use_displist= 1; + use_displist = 1; object_boundbox_flag(dob->ob, OB_BB_DISABLED, 0); } } @@ -1876,14 +1877,14 @@ static void draw_dupli_objects_color(Scene *scene, ARegion *ar, View3D *v3d, Bas draw_object(scene, ar, v3d, &tbase, DRAW_CONSTCOLOR); } - tbase.object->dt= dt; - tbase.object->dtx= dtx; - tbase.object->transflag= transflag; + tbase.object->dt = dt; + tbase.object->dtx = dtx; + tbase.object->transflag = transflag; } /* Transp afterdraw disabled, afterdraw only stores base pointers, and duplis can be same obj */ - free_object_duplilist(lb); /* does restore */ + free_object_duplilist(lb); /* does restore */ if (use_displist) glDeleteLists(displist, 1); @@ -1894,10 +1895,10 @@ static void draw_dupli_objects(Scene *scene, ARegion *ar, View3D *v3d, Base *bas /* define the color here so draw_dupli_objects_color can be called * from the set loop */ - int color= (base->flag & SELECT)?TH_SELECT:TH_WIRE; + int color = (base->flag & SELECT) ? TH_SELECT : TH_WIRE; /* debug */ - if (base->object->dup_group && base->object->dup_group->id.us<1) - color= TH_REDALERT; + if (base->object->dup_group && base->object->dup_group->id.us < 1) + color = TH_REDALERT; draw_dupli_objects_color(scene, ar, v3d, base, color); } @@ -1909,80 +1910,82 @@ void view3d_update_depths_rect(ARegion *ar, ViewDepths *d, rcti *rect) /* clamp rect by area */ r.xmin = 0; - r.xmax = ar->winx-1; + r.xmax = ar->winx - 1; r.ymin = 0; - r.ymax = ar->winy-1; + r.ymax = ar->winy - 1; /* Constrain rect to depth bounds */ BLI_isect_rcti(&r, rect, rect); /* assign values to compare with the ViewDepths */ - x= rect->xmin; - y= rect->ymin; + x = rect->xmin; + y = rect->ymin; - w= rect->xmax - rect->xmin; - h= rect->ymax - rect->ymin; + w = rect->xmax - rect->xmin; + h = rect->ymax - rect->ymin; if (w <= 0 || h <= 0) { if (d->depths) MEM_freeN(d->depths); - d->depths= NULL; + d->depths = NULL; - d->damaged= FALSE; + d->damaged = FALSE; } - else if ( d->w != w || - d->h != h || - d->x != x || - d->y != y || - d->depths==NULL - ) { - d->x= x; - d->y= y; - d->w= w; - d->h= h; + else if (d->w != w || + d->h != h || + d->x != x || + d->y != y || + d->depths == NULL + ) + { + d->x = x; + d->y = y; + d->w = w; + d->h = h; if (d->depths) MEM_freeN(d->depths); - d->depths= MEM_mallocN(sizeof(float)*d->w*d->h,"View depths Subset"); + d->depths = MEM_mallocN(sizeof(float) * d->w * d->h, "View depths Subset"); - d->damaged= TRUE; + d->damaged = TRUE; } if (d->damaged) { - glReadPixels(ar->winrct.xmin+d->x,ar->winrct.ymin+d->y, d->w,d->h, GL_DEPTH_COMPONENT,GL_FLOAT, d->depths); - glGetDoublev(GL_DEPTH_RANGE,d->depth_range); - d->damaged= FALSE; + glReadPixels(ar->winrct.xmin + d->x, ar->winrct.ymin + d->y, d->w, d->h, GL_DEPTH_COMPONENT, GL_FLOAT, d->depths); + glGetDoublev(GL_DEPTH_RANGE, d->depth_range); + d->damaged = FALSE; } } /* note, with nouveau drivers the glReadPixels() is very slow. [#24339] */ void ED_view3d_depth_update(ARegion *ar) { - RegionView3D *rv3d= ar->regiondata; + RegionView3D *rv3d = ar->regiondata; /* Create storage for, and, if necessary, copy depth buffer */ - if (!rv3d->depths) rv3d->depths= MEM_callocN(sizeof(ViewDepths),"ViewDepths"); + if (!rv3d->depths) rv3d->depths = MEM_callocN(sizeof(ViewDepths), "ViewDepths"); if (rv3d->depths) { - ViewDepths *d= rv3d->depths; + ViewDepths *d = rv3d->depths; if (d->w != ar->winx || - d->h != ar->winy || - !d->depths) { - d->w= ar->winx; - d->h= ar->winy; + d->h != ar->winy || + !d->depths) + { + d->w = ar->winx; + d->h = ar->winy; if (d->depths) MEM_freeN(d->depths); - d->depths= MEM_mallocN(sizeof(float)*d->w*d->h,"View depths"); - d->damaged= 1; + d->depths = MEM_mallocN(sizeof(float) * d->w * d->h, "View depths"); + d->damaged = 1; } if (d->damaged) { - glReadPixels(ar->winrct.xmin,ar->winrct.ymin,d->w,d->h, - GL_DEPTH_COMPONENT,GL_FLOAT, d->depths); + glReadPixels(ar->winrct.xmin, ar->winrct.ymin, d->w, d->h, + GL_DEPTH_COMPONENT, GL_FLOAT, d->depths); - glGetDoublev(GL_DEPTH_RANGE,d->depth_range); + glGetDoublev(GL_DEPTH_RANGE, d->depth_range); - d->damaged= 0; + d->damaged = 0; } } } @@ -1991,20 +1994,20 @@ void ED_view3d_depth_update(ARegion *ar) float view3d_depth_near(ViewDepths *d) { /* convert to float for comparisons */ - const float near= (float)d->depth_range[0]; - const float far_real= (float)d->depth_range[1]; - float far= far_real; + const float near = (float)d->depth_range[0]; + const float far_real = (float)d->depth_range[1]; + float far = far_real; - const float *depths= d->depths; - float depth= FLT_MAX; - int i= (int)d->w * (int)d->h; /* cast to avoid short overflow */ + const float *depths = d->depths; + float depth = FLT_MAX; + int i = (int)d->w * (int)d->h; /* cast to avoid short overflow */ /* far is both the starting 'far' value * and the closest value found. */ while (i--) { - depth= *depths++; + depth = *depths++; if ((depth < far) && (depth > near)) { - far= depth; + far = depth; } } @@ -2013,11 +2016,11 @@ float view3d_depth_near(ViewDepths *d) void draw_depth_gpencil(Scene *scene, ARegion *ar, View3D *v3d) { - short zbuf= v3d->zbuf; - RegionView3D *rv3d= ar->regiondata; + short zbuf = v3d->zbuf; + RegionView3D *rv3d = ar->regiondata; - setwinmatrixview3d(ar, v3d, NULL); /* 0= no pick rect */ - setviewmatrixview3d(scene, v3d, rv3d); /* note: calls where_is_object for camera... */ + setwinmatrixview3d(ar, v3d, NULL); /* 0= no pick rect */ + setviewmatrixview3d(scene, v3d, rv3d); /* note: calls where_is_object for camera... */ mult_m4_m4m4(rv3d->persmat, rv3d->winmat, rv3d->viewmat); invert_m4_m4(rv3d->persinv, rv3d->persmat); @@ -2027,32 +2030,32 @@ void draw_depth_gpencil(Scene *scene, ARegion *ar, View3D *v3d) glLoadMatrixf(rv3d->viewmat); - v3d->zbuf= TRUE; + v3d->zbuf = TRUE; glEnable(GL_DEPTH_TEST); draw_gpencil_view3d(scene, v3d, ar, 1); - v3d->zbuf= zbuf; + v3d->zbuf = zbuf; } -void draw_depth(Scene *scene, ARegion *ar, View3D *v3d, int (* func)(void *)) +void draw_depth(Scene *scene, ARegion *ar, View3D *v3d, int (*func)(void *)) { - RegionView3D *rv3d= ar->regiondata; + RegionView3D *rv3d = ar->regiondata; Base *base; - short zbuf= v3d->zbuf; - short flag= v3d->flag; - float glalphaclip= U.glalphaclip; - int obcenter_dia= U.obcenter_dia; + short zbuf = v3d->zbuf; + short flag = v3d->flag; + float glalphaclip = U.glalphaclip; + int obcenter_dia = U.obcenter_dia; /* temp set drawtype to solid */ /* Setting these temporarily is not nice */ v3d->flag &= ~V3D_SELECT_OUTLINE; U.glalphaclip = 0.5; /* not that nice but means we wont zoom into billboards */ - U.obcenter_dia= 0; + U.obcenter_dia = 0; - setwinmatrixview3d(ar, v3d, NULL); /* 0= no pick rect */ - setviewmatrixview3d(scene, v3d, rv3d); /* note: calls where_is_object for camera... */ + setwinmatrixview3d(ar, v3d, NULL); /* 0= no pick rect */ + setviewmatrixview3d(scene, v3d, rv3d); /* note: calls where_is_object for camera... */ mult_m4_m4m4(rv3d->persmat, rv3d->winmat, rv3d->viewmat); invert_m4_m4(rv3d->persinv, rv3d->persmat); @@ -2067,7 +2070,7 @@ void draw_depth(Scene *scene, ARegion *ar, View3D *v3d, int (* func)(void *)) ED_view3d_clipping_set(rv3d); } - v3d->zbuf= TRUE; + v3d->zbuf = TRUE; glEnable(GL_DEPTH_TEST); /* draw set first */ @@ -2085,7 +2088,7 @@ void draw_depth(Scene *scene, ARegion *ar, View3D *v3d, int (* func)(void *)) } } - for (base= scene->base.first; base; base= base->next) { + for (base = scene->base.first; base; base = base->next) { if (v3d->lay & base->lay) { if (func == NULL || func(base)) { /* dupli drawing */ @@ -2098,14 +2101,14 @@ void draw_depth(Scene *scene, ARegion *ar, View3D *v3d, int (* func)(void *)) } /* this isn't that nice, draw xray objects as if they are normal */ - if ( v3d->afterdraw_transp.first || - v3d->afterdraw_xray.first || - v3d->afterdraw_xraytransp.first - ) { + if (v3d->afterdraw_transp.first || + v3d->afterdraw_xray.first || + v3d->afterdraw_xraytransp.first) + { View3DAfter *v3da, *next; int mask_orig; - v3d->xray= TRUE; + v3d->xray = TRUE; /* transp materials can change the depth mask, see #21388 */ glGetIntegerv(GL_DEPTH_WRITEMASK, &mask_orig); @@ -2113,44 +2116,44 @@ void draw_depth(Scene *scene, ARegion *ar, View3D *v3d, int (* func)(void *)) if (v3d->afterdraw_xray.first || v3d->afterdraw_xraytransp.first) { glDepthFunc(GL_ALWAYS); /* always write into the depth bufer, overwriting front z values */ - for (v3da= v3d->afterdraw_xray.first; v3da; v3da= next) { - next= v3da->next; + for (v3da = v3d->afterdraw_xray.first; v3da; v3da = next) { + next = v3da->next; draw_object(scene, ar, v3d, v3da->base, 0); } glDepthFunc(GL_LEQUAL); /* Now write the depth buffer normally */ } /* draw 3 passes, transp/xray/xraytransp */ - v3d->xray= FALSE; - v3d->transp= TRUE; - for (v3da= v3d->afterdraw_transp.first; v3da; v3da= next) { - next= v3da->next; + v3d->xray = FALSE; + v3d->transp = TRUE; + for (v3da = v3d->afterdraw_transp.first; v3da; v3da = next) { + next = v3da->next; draw_object(scene, ar, v3d, v3da->base, 0); BLI_remlink(&v3d->afterdraw_transp, v3da); MEM_freeN(v3da); } - v3d->xray= TRUE; - v3d->transp= FALSE; - for (v3da= v3d->afterdraw_xray.first; v3da; v3da= next) { - next= v3da->next; + v3d->xray = TRUE; + v3d->transp = FALSE; + for (v3da = v3d->afterdraw_xray.first; v3da; v3da = next) { + next = v3da->next; draw_object(scene, ar, v3d, v3da->base, 0); BLI_remlink(&v3d->afterdraw_xray, v3da); MEM_freeN(v3da); } - v3d->xray= TRUE; - v3d->transp= TRUE; - for (v3da= v3d->afterdraw_xraytransp.first; v3da; v3da= next) { - next= v3da->next; + v3d->xray = TRUE; + v3d->transp = TRUE; + for (v3da = v3d->afterdraw_xraytransp.first; v3da; v3da = next) { + next = v3da->next; draw_object(scene, ar, v3d, v3da->base, 0); BLI_remlink(&v3d->afterdraw_xraytransp, v3da); MEM_freeN(v3da); } - v3d->xray= FALSE; - v3d->transp= FALSE; + v3d->xray = FALSE; + v3d->transp = FALSE; glDepthMask(mask_orig); } @@ -2163,7 +2166,7 @@ void draw_depth(Scene *scene, ARegion *ar, View3D *v3d, int (* func)(void *)) U.glalphaclip = glalphaclip; v3d->flag = flag; - U.obcenter_dia= obcenter_dia; + U.obcenter_dia = obcenter_dia; } typedef struct View3DShadow { @@ -2175,7 +2178,7 @@ static void gpu_render_lamp_update(Scene *scene, View3D *v3d, Object *ob, Object float obmat[][4], ListBase *shadows) { GPULamp *lamp; - Lamp *la = (Lamp*)ob->data; + Lamp *la = (Lamp *)ob->data; View3DShadow *shadow; lamp = GPU_lamp_from_blender(scene, ob, par); @@ -2185,7 +2188,7 @@ static void gpu_render_lamp_update(Scene *scene, View3D *v3d, Object *ob, Object GPU_lamp_update_colors(lamp, la->r, la->g, la->b, la->energy); if ((ob->lay & v3d->lay) && GPU_lamp_has_shadow_buffer(lamp)) { - shadow= MEM_callocN(sizeof(View3DShadow), "View3DShadow"); + shadow = MEM_callocN(sizeof(View3DShadow), "View3DShadow"); shadow->lamp = lamp; BLI_addtail(shadows, shadow); } @@ -2200,11 +2203,11 @@ static void gpu_update_lamps_shadows(Scene *scene, View3D *v3d) Base *base; Object *ob; - shadows.first= shadows.last= NULL; + shadows.first = shadows.last = NULL; /* update lamp transform and gather shadow lamps */ for (SETLOOPER(scene, sce_iter, base)) { - ob= base->object; + ob = base->object; if (ob->type == OB_LAMP) gpu_render_lamp_update(scene, v3d, ob, NULL, ob->obmat, &shadows); @@ -2213,8 +2216,8 @@ static void gpu_update_lamps_shadows(Scene *scene, View3D *v3d) DupliObject *dob; ListBase *lb = object_duplilist(scene, ob); - for (dob=lb->first; dob; dob=dob->next) - if (dob->ob->type==OB_LAMP) + for (dob = lb->first; dob; dob = dob->next) + if (dob->ob->type == OB_LAMP) gpu_render_lamp_update(scene, v3d, dob->ob, ob, dob->mat, &shadows); free_object_duplilist(lb); @@ -2223,15 +2226,15 @@ static void gpu_update_lamps_shadows(Scene *scene, View3D *v3d) /* render shadows after updating all lamps, nested object_duplilist * don't work correct since it's replacing object matrices */ - for (shadow=shadows.first; shadow; shadow=shadow->next) { + for (shadow = shadows.first; shadow; shadow = shadow->next) { /* this needs to be done better .. */ float viewmat[4][4], winmat[4][4]; - int drawtype, lay, winsize, flag2=v3d->flag2; - ARegion ar= {NULL}; - RegionView3D rv3d= {{{0}}}; + int drawtype, lay, winsize, flag2 = v3d->flag2; + ARegion ar = {NULL}; + RegionView3D rv3d = {{{0}}}; - drawtype= v3d->drawtype; - lay= v3d->lay; + drawtype = v3d->drawtype; + lay = v3d->lay; v3d->drawtype = OB_SOLID; v3d->lay &= GPU_lamp_shadow_layer(shadow->lamp); @@ -2240,9 +2243,9 @@ static void gpu_update_lamps_shadows(Scene *scene, View3D *v3d) GPU_lamp_shadow_buffer_bind(shadow->lamp, viewmat, &winsize, winmat); - ar.regiondata= &rv3d; - ar.regiontype= RGN_TYPE_WINDOW; - rv3d.persp= RV3D_CAMOB; + ar.regiondata = &rv3d; + ar.regiontype = RGN_TYPE_WINDOW; + rv3d.persp = RV3D_CAMOB; copy_m4_m4(rv3d.winmat, winmat); copy_m4_m4(rv3d.viewmat, viewmat); invert_m4_m4(rv3d.viewinv, rv3d.viewmat); @@ -2252,8 +2255,8 @@ static void gpu_update_lamps_shadows(Scene *scene, View3D *v3d) ED_view3d_draw_offscreen(scene, v3d, &ar, winsize, winsize, viewmat, winmat, FALSE); GPU_lamp_shadow_buffer_unbind(shadow->lamp); - v3d->drawtype= drawtype; - v3d->lay= lay; + v3d->drawtype = drawtype; + v3d->lay = lay; v3d->flag2 = flag2; } @@ -2264,10 +2267,10 @@ static void gpu_update_lamps_shadows(Scene *scene, View3D *v3d) CustomDataMask ED_view3d_datamask(Scene *scene, View3D *v3d) { - CustomDataMask mask= 0; + CustomDataMask mask = 0; - if ( ELEM(v3d->drawtype, OB_TEXTURE, OB_MATERIAL) || - ((v3d->drawtype == OB_SOLID) && (v3d->flag2 & V3D_SOLID_TEX))) + if (ELEM(v3d->drawtype, OB_TEXTURE, OB_MATERIAL) || + ((v3d->drawtype == OB_SOLID) && (v3d->flag2 & V3D_SOLID_TEX))) { mask |= CD_MASK_MTFACE | CD_MASK_MCOL; @@ -2286,8 +2289,8 @@ CustomDataMask ED_view3d_datamask(Scene *scene, View3D *v3d) CustomDataMask ED_view3d_object_datamask(Scene *scene) { - Object *ob= scene->basact ? scene->basact->object : NULL; - CustomDataMask mask= 0; + Object *ob = scene->basact ? scene->basact->object : NULL; + CustomDataMask mask = 0; if (ob) { /* check if we need tfaces & mcols due to face select or texture paint */ @@ -2311,7 +2314,7 @@ CustomDataMask ED_view3d_object_datamask(Scene *scene) /* goes over all modes and view3d settings */ CustomDataMask ED_view3d_screen_datamask(bScreen *screen) { - Scene *scene= screen->scene; + Scene *scene = screen->scene; CustomDataMask mask = CD_MASK_BAREMESH; ScrArea *sa; @@ -2335,13 +2338,13 @@ void ED_view3d_update_viewmat(Scene *scene, View3D *v3d, ARegion *ar, float view if (winmat) copy_m4_m4(rv3d->winmat, winmat); else - setwinmatrixview3d(ar, v3d, NULL); /* NULL= no pickrect */ + setwinmatrixview3d(ar, v3d, NULL); /* NULL= no pickrect */ /* setup view matrix */ if (viewmat) copy_m4_m4(rv3d->viewmat, viewmat); else - setviewmatrixview3d(scene, v3d, rv3d); /* note: calls where_is_object for camera... */ + setviewmatrixview3d(scene, v3d, rv3d); /* note: calls where_is_object for camera... */ /* update utilitity matrices */ mult_m4_m4m4(rv3d->persmat, rv3d->winmat, rv3d->viewmat); @@ -2355,16 +2358,16 @@ void ED_view3d_update_viewmat(Scene *scene, View3D *v3d, ARegion *ar, float view float v1[3], v2[3]; float len1, len2; - v1[0]= rv3d->persmat[0][0]; - v1[1]= rv3d->persmat[1][0]; - v1[2]= rv3d->persmat[2][0]; + v1[0] = rv3d->persmat[0][0]; + v1[1] = rv3d->persmat[1][0]; + v1[2] = rv3d->persmat[2][0]; - v2[0]= rv3d->persmat[0][1]; - v2[1]= rv3d->persmat[1][1]; - v2[2]= rv3d->persmat[2][1]; + v2[0] = rv3d->persmat[0][1]; + v2[1] = rv3d->persmat[1][1]; + v2[2] = rv3d->persmat[2][1]; - len1= 1.0f / len_v3(v1); - len2= 1.0f / len_v3(v2); + len1 = 1.0f / len_v3(v1); + len2 = 1.0f / len_v3(v2); rv3d->pixsize = (2.0f * MAX2(len1, len2)) / (float)MAX2(ar->winx, ar->winy); } @@ -2387,7 +2390,7 @@ void ED_view3d_draw_offscreen(Scene *scene, View3D *v3d, ARegion *ar, int winx, int winy, float viewmat[][4], float winmat[][4], int draw_background) { - RegionView3D *rv3d= ar->regiondata; + RegionView3D *rv3d = ar->regiondata; Base *base; float backcol[3]; int bwinx, bwiny; @@ -2397,12 +2400,12 @@ void ED_view3d_draw_offscreen(Scene *scene, View3D *v3d, ARegion *ar, glPushMatrix(); /* set temporary new size */ - bwinx= ar->winx; - bwiny= ar->winy; - brect= ar->winrct; + bwinx = ar->winx; + bwiny = ar->winy; + brect = ar->winrct; - ar->winx= winx; - ar->winy= winy; + ar->winx = winx; + ar->winy = winy; ar->winrct.xmin = 0; ar->winrct.ymin = 0; ar->winrct.xmax = winx; @@ -2421,7 +2424,7 @@ void ED_view3d_draw_offscreen(Scene *scene, View3D *v3d, ARegion *ar, gpu_update_lamps_shadows(scene, v3d); /* if scene has got active clip, use it for render backdrop */ - if (draw_background && scene->clip && rv3d->persp==RV3D_CAMOB && v3d->camera) { + if (draw_background && scene->clip && rv3d->persp == RV3D_CAMOB && v3d->camera) { MovieClipUser user = {0}; BKE_movieclip_user_set_frame(&user, CFRA); @@ -2443,7 +2446,7 @@ void ED_view3d_draw_offscreen(Scene *scene, View3D *v3d, ARegion *ar, } } - glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); if (bg_ibuf) { unsigned char *pixels, *cp, *dst_cp; @@ -2452,9 +2455,9 @@ void ED_view3d_draw_offscreen(Scene *scene, View3D *v3d, ARegion *ar, if (bg_ibuf->rect_float && !bg_ibuf->rect) IMB_rect_from_float(bg_ibuf); - dst_cp = pixels = MEM_callocN(4*sizeof(unsigned char)*bg_ibuf->x*bg_ibuf->y, "draw offscreen clip pixels"); + dst_cp = pixels = MEM_callocN(4 * sizeof(unsigned char) * bg_ibuf->x * bg_ibuf->y, "draw offscreen clip pixels"); cp = (unsigned char *)bg_ibuf->rect; - for (i = 0; i < bg_ibuf->x*bg_ibuf->y; i++, cp += 4, dst_cp += 4) { + for (i = 0; i < bg_ibuf->x * bg_ibuf->y; i++, cp += 4, dst_cp += 4) { dst_cp[0] = cp[0]; dst_cp[1] = cp[1]; dst_cp[2] = cp[2]; @@ -2489,11 +2492,11 @@ void ED_view3d_draw_offscreen(Scene *scene, View3D *v3d, ARegion *ar, /* set zbuffer */ if (v3d->drawtype > OB_WIRE) { - v3d->zbuf= TRUE; + v3d->zbuf = TRUE; glEnable(GL_DEPTH_TEST); } else - v3d->zbuf= FALSE; + v3d->zbuf = FALSE; if (rv3d->rflag & RV3D_CLIPPING) ED_view3d_clipping_set(rv3d); @@ -2504,7 +2507,7 @@ void ED_view3d_draw_offscreen(Scene *scene, View3D *v3d, ARegion *ar, for (SETLOOPER(scene->set, sce_iter, base)) { if (v3d->lay & base->lay) { UI_ThemeColorBlend(TH_WIRE, TH_BACK, 0.6f); - draw_object(scene, ar, v3d, base, DRAW_CONSTCOLOR|DRAW_SCENESET); + draw_object(scene, ar, v3d, base, DRAW_CONSTCOLOR | DRAW_SCENESET); if (base->object->transflag & OB_DUPLI) draw_dupli_objects_color(scene, ar, v3d, base, TH_WIRE); @@ -2513,7 +2516,7 @@ void ED_view3d_draw_offscreen(Scene *scene, View3D *v3d, ARegion *ar, } /* then draw not selected and the duplis, but skip editmode object */ - for (base= scene->base.first; base; base= base->next) { + for (base = scene->base.first; base; base = base->next) { if (v3d->lay & base->lay) { /* dupli drawing */ if (base->object->transflag & OB_DUPLI) @@ -2529,16 +2532,16 @@ void ED_view3d_draw_offscreen(Scene *scene, View3D *v3d, ARegion *ar, if (v3d->zbuf) glEnable(GL_DEPTH_TEST); /* transp and X-ray afterdraw stuff */ - if (v3d->afterdraw_transp.first) view3d_draw_transp(scene, ar, v3d); - if (v3d->afterdraw_xray.first) view3d_draw_xray(scene, ar, v3d, 1); // clears zbuffer if it is used! - if (v3d->afterdraw_xraytransp.first) view3d_draw_xraytransp(scene, ar, v3d, 1); + if (v3d->afterdraw_transp.first) view3d_draw_transp(scene, ar, v3d); + if (v3d->afterdraw_xray.first) view3d_draw_xray(scene, ar, v3d, 1); // clears zbuffer if it is used! + if (v3d->afterdraw_xraytransp.first) view3d_draw_xraytransp(scene, ar, v3d, 1); if (rv3d->rflag & RV3D_CLIPPING) ED_view3d_clipping_disable(); /* cleanup */ if (v3d->zbuf) { - v3d->zbuf= FALSE; + v3d->zbuf = FALSE; glDisable(GL_DEPTH_TEST); } @@ -2552,8 +2555,8 @@ void ED_view3d_draw_offscreen(Scene *scene, View3D *v3d, ARegion *ar, GPU_free_images_anim(); /* restore size */ - ar->winx= bwinx; - ar->winy= bwiny; + ar->winx = bwinx; + ar->winy = bwiny; ar->winrct = brect; glPopMatrix(); @@ -2568,7 +2571,7 @@ void ED_view3d_draw_offscreen(Scene *scene, View3D *v3d, ARegion *ar, ImBuf *ED_view3d_draw_offscreen_imbuf(Scene *scene, View3D *v3d, ARegion *ar, int sizex, int sizey, unsigned int flag, int draw_background, char err_out[256]) { - RegionView3D *rv3d= ar->regiondata; + RegionView3D *rv3d = ar->regiondata; ImBuf *ibuf; GPUOffScreen *ofs; @@ -2576,14 +2579,14 @@ ImBuf *ED_view3d_draw_offscreen_imbuf(Scene *scene, View3D *v3d, ARegion *ar, glPushAttrib(GL_LIGHTING_BIT); /* bind */ - ofs= GPU_offscreen_create(sizex, sizey, err_out); + ofs = GPU_offscreen_create(sizex, sizey, err_out); if (ofs == NULL) return NULL; GPU_offscreen_bind(ofs); /* render 3d view */ - if (rv3d->persp==RV3D_CAMOB && v3d->camera) { + if (rv3d->persp == RV3D_CAMOB && v3d->camera) { CameraParams params; camera_params_init(¶ms); @@ -2598,7 +2601,7 @@ ImBuf *ED_view3d_draw_offscreen_imbuf(Scene *scene, View3D *v3d, ARegion *ar, } /* read in pixels & stamp */ - ibuf= IMB_allocImBuf(sizex, sizey, 32, flag); + ibuf = IMB_allocImBuf(sizex, sizey, 32, flag); if (ibuf->rect_float) GPU_offscreen_read_pixels(ofs, GL_FLOAT, ibuf->rect_float); @@ -2624,21 +2627,21 @@ ImBuf *ED_view3d_draw_offscreen_imbuf(Scene *scene, View3D *v3d, ARegion *ar, ImBuf *ED_view3d_draw_offscreen_imbuf_simple(Scene *scene, Object *camera, int width, int height, unsigned int flag, int drawtype, int draw_background, char err_out[256]) { - View3D v3d= {NULL}; - ARegion ar= {NULL}; - RegionView3D rv3d= {{{0}}}; + View3D v3d = {NULL}; + ARegion ar = {NULL}; + RegionView3D rv3d = {{{0}}}; /* connect data */ - v3d.regionbase.first= v3d.regionbase.last= &ar; - ar.regiondata= &rv3d; - ar.regiontype= RGN_TYPE_WINDOW; + v3d.regionbase.first = v3d.regionbase.last = &ar; + ar.regiondata = &rv3d; + ar.regiontype = RGN_TYPE_WINDOW; - v3d.camera= camera; - v3d.lay= scene->lay; + v3d.camera = camera; + v3d.lay = scene->lay; v3d.drawtype = drawtype; v3d.flag2 = V3D_RENDER_OVERRIDE; - rv3d.persp= RV3D_CAMOB; + rv3d.persp = RV3D_CAMOB; copy_m4_m4(rv3d.viewinv, v3d.camera->obmat); normalize_m4(rv3d.viewinv); @@ -2653,9 +2656,9 @@ ImBuf *ED_view3d_draw_offscreen_imbuf_simple(Scene *scene, Object *camera, int w camera_params_compute_matrix(¶ms); copy_m4_m4(rv3d.winmat, params.winmat); - v3d.near= params.clipsta; - v3d.far= params.clipend; - v3d.lens= params.lens; + v3d.near = params.clipsta; + v3d.far = params.clipend; + v3d.lens = params.lens; } mult_m4_m4m4(rv3d.persmat, rv3d.winmat, rv3d.viewmat); @@ -2672,7 +2675,7 @@ ImBuf *ED_view3d_draw_offscreen_imbuf_simple(Scene *scene, Object *camera, int w */ static void draw_viewport_fps(Scene *scene, ARegion *ar) { - ScreenFrameRateInfo *fpsi= scene->fps_info; + ScreenFrameRateInfo *fpsi = scene->fps_info; float fps; char printable[16]; int i, tot; @@ -2684,11 +2687,11 @@ static void draw_viewport_fps(Scene *scene, ARegion *ar) #if 0 /* this is too simple, better do an average */ - fps = (float)(1.0/(fpsi->lredrawtime-fpsi->redrawtime)) + fps = (float)(1.0 / (fpsi->lredrawtime - fpsi->redrawtime)) #else - fpsi->redrawtimes_fps[fpsi->redrawtime_index] = (float)(1.0/(fpsi->lredrawtime-fpsi->redrawtime)); + fpsi->redrawtimes_fps[fpsi->redrawtime_index] = (float)(1.0 / (fpsi->lredrawtime - fpsi->redrawtime)); - for (i=0, tot=0, fps=0.0f ; i < REDRAW_FRAME_AVERAGE ; i++) { + for (i = 0, tot = 0, fps = 0.0f; i < REDRAW_FRAME_AVERAGE; i++) { if (fpsi->redrawtimes_fps[i]) { fps += fpsi->redrawtimes_fps[i]; tot++; @@ -2705,44 +2708,44 @@ static void draw_viewport_fps(Scene *scene, ARegion *ar) } #endif - /* is this more then half a frame behind? */ - if (fps+0.5f < (float)(FPS)) { + /* is this more then half a frame behind? */ + if (fps + 0.5f < (float)(FPS)) { UI_ThemeColor(TH_REDALERT); BLI_snprintf(printable, sizeof(printable), "fps: %.2f", fps); } else { UI_ThemeColor(TH_TEXT_HI); - BLI_snprintf(printable, sizeof(printable), "fps: %i", (int)(fps+0.5f)); + BLI_snprintf(printable, sizeof(printable), "fps: %i", (int)(fps + 0.5f)); } - BLF_draw_default_ascii(22, ar->winy-17, 0.0f, printable, sizeof(printable)); + BLF_draw_default_ascii(22, ar->winy - 17, 0.0f, printable, sizeof(printable)); } static int view3d_main_area_draw_engine(const bContext *C, ARegion *ar) { - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); View3D *v3d = CTX_wm_view3d(C); - RegionView3D *rv3d= CTX_wm_region_view3d(C); + RegionView3D *rv3d = CTX_wm_region_view3d(C); RenderEngineType *type; if (!rv3d->render_engine) { - type= RE_engines_find(scene->r.engine); + type = RE_engines_find(scene->r.engine); if (!(type->view_update && type->view_draw)) return 0; - rv3d->render_engine= RE_engine_create(type); + rv3d->render_engine = RE_engine_create(type); type->view_update(rv3d->render_engine, C); } view3d_main_area_setup_view(scene, v3d, ar, NULL, NULL); glClearColor(0.0f, 0.0f, 0.0f, 0.0f); - glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); ED_region_pixelspace(ar); - type= rv3d->render_engine->type; + type = rv3d->render_engine->type; type->view_draw(rv3d->render_engine, C); return 1; @@ -2759,9 +2762,9 @@ static void view3d_main_area_draw_engine_info(RegionView3D *rv3d, ARegion *ar) /* warning: this function has duplicate drawing in ED_view3d_draw_offscreen() */ static void view3d_main_area_draw_objects(const bContext *C, ARegion *ar, const char **grid_unit) { - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); View3D *v3d = CTX_wm_view3d(C); - RegionView3D *rv3d= CTX_wm_region_view3d(C); + RegionView3D *rv3d = CTX_wm_region_view3d(C); Base *base; float backcol[3]; unsigned int lay_used; @@ -2787,7 +2790,7 @@ static void view3d_main_area_draw_objects(const bContext *C, ARegion *ar, const else UI_ThemeClearColor(TH_BACK); - glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); /* setup view matrices */ view3d_main_area_setup_view(scene, v3d, ar, NULL, NULL); @@ -2799,11 +2802,11 @@ static void view3d_main_area_draw_objects(const bContext *C, ARegion *ar, const /* set zbuffer after we draw clipping region */ if (v3d->drawtype > OB_WIRE) { - v3d->zbuf= TRUE; + v3d->zbuf = TRUE; glEnable(GL_DEPTH_TEST); } else - v3d->zbuf= FALSE; + v3d->zbuf = FALSE; /* enables anti-aliasing for 3D view drawing */ #if 0 @@ -2812,26 +2815,26 @@ static void view3d_main_area_draw_objects(const bContext *C, ARegion *ar, const #endif // needs to be done always, gridview is adjusted in drawgrid() now - rv3d->gridview= v3d->grid; + rv3d->gridview = v3d->grid; if ((rv3d->view == RV3D_VIEW_USER) || (rv3d->persp != RV3D_ORTHO)) { - if ((v3d->flag2 & V3D_RENDER_OVERRIDE)==0) { + if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) { drawfloor(scene, v3d, grid_unit); } - if (rv3d->persp==RV3D_CAMOB) { + if (rv3d->persp == RV3D_CAMOB) { if (scene->world) { if (scene->world->mode & WO_STARS) { RE_make_stars(NULL, scene, star_stuff_init_func, star_stuff_vertex_func, - star_stuff_term_func); + star_stuff_term_func); } } - if ((v3d->flag2 & V3D_RENDER_OVERRIDE)==0) { + if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) { if (v3d->flag & V3D_DISPBGPICS) draw_bgpic(scene, ar, v3d); } } } else { - if ((v3d->flag2 & V3D_RENDER_OVERRIDE)==0) { + if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) { ED_region_pixelspace(ar); drawgrid(&scene->unit, ar, v3d, grid_unit); /* XXX make function? replaces persp(1) */ @@ -2857,7 +2860,7 @@ static void view3d_main_area_draw_objects(const bContext *C, ARegion *ar, const if (v3d->lay & base->lay) { UI_ThemeColorBlend(TH_WIRE, TH_BACK, 0.6f); - draw_object(scene, ar, v3d, base, DRAW_CONSTCOLOR|DRAW_SCENESET); + draw_object(scene, ar, v3d, base, DRAW_CONSTCOLOR | DRAW_SCENESET); if (base->object->transflag & OB_DUPLI) { draw_dupli_objects_color(scene, ar, v3d, base, TH_WIRE); @@ -2868,11 +2871,11 @@ static void view3d_main_area_draw_objects(const bContext *C, ARegion *ar, const /* Transp and X-ray afterdraw stuff for sets is done later */ } - lay_used= 0; + lay_used = 0; /* then draw not selected and the duplis, but skip editmode object */ - for (base= scene->base.first; base; base= base->next) { - lay_used |= base->lay & ((1<<20)-1); + for (base = scene->base.first; base; base = base->next) { + lay_used |= base->lay & ((1 << 20) - 1); if (v3d->lay & base->lay) { @@ -2880,8 +2883,8 @@ static void view3d_main_area_draw_objects(const bContext *C, ARegion *ar, const if (base->object->transflag & OB_DUPLI) { draw_dupli_objects(scene, ar, v3d, base); } - if ((base->flag & SELECT)==0) { - if (base->object!=scene->obedit) + if ((base->flag & SELECT) == 0) { + if (base->object != scene->obedit) draw_object(scene, ar, v3d, base, 0); } } @@ -2889,23 +2892,23 @@ static void view3d_main_area_draw_objects(const bContext *C, ARegion *ar, const if (v3d->lay_used != lay_used) { /* happens when loading old files or loading with UI load */ /* find header and force tag redraw */ - ScrArea *sa= CTX_wm_area(C); - ARegion *ar_header= BKE_area_find_region_type(sa, RGN_TYPE_HEADER); + ScrArea *sa = CTX_wm_area(C); + ARegion *ar_header = BKE_area_find_region_type(sa, RGN_TYPE_HEADER); ED_region_tag_redraw(ar_header); /* can be NULL */ - v3d->lay_used= lay_used; + v3d->lay_used = lay_used; } /* draw selected and editmode */ - for (base= scene->base.first; base; base= base->next) { + for (base = scene->base.first; base; base = base->next) { if (v3d->lay & base->lay) { - if (base->object==scene->obedit || ( base->flag & SELECT) ) + if (base->object == scene->obedit || (base->flag & SELECT) ) draw_object(scene, ar, v3d, base, 0); } } // REEB_draw(); - if ((v3d->flag2 & V3D_RENDER_OVERRIDE)==0) { + if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) { /* must be before xray draw which clears the depth buffer */ if (v3d->zbuf) glDisable(GL_DEPTH_TEST); draw_gpencil_view3d(scene, v3d, ar, 1); @@ -2913,9 +2916,9 @@ static void view3d_main_area_draw_objects(const bContext *C, ARegion *ar, const } /* Transp and X-ray afterdraw stuff */ - if (v3d->afterdraw_transp.first) view3d_draw_transp(scene, ar, v3d); - if (v3d->afterdraw_xray.first) view3d_draw_xray(scene, ar, v3d, 1); // clears zbuffer if it is used! - if (v3d->afterdraw_xraytransp.first) view3d_draw_xraytransp(scene, ar, v3d, 1); + if (v3d->afterdraw_transp.first) view3d_draw_transp(scene, ar, v3d); + if (v3d->afterdraw_xray.first) view3d_draw_xray(scene, ar, v3d, 1); // clears zbuffer if it is used! + if (v3d->afterdraw_xraytransp.first) view3d_draw_xraytransp(scene, ar, v3d, 1); ED_region_draw_cb_draw(C, ar, REGION_DRAW_POST_VIEW); @@ -2931,11 +2934,11 @@ static void view3d_main_area_draw_objects(const bContext *C, ARegion *ar, const #endif if (v3d->zbuf) { - v3d->zbuf= FALSE; + v3d->zbuf = FALSE; glDisable(GL_DEPTH_TEST); } - if ((v3d->flag2 & V3D_RENDER_OVERRIDE)==0) { + if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) { BDR_drawSketch(C); } @@ -2947,20 +2950,20 @@ static void view3d_main_area_draw_objects(const bContext *C, ARegion *ar, const static void view3d_main_area_draw_info(const bContext *C, ARegion *ar, const char *grid_unit) { - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); View3D *v3d = CTX_wm_view3d(C); - RegionView3D *rv3d= CTX_wm_region_view3d(C); - bScreen *screen= CTX_wm_screen(C); + RegionView3D *rv3d = CTX_wm_region_view3d(C); + bScreen *screen = CTX_wm_screen(C); Object *ob; - if (rv3d->persp==RV3D_CAMOB) + if (rv3d->persp == RV3D_CAMOB) drawviewborder(scene, ar, v3d); - if ((v3d->flag2 & V3D_RENDER_OVERRIDE)==0) { + if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) { /* draw grease-pencil stuff - needed to get paint-buffer shown too (since it's 2D) */ - // if (v3d->flag2 & V3D_DISPGP) - draw_gpencil_view3d(scene, v3d, ar, 0); + // if (v3d->flag2 & V3D_DISPGP) + draw_gpencil_view3d(scene, v3d, ar, 0); drawcursor(scene, ar, v3d); } @@ -2970,7 +2973,7 @@ static void view3d_main_area_draw_info(const bContext *C, ARegion *ar, const cha else draw_view_icon(rv3d); - ob= OBACT; + ob = OBACT; if (U.uiflag & USER_DRAWVIEWINFO) draw_selected_name(scene, ob); @@ -2987,14 +2990,14 @@ static void view3d_main_area_draw_info(const bContext *C, ARegion *ar, const cha } if (grid_unit) { /* draw below the viewport name */ - char numstr[32]= ""; + char numstr[32] = ""; UI_ThemeColor(TH_TEXT_HI); if (v3d->grid != 1.0f) { BLI_snprintf(numstr, sizeof(numstr), "%s x %.4g", grid_unit, v3d->grid); } - BLF_draw_default_ascii(22, ar->winy-(USER_SHOW_VIEWPORTNAME?40:20), 0.0f, + BLF_draw_default_ascii(22, ar->winy - (USER_SHOW_VIEWPORTNAME ? 40 : 20), 0.0f, numstr[0] ? numstr : grid_unit, sizeof(numstr)); } } @@ -3002,7 +3005,7 @@ static void view3d_main_area_draw_info(const bContext *C, ARegion *ar, const cha void view3d_main_area_draw(const bContext *C, ARegion *ar) { View3D *v3d = CTX_wm_view3d(C); - const char *grid_unit= NULL; + const char *grid_unit = NULL; /* draw viewport using external renderer? */ if (!(v3d->drawtype == OB_RENDER && view3d_main_area_draw_engine(C, ar))) { diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index f8404937f7e..94853927d4e 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -77,7 +77,7 @@ #include "PIL_time.h" /* smoothview */ -#include "view3d_intern.h" // own include +#include "view3d_intern.h" // own include /* ********************** view3d_edit: view manipulations ********************* */ @@ -86,7 +86,7 @@ int ED_view3d_camera_lock_check(View3D *v3d, RegionView3D *rv3d) return ((v3d->camera) && (v3d->camera->id.lib == NULL) && (v3d->flag2 & V3D_LOCK_CAMERA) && - (rv3d->persp==RV3D_CAMOB)); + (rv3d->persp == RV3D_CAMOB)); } void ED_view3d_camera_lock_init(View3D *v3d, RegionView3D *rv3d) @@ -103,14 +103,14 @@ int ED_view3d_camera_lock_sync(View3D *v3d, RegionView3D *rv3d) ObjectTfmProtectedChannels obtfm; Object *root_parent; - if ((U.uiflag & USER_CAM_LOCK_NO_PARENT)==0 && (root_parent= v3d->camera->parent)) { + if ((U.uiflag & USER_CAM_LOCK_NO_PARENT) == 0 && (root_parent = v3d->camera->parent)) { Object *ob_update; float view_mat[4][4]; float diff_mat[4][4]; float parent_mat[4][4]; while (root_parent->parent) { - root_parent= root_parent->parent; + root_parent = root_parent->parent; } ED_view3d_to_m4(view_mat, rv3d->ofs, rv3d->viewquat, rv3d->dist); @@ -124,11 +124,11 @@ int ED_view3d_camera_lock_sync(View3D *v3d, RegionView3D *rv3d) object_apply_mat4(root_parent, parent_mat, TRUE, FALSE); object_tfm_protected_restore(root_parent, &obtfm, root_parent->protectflag); - ob_update= v3d->camera; + ob_update = v3d->camera; while (ob_update) { DAG_id_tag_update(&ob_update->id, OB_RECALC_OB); - WM_main_add_notifier(NC_OBJECT|ND_TRANSFORM, ob_update); - ob_update= ob_update->parent; + WM_main_add_notifier(NC_OBJECT | ND_TRANSFORM, ob_update); + ob_update = ob_update->parent; } } else { @@ -137,7 +137,7 @@ int ED_view3d_camera_lock_sync(View3D *v3d, RegionView3D *rv3d) object_tfm_protected_restore(v3d->camera, &obtfm, v3d->camera->protectflag); DAG_id_tag_update(&v3d->camera->id, OB_RECALC_OB); - WM_main_add_notifier(NC_OBJECT|ND_TRANSFORM, v3d->camera); + WM_main_add_notifier(NC_OBJECT | ND_TRANSFORM, v3d->camera); } return TRUE; @@ -155,73 +155,73 @@ static void view3d_boxview_clip(ScrArea *sa) ARegion *ar; BoundBox *bb = MEM_callocN(sizeof(BoundBox), "clipbb"); float clip[6][4]; - float x1= 0.0f, y1= 0.0f, z1= 0.0f, ofs[3] = {0.0f, 0.0f, 0.0f}; + float x1 = 0.0f, y1 = 0.0f, z1 = 0.0f, ofs[3] = {0.0f, 0.0f, 0.0f}; int val; /* create bounding box */ - for (ar= sa->regionbase.first; ar; ar= ar->next) { - if (ar->regiontype==RGN_TYPE_WINDOW) { - RegionView3D *rv3d= ar->regiondata; + for (ar = sa->regionbase.first; ar; ar = ar->next) { + if (ar->regiontype == RGN_TYPE_WINDOW) { + RegionView3D *rv3d = ar->regiondata; if (rv3d->viewlock & RV3D_BOXCLIP) { if (ELEM(rv3d->view, RV3D_VIEW_TOP, RV3D_VIEW_BOTTOM)) { - if (ar->winx>ar->winy) x1= rv3d->dist; - else x1= ar->winx*rv3d->dist/ar->winy; + if (ar->winx > ar->winy) x1 = rv3d->dist; + else x1 = ar->winx * rv3d->dist / ar->winy; - if (ar->winx>ar->winy) y1= ar->winy*rv3d->dist/ar->winx; - else y1= rv3d->dist; + if (ar->winx > ar->winy) y1 = ar->winy * rv3d->dist / ar->winx; + else y1 = rv3d->dist; copy_v2_v2(ofs, rv3d->ofs); } else if (ELEM(rv3d->view, RV3D_VIEW_FRONT, RV3D_VIEW_BACK)) { - ofs[2]= rv3d->ofs[2]; + ofs[2] = rv3d->ofs[2]; - if (ar->winx>ar->winy) z1= ar->winy*rv3d->dist/ar->winx; - else z1= rv3d->dist; + if (ar->winx > ar->winy) z1 = ar->winy * rv3d->dist / ar->winx; + else z1 = rv3d->dist; } } } } - for (val=0; val<8; val++) { + for (val = 0; val < 8; val++) { if (ELEM4(val, 0, 3, 4, 7)) - bb->vec[val][0]= -x1 - ofs[0]; + bb->vec[val][0] = -x1 - ofs[0]; else - bb->vec[val][0]= x1 - ofs[0]; + bb->vec[val][0] = x1 - ofs[0]; if (ELEM4(val, 0, 1, 4, 5)) - bb->vec[val][1]= -y1 - ofs[1]; + bb->vec[val][1] = -y1 - ofs[1]; else - bb->vec[val][1]= y1 - ofs[1]; + bb->vec[val][1] = y1 - ofs[1]; if (val > 3) - bb->vec[val][2]= -z1 - ofs[2]; + bb->vec[val][2] = -z1 - ofs[2]; else - bb->vec[val][2]= z1 - ofs[2]; + bb->vec[val][2] = z1 - ofs[2]; } /* normals for plane equations */ - normal_tri_v3( clip[0],bb->vec[0], bb->vec[1], bb->vec[4]); - normal_tri_v3( clip[1],bb->vec[1], bb->vec[2], bb->vec[5]); - normal_tri_v3( clip[2],bb->vec[2], bb->vec[3], bb->vec[6]); - normal_tri_v3( clip[3],bb->vec[3], bb->vec[0], bb->vec[7]); - normal_tri_v3( clip[4],bb->vec[4], bb->vec[5], bb->vec[6]); - normal_tri_v3( clip[5],bb->vec[0], bb->vec[2], bb->vec[1]); + normal_tri_v3(clip[0], bb->vec[0], bb->vec[1], bb->vec[4]); + normal_tri_v3(clip[1], bb->vec[1], bb->vec[2], bb->vec[5]); + normal_tri_v3(clip[2], bb->vec[2], bb->vec[3], bb->vec[6]); + normal_tri_v3(clip[3], bb->vec[3], bb->vec[0], bb->vec[7]); + normal_tri_v3(clip[4], bb->vec[4], bb->vec[5], bb->vec[6]); + normal_tri_v3(clip[5], bb->vec[0], bb->vec[2], bb->vec[1]); /* then plane equations */ - for (val=0; val<6; val++) { + for (val = 0; val < 6; val++) { clip[val][3] = -dot_v3v3(clip[val], bb->vec[val % 5]); } /* create bounding box */ - for (ar= sa->regionbase.first; ar; ar= ar->next) { - if (ar->regiontype==RGN_TYPE_WINDOW) { - RegionView3D *rv3d= ar->regiondata; + for (ar = sa->regionbase.first; ar; ar = ar->next) { + if (ar->regiontype == RGN_TYPE_WINDOW) { + RegionView3D *rv3d = ar->regiondata; if (rv3d->viewlock & RV3D_BOXCLIP) { rv3d->rflag |= RV3D_CLIPPING; memcpy(rv3d->clip, clip, sizeof(clip)); if (rv3d->clipbb) MEM_freeN(rv3d->clipbb); - rv3d->clipbb= MEM_dupallocN(bb); + rv3d->clipbb = MEM_dupallocN(bb); } } } @@ -232,33 +232,33 @@ static void view3d_boxview_clip(ScrArea *sa) static void view3d_boxview_sync(ScrArea *sa, ARegion *ar) { ARegion *artest; - RegionView3D *rv3d= ar->regiondata; - short clip= 0; + RegionView3D *rv3d = ar->regiondata; + short clip = 0; - for (artest= sa->regionbase.first; artest; artest= artest->next) { - if (artest!=ar && artest->regiontype==RGN_TYPE_WINDOW) { - RegionView3D *rv3dtest= artest->regiondata; + for (artest = sa->regionbase.first; artest; artest = artest->next) { + if (artest != ar && artest->regiontype == RGN_TYPE_WINDOW) { + RegionView3D *rv3dtest = artest->regiondata; if (rv3dtest->viewlock) { - rv3dtest->dist= rv3d->dist; + rv3dtest->dist = rv3d->dist; - if ( ELEM(rv3d->view, RV3D_VIEW_TOP, RV3D_VIEW_BOTTOM) ) { - if ( ELEM(rv3dtest->view, RV3D_VIEW_FRONT, RV3D_VIEW_BACK)) - rv3dtest->ofs[0]= rv3d->ofs[0]; - else if ( ELEM(rv3dtest->view, RV3D_VIEW_RIGHT, RV3D_VIEW_LEFT)) - rv3dtest->ofs[1]= rv3d->ofs[1]; + if (ELEM(rv3d->view, RV3D_VIEW_TOP, RV3D_VIEW_BOTTOM) ) { + if (ELEM(rv3dtest->view, RV3D_VIEW_FRONT, RV3D_VIEW_BACK)) + rv3dtest->ofs[0] = rv3d->ofs[0]; + else if (ELEM(rv3dtest->view, RV3D_VIEW_RIGHT, RV3D_VIEW_LEFT)) + rv3dtest->ofs[1] = rv3d->ofs[1]; } - else if ( ELEM(rv3d->view, RV3D_VIEW_FRONT, RV3D_VIEW_BACK) ) { - if ( ELEM(rv3dtest->view, RV3D_VIEW_TOP, RV3D_VIEW_BOTTOM)) - rv3dtest->ofs[0]= rv3d->ofs[0]; - else if ( ELEM(rv3dtest->view, RV3D_VIEW_RIGHT, RV3D_VIEW_LEFT)) - rv3dtest->ofs[2]= rv3d->ofs[2]; + else if (ELEM(rv3d->view, RV3D_VIEW_FRONT, RV3D_VIEW_BACK) ) { + if (ELEM(rv3dtest->view, RV3D_VIEW_TOP, RV3D_VIEW_BOTTOM)) + rv3dtest->ofs[0] = rv3d->ofs[0]; + else if (ELEM(rv3dtest->view, RV3D_VIEW_RIGHT, RV3D_VIEW_LEFT)) + rv3dtest->ofs[2] = rv3d->ofs[2]; } - else if ( ELEM(rv3d->view, RV3D_VIEW_RIGHT, RV3D_VIEW_LEFT) ) { - if ( ELEM(rv3dtest->view, RV3D_VIEW_TOP, RV3D_VIEW_BOTTOM)) - rv3dtest->ofs[1]= rv3d->ofs[1]; - if ( ELEM(rv3dtest->view, RV3D_VIEW_FRONT, RV3D_VIEW_BACK)) - rv3dtest->ofs[2]= rv3d->ofs[2]; + else if (ELEM(rv3d->view, RV3D_VIEW_RIGHT, RV3D_VIEW_LEFT) ) { + if (ELEM(rv3dtest->view, RV3D_VIEW_TOP, RV3D_VIEW_BOTTOM)) + rv3dtest->ofs[1] = rv3d->ofs[1]; + if (ELEM(rv3dtest->view, RV3D_VIEW_FRONT, RV3D_VIEW_BACK)) + rv3dtest->ofs[2] = rv3d->ofs[2]; } clip |= rv3dtest->viewlock & RV3D_BOXCLIP; @@ -277,15 +277,15 @@ static void view3d_boxview_sync(ScrArea *sa, ARegion *ar) void view3d_boxview_copy(ScrArea *sa, ARegion *ar) { ARegion *artest; - RegionView3D *rv3d= ar->regiondata; - short clip= 0; + RegionView3D *rv3d = ar->regiondata; + short clip = 0; - for (artest= sa->regionbase.first; artest; artest= artest->next) { - if (artest!=ar && artest->regiontype==RGN_TYPE_WINDOW) { - RegionView3D *rv3dtest= artest->regiondata; + for (artest = sa->regionbase.first; artest; artest = artest->next) { + if (artest != ar && artest->regiontype == RGN_TYPE_WINDOW) { + RegionView3D *rv3dtest = artest->regiondata; if (rv3dtest->viewlock) { - rv3dtest->dist= rv3d->dist; + rv3dtest->dist = rv3d->dist; copy_v3_v3(rv3dtest->ofs, rv3d->ofs); ED_region_tag_redraw(artest); @@ -302,34 +302,34 @@ void view3d_boxview_copy(ScrArea *sa, ARegion *ar) /* 'clip' is used to know if our clip setting has changed */ void ED_view3d_quadview_update(ScrArea *sa, ARegion *ar, short do_clip) { - ARegion *ar_sync= NULL; - RegionView3D *rv3d= ar->regiondata; + ARegion *ar_sync = NULL; + RegionView3D *rv3d = ar->regiondata; short viewlock; /* this function copies flags from the first of the 3 other quadview * regions to the 2 other, so it assumes this is the region whose * properties are always being edited, weak */ - viewlock= rv3d->viewlock; + viewlock = rv3d->viewlock; - if ((viewlock & RV3D_LOCKED)==0) - viewlock= 0; - else if ((viewlock & RV3D_BOXVIEW)==0) { + if ((viewlock & RV3D_LOCKED) == 0) + viewlock = 0; + else if ((viewlock & RV3D_BOXVIEW) == 0) { viewlock &= ~RV3D_BOXCLIP; - do_clip= TRUE; + do_clip = TRUE; } - for (; ar; ar= ar->prev) { - if (ar->alignment==RGN_ALIGN_QSPLIT) { - rv3d= ar->regiondata; - rv3d->viewlock= viewlock; + for (; ar; ar = ar->prev) { + if (ar->alignment == RGN_ALIGN_QSPLIT) { + rv3d = ar->regiondata; + rv3d->viewlock = viewlock; - if (do_clip && (viewlock & RV3D_BOXCLIP)==0) { + if (do_clip && (viewlock & RV3D_BOXCLIP) == 0) { rv3d->rflag &= ~RV3D_BOXCLIP; } /* use ar_sync so we sync with one of the aligned views below * else the view jumps on changing view settings like 'clip' * since it copies from the perspective view */ - ar_sync= ar; + ar_sync = ar; } } @@ -375,54 +375,54 @@ static void calctrackballvec(rcti *rect, int mx, int my, float vec[3]) { float x, y, radius, d, z, t; - radius= TRACKBALLSIZE; + radius = TRACKBALLSIZE; /* normalize x and y */ - x= (rect->xmax + rect->xmin)/2 - mx; - x/= (float)((rect->xmax - rect->xmin)/4); - y= (rect->ymax + rect->ymin)/2 - my; - y/= (float)((rect->ymax - rect->ymin)/2); + x = (rect->xmax + rect->xmin) / 2 - mx; + x /= (float)((rect->xmax - rect->xmin) / 4); + y = (rect->ymax + rect->ymin) / 2 - my; + y /= (float)((rect->ymax - rect->ymin) / 2); - d = sqrt(x*x + y*y); + d = sqrt(x * x + y * y); if (d < radius * (float)M_SQRT1_2) { /* Inside sphere */ - z= sqrt(radius*radius - d*d); + z = sqrt(radius * radius - d * d); } else { /* On hyperbola */ - t= radius / (float)M_SQRT2; - z= t*t / d; + t = radius / (float)M_SQRT2; + z = t * t / d; } - vec[0]= x; - vec[1]= y; - vec[2]= -z; /* yah yah! */ + vec[0] = x; + vec[1] = y; + vec[2] = -z; /* yah yah! */ } static void viewops_data_create(bContext *C, wmOperator *op, wmEvent *event) { - static float lastofs[3] = {0,0,0}; + static float lastofs[3] = {0, 0, 0}; RegionView3D *rv3d; - ViewOpsData *vod= MEM_callocN(sizeof(ViewOpsData), "viewops data"); + ViewOpsData *vod = MEM_callocN(sizeof(ViewOpsData), "viewops data"); /* store data */ - op->customdata= vod; - vod->sa= CTX_wm_area(C); - vod->ar= CTX_wm_region(C); - vod->v3d= vod->sa->spacedata.first; - vod->rv3d= rv3d= vod->ar->regiondata; + op->customdata = vod; + vod->sa = CTX_wm_area(C); + vod->ar = CTX_wm_region(C); + vod->v3d = vod->sa->spacedata.first; + vod->rv3d = rv3d = vod->ar->regiondata; /* set the view from the camera, if view locking is enabled. * we may want to make this optional but for now its needed always */ ED_view3d_camera_lock_init(vod->v3d, vod->rv3d); - vod->dist0= rv3d->dist; - vod->camzoom0= rv3d->camzoom; + vod->dist0 = rv3d->dist; + vod->camzoom0 = rv3d->camzoom; copy_qt_qt(vod->viewquat, rv3d->viewquat); copy_qt_qt(vod->oldquat, rv3d->viewquat); - vod->origx= vod->oldx= event->x; - vod->origy= vod->oldy= event->y; - vod->origkey= event->type; /* the key that triggered the operator. */ - vod->use_dyn_ofs= (U.uiflag & USER_ORBIT_SELECTION) ? 1:0; + vod->origx = vod->oldx = event->x; + vod->origy = vod->oldy = event->y; + vod->origkey = event->type; /* the key that triggered the operator. */ + vod->use_dyn_ofs = (U.uiflag & USER_ORBIT_SELECTION) ? 1 : 0; copy_v3_v3(vod->ofs, rv3d->ofs); if (vod->use_dyn_ofs) { @@ -434,7 +434,7 @@ static void viewops_data_create(bContext *C, wmOperator *op, wmEvent *event) view3d_operator_needs_opengl(C); /* needed for zbuf drawing */ - if ((vod->use_dyn_ofs=ED_view3d_autodist(CTX_data_scene(C), vod->ar, vod->v3d, event->mval, vod->dyn_ofs))) { + if ((vod->use_dyn_ofs = ED_view3d_autodist(CTX_data_scene(C), vod->ar, vod->v3d, event->mval, vod->dyn_ofs))) { if (rv3d->is_persp) { float my_origin[3]; /* original G.vd->ofs */ float my_pivot[3]; /* view */ @@ -444,7 +444,7 @@ static void viewops_data_create(bContext *C, wmOperator *op, wmEvent *event) float mat[3][3]; float upvec[3]; - negate_v3_v3(my_origin, rv3d->ofs); /* ofs is flipped */ + negate_v3_v3(my_origin, rv3d->ofs); /* ofs is flipped */ /* Set the dist value to be the distance from this 3d point * this means youll always be able to zoom into it and panning wont go bad when dist was zero */ @@ -456,7 +456,7 @@ static void viewops_data_create(bContext *C, wmOperator *op, wmEvent *event) mul_m3_v3(mat, upvec); sub_v3_v3v3(my_pivot, rv3d->ofs, upvec); - negate_v3(my_pivot); /* ofs is flipped */ + negate_v3(my_pivot); /* ofs is flipped */ /* find a new ofs value that is along the view axis (rather than the mouse location) */ closest_to_line_v3(dvec, vod->dyn_ofs, my_pivot, my_origin); @@ -477,16 +477,16 @@ static void viewops_data_create(bContext *C, wmOperator *op, wmEvent *event) } /* lookup, we don't pass on v3d to prevent confusement */ - vod->grid= vod->v3d->grid; - vod->far= vod->v3d->far; + vod->grid = vod->v3d->grid; + vod->far = vod->v3d->far; calctrackballvec(&vod->ar->winrct, event->x, event->y, vod->trackvec); initgrabz(rv3d, -rv3d->ofs[0], -rv3d->ofs[1], -rv3d->ofs[2]); - vod->reverse= 1.0f; + vod->reverse = 1.0f; if (rv3d->persmat[2][1] < 0.0f) - vod->reverse= -1.0f; + vod->reverse = -1.0f; rv3d->rflag |= RV3D_NAVIGATING; } @@ -497,18 +497,18 @@ static void viewops_data_free(bContext *C, wmOperator *op) Paint *p = paint_get_active(CTX_data_scene(C)); if (op->customdata) { - ViewOpsData *vod= op->customdata; - ar= vod->ar; + ViewOpsData *vod = op->customdata; + ar = vod->ar; vod->rv3d->rflag &= ~RV3D_NAVIGATING; if (vod->timer) WM_event_remove_timer(CTX_wm_manager(C), vod->timer->win, vod->timer); MEM_freeN(vod); - op->customdata= NULL; + op->customdata = NULL; } else { - ar= CTX_wm_region(C); + ar = CTX_wm_region(C); } if (p && (p->flags & PAINT_FAST_NAVIGATE)) @@ -568,39 +568,40 @@ static const float snapquats[NUM_SNAP_QUATS][5] = { }; enum { - VIEW_PASS= 0, + VIEW_PASS = 0, VIEW_APPLY, VIEW_CONFIRM }; /* NOTE: these defines are saved in keymap files, do not change values but just add new ones */ -#define VIEW_MODAL_CONFIRM 1 /* used for all view operations */ -#define VIEWROT_MODAL_AXIS_SNAP_ENABLE 2 -#define VIEWROT_MODAL_AXIS_SNAP_DISABLE 3 -#define VIEWROT_MODAL_SWITCH_ZOOM 4 -#define VIEWROT_MODAL_SWITCH_MOVE 5 -#define VIEWROT_MODAL_SWITCH_ROTATE 6 +#define VIEW_MODAL_CONFIRM 1 /* used for all view operations */ +#define VIEWROT_MODAL_AXIS_SNAP_ENABLE 2 +#define VIEWROT_MODAL_AXIS_SNAP_DISABLE 3 +#define VIEWROT_MODAL_SWITCH_ZOOM 4 +#define VIEWROT_MODAL_SWITCH_MOVE 5 +#define VIEWROT_MODAL_SWITCH_ROTATE 6 /* called in transform_ops.c, on each regeneration of keymaps */ void viewrotate_modal_keymap(wmKeyConfig *keyconf) { static EnumPropertyItem modal_items[] = { - {VIEW_MODAL_CONFIRM, "CONFIRM", 0, "Confirm", ""}, + {VIEW_MODAL_CONFIRM, "CONFIRM", 0, "Confirm", ""}, - {VIEWROT_MODAL_AXIS_SNAP_ENABLE, "AXIS_SNAP_ENABLE", 0, "Enable Axis Snap", ""}, - {VIEWROT_MODAL_AXIS_SNAP_DISABLE, "AXIS_SNAP_DISABLE", 0, "Disable Axis Snap", ""}, + {VIEWROT_MODAL_AXIS_SNAP_ENABLE, "AXIS_SNAP_ENABLE", 0, "Enable Axis Snap", ""}, + {VIEWROT_MODAL_AXIS_SNAP_DISABLE, "AXIS_SNAP_DISABLE", 0, "Disable Axis Snap", ""}, - {VIEWROT_MODAL_SWITCH_ZOOM, "SWITCH_TO_ZOOM", 0, "Switch to Zoom"}, - {VIEWROT_MODAL_SWITCH_MOVE, "SWITCH_TO_MOVE", 0, "Switch to Move"}, + {VIEWROT_MODAL_SWITCH_ZOOM, "SWITCH_TO_ZOOM", 0, "Switch to Zoom"}, + {VIEWROT_MODAL_SWITCH_MOVE, "SWITCH_TO_MOVE", 0, "Switch to Move"}, - {0, NULL, 0, NULL, NULL}}; + {0, NULL, 0, NULL, NULL} + }; - wmKeyMap *keymap= WM_modalkeymap_get(keyconf, "View3D Rotate Modal"); + wmKeyMap *keymap = WM_modalkeymap_get(keyconf, "View3D Rotate Modal"); /* this function is called for each spacetype, only needs to add map once */ if (keymap) return; - keymap= WM_modalkeymap_add(keyconf, "View3D Rotate Modal", modal_items); + keymap = WM_modalkeymap_add(keyconf, "View3D Rotate Modal", modal_items); /* items for modal map */ WM_modalkeymap_add_item(keymap, MIDDLEMOUSE, KM_RELEASE, KM_ANY, 0, VIEW_MODAL_CONFIRM); @@ -623,9 +624,9 @@ void viewrotate_modal_keymap(wmKeyConfig *keyconf) static void viewrotate_apply(ViewOpsData *vod, int x, int y) { - RegionView3D *rv3d= vod->rv3d; + RegionView3D *rv3d = vod->rv3d; - rv3d->view= RV3D_VIEW_USER; /* need to reset everytime because of view snapping */ + rv3d->view = RV3D_VIEW_USER; /* need to reset everytime because of view snapping */ if (U.flag & USER_TRACKBALL) { float phi, si, q1[4], dvec[3], newvec[3]; @@ -637,8 +638,8 @@ static void viewrotate_apply(ViewOpsData *vod, int x, int y) si = len_v3(dvec); si /= (float)(2.0 * TRACKBALLSIZE); - cross_v3_v3v3(q1+1, vod->trackvec, newvec); - normalize_v3(q1+1); + cross_v3_v3v3(q1 + 1, vod->trackvec, newvec); + normalize_v3(q1 + 1); /* Allow for rotation beyond the interval [-pi, pi] */ while (si > 1.0f) @@ -651,8 +652,8 @@ static void viewrotate_apply(ViewOpsData *vod, int x, int y) * - dragged. */ phi = si * (float)(M_PI / 2.0); - q1[0]= cos(phi); - mul_v3_fl(q1+1, sin(phi)); + q1[0] = cos(phi); + mul_v3_fl(q1 + 1, sin(phi)); mul_qt_qtqt(vod->viewquat, q1, vod->oldquat); if (vod->use_dyn_ofs) { @@ -681,17 +682,17 @@ static void viewrotate_apply(ViewOpsData *vod, int x, int y) const float sensitivity = 0.0035f; /* Get the 3x3 matrix and its inverse from the quaternion */ - quat_to_mat3( m,vod->viewquat); - invert_m3_m3(m_inv,m); + quat_to_mat3(m, vod->viewquat); + invert_m3_m3(m_inv, m); /* Determine the direction of the x vector (for rotating up and down) */ /* This can likely be computed directly from the quaternion. */ - mul_m3_v3(m_inv,xvec); + mul_m3_v3(m_inv, xvec); /* Perform the up/down rotation */ phi = sensitivity * -(y - vod->oldy); q1[0] = cos(phi); - mul_v3_v3fl(q1+1, xvec, sin(phi)); + mul_v3_v3fl(q1 + 1, xvec, sin(phi)); mul_qt_qtqt(vod->viewquat, vod->viewquat, q1); if (vod->use_dyn_ofs) { @@ -720,21 +721,21 @@ static void viewrotate_apply(ViewOpsData *vod, int x, int y) if (vod->axis_snap) { int i; float viewquat_inv[4]; - float zaxis[3]={0,0,1}; + float zaxis[3] = {0, 0, 1}; invert_qt_qt(viewquat_inv, vod->viewquat); mul_qt_v3(viewquat_inv, zaxis); - for (i = 0 ; i < NUM_SNAP_QUATS; i++) { + for (i = 0; i < NUM_SNAP_QUATS; i++) { float view = (int)snapquats[i][4]; float viewquat_inv_test[4]; - float zaxis_test[3]={0,0,1}; + float zaxis_test[3] = {0, 0, 1}; invert_qt_qt(viewquat_inv_test, snapquats[i]); mul_qt_v3(viewquat_inv_test, zaxis_test); - if (angle_v3v3(zaxis_test, zaxis) < DEG2RADF(45/3)) { + if (angle_v3v3(zaxis_test, zaxis) < DEG2RADF(45 / 3)) { /* find the best roll */ float quat_roll[4], quat_final[4], quat_best[4]; float viewquat_align[4]; /* viewquat aligned to zaxis_test */ @@ -751,10 +752,10 @@ static void viewrotate_apply(ViewOpsData *vod, int x, int y) invert_qt_qt(viewquat_align_inv, viewquat_align); /* find best roll */ - for (j= 0; j<8; j++) { + for (j = 0; j < 8; j++) { float angle; - float xaxis1[3]={1,0,0}; - float xaxis2[3]={1,0,0}; + float xaxis1[3] = {1, 0, 0}; + float xaxis2[3] = {1, 0, 0}; float quat_final_inv[4]; axis_angle_to_quat(quat_roll, zaxis_test, (float)j * DEG2RADF(45.0f)); @@ -767,24 +768,24 @@ static void viewrotate_apply(ViewOpsData *vod, int x, int y) invert_qt_qt(quat_final_inv, quat_final); mul_qt_v3(viewquat_align_inv, xaxis1); mul_qt_v3(quat_final_inv, xaxis2); - angle= angle_v3v3(xaxis1, xaxis2); + angle = angle_v3v3(xaxis1, xaxis2); if (angle <= best_angle) { - best_angle= angle; + best_angle = angle; copy_qt_qt(quat_best, quat_final); - if (j) view= 0; /* view grid assumes certain up axis */ + if (j) view = 0; /* view grid assumes certain up axis */ } } copy_qt_qt(vod->viewquat, quat_best); - rv3d->view= view; /* if we snap to a rolled camera the grid is invalid */ + rv3d->view = view; /* if we snap to a rolled camera the grid is invalid */ break; } } } - vod->oldx= x; - vod->oldy= y; + vod->oldx = x; + vod->oldy = y; /* avoid precision loss over time */ normalize_qt(vod->viewquat); @@ -800,44 +801,44 @@ static void viewrotate_apply(ViewOpsData *vod, int x, int y) static int viewrotate_modal(bContext *C, wmOperator *op, wmEvent *event) { - ViewOpsData *vod= op->customdata; - short event_code= VIEW_PASS; + ViewOpsData *vod = op->customdata; + short event_code = VIEW_PASS; /* execute the events */ - if (event->type==MOUSEMOVE) { - event_code= VIEW_APPLY; + if (event->type == MOUSEMOVE) { + event_code = VIEW_APPLY; } - else if (event->type==EVT_MODAL_MAP) { + else if (event->type == EVT_MODAL_MAP) { switch (event->val) { case VIEW_MODAL_CONFIRM: - event_code= VIEW_CONFIRM; + event_code = VIEW_CONFIRM; break; case VIEWROT_MODAL_AXIS_SNAP_ENABLE: - vod->axis_snap= TRUE; - event_code= VIEW_APPLY; + vod->axis_snap = TRUE; + event_code = VIEW_APPLY; break; case VIEWROT_MODAL_AXIS_SNAP_DISABLE: - vod->axis_snap= FALSE; - event_code= VIEW_APPLY; + vod->axis_snap = FALSE; + event_code = VIEW_APPLY; break; case VIEWROT_MODAL_SWITCH_ZOOM: WM_operator_name_call(C, "VIEW3D_OT_zoom", WM_OP_INVOKE_DEFAULT, NULL); - event_code= VIEW_CONFIRM; + event_code = VIEW_CONFIRM; break; case VIEWROT_MODAL_SWITCH_MOVE: WM_operator_name_call(C, "VIEW3D_OT_move", WM_OP_INVOKE_DEFAULT, NULL); - event_code= VIEW_CONFIRM; + event_code = VIEW_CONFIRM; break; } } - else if (event->type==vod->origkey && event->val==KM_RELEASE) { - event_code= VIEW_CONFIRM; + else if (event->type == vod->origkey && event->val == KM_RELEASE) { + event_code = VIEW_CONFIRM; } - if (event_code==VIEW_APPLY) { + if (event_code == VIEW_APPLY) { viewrotate_apply(vod, event->x, event->y); } - else if (event_code==VIEW_CONFIRM) { + else if (event_code == VIEW_CONFIRM) { ED_view3d_depth_tag_update(vod->rv3d); viewops_data_free(C, op); @@ -854,8 +855,8 @@ static int viewrotate_invoke(bContext *C, wmOperator *op, wmEvent *event) /* makes op->customdata */ viewops_data_create(C, op, event); - vod= op->customdata; - rv3d= vod->rv3d; + vod = op->customdata; + rv3d = vod->rv3d; if (rv3d->viewlock) { /* poll should check but in some cases fails, see poll func for details */ viewops_data_free(C, op); @@ -867,10 +868,10 @@ static int viewrotate_invoke(bContext *C, wmOperator *op, wmEvent *event) if (U.uiflag & USER_AUTOPERSP) { if (!ED_view3d_camera_lock_check(vod->v3d, vod->rv3d)) { - rv3d->persp= RV3D_PERSP; + rv3d->persp = RV3D_PERSP; } } - else if (rv3d->persp==RV3D_CAMOB) { + else if (rv3d->persp == RV3D_CAMOB) { /* changed since 2.4x, use the camera view */ if (vod->v3d->camera) { @@ -878,7 +879,7 @@ static int viewrotate_invoke(bContext *C, wmOperator *op, wmEvent *event) } if (!ED_view3d_camera_lock_check(vod->v3d, vod->rv3d)) { - rv3d->persp= rv3d->lpersp; + rv3d->persp = rv3d->lpersp; } } ED_region_tag_redraw(vod->ar); @@ -912,8 +913,8 @@ static int viewrotate_invoke(bContext *C, wmOperator *op, wmEvent *event) static int view3d_camera_active_poll(bContext *C) { if (ED_operator_view3d_active(C)) { - RegionView3D *rv3d= CTX_wm_region_view3d(C); - if (rv3d && rv3d->persp==RV3D_CAMOB) { + RegionView3D *rv3d = CTX_wm_region_view3d(C); + if (rv3d && rv3d->persp == RV3D_CAMOB) { return 1; } } @@ -929,7 +930,7 @@ static int view3d_camera_user_poll(bContext *C) if (ED_view3d_context_user_region(C, &v3d, &ar)) { RegionView3D *rv3d = ar->regiondata; - if (rv3d->persp==RV3D_CAMOB) { + if (rv3d->persp == RV3D_CAMOB) { return 1; } } @@ -959,18 +960,18 @@ void VIEW3D_OT_rotate(wmOperatorType *ot) ot->cancel = viewrotate_cancel; /* flags */ - ot->flag = OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER; + ot->flag = OPTYPE_BLOCKING | OPTYPE_GRAB_POINTER; } /* NDOF utility functions * (should these functions live in this file?) */ -float ndof_to_axis_angle(struct wmNDOFMotionData* ndof, float axis[3]) +float ndof_to_axis_angle(struct wmNDOFMotionData*ndof, float axis[3]) { return ndof->dt * normalize_v3_v3(axis, ndof->rvec); } -void ndof_to_quat(struct wmNDOFMotionData* ndof, float q[4]) +void ndof_to_quat(struct wmNDOFMotionData*ndof, float q[4]) { float axis[3]; float angle; @@ -989,8 +990,8 @@ static int ndof_orbit_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event return OPERATOR_CANCELLED; else { View3D *v3d = CTX_wm_view3d(C); - RegionView3D* rv3d = CTX_wm_region_view3d(C); - wmNDOFMotionData* ndof = (wmNDOFMotionData*) event->customdata; + RegionView3D*rv3d = CTX_wm_region_view3d(C); + wmNDOFMotionData*ndof = (wmNDOFMotionData *) event->customdata; ED_view3d_camera_lock_init(v3d, rv3d); @@ -1012,7 +1013,7 @@ static int ndof_orbit_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event /* #define DEBUG_NDOF_MOTION */ #ifdef DEBUG_NDOF_MOTION printf("ndof: T=(%.2f,%.2f,%.2f) R=(%.2f,%.2f,%.2f) dt=%.3f delivered to 3D view\n", - ndof->tx, ndof->ty, ndof->tz, ndof->rx, ndof->ry, ndof->rz, ndof->dt); + ndof->tx, ndof->ty, ndof->tz, ndof->rx, ndof->ry, ndof->rz, ndof->dt); #endif if (ndof->tz) { @@ -1077,7 +1078,7 @@ static int ndof_orbit_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event /* turntable view code by John Aughey, adapted for 3D mouse by [mce] */ float angle, rot[4]; - float xvec[3] = {1,0,0}; + float xvec[3] = {1, 0, 0}; /* Determine the direction of the x vector (for rotating up and down) */ mul_qt_v3(view_inv, xvec); @@ -1087,7 +1088,7 @@ static int ndof_orbit_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event if (U.ndof_flag & NDOF_TILT_INVERT_AXIS) angle = -angle; rot[0] = cos(angle); - mul_v3_v3fl(rot+1, xvec, sin(angle)); + mul_v3_v3fl(rot + 1, xvec, sin(angle)); mul_qt_qtqt(rv3d->viewquat, rv3d->viewquat, rot); /* Perform the orbital rotation */ @@ -1140,9 +1141,9 @@ static int ndof_pan_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event) if (event->type != NDOF_MOTION) return OPERATOR_CANCELLED; else { - View3D *v3d= CTX_wm_view3d(C); - RegionView3D* rv3d = CTX_wm_region_view3d(C); - wmNDOFMotionData* ndof = (wmNDOFMotionData*) event->customdata; + View3D *v3d = CTX_wm_view3d(C); + RegionView3D*rv3d = CTX_wm_region_view3d(C); + wmNDOFMotionData*ndof = (wmNDOFMotionData *) event->customdata; ED_view3d_camera_lock_init(v3d, rv3d); @@ -1158,7 +1159,7 @@ static int ndof_pan_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event) float pan_vec[3] = { ndof->tx, ndof->ty, 0 - }; + }; /* "zoom in" or "translate"? depends on zoom mode in user settings? */ if (ndof->tz) { @@ -1235,19 +1236,20 @@ void VIEW3D_OT_ndof_pan(struct wmOperatorType *ot) void viewmove_modal_keymap(wmKeyConfig *keyconf) { static EnumPropertyItem modal_items[] = { - {VIEW_MODAL_CONFIRM, "CONFIRM", 0, "Confirm", ""}, + {VIEW_MODAL_CONFIRM, "CONFIRM", 0, "Confirm", ""}, - {VIEWROT_MODAL_SWITCH_ZOOM, "SWITCH_TO_ZOOM", 0, "Switch to Zoom"}, - {VIEWROT_MODAL_SWITCH_ROTATE, "SWITCH_TO_ROTATE", 0, "Switch to Rotate"}, + {VIEWROT_MODAL_SWITCH_ZOOM, "SWITCH_TO_ZOOM", 0, "Switch to Zoom"}, + {VIEWROT_MODAL_SWITCH_ROTATE, "SWITCH_TO_ROTATE", 0, "Switch to Rotate"}, - {0, NULL, 0, NULL, NULL}}; + {0, NULL, 0, NULL, NULL} + }; - wmKeyMap *keymap= WM_modalkeymap_get(keyconf, "View3D Move Modal"); + wmKeyMap *keymap = WM_modalkeymap_get(keyconf, "View3D Move Modal"); /* this function is called for each spacetype, only needs to add map once */ if (keymap) return; - keymap= WM_modalkeymap_add(keyconf, "View3D Move Modal", modal_items); + keymap = WM_modalkeymap_add(keyconf, "View3D Move Modal", modal_items); /* items for modal map */ WM_modalkeymap_add_item(keymap, MIDDLEMOUSE, KM_RELEASE, KM_ANY, 0, VIEW_MODAL_CONFIRM); @@ -1267,10 +1269,10 @@ void viewmove_modal_keymap(wmKeyConfig *keyconf) static void viewmove_apply(ViewOpsData *vod, int x, int y) { - if ((vod->rv3d->persp==RV3D_CAMOB) && !ED_view3d_camera_lock_check(vod->v3d, vod->rv3d)) { - const float zoomfac= BKE_screen_view3d_zoom_to_fac((float)vod->rv3d->camzoom) * 2.0f; - vod->rv3d->camdx += (vod->oldx - x)/(vod->ar->winx * zoomfac); - vod->rv3d->camdy += (vod->oldy - y)/(vod->ar->winy * zoomfac); + if ((vod->rv3d->persp == RV3D_CAMOB) && !ED_view3d_camera_lock_check(vod->v3d, vod->rv3d)) { + const float zoomfac = BKE_screen_view3d_zoom_to_fac((float)vod->rv3d->camzoom) * 2.0f; + vod->rv3d->camdx += (vod->oldx - x) / (vod->ar->winx * zoomfac); + vod->rv3d->camdy += (vod->oldy - y) / (vod->ar->winy * zoomfac); CLAMP(vod->rv3d->camdx, -1.0f, 1.0f); CLAMP(vod->rv3d->camdy, -1.0f, 1.0f); } @@ -1278,8 +1280,8 @@ static void viewmove_apply(ViewOpsData *vod, int x, int y) float dvec[3]; float mval_f[2]; - mval_f[0]= x - vod->oldx; - mval_f[1]= y - vod->oldy; + mval_f[0] = x - vod->oldx; + mval_f[1] = y - vod->oldy; ED_view3d_win_to_delta(vod->ar, mval_f, dvec); add_v3_v3(vod->rv3d->ofs, dvec); @@ -1288,8 +1290,8 @@ static void viewmove_apply(ViewOpsData *vod, int x, int y) view3d_boxview_sync(vod->sa, vod->ar); } - vod->oldx= x; - vod->oldy= y; + vod->oldx = x; + vod->oldy = y; ED_view3d_camera_lock_sync(vod->v3d, vod->rv3d); @@ -1300,36 +1302,36 @@ static void viewmove_apply(ViewOpsData *vod, int x, int y) static int viewmove_modal(bContext *C, wmOperator *op, wmEvent *event) { - ViewOpsData *vod= op->customdata; - short event_code= VIEW_PASS; + ViewOpsData *vod = op->customdata; + short event_code = VIEW_PASS; /* execute the events */ - if (event->type==MOUSEMOVE) { - event_code= VIEW_APPLY; + if (event->type == MOUSEMOVE) { + event_code = VIEW_APPLY; } - else if (event->type==EVT_MODAL_MAP) { + else if (event->type == EVT_MODAL_MAP) { switch (event->val) { case VIEW_MODAL_CONFIRM: - event_code= VIEW_CONFIRM; + event_code = VIEW_CONFIRM; break; case VIEWROT_MODAL_SWITCH_ZOOM: WM_operator_name_call(C, "VIEW3D_OT_zoom", WM_OP_INVOKE_DEFAULT, NULL); - event_code= VIEW_CONFIRM; + event_code = VIEW_CONFIRM; break; case VIEWROT_MODAL_SWITCH_ROTATE: WM_operator_name_call(C, "VIEW3D_OT_rotate", WM_OP_INVOKE_DEFAULT, NULL); - event_code= VIEW_CONFIRM; + event_code = VIEW_CONFIRM; break; } } - else if (event->type==vod->origkey && event->val==KM_RELEASE) { - event_code= VIEW_CONFIRM; + else if (event->type == vod->origkey && event->val == KM_RELEASE) { + event_code = VIEW_CONFIRM; } - if (event_code==VIEW_APPLY) { + if (event_code == VIEW_APPLY) { viewmove_apply(vod, event->x, event->y); } - else if (event_code==VIEW_CONFIRM) { + else if (event_code == VIEW_CONFIRM) { ED_view3d_depth_tag_update(vod->rv3d); viewops_data_free(C, op); @@ -1346,7 +1348,7 @@ static int viewmove_invoke(bContext *C, wmOperator *op, wmEvent *event) /* makes op->customdata */ viewops_data_create(C, op, event); - vod= op->customdata; + vod = op->customdata; if (event->type == MOUSEPAN) { viewmove_apply(vod, event->prevx, event->prevy); @@ -1386,7 +1388,7 @@ void VIEW3D_OT_move(wmOperatorType *ot) ot->cancel = viewmove_cancel; /* flags */ - ot->flag = OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER; + ot->flag = OPTYPE_BLOCKING | OPTYPE_GRAB_POINTER; } /* ************************ viewzoom ******************************** */ @@ -1396,19 +1398,19 @@ void VIEW3D_OT_move(wmOperatorType *ot) void viewzoom_modal_keymap(wmKeyConfig *keyconf) { static EnumPropertyItem modal_items[] = { - {VIEW_MODAL_CONFIRM, "CONFIRM", 0, "Confirm", ""}, + {VIEW_MODAL_CONFIRM, "CONFIRM", 0, "Confirm", ""}, - {VIEWROT_MODAL_SWITCH_ROTATE, "SWITCH_TO_ROTATE", 0, "Switch to Rotate"}, - {VIEWROT_MODAL_SWITCH_MOVE, "SWITCH_TO_MOVE", 0, "Switch to Move"}, + {VIEWROT_MODAL_SWITCH_ROTATE, "SWITCH_TO_ROTATE", 0, "Switch to Rotate"}, + {VIEWROT_MODAL_SWITCH_MOVE, "SWITCH_TO_MOVE", 0, "Switch to Move"}, - {0, NULL, 0, NULL, NULL}}; + {0, NULL, 0, NULL, NULL}}; - wmKeyMap *keymap= WM_modalkeymap_get(keyconf, "View3D Zoom Modal"); + wmKeyMap *keymap = WM_modalkeymap_get(keyconf, "View3D Zoom Modal"); /* this function is called for each spacetype, only needs to add map once */ if (keymap) return; - keymap= WM_modalkeymap_add(keyconf, "View3D Zoom Modal", modal_items); + keymap = WM_modalkeymap_add(keyconf, "View3D Zoom Modal", modal_items); /* items for modal map */ WM_modalkeymap_add_item(keymap, MIDDLEMOUSE, KM_RELEASE, KM_ANY, 0, VIEW_MODAL_CONFIRM); @@ -1427,7 +1429,7 @@ void viewzoom_modal_keymap(wmKeyConfig *keyconf) static void view_zoom_mouseloc(ARegion *ar, float dfac, int mx, int my) { - RegionView3D *rv3d= ar->regiondata; + RegionView3D *rv3d = ar->regiondata; if (U.uiflag & USER_ZOOM_TO_MOUSEPOS) { float dvec[3]; @@ -1441,8 +1443,8 @@ static void view_zoom_mouseloc(ARegion *ar, float dfac, int mx, int my) /* Project cursor position into 3D space */ initgrabz(rv3d, tpos[0], tpos[1], tpos[2]); - mval_f[0]= (float)(((mx - ar->winrct.xmin) * 2) - ar->winx) / 2.0f; - mval_f[1]= (float)(((my - ar->winrct.ymin) * 2) - ar->winy) / 2.0f; + mval_f[0] = (float)(((mx - ar->winrct.xmin) * 2) - ar->winx) / 2.0f; + mval_f[1] = (float)(((my - ar->winrct.ymin) * 2) - ar->winy) / 2.0f; ED_view3d_win_to_delta(ar, mval_f, dvec); /* Calculate view target position for dolly */ @@ -1466,10 +1468,10 @@ static void view_zoom_mouseloc(ARegion *ar, float dfac, int mx, int my) static void viewzoom_apply(ViewOpsData *vod, int x, int y, const short viewzoom, const short zoom_invert) { - float zfac=1.0; + float zfac = 1.0; short use_cam_zoom; - use_cam_zoom = (vod->rv3d->persp==RV3D_CAMOB) && !(vod->rv3d->is_persp && ED_view3d_camera_lock_check(vod->v3d, vod->rv3d)); + use_cam_zoom = (vod->rv3d->persp == RV3D_CAMOB) && !(vod->rv3d->is_persp && ED_view3d_camera_lock_check(vod->v3d, vod->rv3d)); if (use_cam_zoom) { float delta; @@ -1478,39 +1480,39 @@ static void viewzoom_apply(ViewOpsData *vod, int x, int y, const short viewzoom, CLAMP(vod->rv3d->camzoom, RV3D_CAMZOOM_MIN, RV3D_CAMZOOM_MAX); } - if (viewzoom==USER_ZOOM_CONT) { - double time= PIL_check_seconds_timer(); - float time_step= (float)(time - vod->timer_lastdraw); + if (viewzoom == USER_ZOOM_CONT) { + double time = PIL_check_seconds_timer(); + float time_step = (float)(time - vod->timer_lastdraw); float fac; if (U.uiflag & USER_ZOOM_HORIZ) { - fac= (float)(x - vod->origx); + fac = (float)(x - vod->origx); } else { - fac= (float)(y - vod->origy); + fac = (float)(y - vod->origy); } if (zoom_invert) { - fac= -fac; + fac = -fac; } // oldstyle zoom zfac = 1.0f + ((fac / 20.0f) * time_step); - vod->timer_lastdraw= time; + vod->timer_lastdraw = time; } - else if (viewzoom==USER_ZOOM_SCALE) { + else if (viewzoom == USER_ZOOM_SCALE) { int ctr[2], len1, len2; // method which zooms based on how far you move the mouse - ctr[0] = (vod->ar->winrct.xmax + vod->ar->winrct.xmin)/2; - ctr[1] = (vod->ar->winrct.ymax + vod->ar->winrct.ymin)/2; + ctr[0] = (vod->ar->winrct.xmax + vod->ar->winrct.xmin) / 2; + ctr[1] = (vod->ar->winrct.ymax + vod->ar->winrct.ymin) / 2; - len1 = (int)sqrt((ctr[0] - x)*(ctr[0] - x) + (ctr[1] - y)*(ctr[1] - y)) + 5; - len2 = (int)sqrt((ctr[0] - vod->origx)*(ctr[0] - vod->origx) + (ctr[1] - vod->origy)*(ctr[1] - vod->origy)) + 5; + len1 = (int)sqrt((ctr[0] - x) * (ctr[0] - x) + (ctr[1] - y) * (ctr[1] - y)) + 5; + len2 = (int)sqrt((ctr[0] - vod->origx) * (ctr[0] - vod->origx) + (ctr[1] - vod->origy) * (ctr[1] - vod->origy)) + 5; - zfac = vod->dist0 * ((float)len2/len1) / vod->rv3d->dist; + zfac = vod->dist0 * ((float)len2 / len1) / vod->rv3d->dist; } - else { /* USER_ZOOM_DOLLY */ + else { /* USER_ZOOM_DOLLY */ float len1, len2; if (U.uiflag & USER_ZOOM_HORIZ) { @@ -1526,23 +1528,23 @@ static void viewzoom_apply(ViewOpsData *vod, int x, int y, const short viewzoom, } if (use_cam_zoom) { - zfac = vod->camzoom0 * (2.0f * ((len2/len1)-1.0f) + 1.0f) / vod->rv3d->camzoom; + zfac = vod->camzoom0 * (2.0f * ((len2 / len1) - 1.0f) + 1.0f) / vod->rv3d->camzoom; zfac = 0; } else { - zfac = vod->dist0 * (2.0f * ((len2/len1)-1.0f) + 1.0f) / vod->rv3d->dist; + zfac = vod->dist0 * (2.0f * ((len2 / len1) - 1.0f) + 1.0f) / vod->rv3d->dist; } } if (!use_cam_zoom) { - if (zfac != 1.0f && zfac*vod->rv3d->dist > 0.001f * vod->grid && - zfac * vod->rv3d->dist < 10.0f * vod->far) + if (zfac != 1.0f && zfac * vod->rv3d->dist > 0.001f * vod->grid && + zfac * vod->rv3d->dist < 10.0f * vod->far) view_zoom_mouseloc(vod->ar, zfac, vod->oldx, vod->oldy); } /* these limits were in old code too */ - if (vod->rv3d->dist<0.001f * vod->grid) vod->rv3d->dist= 0.001f * vod->grid; - if (vod->rv3d->dist>10.0f * vod->far) vod->rv3d->dist=10.0f * vod->far; + if (vod->rv3d->dist < 0.001f * vod->grid) vod->rv3d->dist = 0.001f * vod->grid; + if (vod->rv3d->dist > 10.0f * vod->far) vod->rv3d->dist = 10.0f * vod->far; if (vod->rv3d->viewlock & RV3D_BOXVIEW) view3d_boxview_sync(vod->sa, vod->ar); @@ -1555,40 +1557,40 @@ static void viewzoom_apply(ViewOpsData *vod, int x, int y, const short viewzoom, static int viewzoom_modal(bContext *C, wmOperator *op, wmEvent *event) { - ViewOpsData *vod= op->customdata; - short event_code= VIEW_PASS; + ViewOpsData *vod = op->customdata; + short event_code = VIEW_PASS; /* execute the events */ if (event->type == TIMER && event->customdata == vod->timer) { /* continuous zoom */ - event_code= VIEW_APPLY; + event_code = VIEW_APPLY; } - else if (event->type==MOUSEMOVE) { - event_code= VIEW_APPLY; + else if (event->type == MOUSEMOVE) { + event_code = VIEW_APPLY; } - else if (event->type==EVT_MODAL_MAP) { + else if (event->type == EVT_MODAL_MAP) { switch (event->val) { case VIEW_MODAL_CONFIRM: - event_code= VIEW_CONFIRM; + event_code = VIEW_CONFIRM; break; case VIEWROT_MODAL_SWITCH_MOVE: WM_operator_name_call(C, "VIEW3D_OT_move", WM_OP_INVOKE_DEFAULT, NULL); - event_code= VIEW_CONFIRM; + event_code = VIEW_CONFIRM; break; case VIEWROT_MODAL_SWITCH_ROTATE: WM_operator_name_call(C, "VIEW3D_OT_rotate", WM_OP_INVOKE_DEFAULT, NULL); - event_code= VIEW_CONFIRM; + event_code = VIEW_CONFIRM; break; } } - else if (event->type==vod->origkey && event->val==KM_RELEASE) { - event_code= VIEW_CONFIRM; + else if (event->type == vod->origkey && event->val == KM_RELEASE) { + event_code = VIEW_CONFIRM; } - if (event_code==VIEW_APPLY) { + if (event_code == VIEW_APPLY) { viewzoom_apply(vod, event->x, event->y, U.viewzoom, (U.uiflag & USER_ZOOM_INVERT) != 0); } - else if (event_code==VIEW_CONFIRM) { + else if (event_code == VIEW_CONFIRM) { ED_view3d_depth_tag_update(vod->rv3d); viewops_data_free(C, op); @@ -1606,33 +1608,33 @@ static int viewzoom_exec(bContext *C, wmOperator *op) ARegion *ar; short use_cam_zoom; - int delta= RNA_int_get(op->ptr, "delta"); + int delta = RNA_int_get(op->ptr, "delta"); int mx, my; if (op->customdata) { - ViewOpsData *vod= op->customdata; + ViewOpsData *vod = op->customdata; - sa= vod->sa; - ar= vod->ar; + sa = vod->sa; + ar = vod->ar; } else { - sa= CTX_wm_area(C); - ar= CTX_wm_region(C); + sa = CTX_wm_area(C); + ar = CTX_wm_region(C); } - v3d= sa->spacedata.first; - rv3d= ar->regiondata; + v3d = sa->spacedata.first; + rv3d = ar->regiondata; - mx= RNA_struct_property_is_set(op->ptr, "mx") ? RNA_int_get(op->ptr, "mx") : ar->winx / 2; - my= RNA_struct_property_is_set(op->ptr, "my") ? RNA_int_get(op->ptr, "my") : ar->winy / 2; + mx = RNA_struct_property_is_set(op->ptr, "mx") ? RNA_int_get(op->ptr, "mx") : ar->winx / 2; + my = RNA_struct_property_is_set(op->ptr, "my") ? RNA_int_get(op->ptr, "my") : ar->winy / 2; - use_cam_zoom= (rv3d->persp==RV3D_CAMOB) && !(rv3d->is_persp && ED_view3d_camera_lock_check(v3d, rv3d)); + use_cam_zoom = (rv3d->persp == RV3D_CAMOB) && !(rv3d->is_persp && ED_view3d_camera_lock_check(v3d, rv3d)); if (delta < 0) { /* this min and max is also in viewmove() */ if (use_cam_zoom) { rv3d->camzoom -= 10.0f; - if (rv3d->camzoom < RV3D_CAMZOOM_MIN) rv3d->camzoom= RV3D_CAMZOOM_MIN; + if (rv3d->camzoom < RV3D_CAMZOOM_MIN) rv3d->camzoom = RV3D_CAMZOOM_MIN; } else if (rv3d->dist < 10.0f * v3d->far) { view_zoom_mouseloc(ar, 1.2f, mx, my); @@ -1641,9 +1643,9 @@ static int viewzoom_exec(bContext *C, wmOperator *op) else { if (use_cam_zoom) { rv3d->camzoom += 10.0f; - if (rv3d->camzoom > RV3D_CAMZOOM_MAX) rv3d->camzoom= RV3D_CAMZOOM_MAX; + if (rv3d->camzoom > RV3D_CAMZOOM_MAX) rv3d->camzoom = RV3D_CAMZOOM_MAX; } - else if (rv3d->dist> 0.001f * v3d->grid) { + else if (rv3d->dist > 0.001f * v3d->grid) { view_zoom_mouseloc(ar, .83333f, mx, my); } } @@ -1667,19 +1669,20 @@ static int viewzoom_exec(bContext *C, wmOperator *op) void viewdolly_modal_keymap(wmKeyConfig *keyconf) { static EnumPropertyItem modal_items[] = { - {VIEW_MODAL_CONFIRM, "CONFIRM", 0, "Confirm", ""}, + {VIEW_MODAL_CONFIRM, "CONFIRM", 0, "Confirm", ""}, - {VIEWROT_MODAL_SWITCH_ROTATE, "SWITCH_TO_ROTATE", 0, "Switch to Rotate"}, - {VIEWROT_MODAL_SWITCH_MOVE, "SWITCH_TO_MOVE", 0, "Switch to Move"}, + {VIEWROT_MODAL_SWITCH_ROTATE, "SWITCH_TO_ROTATE", 0, "Switch to Rotate"}, + {VIEWROT_MODAL_SWITCH_MOVE, "SWITCH_TO_MOVE", 0, "Switch to Move"}, - {0, NULL, 0, NULL, NULL}}; + {0, NULL, 0, NULL, NULL} + }; - wmKeyMap *keymap= WM_modalkeymap_get(keyconf, "View3D Dolly Modal"); + wmKeyMap *keymap = WM_modalkeymap_get(keyconf, "View3D Dolly Modal"); /* this function is called for each spacetype, only needs to add map once */ if (keymap) return; - keymap= WM_modalkeymap_add(keyconf, "View3D Dolly Modal", modal_items); + keymap = WM_modalkeymap_add(keyconf, "View3D Dolly Modal", modal_items); /* items for modal map */ WM_modalkeymap_add_item(keymap, MIDDLEMOUSE, KM_RELEASE, KM_ANY, 0, VIEW_MODAL_CONFIRM); @@ -1703,7 +1706,7 @@ static int viewzoom_invoke(bContext *C, wmOperator *op, wmEvent *event) /* makes op->customdata */ viewops_data_create(C, op, event); - vod= op->customdata; + vod = op->customdata; /* if one or the other zoom position aren't set, set from event */ if (!RNA_struct_property_is_set(op->ptr, "mx") || !RNA_struct_property_is_set(op->ptr, "my")) { @@ -1735,8 +1738,8 @@ static int viewzoom_invoke(bContext *C, wmOperator *op, wmEvent *event) else { if (U.viewzoom == USER_ZOOM_CONT) { /* needs a timer to continue redrawing */ - vod->timer= WM_event_add_timer(CTX_wm_manager(C), CTX_wm_window(C), TIMER, 0.01f); - vod->timer_lastdraw= PIL_check_seconds_timer(); + vod->timer = WM_event_add_timer(CTX_wm_manager(C), CTX_wm_window(C), TIMER, 0.01f); + vod->timer_lastdraw = PIL_check_seconds_timer(); } /* add temp handler */ @@ -1770,7 +1773,7 @@ void VIEW3D_OT_zoom(wmOperatorType *ot) ot->cancel = viewzoom_cancel; /* flags */ - ot->flag = OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER; + ot->flag = OPTYPE_BLOCKING | OPTYPE_GRAB_POINTER; RNA_def_int(ot->srna, "delta", 0, INT_MIN, INT_MAX, "Delta", "", INT_MIN, INT_MAX); RNA_def_int(ot->srna, "mx", 0, 0, INT_MAX, "Zoom Position X", "", 0, INT_MAX); @@ -1781,13 +1784,13 @@ void VIEW3D_OT_zoom(wmOperatorType *ot) /* ************************ viewdolly ******************************** */ static void view_dolly_mouseloc(ARegion *ar, float orig_ofs[3], float dvec[3], float dfac) { - RegionView3D *rv3d= ar->regiondata; + RegionView3D *rv3d = ar->regiondata; madd_v3_v3v3fl(rv3d->ofs, orig_ofs, dvec, -(1.0f - dfac)); } static void viewdolly_apply(ViewOpsData *vod, int x, int y, const short zoom_invert) { - float zfac=1.0; + float zfac = 1.0; { float len1, len2; @@ -1820,36 +1823,36 @@ static void viewdolly_apply(ViewOpsData *vod, int x, int y, const short zoom_inv static int viewdolly_modal(bContext *C, wmOperator *op, wmEvent *event) { - ViewOpsData *vod= op->customdata; - short event_code= VIEW_PASS; + ViewOpsData *vod = op->customdata; + short event_code = VIEW_PASS; /* execute the events */ - if (event->type==MOUSEMOVE) { - event_code= VIEW_APPLY; + if (event->type == MOUSEMOVE) { + event_code = VIEW_APPLY; } - else if (event->type==EVT_MODAL_MAP) { + else if (event->type == EVT_MODAL_MAP) { switch (event->val) { case VIEW_MODAL_CONFIRM: - event_code= VIEW_CONFIRM; + event_code = VIEW_CONFIRM; break; case VIEWROT_MODAL_SWITCH_MOVE: WM_operator_name_call(C, "VIEW3D_OT_move", WM_OP_INVOKE_DEFAULT, NULL); - event_code= VIEW_CONFIRM; + event_code = VIEW_CONFIRM; break; case VIEWROT_MODAL_SWITCH_ROTATE: WM_operator_name_call(C, "VIEW3D_OT_rotate", WM_OP_INVOKE_DEFAULT, NULL); - event_code= VIEW_CONFIRM; + event_code = VIEW_CONFIRM; break; } } - else if (event->type==vod->origkey && event->val==KM_RELEASE) { - event_code= VIEW_CONFIRM; + else if (event->type == vod->origkey && event->val == KM_RELEASE) { + event_code = VIEW_CONFIRM; } - if (event_code==VIEW_APPLY) { + if (event_code == VIEW_APPLY) { viewdolly_apply(vod, event->x, event->y, (U.uiflag & USER_ZOOM_INVERT) != 0); } - else if (event_code==VIEW_CONFIRM) { + else if (event_code == VIEW_CONFIRM) { ED_view3d_depth_tag_update(vod->rv3d); viewops_data_free(C, op); @@ -1867,24 +1870,24 @@ static int viewdolly_exec(bContext *C, wmOperator *op) ARegion *ar; float mousevec[3]; - int delta= RNA_int_get(op->ptr, "delta"); + int delta = RNA_int_get(op->ptr, "delta"); if (op->customdata) { - ViewOpsData *vod= op->customdata; + ViewOpsData *vod = op->customdata; - sa= vod->sa; - ar= vod->ar; + sa = vod->sa; + ar = vod->ar; copy_v3_v3(mousevec, vod->mousevec); } else { - sa= CTX_wm_area(C); - ar= CTX_wm_region(C); + sa = CTX_wm_area(C); + ar = CTX_wm_region(C); negate_v3_v3(mousevec, ((RegionView3D *)ar->regiondata)->viewinv[2]); normalize_v3(mousevec); } /* v3d= sa->spacedata.first; */ /* UNUSED */ - rv3d= ar->regiondata; + rv3d = ar->regiondata; /* overwrite the mouse vector with the view direction (zoom into the center) */ if ((U.uiflag & USER_ZOOM_TO_MOUSEPOS) == 0) { @@ -1916,7 +1919,7 @@ static int viewdolly_invoke(bContext *C, wmOperator *op, wmEvent *event) /* makes op->customdata */ viewops_data_create(C, op, event); - vod= op->customdata; + vod = op->customdata; /* if one or the other zoom position aren't set, set from event */ if (!RNA_struct_property_is_set(op->ptr, "mx") || !RNA_struct_property_is_set(op->ptr, "my")) { @@ -1965,14 +1968,14 @@ static int viewdolly_invoke(bContext *C, wmOperator *op, wmEvent *event) /* like ED_operator_region_view3d_active but check its not in ortho view */ static int viewdolly_poll(bContext *C) { - RegionView3D *rv3d= CTX_wm_region_view3d(C); + RegionView3D *rv3d = CTX_wm_region_view3d(C); if (rv3d) { if (rv3d->persp == RV3D_PERSP) { return 1; } else { - View3D *v3d= CTX_wm_view3d(C); + View3D *v3d = CTX_wm_view3d(C); if (ED_view3d_camera_lock_check(v3d, rv3d)) { return 1; } @@ -2003,7 +2006,7 @@ void VIEW3D_OT_dolly(wmOperatorType *ot) ot->cancel = viewdolly_cancel; /* flags */ - ot->flag = OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER; + ot->flag = OPTYPE_BLOCKING | OPTYPE_GRAB_POINTER; RNA_def_int(ot->srna, "delta", 0, INT_MIN, INT_MAX, "Delta", "", INT_MIN, INT_MAX); RNA_def_int(ot->srna, "mx", 0, 0, INT_MAX, "Zoom Position X", "", 0, INT_MAX); @@ -2014,22 +2017,22 @@ void VIEW3D_OT_dolly(wmOperatorType *ot) static int view3d_all_exec(bContext *C, wmOperator *op) /* was view3d_home() in 2.4x */ { - ARegion *ar= CTX_wm_region(C); + ARegion *ar = CTX_wm_region(C); View3D *v3d = CTX_wm_view3d(C); - RegionView3D *rv3d= CTX_wm_region_view3d(C); - Scene *scene= CTX_data_scene(C); + RegionView3D *rv3d = CTX_wm_region_view3d(C); + Scene *scene = CTX_data_scene(C); Base *base; float *curs; - const short skip_camera= ED_view3d_camera_lock_check(v3d, rv3d); + const short skip_camera = ED_view3d_camera_lock_check(v3d, rv3d); - int center= RNA_boolean_get(op->ptr, "center"); + int center = RNA_boolean_get(op->ptr, "center"); float size, min[3], max[3], afm[3]; - int ok= 1, onedone=0; + int ok = 1, onedone = 0; if (center) { /* in 2.4x this also move the cursor to (0, 0, 0) (with shift+c). */ - curs= give_cursor(scene, v3d); + curs = give_cursor(scene, v3d); zero_v3(min); zero_v3(max); zero_v3(curs); @@ -2038,9 +2041,9 @@ static int view3d_all_exec(bContext *C, wmOperator *op) /* was view3d_home() in INIT_MINMAX(min, max); } - for (base= scene->base.first; base; base= base->next) { + for (base = scene->base.first; base; base = base->next) { if (BASE_VISIBLE(v3d, base)) { - onedone= 1; + onedone = 1; if (skip_camera && base->object == v3d->camera) { continue; @@ -2062,27 +2065,27 @@ static int view3d_all_exec(bContext *C, wmOperator *op) /* was view3d_home() in } sub_v3_v3v3(afm, max, min); - size= 0.7f*MAX3(afm[0], afm[1], afm[2]); - if (size == 0.0f) ok= 0; + size = 0.7f * MAX3(afm[0], afm[1], afm[2]); + if (size == 0.0f) ok = 0; if (ok) { float new_dist; float new_ofs[3]; new_dist = size; - new_ofs[0]= -(min[0]+max[0])/2.0f; - new_ofs[1]= -(min[1]+max[1])/2.0f; - new_ofs[2]= -(min[2]+max[2])/2.0f; + new_ofs[0] = -(min[0] + max[0]) / 2.0f; + new_ofs[1] = -(min[1] + max[1]) / 2.0f; + new_ofs[2] = -(min[2] + max[2]) / 2.0f; // correction for window aspect ratio - if (ar->winy>2 && ar->winx>2) { - size= (float)ar->winx/(float)ar->winy; - if (size < 1.0f) size= 1.0f/size; - new_dist*= size; + if (ar->winy > 2 && ar->winx > 2) { + size = (float)ar->winx / (float)ar->winy; + if (size < 1.0f) size = 1.0f / size; + new_dist *= size; } - if ((rv3d->persp==RV3D_CAMOB) && !ED_view3d_camera_lock_check(v3d, rv3d)) { - rv3d->persp= RV3D_PERSP; + if ((rv3d->persp == RV3D_CAMOB) && !ED_view3d_camera_lock_check(v3d, rv3d)) { + rv3d->persp = RV3D_PERSP; smooth_view(C, v3d, ar, v3d->camera, NULL, new_ofs, NULL, &new_dist, NULL); } else { @@ -2091,7 +2094,7 @@ static int view3d_all_exec(bContext *C, wmOperator *op) /* was view3d_home() in } // XXX BIF_view3d_previewrender_signal(curarea, PR_DBASE|PR_DISPRECT); - WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, v3d); + WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d); return OPERATOR_FINISHED; } @@ -2117,15 +2120,15 @@ void VIEW3D_OT_view_all(wmOperatorType *ot) /* like a localview without local!, was centerview() in 2.4x */ static int viewselected_exec(bContext *C, wmOperator *UNUSED(op)) { - ARegion *ar= CTX_wm_region(C); + ARegion *ar = CTX_wm_region(C); View3D *v3d = CTX_wm_view3d(C); - RegionView3D *rv3d= CTX_wm_region_view3d(C); - Scene *scene= CTX_data_scene(C); - Object *ob= OBACT; - Object *obedit= CTX_data_edit_object(C); + RegionView3D *rv3d = CTX_wm_region_view3d(C); + Scene *scene = CTX_data_scene(C); + Object *ob = OBACT; + Object *obedit = CTX_data_edit_object(C); float size, min[3], max[3], afm[3]; - int ok=0, ok_dist=1; - const short skip_camera= ED_view3d_camera_lock_check(v3d, rv3d); + int ok = 0, ok_dist = 1; + const short skip_camera = ED_view3d_camera_lock_check(v3d, rv3d); /* SMOOTHVIEW */ float new_ofs[3]; @@ -2137,32 +2140,32 @@ static int viewselected_exec(bContext *C, wmOperator *UNUSED(op)) /* hard-coded exception, we look for the one selected armature */ /* this is weak code this way, we should make a generic active/selection callback interface once... */ Base *base; - for (base=scene->base.first; base; base= base->next) { + for (base = scene->base.first; base; base = base->next) { if (TESTBASELIB(v3d, base)) { - if (base->object->type==OB_ARMATURE) + if (base->object->type == OB_ARMATURE) if (base->object->mode & OB_MODE_POSE) break; } } if (base) - ob= base->object; + ob = base->object; } if (obedit) { - ok = minmax_verts(obedit, min, max); /* only selected */ + ok = minmax_verts(obedit, min, max); /* only selected */ } else if (ob && (ob->mode & OB_MODE_POSE)) { if (ob->pose) { - bArmature *arm= ob->data; + bArmature *arm = ob->data; bPoseChannel *pchan; float vec[3]; - for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) { + for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { if (pchan->bone->flag & BONE_SELECTED) { if (pchan->bone->layer & arm->layer) { - bPoseChannel *pchan_tx= pchan->custom_tx ? pchan->custom_tx : pchan; - ok= 1; + bPoseChannel *pchan_tx = pchan->custom_tx ? pchan->custom_tx : pchan; + ok = 1; mul_v3_m4v3(vec, ob->obmat, pchan_tx->pose_head); DO_MINMAX(vec, min, max); mul_v3_m4v3(vec, ob->obmat, pchan_tx->pose_tail); @@ -2173,14 +2176,14 @@ static int viewselected_exec(bContext *C, wmOperator *UNUSED(op)) } } else if (paint_facesel_test(ob)) { - ok= paintface_minmax(ob, min, max); + ok = paintface_minmax(ob, min, max); } else if (ob && (ob->mode & OB_MODE_PARTICLE_EDIT)) { - ok= PE_minmax(scene, min, max); + ok = PE_minmax(scene, min, max); } else { Base *base; - for (base= FIRSTBASE; base; base = base->next) { + for (base = FIRSTBASE; base; base = base->next) { if (TESTBASE(v3d, base)) { if (skip_camera && base->object == v3d->camera) { @@ -2188,31 +2191,31 @@ static int viewselected_exec(bContext *C, wmOperator *UNUSED(op)) } /* account for duplis */ - if (minmax_object_duplis(scene, base->object, min, max)==0) - minmax_object(base->object, min, max); /* use if duplis not found */ + if (minmax_object_duplis(scene, base->object, min, max) == 0) + minmax_object(base->object, min, max); /* use if duplis not found */ - ok= 1; + ok = 1; } } } - if (ok==0) return OPERATOR_FINISHED; + if (ok == 0) return OPERATOR_FINISHED; sub_v3_v3v3(afm, max, min); - size= MAX3(afm[0], afm[1], afm[2]); + size = MAX3(afm[0], afm[1], afm[2]); if (!rv3d->is_persp) { if (size < 0.0001f) { /* if its a sinble point. don't even re-scale */ - ok_dist= 0; + ok_dist = 0; } else { /* perspective should be a bit farther away to look nice */ - size*= 0.7f; + size *= 0.7f; } } else { - if (size <= v3d->near*1.5f) { - size= v3d->near*1.5f; + if (size <= v3d->near * 1.5f) { + size = v3d->near * 1.5f; } } @@ -2222,14 +2225,14 @@ static int viewselected_exec(bContext *C, wmOperator *UNUSED(op)) new_dist = size; /* correction for window aspect ratio */ - if (ar->winy>2 && ar->winx>2) { - size= (float)ar->winx/(float)ar->winy; - if (size<1.0f) size= 1.0f/size; - new_dist*= size; + if (ar->winy > 2 && ar->winx > 2) { + size = (float)ar->winx / (float)ar->winy; + if (size < 1.0f) size = 1.0f / size; + new_dist *= size; } - if (rv3d->persp==RV3D_CAMOB && !ED_view3d_camera_lock_check(v3d, rv3d)) { - rv3d->persp= RV3D_PERSP; + if (rv3d->persp == RV3D_CAMOB && !ED_view3d_camera_lock_check(v3d, rv3d)) { + rv3d->persp = RV3D_PERSP; smooth_view(C, v3d, ar, v3d->camera, NULL, new_ofs, NULL, &new_dist, NULL); } else { @@ -2262,11 +2265,11 @@ void VIEW3D_OT_view_selected(wmOperatorType *ot) static int viewcenter_cursor_exec(bContext *C, wmOperator *UNUSED(op)) { View3D *v3d = CTX_wm_view3d(C); - RegionView3D *rv3d= CTX_wm_region_view3d(C); - Scene *scene= CTX_data_scene(C); + RegionView3D *rv3d = CTX_wm_region_view3d(C); + Scene *scene = CTX_data_scene(C); if (rv3d) { - ARegion *ar= CTX_wm_region(C); + ARegion *ar = CTX_wm_region(C); /* non camera center */ float new_ofs[3]; @@ -2296,7 +2299,7 @@ void VIEW3D_OT_view_center_cursor(wmOperatorType *ot) static int view3d_center_camera_exec(bContext *C, wmOperator *UNUSED(op)) /* was view3d_home() in 2.4x */ { - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); float xfac, yfac; float size[2]; @@ -2308,18 +2311,18 @@ static int view3d_center_camera_exec(bContext *C, wmOperator *UNUSED(op)) /* was ED_view3d_context_user_region(C, &v3d, &ar); rv3d = ar->regiondata; - rv3d->camdx= rv3d->camdy= 0.0f; + rv3d->camdx = rv3d->camdy = 0.0f; ED_view3d_calc_camera_border_size(scene, ar, v3d, rv3d, size); /* 4px is just a little room from the edge of the area */ - xfac= (float)ar->winx / (float)(size[0] + 4); - yfac= (float)ar->winy / (float)(size[1] + 4); + xfac = (float)ar->winx / (float)(size[0] + 4); + yfac = (float)ar->winy / (float)(size[1] + 4); - rv3d->camzoom= BKE_screen_view3d_zoom_from_fac(MIN2(xfac, yfac)); + rv3d->camzoom = BKE_screen_view3d_zoom_from_fac(MIN2(xfac, yfac)); CLAMP(rv3d->camzoom, RV3D_CAMZOOM_MIN, RV3D_CAMZOOM_MAX); - WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, CTX_wm_view3d(C)); + WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, CTX_wm_view3d(C)); return OPERATOR_FINISHED; } @@ -2344,9 +2347,9 @@ void VIEW3D_OT_view_center_camera(wmOperatorType *ot) static int render_border_exec(bContext *C, wmOperator *op) { View3D *v3d = CTX_wm_view3d(C); - ARegion *ar= CTX_wm_region(C); - RegionView3D *rv3d= ED_view3d_context_rv3d(C); - Scene *scene= CTX_data_scene(C); + ARegion *ar = CTX_wm_region(C); + RegionView3D *rv3d = ED_view3d_context_rv3d(C); + Scene *scene = CTX_data_scene(C); rcti rect; rctf vb; @@ -2360,10 +2363,10 @@ static int render_border_exec(bContext *C, wmOperator *op) /* calculate range */ ED_view3d_calc_camera_border(scene, ar, v3d, rv3d, &vb, FALSE); - scene->r.border.xmin = ((float)rect.xmin-vb.xmin)/(vb.xmax-vb.xmin); - scene->r.border.ymin = ((float)rect.ymin-vb.ymin)/(vb.ymax-vb.ymin); - scene->r.border.xmax = ((float)rect.xmax-vb.xmin)/(vb.xmax-vb.xmin); - scene->r.border.ymax = ((float)rect.ymax-vb.ymin)/(vb.ymax-vb.ymin); + scene->r.border.xmin = ((float)rect.xmin - vb.xmin) / (vb.xmax - vb.xmin); + scene->r.border.ymin = ((float)rect.ymin - vb.ymin) / (vb.ymax - vb.ymin); + scene->r.border.xmax = ((float)rect.xmax - vb.xmin) / (vb.xmax - vb.xmin); + scene->r.border.ymax = ((float)rect.ymax - vb.ymin) / (vb.ymax - vb.ymin); /* actually set border */ CLAMP(scene->r.border.xmin, 0.0f, 1.0f); @@ -2374,9 +2377,9 @@ static int render_border_exec(bContext *C, wmOperator *op) /* drawing a border surrounding the entire camera view switches off border rendering * or the border covers no pixels */ if ((scene->r.border.xmin <= 0.0f && scene->r.border.xmax >= 1.0f && - scene->r.border.ymin <= 0.0f && scene->r.border.ymax >= 1.0f) || - (scene->r.border.xmin == scene->r.border.xmax || - scene->r.border.ymin == scene->r.border.ymax )) + scene->r.border.ymin <= 0.0f && scene->r.border.ymax >= 1.0f) || + (scene->r.border.xmin == scene->r.border.xmax || + scene->r.border.ymin == scene->r.border.ymax)) { scene->r.mode &= ~R_BORDER; } @@ -2384,7 +2387,7 @@ static int render_border_exec(bContext *C, wmOperator *op) scene->r.mode |= R_BORDER; } - WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, NULL); + WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, NULL); return OPERATOR_FINISHED; @@ -2406,7 +2409,7 @@ void VIEW3D_OT_render_border(wmOperatorType *ot) ot->poll = view3d_camera_active_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* rna */ RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, "X Min", "", INT_MIN, INT_MAX); @@ -2419,10 +2422,10 @@ void VIEW3D_OT_render_border(wmOperatorType *ot) static int view3d_zoom_border_exec(bContext *C, wmOperator *op) { - ARegion *ar= CTX_wm_region(C); + ARegion *ar = CTX_wm_region(C); View3D *v3d = CTX_wm_view3d(C); - RegionView3D *rv3d= CTX_wm_region_view3d(C); - Scene *scene= CTX_data_scene(C); + RegionView3D *rv3d = CTX_wm_region_view3d(C); + Scene *scene = CTX_data_scene(C); /* Zooms in on a border drawn by the user */ rcti rect; @@ -2434,7 +2437,7 @@ static int view3d_zoom_border_exec(bContext *C, wmOperator *op) /* ZBuffer depth vars */ bglMats mats; - float depth_close= FLT_MAX; + float depth_close = FLT_MAX; double cent[2], p[3]; /* note; otherwise opengl won't work */ @@ -2452,25 +2455,25 @@ static int view3d_zoom_border_exec(bContext *C, wmOperator *op) { /* avoid allocating the whole depth buffer */ - ViewDepths depth_temp= {0}; + ViewDepths depth_temp = {0}; /* avoid view3d_update_depths() for speed. */ view3d_update_depths_rect(ar, &depth_temp, &rect); /* find the closest Z pixel */ - depth_close= view3d_depth_near(&depth_temp); + depth_close = view3d_depth_near(&depth_temp); MEM_freeN(depth_temp.depths); } - cent[0] = (((double)rect.xmin)+((double)rect.xmax)) / 2; - cent[1] = (((double)rect.ymin)+((double)rect.ymax)) / 2; + cent[0] = (((double)rect.xmin) + ((double)rect.xmax)) / 2; + cent[1] = (((double)rect.ymin) + ((double)rect.ymax)) / 2; if (rv3d->is_persp) { double p_corner[3]; /* no depths to use, we cant do anything! */ - if (depth_close==FLT_MAX) { + if (depth_close == FLT_MAX) { BKE_report(op->reports, RPT_ERROR, "Depth Too Large"); return OPERATOR_CANCELLED; } @@ -2479,18 +2482,18 @@ static int view3d_zoom_border_exec(bContext *C, wmOperator *op) mats.modelview, mats.projection, (GLint *)mats.viewport, &p[0], &p[1], &p[2])) || (!gluUnProject((double)rect.xmin, (double)rect.ymin, depth_close, - mats.modelview, mats.projection, (GLint *)mats.viewport, - &p_corner[0], &p_corner[1], &p_corner[2]))) + mats.modelview, mats.projection, (GLint *)mats.viewport, + &p_corner[0], &p_corner[1], &p_corner[2]))) { return OPERATOR_CANCELLED; } - dvec[0] = p[0]-p_corner[0]; - dvec[1] = p[1]-p_corner[1]; - dvec[2] = p[2]-p_corner[2]; + dvec[0] = p[0] - p_corner[0]; + dvec[1] = p[1] - p_corner[1]; + dvec[2] = p[2] - p_corner[2]; new_dist = len_v3(dvec); - if (new_dist <= v3d->near * 1.5f) new_dist= v3d->near * 1.5f; + if (new_dist <= v3d->near * 1.5f) new_dist = v3d->near * 1.5f; new_ofs[0] = -p[0]; new_ofs[1] = -p[1]; @@ -2498,7 +2501,7 @@ static int view3d_zoom_border_exec(bContext *C, wmOperator *op) } else { /* othographic */ - /* find the current window width and height */ + /* find the current window width and height */ vb[0] = ar->winx; vb[1] = ar->winy; @@ -2520,20 +2523,20 @@ static int view3d_zoom_border_exec(bContext *C, wmOperator *op) initgrabz(rv3d, -new_ofs[0], -new_ofs[1], -new_ofs[2]); - mval_f[0]= (rect.xmin + rect.xmax - vb[0]) / 2.0f; - mval_f[1]= (rect.ymin + rect.ymax - vb[1]) / 2.0f; + mval_f[0] = (rect.xmin + rect.xmax - vb[0]) / 2.0f; + mval_f[1] = (rect.ymin + rect.ymax - vb[1]) / 2.0f; ED_view3d_win_to_delta(ar, mval_f, dvec); /* center the view to the center of the rectangle */ sub_v3_v3(new_ofs, dvec); } /* work out the ratios, so that everything selected fits when we zoom */ - xscale = ((rect.xmax-rect.xmin)/vb[0]); - yscale = ((rect.ymax-rect.ymin)/vb[1]); - scale = (xscale >= yscale)?xscale:yscale; + xscale = ((rect.xmax - rect.xmin) / vb[0]); + yscale = ((rect.ymax - rect.ymin) / vb[1]); + scale = (xscale >= yscale) ? xscale : yscale; /* zoom in as required, or as far as we can go */ - new_dist = ((new_dist*scale) >= 0.001f * v3d->grid)? new_dist*scale:0.001f * v3d->grid; + new_dist = ((new_dist * scale) >= 0.001f * v3d->grid) ? new_dist * scale : 0.001f * v3d->grid; } smooth_view(C, v3d, ar, NULL, NULL, new_ofs, NULL, &new_dist, NULL); @@ -2546,8 +2549,8 @@ static int view3d_zoom_border_exec(bContext *C, wmOperator *op) static int view3d_zoom_border_invoke(bContext *C, wmOperator *op, wmEvent *event) { - View3D *v3d= CTX_wm_view3d(C); - RegionView3D *rv3d= CTX_wm_region_view3d(C); + View3D *v3d = CTX_wm_view3d(C); + RegionView3D *rv3d = CTX_wm_region_view3d(C); /* if in camera view do not exec the operator so we do not conflict with set render border*/ if ((rv3d->persp != RV3D_CAMOB) || ED_view3d_camera_lock_check(v3d, rv3d)) @@ -2585,19 +2588,19 @@ void VIEW3D_OT_zoom_border(wmOperatorType *ot) /* sets the view to 1:1 camera/render-pixel */ static void view3d_set_1_to_1_viewborder(Scene *scene, ARegion *ar, View3D *v3d) { - RegionView3D *rv3d= ar->regiondata; + RegionView3D *rv3d = ar->regiondata; float size[2]; - int im_width= (scene->r.size*scene->r.xsch)/100; + int im_width = (scene->r.size * scene->r.xsch) / 100; ED_view3d_calc_camera_border_size(scene, ar, v3d, rv3d, size); - rv3d->camzoom= BKE_screen_view3d_zoom_from_fac((float)im_width/size[0]); + rv3d->camzoom = BKE_screen_view3d_zoom_from_fac((float)im_width / size[0]); CLAMP(rv3d->camzoom, RV3D_CAMZOOM_MIN, RV3D_CAMZOOM_MAX); } static int view3d_zoom_1_to_1_camera_exec(bContext *C, wmOperator *UNUSED(op)) { - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); View3D *v3d; ARegion *ar; @@ -2607,7 +2610,7 @@ static int view3d_zoom_1_to_1_camera_exec(bContext *C, wmOperator *UNUSED(op)) view3d_set_1_to_1_viewborder(scene, ar, v3d); - WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, v3d); + WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d); return OPERATOR_FINISHED; } @@ -2637,7 +2640,8 @@ static EnumPropertyItem prop_view_items[] = { {RV3D_VIEW_TOP, "TOP", 0, "Top", "View From the Top"}, {RV3D_VIEW_BOTTOM, "BOTTOM", 0, "Bottom", "View From the Bottom"}, {RV3D_VIEW_CAMERA, "CAMERA", 0, "Camera", "View From the active camera"}, - {0, NULL, 0, NULL, NULL}}; + {0, NULL, 0, NULL, NULL} +}; /* would like to make this a generic function - outside of transform */ @@ -2646,19 +2650,19 @@ static void axis_set_view(bContext *C, View3D *v3d, ARegion *ar, float q1, float q2, float q3, float q4, short view, int perspo, int align_active) { - RegionView3D *rv3d= ar->regiondata; /* no NULL check is needed, poll checks */ + RegionView3D *rv3d = ar->regiondata; /* no NULL check is needed, poll checks */ float new_quat[4]; - new_quat[0]= q1; new_quat[1]= q2; - new_quat[2]= q3; new_quat[3]= q4; + new_quat[0] = q1; new_quat[1] = q2; + new_quat[2] = q3; new_quat[3] = q4; normalize_qt(new_quat); if (align_active) { /* align to active object */ - Object *obact= CTX_data_active_object(C); - if (obact==NULL) { + Object *obact = CTX_data_active_object(C); + if (obact == NULL) { /* no active object, ignore this option */ - align_active= FALSE; + align_active = FALSE; } else { float obact_quat[4]; @@ -2667,15 +2671,15 @@ static void axis_set_view(bContext *C, View3D *v3d, ARegion *ar, /* same as transform manipulator when normal is set */ ED_getTransformOrientationMatrix(C, twmat, FALSE); - mat3_to_quat( obact_quat,twmat); + mat3_to_quat(obact_quat, twmat); invert_qt(obact_quat); mul_qt_qtqt(new_quat, new_quat, obact_quat); - rv3d->view= view= RV3D_VIEW_USER; + rv3d->view = view = RV3D_VIEW_USER; } } - if (align_active==FALSE) { + if (align_active == FALSE) { /* normal operation */ if (rv3d->viewlock) { /* only pass on if */ @@ -2700,17 +2704,17 @@ static void axis_set_view(bContext *C, View3D *v3d, ARegion *ar, return; } - if (rv3d->persp==RV3D_CAMOB && v3d->camera) { + if (rv3d->persp == RV3D_CAMOB && v3d->camera) { - if (U.uiflag & USER_AUTOPERSP) rv3d->persp= view ? RV3D_ORTHO : RV3D_PERSP; - else if (rv3d->persp==RV3D_CAMOB) rv3d->persp= perspo; + if (U.uiflag & USER_AUTOPERSP) rv3d->persp = view ? RV3D_ORTHO : RV3D_PERSP; + else if (rv3d->persp == RV3D_CAMOB) rv3d->persp = perspo; smooth_view(C, v3d, ar, v3d->camera, NULL, rv3d->ofs, new_quat, NULL, NULL); } else { - if (U.uiflag & USER_AUTOPERSP) rv3d->persp= view ? RV3D_ORTHO : RV3D_PERSP; - else if (rv3d->persp==RV3D_CAMOB) rv3d->persp= perspo; + if (U.uiflag & USER_AUTOPERSP) rv3d->persp = view ? RV3D_ORTHO : RV3D_PERSP; + else if (rv3d->persp == RV3D_CAMOB) rv3d->persp = perspo; smooth_view(C, v3d, ar, NULL, NULL, NULL, new_quat, NULL, NULL); } @@ -2722,7 +2726,7 @@ static int viewnumpad_exec(bContext *C, wmOperator *op) View3D *v3d; ARegion *ar; RegionView3D *rv3d; - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); static int perspo = RV3D_PERSP; int viewnum, align_active, nextperspo; @@ -2735,25 +2739,25 @@ static int viewnumpad_exec(bContext *C, wmOperator *op) /* set this to zero, gets handled in axis_set_view */ if (rv3d->viewlock) - align_active= 0; + align_active = 0; /* Use this to test if we started out with a camera */ if (rv3d->persp == RV3D_CAMOB) { - nextperspo= rv3d->lpersp; + nextperspo = rv3d->lpersp; } else { - nextperspo= perspo; + nextperspo = perspo; } switch (viewnum) { - case RV3D_VIEW_BOTTOM : + case RV3D_VIEW_BOTTOM: axis_set_view(C, v3d, ar, 0.0, -1.0, 0.0, 0.0, viewnum, nextperspo, align_active); break; case RV3D_VIEW_BACK: - axis_set_view(C, v3d, ar, 0.0, 0.0, (float)-cos(M_PI/4.0), (float)-cos(M_PI/4.0), + axis_set_view(C, v3d, ar, 0.0, 0.0, (float)-cos(M_PI / 4.0), (float)-cos(M_PI / 4.0), viewnum, nextperspo, align_active); break; @@ -2768,7 +2772,7 @@ static int viewnumpad_exec(bContext *C, wmOperator *op) break; case RV3D_VIEW_FRONT: - axis_set_view(C, v3d, ar, (float)cos(M_PI/4.0), (float)-sin(M_PI/4.0), 0.0, 0.0, + axis_set_view(C, v3d, ar, (float)cos(M_PI / 4.0), (float)-sin(M_PI / 4.0), 0.0, 0.0, viewnum, nextperspo, align_active); break; @@ -2778,24 +2782,24 @@ static int viewnumpad_exec(bContext *C, wmOperator *op) break; case RV3D_VIEW_CAMERA: - if (rv3d->viewlock==0) { + if (rv3d->viewlock == 0) { /* lastview - */ if (rv3d->persp != RV3D_CAMOB) { - Object *ob= OBACT; + Object *ob = OBACT; if (!rv3d->smooth_timer) { /* store settings of current view before allowing overwriting with camera view * only if we're not currently in a view transition */ copy_qt_qt(rv3d->lviewquat, rv3d->viewquat); - rv3d->lview= rv3d->view; - rv3d->lpersp= rv3d->persp; + rv3d->lview = rv3d->view; + rv3d->lpersp = rv3d->persp; } #if 0 - if (G.qual==LR_ALTKEY) { + if (G.qual == LR_ALTKEY) { if (oldcamera && is_an_active_object(oldcamera)) { - v3d->camera= oldcamera; + v3d->camera = oldcamera; } handle_view3d_lock(); } @@ -2804,32 +2808,32 @@ static int viewnumpad_exec(bContext *C, wmOperator *op) /* first get the default camera for the view lock type */ if (v3d->scenelock) { /* sets the camera view if available */ - v3d->camera= scene->camera; + v3d->camera = scene->camera; } else { /* use scene camera if one is not set (even though we're unlocked) */ - if (v3d->camera==NULL) { - v3d->camera= scene->camera; + if (v3d->camera == NULL) { + v3d->camera = scene->camera; } } /* if the camera isn't found, check a number of options */ - if (v3d->camera==NULL && ob && ob->type==OB_CAMERA) - v3d->camera= ob; + if (v3d->camera == NULL && ob && ob->type == OB_CAMERA) + v3d->camera = ob; - if (v3d->camera==NULL) - v3d->camera= scene_find_camera(scene); + if (v3d->camera == NULL) + v3d->camera = scene_find_camera(scene); /* couldnt find any useful camera, bail out */ - if (v3d->camera==NULL) + if (v3d->camera == NULL) return OPERATOR_CANCELLED; /* important these don't get out of sync for locked scenes */ if (v3d->scenelock) - scene->camera= v3d->camera; + scene->camera = v3d->camera; /* finally do snazzy view zooming */ - rv3d->persp= RV3D_CAMOB; + rv3d->persp = RV3D_CAMOB; smooth_view(C, v3d, ar, NULL, v3d->camera, rv3d->ofs, rv3d->viewquat, &rv3d->dist, &v3d->lens); } @@ -2843,11 +2847,11 @@ static int viewnumpad_exec(bContext *C, wmOperator *op) } break; - default : + default: break; } - if (rv3d->persp != RV3D_CAMOB) perspo= rv3d->persp; + if (rv3d->persp != RV3D_CAMOB) perspo = rv3d->persp; return OPERATOR_FINISHED; } @@ -2876,7 +2880,8 @@ static EnumPropertyItem prop_view_orbit_items[] = { {V3D_VIEW_STEPRIGHT, "ORBITRIGHT", 0, "Orbit Right", "Orbit the view around to the Right"}, {V3D_VIEW_STEPUP, "ORBITUP", 0, "Orbit Up", "Orbit the view Up"}, {V3D_VIEW_STEPDOWN, "ORBITDOWN", 0, "Orbit Down", "Orbit the view Down"}, - {0, NULL, 0, NULL, NULL}}; + {0, NULL, 0, NULL, NULL} +}; static int vieworbit_exec(bContext *C, wmOperator *op) { @@ -2892,31 +2897,31 @@ static int vieworbit_exec(bContext *C, wmOperator *op) orbitdir = RNA_enum_get(op->ptr, "type"); - if (rv3d->viewlock==0) { + if (rv3d->viewlock == 0) { if ((rv3d->persp != RV3D_CAMOB) || ED_view3d_camera_lock_check(v3d, rv3d)) { if (orbitdir == V3D_VIEW_STEPLEFT || orbitdir == V3D_VIEW_STEPRIGHT) { float si; /* z-axis */ - phi= (float)(M_PI/360.0)*U.pad_rot_angle; - if (orbitdir == V3D_VIEW_STEPRIGHT) phi= -phi; - si= (float)sin(phi); - q1[0]= (float)cos(phi); - q1[1]= q1[2]= 0.0; - q1[3]= si; + phi = (float)(M_PI / 360.0) * U.pad_rot_angle; + if (orbitdir == V3D_VIEW_STEPRIGHT) phi = -phi; + si = (float)sin(phi); + q1[0] = (float)cos(phi); + q1[1] = q1[2] = 0.0; + q1[3] = si; mul_qt_qtqt(new_quat, rv3d->viewquat, q1); - rv3d->view= RV3D_VIEW_USER; + rv3d->view = RV3D_VIEW_USER; } else if (orbitdir == V3D_VIEW_STEPDOWN || orbitdir == V3D_VIEW_STEPUP) { /* horizontal axis */ - copy_v3_v3(q1+1, rv3d->viewinv[0]); + copy_v3_v3(q1 + 1, rv3d->viewinv[0]); - normalize_v3(q1+1); - phi= (float)(M_PI/360.0)*U.pad_rot_angle; - if (orbitdir == V3D_VIEW_STEPDOWN) phi= -phi; - q1[0]= (float)cos(phi); - mul_v3_fl(q1+1, sin(phi)); + normalize_v3(q1 + 1); + phi = (float)(M_PI / 360.0) * U.pad_rot_angle; + if (orbitdir == V3D_VIEW_STEPDOWN) phi = -phi; + q1[0] = (float)cos(phi); + mul_v3_fl(q1 + 1, sin(phi)); mul_qt_qtqt(new_quat, rv3d->viewquat, q1); - rv3d->view= RV3D_VIEW_USER; + rv3d->view = RV3D_VIEW_USER; } smooth_view(C, CTX_wm_view3d(C), ar, NULL, NULL, NULL, new_quat, NULL, NULL); @@ -2947,23 +2952,24 @@ static EnumPropertyItem prop_view_pan_items[] = { {V3D_VIEW_PANRIGHT, "PANRIGHT", 0, "Pan Right", "Pan the view to the Right"}, {V3D_VIEW_PANUP, "PANUP", 0, "Pan Up", "Pan the view Up"}, {V3D_VIEW_PANDOWN, "PANDOWN", 0, "Pan Down", "Pan the view Down"}, - {0, NULL, 0, NULL, NULL}}; + {0, NULL, 0, NULL, NULL} +}; static int viewpan_exec(bContext *C, wmOperator *op) { - ARegion *ar= CTX_wm_region(C); - RegionView3D *rv3d= CTX_wm_region_view3d(C); + ARegion *ar = CTX_wm_region(C); + RegionView3D *rv3d = CTX_wm_region_view3d(C); float vec[3]; - float mval_f[2]= {0.0f, 0.0f}; + float mval_f[2] = {0.0f, 0.0f}; int pandir; pandir = RNA_enum_get(op->ptr, "type"); initgrabz(rv3d, 0.0, 0.0, 0.0); - if (pandir == V3D_VIEW_PANRIGHT) { mval_f[0]= -32.0f; ED_view3d_win_to_delta(ar, mval_f, vec); } - else if (pandir == V3D_VIEW_PANLEFT) { mval_f[0]= 32.0f; ED_view3d_win_to_delta(ar, mval_f, vec); } - else if (pandir == V3D_VIEW_PANUP) { mval_f[1]= -25.0f; ED_view3d_win_to_delta(ar, mval_f, vec); } - else if (pandir == V3D_VIEW_PANDOWN) { mval_f[1]= 25.0f; ED_view3d_win_to_delta(ar, mval_f, vec); } + if (pandir == V3D_VIEW_PANRIGHT) { mval_f[0] = -32.0f; ED_view3d_win_to_delta(ar, mval_f, vec); } + else if (pandir == V3D_VIEW_PANLEFT) { mval_f[0] = 32.0f; ED_view3d_win_to_delta(ar, mval_f, vec); } + else if (pandir == V3D_VIEW_PANUP) { mval_f[1] = -25.0f; ED_view3d_win_to_delta(ar, mval_f, vec); } + else if (pandir == V3D_VIEW_PANDOWN) { mval_f[1] = 25.0f; ED_view3d_win_to_delta(ar, mval_f, vec); } add_v3_v3(rv3d->ofs, vec); if (rv3d->viewlock & RV3D_BOXVIEW) @@ -3000,10 +3006,10 @@ static int viewpersportho_exec(bContext *C, wmOperator *UNUSED(op)) ED_view3d_context_user_region(C, &v3d_dummy, &ar); rv3d = ar->regiondata; - if (rv3d->viewlock==0) { - if (rv3d->persp!=RV3D_ORTHO) - rv3d->persp=RV3D_ORTHO; - else rv3d->persp=RV3D_PERSP; + if (rv3d->viewlock == 0) { + if (rv3d->persp != RV3D_ORTHO) + rv3d->persp = RV3D_ORTHO; + else rv3d->persp = RV3D_PERSP; ED_region_tag_redraw(ar); } @@ -3031,7 +3037,7 @@ void VIEW3D_OT_view_persportho(wmOperatorType *ot) static BGpic *background_image_add(bContext *C) { - View3D *v3d= CTX_wm_view3d(C); + View3D *v3d = CTX_wm_view3d(C); return ED_view3D_background_image_new(v3d); } @@ -3045,21 +3051,21 @@ static int background_image_add_exec(bContext *C, wmOperator *UNUSED(op)) static int background_image_add_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { - View3D *v3d= CTX_wm_view3d(C); - Image *ima= NULL; + View3D *v3d = CTX_wm_view3d(C); + Image *ima = NULL; BGpic *bgpic; - char name[MAX_ID_NAME-2]; + char name[MAX_ID_NAME - 2]; /* check input variables */ if (RNA_struct_property_is_set(op->ptr, "filepath")) { char path[FILE_MAX]; RNA_string_get(op->ptr, "filepath", path); - ima= BKE_add_image_file(path); + ima = BKE_add_image_file(path); } else if (RNA_struct_property_is_set(op->ptr, "name")) { RNA_string_get(op->ptr, "name", name); - ima= (Image *)find_id("IM", name); + ima = (Image *)find_id("IM", name); } bgpic = background_image_add(C); @@ -3067,14 +3073,14 @@ static int background_image_add_invoke(bContext *C, wmOperator *op, wmEvent *UNU if (ima) { bgpic->ima = ima; - if (ima->id.us==0) id_us_plus(&ima->id); + if (ima->id.us == 0) id_us_plus(&ima->id); else id_lib_extern(&ima->id); if (!(v3d->flag & V3D_DISPBGPICS)) v3d->flag |= V3D_DISPBGPICS; } - WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, v3d); + WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d); return OPERATOR_FINISHED; } @@ -3095,7 +3101,7 @@ void VIEW3D_OT_background_image_add(wmOperatorType *ot) ot->flag = 0; /* properties */ - RNA_def_string(ot->srna, "name", "Image", MAX_ID_NAME-2, "Name", "Image name to assign"); + RNA_def_string(ot->srna, "name", "Image", MAX_ID_NAME - 2, "Name", "Image name to assign"); RNA_def_string(ot->srna, "filepath", "Path", FILE_MAX, "Filepath", "Path to image file"); } @@ -3105,11 +3111,11 @@ static int background_image_remove_exec(bContext *C, wmOperator *op) { View3D *v3d = CTX_wm_view3d(C); int index = RNA_int_get(op->ptr, "index"); - BGpic *bgpic_rem= BLI_findlink(&v3d->bgpicbase, index); + BGpic *bgpic_rem = BLI_findlink(&v3d->bgpicbase, index); if (bgpic_rem) { ED_view3D_background_image_remove(v3d, bgpic_rem); - WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, v3d); + WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d); return OPERATOR_FINISHED; } else { @@ -3141,14 +3147,14 @@ static void calc_clipping_plane(float clip[6][4], BoundBox *clipbb) { int val; - for (val=0; val<4; val++) { + for (val = 0; val < 4; val++) { - normal_tri_v3( clip[val],clipbb->vec[val], clipbb->vec[val==3?0:val+1], clipbb->vec[val+4]); + normal_tri_v3(clip[val], clipbb->vec[val], clipbb->vec[val == 3 ? 0 : val + 1], clipbb->vec[val + 4]); - clip[val][3]= - - clip[val][0]*clipbb->vec[val][0] - - clip[val][1]*clipbb->vec[val][1] - - clip[val][2]*clipbb->vec[val][2]; + /* TODO - this is just '-dot_v3v3(clip[val], clipbb->vec[val])' isnt it? - sould replace */ + clip[val][3] = -clip[val][0] * clipbb->vec[val][0] - + clip[val][1] * clipbb->vec[val][1] - + clip[val][2] * clipbb->vec[val][2]; } } @@ -3160,7 +3166,7 @@ static void calc_local_clipping(float clip_local[][4], BoundBox *clipbb, float m invert_m4_m4(imat, mat); - for (i=0; i<8; i++) { + for (i = 0; i < 8; i++) { mul_v3_m4v3(clipbb_local.vec[i], imat, clipbb->vec[i]); } @@ -3175,7 +3181,7 @@ void ED_view3d_clipping_local(RegionView3D *rv3d, float mat[][4]) static int view3d_clipping_exec(bContext *C, wmOperator *op) { - RegionView3D *rv3d= CTX_wm_region_view3d(C); + RegionView3D *rv3d = CTX_wm_region_view3d(C); ViewContext vc; bglMats mats; rcti rect; @@ -3186,7 +3192,7 @@ static int view3d_clipping_exec(bContext *C, wmOperator *op) rect.ymax = RNA_int_get(op->ptr, "ymax"); rv3d->rflag |= RV3D_CLIPPING; - rv3d->clipbb= MEM_callocN(sizeof(BoundBox), "clipbb"); + rv3d->clipbb = MEM_callocN(sizeof(BoundBox), "clipbb"); /* note; otherwise opengl won't work */ view3d_operator_needs_opengl(C); @@ -3200,14 +3206,14 @@ static int view3d_clipping_exec(bContext *C, wmOperator *op) static int view3d_clipping_invoke(bContext *C, wmOperator *op, wmEvent *event) { - RegionView3D *rv3d= CTX_wm_region_view3d(C); - ARegion *ar= CTX_wm_region(C); + RegionView3D *rv3d = CTX_wm_region_view3d(C); + ARegion *ar = CTX_wm_region(C); if (rv3d->rflag & RV3D_CLIPPING) { rv3d->rflag &= ~RV3D_CLIPPING; ED_region_tag_redraw(ar); if (rv3d->clipbb) MEM_freeN(rv3d->clipbb); - rv3d->clipbb= NULL; + rv3d->clipbb = NULL; return OPERATOR_FINISHED; } else { @@ -3247,21 +3253,21 @@ void VIEW3D_OT_clip_border(wmOperatorType *ot) /* mx my in region coords */ static int set_3dcursor_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event) { - Scene *scene= CTX_data_scene(C); - ARegion *ar= CTX_wm_region(C); + Scene *scene = CTX_data_scene(C); + ARegion *ar = CTX_wm_region(C); View3D *v3d = CTX_wm_view3d(C); - RegionView3D *rv3d= CTX_wm_region_view3d(C); + RegionView3D *rv3d = CTX_wm_region_view3d(C); float dx, dy, fz, *fp = NULL, dvec[3], oldcurs[3]; int mval[2]; // short ctrl= 0; // XXX int flip; - fp= give_cursor(scene, v3d); + fp = give_cursor(scene, v3d); // if (obedit && ctrl) lr_click= 1; copy_v3_v3(oldcurs, fp); project_int_noclip(ar, fp, mval); - flip= initgrabz(rv3d, fp[0], fp[1], fp[2]); + flip = initgrabz(rv3d, fp[0], fp[1], fp[2]); /* reset the depth based on the view offset */ if (flip) { @@ -3269,20 +3275,20 @@ static int set_3dcursor_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *eve /* re initialize */ project_int_noclip(ar, fp, mval); - flip= initgrabz(rv3d, fp[0], fp[1], fp[2]); + flip = initgrabz(rv3d, fp[0], fp[1], fp[2]); (void)flip; } - if (mval[0]!=IS_CLIPPED) { + if (mval[0] != IS_CLIPPED) { short depth_used = 0; if (U.uiflag & USER_ORBIT_ZBUF) { /* maybe this should be accessed some other way */ view3d_operator_needs_opengl(C); if (ED_view3d_autodist(scene, ar, v3d, event->mval, fp)) - depth_used= 1; + depth_used = 1; } - if (depth_used==0) { + if (depth_used == 0) { float mval_f[2]; VECSUB2D(mval_f, mval, event->mval); ED_view3d_win_to_delta(ar, mval_f, dvec); @@ -3291,21 +3297,21 @@ static int set_3dcursor_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *eve } else { - dx= ((float)(event->mval[0]-(ar->winx/2)))*rv3d->zfac/(ar->winx/2); - dy= ((float)(event->mval[1]-(ar->winy/2)))*rv3d->zfac/(ar->winy/2); + dx = ((float)(event->mval[0] - (ar->winx / 2))) * rv3d->zfac / (ar->winx / 2); + dy = ((float)(event->mval[1] - (ar->winy / 2))) * rv3d->zfac / (ar->winy / 2); - fz= rv3d->persmat[0][3]*fp[0]+ rv3d->persmat[1][3]*fp[1]+ rv3d->persmat[2][3]*fp[2]+ rv3d->persmat[3][3]; - fz= fz/rv3d->zfac; + fz = rv3d->persmat[0][3] * fp[0] + rv3d->persmat[1][3] * fp[1] + rv3d->persmat[2][3] * fp[2] + rv3d->persmat[3][3]; + fz = fz / rv3d->zfac; - fp[0]= (rv3d->persinv[0][0]*dx + rv3d->persinv[1][0]*dy+ rv3d->persinv[2][0]*fz)-rv3d->ofs[0]; - fp[1]= (rv3d->persinv[0][1]*dx + rv3d->persinv[1][1]*dy+ rv3d->persinv[2][1]*fz)-rv3d->ofs[1]; - fp[2]= (rv3d->persinv[0][2]*dx + rv3d->persinv[1][2]*dy+ rv3d->persinv[2][2]*fz)-rv3d->ofs[2]; + fp[0] = (rv3d->persinv[0][0] * dx + rv3d->persinv[1][0] * dy + rv3d->persinv[2][0] * fz) - rv3d->ofs[0]; + fp[1] = (rv3d->persinv[0][1] * dx + rv3d->persinv[1][1] * dy + rv3d->persinv[2][1] * fz) - rv3d->ofs[1]; + fp[2] = (rv3d->persinv[0][2] * dx + rv3d->persinv[1][2] * dy + rv3d->persinv[2][2] * fz) - rv3d->ofs[2]; } if (v3d && v3d->localvd) - WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, v3d); + WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d); else - WM_event_add_notifier(C, NC_SCENE|NA_EDITED, scene); + WM_event_add_notifier(C, NC_SCENE | NA_EDITED, scene); return OPERATOR_FINISHED; } @@ -3346,7 +3352,7 @@ static int manipulator_invoke(bContext *C, wmOperator *op, wmEvent *event) /* note; otherwise opengl won't work */ view3d_operator_needs_opengl(C); - if (0==BIF_do_manipulator(C, event, op)) + if (0 == BIF_do_manipulator(C, event, op)) return OPERATOR_PASS_THROUGH; return OPERATOR_FINISHED; @@ -3373,7 +3379,7 @@ static int enable_manipulator_invoke(bContext *C, wmOperator *op, wmEvent *UNUSE { View3D *v3d = CTX_wm_view3d(C); - v3d->twtype=0; + v3d->twtype = 0; if (RNA_boolean_get(op->ptr, "translate")) v3d->twtype |= V3D_MANIP_TRANSLATE; @@ -3382,7 +3388,7 @@ static int enable_manipulator_invoke(bContext *C, wmOperator *op, wmEvent *UNUSE if (RNA_boolean_get(op->ptr, "scale")) v3d->twtype |= V3D_MANIP_SCALE; - WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, v3d); + WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d); return OPERATOR_FINISHED; } @@ -3409,11 +3415,11 @@ void VIEW3D_OT_enable_manipulator(wmOperatorType *ot) static float view_autodist_depth_margin(ARegion *ar, const int mval[2], int margin) { - ViewDepths depth_temp= {0}; + ViewDepths depth_temp = {0}; rcti rect; float depth_close; - if (margin==0) { + if (margin == 0) { /* Get Z Depths, needed for perspective, nice for ortho */ rect.xmin = mval[0]; rect.ymin = mval[1]; @@ -3429,7 +3435,7 @@ static float view_autodist_depth_margin(ARegion *ar, const int mval[2], int marg } view3d_update_depths_rect(ar, &depth_temp, &rect); - depth_close= view3d_depth_near(&depth_temp); + depth_close = view3d_depth_near(&depth_temp); if (depth_temp.depths) MEM_freeN(depth_temp.depths); return depth_close; } @@ -3438,16 +3444,16 @@ static float view_autodist_depth_margin(ARegion *ar, const int mval[2], int marg int ED_view3d_autodist(Scene *scene, ARegion *ar, View3D *v3d, const int mval[2], float mouse_worldloc[3]) { bglMats mats; /* ZBuffer depth vars */ - float depth_close= FLT_MAX; + float depth_close = FLT_MAX; double cent[2], p[3]; /* Get Z Depths, needed for perspective, nice for ortho */ bgl_get_mats(&mats); draw_depth(scene, ar, v3d, NULL); - depth_close= view_autodist_depth_margin(ar, mval, 4); + depth_close = view_autodist_depth_margin(ar, mval, 4); - if (depth_close==FLT_MAX) + if (depth_close == FLT_MAX) return 0; cent[0] = (double)mval[0]; @@ -3468,13 +3474,13 @@ int ED_view3d_autodist(Scene *scene, ARegion *ar, View3D *v3d, const int mval[2] int ED_view3d_autodist_init(Scene *scene, ARegion *ar, View3D *v3d, int mode) //, float *autodist ) { /* Get Z Depths, needed for perspective, nice for ortho */ - switch(mode) { - case 0: - draw_depth(scene, ar, v3d, NULL); - break; - case 1: - draw_depth_gpencil(scene, ar, v3d); - break; + switch (mode) { + case 0: + draw_depth(scene, ar, v3d, NULL); + break; + case 1: + draw_depth_gpencil(scene, ar, v3d); + break; } return 1; @@ -3490,11 +3496,11 @@ int ED_view3d_autodist_simple(ARegion *ar, const int mval[2], float mouse_worldl /* Get Z Depths, needed for perspective, nice for ortho */ if (force_depth) - depth= *force_depth; + depth = *force_depth; else - depth= view_autodist_depth_margin(ar, mval, margin); + depth = view_autodist_depth_margin(ar, mval, margin); - if (depth==FLT_MAX) + if (depth == FLT_MAX) return 0; cent[0] = (double)mval[0]; @@ -3503,7 +3509,7 @@ int ED_view3d_autodist_simple(ARegion *ar, const int mval[2], float mouse_worldl bgl_get_mats(&mats); if (!gluUnProject(cent[0], cent[1], depth, - mats.modelview, mats.projection, (GLint *)mats.viewport, &p[0], &p[1], &p[2])) + mats.modelview, mats.projection, (GLint *)mats.viewport, &p[0], &p[1], &p[2])) { return 0; } @@ -3516,9 +3522,9 @@ int ED_view3d_autodist_simple(ARegion *ar, const int mval[2], float mouse_worldl int ED_view3d_autodist_depth(struct ARegion *ar, const int mval[2], int margin, float *depth) { - *depth= view_autodist_depth_margin(ar, mval, margin); + *depth = view_autodist_depth_margin(ar, mval, margin); - return (*depth==FLT_MAX) ? 0:1; + return (*depth == FLT_MAX) ? 0 : 1; } static int depth_segment_cb(int x, int y, void *userData) @@ -3527,13 +3533,13 @@ static int depth_segment_cb(int x, int y, void *userData) int mval[2]; float depth; - mval[0]= x; - mval[1]= y; + mval[0] = x; + mval[1] = y; - depth= view_autodist_depth_margin(data->ar, mval, data->margin); + depth = view_autodist_depth_margin(data->ar, mval, data->margin); if (depth != FLT_MAX) { - data->depth= depth; + data->depth = depth; return 0; } else { @@ -3548,18 +3554,18 @@ int ED_view3d_autodist_depth_seg(struct ARegion *ar, const int mval_sta[2], cons int p1[2]; int p2[2]; - data.ar= ar; - data.margin= margin; - data.depth= FLT_MAX; + data.ar = ar; + data.margin = margin; + data.depth = FLT_MAX; copy_v2_v2_int(p1, mval_sta); copy_v2_v2_int(p2, mval_end); plot_line_v2v2i(p1, p2, depth_segment_cb, &data); - *depth= data.depth; + *depth = data.depth; - return (*depth==FLT_MAX) ? 0:1; + return (*depth == FLT_MAX) ? 0 : 1; } /** @@ -3585,9 +3591,9 @@ void ED_view3d_from_m4(float mat[][4], float ofs[3], float quat[4], float *dist) float nmat[3][3]; float vec[3]; - vec[0]= 0.0f; - vec[1]= 0.0f; - vec[2]= -(*dist); + vec[0] = 0.0f; + vec[1] = 0.0f; + vec[2] = -(*dist); copy_m3_m4(nmat, mat); normalize_m3(nmat); @@ -3599,8 +3605,8 @@ void ED_view3d_from_m4(float mat[][4], float ofs[3], float quat[4], float *dist) void ED_view3d_to_m4(float mat[][4], const float ofs[3], const float quat[4], const float dist) { - float iviewquat[4]= {-quat[0], quat[1], quat[2], quat[3]}; - float dvec[3]= {0.0f, 0.0f, dist}; + float iviewquat[4] = {-quat[0], quat[1], quat[2], quat[3]}; + float dvec[3] = {0.0f, 0.0f, dist}; quat_to_mat4(mat, iviewquat); mul_mat3_m4_v3(mat, dvec); @@ -3618,7 +3624,7 @@ void ED_view3d_from_object(Object *ob, float ofs[3], float quat[4], float *dist, camera_params_init(¶ms); camera_params_from_object(¶ms, ob); - *lens= params.lens; + *lens = params.lens; } } @@ -3632,13 +3638,13 @@ void ED_view3d_to_object(Object *ob, const float ofs[3], const float quat[4], co BGpic *ED_view3D_background_image_new(View3D *v3d) { - BGpic *bgpic= MEM_callocN(sizeof(BGpic), "Background Image"); + BGpic *bgpic = MEM_callocN(sizeof(BGpic), "Background Image"); - bgpic->size= 5.0; - bgpic->blend= 0.5; - bgpic->iuser.fie_ima= 2; - bgpic->iuser.ok= 1; - bgpic->view= 0; /* 0 for all */ + bgpic->size = 5.0; + bgpic->blend = 0.5; + bgpic->iuser.fie_ima = 2; + bgpic->iuser.ok = 1; + bgpic->view = 0; /* 0 for all */ bgpic->flag |= V3D_BGPIC_EXPANDED; BLI_addtail(&v3d->bgpicbase, bgpic); @@ -3655,13 +3661,13 @@ void ED_view3D_background_image_remove(View3D *v3d, BGpic *bgpic) void ED_view3D_background_image_clear(View3D *v3d) { - BGpic *bgpic= v3d->bgpicbase.first; + BGpic *bgpic = v3d->bgpicbase.first; while (bgpic) { - BGpic *next_bgpic= bgpic->next; + BGpic *next_bgpic = bgpic->next; ED_view3D_background_image_remove(v3d, bgpic); - bgpic= next_bgpic; + bgpic = next_bgpic; } } diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c index 819d3e0ca4a..0e7c71f0c0a 100644 --- a/source/blender/editors/space_view3d/view3d_fly.c +++ b/source/blender/editors/space_view3d/view3d_fly.c @@ -56,7 +56,7 @@ #include "PIL_time.h" /* smoothview */ -#include "view3d_intern.h" // own include +#include "view3d_intern.h" // own include /* NOTE: these defines are saved in keymap files, do not change values but just add new ones */ enum { FLY_MODAL_CANCEL = 1, @@ -174,7 +174,7 @@ typedef struct FlyInfo { unsigned char use_freelook; int mval[2]; /* latest 2D mouse values */ - wmNDOFMotionData* ndof; /* latest 3D mouse values */ + wmNDOFMotionData*ndof; /* latest 3D mouse values */ /* fly state state */ float speed; /* the speed the view is moving per redraw */ @@ -265,9 +265,9 @@ static void drawFlyPixel(const struct bContext *UNUSED(C), struct ARegion *UNUSE } /* FlyInfo->state */ -#define FLY_RUNNING 0 -#define FLY_CANCEL 1 -#define FLY_CONFIRM 2 +#define FLY_RUNNING 0 +#define FLY_CANCEL 1 +#define FLY_CONFIRM 2 static int initFlyInfo(bContext *C, FlyInfo *fly, wmOperator *op, wmEvent *event) { @@ -312,7 +312,7 @@ static int initFlyInfo(bContext *C, FlyInfo *fly, wmOperator *op, wmEvent *event fly->use_freelook = FALSE; #ifdef NDOF_FLY_DRAW_TOOMUCH - fly->redraw= 1; + fly->redraw = 1; #endif zero_v3(fly->dvec_prev); @@ -348,8 +348,8 @@ static int initFlyInfo(bContext *C, FlyInfo *fly, wmOperator *op, wmEvent *event (fly->v3d->camera != NULL) && (fly->rv3d->is_persp == FALSE)) { - ((Camera *)fly->v3d->camera->data)->type= CAM_PERSP; - fly->is_ortho_cam= TRUE; + ((Camera *)fly->v3d->camera->data)->type = CAM_PERSP; + fly->is_ortho_cam = TRUE; } if (fly->rv3d->persp == RV3D_CAMOB) { @@ -376,7 +376,7 @@ static int initFlyInfo(bContext *C, FlyInfo *fly, wmOperator *op, wmEvent *event else { /* perspective or ortho */ if (fly->rv3d->persp == RV3D_ORTHO) - fly->rv3d->persp = RV3D_PERSP; /*if ortho projection, make perspective */ + fly->rv3d->persp = RV3D_PERSP; /*if ortho projection, make perspective */ copy_qt_qt(fly->rot_backup, fly->rv3d->viewquat); copy_v3_v3(fly->ofs_backup, fly->rv3d->ofs); @@ -444,8 +444,9 @@ static int flyEnd(bContext *C, FlyInfo *fly) DAG_id_tag_update(fly->root_parent ? &fly->root_parent->id : &v3d->camera->id, OB_RECALC_OB); } else { /* not camera */ + /* Apply the fly mode view */ - /*restore the dist*/ + /* restore the dist */ float mat[3][3]; upvec[0] = upvec[1] = 0; upvec[2] = fly->dist_backup; /*x and y are 0*/ @@ -489,14 +490,14 @@ static void flyEvent(FlyInfo *fly, wmEvent *event) // puts("ndof motion detected in fly mode!"); // static const char* tag_name = "3D mouse position"; - wmNDOFMotionData* incoming_ndof = (wmNDOFMotionData*)event->customdata; + wmNDOFMotionData *incoming_ndof = (wmNDOFMotionData *)event->customdata; switch (incoming_ndof->progress) { case P_STARTING: // start keeping track of 3D mouse position #ifdef NDOF_FLY_DEBUG puts("start keeping track of 3D mouse position"); #endif - // fall through... + // fall through... case P_IN_PROGRESS: // update 3D mouse position #ifdef NDOF_FLY_DEBUG @@ -584,8 +585,8 @@ static void flyEvent(FlyInfo *fly, wmEvent *event) fly->pan_view = FALSE; break; - /* implement WASD keys, - * comments only for 'forward '*/ + /* implement WASD keys, + * comments only for 'forward '*/ case FLY_MODAL_DIR_FORWARD: if (fly->axis == 2 && fly->speed < 0.0f) { /* reverse direction stops, tap again to continue */ fly->axis = -1; @@ -686,11 +687,11 @@ static void flyEvent(FlyInfo *fly, wmEvent *event) } } -static void move_camera(bContext* C, RegionView3D* rv3d, FlyInfo* fly, int orientationChanged, int positionChanged) +static void move_camera(bContext *C, RegionView3D *rv3d, FlyInfo *fly, int orientationChanged, int positionChanged) { /* we are in camera view so apply the view ofs and quat to the view matrix and set the camera to the view */ - View3D* v3d = fly->v3d; + View3D*v3d = fly->v3d; Scene *scene = fly->scene; ID *id_key; @@ -766,19 +767,18 @@ static int flyApply(bContext *C, FlyInfo *fly) RegionView3D *rv3d = fly->rv3d; ARegion *ar = fly->ar; - float mat[3][3], /* 3x3 copy of the view matrix so we can move along the view axis */ - dvec[3] = {0, 0, 0}, /* this is the direction thast added to the view offset per redraw */ + float mat[3][3]; /* 3x3 copy of the view matrix so we can move along the view axis */ + float dvec[3] = {0, 0, 0}; /* this is the direction thast added to the view offset per redraw */ /* Camera Uprighting variables */ - upvec[3] = {0, 0, 0}, /* stores the view's up vector */ + float upvec[3] = {0, 0, 0}; /* stores the view's up vector */ - moffset[2], /* mouse offset from the views center */ - tmp_quat[4]; /* used for rotating the view */ + float moffset[2]; /* mouse offset from the views center */ + float tmp_quat[4]; /* used for rotating the view */ - int -// cent_orig[2], /* view center */ -//XXX- can avoid using // cent[2], /* view center modified */ - xmargin, ymargin; /* x and y margin are define the safe area where the mouses movement wont rotate the view */ +// int cent_orig[2], /* view center */ +//XXX- can avoid using // cent[2], /* view center modified */ + int xmargin, ymargin; /* x and y margin are define the safe area where the mouses movement wont rotate the view */ #ifdef NDOF_FLY_DEBUG { @@ -839,7 +839,7 @@ static int flyApply(bContext *C, FlyInfo *fly) float time_redraw; float time_redraw_clamped; #ifdef NDOF_FLY_DRAW_TOOMUCH - fly->redraw= 1; + fly->redraw = 1; #endif time_current = PIL_check_seconds_timer(); time_redraw = (float)(time_current - fly->time_lastdraw); @@ -870,7 +870,7 @@ static int flyApply(bContext *C, FlyInfo *fly) } else { float roll; /* similar to the angle between the camera's up and the Z-up, - * but its very rough so just roll */ + * but its very rough so just roll */ /* rotate about the X axis- look up/down */ if (moffset[1]) { @@ -883,7 +883,7 @@ static int flyApply(bContext *C, FlyInfo *fly) mul_qt_qtqt(rv3d->viewquat, rv3d->viewquat, tmp_quat); if (fly->xlock) - fly->xlock = 2; /*check for rotation*/ + fly->xlock = 2; /*check for rotation*/ if (fly->zlock) fly->zlock = 2; fly->xlock_momentum = 0.0f; @@ -919,7 +919,7 @@ static int flyApply(bContext *C, FlyInfo *fly) mul_qt_qtqt(rv3d->viewquat, rv3d->viewquat, tmp_quat); if (fly->xlock) - fly->xlock = 2;/*check for rotation*/ + fly->xlock = 2; /*check for rotation*/ if (fly->zlock) fly->zlock = 2; } @@ -940,7 +940,7 @@ static int flyApply(bContext *C, FlyInfo *fly) mul_m3_v3(mat, upvec); /* Rotate about the relative up vec */ axis_angle_to_quat(tmp_quat, upvec, - roll * time_redraw_clamped * fly->zlock_momentum * FLY_ZUP_CORRECT_FAC); + roll * time_redraw_clamped * fly->zlock_momentum * FLY_ZUP_CORRECT_FAC); mul_qt_qtqt(rv3d->viewquat, rv3d->viewquat, tmp_quat); fly->zlock_momentum += FLY_ZUP_CORRECT_ACCEL; @@ -1031,9 +1031,9 @@ static int flyApply(bContext *C, FlyInfo *fly) static int flyApply_ndof(bContext *C, FlyInfo *fly) { /* shorthand for oft-used variables */ - wmNDOFMotionData* ndof = fly->ndof; + wmNDOFMotionData *ndof = fly->ndof; const float dt = ndof->dt; - RegionView3D* rv3d = fly->rv3d; + RegionView3D*rv3d = fly->rv3d; const int flag = U.ndof_flag; #if 0 @@ -1056,7 +1056,7 @@ static int flyApply_ndof(bContext *C, FlyInfo *fly) float speed = 10.f; /* blender units per second */ /* ^^ this is ok for default cube scene, but should scale with.. something */ - float trans[3] = {lateral_sensitivity * ndof->tvec[0], + float trans[3] = {lateral_sensitivity *ndof->tvec[0], vertical_sensitivity * ndof->tvec[1], forward_sensitivity * ndof->tvec[2]}; diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index c20ea004e9d..aa76d9a94c1 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -85,57 +85,57 @@ */ /* view3d handler codes */ -#define VIEW3D_HANDLER_BACKGROUND 1 -#define VIEW3D_HANDLER_PROPERTIES 2 -#define VIEW3D_HANDLER_OBJECT 3 -#define VIEW3D_HANDLER_PREVIEW 4 -#define VIEW3D_HANDLER_MULTIRES 5 -#define VIEW3D_HANDLER_TRANSFORM 6 +#define VIEW3D_HANDLER_BACKGROUND 1 +#define VIEW3D_HANDLER_PROPERTIES 2 +#define VIEW3D_HANDLER_OBJECT 3 +#define VIEW3D_HANDLER_PREVIEW 4 +#define VIEW3D_HANDLER_MULTIRES 5 +#define VIEW3D_HANDLER_TRANSFORM 6 #define VIEW3D_HANDLER_GREASEPENCIL 7 -#define VIEW3D_HANDLER_BONESKETCH 8 +#define VIEW3D_HANDLER_BONESKETCH 8 /* end XXX ************* */ static void do_view3d_header_buttons(bContext *C, void *arg, int event); #define B_SCENELOCK 101 -#define B_FULL 102 -#define B_HOME 103 -#define B_VIEWBUT 104 -#define B_PERSP 105 +#define B_FULL 102 +#define B_HOME 103 +#define B_VIEWBUT 104 +#define B_PERSP 105 #define B_MODESELECT 108 -#define B_SEL_VERT 110 -#define B_SEL_EDGE 111 -#define B_SEL_FACE 112 -#define B_MAN_TRANS 116 -#define B_MAN_ROT 117 -#define B_MAN_SCALE 118 -#define B_NDOF 119 -#define B_MAN_MODE 120 -#define B_REDR 122 -#define B_NOP 123 +#define B_SEL_VERT 110 +#define B_SEL_EDGE 111 +#define B_SEL_FACE 112 +#define B_MAN_TRANS 116 +#define B_MAN_ROT 117 +#define B_MAN_SCALE 118 +#define B_NDOF 119 +#define B_MAN_MODE 120 +#define B_REDR 122 +#define B_NOP 123 // XXX quickly ported across static void handle_view3d_lock(bContext *C) { - Main *bmain= CTX_data_main(C); - Scene *scene= CTX_data_scene(C); - ScrArea *sa= CTX_wm_area(C); - View3D *v3d= CTX_wm_view3d(C); + Main *bmain = CTX_data_main(C); + Scene *scene = CTX_data_scene(C); + ScrArea *sa = CTX_wm_area(C); + View3D *v3d = CTX_wm_view3d(C); if (v3d != NULL && sa != NULL) { - if (v3d->localvd==NULL && v3d->scenelock && sa->spacetype==SPACE_VIEW3D) { + if (v3d->localvd == NULL && v3d->scenelock && sa->spacetype == SPACE_VIEW3D) { /* copy to scene */ - scene->lay= v3d->lay; - scene->layact= v3d->layact; - scene->camera= v3d->camera; + scene->lay = v3d->lay; + scene->layact = v3d->layact; + scene->camera = v3d->camera; /* not through notifier, listener don't have context * and non-open screens or spaces need to be updated too */ BKE_screen_view3d_main_sync(&bmain->screen, scene); /* notifiers for scene update */ - WM_event_add_notifier(C, NC_SCENE|ND_LAYER, scene); + WM_event_add_notifier(C, NC_SCENE | ND_LAYER, scene); } } } @@ -150,11 +150,11 @@ static void view3d_layers_editmode_ensure(Scene *scene, View3D *v3d) { /* sanity check - when in editmode disallow switching the editmode layer off since its confusing * an alternative would be to always draw the editmode object. */ - if (scene->obedit && (scene->obedit->lay & v3d->lay)==0) { + if (scene->obedit && (scene->obedit->lay & v3d->lay) == 0) { int bit; - for (bit=0; bit<32; bit++) { - if (scene->obedit->lay & (1<lay |= 1<obedit->lay & (1 << bit)) { + v3d->lay |= 1 << bit; break; } } @@ -163,11 +163,11 @@ static void view3d_layers_editmode_ensure(Scene *scene, View3D *v3d) static int view3d_layers_exec(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); - ScrArea *sa= CTX_wm_area(C); - View3D *v3d= sa->spacedata.first; - int nr= RNA_int_get(op->ptr, "nr"); - int toggle= RNA_boolean_get(op->ptr, "toggle"); + Scene *scene = CTX_data_scene(C); + ScrArea *sa = CTX_wm_area(C); + View3D *v3d = sa->spacedata.first; + int nr = RNA_int_get(op->ptr, "nr"); + int toggle = RNA_boolean_get(op->ptr, "toggle"); if (nr < 0) return OPERATOR_CANCELLED; @@ -175,16 +175,16 @@ static int view3d_layers_exec(bContext *C, wmOperator *op) if (nr == 0) { /* all layers */ if (!v3d->layact) - v3d->layact= 1; + v3d->layact = 1; - if (toggle && v3d->lay == ((1<<20)-1)) { + if (toggle && v3d->lay == ((1 << 20) - 1)) { /* return to active layer only */ v3d->lay = v3d->layact; view3d_layers_editmode_ensure(scene, v3d); } else { - v3d->lay |= (1<<20)-1; + v3d->lay |= (1 << 20) - 1; } } else { @@ -192,24 +192,24 @@ static int view3d_layers_exec(bContext *C, wmOperator *op) nr--; if (RNA_boolean_get(op->ptr, "extend")) { - if (toggle && v3d->lay & (1<lay & ~(1<lay &= ~(1<lay & (1 << nr) && (v3d->lay & ~(1 << nr))) + v3d->lay &= ~(1 << nr); else - v3d->lay |= (1<lay |= (1 << nr); } else { - v3d->lay = (1<lay = (1 << nr); } view3d_layers_editmode_ensure(scene, v3d); /* set active layer, ensure to always have one */ - if (v3d->lay & (1<layact= 1<lay & v3d->layact)==0) { - for (bit=0; bit<32; bit++) { - if (v3d->lay & (1<layact= 1<lay & (1 << nr)) + v3d->layact = 1 << nr; + else if ((v3d->lay & v3d->layact) == 0) { + for (bit = 0; bit < 32; bit++) { + if (v3d->lay & (1 << bit)) { + v3d->layact = 1 << bit; break; } } @@ -238,7 +238,7 @@ static int view3d_layers_invoke(bContext *C, wmOperator *op, wmEvent *event) RNA_boolean_set(op->ptr, "extend", FALSE); if (event->alt) { - int nr= RNA_int_get(op->ptr, "nr") + 10; + int nr = RNA_int_get(op->ptr, "nr") + 10; RNA_int_set(op->ptr, "nr", nr); } view3d_layers_exec(C, op); @@ -248,7 +248,7 @@ static int view3d_layers_invoke(bContext *C, wmOperator *op, wmEvent *event) static int view3d_layers_poll(bContext *C) { - return (ED_operator_view3d_active(C) && CTX_wm_view3d(C)->localvd==NULL); + return (ED_operator_view3d_active(C) && CTX_wm_view3d(C)->localvd == NULL); } void VIEW3D_OT_layers(wmOperatorType *ot) @@ -264,7 +264,7 @@ void VIEW3D_OT_layers(wmOperatorType *ot) ot->poll = view3d_layers_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; RNA_def_int(ot->srna, "nr", 1, 0, 20, "Number", "The layer number to set, zero for all layers", 0, 20); RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Add this layer to the current view layers"); @@ -280,29 +280,29 @@ static int modeselect_addmode(char *str, const char *title, int id, int icon) static char *view3d_modeselect_pup(Scene *scene) { - Object *ob= OBACT; + Object *ob = OBACT; static char string[512]; - const char *title= IFACE_("Mode: %t"); + const char *title = IFACE_("Mode: %t"); char *str = string; BLI_strncpy(str, title, sizeof(string)); str += modeselect_addmode(str, N_("Object Mode"), OB_MODE_OBJECT, ICON_OBJECT_DATA); - if (ob==NULL || ob->data==NULL) return string; + if (ob == NULL || ob->data == NULL) return string; if (ob->id.lib) return string; if (!((ID *)ob->data)->lib) { /* if active object is editable */ if ( ((ob->type == OB_MESH) - || (ob->type == OB_CURVE) || (ob->type == OB_SURF) || (ob->type == OB_FONT) - || (ob->type == OB_MBALL) || (ob->type == OB_LATTICE))) { + || (ob->type == OB_CURVE) || (ob->type == OB_SURF) || (ob->type == OB_FONT) + || (ob->type == OB_MBALL) || (ob->type == OB_LATTICE))) { str += modeselect_addmode(str, N_("Edit Mode"), OB_MODE_EDIT, ICON_EDITMODE_HLT); } else if (ob->type == OB_ARMATURE) { if (ob->mode & OB_MODE_POSE) - str += modeselect_addmode(str, N_("Edit Mode"), OB_MODE_EDIT|OB_MODE_POSE, ICON_EDITMODE_HLT); + str += modeselect_addmode(str, N_("Edit Mode"), OB_MODE_EDIT | OB_MODE_POSE, ICON_EDITMODE_HLT); else str += modeselect_addmode(str, N_("Edit Mode"), OB_MODE_EDIT, ICON_EDITMODE_HLT); } @@ -317,13 +317,13 @@ static char *view3d_modeselect_pup(Scene *scene) } /* if active object is an armature */ - if (ob->type==OB_ARMATURE) { + if (ob->type == OB_ARMATURE) { str += modeselect_addmode(str, N_("Pose Mode"), OB_MODE_POSE, ICON_POSE_HLT); } - if ( ob->particlesystem.first || - modifiers_findByType(ob, eModifierType_Cloth) || - modifiers_findByType(ob, eModifierType_Softbody)) + if (ob->particlesystem.first || + modifiers_findByType(ob, eModifierType_Cloth) || + modifiers_findByType(ob, eModifierType_Softbody)) { str += modeselect_addmode(str, N_("Particle Mode"), OB_MODE_PARTICLE_EDIT, ICON_PARTICLEMODE); } @@ -340,7 +340,7 @@ static void do_view3d_header_buttons(bContext *C, void *UNUSED(arg), int event) View3D *v3d = sa->spacedata.first; Object *obedit = CTX_data_edit_object(C); BMEditMesh *em = NULL; - int ctrl = win->eventstate->ctrl, shift= win->eventstate->shift; + int ctrl = win->eventstate->ctrl, shift = win->eventstate->shift; PointerRNA props_ptr; if (obedit && obedit->type == OB_MESH) { @@ -348,83 +348,83 @@ static void do_view3d_header_buttons(bContext *C, void *UNUSED(arg), int event) } /* watch it: if sa->win does not exist, check that when calling direct drawing routines */ - switch(event) { - case B_REDR: - ED_area_tag_redraw(sa); - break; - - case B_MODESELECT: - WM_operator_properties_create(&props_ptr, "OBJECT_OT_mode_set"); - RNA_enum_set(&props_ptr, "mode", v3d->modeselect); - WM_operator_name_call(C, "OBJECT_OT_mode_set", WM_OP_EXEC_REGION_WIN, &props_ptr); - WM_operator_properties_free(&props_ptr); - break; - - case B_SEL_VERT: - if (em) { - if (shift==0 || em->selectmode==0) - em->selectmode= SCE_SELECT_VERTEX; - ts->selectmode= em->selectmode; - EDBM_selectmode_set(em); - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data); - ED_undo_push(C, "Selectmode Set: Vertex"); - } - break; - case B_SEL_EDGE: - if (em) { - if (shift==0 || em->selectmode==0) { - if ( (em->selectmode ^ SCE_SELECT_EDGE) == SCE_SELECT_VERTEX) { - if (ctrl) EDBM_convertsel(em, SCE_SELECT_VERTEX,SCE_SELECT_EDGE); + switch (event) { + case B_REDR: + ED_area_tag_redraw(sa); + break; + + case B_MODESELECT: + WM_operator_properties_create(&props_ptr, "OBJECT_OT_mode_set"); + RNA_enum_set(&props_ptr, "mode", v3d->modeselect); + WM_operator_name_call(C, "OBJECT_OT_mode_set", WM_OP_EXEC_REGION_WIN, &props_ptr); + WM_operator_properties_free(&props_ptr); + break; + + case B_SEL_VERT: + if (em) { + if (shift == 0 || em->selectmode == 0) + em->selectmode = SCE_SELECT_VERTEX; + ts->selectmode = em->selectmode; + EDBM_selectmode_set(em); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data); + ED_undo_push(C, "Selectmode Set: Vertex"); + } + break; + case B_SEL_EDGE: + if (em) { + if (shift == 0 || em->selectmode == 0) { + if ( (em->selectmode ^ SCE_SELECT_EDGE) == SCE_SELECT_VERTEX) { + if (ctrl) EDBM_convertsel(em, SCE_SELECT_VERTEX, SCE_SELECT_EDGE); + } + em->selectmode = SCE_SELECT_EDGE; } - em->selectmode = SCE_SELECT_EDGE; + ts->selectmode = em->selectmode; + EDBM_selectmode_set(em); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data); + ED_undo_push(C, "Selectmode Set: Edge"); } - ts->selectmode= em->selectmode; - EDBM_selectmode_set(em); - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data); - ED_undo_push(C, "Selectmode Set: Edge"); - } - break; - case B_SEL_FACE: - if (em) { - if ( shift==0 || em->selectmode==0) { - if ( ((ts->selectmode ^ SCE_SELECT_FACE) == SCE_SELECT_VERTEX) || ((ts->selectmode ^ SCE_SELECT_FACE) == SCE_SELECT_EDGE)) { - if (ctrl) EDBM_convertsel(em, (ts->selectmode ^ SCE_SELECT_FACE),SCE_SELECT_FACE); + break; + case B_SEL_FACE: + if (em) { + if (shift == 0 || em->selectmode == 0) { + if ( ((ts->selectmode ^ SCE_SELECT_FACE) == SCE_SELECT_VERTEX) || ((ts->selectmode ^ SCE_SELECT_FACE) == SCE_SELECT_EDGE)) { + if (ctrl) EDBM_convertsel(em, (ts->selectmode ^ SCE_SELECT_FACE), SCE_SELECT_FACE); + } + em->selectmode = SCE_SELECT_FACE; } - em->selectmode = SCE_SELECT_FACE; + ts->selectmode = em->selectmode; + EDBM_selectmode_set(em); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data); + ED_undo_push(C, "Selectmode Set: Face"); } - ts->selectmode= em->selectmode; - EDBM_selectmode_set(em); - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data); - ED_undo_push(C, "Selectmode Set: Face"); - } - break; + break; - case B_MAN_TRANS: - if ( shift==0 || v3d->twtype==0) { - v3d->twtype= V3D_MANIP_TRANSLATE; - } - ED_area_tag_redraw(sa); - break; - case B_MAN_ROT: - if ( shift==0 || v3d->twtype==0) { - v3d->twtype= V3D_MANIP_ROTATE; - } - ED_area_tag_redraw(sa); - break; - case B_MAN_SCALE: - if ( shift==0 || v3d->twtype==0) { - v3d->twtype= V3D_MANIP_SCALE; - } - ED_area_tag_redraw(sa); - break; - case B_NDOF: - ED_area_tag_redraw(sa); - break; - case B_MAN_MODE: - ED_area_tag_redraw(sa); - break; - default: - break; + case B_MAN_TRANS: + if (shift == 0 || v3d->twtype == 0) { + v3d->twtype = V3D_MANIP_TRANSLATE; + } + ED_area_tag_redraw(sa); + break; + case B_MAN_ROT: + if (shift == 0 || v3d->twtype == 0) { + v3d->twtype = V3D_MANIP_ROTATE; + } + ED_area_tag_redraw(sa); + break; + case B_MAN_SCALE: + if (shift == 0 || v3d->twtype == 0) { + v3d->twtype = V3D_MANIP_SCALE; + } + ED_area_tag_redraw(sa); + break; + case B_NDOF: + ED_area_tag_redraw(sa); + break; + case B_MAN_MODE: + ED_area_tag_redraw(sa); + break; + default: + break; } } @@ -445,7 +445,7 @@ static int object_mode_icon(int mode) void uiTemplateEditModeSelection(uiLayout *layout, struct bContext *C) { Object *obedit = CTX_data_edit_object(C); - uiBlock *block= uiLayoutGetBlock(layout); + uiBlock *block = uiLayoutGetBlock(layout); uiBlockSetHandleFunc(block, do_view3d_header_buttons, NULL); @@ -453,35 +453,35 @@ void uiTemplateEditModeSelection(uiLayout *layout, struct bContext *C) BMEditMesh *em = BMEdit_FromObject(obedit); uiLayout *row; - row= uiLayoutRow(layout, 1); - block= uiLayoutGetBlock(row); - uiDefIconButBitS(block, TOG, SCE_SELECT_VERTEX, B_SEL_VERT, ICON_VERTEXSEL, 0,0,UI_UNIT_X,UI_UNIT_Y, &em->selectmode, 1.0, 0.0, 0, 0, "Vertex select - Shift-Click for multiple modes"); - uiDefIconButBitS(block, TOG, SCE_SELECT_EDGE, B_SEL_EDGE, ICON_EDGESEL, 0,0,UI_UNIT_X,UI_UNIT_Y, &em->selectmode, 1.0, 0.0, 0, 0, "Edge select - Shift-Click for multiple modes"); - uiDefIconButBitS(block, TOG, SCE_SELECT_FACE, B_SEL_FACE, ICON_FACESEL, 0,0,UI_UNIT_X,UI_UNIT_Y, &em->selectmode, 1.0, 0.0, 0, 0, "Face select - Shift-Click for multiple modes"); + row = uiLayoutRow(layout, 1); + block = uiLayoutGetBlock(row); + uiDefIconButBitS(block, TOG, SCE_SELECT_VERTEX, B_SEL_VERT, ICON_VERTEXSEL, 0, 0, UI_UNIT_X, UI_UNIT_Y, &em->selectmode, 1.0, 0.0, 0, 0, "Vertex select - Shift-Click for multiple modes"); + uiDefIconButBitS(block, TOG, SCE_SELECT_EDGE, B_SEL_EDGE, ICON_EDGESEL, 0, 0, UI_UNIT_X, UI_UNIT_Y, &em->selectmode, 1.0, 0.0, 0, 0, "Edge select - Shift-Click for multiple modes"); + uiDefIconButBitS(block, TOG, SCE_SELECT_FACE, B_SEL_FACE, ICON_FACESEL, 0, 0, UI_UNIT_X, UI_UNIT_Y, &em->selectmode, 1.0, 0.0, 0, 0, "Face select - Shift-Click for multiple modes"); } } void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) { - bScreen *screen= CTX_wm_screen(C); - ScrArea *sa= CTX_wm_area(C); - View3D *v3d= sa->spacedata.first; - Scene *scene= CTX_data_scene(C); - ToolSettings *ts= CTX_data_tool_settings(C); + bScreen *screen = CTX_wm_screen(C); + ScrArea *sa = CTX_wm_area(C); + View3D *v3d = sa->spacedata.first; + Scene *scene = CTX_data_scene(C); + ToolSettings *ts = CTX_data_tool_settings(C); PointerRNA v3dptr, toolsptr, sceneptr; - Object *ob= OBACT; + Object *ob = OBACT; Object *obedit = CTX_data_edit_object(C); uiBlock *block; uiBut *but; uiLayout *row; - const float dpi_fac= UI_DPI_FAC; + const float dpi_fac = UI_DPI_FAC; int is_paint = 0; RNA_pointer_create(&screen->id, &RNA_SpaceView3D, v3d, &v3dptr); RNA_pointer_create(&scene->id, &RNA_ToolSettings, ts, &toolsptr); RNA_pointer_create(&scene->id, &RNA_Scene, scene, &sceneptr); - block= uiLayoutGetBlock(layout); + block = uiLayoutGetBlock(layout); uiBlockSetHandleFunc(block, do_view3d_header_buttons, NULL); /* other buttons: */ @@ -490,31 +490,31 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) /* mode */ if (ob) { v3d->modeselect = ob->mode; - is_paint = ELEM4(ob->mode, OB_MODE_SCULPT, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT,OB_MODE_TEXTURE_PAINT); + is_paint = ELEM4(ob->mode, OB_MODE_SCULPT, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT, OB_MODE_TEXTURE_PAINT); } else { v3d->modeselect = OB_MODE_OBJECT; } - row= uiLayoutRow(layout, 1); - uiDefIconTextButS(block, MENU, B_MODESELECT, object_mode_icon(v3d->modeselect), view3d_modeselect_pup(scene) , - 0,0,126 * dpi_fac, UI_UNIT_Y, &(v3d->modeselect), 0, 0, 0, 0, TIP_("Mode")); + row = uiLayoutRow(layout, 1); + uiDefIconTextButS(block, MENU, B_MODESELECT, object_mode_icon(v3d->modeselect), view3d_modeselect_pup(scene), + 0, 0, 126 * dpi_fac, UI_UNIT_Y, &(v3d->modeselect), 0, 0, 0, 0, TIP_("Mode")); /* Draw type */ uiItemR(layout, &v3dptr, "viewport_shade", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); - if (obedit==NULL && is_paint) { + if (obedit == NULL && is_paint) { /* Manipulators aren't used in paint modes */ if (!ELEM(ob->mode, OB_MODE_SCULPT, OB_MODE_PARTICLE_EDIT)) { /* masks aren't used for sculpt and particle painting */ PointerRNA meshptr; RNA_pointer_create(&ob->id, &RNA_Mesh, ob->data, &meshptr); - if (ob->mode & (OB_MODE_TEXTURE_PAINT|OB_MODE_VERTEX_PAINT)) { + if (ob->mode & (OB_MODE_TEXTURE_PAINT | OB_MODE_VERTEX_PAINT)) { uiItemR(layout, &meshptr, "use_paint_mask", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); } else { - row= uiLayoutRow(layout, 1); + row = uiLayoutRow(layout, 1); uiItemR(row, &meshptr, "use_paint_mask", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); uiItemR(row, &meshptr, "use_paint_mask_vertex", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); } @@ -523,7 +523,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) else { const char *str_menu; - row= uiLayoutRow(layout, 1); + row = uiLayoutRow(layout, 1); uiItemR(row, &v3dptr, "pivot_point", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); /* pose/object only however we want to allow in weight paint mode too @@ -533,16 +533,16 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) } /* Transform widget / manipulators */ - row= uiLayoutRow(layout, 1); + row = uiLayoutRow(layout, 1); uiItemR(row, &v3dptr, "show_manipulator", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); - block= uiLayoutGetBlock(row); + block = uiLayoutGetBlock(row); if (v3d->twflag & V3D_USE_MANIPULATOR) { - but = uiDefIconButBitC(block, TOG, V3D_MANIP_TRANSLATE, B_MAN_TRANS, ICON_MAN_TRANS, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, TIP_("Translate manipulator - Shift-Click for multiple modes")); + but = uiDefIconButBitC(block, TOG, V3D_MANIP_TRANSLATE, B_MAN_TRANS, ICON_MAN_TRANS, 0, 0, UI_UNIT_X, UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, TIP_("Translate manipulator - Shift-Click for multiple modes")); uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */ - but = uiDefIconButBitC(block, TOG, V3D_MANIP_ROTATE, B_MAN_ROT, ICON_MAN_ROT, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, TIP_("Rotate manipulator - Shift-Click for multiple modes")); + but = uiDefIconButBitC(block, TOG, V3D_MANIP_ROTATE, B_MAN_ROT, ICON_MAN_ROT, 0, 0, UI_UNIT_X, UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, TIP_("Rotate manipulator - Shift-Click for multiple modes")); uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */ - but = uiDefIconButBitC(block, TOG, V3D_MANIP_SCALE, B_MAN_SCALE, ICON_MAN_SCALE, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, TIP_("Scale manipulator - Shift-Click for multiple modes")); + but = uiDefIconButBitC(block, TOG, V3D_MANIP_SCALE, B_MAN_SCALE, ICON_MAN_SCALE, 0, 0, UI_UNIT_X, UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, TIP_("Scale manipulator - Shift-Click for multiple modes")); uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */ } @@ -551,12 +551,12 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) } str_menu = BIF_menustringTransformOrientation(C, "Orientation"); - but = uiDefButC(block, MENU, B_MAN_MODE, str_menu,0,0,70 * dpi_fac, UI_UNIT_Y, &v3d->twmode, 0, 0, 0, 0, TIP_("Transform Orientation")); + but = uiDefButC(block, MENU, B_MAN_MODE, str_menu, 0, 0, 70 * dpi_fac, UI_UNIT_Y, &v3d->twmode, 0, 0, 0, 0, TIP_("Transform Orientation")); uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */ MEM_freeN((void *)str_menu); } - if (obedit==NULL && v3d->localvd==NULL) { + if (obedit == NULL && v3d->localvd == NULL) { unsigned int ob_lay = ob ? ob->lay : 0; /* Layers */ diff --git a/source/blender/editors/space_view3d/view3d_ops.c b/source/blender/editors/space_view3d/view3d_ops.c index e4133723089..99da487f923 100644 --- a/source/blender/editors/space_view3d/view3d_ops.c +++ b/source/blender/editors/space_view3d/view3d_ops.c @@ -132,7 +132,7 @@ void view3d_keymap(wmKeyConfig *keyconf) WM_keymap_verify_item(keymap, "VIEW3D_OT_rotate", MIDDLEMOUSE, KM_PRESS, 0, 0); WM_keymap_verify_item(keymap, "VIEW3D_OT_move", MIDDLEMOUSE, KM_PRESS, KM_SHIFT, 0); WM_keymap_verify_item(keymap, "VIEW3D_OT_zoom", MIDDLEMOUSE, KM_PRESS, KM_CTRL, 0); - WM_keymap_verify_item(keymap, "VIEW3D_OT_dolly", MIDDLEMOUSE, KM_PRESS, KM_CTRL|KM_SHIFT, 0); + WM_keymap_verify_item(keymap, "VIEW3D_OT_dolly", MIDDLEMOUSE, KM_PRESS, KM_CTRL | KM_SHIFT, 0); WM_keymap_verify_item(keymap, "VIEW3D_OT_view_selected", PADPERIOD, KM_PRESS, 0, 0); WM_keymap_verify_item(keymap, "VIEW3D_OT_view_center_cursor", PADPERIOD, KM_PRESS, KM_CTRL, 0); @@ -190,10 +190,10 @@ void view3d_keymap(wmKeyConfig *keyconf) RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_view_pan", WHEELUPMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "type", V3D_VIEW_PANUP); RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_view_pan", WHEELDOWNMOUSE, KM_PRESS, KM_SHIFT, 0)->ptr, "type", V3D_VIEW_PANDOWN); - RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_view_orbit", WHEELUPMOUSE, KM_PRESS, KM_CTRL|KM_ALT, 0)->ptr, "type", V3D_VIEW_STEPLEFT); - RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_view_orbit", WHEELDOWNMOUSE, KM_PRESS, KM_CTRL|KM_ALT, 0)->ptr, "type", V3D_VIEW_STEPRIGHT); - RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_view_orbit", WHEELUPMOUSE, KM_PRESS, KM_SHIFT|KM_ALT, 0)->ptr, "type", V3D_VIEW_STEPUP); - RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_view_orbit", WHEELDOWNMOUSE, KM_PRESS, KM_SHIFT|KM_ALT, 0)->ptr, "type", V3D_VIEW_STEPDOWN); + RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_view_orbit", WHEELUPMOUSE, KM_PRESS, KM_CTRL | KM_ALT, 0)->ptr, "type", V3D_VIEW_STEPLEFT); + RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_view_orbit", WHEELDOWNMOUSE, KM_PRESS, KM_CTRL | KM_ALT, 0)->ptr, "type", V3D_VIEW_STEPRIGHT); + RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_view_orbit", WHEELUPMOUSE, KM_PRESS, KM_SHIFT | KM_ALT, 0)->ptr, "type", V3D_VIEW_STEPUP); + RNA_enum_set(WM_keymap_add_item(keymap, "VIEW3D_OT_view_orbit", WHEELDOWNMOUSE, KM_PRESS, KM_SHIFT | KM_ALT, 0)->ptr, "type", V3D_VIEW_STEPDOWN); /* active aligned, replaces '*' key in 2.4x */ kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD1, KM_PRESS, KM_SHIFT, 0); @@ -205,13 +205,13 @@ void view3d_keymap(wmKeyConfig *keyconf) kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD7, KM_PRESS, KM_SHIFT, 0); RNA_enum_set(kmi->ptr, "type", RV3D_VIEW_TOP); RNA_boolean_set(kmi->ptr, "align_active", TRUE); - kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD1, KM_PRESS, KM_SHIFT|KM_CTRL, 0); + kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD1, KM_PRESS, KM_SHIFT | KM_CTRL, 0); RNA_enum_set(kmi->ptr, "type", RV3D_VIEW_BACK); RNA_boolean_set(kmi->ptr, "align_active", TRUE); - kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD3, KM_PRESS, KM_SHIFT|KM_CTRL, 0); + kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD3, KM_PRESS, KM_SHIFT | KM_CTRL, 0); RNA_enum_set(kmi->ptr, "type", RV3D_VIEW_LEFT); RNA_boolean_set(kmi->ptr, "align_active", TRUE); - kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD7, KM_PRESS, KM_SHIFT|KM_CTRL, 0); + kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_viewnumpad", PAD7, KM_PRESS, KM_SHIFT | KM_CTRL, 0); RNA_enum_set(kmi->ptr, "type", RV3D_VIEW_BOTTOM); RNA_boolean_set(kmi->ptr, "align_active", TRUE); @@ -287,22 +287,22 @@ void view3d_keymap(wmKeyConfig *keyconf) RNA_boolean_set(kmi->ptr, "enumerate", TRUE); /* selection key-combinations */ - kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_CTRL, 0); + kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_CTRL, 0); RNA_boolean_set(kmi->ptr, "extend", TRUE); RNA_boolean_set(kmi->ptr, "center", TRUE); RNA_boolean_set(kmi->ptr, "object", FALSE); RNA_boolean_set(kmi->ptr, "enumerate", FALSE); - kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_ALT, 0); + kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL | KM_ALT, 0); RNA_boolean_set(kmi->ptr, "extend", FALSE); RNA_boolean_set(kmi->ptr, "center", TRUE); RNA_boolean_set(kmi->ptr, "object", FALSE); RNA_boolean_set(kmi->ptr, "enumerate", TRUE); - kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_ALT, 0); + kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_ALT, 0); RNA_boolean_set(kmi->ptr, "extend", TRUE); RNA_boolean_set(kmi->ptr, "center", FALSE); RNA_boolean_set(kmi->ptr, "object", FALSE); RNA_boolean_set(kmi->ptr, "enumerate", TRUE); - kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_CTRL|KM_ALT, 0); + kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_CTRL | KM_ALT, 0); RNA_boolean_set(kmi->ptr, "extend", TRUE); RNA_boolean_set(kmi->ptr, "center", TRUE); RNA_boolean_set(kmi->ptr, "object", FALSE); @@ -311,7 +311,7 @@ void view3d_keymap(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "VIEW3D_OT_select_border", BKEY, KM_PRESS, 0, 0); kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL, 0); RNA_boolean_set(kmi->ptr, "deselect", FALSE); - kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_SHIFT|KM_CTRL, 0); + kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_SHIFT | KM_CTRL, 0); RNA_boolean_set(kmi->ptr, "deselect", TRUE); WM_keymap_add_item(keymap, "VIEW3D_OT_select_circle", CKEY, KM_PRESS, 0, 0); @@ -319,7 +319,7 @@ void view3d_keymap(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "VIEW3D_OT_zoom_border", BKEY, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_item(keymap, "VIEW3D_OT_render_border", BKEY, KM_PRESS, KM_SHIFT, 0); - WM_keymap_add_item(keymap, "VIEW3D_OT_camera_to_view", PAD0, KM_PRESS, KM_ALT|KM_CTRL, 0); + WM_keymap_add_item(keymap, "VIEW3D_OT_camera_to_view", PAD0, KM_PRESS, KM_ALT | KM_CTRL, 0); WM_keymap_add_item(keymap, "VIEW3D_OT_object_as_camera", PAD0, KM_PRESS, KM_CTRL, 0); WM_keymap_add_menu(keymap, "VIEW3D_MT_snap", SKEY, KM_PRESS, KM_SHIFT, 0); diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index b15dc6ab3c7..4251592e986 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -88,18 +88,18 @@ #include "UI_interface.h" #include "UI_resources.h" -#include "view3d_intern.h" // own include +#include "view3d_intern.h" // own include // TODO: should return whether there is valid context to continue void view3d_set_viewcontext(bContext *C, ViewContext *vc) { memset(vc, 0, sizeof(ViewContext)); - vc->ar= CTX_wm_region(C); - vc->scene= CTX_data_scene(C); - vc->v3d= CTX_wm_view3d(C); - vc->rv3d= CTX_wm_region_view3d(C); - vc->obact= CTX_data_active_object(C); - vc->obedit= CTX_data_edit_object(C); + vc->ar = CTX_wm_region(C); + vc->scene = CTX_data_scene(C); + vc->v3d = CTX_wm_view3d(C); + vc->rv3d = CTX_wm_region_view3d(C); + vc->obact = CTX_data_active_object(C); + vc->obedit = CTX_data_edit_object(C); } int view3d_get_view_aligned_coordinate(ViewContext *vc, float fp[3], const int mval[2], const short do_fallback) @@ -107,14 +107,14 @@ int view3d_get_view_aligned_coordinate(ViewContext *vc, float fp[3], const int m float dvec[3]; int mval_cpy[2]; - mval_cpy[0]= mval[0]; - mval_cpy[1]= mval[1]; + mval_cpy[0] = mval[0]; + mval_cpy[1] = mval[1]; project_int_noclip(vc->ar, fp, mval_cpy); initgrabz(vc->rv3d, fp[0], fp[1], fp[2]); - if (mval_cpy[0]!=IS_CLIPPED) { + if (mval_cpy[0] != IS_CLIPPED) { float mval_f[2]; VECSUB2D(mval_f, mval_cpy, mval); ED_view3d_win_to_delta(vc->ar, mval_f, dvec); @@ -151,8 +151,8 @@ void view3d_get_transformation(const ARegion *ar, RegionView3D *rv3d, Object *ob for (i = 0; i < 4; ++i) { for (j = 0; j < 4; ++j) { - mats->projection[i*4+j] = rv3d->winmat[i][j]; - mats->modelview[i*4+j] = cpy[i][j]; + mats->projection[i * 4 + j] = rv3d->winmat[i][j]; + mats->modelview[i * 4 + j] = cpy[i][j]; } } @@ -170,10 +170,10 @@ static void EDBM_backbuf_checkAndSelectVerts(BMEditMesh *em, int select) { BMVert *eve; BMIter iter; - int index= bm_wireoffs; + int index = bm_wireoffs; eve = BM_iter_new(&iter, em->bm, BM_VERTS_OF_MESH, NULL); - for ( ; eve; eve=BM_iter_step(&iter), index++) { + for (; eve; eve = BM_iter_step(&iter), index++) { if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) { if (EDBM_check_backbuf(index)) { BM_vert_select_set(em->bm, eve, select); @@ -186,10 +186,10 @@ static void EDBM_backbuf_checkAndSelectEdges(BMEditMesh *em, int select) { BMEdge *eed; BMIter iter; - int index= bm_solidoffs; + int index = bm_solidoffs; eed = BM_iter_new(&iter, em->bm, BM_EDGES_OF_MESH, NULL); - for ( ; eed; eed=BM_iter_step(&iter), index++) { + for (; eed; eed = BM_iter_step(&iter), index++) { if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN)) { if (EDBM_check_backbuf(index)) { BM_edge_select_set(em->bm, eed, select); @@ -202,10 +202,10 @@ static void EDBM_backbuf_checkAndSelectFaces(BMEditMesh *em, int select) { BMFace *efa; BMIter iter; - int index= 1; + int index = 1; efa = BM_iter_new(&iter, em->bm, BM_FACES_OF_MESH, NULL); - for ( ; efa; efa=BM_iter_step(&iter), index++) { + for (; efa; efa = BM_iter_step(&iter), index++) { if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) { if (EDBM_check_backbuf(index)) { BM_face_select_set(em->bm, efa, select); @@ -222,10 +222,10 @@ static void EDBM_backbuf_checkAndSelectVerts_obmode(Mesh *me, int select) int a; if (mv) { - for (a=1; a<=me->totvert; a++, mv++) { + for (a = 1; a <= me->totvert; a++, mv++) { if (EDBM_check_backbuf(a)) { if (!(mv->flag & ME_HIDE)) { - mv->flag = select?(mv->flag|SELECT):(mv->flag&~SELECT); + mv->flag = select ? (mv->flag | SELECT) : (mv->flag & ~SELECT); } } } @@ -239,9 +239,9 @@ static void EDBM_backbuf_checkAndSelectTFaces(Mesh *me, int select) int a; if (mpoly) { - for (a=1; a<=me->totpoly; a++, mpoly++) { + for (a = 1; a <= me->totpoly; a++, mpoly++) { if (EDBM_check_backbuf(a)) { - mpoly->flag = select?(mpoly->flag|ME_FACE_SEL):(mpoly->flag&~ME_FACE_SEL); + mpoly->flag = select ? (mpoly->flag | ME_FACE_SEL) : (mpoly->flag & ~ME_FACE_SEL); } } } @@ -272,7 +272,7 @@ static int view3d_selectable_data(bContext *C) if (ob->mode & OB_MODE_SCULPT) { return 0; } - if ((ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT)) && + if ((ob->mode & (OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT | OB_MODE_TEXTURE_PAINT)) && !paint_facesel_test(ob) && !paint_vertsel_test(ob)) { return 0; @@ -298,19 +298,19 @@ static int edge_inside_rect(rcti *rect, short x1, short y1, short x2, short y2) if (edge_fully_inside_rect(rect, x1, y1, x2, y2)) return 1; /* check points completely out rect */ - if (x1xmin && x2xmin) return 0; - if (x1>rect->xmax && x2>rect->xmax) return 0; - if (y1ymin && y2ymin) return 0; - if (y1>rect->ymax && y2>rect->ymax) return 0; + if (x1 < rect->xmin && x2 < rect->xmin) return 0; + if (x1 > rect->xmax && x2 > rect->xmax) return 0; + if (y1 < rect->ymin && y2 < rect->ymin) return 0; + if (y1 > rect->ymax && y2 > rect->ymax) return 0; /* simple check lines intersecting. */ - d1= (y1-y2)*(x1- rect->xmin ) + (x2-x1)*(y1- rect->ymin ); - d2= (y1-y2)*(x1- rect->xmin ) + (x2-x1)*(y1- rect->ymax ); - d3= (y1-y2)*(x1- rect->xmax ) + (x2-x1)*(y1- rect->ymax ); - d4= (y1-y2)*(x1- rect->xmax ) + (x2-x1)*(y1- rect->ymin ); + d1 = (y1 - y2) * (x1 - rect->xmin) + (x2 - x1) * (y1 - rect->ymin); + d2 = (y1 - y2) * (x1 - rect->xmin) + (x2 - x1) * (y1 - rect->ymax); + d3 = (y1 - y2) * (x1 - rect->xmax) + (x2 - x1) * (y1 - rect->ymax); + d4 = (y1 - y2) * (x1 - rect->xmax) + (x2 - x1) * (y1 - rect->ymin); - if (d1<0 && d2<0 && d3<0 && d4<0) return 0; - if (d1>0 && d2>0 && d3>0 && d4>0) return 0; + if (d1 < 0 && d2 < 0 && d3 < 0 && d4 < 0) return 0; + if (d1 > 0 && d2 > 0 && d3 > 0 && d4 > 0) return 0; return 1; } @@ -322,47 +322,47 @@ static int edge_inside_rect(rcti *rect, short x1, short y1, short x2, short y2) int lasso_inside(int mcords[][2], short moves, int sx, int sy) { /* we do the angle rule, define that all added angles should be about zero or 2*PI */ - float angletot=0.0, len, dot, ang, cross, fp1[2], fp2[2]; + float angletot = 0.0, len, dot, ang, cross, fp1[2], fp2[2]; int a; int *p1, *p2; - if (sx==IS_CLIPPED) + if (sx == IS_CLIPPED) return 0; - p1= mcords[moves-1]; - p2= mcords[0]; + p1 = mcords[moves - 1]; + p2 = mcords[0]; /* first vector */ - fp1[0]= (float)(p1[0]-sx); - fp1[1]= (float)(p1[1]-sy); - len= sqrt(fp1[0]*fp1[0] + fp1[1]*fp1[1]); - fp1[0]/= len; - fp1[1]/= len; + fp1[0] = (float)(p1[0] - sx); + fp1[1] = (float)(p1[1] - sy); + len = sqrt(fp1[0] * fp1[0] + fp1[1] * fp1[1]); + fp1[0] /= len; + fp1[1] /= len; - for (a=0; a 4.0 ) return 1; + if (fabs(angletot) > 4.0) return 1; return 0; } @@ -372,7 +372,7 @@ int lasso_inside_edge(int mcords[][2], short moves, int x0, int y0, int x1, int int v1[2], v2[2]; int a; - if (x0==IS_CLIPPED || x1==IS_CLIPPED) + if (x0 == IS_CLIPPED || x1 == IS_CLIPPED) return 0; v1[0] = x0, v1[1] = y0; @@ -384,9 +384,9 @@ int lasso_inside_edge(int mcords[][2], short moves, int x0, int y0, int x1, int /* no points in lasso, so we have to intersect with lasso edge */ - if ( isect_line_line_v2_int(mcords[0], mcords[moves-1], v1, v2) > 0) return 1; - for (a=0; a 0) return 1; + if (isect_line_line_v2_int(mcords[0], mcords[moves - 1], v1, v2) > 0) return 1; + for (a = 0; a < moves - 1; a++) { + if (isect_line_line_v2_int(mcords[a], mcords[a + 1], v1, v2) > 0) return 1; } return 0; @@ -401,12 +401,12 @@ static void do_lasso_select_pose(ViewContext *vc, Object *ob, int mcords[][2], s bPoseChannel *pchan; float vec[3]; int sco1[2], sco2[2]; - bArmature *arm= ob->data; + bArmature *arm = ob->data; - if (ob->type!=OB_ARMATURE || ob->pose==NULL) return; + if (ob->type != OB_ARMATURE || ob->pose == NULL) return; - for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) { - if (PBONE_VISIBLE(arm, pchan->bone) && (pchan->bone->flag & BONE_UNSELECTABLE)==0) { + for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { + if (PBONE_VISIBLE(arm, pchan->bone) && (pchan->bone->flag & BONE_UNSELECTABLE) == 0) { mul_v3_m4v3(vec, ob->obmat, pchan->pose_head); project_int(vc->ar, vec, sco1); mul_v3_m4v3(vec, ob->obmat, pchan->pose_tail); @@ -424,7 +424,7 @@ static void object_deselect_all_visible(Scene *scene, View3D *v3d) { Base *base; - for (base= scene->base.first; base; base= base->next) { + for (base = scene->base.first; base; base = base->next) { if (BASE_SELECTABLE(v3d, base)) { ED_base_object_select(base, BA_DESELECT); } @@ -438,14 +438,14 @@ static void do_lasso_select_objects(ViewContext *vc, int mcords[][2], short move if (extend == 0 && select) object_deselect_all_visible(vc->scene, vc->v3d); - for (base= vc->scene->base.first; base; base= base->next) { + for (base = vc->scene->base.first; base; base = base->next) { if (BASE_SELECTABLE(vc->v3d, base)) { /* use this to avoid un-needed lasso lookups */ project_short(vc->ar, base->object->obmat[3], &base->sx); if (lasso_inside(mcords, moves, base->sx, base->sy)) { if (select) ED_base_object_select(base, BA_SELECT); else ED_base_object_select(base, BA_DESELECT); - base->object->flag= base->flag; + base->object->flag = base->flag; } if (base->object->mode & OB_MODE_POSE) { do_lasso_select_pose(vc, base->object, mcords, moves, select); @@ -461,11 +461,11 @@ static void lasso_select_boundbox(rcti *rect, int mcords[][2], short moves) rect->xmin = rect->xmax = mcords[0][0]; rect->ymin = rect->ymax = mcords[0][1]; - for (a=1; axmin) rect->xmin = mcords[a][0]; - else if (mcords[a][0]>rect->xmax) rect->xmax = mcords[a][0]; - if (mcords[a][1]ymin) rect->ymin = mcords[a][1]; - else if (mcords[a][1]>rect->ymax) rect->ymax = mcords[a][1]; + for (a = 1; a < moves; a++) { + if (mcords[a][0] < rect->xmin) rect->xmin = mcords[a][0]; + else if (mcords[a][0] > rect->xmax) rect->xmax = mcords[a][0]; + if (mcords[a][1] < rect->ymin) rect->ymin = mcords[a][1]; + else if (mcords[a][1] > rect->ymax) rect->ymax = mcords[a][1]; } } @@ -481,11 +481,11 @@ static void do_lasso_select_mesh__doSelectEdge(void *userData, BMEdge *eed, int { LassoSelectUserData *data = userData; - if (EDBM_check_backbuf(bm_solidoffs+index)) { - if (data->pass==0) { - if ( edge_fully_inside_rect(data->rect, x0, y0, x1, y1) && - lasso_inside(data->mcords, data->moves, x0, y0) && - lasso_inside(data->mcords, data->moves, x1, y1)) { + if (EDBM_check_backbuf(bm_solidoffs + index)) { + if (data->pass == 0) { + if (edge_fully_inside_rect(data->rect, x0, y0, x1, y1) && + lasso_inside(data->mcords, data->moves, x0, y0) && + lasso_inside(data->mcords, data->moves, x1, y1)) { BM_elem_select_set(data->vc->em->bm, eed, data->select); data->done = 1; } @@ -509,7 +509,7 @@ static void do_lasso_select_mesh__doSelectFace(void *userData, BMFace *efa, int static void do_lasso_select_mesh(ViewContext *vc, int mcords[][2], short moves, short extend, short select) { LassoSelectUserData data; - ToolSettings *ts= vc->scene->toolsettings; + ToolSettings *ts = vc->scene->toolsettings; rcti rect; int bbsel; @@ -518,7 +518,7 @@ static void do_lasso_select_mesh(ViewContext *vc, int mcords[][2], short moves, /* set editmesh */ vc->em = BMEdit_FromObject(vc->obedit); - data.vc= vc; + data.vc = vc; data.rect = ▭ data.mcords = mcords; data.moves = moves; @@ -529,11 +529,11 @@ static void do_lasso_select_mesh(ViewContext *vc, int mcords[][2], short moves, if (extend == 0 && select) EDBM_flag_disable_all(vc->em, BM_ELEM_SELECT); - /* for non zbuf projections, don't change the GL state */ + /* for non zbuf projections, don't change the GL state */ ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d); glLoadMatrixf(vc->rv3d->viewmat); - bbsel= EDBM_mask_init_backbuf_border(vc, mcords, moves, rect.xmin, rect.ymin, rect.xmax, rect.ymax); + bbsel = EDBM_mask_init_backbuf_border(vc, mcords, moves, rect.xmin, rect.ymin, rect.xmax, rect.ymax); if (ts->selectmode & SCE_SELECT_VERTEX) { if (bbsel) { @@ -548,7 +548,7 @@ static void do_lasso_select_mesh(ViewContext *vc, int mcords[][2], short moves, data.pass = 0; mesh_foreachScreenEdge(vc, do_lasso_select_mesh__doSelectEdge, &data, V3D_CLIP_TEST_OFF); - if (data.done==0) { + if (data.done == 0) { data.pass = 1; mesh_foreachScreenEdge(vc, do_lasso_select_mesh__doSelectEdge, &data, V3D_CLIP_TEST_OFF); } @@ -582,7 +582,7 @@ static void do_lasso_select_mesh_uv(int mcords[][2], short moves, short select) if (draw_uvs_face_check()) { /* Face Center Sel */ float cent[2]; ok = 0; - for (efa= em->faces.first; efa; efa= efa->next) { + for (efa = em->faces.first; efa; efa = efa->next) { /* assume not touched */ efa->tmp.l = 0; tf = CustomData_em_get(&em->fdata, efa->data, CD_MTFACE); @@ -600,11 +600,11 @@ static void do_lasso_select_mesh_uv(int mcords[][2], short moves, short select) } else { /* Vert Sel*/ - for (efa= em->faces.first; efa; efa= efa->next) { + for (efa = em->faces.first; efa; efa = efa->next) { tf = CustomData_em_get(&em->fdata, efa->data, CD_MTFACE); if (uvedit_face_visible(scene, ima, efa, tf)) { - nverts= efa->v4? 4: 3; - for (i=0; iv4 ? 4 : 3; + for (i = 0; i < nverts; i++) { if ((select) != (simaUVSel_Check(efa, tf, i))) { uvco_to_areaco_noclip(tf->uv[i], screenUV); if (BLI_in_rcti(&rect, screenUV[0], screenUV[1]) && lasso_inside(mcords, moves, screenUV[0], screenUV[1])) { @@ -622,7 +622,7 @@ static void do_lasso_select_mesh_uv(int mcords[][2], short moves, short select) } if (ok && G.sima->flag & SI_SYNC_UVSEL) { if (select) EM_select_flush(vc->em); - else EM_deselect_flush(vc->em); + else EM_deselect_flush(vc->em); } } #endif @@ -630,28 +630,28 @@ static void do_lasso_select_mesh_uv(int mcords[][2], short moves, short select) static void do_lasso_select_curve__doSelect(void *userData, Nurb *UNUSED(nu), BPoint *bp, BezTriple *bezt, int beztindex, int x, int y) { LassoSelectUserData *data = userData; - Object *obedit= data->vc->obedit; - Curve *cu= (Curve*)obedit->data; + Object *obedit = data->vc->obedit; + Curve *cu = (Curve *)obedit->data; if (lasso_inside(data->mcords, data->moves, x, y)) { if (bp) { - bp->f1 = data->select?(bp->f1|SELECT):(bp->f1&~SELECT); + bp->f1 = data->select ? (bp->f1 | SELECT) : (bp->f1 & ~SELECT); if (bp == cu->lastsel && !(bp->f1 & 1)) cu->lastsel = NULL; } else { if (cu->drawflag & CU_HIDE_HANDLES) { /* can only be beztindex==0 here since handles are hidden */ - bezt->f1 = bezt->f2 = bezt->f3 = data->select?(bezt->f2|SELECT):(bezt->f2&~SELECT); + bezt->f1 = bezt->f2 = bezt->f3 = data->select ? (bezt->f2 | SELECT) : (bezt->f2 & ~SELECT); } else { - if (beztindex==0) { - bezt->f1 = data->select?(bezt->f1|SELECT):(bezt->f1&~SELECT); + if (beztindex == 0) { + bezt->f1 = data->select ? (bezt->f1 | SELECT) : (bezt->f1 & ~SELECT); } - else if (beztindex==1) { - bezt->f2 = data->select?(bezt->f2|SELECT):(bezt->f2&~SELECT); + else if (beztindex == 1) { + bezt->f2 = data->select ? (bezt->f2 | SELECT) : (bezt->f2 & ~SELECT); } else { - bezt->f3 = data->select?(bezt->f3|SELECT):(bezt->f3&~SELECT); + bezt->f3 = data->select ? (bezt->f3 | SELECT) : (bezt->f3 & ~SELECT); } } @@ -682,7 +682,7 @@ static void do_lasso_select_lattice__doSelect(void *userData, BPoint *bp, int x, LassoSelectUserData *data = userData; if (lasso_inside(data->mcords, data->moves, x, y)) { - bp->f1 = data->select?(bp->f1|SELECT):(bp->f1&~SELECT); + bp->f1 = data->select ? (bp->f1 | SELECT) : (bp->f1 & ~SELECT); } } static void do_lasso_select_lattice(ViewContext *vc, int mcords[][2], short moves, short extend, short select) @@ -703,42 +703,42 @@ static void do_lasso_select_lattice(ViewContext *vc, int mcords[][2], short move static void do_lasso_select_armature(ViewContext *vc, int mcords[][2], short moves, short extend, short select) { - bArmature *arm= vc->obedit->data; + bArmature *arm = vc->obedit->data; EditBone *ebone; float vec[3]; short sco1[2], sco2[2], didpoint; - int change= FALSE; + int change = FALSE; - if (extend==0 && select) + if (extend == 0 && select) ED_armature_deselect_all_visible(vc->obedit); /* set editdata in vc */ - for (ebone= arm->edbo->first; ebone; ebone=ebone->next) { - if (EBONE_VISIBLE(arm, ebone) && (ebone->flag & BONE_UNSELECTABLE)==0) { + for (ebone = arm->edbo->first; ebone; ebone = ebone->next) { + if (EBONE_VISIBLE(arm, ebone) && (ebone->flag & BONE_UNSELECTABLE) == 0) { mul_v3_m4v3(vec, vc->obedit->obmat, ebone->head); project_short(vc->ar, vec, sco1); mul_v3_m4v3(vec, vc->obedit->obmat, ebone->tail); project_short(vc->ar, vec, sco2); - didpoint= 0; + didpoint = 0; if (lasso_inside(mcords, moves, sco1[0], sco1[1])) { if (select) ebone->flag |= BONE_ROOTSEL; else ebone->flag &= ~BONE_ROOTSEL; - didpoint= 1; - change= TRUE; + didpoint = 1; + change = TRUE; } if (lasso_inside(mcords, moves, sco2[0], sco2[1])) { if (select) ebone->flag |= BONE_TIPSEL; else ebone->flag &= ~BONE_TIPSEL; - didpoint= 1; - change= TRUE; + didpoint = 1; + change = TRUE; } /* if one of points selected, we skip the bone itself */ - if (didpoint==0 && lasso_inside_edge(mcords, moves, sco1[0], sco1[1], sco2[0], sco2[1])) { - if (select) ebone->flag |= BONE_TIPSEL|BONE_ROOTSEL|BONE_SELECTED; - else ebone->flag &= ~(BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL); - change= TRUE; + if (didpoint == 0 && lasso_inside_edge(mcords, moves, sco1[0], sco1[1], sco2[0], sco2[1])) { + if (select) ebone->flag |= BONE_TIPSEL | BONE_ROOTSEL | BONE_SELECTED; + else ebone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); + change = TRUE; } } } @@ -746,7 +746,7 @@ static void do_lasso_select_armature(ViewContext *vc, int mcords[][2], short mov if (change) { ED_armature_sync_selection(arm->edbo); ED_armature_validate_active(arm); - WM_main_add_notifier(NC_OBJECT|ND_BONE_SELECT, vc->obedit); + WM_main_add_notifier(NC_OBJECT | ND_BONE_SELECT, vc->obedit); } } @@ -755,25 +755,25 @@ static void do_lasso_select_armature(ViewContext *vc, int mcords[][2], short mov static void do_lasso_select_meta(ViewContext *vc, int mcords[][2], short moves, short extend, short select) { - MetaBall *mb = (MetaBall*)vc->obedit->data; + MetaBall *mb = (MetaBall *)vc->obedit->data; MetaElem *ml; float vec[3]; short sco[2]; if (extend == 0 && select) { - for (ml= mb->editelems->first; ml; ml= ml->next) { + for (ml = mb->editelems->first; ml; ml = ml->next) { ml->flag &= ~SELECT; } } - for (ml= mb->editelems->first; ml; ml= ml->next) { + for (ml = mb->editelems->first; ml; ml = ml->next) { mul_v3_m4v3(vec, vc->obedit->obmat, &ml->x); project_short(vc->ar, vec, sco); if (lasso_inside(mcords, moves, sco[0], sco[1])) { - if (select) ml->flag |= SELECT; - else ml->flag &= ~SELECT; + if (select) ml->flag |= SELECT; + else ml->flag &= ~SELECT; } } } @@ -786,36 +786,36 @@ int do_paintvert_box_select(ViewContext *vc, rcti *rect, int select, int extend) unsigned int *rt; int a, index; char *selar; - int sx= rect->xmax-rect->xmin+1; - int sy= rect->ymax-rect->ymin+1; + int sx = rect->xmax - rect->xmin + 1; + int sy = rect->ymax - rect->ymin + 1; - me= vc->obact->data; + me = vc->obact->data; - if (me==NULL || me->totvert==0 || sx*sy <= 0) + if (me == NULL || me->totvert == 0 || sx * sy <= 0) return OPERATOR_CANCELLED; - selar= MEM_callocN(me->totvert+1, "selar"); + selar = MEM_callocN(me->totvert + 1, "selar"); if (extend == 0 && select) paintvert_deselect_all_visible(vc->obact, SEL_DESELECT, FALSE); view3d_validate_backbuf(vc); - ibuf = IMB_allocImBuf(sx,sy,32,IB_rect); + ibuf = IMB_allocImBuf(sx, sy, 32, IB_rect); rt = ibuf->rect; - glReadPixels(rect->xmin+vc->ar->winrct.xmin, rect->ymin+vc->ar->winrct.ymin, sx, sy, GL_RGBA, GL_UNSIGNED_BYTE, ibuf->rect); - if (ENDIAN_ORDER==B_ENDIAN) IMB_convert_rgba_to_abgr(ibuf); + glReadPixels(rect->xmin + vc->ar->winrct.xmin, rect->ymin + vc->ar->winrct.ymin, sx, sy, GL_RGBA, GL_UNSIGNED_BYTE, ibuf->rect); + if (ENDIAN_ORDER == B_ENDIAN) IMB_convert_rgba_to_abgr(ibuf); - a= sx*sy; + a = sx * sy; while (a--) { if (*rt) { - index= WM_framebuffer_to_index(*rt); - if (index<=me->totvert) selar[index]= 1; + index = WM_framebuffer_to_index(*rt); + if (index <= me->totvert) selar[index] = 1; } rt++; } - mvert= me->mvert; + mvert = me->mvert; for (a = 1; a <= me->totvert; a++, mvert++) { if (selar[a]) { if ((mvert->flag & ME_HIDE) == 0) { @@ -839,16 +839,16 @@ int do_paintvert_box_select(ViewContext *vc, rcti *rect, int select, int extend) static void do_lasso_select_paintvert(ViewContext *vc, int mcords[][2], short moves, short extend, short select) { - Object *ob= vc->obact; - Mesh *me= ob?ob->data:NULL; + Object *ob = vc->obact; + Mesh *me = ob ? ob->data : NULL; rcti rect; - if (me==NULL || me->totvert==0) + if (me == NULL || me->totvert == 0) return; - if (extend==0 && select) - paintvert_deselect_all_visible(ob, SEL_DESELECT, FALSE); /* flush selection at the end */ - bm_vertoffs= me->totvert+1; /* max index array */ + if (extend == 0 && select) + paintvert_deselect_all_visible(ob, SEL_DESELECT, FALSE); /* flush selection at the end */ + bm_vertoffs = me->totvert + 1; /* max index array */ lasso_select_boundbox(&rect, mcords, moves); EDBM_mask_init_backbuf_border(vc, mcords, moves, rect.xmin, rect.ymin, rect.xmax, rect.ymax); @@ -861,17 +861,17 @@ static void do_lasso_select_paintvert(ViewContext *vc, int mcords[][2], short mo } static void do_lasso_select_paintface(ViewContext *vc, int mcords[][2], short moves, short extend, short select) { - Object *ob= vc->obact; - Mesh *me= ob?ob->data:NULL; + Object *ob = vc->obact; + Mesh *me = ob ? ob->data : NULL; rcti rect; - if (me==NULL || me->totpoly==0) + if (me == NULL || me->totpoly == 0) return; - if (extend==0 && select) - paintface_deselect_all_visible(ob, SEL_DESELECT, FALSE); /* flush selection at the end */ + if (extend == 0 && select) + paintface_deselect_all_visible(ob, SEL_DESELECT, FALSE); /* flush selection at the end */ - bm_vertoffs= me->totpoly+1; /* max index array */ + bm_vertoffs = me->totpoly + 1; /* max index array */ lasso_select_boundbox(&rect, mcords, moves); EDBM_mask_init_backbuf_border(vc, mcords, moves, rect.xmin, rect.ymin, rect.xmax, rect.ymax); @@ -896,10 +896,10 @@ static void do_lasso_select_node(int mcords[][2], short moves, short select) lasso_select_boundbox(&rect, mcords, moves); /* store selection in temp test flag */ - for (node= snode->edittree->nodes.first; node; node= node->next) { + for (node = snode->edittree->nodes.first; node; node = node->next) { - node_centf[0] = (node->totr.xmin+node->totr.xmax)/2; - node_centf[1] = (node->totr.ymin+node->totr.ymax)/2; + node_centf[0] = (node->totr.xmin + node->totr.xmax) / 2; + node_centf[1] = (node->totr.ymin + node->totr.ymax) / 2; ipoco_to_areaco_noclip(G.v2d, node_centf, node_cent); if (BLI_in_rcti(&rect, node_cent[0], node_cent[1]) && lasso_inside(mcords, moves, node_cent[0], node_cent[1])) { @@ -919,43 +919,43 @@ static void view3d_lasso_select(bContext *C, ViewContext *vc, int mcords[][2], s { Object *ob = CTX_data_active_object(C); - if (vc->obedit==NULL) { /* Object Mode */ + if (vc->obedit == NULL) { /* Object Mode */ if (paint_facesel_test(ob)) do_lasso_select_paintface(vc, mcords, moves, extend, select); else if (paint_vertsel_test(ob)) do_lasso_select_paintvert(vc, mcords, moves, extend, select); - else if (ob && ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT)) + else if (ob && ob->mode & (OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT | OB_MODE_TEXTURE_PAINT)) ; else if (ob && ob->mode & OB_MODE_PARTICLE_EDIT) PE_lasso_select(C, mcords, moves, extend, select); else { do_lasso_select_objects(vc, mcords, moves, extend, select); - WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, vc->scene); + WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, vc->scene); } } else { /* Edit Mode */ - switch(vc->obedit->type) { - case OB_MESH: - do_lasso_select_mesh(vc, mcords, moves, extend, select); - break; - case OB_CURVE: - case OB_SURF: - do_lasso_select_curve(vc, mcords, moves, extend, select); - break; - case OB_LATTICE: - do_lasso_select_lattice(vc, mcords, moves, extend, select); - break; - case OB_ARMATURE: - do_lasso_select_armature(vc, mcords, moves, extend, select); - break; - case OB_MBALL: - do_lasso_select_meta(vc, mcords, moves, extend, select); - break; - default: - assert(!"lasso select on incorrect object type"); + switch (vc->obedit->type) { + case OB_MESH: + do_lasso_select_mesh(vc, mcords, moves, extend, select); + break; + case OB_CURVE: + case OB_SURF: + do_lasso_select_curve(vc, mcords, moves, extend, select); + break; + case OB_LATTICE: + do_lasso_select_lattice(vc, mcords, moves, extend, select); + break; + case OB_ARMATURE: + do_lasso_select_armature(vc, mcords, moves, extend, select); + break; + case OB_MBALL: + do_lasso_select_meta(vc, mcords, moves, extend, select); + break; + default: + assert(!"lasso select on incorrect object type"); } - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, vc->obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, vc->obedit->data); } } @@ -965,29 +965,29 @@ static void view3d_lasso_select(bContext *C, ViewContext *vc, int mcords[][2], s static int view3d_lasso_select_exec(bContext *C, wmOperator *op) { ViewContext vc; - int i= 0; + int i = 0; int mcords[1024][2]; RNA_BEGIN(op->ptr, itemptr, "path") { float loc[2]; RNA_float_get_array(&itemptr, "loc", loc); - mcords[i][0]= (int)loc[0]; - mcords[i][1]= (int)loc[1]; + mcords[i][0] = (int)loc[0]; + mcords[i][1] = (int)loc[1]; i++; - if (i>=1024) break; + if (i >= 1024) break; } RNA_END; - if (i>1) { + if (i > 1) { short extend, select; view3d_operator_needs_opengl(C); /* setup view context for argument to callbacks */ view3d_set_viewcontext(C, &vc); - extend= RNA_boolean_get(op->ptr, "extend"); - select= !RNA_boolean_get(op->ptr, "deselect"); + extend = RNA_boolean_get(op->ptr, "extend"); + select = !RNA_boolean_get(op->ptr, "deselect"); view3d_lasso_select(C, &vc, mcords, i, extend, select); return OPERATOR_FINISHED; @@ -1023,41 +1023,41 @@ void VIEW3D_OT_select_lasso(wmOperatorType *ot) static unsigned int samplerect(unsigned int *buf, int size, unsigned int dontdo) { Base *base; - unsigned int *bufmin,*bufmax; - int a,b,rc,tel,len,dirvec[4][2],maxob; - unsigned int retval=0; + unsigned int *bufmin, *bufmax; + int a, b, rc, tel, len, dirvec[4][2], maxob; + unsigned int retval = 0; - base= LASTBASE; - if (base==0) return 0; - maxob= base->selcol; + base = LASTBASE; + if (base == 0) return 0; + maxob = base->selcol; - len= (size-1)/2; - rc= 0; + len = (size - 1) / 2; + rc = 0; - dirvec[0][0]= 1; - dirvec[0][1]= 0; - dirvec[1][0]= 0; - dirvec[1][1]= -size; - dirvec[2][0]= -1; - dirvec[2][1]= 0; - dirvec[3][0]= 0; - dirvec[3][1]= size; + dirvec[0][0] = 1; + dirvec[0][1] = 0; + dirvec[1][0] = 0; + dirvec[1][1] = -size; + dirvec[2][0] = -1; + dirvec[2][1] = 0; + dirvec[3][0] = 0; + dirvec[3][1] = size; - bufmin= buf; - bufmax= buf+ size*size; - buf+= len*size+ len; + bufmin = buf; + bufmax = buf + size * size; + buf += len * size + len; - for (tel=1;tel<=size;tel++) { + for (tel = 1; tel <= size; tel++) { - for (a=0;a<2;a++) { - for (b=0;b=bufmax) return retval; + if (buf < bufmin || buf >= bufmax) return retval; } rc++; rc &= 3; @@ -1072,19 +1072,19 @@ static unsigned int samplerect(unsigned int *buf, int size, unsigned int dontdo) /* The max number of menu items in an object select menu */ typedef struct SelMenuItemF { - char idname[MAX_ID_NAME-2]; + char idname[MAX_ID_NAME - 2]; int icon; } SelMenuItemF; -#define SEL_MENU_SIZE 22 +#define SEL_MENU_SIZE 22 static SelMenuItemF object_mouse_select_menu_data[SEL_MENU_SIZE]; /* special (crappy) operator only for menu select */ static EnumPropertyItem *object_select_menu_enum_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free) { - EnumPropertyItem *item= NULL, item_tmp= {0}; - int totitem= 0; - int i= 0; + EnumPropertyItem *item = NULL, item_tmp = {0}; + int totitem = 0; + int i = 0; /* don't need context but avoid docgen using this */ if (C == NULL || object_mouse_select_menu_data[i].idname[0] == '\0') { @@ -1092,42 +1092,42 @@ static EnumPropertyItem *object_select_menu_enum_itemf(bContext *C, PointerRNA * } for (; i < SEL_MENU_SIZE && object_mouse_select_menu_data[i].idname[0] != '\0'; i++) { - item_tmp.name= object_mouse_select_menu_data[i].idname; - item_tmp.identifier= object_mouse_select_menu_data[i].idname; - item_tmp.value= i; - item_tmp.icon= object_mouse_select_menu_data[i].icon; + item_tmp.name = object_mouse_select_menu_data[i].idname; + item_tmp.identifier = object_mouse_select_menu_data[i].idname; + item_tmp.value = i; + item_tmp.icon = object_mouse_select_menu_data[i].icon; RNA_enum_item_add(&item, &totitem, &item_tmp); } RNA_enum_item_end(&item, &totitem); - *free= 1; + *free = 1; return item; } static int object_select_menu_exec(bContext *C, wmOperator *op) { - int name_index= RNA_enum_get(op->ptr, "name"); - short extend= RNA_boolean_get(op->ptr, "extend"); + int name_index = RNA_enum_get(op->ptr, "name"); + short extend = RNA_boolean_get(op->ptr, "extend"); short changed = 0; - const char *name= object_mouse_select_menu_data[name_index].idname; + const char *name = object_mouse_select_menu_data[name_index].idname; if (!extend) { - CTX_DATA_BEGIN(C, Base*, base, selectable_bases) { + CTX_DATA_BEGIN(C, Base *, base, selectable_bases) { if (base->flag & SELECT) { ED_base_object_select(base, BA_DESELECT); - changed= 1; + changed = 1; } } CTX_DATA_END; } - CTX_DATA_BEGIN(C, Base*, base, selectable_bases) { + CTX_DATA_BEGIN(C, Base *, base, selectable_bases) { /* this is a bit dodjy, there should only be ONE object with this name, but library objects can mess this up */ - if (strcmp(name, base->object->id.name+2)==0) { + if (strcmp(name, base->object->id.name + 2) == 0) { ED_base_object_activate(C, base); ED_base_object_select(base, BA_SELECT); - changed= 1; + changed = 1; } } CTX_DATA_END; @@ -1137,7 +1137,7 @@ static int object_select_menu_exec(bContext *C, wmOperator *op) /* undo? */ if (changed) { - WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, CTX_data_scene(C)); + WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, CTX_data_scene(C)); return OPERATOR_FINISHED; } else { @@ -1159,10 +1159,10 @@ void VIEW3D_OT_select_menu(wmOperatorType *ot) ot->exec = object_select_menu_exec; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* keyingset to use (dynamic enum) */ - prop= RNA_def_enum(ot->srna, "name", DummyRNA_NULL_items, 0, "Object Name", ""); + prop = RNA_def_enum(ot->srna, "name", DummyRNA_NULL_items, 0, "Object Name", ""); RNA_def_enum_funcs(prop, object_select_menu_enum_itemf); RNA_def_property_flag(prop, PROP_HIDDEN); ot->prop = prop; @@ -1174,9 +1174,9 @@ static void deselectall_except(Scene *scene, Base *b) /* deselect all except b { Base *base; - for (base= FIRSTBASE; base; base= base->next) { + for (base = FIRSTBASE; base; base = base->next) { if (base->flag & SELECT) { - if (b!=base) { + if (b != base) { ED_base_object_select(base, BA_DESELECT); } } @@ -1187,45 +1187,45 @@ static Base *object_mouse_select_menu(bContext *C, ViewContext *vc, unsigned int { short baseCount = 0; short ok; - LinkNode *linklist= NULL; + LinkNode *linklist = NULL; - CTX_DATA_BEGIN(C, Base*, base, selectable_bases) { - ok= FALSE; + CTX_DATA_BEGIN(C, Base *, base, selectable_bases) { + ok = FALSE; /* two selection methods, the CTRL select uses max dist of 15 */ if (buffer) { int a; - for (a=0; aselcol==buffer[ (4 * a) + 3 ]) - ok= TRUE; + if (base->selcol == buffer[(4 * a) + 3]) + ok = TRUE; } } else { - int temp, dist=15; + int temp, dist = 15; project_short(vc->ar, base->object->obmat[3], &base->sx); - temp= abs(base->sx -mval[0]) + abs(base->sy -mval[1]); + temp = abs(base->sx - mval[0]) + abs(base->sy - mval[1]); if (temp < dist) - ok= TRUE; + ok = TRUE; } if (ok) { baseCount++; BLI_linklist_prepend(&linklist, base); - if (baseCount==SEL_MENU_SIZE) + if (baseCount == SEL_MENU_SIZE) break; } } CTX_DATA_END; - if (baseCount==0) { + if (baseCount == 0) { return NULL; } if (baseCount == 1) { - Base *base= (Base *)linklist->link; + Base *base = (Base *)linklist->link; BLI_linklist_free(linklist, NULL); return base; } @@ -1236,12 +1236,12 @@ static Base *object_mouse_select_menu(bContext *C, ViewContext *vc, unsigned int memset(object_mouse_select_menu_data, 0, sizeof(object_mouse_select_menu_data)); - for (node = linklist, i = 0; node; node= node->next, i++) { - Base *base=node->link; - Object *ob= base->object; - char *name= ob->id.name+2; + for (node = linklist, i = 0; node; node = node->next, i++) { + Base *base = node->link; + Object *ob = base->object; + char *name = ob->id.name + 2; - BLI_strncpy(object_mouse_select_menu_data[i].idname, name, MAX_ID_NAME-2); + BLI_strncpy(object_mouse_select_menu_data[i].idname, name, MAX_ID_NAME - 2); object_mouse_select_menu_data[i].icon = uiIconFromID(&ob->id); } @@ -1265,50 +1265,50 @@ static short mixed_bones_object_selectbuffer(ViewContext *vc, unsigned int *buff { rcti rect; int offs; - short a, hits15, hits9=0, hits5=0; - short has_bones15=0, has_bones9=0, has_bones5=0; - - BLI_init_rcti(&rect, mval[0]-14, mval[0]+14, mval[1]-14, mval[1]+14); - hits15= view3d_opengl_select(vc, buffer, MAXPICKBUF, &rect); - if (hits15>0) { - for (a=0; a0) { - for (a=0; a0) { - for (a=0; a 0) { + for (a = 0; a < hits15; a++) if (buffer[4 * a + 3] & 0xFFFF0000) has_bones15 = 1; + + offs = 4 * hits15; + BLI_init_rcti(&rect, mval[0] - 9, mval[0] + 9, mval[1] - 9, mval[1] + 9); + hits9 = view3d_opengl_select(vc, buffer + offs, MAXPICKBUF - offs, &rect); + if (hits9 > 0) { + for (a = 0; a < hits9; a++) if (buffer[offs + 4 * a + 3] & 0xFFFF0000) has_bones9 = 1; + + offs += 4 * hits9; + BLI_init_rcti(&rect, mval[0] - 5, mval[0] + 5, mval[1] - 5, mval[1] + 5); + hits5 = view3d_opengl_select(vc, buffer + offs, MAXPICKBUF - offs, &rect); + if (hits5 > 0) { + for (a = 0; a < hits5; a++) if (buffer[offs + 4 * a + 3] & 0xFFFF0000) has_bones5 = 1; } } if (has_bones5) { - offs= 4*hits15 + 4*hits9; - memcpy(buffer, buffer+offs, 4*offs); + offs = 4 * hits15 + 4 * hits9; + memcpy(buffer, buffer + offs, 4 * offs); return hits5; } if (has_bones9) { - offs= 4*hits15; - memcpy(buffer, buffer+offs, 4*offs); + offs = 4 * hits15; + memcpy(buffer, buffer + offs, 4 * offs); return hits9; } if (has_bones15) { return hits15; } - if (hits5>0) { - offs= 4*hits15 + 4*hits9; - memcpy(buffer, buffer+offs, 4*offs); + if (hits5 > 0) { + offs = 4 * hits15 + 4 * hits9; + memcpy(buffer, buffer + offs, 4 * offs); return hits5; } - if (hits9>0) { - offs= 4*hits15; - memcpy(buffer, buffer+offs, 4*offs); + if (hits9 > 0) { + offs = 4 * hits15; + memcpy(buffer, buffer + offs, 4 * offs); return hits9; } return hits15; @@ -1320,90 +1320,90 @@ static short mixed_bones_object_selectbuffer(ViewContext *vc, unsigned int *buff /* returns basact */ static Base *mouse_select_eval_buffer(ViewContext *vc, unsigned int *buffer, int hits, const int mval[2], Base *startbase, int has_bones) { - Scene *scene= vc->scene; - View3D *v3d= vc->v3d; - Base *base, *basact= NULL; - static int lastmval[2]={-100, -100}; - int a, donearest= 0; + Scene *scene = vc->scene; + View3D *v3d = vc->v3d; + Base *base, *basact = NULL; + static int lastmval[2] = {-100, -100}; + int a, donearest = 0; /* define if we use solid nearest select or not */ - if (v3d->drawtype>OB_WIRE) { - donearest= 1; - if ( ABS(mval[0]-lastmval[0])<3 && ABS(mval[1]-lastmval[1])<3) { - if (!has_bones) /* hrms, if theres bones we always do nearest */ - donearest= 0; + if (v3d->drawtype > OB_WIRE) { + donearest = 1; + if (ABS(mval[0] - lastmval[0]) < 3 && ABS(mval[1] - lastmval[1]) < 3) { + if (!has_bones) /* hrms, if theres bones we always do nearest */ + donearest = 0; } } - lastmval[0]= mval[0]; lastmval[1]= mval[1]; + lastmval[0] = mval[0]; lastmval[1] = mval[1]; if (donearest) { - unsigned int min= 0xFFFFFFFF; - int selcol= 0, notcol=0; + unsigned int min = 0xFFFFFFFF; + int selcol = 0, notcol = 0; if (has_bones) { /* we skip non-bone hits */ - for (a=0; a buffer[4*a+1] && (buffer[4*a+3] & 0xFFFF0000) ) { - min= buffer[4*a+1]; - selcol= buffer[4*a+3] & 0xFFFF; + for (a = 0; a < hits; a++) { + if (min > buffer[4 * a + 1] && (buffer[4 * a + 3] & 0xFFFF0000) ) { + min = buffer[4 * a + 1]; + selcol = buffer[4 * a + 3] & 0xFFFF; } } } else { /* only exclude active object when it is selected... */ - if (BASACT && (BASACT->flag & SELECT) && hits>1) notcol= BASACT->selcol; + if (BASACT && (BASACT->flag & SELECT) && hits > 1) notcol = BASACT->selcol; - for (a=0; a buffer[4*a+1] && notcol!=(buffer[4*a+3] & 0xFFFF)) { - min= buffer[4*a+1]; - selcol= buffer[4*a+3] & 0xFFFF; + for (a = 0; a < hits; a++) { + if (min > buffer[4 * a + 1] && notcol != (buffer[4 * a + 3] & 0xFFFF)) { + min = buffer[4 * a + 1]; + selcol = buffer[4 * a + 3] & 0xFFFF; } } } - base= FIRSTBASE; + base = FIRSTBASE; while (base) { if (BASE_SELECTABLE(v3d, base)) { - if (base->selcol==selcol) break; + if (base->selcol == selcol) break; } - base= base->next; + base = base->next; } - if (base) basact= base; + if (base) basact = base; } else { - base= startbase; + base = startbase; while (base) { /* skip objects with select restriction, to prevent prematurely ending this loop * with an un-selectable choice */ if (base->object->restrictflag & OB_RESTRICT_SELECT) { - base=base->next; - if (base==NULL) base= FIRSTBASE; - if (base==startbase) break; + base = base->next; + if (base == NULL) base = FIRSTBASE; + if (base == startbase) break; } if (BASE_SELECTABLE(v3d, base)) { - for (a=0; aselcol== (buffer[(4*a)+3] & 0xFFFF)) - basact= base; + if ((buffer[4 * a + 3] & 0xFFFF0000)) { + if (base->selcol == (buffer[(4 * a) + 3] & 0xFFFF)) + basact = base; } } else { - if (base->selcol== (buffer[(4*a)+3] & 0xFFFF)) - basact= base; + if (base->selcol == (buffer[(4 * a) + 3] & 0xFFFF)) + basact = base; } } } if (basact) break; - base= base->next; - if (base==NULL) base= FIRSTBASE; - if (base==startbase) break; + base = base->next; + if (base == NULL) base = FIRSTBASE; + if (base == startbase) break; } } @@ -1414,22 +1414,22 @@ static Base *mouse_select_eval_buffer(ViewContext *vc, unsigned int *buffer, int Base *ED_view3d_give_base_under_cursor(bContext *C, const int mval[2]) { ViewContext vc; - Base *basact= NULL; - unsigned int buffer[4*MAXPICKBUF]; + Base *basact = NULL; + unsigned int buffer[4 * MAXPICKBUF]; int hits; /* setup view context for argument to callbacks */ view3d_operator_needs_opengl(C); view3d_set_viewcontext(C, &vc); - hits= mixed_bones_object_selectbuffer(&vc, buffer, mval); + hits = mixed_bones_object_selectbuffer(&vc, buffer, mval); - if (hits>0) { - int a, has_bones= 0; + if (hits > 0) { + int a, has_bones = 0; - for (a=0; abase.first, has_bones); + basact = mouse_select_eval_buffer(&vc, buffer, hits, mval, vc.scene->base.first, has_bones); } return basact; @@ -1439,18 +1439,18 @@ static void deselect_all_tracks(MovieTracking *tracking) { MovieTrackingObject *object; - object= tracking->objects.first; + object = tracking->objects.first; while (object) { - ListBase *tracksbase= BKE_tracking_object_tracks(tracking, object); - MovieTrackingTrack *track= tracksbase->first; + ListBase *tracksbase = BKE_tracking_object_tracks(tracking, object); + MovieTrackingTrack *track = tracksbase->first; while (track) { BKE_tracking_deselect_track(track, TRACK_AREA_ALL); - track= track->next; + track = track->next; } - object= object->next; + object = object->next; } } @@ -1458,11 +1458,11 @@ static void deselect_all_tracks(MovieTracking *tracking) static int mouse_select(bContext *C, const int mval[2], short extend, short obcenter, short enumerate) { ViewContext vc; - ARegion *ar= CTX_wm_region(C); - View3D *v3d= CTX_wm_view3d(C); - Scene *scene= CTX_data_scene(C); - Base *base, *startbase=NULL, *basact=NULL, *oldbasact=NULL; - int temp, a, dist=100; + ARegion *ar = CTX_wm_region(C); + View3D *v3d = CTX_wm_view3d(C); + Scene *scene = CTX_data_scene(C); + Base *base, *startbase = NULL, *basact = NULL, *oldbasact = NULL; + int temp, a, dist = 100; int retval = 0; short hits; @@ -1470,8 +1470,8 @@ static int mouse_select(bContext *C, const int mval[2], short extend, short obce view3d_set_viewcontext(C, &vc); /* always start list from basact in wire mode */ - startbase= FIRSTBASE; - if (BASACT && BASACT->next) startbase= BASACT->next; + startbase = FIRSTBASE; + if (BASACT && BASACT->next) startbase = BASACT->next; /* This block uses the control key to make the object selected by its center point rather than its contents */ /* in editmode do not activate */ @@ -1479,58 +1479,58 @@ static int mouse_select(bContext *C, const int mval[2], short extend, short obce /* note; shift+alt goes to group-flush-selecting */ if (enumerate) { - basact= object_mouse_select_menu(C, &vc, NULL, 0, mval, extend); + basact = object_mouse_select_menu(C, &vc, NULL, 0, mval, extend); } else { - base= startbase; + base = startbase; while (base) { if (BASE_SELECTABLE(v3d, base)) { project_short(ar, base->object->obmat[3], &base->sx); - temp= abs(base->sx -mval[0]) + abs(base->sy -mval[1]); - if (base==BASACT) temp+=10; - if (tempsx - mval[0]) + abs(base->sy - mval[1]); + if (base == BASACT) temp += 10; + if (temp < dist) { - dist= temp; - basact= base; + dist = temp; + basact = base; } } - base= base->next; + base = base->next; - if (base==NULL) base= FIRSTBASE; - if (base==startbase) break; + if (base == NULL) base = FIRSTBASE; + if (base == startbase) break; } } } else { - unsigned int buffer[4*MAXPICKBUF]; + unsigned int buffer[4 * MAXPICKBUF]; /* if objects have posemode set, the bones are in the same selection buffer */ - hits= mixed_bones_object_selectbuffer(&vc, buffer, mval); + hits = mixed_bones_object_selectbuffer(&vc, buffer, mval); - if (hits>0) { - int has_bones= 0; + if (hits > 0) { + int has_bones = 0; /* note: bundles are handling in the same way as bones */ - for (a=0; aobject->type==OB_CAMERA) { - if (BASACT==basact) { + if (basact->object->type == OB_CAMERA) { + if (BASACT == basact) { int i, hitresult; - int changed= 0; + int changed = 0; - for (i=0; i< hits; i++) { - hitresult= buffer[3+(i*4)]; + for (i = 0; i < hits; i++) { + hitresult = buffer[3 + (i * 4)]; /* if there's bundles in buffer select bundles first, * so non-camera elements should be ignored in buffer */ @@ -1540,36 +1540,36 @@ static int mouse_select(bContext *C, const int mval[2], short extend, short obce /* index of bundle is 1<<16-based. if there's no "bone" index * in hight word, this buffer value belongs to camera,. not to bundle */ - if (buffer[4*i+3] & 0xFFFF0000) { - MovieClip *clip= object_get_movieclip(scene, basact->object, 0); - MovieTracking *tracking= &clip->tracking; + if (buffer[4 * i + 3] & 0xFFFF0000) { + MovieClip *clip = object_get_movieclip(scene, basact->object, 0); + MovieTracking *tracking = &clip->tracking; ListBase *tracksbase; MovieTrackingTrack *track; - track= BKE_tracking_indexed_track(&clip->tracking, hitresult >> 16, &tracksbase); + track = BKE_tracking_indexed_track(&clip->tracking, hitresult >> 16, &tracksbase); if (TRACK_SELECTED(track) && extend) { - changed= 0; + changed = 0; BKE_tracking_deselect_track(track, TRACK_AREA_ALL); } else { - int oldsel= TRACK_SELECTED(track) ? 1 : 0; + int oldsel = TRACK_SELECTED(track) ? 1 : 0; if (!extend) deselect_all_tracks(tracking); BKE_tracking_select_track(tracksbase, track, TRACK_AREA_ALL, extend); - if (oldsel!=(TRACK_SELECTED(track) ? 1 : 0)) - changed= 1; + if (oldsel != (TRACK_SELECTED(track) ? 1 : 0)) + changed = 1; } - basact->flag|= SELECT; - basact->object->flag= basact->flag; + basact->flag |= SELECT; + basact->object->flag = basact->flag; - retval= 1; + retval = 1; - WM_event_add_notifier(C, NC_MOVIECLIP|ND_SELECT, track); - WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene); + WM_event_add_notifier(C, NC_MOVIECLIP | ND_SELECT, track); + WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene); break; } @@ -1578,31 +1578,31 @@ static int mouse_select(bContext *C, const int mval[2], short extend, short obce if (!changed) { /* fallback to regular object selection if no new bundles were selected, * allows to select object parented to reconstruction object */ - basact= mouse_select_eval_buffer(&vc, buffer, hits, mval, startbase, 0); + basact = mouse_select_eval_buffer(&vc, buffer, hits, mval, startbase, 0); } } } - else if (ED_do_pose_selectbuffer(scene, basact, buffer, hits, extend) ) { /* then bone is found */ + else if (ED_do_pose_selectbuffer(scene, basact, buffer, hits, extend) ) { /* then bone is found */ /* we make the armature selected: * not-selected active object in posemode won't work well for tools */ - basact->flag|= SELECT; - basact->object->flag= basact->flag; + basact->flag |= SELECT; + basact->object->flag = basact->flag; retval = 1; - WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, basact->object); - WM_event_add_notifier(C, NC_OBJECT|ND_BONE_ACTIVE, basact->object); + WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, basact->object); + WM_event_add_notifier(C, NC_OBJECT | ND_BONE_ACTIVE, basact->object); /* in weightpaint, we use selected bone to select vertexgroup, so no switch to new active object */ if (BASACT && (BASACT->object->mode & OB_MODE_WEIGHT_PAINT)) { /* prevent activating */ - basact= NULL; + basact = NULL; } } /* prevent bone selecting to pass on to object selecting */ - if (basact==BASACT) - basact= NULL; + if (basact == BASACT) + basact = NULL; } } } @@ -1619,7 +1619,7 @@ static int mouse_select(bContext *C, const int mval[2], short extend, short obce /* also prevent making it active on mouse selection */ else if (BASE_SELECTABLE(v3d, basact)) { - oldbasact= BASACT; + oldbasact = BASACT; if (!extend) { deselectall_except(scene, basact); @@ -1630,7 +1630,7 @@ static int mouse_select(bContext *C, const int mval[2], short extend, short obce } else { if (basact->flag & SELECT) { - if (basact==oldbasact) + if (basact == oldbasact) ED_base_object_select(basact, BA_DESELECT); } else ED_base_object_select(basact, BA_SELECT); @@ -1641,7 +1641,7 @@ static int mouse_select(bContext *C, const int mval[2], short extend, short obce } } - WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene); + WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene); } return retval; @@ -1657,22 +1657,22 @@ typedef struct BoxSelectUserData { int edge_inside_circle(short centx, short centy, short rad, short x1, short y1, short x2, short y2) { - int radsq= rad*rad; + int radsq = rad * rad; float v1[2], v2[2], v3[2]; /* check points in circle itself */ - if ( (x1-centx)*(x1-centx) + (y1-centy)*(y1-centy) <= radsq ) return 1; - if ( (x2-centx)*(x2-centx) + (y2-centy)*(y2-centy) <= radsq ) return 1; + if ( (x1 - centx) * (x1 - centx) + (y1 - centy) * (y1 - centy) <= radsq) return 1; + if ( (x2 - centx) * (x2 - centx) + (y2 - centy) * (y2 - centy) <= radsq) return 1; /* pointdistline */ - v3[0]= centx; - v3[1]= centy; - v1[0]= x1; - v1[1]= y1; - v2[0]= x2; - v2[1]= y2; + v3[0] = centx; + v3[1] = centy; + v1[0] = x1; + v1[1] = y1; + v2[0] = x2; + v2[1] = y2; - if ( dist_to_line_segment_v2(v3, v1, v2) < (float)rad ) return 1; + if (dist_to_line_segment_v2(v3, v1, v2) < (float)rad) return 1; return 0; } @@ -1680,28 +1680,28 @@ int edge_inside_circle(short centx, short centy, short rad, short x1, short y1, static void do_nurbs_box_select__doSelect(void *userData, Nurb *UNUSED(nu), BPoint *bp, BezTriple *bezt, int beztindex, int x, int y) { BoxSelectUserData *data = userData; - Object *obedit= data->vc->obedit; - Curve *cu= (Curve*)obedit->data; + Object *obedit = data->vc->obedit; + Curve *cu = (Curve *)obedit->data; if (BLI_in_rcti(data->rect, x, y)) { if (bp) { - bp->f1 = data->select?(bp->f1|SELECT):(bp->f1&~SELECT); + bp->f1 = data->select ? (bp->f1 | SELECT) : (bp->f1 & ~SELECT); if (bp == cu->lastsel && !(bp->f1 & 1)) cu->lastsel = NULL; } else { if (cu->drawflag & CU_HIDE_HANDLES) { /* can only be beztindex==0 here since handles are hidden */ - bezt->f1 = bezt->f2 = bezt->f3 = data->select?(bezt->f2|SELECT):(bezt->f2&~SELECT); + bezt->f1 = bezt->f2 = bezt->f3 = data->select ? (bezt->f2 | SELECT) : (bezt->f2 & ~SELECT); } else { - if (beztindex==0) { - bezt->f1 = data->select?(bezt->f1|SELECT):(bezt->f1&~SELECT); + if (beztindex == 0) { + bezt->f1 = data->select ? (bezt->f1 | SELECT) : (bezt->f1 & ~SELECT); } - else if (beztindex==1) { - bezt->f2 = data->select?(bezt->f2|SELECT):(bezt->f2&~SELECT); + else if (beztindex == 1) { + bezt->f2 = data->select ? (bezt->f2 | SELECT) : (bezt->f2 & ~SELECT); } else { - bezt->f3 = data->select?(bezt->f3|SELECT):(bezt->f3&~SELECT); + bezt->f3 = data->select ? (bezt->f3 | SELECT) : (bezt->f3 & ~SELECT); } } @@ -1731,14 +1731,14 @@ static void do_lattice_box_select__doSelect(void *userData, BPoint *bp, int x, i BoxSelectUserData *data = userData; if (BLI_in_rcti(data->rect, x, y)) { - bp->f1 = data->select?(bp->f1|SELECT):(bp->f1&~SELECT); + bp->f1 = data->select ? (bp->f1 | SELECT) : (bp->f1 & ~SELECT); } } static int do_lattice_box_select(ViewContext *vc, rcti *rect, int select, int extend) { BoxSelectUserData data; - data.vc= vc; + data.vc = vc; data.rect = rect; data.select = select; @@ -1763,8 +1763,8 @@ static void do_mesh_box_select__doSelectEdge(void *userData, BMEdge *eed, int x0 { BoxSelectUserData *data = userData; - if (EDBM_check_backbuf(bm_solidoffs+index)) { - if (data->pass==0) { + if (EDBM_check_backbuf(bm_solidoffs + index)) { + if (data->pass == 0) { if (edge_fully_inside_rect(data->rect, x0, y0, x1, y1)) { BM_elem_select_set(data->vc->em->bm, eed, data->select); data->done = 1; @@ -1788,10 +1788,10 @@ static void do_mesh_box_select__doSelectFace(void *userData, BMFace *efa, int x, static int do_mesh_box_select(ViewContext *vc, rcti *rect, int select, int extend) { BoxSelectUserData data; - ToolSettings *ts= vc->scene->toolsettings; + ToolSettings *ts = vc->scene->toolsettings; int bbsel; - data.vc= vc; + data.vc = vc; data.rect = rect; data.select = select; data.pass = 0; @@ -1804,7 +1804,7 @@ static int do_mesh_box_select(ViewContext *vc, rcti *rect, int select, int exten ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d); glLoadMatrixf(vc->rv3d->viewmat); - bbsel= EDBM_init_backbuf_border(vc, rect->xmin, rect->ymin, rect->xmax, rect->ymax); + bbsel = EDBM_init_backbuf_border(vc, rect->xmin, rect->ymin, rect->xmax, rect->ymax); if (ts->selectmode & SCE_SELECT_VERTEX) { if (bbsel) { @@ -1815,12 +1815,12 @@ static int do_mesh_box_select(ViewContext *vc, rcti *rect, int select, int exten } } if (ts->selectmode & SCE_SELECT_EDGE) { - /* Does both bbsel and non-bbsel versions (need screen cos for both) */ + /* Does both bbsel and non-bbsel versions (need screen cos for both) */ data.pass = 0; mesh_foreachScreenEdge(vc, do_mesh_box_select__doSelectEdge, &data, V3D_CLIP_TEST_OFF); - if (data.done==0) { + if (data.done == 0) { data.pass = 1; mesh_foreachScreenEdge(vc, do_mesh_box_select__doSelectEdge, &data, V3D_CLIP_TEST_OFF); } @@ -1844,33 +1844,33 @@ static int do_mesh_box_select(ViewContext *vc, rcti *rect, int select, int exten static int do_meta_box_select(ViewContext *vc, rcti *rect, int select, int extend) { - MetaBall *mb = (MetaBall*)vc->obedit->data; + MetaBall *mb = (MetaBall *)vc->obedit->data; MetaElem *ml; int a; - unsigned int buffer[4*MAXPICKBUF]; + unsigned int buffer[4 * MAXPICKBUF]; short hits; - hits= view3d_opengl_select(vc, buffer, MAXPICKBUF, rect); + hits = view3d_opengl_select(vc, buffer, MAXPICKBUF, rect); if (extend == 0 && select) { - for (ml= mb->editelems->first; ml; ml= ml->next) { + for (ml = mb->editelems->first; ml; ml = ml->next) { ml->flag &= ~SELECT; } } - for (ml= mb->editelems->first; ml; ml= ml->next) { - for (a=0; aselcol1==buffer[ (4 * a) + 3 ]) { + for (ml = mb->editelems->first; ml; ml = ml->next) { + for (a = 0; a < hits; a++) { + if (ml->selcol1 == buffer[(4 * a) + 3]) { ml->flag |= MB_SCALE_RAD; - if (select) ml->flag |= SELECT; - else ml->flag &= ~SELECT; + if (select) ml->flag |= SELECT; + else ml->flag &= ~SELECT; break; } - if (ml->selcol2==buffer[ (4 * a) + 3 ]) { + if (ml->selcol2 == buffer[(4 * a) + 3]) { ml->flag &= ~MB_SCALE_RAD; - if (select) ml->flag |= SELECT; - else ml->flag &= ~SELECT; + if (select) ml->flag |= SELECT; + else ml->flag &= ~SELECT; break; } } @@ -1881,45 +1881,45 @@ static int do_meta_box_select(ViewContext *vc, rcti *rect, int select, int exten static int do_armature_box_select(ViewContext *vc, rcti *rect, short select, short extend) { - bArmature *arm= vc->obedit->data; + bArmature *arm = vc->obedit->data; EditBone *ebone; int a; - unsigned int buffer[4*MAXPICKBUF]; + unsigned int buffer[4 * MAXPICKBUF]; short hits; - hits= view3d_opengl_select(vc, buffer, MAXPICKBUF, rect); + hits = view3d_opengl_select(vc, buffer, MAXPICKBUF, rect); /* clear flag we use to detect point was affected */ - for (ebone= arm->edbo->first; ebone; ebone= ebone->next) + for (ebone = arm->edbo->first; ebone; ebone = ebone->next) ebone->flag &= ~BONE_DONE; - if (extend==0 && select) + if (extend == 0 && select) ED_armature_deselect_all_visible(vc->obedit); /* first we only check points inside the border */ - for (a=0; aedbo, index & ~(BONESEL_ANY)); - if ((ebone->flag & BONE_UNSELECTABLE)==0) { + if ((ebone->flag & BONE_UNSELECTABLE) == 0) { if (index & BONESEL_TIP) { ebone->flag |= BONE_DONE; - if (select) ebone->flag |= BONE_TIPSEL; - else ebone->flag &= ~BONE_TIPSEL; + if (select) ebone->flag |= BONE_TIPSEL; + else ebone->flag &= ~BONE_TIPSEL; } if (index & BONESEL_ROOT) { ebone->flag |= BONE_DONE; - if (select) ebone->flag |= BONE_ROOTSEL; - else ebone->flag &= ~BONE_ROOTSEL; + if (select) ebone->flag |= BONE_ROOTSEL; + else ebone->flag &= ~BONE_ROOTSEL; } } } } /* now we have to flush tag from parents... */ - for (ebone= arm->edbo->first; ebone; ebone= ebone->next) { + for (ebone = arm->edbo->first; ebone; ebone = ebone->next) { if (ebone->parent && (ebone->flag & BONE_CONNECTED)) { if (ebone->parent->flag & BONE_DONE) ebone->flag |= BONE_DONE; @@ -1927,17 +1927,17 @@ static int do_armature_box_select(ViewContext *vc, rcti *rect, short select, sho } /* only select/deselect entire bones when no points where in the rect */ - for (a=0; aedbo, index & ~(BONESEL_ANY)); if (index & BONESEL_BONE) { - if ((ebone->flag & BONE_UNSELECTABLE)==0) { + if ((ebone->flag & BONE_UNSELECTABLE) == 0) { if (!(ebone->flag & BONE_DONE)) { if (select) - ebone->flag |= (BONE_ROOTSEL|BONE_TIPSEL|BONE_SELECTED); + ebone->flag |= (BONE_ROOTSEL | BONE_TIPSEL | BONE_SELECTED); else - ebone->flag &= ~(BONE_ROOTSEL|BONE_TIPSEL|BONE_SELECTED); + ebone->flag &= ~(BONE_ROOTSEL | BONE_TIPSEL | BONE_SELECTED); } } } @@ -1952,24 +1952,24 @@ static int do_armature_box_select(ViewContext *vc, rcti *rect, short select, sho static int do_object_pose_box_select(bContext *C, ViewContext *vc, rcti *rect, int select, int extend) { Bone *bone; - Object *ob= vc->obact; - unsigned int *vbuffer=NULL; /* selection buffer */ - unsigned int *col; /* color in buffer */ + Object *ob = vc->obact; + unsigned int *vbuffer = NULL; /* selection buffer */ + unsigned int *col; /* color in buffer */ int bone_only; - int bone_selected=0; - int totobj= MAXPICKBUF; // XXX solve later + int bone_selected = 0; + int totobj = MAXPICKBUF; // XXX solve later short hits; if ((ob) && (ob->mode & OB_MODE_POSE)) - bone_only= 1; + bone_only = 1; else - bone_only= 0; + bone_only = 0; if (extend == 0 && select) { if (bone_only) { CTX_DATA_BEGIN(C, bPoseChannel *, pchan, visible_pose_bones) { - if ((pchan->bone->flag & BONE_UNSELECTABLE)==0) { - pchan->bone->flag &= ~(BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL); + if ((pchan->bone->flag & BONE_UNSELECTABLE) == 0) { + pchan->bone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); } } CTX_DATA_END; @@ -1980,8 +1980,8 @@ static int do_object_pose_box_select(bContext *C, ViewContext *vc, rcti *rect, i } /* selection buffer now has bones potentially too, so we add MAXPICKBUF */ - vbuffer = MEM_mallocN(4 * (totobj+MAXPICKBUF) * sizeof(unsigned int), "selection buffer"); - hits= view3d_opengl_select(vc, vbuffer, 4*(totobj+MAXPICKBUF), rect); + vbuffer = MEM_mallocN(4 * (totobj + MAXPICKBUF) * sizeof(unsigned int), "selection buffer"); + hits = view3d_opengl_select(vc, vbuffer, 4 * (totobj + MAXPICKBUF), rect); /* * LOGIC NOTES (theeth): * The buffer and ListBase have the same relative order, which makes the selection @@ -1994,30 +1994,30 @@ static int do_object_pose_box_select(bContext *C, ViewContext *vc, rcti *rect, i * does it incorrectly. */ - if (hits>0) { /* no need to loop if there's no hit */ + if (hits > 0) { /* no need to loop if there's no hit */ Base *base; col = vbuffer + 3; - for (base= vc->scene->base.first; base && hits; base= base->next) { + for (base = vc->scene->base.first; base && hits; base = base->next) { if (BASE_SELECTABLE(vc->v3d, base)) { - while (base->selcol == (*col & 0xFFFF)) { /* we got an object */ + while (base->selcol == (*col & 0xFFFF)) { /* we got an object */ - if (*col & 0xFFFF0000) { /* we got a bone */ + if (*col & 0xFFFF0000) { /* we got a bone */ bone = get_indexed_bone(base->object, *col & ~(BONESEL_ANY)); if (bone) { if (select) { - if ((bone->flag & BONE_UNSELECTABLE)==0) { + if ((bone->flag & BONE_UNSELECTABLE) == 0) { bone->flag |= BONE_SELECTED; - bone_selected=1; + bone_selected = 1; // XXX select_actionchannel_by_name(base->object->action, bone->name, 1); } } else { - bArmature *arm= base->object->data; + bArmature *arm = base->object->data; bone->flag &= ~BONE_SELECTED; // XXX select_actionchannel_by_name(base->object->action, bone->name, 0); - if (arm->act_bone==bone) - arm->act_bone= NULL; + if (arm->act_bone == bone) + arm->act_bone = NULL; } } @@ -2029,18 +2029,18 @@ static int do_object_pose_box_select(bContext *C, ViewContext *vc, rcti *rect, i ED_base_object_select(base, BA_DESELECT); } - col+=4; /* next color */ + col += 4; /* next color */ hits--; - if (hits==0) break; + if (hits == 0) break; } } if (bone_selected) { - WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, base->object); + WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, base->object); } } - WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, vc->scene); + WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, vc->scene); } MEM_freeN(vbuffer); @@ -2055,14 +2055,14 @@ static int view3d_borderselect_exec(bContext *C, wmOperator *op) short extend; short select; - int ret= OPERATOR_CANCELLED; + int ret = OPERATOR_CANCELLED; view3d_operator_needs_opengl(C); /* setup view context for argument to callbacks */ view3d_set_viewcontext(C, &vc); - select= (RNA_int_get(op->ptr, "gesture_mode")==GESTURE_MODAL_SELECT); + select = (RNA_int_get(op->ptr, "gesture_mode") == GESTURE_MODAL_SELECT); rect.xmin = RNA_int_get(op->ptr, "xmin"); rect.ymin = RNA_int_get(op->ptr, "ymin"); rect.xmax = RNA_int_get(op->ptr, "xmax"); @@ -2070,59 +2070,59 @@ static int view3d_borderselect_exec(bContext *C, wmOperator *op) extend = RNA_boolean_get(op->ptr, "extend"); if (vc.obedit) { - switch(vc.obedit->type) { - case OB_MESH: - vc.em = BMEdit_FromObject(vc.obedit); - ret= do_mesh_box_select(&vc, &rect, select, extend); + switch (vc.obedit->type) { + case OB_MESH: + vc.em = BMEdit_FromObject(vc.obedit); + ret = do_mesh_box_select(&vc, &rect, select, extend); // if (EM_texFaceCheck()) - if (ret & OPERATOR_FINISHED) { - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, vc.obedit->data); - } - break; - case OB_CURVE: - case OB_SURF: - ret= do_nurbs_box_select(&vc, &rect, select, extend); - if (ret & OPERATOR_FINISHED) { - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, vc.obedit->data); - } - break; - case OB_MBALL: - ret= do_meta_box_select(&vc, &rect, select, extend); - if (ret & OPERATOR_FINISHED) { - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, vc.obedit->data); - } - break; - case OB_ARMATURE: - ret= do_armature_box_select(&vc, &rect, select, extend); - if (ret & OPERATOR_FINISHED) { - WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, vc.obedit); - } - break; - case OB_LATTICE: - ret= do_lattice_box_select(&vc, &rect, select, extend); - if (ret & OPERATOR_FINISHED) { - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, vc.obedit->data); - } - break; - default: - assert(!"border select on incorrect object type"); + if (ret & OPERATOR_FINISHED) { + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, vc.obedit->data); + } + break; + case OB_CURVE: + case OB_SURF: + ret = do_nurbs_box_select(&vc, &rect, select, extend); + if (ret & OPERATOR_FINISHED) { + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, vc.obedit->data); + } + break; + case OB_MBALL: + ret = do_meta_box_select(&vc, &rect, select, extend); + if (ret & OPERATOR_FINISHED) { + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, vc.obedit->data); + } + break; + case OB_ARMATURE: + ret = do_armature_box_select(&vc, &rect, select, extend); + if (ret & OPERATOR_FINISHED) { + WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, vc.obedit); + } + break; + case OB_LATTICE: + ret = do_lattice_box_select(&vc, &rect, select, extend); + if (ret & OPERATOR_FINISHED) { + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, vc.obedit->data); + } + break; + default: + assert(!"border select on incorrect object type"); } } - else { /* no editmode, unified for bones and objects */ + else { /* no editmode, unified for bones and objects */ if (vc.obact && vc.obact->mode & OB_MODE_SCULPT) { /* pass */ } else if (vc.obact && paint_facesel_test(vc.obact)) { - ret= do_paintface_box_select(&vc, &rect, select, extend); + ret = do_paintface_box_select(&vc, &rect, select, extend); } else if (vc.obact && paint_vertsel_test(vc.obact)) { - ret= do_paintvert_box_select(&vc, &rect, select, extend); + ret = do_paintvert_box_select(&vc, &rect, select, extend); } else if (vc.obact && vc.obact->mode & OB_MODE_PARTICLE_EDIT) { - ret= PE_border_select(C, &rect, select, extend); + ret = PE_border_select(C, &rect, select, extend); } else { /* object mode with none active */ - ret= do_object_pose_box_select(C, &vc, &rect, select, extend); + ret = do_object_pose_box_select(C, &vc, &rect, select, extend); } } @@ -2161,7 +2161,7 @@ static int vertsel_vert_pick(struct bContext *C, Mesh *me, const int mval[2], un ViewContext vc; view3d_set_viewcontext(C, &vc); - if (!me || me->totvert==0) + if (!me || me->totvert == 0) return 0; if (size > 0) { @@ -2169,14 +2169,14 @@ static int vertsel_vert_pick(struct bContext *C, Mesh *me, const int mval[2], un * on an face in the backbuf, we can still select a vert */ int dist; - *index = view3d_sample_backbuf_rect(&vc, mval, size, 1, me->totvert+1, &dist,0,NULL, NULL); + *index = view3d_sample_backbuf_rect(&vc, mval, size, 1, me->totvert + 1, &dist, 0, NULL, NULL); } else { /* sample only on the exact position */ *index = view3d_sample_backbuf(&vc, mval[0], mval[1]); } - if ((*index)<=0 || (*index)>(unsigned int)me->totvert) + if ((*index) <= 0 || (*index) > (unsigned int)me->totvert) return 0; (*index)--; @@ -2188,12 +2188,12 @@ static int vertsel_vert_pick(struct bContext *C, Mesh *me, const int mval[2], un /* gets called via generic mouse select operator */ static int mouse_weight_paint_vertex_select(bContext *C, const int mval[2], short extend, Object *obact) { - Mesh* me= obact->data; /* already checked for NULL */ + Mesh*me = obact->data; /* already checked for NULL */ unsigned int index = 0; MVert *mv; if (vertsel_vert_pick(C, me, mval, &index, 50)) { - mv = me->mvert+index; + mv = me->mvert + index; if (extend) { mv->flag ^= SELECT; } @@ -2202,7 +2202,7 @@ static int mouse_weight_paint_vertex_select(bContext *C, const int mval[2], shor mv->flag |= SELECT; } paintvert_flush_flags(obact); - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obact->data); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obact->data); return 1; } return 0; @@ -2213,36 +2213,36 @@ static int mouse_weight_paint_vertex_select(bContext *C, const int mval[2], shor static int view3d_select_invoke(bContext *C, wmOperator *op, wmEvent *event) { - Object *obedit= CTX_data_edit_object(C); - Object *obact= CTX_data_active_object(C); - short extend= RNA_boolean_get(op->ptr, "extend"); - short center= RNA_boolean_get(op->ptr, "center"); - short enumerate= RNA_boolean_get(op->ptr, "enumerate"); - short object= RNA_boolean_get(op->ptr, "object"); - int retval = 0; + Object *obedit = CTX_data_edit_object(C); + Object *obact = CTX_data_active_object(C); + short extend = RNA_boolean_get(op->ptr, "extend"); + short center = RNA_boolean_get(op->ptr, "center"); + short enumerate = RNA_boolean_get(op->ptr, "enumerate"); + short object = RNA_boolean_get(op->ptr, "object"); + int retval = 0; view3d_operator_needs_opengl(C); if (object) { - obedit= NULL; - obact= NULL; + obedit = NULL; + obact = NULL; /* ack, this is incorrect but to do this correctly we would need an * alternative editmode/objectmode keymap, this copies the functionality * from 2.4x where Ctrl+Select in editmode does object select only */ - center= FALSE; + center = FALSE; } - if (obedit && object==FALSE) { - if (obedit->type==OB_MESH) + if (obedit && object == FALSE) { + if (obedit->type == OB_MESH) retval = mouse_mesh(C, event->mval, extend); - else if (obedit->type==OB_ARMATURE) + else if (obedit->type == OB_ARMATURE) retval = mouse_armature(C, event->mval, extend); - else if (obedit->type==OB_LATTICE) + else if (obedit->type == OB_LATTICE) retval = mouse_lattice(C, event->mval, extend); else if (ELEM(obedit->type, OB_CURVE, OB_SURF)) retval = mouse_nurb(C, event->mval, extend); - else if (obedit->type==OB_MBALL) + else if (obedit->type == OB_MBALL) retval = mouse_mball(C, event->mval, extend); } @@ -2261,9 +2261,9 @@ static int view3d_select_invoke(bContext *C, wmOperator *op, wmEvent *event) * FINISHED to signal one operator worked * */ if (retval) - return OPERATOR_PASS_THROUGH|OPERATOR_FINISHED; + return OPERATOR_PASS_THROUGH | OPERATOR_FINISHED; else - return OPERATOR_PASS_THROUGH; /* nothing selected, just passthrough */ + return OPERATOR_PASS_THROUGH; /* nothing selected, just passthrough */ } void VIEW3D_OT_select(wmOperatorType *ot) @@ -2301,9 +2301,9 @@ static void mesh_circle_doSelectVert(void *userData, BMVert *eve, int x, int y, { CircleSelectUserData *data = userData; int mx = x - data->mval[0], my = y - data->mval[1]; - float r = sqrt(mx*mx + my*my); + float r = sqrt(mx * mx + my * my); - if (r<=data->radius) { + if (r <= data->radius) { BM_elem_select_set(data->vc->em->bm, eve, data->select); } } @@ -2319,20 +2319,20 @@ static void mesh_circle_doSelectFace(void *userData, BMFace *efa, int x, int y, { CircleSelectUserData *data = userData; int mx = x - data->mval[0], my = y - data->mval[1]; - float r = sqrt(mx*mx + my*my); + float r = sqrt(mx * mx + my * my); - if (r<=data->radius) { + if (r <= data->radius) { BM_elem_select_set(data->vc->em->bm, efa, data->select); } } static void mesh_circle_select(ViewContext *vc, int select, const int mval[2], float rad) { - ToolSettings *ts= vc->scene->toolsettings; + ToolSettings *ts = vc->scene->toolsettings; int bbsel; CircleSelectUserData data; - bbsel= EDBM_init_backbuf_circle(vc, mval[0], mval[1], (short)(rad+1.0)); + bbsel = EDBM_init_backbuf_circle(vc, mval[0], mval[1], (short)(rad + 1.0)); ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d); /* for foreach's screen/vert projection */ vc->em = BMEdit_FromObject(vc->obedit); @@ -2345,7 +2345,7 @@ static void mesh_circle_select(ViewContext *vc, int select, const int mval[2], f if (ts->selectmode & SCE_SELECT_VERTEX) { if (bbsel) { - EDBM_backbuf_checkAndSelectVerts(vc->em, select==LEFTMOUSE); + EDBM_backbuf_checkAndSelectVerts(vc->em, select == LEFTMOUSE); } else { mesh_foreachScreenVert(vc, mesh_circle_doSelectVert, &data, V3D_CLIP_TEST_RV3D_CLIPPING); @@ -2354,7 +2354,7 @@ static void mesh_circle_select(ViewContext *vc, int select, const int mval[2], f if (ts->selectmode & SCE_SELECT_EDGE) { if (bbsel) { - EDBM_backbuf_checkAndSelectEdges(vc->em, select==LEFTMOUSE); + EDBM_backbuf_checkAndSelectEdges(vc->em, select == LEFTMOUSE); } else { mesh_foreachScreenEdge(vc, mesh_circle_doSelectEdge, &data, V3D_CLIP_TEST_OFF); @@ -2363,7 +2363,7 @@ static void mesh_circle_select(ViewContext *vc, int select, const int mval[2], f if (ts->selectmode & SCE_SELECT_FACE) { if (bbsel) { - EDBM_backbuf_checkAndSelectFaces(vc->em, select==LEFTMOUSE); + EDBM_backbuf_checkAndSelectFaces(vc->em, select == LEFTMOUSE); } else { mesh_foreachScreenFace(vc, mesh_circle_doSelectFace, &data); @@ -2376,15 +2376,15 @@ static void mesh_circle_select(ViewContext *vc, int select, const int mval[2], f static void paint_facesel_circle_select(ViewContext *vc, int select, const int mval[2], float rad) { - Object *ob= vc->obact; - Mesh *me = ob?ob->data:NULL; + Object *ob = vc->obact; + Mesh *me = ob ? ob->data : NULL; /* int bbsel; */ /* UNUSED */ if (me) { - bm_vertoffs= me->totpoly+1; /* max index array */ + bm_vertoffs = me->totpoly + 1; /* max index array */ - /* bbsel= */ /* UNUSED */ EDBM_init_backbuf_circle(vc, mval[0], mval[1], (short)(rad+1.0)); - EDBM_backbuf_checkAndSelectTFaces(me, select==LEFTMOUSE); + /* bbsel= */ /* UNUSED */ EDBM_init_backbuf_circle(vc, mval[0], mval[1], (short)(rad + 1.0)); + EDBM_backbuf_checkAndSelectTFaces(me, select == LEFTMOUSE); EDBM_free_backbuf(); } } @@ -2392,15 +2392,15 @@ static void paint_facesel_circle_select(ViewContext *vc, int select, const int m static void paint_vertsel_circle_select(ViewContext *vc, int select, const int mval[2], float rad) { - Object *ob= vc->obact; - Mesh *me = ob?ob->data:NULL; + Object *ob = vc->obact; + Mesh *me = ob ? ob->data : NULL; /* int bbsel; */ /* UNUSED */ /* CircleSelectUserData data = {NULL}; */ /* UNUSED */ if (me) { - bm_vertoffs= me->totvert+1; /* max index array */ + bm_vertoffs = me->totvert + 1; /* max index array */ - /* bbsel= */ /* UNUSED */ EDBM_init_backbuf_circle(vc, mval[0], mval[1], (short)(rad+1.0f)); - EDBM_backbuf_checkAndSelectVerts_obmode(me, select==LEFTMOUSE); + /* bbsel= */ /* UNUSED */ EDBM_init_backbuf_circle(vc, mval[0], mval[1], (short)(rad + 1.0f)); + EDBM_backbuf_checkAndSelectVerts_obmode(me, select == LEFTMOUSE); EDBM_free_backbuf(); paintvert_flush_flags(ob); @@ -2412,30 +2412,30 @@ static void nurbscurve_circle_doSelect(void *userData, Nurb *UNUSED(nu), BPoint { CircleSelectUserData *data = userData; int mx = x - data->mval[0], my = y - data->mval[1]; - float r = sqrt(mx*mx + my*my); - Object *obedit= data->vc->obedit; - Curve *cu= (Curve*)obedit->data; + float r = sqrt(mx * mx + my * my); + Object *obedit = data->vc->obedit; + Curve *cu = (Curve *)obedit->data; - if (r<=data->radius) { + if (r <= data->radius) { if (bp) { - bp->f1 = data->select?(bp->f1|SELECT):(bp->f1&~SELECT); + bp->f1 = data->select ? (bp->f1 | SELECT) : (bp->f1 & ~SELECT); if (bp == cu->lastsel && !(bp->f1 & 1)) cu->lastsel = NULL; } else { if (cu->drawflag & CU_HIDE_HANDLES) { /* can only be beztindex==0 here since handles are hidden */ - bezt->f1 = bezt->f2 = bezt->f3 = data->select?(bezt->f2|SELECT):(bezt->f2&~SELECT); + bezt->f1 = bezt->f2 = bezt->f3 = data->select ? (bezt->f2 | SELECT) : (bezt->f2 & ~SELECT); } else { - if (beztindex==0) { - bezt->f1 = data->select?(bezt->f1|SELECT):(bezt->f1&~SELECT); + if (beztindex == 0) { + bezt->f1 = data->select ? (bezt->f1 | SELECT) : (bezt->f1 & ~SELECT); } - else if (beztindex==1) { - bezt->f2 = data->select?(bezt->f2|SELECT):(bezt->f2&~SELECT); + else if (beztindex == 1) { + bezt->f2 = data->select ? (bezt->f2 | SELECT) : (bezt->f2 & ~SELECT); } else { - bezt->f3 = data->select?(bezt->f3|SELECT):(bezt->f3&~SELECT); + bezt->f3 = data->select ? (bezt->f3 | SELECT) : (bezt->f3 & ~SELECT); } } @@ -2464,10 +2464,10 @@ static void latticecurve_circle_doSelect(void *userData, BPoint *bp, int x, int { CircleSelectUserData *data = userData; int mx = x - data->mval[0], my = y - data->mval[1]; - float r = sqrt(mx*mx + my*my); + float r = sqrt(mx * mx + my * my); - if (r<=data->radius) { - bp->f1 = data->select?(bp->f1|SELECT):(bp->f1&~SELECT); + if (r <= data->radius) { + bp->f1 = data->select ? (bp->f1 | SELECT) : (bp->f1 & ~SELECT); } } static void lattice_circle_select(ViewContext *vc, int select, const int mval[2], float rad) @@ -2491,7 +2491,7 @@ static short pchan_circle_doSelectJoint(void *userData, bPoseChannel *pchan, int { CircleSelectUserData *data = userData; int mx = x - data->mval[0], my = y - data->mval[1]; - float r = sqrt(mx*mx + my*my); + float r = sqrt(mx * mx + my * my); if (r <= data->radius) { if (data->select) @@ -2508,7 +2508,7 @@ static void pose_circle_select(ViewContext *vc, int select, const int mval[2], f bArmature *arm = vc->obact->data; bPose *pose = vc->obact->pose; bPoseChannel *pchan; - int change= FALSE; + int change = FALSE; /* set vc->edit data */ data.select = select; @@ -2521,7 +2521,7 @@ static void pose_circle_select(ViewContext *vc, int select, const int mval[2], f /* check each PoseChannel... */ // TODO: could be optimized at some point for (pchan = pose->chanbase.first; pchan; pchan = pchan->next) { - short sco1[2], sco2[2], didpoint=0; + short sco1[2], sco2[2], didpoint = 0; float vec[3]; /* skip invisible bones */ @@ -2540,15 +2540,15 @@ static void pose_circle_select(ViewContext *vc, int select, const int mval[2], f * - the call to check also does the selection already */ if (pchan_circle_doSelectJoint(&data, pchan, sco1[0], sco1[1])) - didpoint= 1; + didpoint = 1; if (pchan_circle_doSelectJoint(&data, pchan, sco2[0], sco2[1])) - didpoint= 1; + didpoint = 1; change |= didpoint; } if (change) { - WM_main_add_notifier(NC_OBJECT|ND_BONE_SELECT, vc->obact); + WM_main_add_notifier(NC_OBJECT | ND_BONE_SELECT, vc->obact); } } @@ -2556,7 +2556,7 @@ static short armature_circle_doSelectJoint(void *userData, EditBone *ebone, int { CircleSelectUserData *data = userData; int mx = x - data->mval[0], my = y - data->mval[1]; - float r = sqrt(mx*mx + my*my); + float r = sqrt(mx * mx + my * my); if (r <= data->radius) { if (head) { @@ -2578,9 +2578,9 @@ static short armature_circle_doSelectJoint(void *userData, EditBone *ebone, int static void armature_circle_select(ViewContext *vc, int select, const int mval[2], float rad) { CircleSelectUserData data; - bArmature *arm= vc->obedit->data; + bArmature *arm = vc->obedit->data; EditBone *ebone; - int change= FALSE; + int change = FALSE; /* set vc->edit data */ data.select = select; @@ -2592,8 +2592,8 @@ static void armature_circle_select(ViewContext *vc, int select, const int mval[2 /* check each EditBone... */ // TODO: could be optimized at some point - for (ebone= arm->edbo->first; ebone; ebone=ebone->next) { - short sco1[2], sco2[2], didpoint=0; + for (ebone = arm->edbo->first; ebone; ebone = ebone->next) { + short sco1[2], sco2[2], didpoint = 0; float vec[3]; /* project head location to screenspace */ @@ -2608,18 +2608,18 @@ static void armature_circle_select(ViewContext *vc, int select, const int mval[2 * - the call to check also does the selection already */ if (armature_circle_doSelectJoint(&data, ebone, sco1[0], sco1[1], 1)) - didpoint= 1; + didpoint = 1; if (armature_circle_doSelectJoint(&data, ebone, sco2[0], sco2[1], 0)) - didpoint= 1; + didpoint = 1; /* only if the endpoints didn't get selected, deal with the middle of the bone too */ // XXX should we just do this always? - if ( (didpoint==0) && edge_inside_circle(mval[0], mval[1], rad, sco1[0], sco1[1], sco2[0], sco2[1]) ) { + if ( (didpoint == 0) && edge_inside_circle(mval[0], mval[1], rad, sco1[0], sco1[1], sco2[0], sco2[1]) ) { if (select) - ebone->flag |= BONE_TIPSEL|BONE_ROOTSEL|BONE_SELECTED; + ebone->flag |= BONE_TIPSEL | BONE_ROOTSEL | BONE_SELECTED; else - ebone->flag &= ~(BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL); - change= TRUE; + ebone->flag &= ~(BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL); + change = TRUE; } change |= didpoint; @@ -2628,7 +2628,7 @@ static void armature_circle_select(ViewContext *vc, int select, const int mval[2 if (change) { ED_armature_sync_selection(arm->edbo); ED_armature_validate_active(arm); - WM_main_add_notifier(NC_OBJECT|ND_BONE_SELECT, vc->obedit); + WM_main_add_notifier(NC_OBJECT | ND_BONE_SELECT, vc->obedit); } } @@ -2636,43 +2636,43 @@ static void armature_circle_select(ViewContext *vc, int select, const int mval[2 static void obedit_circle_select(ViewContext *vc, short select, const int mval[2], float rad) { - switch(vc->obedit->type) { - case OB_MESH: - mesh_circle_select(vc, select, mval, rad); - break; - case OB_CURVE: - case OB_SURF: - nurbscurve_circle_select(vc, select, mval, rad); - break; - case OB_LATTICE: - lattice_circle_select(vc, select, mval, rad); - break; - case OB_ARMATURE: - armature_circle_select(vc, select, mval, rad); - break; - default: - return; + switch (vc->obedit->type) { + case OB_MESH: + mesh_circle_select(vc, select, mval, rad); + break; + case OB_CURVE: + case OB_SURF: + nurbscurve_circle_select(vc, select, mval, rad); + break; + case OB_LATTICE: + lattice_circle_select(vc, select, mval, rad); + break; + case OB_ARMATURE: + armature_circle_select(vc, select, mval, rad); + break; + default: + return; } } /* not a real operator, only for circle test */ static int view3d_circle_select_exec(bContext *C, wmOperator *op) { - ScrArea *sa= CTX_wm_area(C); - ARegion *ar= CTX_wm_region(C); - Scene *scene= CTX_data_scene(C); - Object *obact= CTX_data_active_object(C); - View3D *v3d= sa->spacedata.first; - int x= RNA_int_get(op->ptr, "x"); - int y= RNA_int_get(op->ptr, "y"); - int radius= RNA_int_get(op->ptr, "radius"); - int gesture_mode= RNA_int_get(op->ptr, "gesture_mode"); + ScrArea *sa = CTX_wm_area(C); + ARegion *ar = CTX_wm_region(C); + Scene *scene = CTX_data_scene(C); + Object *obact = CTX_data_active_object(C); + View3D *v3d = sa->spacedata.first; + int x = RNA_int_get(op->ptr, "x"); + int y = RNA_int_get(op->ptr, "y"); + int radius = RNA_int_get(op->ptr, "radius"); + int gesture_mode = RNA_int_get(op->ptr, "gesture_mode"); int select; - select= (gesture_mode==GESTURE_MODAL_SELECT); + select = (gesture_mode == GESTURE_MODAL_SELECT); - if ( CTX_data_edit_object(C) || paint_facesel_test(obact) || paint_vertsel_test(obact) || - (obact && (obact->mode & (OB_MODE_PARTICLE_EDIT|OB_MODE_POSE))) ) + if (CTX_data_edit_object(C) || paint_facesel_test(obact) || paint_vertsel_test(obact) || + (obact && (obact->mode & (OB_MODE_PARTICLE_EDIT | OB_MODE_POSE))) ) { ViewContext vc; int mval[2]; @@ -2680,20 +2680,20 @@ static int view3d_circle_select_exec(bContext *C, wmOperator *op) view3d_operator_needs_opengl(C); view3d_set_viewcontext(C, &vc); - mval[0]= x; - mval[1]= y; + mval[0] = x; + mval[1] = y; if (CTX_data_edit_object(C)) { obedit_circle_select(&vc, select, mval, (float)radius); - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obact->data); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obact->data); } else if (paint_facesel_test(obact)) { paint_facesel_circle_select(&vc, select, mval, (float)radius); - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obact->data); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obact->data); } else if (paint_vertsel_test(obact)) { paint_vertsel_circle_select(&vc, select, mval, (float)radius); - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obact->data); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obact->data); } else if (obact->mode & OB_MODE_POSE) pose_circle_select(&vc, select, mval, (float)radius); @@ -2705,20 +2705,20 @@ static int view3d_circle_select_exec(bContext *C, wmOperator *op) } else { Base *base; - select= select?BA_SELECT:BA_DESELECT; - for (base= FIRSTBASE; base; base= base->next) { + select = select ? BA_SELECT : BA_DESELECT; + for (base = FIRSTBASE; base; base = base->next) { if (BASE_SELECTABLE(v3d, base)) { project_short(ar, base->object->obmat[3], &base->sx); - if (base->sx!=IS_CLIPPED) { - int dx= base->sx-x; - int dy= base->sy-y; - if ( dx*dx + dy*dy < radius*radius) + if (base->sx != IS_CLIPPED) { + int dx = base->sx - x; + int dy = base->sy - y; + if (dx * dx + dy * dy < radius * radius) ED_base_object_select(base, select); } } } - WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, CTX_data_scene(C)); + WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, CTX_data_scene(C)); } return OPERATOR_FINISHED; diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c index 1d8395c0967..9d160fb361a 100644 --- a/source/blender/editors/space_view3d/view3d_snap.c +++ b/source/blender/editors/space_view3d/view3d_snap.c @@ -73,7 +73,7 @@ #include "view3d_intern.h" -extern float originmat[3][3]; /* XXX object.c */ +extern float originmat[3][3]; /* XXX object.c */ /* ************************************************** */ /* ********************* old transform stuff ******** */ @@ -91,8 +91,8 @@ typedef struct TransVert { /* SELECT == (1 << 0) */ #define TX_VERT_USE_MAPLOC (1 << 1) -static TransVert *transvmain=NULL; -static int tottrans= 0; +static TransVert *transvmain = NULL; +static int tottrans = 0; /* copied from editobject.c, now uses (almost) proper depgraph */ static void special_transvert_update(Object *obedit) @@ -100,21 +100,21 @@ static void special_transvert_update(Object *obedit) if (obedit) { DAG_id_tag_update(obedit->data, 0); - if (obedit->type==OB_MESH) { - Mesh *me= obedit->data; - BM_mesh_normals_update(me->edit_btmesh->bm, TRUE); // does face centers too + if (obedit->type == OB_MESH) { + Mesh *me = obedit->data; + BM_mesh_normals_update(me->edit_btmesh->bm, TRUE); // does face centers too } else if (ELEM(obedit->type, OB_CURVE, OB_SURF)) { - Curve *cu= obedit->data; - ListBase *nurbs= curve_editnurbs(cu); - Nurb *nu= nurbs->first; + Curve *cu = obedit->data; + ListBase *nurbs = curve_editnurbs(cu); + Nurb *nu = nurbs->first; while (nu) { /* keep handles' vectors unchanged */ if (nu->bezt) { - int a= nu->pntsu; - TransVert *tv= transvmain; - BezTriple *bezt= nu->bezt; + int a = nu->pntsu; + TransVert *tv = transvmain; + BezTriple *bezt = nu->bezt; while (a--) { if (bezt->f1 & SELECT) tv++; @@ -123,12 +123,12 @@ static void special_transvert_update(Object *obedit) float v[3]; if (bezt->f1 & SELECT) { - sub_v3_v3v3(v, (tv-1)->oldloc, tv->oldloc); + sub_v3_v3v3(v, (tv - 1)->oldloc, tv->oldloc); add_v3_v3v3(bezt->vec[0], bezt->vec[1], v); } if (bezt->f3 & SELECT) { - sub_v3_v3v3(v, (tv+1)->oldloc, tv->oldloc); + sub_v3_v3v3(v, (tv + 1)->oldloc, tv->oldloc); add_v3_v3v3(bezt->vec[2], bezt->vec[1], v); } @@ -143,17 +143,17 @@ static void special_transvert_update(Object *obedit) test2DNurb(nu); testhandlesNurb(nu); /* test for bezier too */ - nu= nu->next; + nu = nu->next; } } - else if (obedit->type==OB_ARMATURE) { - bArmature *arm= obedit->data; + else if (obedit->type == OB_ARMATURE) { + bArmature *arm = obedit->data; EditBone *ebo; - TransVert *tv= transvmain; - int a=0; + TransVert *tv = transvmain; + int a = 0; /* Ensure all bone tails are correctly adjusted */ - for (ebo= arm->edbo->first; ebo; ebo=ebo->next) { + for (ebo = arm->edbo->first; ebo; ebo = ebo->next) { /* adjust tip if both ends selected */ if ((ebo->flag & BONE_ROOTSEL) && (ebo->flag & BONE_TIPSEL)) { if (tv) { @@ -163,13 +163,13 @@ static void special_transvert_update(Object *obedit) add_v3_v3(ebo->tail, diffvec); a++; - if (aedbo->first; ebo; ebo=ebo->next) { + for (ebo = arm->edbo->first; ebo; ebo = ebo->next) { if ((ebo->flag & BONE_CONNECTED) && ebo->parent) { /* If this bone has a parent tip that has been moved */ if (ebo->parent->flag & BONE_TIPSEL) { @@ -184,8 +184,8 @@ static void special_transvert_update(Object *obedit) if (arm->flag & ARM_MIRROR_EDIT) transform_armature_mirror_update(obedit); } - else if (obedit->type==OB_LATTICE) { - Lattice *lt= obedit->data; + else if (obedit->type == OB_LATTICE) { + Lattice *lt = obedit->data; if (lt->editlatt->latt->flag & LT_OUTSIDE) outside_lattice(lt->editlatt->latt); @@ -195,7 +195,7 @@ static void special_transvert_update(Object *obedit) static void set_mapped_co(void *vuserdata, int index, float *co, float *UNUSED(no), short *UNUSED(no_s)) { - void ** userdata = vuserdata; + void **userdata = vuserdata; BMEditMesh *em = userdata[0]; TransVert *tv = userdata[1]; BMVert *eve = EDBM_get_vert_for_index(em, index); @@ -208,28 +208,28 @@ static void set_mapped_co(void *vuserdata, int index, float *co, float *UNUSED(n /* copied from editobject.c, needs to be replaced with new transform code still */ /* mode flags: */ -#define TM_ALL_JOINTS 1 /* all joints (for bones only) */ -#define TM_SKIP_HANDLES 2 /* skip handles when control point is selected (for curves only) */ +#define TM_ALL_JOINTS 1 /* all joints (for bones only) */ +#define TM_SKIP_HANDLES 2 /* skip handles when control point is selected (for curves only) */ static void make_trans_verts(Object *obedit, float *min, float *max, int mode) { Nurb *nu; BezTriple *bezt; BPoint *bp; - TransVert *tv=NULL; + TransVert *tv = NULL; MetaElem *ml; BMVert *eve; - EditBone *ebo; + EditBone *ebo; float total, center[3], centroid[3]; int a; - tottrans= 0; // global! + tottrans = 0; // global! INIT_MINMAX(min, max); zero_v3(centroid); - if (obedit->type==OB_MESH) { - Mesh *me= obedit->data; - BMEditMesh *em= me->edit_btmesh; + if (obedit->type == OB_MESH) { + Mesh *me = obedit->data; + BMEditMesh *em = me->edit_btmesh; BMesh *bm = em->bm; BMIter iter; void *userdata[2] = {em, NULL}; @@ -239,21 +239,22 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode) * perhaps this could use its own array instead? - campbell */ // transform now requires awareness for select mode, so we tag the f1 flags in verts - tottrans= 0; + tottrans = 0; if (em->selectmode & SCE_SELECT_VERTEX) { BM_ITER(eve, &iter, bm, BM_VERTS_OF_MESH, NULL) { if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN) && BM_elem_flag_test(eve, BM_ELEM_SELECT)) { BM_elem_index_set(eve, 1); /* set_dirty! */ tottrans++; } - else BM_elem_index_set(eve, 0); /* set_dirty! */ + else BM_elem_index_set(eve, 0); /* set_dirty! */ } } else if (em->selectmode & SCE_SELECT_EDGE) { BMEdge *eed; - BM_ITER(eve, &iter, bm, BM_VERTS_OF_MESH, NULL) - BM_elem_index_set(eve, 0); /* set_dirty! */ + BM_ITER(eve, &iter, bm, BM_VERTS_OF_MESH, NULL) { + BM_elem_index_set(eve, 0); /* set_dirty! */ + } BM_ITER(eed, &iter, bm, BM_EDGES_OF_MESH, NULL) { if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN) && BM_elem_flag_test(eed, BM_ELEM_SELECT)) { @@ -262,14 +263,16 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode) } } - BM_ITER(eve, &iter, bm, BM_VERTS_OF_MESH, NULL) + BM_ITER(eve, &iter, bm, BM_VERTS_OF_MESH, NULL) { if (BM_elem_index_get(eve)) tottrans++; + } } else { BMFace *efa; - BM_ITER(eve, &iter, bm, BM_VERTS_OF_MESH, NULL) + BM_ITER(eve, &iter, bm, BM_VERTS_OF_MESH, NULL) { BM_elem_index_set(eve, 0); /* set_dirty! */ + } BM_ITER(efa, &iter, bm, BM_FACES_OF_MESH, NULL) { if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN) && BM_elem_flag_test(efa, BM_ELEM_SELECT)) { @@ -290,17 +293,17 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode) /* and now make transverts */ if (tottrans) { - tv=transvmain= MEM_callocN(tottrans*sizeof(TransVert), "maketransverts"); + tv = transvmain = MEM_callocN(tottrans * sizeof(TransVert), "maketransverts"); a = 0; BM_ITER(eve, &iter, bm, BM_VERTS_OF_MESH, NULL) { if (BM_elem_index_get(eve)) { BM_elem_index_set(eve, a); /* set_dirty! */ copy_v3_v3(tv->oldloc, eve->co); - tv->loc= eve->co; - if (eve->no[0] != 0.0f || eve->no[1] != 0.0f ||eve->no[2] != 0.0f) - tv->nor= eve->no; // note this is a hackish signal (ton) - tv->flag= BM_elem_index_get(eve) & SELECT; + tv->loc = eve->co; + if (eve->no[0] != 0.0f || eve->no[1] != 0.0f || eve->no[2] != 0.0f) + tv->nor = eve->no; // note this is a hackish signal (ton) + tv->flag = BM_elem_index_get(eve) & SELECT; tv++; a++; } @@ -319,19 +322,19 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode) EDBM_free_index_arrays(em); } } - else if (obedit->type==OB_ARMATURE) { - bArmature *arm= obedit->data; - int totmalloc= BLI_countlist(arm->edbo); + else if (obedit->type == OB_ARMATURE) { + bArmature *arm = obedit->data; + int totmalloc = BLI_countlist(arm->edbo); totmalloc *= 2; /* probably overkill but bones can have 2 trans verts each */ - tv=transvmain= MEM_callocN(totmalloc*sizeof(TransVert), "maketransverts armature"); + tv = transvmain = MEM_callocN(totmalloc * sizeof(TransVert), "maketransverts armature"); - for (ebo= arm->edbo->first; ebo; ebo=ebo->next) { + for (ebo = arm->edbo->first; ebo; ebo = ebo->next) { if (ebo->layer & arm->layer) { - short tipsel= (ebo->flag & BONE_TIPSEL); - short rootsel= (ebo->flag & BONE_ROOTSEL); - short rootok= (!(ebo->parent && (ebo->flag & BONE_CONNECTED) && (ebo->parent->flag & BONE_TIPSEL))); + short tipsel = (ebo->flag & BONE_TIPSEL); + short rootsel = (ebo->flag & BONE_ROOTSEL); + short rootok = (!(ebo->parent && (ebo->flag & BONE_CONNECTED) && (ebo->parent->flag & BONE_TIPSEL))); if ((tipsel && rootsel) || (rootsel)) { /* Don't add the tip (unless mode & TM_ALL_JOINTS, for getting all joints), @@ -340,27 +343,27 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode) */ if (rootok) { copy_v3_v3(tv->oldloc, ebo->head); - tv->loc= ebo->head; - tv->nor= NULL; - tv->flag= 1; + tv->loc = ebo->head; + tv->nor = NULL; + tv->flag = 1; tv++; tottrans++; } if ((mode & TM_ALL_JOINTS) && (tipsel)) { copy_v3_v3(tv->oldloc, ebo->tail); - tv->loc= ebo->tail; - tv->nor= NULL; - tv->flag= 1; + tv->loc = ebo->tail; + tv->nor = NULL; + tv->flag = 1; tv++; tottrans++; } } else if (tipsel) { copy_v3_v3(tv->oldloc, ebo->tail); - tv->loc= ebo->tail; - tv->nor= NULL; - tv->flag= 1; + tv->loc = ebo->tail; + tv->nor = NULL; + tv->flag = 1; tv++; tottrans++; } @@ -368,49 +371,49 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode) } } else if (ELEM(obedit->type, OB_CURVE, OB_SURF)) { - Curve *cu= obedit->data; - int totmalloc= 0; - ListBase *nurbs= curve_editnurbs(cu); + Curve *cu = obedit->data; + int totmalloc = 0; + ListBase *nurbs = curve_editnurbs(cu); - for (nu= nurbs->first; nu; nu= nu->next) { + for (nu = nurbs->first; nu; nu = nu->next) { if (nu->type == CU_BEZIER) - totmalloc += 3*nu->pntsu; + totmalloc += 3 * nu->pntsu; else - totmalloc += nu->pntsu*nu->pntsv; + totmalloc += nu->pntsu * nu->pntsv; } - tv=transvmain= MEM_callocN(totmalloc*sizeof(TransVert), "maketransverts curve"); + tv = transvmain = MEM_callocN(totmalloc * sizeof(TransVert), "maketransverts curve"); - nu= nurbs->first; + nu = nurbs->first; while (nu) { if (nu->type == CU_BEZIER) { - a= nu->pntsu; - bezt= nu->bezt; + a = nu->pntsu; + bezt = nu->bezt; while (a--) { - if (bezt->hide==0) { - int skip_handle= 0; + if (bezt->hide == 0) { + int skip_handle = 0; if (bezt->f2 & SELECT) - skip_handle= mode & TM_SKIP_HANDLES; + skip_handle = mode & TM_SKIP_HANDLES; if ((bezt->f1 & SELECT) && !skip_handle) { copy_v3_v3(tv->oldloc, bezt->vec[0]); - tv->loc= bezt->vec[0]; - tv->flag= bezt->f1 & SELECT; + tv->loc = bezt->vec[0]; + tv->flag = bezt->f1 & SELECT; tv++; tottrans++; } if (bezt->f2 & SELECT) { copy_v3_v3(tv->oldloc, bezt->vec[1]); - tv->loc= bezt->vec[1]; - tv->val= &(bezt->alfa); - tv->oldval= bezt->alfa; - tv->flag= bezt->f2 & SELECT; + tv->loc = bezt->vec[1]; + tv->val = &(bezt->alfa); + tv->oldval = bezt->alfa; + tv->flag = bezt->f2 & SELECT; tv++; tottrans++; } if ((bezt->f3 & SELECT) && !skip_handle) { copy_v3_v3(tv->oldloc, bezt->vec[2]); - tv->loc= bezt->vec[2]; - tv->flag= bezt->f3 & SELECT; + tv->loc = bezt->vec[2]; + tv->flag = bezt->f3 & SELECT; tv++; tottrans++; } @@ -419,16 +422,16 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode) } } else { - a= nu->pntsu*nu->pntsv; - bp= nu->bp; + a = nu->pntsu * nu->pntsv; + bp = nu->bp; while (a--) { - if (bp->hide==0) { + if (bp->hide == 0) { if (bp->f1 & SELECT) { copy_v3_v3(tv->oldloc, bp->vec); - tv->loc= bp->vec; - tv->val= &(bp->alfa); - tv->oldval= bp->alfa; - tv->flag= bp->f1 & SELECT; + tv->loc = bp->vec; + tv->val = &(bp->alfa); + tv->oldval = bp->alfa; + tv->flag = bp->f1 & SELECT; tv++; tottrans++; } @@ -436,44 +439,44 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode) bp++; } } - nu= nu->next; + nu = nu->next; } } - else if (obedit->type==OB_MBALL) { - MetaBall *mb= obedit->data; - int totmalloc= BLI_countlist(mb->editelems); + else if (obedit->type == OB_MBALL) { + MetaBall *mb = obedit->data; + int totmalloc = BLI_countlist(mb->editelems); - tv=transvmain= MEM_callocN(totmalloc*sizeof(TransVert), "maketransverts mball"); + tv = transvmain = MEM_callocN(totmalloc * sizeof(TransVert), "maketransverts mball"); - ml= mb->editelems->first; + ml = mb->editelems->first; while (ml) { if (ml->flag & SELECT) { - tv->loc= &ml->x; + tv->loc = &ml->x; copy_v3_v3(tv->oldloc, tv->loc); - tv->val= &(ml->rad); - tv->oldval= ml->rad; - tv->flag= 1; + tv->val = &(ml->rad); + tv->oldval = ml->rad; + tv->flag = 1; tv++; tottrans++; } - ml= ml->next; + ml = ml->next; } } - else if (obedit->type==OB_LATTICE) { - Lattice *lt= obedit->data; + else if (obedit->type == OB_LATTICE) { + Lattice *lt = obedit->data; - bp= lt->editlatt->latt->def; + bp = lt->editlatt->latt->def; - a= lt->editlatt->latt->pntsu*lt->editlatt->latt->pntsv*lt->editlatt->latt->pntsw; + a = lt->editlatt->latt->pntsu * lt->editlatt->latt->pntsv * lt->editlatt->latt->pntsw; - tv=transvmain= MEM_callocN(a*sizeof(TransVert), "maketransverts latt"); + tv = transvmain = MEM_callocN(a * sizeof(TransVert), "maketransverts latt"); while (a--) { if (bp->f1 & SELECT) { - if (bp->hide==0) { + if (bp->hide == 0) { copy_v3_v3(tv->oldloc, bp->vec); - tv->loc= bp->vec; - tv->flag= bp->f1 & SELECT; + tv->loc = bp->vec; + tv->flag = bp->f1 & SELECT; tv++; tottrans++; } @@ -486,13 +489,13 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode) /* prevent memory leak. happens for curves/latticies due to */ /* difficult condition of adding points to trans data */ MEM_freeN(transvmain); - transvmain= NULL; + transvmain = NULL; } /* cent etc */ - tv= transvmain; - total= 0.0; - for (a=0; aflag & SELECT) { add_v3_v3(centroid, tv->oldloc); total += 1.0f; @@ -500,7 +503,7 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode) } } if (total != 0.0f) { - mul_v3_fl(centroid, 1.0f/total); + mul_v3_fl(centroid, 1.0f / total); } mid_v3_v3v3(center, min, max); @@ -510,34 +513,34 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode) static int snap_sel_to_grid(bContext *C, wmOperator *UNUSED(op)) { - Main *bmain= CTX_data_main(C); - Object *obedit= CTX_data_edit_object(C); - Scene *scene= CTX_data_scene(C); - RegionView3D *rv3d= CTX_wm_region_data(C); + Main *bmain = CTX_data_main(C); + Object *obedit = CTX_data_edit_object(C); + Scene *scene = CTX_data_scene(C); + RegionView3D *rv3d = CTX_wm_region_data(C); TransVert *tv; float gridf, imat[3][3], bmat[3][3], vec[3]; int a; - gridf= rv3d->gridview; + gridf = rv3d->gridview; if (obedit) { - tottrans= 0; + tottrans = 0; if (ELEM6(obedit->type, OB_ARMATURE, OB_LATTICE, OB_MESH, OB_SURF, OB_CURVE, OB_MBALL)) make_trans_verts(obedit, bmat[0], bmat[1], 0); - if (tottrans==0) return OPERATOR_CANCELLED; + if (tottrans == 0) return OPERATOR_CANCELLED; copy_m3_m4(bmat, obedit->obmat); invert_m3_m3(imat, bmat); - tv= transvmain; - for (a=0; aloc); mul_m3_v3(bmat, vec); add_v3_v3(vec, obedit->obmat[3]); - vec[0]= gridf*floorf(0.5f+ vec[0]/gridf); - vec[1]= gridf*floorf(0.5f+ vec[1]/gridf); - vec[2]= gridf*floorf(0.5f+ vec[2]/gridf); + vec[0] = gridf * floorf(0.5f + vec[0] / gridf); + vec[1] = gridf * floorf(0.5f + vec[1] / gridf); + vec[2] = gridf * floorf(0.5f + vec[2] / gridf); sub_v3_v3(vec, obedit->obmat[3]); mul_m3_v3(imat, vec); @@ -547,31 +550,31 @@ static int snap_sel_to_grid(bContext *C, wmOperator *UNUSED(op)) special_transvert_update(obedit); MEM_freeN(transvmain); - transvmain= NULL; + transvmain = NULL; } else { struct KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_LOCATION_ID); - CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) { + CTX_DATA_BEGIN(C, Object *, ob, selected_editable_objects) { if (ob->mode & OB_MODE_POSE) { bPoseChannel *pchan; - bArmature *arm= ob->data; + bArmature *arm = ob->data; invert_m4_m4(ob->imat, ob->obmat); - for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) { + for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { if (pchan->bone->flag & BONE_SELECTED) { if (pchan->bone->layer & arm->layer) { - if ((pchan->bone->flag & BONE_CONNECTED)==0) { + if ((pchan->bone->flag & BONE_CONNECTED) == 0) { float nLoc[3]; /* get nearest grid point to snap to */ copy_v3_v3(nLoc, pchan->pose_mat[3]); /* We must operate in world space! */ mul_m4_v3(ob->obmat, nLoc); - vec[0]= gridf * (float)(floor(0.5f+ nLoc[0]/gridf)); - vec[1]= gridf * (float)(floor(0.5f+ nLoc[1]/gridf)); - vec[2]= gridf * (float)(floor(0.5f+ nLoc[2]/gridf)); + vec[0] = gridf * (float)(floor(0.5f + nLoc[0] / gridf)); + vec[1] = gridf * (float)(floor(0.5f + nLoc[1] / gridf)); + vec[2] = gridf * (float)(floor(0.5f + nLoc[2] / gridf)); /* Back in object space... */ mul_m4_v3(ob->imat, vec); @@ -579,12 +582,12 @@ static int snap_sel_to_grid(bContext *C, wmOperator *UNUSED(op)) armature_loc_pose_to_bone(pchan, vec, vec); /* adjust location */ - if ((pchan->protectflag & OB_LOCK_LOCX)==0) - pchan->loc[0]= vec[0]; - if ((pchan->protectflag & OB_LOCK_LOCY)==0) - pchan->loc[1]= vec[1]; - if ((pchan->protectflag & OB_LOCK_LOCZ)==0) - pchan->loc[2]= vec[2]; + if ((pchan->protectflag & OB_LOCK_LOCX) == 0) + pchan->loc[0] = vec[0]; + if ((pchan->protectflag & OB_LOCK_LOCY) == 0) + pchan->loc[1] = vec[1]; + if ((pchan->protectflag & OB_LOCK_LOCZ) == 0) + pchan->loc[2] = vec[2]; /* auto-keyframing */ ED_autokeyframe_pchan(C, scene, ob, pchan, ks); @@ -595,16 +598,16 @@ static int snap_sel_to_grid(bContext *C, wmOperator *UNUSED(op)) } } } - ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK); + ob->pose->flag |= (POSE_LOCKED | POSE_DO_UNLOCK); DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } else { ob->recalc |= OB_RECALC_OB; - vec[0]= -ob->obmat[3][0]+gridf*floorf(0.5f+ ob->obmat[3][0]/gridf); - vec[1]= -ob->obmat[3][1]+gridf*floorf(0.5f+ ob->obmat[3][1]/gridf); - vec[2]= -ob->obmat[3][2]+gridf*floorf(0.5f+ ob->obmat[3][2]/gridf); + vec[0] = -ob->obmat[3][0] + gridf *floorf(0.5f + ob->obmat[3][0] / gridf); + vec[1] = -ob->obmat[3][1] + gridf *floorf(0.5f + ob->obmat[3][1] / gridf); + vec[2] = -ob->obmat[3][2] + gridf *floorf(0.5f + ob->obmat[3][2] / gridf); if (ob->parent) { where_is_object(scene, ob); @@ -612,12 +615,12 @@ static int snap_sel_to_grid(bContext *C, wmOperator *UNUSED(op)) invert_m3_m3(imat, originmat); mul_m3_v3(imat, vec); } - if ((ob->protectflag & OB_LOCK_LOCX)==0) - ob->loc[0]+= vec[0]; - if ((ob->protectflag & OB_LOCK_LOCY)==0) - ob->loc[1]+= vec[1]; - if ((ob->protectflag & OB_LOCK_LOCZ)==0) - ob->loc[2]+= vec[2]; + if ((ob->protectflag & OB_LOCK_LOCX) == 0) + ob->loc[0] += vec[0]; + if ((ob->protectflag & OB_LOCK_LOCY) == 0) + ob->loc[1] += vec[1]; + if ((ob->protectflag & OB_LOCK_LOCZ) == 0) + ob->loc[2] += vec[2]; /* auto-keyframing */ ED_autokeyframe_object(C, scene, ob, ks); @@ -627,7 +630,7 @@ static int snap_sel_to_grid(bContext *C, wmOperator *UNUSED(op)) } DAG_ids_flush_update(bmain, 0); - WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL); + WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL); return OPERATOR_FINISHED; } @@ -644,35 +647,35 @@ void VIEW3D_OT_snap_selected_to_grid(wmOperatorType *ot) ot->poll = ED_operator_region_view3d_active; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /* *************************************************** */ static int snap_sel_to_curs(bContext *C, wmOperator *UNUSED(op)) { - Main *bmain= CTX_data_main(C); - Object *obedit= CTX_data_edit_object(C); - Scene *scene= CTX_data_scene(C); - View3D *v3d= CTX_wm_view3d(C); + Main *bmain = CTX_data_main(C); + Object *obedit = CTX_data_edit_object(C); + Scene *scene = CTX_data_scene(C); + View3D *v3d = CTX_wm_view3d(C); TransVert *tv; float *curs, imat[3][3], bmat[3][3], vec[3]; int a; - curs= give_cursor(scene, v3d); + curs = give_cursor(scene, v3d); if (obedit) { - tottrans= 0; + tottrans = 0; if (ELEM6(obedit->type, OB_ARMATURE, OB_LATTICE, OB_MESH, OB_SURF, OB_CURVE, OB_MBALL)) make_trans_verts(obedit, bmat[0], bmat[1], 0); - if (tottrans==0) return OPERATOR_CANCELLED; + if (tottrans == 0) return OPERATOR_CANCELLED; copy_m3_m4(bmat, obedit->obmat); invert_m3_m3(imat, bmat); - tv= transvmain; - for (a=0; aobmat[3]); mul_m3_v3(imat, vec); copy_v3_v3(tv->loc, vec); @@ -681,34 +684,34 @@ static int snap_sel_to_curs(bContext *C, wmOperator *UNUSED(op)) special_transvert_update(obedit); MEM_freeN(transvmain); - transvmain= NULL; + transvmain = NULL; } else { struct KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_LOCATION_ID); - CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) { + CTX_DATA_BEGIN(C, Object *, ob, selected_editable_objects) { if (ob->mode & OB_MODE_POSE) { bPoseChannel *pchan; - bArmature *arm= ob->data; + bArmature *arm = ob->data; invert_m4_m4(ob->imat, ob->obmat); copy_v3_v3(vec, curs); mul_m4_v3(ob->imat, vec); - for (pchan = ob->pose->chanbase.first; pchan; pchan=pchan->next) { + for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { if (pchan->bone->flag & BONE_SELECTED) { if (pchan->bone->layer & arm->layer) { - if ((pchan->bone->flag & BONE_CONNECTED)==0) { + if ((pchan->bone->flag & BONE_CONNECTED) == 0) { /* Get position in pchan (pose) space. */ armature_loc_pose_to_bone(pchan, vec, vec); /* copy new position */ - if ((pchan->protectflag & OB_LOCK_LOCX)==0) - pchan->loc[0]= vec[0]; - if ((pchan->protectflag & OB_LOCK_LOCY)==0) - pchan->loc[1]= vec[1]; - if ((pchan->protectflag & OB_LOCK_LOCZ)==0) - pchan->loc[2]= vec[2]; + if ((pchan->protectflag & OB_LOCK_LOCX) == 0) + pchan->loc[0] = vec[0]; + if ((pchan->protectflag & OB_LOCK_LOCY) == 0) + pchan->loc[1] = vec[1]; + if ((pchan->protectflag & OB_LOCK_LOCZ) == 0) + pchan->loc[2] = vec[2]; /* auto-keyframing */ ED_autokeyframe_pchan(C, scene, ob, pchan, ks); @@ -719,16 +722,16 @@ static int snap_sel_to_curs(bContext *C, wmOperator *UNUSED(op)) } } } - ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK); + ob->pose->flag |= (POSE_LOCKED | POSE_DO_UNLOCK); DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } else { ob->recalc |= OB_RECALC_OB; - vec[0]= -ob->obmat[3][0] + curs[0]; - vec[1]= -ob->obmat[3][1] + curs[1]; - vec[2]= -ob->obmat[3][2] + curs[2]; + vec[0] = -ob->obmat[3][0] + curs[0]; + vec[1] = -ob->obmat[3][1] + curs[1]; + vec[2] = -ob->obmat[3][2] + curs[2]; if (ob->parent) { where_is_object(scene, ob); @@ -736,12 +739,12 @@ static int snap_sel_to_curs(bContext *C, wmOperator *UNUSED(op)) invert_m3_m3(imat, originmat); mul_m3_v3(imat, vec); } - if ((ob->protectflag & OB_LOCK_LOCX)==0) - ob->loc[0]+= vec[0]; - if ((ob->protectflag & OB_LOCK_LOCY)==0) - ob->loc[1]+= vec[1]; - if ((ob->protectflag & OB_LOCK_LOCZ)==0) - ob->loc[2]+= vec[2]; + if ((ob->protectflag & OB_LOCK_LOCX) == 0) + ob->loc[0] += vec[0]; + if ((ob->protectflag & OB_LOCK_LOCY) == 0) + ob->loc[1] += vec[1]; + if ((ob->protectflag & OB_LOCK_LOCZ) == 0) + ob->loc[2] += vec[2]; /* auto-keyframing */ ED_autokeyframe_object(C, scene, ob, ks); @@ -751,7 +754,7 @@ static int snap_sel_to_curs(bContext *C, wmOperator *UNUSED(op)) } DAG_ids_flush_update(bmain, 0); - WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL); + WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL); return OPERATOR_FINISHED; } @@ -768,26 +771,26 @@ void VIEW3D_OT_snap_selected_to_cursor(wmOperatorType *ot) ot->poll = ED_operator_view3d_active; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /* *************************************************** */ static int snap_curs_to_grid(bContext *C, wmOperator *UNUSED(op)) { - Scene *scene= CTX_data_scene(C); - RegionView3D *rv3d= CTX_wm_region_data(C); - View3D *v3d= CTX_wm_view3d(C); + Scene *scene = CTX_data_scene(C); + RegionView3D *rv3d = CTX_wm_region_data(C); + View3D *v3d = CTX_wm_view3d(C); float gridf, *curs; - gridf= rv3d->gridview; - curs= give_cursor(scene, v3d); + gridf = rv3d->gridview; + curs = give_cursor(scene, v3d); - curs[0]= gridf*floorf(0.5f+curs[0]/gridf); - curs[1]= gridf*floorf(0.5f+curs[1]/gridf); - curs[2]= gridf*floorf(0.5f+curs[2]/gridf); + curs[0] = gridf * floorf(0.5f + curs[0] / gridf); + curs[1] = gridf * floorf(0.5f + curs[1] / gridf); + curs[2] = gridf * floorf(0.5f + curs[2] / gridf); - WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, v3d); // hrm + WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d); // hrm return OPERATOR_FINISHED; } @@ -804,23 +807,23 @@ void VIEW3D_OT_snap_cursor_to_grid(wmOperatorType *ot) ot->poll = ED_operator_region_view3d_active; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /* **************************************************** */ static void bundle_midpoint(Scene *scene, Object *ob, float vec[3]) { - MovieClip *clip= object_get_movieclip(scene, ob, 0); + MovieClip *clip = object_get_movieclip(scene, ob, 0); MovieTracking *tracking; MovieTrackingObject *object; - int ok= 0; + int ok = 0; float min[3], max[3], mat[4][4], pos[3], cammat[4][4] = MAT4_UNITY; if (!clip) return; - tracking= &clip->tracking; + tracking = &clip->tracking; copy_m4_m4(cammat, ob->obmat); @@ -828,9 +831,9 @@ static void bundle_midpoint(Scene *scene, Object *ob, float vec[3]) INIT_MINMAX(min, max); - for (object= tracking->objects.first; object; object= object->next) { - ListBase *tracksbase= BKE_tracking_object_tracks(tracking, object); - MovieTrackingTrack *track= tracksbase->first; + for (object = tracking->objects.first; object; object = object->next) { + ListBase *tracksbase = BKE_tracking_object_tracks(tracking, object); + MovieTrackingTrack *track = tracksbase->first; float obmat[4][4]; if (object->flag & TRACKING_OBJECT_CAMERA) { @@ -846,13 +849,13 @@ static void bundle_midpoint(Scene *scene, Object *ob, float vec[3]) } while (track) { - if ((track->flag&TRACK_HAS_BUNDLE) && TRACK_SELECTED(track)) { - ok= 1; + if ((track->flag & TRACK_HAS_BUNDLE) && TRACK_SELECTED(track)) { + ok = 1; mul_v3_m4v3(pos, obmat, track->bundle_pos); DO_MINMAX(pos, min, max); } - track= track->next; + track = track->next; } } @@ -863,30 +866,30 @@ static void bundle_midpoint(Scene *scene, Object *ob, float vec[3]) static int snap_curs_to_sel(bContext *C, wmOperator *UNUSED(op)) { - Object *obedit= CTX_data_edit_object(C); - Scene *scene= CTX_data_scene(C); - View3D *v3d= CTX_wm_view3d(C); + Object *obedit = CTX_data_edit_object(C); + Scene *scene = CTX_data_scene(C); + View3D *v3d = CTX_wm_view3d(C); TransVert *tv; float *curs, bmat[3][3], vec[3], min[3], max[3], centroid[3]; int count, a; - curs= give_cursor(scene, v3d); + curs = give_cursor(scene, v3d); - count= 0; + count = 0; INIT_MINMAX(min, max); zero_v3(centroid); if (obedit) { - tottrans=0; + tottrans = 0; if (ELEM6(obedit->type, OB_ARMATURE, OB_LATTICE, OB_MESH, OB_SURF, OB_CURVE, OB_MBALL)) - make_trans_verts(obedit, bmat[0], bmat[1], TM_ALL_JOINTS|TM_SKIP_HANDLES); - if (tottrans==0) return OPERATOR_CANCELLED; + make_trans_verts(obedit, bmat[0], bmat[1], TM_ALL_JOINTS | TM_SKIP_HANDLES); + if (tottrans == 0) return OPERATOR_CANCELLED; copy_m3_m4(bmat, obedit->obmat); - tv= transvmain; - for (a=0; aloc); mul_m3_v3(bmat, vec); add_v3_v3(vec, obedit->obmat[3]); @@ -894,23 +897,23 @@ static int snap_curs_to_sel(bContext *C, wmOperator *UNUSED(op)) DO_MINMAX(vec, min, max); } - if (v3d->around==V3D_CENTROID) { - mul_v3_fl(centroid, 1.0f/(float)tottrans); + if (v3d->around == V3D_CENTROID) { + mul_v3_fl(centroid, 1.0f / (float)tottrans); copy_v3_v3(curs, centroid); } else { mid_v3_v3v3(curs, min, max); } MEM_freeN(transvmain); - transvmain= NULL; + transvmain = NULL; } else { - Object *obact= CTX_data_active_object(C); + Object *obact = CTX_data_active_object(C); if (obact && (obact->mode & OB_MODE_POSE)) { - bArmature *arm= obact->data; + bArmature *arm = obact->data; bPoseChannel *pchan; - for (pchan = obact->pose->chanbase.first; pchan; pchan=pchan->next) { + for (pchan = obact->pose->chanbase.first; pchan; pchan = pchan->next) { if (arm->layer & pchan->bone->layer) { if (pchan->bone->flag & BONE_SELECTED) { copy_v3_v3(vec, pchan->pose_head); @@ -923,13 +926,13 @@ static int snap_curs_to_sel(bContext *C, wmOperator *UNUSED(op)) } } else { - CTX_DATA_BEGIN(C, Object*, ob, selected_objects) { + CTX_DATA_BEGIN(C, Object *, ob, selected_objects) { copy_v3_v3(vec, ob->obmat[3]); /* special case for camera -- snap to bundles */ - if (ob->type==OB_CAMERA) { + if (ob->type == OB_CAMERA) { /* snap to bundles should happen only when bundles are visible */ - if (v3d->flag2&V3D_SHOW_RECONSTRUCTION) { + if (v3d->flag2 & V3D_SHOW_RECONSTRUCTION) { bundle_midpoint(scene, ob, vec); } } @@ -941,8 +944,8 @@ static int snap_curs_to_sel(bContext *C, wmOperator *UNUSED(op)) CTX_DATA_END; } if (count) { - if (v3d->around==V3D_CENTROID) { - mul_v3_fl(centroid, 1.0f/(float)count); + if (v3d->around == V3D_CENTROID) { + mul_v3_fl(centroid, 1.0f / (float)count); copy_v3_v3(curs, centroid); } else { @@ -950,7 +953,7 @@ static int snap_curs_to_sel(bContext *C, wmOperator *UNUSED(op)) } } } - WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, v3d); + WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d); return OPERATOR_FINISHED; } @@ -967,17 +970,17 @@ void VIEW3D_OT_snap_cursor_to_selected(wmOperatorType *ot) ot->poll = ED_operator_view3d_active; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /* ********************************************** */ static int snap_curs_to_active(bContext *C, wmOperator *UNUSED(op)) { - Object *obedit= CTX_data_edit_object(C); - Object *obact= CTX_data_active_object(C); - Scene *scene= CTX_data_scene(C); - View3D *v3d= CTX_wm_view3d(C); + Object *obedit = CTX_data_edit_object(C); + Object *obact = CTX_data_active_object(C); + Scene *scene = CTX_data_scene(C); + View3D *v3d = CTX_wm_view3d(C); float *curs; curs = give_cursor(scene, v3d); @@ -985,7 +988,7 @@ static int snap_curs_to_active(bContext *C, wmOperator *UNUSED(op)) if (obedit) { if (obedit->type == OB_MESH) { /* check active */ - Mesh *me= obedit->data; + Mesh *me = obedit->data; BMEditSelection ese; if (EDBM_get_actSelection(me->edit_btmesh, &ese)) { @@ -1001,7 +1004,7 @@ static int snap_curs_to_active(bContext *C, wmOperator *UNUSED(op)) } } - WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, v3d); + WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d); return OPERATOR_FINISHED; } @@ -1017,23 +1020,21 @@ void VIEW3D_OT_snap_cursor_to_active(wmOperatorType *ot) ot->poll = ED_operator_view3d_active; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /* **************************************************** */ /*New Code - Snap Cursor to Center -*/ static int snap_curs_to_center(bContext *C, wmOperator *UNUSED(op)) { - Scene *scene= CTX_data_scene(C); - View3D *v3d= CTX_wm_view3d(C); + Scene *scene = CTX_data_scene(C); + View3D *v3d = CTX_wm_view3d(C); float *curs; - curs= give_cursor(scene, v3d); + curs = give_cursor(scene, v3d); - curs[0]= 0.0; - curs[1]= 0.0; - curs[2]= 0.0; + zero_v3(curs); - WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, v3d); + WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d); return OPERATOR_FINISHED; } @@ -1050,7 +1051,7 @@ void VIEW3D_OT_snap_cursor_to_center(wmOperatorType *ot) ot->poll = ED_operator_view3d_active; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /* **************************************************** */ @@ -1062,16 +1063,16 @@ int minmax_verts(Object *obedit, float *min, float *max) float centroid[3], vec[3], bmat[3][3]; int a; - tottrans=0; + tottrans = 0; if (ELEM5(obedit->type, OB_ARMATURE, OB_LATTICE, OB_MESH, OB_SURF, OB_CURVE)) make_trans_verts(obedit, bmat[0], bmat[1], TM_ALL_JOINTS); - if (tottrans==0) return 0; + if (tottrans == 0) return 0; copy_m3_m4(bmat, obedit->obmat); - tv= transvmain; - for (a=0; aflag & TX_VERT_USE_MAPLOC) ? tv->maploc : tv->loc); mul_m3_v3(bmat, vec); add_v3_v3(vec, obedit->obmat[3]); @@ -1080,7 +1081,7 @@ int minmax_verts(Object *obedit, float *min, float *max) } MEM_freeN(transvmain); - transvmain= NULL; + transvmain = NULL; return 1; } diff --git a/source/blender/editors/space_view3d/view3d_toolbar.c b/source/blender/editors/space_view3d/view3d_toolbar.c index 88a490e23b8..82ab6cd7193 100644 --- a/source/blender/editors/space_view3d/view3d_toolbar.c +++ b/source/blender/editors/space_view3d/view3d_toolbar.c @@ -64,7 +64,7 @@ #include "UI_interface.h" #include "UI_resources.h" -#include "view3d_intern.h" // own include +#include "view3d_intern.h" // own include /* ******************* view3d space & buttons ************** */ @@ -76,7 +76,7 @@ static void view3d_panel_operator_redo_buts(const bContext *C, Panel *pa, wmOper static void view3d_panel_operator_redo_header(const bContext *C, Panel *pa) { - wmOperator *op= WM_operator_last_redo(C); + wmOperator *op = WM_operator_last_redo(C); if (op) BLI_strncpy(pa->drawname, op->type->name, sizeof(pa->drawname)); else BLI_strncpy(pa->drawname, IFACE_("Operator"), sizeof(pa->drawname)); @@ -85,7 +85,7 @@ static void view3d_panel_operator_redo_header(const bContext *C, Panel *pa) static void view3d_panel_operator_redo_operator(const bContext *C, Panel *pa, wmOperator *op) { if (op->type->flag & OPTYPE_MACRO) { - for (op= op->macro.first; op; op= op->next) { + for (op = op->macro.first; op; op = op->next) { uiItemL(pa->layout, op->type->name, ICON_NONE); view3d_panel_operator_redo_operator(C, pa, op); } @@ -98,15 +98,15 @@ static void view3d_panel_operator_redo_operator(const bContext *C, Panel *pa, wm /* TODO de-duplicate redo panel functions - campbell */ static void view3d_panel_operator_redo(const bContext *C, Panel *pa) { - wmOperator *op= WM_operator_last_redo(C); + wmOperator *op = WM_operator_last_redo(C); uiBlock *block; - if (op==NULL) + if (op == NULL) return; - if (WM_operator_poll((bContext*)C, op->type) == 0) + if (WM_operator_poll((bContext *)C, op->type) == 0) return; - block= uiLayoutGetBlock(pa->layout); + block = uiLayoutGetBlock(pa->layout); if (!WM_operator_check_ui_enabled(C, op->type->name)) uiLayoutSetEnabled(pa->layout, 0); @@ -127,10 +127,10 @@ typedef struct CustomTool { static void operator_call_cb(struct bContext *C, void *arg_listbase, void *arg2) { - wmOperatorType *ot= arg2; + wmOperatorType *ot = arg2; if (ot) { - CustomTool *ct= MEM_callocN(sizeof(CustomTool), "CustomTool"); + CustomTool *ct = MEM_callocN(sizeof(CustomTool), "CustomTool"); BLI_addtail(arg_listbase, ct); BLI_strncpy(ct->opname, ot->idname, OP_MAX_TYPENAME); @@ -141,15 +141,15 @@ static void operator_call_cb(struct bContext *C, void *arg_listbase, void *arg2) static void operator_search_cb(const struct bContext *C, void *UNUSED(arg), const char *str, uiSearchItems *items) { - GHashIterator *iter= WM_operatortype_iter(); + GHashIterator *iter = WM_operatortype_iter(); - for ( ; !BLI_ghashIterator_isDone(iter); BLI_ghashIterator_step(iter)) { - wmOperatorType *ot= BLI_ghashIterator_getValue(iter); + for (; !BLI_ghashIterator_isDone(iter); BLI_ghashIterator_step(iter)) { + wmOperatorType *ot = BLI_ghashIterator_getValue(iter); if (BLI_strcasestr(ot->name, str)) { - if (WM_operator_poll((bContext*)C, ot)) { + if (WM_operator_poll((bContext *)C, ot)) { - if (0==uiSearchItemAdd(items, ot->name, ot, 0)) + if (0 == uiSearchItemAdd(items, ot->name, ot, 0)) break; } } @@ -163,15 +163,15 @@ static uiBlock *tool_search_menu(bContext *C, ARegion *ar, void *arg_listbase) { static char search[OP_MAX_TYPENAME]; wmEvent event; - wmWindow *win= CTX_wm_window(C); + wmWindow *win = CTX_wm_window(C); uiBlock *block; uiBut *but; /* clear initial search string, then all items show */ - search[0]= 0; + search[0] = 0; - block= uiBeginBlock(C, ar, "_popup", UI_EMBOSS); - uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_RET_1); + block = uiBeginBlock(C, ar, "_popup", UI_EMBOSS); + uiBlockSetFlag(block, UI_BLOCK_LOOP | UI_BLOCK_REDRAW | UI_BLOCK_RET_1); /* fake button, it holds space for search items */ uiDefBut(block, LABEL, 0, "", 10, 15, 150, uiSearchBoxhHeight(), NULL, 0, 0, 0, 0, NULL); @@ -183,11 +183,11 @@ static uiBlock *tool_search_menu(bContext *C, ARegion *ar, void *arg_listbase) uiBlockSetDirection(block, UI_DOWN); uiEndBlock(C, block); - event= *(win->eventstate); /* XXX huh huh? make api call */ - event.type= EVT_BUT_OPEN; - event.val= KM_PRESS; - event.customdata= but; - event.customdatafree= FALSE; + event = *(win->eventstate); /* XXX huh huh? make api call */ + event.type = EVT_BUT_OPEN; + event.val = KM_PRESS; + event.customdata = but; + event.customdatafree = FALSE; wm_event_add(win, &event); return block; @@ -196,25 +196,25 @@ static uiBlock *tool_search_menu(bContext *C, ARegion *ar, void *arg_listbase) static void view3d_panel_tool_shelf(const bContext *C, Panel *pa) { - SpaceLink *sl= CTX_wm_space_data(C); - SpaceType *st= NULL; + SpaceLink *sl = CTX_wm_space_data(C); + SpaceType *st = NULL; uiLayout *col; - const char *context= CTX_data_mode_string(C); + const char *context = CTX_data_mode_string(C); if (sl) - st= BKE_spacetype_from_id(sl->spacetype); + st = BKE_spacetype_from_id(sl->spacetype); if (st && st->toolshelf.first) { CustomTool *ct; - for (ct= st->toolshelf.first; ct; ct= ct->next) { - if (0==strncmp(context, ct->context, OP_MAX_TYPENAME)) { - col= uiLayoutColumn(pa->layout, 1); + for (ct = st->toolshelf.first; ct; ct = ct->next) { + if (0 == strncmp(context, ct->context, OP_MAX_TYPENAME)) { + col = uiLayoutColumn(pa->layout, 1); uiItemFullO(col, ct->opname, NULL, ICON_NONE, NULL, WM_OP_INVOKE_REGION_WIN, 0); } } } - col= uiLayoutColumn(pa->layout, 1); + col = uiLayoutColumn(pa->layout, 1); uiDefBlockBut(uiLayoutGetBlock(pa->layout), tool_search_menu, &st->toolshelf, "Add Tool", 0, 0, UI_UNIT_X, UI_UNIT_Y, "Add Tool in shelf, gets saved in files"); } @@ -223,10 +223,10 @@ void view3d_toolshelf_register(ARegionType *art) { PanelType *pt; - pt= MEM_callocN(sizeof(PanelType), "spacetype view3d panel tools"); + pt = MEM_callocN(sizeof(PanelType), "spacetype view3d panel tools"); strcpy(pt->idname, "VIEW3D_PT_tool_shelf"); strcpy(pt->label, "Tool Shelf"); - pt->draw= view3d_panel_tool_shelf; + pt->draw = view3d_panel_tool_shelf; BLI_addtail(&art->paneltypes, pt); } @@ -234,11 +234,11 @@ void view3d_tool_props_register(ARegionType *art) { PanelType *pt; - pt= MEM_callocN(sizeof(PanelType), "spacetype view3d panel last operator"); + pt = MEM_callocN(sizeof(PanelType), "spacetype view3d panel last operator"); strcpy(pt->idname, "VIEW3D_PT_last_operator"); strcpy(pt->label, "Operator"); - pt->draw_header= view3d_panel_operator_redo_header; - pt->draw= view3d_panel_operator_redo; + pt->draw_header = view3d_panel_operator_redo_header; + pt->draw = view3d_panel_operator_redo; BLI_addtail(&art->paneltypes, pt); } @@ -246,8 +246,8 @@ void view3d_tool_props_register(ARegionType *art) static int view3d_toolshelf(bContext *C, wmOperator *UNUSED(op)) { - ScrArea *sa= CTX_wm_area(C); - ARegion *ar= view3d_has_tools_region(sa); + ScrArea *sa = CTX_wm_area(C); + ARegion *ar = view3d_has_tools_region(sa); if (ar) ED_region_toggle_hidden(C, ar); diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index 19dc48c648c..f6b03a5fac3 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -71,7 +71,7 @@ #include "RNA_access.h" #include "RNA_define.h" -#include "view3d_intern.h" // own include +#include "view3d_intern.h" // own include /* use this call when executing an operator, * event system doesn't set for each event the @@ -79,7 +79,7 @@ void view3d_operator_needs_opengl(const bContext *C) { wmWindow *win = CTX_wm_window(C); - ARegion *ar= CTX_wm_region(C); + ARegion *ar = CTX_wm_region(C); view3d_region_operator_needs_opengl(win, ar); } @@ -87,10 +87,10 @@ void view3d_operator_needs_opengl(const bContext *C) void view3d_region_operator_needs_opengl(wmWindow *win, ARegion *ar) { /* for debugging purpose, context should always be OK */ - if ((ar == NULL) || (ar->regiontype!=RGN_TYPE_WINDOW)) + if ((ar == NULL) || (ar->regiontype != RGN_TYPE_WINDOW)) printf("view3d_region_operator_needs_opengl error, wrong region\n"); else { - RegionView3D *rv3d= ar->regiondata; + RegionView3D *rv3d = ar->regiondata; wmSubWindowSet(win, ar->swinid); glMatrixMode(GL_PROJECTION); @@ -126,20 +126,20 @@ struct SmoothViewStore { void smooth_view(bContext *C, View3D *v3d, ARegion *ar, Object *oldcamera, Object *camera, float *ofs, float *quat, float *dist, float *lens) { - wmWindowManager *wm= CTX_wm_manager(C); - wmWindow *win= CTX_wm_window(C); - ScrArea *sa= CTX_wm_area(C); + wmWindowManager *wm = CTX_wm_manager(C); + wmWindow *win = CTX_wm_window(C); + ScrArea *sa = CTX_wm_area(C); - RegionView3D *rv3d= ar->regiondata; - struct SmoothViewStore sms= {0}; - short ok= FALSE; + RegionView3D *rv3d = ar->regiondata; + struct SmoothViewStore sms = {0}; + short ok = FALSE; /* initialize sms */ copy_v3_v3(sms.new_ofs, rv3d->ofs); copy_qt_qt(sms.new_quat, rv3d->viewquat); - sms.new_dist= rv3d->dist; - sms.new_lens= v3d->lens; - sms.to_camera= 0; + sms.new_dist = rv3d->dist; + sms.new_lens = v3d->lens; + sms.to_camera = 0; /* note on camera locking, this is a little confusing but works ok. * we may be changing the view 'as if' there is no active camera, but infact @@ -156,12 +156,12 @@ void smooth_view(bContext *C, View3D *v3d, ARegion *ar, Object *oldcamera, Objec /* store the options we want to end with */ if (ofs) copy_v3_v3(sms.new_ofs, ofs); if (quat) copy_qt_qt(sms.new_quat, quat); - if (dist) sms.new_dist= *dist; - if (lens) sms.new_lens= *lens; + if (dist) sms.new_dist = *dist; + if (lens) sms.new_lens = *lens; if (camera) { ED_view3d_from_object(camera, sms.new_ofs, sms.new_quat, &sms.new_dist, &sms.new_lens); - sms.to_camera= 1; /* restore view3d values in end */ + sms.to_camera = 1; /* restore view3d values in end */ } if (C && U.smooth_viewtx) { @@ -184,30 +184,30 @@ void smooth_view(bContext *C, View3D *v3d, ARegion *ar, Object *oldcamera, Objec /* original values */ if (oldcamera) { - sms.orig_dist= rv3d->dist; // below function does weird stuff with it... + sms.orig_dist = rv3d->dist; // below function does weird stuff with it... ED_view3d_from_object(oldcamera, sms.orig_ofs, sms.orig_quat, &sms.orig_dist, &sms.orig_lens); } else { copy_v3_v3(sms.orig_ofs, rv3d->ofs); copy_qt_qt(sms.orig_quat, rv3d->viewquat); - sms.orig_dist= rv3d->dist; - sms.orig_lens= v3d->lens; + sms.orig_dist = rv3d->dist; + sms.orig_lens = v3d->lens; } /* grid draw as floor */ - if ((rv3d->viewlock & RV3D_LOCKED)==0) { + if ((rv3d->viewlock & RV3D_LOCKED) == 0) { /* use existing if exists, means multiple calls to smooth view wont loose the original 'view' setting */ - sms.orig_view= rv3d->sms ? rv3d->sms->orig_view : rv3d->view; - rv3d->view= RV3D_VIEW_USER; + sms.orig_view = rv3d->sms ? rv3d->sms->orig_view : rv3d->view; + rv3d->view = RV3D_VIEW_USER; } - sms.time_allowed= (double)U.smooth_viewtx / 1000.0; + sms.time_allowed = (double)U.smooth_viewtx / 1000.0; /* if this is view rotation only * we can decrease the time allowed by * the angle between quats * this means small rotations wont lag */ if (quat && !ofs && !dist) { - float vec1[3]={0,0,1}, vec2[3]= {0,0,1}; + float vec1[3] = {0, 0, 1}, vec2[3] = {0, 0, 1}; float q1[4], q2[4]; invert_qt_qt(q1, sms.new_quat); @@ -221,26 +221,26 @@ void smooth_view(bContext *C, View3D *v3d, ARegion *ar, Object *oldcamera, Objec } /* ensure it shows correct */ - if (sms.to_camera) rv3d->persp= RV3D_PERSP; + if (sms.to_camera) rv3d->persp = RV3D_PERSP; rv3d->rflag |= RV3D_NAVIGATING; /* keep track of running timer! */ - if (rv3d->sms==NULL) - rv3d->sms= MEM_mallocN(sizeof(struct SmoothViewStore), "smoothview v3d"); - *rv3d->sms= sms; + if (rv3d->sms == NULL) + rv3d->sms = MEM_mallocN(sizeof(struct SmoothViewStore), "smoothview v3d"); + *rv3d->sms = sms; if (rv3d->smooth_timer) WM_event_remove_timer(wm, win, rv3d->smooth_timer); /* TIMER1 is hardcoded in keymap */ - rv3d->smooth_timer= WM_event_add_timer(wm, win, TIMER1, 1.0/100.0); /* max 30 frs/sec */ + rv3d->smooth_timer = WM_event_add_timer(wm, win, TIMER1, 1.0 / 100.0); /* max 30 frs/sec */ - ok= TRUE; + ok = TRUE; } } /* if we get here nothing happens */ if (ok == FALSE) { - if (sms.to_camera==0) { + if (sms.to_camera == 0) { copy_v3_v3(rv3d->ofs, sms.new_ofs); copy_qt_qt(rv3d->viewquat, sms.new_quat); rv3d->dist = sms.new_dist; @@ -258,16 +258,16 @@ void smooth_view(bContext *C, View3D *v3d, ARegion *ar, Object *oldcamera, Objec static int view3d_smoothview_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event) { View3D *v3d = CTX_wm_view3d(C); - RegionView3D *rv3d= CTX_wm_region_view3d(C); - struct SmoothViewStore *sms= rv3d->sms; + RegionView3D *rv3d = CTX_wm_region_view3d(C); + struct SmoothViewStore *sms = rv3d->sms; float step, step_inv; /* escape if not our timer */ - if (rv3d->smooth_timer==NULL || rv3d->smooth_timer!=event->customdata) + if (rv3d->smooth_timer == NULL || rv3d->smooth_timer != event->customdata) return OPERATOR_PASS_THROUGH; if (sms->time_allowed != 0.0) - step = (float)((rv3d->smooth_timer->duration)/sms->time_allowed); + step = (float)((rv3d->smooth_timer->duration) / sms->time_allowed); else step = 1.0f; @@ -276,7 +276,7 @@ static int view3d_smoothview_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent /* if we went to camera, store the original */ if (sms->to_camera) { - rv3d->persp= RV3D_CAMOB; + rv3d->persp = RV3D_CAMOB; copy_v3_v3(rv3d->ofs, sms->orig_ofs); copy_qt_qt(rv3d->viewquat, sms->orig_quat); rv3d->dist = sms->orig_dist; @@ -291,33 +291,33 @@ static int view3d_smoothview_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent ED_view3d_camera_lock_sync(v3d, rv3d); } - if ((rv3d->viewlock & RV3D_LOCKED)==0) { - rv3d->view= sms->orig_view; + if ((rv3d->viewlock & RV3D_LOCKED) == 0) { + rv3d->view = sms->orig_view; } MEM_freeN(rv3d->sms); - rv3d->sms= NULL; + rv3d->sms = NULL; WM_event_remove_timer(CTX_wm_manager(C), CTX_wm_window(C), rv3d->smooth_timer); - rv3d->smooth_timer= NULL; + rv3d->smooth_timer = NULL; rv3d->rflag &= ~RV3D_NAVIGATING; } else { int i; /* ease in/out */ - if (step < 0.5f) step = (float)pow(step*2.0f, 2.0)/2.0f; - else step = (float)1.0f-(powf(2.0f*(1.0f-step),2.0f)/2.0f); + if (step < 0.5f) step = (float)pow(step * 2.0f, 2.0) / 2.0f; + else step = (float)1.0f - (powf(2.0f * (1.0f - step), 2.0f) / 2.0f); - step_inv = 1.0f-step; + step_inv = 1.0f - step; - for (i=0; i<3; i++) - rv3d->ofs[i] = sms->new_ofs[i] * step + sms->orig_ofs[i]*step_inv; + for (i = 0; i < 3; i++) + rv3d->ofs[i] = sms->new_ofs[i] * step + sms->orig_ofs[i] * step_inv; interp_qt_qtqt(rv3d->viewquat, sms->orig_quat, sms->new_quat, step); - rv3d->dist = sms->new_dist * step + sms->orig_dist*step_inv; - v3d->lens = sms->new_lens * step + sms->orig_lens*step_inv; + rv3d->dist = sms->new_dist * step + sms->orig_dist * step_inv; + v3d->lens = sms->new_lens * step + sms->orig_lens * step_inv; ED_view3d_camera_lock_sync(v3d, rv3d); } @@ -325,7 +325,7 @@ static int view3d_smoothview_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent if (rv3d->viewlock & RV3D_BOXVIEW) view3d_boxview_copy(CTX_wm_area(C), CTX_wm_region(C)); - WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, v3d); + WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d); return OPERATOR_FINISHED; } @@ -349,13 +349,13 @@ void VIEW3D_OT_smoothview(wmOperatorType *ot) static int view3d_camera_to_view_exec(bContext *C, wmOperator *UNUSED(op)) { View3D *v3d = CTX_wm_view3d(C); - RegionView3D *rv3d= CTX_wm_region_view3d(C); + RegionView3D *rv3d = CTX_wm_region_view3d(C); ObjectTfmProtectedChannels obtfm; copy_qt_qt(rv3d->lviewquat, rv3d->viewquat); - rv3d->lview= rv3d->view; + rv3d->lview = rv3d->view; if (rv3d->persp != RV3D_CAMOB) { - rv3d->lpersp= rv3d->persp; + rv3d->lpersp = rv3d->persp; } object_tfm_protected_backup(v3d->camera, &obtfm); @@ -367,7 +367,7 @@ static int view3d_camera_to_view_exec(bContext *C, wmOperator *UNUSED(op)) DAG_id_tag_update(&v3d->camera->id, OB_RECALC_OB); rv3d->persp = RV3D_CAMOB; - WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, v3d->camera); + WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, v3d->camera); return OPERATOR_FINISHED; @@ -375,9 +375,9 @@ static int view3d_camera_to_view_exec(bContext *C, wmOperator *UNUSED(op)) static int view3d_camera_to_view_poll(bContext *C) { - View3D *v3d= CTX_wm_view3d(C); - if (v3d && v3d->camera && v3d->camera->id.lib==NULL) { - RegionView3D *rv3d= CTX_wm_region_view3d(C); + View3D *v3d = CTX_wm_view3d(C); + if (v3d && v3d->camera && v3d->camera->id.lib == NULL) { + RegionView3D *rv3d = CTX_wm_region_view3d(C); if (rv3d && !rv3d->viewlock) { return 1; } @@ -398,16 +398,16 @@ void VIEW3D_OT_camera_to_view(wmOperatorType *ot) ot->poll = view3d_camera_to_view_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /* unlike VIEW3D_OT_view_selected this is for framing a render and not * meant to take into account vertex/bone selection for eg. */ static int view3d_camera_to_view_selected_exec(bContext *C, wmOperator *UNUSED(op)) { - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); View3D *v3d = CTX_wm_view3d(C); - Object *camera_ob= v3d->camera; + Object *camera_ob = v3d->camera; float r_co[3]; /* the new location to apply */ @@ -427,7 +427,7 @@ static int view3d_camera_to_view_selected_exec(bContext *C, wmOperator *UNUSED(o /* notifiers */ DAG_id_tag_update(&camera_ob->id, OB_RECALC_OB); - WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, camera_ob); + WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, camera_ob); return OPERATOR_FINISHED; } else { @@ -437,9 +437,9 @@ static int view3d_camera_to_view_selected_exec(bContext *C, wmOperator *UNUSED(o static int view3d_camera_to_view_selected_poll(bContext *C) { - View3D *v3d= CTX_wm_view3d(C); - if (v3d && v3d->camera && v3d->camera->id.lib==NULL) { - RegionView3D *rv3d= CTX_wm_region_view3d(C); + View3D *v3d = CTX_wm_view3d(C); + if (v3d && v3d->camera && v3d->camera->id.lib == NULL) { + RegionView3D *rv3d = CTX_wm_region_view3d(C); if (rv3d) { if (rv3d->is_persp == FALSE) { CTX_wm_operator_poll_msg_set(C, "Only valid for a perspective camera view"); @@ -465,7 +465,7 @@ void VIEW3D_OT_camera_to_view_selected(wmOperatorType *ot) ot->poll = view3d_camera_to_view_selected_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } @@ -475,7 +475,7 @@ static int view3d_setobjectascamera_exec(bContext *C, wmOperator *UNUSED(op)) ARegion *ar; RegionView3D *rv3d; - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); Object *ob = CTX_data_active_object(C); /* no NULL check is needed, poll checks */ @@ -483,16 +483,16 @@ static int view3d_setobjectascamera_exec(bContext *C, wmOperator *UNUSED(op)) rv3d = ar->regiondata; if (ob) { - Object *camera_old= (rv3d->persp == RV3D_CAMOB) ? V3D_CAMERA_SCENE(scene, v3d) : NULL; - rv3d->persp= RV3D_CAMOB; - v3d->camera= ob; + Object *camera_old = (rv3d->persp == RV3D_CAMOB) ? V3D_CAMERA_SCENE(scene, v3d) : NULL; + rv3d->persp = RV3D_CAMOB; + v3d->camera = ob; if (v3d->scenelock) - scene->camera= ob; + scene->camera = ob; if (camera_old != ob) /* unlikely but looks like a glitch when set to the same */ smooth_view(C, v3d, ar, camera_old, v3d->camera, rv3d->ofs, rv3d->viewquat, &rv3d->dist, &v3d->lens); - WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS|NC_OBJECT|ND_DRAW, CTX_data_scene(C)); + WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS | NC_OBJECT | ND_DRAW, CTX_data_scene(C)); } return OPERATOR_FINISHED; @@ -519,7 +519,7 @@ void VIEW3D_OT_object_as_camera(wmOperatorType *ot) ot->poll = ED_operator_rv3d_user_region_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /* ********************************** */ @@ -532,8 +532,8 @@ void ED_view3d_calc_clipping(BoundBox *bb, float planes[4][4], bglMats *mats, co /* near zero floating point values can give issues with gluUnProject * in side view on some implementations */ - if (fabs(mats->modelview[0]) < 1e-6) mats->modelview[0]= 0.0; - if (fabs(mats->modelview[5]) < 1e-6) mats->modelview[5]= 0.0; + if (fabs(mats->modelview[0]) < 1e-6) mats->modelview[0] = 0.0; + if (fabs(mats->modelview[5]) < 1e-6) mats->modelview[5] = 0.0; /* Set up viewport so that gluUnProject will give correct values */ mats->viewport[0] = 0; @@ -541,9 +541,9 @@ void ED_view3d_calc_clipping(BoundBox *bb, float planes[4][4], bglMats *mats, co /* four clipping planes and bounding volume */ /* first do the bounding volume */ - for (val=0; val<4; val++) { - xs= (val==0||val==3)?rect->xmin:rect->xmax; - ys= (val==0||val==1)?rect->ymin:rect->ymax; + for (val = 0; val < 4; val++) { + xs = (val == 0 || val == 3) ? rect->xmin : rect->xmax; + ys = (val == 0 || val == 1) ? rect->ymin : rect->ymax; gluUnProject(xs, ys, 0.0, mats->modelview, mats->projection, mats->viewport, &p[0], &p[1], &p[2]); copy_v3fl_v3db(bb->vec[val], p); @@ -555,28 +555,28 @@ void ED_view3d_calc_clipping(BoundBox *bb, float planes[4][4], bglMats *mats, co /* verify if we have negative scale. doing the transform before cross * product flips the sign of the vector compared to doing cross product * before transform then, so we correct for that. */ - for (a=0; a<16; a++) - ((float*)modelview)[a] = mats->modelview[a]; + for (a = 0; a < 16; a++) + ((float *)modelview)[a] = mats->modelview[a]; flip_sign = is_negative_m4(modelview); /* then plane equations */ - for (val=0; val<4; val++) { + for (val = 0; val < 4; val++) { - normal_tri_v3(planes[val], bb->vec[val], bb->vec[val==3?0:val+1], bb->vec[val+4]); + normal_tri_v3(planes[val], bb->vec[val], bb->vec[val == 3 ? 0 : val + 1], bb->vec[val + 4]); if (flip_sign) negate_v3(planes[val]); - planes[val][3]= - planes[val][0]*bb->vec[val][0] - - planes[val][1]*bb->vec[val][1] - - planes[val][2]*bb->vec[val][2]; + planes[val][3] = -planes[val][0] * bb->vec[val][0] + - planes[val][1] * bb->vec[val][1] + - planes[val][2] * bb->vec[val][2]; } } /* create intersection coordinates in view Z direction at mouse coordinates */ void ED_view3d_win_to_segment_clip(ARegion *ar, View3D *v3d, const float mval[2], float ray_start[3], float ray_end[3]) { - RegionView3D *rv3d= ar->regiondata; + RegionView3D *rv3d = ar->regiondata; if (rv3d->is_persp) { float vec[3]; @@ -602,7 +602,7 @@ void ED_view3d_win_to_segment_clip(ARegion *ar, View3D *v3d, const float mval[2] /* clipping */ if (rv3d->rflag & RV3D_CLIPPING) { int a; - for (a=0; a<4; a++) { + for (a = 0; a < 4; a++) { clip_line_plane(ray_start, ray_end, rv3d->clip[a]); } } @@ -643,11 +643,11 @@ void ED_view3d_global_to_vector(RegionView3D *rv3d, const float coord[3], float int initgrabz(RegionView3D *rv3d, float x, float y, float z) { - int flip= FALSE; - if (rv3d==NULL) return flip; - rv3d->zfac= rv3d->persmat[0][3]*x+ rv3d->persmat[1][3]*y+ rv3d->persmat[2][3]*z+ rv3d->persmat[3][3]; + int flip = FALSE; + if (rv3d == NULL) return flip; + rv3d->zfac = rv3d->persmat[0][3] * x + rv3d->persmat[1][3] * y + rv3d->persmat[2][3] * z + rv3d->persmat[3][3]; if (rv3d->zfac < 0.0f) - flip= TRUE; + flip = TRUE; /* if x,y,z is exactly the viewport offset, zfac is 0 and we don't want that * (accounting for near zero values) */ @@ -659,14 +659,14 @@ int initgrabz(RegionView3D *rv3d, float x, float y, float z) /* NOTE: I've changed this to flip zfac to be positive again for now so that GPencil draws ok * Aligorith, 2009Aug31 */ //if (rv3d->zfac < 0.0f) rv3d->zfac = 1.0f; - if (rv3d->zfac < 0.0f) rv3d->zfac= -rv3d->zfac; + if (rv3d->zfac < 0.0f) rv3d->zfac = -rv3d->zfac; return flip; } void ED_view3d_win_to_3d(ARegion *ar, const float depth_pt[3], const float mval[2], float out[3]) { - RegionView3D *rv3d= ar->regiondata; + RegionView3D *rv3d = ar->regiondata; float line_sta[3]; float line_end[3]; @@ -683,11 +683,11 @@ void ED_view3d_win_to_3d(ARegion *ar, const float depth_pt[3], const float mval[ } } else { - const float dx= (2.0f * mval[0] / (float)ar->winx) - 1.0f; - const float dy= (2.0f * mval[1] / (float)ar->winy) - 1.0f; - line_sta[0]= (rv3d->persinv[0][0] * dx) + (rv3d->persinv[1][0] * dy) + rv3d->viewinv[3][0]; - line_sta[1]= (rv3d->persinv[0][1] * dx) + (rv3d->persinv[1][1] * dy) + rv3d->viewinv[3][1]; - line_sta[2]= (rv3d->persinv[0][2] * dx) + (rv3d->persinv[1][2] * dy) + rv3d->viewinv[3][2]; + const float dx = (2.0f * mval[0] / (float)ar->winx) - 1.0f; + const float dy = (2.0f * mval[1] / (float)ar->winy) - 1.0f; + line_sta[0] = (rv3d->persinv[0][0] * dx) + (rv3d->persinv[1][0] * dy) + rv3d->viewinv[3][0]; + line_sta[1] = (rv3d->persinv[0][1] * dx) + (rv3d->persinv[1][1] * dy) + rv3d->viewinv[3][1]; + line_sta[2] = (rv3d->persinv[0][2] * dx) + (rv3d->persinv[1][2] * dy) + rv3d->viewinv[3][2]; add_v3_v3v3(line_end, line_sta, rv3d->viewinv[2]); closest_to_line_v3(out, depth_pt, line_sta, line_end); @@ -698,15 +698,15 @@ void ED_view3d_win_to_3d(ARegion *ar, const float depth_pt[3], const float mval[ /* only to detect delta motion */ void ED_view3d_win_to_delta(ARegion *ar, const float mval[2], float out[3]) { - RegionView3D *rv3d= ar->regiondata; + RegionView3D *rv3d = ar->regiondata; float dx, dy; - dx= 2.0f*mval[0]*rv3d->zfac/ar->winx; - dy= 2.0f*mval[1]*rv3d->zfac/ar->winy; + dx = 2.0f * mval[0] * rv3d->zfac / ar->winx; + dy = 2.0f * mval[1] * rv3d->zfac / ar->winy; - out[0]= (rv3d->persinv[0][0]*dx + rv3d->persinv[1][0]*dy); - out[1]= (rv3d->persinv[0][1]*dx + rv3d->persinv[1][1]*dy); - out[2]= (rv3d->persinv[0][2]*dx + rv3d->persinv[1][2]*dy); + out[0] = (rv3d->persinv[0][0] * dx + rv3d->persinv[1][0] * dy); + out[1] = (rv3d->persinv[0][1] * dx + rv3d->persinv[1][1] * dy); + out[2] = (rv3d->persinv[0][2] * dx + rv3d->persinv[1][2] * dy); } /* doesn't rely on initgrabz */ @@ -714,12 +714,12 @@ void ED_view3d_win_to_delta(ARegion *ar, const float mval[2], float out[3]) * the mouse cursor as a normalized vector */ void ED_view3d_win_to_vector(ARegion *ar, const float mval[2], float out[3]) { - RegionView3D *rv3d= ar->regiondata; + RegionView3D *rv3d = ar->regiondata; if (rv3d->is_persp) { - out[0]= 2.0f * (mval[0] / ar->winx) - 1.0f; - out[1]= 2.0f * (mval[1] / ar->winy) - 1.0f; - out[2]= -0.5f; + out[0] = 2.0f * (mval[0] / ar->winx) - 1.0f; + out[1] = 2.0f * (mval[1] / ar->winy) - 1.0f; + out[2] = -0.5f; mul_project_m4_v3(rv3d->persinv, out); sub_v3_v3(out, rv3d->viewinv[3]); } @@ -745,7 +745,7 @@ float ED_view3d_depth_read_cached(ViewContext *vc, int x, int y) void ED_view3d_depth_tag_update(RegionView3D *rv3d) { if (rv3d->depths) - rv3d->depths->damaged= 1; + rv3d->depths->damaged = 1; } void ED_view3d_ob_project_mat_get(RegionView3D *rv3d, Object *ob, float pmat[4][4]) @@ -762,7 +762,7 @@ void view3d_unproject(bglMats *mats, float out[3], const short x, const short y, { double ux, uy, uz; - gluUnProject(x,y,z, mats->modelview, mats->projection, + gluUnProject(x, y, z, mats->modelview, mats->projection, (GLint *)mats->viewport, &ux, &uy, &uz); out[0] = ux; @@ -776,14 +776,14 @@ void ED_view3d_project_float_v2(const ARegion *ar, const float vec[3], float adr float vec4[4]; copy_v3_v3(vec4, vec); - vec4[3]= 1.0; + vec4[3] = 1.0; /* adr[0]= IS_CLIPPED; */ /* always overwritten */ mul_m4_v4(mat, vec4); if (vec4[3] > FLT_EPSILON) { - adr[0] = (float)(ar->winx/2.0f)+(ar->winx/2.0f)*vec4[0]/vec4[3]; - adr[1] = (float)(ar->winy/2.0f)+(ar->winy/2.0f)*vec4[1]/vec4[3]; + adr[0] = (float)(ar->winx / 2.0f) + (ar->winx / 2.0f) * vec4[0] / vec4[3]; + adr[1] = (float)(ar->winy / 2.0f) + (ar->winy / 2.0f) * vec4[1] / vec4[3]; } else { adr[0] = adr[1] = 0.0f; @@ -796,15 +796,15 @@ void ED_view3d_project_float_v3(ARegion *ar, const float vec[3], float adr[3], f float vec4[4]; copy_v3_v3(vec4, vec); - vec4[3]= 1.0; + vec4[3] = 1.0; /* adr[0]= IS_CLIPPED; */ /* always overwritten */ mul_m4_v4(mat, vec4); if (vec4[3] > FLT_EPSILON) { - adr[0] = (float)(ar->winx/2.0f)+(ar->winx/2.0f)*vec4[0]/vec4[3]; - adr[1] = (float)(ar->winy/2.0f)+(ar->winy/2.0f)*vec4[1]/vec4[3]; - adr[2] = vec4[2]/vec4[3]; + adr[0] = (float)(ar->winx / 2.0f) + (ar->winx / 2.0f) * vec4[0] / vec4[3]; + adr[1] = (float)(ar->winy / 2.0f) + (ar->winy / 2.0f) * vec4[1] / vec4[3]; + adr[2] = vec4[2] / vec4[3]; } else { zero_v3(adr); @@ -817,41 +817,41 @@ int ED_view3d_boundbox_clip(RegionView3D *rv3d, float obmat[][4], BoundBox *bb) float mat[4][4]; float vec[4], min, max; - int a, flag= -1, fl; + int a, flag = -1, fl; - if (bb==NULL) return 1; + if (bb == NULL) return 1; if (bb->flag & OB_BB_DISABLED) return 1; mult_m4_m4m4(mat, rv3d->persmat, obmat); - for (a=0; a<8; a++) { + for (a = 0; a < 8; a++) { copy_v3_v3(vec, bb->vec[a]); - vec[3]= 1.0; + vec[3] = 1.0; mul_m4_v4(mat, vec); - max= vec[3]; - min= -vec[3]; + max = vec[3]; + min = -vec[3]; - fl= 0; - if (vec[0] < min) fl+= 1; - if (vec[0] > max) fl+= 2; - if (vec[1] < min) fl+= 4; - if (vec[1] > max) fl+= 8; - if (vec[2] < min) fl+= 16; - if (vec[2] > max) fl+= 32; + fl = 0; + if (vec[0] < min) fl += 1; + if (vec[0] > max) fl += 2; + if (vec[1] < min) fl += 4; + if (vec[1] > max) fl += 8; + if (vec[2] < min) fl += 16; + if (vec[2] > max) fl += 32; flag &= fl; - if (flag==0) return 1; + if (flag == 0) return 1; } return 0; } -void project_short(ARegion *ar, const float vec[3], short adr[2]) /* clips */ +void project_short(ARegion *ar, const float vec[3], short adr[2]) /* clips */ { - RegionView3D *rv3d= ar->regiondata; + RegionView3D *rv3d = ar->regiondata; float fx, fy, vec4[4]; - adr[0]= IS_CLIPPED; + adr[0] = IS_CLIPPED; if (rv3d->rflag & RV3D_CLIPPING) { if (ED_view3d_clipping_test(rv3d, vec, FALSE)) { @@ -860,19 +860,19 @@ void project_short(ARegion *ar, const float vec[3], short adr[2]) /* clips */ } copy_v3_v3(vec4, vec); - vec4[3]= 1.0; + vec4[3] = 1.0; mul_m4_v4(rv3d->persmat, vec4); - if ( vec4[3] > (float)BL_NEAR_CLIP ) { /* 0.001 is the NEAR clipping cutoff for picking */ - fx= (ar->winx/2)*(1 + vec4[0]/vec4[3]); + if (vec4[3] > (float)BL_NEAR_CLIP) { /* 0.001 is the NEAR clipping cutoff for picking */ + fx = (ar->winx / 2) * (1 + vec4[0] / vec4[3]); - if ( fx>0 && fxwinx) { + if (fx > 0 && fx < ar->winx) { - fy= (ar->winy/2)*(1 + vec4[1]/vec4[3]); + fy = (ar->winy / 2) * (1 + vec4[1] / vec4[3]); if (fy > 0.0f && fy < (float)ar->winy) { - adr[0]= (short)floor(fx); - adr[1]= (short)floor(fy); + adr[0] = (short)floor(fx); + adr[1] = (short)floor(fy); } } } @@ -880,24 +880,24 @@ void project_short(ARegion *ar, const float vec[3], short adr[2]) /* clips */ void project_int(ARegion *ar, const float vec[3], int adr[2]) { - RegionView3D *rv3d= ar->regiondata; + RegionView3D *rv3d = ar->regiondata; float fx, fy, vec4[4]; copy_v3_v3(vec4, vec); - vec4[3]= 1.0; - adr[0]= (int)2140000000.0f; + vec4[3] = 1.0; + adr[0] = (int)2140000000.0f; mul_m4_v4(rv3d->persmat, vec4); - if ( vec4[3] > (float)BL_NEAR_CLIP ) { /* 0.001 is the NEAR clipping cutoff for picking */ - fx= (ar->winx/2)*(1 + vec4[0]/vec4[3]); + if (vec4[3] > (float)BL_NEAR_CLIP) { /* 0.001 is the NEAR clipping cutoff for picking */ + fx = (ar->winx / 2) * (1 + vec4[0] / vec4[3]); - if ( fx>-2140000000.0f && fx<2140000000.0f) { - fy= (ar->winy/2)*(1 + vec4[1]/vec4[3]); + if (fx > -2140000000.0f && fx < 2140000000.0f) { + fy = (ar->winy / 2) * (1 + vec4[1] / vec4[3]); - if (fy>-2140000000.0f && fy<2140000000.0f) { - adr[0]= (int)floor(fx); - adr[1]= (int)floor(fy); + if (fy > -2140000000.0f && fy < 2140000000.0f) { + adr[0] = (int)floor(fx); + adr[1] = (int)floor(fy); } } } @@ -905,17 +905,17 @@ void project_int(ARegion *ar, const float vec[3], int adr[2]) void project_int_noclip(ARegion *ar, const float vec[3], int adr[2]) { - RegionView3D *rv3d= ar->regiondata; + RegionView3D *rv3d = ar->regiondata; float fx, fy, vec4[4]; copy_v3_v3(vec4, vec); - vec4[3]= 1.0; + vec4[3] = 1.0; mul_m4_v4(rv3d->persmat, vec4); - if ( fabs(vec4[3]) > BL_NEAR_CLIP ) { - fx = (ar->winx/2)*(1 + vec4[0]/vec4[3]); - fy = (ar->winy/2)*(1 + vec4[1]/vec4[3]); + if (fabs(vec4[3]) > BL_NEAR_CLIP) { + fx = (ar->winx / 2) * (1 + vec4[0] / vec4[3]); + fy = (ar->winy / 2) * (1 + vec4[1] / vec4[3]); adr[0] = (int)floor(fx); adr[1] = (int)floor(fy); @@ -928,25 +928,25 @@ void project_int_noclip(ARegion *ar, const float vec[3], int adr[2]) void project_short_noclip(ARegion *ar, const float vec[3], short adr[2]) { - RegionView3D *rv3d= ar->regiondata; + RegionView3D *rv3d = ar->regiondata; float fx, fy, vec4[4]; copy_v3_v3(vec4, vec); - vec4[3]= 1.0; - adr[0]= IS_CLIPPED; + vec4[3] = 1.0; + adr[0] = IS_CLIPPED; mul_m4_v4(rv3d->persmat, vec4); - if ( vec4[3] > (float)BL_NEAR_CLIP ) { /* 0.001 is the NEAR clipping cutoff for picking */ - fx= (ar->winx/2)*(1 + vec4[0]/vec4[3]); + if (vec4[3] > (float)BL_NEAR_CLIP) { /* 0.001 is the NEAR clipping cutoff for picking */ + fx = (ar->winx / 2) * (1 + vec4[0] / vec4[3]); - if ( fx>-32700 && fx<32700) { + if (fx > -32700 && fx < 32700) { - fy= (ar->winy/2)*(1 + vec4[1]/vec4[3]); + fy = (ar->winy / 2) * (1 + vec4[1] / vec4[3]); if (fy > -32700.0f && fy < 32700.0f) { - adr[0]= (short)floor(fx); - adr[1]= (short)floor(fy); + adr[0] = (short)floor(fx); + adr[1] = (short)floor(fy); } } } @@ -957,37 +957,37 @@ void apply_project_float(float persmat[4][4], int winx, int winy, const float ve float vec4[4]; copy_v3_v3(vec4, vec); - vec4[3]= 1.0; - adr[0]= IS_CLIPPED; + vec4[3] = 1.0; + adr[0] = IS_CLIPPED; mul_m4_v4(persmat, vec4); if (vec4[3] > (float)BL_NEAR_CLIP) { - adr[0] = (float)(winx/2.0f)+(winx/2.0f)*vec4[0]/vec4[3]; - adr[1] = (float)(winy/2.0f)+(winy/2.0f)*vec4[1]/vec4[3]; + adr[0] = (float)(winx / 2.0f) + (winx / 2.0f) * vec4[0] / vec4[3]; + adr[1] = (float)(winy / 2.0f) + (winy / 2.0f) * vec4[1] / vec4[3]; } } void project_float(ARegion *ar, const float vec[3], float adr[2]) { - RegionView3D *rv3d= ar->regiondata; + RegionView3D *rv3d = ar->regiondata; apply_project_float(rv3d->persmat, ar->winx, ar->winy, vec, adr); } void project_float_noclip(ARegion *ar, const float vec[3], float adr[2]) { - RegionView3D *rv3d= ar->regiondata; + RegionView3D *rv3d = ar->regiondata; float vec4[4]; copy_v3_v3(vec4, vec); - vec4[3]= 1.0; + vec4[3] = 1.0; mul_m4_v4(rv3d->persmat, vec4); - if ( fabs(vec4[3]) > BL_NEAR_CLIP ) { - adr[0] = (float)(ar->winx/2.0f)+(ar->winx/2.0f)*vec4[0]/vec4[3]; - adr[1] = (float)(ar->winy/2.0f)+(ar->winy/2.0f)*vec4[1]/vec4[3]; + if (fabs(vec4[3]) > BL_NEAR_CLIP) { + adr[0] = (float)(ar->winx / 2.0f) + (ar->winx / 2.0f) * vec4[0] / vec4[3]; + adr[1] = (float)(ar->winy / 2.0f) + (ar->winy / 2.0f) * vec4[1] / vec4[3]; } else { adr[0] = ar->winx / 2.0f; @@ -1003,8 +1003,8 @@ int ED_view3d_clip_range_get(View3D *v3d, RegionView3D *rv3d, float *clipsta, fl camera_params_init(¶ms); camera_params_from_view3d(¶ms, v3d, rv3d); - if (clipsta) *clipsta= params.clipsta; - if (clipend) *clipend= params.clipend; + if (clipsta) *clipsta = params.clipsta; + if (clipend) *clipend = params.clipend; return params.is_ortho; } @@ -1019,22 +1019,22 @@ int ED_view3d_viewplane_get(View3D *v3d, RegionView3D *rv3d, int winx, int winy, camera_params_from_view3d(¶ms, v3d, rv3d); camera_params_compute_viewplane(¶ms, winx, winy, 1.0f, 1.0f); - if (viewplane) *viewplane= params.viewplane; - if (clipsta) *clipsta= params.clipsta; - if (clipend) *clipend= params.clipend; + if (viewplane) *viewplane = params.viewplane; + if (clipsta) *clipsta = params.clipsta; + if (clipend) *clipend = params.clipend; return params.is_ortho; } -void setwinmatrixview3d(ARegion *ar, View3D *v3d, rctf *rect) /* rect: for picking */ +void setwinmatrixview3d(ARegion *ar, View3D *v3d, rctf *rect) /* rect: for picking */ { - RegionView3D *rv3d= ar->regiondata; + RegionView3D *rv3d = ar->regiondata; rctf viewplane; float clipsta, clipend, x1, y1, x2, y2; int orth; - orth= ED_view3d_viewplane_get(v3d, rv3d, ar->winx, ar->winy, &viewplane, &clipsta, &clipend); - rv3d->is_persp= !orth; + orth = ED_view3d_viewplane_get(v3d, rv3d, ar->winx, ar->winy, &viewplane, &clipsta, &clipend); + rv3d->is_persp = !orth; #if 0 printf("%s: %d %d %f %f %f %f %f %f\n", __func__, winx, winy, @@ -1042,20 +1042,20 @@ void setwinmatrixview3d(ARegion *ar, View3D *v3d, rctf *rect) /* rect: for pick clipsta, clipend); #endif - x1= viewplane.xmin; - y1= viewplane.ymin; - x2= viewplane.xmax; - y2= viewplane.ymax; - - if (rect) { /* picking */ - rect->xmin/= (float)ar->winx; - rect->xmin = x1+rect->xmin*(x2-x1); - rect->ymin/= (float)ar->winy; - rect->ymin = y1+rect->ymin*(y2-y1); - rect->xmax/= (float)ar->winx; - rect->xmax = x1+rect->xmax*(x2-x1); - rect->ymax/= (float)ar->winy; - rect->ymax = y1+rect->ymax*(y2-y1); + x1 = viewplane.xmin; + y1 = viewplane.ymin; + x2 = viewplane.xmax; + y2 = viewplane.ymax; + + if (rect) { /* picking */ + rect->xmin /= (float)ar->winx; + rect->xmin = x1 + rect->xmin * (x2 - x1); + rect->ymin /= (float)ar->winy; + rect->ymin = y1 + rect->ymin * (y2 - y1); + rect->xmax /= (float)ar->winx; + rect->xmax = x1 + rect->xmax * (x2 - x1); + rect->ymax /= (float)ar->winy; + rect->ymax = y1 + rect->ymax * (y2 - y1); if (orth) wmOrtho(rect->xmin, rect->xmax, rect->ymin, rect->ymax, -clipend, clipend); else wmFrustum(rect->xmin, rect->xmax, rect->ymin, rect->ymax, clipsta, clipend); @@ -1067,7 +1067,7 @@ void setwinmatrixview3d(ARegion *ar, View3D *v3d, rctf *rect) /* rect: for pick } /* update matrix in 3d view region */ - glGetFloatv(GL_PROJECTION_MATRIX, (float*)rv3d->winmat); + glGetFloatv(GL_PROJECTION_MATRIX, (float *)rv3d->winmat); } static void obmat_to_viewmat(View3D *v3d, RegionView3D *rv3d, Object *ob, short smooth) @@ -1075,7 +1075,7 @@ static void obmat_to_viewmat(View3D *v3d, RegionView3D *rv3d, Object *ob, short float bmat[4][4]; float tmat[3][3]; - rv3d->view= RV3D_VIEW_USER; /* don't show the grid */ + rv3d->view = RV3D_VIEW_USER; /* don't show the grid */ copy_m4_m4(bmat, ob->obmat); normalize_m4(bmat); @@ -1085,66 +1085,66 @@ static void obmat_to_viewmat(View3D *v3d, RegionView3D *rv3d, Object *ob, short copy_m3_m4(tmat, rv3d->viewmat); if (smooth) { float new_quat[4]; - if (rv3d->persp==RV3D_CAMOB && v3d->camera) { + if (rv3d->persp == RV3D_CAMOB && v3d->camera) { /* were from a camera view */ float orig_ofs[3]; - float orig_dist= rv3d->dist; - float orig_lens= v3d->lens; + float orig_dist = rv3d->dist; + float orig_lens = v3d->lens; copy_v3_v3(orig_ofs, rv3d->ofs); /* Switch from camera view */ - mat3_to_quat( new_quat,tmat); + mat3_to_quat(new_quat, tmat); - rv3d->persp=RV3D_PERSP; - rv3d->dist= 0.0; + rv3d->persp = RV3D_PERSP; + rv3d->dist = 0.0; ED_view3d_from_object(v3d->camera, rv3d->ofs, NULL, NULL, &v3d->lens); smooth_view(NULL, NULL, NULL, NULL, NULL, orig_ofs, new_quat, &orig_dist, &orig_lens); // XXX - rv3d->persp=RV3D_CAMOB; /* just to be polite, not needed */ + rv3d->persp = RV3D_CAMOB; /* just to be polite, not needed */ } else { - mat3_to_quat( new_quat,tmat); + mat3_to_quat(new_quat, tmat); smooth_view(NULL, NULL, NULL, NULL, NULL, NULL, new_quat, NULL, NULL); // XXX } } else { - mat3_to_quat( rv3d->viewquat,tmat); + mat3_to_quat(rv3d->viewquat, tmat); } } -#define QUATSET(a, b, c, d, e) a[0]=b; a[1]=c; a[2]=d; a[3]=e; +#define QUATSET(a, b, c, d, e) { a[0] = b; a[1] = c; a[2] = d; a[3] = e; } (void)0 int ED_view3d_lock(RegionView3D *rv3d) { - switch(rv3d->view) { - case RV3D_VIEW_BOTTOM : - QUATSET(rv3d->viewquat,0.0, -1.0, 0.0, 0.0); - break; + switch (rv3d->view) { + case RV3D_VIEW_BOTTOM: + QUATSET(rv3d->viewquat, 0.0, -1.0, 0.0, 0.0); + break; - case RV3D_VIEW_BACK: - QUATSET(rv3d->viewquat,0.0, 0.0, (float)-cos(M_PI/4.0), (float)-cos(M_PI/4.0)); - break; + case RV3D_VIEW_BACK: + QUATSET(rv3d->viewquat, 0.0, 0.0, (float)-cos(M_PI / 4.0), (float)-cos(M_PI / 4.0)); + break; - case RV3D_VIEW_LEFT: - QUATSET(rv3d->viewquat,0.5, -0.5, 0.5, 0.5); - break; + case RV3D_VIEW_LEFT: + QUATSET(rv3d->viewquat, 0.5, -0.5, 0.5, 0.5); + break; - case RV3D_VIEW_TOP: - QUATSET(rv3d->viewquat,1.0, 0.0, 0.0, 0.0); - break; + case RV3D_VIEW_TOP: + QUATSET(rv3d->viewquat, 1.0, 0.0, 0.0, 0.0); + break; - case RV3D_VIEW_FRONT: - QUATSET(rv3d->viewquat,(float)cos(M_PI/4.0), (float)-sin(M_PI/4.0), 0.0, 0.0); - break; + case RV3D_VIEW_FRONT: + QUATSET(rv3d->viewquat, (float)cos(M_PI / 4.0), (float)-sin(M_PI / 4.0), 0.0, 0.0); + break; - case RV3D_VIEW_RIGHT: - QUATSET(rv3d->viewquat, 0.5, -0.5, -0.5, -0.5); - break; - default: - return FALSE; + case RV3D_VIEW_RIGHT: + QUATSET(rv3d->viewquat, 0.5, -0.5, -0.5, -0.5); + break; + default: + return FALSE; } return TRUE; @@ -1153,14 +1153,14 @@ int ED_view3d_lock(RegionView3D *rv3d) /* don't set windows active in here, is used by renderwin too */ void setviewmatrixview3d(Scene *scene, View3D *v3d, RegionView3D *rv3d) { - if (rv3d->persp==RV3D_CAMOB) { /* obs/camera */ + if (rv3d->persp == RV3D_CAMOB) { /* obs/camera */ if (v3d->camera) { where_is_object(scene, v3d->camera); obmat_to_viewmat(v3d, rv3d, v3d->camera, 0); } else { - quat_to_mat4( rv3d->viewmat,rv3d->viewquat); - rv3d->viewmat[3][2]-= rv3d->dist; + quat_to_mat4(rv3d->viewmat, rv3d->viewquat); + rv3d->viewmat[3][2] -= rv3d->dist; } } else { @@ -1168,28 +1168,28 @@ void setviewmatrixview3d(Scene *scene, View3D *v3d, RegionView3D *rv3d) if (rv3d->viewlock) ED_view3d_lock(rv3d); - quat_to_mat4( rv3d->viewmat,rv3d->viewquat); - if (rv3d->persp==RV3D_PERSP) rv3d->viewmat[3][2]-= rv3d->dist; + quat_to_mat4(rv3d->viewmat, rv3d->viewquat); + if (rv3d->persp == RV3D_PERSP) rv3d->viewmat[3][2] -= rv3d->dist; if (v3d->ob_centre) { - Object *ob= v3d->ob_centre; + Object *ob = v3d->ob_centre; float vec[3]; copy_v3_v3(vec, ob->obmat[3]); - if (ob->type==OB_ARMATURE && v3d->ob_centre_bone[0]) { - bPoseChannel *pchan= get_pose_channel(ob->pose, v3d->ob_centre_bone); + if (ob->type == OB_ARMATURE && v3d->ob_centre_bone[0]) { + bPoseChannel *pchan = get_pose_channel(ob->pose, v3d->ob_centre_bone); if (pchan) { copy_v3_v3(vec, pchan->pose_mat[3]); mul_m4_v3(ob->obmat, vec); } } - translate_m4( rv3d->viewmat,-vec[0], -vec[1], -vec[2]); + translate_m4(rv3d->viewmat, -vec[0], -vec[1], -vec[2]); } else if (v3d->ob_centre_cursor) { float vec[3]; copy_v3_v3(vec, give_cursor(scene, v3d)); translate_m4(rv3d->viewmat, -vec[0], -vec[1], -vec[2]); } - else translate_m4( rv3d->viewmat,rv3d->ofs[0], rv3d->ofs[1], rv3d->ofs[2]); + else translate_m4(rv3d->viewmat, rv3d->ofs[0], rv3d->ofs[1], rv3d->ofs[2]); } } @@ -1200,9 +1200,9 @@ void setviewmatrixview3d(Scene *scene, View3D *v3d, RegionView3D *rv3d) */ short view3d_opengl_select(ViewContext *vc, unsigned int *buffer, unsigned int bufsize, rcti *input) { - Scene *scene= vc->scene; - View3D *v3d= vc->v3d; - ARegion *ar= vc->ar; + Scene *scene = vc->scene; + View3D *v3d = vc->v3d; + ARegion *ar = vc->ar; rctf rect; short code, hits; char dt, dtx; @@ -1210,11 +1210,11 @@ short view3d_opengl_select(ViewContext *vc, unsigned int *buffer, unsigned int b G.f |= G_PICKSEL; /* case not a border select */ - if (input->xmin ==input->xmax) { - rect.xmin = input->xmin-12; // seems to be default value for bones only now - rect.xmax = input->xmin+12; - rect.ymin = input->ymin-12; - rect.ymax = input->ymin+12; + if (input->xmin == input->xmax) { + rect.xmin = input->xmin - 12; // seems to be default value for bones only now + rect.xmax = input->xmin + 12; + rect.ymin = input->ymin - 12; + rect.ymax = input->ymin + 12; } else { rect.xmin = input->xmin; @@ -1227,41 +1227,41 @@ short view3d_opengl_select(ViewContext *vc, unsigned int *buffer, unsigned int b mult_m4_m4m4(vc->rv3d->persmat, vc->rv3d->winmat, vc->rv3d->viewmat); if (v3d->drawtype > OB_WIRE) { - v3d->zbuf= TRUE; + v3d->zbuf = TRUE; glEnable(GL_DEPTH_TEST); } if (vc->rv3d->rflag & RV3D_CLIPPING) ED_view3d_clipping_set(vc->rv3d); - glSelectBuffer( bufsize, (GLuint *)buffer); + glSelectBuffer(bufsize, (GLuint *)buffer); glRenderMode(GL_SELECT); - glInitNames(); /* these two calls whatfor? It doesnt work otherwise */ + glInitNames(); /* these two calls whatfor? It doesnt work otherwise */ glPushName(-1); - code= 1; + code = 1; - if (vc->obedit && vc->obedit->type==OB_MBALL) { - draw_object(scene, ar, v3d, BASACT, DRAW_PICKING|DRAW_CONSTCOLOR); + if (vc->obedit && vc->obedit->type == OB_MBALL) { + draw_object(scene, ar, v3d, BASACT, DRAW_PICKING | DRAW_CONSTCOLOR); } - else if ((vc->obedit && vc->obedit->type==OB_ARMATURE)) { + else if ((vc->obedit && vc->obedit->type == OB_ARMATURE)) { /* if not drawing sketch, draw bones */ if (!BDR_drawSketchNames(vc)) { - draw_object(scene, ar, v3d, BASACT, DRAW_PICKING|DRAW_CONSTCOLOR); + draw_object(scene, ar, v3d, BASACT, DRAW_PICKING | DRAW_CONSTCOLOR); } } else { Base *base; - v3d->xray= TRUE; // otherwise it postpones drawing - for (base= scene->base.first; base; base= base->next) { + v3d->xray = TRUE; // otherwise it postpones drawing + for (base = scene->base.first; base; base = base->next) { if (base->lay & v3d->lay) { if (base->object->restrictflag & OB_RESTRICT_SELECT) - base->selcol= 0; + base->selcol = 0; else { - base->selcol= code; + base->selcol = code; glLoadName(code); - draw_object(scene, ar, v3d, base, DRAW_PICKING|DRAW_CONSTCOLOR); + draw_object(scene, ar, v3d, base, DRAW_PICKING | DRAW_CONSTCOLOR); /* we draw group-duplicators for selection too */ if ((base->object->transflag & OB_DUPLI) && base->object->dup_group) { @@ -1269,22 +1269,22 @@ short view3d_opengl_select(ViewContext *vc, unsigned int *buffer, unsigned int b DupliObject *dob; Base tbase; - tbase.flag= OB_FROMDUPLI; - lb= object_duplilist(scene, base->object); + tbase.flag = OB_FROMDUPLI; + lb = object_duplilist(scene, base->object); - for (dob= lb->first; dob; dob= dob->next) { - tbase.object= dob->ob; + for (dob = lb->first; dob; dob = dob->next) { + tbase.object = dob->ob; copy_m4_m4(dob->ob->obmat, dob->mat); /* extra service: draw the duplicator in drawtype of parent */ /* MIN2 for the drawtype to allow bounding box objects in groups for lods */ - dt= tbase.object->dt; tbase.object->dt= MIN2(tbase.object->dt, base->object->dt); - dtx= tbase.object->dtx; tbase.object->dtx= base->object->dtx; + dt = tbase.object->dt; tbase.object->dt = MIN2(tbase.object->dt, base->object->dt); + dtx = tbase.object->dtx; tbase.object->dtx = base->object->dtx; - draw_object(scene, ar, v3d, &tbase, DRAW_PICKING|DRAW_CONSTCOLOR); + draw_object(scene, ar, v3d, &tbase, DRAW_PICKING | DRAW_CONSTCOLOR); - tbase.object->dt= dt; - tbase.object->dtx= dtx; + tbase.object->dt = dt; + tbase.object->dtx = dtx; copy_m4_m4(dob->ob->obmat, dob->omat); } @@ -1294,18 +1294,18 @@ short view3d_opengl_select(ViewContext *vc, unsigned int *buffer, unsigned int b } } } - v3d->xray= FALSE; // restore + v3d->xray = FALSE; // restore } - glPopName(); /* see above (pushname) */ - hits= glRenderMode(GL_RENDER); + glPopName(); /* see above (pushname) */ + hits = glRenderMode(GL_RENDER); G.f &= ~G_PICKSEL; setwinmatrixview3d(ar, v3d, NULL); mult_m4_m4m4(vc->rv3d->persmat, vc->rv3d->winmat, vc->rv3d->viewmat); if (v3d->drawtype > OB_WIRE) { - v3d->zbuf= 0; + v3d->zbuf = 0; glDisable(GL_DEPTH_TEST); } // XXX persp(PERSP_WIN); @@ -1313,7 +1313,7 @@ short view3d_opengl_select(ViewContext *vc, unsigned int *buffer, unsigned int b if (vc->rv3d->rflag & RV3D_CLIPPING) ED_view3d_clipping_disable(); - if (hits<0) printf("Too many objects in select buffer\n"); // XXX make error message + if (hits < 0) printf("Too many objects in select buffer\n"); // XXX make error message return hits; } @@ -1326,64 +1326,64 @@ static unsigned int free_localbit(Main *bmain) ScrArea *sa; bScreen *sc; - lay= 0; + lay = 0; /* sometimes we loose a localview: when an area is closed */ /* check all areas: which localviews are in use? */ - for (sc= bmain->screen.first; sc; sc= sc->id.next) { - for (sa= sc->areabase.first; sa; sa= sa->next) { - SpaceLink *sl= sa->spacedata.first; - for (; sl; sl= sl->next) { - if (sl->spacetype==SPACE_VIEW3D) { - View3D *v3d= (View3D*) sl; + for (sc = bmain->screen.first; sc; sc = sc->id.next) { + for (sa = sc->areabase.first; sa; sa = sa->next) { + SpaceLink *sl = sa->spacedata.first; + for (; sl; sl = sl->next) { + if (sl->spacetype == SPACE_VIEW3D) { + View3D *v3d = (View3D *) sl; lay |= v3d->lay; } } } } - if ( (lay & 0x01000000)==0) return 0x01000000; - if ( (lay & 0x02000000)==0) return 0x02000000; - if ( (lay & 0x04000000)==0) return 0x04000000; - if ( (lay & 0x08000000)==0) return 0x08000000; - if ( (lay & 0x10000000)==0) return 0x10000000; - if ( (lay & 0x20000000)==0) return 0x20000000; - if ( (lay & 0x40000000)==0) return 0x40000000; - if ( (lay & 0x80000000)==0) return 0x80000000; + if ((lay & 0x01000000) == 0) return 0x01000000; + if ((lay & 0x02000000) == 0) return 0x02000000; + if ((lay & 0x04000000) == 0) return 0x04000000; + if ((lay & 0x08000000) == 0) return 0x08000000; + if ((lay & 0x10000000) == 0) return 0x10000000; + if ((lay & 0x20000000) == 0) return 0x20000000; + if ((lay & 0x40000000) == 0) return 0x40000000; + if ((lay & 0x80000000) == 0) return 0x80000000; return 0; } int ED_view3d_scene_layer_set(int lay, const int *values, int *active) { - int i, tot= 0; + int i, tot = 0; /* ensure we always have some layer selected */ - for (i=0; i<20; i++) + for (i = 0; i < 20; i++) if (values[i]) tot++; - if (tot==0) + if (tot == 0) return lay; - for (i=0; i<20; i++) { + for (i = 0; i < 20; i++) { if (active) { /* if this value has just been switched on, make that layer active */ - if (values[i] && (lay & (1<spacedata.first; + View3D *v3d = sa->spacedata.first; Base *base; float size = 0.0, min[3], max[3], box[3]; unsigned int locallay; - int ok=0; + int ok = 0; if (v3d->localvd) return; INIT_MINMAX(min, max); - locallay= free_localbit(bmain); + locallay = free_localbit(bmain); - if (locallay==0) { - printf("Sorry, no more than 8 localviews\n"); // XXX error - ok= 0; + if (locallay == 0) { + printf("Sorry, no more than 8 localviews\n"); // XXX error + ok = 0; } else { if (scene->obedit) { minmax_object(scene->obedit, min, max); - ok= 1; + ok = 1; BASACT->lay |= locallay; - scene->obedit->lay= BASACT->lay; + scene->obedit->lay = BASACT->lay; } else { - for (base= FIRSTBASE; base; base= base->next) { + for (base = FIRSTBASE; base; base = base->next) { if (TESTBASE(v3d, base)) { minmax_object(base->object, min, max); base->lay |= locallay; - base->object->lay= base->lay; - ok= 1; + base->object->lay = base->lay; + ok = 1; } } } - box[0]= (max[0]-min[0]); - box[1]= (max[1]-min[1]); - box[2]= (max[2]-min[2]); - size= MAX3(box[0], box[1], box[2]); - if (size <= 0.01f) size= 0.01f; + box[0] = (max[0] - min[0]); + box[1] = (max[1] - min[1]); + box[2] = (max[2] - min[2]); + size = MAX3(box[0], box[1], box[2]); + if (size <= 0.01f) size = 0.01f; } if (ok) { ARegion *ar; - v3d->localvd= MEM_mallocN(sizeof(View3D), "localview"); + v3d->localvd = MEM_mallocN(sizeof(View3D), "localview"); memcpy(v3d->localvd, v3d, sizeof(View3D)); - for (ar= sa->regionbase.first; ar; ar= ar->next) { + for (ar = sa->regionbase.first; ar; ar = ar->next) { if (ar->regiontype == RGN_TYPE_WINDOW) { - RegionView3D *rv3d= ar->regiondata; + RegionView3D *rv3d = ar->regiondata; - rv3d->localvd= MEM_mallocN(sizeof(RegionView3D), "localview region"); + rv3d->localvd = MEM_mallocN(sizeof(RegionView3D), "localview region"); memcpy(rv3d->localvd, rv3d, sizeof(RegionView3D)); - rv3d->ofs[0]= -(min[0]+max[0])/2.0f; - rv3d->ofs[1]= -(min[1]+max[1])/2.0f; - rv3d->ofs[2]= -(min[2]+max[2])/2.0f; + rv3d->ofs[0] = -(min[0] + max[0]) / 2.0f; + rv3d->ofs[1] = -(min[1] + max[1]) / 2.0f; + rv3d->ofs[2] = -(min[2] + max[2]) / 2.0f; - rv3d->dist= size; + rv3d->dist = size; /* perspective should be a bit farther away to look nice */ - if (rv3d->persp==RV3D_ORTHO) - rv3d->dist*= 0.7f; + if (rv3d->persp == RV3D_ORTHO) + rv3d->dist *= 0.7f; // correction for window aspect ratio - if (ar->winy>2 && ar->winx>2) { - float asp= (float)ar->winx/(float)ar->winy; - if (asp < 1.0f) asp= 1.0f/asp; - rv3d->dist*= asp; + if (ar->winy > 2 && ar->winx > 2) { + float asp = (float)ar->winx / (float)ar->winy; + if (asp < 1.0f) asp = 1.0f / asp; + rv3d->dist *= asp; } - if (rv3d->persp==RV3D_CAMOB) rv3d->persp= RV3D_PERSP; + if (rv3d->persp == RV3D_CAMOB) rv3d->persp = RV3D_PERSP; - v3d->cursor[0]= -rv3d->ofs[0]; - v3d->cursor[1]= -rv3d->ofs[1]; - v3d->cursor[2]= -rv3d->ofs[2]; + v3d->cursor[0] = -rv3d->ofs[0]; + v3d->cursor[1] = -rv3d->ofs[1]; + v3d->cursor[2] = -rv3d->ofs[2]; } } - v3d->lay= locallay; + v3d->lay = locallay; } else { /* clear flags */ - for (base= FIRSTBASE; base; base= base->next) { - if ( base->lay & locallay ) { - base->lay-= locallay; - if (base->lay==0) base->lay= v3d->layact; + for (base = FIRSTBASE; base; base = base->next) { + if (base->lay & locallay) { + base->lay -= locallay; + if (base->lay == 0) base->lay = v3d->layact; if (base->object != scene->obedit) base->flag |= SELECT; - base->object->lay= base->lay; + base->object->lay = base->lay; } } } @@ -1494,37 +1494,37 @@ static void initlocalview(Main *bmain, Scene *scene, ScrArea *sa) static void restore_localviewdata(ScrArea *sa, int free) { ARegion *ar; - View3D *v3d= sa->spacedata.first; + View3D *v3d = sa->spacedata.first; - if (v3d->localvd==NULL) return; + if (v3d->localvd == NULL) return; - v3d->near= v3d->localvd->near; - v3d->far= v3d->localvd->far; - v3d->lay= v3d->localvd->lay; - v3d->layact= v3d->localvd->layact; - v3d->drawtype= v3d->localvd->drawtype; - v3d->camera= v3d->localvd->camera; + v3d->near = v3d->localvd->near; + v3d->far = v3d->localvd->far; + v3d->lay = v3d->localvd->lay; + v3d->layact = v3d->localvd->layact; + v3d->drawtype = v3d->localvd->drawtype; + v3d->camera = v3d->localvd->camera; if (free) { MEM_freeN(v3d->localvd); - v3d->localvd= NULL; + v3d->localvd = NULL; } - for (ar= sa->regionbase.first; ar; ar= ar->next) { + for (ar = sa->regionbase.first; ar; ar = ar->next) { if (ar->regiontype == RGN_TYPE_WINDOW) { - RegionView3D *rv3d= ar->regiondata; + RegionView3D *rv3d = ar->regiondata; if (rv3d->localvd) { - rv3d->dist= rv3d->localvd->dist; + rv3d->dist = rv3d->localvd->dist; copy_v3_v3(rv3d->ofs, rv3d->localvd->ofs); copy_qt_qt(rv3d->viewquat, rv3d->localvd->viewquat); - rv3d->view= rv3d->localvd->view; - rv3d->persp= rv3d->localvd->persp; - rv3d->camzoom= rv3d->localvd->camzoom; + rv3d->view = rv3d->localvd->view; + rv3d->persp = rv3d->localvd->persp; + rv3d->camzoom = rv3d->localvd->camzoom; if (free) { MEM_freeN(rv3d->localvd); - rv3d->localvd= NULL; + rv3d->localvd = NULL; } } } @@ -1533,28 +1533,28 @@ static void restore_localviewdata(ScrArea *sa, int free) static void endlocalview(Main *bmain, Scene *scene, ScrArea *sa) { - View3D *v3d= sa->spacedata.first; + View3D *v3d = sa->spacedata.first; struct Base *base; unsigned int locallay; if (v3d->localvd) { - locallay= v3d->lay & 0xFF000000; + locallay = v3d->lay & 0xFF000000; restore_localviewdata(sa, 1); // 1 = free /* for when in other window the layers have changed */ - if (v3d->scenelock) v3d->lay= scene->lay; + if (v3d->scenelock) v3d->lay = scene->lay; - for (base= FIRSTBASE; base; base= base->next) { - if ( base->lay & locallay ) { - base->lay-= locallay; - if (base->lay==0) base->lay= v3d->layact; + for (base = FIRSTBASE; base; base = base->next) { + if (base->lay & locallay) { + base->lay -= locallay; + if (base->lay == 0) base->lay = v3d->layact; if (base->object != scene->obedit) { base->flag |= SELECT; base->object->flag |= SELECT; } - base->object->lay= base->lay; + base->object->lay = base->lay; } } @@ -1564,7 +1564,7 @@ static void endlocalview(Main *bmain, Scene *scene, ScrArea *sa) static int localview_exec(bContext *C, wmOperator *UNUSED(unused)) { - View3D *v3d= CTX_wm_view3d(C); + View3D *v3d = CTX_wm_view3d(C); if (v3d->localvd) endlocalview(CTX_data_main(C), CTX_data_scene(C), CTX_wm_area(C)); @@ -1603,9 +1603,9 @@ static void SaveState(bContext *C, wmWindow *win) if (obact && obact->mode & OB_MODE_TEXTURE_PAINT) GPU_paint_set_mipmap(1); - queue_back= win->queue; + queue_back = win->queue; - win->queue.first= win->queue.last= NULL; + win->queue.first = win->queue.last = NULL; //XXX waitcursor(1); } @@ -1626,7 +1626,7 @@ static void RestoreState(bContext *C, wmWindow *win) //XXX G.qual= 0; if (win) /* check because closing win can set to NULL */ - win->queue= queue_back; + win->queue = queue_back; GPU_state_init(); GPU_set_tpage(NULL, 0, 0); @@ -1642,37 +1642,37 @@ static void game_set_commmandline_options(GameData *gm) if ( (syshandle = SYS_GetSystem()) ) { /* User defined settings */ - test= (U.gameflags & USER_DISABLE_MIPMAP); + test = (U.gameflags & USER_DISABLE_MIPMAP); GPU_set_mipmap(!test); SYS_WriteCommandLineInt(syshandle, "nomipmap", test); /* File specific settings: */ /* Only test the first one. These two are switched * simultaneously. */ - test= (gm->flag & GAME_SHOW_FRAMERATE); + test = (gm->flag & GAME_SHOW_FRAMERATE); SYS_WriteCommandLineInt(syshandle, "show_framerate", test); SYS_WriteCommandLineInt(syshandle, "show_profile", test); test = (gm->flag & GAME_SHOW_DEBUG_PROPS); SYS_WriteCommandLineInt(syshandle, "show_properties", test); - test= (gm->flag & GAME_SHOW_PHYSICS); + test = (gm->flag & GAME_SHOW_PHYSICS); SYS_WriteCommandLineInt(syshandle, "show_physics", test); - test= (gm->flag & GAME_ENABLE_ALL_FRAMES); + test = (gm->flag & GAME_ENABLE_ALL_FRAMES); SYS_WriteCommandLineInt(syshandle, "fixedtime", test); - test= (gm->flag & GAME_ENABLE_ANIMATION_RECORD); + test = (gm->flag & GAME_ENABLE_ANIMATION_RECORD); SYS_WriteCommandLineInt(syshandle, "animation_record", test); - test= (gm->flag & GAME_IGNORE_DEPRECATION_WARNINGS); + test = (gm->flag & GAME_IGNORE_DEPRECATION_WARNINGS); SYS_WriteCommandLineInt(syshandle, "ignore_deprecation_warnings", test); - test= (gm->matmode == GAME_MAT_MULTITEX); + test = (gm->matmode == GAME_MAT_MULTITEX); SYS_WriteCommandLineInt(syshandle, "blender_material", test); - test= (gm->matmode == GAME_MAT_GLSL); + test = (gm->matmode == GAME_MAT_GLSL); SYS_WriteCommandLineInt(syshandle, "blender_glsl_material", test); - test= (gm->flag & GAME_DISPLAY_LISTS); + test = (gm->flag & GAME_DISPLAY_LISTS); SYS_WriteCommandLineInt(syshandle, "displaylists", test); @@ -1688,11 +1688,11 @@ static int game_engine_poll(bContext *C) * if we try to auto run the BGE. Ideally we want the * context to be set as soon as we load the file. */ - if (CTX_wm_window(C)==NULL) return 0; - if (CTX_wm_screen(C)==NULL) return 0; - if (CTX_wm_area(C)==NULL) return 0; + if (CTX_wm_window(C) == NULL) return 0; + if (CTX_wm_screen(C) == NULL) return 0; + if (CTX_wm_area(C) == NULL) return 0; - if (CTX_data_mode_enum(C)!=CTX_MODE_OBJECT) + if (CTX_data_mode_enum(C) != CTX_MODE_OBJECT) return 0; return 1; @@ -1700,20 +1700,20 @@ static int game_engine_poll(bContext *C) int ED_view3d_context_activate(bContext *C) { - bScreen *sc= CTX_wm_screen(C); - ScrArea *sa= CTX_wm_area(C); + bScreen *sc = CTX_wm_screen(C); + ScrArea *sa = CTX_wm_area(C); ARegion *ar; /* sa can be NULL when called from python */ - if (sa==NULL || sa->spacetype != SPACE_VIEW3D) - for (sa=sc->areabase.first; sa; sa= sa->next) - if (sa->spacetype==SPACE_VIEW3D) + if (sa == NULL || sa->spacetype != SPACE_VIEW3D) + for (sa = sc->areabase.first; sa; sa = sa->next) + if (sa->spacetype == SPACE_VIEW3D) break; if (!sa) return 0; - for (ar=sa->regionbase.first; ar; ar=ar->next) + for (ar = sa->regionbase.first; ar; ar = ar->next) if (ar->regiontype == RGN_TYPE_WINDOW) break; @@ -1731,9 +1731,9 @@ static int game_engine_exec(bContext *C, wmOperator *op) { #ifdef WITH_GAMEENGINE Scene *startscene = CTX_data_scene(C); - ScrArea /* *sa, */ /* UNUSED */ *prevsa= CTX_wm_area(C); - ARegion *ar, *prevar= CTX_wm_region(C); - wmWindow *prevwin= CTX_wm_window(C); + ScrArea /* *sa, */ /* UNUSED */ *prevsa = CTX_wm_area(C); + ARegion *ar, *prevar = CTX_wm_region(C); + wmWindow *prevwin = CTX_wm_window(C); RegionView3D *rv3d; rcti cam_frame; @@ -1744,20 +1744,20 @@ static int game_engine_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; /* redraw to hide any menus/popups, we don't go back to - * the window manager until after this operator exits */ + * the window manager until after this operator exits */ WM_redraw_windows(C); - rv3d= CTX_wm_region_view3d(C); + rv3d = CTX_wm_region_view3d(C); /* sa= CTX_wm_area(C); */ /* UNUSED */ - ar= CTX_wm_region(C); + ar = CTX_wm_region(C); view3d_operator_needs_opengl(C); game_set_commmandline_options(&startscene->gm); if ((rv3d->persp == RV3D_CAMOB) && - (startscene->gm.framing.type == SCE_GAMEFRAMING_BARS) && - (startscene->gm.stereoflag != STEREO_DOME)) + (startscene->gm.framing.type == SCE_GAMEFRAMING_BARS) && + (startscene->gm.stereoflag != STEREO_DOME)) { /* Letterbox */ rctf cam_framef; @@ -1782,7 +1782,7 @@ static int game_engine_exec(bContext *C, wmOperator *op) /* window wasnt closed while the BGE was running */ if (BLI_findindex(&CTX_wm_manager(C)->windows, prevwin) == -1) { - prevwin= NULL; + prevwin = NULL; CTX_wm_window_set(C, NULL); } @@ -1831,42 +1831,42 @@ void view3d_align_axis_to_vector(View3D *v3d, RegionView3D *rv3d, int axisidx, f float alignaxis[3] = {0.0, 0.0, 0.0}; float norm[3], axis[3], angle, new_quat[4]; - if (axisidx > 0) alignaxis[axisidx-1]= 1.0; - else alignaxis[-axisidx-1]= -1.0; + if (axisidx > 0) alignaxis[axisidx - 1] = 1.0; + else alignaxis[-axisidx - 1] = -1.0; normalize_v3_v3(norm, vec); - angle= (float)acos(dot_v3v3(alignaxis, norm)); + angle = (float)acos(dot_v3v3(alignaxis, norm)); cross_v3_v3v3(axis, alignaxis, norm); - axis_angle_to_quat( new_quat,axis, -angle); + axis_angle_to_quat(new_quat, axis, -angle); - rv3d->view= RV3D_VIEW_USER; + rv3d->view = RV3D_VIEW_USER; - if (rv3d->persp==RV3D_CAMOB && v3d->camera) { + if (rv3d->persp == RV3D_CAMOB && v3d->camera) { /* switch out of camera view */ float orig_ofs[3]; - float orig_dist= rv3d->dist; - float orig_lens= v3d->lens; + float orig_dist = rv3d->dist; + float orig_lens = v3d->lens; copy_v3_v3(orig_ofs, rv3d->ofs); - rv3d->persp= RV3D_PERSP; - rv3d->dist= 0.0; + rv3d->persp = RV3D_PERSP; + rv3d->dist = 0.0; ED_view3d_from_object(v3d->camera, rv3d->ofs, NULL, NULL, &v3d->lens); smooth_view(NULL, NULL, NULL, NULL, NULL, orig_ofs, new_quat, &orig_dist, &orig_lens); // XXX } else { - if (rv3d->persp==RV3D_CAMOB) rv3d->persp= RV3D_PERSP; /* switch out of camera mode */ + if (rv3d->persp == RV3D_CAMOB) rv3d->persp = RV3D_PERSP; /* switch out of camera mode */ smooth_view(NULL, NULL, NULL, NULL, NULL, NULL, new_quat, NULL, NULL); // XXX } } float ED_view3d_pixel_size(struct RegionView3D *rv3d, const float co[3]) { - return (rv3d->persmat[3][3] + ( - rv3d->persmat[0][3]*co[0] + - rv3d->persmat[1][3]*co[1] + - rv3d->persmat[2][3]*co[2]) - ) * rv3d->pixsize; + return (rv3d->persmat[3][3] + ( + rv3d->persmat[0][3] * co[0] + + rv3d->persmat[1][3] * co[1] + + rv3d->persmat[2][3] * co[2]) + ) * rv3d->pixsize; } /* view matrix properties utilities */ @@ -1887,8 +1887,8 @@ void ED_view3d_operator_properties_viewmat(wmOperatorType *ot) void ED_view3d_operator_properties_viewmat_set(bContext *C, wmOperator *op) { - ARegion *ar= CTX_wm_region(C); - RegionView3D *rv3d= ED_view3d_context_rv3d(C); + ARegion *ar = CTX_wm_region(C); + RegionView3D *rv3d = ED_view3d_context_rv3d(C); if (!RNA_struct_property_is_set(op->ptr, "region_width")) RNA_int_set(op->ptr, "region_width", ar->winx); -- cgit v1.2.3 From 94b8b8913e0283850cd2f05361a8980ecbe4870c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 26 Mar 2012 00:42:21 +0000 Subject: rename lattice influence to strength from r45144 (other deform modifiers call it strength too) --- source/blender/blenkernel/intern/lattice.c | 6 +++--- source/blender/blenlib/intern/math_vector.c | 2 +- source/blender/blenloader/intern/readfile.c | 2 +- source/blender/editors/gpencil/gpencil_paint.c | 3 +-- source/blender/editors/mesh/editmesh_tools.c | 1 - source/blender/makesdna/DNA_modifier_types.h | 2 +- source/blender/makesrna/intern/rna_modifier.c | 4 ++-- source/blender/modifiers/intern/MOD_lattice.c | 4 ++-- 8 files changed, 11 insertions(+), 13 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c index a02f2cc1c5d..f182d7bcb7c 100644 --- a/source/blender/blenkernel/intern/lattice.c +++ b/source/blender/blenkernel/intern/lattice.c @@ -785,7 +785,7 @@ void curve_deform_vector(Scene *scene, Object *cuOb, Object *target, } void lattice_deform_verts(Object *laOb, Object *target, DerivedMesh *dm, - float (*vertexCos)[3], int numVerts, const char *vgroup, float influence) + float (*vertexCos)[3], int numVerts, const char *vgroup, float fac) { int a; int use_vgroups; @@ -824,13 +824,13 @@ void lattice_deform_verts(Object *laOb, Object *target, DerivedMesh *dm, weight= defvert_find_weight(dvert, index); if (weight > 0.0f) - calc_latt_deform(laOb, vertexCos[a], weight*influence); + calc_latt_deform(laOb, vertexCos[a], weight * fac); } } } else { for (a = 0; a < numVerts; a++) { - calc_latt_deform(laOb, vertexCos[a], influence); + calc_latt_deform(laOb, vertexCos[a], fac); } } end_latt_deform(laOb); diff --git a/source/blender/blenlib/intern/math_vector.c b/source/blender/blenlib/intern/math_vector.c index e7c96ce3dc3..65600a31042 100644 --- a/source/blender/blenlib/intern/math_vector.c +++ b/source/blender/blenlib/intern/math_vector.c @@ -293,7 +293,7 @@ void project_v3_plane(float v[3], const float n[3], const float p[3]) float mul; sub_v3_v3v3(vector, v, p); - mul = dot_v3v3(vector, n)/len_squared_v3(n); + mul = dot_v3v3(vector, n) / len_squared_v3(n); mul_v3_v3fl(vector, n, mul); diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 30ae9b6af52..502ffbd15b8 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -13339,7 +13339,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main) for(md=ob->modifiers.first; md; md=md->next) { if(md->type == eModifierType_Lattice) { LatticeModifierData *lmd = (LatticeModifierData *)md; - lmd->influence = 1.0f; + lmd->strength = 1.0f; } } } diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index 3cd764d2eb3..20111fc66b2 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -1611,8 +1611,7 @@ static int gpencil_draw_exec (bContext *C, wmOperator *op) /* loop over the stroke RNA elements recorded (i.e. progress of mouse movement), * setting the relevant values in context at each step, then applying */ - RNA_BEGIN(op->ptr, itemptr, "stroke") - { + RNA_BEGIN(op->ptr, itemptr, "stroke") { float mousef[2]; //printf("\t\tGP - stroke elem \n"); diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index d26d6f2cbfe..6046a468aed 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -2970,7 +2970,6 @@ static int edbm_knife_cut_exec(bContext *C, wmOperator *op) /* get the cut curve */ RNA_BEGIN(op->ptr, itemptr, "path") { - RNA_float_get_array(&itemptr, "loc", (float *)&curve[len]); len++; if (len >= MAX_CUTS) { diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index bb2d320aa04..6c1d9892ba2 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -135,7 +135,7 @@ typedef struct LatticeModifierData { struct Object *object; char name[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */ - float influence; + float strength; char pad[4]; } LatticeModifierData; diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index dae9c0ca044..1782d075c16 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -961,10 +961,10 @@ static void rna_def_modifier_lattice(BlenderRNA *brna) RNA_def_property_string_funcs(prop, NULL, NULL, "rna_LatticeModifier_vgroup_set"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); - prop = RNA_def_property(srna, "influence", PROP_FLOAT, PROP_NONE); + prop = RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); RNA_def_property_ui_range(prop, 0, 1, 10, 2); - RNA_def_property_ui_text(prop, "Influence", "Strength of modifier effect"); + RNA_def_property_ui_text(prop, "Strength", "Strength of modifier effect"); RNA_def_property_update(prop, 0, "rna_Modifier_update"); } diff --git a/source/blender/modifiers/intern/MOD_lattice.c b/source/blender/modifiers/intern/MOD_lattice.c index 5732fee7826..ca700d4d8f2 100644 --- a/source/blender/modifiers/intern/MOD_lattice.c +++ b/source/blender/modifiers/intern/MOD_lattice.c @@ -51,7 +51,7 @@ static void initData(ModifierData *md) { LatticeModifierData *lmd = (LatticeModifierData*) md; - lmd->influence = 1.0f; + lmd->strength = 1.0f; } static void copyData(ModifierData *md, ModifierData *target) @@ -119,7 +119,7 @@ static void deformVerts(ModifierData *md, Object *ob, modifier_vgroup_cache(md, vertexCos); /* if next modifier needs original vertices */ lattice_deform_verts(lmd->object, ob, derivedData, - vertexCos, numVerts, lmd->name, lmd->influence); + vertexCos, numVerts, lmd->name, lmd->strength); } static void deformVertsEM( -- cgit v1.2.3 From 44010fb6590cc540b1e87e4753603fc34b378ff8 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 26 Mar 2012 02:39:05 +0000 Subject: fix [#30657] New UV layers created with Mesh.uv_textures.new reset previous ones. adding UV's from python was resetting the active UV layer but not setting the new layer to active, resetting existing UV's. --- source/blender/editors/include/ED_mesh.h | 1 + source/blender/editors/mesh/mesh_data.c | 20 ++++++++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index 5bb30ab6d40..35bf9d77b23 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -287,6 +287,7 @@ void ED_mesh_update(struct Mesh *mesh, struct bContext *C, int calc_edges, int c int ED_mesh_uv_texture_add(struct bContext *C, struct Mesh *me, const char *name, int active_set); int ED_mesh_uv_texture_remove(struct bContext *C, struct Object *ob, struct Mesh *me); int ED_mesh_uv_loop_reset(struct bContext *C, struct Mesh *me); +int ED_mesh_uv_loop_reset_ex(struct bContext *C, struct Mesh *me, const int layernum); int ED_mesh_color_add(struct bContext *C, struct Scene *scene, struct Object *ob, struct Mesh *me, const char *name, int active_set); int ED_mesh_color_remove(struct bContext *C, struct Object *ob, struct Mesh *me); int ED_mesh_color_remove_named(struct bContext *C, struct Object *ob, struct Mesh *me, const char *name); diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c index 770fd68079a..736f8b976f8 100644 --- a/source/blender/editors/mesh/mesh_data.c +++ b/source/blender/editors/mesh/mesh_data.c @@ -206,7 +206,7 @@ static void copy_editface_active_customdata(BMEditMesh *em, int type, int index) #endif } -int ED_mesh_uv_loop_reset(struct bContext *C, struct Mesh *me) +int ED_mesh_uv_loop_reset_ex(struct bContext *C, struct Mesh *me, const int layernum) { BMEditMesh *em= me->edit_btmesh; MLoopUV *luv; @@ -232,7 +232,7 @@ int ED_mesh_uv_loop_reset(struct bContext *C, struct Mesh *me) i = 0; BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) { - luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV); + luv = CustomData_bmesh_get_n(&em->bm->ldata, l->head.data, CD_MLOOPUV, layernum); BLI_array_append(uvs, luv->uv); i++; } @@ -244,14 +244,16 @@ int ED_mesh_uv_loop_reset(struct bContext *C, struct Mesh *me) /* Collect Mesh UVs */ MPoly *mp; + MLoopUV *mloouv; BLI_assert(CustomData_has_layer(&me->ldata, CD_MLOOPUV)); + mloouv = CustomData_get_layer_n(&me->ldata, CD_MLOOPUV, layernum); for (j = 0; j < me->totpoly; j++) { mp = &me->mpoly[j]; for (i = 0; i < mp->totloop; i++) { - luv = &me->mloopuv[mp->loopstart + i]; + luv = &mloouv[mp->loopstart + i]; BLI_array_append(uvs, luv->uv); } @@ -303,8 +305,6 @@ int ED_mesh_uv_loop_reset(struct bContext *C, struct Mesh *me) fuvs += len; } - /* BMESH_TODO: Copy poly UVs onto CD_MTFACE layer for tessellated faces */ - BLI_array_free(uvs); BLI_array_free(polylengths); @@ -314,6 +314,14 @@ int ED_mesh_uv_loop_reset(struct bContext *C, struct Mesh *me) return 1; } +int ED_mesh_uv_loop_reset(struct bContext *C, struct Mesh *me) +{ + /* could be ldata or pdata */ + CustomData *pdata = GET_CD_DATA(me, pdata); + const int layernum = CustomData_get_active_layer_index(pdata, CD_MTEXPOLY); + return ED_mesh_uv_loop_reset_ex(C, me, layernum); +} + int ED_mesh_uv_texture_add(bContext *C, Mesh *me, const char *name, int active_set) { BMEditMesh *em; @@ -372,7 +380,7 @@ int ED_mesh_uv_texture_add(bContext *C, Mesh *me, const char *name, int active_s mesh_update_customdata_pointers(me, TRUE); } - ED_mesh_uv_loop_reset(C, me); + ED_mesh_uv_loop_reset_ex(C, me, layernum); DAG_id_tag_update(&me->id, 0); WM_event_add_notifier(C, NC_GEOM|ND_DATA, me); -- cgit v1.2.3 From 48f0444760ea33c67d607b4f1e1dadd66e1eea76 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 26 Mar 2012 02:56:48 +0000 Subject: style cleanup: editors/mesh - mostly whitespace around operators --- source/blender/editors/mesh/editface.c | 302 +++++++------ source/blender/editors/mesh/editmesh_add.c | 26 +- source/blender/editors/mesh/editmesh_bvh.c | 4 +- source/blender/editors/mesh/editmesh_knife.c | 38 +- source/blender/editors/mesh/editmesh_loopcut.c | 30 +- source/blender/editors/mesh/editmesh_select.c | 232 +++++----- source/blender/editors/mesh/editmesh_tools.c | 397 +++++++++-------- source/blender/editors/mesh/editmesh_utils.c | 19 +- source/blender/editors/mesh/mesh_data.c | 224 +++++----- source/blender/editors/mesh/mesh_navmesh.c | 291 ++++++------- source/blender/editors/mesh/mesh_ops.c | 40 +- source/blender/editors/mesh/meshtools.c | 570 +++++++++++++------------ 12 files changed, 1091 insertions(+), 1082 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/mesh/editface.c b/source/blender/editors/mesh/editface.c index efa5ce0395c..3fad6f6a2cb 100644 --- a/source/blender/editors/mesh/editface.c +++ b/source/blender/editors/mesh/editface.c @@ -27,8 +27,6 @@ * \ingroup edmesh */ - - #include #include @@ -77,7 +75,7 @@ void paintface_flush_flags(Object *ob) int totface, totpoly; int i; - if (me==NULL || dm==NULL) + if (me == NULL || dm == NULL) return; /* @@ -92,7 +90,7 @@ void paintface_flush_flags(Object *ob) totface = me->totface; /* loop over tessfaces */ - for (i= 0; impoly + index_array[i]; faces[i].flag = mp_orig->flag; @@ -104,7 +102,7 @@ void paintface_flush_flags(Object *ob) totpoly = dm->getNumPolys(dm); /* loop over final derived polys */ - for (i= 0; impoly + index_array[i]; polys[i].flag = mp_orig->flag; @@ -117,7 +115,7 @@ void paintface_flush_flags(Object *ob) totface = dm->getNumTessFaces(dm); /* loop over tessfaces */ - for (i= 0; iflag; @@ -132,29 +130,29 @@ static int facesel_face_pick(struct bContext *C, Mesh *me, Object *ob, const int ViewContext vc; view3d_set_viewcontext(C, &vc); - if (!me || me->totpoly==0) + if (!me || me->totpoly == 0) return 0; makeDerivedMesh(scene, ob, NULL, CD_MASK_BAREMESH, 0); - // XXX if (v3d->flag & V3D_INVALID_BACKBUF) { + // XXX if (v3d->flag & V3D_INVALID_BACKBUF) { // XXX drawview.c! check_backbuf(); // XXX persp(PERSP_VIEW); -// XXX } +// XXX } if (rect) { /* sample rect to increase changes of selecting, so that when clicking * on an edge in the backbuf, we can still select a face */ int dist; - *index = view3d_sample_backbuf_rect(&vc, mval, 3, 1, me->totpoly+1, &dist,0,NULL, NULL); + *index = view3d_sample_backbuf_rect(&vc, mval, 3, 1, me->totpoly + 1, &dist, 0, NULL, NULL); } else { /* sample only on the exact position */ *index = view3d_sample_backbuf(&vc, mval[0], mval[1]); } - if ((*index)<=0 || (*index)>(unsigned int)me->totpoly) + if ((*index) <= 0 || (*index) > (unsigned int)me->totpoly) return 0; (*index)--; @@ -168,15 +166,15 @@ void paintface_hide(Object *ob, const int unselected) MPoly *mface; int a; - me= get_mesh(ob); - if (me==NULL || me->totpoly==0) return; + me = get_mesh(ob); + if (me == NULL || me->totpoly == 0) return; - mface= me->mpoly; - a= me->totpoly; + mface = me->mpoly; + a = me->totpoly; while (a--) { if ((mface->flag & ME_HIDE) == 0) { if (unselected) { - if ( (mface->flag & ME_FACE_SEL)==0) mface->flag |= ME_HIDE; + if ( (mface->flag & ME_FACE_SEL) == 0) mface->flag |= ME_HIDE; } else { if ( (mface->flag & ME_FACE_SEL)) mface->flag |= ME_HIDE; @@ -197,11 +195,11 @@ void paintface_reveal(Object *ob) MPoly *mface; int a; - me= get_mesh(ob); - if (me==NULL || me->totpoly==0) return; + me = get_mesh(ob); + if (me == NULL || me->totpoly == 0) return; - mface= me->mpoly; - a= me->totpoly; + mface = me->mpoly; + a = me->totpoly; while (a--) { if (mface->flag & ME_HIDE) { mface->flag |= ME_FACE_SEL; @@ -220,7 +218,7 @@ static void hash_add_face(EdgeHash *ehash, MPoly *mp, MLoop *mloop) MLoop *ml; int i; - for (i=0, ml=mloop; itotloop; i++, ml++) { + for (i = 0, ml = mloop; i < mp->totloop; i++, ml++) { BLI_edgehash_insert(ehash, ml->v, ME_POLY_LOOP_NEXT(mloop, mp, i)->v, NULL); } } @@ -233,59 +231,59 @@ static void select_linked_tfaces_with_seams(int mode, Mesh *me, unsigned int ind MLoop *ml; MEdge *med; char *linkflag; - int a, b, doit=1, mark=0; + int a, b, doit = 1, mark = 0; - ehash= BLI_edgehash_new(); + ehash = BLI_edgehash_new(); seamhash = BLI_edgehash_new(); - linkflag= MEM_callocN(sizeof(char)*me->totpoly, "linkflaguv"); + linkflag = MEM_callocN(sizeof(char) * me->totpoly, "linkflaguv"); - for (med=me->medge, a=0; a < me->totedge; a++, med++) + for (med = me->medge, a = 0; a < me->totedge; a++, med++) if (med->flag & ME_SEAM) BLI_edgehash_insert(seamhash, med->v1, med->v2, NULL); - if (mode==0 || mode==1) { + if (mode == 0 || mode == 1) { /* only put face under cursor in array */ - mf= ((MPoly*)me->mpoly) + index; + mf = ((MPoly *)me->mpoly) + index; hash_add_face(ehash, mf, me->mloop + mf->loopstart); - linkflag[index]= 1; + linkflag[index] = 1; } else { /* fill array by selection */ - mf= me->mpoly; - for (a=0; atotpoly; a++, mf++) { - if (mf->flag & ME_HIDE); + mf = me->mpoly; + for (a = 0; a < me->totpoly; a++, mf++) { + if (mf->flag & ME_HIDE) ; else if (mf->flag & ME_FACE_SEL) { hash_add_face(ehash, mf, me->mloop + mf->loopstart); - linkflag[a]= 1; + linkflag[a] = 1; } } } while (doit) { - doit= 0; + doit = 0; /* expand selection */ - mf= me->mpoly; - for (a=0; atotpoly; a++, mf++) { + mf = me->mpoly; + for (a = 0; a < me->totpoly; a++, mf++) { if (mf->flag & ME_HIDE) continue; if (!linkflag[a]) { MLoop *mnextl; - mark= 0; + mark = 0; ml = me->mloop + mf->loopstart; - for (b=0; btotloop; b++, ml++) { - mnextl = b < mf->totloop-1 ? ml - 1 : me->mloop + mf->loopstart; + for (b = 0; b < mf->totloop; b++, ml++) { + mnextl = b < mf->totloop - 1 ? ml - 1 : me->mloop + mf->loopstart; if (!BLI_edgehash_haskey(seamhash, ml->v, mnextl->v)) if (!BLI_edgehash_haskey(ehash, ml->v, mnextl->v)) mark = 1; } if (mark) { - linkflag[a]= 1; + linkflag[a] = 1; hash_add_face(ehash, mf, me->mloop + mf->loopstart); - doit= 1; + doit = 1; } } } @@ -295,25 +293,25 @@ static void select_linked_tfaces_with_seams(int mode, Mesh *me, unsigned int ind BLI_edgehash_free(ehash, NULL); BLI_edgehash_free(seamhash, NULL); - if (mode==0 || mode==2) { - for (a=0, mf=me->mpoly; atotpoly; a++, mf++) + if (mode == 0 || mode == 2) { + for (a = 0, mf = me->mpoly; a < me->totpoly; a++, mf++) if (linkflag[a]) mf->flag |= ME_FACE_SEL; else mf->flag &= ~ME_FACE_SEL; } - else if (mode==1) { - for (a=0, mf=me->mpoly; atotpoly; a++, mf++) + else if (mode == 1) { + for (a = 0, mf = me->mpoly; a < me->totpoly; a++, mf++) if (linkflag[a] && (mf->flag & ME_FACE_SEL)) break; - if (atotpoly) { - for (a=0, mf=me->mpoly; atotpoly; a++, mf++) + if (a < me->totpoly) { + for (a = 0, mf = me->mpoly; a < me->totpoly; a++, mf++) if (linkflag[a]) mf->flag &= ~ME_FACE_SEL; } else { - for (a=0, mf=me->mpoly; atotpoly; a++, mf++) + for (a = 0, mf = me->mpoly; a < me->totpoly; a++, mf++) if (linkflag[a]) mf->flag |= ME_FACE_SEL; } @@ -325,12 +323,12 @@ static void select_linked_tfaces_with_seams(int mode, Mesh *me, unsigned int ind void paintface_select_linked(bContext *UNUSED(C), Object *ob, int UNUSED(mval[2]), int mode) { Mesh *me; - unsigned int index=0; + unsigned int index = 0; me = get_mesh(ob); - if (me==NULL || me->totpoly==0) return; + if (me == NULL || me->totpoly == 0) return; - if (mode==0 || mode==1) { + if (mode == 0 || mode == 1) { // XXX - Causes glitches, not sure why #if 0 if (!facesel_face_pick(C, me, mval, &index, 1)) @@ -349,12 +347,12 @@ void paintface_deselect_all_visible(Object *ob, int action, short flush_flags) MPoly *mface; int a; - me= get_mesh(ob); - if (me==NULL) return; + me = get_mesh(ob); + if (me == NULL) return; if (action == SEL_INVERT) { - mface= me->mpoly; - a= me->totpoly; + mface = me->mpoly; + a = me->totpoly; while (a--) { if ((mface->flag & ME_HIDE) == 0) { mface->flag ^= ME_FACE_SEL; @@ -366,8 +364,8 @@ void paintface_deselect_all_visible(Object *ob, int action, short flush_flags) if (action == SEL_TOGGLE) { action = SEL_SELECT; - mface= me->mpoly; - a= me->totpoly; + mface = me->mpoly; + a = me->totpoly; while (a--) { if ((mface->flag & ME_HIDE) == 0 && mface->flag & ME_FACE_SEL) { action = SEL_DESELECT; @@ -377,20 +375,20 @@ void paintface_deselect_all_visible(Object *ob, int action, short flush_flags) } } - mface= me->mpoly; - a= me->totpoly; + mface = me->mpoly; + a = me->totpoly; while (a--) { if ((mface->flag & ME_HIDE) == 0) { switch (action) { - case SEL_SELECT: - mface->flag |= ME_FACE_SEL; - break; - case SEL_DESELECT: - mface->flag &= ~ME_FACE_SEL; - break; - case SEL_INVERT: - mface->flag ^= ME_FACE_SEL; - break; + case SEL_SELECT: + mface->flag |= ME_FACE_SEL; + break; + case SEL_DESELECT: + mface->flag &= ~ME_FACE_SEL; + break; + case SEL_INVERT: + mface->flag ^= ME_FACE_SEL; + break; } } mface++; @@ -409,30 +407,30 @@ int paintface_minmax(Object *ob, float *min, float *max) MTexPoly *tf; MLoop *ml; MVert *mvert; - int a, b, ok=0; + int a, b, ok = 0; float vec[3], bmat[3][3]; - me= get_mesh(ob); + me = get_mesh(ob); if (!me || !me->mtpoly) return ok; copy_m3_m4(bmat, ob->obmat); - mvert= me->mvert; - mf= me->mpoly; - tf= me->mtpoly; - for (a=me->totpoly; a>0; a--, mf++, tf++) { + mvert = me->mvert; + mf = me->mpoly; + tf = me->mtpoly; + for (a = me->totpoly; a > 0; a--, mf++, tf++) { if (mf->flag & ME_HIDE || !(mf->flag & ME_FACE_SEL)) continue; ml = me->mloop + mf->totloop; - for (b=0; btotloop; b++, ml++) { + for (b = 0; b < mf->totloop; b++, ml++) { copy_v3_v3(vec, (mvert[ml->v].co)); mul_m3_v3(bmat, vec); add_v3_v3v3(vec, vec, ob->obmat[3]); DO_MINMAX(vec, min, max); } - ok= 1; + ok = 1; } return ok; @@ -445,9 +443,9 @@ static void seam_edgehash_insert_face(EdgeHash *ehash, MPoly *mf, MLoop *loopsta MLoop *ml1, *ml2; int a; - for (a=0; atotloop; a++) { + for (a = 0; a < mf->totloop; a++) { ml1 = loopstart + a; - ml2 = loopstart + (a+1) % mf->totloop; + ml2 = loopstart + (a + 1) % mf->totloop; BLI_edgehash_insert(ehash, ml1->v, ml2->v, NULL); } @@ -461,8 +459,8 @@ void seam_mark_clear_tface(Scene *scene, short mode) MEdge *med; int a, b; - me= get_mesh(OBACT); - if (me==0 || me->totpoly==0) return; + me = get_mesh(OBACT); + if (me == 0 || me->totpoly == 0) return; if (mode == 0) mode = pupmenu("Seams%t|Mark Border Seam %x1|Clear Seam %x2"); @@ -473,11 +471,11 @@ void seam_mark_clear_tface(Scene *scene, short mode) if (mode == 2) { EdgeHash *ehash = BLI_edgehash_new(); - for (a=0, mf=me->mpoly; atotpoly; a++, mf++) + for (a = 0, mf = me->mpoly; a < me->totpoly; a++, mf++) if (!(mf->flag & ME_HIDE) && (mf->flag & ME_FACE_SEL)) seam_edgehash_insert_face(ehash, mf, me->mloop + mf->loopstart); - for (a=0, med=me->medge; atotedge; a++, med++) + for (a = 0, med = me->medge; a < me->totedge; a++, med++) if (BLI_edgehash_haskey(ehash, med->v1, med->v2)) med->flag &= ~ME_SEAM; @@ -488,16 +486,16 @@ void seam_mark_clear_tface(Scene *scene, short mode) EdgeHash *ehash1 = BLI_edgehash_new(); EdgeHash *ehash2 = BLI_edgehash_new(); - for (a=0, mf=me->mpoly; atotpoly; a++, mf++) { + for (a = 0, mf = me->mpoly; a < me->totpoly; a++, mf++) { if ((mf->flag & ME_HIDE) || !(mf->flag & ME_FACE_SEL)) seam_edgehash_insert_face(ehash1, mf, me->mloop + mf->loopstart); else seam_edgehash_insert_face(ehash2, mf, me->mloop + mf->loopstart); } - for (a=0, med=me->medge; atotedge; a++, med++) + for (a = 0, med = me->medge; a < me->totedge; a++, med++) if (BLI_edgehash_haskey(ehash1, med->v1, med->v2) && - BLI_edgehash_haskey(ehash2, med->v1, med->v2)) + BLI_edgehash_haskey(ehash2, med->v1, med->v2)) med->flag |= ME_SEAM; BLI_edgehash_free(ehash1, NULL); @@ -526,7 +524,7 @@ int paintface_mouse_select(struct bContext *C, Object *ob, const int mval[2], in if (index >= me->totpoly || index < 0) return 0; - msel= me->mpoly + index; + msel = me->mpoly + index; if (msel->flag & ME_HIDE) return 0; /* clear flags */ @@ -552,7 +550,7 @@ int paintface_mouse_select(struct bContext *C, Object *ob, const int mval[2], in /* image window redraw */ paintface_flush_flags(ob); - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, ob->data); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, ob->data); ED_region_tag_redraw(CTX_wm_region(C)); // XXX - should redraw all 3D views return 1; } @@ -566,21 +564,21 @@ int do_paintface_box_select(ViewContext *vc, rcti *rect, int select, int extend) unsigned int *rt; char *selar; int a, index; - int sx= rect->xmax-rect->xmin+1; - int sy= rect->ymax-rect->ymin+1; + int sx = rect->xmax - rect->xmin + 1; + int sy = rect->ymax - rect->ymin + 1; - me= get_mesh(ob); + me = get_mesh(ob); - if (me==NULL || me->totpoly==0 || sx*sy <= 0) + if (me == NULL || me->totpoly == 0 || sx * sy <= 0) return OPERATOR_CANCELLED; - selar= MEM_callocN(me->totpoly+1, "selar"); + selar = MEM_callocN(me->totpoly + 1, "selar"); if (extend == 0 && select) { paintface_deselect_all_visible(vc->obact, SEL_DESELECT, FALSE); - mface= me->mpoly; - for (a=1; a<=me->totpoly; a++, mface++) { + mface = me->mpoly; + for (a = 1; a <= me->totpoly; a++, mface++) { if ((mface->flag & ME_HIDE) == 0) mface->flag &= ~ME_FACE_SEL; } @@ -588,24 +586,24 @@ int do_paintface_box_select(ViewContext *vc, rcti *rect, int select, int extend) view3d_validate_backbuf(vc); - ibuf = IMB_allocImBuf(sx,sy,32,IB_rect); + ibuf = IMB_allocImBuf(sx, sy, 32, IB_rect); rt = ibuf->rect; - glReadPixels(rect->xmin+vc->ar->winrct.xmin, rect->ymin+vc->ar->winrct.ymin, sx, sy, GL_RGBA, GL_UNSIGNED_BYTE, ibuf->rect); - if (ENDIAN_ORDER==B_ENDIAN) IMB_convert_rgba_to_abgr(ibuf); + glReadPixels(rect->xmin + vc->ar->winrct.xmin, rect->ymin + vc->ar->winrct.ymin, sx, sy, GL_RGBA, GL_UNSIGNED_BYTE, ibuf->rect); + if (ENDIAN_ORDER == B_ENDIAN) IMB_convert_rgba_to_abgr(ibuf); - a= sx*sy; + a = sx * sy; while (a--) { if (*rt) { - index= WM_framebuffer_to_index(*rt); - if (index<=me->totpoly) selar[index]= 1; + index = WM_framebuffer_to_index(*rt); + if (index <= me->totpoly) selar[index] = 1; } rt++; } - mface= me->mpoly; - for (a=1; a<=me->totpoly; a++, mface++) { + mface = me->mpoly; + for (a = 1; a <= me->totpoly; a++, mface++) { if (selar[a]) { - if (mface->flag & ME_HIDE); + if (mface->flag & ME_HIDE) ; else { if (select) mface->flag |= ME_FACE_SEL; else mface->flag &= ~ME_FACE_SEL; @@ -631,14 +629,14 @@ int do_paintface_box_select(ViewContext *vc, rcti *rect, int select, int extend) * use in object mode when selecting vertices (while painting) */ void paintvert_flush_flags(Object *ob) { - Mesh *me= get_mesh(ob); - DerivedMesh *dm= ob->derivedFinal; + Mesh *me = get_mesh(ob); + DerivedMesh *dm = ob->derivedFinal; MVert *dm_mvert, *dm_mv; int *index_array = NULL; int totvert; int i; - if (me==NULL || dm==NULL) + if (me == NULL || dm == NULL) return; index_array = dm->getVertDataArray(dm, CD_ORIGINDEX); @@ -646,20 +644,20 @@ void paintvert_flush_flags(Object *ob) dm_mvert = dm->getVertArray(dm); totvert = dm->getNumVerts(dm); - dm_mv= dm_mvert; + dm_mv = dm_mvert; if (index_array) { int orig_index; - for (i= 0; iflag= me->mvert[index_array[i]].flag; + dm_mv->flag = me->mvert[index_array[i]].flag; } } } else { - for (i= 0; iflag= me->mvert[i].flag; + for (i = 0; i < totvert; i++, dm_mv++) { + dm_mv->flag = me->mvert[i].flag; } } } @@ -670,12 +668,12 @@ void paintvert_deselect_all_visible(Object *ob, int action, short flush_flags) MVert *mvert; int a; - me= get_mesh(ob); - if (me==NULL) return; + me = get_mesh(ob); + if (me == NULL) return; if (action == SEL_INVERT) { - mvert= me->mvert; - a= me->totvert; + mvert = me->mvert; + a = me->totvert; while (a--) { if ((mvert->flag & ME_HIDE) == 0) { mvert->flag ^= SELECT; @@ -687,8 +685,8 @@ void paintvert_deselect_all_visible(Object *ob, int action, short flush_flags) if (action == SEL_TOGGLE) { action = SEL_SELECT; - mvert= me->mvert; - a= me->totvert; + mvert = me->mvert; + a = me->totvert; while (a--) { if ((mvert->flag & ME_HIDE) == 0 && mvert->flag & SELECT) { action = SEL_DESELECT; @@ -698,20 +696,20 @@ void paintvert_deselect_all_visible(Object *ob, int action, short flush_flags) } } - mvert= me->mvert; - a= me->totvert; + mvert = me->mvert; + a = me->totvert; while (a--) { if ((mvert->flag & ME_HIDE) == 0) { switch (action) { - case SEL_SELECT: - mvert->flag |= SELECT; - break; - case SEL_DESELECT: - mvert->flag &= ~SELECT; - break; - case SEL_INVERT: - mvert->flag ^= SELECT; - break; + case SEL_SELECT: + mvert->flag |= SELECT; + break; + case SEL_DESELECT: + mvert->flag &= ~SELECT; + break; + case SEL_INVERT: + mvert->flag ^= SELECT; + break; } } mvert++; @@ -731,21 +729,21 @@ void paintvert_deselect_all_visible(Object *ob, int action, short flush_flags) typedef int MirrTopoHash_t; typedef struct MirrTopoVert_t { - MirrTopoHash_t hash; - int v_index; + MirrTopoHash_t hash; + int v_index; } MirrTopoVert_t; static int mirrtopo_hash_sort(const void *l1, const void *l2) { - if ((MirrTopoHash_t)(intptr_t)l1 > (MirrTopoHash_t)(intptr_t)l2 ) return 1; - else if ((MirrTopoHash_t)(intptr_t)l1 < (MirrTopoHash_t)(intptr_t)l2 ) return -1; + if ((MirrTopoHash_t)(intptr_t)l1 > (MirrTopoHash_t)(intptr_t)l2) return 1; + else if ((MirrTopoHash_t)(intptr_t)l1 < (MirrTopoHash_t)(intptr_t)l2) return -1; return 0; } static int mirrtopo_vert_sort(const void *v1, const void *v2) { - if (((MirrTopoVert_t *)v1)->hash > ((MirrTopoVert_t *)v2)->hash ) return 1; - else if (((MirrTopoVert_t *)v1)->hash < ((MirrTopoVert_t *)v2)->hash ) return -1; + if (((MirrTopoVert_t *)v1)->hash > ((MirrTopoVert_t *)v2)->hash) return 1; + else if (((MirrTopoVert_t *)v1)->hash < ((MirrTopoVert_t *)v2)->hash) return -1; return 0; } @@ -763,10 +761,10 @@ int ED_mesh_mirrtopo_recalc_check(Mesh *me, const int ob_mode, MirrTopoStore_t * totedge = me->totedge; } - if ( (mesh_topo_store->index_lookup==NULL) || - (mesh_topo_store->prev_ob_mode != ob_mode) || - (totvert != mesh_topo_store->prev_vert_tot) || - (totedge != mesh_topo_store->prev_edge_tot)) + if ((mesh_topo_store->index_lookup == NULL) || + (mesh_topo_store->prev_ob_mode != ob_mode) || + (totvert != mesh_topo_store->prev_vert_tot) || + (totedge != mesh_topo_store->prev_edge_tot)) { return TRUE; } @@ -824,7 +822,7 @@ void ED_mesh_mirrtopo_init(Mesh *me, const int ob_mode, MirrTopoStore_t *mesh_to else { totedge = me->totedge; - for (a=0, medge=me->medge; a < me->totedge; a++, medge++) { + for (a = 0, medge = me->medge; a < me->totedge; a++, medge++) { topo_hash[medge->v1]++; topo_hash[medge->v2]++; } @@ -843,7 +841,7 @@ void ED_mesh_mirrtopo_init(Mesh *me, const int ob_mode, MirrTopoStore_t *mesh_to } } else { - for (a=0, medge=me->medge; atotedge; a++, medge++) { + for (a = 0, medge = me->medge; a < me->totedge; a++, medge++) { /* This can make really big numbers, wrapping around here is fine */ topo_hash[medge->v1] += topo_hash_prev[medge->v2]; topo_hash[medge->v2] += topo_hash_prev[medge->v1]; @@ -855,8 +853,8 @@ void ED_mesh_mirrtopo_init(Mesh *me, const int ob_mode, MirrTopoStore_t *mesh_to qsort(topo_hash_prev, totvert, sizeof(MirrTopoHash_t), mirrtopo_hash_sort); tot_unique = 1; /* account for skiping the first value */ - for (a=1; adata, idname); /* create editmode */ - ED_object_enter_editmode(C, EM_DO_UNDO|EM_IGNORE_LAYER); /* rare cases the active layer is messed up */ + ED_object_enter_editmode(C, EM_DO_UNDO | EM_IGNORE_LAYER); /* rare cases the active layer is messed up */ *state = 1; } else { @@ -120,13 +120,13 @@ static void make_prim_finish(bContext *C, int *state, int enter_editmode) EDBM_selectmode_flush_ex(em, SCE_SELECT_VERTEX); DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); /* userdef */ if (*state && !enter_editmode) { ED_object_exit_editmode(C, EM_FREEDATA); /* adding EM_DO_UNDO messes up operator redo */ } - WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, obedit); + WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, obedit); } static int add_primitive_plane_exec(bContext *C, wmOperator *op) @@ -170,7 +170,7 @@ void MESH_OT_primitive_plane_add(wmOperatorType *ot) ot->poll = ED_operator_scene_editable; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; ED_object_add_generic_props(ot, TRUE); } @@ -215,12 +215,12 @@ void MESH_OT_primitive_cube_add(wmOperatorType *ot) ot->poll = ED_operator_scene_editable; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; ED_object_add_generic_props(ot, TRUE); } -static const EnumPropertyItem fill_type_items[]= { +static const EnumPropertyItem fill_type_items[] = { {0, "NOTHING", 0, "Nothing", "Don't fill at all"}, {1, "NGON", 0, "Ngon", "Use ngons"}, {2, "TRIFAN", 0, "Triangle Fan", "Use triangle fans"}, @@ -274,7 +274,7 @@ void MESH_OT_primitive_circle_add(wmOperatorType *ot) ot->poll = ED_operator_scene_editable; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ RNA_def_int(ot->srna, "vertices", 32, 3, INT_MAX, "Vertices", "", 3, 500); @@ -337,7 +337,7 @@ void MESH_OT_primitive_cylinder_add(wmOperatorType *ot) ot->poll = ED_operator_scene_editable; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ RNA_def_int(ot->srna, "vertices", 32, 2, INT_MAX, "Vertices", "", 2, 500); @@ -399,7 +399,7 @@ void MESH_OT_primitive_cone_add(wmOperatorType *ot) ot->poll = ED_operator_scene_editable; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ RNA_def_int(ot->srna, "vertices", 32, 2, INT_MAX, "Vertices", "", 2, 500); @@ -459,7 +459,7 @@ void MESH_OT_primitive_grid_add(wmOperatorType *ot) ot->poll = ED_operator_scene_editable; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ RNA_def_int(ot->srna, "x_subdivisions", 10, 3, INT_MAX, "X Subdivisions", "", 3, 1000); @@ -511,7 +511,7 @@ void MESH_OT_primitive_monkey_add(wmOperatorType *ot) ot->poll = ED_operator_scene_editable; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; ED_object_add_generic_props(ot, TRUE); } @@ -561,7 +561,7 @@ void MESH_OT_primitive_uv_sphere_add(wmOperatorType *ot) ot->poll = ED_operator_scene_editable; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ RNA_def_int(ot->srna, "segments", 32, 3, INT_MAX, "Segments", "", 3, 500); @@ -618,7 +618,7 @@ void MESH_OT_primitive_ico_sphere_add(wmOperatorType *ot) ot->poll = ED_operator_scene_editable; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ RNA_def_int(ot->srna, "subdivisions", 2, 1, INT_MAX, "Subdivisions", "", 1, 8); diff --git a/source/blender/editors/mesh/editmesh_bvh.c b/source/blender/editors/mesh/editmesh_bvh.c index 6571af11af5..37c4897cede 100644 --- a/source/blender/editors/mesh/editmesh_bvh.c +++ b/source/blender/editors/mesh/editmesh_bvh.c @@ -70,7 +70,7 @@ typedef struct BMBVHTree { } BMBVHTree; static void cage_mapped_verts_callback(void *userData, int index, float *co, - float *UNUSED(no_f), short *UNUSED(no_s)) + float *UNUSED(no_f), short *UNUSED(no_s)) { void **data = userData; BMEditMesh *em = data[0]; @@ -166,7 +166,7 @@ void BMBVH_FreeBVH(BMBVHTree *tree) /* taken from bvhutils.c */ static float ray_tri_intersection(const BVHTreeRay *ray, const float UNUSED(m_dist), float *v0, - float *v1, float *v2, float *uv, float UNUSED(e)) + float *v1, float *v2, float *uv, float UNUSED(e)) { float dist; diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index f6367779251..10b1391c4d7 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -65,7 +65,7 @@ /* this code here is kindof messy. . .I might need to eventually rework it - joeedh */ -#define KMAXDIST 10 /* max mouse distance from edge before not detecting it */ +#define KMAXDIST 10 /* max mouse distance from edge before not detecting it */ /* knifetool operator */ typedef struct KnifeVert { @@ -118,8 +118,8 @@ typedef struct KnifePosData { /* struct for properties used while drawing */ typedef struct knifetool_opdata { - ARegion *ar; /* region that knifetool was activated in */ - void *draw_handle; /* for drawing preview loop */ + ARegion *ar; /* region that knifetool was activated in */ + void *draw_handle; /* for drawing preview loop */ ViewContext vc; bContext *C; @@ -1013,7 +1013,7 @@ static BMEdgeHit *knife_edge_tri_isect(knifetool_opdata *kcd, BMBVHTree *bmtree, /* for comparing distances, error of intersection depends on triangle scale. * need to scale down before squaring for accurate comparison */ - const float depsilon = 50 * FLT_EPSILON * len_v3_tri_side_max(v1, v2, v3); + const float depsilon = 50 * FLT_EPSILON *len_v3_tri_side_max(v1, v2, v3); const float depsilon_squared = depsilon * depsilon; copy_v3_v3(cos + 0, v1); @@ -1435,7 +1435,7 @@ static KnifeEdge *knife_find_closest_edge(knifetool_opdata *kcd, float p[3], flo /* find a vertex near the mouse cursor, if it exists */ static KnifeVert *knife_find_closest_vert(knifetool_opdata *kcd, float p[3], float cagep[3], BMFace **fptr, - int *is_space) + int *is_space) { BMFace *f; float co[3], cageco[3], sco[3], maxdist = knife_snap_size(kcd, kcd->vthresh); @@ -1580,13 +1580,13 @@ static int knife_update_active(knifetool_opdata *kcd) return 1; } -#define MARK 4 -#define DEL 8 -#define VERT_ON_EDGE 16 -#define VERT_ORIG 32 -#define FACE_FLIP 64 -#define BOUNDARY 128 -#define FACE_NEW 256 +#define MARK 4 +#define DEL 8 +#define VERT_ON_EDGE 16 +#define VERT_ORIG 32 +#define FACE_FLIP 64 +#define BOUNDARY 128 +#define FACE_NEW 256 #define SCANFILL_CUTS 0 #if SCANFILL_CUTS @@ -1849,7 +1849,7 @@ static void knifenet_fill_faces(knifetool_opdata *kcd) ScanFillEdge *eed; eed = BLI_addfilledge(lasteve, eve); if (entry->kfe->oe) - eed->f = FILLBOUNDARY; /* mark as original boundary edge */ + eed->f = FILLBOUNDARY; /* mark as original boundary edge */ BMO_elem_flag_disable(bm, entry->kfe->e->v1, DEL); BMO_elem_flag_disable(bm, entry->kfe->e->v2, DEL); @@ -2023,7 +2023,7 @@ static int find_chain_search(knifetool_opdata *kcd, KnifeVert *kfv, ListBase *fe return FALSE; } -static ListBase * find_chain_from_vertex(knifetool_opdata *kcd, KnifeEdge *kfe, BMVert *v, ListBase *fedges) +static ListBase *find_chain_from_vertex(knifetool_opdata *kcd, KnifeEdge *kfe, BMVert *v, ListBase *fedges) { SmallHash visited_, *visited = &visited_; ListBase *ans; @@ -2053,7 +2053,7 @@ static ListBase * find_chain_from_vertex(knifetool_opdata *kcd, KnifeEdge *kfe, /* Find a chain in fedges from one instantiated vertex to another. * Remove the edges in the chain from fedges and return a separate list of the chain. */ -static ListBase * find_chain(knifetool_opdata *kcd, ListBase *fedges) +static ListBase *find_chain(knifetool_opdata *kcd, ListBase *fedges) { Ref *r, *ref; KnifeEdge *kfe; @@ -2549,7 +2549,7 @@ static void knife_make_cuts(knifetool_opdata *kcd) BLI_mempool_iternew(kcd->kverts, &iter); for (kfv = BLI_mempool_iterstep(&iter); kfv; kfv = BLI_mempool_iterstep(&iter)) { if (kfv->v) - continue; /* already have a BMVert */ + continue; /* already have a BMVert */ for (ref = kfv->edges.first; ref; ref = ref->next) { kfe = ref->ref; e = kfe->e; @@ -2568,7 +2568,8 @@ static void knife_make_cuts(knifetool_opdata *kcd) /* split bmesh edges where needed */ for (lst = BLI_smallhash_iternew(ehash, &hiter, (uintptr_t *)&e); lst; - lst = BLI_smallhash_iternext(&hiter, (uintptr_t *)&e)) { + lst = BLI_smallhash_iternext(&hiter, (uintptr_t *)&e)) + { sort_by_frac_along(lst, e); for (ref = lst->first; ref; ref = ref->next) { kfv = ref->ref; @@ -2579,7 +2580,8 @@ static void knife_make_cuts(knifetool_opdata *kcd) /* do cuts for each face */ for (lst = BLI_smallhash_iternew(fhash, &hiter, (uintptr_t *)&f); lst; - lst = BLI_smallhash_iternext(&hiter, (uintptr_t *)&f)) { + lst = BLI_smallhash_iternext(&hiter, (uintptr_t *)&f)) + { knife_make_face_cuts(kcd, f, lst); } diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c index b409ee16e25..eb28359c333 100644 --- a/source/blender/editors/mesh/editmesh_loopcut.c +++ b/source/blender/editors/mesh/editmesh_loopcut.c @@ -87,8 +87,8 @@ /* struct for properties used while drawing */ typedef struct tringselOpData { - ARegion *ar; /* region that ringsel was activated in */ - void *draw_handle; /* for drawing preview loop */ + ARegion *ar; /* region that ringsel was activated in */ + void *draw_handle; /* for drawing preview loop */ float (*edges)[2][3]; int totedge; @@ -322,24 +322,24 @@ static void ringsel_finish(bContext *C, wmOperator *op) CTX_data_tool_settings(C)->selectmode = em->selectmode; EDBM_selectmode_set(em); - WM_event_add_notifier(C, NC_SCENE|ND_TOOLSETTINGS, CTX_data_scene(C)); + WM_event_add_notifier(C, NC_SCENE | ND_TOOLSETTINGS, CTX_data_scene(C)); - WM_event_add_notifier(C, NC_SCENE|ND_TOOLSETTINGS, CTX_data_scene(C)); + WM_event_add_notifier(C, NC_SCENE | ND_TOOLSETTINGS, CTX_data_scene(C)); } - WM_event_add_notifier(C, NC_GEOM|ND_SELECT|ND_DATA, lcd->ob->data); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT | ND_DATA, lcd->ob->data); DAG_id_tag_update(lcd->ob->data, 0); } else { /* sets as active, useful for other tools */ if (em->selectmode & SCE_SELECT_VERTEX) - EDBM_store_selection(em, lcd->eed->v1); /* low priority TODO, get vertrex close to mouse */ + EDBM_store_selection(em, lcd->eed->v1); /* low priority TODO, get vertrex close to mouse */ if (em->selectmode & SCE_SELECT_EDGE) EDBM_store_selection(em, lcd->eed); EDBM_selectmode_flush(lcd->em); - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, lcd->ob->data); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, lcd->ob->data); } } } @@ -363,7 +363,7 @@ static void ringsel_exit(bContext *UNUSED(C), wmOperator *op) } /* called when modal loop selection gets set up... */ -static int ringsel_init (bContext *C, wmOperator *op, int do_cut) +static int ringsel_init(bContext *C, wmOperator *op, int do_cut) { tringselOpData *lcd; @@ -389,14 +389,14 @@ static int ringsel_init (bContext *C, wmOperator *op, int do_cut) return 1; } -static int ringcut_cancel (bContext *C, wmOperator *op) +static int ringcut_cancel(bContext *C, wmOperator *op) { /* this is just a wrapper around exit() */ ringsel_exit(C, op); return OPERATOR_CANCELLED; } -static int ringcut_invoke (bContext *C, wmOperator *op, wmEvent *evt) +static int ringcut_invoke(bContext *C, wmOperator *op, wmEvent *evt) { Object *obedit = CTX_data_edit_object(C); tringselOpData *lcd; @@ -428,7 +428,7 @@ static int ringcut_invoke (bContext *C, wmOperator *op, wmEvent *evt) return OPERATOR_RUNNING_MODAL; } -static int loopcut_modal (bContext *C, wmOperator *op, wmEvent *event) +static int loopcut_modal(bContext *C, wmOperator *op, wmEvent *event) { int cuts = RNA_int_get(op->ptr, "number_cuts"); tringselOpData *lcd = op->customdata; @@ -544,7 +544,7 @@ static int loopcut_modal (bContext *C, wmOperator *op, wmEvent *event) /* for bmesh this tool is in bmesh_select.c */ #if 0 -void MESH_OT_edgering_select (wmOperatorType *ot) +void MESH_OT_edgering_select(wmOperatorType *ot) { /* description */ ot->name = "Edge Ring Select"; @@ -556,14 +556,14 @@ void MESH_OT_edgering_select (wmOperatorType *ot) ot->poll = ED_operator_editmesh_region_view3d; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend the selection"); } #endif -void MESH_OT_loopcut (wmOperatorType *ot) +void MESH_OT_loopcut(wmOperatorType *ot) { PropertyRNA *prop; @@ -579,7 +579,7 @@ void MESH_OT_loopcut (wmOperatorType *ot) ot->poll = ED_operator_editmesh_region_view3d; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING; /* properties */ prop = RNA_def_int(ot->srna, "number_cuts", 1, 1, INT_MAX, "Number of Cuts", "", 1, 10); diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index dae4eac7e6d..df1a824f3de 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -121,7 +121,7 @@ void EDBM_automerge(Scene *scene, Object *obedit, int update) /* ****************************** SELECTION ROUTINES **************** */ -unsigned int bm_solidoffs = 0, bm_wireoffs = 0, bm_vertoffs = 0; /* set in drawobject.c ... for colorindices */ +unsigned int bm_solidoffs = 0, bm_wireoffs = 0, bm_vertoffs = 0; /* set in drawobject.c ... for colorindices */ /* facilities for border select and circle select */ static char *selbuf = NULL; @@ -260,7 +260,7 @@ int EDBM_mask_init_backbuf_border(ViewContext *vc, int mcords[][2], short tot, s } glEnd(); - glFinish(); /* to be sure readpixels sees mask */ + glFinish(); /* to be sure readpixels sees mask */ /* grab mask */ bufmask = view3d_read_backbuf(vc, xmin, ymin, xmax, ymax); @@ -371,8 +371,8 @@ static unsigned int findnearestvert__backbufIndextest(void *handle, unsigned int * * dist (in/out): minimal distance to the nearest and at the end, actual distance * sel: selection bias - * if SELECT, selected vertice are given a 5 pixel bias to make them further than unselect verts - * if 0, unselected vertice are given the bias + * if SELECT, selected vertice are given a 5 pixel bias to make them further than unselect verts + * if 0, unselected vertice are given the bias * strict: if 1, the vertice corresponding to the sel parameter are ignored and not just biased */ BMVert *EDBM_findnearestvert(ViewContext *vc, int *dist, short sel, short strict) @@ -583,12 +583,12 @@ BMFace *EDBM_findnearestface(ViewContext *vc, int *dist) data.mval[0] = vc->mval[0]; data.mval[1] = vc->mval[1]; - data.dist = 0x7FFF; /* largest short */ + data.dist = 0x7FFF; /* largest short */ data.toFace = efa; mesh_foreachScreenFace(vc, findnearestface__getDistance, &data); - if (vc->em->selectmode == SCE_SELECT_FACE || data.dist < *dist) { /* only faces, no dist check */ + if (vc->em->selectmode == SCE_SELECT_FACE || data.dist < *dist) { /* only faces, no dist check */ *dist = data.dist; return efa; } @@ -653,7 +653,7 @@ static int unified_findnearest(ViewContext *vc, BMVert **r_eve, BMEdge **r_eed, if (em->selectmode & SCE_SELECT_FACE) *r_efa = EDBM_findnearestface(vc, &dist); - dist -= 20; /* since edges select lines, we give dots advantage of 20 pix */ + dist -= 20; /* since edges select lines, we give dots advantage of 20 pix */ if (em->selectmode & SCE_SELECT_EDGE) *r_eed = EDBM_findnearestedge(vc, &dist); @@ -724,7 +724,7 @@ static int similar_face_select_exec(bContext *C, wmOperator *op) /* dependencies graph and notification stuff */ DAG_id_tag_update(ob->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, ob->data); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, ob->data); /* we succeeded */ return OPERATOR_FINISHED; @@ -765,7 +765,7 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op) /* dependencies graph and notification stuff */ DAG_id_tag_update(ob->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, ob->data); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, ob->data); /* we succeeded */ return OPERATOR_FINISHED; @@ -809,7 +809,7 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op) /* dependencies graph and notification stuff */ DAG_id_tag_update(ob->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, ob->data); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, ob->data); /* we succeeded */ return OPERATOR_FINISHED; @@ -831,7 +831,7 @@ static int edbm_select_similar_exec(bContext *C, wmOperator *op) if (type < 100) return similar_vert_select_exec(C, op); else if (type < 200) return similar_edge_select_exec(C, op); - else return similar_face_select_exec(C, op); + else return similar_face_select_exec(C, op); } static EnumPropertyItem *select_similar_type_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), @@ -884,7 +884,7 @@ void MESH_OT_select_similar(wmOperatorType *ot) ot->description = "Select similar vertices, edges or faces by property types"; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ prop = ot->prop = RNA_def_enum(ot->srna, "type", prop_similar_types, SIMVERT_NORMAL, "Type", ""); @@ -907,7 +907,7 @@ static void walker_select(BMEditMesh *em, int walkercode, void *start, int selec BMW_MASK_NOP, BMW_MASK_NOP, BMW_MASK_NOP, BMW_MASK_NOP, BMW_NIL_LAY); ele = BMW_begin(&walker, start); - for ( ; ele; ele = BMW_step(&walker)) { + for (; ele; ele = BMW_step(&walker)) { if (!select) { BM_select_history_remove(bm, ele); } @@ -929,7 +929,7 @@ static int edbm_loop_multiselect_exec(bContext *C, wmOperator *op) int totedgesel = 0; for (eed = BM_iter_new(&iter, em->bm, BM_EDGES_OF_MESH, NULL); - eed; eed = BM_iter_step(&iter)) { + eed; eed = BM_iter_step(&iter)) { if (BM_elem_flag_test(eed, BM_ELEM_SELECT)) { totedgesel++; @@ -968,7 +968,7 @@ static int edbm_loop_multiselect_exec(bContext *C, wmOperator *op) MEM_freeN(edarray); // if (EM_texFaceCheck()) - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit); return OPERATOR_FINISHED; } @@ -985,7 +985,7 @@ void MESH_OT_loop_multi_select(wmOperatorType *ot) ot->description = "Select a loop of connected edges by connection type"; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ RNA_def_boolean(ot->srna, "ring", 0, "Ring", ""); @@ -1062,7 +1062,7 @@ static void mouse_mesh_loop(bContext *C, int mval[2], short extend, short ring) * active here in face select mode */ } - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, vc.obedit); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, vc.obedit); } } @@ -1072,7 +1072,7 @@ static int edbm_select_loop_invoke(bContext *C, wmOperator *op, wmEvent *event) view3d_operator_needs_opengl(C); mouse_mesh_loop(C, event->mval, RNA_boolean_get(op->ptr, "extend"), - RNA_boolean_get(op->ptr, "ring")); + RNA_boolean_get(op->ptr, "ring")); /* cannot do tweaks for as long this keymap is after transform map */ return OPERATOR_FINISHED; @@ -1139,7 +1139,7 @@ static float edgetag_cut_cost(BMEditMesh *UNUSED(em), BMEdge *e1, BMEdge *e2, BM } static void edgetag_add_adjacent(BMEditMesh *em, SmallHash *visithash, Heap *heap, int mednum, int vertnum, - int *nedges, int *edges, int *prevedge, float *cost) + int *nedges, int *edges, int *prevedge, float *cost) { BMEdge *e1 = EDBM_get_edge_for_index(em, mednum); BMVert *v = EDBM_get_vert_for_index(em, vertnum); @@ -1169,43 +1169,43 @@ static void edgetag_context_set(BMEditMesh *em, Scene *scene, BMEdge *e, int val { switch (scene->toolsettings->edge_mode) { - case EDGE_MODE_SELECT: - BM_elem_select_set(em->bm, e, val); - break; - case EDGE_MODE_TAG_SEAM: - BM_elem_flag_set(e, BM_ELEM_SEAM, val); - break; - case EDGE_MODE_TAG_SHARP: - BM_elem_flag_set(e, BM_ELEM_SMOOTH, !val); - break; - case EDGE_MODE_TAG_CREASE: - { - float *crease = CustomData_bmesh_get(&em->bm->edata, e->head.data, CD_CREASE); - *crease = (val) ? 1.0f : 0.0f; - break; - } - case EDGE_MODE_TAG_BEVEL: - { - float *bweight = CustomData_bmesh_get(&em->bm->edata, e->head.data, CD_BWEIGHT); - *bweight = (val) ? 1.0f : 0.0f; - break; - } + case EDGE_MODE_SELECT: + BM_elem_select_set(em->bm, e, val); + break; + case EDGE_MODE_TAG_SEAM: + BM_elem_flag_set(e, BM_ELEM_SEAM, val); + break; + case EDGE_MODE_TAG_SHARP: + BM_elem_flag_set(e, BM_ELEM_SMOOTH, !val); + break; + case EDGE_MODE_TAG_CREASE: + { + float *crease = CustomData_bmesh_get(&em->bm->edata, e->head.data, CD_CREASE); + *crease = (val) ? 1.0f : 0.0f; + break; + } + case EDGE_MODE_TAG_BEVEL: + { + float *bweight = CustomData_bmesh_get(&em->bm->edata, e->head.data, CD_BWEIGHT); + *bweight = (val) ? 1.0f : 0.0f; + break; + } } } static int edgetag_context_check(Scene *scene, BMEditMesh *em, BMEdge *e) { switch (scene->toolsettings->edge_mode) { - case EDGE_MODE_SELECT: - return BM_elem_flag_test(e, BM_ELEM_SELECT) ? 1 : 0; - case EDGE_MODE_TAG_SEAM: - return BM_elem_flag_test(e, BM_ELEM_SEAM); - case EDGE_MODE_TAG_SHARP: - return !BM_elem_flag_test(e, BM_ELEM_SMOOTH); - case EDGE_MODE_TAG_CREASE: - return BM_elem_float_data_get(&em->bm->edata, e, CD_CREASE) ? 1 : 0; - case EDGE_MODE_TAG_BEVEL: - return BM_elem_float_data_get(&em->bm->edata, e, CD_BWEIGHT) ? 1 : 0; + case EDGE_MODE_SELECT: + return BM_elem_flag_test(e, BM_ELEM_SELECT) ? 1 : 0; + case EDGE_MODE_TAG_SEAM: + return BM_elem_flag_test(e, BM_ELEM_SEAM); + case EDGE_MODE_TAG_SHARP: + return !BM_elem_flag_test(e, BM_ELEM_SMOOTH); + case EDGE_MODE_TAG_CREASE: + return BM_elem_float_data_get(&em->bm->edata, e, CD_CREASE) ? 1 : 0; + case EDGE_MODE_TAG_BEVEL: + return BM_elem_float_data_get(&em->bm->edata, e, CD_BWEIGHT) ? 1 : 0; } return 0; } @@ -1225,7 +1225,8 @@ static int edgetag_shortest_path(Scene *scene, BMEditMesh *em, BMEdge *source, B /* note, would pass BM_EDGE except we are looping over all edges anyway */ BM_mesh_elem_index_ensure(em->bm, BM_VERT /* | BM_EDGE */); - BM_ITER(e, &iter, em->bm, BM_EDGES_OF_MESH, NULL) { + BM_ITER(e, &iter, em->bm, BM_EDGES_OF_MESH, NULL) + { e->oflags[0].f = 0; /* XXX, whats this for, BMESH_TODO, double check if this is needed */ if (BM_elem_flag_test(e, BM_ELEM_HIDDEN)) { BLI_smallhash_insert(&visithash, (uintptr_t)e, NULL); @@ -1416,7 +1417,7 @@ static void mouse_mesh_shortest_path(bContext *C, int mval[2]) } DAG_id_tag_update(ob->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, ob->data); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, ob->data); } } @@ -1443,7 +1444,7 @@ void MESH_OT_select_shortest_path(wmOperatorType *ot) ot->description = "Select shortest path between two selections"; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ RNA_def_boolean(ot->srna, "extend", 0, "Extend Select", ""); @@ -1512,7 +1513,7 @@ int mouse_mesh(bContext *C, const int mval[2], short extend) // BIF_preview_changed(ID_MA); } - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, vc.obedit); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, vc.obedit); return 1; } @@ -1568,10 +1569,10 @@ void EDBM_selectmode_set(BMEditMesh *em) else if (em->selectmode & SCE_SELECT_EDGE) { /* deselect vertices, and select again based on edge select */ eve = BM_iter_new(&iter, em->bm, BM_VERTS_OF_MESH, NULL); - for ( ; eve; eve = BM_iter_step(&iter)) BM_elem_select_set(em->bm, eve, FALSE); + for (; eve; eve = BM_iter_step(&iter)) BM_elem_select_set(em->bm, eve, FALSE); eed = BM_iter_new(&iter, em->bm, BM_EDGES_OF_MESH, NULL); - for ( ; eed; eed = BM_iter_step(&iter)) { + for (; eed; eed = BM_iter_step(&iter)) { if (BM_elem_flag_test(eed, BM_ELEM_SELECT)) { BM_elem_select_set(em->bm, eed, TRUE); } @@ -1583,10 +1584,10 @@ void EDBM_selectmode_set(BMEditMesh *em) else if (em->selectmode & SCE_SELECT_FACE) { /* deselect eges, and select again based on face select */ eed = BM_iter_new(&iter, em->bm, BM_EDGES_OF_MESH, NULL); - for ( ; eed; eed = BM_iter_step(&iter)) BM_elem_select_set(em->bm, eed, FALSE); + for (; eed; eed = BM_iter_step(&iter)) BM_elem_select_set(em->bm, eed, FALSE); efa = BM_iter_new(&iter, em->bm, BM_FACES_OF_MESH, NULL); - for ( ; efa; efa = BM_iter_step(&iter)) { + for (; efa; efa = BM_iter_step(&iter)) { if (BM_elem_flag_test(efa, BM_ELEM_SELECT)) { BM_elem_select_set(em->bm, efa, TRUE); } @@ -1605,7 +1606,7 @@ void EDBM_convertsel(BMEditMesh *em, short oldmode, short selectmode) if (selectmode == SCE_SELECT_EDGE) { /* select all edges associated with every selected vertex */ eed = BM_iter_new(&iter, em->bm, BM_EDGES_OF_MESH, NULL); - for ( ; eed; eed = BM_iter_step(&iter)) { + for (; eed; eed = BM_iter_step(&iter)) { if ((BM_elem_flag_test(eed->v1, BM_ELEM_SELECT) || BM_elem_flag_test(eed->v2, BM_ELEM_SELECT))) { @@ -1619,7 +1620,7 @@ void EDBM_convertsel(BMEditMesh *em, short oldmode, short selectmode) /* select all faces associated with every selected vertex */ efa = BM_iter_new(&iter, em->bm, BM_FACES_OF_MESH, NULL); - for ( ; efa; efa = BM_iter_step(&iter)) { + for (; efa; efa = BM_iter_step(&iter)) { l = BM_iter_new(&liter, em->bm, BM_LOOPS_OF_FACE, efa); for (; l; l = BM_iter_step(&liter)) { if (BM_elem_flag_test(l->v, BM_ELEM_SELECT)) { @@ -1638,7 +1639,7 @@ void EDBM_convertsel(BMEditMesh *em, short oldmode, short selectmode) /* select all faces associated with every selected vertex */ efa = BM_iter_new(&iter, em->bm, BM_FACES_OF_MESH, NULL); - for ( ; efa; efa = BM_iter_step(&iter)) { + for (; efa; efa = BM_iter_step(&iter)) { l = BM_iter_new(&liter, em->bm, BM_LOOPS_OF_FACE, efa); for (; l; l = BM_iter_step(&liter)) { if (BM_elem_flag_test(l->v, BM_ELEM_SELECT)) { @@ -1786,7 +1787,7 @@ static int edbm_select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent * /* return warning! */ if (unified_findnearest(&vc, &eve, &eed, &efa) == 0) { - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit); return OPERATOR_CANCELLED; } @@ -1832,13 +1833,13 @@ static int edbm_select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent * BMW_NIL_LAY); e = BMW_begin(&walker, eed->v1); - for ( ; e; e = BMW_step(&walker)) { + for (; e; e = BMW_step(&walker)) { BM_elem_select_set(bm, e, sel); } BMW_end(&walker); } - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit); return OPERATOR_FINISHED; } @@ -1854,7 +1855,7 @@ void MESH_OT_select_linked_pick(wmOperatorType *ot) ot->description = "(De)select all vertices linked to the edge under the mouse cursor"; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; RNA_def_boolean(ot->srna, "deselect", 0, "Deselect", ""); RNA_def_boolean(ot->srna, "limit", 0, "Limit by Seams", ""); @@ -1932,7 +1933,7 @@ static int edbm_select_linked_exec(bContext *C, wmOperator *op) } EDBM_selectmode_flush_ex(em, SCE_SELECT_VERTEX); - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit); return OPERATOR_FINISHED; } @@ -1949,7 +1950,7 @@ void MESH_OT_select_linked(wmOperatorType *ot) ot->description = "Select all vertices linked to the active mesh"; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; RNA_def_boolean(ot->srna, "limit", 0, "Limit by Seams", ""); } @@ -1963,7 +1964,7 @@ static int edbm_select_more_exec(bContext *C, wmOperator *UNUSED(op)) EDBM_select_more(em); - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit); return OPERATOR_FINISHED; } @@ -1979,7 +1980,7 @@ void MESH_OT_select_more(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } static int edbm_select_less_exec(bContext *C, wmOperator *UNUSED(op)) @@ -1989,7 +1990,7 @@ static int edbm_select_less_exec(bContext *C, wmOperator *UNUSED(op)) EDBM_select_less(em); - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit); return OPERATOR_FINISHED; } @@ -2005,7 +2006,7 @@ void MESH_OT_select_less(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /* Walk all reachable elements of the same type as h_act in breadth-first @@ -2028,30 +2029,31 @@ static void walker_deselect_nth(BMEditMesh *em, int nth, int offset, BMHeader *h /* Determine which type of iter, walker, and select flush to use * based on type of the elements being deselected */ switch (h_act->htype) { - case BM_VERT: - itertype = BM_VERTS_OF_MESH; - walktype = BMW_CONNECTED_VERTEX; - flushtype = SCE_SELECT_VERTEX; - mask_vert = BM_ELEM_SELECT; - break; - case BM_EDGE: - itertype = BM_EDGES_OF_MESH; - walktype = BMW_SHELL; - flushtype = SCE_SELECT_EDGE; - mask_edge = BM_ELEM_SELECT; - break; - case BM_FACE: - itertype = BM_FACES_OF_MESH; - walktype = BMW_ISLAND; - flushtype = SCE_SELECT_FACE; - mask_face = BM_ELEM_SELECT; - break; + case BM_VERT: + itertype = BM_VERTS_OF_MESH; + walktype = BMW_CONNECTED_VERTEX; + flushtype = SCE_SELECT_VERTEX; + mask_vert = BM_ELEM_SELECT; + break; + case BM_EDGE: + itertype = BM_EDGES_OF_MESH; + walktype = BMW_SHELL; + flushtype = SCE_SELECT_EDGE; + mask_edge = BM_ELEM_SELECT; + break; + case BM_FACE: + itertype = BM_FACES_OF_MESH; + walktype = BMW_ISLAND; + flushtype = SCE_SELECT_FACE; + mask_face = BM_ELEM_SELECT; + break; } /* Walker restrictions uses BMO flags, not header flags, * so transfer BM_ELEM_SELECT from HFlags onto a BMO flag layer. */ BMO_push(bm, NULL); - BM_ITER(ele, &iter, bm, itertype, NULL) { + BM_ITER(ele, &iter, bm, itertype, NULL) + { if (BM_elem_flag_test(ele, BM_ELEM_SELECT)) { /* BMESH_TODO, don't use 'BM_ELEM_SELECT' here, its a HFLAG only! */ BMO_elem_flag_enable(bm, (BMElemF *)ele, BM_ELEM_SELECT); @@ -2095,15 +2097,15 @@ static void deselect_nth_active(BMEditMesh *em, BMVert **r_eve, BMEdge **r_eed, if (ese) { switch (ese->htype) { - case BM_VERT: - *r_eve = (BMVert *)ese->ele; - return; - case BM_EDGE: - *r_eed = (BMEdge *)ese->ele; - return; - case BM_FACE: - *r_efa = (BMFace *)ese->ele; - return; + case BM_VERT: + *r_eve = (BMVert *)ese->ele; + return; + case BM_EDGE: + *r_eed = (BMEdge *)ese->ele; + return; + case BM_FACE: + *r_efa = (BMFace *)ese->ele; + return; } } @@ -2171,7 +2173,7 @@ static int edbm_select_nth_exec(bContext *C, wmOperator *op) } DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; } @@ -2189,7 +2191,7 @@ void MESH_OT_select_nth(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; RNA_def_int(ot->srna, "nth", 2, 2, 100, "Nth Selection", "", 1, INT_MAX); RNA_def_int(ot->srna, "offset", 0, 0, 100, "Offset", "", 0, INT_MAX); @@ -2249,7 +2251,7 @@ static int edbm_select_sharp_edges_exec(bContext *C, wmOperator *op) } - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data); return OPERATOR_FINISHED; } @@ -2266,7 +2268,7 @@ void MESH_OT_edges_select_sharp(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ RNA_def_float(ot->srna, "sharpness", 1.0f, 0.01f, FLT_MAX, "sharpness", "", 1.0f, 180.0f); @@ -2330,7 +2332,7 @@ static int edbm_select_linked_flat_faces_exec(bContext *C, wmOperator *op) BLI_array_free(stack); - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data); return OPERATOR_FINISHED; } @@ -2347,7 +2349,7 @@ void MESH_OT_faces_select_linked_flat(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ RNA_def_float(ot->srna, "sharpness", 1.0f, 0.01f, FLT_MAX, "sharpness", "", 1.0f, 180.0f); @@ -2382,7 +2384,7 @@ static int edbm_select_non_manifold_exec(bContext *C, wmOperator *op) } } - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data); return OPERATOR_FINISHED; } @@ -2399,7 +2401,7 @@ void MESH_OT_select_non_manifold(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } static int edbm_select_random_exec(bContext *C, wmOperator *op) @@ -2442,7 +2444,7 @@ static int edbm_select_random_exec(bContext *C, wmOperator *op) EDBM_selectmode_flush(em); } - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data); return OPERATOR_FINISHED; } @@ -2459,7 +2461,7 @@ void MESH_OT_select_random(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ RNA_def_float_percentage(ot->srna, "percent", 50.f, 0.0f, 100.0f, @@ -2498,7 +2500,7 @@ static int edbm_select_next_loop_exec(bContext *C, wmOperator *UNUSED(op)) } } - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit); return OPERATOR_FINISHED; } @@ -2514,7 +2516,7 @@ void MESH_OT_select_next_loop(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } @@ -2565,7 +2567,7 @@ static int edbm_region_to_loop_exec(bContext *C, wmOperator *UNUSED(op)) EDBM_selectmode_to_scene(C); } - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data); return OPERATOR_FINISHED; } @@ -2581,7 +2583,7 @@ void MESH_OT_region_to_loop(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } static int loop_find_region(BMEditMesh *em, BMLoop *l, int flag, @@ -2747,7 +2749,7 @@ static int edbm_loop_to_region_exec(bContext *C, wmOperator *op) } } - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data); return OPERATOR_FINISHED; } @@ -2762,7 +2764,7 @@ void MESH_OT_loop_to_region(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; RNA_def_boolean(ot->srna, "select_bigger", 0, "Select Bigger", "Select bigger regions instead of smaller ones"); } diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 6046a468aed..12042871592 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -102,13 +102,13 @@ static int edbm_subdivide_exec(bContext *C, wmOperator *op) BM_mesh_esubdivideflag(obedit, em->bm, BM_ELEM_SELECT, smooth, fractal, - ts->editbutflag|flag, + ts->editbutflag | flag, cuts, 0, RNA_enum_get(op->ptr, "quadcorner"), RNA_boolean_get(op->ptr, "quadtri"), TRUE, RNA_int_get(op->ptr, "seed")); DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; } @@ -136,7 +136,7 @@ void MESH_OT_subdivide(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ prop = RNA_def_int(ot->srna, "number_cuts", 1, 1, INT_MAX, "Number of Cuts", "", 1, 10); @@ -160,7 +160,7 @@ void EMBM_project_snap_verts(bContext *C, ARegion *ar, Object *obedit, BMEditMes BMIter iter; BMVert *eve; - BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) { + BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) { if (BM_elem_flag_test(eve, BM_ELEM_SELECT)) { float mval[2], vec[3], no_dummy[3]; int dist_dummy; @@ -218,7 +218,7 @@ static short edbm_extrude_edges_indiv(BMEditMesh *em, wmOperator *op, const char EDBM_flag_disable_all(em, BM_ELEM_SELECT); BMO_op_exec(em->bm, &bmop); - BMO_slot_buffer_hflag_enable(em->bm, &bmop, "geomout", BM_VERT|BM_EDGE, BM_ELEM_SELECT, TRUE); + BMO_slot_buffer_hflag_enable(em->bm, &bmop, "geomout", BM_VERT | BM_EDGE, BM_ELEM_SELECT, TRUE); if (!EDBM_FinishOp(em, &bmop, op, TRUE)) { return 0; @@ -259,7 +259,7 @@ static short edbm_extrude_edge(Object *obedit, BMEditMesh *em, const char hflag, BMElem *ele; BMO_op_init(bm, &extop, "extrude_face_region"); - BMO_slot_buffer_from_hflag(bm, &extop, "edgefacein", BM_VERT|BM_EDGE|BM_FACE, hflag); + BMO_slot_buffer_from_hflag(bm, &extop, "edgefacein", BM_VERT | BM_EDGE | BM_FACE, hflag); /* If a mirror modifier with clipping is on, we need to adjust some * of the cases above to handle edges on the line of symmetry. @@ -297,21 +297,21 @@ static short edbm_extrude_edge(Object *obedit, BMEditMesh *em, const char hflag, if (mmd->flag & MOD_MIR_AXIS_X) { if ((fabsf(co1[0]) < mmd->tolerance) && - (fabsf(co2[0]) < mmd->tolerance)) + (fabsf(co2[0]) < mmd->tolerance)) { BMO_slot_map_ptr_insert(bm, &extop, "exclude", edge, NULL); } } if (mmd->flag & MOD_MIR_AXIS_Y) { if ((fabsf(co1[1]) < mmd->tolerance) && - (fabsf(co2[1]) < mmd->tolerance)) + (fabsf(co2[1]) < mmd->tolerance)) { BMO_slot_map_ptr_insert(bm, &extop, "exclude", edge, NULL); } } if (mmd->flag & MOD_MIR_AXIS_Z) { if ((fabsf(co1[2]) < mmd->tolerance) && - (fabsf(co2[2]) < mmd->tolerance)) + (fabsf(co2[2]) < mmd->tolerance)) { BMO_slot_map_ptr_insert(bm, &extop, "exclude", edge, NULL); } @@ -408,7 +408,7 @@ static int edbm_extrude_repeat_exec(bContext *C, wmOperator *op) EDBM_RecalcNormals(em); DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; } @@ -425,7 +425,7 @@ void MESH_OT_extrude_repeat(wmOperatorType *ot) ot->poll = ED_operator_editmesh_view3d; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ RNA_def_float(ot->srna, "offset", 2.0f, 0.0f, 100.0f, "Offset", "", 0.0f, FLT_MAX); @@ -446,11 +446,11 @@ static int edbm_extrude_mesh(Scene *scene, Object *obedit, BMEditMesh *em, wmOpe else if (em->bm->totvertsel == 1) nr = 4; else if (em->bm->totedgesel == 0) nr = 4; else if (em->bm->totfacesel == 0) - nr = 3; // pupmenu("Extrude %t|Only Edges%x3|Only Vertices%x4"); + nr = 3; // pupmenu("Extrude %t|Only Edges%x3|Only Vertices%x4"); else if (em->bm->totfacesel == 1) - nr = 1; // pupmenu("Extrude %t|Region %x1|Only Edges%x3|Only Vertices%x4"); + nr = 1; // pupmenu("Extrude %t|Region %x1|Only Edges%x3|Only Vertices%x4"); else - nr = 1; // pupmenu("Extrude %t|Region %x1||Individual Faces %x2|Only Edges%x3|Only Vertices%x4"); + nr = 1; // pupmenu("Extrude %t|Region %x1||Individual Faces %x2|Only Edges%x3|Only Vertices%x4"); } else if (em->selectmode & SCE_SELECT_EDGE) { if (em->bm->totedgesel == 0) nr = 0; @@ -460,16 +460,16 @@ static int edbm_extrude_mesh(Scene *scene, Object *obedit, BMEditMesh *em, wmOpe else if (em->totedgesel == 1) nr = 3; else if (em->totfacesel == 0) nr = 3; else if (em->totfacesel == 1) - nr = 1; // pupmenu("Extrude %t|Region %x1|Only Edges%x3"); + nr = 1; // pupmenu("Extrude %t|Region %x1|Only Edges%x3"); else - nr = 1; // pupmenu("Extrude %t|Region %x1||Individual Faces %x2|Only Edges%x3"); + nr = 1; // pupmenu("Extrude %t|Region %x1||Individual Faces %x2|Only Edges%x3"); #endif } else { if (em->bm->totfacesel == 0) nr = 0; else if (em->bm->totfacesel == 1) nr = 1; else - nr = 1; // pupmenu("Extrude %t|Region %x1||Individual Faces %x2"); + nr = 1; // pupmenu("Extrude %t|Region %x1||Individual Faces %x2"); } if (nr < 1) return 'g'; @@ -530,7 +530,7 @@ static int edbm_extrude_region_exec(bContext *C, wmOperator *op) EDBM_RecalcNormals(em); BMEdit_RecalcTessellation(em); - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit); return OPERATOR_FINISHED; } @@ -547,7 +547,7 @@ void MESH_OT_extrude_region(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", ""); } @@ -560,7 +560,7 @@ static int edbm_extrude_verts_exec(bContext *C, wmOperator *op) edbm_extrude_verts_indiv(em, op, BM_ELEM_SELECT, nor); - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit); return OPERATOR_FINISHED; } @@ -576,7 +576,7 @@ void MESH_OT_extrude_verts_indiv(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* to give to transform */ RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", ""); @@ -590,7 +590,7 @@ static int edbm_extrude_edges_exec(bContext *C, wmOperator *op) edbm_extrude_edges_indiv(em, op, BM_ELEM_SELECT, nor); - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit); return OPERATOR_FINISHED; } @@ -606,7 +606,7 @@ void MESH_OT_extrude_edges_indiv(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* to give to transform */ RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", ""); @@ -620,7 +620,7 @@ static int edbm_extrude_faces_exec(bContext *C, wmOperator *op) edbm_extrude_face_indiv(em, op, BM_ELEM_SELECT, nor); - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit); return OPERATOR_FINISHED; } @@ -636,7 +636,7 @@ void MESH_OT_extrude_faces_indiv(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; RNA_def_boolean(ot->srna, "mirror", 0, "Mirror Editing", ""); } @@ -650,21 +650,21 @@ static int edbm_select_all_exec(bContext *C, wmOperator *op) int action = RNA_enum_get(op->ptr, "action"); switch (action) { - case SEL_TOGGLE: - EDBM_select_toggle_all(em); - break; - case SEL_SELECT: - EDBM_flag_enable_all(em, BM_ELEM_SELECT); - break; - case SEL_DESELECT: - EDBM_flag_disable_all(em, BM_ELEM_SELECT); - break; - case SEL_INVERT: - EDBM_select_swap(em); - break; + case SEL_TOGGLE: + EDBM_select_toggle_all(em); + break; + case SEL_SELECT: + EDBM_flag_enable_all(em, BM_ELEM_SELECT); + break; + case SEL_DESELECT: + EDBM_flag_disable_all(em, BM_ELEM_SELECT); + break; + case SEL_INVERT: + EDBM_select_swap(em); + break; } - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit); return OPERATOR_FINISHED; } @@ -681,7 +681,7 @@ void MESH_OT_select_all(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; WM_operator_properties_select_all(ot); } @@ -692,7 +692,7 @@ static int edbm_faces_select_interior_exec(bContext *C, wmOperator *UNUSED(op)) BMEditMesh *em = BMEdit_FromObject(obedit); if (EDBM_select_interior_faces(em)) { - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit); return OPERATOR_FINISHED; } @@ -714,7 +714,7 @@ void MESH_OT_select_interior_faces(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /* *************** add-click-mesh (extrude) operator ************** */ @@ -729,7 +729,7 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, wmEvent em_setup_viewcontext(C, &vc); - use_proj = (vc.scene->toolsettings->snap_flag & SCE_SNAP) && (vc.scene->toolsettings->snap_mode == SCE_SNAP_MODE_FACE); + use_proj = (vc.scene->toolsettings->snap_flag & SCE_SNAP) && (vc.scene->toolsettings->snap_mode == SCE_SNAP_MODE_FACE); INIT_MINMAX(min, max); @@ -799,7 +799,7 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, wmEvent mid_v3_v3v3(cent, min, max); copy_v3_v3(min, cent); - mul_m4_v3(vc.obedit->obmat, min); // view space + mul_m4_v3(vc.obedit->obmat, min); /* view space */ view3d_get_view_aligned_coordinate(&vc, min, event->mval, TRUE); mul_m4_v3(vc.obedit->imat, min); // back in object space @@ -836,7 +836,7 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, wmEvent if (rot_src) { EDBM_CallOpf(vc.em, op, "rotate verts=%hv cent=%v mat=%m3", - BM_ELEM_SELECT, cent, mat); + BM_ELEM_SELECT, cent, mat); /* also project the source, for retopo workflow */ if (use_proj) @@ -845,9 +845,9 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, wmEvent edbm_extrude_edge(vc.obedit, vc.em, BM_ELEM_SELECT, nor); EDBM_CallOpf(vc.em, op, "rotate verts=%hv cent=%v mat=%m3", - BM_ELEM_SELECT, cent, mat); + BM_ELEM_SELECT, cent, mat); EDBM_CallOpf(vc.em, op, "translate verts=%hv vec=%v", - BM_ELEM_SELECT, min); + BM_ELEM_SELECT, min); } else { float *curs = give_cursor(vc.scene, vc.v3d); @@ -881,7 +881,7 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, wmEvent EDBM_RecalcNormals(vc.em); BMEdit_RecalcTessellation(vc.em); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, vc.obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, vc.obedit->data); DAG_id_tag_update(vc.obedit->data, OB_RECALC_DATA); return OPERATOR_FINISHED; @@ -899,7 +899,7 @@ void MESH_OT_dupli_extrude_cursor(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; RNA_def_boolean(ot->srna, "rotate_source", 1, "Rotate Source", "Rotate initial selection giving better shape"); } @@ -949,7 +949,7 @@ static int edbm_delete_exec(bContext *C, wmOperator *op) DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA|ND_SELECT, obedit); + WM_event_add_notifier(C, NC_GEOM | ND_DATA | ND_SELECT, obedit); return OPERATOR_FINISHED; } @@ -968,7 +968,7 @@ void MESH_OT_delete(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ ot->prop = RNA_def_enum(ot->srna, "type", prop_mesh_delete_types, 0, "Type", "Method used for deleting mesh data"); @@ -983,7 +983,7 @@ static int edbm_collapse_edge_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA|ND_SELECT, obedit); + WM_event_add_notifier(C, NC_GEOM | ND_DATA | ND_SELECT, obedit); return OPERATOR_FINISHED; } @@ -1000,7 +1000,7 @@ void MESH_OT_edge_collapse(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } static int edbm_collapse_edge_loop_exec(bContext *C, wmOperator *op) @@ -1012,7 +1012,7 @@ static int edbm_collapse_edge_loop_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA|ND_SELECT, obedit); + WM_event_add_notifier(C, NC_GEOM | ND_DATA | ND_SELECT, obedit); return OPERATOR_FINISHED; } @@ -1029,7 +1029,7 @@ void MESH_OT_edge_collapse_loop(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } static int edbm_add_edge_face_exec(bContext *C, wmOperator *op) @@ -1048,7 +1048,7 @@ static int edbm_add_edge_face_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit); DAG_id_tag_update(obedit->data, OB_RECALC_DATA); return OPERATOR_FINISHED; @@ -1066,7 +1066,7 @@ void MESH_OT_edge_face_add(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /* ************************* SEAMS AND EDGES **************** */ @@ -1103,7 +1103,7 @@ static int edbm_mark_seam(bContext *C, wmOperator *op) } DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; } @@ -1120,7 +1120,7 @@ void MESH_OT_mark_seam(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; RNA_def_boolean(ot->srna, "clear", 0, "Clear", ""); } @@ -1159,7 +1159,7 @@ static int edbm_mark_sharp(bContext *C, wmOperator *op) DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; } @@ -1176,7 +1176,7 @@ void MESH_OT_mark_sharp(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; RNA_def_boolean(ot->srna, "clear", 0, "Clear", ""); } @@ -1200,7 +1200,7 @@ static int edbm_vert_connect(bContext *C, wmOperator *op) } DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return len ? OPERATOR_FINISHED : OPERATOR_CANCELLED; } @@ -1216,7 +1216,7 @@ void MESH_OT_vert_connect(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } static int edbm_edge_split_exec(bContext *C, wmOperator *op) @@ -1239,7 +1239,7 @@ static int edbm_edge_split_exec(bContext *C, wmOperator *op) } DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return len ? OPERATOR_FINISHED : OPERATOR_CANCELLED; } @@ -1255,7 +1255,7 @@ void MESH_OT_edge_split(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /****************** add duplicate operator ***************/ @@ -1278,7 +1278,7 @@ static int edbm_duplicate_exec(bContext *C, wmOperator *op) } DAG_id_tag_update(ob->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); return OPERATOR_FINISHED; } @@ -1318,7 +1318,7 @@ static int edbm_flip_normals_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; } @@ -1335,7 +1335,7 @@ void MESH_OT_flip_normals(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } static const EnumPropertyItem direction_items[] = { @@ -1399,7 +1399,7 @@ static int edbm_edge_rotate_selected_exec(bContext *C, wmOperator *op) } DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; } @@ -1416,7 +1416,7 @@ void MESH_OT_edge_rotate(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ RNA_def_enum(ot->srna, "direction", direction_items, DIRECTION_CW, "Direction", "Direction to rotate edge around"); @@ -1431,7 +1431,7 @@ static int edbm_hide_exec(bContext *C, wmOperator *op) EDBM_hide_mesh(em, RNA_boolean_get(op->ptr, "unselected")); DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; } @@ -1445,10 +1445,10 @@ void MESH_OT_hide(wmOperatorType *ot) /* api callbacks */ ot->exec = edbm_hide_exec; ot->poll = ED_operator_editmesh; - ot->description = "Hide (un)selected vertices, edges or faces"; + ot->description = "Hide (un)selected vertices, edges or faces"; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected"); @@ -1462,7 +1462,7 @@ static int edbm_reveal_exec(bContext *C, wmOperator *UNUSED(op)) EDBM_reveal_mesh(em); DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; } @@ -1479,7 +1479,7 @@ void MESH_OT_reveal(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } static int edbm_normals_make_consistent_exec(bContext *C, wmOperator *op) @@ -1496,7 +1496,7 @@ static int edbm_normals_make_consistent_exec(bContext *C, wmOperator *op) EDBM_CallOpf(em, op, "reversefaces faces=%hf", BM_ELEM_SELECT); DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; } @@ -1513,7 +1513,7 @@ void MESH_OT_normals_make_consistent(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; RNA_def_boolean(ot->srna, "inside", 0, "Inside", ""); } @@ -1574,7 +1574,7 @@ static int edbm_do_smooth_vertex_exec(bContext *C, wmOperator *op) } DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; } @@ -1591,7 +1591,7 @@ void MESH_OT_vertices_smooth(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; RNA_def_int(ot->srna, "repeat", 1, 1, 100, "Number of times to smooth the mesh", "", 1, INT_MAX); } @@ -1620,7 +1620,7 @@ static int edbm_faces_shade_smooth_exec(bContext *C, wmOperator *UNUSED(op)) mesh_set_smooth_faces(em, 1); DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; } @@ -1629,7 +1629,7 @@ void MESH_OT_faces_shade_smooth(wmOperatorType *ot) { /* identifiers */ ot->name = "Shade Smooth"; - ot->description = "Display faces smooth (using vertex normals)"; + ot->description = "Display faces smooth (using vertex normals)"; ot->idname = "MESH_OT_faces_shade_smooth"; /* api callbacks */ @@ -1637,7 +1637,7 @@ void MESH_OT_faces_shade_smooth(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } static int edbm_faces_shade_flat_exec(bContext *C, wmOperator *UNUSED(op)) @@ -1648,7 +1648,7 @@ static int edbm_faces_shade_flat_exec(bContext *C, wmOperator *UNUSED(op)) mesh_set_smooth_faces(em, 0); DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; } @@ -1665,7 +1665,7 @@ void MESH_OT_faces_shade_flat(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } @@ -1693,7 +1693,7 @@ static int edbm_rotate_uvs_exec(bContext *C, wmOperator *op) /* dependencies graph and notification stuff */ DAG_id_tag_update(ob->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); /* we succeeded */ return OPERATOR_FINISHED; @@ -1718,7 +1718,7 @@ static int edbm_reverse_uvs_exec(bContext *C, wmOperator *op) /* dependencies graph and notification stuff */ DAG_id_tag_update(ob->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); /* we succeeded */ return OPERATOR_FINISHED; @@ -1746,7 +1746,7 @@ static int edbm_rotate_colors_exec(bContext *C, wmOperator *op) /* dependencies graph and notification stuff */ DAG_id_tag_update(ob->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); /* DAG_object_flush_update(scene, ob, OB_RECALC_DATA); * WM_event_add_notifier(C, NC_OBJECT | ND_GEOM_SELECT, ob); */ @@ -1773,7 +1773,7 @@ static int edbm_reverse_colors_exec(bContext *C, wmOperator *op) } DAG_id_tag_update(ob->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); /* we succeeded */ return OPERATOR_FINISHED; @@ -1790,7 +1790,7 @@ void MESH_OT_uvs_rotate(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ RNA_def_enum(ot->srna, "direction", direction_items, DIRECTION_CW, "Direction", "Direction to rotate UVs around"); @@ -1808,7 +1808,7 @@ void MESH_OT_uvs_reverse(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ //RNA_def_enum(ot->srna, "axis", axis_items, DIRECTION_CW, "Axis", "Axis to mirror UVs around"); @@ -1825,7 +1825,7 @@ void MESH_OT_colors_rotate(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ RNA_def_enum(ot->srna, "direction", direction_items, DIRECTION_CCW, "Direction", "Direction to rotate edge around"); @@ -1842,7 +1842,7 @@ void MESH_OT_colors_reverse(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ //RNA_def_enum(ot->srna, "axis", axis_items, DIRECTION_CW, "Axis", "Axis to mirror colors around"); @@ -1955,7 +1955,7 @@ static int edbm_merge_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; } @@ -2022,7 +2022,7 @@ void MESH_OT_merge(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ ot->prop = RNA_def_enum(ot->srna, "type", merge_type_items, 3, "Type", "Merge method to use"); @@ -2056,7 +2056,7 @@ static int edbm_remove_doubles_exec(bContext *C, wmOperator *op) DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; } @@ -2072,11 +2072,11 @@ void MESH_OT_remove_doubles(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; RNA_def_float(ot->srna, "mergedist", 0.0001f, 0.000001f, 50.0f, - "Merge Distance", - "Minimum distance between elements to merge", 0.00001, 10.0); + "Merge Distance", + "Minimum distance between elements to merge", 0.00001, 10.0); } /************************ Vertex Path Operator *************************/ @@ -2139,7 +2139,7 @@ static int edbm_select_vertex_path_exec(bContext *C, wmOperator *op) * WM_event_add_notifier(C, NC_OBJECT | ND_GEOM_SELECT, ob); */ DAG_id_tag_update(ob->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); /* we succeeded */ @@ -2151,7 +2151,8 @@ void MESH_OT_select_vertex_path(wmOperatorType *ot) static const EnumPropertyItem type_items[] = { {VPATH_SELECT_EDGE_LENGTH, "EDGE_LENGTH", 0, "Edge Length", NULL}, {VPATH_SELECT_TOPOLOGICAL, "TOPOLOGICAL", 0, "Topological", NULL}, - {0, NULL, 0, NULL, NULL}}; + {0, NULL, 0, NULL, NULL} + }; /* identifiers */ ot->name = "Select Vertex Path"; @@ -2162,7 +2163,7 @@ void MESH_OT_select_vertex_path(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ RNA_def_enum(ot->srna, "type", type_items, VPATH_SELECT_EDGE_LENGTH, "Type", "Method to compute distance"); @@ -2411,7 +2412,7 @@ static int edbm_rip_invoke(bContext *C, wmOperator *op, wmEvent *event) } DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; } @@ -2427,7 +2428,7 @@ void MESH_OT_rip(wmOperatorType *ot) ot->poll = EM_view3d_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* to give to transform */ Transform_Properties(ot, P_PROPORTIONAL); @@ -2481,7 +2482,7 @@ static int edbm_shape_propagate_to_all_exec(bContext *C, wmOperator *op) shape_propagate(obedit, em, op); DAG_id_tag_update(&me->id, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, me); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, me); return OPERATOR_FINISHED; } @@ -2499,7 +2500,7 @@ void MESH_OT_shape_propagate_to_all(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /* BMESH_TODO this should be properly encapsulated in a bmop. but later.*/ @@ -2541,7 +2542,7 @@ static int edbm_blend_from_shape_exec(bContext *C, wmOperator *op) } DAG_id_tag_update(&me->id, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, me); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, me); return OPERATOR_FINISHED; } @@ -2595,7 +2596,7 @@ void MESH_OT_blend_from_shape(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ prop = RNA_def_enum(ot->srna, "shape", shape_items, 0, "Shape", "Shape key to use for blending"); @@ -2631,25 +2632,25 @@ static int edbm_select_axis_exec(bContext *C, wmOperator *op) BM_ITER(ev, &iter, em->bm, BM_VERTS_OF_MESH, NULL) { if (!BM_elem_flag_test(ev, BM_ELEM_HIDDEN)) { switch (mode) { - case -1: /* aligned */ - if (fabs(ev->co[axis] - value) < limit) - BM_elem_select_set(em->bm, ev, TRUE); - break; - case 0: /* neg */ - if (ev->co[axis] > value) - BM_elem_select_set(em->bm, ev, TRUE); - break; - case 1: /* pos */ - if (ev->co[axis] < value) - BM_elem_select_set(em->bm, ev, TRUE); - break; + case -1: /* aligned */ + if (fabs(ev->co[axis] - value) < limit) + BM_elem_select_set(em->bm, ev, TRUE); + break; + case 0: /* neg */ + if (ev->co[axis] > value) + BM_elem_select_set(em->bm, ev, TRUE); + break; + case 1: /* pos */ + if (ev->co[axis] < value) + BM_elem_select_set(em->bm, ev, TRUE); + break; } } } } EDBM_selectmode_flush(em); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; } @@ -2678,7 +2679,7 @@ void MESH_OT_select_axis(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ RNA_def_enum(ot->srna, "mode", axis_mode_items, 0, "Axis Mode", "Axis side to use when selecting"); @@ -2715,7 +2716,7 @@ static int edbm_solidify_exec(bContext *C, wmOperator *op) } DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; } @@ -2734,7 +2735,7 @@ void MESH_OT_solidify(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; prop = RNA_def_float(ot->srna, "thickness", 0.01f, -FLT_MAX, FLT_MAX, "thickness", "", -10.0f, 10.0f); RNA_def_property_ui_range(prop, -10, 10, 0.1, 4); @@ -2744,11 +2745,11 @@ void MESH_OT_solidify(wmOperatorType *ot) #define TRAIL_FREEHAND 2 #define TRAIL_MIXED 3 /* (1|2) */ #define TRAIL_AUTO 4 -#define TRAIL_MIDPOINTS 8 +#define TRAIL_MIDPOINTS 8 typedef struct CutCurve { - float x; - float y; + float x; + float y; } CutCurve; /* ******************************************************************** */ @@ -2771,9 +2772,9 @@ typedef struct CutCurve { * bmesh port version */ -#define KNIFE_EXACT 1 -#define KNIFE_MIDPOINT 2 -#define KNIFE_MULTICUT 3 +#define KNIFE_EXACT 1 +#define KNIFE_MIDPOINT 2 +#define KNIFE_MULTICUT 3 static EnumPropertyItem knife_items[] = { {KNIFE_EXACT, "EXACT", 0, "Exact", ""}, @@ -2788,13 +2789,13 @@ static float bm_edge_seg_isect(BMEdge *e, CutCurve *c, int len, char mode, struct GHash *gh, int *isected) { #define MAXSLOPE 100000 - float x11, y11, x12 = 0, y12 = 0, x2max, x2min, y2max; - float y2min, dist, lastdist = 0, xdiff2, xdiff1; - float m1, b1, m2, b2, x21, x22, y21, y22, xi; - float yi, x1min, x1max, y1max, y1min, perc = 0; + float x11, y11, x12 = 0, y12 = 0, x2max, x2min, y2max; + float y2min, dist, lastdist = 0, xdiff2, xdiff1; + float m1, b1, m2, b2, x21, x22, y21, y22, xi; + float yi, x1min, x1max, y1max, y1min, perc = 0; float *scr; - float threshold = 0.0; - int i; + float threshold = 0.0; + int i; //threshold = 0.000001; /* tolerance for vertex intersection */ // XXX threshold = scene->toolsettings->select_thresh / 100; @@ -2863,8 +2864,8 @@ static float bm_edge_seg_isect(BMEdge *e, CutCurve *c, int len, char mode, y12 = c[i].y; /* Perp. Distance from point to line */ - if (m2 != MAXSLOPE) dist = (y12 - m2 * x12 - b2);/* /sqrt(m2 * m2 + 1); Only looking for */ - /* change in sign. Skip extra math */ + if (m2 != MAXSLOPE) dist = (y12 - m2 * x12 - b2); /* /sqrt(m2 * m2 + 1); Only looking for */ + /* change in sign. Skip extra math */ else dist = x22 - x12; if (i == 0) lastdist = dist; @@ -2929,7 +2930,7 @@ static float bm_edge_seg_isect(BMEdge *e, CutCurve *c, int len, char mode, } } if ((m2 <= 1.0f) && (m2 >= -1.0f)) perc = (xi - x21) / (x22 - x21); - else perc = (yi - y21) / (y22 - y21); /* lower slope more accurate */ + else perc = (yi - y21) / (y22 - y21); /* lower slope more accurate */ //isect = 32768.0 * (perc + 0.0000153); /* Percentage in 1 / 32768ths */ break; @@ -3005,8 +3006,8 @@ static int edbm_knife_cut_exec(bContext *C, wmOperator *op) if (isect != 0.0f) { if (mode != KNIFE_MULTICUT && mode != KNIFE_MIDPOINT) { BMO_slot_map_float_insert(bm, &bmop, - "edgepercents", - be, isect); + "edgepercents", + be, isect); } BMO_elem_flag_enable(bm, be, 1); @@ -3040,7 +3041,7 @@ static int edbm_knife_cut_exec(bContext *C, wmOperator *op) BLI_ghash_free(gh, NULL, (GHashValFreeFP)MEM_freeN); DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; } @@ -3060,7 +3061,7 @@ void MESH_OT_knife_cut(wmOperatorType *ot) ot->poll = EM_view3d_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; RNA_def_enum(ot->srna, "type", knife_items, KNIFE_EXACT, "Type", ""); prop = RNA_def_property(ot->srna, "path", PROP_COLLECTION, PROP_NONE); @@ -3095,7 +3096,7 @@ static int mesh_separate_selected(Main *bmain, Scene *scene, Base *editbase, wmO CustomData_bmesh_init_pool(&bm_new->ldata, bm_mesh_allocsize_default.totloop, BM_LOOP); CustomData_bmesh_init_pool(&bm_new->pdata, bm_mesh_allocsize_default.totface, BM_FACE); - basenew = ED_object_add_duplicate(bmain, scene, editbase, USER_DUP_MESH); /* 0 = fully linked */ + basenew = ED_object_add_duplicate(bmain, scene, editbase, USER_DUP_MESH); /* 0 = fully linked */ assign_matarar(basenew->object, give_matarar(obedit), *give_totcolp(obedit)); /* new in 2.5 */ ED_base_object_select(basenew, BA_DESELECT); @@ -3232,7 +3233,7 @@ static int edbm_separate_exec(bContext *C, wmOperator *op) if (retval) { DAG_id_tag_update(base->object->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, base->object->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, base->object->data); return OPERATOR_FINISHED; } @@ -3280,14 +3281,14 @@ static int edbm_fill_exec(bContext *C, wmOperator *op) BMO_op_exec(em->bm, &bmop); /* select new geometry */ - BMO_slot_buffer_hflag_enable(em->bm, &bmop, "geomout", BM_FACE|BM_EDGE, BM_ELEM_SELECT, TRUE); + BMO_slot_buffer_hflag_enable(em->bm, &bmop, "geomout", BM_FACE | BM_EDGE, BM_ELEM_SELECT, TRUE); if (!EDBM_FinishOp(em, &bmop, op, TRUE)) { return OPERATOR_CANCELLED; } DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; @@ -3304,7 +3305,7 @@ void MESH_OT_fill(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } static int edbm_beautify_fill_exec(bContext *C, wmOperator *op) @@ -3316,7 +3317,7 @@ static int edbm_beautify_fill_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; } @@ -3332,7 +3333,7 @@ void MESH_OT_beautify_fill(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /********************** Quad/Tri Operators *************************/ @@ -3347,7 +3348,7 @@ static int edbm_quads_convert_to_tris_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; } @@ -3363,7 +3364,7 @@ void MESH_OT_quads_convert_to_tris(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; RNA_def_boolean(ot->srna, "use_beauty", 1, "Beauty", "Use best triangulation division (currently quads only)"); } @@ -3388,7 +3389,7 @@ static int edbm_tris_convert_to_quads_exec(bContext *C, wmOperator *op) } DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; } @@ -3406,7 +3407,7 @@ void MESH_OT_tris_convert_to_quads(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; prop = RNA_def_float_rotation(ot->srna, "limit", 0, NULL, 0.0f, DEG2RADF(180.0f), "Max Angle", "Angle Limit", 0.0f, DEG2RADF(180.0f)); @@ -3440,7 +3441,7 @@ static int edbm_dissolve_exec(bContext *C, wmOperator *op) DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA|ND_SELECT, obedit); + WM_event_add_notifier(C, NC_GEOM | ND_DATA | ND_SELECT, obedit); return OPERATOR_FINISHED; } @@ -3457,7 +3458,7 @@ void MESH_OT_dissolve(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* TODO, move dissolve into its own operator so this doesnt confuse non-dissolve options */ RNA_def_boolean(ot->srna, "use_verts", 0, "Dissolve Verts", @@ -3478,7 +3479,7 @@ static int edbm_dissolve_limited_exec(bContext *C, wmOperator *op) } DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; } @@ -3497,7 +3498,7 @@ void MESH_OT_dissolve_limited(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; prop = RNA_def_float_rotation(ot->srna, "angle_limit", 0, NULL, 0.0f, DEG2RADF(180.0f), "Max Angle", "Angle Limit in Degrees", 0.0f, DEG2RADF(180.0f)); @@ -3523,7 +3524,7 @@ static int edbm_split_exec(bContext *C, wmOperator *op) EDBM_RecalcNormals(em); DAG_id_tag_update(ob->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); return OPERATOR_FINISHED; } @@ -3539,7 +3540,7 @@ void MESH_OT_split(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } @@ -3582,7 +3583,7 @@ static int edbm_spin_exec(bContext *C, wmOperator *op) } DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; } @@ -3612,7 +3613,7 @@ void MESH_OT_spin(wmOperatorType *ot) ot->poll = EM_view3d_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ RNA_def_int(ot->srna, "steps", 9, 0, INT_MAX, "Steps", "Steps", 0, INT_MAX); @@ -3654,13 +3655,11 @@ static int edbm_screw_exec(bContext *C, wmOperator *op) /* find two vertices with valence count == 1, more or less is wrong */ v1 = NULL; v2 = NULL; - for (eve = BM_iter_new(&iter, em->bm, BM_VERTS_OF_MESH, NULL); - eve; eve = BM_iter_step(&iter)) { + for (eve = BM_iter_new(&iter, em->bm, BM_VERTS_OF_MESH, NULL); eve; eve = BM_iter_step(&iter)) { valence = 0; - for (eed = BM_iter_new(&eiter, em->bm, BM_EDGES_OF_VERT, eve); - eed; eed = BM_iter_step(&eiter)) { + for (eed = BM_iter_new(&eiter, em->bm, BM_EDGES_OF_VERT, eve); eed; eed = BM_iter_step(&eiter)) { if (BM_elem_flag_test(eed, BM_ELEM_SELECT)) { valence++; @@ -3708,7 +3707,7 @@ static int edbm_screw_exec(bContext *C, wmOperator *op) } DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; } @@ -3738,7 +3737,7 @@ void MESH_OT_screw(wmOperatorType *ot) ot->poll = EM_view3d_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ RNA_def_int(ot->srna, "steps", 9, 0, INT_MAX, "Steps", "Steps", 0, 256); @@ -3760,7 +3759,7 @@ static int edbm_select_by_number_vertices_exec(bContext *C, wmOperator *op) int type = RNA_enum_get(op->ptr, "type"); for (efa = BM_iter_new(&iter, em->bm, BM_FACES_OF_MESH, NULL); - efa; efa = BM_iter_step(&iter)) { + efa; efa = BM_iter_step(&iter)) { int select = 0; @@ -3784,19 +3783,18 @@ static int edbm_select_by_number_vertices_exec(bContext *C, wmOperator *op) EDBM_selectmode_flush(em); - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data); return OPERATOR_FINISHED; } void MESH_OT_select_by_number_vertices(wmOperatorType *ot) { static const EnumPropertyItem type_items[] = { - {0, "LESS", 0, "Less Than", ""}, - {1, "EQUAL", 0, "Equal To", ""}, - {2, "GREATER", 0, "Greater Than", ""}, - {3, "NOTEQUAL", 0, "Not Equal To", ""}, - {0, NULL, 0, NULL, NULL} - }; + {0, "LESS", 0, "Less Than", ""}, + {1, "EQUAL", 0, "Equal To", ""}, + {2, "GREATER", 0, "Greater Than", ""}, + {3, "NOTEQUAL", 0, "Not Equal To", ""}, + {0, NULL, 0, NULL, NULL}}; /* identifiers */ ot->name = "Select by Number of Vertices"; @@ -3808,7 +3806,7 @@ void MESH_OT_select_by_number_vertices(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ RNA_def_int(ot->srna, "number", 4, 3, INT_MAX, "Number of Vertices", "", 3, INT_MAX); @@ -3824,7 +3822,7 @@ static int edbm_select_loose_verts_exec(bContext *C, wmOperator *UNUSED(op)) BMIter iter; for (eve = BM_iter_new(&iter, em->bm, BM_VERTS_OF_MESH, NULL); - eve; eve = BM_iter_step(&iter)) { + eve; eve = BM_iter_step(&iter)) { if (!eve->e) { BM_elem_select_set(em->bm, eve, TRUE); @@ -3832,7 +3830,7 @@ static int edbm_select_loose_verts_exec(bContext *C, wmOperator *UNUSED(op)) } for (eed = BM_iter_new(&iter, em->bm, BM_EDGES_OF_MESH, NULL); - eed; eed = BM_iter_step(&iter)) { + eed; eed = BM_iter_step(&iter)) { if (!eed->l) { BM_elem_select_set(em->bm, eed, TRUE); @@ -3841,7 +3839,7 @@ static int edbm_select_loose_verts_exec(bContext *C, wmOperator *UNUSED(op)) EDBM_selectmode_flush(em); - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data); return OPERATOR_FINISHED; } @@ -3857,7 +3855,7 @@ void MESH_OT_select_loose_verts(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } static int edbm_select_mirror_exec(bContext *C, wmOperator *op) @@ -3868,7 +3866,7 @@ static int edbm_select_mirror_exec(bContext *C, wmOperator *op) EDBM_select_mirrored(obedit, em, extend); EDBM_selectmode_flush(em); - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data); return OPERATOR_FINISHED; } @@ -3885,7 +3883,7 @@ void MESH_OT_select_mirror(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend the existing selection"); @@ -3907,8 +3905,8 @@ static int vergxco(const void *v1, const void *v2) { const xvertsort *x1 = v1, *x2 = v2; - if (x1->x > x2->x) return 1; - else if (x1->x < x2->x) return -1; + if (x1->x > x2->x) return 1; + else if (x1->x < x2->x) return -1; return 0; } @@ -3921,8 +3919,8 @@ static int vergface(const void *v1, const void *v2) { const struct facesort *x1 = v1, *x2 = v2; - if (x1->x > x2->x) return 1; - else if (x1->x < x2->x) return -1; + if (x1->x > x2->x) return 1; + else if (x1->x < x2->x) return -1; return 0; } #endif @@ -3956,7 +3954,8 @@ static void xsortvert_flag(bContext *UNUSED(C), int UNUSED(flag)) amount = em->bm->totvert; sortblock = MEM_callocN(sizeof(xvertsort) * amount, "xsort"); - BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) { + BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) + { if (BM_elem_flag_test(eve, BM_ELEM_SELECT)) sortblock[i].v1 = eve; } @@ -3966,7 +3965,7 @@ static void xsortvert_flag(bContext *UNUSED(C), int UNUSED(flag)) qsort(sortblock, amount, sizeof(xvertsort), vergxco); - /* make temporal listbase */ + /* make temporal listbase */ tbase.first = tbase.last = 0; for (i = 0; i < amount; i++) { eve = sortblock[i].v1; @@ -4003,7 +4002,7 @@ void MESH_OT_vertices_sort(wmOperatorType *ot) ot->poll = EM_view3d_poll; /* uses view relative X axis to sort verts */ /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /* ********************** SORT FACES ******************* */ @@ -4099,7 +4098,7 @@ static int edbm_sort_faces_exec(bContext *C, wmOperator *op) float cur[3]; if (event == 1) - mult_m4_m4m4(mat, rv3d->viewmat, OBACT->obmat); /* apply the view matrix to the object matrix */ + mult_m4_m4m4(mat, rv3d->viewmat, OBACT->obmat); /* apply the view matrix to the object matrix */ else if (event == 2) { /* sort from cursor */ if (v3d && v3d->localvd) { copy_v3_v3(cur, v3d->cursor); @@ -4182,7 +4181,7 @@ void MESH_OT_sort_faces(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ ot->prop = RNA_def_enum(ot->srna, "type", type_items, 0, "Type", ""); @@ -4273,7 +4272,7 @@ void MESH_OT_vertices_randomize(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /******end of qsort stuff ****/ @@ -4328,7 +4327,7 @@ static int edbm_noise_exec(bContext *C, wmOperator *op) EDBM_RecalcNormals(em); DAG_id_tag_update(obedit->data, 0); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; } @@ -4345,7 +4344,7 @@ void MESH_OT_noise(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; RNA_def_float(ot->srna, "factor", 0.1f, -FLT_MAX, FLT_MAX, "Factor", "", 0.0f, 1.0f); } @@ -4417,7 +4416,7 @@ static int edbm_bevel_exec(bContext *C, wmOperator *op) EDBM_RecalcNormals(em); DAG_id_tag_update(obedit->data, 0); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; } @@ -4434,7 +4433,7 @@ void MESH_OT_bevel(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; RNA_def_float(ot->srna, "percent", 0.5f, -FLT_MAX, FLT_MAX, "Percentage", "", 0.0f, 1.0f); RNA_def_int(ot->srna, "recursion", 1, 1, 50, "Recursion Level", "Recursion Level", 1, 8); @@ -4453,7 +4452,7 @@ static int edbm_bridge_edge_loops_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; } @@ -4470,7 +4469,7 @@ void MESH_OT_bridge_edge_loops(wmOperatorType *ot) ot->poll = ED_operator_editmesh; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; RNA_def_boolean(ot->srna, "inside", 0, "Inside", ""); } @@ -4504,7 +4503,7 @@ static int edbm_inset_exec(bContext *C, wmOperator *op) } else { DAG_id_tag_update(obedit->data, 0); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; } @@ -4524,7 +4523,7 @@ void MESH_OT_inset(wmOperatorType *ot) ot->description = ""; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ // RNA_def_boolean(ot->srna, "use_boundary", TRUE, "Boundary", "Inset face boundries"); diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index bf37dbbea2e..f5b28f88639 100644 --- a/source/blender/editors/mesh/editmesh_utils.c +++ b/source/blender/editors/mesh/editmesh_utils.c @@ -214,7 +214,7 @@ int EDBM_CallAndSelectOpf(BMEditMesh *em, wmOperator *op, const char *selectslot BMO_op_exec(bm, &bmop); - BM_mesh_elem_flag_disable_all(em->bm, BM_VERT|BM_EDGE|BM_FACE, BM_ELEM_SELECT); + BM_mesh_elem_flag_disable_all(em->bm, BM_VERT | BM_EDGE | BM_FACE, BM_ELEM_SELECT); BMO_slot_buffer_hflag_enable(em->bm, &bmop, selectslot, BM_ALL, BM_ELEM_SELECT, TRUE); @@ -257,7 +257,7 @@ void EDBM_selectmode_to_scene(bContext *C) scene->toolsettings->selectmode = em->selectmode; /* Request redraw of header buttons (to show new select mode) */ - WM_event_add_notifier(C, NC_SCENE|ND_TOOLSETTINGS, scene); + WM_event_add_notifier(C, NC_SCENE | ND_TOOLSETTINGS, scene); } void EDBM_MakeEditBMesh(ToolSettings *ts, Scene *UNUSED(scene), Object *ob) @@ -376,12 +376,12 @@ void EDBM_free_index_arrays(BMEditMesh *tm) BMVert *EDBM_get_vert_for_index(BMEditMesh *tm, int index) { - return tm->vert_index && index < tm->bm->totvert ?tm->vert_index[index]:NULL; + return tm->vert_index && index < tm->bm->totvert ? tm->vert_index[index] : NULL; } BMEdge *EDBM_get_edge_for_index(BMEditMesh *tm, int index) { - return tm->edge_index && index < tm->bm->totedge ?tm->edge_index[index]:NULL; + return tm->edge_index && index < tm->bm->totedge ? tm->edge_index[index] : NULL; } BMFace *EDBM_get_face_for_index(BMEditMesh *tm, int index) @@ -483,12 +483,12 @@ int EDBM_get_actSelection(BMEditMesh *em, BMEditSelection *ese) void EDBM_flag_disable_all(BMEditMesh *em, const char hflag) { - BM_mesh_elem_flag_disable_all(em->bm, BM_VERT|BM_EDGE|BM_FACE, hflag); + BM_mesh_elem_flag_disable_all(em->bm, BM_VERT | BM_EDGE | BM_FACE, hflag); } void EDBM_flag_enable_all(BMEditMesh *em, const char hflag) { - BM_mesh_elem_flag_enable_all(em->bm, BM_VERT|BM_EDGE|BM_FACE, hflag); + BM_mesh_elem_flag_enable_all(em->bm, BM_VERT | BM_EDGE | BM_FACE, hflag); } /**************-------------- Undo ------------*****************/ @@ -998,7 +998,7 @@ int EDBM_texFaceCheck(BMEditMesh *em) { /* some of these checks could be a touch overkill */ return em && em->bm->totface && CustomData_has_layer(&em->bm->pdata, CD_MTEXPOLY) && - CustomData_has_layer(&em->bm->ldata, CD_MLOOPUV); + CustomData_has_layer(&em->bm->ldata, CD_MLOOPUV); } int EDBM_vertColorCheck(BMEditMesh *em) @@ -1052,7 +1052,7 @@ void EDBM_CacheMirrorVerts(BMEditMesh *em, const short use_select) ED_mesh_mirrtopo_init(me, -1, &mesh_topo_store, TRUE); } else { - tree = BMBVH_NewBVH(em, 0, NULL, NULL); + tree = BMBVH_NewBVH(em, 0, NULL, NULL); } BM_ITER(v, &iter, bm, BM_VERTS_OF_MESH, NULL) { @@ -1198,8 +1198,7 @@ void EDBM_reveal_mesh(BMEditMesh *em) int sels[3] = {(em->selectmode & SCE_SELECT_VERTEX), (em->selectmode & SCE_SELECT_EDGE), - (em->selectmode & SCE_SELECT_FACE), - }; + (em->selectmode & SCE_SELECT_FACE), }; BMIter iter; BMElem *ele; diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c index 736f8b976f8..3c54848e9ea 100644 --- a/source/blender/editors/mesh/mesh_data.c +++ b/source/blender/editors/mesh/mesh_data.c @@ -79,8 +79,8 @@ static void delete_customdata_layer(bContext *C, Object *ob, CustomDataLayer *la { Mesh *me = ob->data; CustomData *data; - void *actlayerdata, *rndlayerdata, *clonelayerdata, *stencillayerdata, *layerdata=layer->data; - int type= layer->type; + void *actlayerdata, *rndlayerdata, *clonelayerdata, *stencillayerdata, *layerdata = layer->data; + int type = layer->type; int index; int i, actindex, rndindex, cloneindex, stencilindex, tot; @@ -135,7 +135,7 @@ static void delete_customdata_layer(bContext *C, Object *ob, CustomDataLayer *la if (actlayerdata != layerdata) { /* find index */ actindex = CustomData_get_layer_index(data, type); - for (i=actindex; itotlayer; i++) { + for (i = actindex; i < data->totlayer; i++) { if (data->layers[i].data == actlayerdata) { actindex = i - actindex; break; @@ -149,7 +149,7 @@ static void delete_customdata_layer(bContext *C, Object *ob, CustomDataLayer *la if (rndlayerdata != layerdata) { /* find index */ rndindex = CustomData_get_layer_index(data, type); - for (i=rndindex; itotlayer; i++) { + for (i = rndindex; i < data->totlayer; i++) { if (data->layers[i].data == rndlayerdata) { rndindex = i - rndindex; break; @@ -163,7 +163,7 @@ static void delete_customdata_layer(bContext *C, Object *ob, CustomDataLayer *la if (clonelayerdata != layerdata) { /* find index */ cloneindex = CustomData_get_layer_index(data, type); - for (i=cloneindex; itotlayer; i++) { + for (i = cloneindex; i < data->totlayer; i++) { if (data->layers[i].data == clonelayerdata) { cloneindex = i - cloneindex; break; @@ -177,7 +177,7 @@ static void delete_customdata_layer(bContext *C, Object *ob, CustomDataLayer *la if (stencillayerdata != layerdata) { /* find index */ stencilindex = CustomData_get_layer_index(data, type); - for (i=stencilindex; itotlayer; i++) { + for (i = stencilindex; i < data->totlayer; i++) { if (data->layers[i].data == stencillayerdata) { stencilindex = i - stencilindex; break; @@ -197,10 +197,10 @@ static void copy_editface_active_customdata(BMEditMesh *em, int type, int index) (void)index; #else EditFace *efa; - int n= CustomData_get_active_layer(&em->fdata, type); + int n = CustomData_get_active_layer(&em->fdata, type); - for (efa= em->faces.first; efa; efa= efa->next) { - void *data= CustomData_em_get_n(&em->fdata, efa->data, type, n); + for (efa = em->faces.first; efa; efa = efa->next) { + void *data = CustomData_em_get_n(&em->fdata, efa->data, type, n); CustomData_em_set_n(&em->fdata, efa->data, type, index, data); } #endif @@ -208,7 +208,7 @@ static void copy_editface_active_customdata(BMEditMesh *em, int type, int index) int ED_mesh_uv_loop_reset_ex(struct bContext *C, struct Mesh *me, const int layernum) { - BMEditMesh *em= me->edit_btmesh; + BMEditMesh *em = me->edit_btmesh; MLoopUV *luv; BLI_array_declare(polylengths); int *polylengths = NULL; @@ -287,12 +287,12 @@ int ED_mesh_uv_loop_reset_ex(struct bContext *C, struct Mesh *me, const int laye fuvs[3][0] = 0.0; fuvs[3][1] = 1.0; - /*make sure we ignore 2-sided faces*/ + /*make sure we ignore 2-sided faces*/ } else if (len > 2) { float fac = 0.0f, dfac = 1.0f / (float)len; - dfac *= M_PI*2; + dfac *= M_PI * 2; for (i = 0; i < len; i++) { fuvs[i][0] = 0.5f * sin(fac) + 0.5f; @@ -309,7 +309,7 @@ int ED_mesh_uv_loop_reset_ex(struct bContext *C, struct Mesh *me, const int laye BLI_array_free(polylengths); DAG_id_tag_update(&me->id, 0); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, me); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, me); return 1; } @@ -328,7 +328,7 @@ int ED_mesh_uv_texture_add(bContext *C, Mesh *me, const char *name, int active_s int layernum; if (me->edit_btmesh) { - em= me->edit_btmesh; + em = me->edit_btmesh; layernum = CustomData_number_of_layers(&em->bm->pdata, CD_MTEXPOLY); if (layernum >= MAX_MTFACE) @@ -383,7 +383,7 @@ int ED_mesh_uv_texture_add(bContext *C, Mesh *me, const char *name, int active_s ED_mesh_uv_loop_reset_ex(C, me, layernum); DAG_id_tag_update(&me->id, 0); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, me); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, me); return layernum; } @@ -394,11 +394,11 @@ int ED_mesh_uv_texture_remove(bContext *C, Object *ob, Mesh *me) CustomDataLayer *cdlp, *cdlu; int index; - index= CustomData_get_active_layer_index(pdata, CD_MTEXPOLY); - cdlp= (index == -1)? NULL: &pdata->layers[index]; + index = CustomData_get_active_layer_index(pdata, CD_MTEXPOLY); + cdlp = (index == -1) ? NULL : &pdata->layers[index]; - index= CustomData_get_active_layer_index(ldata, CD_MLOOPUV); - cdlu= (index == -1)? NULL: &ldata->layers[index]; + index = CustomData_get_active_layer_index(ldata, CD_MLOOPUV); + cdlu = (index == -1) ? NULL : &ldata->layers[index]; if (!cdlp || !cdlu) return 0; @@ -407,7 +407,7 @@ int ED_mesh_uv_texture_remove(bContext *C, Object *ob, Mesh *me) delete_customdata_layer(C, ob, cdlu); DAG_id_tag_update(&me->id, 0); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, me); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, me); return 1; } @@ -418,9 +418,9 @@ int ED_mesh_color_add(bContext *C, Scene *UNUSED(scene), Object *UNUSED(ob), Mes int layernum; if (me->edit_btmesh) { - em= me->edit_btmesh; + em = me->edit_btmesh; - layernum= CustomData_number_of_layers(&em->bm->ldata, CD_MLOOPCOL); + layernum = CustomData_number_of_layers(&em->bm->ldata, CD_MLOOPCOL); if (layernum >= MAX_MCOL) { return -1; } @@ -438,7 +438,7 @@ int ED_mesh_color_add(bContext *C, Scene *UNUSED(scene), Object *UNUSED(ob), Mes } } else { - layernum= CustomData_number_of_layers(&me->ldata, CD_MLOOPCOL); + layernum = CustomData_number_of_layers(&me->ldata, CD_MLOOPCOL); if (layernum >= CD_MLOOPCOL) { return -1; } @@ -452,7 +452,7 @@ int ED_mesh_color_add(bContext *C, Scene *UNUSED(scene), Object *UNUSED(ob), Mes CustomData_add_layer_named(&me->fdata, CD_MCOL, CD_DEFAULT, NULL, me->totface, name); } - if (active_set || layernum==0) { + if (active_set || layernum == 0) { CustomData_set_layer_active(&me->ldata, CD_MLOOPCOL, layernum); CustomData_set_layer_active(&me->fdata, CD_MCOL, layernum); } @@ -461,7 +461,7 @@ int ED_mesh_color_add(bContext *C, Scene *UNUSED(scene), Object *UNUSED(ob), Mes } DAG_id_tag_update(&me->id, 0); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, me); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, me); return layernum; } @@ -472,15 +472,15 @@ int ED_mesh_color_remove(bContext *C, Object *ob, Mesh *me) CustomDataLayer *cdl; int index; - index= CustomData_get_active_layer_index(ldata, CD_MLOOPCOL); - cdl= (index == -1)? NULL: &ldata->layers[index]; + index = CustomData_get_active_layer_index(ldata, CD_MLOOPCOL); + cdl = (index == -1) ? NULL : &ldata->layers[index]; if (!cdl) return 0; delete_customdata_layer(C, ob, cdl); DAG_id_tag_update(&me->id, 0); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, me); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, me); return 1; } @@ -491,7 +491,7 @@ int ED_mesh_color_remove_named(bContext *C, Object *ob, Mesh *me, const char *na CustomDataLayer *cdl; int index; - index= CustomData_get_named_layer_index(ldata, CD_MLOOPCOL, name); + index = CustomData_get_named_layer_index(ldata, CD_MLOOPCOL, name); cdl = (index == -1) ? NULL : &ldata->layers[index]; if (!cdl) @@ -499,7 +499,7 @@ int ED_mesh_color_remove_named(bContext *C, Object *ob, Mesh *me, const char *na delete_customdata_layer(C, ob, cdl); DAG_id_tag_update(&me->id, 0); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, me); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, me); return 1; } @@ -508,15 +508,15 @@ int ED_mesh_color_remove_named(bContext *C, Object *ob, Mesh *me, const char *na static int layers_poll(bContext *C) { - Object *ob= ED_object_context(C); - ID *data= (ob)? ob->data: NULL; - return (ob && !ob->id.lib && ob->type==OB_MESH && data && !data->lib); + Object *ob = ED_object_context(C); + ID *data = (ob) ? ob->data : NULL; + return (ob && !ob->id.lib && ob->type == OB_MESH && data && !data->lib); } static int mesh_uv_texture_add_exec(bContext *C, wmOperator *UNUSED(op)) { - Object *ob= ED_object_context(C); - Mesh *me= ob->data; + Object *ob = ED_object_context(C); + Mesh *me = ob->data; if (ED_mesh_uv_texture_add(C, me, NULL, TRUE) == -1) return OPERATOR_CANCELLED; @@ -536,23 +536,23 @@ void MESH_OT_uv_texture_add(wmOperatorType *ot) ot->exec = mesh_uv_texture_add_exec; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } static int drop_named_image_invoke(bContext *C, wmOperator *op, wmEvent *event) { - Main *bmain= CTX_data_main(C); - Scene *scene= CTX_data_scene(C); - View3D *v3d= CTX_wm_view3d(C); - Base *base= ED_view3d_give_base_under_cursor(C, event->mval); - Image *ima= NULL; + Main *bmain = CTX_data_main(C); + Scene *scene = CTX_data_scene(C); + View3D *v3d = CTX_wm_view3d(C); + Base *base = ED_view3d_give_base_under_cursor(C, event->mval); + Image *ima = NULL; Mesh *me; Object *obedit; - int exitmode= 0; - char name[MAX_ID_NAME-2]; + int exitmode = 0; + char name[MAX_ID_NAME - 2]; /* Check context */ - if (base==NULL || base->object->type!=OB_MESH) { + if (base == NULL || base->object->type != OB_MESH) { BKE_report(op->reports, RPT_ERROR, "Not an Object or Mesh"); return OPERATOR_CANCELLED; } @@ -562,11 +562,11 @@ static int drop_named_image_invoke(bContext *C, wmOperator *op, wmEvent *event) char path[FILE_MAX]; RNA_string_get(op->ptr, "filepath", path); - ima= BKE_add_image_file(path); + ima = BKE_add_image_file(path); } else { RNA_string_get(op->ptr, "name", name); - ima= (Image *)find_id("IM", name); + ima = (Image *)find_id("IM", name); } if (!ima) { @@ -576,13 +576,13 @@ static int drop_named_image_invoke(bContext *C, wmOperator *op, wmEvent *event) /* put mesh in editmode */ - obedit= base->object; - me= obedit->data; - if (me->edit_btmesh==NULL) { + obedit = base->object; + me = obedit->data; + if (me->edit_btmesh == NULL) { EDBM_MakeEditBMesh(scene->toolsettings, scene, obedit); - exitmode= 1; + exitmode = 1; } - if (me->edit_btmesh==NULL) + if (me->edit_btmesh == NULL) return OPERATOR_CANCELLED; ED_uvedit_assign_image(bmain, scene, obedit, ima, NULL); @@ -591,7 +591,7 @@ static int drop_named_image_invoke(bContext *C, wmOperator *op, wmEvent *event) EDBM_LoadEditBMesh(scene, obedit); EDBM_FreeEditBMesh(me->edit_btmesh); MEM_freeN(me->edit_btmesh); - me->edit_btmesh= NULL; + me->edit_btmesh = NULL; /* load_editMesh free's pointers used by CustomData layers which might be used by DerivedMesh too, * so signal to re-create DerivedMesh here (sergey) */ @@ -602,7 +602,7 @@ static int drop_named_image_invoke(bContext *C, wmOperator *op, wmEvent *event) if (v3d) v3d->flag2 |= V3D_SOLID_TEX; - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; } @@ -622,14 +622,14 @@ void MESH_OT_drop_named_image(wmOperatorType *ot) ot->flag = OPTYPE_UNDO; /* properties */ - RNA_def_string(ot->srna, "name", "Image", MAX_ID_NAME-2, "Name", "Image name to assign"); + RNA_def_string(ot->srna, "name", "Image", MAX_ID_NAME - 2, "Name", "Image name to assign"); RNA_def_string(ot->srna, "filepath", "Path", FILE_MAX, "Filepath", "Path to image file"); } static int mesh_uv_texture_remove_exec(bContext *C, wmOperator *UNUSED(op)) { - Object *ob= ED_object_context(C); - Mesh *me= ob->data; + Object *ob = ED_object_context(C); + Mesh *me = ob->data; if (!ED_mesh_uv_texture_remove(C, ob, me)) return OPERATOR_CANCELLED; @@ -649,16 +649,16 @@ void MESH_OT_uv_texture_remove(wmOperatorType *ot) ot->exec = mesh_uv_texture_remove_exec; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /*********************** vertex color operators ************************/ static int mesh_vertex_color_add_exec(bContext *C, wmOperator *UNUSED(op)) { - Scene *scene= CTX_data_scene(C); - Object *ob= ED_object_context(C); - Mesh *me= ob->data; + Scene *scene = CTX_data_scene(C); + Object *ob = ED_object_context(C); + Mesh *me = ob->data; if (ED_mesh_color_add(C, scene, ob, me, NULL, TRUE) == -1) return OPERATOR_CANCELLED; @@ -678,13 +678,13 @@ void MESH_OT_vertex_color_add(wmOperatorType *ot) ot->exec = mesh_vertex_color_add_exec; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } static int mesh_vertex_color_remove_exec(bContext *C, wmOperator *UNUSED(op)) { - Object *ob= ED_object_context(C); - Mesh *me= ob->data; + Object *ob = ED_object_context(C); + Mesh *me = ob->data; if (!ED_mesh_color_remove(C, ob, me)) return OPERATOR_CANCELLED; @@ -704,17 +704,17 @@ void MESH_OT_vertex_color_remove(wmOperatorType *ot) ot->poll = layers_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /*********************** sticky operators ************************/ static int mesh_sticky_add_exec(bContext *C, wmOperator *UNUSED(op)) { - Scene *scene= CTX_data_scene(C); - View3D *v3d= CTX_wm_view3d(C); - Object *ob= ED_object_context(C); - Mesh *me= ob->data; + Scene *scene = CTX_data_scene(C); + View3D *v3d = CTX_wm_view3d(C); + Object *ob = ED_object_context(C); + Mesh *me = ob->data; /* why is this commented out? */ #if 0 @@ -725,7 +725,7 @@ static int mesh_sticky_add_exec(bContext *C, wmOperator *UNUSED(op)) RE_make_sticky(scene, v3d); DAG_id_tag_update(&me->id, 0); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, me); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, me); return OPERATOR_FINISHED; } @@ -742,22 +742,22 @@ void MESH_OT_sticky_add(wmOperatorType *ot) ot->exec = mesh_sticky_add_exec; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } static int mesh_sticky_remove_exec(bContext *C, wmOperator *UNUSED(op)) { - Object *ob= ED_object_context(C); - Mesh *me= ob->data; + Object *ob = ED_object_context(C); + Mesh *me = ob->data; if (!me->msticky) return OPERATOR_CANCELLED; CustomData_free_layer_active(&me->vdata, CD_MSTICKY, me->totvert); - me->msticky= NULL; + me->msticky = NULL; DAG_id_tag_update(&me->id, 0); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, me); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, me); return OPERATOR_FINISHED; } @@ -774,7 +774,7 @@ void MESH_OT_sticky_remove(wmOperatorType *ot) ot->exec = mesh_sticky_remove_exec; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /************************** Add Geometry Layers *************************/ @@ -832,7 +832,7 @@ void ED_mesh_update(Mesh *mesh, bContext *C, int calc_edges, int calc_tessface) #endif DAG_id_tag_update(&mesh->id, 0); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, mesh); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, mesh); } static void mesh_add_verts(Mesh *mesh, int len) @@ -844,7 +844,7 @@ static void mesh_add_verts(Mesh *mesh, int len) if (len == 0) return; - totvert= mesh->totvert + len; + totvert = mesh->totvert + len; CustomData_copy(&mesh->vdata, &vdata, CD_MASK_MESH, CD_DEFAULT, totvert); CustomData_copy_data(&mesh->vdata, &vdata, 0, 0, mesh->totvert); @@ -852,25 +852,25 @@ static void mesh_add_verts(Mesh *mesh, int len) CustomData_add_layer(&vdata, CD_MVERT, CD_CALLOC, NULL, totvert); CustomData_free(&mesh->vdata, mesh->totvert); - mesh->vdata= vdata; + mesh->vdata = vdata; mesh_update_customdata_pointers(mesh, FALSE); /* scan the input list and insert the new vertices */ - mvert= &mesh->mvert[mesh->totvert]; - for (i=0; imvert[mesh->totvert]; + for (i = 0; i < len; i++, mvert++) mvert->flag |= SELECT; /* set final vertex list size */ - mesh->totvert= totvert; + mesh->totvert = totvert; } void ED_mesh_transform(Mesh *me, float *mat) { int i; - MVert *mvert= me->mvert; + MVert *mvert = me->mvert; - for (i= 0; i < me->totvert; i++, mvert++) + for (i = 0; i < me->totvert; i++, mvert++) mul_m4_v3((float (*)[4])mat, mvert->co); mesh_calc_normals_mapping(me->mvert, me->totvert, me->mloop, me->mpoly, me->totloop, me->totpoly, NULL, NULL, 0, NULL, NULL); @@ -885,7 +885,7 @@ static void mesh_add_edges(Mesh *mesh, int len) if (len == 0) return; - totedge= mesh->totedge+len; + totedge = mesh->totedge + len; /* update customdata */ CustomData_copy(&mesh->edata, &edata, CD_MASK_MESH, CD_DEFAULT, totedge); @@ -895,15 +895,15 @@ static void mesh_add_edges(Mesh *mesh, int len) CustomData_add_layer(&edata, CD_MEDGE, CD_CALLOC, NULL, totedge); CustomData_free(&mesh->edata, mesh->totedge); - mesh->edata= edata; + mesh->edata = edata; mesh_update_customdata_pointers(mesh, FALSE); /* new edges don't change tessellation */ /* set default flags */ - medge= &mesh->medge[mesh->totedge]; - for (i=0; iflag= ME_EDGEDRAW|ME_EDGERENDER|SELECT; + medge = &mesh->medge[mesh->totedge]; + for (i = 0; i < len; i++, medge++) + medge->flag = ME_EDGEDRAW | ME_EDGERENDER | SELECT; - mesh->totedge= totedge; + mesh->totedge = totedge; } static void mesh_add_faces(Mesh *mesh, int len) @@ -915,7 +915,7 @@ static void mesh_add_faces(Mesh *mesh, int len) if (len == 0) return; - totface= mesh->totface + len; /* new face count */ + totface = mesh->totface + len; /* new face count */ /* update customdata */ CustomData_copy(&mesh->fdata, &fdata, CD_MASK_MESH, CD_DEFAULT, totface); @@ -925,15 +925,15 @@ static void mesh_add_faces(Mesh *mesh, int len) CustomData_add_layer(&fdata, CD_MFACE, CD_CALLOC, NULL, totface); CustomData_free(&mesh->fdata, mesh->totface); - mesh->fdata= fdata; + mesh->fdata = fdata; mesh_update_customdata_pointers(mesh, TRUE); /* set default flags */ - mface= &mesh->mface[mesh->totface]; - for (i=0; iflag= ME_FACE_SEL; + mface = &mesh->mface[mesh->totface]; + for (i = 0; i < len; i++, mface++) + mface->flag = ME_FACE_SEL; - mesh->totface= totface; + mesh->totface = totface; } static void mesh_add_loops(Mesh *mesh, int len) @@ -944,7 +944,7 @@ static void mesh_add_loops(Mesh *mesh, int len) if (len == 0) return; - totloop= mesh->totloop + len; /* new face count */ + totloop = mesh->totloop + len; /* new face count */ /* update customdata */ CustomData_copy(&mesh->ldata, &ldata, CD_MASK_MESH, CD_DEFAULT, totloop); @@ -954,10 +954,10 @@ static void mesh_add_loops(Mesh *mesh, int len) CustomData_add_layer(&ldata, CD_MLOOP, CD_CALLOC, NULL, totloop); CustomData_free(&mesh->ldata, mesh->totloop); - mesh->ldata= ldata; + mesh->ldata = ldata; mesh_update_customdata_pointers(mesh, TRUE); - mesh->totloop= totloop; + mesh->totloop = totloop; } static void mesh_add_polys(Mesh *mesh, int len) @@ -969,7 +969,7 @@ static void mesh_add_polys(Mesh *mesh, int len) if (len == 0) return; - totpoly= mesh->totpoly + len; /* new face count */ + totpoly = mesh->totpoly + len; /* new face count */ /* update customdata */ CustomData_copy(&mesh->pdata, &pdata, CD_MASK_MESH, CD_DEFAULT, totpoly); @@ -979,15 +979,15 @@ static void mesh_add_polys(Mesh *mesh, int len) CustomData_add_layer(&pdata, CD_MPOLY, CD_CALLOC, NULL, totpoly); CustomData_free(&mesh->pdata, mesh->totpoly); - mesh->pdata= pdata; + mesh->pdata = pdata; mesh_update_customdata_pointers(mesh, TRUE); /* set default flags */ - mpoly= &mesh->mpoly[mesh->totpoly]; - for (i=0; iflag= ME_FACE_SEL; + mpoly = &mesh->mpoly[mesh->totpoly]; + for (i = 0; i < len; i++, mpoly++) + mpoly->flag = ME_FACE_SEL; - mesh->totpoly= totpoly; + mesh->totpoly = totpoly; } static void mesh_remove_verts(Mesh *mesh, int len) @@ -997,11 +997,11 @@ static void mesh_remove_verts(Mesh *mesh, int len) if (len == 0) return; - totvert= mesh->totvert - len; + totvert = mesh->totvert - len; CustomData_free_elem(&mesh->vdata, totvert, len); /* set final vertex list size */ - mesh->totvert= totvert; + mesh->totvert = totvert; } static void mesh_remove_edges(Mesh *mesh, int len) @@ -1011,10 +1011,10 @@ static void mesh_remove_edges(Mesh *mesh, int len) if (len == 0) return; - totedge= mesh->totedge - len; + totedge = mesh->totedge - len; CustomData_free_elem(&mesh->edata, totedge, len); - mesh->totedge= totedge; + mesh->totedge = totedge; } static void mesh_remove_faces(Mesh *mesh, int len) @@ -1024,10 +1024,10 @@ static void mesh_remove_faces(Mesh *mesh, int len) if (len == 0) return; - totface= mesh->totface - len; /* new face count */ + totface = mesh->totface - len; /* new face count */ CustomData_free_elem(&mesh->fdata, totface, len); - mesh->totface= totface; + mesh->totface = totface; } #if 0 @@ -1061,7 +1061,7 @@ void ED_mesh_edges_add(Mesh *mesh, ReportList *reports, int count) { if (mesh->edit_btmesh) { BKE_report(reports, RPT_ERROR, "Can't add edges in edit mode"); - return; + return; } mesh_add_edges(mesh, count); @@ -1123,7 +1123,7 @@ void ED_mesh_loops_add(Mesh *mesh, ReportList *reports, int count) { if (mesh->edit_btmesh) { BKE_report(reports, RPT_ERROR, "Can't add loops in edit mode."); - return; + return; } mesh_add_loops(mesh, count); diff --git a/source/blender/editors/mesh/mesh_navmesh.c b/source/blender/editors/mesh/mesh_navmesh.c index 02ef1540cc1..c95a81d5a37 100644 --- a/source/blender/editors/mesh/mesh_navmesh.c +++ b/source/blender/editors/mesh/mesh_navmesh.c @@ -85,89 +85,90 @@ static void createVertsTrisData(bContext *C, LinkNode *obs, int *nverts_r, float ntris = 0; /* calculate number of verts and tris */ - for (oblink = obs; oblink; oblink= oblink->next) { - ob= (Object*) oblink->link; - dm= mesh_create_derived_no_virtual(scene, ob, NULL, CD_MASK_MESH); - BLI_linklist_append(&dms, (void*)dm); + for (oblink = obs; oblink; oblink = oblink->next) { + ob = (Object *) oblink->link; + dm = mesh_create_derived_no_virtual(scene, ob, NULL, CD_MASK_MESH); + BLI_linklist_append(&dms, (void *)dm); - nverts+= dm->getNumVerts(dm); - nfaces= dm->getNumTessFaces(dm); - ntris+= nfaces; + nverts += dm->getNumVerts(dm); + nfaces = dm->getNumTessFaces(dm); + ntris += nfaces; /* resolve quad faces */ - mface= dm->getTessFaceArray(dm); - for (i= 0; igetTessFaceArray(dm); + for (i = 0; i < nfaces; i++) { + MFace *mf = &mface[i]; if (mf->v4) - ntris+=1; + ntris += 1; } } /* create data */ - verts= MEM_mallocN(sizeof(float)*3*nverts, "createVertsTrisData verts"); - tris= MEM_mallocN(sizeof(int)*3*ntris, "createVertsTrisData faces"); + verts = MEM_mallocN(sizeof(float) * 3 * nverts, "createVertsTrisData verts"); + tris = MEM_mallocN(sizeof(int) * 3 * ntris, "createVertsTrisData faces"); - basenverts= 0; - tri= tris; - for (oblink= obs, dmlink= dms; oblink && dmlink; - oblink= oblink->next, dmlink= dmlink->next) { - ob= (Object*) oblink->link; - dm= (DerivedMesh*) dmlink->link; + basenverts = 0; + tri = tris; + for (oblink = obs, dmlink = dms; oblink && dmlink; + oblink = oblink->next, dmlink = dmlink->next) + { + ob = (Object *) oblink->link; + dm = (DerivedMesh *) dmlink->link; - curnverts= dm->getNumVerts(dm); - mvert= dm->getVertArray(dm); + curnverts = dm->getNumVerts(dm); + mvert = dm->getVertArray(dm); /* copy verts */ - for (i= 0; ico); mul_v3_m4v3(wco, ob->obmat, co); - verts[3*(basenverts+i)+0]= wco[0]; - verts[3*(basenverts+i)+1]= wco[2]; - verts[3*(basenverts+i)+2]= wco[1]; + verts[3 * (basenverts + i) + 0] = wco[0]; + verts[3 * (basenverts + i) + 1] = wco[2]; + verts[3 * (basenverts + i) + 2] = wco[1]; } /* create tris */ - curnfaces= dm->getNumTessFaces(dm); - mface= dm->getTessFaceArray(dm); + curnfaces = dm->getNumTessFaces(dm); + mface = dm->getTessFaceArray(dm); - for (i= 0; iv1; - tri[1]= basenverts + mf->v3; - tri[2]= basenverts + mf->v2; + tri[0] = basenverts + mf->v1; + tri[1] = basenverts + mf->v3; + tri[2] = basenverts + mf->v2; tri += 3; if (mf->v4) { - tri[0]= basenverts + mf->v1; - tri[1]= basenverts + mf->v4; - tri[2]= basenverts + mf->v3; + tri[0] = basenverts + mf->v1; + tri[1] = basenverts + mf->v4; + tri[2] = basenverts + mf->v3; tri += 3; } } - basenverts+= curnverts; + basenverts += curnverts; } /* release derived mesh */ - for (dmlink= dms; dmlink; dmlink= dmlink->next) { - dm= (DerivedMesh*) dmlink->link; + for (dmlink = dms; dmlink; dmlink = dmlink->next) { + dm = (DerivedMesh *) dmlink->link; dm->release(dm); } BLI_linklist_free(dms, NULL); - *nverts_r= nverts; - *verts_r= verts; - *ntris_r= ntris; - *tris_r= tris; + *nverts_r = nverts; + *verts_r = verts; + *ntris_r = ntris; + *tris_r = tris; } static int buildNavMesh(const RecastData *recastParams, int nverts, float *verts, int ntris, int *tris, - struct recast_polyMesh **pmesh, struct recast_polyMeshDetail **dmesh) + struct recast_polyMesh **pmesh, struct recast_polyMeshDetail **dmesh) { float bmin[3], bmax[3]; struct recast_heightfield *solid; @@ -181,22 +182,22 @@ static int buildNavMesh(const RecastData *recastParams, int nverts, float *verts recast_calcBounds(verts, nverts, bmin, bmax); /* ** Step 1. Initialize build config ** */ - walkableHeight= (int)ceilf(recastParams->agentheight/ recastParams->cellheight); - walkableClimb= (int)floorf(recastParams->agentmaxclimb / recastParams->cellheight); - walkableRadius= (int)ceilf(recastParams->agentradius / recastParams->cellsize); - minRegionArea= (int)(recastParams->regionminsize * recastParams->regionminsize); - mergeRegionArea= (int)(recastParams->regionmergesize * recastParams->regionmergesize); - maxEdgeLen= (int)(recastParams->edgemaxlen/recastParams->cellsize); - detailSampleDist= recastParams->detailsampledist< 0.9f ? 0 : - recastParams->cellsize * recastParams->detailsampledist; - detailSampleMaxError= recastParams->cellheight * recastParams->detailsamplemaxerror; + walkableHeight = (int)ceilf(recastParams->agentheight / recastParams->cellheight); + walkableClimb = (int)floorf(recastParams->agentmaxclimb / recastParams->cellheight); + walkableRadius = (int)ceilf(recastParams->agentradius / recastParams->cellsize); + minRegionArea = (int)(recastParams->regionminsize * recastParams->regionminsize); + mergeRegionArea = (int)(recastParams->regionmergesize * recastParams->regionmergesize); + maxEdgeLen = (int)(recastParams->edgemaxlen / recastParams->cellsize); + detailSampleDist = recastParams->detailsampledist < 0.9f ? 0 : + recastParams->cellsize * recastParams->detailsampledist; + detailSampleMaxError = recastParams->cellheight * recastParams->detailsamplemaxerror; /* Set the area where the navigation will be build. */ recast_calcGridSize(bmin, bmax, recastParams->cellsize, &width, &height); /* ** Step 2: Rasterize input polygon soup ** */ /* Allocate voxel heightfield where we rasterize our input data to */ - solid= recast_newHeightfield(); + solid = recast_newHeightfield(); if (!recast_createHeightfield(solid, width, height, bmin, bmax, recastParams->cellsize, recastParams->cellheight)) { recast_destroyHeightfield(solid); @@ -205,7 +206,7 @@ static int buildNavMesh(const RecastData *recastParams, int nverts, float *verts } /* Allocate array that can hold triangle flags */ - triflags= MEM_callocN(sizeof(unsigned char)*ntris, "buildNavMesh triflags"); + triflags = MEM_callocN(sizeof(unsigned char) * ntris, "buildNavMesh triflags"); /* Find triangles which are walkable based on their slope and rasterize them */ recast_markWalkableTriangles(RAD2DEG(recastParams->agentmaxslope), verts, nverts, tris, ntris, triflags); @@ -219,7 +220,7 @@ static int buildNavMesh(const RecastData *recastParams, int nverts, float *verts /* ** Step 4: Partition walkable surface to simple regions ** */ - chf= recast_newCompactHeightfield(); + chf = recast_newCompactHeightfield(); if (!recast_buildCompactHeightfield(walkableHeight, walkableClimb, solid, chf)) { recast_destroyHeightfield(solid); recast_destroyCompactHeightfield(chf); @@ -252,7 +253,7 @@ static int buildNavMesh(const RecastData *recastParams, int nverts, float *verts /* ** Step 5: Trace and simplify region contours ** */ /* Create contours */ - cset= recast_newContourSet(); + cset = recast_newContourSet(); if (!recast_buildContours(chf, recastParams->edgemaxerror, maxEdgeLen, cset)) { recast_destroyCompactHeightfield(chf); @@ -262,7 +263,7 @@ static int buildNavMesh(const RecastData *recastParams, int nverts, float *verts } /* ** Step 6: Build polygons mesh from contours ** */ - *pmesh= recast_newPolyMesh(); + *pmesh = recast_newPolyMesh(); if (!recast_buildPolyMesh(cset, recastParams->vertsperpoly, *pmesh)) { recast_destroyCompactHeightfield(chf); recast_destroyContourSet(cset); @@ -274,7 +275,7 @@ static int buildNavMesh(const RecastData *recastParams, int nverts, float *verts /* ** Step 7: Create detail mesh which allows to access approximate height on each polygon ** */ - *dmesh= recast_newPolyMeshDetail(); + *dmesh = recast_newPolyMeshDetail(); if (!recast_buildPolyMeshDetail(*pmesh, chf, detailSampleDist, detailSampleMaxError, *dmesh)) { recast_destroyCompactHeightfield(chf); recast_destroyContourSet(cset); @@ -294,12 +295,12 @@ static Object *createRepresentation(bContext *C, struct recast_polyMesh *pmesh, { float co[3], rot[3]; BMEditMesh *em; - int i,j, k; + int i, j, k; unsigned short *v; int face[3]; - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); Object *obedit; - int createob= base==NULL; + int createob = base == NULL; int nverts, nmeshes, nvp; unsigned short *verts, *polys; unsigned int *meshes; @@ -311,16 +312,16 @@ static Object *createRepresentation(bContext *C, struct recast_polyMesh *pmesh, if (createob) { /* create new object */ - obedit= ED_object_add_type(C, OB_MESH, co, rot, FALSE, 1); + obedit = ED_object_add_type(C, OB_MESH, co, rot, FALSE, 1); } else { - obedit= base->object; + obedit = base->object; scene_select_base(scene, base); copy_v3_v3(obedit->loc, co); copy_v3_v3(obedit->rot, rot); } - ED_object_enter_editmode(C, EM_DO_UNDO|EM_IGNORE_LAYER); + ED_object_enter_editmode(C, EM_DO_UNDO | EM_IGNORE_LAYER); em = BMEdit_FromObject(obedit); if (!createob) { @@ -329,15 +330,15 @@ static Object *createRepresentation(bContext *C, struct recast_polyMesh *pmesh, } /* create verts for polygon mesh */ - verts= recast_polyMeshGetVerts(pmesh, &nverts); + verts = recast_polyMeshGetVerts(pmesh, &nverts); recast_polyMeshGetBoundbox(pmesh, bmin, NULL); recast_polyMeshGetCell(pmesh, &cs, &ch); - for (i= 0; ibm, co, NULL); } @@ -346,28 +347,28 @@ static Object *createRepresentation(bContext *C, struct recast_polyMesh *pmesh, CustomData_add_layer_named(&em->bm->pdata, CD_RECAST, CD_CALLOC, NULL, 0, "createRepresentation recastData"); /* create verts and faces for detailed mesh */ - meshes= recast_polyMeshDetailGetMeshes(dmesh, &nmeshes); - polys= recast_polyMeshGetPolys(pmesh, NULL, &nvp); - dverts= recast_polyMeshDetailGetVerts(dmesh, NULL); - tris= recast_polyMeshDetailGetTris(dmesh, NULL); - - for (i= 0; ibm->totvert; - unsigned int vbase= meshes[4*i+0]; - unsigned short ndv= meshes[4*i+1]; - unsigned short tribase= meshes[4*i+2]; - unsigned short trinum= meshes[4*i+3]; - const unsigned short *p= &polys[i*nvp*2]; - int nv= 0; - - for (j= 0; j < nvp; ++j) { - if (p[j]==0xffff) break; + meshes = recast_polyMeshDetailGetMeshes(dmesh, &nmeshes); + polys = recast_polyMeshGetPolys(pmesh, NULL, &nvp); + dverts = recast_polyMeshDetailGetVerts(dmesh, NULL); + tris = recast_polyMeshDetailGetTris(dmesh, NULL); + + for (i = 0; i < nmeshes; i++) { + int uniquevbase = em->bm->totvert; + unsigned int vbase = meshes[4 * i + 0]; + unsigned short ndv = meshes[4 * i + 1]; + unsigned short tribase = meshes[4 * i + 2]; + unsigned short trinum = meshes[4 * i + 3]; + const unsigned short *p = &polys[i * nvp * 2]; + int nv = 0; + + for (j = 0; j < nvp; ++j) { + if (p[j] == 0xffff) break; nv++; } /* create unique verts */ - for (j= nv; jbm, co, NULL); } @@ -375,26 +376,26 @@ static Object *createRepresentation(bContext *C, struct recast_polyMesh *pmesh, EDBM_init_index_arrays(em, 1, 0, 0); /* create faces */ - for (j= 0; jbm, - EDBM_get_vert_for_index(em, face[0]), - EDBM_get_vert_for_index(em, face[2]), - EDBM_get_vert_for_index(em, face[1]), NULL, - NULL, FALSE); + newFace = BM_face_create_quad_tri(em->bm, + EDBM_get_vert_for_index(em, face[0]), + EDBM_get_vert_for_index(em, face[2]), + EDBM_get_vert_for_index(em, face[1]), NULL, + NULL, FALSE); /* set navigation polygon idx to the custom layer */ - polygonIdx= (int*)CustomData_bmesh_get(&em->bm->pdata, newFace->head.data, CD_RECAST); - *polygonIdx= i+1; /* add 1 to avoid zero idx */ + polygonIdx = (int *)CustomData_bmesh_get(&em->bm->pdata, newFace->head.data, CD_RECAST); + *polygonIdx = i + 1; /* add 1 to avoid zero idx */ } EDBM_free_index_arrays(em); @@ -403,17 +404,17 @@ static Object *createRepresentation(bContext *C, struct recast_polyMesh *pmesh, recast_destroyPolyMesh(pmesh); recast_destroyPolyMeshDetail(dmesh); - DAG_id_tag_update((ID*)obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + DAG_id_tag_update((ID *)obedit->data, OB_RECALC_DATA); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); ED_object_exit_editmode(C, EM_FREEDATA); - WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, obedit); + WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, obedit); if (createob) { - obedit->gameflag&= ~OB_COLLISION; - obedit->gameflag|= OB_NAVMESH; - obedit->body_type= OB_BODY_TYPE_NAVMESH; + obedit->gameflag &= ~OB_COLLISION; + obedit->gameflag |= OB_NAVMESH; + obedit->body_type = OB_BODY_TYPE_NAVMESH; rename_id((ID *)obedit, "Navmesh"); } @@ -424,31 +425,31 @@ static Object *createRepresentation(bContext *C, struct recast_polyMesh *pmesh, static int navmesh_create_exec(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); - LinkNode *obs= NULL; - Base *navmeshBase= NULL; + Scene *scene = CTX_data_scene(C); + LinkNode *obs = NULL; + Base *navmeshBase = NULL; CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) { if (base->object->type == OB_MESH) { - if (base->object->body_type==OB_BODY_TYPE_NAVMESH) { + if (base->object->body_type == OB_BODY_TYPE_NAVMESH) { if (!navmeshBase || base == scene->basact) { - navmeshBase= base; + navmeshBase = base; } } else { - BLI_linklist_append(&obs, (void*)base->object); + BLI_linklist_append(&obs, (void *)base->object); } } } CTX_DATA_END; if (obs) { - struct recast_polyMesh *pmesh= NULL; - struct recast_polyMeshDetail *dmesh= NULL; + struct recast_polyMesh *pmesh = NULL; + struct recast_polyMeshDetail *dmesh = NULL; - int nverts= 0, ntris= 0; - int *tris= 0; - float *verts= NULL; + int nverts = 0, ntris = 0; + int *tris = 0; + float *verts = NULL; createVertsTrisData(C, obs, &nverts, &verts, &ntris, &tris); BLI_linklist_free(obs, NULL); @@ -478,7 +479,7 @@ void MESH_OT_navmesh_make(wmOperatorType *ot) ot->exec = navmesh_create_exec; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } static int navmesh_face_copy_exec(bContext *C, wmOperator *op) @@ -487,20 +488,20 @@ static int navmesh_face_copy_exec(bContext *C, wmOperator *op) BMEditMesh *em = BMEdit_FromObject(obedit); /* do work here */ - BMFace *efa_act= BM_active_face_get(em->bm, FALSE); + BMFace *efa_act = BM_active_face_get(em->bm, FALSE); if (efa_act) { if (CustomData_has_layer(&em->bm->pdata, CD_RECAST)) { BMFace *efa; BMIter iter; - int targetPolyIdx= *(int*)CustomData_bmesh_get(&em->bm->pdata, efa_act->head.data, CD_RECAST); - targetPolyIdx= targetPolyIdx>=0? targetPolyIdx : -targetPolyIdx; + int targetPolyIdx = *(int *)CustomData_bmesh_get(&em->bm->pdata, efa_act->head.data, CD_RECAST); + targetPolyIdx = targetPolyIdx >= 0 ? targetPolyIdx : -targetPolyIdx; if (targetPolyIdx > 0) { /* set target poly idx to other selected faces */ BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) { if (BM_elem_flag_test(efa, BM_ELEM_SELECT) && efa != efa_act) { - int *recastDataBlock = (int*)CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_RECAST); + int *recastDataBlock = (int *)CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_RECAST); *recastDataBlock = targetPolyIdx; } } @@ -511,8 +512,8 @@ static int navmesh_face_copy_exec(bContext *C, wmOperator *op) } } - DAG_id_tag_update((ID*)obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + DAG_id_tag_update((ID *)obedit->data, OB_RECALC_DATA); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; } @@ -529,27 +530,27 @@ void MESH_OT_navmesh_face_copy(struct wmOperatorType *ot) ot->exec = navmesh_face_copy_exec; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } -static int compare(const void * a, const void * b) +static int compare(const void *a, const void *b) { - return ( *(int*)a - *(int*)b ); + return (*(int *)a - *(int *)b); } static int findFreeNavPolyIndex(BMEditMesh *em) { /* construct vector of indices */ int numfaces = em->bm->totface; - int *indices = MEM_callocN(sizeof(int)*numfaces, "findFreeNavPolyIndex(indices)"); + int *indices = MEM_callocN(sizeof(int) * numfaces, "findFreeNavPolyIndex(indices)"); BMFace *ef; BMIter iter; - int i, idx = em->bm->totface-1, freeIdx = 1; + int i, idx = em->bm->totface - 1, freeIdx = 1; /*XXX this originally went last to first, but that isn't possible anymore*/ BM_ITER(ef, &iter, em->bm, BM_FACES_OF_MESH, NULL) { - int polyIdx = *(int*)CustomData_bmesh_get(&em->bm->pdata, ef->head.data, CD_RECAST); - indices[idx]= polyIdx; + int polyIdx = *(int *)CustomData_bmesh_get(&em->bm->pdata, ef->head.data, CD_RECAST); + indices[idx] = polyIdx; idx--; } @@ -557,10 +558,10 @@ static int findFreeNavPolyIndex(BMEditMesh *em) /* search first free index */ freeIdx = 1; - for (i = 0; ifreeIdx) + else if (indices[i] > freeIdx) break; } @@ -579,21 +580,21 @@ static int navmesh_face_add_exec(bContext *C, wmOperator *UNUSED(op)) if (CustomData_has_layer(&em->bm->pdata, CD_RECAST)) { int targetPolyIdx = findFreeNavPolyIndex(em); - if (targetPolyIdx>0) { + if (targetPolyIdx > 0) { /* set target poly idx to selected faces */ /*XXX this originally went last to first, but that isn't possible anymore*/ BM_ITER(ef, &iter, em->bm, BM_FACES_OF_MESH, NULL) { if (BM_elem_flag_test(ef, BM_ELEM_SELECT)) { - int *recastDataBlock = (int*)CustomData_bmesh_get(&em->bm->pdata, ef->head.data, CD_RECAST); + int *recastDataBlock = (int *)CustomData_bmesh_get(&em->bm->pdata, ef->head.data, CD_RECAST); *recastDataBlock = targetPolyIdx; } } } } - DAG_id_tag_update((ID*)obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + DAG_id_tag_update((ID *)obedit->data, OB_RECALC_DATA); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); return OPERATOR_FINISHED; } @@ -610,7 +611,7 @@ void MESH_OT_navmesh_face_add(struct wmOperatorType *ot) ot->exec = navmesh_face_add_exec; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } static int navmesh_obmode_data_poll(bContext *C) @@ -642,7 +643,7 @@ static int navmesh_reset_exec(bContext *C, wmOperator *UNUSED(op)) BKE_mesh_ensure_navmesh(me); DAG_id_tag_update(&me->id, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, &me->id); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, &me->id); return OPERATOR_FINISHED; } @@ -659,7 +660,7 @@ void MESH_OT_navmesh_reset(struct wmOperatorType *ot) ot->exec = navmesh_reset_exec; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } static int navmesh_clear_exec(bContext *C, wmOperator *UNUSED(op)) @@ -670,7 +671,7 @@ static int navmesh_clear_exec(bContext *C, wmOperator *UNUSED(op)) CustomData_free_layers(&me->pdata, CD_RECAST, me->totpoly); DAG_id_tag_update(&me->id, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, &me->id); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, &me->id); return OPERATOR_FINISHED; } @@ -687,5 +688,5 @@ void MESH_OT_navmesh_clear(struct wmOperatorType *ot) ot->exec = navmesh_clear_exec; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c index ccc6fa01735..0eaba0cd67b 100644 --- a/source/blender/editors/mesh/mesh_ops.c +++ b/source/blender/editors/mesh/mesh_ops.c @@ -177,8 +177,8 @@ void ED_operatortypes_mesh(void) #if 0 /* UNUSED, remove? */ static int ED_operator_editmesh_face_select(bContext *C) { - Object *obedit= CTX_data_edit_object(C); - if (obedit && obedit->type==OB_MESH) { + Object *obedit = CTX_data_edit_object(C); + if (obedit && obedit->type == OB_MESH) { BMEditMesh *em = BMEdit_FromObject(obedit); if (em && em->selectmode & SCE_SELECT_FACE) { return 1; @@ -193,48 +193,48 @@ void ED_operatormacros_mesh(void) wmOperatorType *ot; wmOperatorTypeMacro *otmacro; - ot = WM_operatortype_append_macro("MESH_OT_loopcut_slide", "Loop Cut and Slide", OPTYPE_UNDO|OPTYPE_REGISTER); + ot = WM_operatortype_append_macro("MESH_OT_loopcut_slide", "Loop Cut and Slide", OPTYPE_UNDO | OPTYPE_REGISTER); ot->description = "Cut mesh loop and slide it"; WM_operatortype_macro_define(ot, "MESH_OT_loopcut"); otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_edge_slide"); RNA_struct_idprops_unset(otmacro->ptr, "release_confirm"); - ot = WM_operatortype_append_macro("MESH_OT_duplicate_move", "Add Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER); + ot = WM_operatortype_append_macro("MESH_OT_duplicate_move", "Add Duplicate", OPTYPE_UNDO | OPTYPE_REGISTER); ot->description = "Duplicate mesh and move"; WM_operatortype_macro_define(ot, "MESH_OT_duplicate"); otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); RNA_enum_set(otmacro->ptr, "proportional", 0); RNA_boolean_set(otmacro->ptr, "mirror", FALSE); - ot = WM_operatortype_append_macro("MESH_OT_rip_move", "Rip", OPTYPE_UNDO|OPTYPE_REGISTER); + ot = WM_operatortype_append_macro("MESH_OT_rip_move", "Rip", OPTYPE_UNDO | OPTYPE_REGISTER); ot->description = "Rip polygons and move the result"; WM_operatortype_macro_define(ot, "MESH_OT_rip"); otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); RNA_enum_set(otmacro->ptr, "proportional", 0); RNA_boolean_set(otmacro->ptr, "mirror", FALSE); - ot = WM_operatortype_append_macro("MESH_OT_extrude_region_move", "Extrude Region and Move", OPTYPE_UNDO|OPTYPE_REGISTER); + ot = WM_operatortype_append_macro("MESH_OT_extrude_region_move", "Extrude Region and Move", OPTYPE_UNDO | OPTYPE_REGISTER); ot->description = "Extrude region and move result"; otmacro = WM_operatortype_macro_define(ot, "MESH_OT_extrude_region"); otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); RNA_enum_set(otmacro->ptr, "proportional", 0); RNA_boolean_set(otmacro->ptr, "mirror", FALSE); - ot = WM_operatortype_append_macro("MESH_OT_extrude_faces_move", "Extrude Individual Faces and Move", OPTYPE_UNDO|OPTYPE_REGISTER); + ot = WM_operatortype_append_macro("MESH_OT_extrude_faces_move", "Extrude Individual Faces and Move", OPTYPE_UNDO | OPTYPE_REGISTER); ot->description = "Extrude faces and move result"; otmacro = WM_operatortype_macro_define(ot, "MESH_OT_extrude_faces_indiv"); otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_shrink_fatten"); RNA_enum_set(otmacro->ptr, "proportional", 0); RNA_boolean_set(otmacro->ptr, "mirror", FALSE); - ot = WM_operatortype_append_macro("MESH_OT_extrude_edges_move", "Extrude Only Edges and Move", OPTYPE_UNDO|OPTYPE_REGISTER); + ot = WM_operatortype_append_macro("MESH_OT_extrude_edges_move", "Extrude Only Edges and Move", OPTYPE_UNDO | OPTYPE_REGISTER); ot->description = "Extrude edges and move result"; otmacro = WM_operatortype_macro_define(ot, "MESH_OT_extrude_edges_indiv"); otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); RNA_enum_set(otmacro->ptr, "proportional", 0); RNA_boolean_set(otmacro->ptr, "mirror", FALSE); - ot = WM_operatortype_append_macro("MESH_OT_extrude_vertices_move", "Extrude Only Vertices and Move", OPTYPE_UNDO|OPTYPE_REGISTER); + ot = WM_operatortype_append_macro("MESH_OT_extrude_vertices_move", "Extrude Only Vertices and Move", OPTYPE_UNDO | OPTYPE_REGISTER); ot->description = "Extrude vertices and move result"; otmacro = WM_operatortype_macro_define(ot, "MESH_OT_extrude_verts_indiv"); otmacro = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate"); @@ -258,12 +258,12 @@ void ED_keymap_mesh(wmKeyConfig *keyconf) /* standard mouse selection goes via space_view3d */ kmi = WM_keymap_add_item(keymap, "MESH_OT_loop_select", SELECTMOUSE, KM_PRESS, KM_ALT, 0); RNA_boolean_set(kmi->ptr, "extend", FALSE); - kmi = WM_keymap_add_item(keymap, "MESH_OT_loop_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_ALT, 0); + kmi = WM_keymap_add_item(keymap, "MESH_OT_loop_select", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_ALT, 0); RNA_boolean_set(kmi->ptr, "extend", TRUE); - kmi = WM_keymap_add_item(keymap, "MESH_OT_edgering_select", SELECTMOUSE, KM_PRESS, KM_ALT|KM_CTRL, 0); + kmi = WM_keymap_add_item(keymap, "MESH_OT_edgering_select", SELECTMOUSE, KM_PRESS, KM_ALT | KM_CTRL, 0); RNA_boolean_set(kmi->ptr, "extend", FALSE); - kmi = WM_keymap_add_item(keymap, "MESH_OT_edgering_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_ALT|KM_CTRL, 0); + kmi = WM_keymap_add_item(keymap, "MESH_OT_edgering_select", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_ALT | KM_CTRL, 0); RNA_boolean_set(kmi->ptr, "extend", TRUE); WM_keymap_add_item(keymap, "MESH_OT_select_shortest_path", SELECTMOUSE, KM_PRESS, KM_CTRL, 0); @@ -275,7 +275,7 @@ void ED_keymap_mesh(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "MESH_OT_select_more", PADPLUSKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "MESH_OT_select_less", PADMINUS, KM_PRESS, KM_CTRL, 0); - WM_keymap_add_item(keymap, "MESH_OT_select_non_manifold", MKEY, KM_PRESS, (KM_CTRL|KM_SHIFT|KM_ALT), 0); + WM_keymap_add_item(keymap, "MESH_OT_select_non_manifold", MKEY, KM_PRESS, (KM_CTRL | KM_SHIFT | KM_ALT), 0); WM_keymap_add_item(keymap, "MESH_OT_select_linked", LKEY, KM_PRESS, KM_CTRL, 0); kmi = WM_keymap_add_item(keymap, "MESH_OT_select_linked_pick", LKEY, KM_PRESS, 0, 0); @@ -283,7 +283,7 @@ void ED_keymap_mesh(wmKeyConfig *keyconf) kmi = WM_keymap_add_item(keymap, "MESH_OT_select_linked_pick", LKEY, KM_PRESS, KM_SHIFT, 0); RNA_boolean_set(kmi->ptr, "deselect", TRUE); - WM_keymap_add_item(keymap, "MESH_OT_faces_select_linked_flat", FKEY, KM_PRESS, (KM_CTRL|KM_SHIFT|KM_ALT), 0); + WM_keymap_add_item(keymap, "MESH_OT_faces_select_linked_flat", FKEY, KM_PRESS, (KM_CTRL | KM_SHIFT | KM_ALT), 0); WM_keymap_add_item(keymap, "MESH_OT_select_similar", GKEY, KM_PRESS, KM_SHIFT, 0); @@ -300,7 +300,7 @@ void ED_keymap_mesh(wmKeyConfig *keyconf) /* tools */ kmi = WM_keymap_add_item(keymap, "MESH_OT_normals_make_consistent", NKEY, KM_PRESS, KM_CTRL, 0); RNA_boolean_set(kmi->ptr, "inside", FALSE); - kmi = WM_keymap_add_item(keymap, "MESH_OT_normals_make_consistent", NKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0); + kmi = WM_keymap_add_item(keymap, "MESH_OT_normals_make_consistent", NKEY, KM_PRESS, KM_SHIFT | KM_CTRL, 0); RNA_boolean_set(kmi->ptr, "inside", TRUE); WM_keymap_add_item(keymap, "VIEW3D_OT_edit_mesh_extrude_move_normal", EKEY, KM_PRESS, 0, 0); /* python operator */ @@ -311,7 +311,7 @@ void ED_keymap_mesh(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "MESH_OT_spin", RKEY, KM_PRESS, KM_ALT, 0); WM_keymap_add_item(keymap, "MESH_OT_fill", FKEY, KM_PRESS, KM_ALT, 0); - WM_keymap_add_item(keymap, "MESH_OT_beautify_fill", FKEY, KM_PRESS, KM_SHIFT|KM_ALT, 0); + WM_keymap_add_item(keymap, "MESH_OT_beautify_fill", FKEY, KM_PRESS, KM_SHIFT | KM_ALT, 0); WM_keymap_add_item(keymap, "MESH_OT_quads_convert_to_tris", TKEY, KM_PRESS, KM_CTRL, 0); kmi = WM_keymap_add_item(keymap, "MESH_OT_quads_convert_to_tris", TKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0); @@ -319,7 +319,7 @@ void ED_keymap_mesh(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "MESH_OT_tris_convert_to_quads", JKEY, KM_PRESS, KM_ALT, 0); - WM_keymap_add_item(keymap, "MESH_OT_rip_move",VKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "MESH_OT_rip_move", VKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "MESH_OT_merge", MKEY, KM_PRESS, KM_ALT, 0); WM_keymap_add_item(keymap, "TRANSFORM_OT_shrink_fatten", SKEY, KM_PRESS, KM_ALT, 0); @@ -338,7 +338,7 @@ void ED_keymap_mesh(wmKeyConfig *keyconf) /* use KM_CLICK because same key is used for tweaks */ kmi = WM_keymap_add_item(keymap, "MESH_OT_dupli_extrude_cursor", ACTIONMOUSE, KM_CLICK, KM_CTRL, 0); RNA_boolean_set(kmi->ptr, "rotate_source", TRUE); - kmi = WM_keymap_add_item(keymap, "MESH_OT_dupli_extrude_cursor", ACTIONMOUSE, KM_CLICK, KM_SHIFT|KM_CTRL, 0); + kmi = WM_keymap_add_item(keymap, "MESH_OT_dupli_extrude_cursor", ACTIONMOUSE, KM_CLICK, KM_SHIFT | KM_CTRL, 0); RNA_boolean_set(kmi->ptr, "rotate_source", FALSE); WM_keymap_add_menu(keymap, "VIEW3D_MT_edit_mesh_dissolve", DKEY, KM_PRESS, 0, 0); @@ -361,8 +361,8 @@ void ED_keymap_mesh(wmKeyConfig *keyconf) WM_keymap_add_menu(keymap, "VIEW3D_MT_vertex_group", GKEY, KM_PRESS, KM_CTRL, 0); /* useful stuff from object-mode */ - for (i=0; i<=5; i++) { - kmi = WM_keymap_add_item(keymap, "OBJECT_OT_subdivision_set", ZEROKEY+i, KM_PRESS, KM_CTRL, 0); + for (i = 0; i <= 5; i++) { + kmi = WM_keymap_add_item(keymap, "OBJECT_OT_subdivision_set", ZEROKEY + i, KM_PRESS, KM_CTRL, 0); RNA_int_set(kmi->ptr, "level", i); } diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c index 7d0172b3c15..3dfc66bce25 100644 --- a/source/blender/editors/mesh/meshtools.c +++ b/source/blender/editors/mesh/meshtools.c @@ -91,21 +91,21 @@ int join_mesh_exec(bContext *C, wmOperator *op) { - Main *bmain= CTX_data_main(C); - Scene *scene= CTX_data_scene(C); - Object *ob= CTX_data_active_object(C); + Main *bmain = CTX_data_main(C); + Scene *scene = CTX_data_scene(C); + Object *ob = CTX_data_active_object(C); Material **matar, *ma; Mesh *me; MVert *mvert, *mv; MEdge *medge = NULL; MPoly *mpoly = NULL; MLoop *mloop = NULL; - Key *key, *nkey=NULL; + Key *key, *nkey = NULL; KeyBlock *kb, *okb, *kbn; float imat[4][4], cmat[4][4], *fp1, *fp2, curpos; - int a, b, totcol, totmat=0, totedge=0, totvert=0, ok=0; - int totloop=0, totpoly=0, vertofs, *matmap=NULL; - int i, j, index, haskey=0, edgeofs, loopofs, polyofs; + int a, b, totcol, totmat = 0, totedge = 0, totvert = 0, ok = 0; + int totloop = 0, totpoly = 0, vertofs, *matmap = NULL; + int i, j, index, haskey = 0, edgeofs, loopofs, polyofs; bDeformGroup *dg, *odg; MDeformVert *dvert; CustomData vdata, edata, fdata, ldata, pdata; @@ -116,24 +116,24 @@ int join_mesh_exec(bContext *C, wmOperator *op) } /* ob is the object we are adding geometry to */ - if (!ob || ob->type!=OB_MESH) { + if (!ob || ob->type != OB_MESH) { BKE_report(op->reports, RPT_WARNING, "Active object is not a mesh"); return OPERATOR_CANCELLED; } /* count & check */ - CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) { - if (base->object->type==OB_MESH) { - me= base->object->data; - - totvert+= me->totvert; - totedge+= me->totedge; - totloop+= me->totloop; - totpoly+= me->totpoly; - totmat+= base->object->totcol; + CTX_DATA_BEGIN(C, Base *, base, selected_editable_bases) { + if (base->object->type == OB_MESH) { + me = base->object->data; + + totvert += me->totvert; + totedge += me->totedge; + totloop += me->totloop; + totpoly += me->totpoly; + totmat += base->object->totcol; if (base->object == ob) - ok= 1; + ok = 1; /* check for shapekeys */ if (me->key) @@ -143,16 +143,16 @@ int join_mesh_exec(bContext *C, wmOperator *op) CTX_DATA_END; /* that way the active object is always selected */ - if (ok==0) { + if (ok == 0) { BKE_report(op->reports, RPT_WARNING, "Active object is not a selected mesh"); return OPERATOR_CANCELLED; } /* only join meshes if there are verts to join, there aren't too many, and we only had one mesh selected */ - me= (Mesh *)ob->data; - key= me->key; + me = (Mesh *)ob->data; + key = me->key; - if (totvert==0 || totvert==me->totvert) { + if (totvert == 0 || totvert == me->totvert) { BKE_report(op->reports, RPT_WARNING, "No mesh data to join"); return OPERATOR_CANCELLED; } @@ -163,48 +163,49 @@ int join_mesh_exec(bContext *C, wmOperator *op) } /* new material indices and material array */ - matar= MEM_callocN(sizeof(void*)*totmat, "join_mesh matar"); - if (totmat) matmap= MEM_callocN(sizeof(int)*totmat, "join_mesh matmap"); - totcol= ob->totcol; + matar = MEM_callocN(sizeof(void *) * totmat, "join_mesh matar"); + if (totmat) matmap = MEM_callocN(sizeof(int) * totmat, "join_mesh matmap"); + totcol = ob->totcol; /* obact materials in new main array, is nicer start! */ - for (a=0; atotcol; a++) { - matar[a]= give_current_material(ob, a+1); + for (a = 0; a < ob->totcol; a++) { + matar[a] = give_current_material(ob, a + 1); id_us_plus((ID *)matar[a]); /* increase id->us : will be lowered later */ } /* - if destination mesh had shapekeys, move them somewhere safe, and set up placeholders - * with arrays that are large enough to hold shapekey data for all meshes + * with arrays that are large enough to hold shapekey data for all meshes * - if destination mesh didn't have shapekeys, but we encountered some in the meshes we're * joining, set up a new keyblock and assign to the mesh */ if (key) { /* make a duplicate copy that will only be used here... (must remember to free it!) */ - nkey= copy_key(key); + nkey = copy_key(key); /* for all keys in old block, clear data-arrays */ - for (kb= key->block.first; kb; kb= kb->next) { + for (kb = key->block.first; kb; kb = kb->next) { if (kb->data) MEM_freeN(kb->data); - kb->data= MEM_callocN(sizeof(float)*3*totvert, "join_shapekey"); - kb->totelem= totvert; - kb->weights= NULL; + kb->data = MEM_callocN(sizeof(float) * 3 * totvert, "join_shapekey"); + kb->totelem = totvert; + kb->weights = NULL; } } else if (haskey) { /* add a new key-block and add to the mesh */ - key= me->key= add_key((ID *)me); + key = me->key = add_key((ID *)me); key->type = KEY_RELATIVE; } /* first pass over objects - copying materials and vertexgroups across */ - CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) { + CTX_DATA_BEGIN(C, Base *, base, selected_editable_bases) + { /* only act if a mesh, and not the one we're joining to */ - if ((ob!=base->object) && (base->object->type==OB_MESH)) { - me= base->object->data; + if ((ob != base->object) && (base->object->type == OB_MESH)) { + me = base->object->data; /* Join this object's vertex groups to the base one's */ - for (dg=base->object->defbase.first; dg; dg=dg->next) { + for (dg = base->object->defbase.first; dg; dg = dg->next) { /* See if this group exists in the object (if it doesn't, add it to the end) */ if (!defgroup_find_name(ob, dg->name)) { odg = MEM_callocN(sizeof(bDeformGroup), "join deformGroup"); @@ -212,21 +213,21 @@ int join_mesh_exec(bContext *C, wmOperator *op) BLI_addtail(&ob->defbase, odg); } } - if (ob->defbase.first && ob->actdef==0) - ob->actdef=1; + if (ob->defbase.first && ob->actdef == 0) + ob->actdef = 1; if (me->totvert) { /* Add this object's materials to the base one's if they don't exist already (but only if limits not exceeded yet) */ if (totcol < MAXMAT) { - for (a=1; a<=base->object->totcol; a++) { - ma= give_current_material(base->object, a); + for (a = 1; a <= base->object->totcol; a++) { + ma = give_current_material(base->object, a); - for (b=0; bid); } @@ -239,29 +240,29 @@ int join_mesh_exec(bContext *C, wmOperator *op) /* if this mesh has shapekeys, check if destination mesh already has matching entries too */ if (me->key && key) { - for (kb= me->key->block.first; kb; kb= kb->next) { + for (kb = me->key->block.first; kb; kb = kb->next) { /* if key doesn't exist in destination mesh, add it */ if (key_get_named_keyblock(key, kb->name) == NULL) { /* copy this existing one over to the new shapekey block */ - kbn= MEM_dupallocN(kb); - kbn->prev= kbn->next= NULL; + kbn = MEM_dupallocN(kb); + kbn->prev = kbn->next = NULL; /* adjust adrcode and other settings to fit (allocate a new data-array) */ - kbn->data= MEM_callocN(sizeof(float)*3*totvert, "joined_shapekey"); - kbn->totelem= totvert; - kbn->weights= NULL; + kbn->data = MEM_callocN(sizeof(float) * 3 * totvert, "joined_shapekey"); + kbn->totelem = totvert; + kbn->weights = NULL; - okb= key->block.last; - curpos= (okb) ? okb->pos : -0.1f; + okb = key->block.last; + curpos = (okb) ? okb->pos : -0.1f; if (key->type == KEY_RELATIVE) - kbn->pos= curpos + 0.1f; + kbn->pos = curpos + 0.1f; else - kbn->pos= curpos; + kbn->pos = curpos; BLI_addtail(&key->block, kbn); - kbn->adrcode= key->totkey; + kbn->adrcode = key->totkey; key->totkey++; - if (key->totkey==1) key->refkey= kbn; + if (key->totkey == 1) key->refkey = kbn; // XXX 2.5 Animato #if 0 @@ -286,23 +287,24 @@ int join_mesh_exec(bContext *C, wmOperator *op) memset(&ldata, 0, sizeof(ldata)); memset(&pdata, 0, sizeof(pdata)); - mvert= CustomData_add_layer(&vdata, CD_MVERT, CD_CALLOC, NULL, totvert); - medge= CustomData_add_layer(&edata, CD_MEDGE, CD_CALLOC, NULL, totedge); - mloop= CustomData_add_layer(&ldata, CD_MLOOP, CD_CALLOC, NULL, totloop); - mpoly= CustomData_add_layer(&pdata, CD_MPOLY, CD_CALLOC, NULL, totpoly); - - vertofs= 0; - edgeofs= 0; - loopofs= 0; - polyofs= 0; + mvert = CustomData_add_layer(&vdata, CD_MVERT, CD_CALLOC, NULL, totvert); + medge = CustomData_add_layer(&edata, CD_MEDGE, CD_CALLOC, NULL, totedge); + mloop = CustomData_add_layer(&ldata, CD_MLOOP, CD_CALLOC, NULL, totloop); + mpoly = CustomData_add_layer(&pdata, CD_MPOLY, CD_CALLOC, NULL, totpoly); + + vertofs = 0; + edgeofs = 0; + loopofs = 0; + polyofs = 0; /* inverse transform for all selected meshes in this object */ invert_m4_m4(imat, ob->obmat); - CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) { + CTX_DATA_BEGIN(C, Base *, base, selected_editable_bases) + { /* only join if this is a mesh */ - if (base->object->type==OB_MESH) { - me= base->object->data; + if (base->object->type == OB_MESH) { + me = base->object->data; if (me->totvert) { /* standard data */ @@ -310,17 +312,17 @@ int join_mesh_exec(bContext *C, wmOperator *op) CustomData_copy_data(&me->vdata, &vdata, 0, vertofs, me->totvert); /* vertex groups */ - dvert= CustomData_get(&vdata, vertofs, CD_MDEFORMVERT); + dvert = CustomData_get(&vdata, vertofs, CD_MDEFORMVERT); /* NB: vertex groups here are new version */ if (dvert) { - for (i=0; itotvert; i++) { - for (j=0; jtotvert; i++) { + for (j = 0; j < dvert[i].totweight; j++) { /* Find the old vertex group */ odg = BLI_findlink(&base->object->defbase, dvert[i].dw[j].def_nr); if (odg) { /* Search for a match in the new object, and set new index */ - for (dg=ob->defbase.first, index=0; dg; dg=dg->next, index++) { + for (dg = ob->defbase.first, index = 0; dg; dg = dg->next, index++) { if (!strcmp(dg->name, odg->name)) { dvert[i].dw[j].def_nr = index; break; @@ -337,7 +339,7 @@ int join_mesh_exec(bContext *C, wmOperator *op) mult_m4_m4m4(cmat, imat, base->object->obmat); /* transform vertex coordinates into new space */ - for (a=0, mv=mvert; a < me->totvert; a++, mv++) { + for (a = 0, mv = mvert; a < me->totvert; a++, mv++) { mul_m4_v3(cmat, mv->co); } @@ -347,24 +349,24 @@ int join_mesh_exec(bContext *C, wmOperator *op) */ if (key) { /* if this mesh has any shapekeys, check first, otherwise just copy coordinates */ - for (kb= key->block.first; kb; kb= kb->next) { + for (kb = key->block.first; kb; kb = kb->next) { /* get pointer to where to write data for this mesh in shapekey's data array */ - fp1= ((float *)kb->data) + (vertofs*3); + fp1 = ((float *)kb->data) + (vertofs * 3); /* check if this mesh has such a shapekey */ - okb= key_get_named_keyblock(me->key, kb->name); + okb = key_get_named_keyblock(me->key, kb->name); if (okb) { /* copy this mesh's shapekey to the destination shapekey (need to transform first) */ - fp2= ((float *)(okb->data)); - for (a=0; a < me->totvert; a++, fp1+=3, fp2+=3) { + fp2 = ((float *)(okb->data)); + for (a = 0; a < me->totvert; a++, fp1 += 3, fp2 += 3) { copy_v3_v3(fp1, fp2); mul_m4_v3(cmat, fp1); } } else { /* copy this mesh's vertex coordinates to the destination shapekey */ - mv= mvert; - for (a=0; a < me->totvert; a++, fp1+=3, mv++) { + mv = mvert; + for (a = 0; a < me->totvert; a++, fp1 += 3, mv++) { copy_v3_v3(fp1, mv->co); } } @@ -377,23 +379,23 @@ int join_mesh_exec(bContext *C, wmOperator *op) * - otherwise, copy across plain coordinates (no need to transform coordinates) */ if (key) { - for (kb= key->block.first; kb; kb= kb->next) { + for (kb = key->block.first; kb; kb = kb->next) { /* get pointer to where to write data for this mesh in shapekey's data array */ - fp1= ((float *)kb->data) + (vertofs*3); + fp1 = ((float *)kb->data) + (vertofs * 3); /* check if this was one of the original shapekeys */ - okb= key_get_named_keyblock(nkey, kb->name); + okb = key_get_named_keyblock(nkey, kb->name); if (okb) { /* copy this mesh's shapekey to the destination shapekey */ - fp2= ((float *)(okb->data)); - for (a=0; a < me->totvert; a++, fp1+=3, fp2+=3) { + fp2 = ((float *)(okb->data)); + for (a = 0; a < me->totvert; a++, fp1 += 3, fp2 += 3) { copy_v3_v3(fp1, fp2); } } else { /* copy base-coordinates to the destination shapekey */ - mv= mvert; - for (a=0; a < me->totvert; a++, fp1+=3, mv++) { + mv = mvert; + for (a = 0; a < me->totvert; a++, fp1 += 3, mv++) { copy_v3_v3(fp1, mv->co); } } @@ -402,27 +404,27 @@ int join_mesh_exec(bContext *C, wmOperator *op) } /* advance mvert pointer to end of base mesh's data */ - mvert+= me->totvert; + mvert += me->totvert; } if (me->totedge) { CustomData_merge(&me->edata, &edata, CD_MASK_MESH, CD_DEFAULT, totedge); CustomData_copy_data(&me->edata, &edata, 0, edgeofs, me->totedge); - for (a=0; atotedge; a++, medge++) { - medge->v1+= vertofs; - medge->v2+= vertofs; + for (a = 0; a < me->totedge; a++, medge++) { + medge->v1 += vertofs; + medge->v2 += vertofs; } } if (me->totloop) { - if (base->object!=ob) + if (base->object != ob) multiresModifier_prepare_join(scene, base->object, ob); CustomData_merge(&me->ldata, &ldata, CD_MASK_MESH, CD_DEFAULT, totloop); CustomData_copy_data(&me->ldata, &ldata, 0, loopofs, me->totloop); - for (a=0; atotloop; a++, mloop++) { + for (a = 0; a < me->totloop; a++, mloop++) { mloop->v += vertofs; mloop->e += edgeofs; } @@ -430,12 +432,12 @@ int join_mesh_exec(bContext *C, wmOperator *op) if (me->totpoly) { /* make mapping for materials */ - for (a=1; a<=base->object->totcol; a++) { - ma= give_current_material(base->object, a); + for (a = 1; a <= base->object->totcol; a++) { + ma = give_current_material(base->object, a); - for (b=0; bpdata, &pdata, CD_MASK_MESH, CD_DEFAULT, totpoly); CustomData_copy_data(&me->pdata, &pdata, 0, polyofs, me->totpoly); - for (a=0; atotpoly; a++, mpoly++) { + for (a = 0; a < me->totpoly; a++, mpoly++) { mpoly->loopstart += loopofs; - mpoly->mat_nr= matmap ? matmap[(int)mpoly->mat_nr] : 0; + mpoly->mat_nr = matmap ? matmap[(int)mpoly->mat_nr] : 0; } polyofs += me->totpoly; @@ -467,49 +469,49 @@ int join_mesh_exec(bContext *C, wmOperator *op) CTX_DATA_END; /* return to mesh we're merging to */ - me= ob->data; + me = ob->data; CustomData_free(&me->vdata, me->totvert); CustomData_free(&me->edata, me->totedge); CustomData_free(&me->ldata, me->totloop); CustomData_free(&me->pdata, me->totpoly); - me->totvert= totvert; - me->totedge= totedge; - me->totloop= totloop; - me->totpoly= totpoly; - - me->vdata= vdata; - me->edata= edata; - me->ldata= ldata; - me->pdata= pdata; + me->totvert = totvert; + me->totedge = totedge; + me->totloop = totloop; + me->totpoly = totpoly; + + me->vdata = vdata; + me->edata = edata; + me->ldata = ldata; + me->pdata = pdata; mesh_update_customdata_pointers(me, TRUE); /* BMESH_TODO, check if this arg can be failse, non urgent - campbell */ /* old material array */ - for (a=1; a<=ob->totcol; a++) { - ma= ob->mat[a-1]; + for (a = 1; a <= ob->totcol; a++) { + ma = ob->mat[a - 1]; if (ma) ma->id.us--; } - for (a=1; a<=me->totcol; a++) { - ma= me->mat[a-1]; + for (a = 1; a <= me->totcol; a++) { + ma = me->mat[a - 1]; if (ma) ma->id.us--; } if (ob->mat) MEM_freeN(ob->mat); if (ob->matbits) MEM_freeN(ob->matbits); if (me->mat) MEM_freeN(me->mat); - ob->mat= me->mat= NULL; - ob->matbits= NULL; + ob->mat = me->mat = NULL; + ob->matbits = NULL; if (totcol) { - me->mat= matar; - ob->mat= MEM_callocN(sizeof(void *)*totcol, "join obmatar"); - ob->matbits= MEM_callocN(sizeof(char)*totcol, "join obmatbits"); + me->mat = matar; + ob->mat = MEM_callocN(sizeof(void *) * totcol, "join obmatar"); + ob->matbits = MEM_callocN(sizeof(char) * totcol, "join obmatbits"); } else MEM_freeN(matar); - ob->totcol= me->totcol= totcol; + ob->totcol = me->totcol = totcol; if (matmap) MEM_freeN(matmap); @@ -533,21 +535,21 @@ int join_mesh_exec(bContext *C, wmOperator *op) MEM_freeN(nkey); } - DAG_scene_sort(bmain, scene); // removed objects, need to rebuild dag before editmode call + DAG_scene_sort(bmain, scene); // removed objects, need to rebuild dag before editmode call #if 0 ED_object_enter_editmode(C, EM_WAITCURSOR); - ED_object_exit_editmode(C, EM_FREEDATA|EM_WAITCURSOR|EM_DO_UNDO); + ED_object_exit_editmode(C, EM_FREEDATA | EM_WAITCURSOR | EM_DO_UNDO); #else /* toggle editmode using lower level functions so this can be called from python */ EDBM_MakeEditBMesh(scene->toolsettings, scene, ob); EDBM_LoadEditBMesh(scene, ob); EDBM_FreeEditBMesh(me->edit_btmesh); MEM_freeN(me->edit_btmesh); - me->edit_btmesh= NULL; - DAG_id_tag_update(&ob->id, OB_RECALC_OB|OB_RECALC_DATA); + me->edit_btmesh = NULL; + DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA); #endif - WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, scene); + WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene); return OPERATOR_FINISHED; } @@ -559,25 +561,25 @@ int join_mesh_exec(bContext *C, wmOperator *op) int join_mesh_shapes_exec(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); - Object *ob= CTX_data_active_object(C); - Mesh *me= (Mesh *)ob->data; - Mesh *selme=NULL; - DerivedMesh *dm=NULL; - Key *key=me->key; + Scene *scene = CTX_data_scene(C); + Object *ob = CTX_data_active_object(C); + Mesh *me = (Mesh *)ob->data; + Mesh *selme = NULL; + DerivedMesh *dm = NULL; + Key *key = me->key; KeyBlock *kb; - int ok=0, nonequal_verts=0; + int ok = 0, nonequal_verts = 0; - CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) { + CTX_DATA_BEGIN(C, Base *, base, selected_editable_bases) { if (base->object == ob) continue; - if (base->object->type==OB_MESH) { + if (base->object->type == OB_MESH) { selme = (Mesh *)base->object->data; - if (selme->totvert==me->totvert) + if (selme->totvert == me->totvert) ok++; else - nonequal_verts=1; + nonequal_verts = 1; } } CTX_DATA_END; @@ -591,27 +593,28 @@ int join_mesh_shapes_exec(bContext *C, wmOperator *op) } if (key == NULL) { - key= me->key= add_key((ID *)me); - key->type= KEY_RELATIVE; + key = me->key = add_key((ID *)me); + key->type = KEY_RELATIVE; /* first key added, so it was the basis. initialize it with the existing mesh */ - kb= add_keyblock(key, NULL); + kb = add_keyblock(key, NULL); mesh_to_key(me, kb); } /* now ready to add new keys from selected meshes */ - CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) { + CTX_DATA_BEGIN(C, Base *, base, selected_editable_bases) + { if (base->object == ob) continue; - if (base->object->type==OB_MESH) { + if (base->object->type == OB_MESH) { selme = (Mesh *)base->object->data; - if (selme->totvert==me->totvert) { + if (selme->totvert == me->totvert) { dm = mesh_get_derived_deform(scene, base->object, CD_MASK_BAREMESH); if (!dm) continue; - kb= add_keyblock(key, base->object->id.name+2); + kb = add_keyblock(key, base->object->id.name + 2); DM_to_meshkey(dm, me, kb); @@ -621,7 +624,7 @@ int join_mesh_shapes_exec(bContext *C, wmOperator *op) } CTX_DATA_END; - WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, scene); + WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene); return OPERATOR_FINISHED; } @@ -630,9 +633,9 @@ int join_mesh_shapes_exec(bContext *C, wmOperator *op) /* important note; this is unfinished, needs better API for editmode, and custom threshold */ -#define MOC_RES 8 -#define MOC_NODE_RES 8 -#define MOC_THRESH 0.00002f +#define MOC_RES 8 +#define MOC_NODE_RES 8 +#define MOC_THRESH 0.00002f typedef struct MocNode { struct MocNode *next; @@ -643,30 +646,30 @@ static int mesh_octree_get_base_offs(float *co, float *offs, float *div) { int vx, vy, vz; - vx= floor( (co[0]-offs[0])/div[0] ); - vy= floor( (co[1]-offs[1])/div[1] ); - vz= floor( (co[2]-offs[2])/div[2] ); - - CLAMP(vx, 0, MOC_RES-1); - CLAMP(vy, 0, MOC_RES-1); - CLAMP(vz, 0, MOC_RES-1); + vx = floor( (co[0] - offs[0]) / div[0]); + vy = floor( (co[1] - offs[1]) / div[1]); + vz = floor( (co[2] - offs[2]) / div[2]); - return (vx*MOC_RES*MOC_RES) + vy*MOC_RES + vz; + CLAMP(vx, 0, MOC_RES - 1); + CLAMP(vy, 0, MOC_RES - 1); + CLAMP(vz, 0, MOC_RES - 1); + + return (vx * MOC_RES * MOC_RES) + vy * MOC_RES + vz; } static void mesh_octree_add_node(MocNode **bt, intptr_t index) { - if (*bt==NULL) { - *bt= MEM_callocN(sizeof(MocNode), "MocNode"); - (*bt)->index[0]= index; + if (*bt == NULL) { + *bt = MEM_callocN(sizeof(MocNode), "MocNode"); + (*bt)->index[0] = index; } else { int a; - for (a=0; aindex[a]==index) + for (a = 0; a < MOC_NODE_RES; a++) { + if ((*bt)->index[a] == index) return; - else if ((*bt)->index[a]==0) { - (*bt)->index[a]= index; + else if ((*bt)->index[a] == 0) { + (*bt)->index[a] = index; return; } } @@ -676,7 +679,7 @@ static void mesh_octree_add_node(MocNode **bt, intptr_t index) static void mesh_octree_free_node(MocNode **bt) { - if ( (*bt)->next ) { + if ( (*bt)->next) { mesh_octree_free_node(&(*bt)->next); } MEM_freeN(*bt); @@ -684,52 +687,52 @@ static void mesh_octree_free_node(MocNode **bt) /* temporal define, just to make nicer code below */ -#define MOC_INDEX(vx, vy, vz) (((vx)*MOC_RES*MOC_RES) + (vy)*MOC_RES + (vz)) +#define MOC_INDEX(vx, vy, vz) (((vx) * MOC_RES * MOC_RES) + (vy) * MOC_RES + (vz)) static void mesh_octree_add_nodes(MocNode **basetable, float *co, float *offs, float *div, intptr_t index) { float fx, fy, fz; int vx, vy, vz; - if ( !finite(co[0]) || - !finite(co[1]) || - !finite(co[2])) + if (!finite(co[0]) || + !finite(co[1]) || + !finite(co[2])) { return; } - fx= (co[0]-offs[0])/div[0]; - fy= (co[1]-offs[1])/div[1]; - fz= (co[2]-offs[2])/div[2]; - CLAMP(fx, 0.0f, MOC_RES-MOC_THRESH); - CLAMP(fy, 0.0f, MOC_RES-MOC_THRESH); - CLAMP(fz, 0.0f, MOC_RES-MOC_THRESH); - - vx= (int)floorf(fx); - vy= (int)floorf(fy); - vz= (int)floorf(fz); + fx = (co[0] - offs[0]) / div[0]; + fy = (co[1] - offs[1]) / div[1]; + fz = (co[2] - offs[2]) / div[2]; + CLAMP(fx, 0.0f, MOC_RES - MOC_THRESH); + CLAMP(fy, 0.0f, MOC_RES - MOC_THRESH); + CLAMP(fz, 0.0f, MOC_RES - MOC_THRESH); + + vx = (int)floorf(fx); + vy = (int)floorf(fy); + vz = (int)floorf(fz); mesh_octree_add_node(basetable + MOC_INDEX(vx, vy, vz), index); if (vx > 0) - if (fx-((float)vx)-MOC_THRESH < 0.0f) + if (fx - ((float)vx) - MOC_THRESH < 0.0f) mesh_octree_add_node(basetable + MOC_INDEX(vx - 1, vy, vz), index); if (vx < MOC_RES - 2) - if (fx-((float)vx)+MOC_THRESH > 1.0f) + if (fx - ((float)vx) + MOC_THRESH > 1.0f) mesh_octree_add_node(basetable + MOC_INDEX(vx + 1, vy, vz), index); if (vy > 0) - if (fy-((float)vy)-MOC_THRESH < 0.0f) + if (fy - ((float)vy) - MOC_THRESH < 0.0f) mesh_octree_add_node(basetable + MOC_INDEX(vx, vy - 1, vz), index); if (vy < MOC_RES - 2) - if (fy-((float)vy)+MOC_THRESH > 1.0f) + if (fy - ((float)vy) + MOC_THRESH > 1.0f) mesh_octree_add_node(basetable + MOC_INDEX(vx, vy + 1, vz), index); if (vz > 0) - if (fz-((float)vz)-MOC_THRESH < 0.0f) + if (fz - ((float)vz) - MOC_THRESH < 0.0f) mesh_octree_add_node(basetable + MOC_INDEX(vx, vy, vz - 1), index); - if (vz 1.0f) + if (vz < MOC_RES - 2) + if (fz - ((float)vz) + MOC_THRESH > 1.0f) mesh_octree_add_node(basetable + MOC_INDEX(vx, vy, vz + 1), index); } @@ -739,19 +742,19 @@ static intptr_t mesh_octree_find_index(MocNode **bt, MVert *mvert, float *co) float *vec; int a; - if (*bt==NULL) + if (*bt == NULL) return -1; - for (a=0; aindex[a]) { /* does mesh verts and editmode, code looks potential dangerous, octree should really be filled OK! */ if (mvert) { - vec= (mvert+(*bt)->index[a]-1)->co; + vec = (mvert + (*bt)->index[a] - 1)->co; if (compare_v3v3(vec, co, MOC_THRESH)) - return (*bt)->index[a]-1; + return (*bt)->index[a] - 1; } else { - BMVert *eve= (BMVert *)((*bt)->index[a]); + BMVert *eve = (BMVert *)((*bt)->index[a]); if (compare_v3v3(eve->co, co, MOC_THRESH)) return (*bt)->index[a]; } @@ -775,13 +778,13 @@ intptr_t mesh_octree_table(Object *ob, BMEditMesh *em, float *co, char mode) { MocNode **bt; - if (mode=='u') { /* use table */ - if (MeshOctree.table==NULL) + if (mode == 'u') { /* use table */ + if (MeshOctree.table == NULL) mesh_octree_table(ob, em, NULL, 's'); if (MeshOctree.table) { - Mesh *me= ob->data; - bt= MeshOctree.table + mesh_octree_get_base_offs(co, MeshOctree.offs, MeshOctree.div); + Mesh *me = ob->data; + bt = MeshOctree.table + mesh_octree_get_base_offs(co, MeshOctree.offs, MeshOctree.div); if (em) return mesh_octree_find_index(bt, NULL, co); else @@ -789,19 +792,20 @@ intptr_t mesh_octree_table(Object *ob, BMEditMesh *em, float *co, char mode) } return -1; } - else if (mode=='s') { /* start table */ - Mesh *me= ob->data; + else if (mode == 's') { /* start table */ + Mesh *me = ob->data; float min[3], max[3]; /* we compute own bounding box and don't reuse ob->bb because * we are using the undeformed coordinates*/ INIT_MINMAX(min, max); - if (em && me->edit_btmesh==em) { + if (em && me->edit_btmesh == em) { BMIter iter; BMVert *eve; - BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) { + BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) + { DO_MINMAX(eve->co, min, max); } } @@ -809,36 +813,37 @@ intptr_t mesh_octree_table(Object *ob, BMEditMesh *em, float *co, char mode) MVert *mvert; int a; - for (a=0, mvert= me->mvert; atotvert; a++, mvert++) + for (a = 0, mvert = me->mvert; a < me->totvert; a++, mvert++) DO_MINMAX(mvert->co, min, max); } /* for quick unit coordinate calculus */ copy_v3_v3(MeshOctree.offs, min); - MeshOctree.offs[0]-= MOC_THRESH; /* we offset it 1 threshold unit extra */ - MeshOctree.offs[1]-= MOC_THRESH; - MeshOctree.offs[2]-= MOC_THRESH; + MeshOctree.offs[0] -= MOC_THRESH; /* we offset it 1 threshold unit extra */ + MeshOctree.offs[1] -= MOC_THRESH; + MeshOctree.offs[2] -= MOC_THRESH; sub_v3_v3v3(MeshOctree.div, max, min); - MeshOctree.div[0]+= 2*MOC_THRESH; /* and divide with 2 threshold unit more extra (try 8x8 unit grid on paint) */ - MeshOctree.div[1]+= 2*MOC_THRESH; - MeshOctree.div[2]+= 2*MOC_THRESH; - - mul_v3_fl(MeshOctree.div, 1.0f/MOC_RES); - if (MeshOctree.div[0]==0.0f) MeshOctree.div[0]= 1.0f; - if (MeshOctree.div[1]==0.0f) MeshOctree.div[1]= 1.0f; - if (MeshOctree.div[2]==0.0f) MeshOctree.div[2]= 1.0f; + MeshOctree.div[0] += 2 * MOC_THRESH; /* and divide with 2 threshold unit more extra (try 8x8 unit grid on paint) */ + MeshOctree.div[1] += 2 * MOC_THRESH; + MeshOctree.div[2] += 2 * MOC_THRESH; + + mul_v3_fl(MeshOctree.div, 1.0f / MOC_RES); + if (MeshOctree.div[0] == 0.0f) MeshOctree.div[0] = 1.0f; + if (MeshOctree.div[1] == 0.0f) MeshOctree.div[1] = 1.0f; + if (MeshOctree.div[2] == 0.0f) MeshOctree.div[2] = 1.0f; if (MeshOctree.table) /* happens when entering this call without ending it */ mesh_octree_table(ob, em, co, 'e'); - MeshOctree.table= MEM_callocN(MOC_RES*MOC_RES*MOC_RES*sizeof(void *), "sym table"); + MeshOctree.table = MEM_callocN(MOC_RES * MOC_RES * MOC_RES * sizeof(void *), "sym table"); - if (em && me->edit_btmesh==em) { + if (em && me->edit_btmesh == em) { BMVert *eve; BMIter iter; - BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) { + BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) + { mesh_octree_add_nodes(MeshOctree.table, eve->co, MeshOctree.offs, MeshOctree.div, (intptr_t)(eve)); } } @@ -846,40 +851,40 @@ intptr_t mesh_octree_table(Object *ob, BMEditMesh *em, float *co, char mode) MVert *mvert; int a; - for (a=0, mvert= me->mvert; atotvert; a++, mvert++) - mesh_octree_add_nodes(MeshOctree.table, mvert->co, MeshOctree.offs, MeshOctree.div, a+1); + for (a = 0, mvert = me->mvert; a < me->totvert; a++, mvert++) + mesh_octree_add_nodes(MeshOctree.table, mvert->co, MeshOctree.offs, MeshOctree.div, a + 1); } } - else if (mode=='e') { /* end table */ + else if (mode == 'e') { /* end table */ if (MeshOctree.table) { int a; - for (a=0, bt=MeshOctree.table; adata, ob->mode, &mesh_topo_store)) { mesh_mirrtopo_table(ob, 's'); } } - else if (mode=='s') { /* start table */ + else if (mode == 's') { /* start table */ ED_mesh_mirrtopo_init(ob->data, ob->mode, &mesh_topo_store, FALSE); } - else if (mode=='e') { /* end table */ + else if (mode == 'e') { /* end table */ ED_mesh_mirrtopo_free(&mesh_topo_store); } return 0; @@ -887,21 +892,21 @@ int mesh_mirrtopo_table(Object *ob, char mode) static int mesh_get_x_mirror_vert_spacial(Object *ob, int index) { - Mesh *me= ob->data; + Mesh *me = ob->data; MVert *mvert; float vec[3]; - mvert= me->mvert+index; - vec[0]= -mvert->co[0]; - vec[1]= mvert->co[1]; - vec[2]= mvert->co[2]; + mvert = me->mvert + index; + vec[0] = -mvert->co[0]; + vec[1] = mvert->co[1]; + vec[2] = mvert->co[2]; return mesh_octree_table(ob, NULL, vec, 'u'); } static int mesh_get_x_mirror_vert_topo(Object *ob, int index) { - if (mesh_mirrtopo_table(ob, 'u')==-1) + if (mesh_mirrtopo_table(ob, 'u') == -1) return -1; return mesh_topo_store.index_lookup[index]; @@ -925,16 +930,16 @@ static BMVert *editbmesh_get_x_mirror_vert_spacial(Object *ob, BMEditMesh *em, f /* ignore nan verts */ if (!finite(co[0]) || - !finite(co[1]) || - !finite(co[2]) - ) + !finite(co[1]) || + !finite(co[2]) + ) return NULL; - vec[0]= -co[0]; - vec[1]= co[1]; - vec[2]= co[2]; + vec[0] = -co[0]; + vec[1] = co[1]; + vec[2] = co[2]; - poinval= mesh_octree_table(ob, em, vec, 'u'); + poinval = mesh_octree_table(ob, em, vec, 'u'); if (poinval != -1) return (BMVert *)(poinval); return NULL; @@ -943,7 +948,7 @@ static BMVert *editbmesh_get_x_mirror_vert_spacial(Object *ob, BMEditMesh *em, f static BMVert *editbmesh_get_x_mirror_vert_topo(Object *ob, struct BMEditMesh *em, BMVert *eve, int index) { intptr_t poinval; - if (mesh_mirrtopo_table(ob, 'u')==-1) + if (mesh_mirrtopo_table(ob, 'u') == -1) return NULL; if (index == -1) { @@ -951,7 +956,8 @@ static BMVert *editbmesh_get_x_mirror_vert_topo(Object *ob, struct BMEditMesh *e BMVert *v; index = 0; - BM_ITER(v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) { + BM_ITER(v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) + { if (v == eve) break; index++; @@ -962,7 +968,7 @@ static BMVert *editbmesh_get_x_mirror_vert_topo(Object *ob, struct BMEditMesh *e } } - poinval= mesh_topo_store.index_lookup[index]; + poinval = mesh_topo_store.index_lookup[index]; if (poinval != -1) return (BMVert *)(poinval); @@ -989,22 +995,22 @@ static float *editmesh_get_mirror_uv(BMEditMesh *em, int axis, float *uv, float /* ignore nan verts */ if (isnan(uv[0]) || !finite(uv[0]) || - isnan(uv[1]) || !finite(uv[1]) - ) + isnan(uv[1]) || !finite(uv[1]) + ) return NULL; if (axis) { - vec[0]= uv[0]; - vec[1]= -((uv[1])-mirrCent[1]) + mirrCent[1]; + vec[0] = uv[0]; + vec[1] = -((uv[1]) - mirrCent[1]) + mirrCent[1]; cent_vec[0] = face_cent[0]; - cent_vec[1]= -((face_cent[1])-mirrCent[1]) + mirrCent[1]; + cent_vec[1] = -((face_cent[1]) - mirrCent[1]) + mirrCent[1]; } else { - vec[0]= -((uv[0])-mirrCent[0]) + mirrCent[0]; - vec[1]= uv[1]; + vec[0] = -((uv[0]) - mirrCent[0]) + mirrCent[0]; + vec[1] = uv[1]; - cent_vec[0]= -((face_cent[0])-mirrCent[0]) + mirrCent[0]; + cent_vec[0] = -((face_cent[0]) - mirrCent[0]) + mirrCent[0]; cent_vec[1] = face_cent[1]; } @@ -1013,23 +1019,25 @@ static float *editmesh_get_mirror_uv(BMEditMesh *em, int axis, float *uv, float BMIter iter; BMFace *efa; - BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) { + BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) + { poly_uv_center(em, efa, cent); if ( (fabs(cent[0] - cent_vec[0]) < 0.001) && (fabs(cent[1] - cent_vec[1]) < 0.001) ) { BMIter liter; BMLoop *l; - BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) { + BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) + { MLoopUV *luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV); if ( (fabs(luv->uv[0] - vec[0]) < 0.001) && (fabs(luv->uv[1] - vec[1]) < 0.001) ) { return luv->uv; + } } } } } - } return NULL; } @@ -1038,39 +1046,39 @@ static float *editmesh_get_mirror_uv(BMEditMesh *em, int axis, float *uv, float static unsigned int mirror_facehash(const void *ptr) { - const MFace *mf= ptr; + const MFace *mf = ptr; int v0, v1; if (mf->v4) { - v0= MIN4(mf->v1, mf->v2, mf->v3, mf->v4); - v1= MAX4(mf->v1, mf->v2, mf->v3, mf->v4); + v0 = MIN4(mf->v1, mf->v2, mf->v3, mf->v4); + v1 = MAX4(mf->v1, mf->v2, mf->v3, mf->v4); } else { - v0= MIN3(mf->v1, mf->v2, mf->v3); - v1= MAX3(mf->v1, mf->v2, mf->v3); + v0 = MIN3(mf->v1, mf->v2, mf->v3); + v1 = MAX3(mf->v1, mf->v2, mf->v3); } - return ((v0*39)^(v1*31)); + return ((v0 * 39) ^ (v1 * 31)); } static int mirror_facerotation(MFace *a, MFace *b) { if (b->v4) { - if (a->v1==b->v1 && a->v2==b->v2 && a->v3==b->v3 && a->v4==b->v4) + if (a->v1 == b->v1 && a->v2 == b->v2 && a->v3 == b->v3 && a->v4 == b->v4) return 0; - else if (a->v4==b->v1 && a->v1==b->v2 && a->v2==b->v3 && a->v3==b->v4) + else if (a->v4 == b->v1 && a->v1 == b->v2 && a->v2 == b->v3 && a->v3 == b->v4) return 1; - else if (a->v3==b->v1 && a->v4==b->v2 && a->v1==b->v3 && a->v2==b->v4) + else if (a->v3 == b->v1 && a->v4 == b->v2 && a->v1 == b->v3 && a->v2 == b->v4) return 2; - else if (a->v2==b->v1 && a->v3==b->v2 && a->v4==b->v3 && a->v1==b->v4) + else if (a->v2 == b->v1 && a->v3 == b->v2 && a->v4 == b->v3 && a->v1 == b->v4) return 3; } else { - if (a->v1==b->v1 && a->v2==b->v2 && a->v3==b->v3) + if (a->v1 == b->v1 && a->v2 == b->v2 && a->v3 == b->v3) return 0; - else if (a->v3==b->v1 && a->v1==b->v2 && a->v2==b->v3) + else if (a->v3 == b->v1 && a->v1 == b->v2 && a->v2 == b->v3) return 1; - else if (a->v2==b->v1 && a->v3==b->v2 && a->v1==b->v3) + else if (a->v2 == b->v1 && a->v3 == b->v2 && a->v1 == b->v3) return 2; } @@ -1079,52 +1087,52 @@ static int mirror_facerotation(MFace *a, MFace *b) static int mirror_facecmp(const void *a, const void *b) { - return (mirror_facerotation((MFace*)a, (MFace*)b) == -1); + return (mirror_facerotation((MFace *)a, (MFace *)b) == -1); } /* BMESH_TODO, convert to MPoly (functions above also) */ int *mesh_get_x_mirror_faces(Object *ob, BMEditMesh *em) { - Mesh *me= ob->data; - MVert *mv, *mvert= me->mvert; - MFace mirrormf, *mf, *hashmf, *mface= me->mface; + Mesh *me = ob->data; + MVert *mv, *mvert = me->mvert; + MFace mirrormf, *mf, *hashmf, *mface = me->mface; GHash *fhash; int *mirrorverts, *mirrorfaces; int a; - mirrorverts= MEM_callocN(sizeof(int)*me->totvert, "MirrorVerts"); - mirrorfaces= MEM_callocN(sizeof(int)*2*me->totface, "MirrorFaces"); + mirrorverts = MEM_callocN(sizeof(int) * me->totvert, "MirrorVerts"); + mirrorfaces = MEM_callocN(sizeof(int) * 2 * me->totface, "MirrorFaces"); mesh_octree_table(ob, em, NULL, 's'); - for (a=0, mv=mvert; atotvert; a++, mv++) - mirrorverts[a]= mesh_get_x_mirror_vert(ob, a); + for (a = 0, mv = mvert; a < me->totvert; a++, mv++) + mirrorverts[a] = mesh_get_x_mirror_vert(ob, a); mesh_octree_table(ob, em, NULL, 'e'); - fhash= BLI_ghash_new(mirror_facehash, mirror_facecmp, "mirror_facehash gh"); - for (a=0, mf=mface; atotface; a++, mf++) + fhash = BLI_ghash_new(mirror_facehash, mirror_facecmp, "mirror_facehash gh"); + for (a = 0, mf = mface; a < me->totface; a++, mf++) BLI_ghash_insert(fhash, mf, mf); - for (a=0, mf=mface; atotface; a++, mf++) { - mirrormf.v1= mirrorverts[mf->v3]; - mirrormf.v2= mirrorverts[mf->v2]; - mirrormf.v3= mirrorverts[mf->v1]; - mirrormf.v4= (mf->v4)? mirrorverts[mf->v4]: 0; + for (a = 0, mf = mface; a < me->totface; a++, mf++) { + mirrormf.v1 = mirrorverts[mf->v3]; + mirrormf.v2 = mirrorverts[mf->v2]; + mirrormf.v3 = mirrorverts[mf->v1]; + mirrormf.v4 = (mf->v4) ? mirrorverts[mf->v4] : 0; /* make sure v4 is not 0 if a quad */ - if (mf->v4 && mirrormf.v4==0) { + if (mf->v4 && mirrormf.v4 == 0) { SWAP(unsigned int, mirrormf.v1, mirrormf.v3); SWAP(unsigned int, mirrormf.v2, mirrormf.v4); } - hashmf= BLI_ghash_lookup(fhash, &mirrormf); + hashmf = BLI_ghash_lookup(fhash, &mirrormf); if (hashmf) { - mirrorfaces[a*2]= hashmf - mface; - mirrorfaces[a*2+1]= mirror_facerotation(&mirrormf, hashmf); + mirrorfaces[a * 2] = hashmf - mface; + mirrorfaces[a * 2 + 1] = mirror_facerotation(&mirrormf, hashmf); } else - mirrorfaces[a*2]= -1; + mirrorfaces[a * 2] = -1; } BLI_ghash_free(fhash, NULL, NULL); -- cgit v1.2.3 From 452f7c38687527d3283395fb6d716cb63a2d8f60 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 26 Mar 2012 04:23:18 +0000 Subject: setting the active texture layer from python would get the UV layer out of sync. (entering editmode would show the wrong UV layer) --- source/blender/makesrna/intern/rna_mesh.c | 19 ++++++++++--------- source/blender/makesrna/intern/rna_mesh_utils.h | 16 ++++++++++++++-- 2 files changed, 24 insertions(+), 11 deletions(-) (limited to 'source/blender') diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index 7eef6630924..ad5b72079a9 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -483,13 +483,20 @@ static int rna_CustomDataLayer_clone_get(PointerRNA *ptr, CustomData *data, int static void rna_CustomDataLayer_active_set(PointerRNA *ptr, CustomData *data, int value, int type, int render) { - int n = ((CustomDataLayer*)ptr->data) - data->layers; + int n = (((CustomDataLayer*)ptr->data) - data->layers) - CustomData_get_layer_index(data, type); if (value == 0) return; - if (render) CustomData_set_layer_render_index(data, type, n); - else CustomData_set_layer_active_index(data, type, n); + if (render) CustomData_set_layer_render(data, type, n); + else CustomData_set_layer_active(data, type, n); + + /* sync loop layer */ + if (type == CD_MTEXPOLY) { + CustomData *ldata = rna_mesh_ldata(ptr); + if (render) CustomData_set_layer_render(ldata, CD_MLOOPUV, n); + else CustomData_set_layer_active(ldata, CD_MLOOPUV, n); + } } static void rna_CustomDataLayer_clone_set(PointerRNA *ptr, CustomData *data, int value, int type, int render) @@ -2178,12 +2185,6 @@ static void rna_def_mesh_loops(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_struct_sdna(srna, "Mesh"); RNA_def_struct_ui_text(srna, "Mesh Loops", "Collection of mesh loops"); -#if 0 /* BMESH_TODO */ - prop = RNA_def_property(srna, "active", PROP_INT, PROP_NONE); - RNA_def_property_int_sdna(prop, NULL, "act_face"); - RNA_def_property_ui_text(prop, "Active Polygon", "The active polygon for this mesh"); -#endif - func = RNA_def_function(srna, "add", "ED_mesh_loops_add"); RNA_def_function_flag(func, FUNC_USE_REPORTS); RNA_def_int(func, "count", 0, 0, INT_MAX, "Count", "Number of loops to add", 0, INT_MAX); diff --git a/source/blender/makesrna/intern/rna_mesh_utils.h b/source/blender/makesrna/intern/rna_mesh_utils.h index b00271f0e16..f262e717eef 100644 --- a/source/blender/makesrna/intern/rna_mesh_utils.h +++ b/source/blender/makesrna/intern/rna_mesh_utils.h @@ -99,9 +99,16 @@ int a; \ if (data) { \ CustomDataLayer *layer; \ - for (layer = data->layers, a = 0; atotlayer; layer++, a++) { \ + int layer_index = CustomData_get_layer_index(data, layer_type); \ + for (layer = data->layers, a = 0; layer_index + a < data->totlayer; layer++, a++) { \ if (value.data == layer) { \ - CustomData_set_layer_##active_type##_index(data, layer_type, a); \ + CustomData_set_layer_##active_type(data, layer_type, a); \ + \ + /* keep loops in sync */ \ + if (layer_type == CD_MTEXPOLY) { \ + CustomData *ldata = rna_mesh_ldata_helper(me); \ + CustomData_set_layer_##active_type(ldata, CD_MLOOPUV, a); \ + } \ mesh_update_customdata_pointers(me, TRUE); \ return; \ } \ @@ -126,6 +133,11 @@ CustomData *data = rna_mesh_##customdata_type(ptr); \ if (data) { \ CustomData_set_layer_##active_type(data, layer_type, value); \ + /* keep loops in sync */ \ + if (layer_type == CD_MTEXPOLY) { \ + CustomData *ldata = rna_mesh_ldata_helper(me); \ + CustomData_set_layer_##active_type(ldata, CD_MLOOPUV, value); \ + } \ mesh_update_customdata_pointers(me, TRUE); \ } \ } -- cgit v1.2.3 From c9c66720c8e2722a50945e0dd09fe3027832e6a3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 26 Mar 2012 04:32:04 +0000 Subject: disallow adding tessfaces to a mesh with polygons (only allowed case is creating a new mesh with tessfaces and later converting to polygons, which wont work if polygons exist) --- source/blender/editors/include/ED_mesh.h | 2 +- source/blender/editors/mesh/mesh_data.c | 13 +++++++++---- source/blender/makesrna/intern/rna_mesh.c | 10 +++++----- 3 files changed, 15 insertions(+), 10 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index 35bf9d77b23..45685740d3b 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -270,7 +270,7 @@ struct BMFace *EDBM_findnearestface(struct ViewContext *vc, int *dist); /* mesh_data.c */ // void ED_mesh_geometry_add(struct Mesh *mesh, struct ReportList *reports, int verts, int edges, int faces); void ED_mesh_polys_add(struct Mesh *mesh, struct ReportList *reports, int count); -void ED_mesh_faces_add(struct Mesh *mesh, struct ReportList *reports, int count); +void ED_mesh_tessfaces_add(struct Mesh *mesh, struct ReportList *reports, int count); void ED_mesh_edges_add(struct Mesh *mesh, struct ReportList *reports, int count); void ED_mesh_loops_add(struct Mesh *mesh, struct ReportList *reports, int count); void ED_mesh_vertices_add(struct Mesh *mesh, struct ReportList *reports, int count); diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c index 3c54848e9ea..d3d043501dc 100644 --- a/source/blender/editors/mesh/mesh_data.c +++ b/source/blender/editors/mesh/mesh_data.c @@ -906,7 +906,7 @@ static void mesh_add_edges(Mesh *mesh, int len) mesh->totedge = totedge; } -static void mesh_add_faces(Mesh *mesh, int len) +static void mesh_add_tessfaces(Mesh *mesh, int len) { CustomData fdata; MFace *mface; @@ -1047,14 +1047,19 @@ void ED_mesh_geometry_add(Mesh *mesh, ReportList *reports, int verts, int edges, } #endif -void ED_mesh_faces_add(Mesh *mesh, ReportList *reports, int count) +void ED_mesh_tessfaces_add(Mesh *mesh, ReportList *reports, int count) { if (mesh->edit_btmesh) { - BKE_report(reports, RPT_ERROR, "Can't add faces in edit mode"); + BKE_report(reports, RPT_ERROR, "Can't add tessfaces in edit mode"); return; } - mesh_add_faces(mesh, count); + if (mesh->mpoly) { + BKE_report(reports, RPT_ERROR, "Can't add tessfaces to a mesh that already has polygons"); + return; + } + + mesh_add_tessfaces(mesh, count); } void ED_mesh_edges_add(Mesh *mesh, ReportList *reports, int count) diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index ad5b72079a9..5a724526960 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -2143,7 +2143,7 @@ static void rna_def_mesh_edges(BlenderRNA *brna, PropertyRNA *cprop) } /* mesh.faces */ -static void rna_def_mesh_faces(BlenderRNA *brna, PropertyRNA *cprop) +static void rna_def_mesh_tessfaces(BlenderRNA *brna, PropertyRNA *cprop) { StructRNA *srna; PropertyRNA *prop; @@ -2151,8 +2151,8 @@ static void rna_def_mesh_faces(BlenderRNA *brna, PropertyRNA *cprop) FunctionRNA *func; /* PropertyRNA *parm; */ - RNA_def_property_srna(cprop, "MeshFaces"); - srna = RNA_def_struct(brna, "MeshFaces", NULL); + RNA_def_property_srna(cprop, "MeshTessFaces"); + srna = RNA_def_struct(brna, "MeshTessFaces", NULL); RNA_def_struct_sdna(srna, "Mesh"); RNA_def_struct_ui_text(srna, "Mesh Faces", "Collection of mesh faces"); @@ -2160,7 +2160,7 @@ static void rna_def_mesh_faces(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_property_int_sdna(prop, NULL, "act_face"); RNA_def_property_ui_text(prop, "Active Face", "The active face for this mesh"); - func = RNA_def_function(srna, "add", "ED_mesh_faces_add"); + func = RNA_def_function(srna, "add", "ED_mesh_tessfaces_add"); RNA_def_function_flag(func, FUNC_USE_REPORTS); RNA_def_int(func, "count", 0, 0, INT_MAX, "Count", "Number of faces to add", 0, INT_MAX); #if 0 /* BMESH_TODO Remove until BMesh merge */ @@ -2496,7 +2496,7 @@ static void rna_def_mesh(BlenderRNA *brna) RNA_def_property_collection_sdna(prop, NULL, "mface", "totface"); RNA_def_property_struct_type(prop, "MeshTessFace"); RNA_def_property_ui_text(prop, "TessFaces", "Tessellation faces of the mesh (derived from polygons)"); - rna_def_mesh_faces(brna, prop); + rna_def_mesh_tessfaces(brna, prop); prop = RNA_def_property(srna, "loops", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "mloop", "totloop"); -- cgit v1.2.3 From 5c209c76a1b7f203ff5bfaa6ad3844020f7b4e20 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 26 Mar 2012 05:28:00 +0000 Subject: fix [#30658] existing uv mesh coordinates not copied to new created uv map --- source/blender/editors/mesh/mesh_data.c | 83 +++++++++++++++++++++------------ 1 file changed, 54 insertions(+), 29 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c index d3d043501dc..0f2ad28b400 100644 --- a/source/blender/editors/mesh/mesh_data.c +++ b/source/blender/editors/mesh/mesh_data.c @@ -189,21 +189,40 @@ static void delete_customdata_layer(bContext *C, Object *ob, CustomDataLayer *la } } -static void copy_editface_active_customdata(BMEditMesh *em, int type, int index) +/* copies from active to 'index' */ +static void editmesh_face_copy_customdata(BMEditMesh *em, int type, int index) { -#if 1 /*BMESH_TODO*/ - (void)em; - (void)type; - (void)index; -#else - EditFace *efa; - int n = CustomData_get_active_layer(&em->fdata, type); + BMesh *bm = em->bm; + CustomData *pdata = &bm->pdata; + BMIter iter; + BMFace *efa; + const int n = CustomData_get_active_layer(pdata, type); + + /* ensure all current elements follow new customdata layout */ + BM_ITER(efa, &iter, bm, BM_FACES_OF_MESH, NULL) { + void *data = CustomData_bmesh_get_n(pdata, efa->head.data, type, n); + CustomData_bmesh_set_n(pdata, efa->head.data, type, index, data); + } +} - for (efa = em->faces.first; efa; efa = efa->next) { - void *data = CustomData_em_get_n(&em->fdata, efa->data, type, n); - CustomData_em_set_n(&em->fdata, efa->data, type, index, data); +/* copies from active to 'index' */ +static void editmesh_loop_copy_customdata(BMEditMesh *em, int type, int index) +{ + BMesh *bm = em->bm; + CustomData *ldata = &bm->ldata; + BMIter iter; + BMIter liter; + BMFace *efa; + BMLoop *loop; + const int n = CustomData_get_active_layer(ldata, type); + + /* ensure all current elements follow new customdata layout */ + BM_ITER(efa, &iter, bm, BM_FACES_OF_MESH, NULL) { + BM_ITER(loop, &liter, bm, BM_LOOPS_OF_FACE, efa) { + void *data = CustomData_bmesh_get_n(ldata, loop->head.data, type, n); + CustomData_bmesh_set_n(ldata, loop->head.data, type, index, data); + } } -#endif } int ED_mesh_uv_loop_reset_ex(struct bContext *C, struct Mesh *me, const int layernum) @@ -322,11 +341,14 @@ int ED_mesh_uv_loop_reset(struct bContext *C, struct Mesh *me) return ED_mesh_uv_loop_reset_ex(C, me, layernum); } +/* note: keep in sync with ED_mesh_color_add */ int ED_mesh_uv_texture_add(bContext *C, Mesh *me, const char *name, int active_set) { BMEditMesh *em; int layernum; + short is_init = FALSE; + if (me->edit_btmesh) { em = me->edit_btmesh; @@ -334,22 +356,23 @@ int ED_mesh_uv_texture_add(bContext *C, Mesh *me, const char *name, int active_s if (layernum >= MAX_MTFACE) return -1; - BM_data_layer_add(em->bm, &em->bm->pdata, CD_MTEXPOLY); - CustomData_set_layer_active(&em->bm->pdata, CD_MTEXPOLY, layernum); - CustomData_set_layer_name(&em->bm->pdata, CD_MTEXPOLY, layernum, name); - + /* CD_MTEXPOLY */ + BM_data_layer_add_named(em->bm, &em->bm->pdata, CD_MTEXPOLY, name); /* copy data from active UV */ - if (layernum) - copy_editface_active_customdata(em, CD_MTFACE, layernum); - + if (layernum) { + editmesh_face_copy_customdata(em, CD_MTEXPOLY, layernum); + } if (active_set || layernum == 0) { CustomData_set_layer_active(&em->bm->pdata, CD_MTEXPOLY, layernum); } - BM_data_layer_add(em->bm, &em->bm->ldata, CD_MLOOPUV); - CustomData_set_layer_name(&em->bm->ldata, CD_MLOOPUV, layernum, name); - - CustomData_set_layer_active(&em->bm->ldata, CD_MLOOPUV, layernum); + /* CD_MLOOPUV */ + BM_data_layer_add_named(em->bm, &em->bm->ldata, CD_MLOOPUV, name); + /* copy data from active UV */ + if (layernum) { + editmesh_loop_copy_customdata(em, CD_MLOOPUV, layernum); + is_init = TRUE; + } if (active_set || layernum == 0) { CustomData_set_layer_active(&em->bm->ldata, CD_MLOOPUV, layernum); } @@ -380,7 +403,10 @@ int ED_mesh_uv_texture_add(bContext *C, Mesh *me, const char *name, int active_s mesh_update_customdata_pointers(me, TRUE); } - ED_mesh_uv_loop_reset_ex(C, me, layernum); + /* don't overwrite our copied coords */ + if (is_init == FALSE) { + ED_mesh_uv_loop_reset_ex(C, me, layernum); + } DAG_id_tag_update(&me->id, 0); WM_event_add_notifier(C, NC_GEOM | ND_DATA, me); @@ -412,6 +438,7 @@ int ED_mesh_uv_texture_remove(bContext *C, Object *ob, Mesh *me) return 1; } +/* note: keep in sync with ED_mesh_uv_texture_add */ int ED_mesh_color_add(bContext *C, Scene *UNUSED(scene), Object *UNUSED(ob), Mesh *me, const char *name, int active_set) { BMEditMesh *em; @@ -425,14 +452,12 @@ int ED_mesh_color_add(bContext *C, Scene *UNUSED(scene), Object *UNUSED(ob), Mes return -1; } - BM_data_layer_add(em->bm, &em->bm->ldata, CD_MLOOPCOL); - CustomData_set_layer_active(&em->bm->ldata, CD_MLOOPCOL, layernum); - + /* CD_MLOOPCOL */ + BM_data_layer_add_named(em->bm, &em->bm->ldata, CD_MLOOPCOL, name); /* copy data from active vertex color layer */ if (layernum) { - copy_editface_active_customdata(em, CD_MLOOPCOL, layernum); + editmesh_loop_copy_customdata(em, CD_MLOOPCOL, layernum); } - if (active_set || layernum == 0) { CustomData_set_layer_active(&em->bm->ldata, CD_MLOOPCOL, layernum); } -- cgit v1.2.3 From 7c8c1a0718bebe6dbea7ce3583e29301053a3923 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 26 Mar 2012 06:20:59 +0000 Subject: Minor fixes to recent new UI messages. --- source/blender/editors/mesh/editmesh_tools.c | 2 +- source/blender/makesrna/intern/rna_particle.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 12042871592..28ae9c1118c 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -4534,5 +4534,5 @@ void MESH_OT_inset(wmOperatorType *ot) /* use 1 rather then 10 for max else dragging the button moves too far */ RNA_def_property_ui_range(prop, 0.0, 1.0, 0.01, 4); - RNA_def_boolean(ot->srna, "use_outset", FALSE, "Outset", "outset rather then inset"); + RNA_def_boolean(ot->srna, "use_outset", FALSE, "Outset", "Outset rather than inset"); } diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index b10639443c0..81d0e01d6a2 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -1766,7 +1766,7 @@ static void rna_def_particle_settings(BlenderRNA *brna) RNA_def_property_enum_sdna(prop, NULL, "rotmode"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_enum_items(prop, rot_mode_items); - RNA_def_property_ui_text(prop, "Orientation axis", "Particle orientation axis (does not effect eplode modifier results)"); + RNA_def_property_ui_text(prop, "Orientation axis", "Particle orientation axis (does not affect Explode modifier's results)"); RNA_def_property_update(prop, 0, "rna_Particle_reset"); prop = RNA_def_property(srna, "angular_velocity_mode", PROP_ENUM, PROP_NONE); -- cgit v1.2.3 From 11d12d945e1a04da102f080f8748514c9bcc0024 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 26 Mar 2012 06:55:09 +0000 Subject: style cleanup: python api --- source/blender/python/generic/bgl.c | 110 +-- .../blender/python/generic/bpy_internal_import.c | 10 +- source/blender/python/generic/idprop_py_api.c | 148 ++-- source/blender/python/generic/py_capi_utils.c | 8 +- source/blender/python/mathutils/mathutils.c | 39 +- source/blender/python/mathutils/mathutils_Color.c | 206 ++--- source/blender/python/mathutils/mathutils_Euler.c | 142 ++-- source/blender/python/mathutils/mathutils_Matrix.c | 313 +++---- .../python/mathutils/mathutils_Quaternion.c | 226 ++--- source/blender/python/mathutils/mathutils_Vector.c | 934 ++++++++++----------- .../blender/python/mathutils/mathutils_geometry.c | 22 +- source/blender/python/mathutils/mathutils_noise.c | 24 +- 12 files changed, 1091 insertions(+), 1091 deletions(-) (limited to 'source/blender') diff --git a/source/blender/python/generic/bgl.c b/source/blender/python/generic/bgl.c index 48052febfb7..3d695e4b270 100644 --- a/source/blender/python/generic/bgl.c +++ b/source/blender/python/generic/bgl.c @@ -56,16 +56,16 @@ static PyObject *Buffer_subscript(Buffer *self, PyObject *item); static int Buffer_ass_subscript(Buffer *self, PyObject *item, PyObject *value); static PySequenceMethods Buffer_SeqMethods = { - (lenfunc) Buffer_len, /*sq_length */ - (binaryfunc) NULL, /*sq_concat */ - (ssizeargfunc) NULL, /*sq_repeat */ - (ssizeargfunc) Buffer_item, /*sq_item */ - (ssizessizeargfunc) NULL, /*sq_slice, deprecated, handled in Buffer_item */ - (ssizeobjargproc) Buffer_ass_item, /*sq_ass_item */ - (ssizessizeobjargproc) NULL, /*sq_ass_slice, deprecated handled in Buffer_ass_item */ - (objobjproc) NULL, /* sq_contains */ - (binaryfunc) NULL, /* sq_inplace_concat */ - (ssizeargfunc) NULL, /* sq_inplace_repeat */ + (lenfunc) Buffer_len, /*sq_length */ + (binaryfunc) NULL, /*sq_concat */ + (ssizeargfunc) NULL, /*sq_repeat */ + (ssizeargfunc) Buffer_item, /*sq_item */ + (ssizessizeargfunc) NULL, /*sq_slice, deprecated, handled in Buffer_item */ + (ssizeobjargproc) Buffer_ass_item, /*sq_ass_item */ + (ssizessizeobjargproc) NULL, /*sq_ass_slice, deprecated handled in Buffer_ass_item */ + (objobjproc) NULL, /* sq_contains */ + (binaryfunc) NULL, /* sq_inplace_concat */ + (ssizeargfunc) NULL, /* sq_inplace_repeat */ }; @@ -125,13 +125,13 @@ static PyObject *Buffer_dimensions(Buffer *self, void *UNUSED(arg)) static PyMethodDef Buffer_methods[] = { {"to_list", (PyCFunction)Buffer_to_list_recursive, METH_NOARGS, - "return the buffer as a list"}, + "return the buffer as a list"}, {NULL, NULL, 0, NULL} }; static PyGetSetDef Buffer_getseters[] = { {(char *)"dimensions", (getter)Buffer_dimensions, NULL, NULL, NULL}, - {NULL, NULL, NULL, NULL, NULL} + {NULL, NULL, NULL, NULL, NULL} }; @@ -144,11 +144,11 @@ PyTypeObject BGL_bufferType = { (printfunc)NULL, /*tp_print */ NULL, /*tp_getattr */ NULL, /*tp_setattr */ - NULL, /*tp_compare */ - (reprfunc) Buffer_repr, /*tp_repr */ - NULL, /*tp_as_number */ - &Buffer_SeqMethods, /*tp_as_sequence */ - &Buffer_AsMapping, /* PyMappingMethods *tp_as_mapping; */ + NULL, /*tp_compare */ + (reprfunc) Buffer_repr, /*tp_repr */ + NULL, /*tp_as_number */ + &Buffer_SeqMethods, /*tp_as_sequence */ + &Buffer_AsMapping, /* PyMappingMethods *tp_as_mapping; */ /* More standard operations (here for binary compatibility) */ @@ -187,22 +187,22 @@ PyTypeObject BGL_bufferType = { Buffer_methods, /* struct PyMethodDef *tp_methods; */ NULL, /* struct PyMemberDef *tp_members; */ Buffer_getseters, /* struct PyGetSetDef *tp_getset; */ - NULL, /*tp_base*/ - NULL, /*tp_dict*/ - NULL, /*tp_descr_get*/ - NULL, /*tp_descr_set*/ - 0, /*tp_dictoffset*/ - NULL, /*tp_init*/ - NULL, /*tp_alloc*/ - Buffer_new, /*tp_new*/ - NULL, /*tp_free*/ - NULL, /*tp_is_gc*/ - NULL, /*tp_bases*/ - NULL, /*tp_mro*/ - NULL, /*tp_cache*/ - NULL, /*tp_subclasses*/ - NULL, /*tp_weaklist*/ - NULL /*tp_del*/ + NULL, /*tp_base*/ + NULL, /*tp_dict*/ + NULL, /*tp_descr_get*/ + NULL, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + NULL, /*tp_init*/ + NULL, /*tp_alloc*/ + Buffer_new, /*tp_new*/ + NULL, /*tp_free*/ + NULL, /*tp_is_gc*/ + NULL, /*tp_bases*/ + NULL, /*tp_mro*/ + NULL, /*tp_cache*/ + NULL, /*tp_subclasses*/ + NULL, /*tp_weaklist*/ + NULL /*tp_del*/ }; #define BGL_Wrap(nargs, funcname, ret, arg_list) \ @@ -286,7 +286,7 @@ Buffer *BGL_MakeBuffer(int type, int ndimensions, int *dimensions, void *initbuf } -#define MAX_DIMENSIONS 256 +#define MAX_DIMENSIONS 256 static PyObject *Buffer_new(PyTypeObject *UNUSED(type), PyObject *args, PyObject *kwds) { PyObject *length_ob = NULL, *init = NULL; @@ -428,7 +428,7 @@ static PyObject *Buffer_slice(Buffer *self, int begin, int end) list = PyList_New(end - begin); for (count = begin; count < end; count++) { - PyList_SET_ITEM(list, count-begin, Buffer_item(self, count)); + PyList_SET_ITEM(list, count - begin, Buffer_item(self, count)); } return list; } @@ -618,7 +618,7 @@ BGL_Wrap(3, AreTexturesResident, GLboolean, (GLsizei, GLuintP, GLbooleanP)) BGL_Wrap(1, Begin, void, (GLenum)) BGL_Wrap(2, BindTexture, void, (GLenum, GLuint)) BGL_Wrap(7, Bitmap, void, (GLsizei, GLsizei, GLfloat, - GLfloat, GLfloat, GLfloat, GLubyteP)) + GLfloat, GLfloat, GLfloat, GLubyteP)) BGL_Wrap(2, BlendFunc, void, (GLenum, GLenum)) BGL_Wrap(1, CallList, void, (GLuint)) BGL_Wrap(3, CallLists, void, (GLsizei, GLenum, GLvoidP)) @@ -700,7 +700,7 @@ BGL_Wrap(2, Fogi, void, (GLenum, GLint)) BGL_Wrap(2, Fogiv, void, (GLenum, GLintP)) BGL_Wrap(1, FrontFace, void, (GLenum)) BGL_Wrap(6, Frustum, void, (GLdouble, GLdouble, - GLdouble, GLdouble, GLdouble, GLdouble)) + GLdouble, GLdouble, GLdouble, GLdouble)) BGL_Wrap(1, GenLists, GLuint, (GLsizei)) BGL_Wrap(2, GenTextures, void, (GLsizei, GLuintP)) BGL_Wrap(2, GetBooleanv, void, (GLenum, GLbooleanP)) @@ -719,7 +719,7 @@ BGL_Wrap(3, GetMaterialiv, void, (GLenum, GLenum, GLintP)) BGL_Wrap(2, GetPixelMapfv, void, (GLenum, GLfloatP)) BGL_Wrap(2, GetPixelMapuiv, void, (GLenum, GLuintP)) BGL_Wrap(2, GetPixelMapusv, void, (GLenum, GLushortP)) -BGL_Wrap(1, GetPolygonStipple,void, (GLubyteP)) +BGL_Wrap(1, GetPolygonStipple, void, (GLubyteP)) BGL_Wrap(1, GetString, GLstring, (GLenum)) BGL_Wrap(3, GetTexEnvfv, void, (GLenum, GLenum, GLfloatP)) BGL_Wrap(3, GetTexEnviv, void, (GLenum, GLenum, GLintP)) @@ -762,19 +762,19 @@ BGL_Wrap(1, LoadMatrixf, void, (GLfloatP)) BGL_Wrap(1, LoadName, void, (GLuint)) BGL_Wrap(1, LogicOp, void, (GLenum)) BGL_Wrap(6, Map1d, void, (GLenum, GLdouble, GLdouble, - GLint, GLint, GLdoubleP)) + GLint, GLint, GLdoubleP)) BGL_Wrap(6, Map1f, void, (GLenum, GLfloat, GLfloat, - GLint, GLint, GLfloatP)) + GLint, GLint, GLfloatP)) BGL_Wrap(10, Map2d, void, (GLenum, GLdouble, GLdouble, - GLint, GLint, GLdouble, GLdouble, GLint, GLint, GLdoubleP)) + GLint, GLint, GLdouble, GLdouble, GLint, GLint, GLdoubleP)) BGL_Wrap(10, Map2f, void, (GLenum, GLfloat, GLfloat, - GLint, GLint, GLfloat, GLfloat, GLint, GLint, GLfloatP)) + GLint, GLint, GLfloat, GLfloat, GLint, GLint, GLfloatP)) BGL_Wrap(3, MapGrid1d, void, (GLint, GLdouble, GLdouble)) BGL_Wrap(3, MapGrid1f, void, (GLint, GLfloat, GLfloat)) BGL_Wrap(6, MapGrid2d, void, (GLint, GLdouble, GLdouble, - GLint, GLdouble, GLdouble)) + GLint, GLdouble, GLdouble)) BGL_Wrap(6, MapGrid2f, void, (GLint, GLfloat, GLfloat, - GLint, GLfloat, GLfloat)) + GLint, GLfloat, GLfloat)) BGL_Wrap(3, Materialf, void, (GLenum, GLenum, GLfloat)) BGL_Wrap(3, Materialfv, void, (GLenum, GLenum, GLfloatP)) BGL_Wrap(3, Materiali, void, (GLenum, GLenum, GLint)) @@ -794,7 +794,7 @@ BGL_Wrap(1, Normal3iv, void, (GLintP)) BGL_Wrap(3, Normal3s, void, (GLshort, GLshort, GLshort)) BGL_Wrap(1, Normal3sv, void, (GLshortP)) BGL_Wrap(6, Ortho, void, (GLdouble, GLdouble, - GLdouble, GLdouble, GLdouble, GLdouble)) + GLdouble, GLdouble, GLdouble, GLdouble)) BGL_Wrap(1, PassThrough, void, (GLfloat)) BGL_Wrap(3, PixelMapfv, void, (GLenum, GLint, GLfloatP)) BGL_Wrap(3, PixelMapuiv, void, (GLenum, GLint, GLuintP)) @@ -843,7 +843,7 @@ BGL_Wrap(4, RasterPos4s, void, (GLshort, GLshort, GLshort, GLshort)) BGL_Wrap(1, RasterPos4sv, void, (GLshortP)) BGL_Wrap(1, ReadBuffer, void, (GLenum)) BGL_Wrap(7, ReadPixels, void, (GLint, GLint, GLsizei, - GLsizei, GLenum, GLenum, GLvoidP)) + GLsizei, GLenum, GLenum, GLvoidP)) BGL_Wrap(4, Rectd, void, (GLdouble, GLdouble, GLdouble, GLdouble)) BGL_Wrap(2, Rectdv, void, (GLdoubleP, GLdoubleP)) BGL_Wrap(4, Rectf, void, (GLfloat, GLfloat, GLfloat, GLfloat)) @@ -906,9 +906,9 @@ BGL_Wrap(3, TexGenfv, void, (GLenum, GLenum, GLfloatP)) BGL_Wrap(3, TexGeni, void, (GLenum, GLenum, GLint)) BGL_Wrap(3, TexGeniv, void, (GLenum, GLenum, GLintP)) BGL_Wrap(8, TexImage1D, void, (GLenum, GLint, GLint, - GLsizei, GLint, GLenum, GLenum, GLvoidP)) + GLsizei, GLint, GLenum, GLenum, GLvoidP)) BGL_Wrap(9, TexImage2D, void, (GLenum, GLint, GLint, - GLsizei, GLsizei, GLint, GLenum, GLenum, GLvoidP)) + GLsizei, GLsizei, GLint, GLenum, GLenum, GLvoidP)) BGL_Wrap(3, TexParameterf, void, (GLenum, GLenum, GLfloat)) BGL_Wrap(3, TexParameterfv, void, (GLenum, GLenum, GLfloatP)) BGL_Wrap(3, TexParameteri, void, (GLenum, GLenum, GLint)) @@ -940,12 +940,12 @@ BGL_Wrap(1, Vertex4iv, void, (GLintP)) BGL_Wrap(4, Vertex4s, void, (GLshort, GLshort, GLshort, GLshort)) BGL_Wrap(1, Vertex4sv, void, (GLshortP)) BGL_Wrap(4, Viewport, void, (GLint, GLint, GLsizei, GLsizei)) -BGLU_Wrap(4, Perspective, void, (GLdouble, GLdouble, GLdouble, GLdouble)) -BGLU_Wrap(9, LookAt, void, (GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble)) -BGLU_Wrap(4, Ortho2D, void, (GLdouble, GLdouble, GLdouble, GLdouble)) -BGLU_Wrap(5, PickMatrix, void, (GLdouble, GLdouble, GLdouble, GLdouble, GLintP)) -BGLU_Wrap(9, Project, GLint, (GLdouble, GLdouble, GLdouble, GLdoubleP, GLdoubleP, GLintP, GLdoubleP, GLdoubleP, GLdoubleP)) -BGLU_Wrap(9, UnProject, GLint, (GLdouble, GLdouble, GLdouble, GLdoubleP, GLdoubleP, GLintP, GLdoubleP, GLdoubleP, GLdoubleP)) +BGLU_Wrap(4, Perspective, void, (GLdouble, GLdouble, GLdouble, GLdouble)) +BGLU_Wrap(9, LookAt, void, (GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble)) +BGLU_Wrap(4, Ortho2D, void, (GLdouble, GLdouble, GLdouble, GLdouble)) +BGLU_Wrap(5, PickMatrix, void, (GLdouble, GLdouble, GLdouble, GLdouble, GLintP)) +BGLU_Wrap(9, Project, GLint, (GLdouble, GLdouble, GLdouble, GLdoubleP, GLdoubleP, GLintP, GLdoubleP, GLdoubleP, GLdoubleP)) +BGLU_Wrap(9, UnProject, GLint, (GLdouble, GLdouble, GLdouble, GLdoubleP, GLdoubleP, GLintP, GLdoubleP, GLdoubleP, GLdoubleP)) #undef MethodDef #define MethodDef(func) {"gl"#func, Method_##func, METH_VARARGS, "no string"} @@ -1302,7 +1302,7 @@ PyObject *BPyInit_bgl(void) dict = PyModule_GetDict(submodule); if (PyType_Ready(&BGL_bufferType) < 0) - return NULL; /* should never happen */ + return NULL; /* should never happen */ PyModule_AddObject(submodule, "Buffer", (PyObject *)&BGL_bufferType); Py_INCREF((PyObject *)&BGL_bufferType); diff --git a/source/blender/python/generic/bpy_internal_import.c b/source/blender/python/generic/bpy_internal_import.c index 4ce68f108f6..ad97d741f9b 100644 --- a/source/blender/python/generic/bpy_internal_import.c +++ b/source/blender/python/generic/bpy_internal_import.c @@ -47,7 +47,7 @@ #include "BLI_string.h" #include "BLI_utildefines.h" - /* UNUSED */ +/* UNUSED */ #include "BKE_text.h" /* txt_to_buf */ #include "BKE_main.h" @@ -244,12 +244,12 @@ static PyObject *blender_import(PyObject *UNUSED(self), PyObject *args, PyObject if (newmodule) return newmodule; - PyErr_Fetch(&exception, &err, &tb); /* get the python error in case we cant import as blender text either */ + PyErr_Fetch(&exception, &err, &tb); /* get the python error in case we cant import as blender text either */ /* importing from existing modules failed, see if we have this module as blender text */ newmodule = bpy_text_import_name(name, &found); - if (newmodule) {/* found module as blender text, ignore above exception */ + if (newmodule) { /* found module as blender text, ignore above exception */ PyErr_Clear(); Py_XDECREF(exception); Py_XDECREF(err); @@ -287,10 +287,10 @@ static PyObject *blender_reload(PyObject *UNUSED(self), PyObject *module) return newmodule; /* no file, try importing from memory */ - PyErr_Fetch(&exception, &err, &tb); /*restore for probable later use */ + PyErr_Fetch(&exception, &err, &tb); /*restore for probable later use */ newmodule = bpy_text_reimport(module, &found); - if (newmodule) {/* found module as blender text, ignore above exception */ + if (newmodule) { /* found module as blender text, ignore above exception */ PyErr_Clear(); Py_XDECREF(exception); Py_XDECREF(err); diff --git a/source/blender/python/generic/idprop_py_api.c b/source/blender/python/generic/idprop_py_api.c index b9785fc375c..63b8d90b510 100644 --- a/source/blender/python/generic/idprop_py_api.c +++ b/source/blender/python/generic/idprop_py_api.c @@ -88,7 +88,7 @@ static PyObject *idprop_py_from_idp_group(ID *id, IDProperty *prop, IDProperty * group->id = id; group->prop = prop; group->parent = parent; /* can be NULL */ - return (PyObject*)group; + return (PyObject *)group; } static PyObject *idprop_py_from_idp_array(ID *id, IDProperty *prop) @@ -96,7 +96,7 @@ static PyObject *idprop_py_from_idp_array(ID *id, IDProperty *prop) BPy_IDProperty *array = PyObject_New(BPy_IDProperty, &BPy_IDArray_Type); array->id = id; array->prop = prop; - return (PyObject*)array; + return (PyObject *)array; } static PyObject *idprop_py_from_idp_idparray(ID *id, IDProperty *prop) @@ -178,7 +178,7 @@ static int BPy_IDGroup_SetData(BPy_IDProperty *self, IDProperty *prop, PyObject } #else st = _PyUnicode_AsString(value); - IDP_ResizeArray(prop, strlen(st)+1); + IDP_ResizeArray(prop, strlen(st) + 1); strcpy(IDP_Array(prop), st); #endif @@ -258,7 +258,7 @@ static PyObject *BPy_IDGroup_GetType(BPy_IDProperty *self) static PyGetSetDef BPy_IDGroup_getseters[] = { {(char *)"name", (getter)BPy_IDGroup_GetName, (setter)BPy_IDGroup_SetName, (char *)"The name of this Group.", NULL}, - {NULL, NULL, NULL, NULL, NULL} + {NULL, NULL, NULL, NULL, NULL} }; static Py_ssize_t BPy_IDGroup_Map_Len(BPy_IDProperty *self) @@ -530,7 +530,7 @@ static PyObject *BPy_IDGroup_iter(BPy_IDProperty *self) iter->mode = IDPROP_ITER_KEYS; iter->cur = self->prop->data.group.first; Py_XINCREF(iter); - return (PyObject*)iter; + return (PyObject *)iter; } /* for simple, non nested types this is the same as BPy_IDGroup_WrapData */ @@ -679,7 +679,7 @@ static PyObject *BPy_IDGroup_IterItems(BPy_IDProperty *self) iter->mode = IDPROP_ITER_ITEMS; iter->cur = self->prop->data.group.first; Py_XINCREF(iter); - return (PyObject*)iter; + return (PyObject *)iter; } /* utility function */ @@ -793,7 +793,7 @@ static int BPy_IDGroup_Contains(BPy_IDProperty *self, PyObject *value) return -1; } - return IDP_GetPropertyFromGroup(self->prop, name) ? 1:0; + return IDP_GetPropertyFromGroup(self->prop, name) ? 1 : 0; } static PyObject *BPy_IDGroup_Update(BPy_IDProperty *self, PyObject *value) @@ -845,64 +845,64 @@ static PyObject *BPy_IDGroup_Get(BPy_IDProperty *self, PyObject *args) static struct PyMethodDef BPy_IDGroup_methods[] = { {"pop", (PyCFunction)BPy_IDGroup_Pop, METH_O, - "pop an item from the group; raises KeyError if the item doesn't exist"}, + "pop an item from the group; raises KeyError if the item doesn't exist"}, {"iteritems", (PyCFunction)BPy_IDGroup_IterItems, METH_NOARGS, - "iterate through the items in the dict; behaves like dictionary method iteritems"}, + "iterate through the items in the dict; behaves like dictionary method iteritems"}, {"keys", (PyCFunction)BPy_IDGroup_GetKeys, METH_NOARGS, - "get the keys associated with this group as a list of strings"}, + "get the keys associated with this group as a list of strings"}, {"values", (PyCFunction)BPy_IDGroup_GetValues, METH_NOARGS, - "get the values associated with this group"}, + "get the values associated with this group"}, {"items", (PyCFunction)BPy_IDGroup_GetItems, METH_NOARGS, - "get the items associated with this group"}, + "get the items associated with this group"}, {"update", (PyCFunction)BPy_IDGroup_Update, METH_O, - "updates the values in the group with the values of another or a dict"}, + "updates the values in the group with the values of another or a dict"}, {"get", (PyCFunction)BPy_IDGroup_Get, METH_VARARGS, - "idprop.get(k[,d]) -> idprop[k] if k in idprop, else d. d defaults to None"}, + "idprop.get(k[,d]) -> idprop[k] if k in idprop, else d. d defaults to None"}, {"to_dict", (PyCFunction)BPy_IDGroup_to_dict, METH_NOARGS, - "return a purely python version of the group"}, + "return a purely python version of the group"}, {NULL, NULL, 0, NULL} }; static PySequenceMethods BPy_IDGroup_Seq = { - (lenfunc) BPy_IDGroup_Map_Len, /* lenfunc sq_length */ - NULL, /* binaryfunc sq_concat */ - NULL, /* ssizeargfunc sq_repeat */ - NULL, /* ssizeargfunc sq_item */ /* TODO - setting this will allow PySequence_Check to return True */ - NULL, /* intintargfunc ***was_sq_slice*** */ - NULL, /* intobjargproc sq_ass_item */ - NULL, /* ssizeobjargproc ***was_sq_ass_slice*** */ - (objobjproc) BPy_IDGroup_Contains, /* objobjproc sq_contains */ - NULL, /* binaryfunc sq_inplace_concat */ - NULL, /* ssizeargfunc sq_inplace_repeat */ + (lenfunc) BPy_IDGroup_Map_Len, /* lenfunc sq_length */ + NULL, /* binaryfunc sq_concat */ + NULL, /* ssizeargfunc sq_repeat */ + NULL, /* ssizeargfunc sq_item */ /* TODO - setting this will allow PySequence_Check to return True */ + NULL, /* intintargfunc ***was_sq_slice*** */ + NULL, /* intobjargproc sq_ass_item */ + NULL, /* ssizeobjargproc ***was_sq_ass_slice*** */ + (objobjproc) BPy_IDGroup_Contains, /* objobjproc sq_contains */ + NULL, /* binaryfunc sq_inplace_concat */ + NULL, /* ssizeargfunc sq_inplace_repeat */ }; static PyMappingMethods BPy_IDGroup_Mapping = { - (lenfunc)BPy_IDGroup_Map_Len, /*inquiry mp_length */ - (binaryfunc)BPy_IDGroup_Map_GetItem,/*binaryfunc mp_subscript */ - (objobjargproc)BPy_IDGroup_Map_SetItem, /*objobjargproc mp_ass_subscript */ + (lenfunc)BPy_IDGroup_Map_Len, /*inquiry mp_length */ + (binaryfunc)BPy_IDGroup_Map_GetItem, /*binaryfunc mp_subscript */ + (objobjargproc)BPy_IDGroup_Map_SetItem, /*objobjargproc mp_ass_subscript */ }; PyTypeObject BPy_IDGroup_Type = { PyVarObject_HEAD_INIT(NULL, 0) /* For printing, in format "." */ - "Blender IDProperty", /* char *tp_name; */ - sizeof(BPy_IDProperty), /* int tp_basicsize; */ + "Blender IDProperty", /* char *tp_name; */ + sizeof(BPy_IDProperty), /* int tp_basicsize; */ 0, /* tp_itemsize; For allocation */ /* Methods to implement standard operations */ - NULL, /* destructor tp_dealloc; */ + NULL, /* destructor tp_dealloc; */ NULL, /* printfunc tp_print; */ - NULL, /* getattrfunc tp_getattr; */ - NULL, /* setattrfunc tp_setattr; */ + NULL, /* getattrfunc tp_getattr; */ + NULL, /* setattrfunc tp_setattr; */ NULL, /* cmpfunc tp_compare; */ (reprfunc)BPy_IDGroup_repr, /* reprfunc tp_repr; */ /* Method suites for standard classes */ NULL, /* PyNumberMethods *tp_as_number; */ - &BPy_IDGroup_Seq, /* PySequenceMethods *tp_as_sequence; */ - &BPy_IDGroup_Mapping, /* PyMappingMethods *tp_as_mapping; */ + &BPy_IDGroup_Seq, /* PySequenceMethods *tp_as_sequence; */ + &BPy_IDGroup_Mapping, /* PyMappingMethods *tp_as_mapping; */ /* More standard operations (here for binary compatibility) */ @@ -915,29 +915,29 @@ PyTypeObject BPy_IDGroup_Type = { /* Functions to access object as input/output buffer */ NULL, /* PyBufferProcs *tp_as_buffer; */ - /*** Flags to define presence of optional/expanded features ***/ + /*** Flags to define presence of optional/expanded features ***/ Py_TPFLAGS_DEFAULT, /* long tp_flags; */ NULL, /* char *tp_doc; Documentation string */ - /*** Assigned meaning in release 2.0 ***/ + /*** Assigned meaning in release 2.0 ***/ /* call function for all accessible objects */ NULL, /* traverseproc tp_traverse; */ /* delete references to contained objects */ NULL, /* inquiry tp_clear; */ - /*** Assigned meaning in release 2.1 ***/ - /*** rich comparisons ***/ + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ NULL, /* richcmpfunc tp_richcompare; */ - /*** weak reference enabler ***/ + /*** weak reference enabler ***/ 0, /* long tp_weaklistoffset; */ - /*** Added in release 2.2 ***/ + /*** Added in release 2.2 ***/ /* Iterators */ (getiterfunc)BPy_IDGroup_iter, /* getiterfunc tp_iter; */ NULL, /* iternextfunc tp_iternext; */ - /*** Attribute descriptor and subclassing stuff ***/ + /*** Attribute descriptor and subclassing stuff ***/ BPy_IDGroup_methods, /* struct PyMethodDef *tp_methods; */ NULL, /* struct PyMemberDef *tp_members; */ BPy_IDGroup_getseters, /* struct PyGetSetDef *tp_getset; */ @@ -984,7 +984,7 @@ static PyObject *BPy_IDArray_GetType(BPy_IDArray *self) } static PyGetSetDef BPy_IDArray_getseters[] = { - /* matches pythons array.typecode */ + /* matches pythons array.typecode */ {(char *)"typecode", (getter)BPy_IDArray_GetType, (setter)NULL, (char *)"The type of the data in the array, is an int.", NULL}, {NULL, NULL, NULL, NULL, NULL}, }; @@ -996,7 +996,7 @@ static PyObject *BPy_IDArray_to_list(BPy_IDArray *self) static PyMethodDef BPy_IDArray_methods[] = { {"to_list", (PyCFunction)BPy_IDArray_to_list, METH_NOARGS, - "return the array as a list"}, + "return the array as a list"}, {NULL, NULL, 0, NULL} }; @@ -1070,17 +1070,17 @@ static int BPy_IDArray_SetItem(BPy_IDArray *self, int index, PyObject *value) } static PySequenceMethods BPy_IDArray_Seq = { - (lenfunc) BPy_IDArray_Len, /* inquiry sq_length */ - NULL, /* binaryfunc sq_concat */ - NULL, /* intargfunc sq_repeat */ - (ssizeargfunc)BPy_IDArray_GetItem, /* intargfunc sq_item */ - NULL, /* intintargfunc sq_slice */ - (ssizeobjargproc)BPy_IDArray_SetItem,/* intobjargproc sq_ass_item */ - NULL, /* intintobjargproc sq_ass_slice */ - NULL, /* objobjproc sq_contains */ - /* Added in release 2.0 */ - NULL, /* binaryfunc sq_inplace_concat */ - NULL, /* intargfunc sq_inplace_repeat */ + (lenfunc) BPy_IDArray_Len, /* inquiry sq_length */ + NULL, /* binaryfunc sq_concat */ + NULL, /* intargfunc sq_repeat */ + (ssizeargfunc)BPy_IDArray_GetItem, /* intargfunc sq_item */ + NULL, /* intintargfunc sq_slice */ + (ssizeobjargproc)BPy_IDArray_SetItem, /* intobjargproc sq_ass_item */ + NULL, /* intintobjargproc sq_ass_slice */ + NULL, /* objobjproc sq_contains */ + /* Added in release 2.0 */ + NULL, /* binaryfunc sq_inplace_concat */ + NULL, /* intargfunc sq_inplace_repeat */ }; @@ -1241,7 +1241,7 @@ PyTypeObject BPy_IDArray_Type = { /* Methods to implement standard operations */ - NULL, /* destructor tp_dealloc; */ + NULL, /* destructor tp_dealloc; */ NULL, /* printfunc tp_print; */ NULL, /* getattrfunc tp_getattr; */ NULL, /* setattrfunc tp_setattr; */ @@ -1251,12 +1251,12 @@ PyTypeObject BPy_IDArray_Type = { /* Method suites for standard classes */ NULL, /* PyNumberMethods *tp_as_number; */ - &BPy_IDArray_Seq, /* PySequenceMethods *tp_as_sequence; */ + &BPy_IDArray_Seq, /* PySequenceMethods *tp_as_sequence; */ &BPy_IDArray_AsMapping, /* PyMappingMethods *tp_as_mapping; */ /* More standard operations (here for binary compatibility) */ - NULL, /* hashfunc tp_hash; */ + NULL, /* hashfunc tp_hash; */ NULL, /* ternaryfunc tp_call; */ NULL, /* reprfunc tp_str; */ NULL, /* getattrofunc tp_getattro; */ @@ -1265,31 +1265,31 @@ PyTypeObject BPy_IDArray_Type = { /* Functions to access object as input/output buffer */ NULL, /* PyBufferProcs *tp_as_buffer; */ - /*** Flags to define presence of optional/expanded features ***/ + /*** Flags to define presence of optional/expanded features ***/ Py_TPFLAGS_DEFAULT, /* long tp_flags; */ NULL, /* char *tp_doc; Documentation string */ - /*** Assigned meaning in release 2.0 ***/ + /*** Assigned meaning in release 2.0 ***/ /* call function for all accessible objects */ NULL, /* traverseproc tp_traverse; */ /* delete references to contained objects */ NULL, /* inquiry tp_clear; */ - /*** Assigned meaning in release 2.1 ***/ - /*** rich comparisons ***/ + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ NULL, /* richcmpfunc tp_richcompare; */ - /*** weak reference enabler ***/ + /*** weak reference enabler ***/ 0, /* long tp_weaklistoffset; */ - /*** Added in release 2.2 ***/ + /*** Added in release 2.2 ***/ /* Iterators */ NULL, /* getiterfunc tp_iter; */ NULL, /* iternextfunc tp_iternext; */ - /*** Attribute descriptor and subclassing stuff ***/ - BPy_IDArray_methods, /* struct PyMethodDef *tp_methods; */ + /*** Attribute descriptor and subclassing stuff ***/ + BPy_IDArray_methods, /* struct PyMethodDef *tp_methods; */ NULL, /* struct PyMemberDef *tp_members; */ BPy_IDArray_getseters, /* struct PyGetSetDef *tp_getset; */ NULL, /* struct _typeobject *tp_base; */ @@ -1355,7 +1355,7 @@ PyTypeObject BPy_IDGroup_Iter_Type = { /* Methods to implement standard operations */ - NULL, /* destructor tp_dealloc; */ + NULL, /* destructor tp_dealloc; */ NULL, /* printfunc tp_print; */ NULL, /* getattrfunc tp_getattr; */ NULL, /* setattrfunc tp_setattr; */ @@ -1365,7 +1365,7 @@ PyTypeObject BPy_IDGroup_Iter_Type = { /* Method suites for standard classes */ NULL, /* PyNumberMethods *tp_as_number; */ - NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ NULL, /* PyMappingMethods *tp_as_mapping; */ /* More standard operations (here for binary compatibility) */ @@ -1379,25 +1379,25 @@ PyTypeObject BPy_IDGroup_Iter_Type = { /* Functions to access object as input/output buffer */ NULL, /* PyBufferProcs *tp_as_buffer; */ - /*** Flags to define presence of optional/expanded features ***/ + /*** Flags to define presence of optional/expanded features ***/ Py_TPFLAGS_DEFAULT, /* long tp_flags; */ NULL, /* char *tp_doc; Documentation string */ - /*** Assigned meaning in release 2.0 ***/ + /*** Assigned meaning in release 2.0 ***/ /* call function for all accessible objects */ NULL, /* traverseproc tp_traverse; */ /* delete references to contained objects */ NULL, /* inquiry tp_clear; */ - /*** Assigned meaning in release 2.1 ***/ - /*** rich comparisons ***/ + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ NULL, /* richcmpfunc tp_richcompare; */ - /*** weak reference enabler ***/ + /*** weak reference enabler ***/ 0, /* long tp_weaklistoffset; */ - /*** Added in release 2.2 ***/ + /*** Added in release 2.2 ***/ /* Iterators */ PyObject_SelfIter, /* getiterfunc tp_iter; */ (iternextfunc) BPy_Group_Iter_Next, /* iternextfunc tp_iternext; */ diff --git a/source/blender/python/generic/py_capi_utils.c b/source/blender/python/generic/py_capi_utils.c index 11607ad78b8..0e5122787b8 100644 --- a/source/blender/python/generic/py_capi_utils.c +++ b/source/blender/python/generic/py_capi_utils.c @@ -156,8 +156,8 @@ void PyC_FileAndNum(const char **filename, int *lineno) { PyFrameObject *frame; - if (filename) *filename = NULL; - if (lineno) *lineno = -1; + if (filename) *filename = NULL; + if (lineno) *lineno = -1; if (!(frame = PyThreadState_GET()->frame)) { return; @@ -538,7 +538,7 @@ void PyC_RunQuicky(const char *filepath, int n, ...) ret = PyObject_CallFunction(calcsize, (char *)"s", format); if (ret) { - sizes[i]= PyLong_AsSsize_t(ret); + sizes[i] = PyLong_AsSsize_t(ret); Py_DECREF(ret); ret = PyObject_CallFunction(unpack, (char *)"sy#", format, (char *)ptr, sizes[i]); } @@ -551,7 +551,7 @@ void PyC_RunQuicky(const char *filepath, int n, ...) PyList_SET_ITEM(values, i, Py_None); /* hold user */ Py_INCREF(Py_None); - sizes[i]= 0; + sizes[i] = 0; } else { if (PyTuple_GET_SIZE(ret) == 1) { diff --git a/source/blender/python/mathutils/mathutils.c b/source/blender/python/mathutils/mathutils.c index ff551206fae..5d3de702fb4 100644 --- a/source/blender/python/mathutils/mathutils.c +++ b/source/blender/python/mathutils/mathutils.c @@ -85,7 +85,7 @@ int mathutils_array_parse(float *array, int array_min, int array_max, PyObject * } if (size > array_max || size < array_min) { - if (array_max == array_min) { + if (array_max == array_min) { PyErr_Format(PyExc_ValueError, "%.200s: sequence size is %d, expected %d", error_prefix, size, array_max); @@ -115,15 +115,15 @@ int mathutils_array_parse(float *array, int array_min, int array_max, PyObject * size = PySequence_Fast_GET_SIZE(value_fast); if (size > array_max || size < array_min) { - if (array_max == array_min) { + if (array_max == array_min) { PyErr_Format(PyExc_ValueError, - "%.200s: sequence size is %d, expected %d", - error_prefix, size, array_max); + "%.200s: sequence size is %d, expected %d", + error_prefix, size, array_max); } else { PyErr_Format(PyExc_ValueError, - "%.200s: sequence size is %d, expected [%d - %d]", - error_prefix, size, array_min, array_max); + "%.200s: sequence size is %d, expected [%d - %d]", + error_prefix, size, array_min, array_max); } Py_DECREF(value_fast); return -1; @@ -239,21 +239,22 @@ int mathutils_any_to_rotmat(float rmat[3][3], PyObject *value, const char *error /* Utility functions */ // LomontRRDCompare4, Ever Faster Float Comparisons by Randy Dillon -#define SIGNMASK(i) (-(int)(((unsigned int)(i))>>31)) +#define SIGNMASK(i) (-(int)(((unsigned int)(i)) >> 31)) int EXPP_FloatsAreEqual(float af, float bf, int maxDiff) -{ // solid, fast routine across all platforms - // with constant time behavior +{ + /* solid, fast routine across all platforms + * with constant time behavior */ int ai = *(int *)(&af); int bi = *(int *)(&bf); - int test = SIGNMASK(ai^bi); + int test = SIGNMASK(ai ^ bi); int diff, v1, v2; assert((0 == test) || (0xFFFFFFFF == test)); diff = (ai ^ (test & 0x7fffffff)) - bi; v1 = maxDiff + diff; v2 = maxDiff - diff; - return (v1|v2) >= 0; + return (v1 | v2) >= 0; } /*---------------------- EXPP_VectorsAreEqual ------------------------- @@ -376,7 +377,7 @@ PyObject *BaseMathObject_owner_get(BaseMathObject *self, void *UNUSED(closure)) char BaseMathObject_is_wrapped_doc[] = "True when this object wraps external data (read-only).\n\n:type: boolean"; PyObject *BaseMathObject_is_wrapped_get(BaseMathObject *self, void *UNUSED(closure)) { - return PyBool_FromLong((self->wrapped == Py_WRAP) ? 1:0); + return PyBool_FromLong((self->wrapped == Py_WRAP) ? 1 : 0); } int BaseMathObject_traverse(BaseMathObject *self, visitproc visit, void *arg) @@ -445,14 +446,14 @@ PyMODINIT_FUNC PyInit_mathutils(void) submodule = PyModule_Create(&M_Mathutils_module_def); /* each type has its own new() function */ - PyModule_AddObject(submodule, "Vector", (PyObject *)&vector_Type); - PyModule_AddObject(submodule, "Matrix", (PyObject *)&matrix_Type); - PyModule_AddObject(submodule, "Euler", (PyObject *)&euler_Type); - PyModule_AddObject(submodule, "Quaternion", (PyObject *)&quaternion_Type); - PyModule_AddObject(submodule, "Color", (PyObject *)&color_Type); + PyModule_AddObject(submodule, "Vector", (PyObject *)&vector_Type); + PyModule_AddObject(submodule, "Matrix", (PyObject *)&matrix_Type); + PyModule_AddObject(submodule, "Euler", (PyObject *)&euler_Type); + PyModule_AddObject(submodule, "Quaternion", (PyObject *)&quaternion_Type); + PyModule_AddObject(submodule, "Color", (PyObject *)&color_Type); /* submodule */ - PyModule_AddObject(submodule, "geometry", (item = PyInit_mathutils_geometry())); + PyModule_AddObject(submodule, "geometry", (item = PyInit_mathutils_geometry())); /* XXX, python doesnt do imports with this usefully yet * 'from mathutils.geometry import PolyFill' * ...fails without this. */ @@ -460,7 +461,7 @@ PyMODINIT_FUNC PyInit_mathutils(void) Py_INCREF(item); /* Noise submodule */ - PyModule_AddObject(submodule, "noise", (item = PyInit_mathutils_noise())); + PyModule_AddObject(submodule, "noise", (item = PyInit_mathutils_noise())); PyDict_SetItemString(sys_modules, "mathutils.noise", item); Py_INCREF(item); diff --git a/source/blender/python/mathutils/mathutils_Color.c b/source/blender/python/mathutils/mathutils_Color.c index 21fbac2d570..5fe3ea4c187 100644 --- a/source/blender/python/mathutils/mathutils_Color.c +++ b/source/blender/python/mathutils/mathutils_Color.c @@ -50,17 +50,17 @@ static PyObject *Color_new(PyTypeObject *type, PyObject *args, PyObject *kwds) } switch (PyTuple_GET_SIZE(args)) { - case 0: - break; - case 1: - if ((mathutils_array_parse(col, COLOR_SIZE, COLOR_SIZE, PyTuple_GET_ITEM(args, 0), "mathutils.Color()")) == -1) + case 0: + break; + case 1: + if ((mathutils_array_parse(col, COLOR_SIZE, COLOR_SIZE, PyTuple_GET_ITEM(args, 0), "mathutils.Color()")) == -1) + return NULL; + break; + default: + PyErr_SetString(PyExc_TypeError, + "mathutils.Color(): " + "more then a single arg given"); return NULL; - break; - default: - PyErr_SetString(PyExc_TypeError, - "mathutils.Color(): " - "more then a single arg given"); - return NULL; } return Color_CreatePyObject(col, Py_NEW, type); } @@ -358,16 +358,16 @@ static int Color_ass_subscript(ColorObject *self, PyObject *item, PyObject *valu //-----------------PROTCOL DECLARATIONS-------------------------- static PySequenceMethods Color_SeqMethods = { - (lenfunc) Color_len, /* sq_length */ - (binaryfunc) NULL, /* sq_concat */ - (ssizeargfunc) NULL, /* sq_repeat */ - (ssizeargfunc) Color_item, /* sq_item */ - NULL, /* sq_slice, deprecated */ - (ssizeobjargproc) Color_ass_item, /* sq_ass_item */ - NULL, /* sq_ass_slice, deprecated */ - (objobjproc) NULL, /* sq_contains */ - (binaryfunc) NULL, /* sq_inplace_concat */ - (ssizeargfunc) NULL, /* sq_inplace_repeat */ + (lenfunc) Color_len, /* sq_length */ + (binaryfunc) NULL, /* sq_concat */ + (ssizeargfunc) NULL, /* sq_repeat */ + (ssizeargfunc) Color_item, /* sq_item */ + NULL, /* sq_slice, deprecated */ + (ssizeobjargproc) Color_ass_item, /* sq_ass_item */ + NULL, /* sq_ass_slice, deprecated */ + (objobjproc) NULL, /* sq_contains */ + (binaryfunc) NULL, /* sq_inplace_concat */ + (ssizeargfunc) NULL, /* sq_inplace_repeat */ }; static PyMappingMethods Color_AsMapping = { @@ -490,12 +490,12 @@ static PyObject *Color_mul(PyObject *v1, PyObject *v2) ColorObject *color1 = NULL, *color2 = NULL; float scalar; - if ColorObject_Check(v1) { + if (ColorObject_Check(v1)) { color1 = (ColorObject *)v1; if (BaseMath_ReadCallback(color1) == -1) return NULL; } - if ColorObject_Check(v2) { + if (ColorObject_Check(v2)) { color2 = (ColorObject *)v2; if (BaseMath_ReadCallback(color2) == -1) return NULL; @@ -532,7 +532,7 @@ static PyObject *Color_div(PyObject *v1, PyObject *v2) ColorObject *color1 = NULL; float scalar; - if ColorObject_Check(v1) { + if (ColorObject_Check(v1)) { color1 = (ColorObject *)v1; if (BaseMath_ReadCallback(color1) == -1) return NULL; @@ -633,40 +633,40 @@ static PyObject *Color_neg(ColorObject *self) static PyNumberMethods Color_NumMethods = { - (binaryfunc) Color_add, /*nb_add*/ - (binaryfunc) Color_sub, /*nb_subtract*/ - (binaryfunc) Color_mul, /*nb_multiply*/ - NULL, /*nb_remainder*/ - NULL, /*nb_divmod*/ - NULL, /*nb_power*/ + (binaryfunc) Color_add, /*nb_add*/ + (binaryfunc) Color_sub, /*nb_subtract*/ + (binaryfunc) Color_mul, /*nb_multiply*/ + NULL, /*nb_remainder*/ + NULL, /*nb_divmod*/ + NULL, /*nb_power*/ (unaryfunc) Color_neg, /*nb_negative*/ - (unaryfunc) NULL, /*tp_positive*/ - (unaryfunc) NULL, /*tp_absolute*/ - (inquiry) NULL, /*tp_bool*/ - (unaryfunc) NULL, /*nb_invert*/ - NULL, /*nb_lshift*/ - (binaryfunc)NULL, /*nb_rshift*/ - NULL, /*nb_and*/ - NULL, /*nb_xor*/ - NULL, /*nb_or*/ - NULL, /*nb_int*/ - NULL, /*nb_reserved*/ - NULL, /*nb_float*/ - Color_iadd, /* nb_inplace_add */ - Color_isub, /* nb_inplace_subtract */ - Color_imul, /* nb_inplace_multiply */ - NULL, /* nb_inplace_remainder */ - NULL, /* nb_inplace_power */ - NULL, /* nb_inplace_lshift */ - NULL, /* nb_inplace_rshift */ - NULL, /* nb_inplace_and */ - NULL, /* nb_inplace_xor */ - NULL, /* nb_inplace_or */ - NULL, /* nb_floor_divide */ - Color_div, /* nb_true_divide */ - NULL, /* nb_inplace_floor_divide */ - Color_idiv, /* nb_inplace_true_divide */ - NULL, /* nb_index */ + (unaryfunc) NULL, /*tp_positive*/ + (unaryfunc) NULL, /*tp_absolute*/ + (inquiry) NULL, /*tp_bool*/ + (unaryfunc) NULL, /*nb_invert*/ + NULL, /*nb_lshift*/ + (binaryfunc)NULL, /*nb_rshift*/ + NULL, /*nb_and*/ + NULL, /*nb_xor*/ + NULL, /*nb_or*/ + NULL, /*nb_int*/ + NULL, /*nb_reserved*/ + NULL, /*nb_float*/ + Color_iadd, /* nb_inplace_add */ + Color_isub, /* nb_inplace_subtract */ + Color_imul, /* nb_inplace_multiply */ + NULL, /* nb_inplace_remainder */ + NULL, /* nb_inplace_power */ + NULL, /* nb_inplace_lshift */ + NULL, /* nb_inplace_rshift */ + NULL, /* nb_inplace_and */ + NULL, /* nb_inplace_xor */ + NULL, /* nb_inplace_or */ + NULL, /* nb_floor_divide */ + Color_div, /* nb_true_divide */ + NULL, /* nb_inplace_floor_divide */ + Color_idiv, /* nb_inplace_true_divide */ + NULL, /* nb_index */ }; /* color channel, vector.r/g/b */ @@ -679,7 +679,7 @@ static PyObject *Color_channel_get(ColorObject *self, void *type) return Color_item(self, GET_INT_FROM_POINTER(type)); } -static int Color_channel_set(ColorObject *self, PyObject *value, void * type) +static int Color_channel_set(ColorObject *self, PyObject *value, void *type) { return Color_ass_item(self, GET_INT_FROM_POINTER(type), value); } @@ -702,7 +702,7 @@ static PyObject *Color_channel_hsv_get(ColorObject *self, void *type) return PyFloat_FromDouble(hsv[i]); } -static int Color_channel_hsv_set(ColorObject *self, PyObject *value, void * type) +static int Color_channel_hsv_set(ColorObject *self, PyObject *value, void *type) { float hsv[3]; int i = GET_INT_FROM_POINTER(type); @@ -800,51 +800,51 @@ PyDoc_STRVAR(color_doc, ); PyTypeObject color_Type = { PyVarObject_HEAD_INIT(NULL, 0) - "mathutils.Color", //tp_name - sizeof(ColorObject), //tp_basicsize - 0, //tp_itemsize - (destructor)BaseMathObject_dealloc, //tp_dealloc - NULL, //tp_print - NULL, //tp_getattr - NULL, //tp_setattr - NULL, //tp_compare - (reprfunc) Color_repr, //tp_repr - &Color_NumMethods, //tp_as_number - &Color_SeqMethods, //tp_as_sequence - &Color_AsMapping, //tp_as_mapping - NULL, //tp_hash - NULL, //tp_call - (reprfunc) Color_str, //tp_str - NULL, //tp_getattro - NULL, //tp_setattro - NULL, //tp_as_buffer + "mathutils.Color", //tp_name + sizeof(ColorObject), //tp_basicsize + 0, //tp_itemsize + (destructor)BaseMathObject_dealloc, //tp_dealloc + NULL, //tp_print + NULL, //tp_getattr + NULL, //tp_setattr + NULL, //tp_compare + (reprfunc) Color_repr, //tp_repr + &Color_NumMethods, //tp_as_number + &Color_SeqMethods, //tp_as_sequence + &Color_AsMapping, //tp_as_mapping + NULL, //tp_hash + NULL, //tp_call + (reprfunc) Color_str, //tp_str + NULL, //tp_getattro + NULL, //tp_setattro + NULL, //tp_as_buffer Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, //tp_flags color_doc, //tp_doc - (traverseproc)BaseMathObject_traverse, //tp_traverse - (inquiry)BaseMathObject_clear, //tp_clear - (richcmpfunc)Color_richcmpr, //tp_richcompare - 0, //tp_weaklistoffset - NULL, //tp_iter - NULL, //tp_iternext - Color_methods, //tp_methods - NULL, //tp_members - Color_getseters, //tp_getset - NULL, //tp_base - NULL, //tp_dict - NULL, //tp_descr_get - NULL, //tp_descr_set - 0, //tp_dictoffset - NULL, //tp_init - NULL, //tp_alloc - Color_new, //tp_new - NULL, //tp_free - NULL, //tp_is_gc - NULL, //tp_bases - NULL, //tp_mro - NULL, //tp_cache - NULL, //tp_subclasses - NULL, //tp_weaklist - NULL //tp_del + (traverseproc)BaseMathObject_traverse, //tp_traverse + (inquiry)BaseMathObject_clear, //tp_clear + (richcmpfunc)Color_richcmpr, //tp_richcompare + 0, //tp_weaklistoffset + NULL, //tp_iter + NULL, //tp_iternext + Color_methods, //tp_methods + NULL, //tp_members + Color_getseters, //tp_getset + NULL, //tp_base + NULL, //tp_dict + NULL, //tp_descr_get + NULL, //tp_descr_set + 0, //tp_dictoffset + NULL, //tp_init + NULL, //tp_alloc + Color_new, //tp_new + NULL, //tp_free + NULL, //tp_is_gc + NULL, //tp_bases + NULL, //tp_mro + NULL, //tp_cache + NULL, //tp_subclasses + NULL, //tp_weaklist + NULL //tp_del }; //------------------------Color_CreatePyObject (internal)------------- //creates a new color object @@ -856,8 +856,8 @@ PyObject *Color_CreatePyObject(float *col, int type, PyTypeObject *base_type) { ColorObject *self; - self = base_type ? (ColorObject *)base_type->tp_alloc(base_type, 0) : - (ColorObject *)PyObject_GC_New(ColorObject, &color_Type); + self = base_type ? (ColorObject *)base_type->tp_alloc(base_type, 0) : + (ColorObject *)PyObject_GC_New(ColorObject, &color_Type); if (self) { /* init callbacks as NULL */ diff --git a/source/blender/python/mathutils/mathutils_Euler.c b/source/blender/python/mathutils/mathutils_Euler.c index 957649e6365..ecd0cee03b5 100644 --- a/source/blender/python/mathutils/mathutils_Euler.c +++ b/source/blender/python/mathutils/mathutils_Euler.c @@ -61,16 +61,16 @@ static PyObject *Euler_new(PyTypeObject *type, PyObject *args, PyObject *kwds) return NULL; switch (PyTuple_GET_SIZE(args)) { - case 0: - break; - case 2: - if ((order = euler_order_from_string(order_str, "mathutils.Euler()")) == -1) - return NULL; + case 0: + break; + case 2: + if ((order = euler_order_from_string(order_str, "mathutils.Euler()")) == -1) + return NULL; /* intentionally pass through */ - case 1: - if (mathutils_array_parse(eul, EULER_SIZE, EULER_SIZE, seq, "mathutils.Euler()") == -1) - return NULL; - break; + case 1: + if (mathutils_array_parse(eul, EULER_SIZE, EULER_SIZE, seq, "mathutils.Euler()") == -1) + return NULL; + break; } return Euler_CreatePyObject(eul, order, Py_NEW, type); } @@ -86,12 +86,12 @@ short euler_order_from_string(const char *str, const char *error_prefix) { if ((str[0] && str[1] && str[2] && str[3] == '\0')) { switch (*((PY_INT32_T *)str)) { - case 'X'|'Y'<<8|'Z'<<16: return EULER_ORDER_XYZ; - case 'X'|'Z'<<8|'Y'<<16: return EULER_ORDER_XZY; - case 'Y'|'X'<<8|'Z'<<16: return EULER_ORDER_YXZ; - case 'Y'|'Z'<<8|'X'<<16: return EULER_ORDER_YZX; - case 'Z'|'X'<<8|'Y'<<16: return EULER_ORDER_ZXY; - case 'Z'|'Y'<<8|'X'<<16: return EULER_ORDER_ZYX; + case 'X' | 'Y' << 8 | 'Z' << 16: return EULER_ORDER_XYZ; + case 'X' | 'Z' << 8 | 'Y' << 16: return EULER_ORDER_XZY; + case 'Y' | 'X' << 8 | 'Z' << 16: return EULER_ORDER_YXZ; + case 'Y' | 'Z' << 8 | 'X' << 16: return EULER_ORDER_YZX; + case 'Z' | 'X' << 8 | 'Y' << 16: return EULER_ORDER_ZXY; + case 'Z' | 'Y' << 8 | 'X' << 16: return EULER_ORDER_ZYX; } } @@ -164,7 +164,7 @@ static PyObject *Euler_to_matrix(EulerObject *self) eulO_to_mat3((float (*)[3])mat, self->eul, self->order); - return Matrix_CreatePyObject(mat, 3, 3 , Py_NEW, NULL); + return Matrix_CreatePyObject(mat, 3, 3, Py_NEW, NULL); } PyDoc_STRVAR(Euler_zero_doc, @@ -550,16 +550,16 @@ static int Euler_ass_subscript(EulerObject *self, PyObject *item, PyObject *valu //-----------------PROTCOL DECLARATIONS-------------------------- static PySequenceMethods Euler_SeqMethods = { - (lenfunc) Euler_len, /* sq_length */ - (binaryfunc) NULL, /* sq_concat */ - (ssizeargfunc) NULL, /* sq_repeat */ - (ssizeargfunc) Euler_item, /* sq_item */ - (ssizessizeargfunc) NULL, /* sq_slice, deprecated */ - (ssizeobjargproc) Euler_ass_item, /* sq_ass_item */ - (ssizessizeobjargproc) NULL, /* sq_ass_slice, deprecated */ - (objobjproc) NULL, /* sq_contains */ - (binaryfunc) NULL, /* sq_inplace_concat */ - (ssizeargfunc) NULL, /* sq_inplace_repeat */ + (lenfunc) Euler_len, /* sq_length */ + (binaryfunc) NULL, /* sq_concat */ + (ssizeargfunc) NULL, /* sq_repeat */ + (ssizeargfunc) Euler_item, /* sq_item */ + (ssizessizeargfunc) NULL, /* sq_slice, deprecated */ + (ssizeobjargproc) Euler_ass_item, /* sq_ass_item */ + (ssizessizeobjargproc) NULL, /* sq_ass_slice, deprecated */ + (objobjproc) NULL, /* sq_contains */ + (binaryfunc) NULL, /* sq_inplace_concat */ + (ssizeargfunc) NULL, /* sq_inplace_repeat */ }; static PyMappingMethods Euler_AsMapping = { @@ -643,51 +643,51 @@ PyDoc_STRVAR(euler_doc, ); PyTypeObject euler_Type = { PyVarObject_HEAD_INIT(NULL, 0) - "mathutils.Euler", //tp_name - sizeof(EulerObject), //tp_basicsize - 0, //tp_itemsize - (destructor)BaseMathObject_dealloc, //tp_dealloc - NULL, //tp_print - NULL, //tp_getattr - NULL, //tp_setattr - NULL, //tp_compare - (reprfunc) Euler_repr, //tp_repr - NULL, //tp_as_number - &Euler_SeqMethods, //tp_as_sequence - &Euler_AsMapping, //tp_as_mapping - NULL, //tp_hash - NULL, //tp_call - (reprfunc) Euler_str, //tp_str - NULL, //tp_getattro - NULL, //tp_setattro - NULL, //tp_as_buffer + "mathutils.Euler", //tp_name + sizeof(EulerObject), //tp_basicsize + 0, //tp_itemsize + (destructor)BaseMathObject_dealloc, //tp_dealloc + NULL, //tp_print + NULL, //tp_getattr + NULL, //tp_setattr + NULL, //tp_compare + (reprfunc) Euler_repr, //tp_repr + NULL, //tp_as_number + &Euler_SeqMethods, //tp_as_sequence + &Euler_AsMapping, //tp_as_mapping + NULL, //tp_hash + NULL, //tp_call + (reprfunc) Euler_str, //tp_str + NULL, //tp_getattro + NULL, //tp_setattro + NULL, //tp_as_buffer Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, //tp_flags euler_doc, //tp_doc - (traverseproc)BaseMathObject_traverse, //tp_traverse - (inquiry)BaseMathObject_clear, //tp_clear - (richcmpfunc)Euler_richcmpr, //tp_richcompare - 0, //tp_weaklistoffset - NULL, //tp_iter - NULL, //tp_iternext - Euler_methods, //tp_methods - NULL, //tp_members - Euler_getseters, //tp_getset - NULL, //tp_base - NULL, //tp_dict - NULL, //tp_descr_get - NULL, //tp_descr_set - 0, //tp_dictoffset - NULL, //tp_init - NULL, //tp_alloc - Euler_new, //tp_new - NULL, //tp_free - NULL, //tp_is_gc - NULL, //tp_bases - NULL, //tp_mro - NULL, //tp_cache - NULL, //tp_subclasses - NULL, //tp_weaklist - NULL //tp_del + (traverseproc)BaseMathObject_traverse, //tp_traverse + (inquiry)BaseMathObject_clear, //tp_clear + (richcmpfunc)Euler_richcmpr, //tp_richcompare + 0, //tp_weaklistoffset + NULL, //tp_iter + NULL, //tp_iternext + Euler_methods, //tp_methods + NULL, //tp_members + Euler_getseters, //tp_getset + NULL, //tp_base + NULL, //tp_dict + NULL, //tp_descr_get + NULL, //tp_descr_set + 0, //tp_dictoffset + NULL, //tp_init + NULL, //tp_alloc + Euler_new, //tp_new + NULL, //tp_free + NULL, //tp_is_gc + NULL, //tp_bases + NULL, //tp_mro + NULL, //tp_cache + NULL, //tp_subclasses + NULL, //tp_weaklist + NULL //tp_del }; //------------------------Euler_CreatePyObject (internal)------------- //creates a new euler object @@ -699,8 +699,8 @@ PyObject *Euler_CreatePyObject(float *eul, short order, int type, PyTypeObject * { EulerObject *self; - self = base_type ? (EulerObject *)base_type->tp_alloc(base_type, 0) : - (EulerObject *)PyObject_GC_New(EulerObject, &euler_Type); + self = base_type ? (EulerObject *)base_type->tp_alloc(base_type, 0) : + (EulerObject *)PyObject_GC_New(EulerObject, &euler_Type); if (self) { /* init callbacks as NULL */ diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c index b352726dc44..472933fab57 100644 --- a/source/blender/python/mathutils/mathutils_Matrix.c +++ b/source/blender/python/mathutils/mathutils_Matrix.c @@ -431,8 +431,8 @@ static PyObject *C_Matrix_Identity(PyObject *cls, PyObject *args) if (matSize < 2 || matSize > 4) { PyErr_SetString(PyExc_RuntimeError, - "Matrix.Identity(): " - "size must be between 2 and 4"); + "Matrix.Identity(): " + "size must be between 2 and 4"); return NULL; } @@ -461,9 +461,9 @@ static PyObject *C_Matrix_Rotation(PyObject *cls, PyObject *args) int matSize; double angle; /* use double because of precision problems at high values */ float mat[16] = {0.0f, 0.0f, 0.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 1.0f}; + 0.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f}; if (!PyArg_ParseTuple(args, "di|O:Matrix.Rotation", &angle, &matSize, &vec)) { return NULL; @@ -549,7 +549,7 @@ PyDoc_STRVAR(C_Matrix_Translation_doc, ); static PyObject *C_Matrix_Translation(PyObject *cls, PyObject *value) { - float mat[4][4]= MAT4_UNITY; + float mat[4][4] = MAT4_UNITY; if (mathutils_array_parse(mat[3], 3, 4, value, "mathutils.Matrix.Translation(vector), invalid vector arg") == -1) return NULL; @@ -601,7 +601,7 @@ static PyObject *C_Matrix_Scale(PyObject *cls, PyObject *args) return NULL; } } - if (vec == NULL) { //scaling along axis + if (vec == NULL) { //scaling along axis if (matSize == 2) { mat[0] = factor; mat[3] = factor; @@ -612,8 +612,9 @@ static PyObject *C_Matrix_Scale(PyObject *cls, PyObject *args) mat[8] = factor; } } - else { //scaling in arbitrary direction - //normalize arbitrary axis + else { + /* scaling in arbitrary direction + * normalize arbitrary axis */ float norm = 0.0f; int x; for (x = 0; x < vec_size; x++) { @@ -624,21 +625,21 @@ static PyObject *C_Matrix_Scale(PyObject *cls, PyObject *args) tvec[x] /= norm; } if (matSize == 2) { - mat[0] = 1 + ((factor - 1) *(tvec[0] * tvec[0])); - mat[1] = ((factor - 1) *(tvec[0] * tvec[1])); - mat[2] = ((factor - 1) *(tvec[0] * tvec[1])); - mat[3] = 1 + ((factor - 1) *(tvec[1] * tvec[1])); + mat[0] = 1 + ((factor - 1) * (tvec[0] * tvec[0])); + mat[1] = ((factor - 1) * (tvec[0] * tvec[1])); + mat[2] = ((factor - 1) * (tvec[0] * tvec[1])); + mat[3] = 1 + ((factor - 1) * (tvec[1] * tvec[1])); } else { - mat[0] = 1 + ((factor - 1) *(tvec[0] * tvec[0])); - mat[1] = ((factor - 1) *(tvec[0] * tvec[1])); - mat[2] = ((factor - 1) *(tvec[0] * tvec[2])); - mat[3] = ((factor - 1) *(tvec[0] * tvec[1])); - mat[4] = 1 + ((factor - 1) *(tvec[1] * tvec[1])); - mat[5] = ((factor - 1) *(tvec[1] * tvec[2])); - mat[6] = ((factor - 1) *(tvec[0] * tvec[2])); - mat[7] = ((factor - 1) *(tvec[1] * tvec[2])); - mat[8] = 1 + ((factor - 1) *(tvec[2] * tvec[2])); + mat[0] = 1 + ((factor - 1) * (tvec[0] * tvec[0])); + mat[1] = ((factor - 1) * (tvec[0] * tvec[1])); + mat[2] = ((factor - 1) * (tvec[0] * tvec[2])); + mat[3] = ((factor - 1) * (tvec[0] * tvec[1])); + mat[4] = 1 + ((factor - 1) * (tvec[1] * tvec[1])); + mat[5] = ((factor - 1) * (tvec[1] * tvec[2])); + mat[6] = ((factor - 1) * (tvec[0] * tvec[2])); + mat[7] = ((factor - 1) * (tvec[1] * tvec[2])); + mat[8] = 1 + ((factor - 1) * (tvec[2] * tvec[2])); } } if (matSize == 4) { @@ -684,7 +685,7 @@ static PyObject *C_Matrix_OrthoProjection(PyObject *cls, PyObject *args) return NULL; } - if (PyUnicode_Check(axis)) { //ortho projection onto cardinal plane + if (PyUnicode_Check(axis)) { //ortho projection onto cardinal plane Py_ssize_t plane_len; const char *plane = _PyUnicode_AsStringAndSize(axis, &plane_len); if (matSize == 2) { @@ -971,10 +972,10 @@ static PyObject *Matrix_to_euler(MatrixObject *self, PyObject *args) } /*must be 3-4 cols, 3-4 rows, square matrix */ - if (self->num_row ==3 && self->num_col ==3) { + if (self->num_row == 3 && self->num_col == 3) { mat = (float (*)[3])self->matrix; } - else if (self->num_row ==4 && self->num_col ==4) { + else if (self->num_row == 4 && self->num_col == 4) { copy_m3_m4(tmat, (float (*)[4])self->matrix); mat = tmat; } @@ -993,12 +994,12 @@ static PyObject *Matrix_to_euler(MatrixObject *self, PyObject *args) } if (eul_compat) { - if (order == 1) mat3_to_compatible_eul(eul, eul_compatf, mat); - else mat3_to_compatible_eulO(eul, eul_compatf, order, mat); + if (order == 1) mat3_to_compatible_eul(eul, eul_compatf, mat); + else mat3_to_compatible_eulO(eul, eul_compatf, order, mat); } else { - if (order == 1) mat3_to_eul(eul, mat); - else mat3_to_eulO(eul, order, mat); + if (order == 1) mat3_to_eul(eul, mat); + else mat3_to_eulO(eul, order, mat); } return Euler_CreatePyObject(eul, order, Py_NEW, NULL); @@ -1202,10 +1203,10 @@ static PyObject *Matrix_invert(MatrixObject *self) mat[3] = MATRIX_ITEM(self, 0, 0); } else if (self->num_col == 3) { - adjoint_m3_m3((float (*)[3]) mat,(float (*)[3])self->matrix); + adjoint_m3_m3((float (*)[3])mat, (float (*)[3])self->matrix); } else if (self->num_col == 4) { - adjoint_m4_m4((float (*)[4]) mat, (float (*)[4])self->matrix); + adjoint_m4_m4((float (*)[4])mat, (float (*)[4])self->matrix); } /* divide by determinate */ for (x = 0; x < (self->num_col * self->num_row); x++) { @@ -1536,17 +1537,17 @@ static PyObject *Matrix_repr(MatrixObject *self) } } switch (self->num_row) { - case 2: return PyUnicode_FromFormat("Matrix((%R,\n" - " %R))", rows[0], rows[1]); + case 2: return PyUnicode_FromFormat("Matrix((%R,\n" + " %R))", rows[0], rows[1]); - case 3: return PyUnicode_FromFormat("Matrix((%R,\n" - " %R,\n" - " %R))", rows[0], rows[1], rows[2]); + case 3: return PyUnicode_FromFormat("Matrix((%R,\n" + " %R,\n" + " %R))", rows[0], rows[1], rows[2]); - case 4: return PyUnicode_FromFormat("Matrix((%R,\n" - " %R,\n" - " %R,\n" - " %R))", rows[0], rows[1], rows[2], rows[3]); + case 4: return PyUnicode_FromFormat("Matrix((%R,\n" + " %R,\n" + " %R,\n" + " %R))", rows[0], rows[1], rows[2], rows[3]); } Py_FatalError("Matrix(): invalid row size!"); @@ -1905,8 +1906,8 @@ static PyObject *Matrix_mul(PyObject *m1, PyObject *m2) if (mat1->num_col != mat2->num_row) { PyErr_SetString(PyExc_ValueError, - "matrix1 * matrix2: matrix1 number of columns " - "and the matrix2 number of rows must be the same"); + "matrix1 * matrix2: matrix1 number of columns " + "and the matrix2 number of rows must be the same"); return NULL; } @@ -1966,16 +1967,16 @@ static PyObject *Matrix_mul(PyObject *m1, PyObject *m2) /*-----------------PROTOCOL DECLARATIONS--------------------------*/ static PySequenceMethods Matrix_SeqMethods = { - (lenfunc) Matrix_len, /* sq_length */ - (binaryfunc) NULL, /* sq_concat */ - (ssizeargfunc) NULL, /* sq_repeat */ - (ssizeargfunc) Matrix_item_row, /* sq_item */ - (ssizessizeargfunc) NULL, /* sq_slice, deprecated */ - (ssizeobjargproc) Matrix_ass_item_row, /* sq_ass_item */ - (ssizessizeobjargproc) NULL, /* sq_ass_slice, deprecated */ - (objobjproc) NULL, /* sq_contains */ - (binaryfunc) NULL, /* sq_inplace_concat */ - (ssizeargfunc) NULL, /* sq_inplace_repeat */ + (lenfunc) Matrix_len, /* sq_length */ + (binaryfunc) NULL, /* sq_concat */ + (ssizeargfunc) NULL, /* sq_repeat */ + (ssizeargfunc) Matrix_item_row, /* sq_item */ + (ssizessizeargfunc) NULL, /* sq_slice, deprecated */ + (ssizeobjargproc) Matrix_ass_item_row, /* sq_ass_item */ + (ssizessizeobjargproc) NULL, /* sq_ass_slice, deprecated */ + (objobjproc) NULL, /* sq_contains */ + (binaryfunc) NULL, /* sq_inplace_concat */ + (ssizeargfunc) NULL, /* sq_inplace_repeat */ }; @@ -2056,40 +2057,40 @@ static PyMappingMethods Matrix_AsMapping = { static PyNumberMethods Matrix_NumMethods = { - (binaryfunc) Matrix_add, /*nb_add*/ - (binaryfunc) Matrix_sub, /*nb_subtract*/ - (binaryfunc) Matrix_mul, /*nb_multiply*/ - NULL, /*nb_remainder*/ - NULL, /*nb_divmod*/ - NULL, /*nb_power*/ - (unaryfunc) 0, /*nb_negative*/ - (unaryfunc) 0, /*tp_positive*/ - (unaryfunc) 0, /*tp_absolute*/ - (inquiry) 0, /*tp_bool*/ - (unaryfunc) Matrix_inverted, /*nb_invert*/ - NULL, /*nb_lshift*/ - (binaryfunc)0, /*nb_rshift*/ - NULL, /*nb_and*/ - NULL, /*nb_xor*/ - NULL, /*nb_or*/ - NULL, /*nb_int*/ - NULL, /*nb_reserved*/ - NULL, /*nb_float*/ - NULL, /* nb_inplace_add */ - NULL, /* nb_inplace_subtract */ - NULL, /* nb_inplace_multiply */ - NULL, /* nb_inplace_remainder */ - NULL, /* nb_inplace_power */ - NULL, /* nb_inplace_lshift */ - NULL, /* nb_inplace_rshift */ - NULL, /* nb_inplace_and */ - NULL, /* nb_inplace_xor */ - NULL, /* nb_inplace_or */ - NULL, /* nb_floor_divide */ - NULL, /* nb_true_divide */ - NULL, /* nb_inplace_floor_divide */ - NULL, /* nb_inplace_true_divide */ - NULL, /* nb_index */ + (binaryfunc) Matrix_add, /*nb_add*/ + (binaryfunc) Matrix_sub, /*nb_subtract*/ + (binaryfunc) Matrix_mul, /*nb_multiply*/ + NULL, /*nb_remainder*/ + NULL, /*nb_divmod*/ + NULL, /*nb_power*/ + (unaryfunc) 0, /*nb_negative*/ + (unaryfunc) 0, /*tp_positive*/ + (unaryfunc) 0, /*tp_absolute*/ + (inquiry) 0, /*tp_bool*/ + (unaryfunc) Matrix_inverted, /*nb_invert*/ + NULL, /*nb_lshift*/ + (binaryfunc)0, /*nb_rshift*/ + NULL, /*nb_and*/ + NULL, /*nb_xor*/ + NULL, /*nb_or*/ + NULL, /*nb_int*/ + NULL, /*nb_reserved*/ + NULL, /*nb_float*/ + NULL, /* nb_inplace_add */ + NULL, /* nb_inplace_subtract */ + NULL, /* nb_inplace_multiply */ + NULL, /* nb_inplace_remainder */ + NULL, /* nb_inplace_power */ + NULL, /* nb_inplace_lshift */ + NULL, /* nb_inplace_rshift */ + NULL, /* nb_inplace_and */ + NULL, /* nb_inplace_xor */ + NULL, /* nb_inplace_or */ + NULL, /* nb_floor_divide */ + NULL, /* nb_true_divide */ + NULL, /* nb_inplace_floor_divide */ + NULL, /* nb_inplace_true_divide */ + NULL, /* nb_index */ }; PyDoc_STRVAR(Matrix_translation_doc, @@ -2233,7 +2234,7 @@ static PyGetSetDef Matrix_getseters[] = { {(char *)"is_negative", (getter)Matrix_is_negative_get, (setter)NULL, Matrix_is_negative_doc, NULL}, {(char *)"is_orthogonal", (getter)Matrix_is_orthogonal_get, (setter)NULL, Matrix_is_orthogonal_doc, NULL}, {(char *)"is_wrapped", (getter)BaseMathObject_is_wrapped_get, (setter)NULL, BaseMathObject_is_wrapped_doc, NULL}, - {(char *)"owner",(getter)BaseMathObject_owner_get, (setter)NULL, BaseMathObject_owner_doc, NULL}, + {(char *)"owner", (getter)BaseMathObject_owner_get, (setter)NULL, BaseMathObject_owner_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ }; @@ -2285,51 +2286,51 @@ PyDoc_STRVAR(matrix_doc, ); PyTypeObject matrix_Type = { PyVarObject_HEAD_INIT(NULL, 0) - "mathutils.Matrix", /*tp_name*/ - sizeof(MatrixObject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - (destructor)BaseMathObject_dealloc, /*tp_dealloc*/ - NULL, /*tp_print*/ - NULL, /*tp_getattr*/ - NULL, /*tp_setattr*/ - NULL, /*tp_compare*/ - (reprfunc) Matrix_repr, /*tp_repr*/ - &Matrix_NumMethods, /*tp_as_number*/ - &Matrix_SeqMethods, /*tp_as_sequence*/ - &Matrix_AsMapping, /*tp_as_mapping*/ - NULL, /*tp_hash*/ - NULL, /*tp_call*/ - (reprfunc) Matrix_str, /*tp_str*/ - NULL, /*tp_getattro*/ - NULL, /*tp_setattro*/ - NULL, /*tp_as_buffer*/ + "mathutils.Matrix", /*tp_name*/ + sizeof(MatrixObject), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + (destructor)BaseMathObject_dealloc, /*tp_dealloc*/ + NULL, /*tp_print*/ + NULL, /*tp_getattr*/ + NULL, /*tp_setattr*/ + NULL, /*tp_compare*/ + (reprfunc) Matrix_repr, /*tp_repr*/ + &Matrix_NumMethods, /*tp_as_number*/ + &Matrix_SeqMethods, /*tp_as_sequence*/ + &Matrix_AsMapping, /*tp_as_mapping*/ + NULL, /*tp_hash*/ + NULL, /*tp_call*/ + (reprfunc) Matrix_str, /*tp_str*/ + NULL, /*tp_getattro*/ + NULL, /*tp_setattro*/ + NULL, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, /*tp_flags*/ - matrix_doc, /*tp_doc*/ - (traverseproc)BaseMathObject_traverse, //tp_traverse - (inquiry)BaseMathObject_clear, //tp_clear - (richcmpfunc)Matrix_richcmpr, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - NULL, /*tp_iter*/ - NULL, /*tp_iternext*/ - Matrix_methods, /*tp_methods*/ - NULL, /*tp_members*/ - Matrix_getseters, /*tp_getset*/ - NULL, /*tp_base*/ - NULL, /*tp_dict*/ - NULL, /*tp_descr_get*/ - NULL, /*tp_descr_set*/ - 0, /*tp_dictoffset*/ - NULL, /*tp_init*/ - NULL, /*tp_alloc*/ - Matrix_new, /*tp_new*/ - NULL, /*tp_free*/ - NULL, /*tp_is_gc*/ - NULL, /*tp_bases*/ - NULL, /*tp_mro*/ - NULL, /*tp_cache*/ - NULL, /*tp_subclasses*/ - NULL, /*tp_weaklist*/ - NULL /*tp_del*/ + matrix_doc, /*tp_doc*/ + (traverseproc)BaseMathObject_traverse, //tp_traverse + (inquiry)BaseMathObject_clear, //tp_clear + (richcmpfunc)Matrix_richcmpr, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + NULL, /*tp_iter*/ + NULL, /*tp_iternext*/ + Matrix_methods, /*tp_methods*/ + NULL, /*tp_members*/ + Matrix_getseters, /*tp_getset*/ + NULL, /*tp_base*/ + NULL, /*tp_dict*/ + NULL, /*tp_descr_get*/ + NULL, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + NULL, /*tp_init*/ + NULL, /*tp_alloc*/ + Matrix_new, /*tp_new*/ + NULL, /*tp_free*/ + NULL, /*tp_is_gc*/ + NULL, /*tp_bases*/ + NULL, /*tp_mro*/ + NULL, /*tp_cache*/ + NULL, /*tp_subclasses*/ + NULL, /*tp_weaklist*/ + NULL /*tp_del*/ }; /* pass Py_WRAP - if vector is a WRAPPER for data allocated by BLENDER @@ -2374,7 +2375,7 @@ PyObject *Matrix_CreatePyObject(float *mat, return NULL; } - if (mat) { /*if a float array passed*/ + if (mat) { /*if a float array passed*/ memcpy(self->matrix, mat, num_col * num_row * sizeof(float)); } else if (num_col == num_row) { @@ -2448,8 +2449,8 @@ static void MatrixAccess_dealloc(MatrixAccessObject *self) static int MatrixAccess_len(MatrixAccessObject *self) { return (self->type == MAT_ACCESS_ROW) ? - self->matrix_user->num_row : - self->matrix_user->num_col; + self->matrix_user->num_row : + self->matrix_user->num_col; } static PyObject *MatrixAccess_slice(MatrixAccessObject *self, int begin, int end) @@ -2585,30 +2586,30 @@ static PyMappingMethods MatrixAccess_AsMapping = { PyTypeObject matrix_access_Type = { PyVarObject_HEAD_INIT(NULL, 0) - "MatrixAccess", /*tp_name*/ - sizeof(MatrixAccessObject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - (destructor)MatrixAccess_dealloc, /*tp_dealloc*/ - NULL, /*tp_print*/ - NULL, /*tp_getattr*/ - NULL, /*tp_setattr*/ - NULL, /*tp_compare*/ - NULL, /*tp_repr*/ - NULL, /*tp_as_number*/ - NULL /*&MatrixAccess_SeqMethods*/ /* TODO */, /*tp_as_sequence*/ - &MatrixAccess_AsMapping, /*tp_as_mapping*/ - NULL, /*tp_hash*/ - NULL, /*tp_call*/ - NULL, /*tp_str*/ - NULL, /*tp_getattro*/ - NULL, /*tp_setattro*/ - NULL, /*tp_as_buffer*/ + "MatrixAccess", /*tp_name*/ + sizeof(MatrixAccessObject), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + (destructor)MatrixAccess_dealloc, /*tp_dealloc*/ + NULL, /*tp_print*/ + NULL, /*tp_getattr*/ + NULL, /*tp_setattr*/ + NULL, /*tp_compare*/ + NULL, /*tp_repr*/ + NULL, /*tp_as_number*/ + NULL /*&MatrixAccess_SeqMethods*/ /* TODO */, /*tp_as_sequence*/ + &MatrixAccess_AsMapping, /*tp_as_mapping*/ + NULL, /*tp_hash*/ + NULL, /*tp_call*/ + NULL, /*tp_str*/ + NULL, /*tp_getattro*/ + NULL, /*tp_setattro*/ + NULL, /*tp_as_buffer*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /*tp_flags*/ - NULL, /*tp_doc*/ - (traverseproc)MatrixAccess_traverse, //tp_traverse - (inquiry)MatrixAccess_clear, //tp_clear + NULL, /*tp_doc*/ + (traverseproc)MatrixAccess_traverse, //tp_traverse + (inquiry)MatrixAccess_clear, //tp_clear NULL /* (richcmpfunc)MatrixAccess_richcmpr */ /* TODO*/, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ + 0, /*tp_weaklistoffset*/ (getiterfunc)MatrixAccess_iter, /* getiterfunc tp_iter; */ }; diff --git a/source/blender/python/mathutils/mathutils_Quaternion.c b/source/blender/python/mathutils/mathutils_Quaternion.c index 80910c409bc..da27c7a57bb 100644 --- a/source/blender/python/mathutils/mathutils_Quaternion.c +++ b/source/blender/python/mathutils/mathutils_Quaternion.c @@ -113,12 +113,12 @@ static PyObject *Quaternion_to_euler(QuaternionObject *self, PyObject *args) quat_to_mat3(mat, tquat); - if (order == EULER_ORDER_XYZ) mat3_to_compatible_eul(eul, eul_compat->eul, mat); - else mat3_to_compatible_eulO(eul, eul_compat->eul, order, mat); + if (order == EULER_ORDER_XYZ) mat3_to_compatible_eul(eul, eul_compat->eul, mat); + else mat3_to_compatible_eulO(eul, eul_compat->eul, order, mat); } else { - if (order == EULER_ORDER_XYZ) quat_to_eul(eul, tquat); - else quat_to_eulO(eul, order, tquat); + if (order == EULER_ORDER_XYZ) quat_to_eul(eul, tquat); + else quat_to_eulO(eul, order, tquat); } return Euler_CreatePyObject(eul, order, Py_NEW, NULL); @@ -741,8 +741,8 @@ static PyObject *Quaternion_add(PyObject *q1, PyObject *q2) Py_TYPE(q1)->tp_name, Py_TYPE(q2)->tp_name); return NULL; } - quat1 = (QuaternionObject*)q1; - quat2 = (QuaternionObject*)q2; + quat1 = (QuaternionObject *)q1; + quat2 = (QuaternionObject *)q2; if (BaseMath_ReadCallback(quat1) == -1 || BaseMath_ReadCallback(quat2) == -1) return NULL; @@ -766,8 +766,8 @@ static PyObject *Quaternion_sub(PyObject *q1, PyObject *q2) return NULL; } - quat1 = (QuaternionObject*)q1; - quat2 = (QuaternionObject*)q2; + quat1 = (QuaternionObject *)q1; + quat2 = (QuaternionObject *)q2; if (BaseMath_ReadCallback(quat1) == -1 || BaseMath_ReadCallback(quat2) == -1) return NULL; @@ -795,12 +795,12 @@ static PyObject *Quaternion_mul(PyObject *q1, PyObject *q2) QuaternionObject *quat1 = NULL, *quat2 = NULL; if (QuaternionObject_Check(q1)) { - quat1 = (QuaternionObject*)q1; + quat1 = (QuaternionObject *)q1; if (BaseMath_ReadCallback(quat1) == -1) return NULL; } if (QuaternionObject_Check(q2)) { - quat2 = (QuaternionObject*)q2; + quat2 = (QuaternionObject *)q2; if (BaseMath_ReadCallback(quat2) == -1) return NULL; } @@ -823,8 +823,8 @@ static PyObject *Quaternion_mul(PyObject *q1, PyObject *q2) if (vec2->size != 3) { PyErr_SetString(PyExc_ValueError, - "Vector multiplication: " - "only 3D vector rotations (with quats) " + "Vector multiplication: " + "only 3D vector rotations (with quats) " "currently supported"); return NULL; } @@ -869,16 +869,16 @@ static PyObject *Quaternion_neg(QuaternionObject *self) //-----------------PROTOCOL DECLARATIONS-------------------------- static PySequenceMethods Quaternion_SeqMethods = { - (lenfunc) Quaternion_len, /* sq_length */ - (binaryfunc) NULL, /* sq_concat */ - (ssizeargfunc) NULL, /* sq_repeat */ - (ssizeargfunc) Quaternion_item, /* sq_item */ - (ssizessizeargfunc) NULL, /* sq_slice, deprecated */ - (ssizeobjargproc) Quaternion_ass_item, /* sq_ass_item */ - (ssizessizeobjargproc) NULL, /* sq_ass_slice, deprecated */ - (objobjproc) NULL, /* sq_contains */ - (binaryfunc) NULL, /* sq_inplace_concat */ - (ssizeargfunc) NULL, /* sq_inplace_repeat */ + (lenfunc) Quaternion_len, /* sq_length */ + (binaryfunc) NULL, /* sq_concat */ + (ssizeargfunc) NULL, /* sq_repeat */ + (ssizeargfunc) Quaternion_item, /* sq_item */ + (ssizessizeargfunc) NULL, /* sq_slice, deprecated */ + (ssizeobjargproc) Quaternion_ass_item, /* sq_ass_item */ + (ssizessizeobjargproc) NULL, /* sq_ass_slice, deprecated */ + (objobjproc) NULL, /* sq_contains */ + (binaryfunc) NULL, /* sq_inplace_concat */ + (ssizeargfunc) NULL, /* sq_inplace_repeat */ }; static PyMappingMethods Quaternion_AsMapping = { @@ -888,40 +888,40 @@ static PyMappingMethods Quaternion_AsMapping = { }; static PyNumberMethods Quaternion_NumMethods = { - (binaryfunc) Quaternion_add, /*nb_add*/ - (binaryfunc) Quaternion_sub, /*nb_subtract*/ - (binaryfunc) Quaternion_mul, /*nb_multiply*/ - NULL, /*nb_remainder*/ - NULL, /*nb_divmod*/ - NULL, /*nb_power*/ - (unaryfunc) Quaternion_neg, /*nb_negative*/ - (unaryfunc) 0, /*tp_positive*/ - (unaryfunc) 0, /*tp_absolute*/ - (inquiry) 0, /*tp_bool*/ - (unaryfunc) 0, /*nb_invert*/ - NULL, /*nb_lshift*/ - (binaryfunc)0, /*nb_rshift*/ - NULL, /*nb_and*/ - NULL, /*nb_xor*/ - NULL, /*nb_or*/ - NULL, /*nb_int*/ - NULL, /*nb_reserved*/ - NULL, /*nb_float*/ - NULL, /* nb_inplace_add */ - NULL, /* nb_inplace_subtract */ - NULL, /* nb_inplace_multiply */ - NULL, /* nb_inplace_remainder */ - NULL, /* nb_inplace_power */ - NULL, /* nb_inplace_lshift */ - NULL, /* nb_inplace_rshift */ - NULL, /* nb_inplace_and */ - NULL, /* nb_inplace_xor */ - NULL, /* nb_inplace_or */ - NULL, /* nb_floor_divide */ - NULL, /* nb_true_divide */ - NULL, /* nb_inplace_floor_divide */ - NULL, /* nb_inplace_true_divide */ - NULL, /* nb_index */ + (binaryfunc) Quaternion_add, /*nb_add*/ + (binaryfunc) Quaternion_sub, /*nb_subtract*/ + (binaryfunc) Quaternion_mul, /*nb_multiply*/ + NULL, /*nb_remainder*/ + NULL, /*nb_divmod*/ + NULL, /*nb_power*/ + (unaryfunc) Quaternion_neg, /*nb_negative*/ + (unaryfunc) 0, /*tp_positive*/ + (unaryfunc) 0, /*tp_absolute*/ + (inquiry) 0, /*tp_bool*/ + (unaryfunc) 0, /*nb_invert*/ + NULL, /*nb_lshift*/ + (binaryfunc)0, /*nb_rshift*/ + NULL, /*nb_and*/ + NULL, /*nb_xor*/ + NULL, /*nb_or*/ + NULL, /*nb_int*/ + NULL, /*nb_reserved*/ + NULL, /*nb_float*/ + NULL, /* nb_inplace_add */ + NULL, /* nb_inplace_subtract */ + NULL, /* nb_inplace_multiply */ + NULL, /* nb_inplace_remainder */ + NULL, /* nb_inplace_power */ + NULL, /* nb_inplace_lshift */ + NULL, /* nb_inplace_rshift */ + NULL, /* nb_inplace_and */ + NULL, /* nb_inplace_xor */ + NULL, /* nb_inplace_or */ + NULL, /* nb_floor_divide */ + NULL, /* nb_true_divide */ + NULL, /* nb_inplace_floor_divide */ + NULL, /* nb_inplace_true_divide */ + NULL, /* nb_index */ }; PyDoc_STRVAR(Quaternion_axis_doc, @@ -1070,19 +1070,19 @@ static PyObject *Quaternion_new(PyTypeObject *type, PyObject *args, PyObject *kw return NULL; switch (PyTuple_GET_SIZE(args)) { - case 0: - break; - case 1: - if (mathutils_array_parse(quat, QUAT_SIZE, QUAT_SIZE, seq, "mathutils.Quaternion()") == -1) - return NULL; - break; - case 2: - if (mathutils_array_parse(quat, 3, 3, seq, "mathutils.Quaternion()") == -1) - return NULL; - angle = angle_wrap_rad(angle); /* clamp because of precision issues */ - axis_angle_to_quat(quat, quat, angle); - break; - /* PyArg_ParseTuple assures no more then 2 */ + case 0: + break; + case 1: + if (mathutils_array_parse(quat, QUAT_SIZE, QUAT_SIZE, seq, "mathutils.Quaternion()") == -1) + return NULL; + break; + case 2: + if (mathutils_array_parse(quat, 3, 3, seq, "mathutils.Quaternion()") == -1) + return NULL; + angle = angle_wrap_rad(angle); /* clamp because of precision issues */ + axis_angle_to_quat(quat, quat, angle); + break; + /* PyArg_ParseTuple assures no more then 2 */ } return Quaternion_CreatePyObject(quat, Py_NEW, type); } @@ -1172,7 +1172,7 @@ static PyGetSetDef Quaternion_getseters[] = { {(char *)"z", (getter)Quaternion_axis_get, (setter)Quaternion_axis_set, Quaternion_axis_doc, (void *)3}, {(char *)"magnitude", (getter)Quaternion_magnitude_get, (setter)NULL, Quaternion_magnitude_doc, NULL}, {(char *)"angle", (getter)Quaternion_angle_get, (setter)Quaternion_angle_set, Quaternion_angle_doc, NULL}, - {(char *)"axis",(getter)Quaternion_axis_vector_get, (setter)Quaternion_axis_vector_set, Quaternion_axis_vector_doc, NULL}, + {(char *)"axis", (getter)Quaternion_axis_vector_get, (setter)Quaternion_axis_vector_set, Quaternion_axis_vector_doc, NULL}, {(char *)"is_wrapped", (getter)BaseMathObject_is_wrapped_get, (setter)NULL, BaseMathObject_is_wrapped_doc, NULL}, {(char *)"owner", (getter)BaseMathObject_owner_get, (setter)NULL, BaseMathObject_owner_doc, NULL}, {NULL, NULL, NULL, NULL, NULL} /* Sentinel */ @@ -1184,51 +1184,51 @@ PyDoc_STRVAR(quaternion_doc, ); PyTypeObject quaternion_Type = { PyVarObject_HEAD_INIT(NULL, 0) - "mathutils.Quaternion", //tp_name - sizeof(QuaternionObject), //tp_basicsize - 0, //tp_itemsize - (destructor)BaseMathObject_dealloc, //tp_dealloc - NULL, //tp_print - NULL, //tp_getattr - NULL, //tp_setattr - NULL, //tp_compare - (reprfunc) Quaternion_repr, //tp_repr - &Quaternion_NumMethods, //tp_as_number - &Quaternion_SeqMethods, //tp_as_sequence - &Quaternion_AsMapping, //tp_as_mapping - NULL, //tp_hash - NULL, //tp_call - (reprfunc) Quaternion_str, //tp_str - NULL, //tp_getattro - NULL, //tp_setattro - NULL, //tp_as_buffer + "mathutils.Quaternion", //tp_name + sizeof(QuaternionObject), //tp_basicsize + 0, //tp_itemsize + (destructor)BaseMathObject_dealloc, //tp_dealloc + NULL, //tp_print + NULL, //tp_getattr + NULL, //tp_setattr + NULL, //tp_compare + (reprfunc) Quaternion_repr, //tp_repr + &Quaternion_NumMethods, //tp_as_number + &Quaternion_SeqMethods, //tp_as_sequence + &Quaternion_AsMapping, //tp_as_mapping + NULL, //tp_hash + NULL, //tp_call + (reprfunc) Quaternion_str, //tp_str + NULL, //tp_getattro + NULL, //tp_setattro + NULL, //tp_as_buffer Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, //tp_flags quaternion_doc, //tp_doc - (traverseproc)BaseMathObject_traverse, //tp_traverse - (inquiry)BaseMathObject_clear, //tp_clear - (richcmpfunc)Quaternion_richcmpr, //tp_richcompare - 0, //tp_weaklistoffset - NULL, //tp_iter - NULL, //tp_iternext - Quaternion_methods, //tp_methods - NULL, //tp_members - Quaternion_getseters, //tp_getset - NULL, //tp_base - NULL, //tp_dict - NULL, //tp_descr_get - NULL, //tp_descr_set - 0, //tp_dictoffset - NULL, //tp_init - NULL, //tp_alloc - Quaternion_new, //tp_new - NULL, //tp_free - NULL, //tp_is_gc - NULL, //tp_bases - NULL, //tp_mro - NULL, //tp_cache - NULL, //tp_subclasses - NULL, //tp_weaklist - NULL, //tp_del + (traverseproc)BaseMathObject_traverse, //tp_traverse + (inquiry)BaseMathObject_clear, //tp_clear + (richcmpfunc)Quaternion_richcmpr, //tp_richcompare + 0, //tp_weaklistoffset + NULL, //tp_iter + NULL, //tp_iternext + Quaternion_methods, //tp_methods + NULL, //tp_members + Quaternion_getseters, //tp_getset + NULL, //tp_base + NULL, //tp_dict + NULL, //tp_descr_get + NULL, //tp_descr_set + 0, //tp_dictoffset + NULL, //tp_init + NULL, //tp_alloc + Quaternion_new, //tp_new + NULL, //tp_free + NULL, //tp_is_gc + NULL, //tp_bases + NULL, //tp_mro + NULL, //tp_cache + NULL, //tp_subclasses + NULL, //tp_weaklist + NULL, //tp_del }; //------------------------Quaternion_CreatePyObject (internal)------------- //creates a new quaternion object diff --git a/source/blender/python/mathutils/mathutils_Vector.c b/source/blender/python/mathutils/mathutils_Vector.c index 771db838c69..fbf30bcb387 100644 --- a/source/blender/python/mathutils/mathutils_Vector.c +++ b/source/blender/python/mathutils/mathutils_Vector.c @@ -59,31 +59,31 @@ static PyObject *Vector_new(PyTypeObject *type, PyObject *args, PyObject *UNUSED int size = 3; /* default to a 3D vector */ switch (PyTuple_GET_SIZE(args)) { - case 0: - vec = PyMem_Malloc(size * sizeof(float)); + case 0: + vec = PyMem_Malloc(size * sizeof(float)); - if (vec == NULL) { - PyErr_SetString(PyExc_MemoryError, - "Vector(): " - "problem allocating pointer space"); - return NULL; - } + if (vec == NULL) { + PyErr_SetString(PyExc_MemoryError, + "Vector(): " + "problem allocating pointer space"); + return NULL; + } - fill_vn_fl(vec, size, 0.0f); - break; - case 1: - if ((size = mathutils_array_parse_alloc(&vec, 2, PyTuple_GET_ITEM(args, 0), "mathutils.Vector()")) == -1) { - if (vec) { - PyMem_Free(vec); + fill_vn_fl(vec, size, 0.0f); + break; + case 1: + if ((size = mathutils_array_parse_alloc(&vec, 2, PyTuple_GET_ITEM(args, 0), "mathutils.Vector()")) == -1) { + if (vec) { + PyMem_Free(vec); + } + return NULL; } + break; + default: + PyErr_SetString(PyExc_TypeError, + "mathutils.Vector(): " + "more then a single arg given"); return NULL; - } - break; - default: - PyErr_SetString(PyExc_TypeError, - "mathutils.Vector(): " - "more then a single arg given"); - return NULL; } return Vector_CreatePyObject(vec, size, Py_NEW, type); } @@ -133,7 +133,7 @@ static PyObject *C_Vector_Fill(PyObject *cls, PyObject *args) if (vec == NULL) { PyErr_SetString(PyExc_MemoryError, - "Vector.Fill(): " + "Vector.Fill(): " "problem allocating pointer space"); return NULL; } @@ -167,36 +167,36 @@ static PyObject *C_Vector_Range(PyObject *cls, PyObject *args) } switch (PyTuple_GET_SIZE(args)) { - case 1: - size = start; - start = 0; - break; - case 2: - if (start >= stop) { - PyErr_SetString(PyExc_RuntimeError, - "Start value is larger " - "than the stop value"); - return NULL; - } + case 1: + size = start; + start = 0; + break; + case 2: + if (start >= stop) { + PyErr_SetString(PyExc_RuntimeError, + "Start value is larger " + "than the stop value"); + return NULL; + } - size = stop - start; - break; - default: - if (start >= stop) { - PyErr_SetString(PyExc_RuntimeError, - "Start value is larger " - "than the stop value"); - return NULL; - } + size = stop - start; + break; + default: + if (start >= stop) { + PyErr_SetString(PyExc_RuntimeError, + "Start value is larger " + "than the stop value"); + return NULL; + } - size = (stop - start); + size = (stop - start); - if ((size % step) != 0) - size += step; + if ((size % step) != 0) + size += step; - size /= step; + size /= step; - break; + break; } if (size < 2) { @@ -412,7 +412,7 @@ static PyObject *Vector_resize(VectorObject *self, PyObject *value) self->vec = PyMem_Realloc(self->vec, (size * sizeof(float))); if (self->vec == NULL) { PyErr_SetString(PyExc_MemoryError, - "Vector.resize(): " + "Vector.resize(): " "problem allocating pointer space"); return NULL; } @@ -831,13 +831,11 @@ static PyObject *Vector_reflect(VectorObject *self, PyObject *value) mirror[0] = tvec[0]; mirror[1] = tvec[1]; - if (value_size > 2) mirror[2] = tvec[2]; - else mirror[2] = 0.0; + mirror[2] = (value_size > 2) ? tvec[2] : 0.0f; vec[0] = self->vec[0]; vec[1] = self->vec[1]; - if (self->size > 2) vec[2] = self->vec[2]; - else vec[2] = 0.0; + vec[2] = (value_size > 2) ? self->vec[2] : 0.0f; normalize_v3(mirror); reflect_v3_v3v3(reflect, vec, mirror); @@ -1363,7 +1361,7 @@ static int Vector_ass_slice(VectorObject *self, int begin, int end, PyObject *se if (vec == NULL) { PyErr_SetString(PyExc_MemoryError, - "vec[:] = seq: " + "vec[:] = seq: " "problem allocating pointer space"); return -1; } @@ -1397,8 +1395,8 @@ static PyObject *Vector_add(PyObject *v1, PyObject *v2) Py_TYPE(v1)->tp_name, Py_TYPE(v2)->tp_name); return NULL; } - vec1 = (VectorObject*)v1; - vec2 = (VectorObject*)v2; + vec1 = (VectorObject *)v1; + vec2 = (VectorObject *)v2; if (BaseMath_ReadCallback(vec1) == -1 || BaseMath_ReadCallback(vec2) == -1) return NULL; @@ -1437,8 +1435,8 @@ static PyObject *Vector_iadd(PyObject *v1, PyObject *v2) Py_TYPE(v1)->tp_name, Py_TYPE(v2)->tp_name); return NULL; } - vec1 = (VectorObject*)v1; - vec2 = (VectorObject*)v2; + vec1 = (VectorObject *)v1; + vec2 = (VectorObject *)v2; if (vec1->size != vec2->size) { PyErr_SetString(PyExc_AttributeError, @@ -1470,8 +1468,8 @@ static PyObject *Vector_sub(PyObject *v1, PyObject *v2) Py_TYPE(v1)->tp_name, Py_TYPE(v2)->tp_name); return NULL; } - vec1 = (VectorObject*)v1; - vec2 = (VectorObject*)v2; + vec1 = (VectorObject *)v1; + vec2 = (VectorObject *)v2; if (BaseMath_ReadCallback(vec1) == -1 || BaseMath_ReadCallback(vec2) == -1) return NULL; @@ -1509,8 +1507,8 @@ static PyObject *Vector_isub(PyObject *v1, PyObject *v2) Py_TYPE(v1)->tp_name, Py_TYPE(v2)->tp_name); return NULL; } - vec1 = (VectorObject*)v1; - vec2 = (VectorObject*)v2; + vec1 = (VectorObject *)v1; + vec2 = (VectorObject *)v2; if (vec1->size != vec2->size) { PyErr_SetString(PyExc_AttributeError, @@ -1553,7 +1551,7 @@ int column_vector_multiplication(float r_vec[MAX_DIMENSIONS], VectorObject *vec, else { PyErr_SetString(PyExc_ValueError, "matrix * vector: " - "len(matrix.col) and len(vector) must be the same, " + "len(matrix.col) and len(vector) must be the same, " "except for 4x4 matrix * 3D vector."); return -1; } @@ -1595,12 +1593,12 @@ static PyObject *Vector_mul(PyObject *v1, PyObject *v2) float scalar; int vec_size; - if VectorObject_Check(v1) { + if (VectorObject_Check(v1)) { vec1 = (VectorObject *)v1; if (BaseMath_ReadCallback(vec1) == -1) return NULL; } - if VectorObject_Check(v2) { + if (VectorObject_Check(v2)) { vec2 = (VectorObject *)v2; if (BaseMath_ReadCallback(vec2) == -1) return NULL; @@ -1626,7 +1624,7 @@ static PyObject *Vector_mul(PyObject *v1, PyObject *v2) if (BaseMath_ReadCallback((MatrixObject *)v2) == -1) return NULL; - if (row_vector_multiplication(tvec, vec1, (MatrixObject*)v2) == -1) { + if (row_vector_multiplication(tvec, vec1, (MatrixObject *)v2) == -1) { return NULL; } @@ -1648,7 +1646,7 @@ static PyObject *Vector_mul(PyObject *v1, PyObject *v2) "order (promoted to an Error for Debug builds)"); return NULL; #else - QuaternionObject *quat2 = (QuaternionObject*)v2; + QuaternionObject *quat2 = (QuaternionObject *)v2; float tvec[3]; if (vec1->size != 3) { @@ -1702,16 +1700,16 @@ static PyObject *Vector_imul(PyObject *v1, PyObject *v2) /* ------ to be removed ------*/ #if 1 PyErr_SetString(PyExc_ValueError, - "(Vector *= Matrix) is now removed, reverse the " - "order (promoted to an Error for Debug builds) " - "and uses the non in-place multiplication."); + "(Vector *= Matrix) is now removed, reverse the " + "order (promoted to an Error for Debug builds) " + "and uses the non in-place multiplication."); return NULL; #else float rvec[MAX_DIMENSIONS]; if (BaseMath_ReadCallback((MatrixObject *)v2) == -1) return NULL; - if (column_vector_multiplication(rvec, vec, (MatrixObject*)v2) == -1) + if (column_vector_multiplication(rvec, vec, (MatrixObject *)v2) == -1) return NULL; memcpy(vec->vec, rvec, sizeof(float) * vec->size); @@ -1724,12 +1722,12 @@ static PyObject *Vector_imul(PyObject *v1, PyObject *v2) /* ------ to be removed ------*/ #if 1 PyErr_SetString(PyExc_ValueError, - "(Vector *= Quat) is now removed, reverse the " - "order (promoted to an Error for Debug builds) " - "and uses the non in-place multiplication."); + "(Vector *= Quat) is now removed, reverse the " + "order (promoted to an Error for Debug builds) " + "and uses the non in-place multiplication."); return NULL; #else - QuaternionObject *quat2 = (QuaternionObject*)v2; + QuaternionObject *quat2 = (QuaternionObject *)v2; if (vec->size != 3) { PyErr_SetString(PyExc_ValueError, @@ -1811,7 +1809,7 @@ static PyObject *Vector_div(PyObject *v1, PyObject *v2) static PyObject *Vector_idiv(PyObject *v1, PyObject *v2) { float scalar; - VectorObject *vec1 = (VectorObject*)v1; + VectorObject *vec1 = (VectorObject *)v1; if (BaseMath_ReadCallback(vec1) == -1) return NULL; @@ -1880,8 +1878,8 @@ static PyObject *Vector_richcmpr(PyObject *objectA, PyObject *objectB, int compa Py_RETURN_FALSE; } } - vecA = (VectorObject*)objectA; - vecB = (VectorObject*)objectB; + vecA = (VectorObject *)objectA; + vecB = (VectorObject *)objectB; if (BaseMath_ReadCallback(vecA) == -1 || BaseMath_ReadCallback(vecB) == -1) return NULL; @@ -1950,16 +1948,16 @@ static PyObject *Vector_richcmpr(PyObject *objectA, PyObject *objectB, int compa /*-----------------PROTCOL DECLARATIONS--------------------------*/ static PySequenceMethods Vector_SeqMethods = { - (lenfunc) Vector_len, /* sq_length */ - (binaryfunc) NULL, /* sq_concat */ - (ssizeargfunc) NULL, /* sq_repeat */ - (ssizeargfunc) Vector_item, /* sq_item */ - NULL, /* py3 deprecated slice func */ - (ssizeobjargproc) Vector_ass_item, /* sq_ass_item */ - NULL, /* py3 deprecated slice assign func */ - (objobjproc) NULL, /* sq_contains */ - (binaryfunc) NULL, /* sq_inplace_concat */ - (ssizeargfunc) NULL, /* sq_inplace_repeat */ + (lenfunc) Vector_len, /* sq_length */ + (binaryfunc) NULL, /* sq_concat */ + (ssizeargfunc) NULL, /* sq_repeat */ + (ssizeargfunc) Vector_item, /* sq_item */ + NULL, /* py3 deprecated slice func */ + (ssizeobjargproc) Vector_ass_item, /* sq_ass_item */ + NULL, /* py3 deprecated slice assign func */ + (objobjproc) NULL, /* sq_contains */ + (binaryfunc) NULL, /* sq_inplace_concat */ + (ssizeargfunc) NULL, /* sq_inplace_repeat */ }; static PyObject *Vector_subscript(VectorObject *self, PyObject *item) @@ -2039,40 +2037,40 @@ static PyMappingMethods Vector_AsMapping = { static PyNumberMethods Vector_NumMethods = { - (binaryfunc) Vector_add, /*nb_add*/ - (binaryfunc) Vector_sub, /*nb_subtract*/ - (binaryfunc) Vector_mul, /*nb_multiply*/ - NULL, /*nb_remainder*/ - NULL, /*nb_divmod*/ - NULL, /*nb_power*/ - (unaryfunc) Vector_neg, /*nb_negative*/ - (unaryfunc) NULL, /*tp_positive*/ - (unaryfunc) NULL, /*tp_absolute*/ - (inquiry) NULL, /*tp_bool*/ - (unaryfunc) NULL, /*nb_invert*/ - NULL, /*nb_lshift*/ - (binaryfunc)NULL, /*nb_rshift*/ - NULL, /*nb_and*/ - NULL, /*nb_xor*/ - NULL, /*nb_or*/ - NULL, /*nb_int*/ - NULL, /*nb_reserved*/ - NULL, /*nb_float*/ - Vector_iadd, /* nb_inplace_add */ - Vector_isub, /* nb_inplace_subtract */ - Vector_imul, /* nb_inplace_multiply */ - NULL, /* nb_inplace_remainder */ - NULL, /* nb_inplace_power */ - NULL, /* nb_inplace_lshift */ - NULL, /* nb_inplace_rshift */ - NULL, /* nb_inplace_and */ - NULL, /* nb_inplace_xor */ - NULL, /* nb_inplace_or */ - NULL, /* nb_floor_divide */ - Vector_div, /* nb_true_divide */ - NULL, /* nb_inplace_floor_divide */ - Vector_idiv, /* nb_inplace_true_divide */ - NULL, /* nb_index */ + (binaryfunc) Vector_add, /*nb_add*/ + (binaryfunc) Vector_sub, /*nb_subtract*/ + (binaryfunc) Vector_mul, /*nb_multiply*/ + NULL, /*nb_remainder*/ + NULL, /*nb_divmod*/ + NULL, /*nb_power*/ + (unaryfunc) Vector_neg, /*nb_negative*/ + (unaryfunc) NULL, /*tp_positive*/ + (unaryfunc) NULL, /*tp_absolute*/ + (inquiry) NULL, /*tp_bool*/ + (unaryfunc) NULL, /*nb_invert*/ + NULL, /*nb_lshift*/ + (binaryfunc)NULL, /*nb_rshift*/ + NULL, /*nb_and*/ + NULL, /*nb_xor*/ + NULL, /*nb_or*/ + NULL, /*nb_int*/ + NULL, /*nb_reserved*/ + NULL, /*nb_float*/ + Vector_iadd, /* nb_inplace_add */ + Vector_isub, /* nb_inplace_subtract */ + Vector_imul, /* nb_inplace_multiply */ + NULL, /* nb_inplace_remainder */ + NULL, /* nb_inplace_power */ + NULL, /* nb_inplace_lshift */ + NULL, /* nb_inplace_rshift */ + NULL, /* nb_inplace_and */ + NULL, /* nb_inplace_xor */ + NULL, /* nb_inplace_or */ + NULL, /* nb_floor_divide */ + Vector_div, /* nb_true_divide */ + NULL, /* nb_inplace_floor_divide */ + Vector_idiv, /* nb_inplace_true_divide */ + NULL, /* nb_index */ }; /*------------------PY_OBECT DEFINITION--------------------------*/ @@ -2263,7 +2261,7 @@ static int Vector_swizzle_set(VectorObject *self, PyObject *value, void *closure axis_from = 0; swizzleClosure = GET_INT_FROM_POINTER(closure); - while (swizzleClosure & SWIZZLE_VALID_AXIS) { + while (swizzleClosure & SWIZZLE_VALID_AXIS) { axis_to = swizzleClosure & SWIZZLE_AXIS; tvec[axis_to] = vec_assign[axis_from]; swizzleClosure = swizzleClosure >> SWIZZLE_BITS_PER_AXIS; @@ -2294,342 +2292,342 @@ static PyGetSetDef Vector_getseters[] = { {(char *)"owner", (getter)BaseMathObject_owner_get, (setter)NULL, BaseMathObject_owner_doc, NULL}, /* autogenerated swizzle attrs, see python script below */ - {(char *)"xx", (getter)Vector_swizzle_get, (setter)NULL, NULL, SET_INT_IN_POINTER(((0|SWIZZLE_VALID_AXIS) | ((0|SWIZZLE_VALID_AXIS)<size == 3) { copy_v3_v3(pt_in, pt->vec);} + if (pt->size == 3) { copy_v3_v3(pt_in, pt->vec); } else { pt_in[2] = 0.0f; copy_v2_v2(pt_in, pt->vec); } - if (line_1->size == 3) { copy_v3_v3(l1, line_1->vec);} + if (line_1->size == 3) { copy_v3_v3(l1, line_1->vec); } else { l1[2] = 0.0f; copy_v2_v2(l1, line_1->vec); } - if (line_2->size == 3) { copy_v3_v3(l2, line_2->vec);} + if (line_2->size == 3) { copy_v3_v3(l2, line_2->vec); } else { l2[2] = 0.0f; copy_v2_v2(l2, line_2->vec); } /* do the calculation */ @@ -937,8 +937,8 @@ static PyObject *M_Geometry_barycentric_transform(PyObject *UNUSED(self), PyObje } barycentric_transform(vec, vec_pt->vec, - vec_t1_tar->vec, vec_t2_tar->vec, vec_t3_tar->vec, - vec_t1_src->vec, vec_t2_src->vec, vec_t3_src->vec); + vec_t1_tar->vec, vec_t2_tar->vec, vec_t3_tar->vec, + vec_t1_src->vec, vec_t2_src->vec, vec_t3_src->vec); return Vector_CreatePyObject(vec, 3, Py_NEW, NULL); } @@ -1010,7 +1010,7 @@ static PyObject *M_Geometry_interpolate_bezier(PyObject *UNUSED(self), PyObject coord_array = MEM_callocN(dims * (resolu) * sizeof(float), "interpolate_bezier"); for (i = 0; i < dims; i++) { - forward_diff_bezier(k1[i], h1[i], h2[i], k2[i], coord_array + i, resolu - 1, sizeof(float)*dims); + forward_diff_bezier(k1[i], h1[i], h2[i], k2[i], coord_array + i, resolu - 1, sizeof(float) * dims); } list = PyList_New(resolu); @@ -1095,7 +1095,7 @@ static PyObject *M_Geometry_tessellate_polygon(PyObject *UNUSED(self), PyObject if (((VectorObject *)polyVec)->size > 2) fp[2] = ((VectorObject *)polyVec)->vec[2]; else - fp[2] = 0.0f; /* if its a 2d vector then set the z to be zero */ + fp[2] = 0.0f; /* if its a 2d vector then set the z to be zero */ } else { ls_error = 1; diff --git a/source/blender/python/mathutils/mathutils_noise.c b/source/blender/python/mathutils/mathutils_noise.c index 03295ac2752..9460c4d0b36 100644 --- a/source/blender/python/mathutils/mathutils_noise.c +++ b/source/blender/python/mathutils/mathutils_noise.c @@ -112,13 +112,13 @@ /* Period parameters */ #define N 624 #define M 397 -#define MATRIX_A 0x9908b0dfUL /* constant vector a */ -#define UMASK 0x80000000UL /* most significant w-r bits */ -#define LMASK 0x7fffffffUL /* least significant r bits */ -#define MIXBITS(u,v) (((u) & UMASK) | ((v) & LMASK)) -#define TWIST(u,v) ((MIXBITS(u,v) >> 1) ^ ((v)&1UL ? MATRIX_A : 0UL)) +#define MATRIX_A 0x9908b0dfUL /* constant vector a */ +#define UMASK 0x80000000UL /* most significant w-r bits */ +#define LMASK 0x7fffffffUL /* least significant r bits */ +#define MIXBITS(u, v) (((u) & UMASK) | ((v) & LMASK)) +#define TWIST(u, v) ((MIXBITS(u, v) >> 1) ^ ((v) & 1UL ? MATRIX_A : 0UL)) -static unsigned long state[N]; /* the array for the state vector */ +static unsigned long state[N]; /* the array for the state vector */ static int left = 1; static int initf = 0; static unsigned long *next; @@ -130,13 +130,13 @@ static void init_genrand(unsigned long s) state[0] = s & 0xffffffffUL; for (j = 1; j < N; j++) { state[j] = - (1812433253UL * - (state[j - 1] ^ (state[j - 1] >> 30)) + j); + (1812433253UL * + (state[j - 1] ^ (state[j - 1] >> 30)) + j); /* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */ /* In the previous versions, MSBs of the seed affect */ /* only MSBs of the array state[]. */ /* 2002/01/09 modified by Makoto Matsumoto */ - state[j] &= 0xffffffffUL; /* for >32 bit machines */ + state[j] &= 0xffffffffUL; /* for >32 bit machines */ } left = 1; initf = 1; @@ -215,7 +215,7 @@ static void noise_vector(float x, float y, float z, int nb, float v[3]) /* Returns a turbulence value for a given position (x, y, z) */ static float turb(float x, float y, float z, int oct, int hard, int nb, - float ampscale, float freqscale) + float ampscale, float freqscale) { float amp, out, t; int i; @@ -334,7 +334,7 @@ PyDoc_STRVAR(M_Noise_random_vector_doc, ); static PyObject *M_Noise_random_vector(PyObject *UNUSED(self), PyObject *args) { - float vec[4]= {0.0f, 0.0f, 0.0f, 0.0f}; + float vec[4] = {0.0f, 0.0f, 0.0f, 0.0f}; int size = 3; if (!PyArg_ParseTuple(args, "|i:random_vector", &size)) @@ -729,7 +729,7 @@ static PyObject *M_Noise_voronoi(PyObject *UNUSED(self), PyObject *args) float vec[3]; float da[4], pa[12]; int dtype = 0; - float me = 2.5f; /* default minkovsky exponent */ + float me = 2.5f; /* default minkovsky exponent */ int i; -- cgit v1.2.3 From 7e38b49f265c0207f3009eaa27194d08a38ea8d2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 26 Mar 2012 07:28:31 +0000 Subject: fix for possible crash using freed ObCenter pointer when loaing a blend file without loading the UI. --- source/blender/blenkernel/intern/object.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 178c69af4d6..b141a7f0cb2 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -645,6 +645,16 @@ void unlink_object(Object *ob) if (sl->spacetype==SPACE_VIEW3D) { View3D *v3d= (View3D*) sl; + /* found doesn't need to be set here */ + if (v3d->ob_centre == ob) { + v3d->ob_centre = NULL; + v3d->ob_centre_bone[0] = '\0'; + } + if (v3d->localvd && v3d->localvd->ob_centre == ob) { + v3d->localvd->ob_centre = NULL; + v3d->localvd->ob_centre_bone[0] = '\0'; + } + found= 0; if (v3d->camera==ob) { v3d->camera= NULL; -- cgit v1.2.3 From 4ade85612c95c81d3d45826a93bd24ee9c3c9dd4 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 26 Mar 2012 08:06:13 +0000 Subject: fix for possible crash - freed scene was being used for render result lookup when 'Load UI' was disabled. --- source/blender/blenloader/intern/readfile.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender') diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 502ffbd15b8..eb7711de9b1 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -5560,6 +5560,10 @@ void lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *curscene) sima->image= restore_pointer_by_name(newmain, (ID *)sima->image, 1); + /* this will be freed, not worth attempting to find same scene, + * since it gets initialized later */ + sima->iuser.scene = NULL; + sima->scopes.waveform_1 = NULL; sima->scopes.waveform_2 = NULL; sima->scopes.waveform_3 = NULL; -- cgit v1.2.3 From ce4eb573017550c37e8119681a1e83c2e646c66f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 26 Mar 2012 08:10:12 +0000 Subject: fix [#30653] Wrong image at UV/Image Editor window render results would be displayed on loading new files if the scene names matches, now free render-results so as not to display stale data - also saves some memory. --- source/blender/blenkernel/intern/blender.c | 6 ++++++ source/blender/render/extern/include/RE_pipeline.h | 2 ++ source/blender/render/intern/source/pipeline.c | 14 ++++++++++++++ 3 files changed, 22 insertions(+) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c index 26c59129914..b8df30c5de9 100644 --- a/source/blender/blenkernel/intern/blender.c +++ b/source/blender/blenkernel/intern/blender.c @@ -78,6 +78,7 @@ #include "BKE_screen.h" #include "BKE_sequencer.h" #include "BKE_sound.h" +#include "RE_pipeline.h" #include "BLO_undofile.h" @@ -199,6 +200,11 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, const char *filepath recover= (G.fileflags & G_FILE_RECOVER); + /* Free all render results, without this stale data gets displayed after loading files */ + if (mode != 'u') { + RE_FreeAllRenderResults(); + } + /* Only make filepaths compatible when loading for real (not undo) */ if (mode != 'u') { clean_paths(bfd->main); diff --git a/source/blender/render/extern/include/RE_pipeline.h b/source/blender/render/extern/include/RE_pipeline.h index b81066201e7..315995475e9 100644 --- a/source/blender/render/extern/include/RE_pipeline.h +++ b/source/blender/render/extern/include/RE_pipeline.h @@ -165,6 +165,8 @@ void RE_InitRenderCB(struct Render *re); void RE_FreeRender (struct Render *re); /* only called on exit */ void RE_FreeAllRender (void); +/* only call on file load */ +void RE_FreeAllRenderResults(void); /* get results and statistics */ void RE_FreeRenderResult(struct RenderResult *rr); diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index 5db59fcdcc0..a4a244daf43 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -410,6 +410,20 @@ void RE_FreeAllRender(void) } } +/* on file load, free all re */ +void RE_FreeAllRenderResults(void) +{ + Render *re; + + for (re = RenderGlobal.renderlist.first; re; re = re->next) { + render_result_free(re->result); + render_result_free(re->pushedresult); + + re->result = NULL; + re->pushedresult = NULL; + } +} + /* ********* initialize state ******** */ -- cgit v1.2.3 From 4a1fdd80f938cbb20e9e433bf1fb22472e3acb29 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 26 Mar 2012 08:58:17 +0000 Subject: style cleanup: use NULL rather than 0 for raytrace code. --- source/blender/render/intern/raytrace/rayobject.cpp | 2 +- source/blender/render/intern/raytrace/rayobject_empty.cpp | 2 +- source/blender/render/intern/raytrace/rayobject_qbvh.cpp | 2 +- source/blender/render/intern/raytrace/rayobject_svbvh.cpp | 2 +- source/blender/render/intern/raytrace/reorganize.h | 8 +++++--- source/blender/render/intern/raytrace/svbvh.h | 2 +- source/blender/render/intern/raytrace/vbvh.h | 2 +- 7 files changed, 11 insertions(+), 9 deletions(-) (limited to 'source/blender') diff --git a/source/blender/render/intern/raytrace/rayobject.cpp b/source/blender/render/intern/raytrace/rayobject.cpp index 687498ba66e..b2f85e8429d 100644 --- a/source/blender/render/intern/raytrace/rayobject.cpp +++ b/source/blender/render/intern/raytrace/rayobject.cpp @@ -75,7 +75,7 @@ MALWAYS_INLINE RayObject* rayface_from_coords(RayFace *rayface, void *ob, void * MALWAYS_INLINE void rayface_from_vlak(RayFace *rayface, ObjectInstanceRen *obi, VlakRen *vlr) { - rayface_from_coords(rayface, obi, vlr, vlr->v1->co, vlr->v2->co, vlr->v3->co, vlr->v4 ? vlr->v4->co : 0); + rayface_from_coords(rayface, obi, vlr, vlr->v1->co, vlr->v2->co, vlr->v3->co, vlr->v4 ? vlr->v4->co : NULL); if (obi->transform_primitives) { diff --git a/source/blender/render/intern/raytrace/rayobject_empty.cpp b/source/blender/render/intern/raytrace/rayobject_empty.cpp index 55696b5b827..eacec0b7eb9 100644 --- a/source/blender/render/intern/raytrace/rayobject_empty.cpp +++ b/source/blender/render/intern/raytrace/rayobject_empty.cpp @@ -72,7 +72,7 @@ static RayObjectAPI empty_api = RE_rayobject_empty_hint_bb }; -static RayObject empty_raytree = { &empty_api, {0, 0} }; +static RayObject empty_raytree = { &empty_api, {NULL, NULL} }; RayObject *RE_rayobject_empty_create() { diff --git a/source/blender/render/intern/raytrace/rayobject_qbvh.cpp b/source/blender/render/intern/raytrace/rayobject_qbvh.cpp index 437d7f433b5..2edf1593e99 100644 --- a/source/blender/render/intern/raytrace/rayobject_qbvh.cpp +++ b/source/blender/render/intern/raytrace/rayobject_qbvh.cpp @@ -143,7 +143,7 @@ RayObjectAPI* bvh_get_api(int maxstacksize) if (maxstacksize <= 1024) return &bvh_api256; assert(maxstacksize <= 256); - return 0; + return NULL; } RayObject *RE_rayobject_qbvh_create(int size) diff --git a/source/blender/render/intern/raytrace/rayobject_svbvh.cpp b/source/blender/render/intern/raytrace/rayobject_svbvh.cpp index 02821d45c50..4c2099eb1e3 100644 --- a/source/blender/render/intern/raytrace/rayobject_svbvh.cpp +++ b/source/blender/render/intern/raytrace/rayobject_svbvh.cpp @@ -179,7 +179,7 @@ RayObjectAPI* bvh_get_api(int maxstacksize) if (maxstacksize <= 1024) return &bvh_api256; assert(maxstacksize <= 256); - return 0; + return NULL; } RayObject *RE_rayobject_svbvh_create(int size) diff --git a/source/blender/render/intern/raytrace/reorganize.h b/source/blender/render/intern/raytrace/reorganize.h index 11d12dac23c..be131100021 100644 --- a/source/blender/render/intern/raytrace/reorganize.h +++ b/source/blender/render/intern/raytrace/reorganize.h @@ -144,7 +144,7 @@ void remove_useless(Node *node, Node **new_node) { Node *next = (*prev)->sibling; remove_useless(*prev, prev); - if(*prev == 0) + if(*prev == NULL) *prev = next; else { @@ -158,8 +158,10 @@ void remove_useless(Node *node, Node **new_node) if(RE_rayobject_isAligned(node->child) && node->child->sibling == 0) *new_node = node->child; } - else if(node->child == 0) - *new_node = 0; + else if(node->child == NULL) + { + *new_node = NULL; + } } /* diff --git a/source/blender/render/intern/raytrace/svbvh.h b/source/blender/render/intern/raytrace/svbvh.h index 8fb2db63df6..fba9bb9ad41 100644 --- a/source/blender/render/intern/raytrace/svbvh.h +++ b/source/blender/render/intern/raytrace/svbvh.h @@ -296,7 +296,7 @@ struct Reorganize_SVBVH { const static float def_bb[6] = { FLT_MAX, FLT_MAX, FLT_MAX, FLT_MIN, FLT_MIN, FLT_MIN }; alloc_childs--; - node->child[alloc_childs] = 0; + node->child[alloc_childs] = NULL; copy_bb(node->child_bb+alloc_childs*6, def_bb); } diff --git a/source/blender/render/intern/raytrace/vbvh.h b/source/blender/render/intern/raytrace/vbvh.h index e1b4ec420ef..1c84cd23510 100644 --- a/source/blender/render/intern/raytrace/vbvh.h +++ b/source/blender/render/intern/raytrace/vbvh.h @@ -194,7 +194,7 @@ struct BuildBinaryVBVH child = &((*child)->sibling); } - *child = 0; + *child = NULL; return node; } } -- cgit v1.2.3 From 3fab018da48a485f56c68c5eca07d35430ef351c Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 26 Mar 2012 09:36:19 +0000 Subject: Fix for object solver possible pointing to a freed memory when removing movie clip data block from python/ --- source/blender/blenkernel/intern/movieclip.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c index bc147c52094..1a7c45cea0d 100644 --- a/source/blender/blenkernel/intern/movieclip.c +++ b/source/blender/blenkernel/intern/movieclip.c @@ -1157,6 +1157,12 @@ void unlink_movieclip(Main *bmain, MovieClip *clip) else if (cti->type == CONSTRAINT_TYPE_CAMERASOLVER) { bCameraSolverConstraint *data = (bCameraSolverConstraint *) con->data; + if (data->clip == clip) + data->clip = NULL; + } + else if (cti->type == CONSTRAINT_TYPE_OBJECTSOLVER) { + bObjectSolverConstraint *data = (bObjectSolverConstraint *) con->data; + if (data->clip == clip) data->clip = NULL; } -- cgit v1.2.3 From 7d9f0bfe76fd3cd1a372d74c619a79c3b3213eaa Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 26 Mar 2012 09:38:38 +0000 Subject: fix [#30598] Bad 3D view display & render with smooth mesh Sergey's suggestion - just call calc normals fixes. --- source/blender/modifiers/intern/MOD_bevel.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender') diff --git a/source/blender/modifiers/intern/MOD_bevel.c b/source/blender/modifiers/intern/MOD_bevel.c index 4bfcd86733c..95447302d6c 100644 --- a/source/blender/modifiers/intern/MOD_bevel.c +++ b/source/blender/modifiers/intern/MOD_bevel.c @@ -189,6 +189,10 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob), BMEdit_Free(em); MEM_freeN(em); + /* until we allow for dirty normal flag, always calc, + * note: calculating on the CDDM is faster then the BMesh equivalent */ + CDDM_calc_normals(result); + return result; } -- cgit v1.2.3 From 843964946418025543da036055bb9db9bf7fa207 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 26 Mar 2012 10:33:37 +0000 Subject: Fix #30671: Reset to default values bug --- source/blender/makesrna/intern/rna_space.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender') diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 7cf2475f9de..50336d525e6 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -1467,12 +1467,14 @@ static void rna_def_space_view3d(BlenderRNA *brna) prop = RNA_def_property(srna, "clip_start", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "near"); RNA_def_property_range(prop, 0.001f, FLT_MAX); + RNA_def_property_float_default(prop, 0.1f); RNA_def_property_ui_text(prop, "Clip Start", "3D View near clipping distance"); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop = RNA_def_property(srna, "clip_end", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "far"); RNA_def_property_range(prop, 1.0f, FLT_MAX); + RNA_def_property_float_default(prop, 1000.0f); RNA_def_property_ui_text(prop, "Clip End", "3D View far clipping distance"); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); @@ -1480,18 +1482,21 @@ static void rna_def_space_view3d(BlenderRNA *brna) RNA_def_property_float_sdna(prop, NULL, "grid"); RNA_def_property_ui_text(prop, "Grid Scale", "Distance between 3D View grid lines"); RNA_def_property_range(prop, 0.0f, FLT_MAX); + RNA_def_property_float_default(prop, 1.0f); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop = RNA_def_property(srna, "grid_lines", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "gridlines"); RNA_def_property_ui_text(prop, "Grid Lines", "Number of grid lines to display in perspective view"); RNA_def_property_range(prop, 0, 1024); + RNA_def_property_int_default(prop, 16); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop = RNA_def_property(srna, "grid_subdivisions", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "gridsubdiv"); RNA_def_property_ui_text(prop, "Grid Subdivisions", "Number of subdivisions between grid lines"); RNA_def_property_range(prop, 1, 1024); + RNA_def_property_int_default(prop, 10); RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); prop = RNA_def_property(srna, "show_floor", PROP_BOOLEAN, PROP_NONE); -- cgit v1.2.3 From 261e92f864834db45407476aa19ae740b5531d29 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 26 Mar 2012 11:44:03 +0000 Subject: Fix #30430: Can only alt+scroll image buffer slot once Issue was caused by mapping old buttons to new buttons. Render slot button in header holds RenerResult for particular slot, but in N-panel it holds RenderResult from RenderEngine. So what was happening is: switching render slot to empty slot makes slot button in header contain NULL as button function's argument, but old button holds RenderResult for rendered image, so this two buttons aren't equal and so button isn't getting activated and no scrolling happens. Making slot button hold RenderResult directly from RenderEngine (as it's happening with buttons in N-panel) makes old->new buttons mapping work correct and it's possible to alt-scroll smoothly --- source/blender/editors/space_image/image_buttons.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c index dbee8f207ec..8e39f745497 100644 --- a/source/blender/editors/space_image/image_buttons.c +++ b/source/blender/editors/space_image/image_buttons.c @@ -874,14 +874,16 @@ void uiTemplateImageSettings(uiLayout *layout, PointerRNA *imfptr) void uiTemplateImageLayers(uiLayout *layout, bContext *C, Image *ima, ImageUser *iuser) { Scene *scene= CTX_data_scene(C); + Render *re; RenderResult *rr; /* render layers and passes */ if (ima && iuser) { - const float dpi_fac= UI_DPI_FAC; - rr= BKE_image_acquire_renderresult(scene, ima); + const float dpi_fac = UI_DPI_FAC; + re = RE_GetRender(scene->id.name); + rr = RE_AcquireResultRead(re); uiblock_layer_pass_buttons(layout, rr, iuser, 160 * dpi_fac, (ima->type==IMA_TYPE_R_RESULT)? &ima->render_slot: NULL); - BKE_image_release_renderresult(scene, ima); + RE_ReleaseResult(re); } } -- cgit v1.2.3 From 2743f2bb3f379f4d00e61d204c0f9e18e739b8cc Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 26 Mar 2012 12:02:41 +0000 Subject: fix [#30257] bmesh: Rip "V" don't work on end vertex added option to edgesplit bmesh operator to take tagged vertices as well so an edge at a boundary can split without splitting off the boundary vertex. the behavior/speed of the edge split modifier and tool remainss the same, this is only used for rip. --- source/blender/bmesh/intern/bmesh_opdefines.c | 3 +++ source/blender/bmesh/operators/bmo_edgesplit.c | 37 ++++++++++++++++++++++++++ source/blender/editors/mesh/editmesh_tools.c | 7 +++-- 3 files changed, 43 insertions(+), 4 deletions(-) (limited to 'source/blender') diff --git a/source/blender/bmesh/intern/bmesh_opdefines.c b/source/blender/bmesh/intern/bmesh_opdefines.c index 5162932ea1b..7c07b2790c3 100644 --- a/source/blender/bmesh/intern/bmesh_opdefines.c +++ b/source/blender/bmesh/intern/bmesh_opdefines.c @@ -893,6 +893,9 @@ static BMOpDefine bmo_edgesplit_def = { "edgesplit", {{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, /* input edges */ {BMO_OP_SLOT_ELEMENT_BUF, "edgeout"}, /* old output disconnected edges */ + /* needed for vertex rip so we can rip only half an edge at a boundary wich would otherwise split off */ + {BMO_OP_SLOT_ELEMENT_BUF, "verts"}, /* optional tag verts, use to have greater control of splits */ + {BMO_OP_SLOT_BOOL, "use_verts"}, /* use 'verts' for splitting, else just find verts to split from edges */ {0} /* null-terminating sentine */}, bmo_edgesplit_exec, BMO_OP_FLAG_UNTAN_MULTIRES diff --git a/source/blender/bmesh/operators/bmo_edgesplit.c b/source/blender/bmesh/operators/bmo_edgesplit.c index 0da44dcf9d4..cf051006145 100644 --- a/source/blender/bmesh/operators/bmo_edgesplit.c +++ b/source/blender/bmesh/operators/bmo_edgesplit.c @@ -32,6 +32,10 @@ enum { EDGE_SEAM = 1 }; +enum { + VERT_SEAM = 2 +}; + /** * Remove the EDGE_SEAM flag for edges we cant split * @@ -88,13 +92,35 @@ static void bm_edgesplit_validate_seams(BMesh *bm, BMOperator *op) MEM_freeN(vtouch); } +/* keep this operator fast, its used in a modifier */ void bmo_edgesplit_exec(BMesh *bm, BMOperator *op) { BMOIter siter; BMEdge *e; + const int use_verts = BMO_slot_bool_get(op, "use_verts"); BMO_slot_buffer_flag_enable(bm, op, "edges", BM_EDGE, EDGE_SEAM); + if (use_verts) { + /* this slows down the operation but its ok because the modifier doesn't use */ + BMO_slot_buffer_flag_enable(bm, op, "verts", BM_VERT, VERT_SEAM); + + /* prevent one edge having both verts unflagged + * we could alternately disable these edges, either way its a corner case. + * + * This is needed so we don't split off the edge but then none of its verts which + * would leave a duplicate edge. + */ + BMO_ITER(e, &siter, bm, op, "edges", BM_EDGE) { + if (UNLIKELY((BMO_elem_flag_test(bm, e->v1, VERT_SEAM) == FALSE && + (BMO_elem_flag_test(bm, e->v2, VERT_SEAM) == FALSE)))) + { + BMO_elem_flag_enable(bm, e->v1, VERT_SEAM); + BMO_elem_flag_enable(bm, e->v2, VERT_SEAM); + } + } + } + bm_edgesplit_validate_seams(bm, op); BMO_ITER(e, &siter, bm, op, "edges", BM_EDGE) { @@ -108,6 +134,17 @@ void bmo_edgesplit_exec(BMesh *bm, BMOperator *op) } } + if (use_verts) { + BMO_ITER(e, &siter, bm, op, "edges", BM_EDGE) { + if (BMO_elem_flag_test(bm, e->v1, VERT_SEAM) == FALSE) { + BM_elem_flag_disable(e->v1, BM_ELEM_TAG); + } + if (BMO_elem_flag_test(bm, e->v2, VERT_SEAM) == FALSE) { + BM_elem_flag_disable(e->v2, BM_ELEM_TAG); + } + } + } + BMO_ITER(e, &siter, bm, op, "edges", BM_EDGE) { if (BMO_elem_flag_test(bm, e, EDGE_SEAM)) { if (BM_elem_flag_test(e->v1, BM_ELEM_TAG)) { diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 28ae9c1118c..03c00c6c96f 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -1227,9 +1227,7 @@ static int edbm_edge_split_exec(bContext *C, wmOperator *op) BMOperator bmop; int len = 0; - if (!EDBM_InitOpf(em, &bmop, op, "edgesplit edges=%he", - BM_ELEM_SELECT)) - { + if (!EDBM_InitOpf(em, &bmop, op, "edgesplit edges=%he", BM_ELEM_SELECT)) { return OPERATOR_CANCELLED; } BMO_op_exec(bm, &bmop); @@ -2305,7 +2303,8 @@ static int edbm_rip_invoke(bContext *C, wmOperator *op, wmEvent *event) } } - if (!EDBM_InitOpf(em, &bmop, op, "edgesplit edges=%he", BM_ELEM_TAG)) { + if (!EDBM_InitOpf(em, &bmop, op, "edgesplit edges=%he verts=%hv use_verts=%b", + BM_ELEM_TAG, BM_ELEM_SELECT, TRUE)) { return OPERATOR_CANCELLED; } -- cgit v1.2.3 From 5e764bf848926ea1b40f15b8599bea5880143e89 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 26 Mar 2012 12:20:46 +0000 Subject: Fix #30647: Error in wire drawing of subsurf Patch by Nicholas Bishop, thanks! --- source/blender/blenkernel/intern/subsurf_ccg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index 7b84fc6d896..214919265e9 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -1490,7 +1490,7 @@ static void ccgdm_pbvh_update(CCGDerivedMesh *ccgdm) } } -static void ccgDM_drawEdges(DerivedMesh *dm, int drawLooseEdges, int UNUSED(drawAllEdges)) +static void ccgDM_drawEdges(DerivedMesh *dm, int drawLooseEdges, int drawAllEdges) { CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm; CCGSubSurf *ss = ccgdm->ss; @@ -1510,7 +1510,7 @@ static void ccgDM_drawEdges(DerivedMesh *dm, int drawLooseEdges, int UNUSED(draw if (!drawLooseEdges && !ccgSubSurf_getEdgeNumFaces(e)) continue; - if (ccgdm->edgeFlags && !(ccgdm->edgeFlags[j] & ME_EDGEDRAW)) + if (!drawAllEdges && ccgdm->edgeFlags && !(ccgdm->edgeFlags[j] & ME_EDGEDRAW)) continue; if (useAging && !(G.f&G_BACKBUFSEL)) { -- cgit v1.2.3 From bbc3d820f44ca62810c1800cf7caa3905b6116a6 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 26 Mar 2012 12:45:14 +0000 Subject: Cycles: add ColorRamp node. --- source/blender/makesrna/intern/rna_color.c | 2 +- source/blender/nodes/shader/nodes/node_shader_valToRgb.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender') diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c index 8ced52bd63c..6ea59dc12e5 100644 --- a/source/blender/makesrna/intern/rna_color.c +++ b/source/blender/makesrna/intern/rna_color.c @@ -276,7 +276,7 @@ static void rna_ColorRamp_update(Main *bmain, Scene *UNUSED(scene), PointerRNA * } } -static void rna_ColorRamp_eval(struct ColorBand *coba, float position, float color[4]) +void rna_ColorRamp_eval(struct ColorBand *coba, float position, float color[4]) { do_colorband(coba, position, color); } diff --git a/source/blender/nodes/shader/nodes/node_shader_valToRgb.c b/source/blender/nodes/shader/nodes/node_shader_valToRgb.c index a9513eec6ea..7e513135203 100644 --- a/source/blender/nodes/shader/nodes/node_shader_valToRgb.c +++ b/source/blender/nodes/shader/nodes/node_shader_valToRgb.c @@ -76,7 +76,7 @@ void register_node_type_sh_valtorgb(bNodeTreeType *ttype) static bNodeType ntype; node_type_base(ttype, &ntype, SH_NODE_VALTORGB, "ColorRamp", NODE_CLASS_CONVERTOR, NODE_OPTIONS); - node_type_compatibility(&ntype, NODE_OLD_SHADING); + node_type_compatibility(&ntype, NODE_OLD_SHADING|NODE_NEW_SHADING); node_type_socket_templates(&ntype, sh_node_valtorgb_in, sh_node_valtorgb_out); node_type_size(&ntype, 240, 200, 300); node_type_init(&ntype, node_shader_init_valtorgb); -- cgit v1.2.3 From d27a1a9acd3cc4e64334da9c872f3fe71f80a215 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 26 Mar 2012 13:21:13 +0000 Subject: Fix #30676: UV unwrap did not create UV map with proper default coordinates. --- source/blender/editors/uvedit/uvedit_unwrap_ops.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender') diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index 107a92fd3ef..3c150769e50 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -105,6 +105,7 @@ static int ED_uvedit_ensure_uvs(bContext *C, Scene *scene, Object *obedit) if (em && em->bm->totface && !CustomData_has_layer(&em->bm->pdata, CD_MTEXPOLY)) { BM_data_layer_add(em->bm, &em->bm->pdata, CD_MTEXPOLY); BM_data_layer_add(em->bm, &em->bm->ldata, CD_MLOOPUV); + ED_mesh_uv_loop_reset_ex(C, obedit->data, 0); } if (!ED_uvedit_test(obedit)) { -- cgit v1.2.3 From dbfe971c06e4e029b679b4a178258974e9845ad1 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 26 Mar 2012 13:30:53 +0000 Subject: Fix for crash when adding image sequence movie clip into a sequencer --- source/blender/blenkernel/intern/movieclip.c | 38 ++++++++++++++++++++++++--- source/blender/makesdna/DNA_movieclip_types.h | 4 ++- 2 files changed, 37 insertions(+), 5 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c index 1a7c45cea0d..585c1a7dc14 100644 --- a/source/blender/blenkernel/intern/movieclip.c +++ b/source/blender/blenkernel/intern/movieclip.c @@ -256,6 +256,28 @@ static ImBuf *movieclip_load_movie_file(MovieClip *clip, MovieClipUser *user, in return ibuf; } +static void movieclip_calc_length(MovieClip *clip) +{ + if (clip->anim) { + clip->len = IMB_anim_get_duration(clip->anim, clip->proxy.tc); + } + else if (clip->source == MCLIP_SRC_SEQUENCE) { + int framenr = 1; + char name[FILE_MAX]; + + for (;;) { + get_sequence_fname(clip, framenr, name); + + if (!BLI_exists(name)) { + clip->len = framenr + 1; + break; + } + + framenr++; + } + } +} + /*********************** image buffer cache *************************/ typedef struct MovieClipCache { @@ -452,9 +474,9 @@ MovieClip *BKE_add_movieclip_file(const char *name) BLI_strncpy(clip->name, name, sizeof(clip->name)); if (BLI_testextensie_array(name, imb_ext_movie)) - clip->source= MCLIP_SRC_MOVIE; + clip->source = MCLIP_SRC_MOVIE; else - clip->source= MCLIP_SRC_SEQUENCE; + clip->source = MCLIP_SRC_SEQUENCE; user.framenr = 1; BKE_movieclip_get_size(clip, &user, &width, &height); @@ -465,6 +487,8 @@ MovieClip *BKE_add_movieclip_file(const char *name) clip->tracking.camera.focal = 24.0f * width / clip->tracking.camera.sensor_width; } + movieclip_calc_length(clip); + return clip; } @@ -891,9 +915,13 @@ void BKE_movieclip_get_size(MovieClip *clip, MovieClipUser *user, int *width, in } } -int BKE_movieclip_get_duration(struct MovieClip *clip) +int BKE_movieclip_get_duration(MovieClip *clip) { - return IMB_anim_get_duration(clip->anim, clip->proxy.tc); + if (!clip->len && clip->anim) { + return IMB_anim_get_duration(clip->anim, clip->proxy.tc); + } + + return clip->len; } void BKE_movieclip_aspect(MovieClip *clip, float *aspx, float *aspy) @@ -959,6 +987,8 @@ void BKE_movieclip_reload(MovieClip *clip) clip->source = MCLIP_SRC_MOVIE; else clip->source = MCLIP_SRC_SEQUENCE; + + movieclip_calc_length(clip); } void BKE_movieclip_update_scopes(MovieClip *clip, MovieClipUser *user, MovieClipScopes *scopes) diff --git a/source/blender/makesdna/DNA_movieclip_types.h b/source/blender/makesdna/DNA_movieclip_types.h index b4e6c07cec3..ed7310ff883 100644 --- a/source/blender/makesdna/DNA_movieclip_types.h +++ b/source/blender/makesdna/DNA_movieclip_types.h @@ -82,7 +82,9 @@ typedef struct MovieClip { * in SpaceClip clip user */ struct MovieClipProxy proxy; /* proxy to clip data */ - int flag, pad; + int flag; + + int len; /* lenght of movie */ } MovieClip; typedef struct MovieClipScopes { -- cgit v1.2.3 From 69c9451c3e479588b72f4561de6ff7705ee003b4 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 26 Mar 2012 13:36:22 +0000 Subject: - MovieClip strips now have got valid color for older saved files - Update Strip Length will now properly update lenght of movie clip strips created from movies before lenght was added there. --- source/blender/blenkernel/intern/movieclip.c | 4 ++-- source/blender/editors/interface/resources.c | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c index 585c1a7dc14..55f257e0feb 100644 --- a/source/blender/blenkernel/intern/movieclip.c +++ b/source/blender/blenkernel/intern/movieclip.c @@ -917,8 +917,8 @@ void BKE_movieclip_get_size(MovieClip *clip, MovieClipUser *user, int *width, in int BKE_movieclip_get_duration(MovieClip *clip) { - if (!clip->len && clip->anim) { - return IMB_anim_get_duration(clip->anim, clip->proxy.tc); + if (!clip->len) { + movieclip_calc_length(clip); } return clip->len; diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index 3cfb429383a..64061a8f76b 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -1767,6 +1767,15 @@ void init_userdef_do_versions(void) } } + if (bmain->versionfile < 262 || (bmain->versionfile == 262 && bmain->subversionfile < 4)) { + bTheme *btheme; + for (btheme= U.themes.first; btheme; btheme= btheme->next) { + if (btheme->tseq.movieclip[0] == 0) { + rgba_char_args_set(btheme->tseq.movieclip, 32, 32, 143, 255); + } + } + } + /* GL Texture Garbage Collection (variable abused above!) */ if (U.textimeout == 0) { U.texcollectrate = 60; -- cgit v1.2.3 From 0a4d483559516e7f7089e95c2ec328aeed6ab7ba Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 26 Mar 2012 13:45:06 +0000 Subject: Fix for own error in sequencer's Select menu (from r40658, makes me wonder if anyone uses that feature except me...), and update to Select Grouped op (taking into account new MovieClip strip type). --- .../editors/space_sequencer/sequencer_select.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c index 00c2caea258..3bef389f2de 100644 --- a/source/blender/editors/space_sequencer/sequencer_select.c +++ b/source/blender/editors/space_sequencer/sequencer_select.c @@ -929,7 +929,7 @@ static EnumPropertyItem sequencer_prop_select_grouped_types[] = { #define SEQ_IS_EFFECT(_seq) (_seq->type & SEQ_EFFECT) -#define SEQ_USE_DATA(_seq) (_seq->type == SEQ_SCENE || SEQ_HAS_PATH(_seq)) +#define SEQ_USE_DATA(_seq) (ELEM(_seq->type, SEQ_SCENE, SEQ_MOVIECLIP) || SEQ_HAS_PATH(_seq)) static short select_grouped_type(Editing *ed, Sequence *actseq) { @@ -985,7 +985,6 @@ static short select_grouped_data(Editing *ed, Sequence *actseq) { Sequence *seq; short changed = FALSE; - Scene *sce = actseq->scene; char *dir = actseq->strip ? actseq->strip->dir : NULL; if (!SEQ_USE_DATA(actseq)) @@ -1000,7 +999,8 @@ static short select_grouped_data(Editing *ed, Sequence *actseq) } SEQ_END; } - else { + else if (actseq->type == SEQ_SCENE) { + Scene *sce = actseq->scene; SEQP_BEGIN(ed, seq) { if (seq->type == SEQ_SCENE && seq->scene == sce) { seq->flag |= SELECT; @@ -1009,6 +1009,16 @@ static short select_grouped_data(Editing *ed, Sequence *actseq) } SEQ_END; } + else if (actseq->type == SEQ_MOVIECLIP) { + MovieClip *clip = actseq->clip; + SEQP_BEGIN(ed, seq) { + if (seq->type == SEQ_MOVIECLIP && seq->clip == clip) { + seq->flag |= SELECT; + changed = TRUE; + } + } + SEQ_END; + } return changed; } @@ -1117,6 +1127,10 @@ static short select_grouped_effect_link(Editing *ed, Sequence *actseq) return changed; } +#undef SEQ_IS_SOUND +#undef SEQ_IS_EFFECT +#undef SEQ_USE_DATA + static int sequencer_select_grouped_exec(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); -- cgit v1.2.3 From cc1ebaf49640dfcb596869b3dc082785aeae9d58 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 26 Mar 2012 13:48:45 +0000 Subject: Request from Mango team which will most probably expected by everyone: Refresh Sequencer button will now update lengths of strips as well. --- .../editors/space_sequencer/sequencer_edit.c | 94 ++++++++-------------- .../editors/space_sequencer/sequencer_ops.c | 2 - 2 files changed, 33 insertions(+), 63 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index bcc2c358529..935c17b1af0 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -1306,12 +1306,45 @@ void SEQUENCER_OT_reload(struct wmOperatorType *ot) } /* reload operator */ +static void sequencer_refresh_all_length(Scene *scene, Editing *ed) +{ + Sequence *seq; + + SEQP_BEGIN(ed, seq) { + int changed = FALSE; + + switch (seq->type) { + case SEQ_SCENE: + seq->len = seq->scene->r.efra - seq->scene->r.sfra + 1; + changed = TRUE; + break; + case SEQ_MOVIECLIP: + seq->len = BKE_movieclip_get_duration(seq->clip); + changed = TRUE; + break; + case SEQ_MOVIE: + seq->len = IMB_anim_get_duration(seq->anim, IMB_TC_RECORD_RUN); + changed = TRUE; + break; + } + + if (changed) { + calc_sequence_disp(scene, seq); + + if (seq_test_overlap(ed->seqbasep, seq)) + shuffle_seq(ed->seqbasep, seq, scene); + } + } + SEQ_END +} + static int sequencer_refresh_all_exec(bContext *C, wmOperator *UNUSED(op)) { Scene *scene= CTX_data_scene(C); Editing *ed= seq_give_editing(scene, FALSE); free_imbuf_seq(scene, &ed->seqbase, FALSE, FALSE); + sequencer_refresh_all_length(scene, ed); WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene); @@ -3070,64 +3103,3 @@ void SEQUENCER_OT_change_path(struct wmOperatorType *ot) WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_DIRECTORY|WM_FILESEL_RELPATH|WM_FILESEL_FILEPATH|WM_FILESEL_FILES, FILE_DEFAULTDISPLAY); } -static int sequencer_update_strip_length_exec(bContext *C, wmOperator *UNUSED(op)) -{ - Scene *scene = CTX_data_scene(C); - Editing *ed = seq_give_editing(scene, FALSE); - Sequence *seq; - int update = FALSE; - - SEQP_BEGIN(ed, seq) { - if ((seq->flag & SELECT)) { - int changed = FALSE; - - switch (seq->type) { - case SEQ_SCENE: - seq->len = seq->scene->r.efra - seq->scene->r.sfra + 1; - changed = TRUE; - break; - case SEQ_MOVIECLIP: - seq->len = BKE_movieclip_get_duration(seq->clip); - changed = TRUE; - break; - case SEQ_MOVIE: - seq->len = IMB_anim_get_duration(seq->anim, IMB_TC_RECORD_RUN); - changed = TRUE; - break; - } - - if (changed) { - calc_sequence_disp(scene, seq); - - if (seq_test_overlap(ed->seqbasep, seq)) - shuffle_seq(ed->seqbasep, seq, scene); - - update = TRUE; - } - } - } - SEQ_END - - if (update) { - free_imbuf_seq(scene, &ed->seqbase, FALSE, FALSE); - - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene); - } - - return OPERATOR_FINISHED; -} - -void SEQUENCER_OT_update_strip_length(wmOperatorType *ot) -{ - /* identifiers */ - ot->name = "Update Strip Length"; - ot->idname = "SEQUENCER_OT_update_strip_length"; - ot->description = "Update actual content length for selected strips"; - - /* api callbacks */ - ot->exec = sequencer_update_strip_length_exec; - ot->poll = ED_operator_sequencer_active; - - /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; -} diff --git a/source/blender/editors/space_sequencer/sequencer_ops.c b/source/blender/editors/space_sequencer/sequencer_ops.c index 2e24a8be346..c0f1bd219f2 100644 --- a/source/blender/editors/space_sequencer/sequencer_ops.c +++ b/source/blender/editors/space_sequencer/sequencer_ops.c @@ -113,8 +113,6 @@ void sequencer_operatortypes(void) WM_operatortype_append(SEQUENCER_OT_copy); WM_operatortype_append(SEQUENCER_OT_paste); - - WM_operatortype_append(SEQUENCER_OT_update_strip_length); } -- cgit v1.2.3 From 3a3311073250453a74923b8bb80f22de69771c11 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 26 Mar 2012 14:10:15 +0000 Subject: Fix for segfault when building proxies in Sequencer. --- source/blender/imbuf/intern/anim_movie.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender') diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c index 5ef783fe968..8a700053d30 100644 --- a/source/blender/imbuf/intern/anim_movie.c +++ b/source/blender/imbuf/intern/anim_movie.c @@ -245,6 +245,9 @@ void IMB_close_anim(struct anim * anim) void IMB_close_anim_proxies(struct anim *anim) { + if (anim == NULL) + return; + IMB_free_indices(anim); } -- cgit v1.2.3 From 52b26c4e4e35b5e4b60837e3083bee76a0e7bacb Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 26 Mar 2012 14:30:30 +0000 Subject: Default settings for new movie clip tracking now is the same as Default preset --- source/blender/blenkernel/intern/tracking.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c index b35b654a55b..350b30b34d3 100644 --- a/source/blender/blenkernel/intern/tracking.c +++ b/source/blender/blenkernel/intern/tracking.c @@ -84,7 +84,7 @@ void BKE_tracking_init_settings(MovieTracking *tracking) tracking->settings.default_tracker = TRACKER_HYBRID; tracking->settings.default_minimum_correlation = 0.75; tracking->settings.default_pattern_size = 11; - tracking->settings.default_search_size = 51; + tracking->settings.default_search_size = 61; tracking->settings.default_pyramid_levels = 2; tracking->settings.keyframe1 = 1; tracking->settings.keyframe2 = 30; -- cgit v1.2.3 From 3d5111a5edba9e0e4947aba866cba083a20853a0 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 26 Mar 2012 15:29:27 +0000 Subject: Fix #30675: Default .blend should have clay strips brush --- source/blender/editors/datafiles/startup.blend.c | 15811 +++++++++++---------- 1 file changed, 7966 insertions(+), 7845 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/datafiles/startup.blend.c b/source/blender/editors/datafiles/startup.blend.c index 39918eb5ddc..0dcc7a1de3f 100644 --- a/source/blender/editors/datafiles/startup.blend.c +++ b/source/blender/editors/datafiles/startup.blend.c @@ -1,12 +1,12 @@ /* DataToC output of file */ -int datatoc_startup_blend_size= 354920; +int datatoc_startup_blend_size= 358796; char datatoc_startup_blend[]= { - 66, 76, 69, 78, 68, 69, 82, 45, -118, 50, 54, 50, 82, 69, 78, 68, 32, 0, 0, 0,176, 9,186, 42,255,127, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, -250, 0, 0, 0, 83, 99,101,110,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 76, 79, 66, - 48, 4, 0, 0,176, 5,186, 42,255,127, 0, 0,217, 0, 0, 0, 1, 0, 0, 0, 32, 32, 32, 48, 0, 0, 0, 0,250, 0, 0, 0, - 1, 0, 0, 1, 8,136, 43, 5, 0, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 0, 16, 0, 0,128, 32, 4, 0, 14,174, 0, 0, + 66, 76, 69, 78, 68, 69, 82, 45,118, 50, 54, 50, + 82, 69, 78, 68, 32, 0, 0, 0, 56,211, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,250, 0, 0, 0, + 83, 99,101,110,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 76, 79, 66, 48, 4, 0, 0, +224,206, 35, 0, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 32, 32, 32, 51, 3, 0, 0, 0,250, 0, 0, 0, 1, 0, 0, 1, +248, 9,215, 3, 0, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 0, 16, 0, 0,128, 32, 4, 0,126,176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -39,1149 +39,1161 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 87, 77, 0, 0, 88, 1, 0, 0, 24,181, 42, 5, 0, 0, 0, 0,147, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 77, 87,105, -110, 77, 97,110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 87, 77, 0, 0, 88, 1, 0, 0, 8, 78,210, 3, 0, 0, 0, 0,146, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 77, 87,105,110, 77, 97,110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136,133, 42, 5, 0, 0, 0, 0,136,133, 42, 5, - 0, 0, 0, 0,136,133, 42, 5, 0, 0, 0, 0,136,133, 42, 5, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 88,158, 53, 76, -130,127, 0, 0,184,237,138, 77,130,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,156,146, 77, -130,127, 0, 0,104,221,149, 77,130,127, 0, 0, 16, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168,148,145, 77,130,127, 0, 0,168,148,145, 77, -130,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 39, 0, 76,130,127, 0, 0,120, 34, 0, 76, -130,127, 0, 0, 88, 39, 0, 76,130,127, 0, 0,232, 35, 0, 76,130,127, 0, 0,120, 34, 0, 76,130,127, 0, 0,136,109, 7, 76, -130,127, 0, 0,136,109, 7, 76,130,127, 0, 0,136,109, 7, 76,130,127, 0, 0, 68, 65, 84, 65, 0, 1, 0, 0,136,133, 42, 5, - 0, 0, 0, 0,148, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,111, 7, 76, -130,127, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 8,136, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,115, 99,114,101, -101,110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 5,108, 1, -252, 4,181, 2, 0, 0, 0, 0, 1, 0,238, 3, 0, 0, 0, 0, 1, 0, 0, 0,232,185, 53, 76,130,127, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,248,232, 53, 76,130,127, 0, 0,104,181,145, 77, -130,127, 0, 0,104,181,145, 77,130,127, 0, 0, 88,187, 53, 76,130,127, 0, 0,104,160, 53, 76,130,127, 0, 0, 8, 11,185, 77, -130,127, 0, 0, 8,162, 53, 76,130,127, 0, 0, 40,188, 53, 76,130,127, 0, 0, 8,249, 53, 76,130,127, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 78, 0, 0, 8, 1, 0, 0,184,182, 42, 5, 0, 0, 0, 0,211, 0, 0, 0, - 1, 0, 0, 0,136, 27, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 83, 82, 65,110,105,109, 97,116,105,111,110, 0, 46, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,184, 42, 5, - 0, 0, 0, 0,120,191, 42, 5, 0, 0, 0, 0,232,191, 42, 5, 0, 0, 0, 0, 40,204, 42, 5, 0, 0, 0, 0,152,204, 42, 5, - 0, 0, 0, 0,184, 17, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 8,184, 42, 5, 0, 0, 0, 0,212, 0, 0, 0, - 1, 0, 0, 0,120,184, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,120,184, 42, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,232,184, 42, 5, - 0, 0, 0, 0, 8,184, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,222, 2, 0, 0, 0, 0, 68, 65, 84, 65, - 32, 0, 0, 0,232,184, 42, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 88,185, 42, 5, 0, 0, 0, 0,120,184, 42, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4,222, 2, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 88,185, 42, 5, - 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,200,185, 42, 5, 0, 0, 0, 0,232,184, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,240, 4, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,200,185, 42, 5, 0, 0, 0, 0,212, 0, 0, 0, - 1, 0, 0, 0, 56,186, 42, 5, 0, 0, 0, 0, 88,185, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,195, 2, - 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 56,186, 42, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,168,186, 42, 5, - 0, 0, 0, 0,200,185, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4,195, 2, 1, 0, 0, 0, 68, 65, 84, 65, - 32, 0, 0, 0,168,186, 42, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 24,187, 42, 5, 0, 0, 0, 0, 56,186, 42, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 4, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 24,187, 42, 5, - 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,136,187, 42, 5, 0, 0, 0, 0,168,186, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 24, 4,195, 2, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,136,187, 42, 5, 0, 0, 0, 0,212, 0, 0, 0, - 1, 0, 0, 0,248,187, 42, 5, 0, 0, 0, 0, 24,187, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 4, 60, 1, - 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,248,187, 42, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,104,188, 42, 5, - 0, 0, 0, 0,136,187, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 60, 1, 0, 0, 0, 0, 68, 65, 84, 65, - 32, 0, 0, 0,104,188, 42, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,216,188, 42, 5, 0, 0, 0, 0,248,187, 42, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,216,188, 42, 5, - 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 72,189, 42, 5, 0, 0, 0, 0,104,188, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 24, 4, 88, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 72,189, 42, 5, 0, 0, 0, 0,212, 0, 0, 0, - 1, 0, 0, 0,184,189, 42, 5, 0, 0, 0, 0,216,188, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 1, 88, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,184,189, 42, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 40,190, 42, 5, - 0, 0, 0, 0, 72,189, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 1,195, 2, 1, 0, 0, 0, 68, 65, 84, 65, - 32, 0, 0, 0, 40,190, 42, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,152,190, 42, 5, 0, 0, 0, 0,184,189, 42, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,152,190, 42, 5, - 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 8,191, 42, 5, 0, 0, 0, 0, 40,190, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,192, 1, 4, 1, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 8,191, 42, 5, 0, 0, 0, 0,212, 0, 0, 0, - 1, 0, 0, 0,120,191, 42, 5, 0, 0, 0, 0,152,190, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 4, 60, 2, - 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,120,191, 42, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 8,191, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 60, 2, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 0, 0, 0,232,191, 42, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 88,192, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,120,184, 42, 5, 0, 0, 0, 0,232,184, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 0, 0, 0, 88,192, 42, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,200,192, 42, 5, 0, 0, 0, 0,232,191, 42, 5, - 0, 0, 0, 0,120,184, 42, 5, 0, 0, 0, 0,200,185, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 0, 0, 0,200,192, 42, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 56,193, 42, 5, 0, 0, 0, 0, 88,192, 42, 5, - 0, 0, 0, 0,232,184, 42, 5, 0, 0, 0, 0, 56,186, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 0, 0, 0, 56,193, 42, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,168,193, 42, 5, 0, 0, 0, 0,200,192, 42, 5, - 0, 0, 0, 0,200,185, 42, 5, 0, 0, 0, 0, 56,186, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 0, 0, 0,168,193, 42, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 24,194, 42, 5, 0, 0, 0, 0, 56,193, 42, 5, - 0, 0, 0, 0, 8,184, 42, 5, 0, 0, 0, 0,168,186, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 0, 0, 0, 24,194, 42, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,136,194, 42, 5, 0, 0, 0, 0,168,193, 42, 5, - 0, 0, 0, 0, 88,185, 42, 5, 0, 0, 0, 0,168,186, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 0, 0, 0,136,194, 42, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,248,194, 42, 5, 0, 0, 0, 0, 24,194, 42, 5, - 0, 0, 0, 0, 56,186, 42, 5, 0, 0, 0, 0, 24,187, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 0, 0, 0,248,194, 42, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,104,195, 42, 5, 0, 0, 0, 0,136,194, 42, 5, - 0, 0, 0, 0,168,186, 42, 5, 0, 0, 0, 0,136,187, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 0, 0, 0,104,195, 42, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,216,195, 42, 5, 0, 0, 0, 0,248,194, 42, 5, - 0, 0, 0, 0, 88,185, 42, 5, 0, 0, 0, 0,248,187, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 0, 0, 0,216,195, 42, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 72,196, 42, 5, 0, 0, 0, 0,104,195, 42, 5, - 0, 0, 0, 0,136,187, 42, 5, 0, 0, 0, 0,248,187, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 0, 0, 0, 72,196, 42, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,184,196, 42, 5, 0, 0, 0, 0,216,195, 42, 5, - 0, 0, 0, 0, 8,184, 42, 5, 0, 0, 0, 0,104,188, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 0, 0, 0,184,196, 42, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 40,197, 42, 5, 0, 0, 0, 0, 72,196, 42, 5, - 0, 0, 0, 0, 24,187, 42, 5, 0, 0, 0, 0,216,188, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 0, 0, 0, 40,197, 42, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,152,197, 42, 5, 0, 0, 0, 0,184,196, 42, 5, - 0, 0, 0, 0,168,186, 42, 5, 0, 0, 0, 0,216,188, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 0, 0, 0,152,197, 42, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 8,198, 42, 5, 0, 0, 0, 0, 40,197, 42, 5, - 0, 0, 0, 0,104,188, 42, 5, 0, 0, 0, 0,216,188, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 0, 0, 0, 8,198, 42, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,120,198, 42, 5, 0, 0, 0, 0,152,197, 42, 5, - 0, 0, 0, 0,104,188, 42, 5, 0, 0, 0, 0, 72,189, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 0, 0, 0,120,198, 42, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,232,198, 42, 5, 0, 0, 0, 0, 8,198, 42, 5, - 0, 0, 0, 0,216,188, 42, 5, 0, 0, 0, 0, 72,189, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 0, 0, 0,232,198, 42, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 88,199, 42, 5, 0, 0, 0, 0,120,198, 42, 5, - 0, 0, 0, 0,200,185, 42, 5, 0, 0, 0, 0,184,189, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 0, 0, 0, 88,199, 42, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,200,199, 42, 5, 0, 0, 0, 0,232,198, 42, 5, - 0, 0, 0, 0, 24,187, 42, 5, 0, 0, 0, 0,184,189, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 0, 0, 0,200,199, 42, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 56,200, 42, 5, 0, 0, 0, 0, 88,199, 42, 5, - 0, 0, 0, 0, 72,189, 42, 5, 0, 0, 0, 0,184,189, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 0, 0, 0, 56,200, 42, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,168,200, 42, 5, 0, 0, 0, 0,200,199, 42, 5, - 0, 0, 0, 0,104,188, 42, 5, 0, 0, 0, 0, 40,190, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 0, 0, 0,168,200, 42, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 24,201, 42, 5, 0, 0, 0, 0, 56,200, 42, 5, - 0, 0, 0, 0, 72,189, 42, 5, 0, 0, 0, 0,152,190, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 0, 0, 0, 24,201, 42, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,136,201, 42, 5, 0, 0, 0, 0,168,200, 42, 5, - 0, 0, 0, 0, 40,190, 42, 5, 0, 0, 0, 0,152,190, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 0, 0, 0,136,201, 42, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,248,201, 42, 5, 0, 0, 0, 0, 24,201, 42, 5, - 0, 0, 0, 0,136,187, 42, 5, 0, 0, 0, 0, 8,191, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 0, 0, 0,248,201, 42, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,104,202, 42, 5, 0, 0, 0, 0,136,201, 42, 5, - 0, 0, 0, 0, 24,187, 42, 5, 0, 0, 0, 0, 8,191, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 0, 0, 0,104,202, 42, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,216,202, 42, 5, 0, 0, 0, 0,248,201, 42, 5, - 0, 0, 0, 0, 56,186, 42, 5, 0, 0, 0, 0,120,191, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 0, 0, 0,216,202, 42, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 72,203, 42, 5, 0, 0, 0, 0,104,202, 42, 5, - 0, 0, 0, 0,248,187, 42, 5, 0, 0, 0, 0,120,191, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 0, 0, 0, 72,203, 42, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,184,203, 42, 5, 0, 0, 0, 0,216,202, 42, 5, - 0, 0, 0, 0, 8,191, 42, 5, 0, 0, 0, 0,120,191, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 0, 0, 0,184,203, 42, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 40,204, 42, 5, 0, 0, 0, 0, 72,203, 42, 5, - 0, 0, 0, 0,200,185, 42, 5, 0, 0, 0, 0, 40,190, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 0, 0, 0, 40,204, 42, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184,203, 42, 5, - 0, 0, 0, 0,184,189, 42, 5, 0, 0, 0, 0,152,190, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, -160, 0, 0, 0,152,204, 42, 5, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,104,208, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,200,185, 42, 5, 0, 0, 0, 0,120,184, 42, 5, 0, 0, 0, 0,232,184, 42, 5, 0, 0, 0, 0, 56,186, 42, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0,196, 2, 0, 0,222, 2, 0, 0, 7, 7,241, 4, - 27, 0, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 26, 43, 5, 0, 0, 0, 0,248, 26, 43, 5, - 0, 0, 0, 0,136,205, 42, 5, 0, 0, 0, 0,248,206, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,136,205, 42, 5, - 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0,248,206, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0,128,148, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 32,158, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -240, 4, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0,158, 68, 0, 0,200, 65, 0, 0,158, 68, 0, 0,200, 65, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,241, 4, 26, 0,241, 4, 26, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0,196, 2, 0, 0,221, 2, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,241, 4, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,248,206, 42, 5, - 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136,205, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0,240,109, 69, 0, 0,128,192, 0, 0, 0, 0, 0, 0, 0, 0,255,255,109, 69, 0, 0, 0,192, 0, 0, 0, 0,112, 7, 0, 0, -129, 7, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, -111, 7, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 2, 0, 0, 0, 1, 0, 3, 3, 2, 0, 0, 4, 10, 0,129, 7, 2, 0,112, 7, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,222, 2, 0, 0,222, 2, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,122,199, 3, 0, 0, 0, 0, 56,122,199, 3, 0, 0, 0, 0, + 56,122,199, 3, 0, 0, 0, 0, 56,122,199, 3, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,232, 89,178, 3, 0, 0, 0, 0, +120, 93,178, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136, 60,171, 3, 0, 0, 0, 0, +104,164,152, 15, 0, 0, 0, 0, 16, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120, 58,171, 3, 0, 0, 0, 0,120, 58,171, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 86,178, 3, 0, 0, 0, 0,184, 88,178, 3, 0, 0, 0, 0, + 88, 86,178, 3, 0, 0, 0, 0,136, 87,178, 3, 0, 0, 0, 0,184, 88,178, 3, 0, 0, 0, 0,232,255,210, 3, 0, 0, 0, 0, +232,255,210, 3, 0, 0, 0, 0,232,255,210, 3, 0, 0, 0, 0, 68, 65, 84, 65, 0, 1, 0, 0, 56,122,199, 3, 0, 0, 0, 0, +147, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93,198, 3, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0,248, 9,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,115, 99,114,101,101,110, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 78, 0, 70, 5,178, 2, + 0, 0, 0, 0, 1, 0,238, 3, 0, 0, 0, 0, 1, 0, 0, 0,152,127,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0,136, 39,205, 15, 0, 0, 0, 0,152, 0,212, 15, 0, 0, 0, 0, +168,255,211, 15, 0, 0, 0, 0,104, 12,163, 3, 0, 0, 0, 0, 56, 9,163, 3, 0, 0, 0, 0, 88, 11,163, 3, 0, 0, 0, 0, + 88, 11,163, 3, 0, 0, 0, 0,152, 84,171, 3, 0, 0, 0, 0,120,149,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 83, 78, 0, 0, 8, 1, 0, 0,136, 7,214, 3, 0, 0, 0, 0,210, 0, 0, 0, 1, 0, 0, 0, + 8,156,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 83, 82, 65,110,105,109, 97,116,105,111,110, 0, 46, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168, 9,201, 3, 0, 0, 0, 0, + 72, 20,201, 3, 0, 0, 0, 0,184, 88,171, 3, 0, 0, 0, 0,248,107,171, 3, 0, 0, 0, 0, 24, 9,214, 3, 0, 0, 0, 0, +248,150,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,168, 9,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, + 72, 10,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 32, 0, 0, 0, 72, 10,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,232, 10,201, 3, 0, 0, 0, 0, +168, 9,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,222, 2, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, +232, 10,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,136, 11,201, 3, 0, 0, 0, 0, 72, 10,201, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,240, 4,222, 2, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,136, 11,201, 3, 0, 0, 0, 0, +211, 0, 0, 0, 1, 0, 0, 0, 40, 12,201, 3, 0, 0, 0, 0,232, 10,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +240, 4, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 40, 12,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, +200, 12,201, 3, 0, 0, 0, 0,136, 11,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,195, 2, 1, 0, 0, 0, + 68, 65, 84, 65, 32, 0, 0, 0,200, 12,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,104, 13,201, 3, 0, 0, 0, 0, + 40, 12,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4,195, 2, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, +104, 13,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 8, 14,201, 3, 0, 0, 0, 0,200, 12,201, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 24, 4, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 8, 14,201, 3, 0, 0, 0, 0, +211, 0, 0, 0, 1, 0, 0, 0,168, 14,201, 3, 0, 0, 0, 0,104, 13,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 24, 4,195, 2, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,168, 14,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, + 72, 15,201, 3, 0, 0, 0, 0, 8, 14,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 4, 60, 1, 0, 0, 0, 0, + 68, 65, 84, 65, 32, 0, 0, 0, 72, 15,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,232, 15,201, 3, 0, 0, 0, 0, +168, 14,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 60, 1, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, +232, 15,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,136, 16,201, 3, 0, 0, 0, 0, 72, 15,201, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,136, 16,201, 3, 0, 0, 0, 0, +211, 0, 0, 0, 1, 0, 0, 0, 40, 17,201, 3, 0, 0, 0, 0,232, 15,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 24, 4, 88, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 40, 17,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, +200, 17,201, 3, 0, 0, 0, 0,136, 16,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 1, 88, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 32, 0, 0, 0,200, 17,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,104, 18,201, 3, 0, 0, 0, 0, + 40, 17,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 1,195, 2, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, +104, 18,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 8, 19,201, 3, 0, 0, 0, 0,200, 17,201, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 8, 19,201, 3, 0, 0, 0, 0, +211, 0, 0, 0, 1, 0, 0, 0,168, 19,201, 3, 0, 0, 0, 0,104, 18,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +192, 1, 4, 1, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,168, 19,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, + 72, 20,201, 3, 0, 0, 0, 0, 8, 19,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 4, 60, 2, 0, 0, 0, 0, + 68, 65, 84, 65, 32, 0, 0, 0, 72, 20,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +168, 19,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 60, 2, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, +184, 88,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,104, 89,171, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 72, 10,201, 3, 0, 0, 0, 0,232, 10,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, +104, 89,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 24, 90,171, 3, 0, 0, 0, 0,184, 88,171, 3, 0, 0, 0, 0, + 72, 10,201, 3, 0, 0, 0, 0, 40, 12,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, + 24, 90,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,200, 90,171, 3, 0, 0, 0, 0,104, 89,171, 3, 0, 0, 0, 0, +232, 10,201, 3, 0, 0, 0, 0,200, 12,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, +200, 90,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,120, 91,171, 3, 0, 0, 0, 0, 24, 90,171, 3, 0, 0, 0, 0, + 40, 12,201, 3, 0, 0, 0, 0,200, 12,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, +120, 91,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 40, 92,171, 3, 0, 0, 0, 0,200, 90,171, 3, 0, 0, 0, 0, +168, 9,201, 3, 0, 0, 0, 0,104, 13,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, + 40, 92,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,216, 92,171, 3, 0, 0, 0, 0,120, 91,171, 3, 0, 0, 0, 0, +136, 11,201, 3, 0, 0, 0, 0,104, 13,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, +216, 92,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,136, 93,171, 3, 0, 0, 0, 0, 40, 92,171, 3, 0, 0, 0, 0, +200, 12,201, 3, 0, 0, 0, 0, 8, 14,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, +136, 93,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 56, 94,171, 3, 0, 0, 0, 0,216, 92,171, 3, 0, 0, 0, 0, +104, 13,201, 3, 0, 0, 0, 0,168, 14,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, + 56, 94,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,232, 94,171, 3, 0, 0, 0, 0,136, 93,171, 3, 0, 0, 0, 0, +136, 11,201, 3, 0, 0, 0, 0, 72, 15,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, +232, 94,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,152, 95,171, 3, 0, 0, 0, 0, 56, 94,171, 3, 0, 0, 0, 0, +168, 14,201, 3, 0, 0, 0, 0, 72, 15,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, +152, 95,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 72, 96,171, 3, 0, 0, 0, 0,232, 94,171, 3, 0, 0, 0, 0, +168, 9,201, 3, 0, 0, 0, 0,232, 15,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, + 72, 96,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,248, 96,171, 3, 0, 0, 0, 0,152, 95,171, 3, 0, 0, 0, 0, + 8, 14,201, 3, 0, 0, 0, 0,136, 16,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, +248, 96,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,168, 97,171, 3, 0, 0, 0, 0, 72, 96,171, 3, 0, 0, 0, 0, +104, 13,201, 3, 0, 0, 0, 0,136, 16,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, +168, 97,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 88, 98,171, 3, 0, 0, 0, 0,248, 96,171, 3, 0, 0, 0, 0, +232, 15,201, 3, 0, 0, 0, 0,136, 16,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, + 88, 98,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 8, 99,171, 3, 0, 0, 0, 0,168, 97,171, 3, 0, 0, 0, 0, +232, 15,201, 3, 0, 0, 0, 0, 40, 17,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, + 8, 99,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,184, 99,171, 3, 0, 0, 0, 0, 88, 98,171, 3, 0, 0, 0, 0, +136, 16,201, 3, 0, 0, 0, 0, 40, 17,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, +184, 99,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,104,100,171, 3, 0, 0, 0, 0, 8, 99,171, 3, 0, 0, 0, 0, + 40, 12,201, 3, 0, 0, 0, 0,200, 17,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, +104,100,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 24,101,171, 3, 0, 0, 0, 0,184, 99,171, 3, 0, 0, 0, 0, + 8, 14,201, 3, 0, 0, 0, 0,200, 17,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, + 24,101,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,200,101,171, 3, 0, 0, 0, 0,104,100,171, 3, 0, 0, 0, 0, + 40, 17,201, 3, 0, 0, 0, 0,200, 17,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, +200,101,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,120,102,171, 3, 0, 0, 0, 0, 24,101,171, 3, 0, 0, 0, 0, +232, 15,201, 3, 0, 0, 0, 0,104, 18,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, +120,102,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 40,103,171, 3, 0, 0, 0, 0,200,101,171, 3, 0, 0, 0, 0, + 40, 17,201, 3, 0, 0, 0, 0, 8, 19,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, + 40,103,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,216,103,171, 3, 0, 0, 0, 0,120,102,171, 3, 0, 0, 0, 0, +104, 18,201, 3, 0, 0, 0, 0, 8, 19,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, +216,103,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,136,104,171, 3, 0, 0, 0, 0, 40,103,171, 3, 0, 0, 0, 0, +168, 14,201, 3, 0, 0, 0, 0,168, 19,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, +136,104,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 56,105,171, 3, 0, 0, 0, 0,216,103,171, 3, 0, 0, 0, 0, + 8, 14,201, 3, 0, 0, 0, 0,168, 19,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, + 56,105,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,232,105,171, 3, 0, 0, 0, 0,136,104,171, 3, 0, 0, 0, 0, +200, 12,201, 3, 0, 0, 0, 0, 72, 20,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, +232,105,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,152,106,171, 3, 0, 0, 0, 0, 56,105,171, 3, 0, 0, 0, 0, + 72, 15,201, 3, 0, 0, 0, 0, 72, 20,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, +152,106,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 72,107,171, 3, 0, 0, 0, 0,232,105,171, 3, 0, 0, 0, 0, +168, 19,201, 3, 0, 0, 0, 0, 72, 20,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, + 72,107,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,248,107,171, 3, 0, 0, 0, 0,152,106,171, 3, 0, 0, 0, 0, + 40, 12,201, 3, 0, 0, 0, 0,104, 18,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, +248,107,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,107,171, 3, 0, 0, 0, 0, +200, 17,201, 3, 0, 0, 0, 0, 8, 19,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, + 24, 9,214, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 56, 10,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 40, 12,201, 3, 0, 0, 0, 0, 72, 10,201, 3, 0, 0, 0, 0,232, 10,201, 3, 0, 0, 0, 0,200, 12,201, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0,196, 2, 0, 0,222, 2, 0, 0, 7, 7,241, 4, 27, 0, 1, 0, + 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152,197,207, 3, 0, 0, 0, 0,152,197,207, 3, 0, 0, 0, 0, +136,221,175, 3, 0, 0, 0, 0, 56,223,175, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,136,221,175, 3, 0, 0, 0, 0, +215, 0, 0, 0, 1, 0, 0, 0, 56,223,175, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,148, 68, + 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 32,158, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0, + 0, 0, 0, 0, 25, 0, 0, 0, 0, 0,158, 68, 0, 0,200, 65, 0, 0,158, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,241, 4, 26, 0,241, 4, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0,196, 2, 0, 0,221, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,241, 4, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,104,208, 42, 5, - 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,248,232, 42, 5, 0, 0, 0, 0,152,204, 42, 5, 0, 0, 0, 0,168,186, 42, 5, - 0, 0, 0, 0,136,187, 42, 5, 0, 0, 0, 0,248,187, 42, 5, 0, 0, 0, 0, 88,185, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 25, 4, 0, 0,240, 4, 0, 0, 0, 0, 0, 0, 59, 1, 0, 0, 4, 4,216, 0, 60, 1, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184,231, 42, 5, 0, 0, 0, 0,184,231, 42, 5, 0, 0, 0, 0, 88,209, 42, 5, - 0, 0, 0, 0,200,210, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 88,209, 42, 5, 0, 0, 0, 0,216, 0, 0, 0, - 1, 0, 0, 0,200,210, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,148, 67, 0, 0, 0, 0, - 0, 0,208, 65, 98, 39, 38, 54, 0, 0, 88, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,215, 0, 0, 0, 0, 0, 0, 0, - 25, 0, 0, 0, 0, 0, 87, 67, 0, 0,200, 65, 0, 0, 87, 67, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, - 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,216, 0, 26, 0,216, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 25, 4, 0, 0,240, 4, 0, 0, 34, 1, 0, 0, 59, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,216, 0, 26, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 56,223,175, 3, 0, 0, 0, 0, +215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136,221,175, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,240,109, 69, + 0, 0,128,192, 0, 0, 0, 0, 0, 0, 0, 0,255,255,109, 69, 0, 0, 0,192, 0, 0, 0, 0,112, 7, 0, 0,129, 7, 0, 0, + 18, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0, + 18, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 2, 0, 0, 0, 1, 0, 3, 3, 2, 0, 0, 4, 10, 0,129, 7, 2, 0,112, 7, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,222, 2, 0, 0,222, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, 56, 10,214, 3, 0, 0, 0, 0, +214, 0, 0, 0, 1, 0, 0, 0, 88, 11,214, 3, 0, 0, 0, 0, 24, 9,214, 3, 0, 0, 0, 0,104, 13,201, 3, 0, 0, 0, 0, +168, 14,201, 3, 0, 0, 0, 0, 72, 15,201, 3, 0, 0, 0, 0,136, 11,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 25, 4, 0, 0,240, 4, 0, 0, 0, 0, 0, 0, 59, 1, 0, 0, 4, 4,216, 0, 60, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,184,123,199, 3, 0, 0, 0, 0,184,123,199, 3, 0, 0, 0, 0,232,224,175, 3, 0, 0, 0, 0, +152,226,175, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,232,224,175, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, +152,226,175, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,148, 67, 0, 0, 0, 0, 0, 0,208, 65, + 98, 39, 38, 54, 0, 0, 88, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,215, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, + 0, 0, 87, 67, 0, 0,200, 65, 0, 0, 87, 67, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, + 4, 0, 12, 0, 10, 0,216, 0, 26, 0,216, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 25, 4, 0, 0,240, 4, 0, 0, 34, 1, 0, 0, 59, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +216, 0, 26, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,152,226,175, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,232,224,175, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 67, 0, 0, 61,196, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 71, 67, 1, 0,145,195, 0, 0, 0, 0,199, 0, 0, 0,216, 0, 0, 0, 0, 0, 0, 0, 33, 1, 0, 0, + 0, 0, 0, 0, 62, 1, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,198, 0, 0, 0, 0, 0, 0, 0, 33, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 1, 0, 0, 1, 0, 7, 0, + 18, 0, 0, 4, 6, 0,216, 0, 34, 1,199, 0, 34, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 25, 4, 0, 0,240, 4, 0, 0, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +216, 0, 34, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 51,214, 3, 0, 0, 0, 0, +216, 71,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 56, 51,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, + 24, 53,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 66, 85, 84, 84, 79, 78, 83, 95, 80, 84, 95, 99,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 66, 85, 84, 84, 79, 78, 83, 95, 80, 84, 95, 99,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 67,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,220,255,199, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,200,210, 42, 5, 0, 0, 0, 0,216, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88,209, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 67, 0, 0, 61,196, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 71, 67, 1, 0,145,195, 0, 0, 0, 0,199, 0, 0, 0,216, 0, 0, 0, 0, 0, 0, 0, - 33, 1, 0, 0, 0, 0, 0, 0, 62, 1, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,198, 0, 0, 0, 0, 0, 0, 0, - 33, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 1, 0, 0, - 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,216, 0, 34, 1,199, 0, 34, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 25, 4, 0, 0,240, 4, 0, 0, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,216, 0, 34, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,212, 42, 5, - 0, 0, 0, 0, 24,230, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 56,212, 42, 5, 0, 0, 0, 0,214, 0, 0, 0, - 1, 0, 0, 0,216,213, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 83, 95, 80, 84, 95, 99,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, + 24, 53,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,248, 54,214, 3, 0, 0, 0, 0, 56, 51,214, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,114,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 83, 95, 80, 84, 95, 99,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,114,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 67,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,220,255,199, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,135,255,199, 0, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 88, 1, 0, 0,216,213, 42, 5, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,120,215, 42, 5, 0, 0, 0, 0, 56,212, 42, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,114,101, -110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,114,101, -110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82,101,110,100,101,114, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,248, 54,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, +216, 56,214, 3, 0, 0, 0, 0, 24, 53,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,135,255,199, 0, 61, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 76, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,120,215, 42, 5, 0, 0, 0, 0,214, 0, 0, 0, - 1, 0, 0, 0, 24,217, 42, 5, 0, 0, 0, 0,216,213, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,111,255,199, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 76, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, +216, 56,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,184, 58,214, 3, 0, 0, 0, 0,248, 54,214, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,100,105,109,101,110,115, +105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,100,105,109,101,110,115, +105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,111,255,199, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140,254,199, 0,203, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 88, 1, 0, 0, 24,217, 42, 5, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,184,218, 42, 5, 0, 0, 0, 0,120,215, 42, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,100,105, -109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,100,105, -109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68,105,109,101,110,115,105,111,110,115, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140,254,199, 0,203, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,184, 58,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, +152, 60,214, 3, 0, 0, 0, 0,216, 56,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 97,110,116,105, 97,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 97,110,116,105, 97,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,184,218, 42, 5, 0, 0, 0, 0,214, 0, 0, 0, - 1, 0, 0, 0, 88,220, 42, 5, 0, 0, 0, 0, 24,217, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 97,110,116,105, 97,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, + 65,110,116,105, 45, 65,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 97,110,116,105, 97,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, + 0, 0, 58,254,199, 0, 58, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 65,110,116,105, 45, 65,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 58,254,199, 0, 58, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, +152, 60,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,120, 62,214, 3, 0, 0, 0, 0,184, 58,214, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,109,111,116,105,111,110, + 95, 98,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,109,111,116,105,111,110, + 95, 98,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 97,109,112,108,101,100, 32, 77,111,116,105,111,110, 32, 66, +108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,254,199, 0, 0, 0, 20, 0, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 88, 1, 0, 0, 88,220, 42, 5, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,248,221, 42, 5, 0, 0, 0, 0,184,218, 42, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,109,111, -116,105,111,110, 95, 98,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,109,111, -116,105,111,110, 95, 98,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 97,109,112,108,101,100, 32, 77,111,116,105, -111,110, 32, 66,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,254,199, 0, 0, 0, 20, 0, 0, 0, - 4, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,120, 62,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, + 88, 64,214, 3, 0, 0, 0, 0,152, 60,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,248,221, 42, 5, 0, 0, 0, 0,214, 0, 0, 0, - 1, 0, 0, 0,152,223, 42, 5, 0, 0, 0, 0, 88,220, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 83,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 10,254,199, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 83,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 10,254,199, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, + 88, 64,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 56, 66,214, 3, 0, 0, 0, 0,120, 62,214, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,101,114,102,111,114, +109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,101,114,102,111,114, +109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,242,253,199, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 88, 1, 0, 0,152,223, 42, 5, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 56,225, 42, 5, 0, 0, 0, 0,248,221, 42, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,101, -114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,101, -114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,242,253,199, 0, 0, 0, 0, 0, 0, 0, - 4, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 56, 66,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, + 24, 68,214, 3, 0, 0, 0, 0, 88, 64,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,111,115,116, 95,112,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,111,115,116, 95,112,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 56,225, 42, 5, 0, 0, 0, 0,214, 0, 0, 0, - 1, 0, 0, 0,216,226, 42, 5, 0, 0, 0, 0,152,223, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,111,115,116, 95,112,114,111, 99,101,115,115,105,110,103, 0, 0, 0, + 80,111,115,116, 32, 80,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,111,115,116, 95,112,114,111, 99,101,115,115,105,110,103, 0, 0, 0, + 0, 0,218,253,199, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 80,111,115,116, 32, 80,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,218,253,199, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, + 24, 68,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,248, 69,214, 3, 0, 0, 0, 0, 56, 66,214, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 88, 1, 0, 0,216,226, 42, 5, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,120,228, 42, 5, 0, 0, 0, 0, 56,225, 42, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,116, - 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,116, - 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,194,253,199, 0, 0, 0, 20, 0, 0, 0, - 4, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,194,253,199, 0, 0, 0, 20, 0, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,120,228, 42, 5, 0, 0, 0, 0,214, 0, 0, 0, - 1, 0, 0, 0, 24,230, 42, 5, 0, 0, 0, 0,216,226, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,111,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,248, 69,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, +216, 71,214, 3, 0, 0, 0, 0, 24, 68,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,111,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,111,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,111,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 79,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 79,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 40,253,199, 0,130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 40,253,199, 0,130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 88, 1, 0, 0, 24,230, 42, 5, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120,228, 42, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 98, 97, -107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 98, 97, -107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, +216, 71,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 69,214, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 98, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16,253,199, 0, 0, 0, 0, 0, 0, 0, - 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 98, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,248, 0, 0, 0,184,231, 42, 5, 0, 0, 0, 0,180, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16,253,199, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,248, 0, 0, 0,184,123,199, 3, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,255, 21, 0, 0,160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, -160, 0, 0, 0,248,232, 42, 5, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,232,237, 42, 5, 0, 0, 0, 0,104,208, 42, 5, - 0, 0, 0, 0, 8,184, 42, 5, 0, 0, 0, 0,104,188, 42, 5, 0, 0, 0, 0,216,188, 42, 5, 0, 0, 0, 0,168,186, 42, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 4, 0, 0, 0, 0, 0, 0, 87, 0, 0, 0, 15, 15, 24, 4, - 88, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,236, 42, 5, 0, 0, 0, 0,200,236, 42, 5, - 0, 0, 0, 0,232,233, 42, 5, 0, 0, 0, 0, 88,235, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,232,233, 42, 5, - 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 88,235, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 32,140, 68, 0, 0, 0, 0, 0, 0,208, 65, 39,182,158, 55, 0, 0,131, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 23, 4, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,224,130, 68, 0, 0,200, 65, 0,224,130, 68, 0, 0,200, 65, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 24, 4, 26, 0, 24, 4, 26, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 4, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 4, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 88,235, 42, 5, - 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,233, 42, 5, 0, 0, 0, 0, 0, 0, 64,192, - 0, 0,126, 67, 0, 0, 0, 0, 0, 0, 72, 66,112,189, 17,192,246, 70,125, 67, 0, 0, 0, 0, 0, 0, 72, 66, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 4, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, - 23, 4, 0, 0, 18, 0, 0, 0, 61, 0, 0, 0, 0, 0,128, 63, 0, 0, 72, 66, 0,124,146, 72, 0, 0, 72, 66,205,204,204, 61, - 0, 0, 32, 65, 72, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, 4, 8, 0, 24, 4, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 4, 0, 0, 26, 0, 0, 0, 87, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 4, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +255, 21, 0, 0,160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, + 88, 11,214, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,120, 12,214, 3, 0, 0, 0, 0, 56, 10,214, 3, 0, 0, 0, 0, +168, 9,201, 3, 0, 0, 0, 0,232, 15,201, 3, 0, 0, 0, 0,136, 16,201, 3, 0, 0, 0, 0,104, 13,201, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 4, 0, 0, 0, 0, 0, 0, 87, 0, 0, 0, 15, 15, 24, 4, 88, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216, 92,200, 3, 0, 0, 0, 0,216, 92,200, 3, 0, 0, 0, 0, + 72,228,175, 3, 0, 0, 0, 0,248,229,175, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 72,228,175, 3, 0, 0, 0, 0, +215, 0, 0, 0, 1, 0, 0, 0,248,229,175, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,140, 68, + 0, 0, 0, 0, 0, 0,208, 65, 39,182,158, 55, 0, 0,131, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 4, 0, 0, + 0, 0, 0, 0, 25, 0, 0, 0, 0,224,130, 68, 0, 0,200, 65, 0,224,130, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 24, 4, 26, 0, 24, 4, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 4, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 24, 4, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,208, 0, 0, 0,200,236, 42, 5, - 0, 0, 0, 0,191, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,248,229,175, 3, 0, 0, 0, 0, +215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,228,175, 3, 0, 0, 0, 0, 0, 0, 64,192, 0, 0,126, 67, + 0, 0, 0, 0, 0, 0, 72, 66,112,189, 17,192,246, 70,125, 67, 0, 0, 0, 0, 0, 0, 72, 66, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 4, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 23, 4, 0, 0, + 18, 0, 0, 0, 61, 0, 0, 0, 0, 0,128, 63, 0, 0, 72, 66, 0,124,146, 72, 0, 0, 72, 66,205,204,204, 61, 0, 0, 32, 65, + 72, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, 4, 8, 0, 24, 4, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 4, 0, 0, 26, 0, 0, 0, 87, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 24, 4, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,208, 0, 0, 0,216, 92,200, 3, 0, 0, 0, 0, +190, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 68, 65, 84, 65, -160, 0, 0, 0,232,237, 42, 5, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,168,244, 42, 5, 0, 0, 0, 0,248,232, 42, 5, - 0, 0, 0, 0,136,187, 42, 5, 0, 0, 0, 0, 8,191, 42, 5, 0, 0, 0, 0,120,191, 42, 5, 0, 0, 0, 0,248,187, 42, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 4, 0, 0,240, 4, 0, 0, 61, 1, 0, 0, 59, 2, 0, 0, 3, 3,216, 0, -255, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184,241, 42, 5, 0, 0, 0, 0,184,241, 42, 5, - 0, 0, 0, 0,216,238, 42, 5, 0, 0, 0, 0, 72,240, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,216,238, 42, 5, - 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 72,240, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0,128,244, 67, 0, 0, 0, 0, 0, 0,208, 65, 98, 39, 38, 54, 0, 0, 88, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -215, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 87, 67, 0, 0,200, 65, 0, 0, 87, 67, 0, 0,200, 65, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,216, 0, 26, 0,216, 0, 26, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 4, 0, 0,240, 4, 0, 0, 34, 2, 0, 0, 59, 2, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216, 0, 26, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, +120, 12,214, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 40, 14,214, 3, 0, 0, 0, 0, 88, 11,214, 3, 0, 0, 0, 0, +168, 14,201, 3, 0, 0, 0, 0,168, 19,201, 3, 0, 0, 0, 0, 72, 20,201, 3, 0, 0, 0, 0, 72, 15,201, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 25, 4, 0, 0,240, 4, 0, 0, 61, 1, 0, 0, 59, 2, 0, 0, 3, 3,216, 0,255, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,255,208, 3, 0, 0, 0, 0, 40,255,208, 3, 0, 0, 0, 0, +168,231,175, 3, 0, 0, 0, 0, 88,233,175, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,168,231,175, 3, 0, 0, 0, 0, +215, 0, 0, 0, 1, 0, 0, 0, 88,233,175, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,244, 67, + 0, 0, 0, 0, 0, 0,208, 65, 98, 39, 38, 54, 0, 0, 88, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,215, 0, 0, 0, + 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 87, 67, 0, 0,200, 65, 0, 0, 87, 67, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,216, 0, 26, 0,216, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 25, 4, 0, 0,240, 4, 0, 0, 34, 2, 0, 0, 59, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,216, 0, 26, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 88,233,175, 3, 0, 0, 0, 0, +215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168,231,175, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,141, 67, + 0, 0,244,194, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 67, 0, 0, 83,195, 0, 0, 0, 0,199, 0, 0, 0,216, 0, 0, 0, + 18, 0, 0, 0,228, 0, 0, 0, 0, 0, 0, 0,198, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,198, 0, 0, 0, + 18, 0, 0, 0,228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 18, 2, 0, 0, 2, 0, 3, 3, 0, 0, 12, 4, 6, 0,216, 0,229, 0,199, 0,211, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 25, 4, 0, 0,240, 4, 0, 0, 61, 1, 0, 0, 33, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,216, 0,229, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 1, 0, 0, 40,255,208, 3, 0, 0, 0, 0, +183, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 72,240, 42, 5, - 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216,238, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0,128,141, 67, 0, 0,244,194, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 67, 0, 0, 83,195, 0, 0, 0, 0,199, 0, 0, 0, -216, 0, 0, 0, 18, 0, 0, 0,228, 0, 0, 0, 0, 0, 0, 0,198, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, -198, 0, 0, 0, 18, 0, 0, 0,228, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 18, 2, 0, 0, 2, 0, 3, 3, 0, 0, 12, 4, 6, 0,216, 0,229, 0,199, 0,211, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 4, 0, 0,240, 4, 0, 0, 61, 1, 0, 0, 33, 2, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216, 0,229, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 1, 0, 0,184,241, 42, 5, - 0, 0, 0, 0,184, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +152, 13,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 68, 65, 84, 65, 16, 0, 0, 0,152, 13,214, 3, 0, 0, 0, 0,237, 0, 0, 0, 1, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0, +248, 30,199, 3, 0, 0, 0, 0, 68, 65, 84, 65,224, 0, 0, 0,248, 30,199, 3, 0, 0, 0, 0,236, 0, 0, 0, 14, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 0,168,194,217, 3, 0, 0, 0, 0, 19, 0, 0, 0, 1, 0, 1, 0,168,194,217, 3, 0, 0, 0, 0, + 20, 0, 0, 0, 1, 0, 1, 0,168,194,217, 3, 0, 0, 0, 0, 21, 0, 1, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 1, 0, 24, 51,163, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,184,219,217, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 1, 0,136, 48,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,152, 7,218, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 1, 0,216, 29,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,168,225,217, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 1, 0,120,209,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,200,213,217, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 1, 0, 24, 98,200, 3, 0, 0, 0, 0, 21, 0, 0, 0, 1, 0, 1, 0,168,194,217, 3, 0, 0, 0, 0, + 68, 65, 84, 65,160, 0, 0, 0, 40, 14,214, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 72, 15,214, 3, 0, 0, 0, 0, +120, 12,214, 3, 0, 0, 0, 0, 40, 17,201, 3, 0, 0, 0, 0,200, 17,201, 3, 0, 0, 0, 0, 8, 14,201, 3, 0, 0, 0, 0, +136, 16,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,193, 1, 0, 0, 23, 4, 0, 0, 89, 0, 0, 0,194, 2, 0, 0, + 1, 1, 87, 2,106, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184, 73,214, 3, 0, 0, 0, 0, +184, 73,214, 3, 0, 0, 0, 0, 8,235,175, 3, 0, 0, 0, 0, 72, 88,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, + 8,235,175, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 56, 83,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 64,113, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,192, 21, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 86, 2, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128, 21, 68, 0, 0,200, 65, 0,128, 21, 68, 0, 0,200, 65, + 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 87, 2, 26, 0, 87, 2, 26, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,193, 1, 0, 0, 23, 4, 0, 0, 89, 0, 0, 0,114, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 2, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 24,243, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, + 56, 83,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,232, 84,214, 3, 0, 0, 0, 0, 8,235,175, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 15, 67, 0, 64, 70,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67,255,127, 70,196, 0, 0, 0, 0, +143, 0, 0, 0,160, 0, 0, 0, 18, 0, 0, 0, 43, 3, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, + 0, 0, 0, 0,142, 0, 0, 0, 18, 0, 0, 0, 43, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,160, 0, 44, 3,143, 0, 26, 3, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,193, 1, 0, 0,193, 1, 0, 0,115, 0, 0, 0,194, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 80, 2, 0, 0, 5, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 68, 65, 84, 65, 16, 0, 0, 0, 24,243, 42, 5, 0, 0, 0, 0,238, 0, 0, 0, 1, 0, 0, 0, 14, 0, 0, 0, - 14, 0, 0, 0,120,243, 42, 5, 0, 0, 0, 0, 68, 65, 84, 65,224, 0, 0, 0,120,243, 42, 5, 0, 0, 0, 0,237, 0, 0, 0, - 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 88,162, 45, 5, 0, 0, 0, 0, 19, 0, 0, 0, 1, 0, 1, 0, 88,162, 45, 5, - 0, 0, 0, 0, 20, 0, 0, 0, 1, 0, 1, 0, 88,162, 45, 5, 0, 0, 0, 0, 21, 0, 1, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 8,189, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,120,198, 45, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 8, 30, 47, 5, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,168,212, 45, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 8,123, 46, 5, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 8,206, 45, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 72,184, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,216,191, 45, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 56,183, 45, 5, 0, 0, 0, 0, 21, 0, 0, 0, 1, 0, 1, 0, 88,162, 45, 5, - 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,168,244, 42, 5, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 56, 2, 43, 5, - 0, 0, 0, 0,232,237, 42, 5, 0, 0, 0, 0, 72,189, 42, 5, 0, 0, 0, 0,184,189, 42, 5, 0, 0, 0, 0, 24,187, 42, 5, - 0, 0, 0, 0,216,188, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,193, 1, 0, 0, 23, 4, 0, 0, 89, 0, 0, 0, -194, 2, 0, 0, 1, 1, 87, 2,106, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136, 0, 43, 5, - 0, 0, 0, 0,136, 0, 43, 5, 0, 0, 0, 0,152,245, 42, 5, 0, 0, 0, 0, 88,251, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 1, 0, 0,152,245, 42, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 8,247, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 64,113, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,192, 21, 68, 0, 0, 0, 0, - 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 86, 2, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128, 21, 68, 0, 0,200, 65, 0,128, 21, 68, - 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 87, 2, 26, 0, 87, 2, - 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,193, 1, 0, 0, 23, 4, 0, 0, 89, 0, 0, 0, -114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 2, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, +232, 84,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,152, 86,214, 3, 0, 0, 0, 0, 56, 83,214, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 16, 67, 0, 0,206,194, 0, 0, 0, 0, 0, 0, 0, 0,231,102, 16, 67, 0, 0,206,194, 0, 0, 0, 0, +143, 0, 0, 0,160, 0, 0, 0, 18, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, + 0, 0, 0, 0,142, 0, 0, 0, 18, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,160, 0,120, 0,143, 0,102, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,193, 1, 0, 0,193, 1, 0, 0,115, 0, 0, 0,115, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 6, 0, 34, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 1, 0, 0, 8,247, 42, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0,120,248, 42, 5, 0, 0, 0, 0,152,245, 42, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67, 0, 64, 70,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67,255,127, 70,196, - 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, 18, 0, 0, 0, 43, 3, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, - 17, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 18, 0, 0, 0, 43, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,160, 0, 44, 3,143, 0, - 26, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,193, 1, 0, 0,193, 1, 0, 0,115, 0, 0, 0, -194, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 80, 2, 0, 0, 5, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, +152, 86,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 72, 88,214, 3, 0, 0, 0, 0,232, 84,214, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 35, 67, 0,128, 96,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 67, 0,128, 96,196, 0, 0, 0, 0, +163, 0, 0, 0,180, 0, 0, 0, 18, 0, 0, 0,147, 3, 0, 0, 0, 0, 0, 0,162, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, + 0, 0, 0, 0,162, 0, 0, 0, 18, 0, 0, 0,147, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,180, 0,148, 3,163, 0,130, 3, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 4, 0, 0, 23, 4, 0, 0,115, 0, 0, 0,194, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 1, 0, 0,120,248, 42, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0,232,249, 42, 5, 0, 0, 0, 0, 8,247, 42, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 67, 0, 0,206,194, 0, 0, 0, 0, 0, 0, 0, 0,231,102, 16, 67, 0, 0,206,194, - 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, 18, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, - 17, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 18, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,160, 0,120, 0,143, 0, -102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,193, 1, 0, 0,193, 1, 0, 0,115, 0, 0, 0, -115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 6, 0, 34, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, + 72, 88,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152, 86,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 1, 0, 0,232,249, 42, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 88,251, 42, 5, 0, 0, 0, 0,120,248, 42, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 67, 0,128, 96,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 67, 0,128, 96,196, - 0, 0, 0, 0,163, 0, 0, 0,180, 0, 0, 0, 18, 0, 0, 0,147, 3, 0, 0, 0, 0, 0, 0,162, 0, 0, 0, 0, 0, 0, 0, - 17, 0, 0, 0, 0, 0, 0, 0,162, 0, 0, 0, 18, 0, 0, 0,147, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,180, 0,148, 3,163, 0, -130, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 23, 4, 0, 0, 23, 4, 0, 0,115, 0, 0, 0, -194, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 1, 0, 0, 88,251, 42, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,249, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,193, 1, 0, 0, 23, 4, 0, 0,115, 0, 0, 0,194, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 2, 80, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,115,214, 3, 0, 0, 0, 0, 68, 65, 84, 65,112, 3, 0, 0, + 8,115,214, 3, 0, 0, 0, 0,173, 0, 0, 0, 1, 0, 0, 0, 0, 0,140, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,200,167,141, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 13,128,191, 0, 0,128,191, + 0, 0, 0, 0, 0, 0, 0, 0, 74,215, 76,190, 0, 0, 0, 0, 68,239,209, 62, 51,177,205,190,184,158, 81, 63, 0, 0, 0, 0, + 70,119,105, 63,143, 74, 70, 62, 35, 44,185,190, 0, 0, 0, 0,162, 84, 89,188,166, 33,101, 63, 42, 61,228, 62, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,214,211,111,193, 0, 0,128, 63, 69,239,209, 62, 70,119,105, 63,176, 84, 89,188, 0, 0, 0, 0, + 53,177,205,190,142, 74, 70, 62,166, 33,101, 63, 0, 0, 0, 0,185,158, 81, 63, 35, 44,185,190, 43, 61,228, 62, 0, 0, 0, 0, +164, 96, 68, 65,111,121,173,192,248,209,213, 64, 0, 0,128, 63,178,157,229, 62,209,162,227,190, 48,180, 81,191,184,158, 81,191, +117, 90,127, 63, 13,114, 91, 62, 26, 63,185, 62, 35, 44,185, 62,145,180,109,188,105,147,125, 63,138, 84,228,190, 42, 61,228,190, + 0, 0, 0, 0, 0, 0, 0, 0, 9,185,108, 65,214,211,111, 65, 99,240,191, 62,110,116, 85, 63, 64,185, 70,188, 0, 0, 82,180, + 48,221,185,190, 44, 45, 51, 62, 28, 11, 79, 63, 0, 0, 56,179, 67,108,117,194,183,204,216, 65,105,156, 5,194,212,247,159,192, +235, 62,114, 66, 59,254,213,193,158,225, 3, 66, 55, 8,160, 64, 68,239,209, 62, 51,177,205,190,184,158, 81, 63, 0, 0, 0, 0, + 70,119,105, 63,143, 74, 70, 62, 35, 44,185,190, 0, 0, 0, 0,162, 84, 89,188,166, 33,101, 63, 42, 61,228, 62, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,214,211,111,193, 0, 0,128, 63,178,157,229, 62,209,162,227,190, 48,180, 81,191,184,158, 81,191, +117, 90,127, 63, 13,114, 91, 62, 26, 63,185, 62, 35, 44,185, 62,145,180,109,188,105,147,125, 63,138, 84,228,190, 42, 61,228,190, + 0, 0, 0, 0, 0, 0, 0, 0, 9,185,108, 65,214,211,111, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,193, 1, 0, 0, 23, 4, 0, 0,115, 0, 0, 0, -194, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 2, 80, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,252, 42, 5, 0, 0, 0, 0, 68, 65, 84, 65, -120, 3, 0, 0,200,252, 42, 5, 0, 0, 0, 0,174, 0, 0, 0, 1, 0, 0, 0, 0, 0,140, 63, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,200,167,141, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 13,128,191, - 0, 0,128,191, 0, 0, 0, 0, 0, 0, 0, 0, 74,215, 76,190, 0, 0, 0, 0, 68,239,209, 62, 51,177,205,190,184,158, 81, 63, - 0, 0, 0, 0, 70,119,105, 63,143, 74, 70, 62, 35, 44,185,190, 0, 0, 0, 0,162, 84, 89,188,166, 33,101, 63, 42, 61,228, 62, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,214,211,111,193, 0, 0,128, 63, 69,239,209, 62, 70,119,105, 63,176, 84, 89,188, - 0, 0, 0, 0, 53,177,205,190,142, 74, 70, 62,166, 33,101, 63, 0, 0, 0, 0,185,158, 81, 63, 35, 44,185,190, 43, 61,228, 62, - 0, 0, 0, 0,164, 96, 68, 65,111,121,173,192,248,209,213, 64, 0, 0,128, 63,178,157,229, 62,209,162,227,190, 48,180, 81,191, -184,158, 81,191,117, 90,127, 63, 13,114, 91, 62, 26, 63,185, 62, 35, 44,185, 62,145,180,109,188,105,147,125, 63,138, 84,228,190, - 42, 61,228,190, 0, 0, 0, 0, 0, 0, 0, 0, 9,185,108, 65,214,211,111, 65, 99,240,191, 62,110,116, 85, 63, 64,185, 70,188, - 0, 0, 82,180, 48,221,185,190, 44, 45, 51, 62, 28, 11, 79, 63, 0, 0, 56,179, 67,108,117,194,183,204,216, 65,105,156, 5,194, -212,247,159,192,235, 62,114, 66, 59,254,213,193,158,225, 3, 66, 55, 8,160, 64, 68,239,209, 62, 51,177,205,190,184,158, 81, 63, - 0, 0, 0, 0, 70,119,105, 63,143, 74, 70, 62, 35, 44,185,190, 0, 0, 0, 0,162, 84, 89,188,166, 33,101, 63, 42, 61,228, 62, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,214,211,111,193, 0, 0,128, 63,178,157,229, 62,209,162,227,190, 48,180, 81,191, -184,158, 81,191,117, 90,127, 63, 13,114, 91, 62, 26, 63,185, 62, 35, 44,185, 62,145,180,109,188,105,147,125, 63,138, 84,228,190, - 42, 61,228,190, 0, 0, 0, 0, 0, 0, 0, 0, 9,185,108, 65,214,211,111, 65, 12,163, 91, 64, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 12,163, 91, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12,163, 91, 64, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 92, 62, 55, 63, 56,186,224,190,237,203,148,190, - 3,236,234,190,214,211,111, 65,214,211,111, 65, 0, 0, 0, 0, 0, 0, 0, 0,236, 15, 72, 59, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,255,255, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12,163, 91, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 12,163, 91, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12,163, 91, 64, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 92, 62, 55, 63, 56,186,224,190,237,203,148,190, 3,236,234,190, +214,211,111, 65,214,211,111, 65, 0, 0, 0, 0, 0, 0, 0, 0,236, 15, 72, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 1, 0, 0,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 32, 33, 12, 66, 86,152,137, 66,113, 27,126, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 96, 1, 0, 0,184, 73,214, 3, 0, 0, 0, 0,174, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 51, 51, 51, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 32, 65,205,204, 76, 62, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, 0,200,213,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 3, 0, 8, 8,128, 0, 0, 0, 12, 66, + 0, 0,128, 63,205,204,204, 61, 0, 0,250, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 16, 0, 10, 0, 7, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 32, 33, 12, 66, 86,152,137, 66,113, 27,126, 66, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 96, 1, 0, 0,136, 0, 43, 5, 0, 0, 0, 0,175, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0, 51, 51, 51, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65,205,204, 76, 62, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, - 1, 0, 7, 0,216,191, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, + 72, 15,214, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,104, 16,214, 3, 0, 0, 0, 0, 40, 14,214, 3, 0, 0, 0, 0, +232, 15,201, 3, 0, 0, 0, 0,104, 18,201, 3, 0, 0, 0, 0, 8, 19,201, 3, 0, 0, 0, 0, 40, 17,201, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191, 1, 0, 0, 89, 0, 0, 0, 3, 1, 0, 0, 2, 2,192, 1,171, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,149,199, 3, 0, 0, 0, 0, 8,149,199, 3, 0, 0, 0, 0, +248, 89,214, 3, 0, 0, 0, 0, 8, 95,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,248, 89,214, 3, 0, 0, 0, 0, +215, 0, 0, 0, 1, 0, 0, 0,168, 91,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 89, 68, + 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,224, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191, 1, 0, 0, + 0, 0, 0, 0, 25, 0, 0, 0, 0,128,223, 67, 0, 0,200, 65, 0,128,223, 67, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,192, 1, 26, 0,192, 1, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191, 1, 0, 0, 89, 0, 0, 0,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,192, 1, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, - 1, 0, 3, 0, 8, 8,128, 0, 0, 0, 12, 66, 0, 0,128, 63,205,204,204, 61, 0, 0,250, 67, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 10, 0, 7, 1, 0, 3, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,168, 91,214, 3, 0, 0, 0, 0, +215, 0, 0, 0, 1, 0, 0, 0, 88, 93,214, 3, 0, 0, 0, 0,248, 89,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 67, + 0, 0,112,193, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 67, 0, 0,254,194, 0, 0, 0, 0,200, 0, 0, 0,217, 0, 0, 0, + 18, 0, 0, 0,144, 0, 0, 0, 0, 0, 0, 0,199, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,199, 0, 0, 0, + 18, 0, 0, 0,144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 10, 6, 0, 0, 2, 0, 3, 3, 0, 0, 0, 4, 6, 0,217, 0,145, 0,200, 0,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216, 0, 0, 0,115, 0, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,217, 0,145, 0, 0, 0, 2, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, 56, 2, 43, 5, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,232, 10, 43, 5, - 0, 0, 0, 0,168,244, 42, 5, 0, 0, 0, 0,104,188, 42, 5, 0, 0, 0, 0, 40,190, 42, 5, 0, 0, 0, 0,152,190, 42, 5, - 0, 0, 0, 0, 72,189, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191, 1, 0, 0, 89, 0, 0, 0, - 3, 1, 0, 0, 2, 2,192, 1,171, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232, 8, 43, 5, - 0, 0, 0, 0,232, 8, 43, 5, 0, 0, 0, 0, 40, 3, 43, 5, 0, 0, 0, 0,120, 7, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 1, 0, 0, 40, 3, 43, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0,152, 4, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 89, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,224, 67, 0, 0, 0, 0, - 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,191, 1, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,223, 67, 0, 0,200, 65, 0,128,223, 67, - 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,192, 1, 26, 0,192, 1, - 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191, 1, 0, 0, 89, 0, 0, 0, -114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 1, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 88, 93,214, 3, 0, 0, 0, 0, +215, 0, 0, 0, 1, 0, 0, 0, 8, 95,214, 3, 0, 0, 0, 0,168, 91,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 1, 0, 0,152, 4, 43, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 8, 6, 43, 5, 0, 0, 0, 0, 40, 3, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 67, 0, 0,112,193, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 67, 0, 0,254,194, - 0, 0, 0, 0,200, 0, 0, 0,217, 0, 0, 0, 18, 0, 0, 0,144, 0, 0, 0, 0, 0, 0, 0,199, 0, 0, 0, 0, 0, 0, 0, - 17, 0, 0, 0, 0, 0, 0, 0,199, 0, 0, 0, 18, 0, 0, 0,144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 10, 6, 0, 0, 2, 0, 3, 3, 0, 0, 0, 4, 6, 0,217, 0,145, 0,200, 0, -127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216, 0, 0, 0,115, 0, 0, 0, - 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,217, 0,145, 0, 0, 0, 2, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 1, 0, 0, 8, 6, 43, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0,120, 7, 43, 5, 0, 0, 0, 0,152, 4, 43, 5, + 0, 0, 0, 0, 0, 0, 0, 0,191, 1, 0, 0,191, 1, 0, 0,115, 0, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 8, 95,214, 3, 0, 0, 0, 0, +215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 93,214, 3, 0, 0, 0, 0, 0, 0, 16,193, 0, 0,130, 67, + 0, 0,160,192, 0, 0,160, 64, 0, 0, 0, 0, 0, 0,122, 67, 0, 0, 16,193, 0, 0, 32, 65, 0, 0, 0, 0, 17, 0, 0, 0, + 18, 0, 0, 0,144, 0, 0, 0, 18, 0, 0, 0,230, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0,230, 0, 0, 0, + 18, 0, 0, 0,144, 0, 0, 0,111, 18,131, 58,111, 18,131, 58, 0,124,146, 72, 0, 80, 67, 71, 0, 0, 0, 0, 0, 0, 0, 0, +105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0,231, 0,145, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,217, 0, 0, 0,191, 1, 0, 0,115, 0, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,231, 0,145, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191, 1, 0, 0,191, 1, 0, 0,115, 0, 0, 0, - 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 4, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,240, 0, 0, 0, 8,149,199, 3, 0, 0, 0, 0, +178, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 1, 0, 0,120, 7, 43, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 6, 43, 5, - 0, 0, 0, 0, 0, 0, 16,193, 0, 0,130, 67, 0, 0,160,192, 0, 0,160, 64, 0, 0, 0, 0, 0, 0,122, 67, 0, 0, 16,193, - 0, 0, 32, 65, 0, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0,144, 0, 0, 0, 18, 0, 0, 0,230, 0, 0, 0, 0, 0, 0, 0, - 17, 0, 0, 0, 18, 0, 0, 0,230, 0, 0, 0, 18, 0, 0, 0,144, 0, 0, 0,111, 18,131, 58,111, 18,131, 58, 0,124,146, 72, - 0, 80, 67, 71, 0, 0, 0, 0, 0, 0, 0, 0,105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0,231, 0,145, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,217, 0, 0, 0,191, 1, 0, 0,115, 0, 0, 0, - 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,231, 0,145, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, -240, 0, 0, 0,232, 8, 43, 5, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,119,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,112, 0, 0, 0, + 40,119,214, 3, 0, 0, 0, 0, 37, 1, 0, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65,160, 0, 0, 0,104, 16,214, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,248,150,214, 3, 0, 0, 0, 0, + 72, 15,214, 3, 0, 0, 0, 0,104, 18,201, 3, 0, 0, 0, 0, 40, 12,201, 3, 0, 0, 0, 0,200, 17,201, 3, 0, 0, 0, 0, + 8, 19,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191, 1, 0, 0, 5, 1, 0, 0,194, 2, 0, 0, + 12, 12,192, 1,190, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,230,208, 3, 0, 0, 0, 0, +200,230,208, 3, 0, 0, 0, 0,184, 96,214, 3, 0, 0, 0, 0, 24,100,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, +184, 96,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,104, 98,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0,192, 94, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,224, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,191, 1, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,223, 67, 0, 0,200, 65, 0,128,223, 67, 0, 0,200, 65, + 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,192, 1, 26, 0,192, 1, 26, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191, 1, 0, 0, 5, 1, 0, 0, 30, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 1, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 10, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65,112, 0, 0, 0, 40, 10, 43, 5, 0, 0, 0, 0, 38, 1, 0, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, +104, 98,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 24,100,214, 3, 0, 0, 0, 0,184, 96,214, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 55, 67, 0, 0, 0,194, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 67, 0, 0,201,195, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,199, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, + 0, 0, 0, 0,199, 0, 0, 0, 18, 0, 0, 0,163, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 8, 4, 0, 0, 2, 0, 3, 3, 0, 0, 2, 4, 6, 0,200, 0,164, 1,200, 0,146, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,199, 0, 0, 0, 31, 1, 0, 0,194, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200, 0,164, 1, 0, 0, 2, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,232, 10, 43, 5, 0, 0, 0, 0,215, 0, 0, 0, - 1, 0, 0, 0,184, 17, 43, 5, 0, 0, 0, 0, 56, 2, 43, 5, 0, 0, 0, 0, 40,190, 42, 5, 0, 0, 0, 0,200,185, 42, 5, - 0, 0, 0, 0,184,189, 42, 5, 0, 0, 0, 0,152,190, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -191, 1, 0, 0, 5, 1, 0, 0,194, 2, 0, 0, 12, 12,192, 1,190, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 40, 16, 43, 5, 0, 0, 0, 0, 40, 16, 43, 5, 0, 0, 0, 0,216, 11, 43, 5, 0, 0, 0, 0,184, 14, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,216, 11, 43, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 72, 13, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 94, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, - 0, 0,224, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191, 1, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,223, 67, - 0, 0,200, 65, 0,128,223, 67, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, - 10, 0,192, 1, 26, 0,192, 1, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -191, 1, 0, 0, 5, 1, 0, 0, 30, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 1, 26, 0, - 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, + 24,100,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,104, 98,214, 3, 0, 0, 0, 0, + 0, 0, 32,193, 0, 0,104, 68, 0, 0, 72,194, 0, 0, 0, 0, 0, 0, 32,193, 0, 0,104, 68, 0, 0,201,195, 0, 0, 0, 0, +231, 0, 0, 0,248, 0, 0, 0, 18, 0, 0, 0,163, 1, 0, 0, 0, 0, 0, 0,230, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, + 0, 0, 0, 0,230, 0, 0, 0, 18, 0, 0, 0,163, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,124,146, 72, 0, 64, 28, 70, + 10,215, 35, 60, 0, 0, 72, 66, 74, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, 4, 4, 0,248, 0,164, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200, 0, 0, 0,191, 1, 0, 0, 31, 1, 0, 0,194, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 0,164, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 72, 13, 43, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0,184, 14, 43, 5, - 0, 0, 0, 0,216, 11, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 67, 0, 0, 0,194, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 72, 67, 0, 0,201,195, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -199, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,199, 0, 0, 0, 18, 0, 0, 0,163, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 8, 4, 0, 0, 2, 0, 3, 3, 0, 0, 2, 4, - 6, 0,200, 0,164, 1,200, 0,146, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -199, 0, 0, 0, 31, 1, 0, 0,194, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200, 0,164, 1, - 0, 0, 2, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 72, 1, 0, 0, +200,230,208, 3, 0, 0, 0, 0, 38, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,184, 14, 43, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 72, 13, 43, 5, 0, 0, 0, 0, 0, 0, 32,193, 0, 0,104, 68, 0, 0, 72,194, 0, 0, 0, 0, 0, 0, 32,193, - 0, 0,104, 68, 0, 0,201,195, 0, 0, 0, 0,231, 0, 0, 0,248, 0, 0, 0, 18, 0, 0, 0,163, 1, 0, 0, 0, 0, 0, 0, -230, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,230, 0, 0, 0, 18, 0, 0, 0,163, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,124,146, 72, 0, 64, 28, 70, 10,215, 35, 60, 0, 0, 72, 66, 74, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, 4, - 4, 0,248, 0,164, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200, 0, 0, 0, -191, 1, 0, 0, 31, 1, 0, 0,194, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 0,164, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 72, 1, 0, 0, 40, 16, 43, 5, 0, 0, 0, 0, 39, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, +248,150,214, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,104, 16,214, 3, 0, 0, 0, 0, +168, 19,201, 3, 0, 0, 0, 0, 8, 14,201, 3, 0, 0, 0, 0,200, 12,201, 3, 0, 0, 0, 0, 72, 20,201, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 25, 4, 0, 0,240, 4, 0, 0, 61, 2, 0, 0,194, 2, 0, 0, 1, 1,216, 0,134, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152, 75,214, 3, 0, 0, 0, 0,152, 75,214, 3, 0, 0, 0, 0, +200,101,214, 3, 0, 0, 0, 0,120,103,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,200,101,214, 3, 0, 0, 0, 0, +215, 0, 0, 0, 1, 0, 0, 0,120,103,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,102, 68, + 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,165, 67, 0, 0, 0, 64, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 73, 1, 0, 0, + 0, 0, 0, 0, 23, 0, 0, 0, 0,128,164, 67, 0, 0,200, 65, 0,128,164, 67, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 74, 1, 24, 0, 74, 1, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 25, 4, 0, 0,240, 4, 0, 0, 61, 2, 0, 0, 61, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,120,103,214, 3, 0, 0, 0, 0, +215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,101,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 2, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,184, 17, 43, 5, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,232, 10, 43, 5, 0, 0, 0, 0, 8,191, 42, 5, 0, 0, 0, 0, 24,187, 42, 5, 0, 0, 0, 0, 56,186, 42, 5, - 0, 0, 0, 0,120,191, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 4, 0, 0,240, 4, 0, 0, 61, 2, 0, 0, -194, 2, 0, 0, 1, 1,216, 0,134, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 25, 43, 5, - 0, 0, 0, 0, 72, 25, 43, 5, 0, 0, 0, 0,168, 18, 43, 5, 0, 0, 0, 0, 24, 20, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 1, 0, 0,168, 18, 43, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 24, 20, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,102, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,165, 67, 0, 0, 0, 64, - 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0,128,164, 67, 0, 0,200, 65, 0,128,164, 67, - 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 74, 1, 24, 0, 74, 1, - 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 4, 0, 0,240, 4, 0, 0, 61, 2, 0, 0, - 61, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 2, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 1, 0, 0, 24, 20, 43, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168, 18, 43, 5, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 25, 4, 0, 0,240, 4, 0, 0, 61, 2, 0, 0,194, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,216, 0,134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 24,152,214, 3, 0, 0, 0, 0, 68, 65, 84, 65,112, 3, 0, 0, 24,152,214, 3, 0, 0, 0, 0, +173, 0, 0, 0, 1, 0, 0, 0, 56,255, 13, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,228,100, 64, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,154, 65,128,191, 0, 0,128,191, 0, 0, 0, 0, 0, 0, 0, 0, + 72, 1, 77,190, 0, 0, 0, 0,221,149, 47, 63, 86,126,162,190, 8,165, 39, 63, 0, 0, 0, 0, 51, 70, 58, 63,225,251,159, 62, +149, 84, 28,191, 0, 0, 0, 0,192, 56, 49,188, 55, 53,101, 63, 52,247,227, 62, 0, 0, 0, 0, 90, 38,173,190, 0,222,192,190, +152, 9, 52,193, 0, 0,128, 63,223,149, 47, 63, 55, 70, 58, 63,160, 56, 49,188, 0, 0, 0, 0, 88,126,162,190,229,251,159, 62, + 55, 53,101, 63, 0, 0, 0, 0, 7,165, 39, 63,150, 84, 28,191, 51,247,227, 62, 0, 0, 0, 0,110,101,239, 64,151, 62,208,192, + 78,255,170, 64, 0, 0,128, 63, 47,201,194, 63, 61, 73,145,191,244,250, 39,191, 8,165, 39,191,190,164,206, 63,209, 10,143, 63, +180,164, 28, 63,149, 84, 28, 63,224,153,196,188,136,239, 76, 64, 10,108,228,190, 52,247,227,190,125, 21, 64,191,126,113,172,191, +216, 49, 49, 65,152, 9, 52, 65,149, 70,158, 62, 24,234,167, 62,192,214,159,187, 0, 0, 6,181,196,188,181,189, 71,238,178, 61, +127, 45,128, 62, 0, 0,226, 51,168,120, 21,194,107, 5, 2, 66,203,135,213,193,147,214,159,192,177, 38, 19, 66,124,173,255,193, + 96,101,210, 65,128, 40,160, 64,221,149, 47, 63, 86,126,162,190, 8,165, 39, 63, 0, 0, 0, 0, 51, 70, 58, 63,225,251,159, 62, +149, 84, 28,191, 0, 0, 0, 0,192, 56, 49,188, 55, 53,101, 63, 52,247,227, 62, 0, 0, 0, 0, 90, 38,173,190, 0,222,192,190, +152, 9, 52,193, 0, 0,128, 63, 47,201,194, 63, 61, 73,145,191,244,250, 39,191, 8,165, 39,191,190,164,206, 63,209, 10,143, 63, +180,164, 28, 63,149, 84, 28, 63,224,153,196,188,136,239, 76, 64, 10,108,228,190, 52,247,227,190,125, 21, 64,191,126,113,172,191, +216, 49, 49, 65,152, 9, 52, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 4, 0, 0,240, 4, 0, 0, 61, 2, 0, 0, -194, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216, 0,134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136, 21, 43, 5, 0, 0, 0, 0, 68, 65, 84, 65, -120, 3, 0, 0,136, 21, 43, 5, 0, 0, 0, 0,174, 0, 0, 0, 1, 0, 0, 0, 56,255, 13, 64, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0,228,100, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,154, 65,128,191, - 0, 0,128,191, 0, 0, 0, 0, 0, 0, 0, 0, 72, 1, 77,190, 0, 0, 0, 0,221,149, 47, 63, 86,126,162,190, 8,165, 39, 63, - 0, 0, 0, 0, 51, 70, 58, 63,225,251,159, 62,149, 84, 28,191, 0, 0, 0, 0,192, 56, 49,188, 55, 53,101, 63, 52,247,227, 62, - 0, 0, 0, 0, 90, 38,173,190, 0,222,192,190,152, 9, 52,193, 0, 0,128, 63,223,149, 47, 63, 55, 70, 58, 63,160, 56, 49,188, - 0, 0, 0, 0, 88,126,162,190,229,251,159, 62, 55, 53,101, 63, 0, 0, 0, 0, 7,165, 39, 63,150, 84, 28,191, 51,247,227, 62, - 0, 0, 0, 0,110,101,239, 64,151, 62,208,192, 78,255,170, 64, 0, 0,128, 63, 47,201,194, 63, 61, 73,145,191,244,250, 39,191, - 8,165, 39,191,190,164,206, 63,209, 10,143, 63,180,164, 28, 63,149, 84, 28, 63,224,153,196,188,136,239, 76, 64, 10,108,228,190, - 52,247,227,190,125, 21, 64,191,126,113,172,191,216, 49, 49, 65,152, 9, 52, 65,149, 70,158, 62, 24,234,167, 62,192,214,159,187, - 0, 0, 6,181,196,188,181,189, 71,238,178, 61,127, 45,128, 62, 0, 0,226, 51,168,120, 21,194,107, 5, 2, 66,203,135,213,193, -147,214,159,192,177, 38, 19, 66,124,173,255,193, 96,101,210, 65,128, 40,160, 64,221,149, 47, 63, 86,126,162,190, 8,165, 39, 63, - 0, 0, 0, 0, 51, 70, 58, 63,225,251,159, 62,149, 84, 28,191, 0, 0, 0, 0,192, 56, 49,188, 55, 53,101, 63, 52,247,227, 62, - 0, 0, 0, 0, 90, 38,173,190, 0,222,192,190,152, 9, 52,193, 0, 0,128, 63, 47,201,194, 63, 61, 73,145,191,244,250, 39,191, - 8,165, 39,191,190,164,206, 63,209, 10,143, 63,180,164, 28, 63,149, 84, 28, 63,224,153,196,188,136,239, 76, 64, 10,108,228,190, - 52,247,227,190,125, 21, 64,191,126,113,172,191,216, 49, 49, 65,152, 9, 52, 65,102,103, 97, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,102,103, 97, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,102,103, 97, 64, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,241, 22, 72, 63, 78,162,246,190, 43, 8, 90,190, - 2, 35,171,190, 0, 0, 32, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,253,191,136, 59, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,102,103, 97, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63,241, 22, 72, 63, 78,162,246,190, 43, 8, 90,190, 2, 35,171,190, 0, 0, 32, 65, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,253,191,136, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 65, 1, 2, 0, 0, +255,255, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 7, 0, 0, 0,128, 63,190,133, 65, 66, + 99,212, 90, 66, 27,183,118, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 96, 1, 0, 0, +152, 75,214, 3, 0, 0, 0, 0,174, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 51, 51, 51, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65,205,204, 76, 62, + 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, 0,200,213,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 3, 0, 8, 0,128, 0, 0, 0, 12, 66, 0, 0,128, 63, 10,215, 35, 60, + 0, 0,250, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, + 10, 0, 7, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 78, 0, 0, 8, 1, 0, 0, 8,156,214, 3, 0, 0, 0, 0, +210, 0, 0, 0, 1, 0, 0, 0,248, 9,215, 3, 0, 0, 0, 0,136, 7,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 83, 82, 67,111,109,112,111,115,105,116,105,110,103, 0,103, 46, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +232, 20,201, 3, 0, 0, 0, 0, 8, 29,201, 3, 0, 0, 0, 0,168,108,171, 3, 0, 0, 0, 0, 24,123,171, 3, 0, 0, 0, 0, +152,157,214, 3, 0, 0, 0, 0, 40,231,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,232, 20,201, 3, 0, 0, 0, 0, +211, 0, 0, 0, 1, 0, 0, 0,136, 21,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,136, 21,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, + 40, 22,201, 3, 0, 0, 0, 0,232, 20,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 4, 0, 0, 0, 0, + 68, 65, 84, 65, 32, 0, 0, 0, 40, 22,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,200, 22,201, 3, 0, 0, 0, 0, +136, 21,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 5, 4, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, +200, 22,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,104, 23,201, 3, 0, 0, 0, 0, 40, 22,201, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,104, 23,201, 3, 0, 0, 0, 0, +211, 0, 0, 0, 1, 0, 0, 0, 8, 24,201, 3, 0, 0, 0, 0,200, 22,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,234, 3, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 8, 24,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, +168, 24,201, 3, 0, 0, 0, 0,104, 23,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7,234, 3, 1, 0, 0, 0, + 68, 65, 84, 65, 32, 0, 0, 0,168, 24,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 72, 25,201, 3, 0, 0, 0, 0, + 8, 24,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 6, 92, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, + 72, 25,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,232, 25,201, 3, 0, 0, 0, 0,168, 24,201, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 92, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,232, 25,201, 3, 0, 0, 0, 0, +211, 0, 0, 0, 1, 0, 0, 0,136, 26,201, 3, 0, 0, 0, 0, 72, 25,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 32, 6,234, 3, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,136, 26,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, + 40, 27,201, 3, 0, 0, 0, 0,232, 25,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140, 1, 0, 0, 0, 0, + 68, 65, 84, 65, 32, 0, 0, 0, 40, 27,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,200, 27,201, 3, 0, 0, 0, 0, +136, 26,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 6,140, 1, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, +200, 27,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,104, 28,201, 3, 0, 0, 0, 0, 40, 27,201, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 4, 3,140, 1, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,104, 28,201, 3, 0, 0, 0, 0, +211, 0, 0, 0, 1, 0, 0, 0, 8, 29,201, 3, 0, 0, 0, 0,200, 27,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 4, 3, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 8, 29,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,104, 28,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 6, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 40, 0, 0, 0,168,108,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 88,109,171, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,136, 21,201, 3, 0, 0, 0, 0, 40, 22,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 40, 0, 0, 0, 88,109,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 8,110,171, 3, 0, 0, 0, 0, +168,108,171, 3, 0, 0, 0, 0,136, 21,201, 3, 0, 0, 0, 0,104, 23,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 40, 0, 0, 0, 8,110,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,184,110,171, 3, 0, 0, 0, 0, + 88,109,171, 3, 0, 0, 0, 0, 40, 22,201, 3, 0, 0, 0, 0, 8, 24,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 40, 0, 0, 0,184,110,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,104,111,171, 3, 0, 0, 0, 0, + 8,110,171, 3, 0, 0, 0, 0,104, 23,201, 3, 0, 0, 0, 0, 8, 24,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 40, 0, 0, 0,104,111,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 24,112,171, 3, 0, 0, 0, 0, +184,110,171, 3, 0, 0, 0, 0,200, 22,201, 3, 0, 0, 0, 0, 72, 25,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 40, 0, 0, 0, 24,112,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,200,112,171, 3, 0, 0, 0, 0, +104,111,171, 3, 0, 0, 0, 0,168, 24,201, 3, 0, 0, 0, 0, 72, 25,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 40, 0, 0, 0,200,112,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,120,113,171, 3, 0, 0, 0, 0, + 24,112,171, 3, 0, 0, 0, 0, 8, 24,201, 3, 0, 0, 0, 0,232, 25,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 40, 0, 0, 0,120,113,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 40,114,171, 3, 0, 0, 0, 0, +200,112,171, 3, 0, 0, 0, 0,104, 23,201, 3, 0, 0, 0, 0,232, 25,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 40, 0, 0, 0, 40,114,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,216,114,171, 3, 0, 0, 0, 0, +120,113,171, 3, 0, 0, 0, 0,168, 24,201, 3, 0, 0, 0, 0,232, 25,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 40, 0, 0, 0,216,114,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,136,115,171, 3, 0, 0, 0, 0, + 40,114,171, 3, 0, 0, 0, 0, 8, 24,201, 3, 0, 0, 0, 0, 72, 25,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 40, 0, 0, 0,136,115,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 56,116,171, 3, 0, 0, 0, 0, +216,114,171, 3, 0, 0, 0, 0,104, 23,201, 3, 0, 0, 0, 0,136, 26,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 40, 0, 0, 0, 56,116,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,232,116,171, 3, 0, 0, 0, 0, +136,115,171, 3, 0, 0, 0, 0,232, 25,201, 3, 0, 0, 0, 0, 40, 27,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 40, 0, 0, 0,232,116,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,152,117,171, 3, 0, 0, 0, 0, + 56,116,171, 3, 0, 0, 0, 0,136, 26,201, 3, 0, 0, 0, 0, 40, 27,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 40, 0, 0, 0,152,117,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 72,118,171, 3, 0, 0, 0, 0, +232,116,171, 3, 0, 0, 0, 0,136, 26,201, 3, 0, 0, 0, 0,200, 27,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 40, 0, 0, 0, 72,118,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,248,118,171, 3, 0, 0, 0, 0, +152,117,171, 3, 0, 0, 0, 0, 40, 27,201, 3, 0, 0, 0, 0,200, 27,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 40, 0, 0, 0,248,118,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,168,119,171, 3, 0, 0, 0, 0, + 72,118,171, 3, 0, 0, 0, 0,232, 20,201, 3, 0, 0, 0, 0,104, 28,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 40, 0, 0, 0,168,119,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 88,120,171, 3, 0, 0, 0, 0, +248,118,171, 3, 0, 0, 0, 0,104, 28,201, 3, 0, 0, 0, 0, 8, 29,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 40, 0, 0, 0, 88,120,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 8,121,171, 3, 0, 0, 0, 0, +168,119,171, 3, 0, 0, 0, 0,200, 22,201, 3, 0, 0, 0, 0, 8, 29,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 40, 0, 0, 0, 8,121,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,184,121,171, 3, 0, 0, 0, 0, + 88,120,171, 3, 0, 0, 0, 0,168, 24,201, 3, 0, 0, 0, 0, 8, 29,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 40, 0, 0, 0,184,121,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,104,122,171, 3, 0, 0, 0, 0, + 8,121,171, 3, 0, 0, 0, 0,200, 27,201, 3, 0, 0, 0, 0,104, 28,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 40, 0, 0, 0,104,122,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 24,123,171, 3, 0, 0, 0, 0, +184,121,171, 3, 0, 0, 0, 0, 40, 27,201, 3, 0, 0, 0, 0, 8, 29,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 40, 0, 0, 0, 24,123,171, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +104,122,171, 3, 0, 0, 0, 0,232, 20,201, 3, 0, 0, 0, 0,136, 26,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65,160, 0, 0, 0,152,157,214, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,184,158,214, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,104, 23,201, 3, 0, 0, 0, 0,136, 21,201, 3, 0, 0, 0, 0, 40, 22,201, 3, 0, 0, 0, 0, + 8, 24,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,235, 3, 0, 0, 5, 4, 0, 0, + 7, 7,127, 7, 27, 0, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88,198,207, 3, 0, 0, 0, 0, + 88,198,207, 3, 0, 0, 0, 0, 40,105,214, 3, 0, 0, 0, 0,216,106,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, + 40,105,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,216,106,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 32,148, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,224,239, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,126, 7, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,192,239, 68, 0, 0,200, 65, 0,192,239, 68, 0, 0,200, 65, + 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,127, 7, 26, 0,127, 7, 26, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,235, 3, 0, 0, 4, 4, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,127, 7, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 7, 0, 0, 0,128, 63,190,133, 65, 66, 99,212, 90, 66, 27,183,118, 66, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 96, 1, 0, 0, 72, 25, 43, 5, 0, 0, 0, 0,175, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0, 51, 51, 51, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65,205,204, 76, 62, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, - 1, 0, 7, 0,216,191, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, +216,106,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,105,214, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0,240,109, 69, 0, 0,128,192, 0, 0, 0, 0, 0, 0, 0, 0,255,255,109, 69, 0, 0, 0,192, 0, 0, 0, 0, +112, 7, 0, 0,129, 7, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, + 0, 0, 0, 0,111, 7, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 2, 0, 0, 0, 1, 0, 3, 3, 2, 0, 0, 4, 10, 0,129, 7, 2, 0,112, 7, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 4, 0, 0, 5, 4, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, - 1, 0, 3, 0, 8, 0,128, 0, 0, 0, 12, 66, 0, 0,128, 63, 10,215, 35, 60, 0, 0,250, 67, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 10, 0, 7, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, +184,158,214, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,216,159,214, 3, 0, 0, 0, 0,152,157,214, 3, 0, 0, 0, 0, + 8, 29,201, 3, 0, 0, 0, 0,168, 24,201, 3, 0, 0, 0, 0, 72, 25,201, 3, 0, 0, 0, 0,200, 22,201, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 33, 6, 0, 0,126, 7, 0, 0, 0, 0, 0, 0, 91, 0, 0, 0, 15, 15, 94, 1, 92, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 94,200, 3, 0, 0, 0, 0, 40, 94,200, 3, 0, 0, 0, 0, +136,108,214, 3, 0, 0, 0, 0, 56,110,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,136,108,214, 3, 0, 0, 0, 0, +215, 0, 0, 0, 1, 0, 0, 0, 56,110,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,115, 68, + 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,175, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 1, 0, 0, + 0, 0, 0, 0, 25, 0, 0, 0, 0,128,174, 67, 0, 0,200, 65, 0,128,174, 67, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 94, 1, 26, 0, 94, 1, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 33, 6, 0, 0,126, 7, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 94, 1, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 56,110,214, 3, 0, 0, 0, 0, +215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136,108,214, 3, 0, 0, 0, 0, 0, 0, 64,192, 0, 0,126, 67, + 0, 0, 0, 0, 0, 0, 72, 66, 50, 51, 74,193,154,209,131, 67, 0, 0, 0, 0, 0, 0, 72, 66, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 93, 1, 0, 0, + 18, 0, 0, 0, 65, 0, 0, 0, 0, 0,128, 63, 0, 0, 72, 66, 0,124,146, 72, 0, 0, 72, 66,205,204,204, 61, 0, 0, 32, 65, + 72, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, 4, 8, 0, 94, 1, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 33, 6, 0, 0,126, 7, 0, 0, 26, 0, 0, 0, 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 94, 1, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,208, 0, 0, 0, 40, 94,200, 3, 0, 0, 0, 0, +190, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 83, 78, 0, 0, 8, 1, 0, 0,136, 27, 43, 5, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 8,136, 43, 5, - 0, 0, 0, 0,184,182, 42, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 82, 67,111, -109,112,111,115,105,116,105,110,103, 0,103, 46, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216, 28, 43, 5, 0, 0, 0, 0,136, 34, 43, 5, - 0, 0, 0, 0,248, 34, 43, 5, 0, 0, 0, 0, 40, 44, 43, 5, 0, 0, 0, 0,152, 44, 43, 5, 0, 0, 0, 0,200, 96, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,216, 28, 43, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 72, 29, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 32, 0, 0, 0, 72, 29, 43, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,184, 29, 43, 5, 0, 0, 0, 0,216, 28, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 4, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,184, 29, 43, 5, - 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 40, 30, 43, 5, 0, 0, 0, 0, 72, 29, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,126, 7, 5, 4, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 40, 30, 43, 5, 0, 0, 0, 0,212, 0, 0, 0, - 1, 0, 0, 0,152, 30, 43, 5, 0, 0, 0, 0,184, 29, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,152, 30, 43, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 8, 31, 43, 5, - 0, 0, 0, 0, 40, 30, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,234, 3, 1, 0, 0, 0, 68, 65, 84, 65, - 32, 0, 0, 0, 8, 31, 43, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,120, 31, 43, 5, 0, 0, 0, 0,152, 30, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7,234, 3, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,120, 31, 43, 5, - 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,232, 31, 43, 5, 0, 0, 0, 0, 8, 31, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 32, 6, 92, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,232, 31, 43, 5, 0, 0, 0, 0,212, 0, 0, 0, - 1, 0, 0, 0, 88, 32, 43, 5, 0, 0, 0, 0,120, 31, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 92, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 88, 32, 43, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,200, 32, 43, 5, - 0, 0, 0, 0,232, 31, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 6,234, 3, 1, 0, 0, 0, 68, 65, 84, 65, - 32, 0, 0, 0,200, 32, 43, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 56, 33, 43, 5, 0, 0, 0, 0, 88, 32, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140, 1, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 56, 33, 43, 5, - 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,168, 33, 43, 5, 0, 0, 0, 0,200, 32, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 32, 6,140, 1, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,168, 33, 43, 5, 0, 0, 0, 0,212, 0, 0, 0, - 1, 0, 0, 0, 24, 34, 43, 5, 0, 0, 0, 0, 56, 33, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 3,140, 1, - 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 24, 34, 43, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,136, 34, 43, 5, - 0, 0, 0, 0,168, 33, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 32, 0, 0, 0,136, 34, 43, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 34, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 6, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,248, 34, 43, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,104, 35, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 29, 43, 5, - 0, 0, 0, 0,184, 29, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,104, 35, 43, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,216, 35, 43, 5, 0, 0, 0, 0,248, 34, 43, 5, 0, 0, 0, 0, 72, 29, 43, 5, - 0, 0, 0, 0,152, 30, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,216, 35, 43, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 72, 36, 43, 5, 0, 0, 0, 0,104, 35, 43, 5, 0, 0, 0, 0,184, 29, 43, 5, - 0, 0, 0, 0, 8, 31, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 72, 36, 43, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,184, 36, 43, 5, 0, 0, 0, 0,216, 35, 43, 5, 0, 0, 0, 0,152, 30, 43, 5, - 0, 0, 0, 0, 8, 31, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,184, 36, 43, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 40, 37, 43, 5, 0, 0, 0, 0, 72, 36, 43, 5, 0, 0, 0, 0, 40, 30, 43, 5, - 0, 0, 0, 0,232, 31, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 40, 37, 43, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,152, 37, 43, 5, 0, 0, 0, 0,184, 36, 43, 5, 0, 0, 0, 0,120, 31, 43, 5, - 0, 0, 0, 0,232, 31, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,152, 37, 43, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 8, 38, 43, 5, 0, 0, 0, 0, 40, 37, 43, 5, 0, 0, 0, 0, 8, 31, 43, 5, - 0, 0, 0, 0, 88, 32, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 8, 38, 43, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,120, 38, 43, 5, 0, 0, 0, 0,152, 37, 43, 5, 0, 0, 0, 0,152, 30, 43, 5, - 0, 0, 0, 0, 88, 32, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,120, 38, 43, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,232, 38, 43, 5, 0, 0, 0, 0, 8, 38, 43, 5, 0, 0, 0, 0,120, 31, 43, 5, - 0, 0, 0, 0, 88, 32, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,232, 38, 43, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 88, 39, 43, 5, 0, 0, 0, 0,120, 38, 43, 5, 0, 0, 0, 0, 8, 31, 43, 5, - 0, 0, 0, 0,232, 31, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 88, 39, 43, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,200, 39, 43, 5, 0, 0, 0, 0,232, 38, 43, 5, 0, 0, 0, 0,152, 30, 43, 5, - 0, 0, 0, 0,200, 32, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,200, 39, 43, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 56, 40, 43, 5, 0, 0, 0, 0, 88, 39, 43, 5, 0, 0, 0, 0, 88, 32, 43, 5, - 0, 0, 0, 0, 56, 33, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 56, 40, 43, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,168, 40, 43, 5, 0, 0, 0, 0,200, 39, 43, 5, 0, 0, 0, 0,200, 32, 43, 5, - 0, 0, 0, 0, 56, 33, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,168, 40, 43, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 24, 41, 43, 5, 0, 0, 0, 0, 56, 40, 43, 5, 0, 0, 0, 0,200, 32, 43, 5, - 0, 0, 0, 0,168, 33, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 24, 41, 43, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,136, 41, 43, 5, 0, 0, 0, 0,168, 40, 43, 5, 0, 0, 0, 0, 56, 33, 43, 5, - 0, 0, 0, 0,168, 33, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,136, 41, 43, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,248, 41, 43, 5, 0, 0, 0, 0, 24, 41, 43, 5, 0, 0, 0, 0,216, 28, 43, 5, - 0, 0, 0, 0, 24, 34, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,248, 41, 43, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,104, 42, 43, 5, 0, 0, 0, 0,136, 41, 43, 5, 0, 0, 0, 0, 24, 34, 43, 5, - 0, 0, 0, 0,136, 34, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,104, 42, 43, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,216, 42, 43, 5, 0, 0, 0, 0,248, 41, 43, 5, 0, 0, 0, 0, 40, 30, 43, 5, - 0, 0, 0, 0,136, 34, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,216, 42, 43, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 72, 43, 43, 5, 0, 0, 0, 0,104, 42, 43, 5, 0, 0, 0, 0,120, 31, 43, 5, - 0, 0, 0, 0,136, 34, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 72, 43, 43, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,184, 43, 43, 5, 0, 0, 0, 0,216, 42, 43, 5, 0, 0, 0, 0,168, 33, 43, 5, - 0, 0, 0, 0, 24, 34, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,184, 43, 43, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 40, 44, 43, 5, 0, 0, 0, 0, 72, 43, 43, 5, 0, 0, 0, 0, 56, 33, 43, 5, - 0, 0, 0, 0,136, 34, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 40, 44, 43, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184, 43, 43, 5, 0, 0, 0, 0,216, 28, 43, 5, - 0, 0, 0, 0,200, 32, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,152, 44, 43, 5, - 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,104, 48, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152, 30, 43, 5, - 0, 0, 0, 0, 72, 29, 43, 5, 0, 0, 0, 0,184, 29, 43, 5, 0, 0, 0, 0, 8, 31, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,235, 3, 0, 0, 5, 4, 0, 0, 7, 7,127, 7, 27, 0, 1, 0, 0, 0, 0, 0, - 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120,135, 43, 5, 0, 0, 0, 0,120,135, 43, 5, 0, 0, 0, 0,136, 45, 43, 5, - 0, 0, 0, 0,248, 46, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,136, 45, 43, 5, 0, 0, 0, 0,216, 0, 0, 0, - 1, 0, 0, 0,248, 46, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,148, 68, 0, 0, 0, 0, - 0, 0,208, 65, 0, 0, 0, 0, 0,224,239, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0, 0, 0, 0, 0, - 25, 0, 0, 0, 0,192,239, 68, 0, 0,200, 65, 0,192,239, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, - 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,127, 7, 26, 0,127, 7, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,235, 3, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,127, 7, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,248, 46, 43, 5, 0, 0, 0, 0,216, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136, 45, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0,240,109, 69, 0, 0,128,192, - 0, 0, 0, 0, 0, 0, 0, 0,255,255,109, 69, 0, 0, 0,192, 0, 0, 0, 0,112, 7, 0, 0,129, 7, 0, 0, 18, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0, 18, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 2, 0, 0, 0, - 1, 0, 3, 3, 2, 0, 0, 4, 10, 0,129, 7, 2, 0,112, 7, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 4, 0, 0, 5, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, +216,159,214, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,248,224,214, 3, 0, 0, 0, 0,184,158,214, 3, 0, 0, 0, 0, +168, 24,201, 3, 0, 0, 0, 0,232, 25,201, 3, 0, 0, 0, 0, 8, 24,201, 3, 0, 0, 0, 0, 72, 25,201, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 33, 6, 0, 0,126, 7, 0, 0, 93, 0, 0, 0,233, 3, 0, 0, 4, 4, 94, 1,141, 3, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,125,199, 3, 0, 0, 0, 0, 56,125,199, 3, 0, 0, 0, 0, +232,111,214, 3, 0, 0, 0, 0, 40,161,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,232,111,214, 3, 0, 0, 0, 0, +215, 0, 0, 0, 1, 0, 0, 0, 40,161,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,148, 67, + 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,175, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 1, 0, 0, + 0, 0, 0, 0, 25, 0, 0, 0, 0,128,174, 67, 0, 0,200, 65, 0,128,174, 67, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 94, 1, 26, 0, 94, 1, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 33, 6, 0, 0,126, 7, 0, 0,208, 3, 0, 0,233, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 94, 1, 26, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 40,161,214, 3, 0, 0, 0, 0, +215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,111,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,174, 67, + 0,128, 92,196, 0, 0, 0, 0, 0, 0, 0, 0,255,127,166, 67,255,191, 92,196, 0, 0, 0, 0, 77, 1, 0, 0, 94, 1, 0, 0, + 0, 0, 0, 0,114, 3, 0, 0, 0, 0, 0, 0, 82, 1, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 76, 1, 0, 0, + 0, 0, 0, 0,114, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, + 10, 3, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0, 94, 1,115, 3, 77, 1,115, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 33, 6, 0, 0,126, 7, 0, 0, 93, 0, 0, 0,207, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 94, 1,115, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +120, 77,214, 3, 0, 0, 0, 0, 8,210,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,120, 77,214, 3, 0, 0, 0, 0, +213, 0, 0, 0, 1, 0, 0, 0, 88, 79,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 83, 95, 80, 84, 95, 99,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 83, 95, 80, 84, 95, 99,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 67,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,220,255, 76, 1, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 88, 1, 0, 0, 88, 79,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 40,193,214, 3, 0, 0, 0, 0, +120, 77,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, + 84, 95,114,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, + 84, 95,114,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82,101,110,100,101,114, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,135,255, 76, 1, 61, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,104, 48, 43, 5, 0, 0, 0, 0,215, 0, 0, 0, - 1, 0, 0, 0, 88, 53, 43, 5, 0, 0, 0, 0,152, 44, 43, 5, 0, 0, 0, 0,136, 34, 43, 5, 0, 0, 0, 0,120, 31, 43, 5, - 0, 0, 0, 0,232, 31, 43, 5, 0, 0, 0, 0, 40, 30, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 6, 0, 0, -126, 7, 0, 0, 0, 0, 0, 0, 91, 0, 0, 0, 15, 15, 94, 1, 92, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 56, 52, 43, 5, 0, 0, 0, 0, 56, 52, 43, 5, 0, 0, 0, 0, 88, 49, 43, 5, 0, 0, 0, 0,200, 50, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 88, 49, 43, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0,200, 50, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,115, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, - 0, 0,175, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,174, 67, - 0, 0,200, 65, 0,128,174, 67, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, - 10, 0, 94, 1, 26, 0, 94, 1, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 6, 0, 0, -126, 7, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, 1, 26, 0, - 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 40,193,214, 3, 0, 0, 0, 0, +213, 0, 0, 0, 1, 0, 0, 0, 8,195,214, 3, 0, 0, 0, 0, 88, 79,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,200, 50, 43, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 88, 49, 43, 5, 0, 0, 0, 0, 0, 0, 64,192, 0, 0,126, 67, 0, 0, 0, 0, 0, 0, 72, 66, 50, 51, 74,193, -154,209,131, 67, 0, 0, 0, 0, 0, 0, 72, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 93, 1, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 93, 1, 0, 0, 18, 0, 0, 0, 65, 0, 0, 0, 0, 0,128, 63, - 0, 0, 72, 66, 0,124,146, 72, 0, 0, 72, 66,205,204,204, 61, 0, 0, 32, 65, 72, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, 4, - 8, 0, 94, 1, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 6, 0, 0, -126, 7, 0, 0, 26, 0, 0, 0, 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, 1, 66, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 76, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,111,255, 76, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65,208, 0, 0, 0, 56, 52, 43, 5, 0, 0, 0, 0,191, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 88, 1, 0, 0, 8,195,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,232,196,214, 3, 0, 0, 0, 0, + 40,193,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, + 84, 95,100,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, + 84, 95,100,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68,105,109,101,110,115,105,111, +110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140,254, 76, 1,203, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,232,196,214, 3, 0, 0, 0, 0, +213, 0, 0, 0, 1, 0, 0, 0,200,198,214, 3, 0, 0, 0, 0, 8,195,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 97,110,116,105, 97,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 97,110,116,105, 97,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, 88, 53, 43, 5, 0, 0, 0, 0,215, 0, 0, 0, - 1, 0, 0, 0,232, 77, 43, 5, 0, 0, 0, 0,104, 48, 43, 5, 0, 0, 0, 0,120, 31, 43, 5, 0, 0, 0, 0, 88, 32, 43, 5, - 0, 0, 0, 0, 8, 31, 43, 5, 0, 0, 0, 0,232, 31, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 6, 0, 0, -126, 7, 0, 0, 93, 0, 0, 0,233, 3, 0, 0, 4, 4, 94, 1,141, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,168, 76, 43, 5, 0, 0, 0, 0,168, 76, 43, 5, 0, 0, 0, 0, 72, 54, 43, 5, 0, 0, 0, 0,184, 55, 43, 5, + 0, 0, 0, 0, 0, 0, 0, 0, 65,110,116,105, 45, 65,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 72, 54, 43, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0,184, 55, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,148, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, - 0, 0,175, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,174, 67, - 0, 0,200, 65, 0,128,174, 67, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, - 10, 0, 94, 1, 26, 0, 94, 1, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 6, 0, 0, -126, 7, 0, 0,208, 3, 0, 0,233, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, 1, 26, 0, - 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58,254, 76, 1, 58, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,184, 55, 43, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 72, 54, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,174, 67, 0,128, 92,196, 0, 0, 0, 0, 0, 0, 0, 0, -255,127,166, 67,255,191, 92,196, 0, 0, 0, 0, 77, 1, 0, 0, 94, 1, 0, 0, 0, 0, 0, 0,114, 3, 0, 0, 0, 0, 0, 0, - 82, 1, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 76, 1, 0, 0, 0, 0, 0, 0,114, 3, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 3, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, - 6, 0, 94, 1,115, 3, 77, 1,115, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 6, 0, 0, -126, 7, 0, 0, 93, 0, 0, 0,207, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, 1,115, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 57, 43, 5, 0, 0, 0, 0, 8, 75, 43, 5, + 68, 65, 84, 65, 88, 1, 0, 0,200,198,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,168,200,214, 3, 0, 0, 0, 0, +232,196,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, + 84, 95,109,111,116,105,111,110, 95, 98,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, + 84, 95,109,111,116,105,111,110, 95, 98,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 97,109,112,108,101,100, 32, + 77,111,116,105,111,110, 32, 66,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,254, 76, 1, 0, 0, + 20, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 40, 57, 43, 5, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,200, 58, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, - 79, 78, 83, 95, 80, 84, 95, 99,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, - 79, 78, 83, 95, 80, 84, 95, 99,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67,111,110,116, -101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,220,255, - 76, 1, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,168,200,214, 3, 0, 0, 0, 0, +213, 0, 0, 0, 1, 0, 0, 0,136,202,214, 3, 0, 0, 0, 0,200,198,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,200, 58, 43, 5, - 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,104, 60, 43, 5, 0, 0, 0, 0, 40, 57, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,114,101,110,100,101,114, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,114,101,110,100,101,114, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 83,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10,254, 76, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,135,255, 76, 1, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,104, 60, 43, 5, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 8, 62, 43, 5, - 0, 0, 0, 0,200, 58, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, - 69, 82, 95, 80, 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, - 69, 82, 95, 80, 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 97,121,101, -114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,111,255, - 76, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 88, 1, 0, 0,136,202,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,104,204,214, 3, 0, 0, 0, 0, +168,200,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, + 84, 95,112,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, + 84, 95,112,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,101,114,102,111,114,109, 97, +110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,242,253, 76, 1, 0, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 8, 62, 43, 5, - 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,168, 63, 43, 5, 0, 0, 0, 0,104, 60, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,100,105,109,101,110,115,105,111,110,115, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,104,204,214, 3, 0, 0, 0, 0, +213, 0, 0, 0, 1, 0, 0, 0, 72,206,214, 3, 0, 0, 0, 0,136,202,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,111,115,116, 95,112,114,111, 99,101,115,115,105,110, +103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,111,115,116, 95,112,114,111, 99,101,115,115,105,110, +103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 80,111,115,116, 32, 80,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,100,105,109,101,110,115,105,111,110,115, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,218,253, 76, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140,254, 76, 1,203, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 88, 1, 0, 0, 72,206,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 40,208,214, 3, 0, 0, 0, 0, +104,204,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, + 84, 95,115,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, + 84, 95,115,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,168, 63, 43, 5, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 72, 65, 43, 5, - 0, 0, 0, 0, 8, 62, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, - 69, 82, 95, 80, 84, 95, 97,110,116,105, 97,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, - 69, 82, 95, 80, 84, 95, 97,110,116,105, 97,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65,110,116,105, - 45, 65,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58,254, - 76, 1, 58, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,194,253, 76, 1, 0, 0, + 20, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 72, 65, 43, 5, - 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,232, 66, 43, 5, 0, 0, 0, 0,168, 63, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,109,111,116,105,111,110, 95, 98,108,117, -114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,109,111,116,105,111,110, 95, 98,108,117, -114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 97,109,112,108,101,100, 32, 77,111,116,105,111,110, 32, 66,108,117,114, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 40,208,214, 3, 0, 0, 0, 0, +213, 0, 0, 0, 1, 0, 0, 0, 8,210,214, 3, 0, 0, 0, 0, 72,206,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,111,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,254, 76, 1, 0, 0, 20, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, - 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,111,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 79,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,232, 66, 43, 5, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,136, 68, 43, 5, - 0, 0, 0, 0, 72, 65, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, - 69, 82, 95, 80, 84, 95,115,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, - 69, 82, 95, 80, 84, 95,115,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,104, 97,100, -105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10,254, - 76, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,253, 76, 1,130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,136, 68, 43, 5, - 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 40, 70, 43, 5, 0, 0, 0, 0,232, 66, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,101,114,102,111,114,109, 97,110, 99, -101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,101,114,102,111,114,109, 97,110, 99, -101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,242,253, 76, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, - 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 88, 1, 0, 0, 8,210,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 40,208,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, + 84, 95, 98, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, + 84, 95, 98, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16,253, 76, 1, 0, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 40, 70, 43, 5, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,200, 71, 43, 5, - 0, 0, 0, 0,136, 68, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, - 69, 82, 95, 80, 84, 95,112,111,115,116, 95,112,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, - 69, 82, 95, 80, 84, 95,112,111,115,116, 95,112,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,111,115,116, - 32, 80,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,218,253, - 76, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,248, 0, 0, 0, 56,125,199, 3, 0, 0, 0, 0, +179, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,200, 71, 43, 5, - 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,104, 73, 43, 5, 0, 0, 0, 0, 40, 70, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,194,253, 76, 1, 0, 0, 20, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, - 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,255, 21, 0, 0,160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65,160, 0, 0, 0,248,224,214, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 8,230,214, 3, 0, 0, 0, 0, +216,159,214, 3, 0, 0, 0, 0,104, 28,201, 3, 0, 0, 0, 0,200, 27,201, 3, 0, 0, 0, 0, 40, 27,201, 3, 0, 0, 0, 0, + 8, 29,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 3, 0, 0, 31, 6, 0, 0, 0, 0, 0, 0,139, 1, 0, 0, + 1, 1, 27, 3,140, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,211,214, 3, 0, 0, 0, 0, +232,211,214, 3, 0, 0, 0, 0,216,162,214, 3, 0, 0, 0, 0,152,169,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, +216,162,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,136,164,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 64,113, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,192, 70, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 26, 3, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128, 70, 68, 0, 0,200, 65, 0,128, 70, 68, 0, 0,200, 65, + 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 27, 3, 26, 0, 27, 3, 26, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 3, 0, 0, 31, 6, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 3, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,104, 73, 43, 5, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 8, 75, 43, 5, - 0, 0, 0, 0,200, 71, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, - 69, 82, 95, 80, 84, 95,111,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, - 69, 82, 95, 80, 84, 95,111,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79,117,116,112, -117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,253, - 76, 1,130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, +136,164,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 56,166,214, 3, 0, 0, 0, 0,216,162,214, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 15, 67, 0, 64, 70,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67,255,127, 70,196, 0, 0, 0, 0, +143, 0, 0, 0,160, 0, 0, 0, 18, 0, 0, 0, 43, 3, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, + 0, 0, 0, 0,142, 0, 0, 0, 18, 0, 0, 0, 43, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,160, 0, 44, 3,143, 0, 26, 3, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 3, 0, 0, 5, 3, 0, 0, 26, 0, 0, 0,139, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,114, 1, 0, 0, 5, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 8, 75, 43, 5, - 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,104, 73, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 98, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 98, 97,107,101, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, + 56,166,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,232,167,214, 3, 0, 0, 0, 0,136,164,214, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 16, 67, 0, 0,206,194, 0, 0, 0, 0, 0, 0, 0, 0,231,102, 16, 67, 0, 0,206,194, 0, 0, 0, 0, +143, 0, 0, 0,160, 0, 0, 0, 18, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, + 0, 0, 0, 0,142, 0, 0, 0, 18, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,160, 0,120, 0,143, 0,102, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 3, 0, 0, 31, 6, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 6, 0, 34, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16,253, 76, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, - 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, +232,167,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,152,169,214, 3, 0, 0, 0, 0, 56,166,214, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 35, 67, 0,192,108,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 67, 0, 0,184,195, 0, 0, 0, 0, +163, 0, 0, 0,180, 0, 0, 0, 18, 0, 0, 0,129, 1, 0, 0, 0, 0, 0, 0,162, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, + 0, 0, 0, 0,162, 0, 0, 0, 18, 0, 0, 0,129, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,180, 0,130, 1,163, 0,112, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 6, 0, 0, 31, 6, 0, 0, 26, 0, 0, 0,139, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65,248, 0, 0, 0,168, 76, 43, 5, 0, 0, 0, 0,180, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, +152,169,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,167,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 3, 0, 0, 31, 6, 0, 0, 26, 0, 0, 0,139, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 3,114, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, 21, 0, 0, -160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,232, 77, 43, 5, - 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,120, 91, 43, 5, 0, 0, 0, 0, 88, 53, 43, 5, 0, 0, 0, 0, 24, 34, 43, 5, - 0, 0, 0, 0,168, 33, 43, 5, 0, 0, 0, 0, 56, 33, 43, 5, 0, 0, 0, 0,136, 34, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 5, 3, 0, 0, 31, 6, 0, 0, 0, 0, 0, 0,139, 1, 0, 0, 1, 1, 27, 3,140, 1, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200, 89, 43, 5, 0, 0, 0, 0,200, 89, 43, 5, 0, 0, 0, 0,216, 78, 43, 5, - 0, 0, 0, 0,152, 84, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,216, 78, 43, 5, 0, 0, 0, 0,216, 0, 0, 0, - 1, 0, 0, 0, 72, 80, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64,113, 68, 0, 0, 0, 0, - 0, 0,208, 65, 0, 0, 0, 0, 0,192, 70, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 3, 0, 0, 0, 0, 0, 0, - 25, 0, 0, 0, 0,128, 70, 68, 0, 0,200, 65, 0,128, 70, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, - 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 27, 3, 26, 0, 27, 3, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 5, 3, 0, 0, 31, 6, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 27, 3, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24,226,214, 3, 0, 0, 0, 0, 68, 65, 84, 65,112, 3, 0, 0, + 24,226,214, 3, 0, 0, 0, 0,173, 0, 0, 0, 1, 0, 0, 0, 93,101,230, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 30,133,119, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,154, 65,128,191, 0, 0,128,191, + 0, 0, 0, 0, 0, 0, 0, 0, 72, 1, 77,190, 0, 0, 0, 0,221,149, 47, 63, 85,126,162,190, 8,165, 39, 63, 0, 0, 0, 0, + 51, 70, 58, 63,225,251,159, 62,149, 84, 28,191, 0, 0, 0, 0,191, 56, 49,188, 54, 53,101, 63, 50,247,227, 62, 0, 0, 0, 0, + 90, 38,173,190,254,221,192,190,152, 9, 52,193, 0, 0,128, 63,223,149, 47, 63, 55, 70, 58, 63,192, 56, 49,188, 0, 0, 0, 0, + 87,126,162,190,228,251,159, 62, 56, 53,101, 63, 0, 0, 0, 0, 7,165, 39, 63,150, 84, 28,191, 50,247,227, 62, 0, 0, 0, 0, +110,101,239, 64,151, 62,208,192, 77,255,170, 64, 0, 0,128, 63, 42, 6,158, 63, 99, 28,157,191,244,250, 39,191, 8,165, 39,191, +211,164,167, 63, 55,175,154, 63,180,164, 28, 63,149, 84, 28, 63, 39,127,159,188,135,157, 93, 64, 8,108,228,190, 50,247,227,190, + 4,213, 27,191,122,122,186,191,216, 49, 49, 65,152, 9, 52, 65, 25, 25,195, 62,176,249,206, 62,128,238,196,187, 0, 0,192,179, + 55, 15,168,189,201,118,165, 61,152, 15,109, 62, 0, 0,152, 51,211,120, 21,194,144, 5, 2, 66, 6,136,213,193,193,214,159,192, +219, 38, 19, 66,196,173,255,193,154,101,210, 65,173, 40,160, 64,221,149, 47, 63, 85,126,162,190, 8,165, 39, 63, 0, 0, 0, 0, + 51, 70, 58, 63,225,251,159, 62,149, 84, 28,191, 0, 0, 0, 0,191, 56, 49,188, 54, 53,101, 63, 50,247,227, 62, 0, 0, 0, 0, + 90, 38,173,190,254,221,192,190,152, 9, 52,193, 0, 0,128, 63, 42, 6,158, 63, 99, 28,157,191,244,250, 39,191, 8,165, 39,191, +211,164,167, 63, 55,175,154, 63,180,164, 28, 63,149, 84, 28, 63, 39,127,159,188,135,157, 93, 64, 8,108,228,190, 50,247,227,190, + 4,213, 27,191,122,122,186,191,216, 49, 49, 65,152, 9, 52, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 72, 80, 43, 5, 0, 0, 0, 0,216, 0, 0, 0, - 1, 0, 0, 0,184, 81, 43, 5, 0, 0, 0, 0,216, 78, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67, 0, 64, 70,196, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67,255,127, 70,196, 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, 18, 0, 0, 0, - 43, 3, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 18, 0, 0, 0, - 43, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, - 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,160, 0, 44, 3,143, 0, 26, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 5, 3, 0, 0, 5, 3, 0, 0, 26, 0, 0, 0,139, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0,114, 1, 0, 0, 5, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,184, 81, 43, 5, 0, 0, 0, 0,216, 0, 0, 0, - 1, 0, 0, 0, 40, 83, 43, 5, 0, 0, 0, 0, 72, 80, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 67, 0, 0,206,194, - 0, 0, 0, 0, 0, 0, 0, 0,231,102, 16, 67, 0, 0,206,194, 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, 18, 0, 0, 0, -119, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 18, 0, 0, 0, -119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, - 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,160, 0,120, 0,143, 0,102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 5, 3, 0, 0, 31, 6, 0, 0, 26, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 6, 0, 34, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 40, 83, 43, 5, 0, 0, 0, 0,216, 0, 0, 0, - 1, 0, 0, 0,152, 84, 43, 5, 0, 0, 0, 0,184, 81, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 67, 0,192,108,196, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 67, 0, 0,184,195, 0, 0, 0, 0,163, 0, 0, 0,180, 0, 0, 0, 18, 0, 0, 0, -129, 1, 0, 0, 0, 0, 0, 0,162, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,162, 0, 0, 0, 18, 0, 0, 0, -129, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, - 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,180, 0,130, 1,163, 0,112, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 31, 6, 0, 0, 31, 6, 0, 0, 26, 0, 0, 0,139, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,152, 84, 43, 5, 0, 0, 0, 0,216, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 83, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62,250,150, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 62,250,150, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62,250,150, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,241, 22, 72, 63, 78,162,246,190, 44, 8, 90,190, 3, 35,171,190, +214,211,111, 65,214,211,111, 65, 0, 0, 0, 0, 0, 0, 0, 0, 80, 49,183, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,160, 65, 1, 2, 0, 0,255,255, 0, 0, 92, 62, 55, 63, 56,186,224,190,237,203,148,190, 3,236,234,190, 1, 0, 0, 0, + 0, 0,128, 63,190,133, 65, 66,100,212, 90, 66, 31,183,118, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 96, 1, 0, 0,232,211,214, 3, 0, 0, 0, 0,174, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 51, 51, 51, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 32, 65,205,204, 76, 62, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, 0,200,213,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 3, 0, 8, 8,128, 0, 0, 0, 12, 66, + 0, 0,128, 63,205,204,204, 61, 0, 0,250, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 16, 0, 10, 0, 7, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 5, 3, 0, 0, 31, 6, 0, 0, 26, 0, 0, 0,139, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 27, 3,114, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, + 8,230,214, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 40,231,214, 3, 0, 0, 0, 0,248,224,214, 3, 0, 0, 0, 0, +136, 26,201, 3, 0, 0, 0, 0,104, 23,201, 3, 0, 0, 0, 0,232, 25,201, 3, 0, 0, 0, 0, 40, 27,201, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 6, 0, 0,141, 1, 0, 0,233, 3, 0, 0, 16, 16, 32, 6, 93, 2, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168,174,214, 3, 0, 0, 0, 0,168,174,214, 3, 0, 0, 0, 0, + 72,171,214, 3, 0, 0, 0, 0,248,172,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 72,171,214, 3, 0, 0, 0, 0, +215, 0, 0, 0, 1, 0, 0, 0,248,172,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 66, 68, + 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,196, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 6, 0, 0, + 0, 0, 0, 0, 25, 0, 0, 0, 0,224,195, 68, 0, 0,200, 65, 0,224,195, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 32, 6, 26, 0, 32, 6, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 6, 0, 0,141, 1, 0, 0,166, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 32, 6, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,248,172,214, 3, 0, 0, 0, 0, +215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,171,214, 3, 0, 0, 0, 0, 0, 0, 32,193, 0, 0, 0, 68, + 0, 0, 32,193, 0, 0, 0, 68,128,195,217,195,192,225,108, 68, 96,240,187, 64, 62, 16,253, 67, 15, 6, 0, 0, 32, 6, 0, 0, + 18, 0, 0, 0, 66, 2, 0, 0, 0, 0, 0, 0, 14, 6, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 14, 6, 0, 0, + 18, 0, 0, 0, 66, 2, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,250, 70, 0, 0,250, 70,236, 81,184, 61, 10,215, 19, 64, + 10, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 4, 0, 0, 32, 6, 67, 2, 15, 6, 49, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 6, 0, 0,167, 1, 0, 0,233, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 32, 6, 67, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 1, 0, 0,168,174,214, 3, 0, 0, 0, 0, +191, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 8, 86, 43, 5, 0, 0, 0, 0, 68, 65, 84, 65,120, 3, 0, 0, 8, 86, 43, 5, 0, 0, 0, 0,174, 0, 0, 0, - 1, 0, 0, 0, 93,101,230, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30,133,119, 64, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,154, 65,128,191, 0, 0,128,191, 0, 0, 0, 0, 0, 0, 0, 0, 72, 1, 77,190, - 0, 0, 0, 0,221,149, 47, 63, 85,126,162,190, 8,165, 39, 63, 0, 0, 0, 0, 51, 70, 58, 63,225,251,159, 62,149, 84, 28,191, - 0, 0, 0, 0,191, 56, 49,188, 54, 53,101, 63, 50,247,227, 62, 0, 0, 0, 0, 90, 38,173,190,254,221,192,190,152, 9, 52,193, - 0, 0,128, 63,223,149, 47, 63, 55, 70, 58, 63,192, 56, 49,188, 0, 0, 0, 0, 87,126,162,190,228,251,159, 62, 56, 53,101, 63, - 0, 0, 0, 0, 7,165, 39, 63,150, 84, 28,191, 50,247,227, 62, 0, 0, 0, 0,110,101,239, 64,151, 62,208,192, 77,255,170, 64, - 0, 0,128, 63, 42, 6,158, 63, 99, 28,157,191,244,250, 39,191, 8,165, 39,191,211,164,167, 63, 55,175,154, 63,180,164, 28, 63, -149, 84, 28, 63, 39,127,159,188,135,157, 93, 64, 8,108,228,190, 50,247,227,190, 4,213, 27,191,122,122,186,191,216, 49, 49, 65, -152, 9, 52, 65, 25, 25,195, 62,176,249,206, 62,128,238,196,187, 0, 0,192,179, 55, 15,168,189,201,118,165, 61,152, 15,109, 62, - 0, 0,152, 51,211,120, 21,194,144, 5, 2, 66, 6,136,213,193,193,214,159,192,219, 38, 19, 66,196,173,255,193,154,101,210, 65, -173, 40,160, 64,221,149, 47, 63, 85,126,162,190, 8,165, 39, 63, 0, 0, 0, 0, 51, 70, 58, 63,225,251,159, 62,149, 84, 28,191, - 0, 0, 0, 0,191, 56, 49,188, 54, 53,101, 63, 50,247,227, 62, 0, 0, 0, 0, 90, 38,173,190,254,221,192,190,152, 9, 52,193, - 0, 0,128, 63, 42, 6,158, 63, 99, 28,157,191,244,250, 39,191, 8,165, 39,191,211,164,167, 63, 55,175,154, 63,180,164, 28, 63, -149, 84, 28, 63, 39,127,159,188,135,157, 93, 64, 8,108,228,190, 50,247,227,190, 4,213, 27,191,122,122,186,191,216, 49, 49, 65, -152, 9, 52, 65, 62,250,150, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62,250,150, 63, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62,250,150, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,128, 63,241, 22, 72, 63, 78,162,246,190, 44, 8, 90,190, 3, 35,171,190,214,211,111, 65,214,211,111, 65, 0, 0, 0, 0, - 0, 0, 0, 0, 80, 49,183, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0,255,255, 1, 0, 0, 0, 0, 0, 0, 0, - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 10,215, 19, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 10,206, 97, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, + 40,231,214, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,230,214, 3, 0, 0, 0, 0, +232, 20,201, 3, 0, 0, 0, 0,136, 26,201, 3, 0, 0, 0, 0,200, 27,201, 3, 0, 0, 0, 0,104, 28,201, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0,139, 1, 0, 0, 6, 6, 4, 3,140, 1, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,232,214, 3, 0, 0, 0, 0, 72,232,214, 3, 0, 0, 0, 0, + 88,176,214, 3, 0, 0, 0, 0,184,179,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 88,176,214, 3, 0, 0, 0, 0, +215, 0, 0, 0, 1, 0, 0, 0, 8,178,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,215, 67, + 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 65, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, + 0, 0, 0, 0, 25, 0, 0, 0, 0,192, 64, 68, 0, 0,200, 65, 0,192, 64, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 4, 3, 26, 0, 4, 3, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 4, 3, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 8,178,214, 3, 0, 0, 0, 0, +215, 0, 0, 0, 1, 0, 0, 0,184,179,214, 3, 0, 0, 0, 0, 88,176,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 92, 62, 55, 63, 56,186,224,190,237,203,148,190, 3,236,234,190, 1, 0, 0, 0, 0, 0,128, 63,190,133, 65, 66, -100,212, 90, 66, 31,183,118, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 96, 1, 0, 0,200, 89, 43, 5, 0, 0, 0, 0,175, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 51, 51, 51, 63, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65, -205,204, 76, 62, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, 0,216,191, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0,139, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,184,179,214, 3, 0, 0, 0, 0, +215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,178,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 67, + 0, 0, 0, 0, 0, 0,128, 67, 0, 0,129,191, 0,128, 0, 64, 0, 0,100,190, 0,128,156, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 3, 0, 0, + 0, 0, 0, 0,114, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 3, 0, 8, 8,128, 0, 0, 0, 12, 66, 0, 0,128, 63, -205,204,204, 61, 0, 0,250, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 16, 0, 10, 0, 7, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 26, 0, 0, 0,139, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 4, 3,114, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,120, 91, 43, 5, - 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,200, 96, 43, 5, 0, 0, 0, 0,232, 77, 43, 5, 0, 0, 0, 0,200, 32, 43, 5, - 0, 0, 0, 0,152, 30, 43, 5, 0, 0, 0, 0, 88, 32, 43, 5, 0, 0, 0, 0, 56, 33, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 31, 6, 0, 0,141, 1, 0, 0,233, 3, 0, 0, 16, 16, 32, 6, 93, 2, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 95, 43, 5, 0, 0, 0, 0, 72, 95, 43, 5, 0, 0, 0, 0,104, 92, 43, 5, - 0, 0, 0, 0,216, 93, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,104, 92, 43, 5, 0, 0, 0, 0,216, 0, 0, 0, - 1, 0, 0, 0,216, 93, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 66, 68, 0, 0, 0, 0, - 0, 0,208, 65, 0, 0, 0, 0, 0, 0,196, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 6, 0, 0, 0, 0, 0, 0, - 25, 0, 0, 0, 0,224,195, 68, 0, 0,200, 65, 0,224,195, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, - 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 32, 6, 26, 0, 32, 6, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 31, 6, 0, 0,141, 1, 0, 0,166, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 32, 6, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,216, 93, 43, 5, 0, 0, 0, 0,216, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,104, 92, 43, 5, 0, 0, 0, 0, 0, 0, 32,193, 0, 0, 0, 68, 0, 0, 32,193, - 0, 0, 0, 68,128,195,217,195,192,225,108, 68, 96,240,187, 64, 62, 16,253, 67, 15, 6, 0, 0, 32, 6, 0, 0, 18, 0, 0, 0, - 66, 2, 0, 0, 0, 0, 0, 0, 14, 6, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 14, 6, 0, 0, 18, 0, 0, 0, - 66, 2, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,250, 70, 0, 0,250, 70,236, 81,184, 61, 10,215, 19, 64, 10, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 0, 4, 0, 0, 32, 6, 67, 2, 15, 6, 49, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 31, 6, 0, 0,167, 1, 0, 0,233, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 32, 6, 67, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 1, 0, 0, 72, 95, 43, 5, 0, 0, 0, 0,192, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 33, 0, 0, 72,232,214, 3, 0, 0, 0, 0, +184, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 65, 0, 0, 0, 0,154,153,153, 62, + 0, 0, 0, 0,100, 0, 0, 0,154,153,153, 62,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 10,215, 19, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 10,206, 97, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,200, 96, 43, 5, - 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120, 91, 43, 5, 0, 0, 0, 0,216, 28, 43, 5, - 0, 0, 0, 0,200, 32, 43, 5, 0, 0, 0, 0,168, 33, 43, 5, 0, 0, 0, 0, 24, 34, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0,139, 1, 0, 0, 6, 6, 4, 3,140, 1, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,102, 43, 5, 0, 0, 0, 0, 8,102, 43, 5, 0, 0, 0, 0,184, 97, 43, 5, - 0, 0, 0, 0,152,100, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,184, 97, 43, 5, 0, 0, 0, 0,216, 0, 0, 0, - 1, 0, 0, 0, 40, 99, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,215, 67, 0, 0, 0, 0, - 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 65, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, - 25, 0, 0, 0, 0,192, 64, 68, 0, 0,200, 65, 0,192, 64, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, - 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 4, 3, 26, 0, 4, 3, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 4, 3, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 40, 99, 43, 5, 0, 0, 0, 0,216, 0, 0, 0, - 1, 0, 0, 0,152,100, 43, 5, 0, 0, 0, 0,184, 97, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0,139, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,152,100, 43, 5, 0, 0, 0, 0,216, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 99, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, - 0, 0,128, 67, 0, 0,129,191, 0,128, 0, 64, 0, 0,100,190, 0,128,156, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 3, 0, 0, 0, 0, 0, 0, -114, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 26, 0, 0, 0,139, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 4, 3,114, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 33, 0, 0, 8,102, 43, 5, 0, 0, 0, 0,185, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 65, 0, 0, 0, 0,154,153,153, 62, 0, 0, 0, 0, -100, 0, 0, 0,154,153,153, 62,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1297,6 +1309,7 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1310,7 +1323,6 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1427,2441 +1439,2471 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,100, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 83, 78, 0, 0, 8, 1, 0, 0,248, 9,215, 3, 0, 0, 0, 0, +210, 0, 0, 0, 1, 0, 0, 0,152, 66,216, 3, 0, 0, 0, 0, 8,156,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 83, 82, 68,101,102, 97,117,108,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +168, 29,201, 3, 0, 0, 0, 0,136, 36,201, 3, 0, 0, 0, 0,200,123,171, 3, 0, 0, 0, 0,120,135,171, 3, 0, 0, 0, 0, +184, 11,215, 3, 0, 0, 0, 0, 56, 16,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48,102, 10, 64, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,168, 29,201, 3, 0, 0, 0, 0, +211, 0, 0, 0, 1, 0, 0, 0, 72, 30,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 72, 30,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, +232, 30,201, 3, 0, 0, 0, 0,168, 29,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,178, 2, 0, 0, 0, 0, + 68, 65, 84, 65, 32, 0, 0, 0,232, 30,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,136, 31,201, 3, 0, 0, 0, 0, + 72, 30,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 70, 5,178, 2, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, +136, 31,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 40, 32,201, 3, 0, 0, 0, 0,232, 30,201, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 70, 5, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 40, 32,201, 3, 0, 0, 0, 0, +211, 0, 0, 0, 1, 0, 0, 0,200, 32,201, 3, 0, 0, 0, 0,136, 31,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,151, 2, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,200, 32,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, +104, 33,201, 3, 0, 0, 0, 0, 40, 32,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 70, 5,151, 2, 1, 0, 0, 0, + 68, 65, 84, 65, 32, 0, 0, 0,104, 33,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 8, 34,201, 3, 0, 0, 0, 0, +200, 32,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,112, 4, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, + 8, 34,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,168, 34,201, 3, 0, 0, 0, 0,104, 33,201, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,112, 4,151, 2, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,168, 34,201, 3, 0, 0, 0, 0, +211, 0, 0, 0, 1, 0, 0, 0, 72, 35,201, 3, 0, 0, 0, 0, 8, 34,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +112, 4, 56, 2, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 72, 35,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, +232, 35,201, 3, 0, 0, 0, 0,168, 34,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 70, 5, 56, 2, 0, 0, 0, 0, + 68, 65, 84, 65, 32, 0, 0, 0,232, 35,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,136, 36,201, 3, 0, 0, 0, 0, + 72, 35,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, +136, 36,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232, 35,201, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,112, 4, 84, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,200,123,171, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0,120,124,171, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 30,201, 3, 0, 0, 0, 0, +232, 30,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,120,124,171, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0, 40,125,171, 3, 0, 0, 0, 0,200,123,171, 3, 0, 0, 0, 0, 72, 30,201, 3, 0, 0, 0, 0, + 40, 32,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 40,125,171, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0,216,125,171, 3, 0, 0, 0, 0,120,124,171, 3, 0, 0, 0, 0,232, 30,201, 3, 0, 0, 0, 0, +200, 32,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,216,125,171, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0,136,126,171, 3, 0, 0, 0, 0, 40,125,171, 3, 0, 0, 0, 0, 40, 32,201, 3, 0, 0, 0, 0, +200, 32,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,136,126,171, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0, 56,127,171, 3, 0, 0, 0, 0,216,125,171, 3, 0, 0, 0, 0,168, 29,201, 3, 0, 0, 0, 0, +104, 33,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 56,127,171, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0,232,127,171, 3, 0, 0, 0, 0,136,126,171, 3, 0, 0, 0, 0,136, 31,201, 3, 0, 0, 0, 0, +104, 33,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,232,127,171, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0,152,128,171, 3, 0, 0, 0, 0, 56,127,171, 3, 0, 0, 0, 0, 40, 32,201, 3, 0, 0, 0, 0, + 8, 34,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,152,128,171, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0, 72,129,171, 3, 0, 0, 0, 0,232,127,171, 3, 0, 0, 0, 0,200, 32,201, 3, 0, 0, 0, 0, + 8, 34,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 72,129,171, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0,248,129,171, 3, 0, 0, 0, 0,152,128,171, 3, 0, 0, 0, 0,104, 33,201, 3, 0, 0, 0, 0, +168, 34,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,248,129,171, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0,168,130,171, 3, 0, 0, 0, 0, 72,129,171, 3, 0, 0, 0, 0, 8, 34,201, 3, 0, 0, 0, 0, +168, 34,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,168,130,171, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0, 88,131,171, 3, 0, 0, 0, 0,248,129,171, 3, 0, 0, 0, 0,200, 32,201, 3, 0, 0, 0, 0, + 72, 35,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 88,131,171, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0, 8,132,171, 3, 0, 0, 0, 0,168,130,171, 3, 0, 0, 0, 0,136, 31,201, 3, 0, 0, 0, 0, + 72, 35,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 8,132,171, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0,184,132,171, 3, 0, 0, 0, 0, 88,131,171, 3, 0, 0, 0, 0,168, 34,201, 3, 0, 0, 0, 0, + 72, 35,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,184,132,171, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0,104,133,171, 3, 0, 0, 0, 0, 8,132,171, 3, 0, 0, 0, 0,168, 29,201, 3, 0, 0, 0, 0, +232, 35,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,104,133,171, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0, 24,134,171, 3, 0, 0, 0, 0,184,132,171, 3, 0, 0, 0, 0, 40, 32,201, 3, 0, 0, 0, 0, +232, 35,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 24,134,171, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0,200,134,171, 3, 0, 0, 0, 0,104,133,171, 3, 0, 0, 0, 0, 8, 34,201, 3, 0, 0, 0, 0, +136, 36,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,200,134,171, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0,120,135,171, 3, 0, 0, 0, 0, 24,134,171, 3, 0, 0, 0, 0,104, 33,201, 3, 0, 0, 0, 0, +136, 36,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,120,135,171, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,134,171, 3, 0, 0, 0, 0,232, 35,201, 3, 0, 0, 0, 0, +136, 36,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,184, 11,215, 3, 0, 0, 0, 0, +214, 0, 0, 0, 1, 0, 0, 0,216, 12,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 32,201, 3, 0, 0, 0, 0, + 72, 30,201, 3, 0, 0, 0, 0,232, 30,201, 3, 0, 0, 0, 0,200, 32,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 70, 5, 0, 0,152, 2, 0, 0,178, 2, 0, 0, 7, 7, 71, 5, 27, 0, 1, 0, 0, 0, 0, 0, 7, 0, 8, 0, + 72,207,177, 3, 0, 0, 0, 0, 24,199,207, 3, 0, 0, 0, 0, 24,199,207, 3, 0, 0, 0, 0,104,181,214, 3, 0, 0, 0, 0, + 24,183,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24,196,207, 3, 0, 0, 0, 0, +216,196,207, 3, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,104,181,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, + 24,183,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,163, 68, 0, 0, 0, 0, 0, 0,208, 65, + 0, 0, 0, 0, 0,224,168, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 70, 5, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, + 0,192,168, 68, 0, 0,200, 65, 0,192,168, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, + 4, 0, 12, 0, 10, 0, 71, 5, 26, 0, 71, 5, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 70, 5, 0, 0,152, 2, 0, 0,177, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 71, 5, 26, 0, 2, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 88, 6,178, 3, 0, 0, 0, 0,120,128,214, 15, 0, 0, 0, 0,120,128,214, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,120, 13,163, 3, 0, 0, 0, 0,216, 19,163, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 24,183,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,104,181,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,240,109, 69, 0, 0,128,192, 0, 0, 0, 0, + 0, 0, 0, 0, 0,192,168, 68, 0, 0, 0, 0, 0, 0, 0, 64, 70, 5, 0, 0, 87, 5, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0,111, 7, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 69, 5, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 2, 0, 0, 0, 1, 0, 3, 3, + 2, 0, 0, 4, 10, 0, 87, 5, 2, 0, 70, 5, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,178, 2, 0, 0,178, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 40, 5,178, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,232, 20,163, 3, 0, 0, 0, 0,248,116,208, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,216, 12,215, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, +248, 13,215, 3, 0, 0, 0, 0,184, 11,215, 3, 0, 0, 0, 0,104, 33,201, 3, 0, 0, 0, 0,168, 34,201, 3, 0, 0, 0, 0, + 72, 35,201, 3, 0, 0, 0, 0,136, 31,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,113, 4, 0, 0, 70, 5, 0, 0, + 0, 0, 0, 0, 55, 2, 0, 0, 4, 4,214, 0, 56, 2, 1, 0, 0, 0, 0, 0, 0, 0, 8, 0,248,205,177, 3, 0, 0, 0, 0, +184,126,199, 3, 0, 0, 0, 0,184,126,199, 3, 0, 0, 0, 0,200,184,214, 3, 0, 0, 0, 0,120,186,214, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24,205,207, 3, 0, 0, 0, 0, 88,195,207, 3, 0, 0, 0, 0, + 68, 65, 84, 65, 40, 1, 0, 0,200,184,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,120,186,214, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,148, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 86, 67, + 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,213, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 85, 67, 0, 0,200, 65, + 0, 0, 85, 67, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,214, 0, + 26, 0,214, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,113, 4, 0, 0, 70, 5, 0, 0, + 30, 2, 0, 0, 55, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,214, 0, 26, 0, 4, 0, 1, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 3,178, 3, 0, 0, 0, 0, +200, 53,163, 3, 0, 0, 0, 0,200, 53,163, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 8,118,208, 3, 0, 0, 0, 0, 56,121,208, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 40, 1, 0, 0,120,186,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +200,184,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,178, 67, 0, 0, 61,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 67, + 0,128, 7,196, 0, 0, 0, 0,197, 0, 0, 0,214, 0, 0, 0, 0, 0, 0, 0, 29, 2, 0, 0, 0, 0, 0, 0, 74, 1, 0, 0, + 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,196, 0, 0, 0, 0, 0, 0, 0, 29, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 1, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,214, 0, + 30, 2,197, 0, 30, 2, 0, 0, 72, 91,192, 15, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,113, 4, 0, 0, 70, 5, 0, 0, + 0, 0, 0, 0, 29, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,214, 0, 30, 2, 5, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200, 2,178, 3, 0, 0, 0, 0, + 8,150,212, 15, 0, 0, 0, 0,152, 72,163, 3, 0, 0, 0, 0,200,213,214, 3, 0, 0, 0, 0,184, 75,215, 3, 0, 0, 0, 0, + 72,122,208, 3, 0, 0, 0, 0,152,127,208, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 88, 1, 0, 0,200,213,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,168,215,214, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,232, 35,178, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 83, 95, + 80, 84, 95, 99,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 83, 95, + 80, 84, 95, 99,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,220,255,197, 0, 36, 0, + 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,168,215,214, 3, 0, 0, 0, 0, +213, 0, 0, 0, 1, 0, 0, 0,136,217,214, 3, 0, 0, 0, 0,200,213,214, 3, 0, 0, 0, 0, 40, 34,221, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,114,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,114,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,135,255,197, 0, 61, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 88, 1, 0, 0,136,217,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,104,219,214, 3, 0, 0, 0, 0, +168,215,214, 3, 0, 0, 0, 0,200, 35,221, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, + 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, + 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,111,255,197, 0, 0, 0, + 0, 0, 0, 0, 4, 0, 6, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,100, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 83, 78, 0, 0, 8, 1, 0, 0, 8,136, 43, 5, 0, 0, 0, 0,211, 0, 0, 0, - 1, 0, 0, 0,104,139, 44, 5, 0, 0, 0, 0,136, 27, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 83, 82, 68,101,102, 97,117,108,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88,137, 43, 5, - 0, 0, 0, 0, 40,142, 43, 5, 0, 0, 0, 0,152,142, 43, 5, 0, 0, 0, 0, 8,150, 43, 5, 0, 0, 0, 0,120,150, 43, 5, - 0, 0, 0, 0, 8,122, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88,150,113, 1, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 88,137, 43, 5, 0, 0, 0, 0,212, 0, 0, 0, - 1, 0, 0, 0,200,137, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,200,137, 43, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 56,138, 43, 5, - 0, 0, 0, 0, 88,137, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,181, 2, 0, 0, 0, 0, 68, 65, 84, 65, - 32, 0, 0, 0, 56,138, 43, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,168,138, 43, 5, 0, 0, 0, 0,200,137, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,252, 4,181, 2, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,168,138, 43, 5, - 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 24,139, 43, 5, 0, 0, 0, 0, 56,138, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,252, 4, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 24,139, 43, 5, 0, 0, 0, 0,212, 0, 0, 0, - 1, 0, 0, 0,136,139, 43, 5, 0, 0, 0, 0,168,138, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,154, 2, - 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,136,139, 43, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,248,139, 43, 5, - 0, 0, 0, 0, 24,139, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,252, 4,154, 2, 1, 0, 0, 0, 68, 65, 84, 65, - 32, 0, 0, 0,248,139, 43, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,104,140, 43, 5, 0, 0, 0, 0,136,139, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 4, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,104,140, 43, 5, - 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,216,140, 43, 5, 0, 0, 0, 0,248,139, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 48, 4,154, 2, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,216,140, 43, 5, 0, 0, 0, 0,212, 0, 0, 0, - 1, 0, 0, 0, 72,141, 43, 5, 0, 0, 0, 0,104,140, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 4, 56, 2, - 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 72,141, 43, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,184,141, 43, 5, - 0, 0, 0, 0,216,140, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,252, 4, 56, 2, 0, 0, 0, 0, 68, 65, 84, 65, - 32, 0, 0, 0,184,141, 43, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 40,142, 43, 5, 0, 0, 0, 0, 72,141, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 40,142, 43, 5, - 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184,141, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 48, 4, 80, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,152,142, 43, 5, 0, 0, 0, 0,213, 0, 0, 0, - 1, 0, 0, 0, 8,143, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,137, 43, 5, 0, 0, 0, 0, 56,138, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 8,143, 43, 5, 0, 0, 0, 0,213, 0, 0, 0, - 1, 0, 0, 0,120,143, 43, 5, 0, 0, 0, 0,152,142, 43, 5, 0, 0, 0, 0,200,137, 43, 5, 0, 0, 0, 0, 24,139, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,120,143, 43, 5, 0, 0, 0, 0,213, 0, 0, 0, - 1, 0, 0, 0,232,143, 43, 5, 0, 0, 0, 0, 8,143, 43, 5, 0, 0, 0, 0, 56,138, 43, 5, 0, 0, 0, 0,136,139, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,232,143, 43, 5, 0, 0, 0, 0,213, 0, 0, 0, - 1, 0, 0, 0, 88,144, 43, 5, 0, 0, 0, 0,120,143, 43, 5, 0, 0, 0, 0, 24,139, 43, 5, 0, 0, 0, 0,136,139, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 88,144, 43, 5, 0, 0, 0, 0,213, 0, 0, 0, - 1, 0, 0, 0,200,144, 43, 5, 0, 0, 0, 0,232,143, 43, 5, 0, 0, 0, 0, 88,137, 43, 5, 0, 0, 0, 0,248,139, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,200,144, 43, 5, 0, 0, 0, 0,213, 0, 0, 0, - 1, 0, 0, 0, 56,145, 43, 5, 0, 0, 0, 0, 88,144, 43, 5, 0, 0, 0, 0,168,138, 43, 5, 0, 0, 0, 0,248,139, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 56,145, 43, 5, 0, 0, 0, 0,213, 0, 0, 0, - 1, 0, 0, 0,168,145, 43, 5, 0, 0, 0, 0,200,144, 43, 5, 0, 0, 0, 0, 24,139, 43, 5, 0, 0, 0, 0,104,140, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,168,145, 43, 5, 0, 0, 0, 0,213, 0, 0, 0, - 1, 0, 0, 0, 24,146, 43, 5, 0, 0, 0, 0, 56,145, 43, 5, 0, 0, 0, 0,136,139, 43, 5, 0, 0, 0, 0,104,140, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 24,146, 43, 5, 0, 0, 0, 0,213, 0, 0, 0, - 1, 0, 0, 0,136,146, 43, 5, 0, 0, 0, 0,168,145, 43, 5, 0, 0, 0, 0,248,139, 43, 5, 0, 0, 0, 0,216,140, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,136,146, 43, 5, 0, 0, 0, 0,213, 0, 0, 0, - 1, 0, 0, 0,248,146, 43, 5, 0, 0, 0, 0, 24,146, 43, 5, 0, 0, 0, 0,104,140, 43, 5, 0, 0, 0, 0,216,140, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,248,146, 43, 5, 0, 0, 0, 0,213, 0, 0, 0, - 1, 0, 0, 0,104,147, 43, 5, 0, 0, 0, 0,136,146, 43, 5, 0, 0, 0, 0,136,139, 43, 5, 0, 0, 0, 0, 72,141, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,104,147, 43, 5, 0, 0, 0, 0,213, 0, 0, 0, - 1, 0, 0, 0,216,147, 43, 5, 0, 0, 0, 0,248,146, 43, 5, 0, 0, 0, 0,168,138, 43, 5, 0, 0, 0, 0, 72,141, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,216,147, 43, 5, 0, 0, 0, 0,213, 0, 0, 0, - 1, 0, 0, 0, 72,148, 43, 5, 0, 0, 0, 0,104,147, 43, 5, 0, 0, 0, 0,216,140, 43, 5, 0, 0, 0, 0, 72,141, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 72,148, 43, 5, 0, 0, 0, 0,213, 0, 0, 0, - 1, 0, 0, 0,184,148, 43, 5, 0, 0, 0, 0,216,147, 43, 5, 0, 0, 0, 0, 88,137, 43, 5, 0, 0, 0, 0,184,141, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,184,148, 43, 5, 0, 0, 0, 0,213, 0, 0, 0, - 1, 0, 0, 0, 40,149, 43, 5, 0, 0, 0, 0, 72,148, 43, 5, 0, 0, 0, 0, 24,139, 43, 5, 0, 0, 0, 0,184,141, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 40,149, 43, 5, 0, 0, 0, 0,213, 0, 0, 0, - 1, 0, 0, 0,152,149, 43, 5, 0, 0, 0, 0,184,148, 43, 5, 0, 0, 0, 0,104,140, 43, 5, 0, 0, 0, 0, 40,142, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,152,149, 43, 5, 0, 0, 0, 0,213, 0, 0, 0, - 1, 0, 0, 0, 8,150, 43, 5, 0, 0, 0, 0, 40,149, 43, 5, 0, 0, 0, 0,248,139, 43, 5, 0, 0, 0, 0, 40,142, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 8,150, 43, 5, 0, 0, 0, 0,213, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152,149, 43, 5, 0, 0, 0, 0,184,141, 43, 5, 0, 0, 0, 0, 40,142, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,120,150, 43, 5, 0, 0, 0, 0,215, 0, 0, 0, - 1, 0, 0, 0, 72,154, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24,139, 43, 5, 0, 0, 0, 0,200,137, 43, 5, - 0, 0, 0, 0, 56,138, 43, 5, 0, 0, 0, 0,136,139, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -252, 4, 0, 0,155, 2, 0, 0,181, 2, 0, 0, 7, 7,253, 4, 27, 0, 1, 0, 0, 0, 0, 0, 7, 0, 8, 0,120,154, 12, 5, - 0, 0, 0, 0,216,138, 44, 5, 0, 0, 0, 0,216,138, 44, 5, 0, 0, 0, 0,104,151, 43, 5, 0, 0, 0, 0,216,152, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184,134,173, 77,130,127, 0, 0, 56,232,213, 76, -130,127, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,104,151, 43, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0,216,152, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,161, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, - 0,160,159, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,252, 4, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,159, 68, - 0, 0,200, 65, 0,128,159, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, - 10, 0,253, 4, 26, 0,253, 4, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -252, 4, 0, 0,155, 2, 0, 0,180, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,253, 4, 26, 0, - 2, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136,156, 12, 5, - 0, 0, 0, 0,184,215,146, 77,130,127, 0, 0,184,215,146, 77,130,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,184,190, 53, 76,130,127, 0, 0,152,195, 53, 76,130,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,216,152, 43, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,104,151, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0,240,109, 69, 0, 0,128,192, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 71, 69, 0, 0, 0, 0, 0, 0, 96, 65,112, 12, 0, 0,129, 12, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, -111, 7, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,111, 12, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 2, 0, 0, 0, 1, 0, 3, 3, 2, 0, 0, 4, - 10, 0,129, 12, 14, 0,112, 12, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,181, 2, 0, 0,181, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152,155, 12, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,216,196, 53, 76,130,127, 0, 0, 72,199, 53, 76,130,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, 72,154, 43, 5, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,152,188, 43, 5, - 0, 0, 0, 0,120,150, 43, 5, 0, 0, 0, 0,248,139, 43, 5, 0, 0, 0, 0,216,140, 43, 5, 0, 0, 0, 0, 72,141, 43, 5, - 0, 0, 0, 0,168,138, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 4, 0, 0,252, 4, 0, 0, 0, 0, 0, 0, - 55, 2, 0, 0, 4, 4,204, 0, 56, 2, 1, 0, 0, 0, 0, 0, 0, 0, 8, 0, 24,150, 12, 5, 0, 0, 0, 0, 88,187, 43, 5, - 0, 0, 0, 0, 88,187, 43, 5, 0, 0, 0, 0, 56,155, 43, 5, 0, 0, 0, 0,168,156, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24,171,138, 77,130,127, 0, 0, 40, 6,185, 77,130,127, 0, 0, 68, 65, 84, 65, - 40, 1, 0, 0, 56,155, 43, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0,168,156, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,148, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 55, 0, 0, 76, 67, 0, 0, 0, 0, - 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,203, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 75, 67, 0, 0,200, 65, 0, 0, 75, 67, - 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,204, 0, 26, 0,204, 0, - 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 4, 0, 0,252, 4, 0, 0, 30, 2, 0, 0, - 55, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,204, 0, 26, 0, 4, 0, 1, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136,153, 12, 5, 0, 0, 0, 0,136,233, 53, 76, -130,127, 0, 0,136,233, 53, 76,130,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,202, 53, 76, -130,127, 0, 0,168,204, 53, 76,130,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 1, 0, 0,168,156, 43, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,155, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0,128,178, 67, 0, 0, 61,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 59, 67, 0,128, 7,196, - 0, 0, 0, 0,187, 0, 0, 0,204, 0, 0, 0, 0, 0, 0, 0, 29, 2, 0, 0, 0, 0, 0, 0, 74, 1, 0, 0, 0, 0, 0, 0, - 17, 0, 0, 0, 0, 0, 0, 0,186, 0, 0, 0, 0, 0, 0, 0, 29, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 1, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,204, 0, 30, 2,187, 0, - 30, 2, 0, 0,152,214,146, 77,130,127, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 49, 4, 0, 0,252, 4, 0, 0, 0, 0, 0, 0, - 29, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,204, 0, 30, 2, 5, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,151, 12, 5, 0, 0, 0, 0,216,199,138, 77, -130,127, 0, 0,232, 37,140, 77,130,127, 0, 0, 24,158, 43, 5, 0, 0, 0, 0,168,216,148, 77,130,127, 0, 0,232,205, 53, 76, -130,127, 0, 0,248,209, 53, 76,130,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 88, 1, 0, 0, 24,158, 43, 5, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,184,159, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 40,152, 12, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 83, 95, 80, 84, 95, 99, -111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 83, 95, 80, 84, 95, 99, -111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67,111,110,116,101,120,116, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,220,255,187, 0, 36, 0, 0, 0, 0, 0, - 0, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,184,159, 43, 5, 0, 0, 0, 0,214, 0, 0, 0, - 1, 0, 0, 0, 88,161, 43, 5, 0, 0, 0, 0, 24,158, 43, 5, 0, 0, 0, 0, 72, 8,227, 76,130,127, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,114,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,114,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,135,255,187, 0, 61, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,104,219,214, 3, 0, 0, 0, 0, +213, 0, 0, 0, 1, 0, 0, 0, 72,221,214, 3, 0, 0, 0, 0,136,217,214, 3, 0, 0, 0, 0,104, 37,221, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,100,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,100,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 88, 1, 0, 0, 88,161, 43, 5, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,248,162, 43, 5, 0, 0, 0, 0,184,159, 43, 5, - 0, 0, 0, 0, 72, 11,227, 76,130,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,108, 97, -121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,108, 97, -121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,111,255,187, 0, 0, 0, 0, 0, 0, 0, - 4, 0, 6, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140,254,197, 0,203, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,248,162, 43, 5, 0, 0, 0, 0,214, 0, 0, 0, - 1, 0, 0, 0,152,164, 43, 5, 0, 0, 0, 0, 88,161, 43, 5, 0, 0, 0, 0,184, 14,227, 76,130,127, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,100,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,100,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 88, 1, 0, 0, 72,221,214, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,184, 43,215, 3, 0, 0, 0, 0, +104,219,214, 3, 0, 0, 0, 0, 8, 39,221, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, + 84, 95, 97,110,116,105, 97,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, + 84, 95, 97,110,116,105, 97,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65,110,116,105, 45, 65,108,105, + 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58,254,197, 0, 58, 0, + 20, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,140,254,187, 0,203, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,184, 43,215, 3, 0, 0, 0, 0, +213, 0, 0, 0, 1, 0, 0, 0,152, 45,215, 3, 0, 0, 0, 0, 72,221,214, 3, 0, 0, 0, 0,168, 40,221, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,109,111,116,105,111,110, 95, 98,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,109,111,116,105,111,110, 95, 98,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 88, 1, 0, 0,152,164, 43, 5, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 56,166, 43, 5, 0, 0, 0, 0,248,162, 43, 5, - 0, 0, 0, 0,152, 17,227, 76,130,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 97,110, -116,105, 97,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 97,110, -116,105, 97,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65,110,116,105, 45, 65,108,105, 97,115,105,110, -103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58,254,187, 0, 58, 0, 20, 0, 0, 0, - 0, 0, 6, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 83, 97,109,112,108,101,100, 32, 77,111,116,105,111,110, 32, 66,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,254,197, 0, 0, 0, 20, 0, 0, 0, 4, 0, 6, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 56,166, 43, 5, 0, 0, 0, 0,214, 0, 0, 0, - 1, 0, 0, 0,216,167, 43, 5, 0, 0, 0, 0,152,164, 43, 5, 0, 0, 0, 0,168, 20,227, 76,130,127, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,109,111,116,105,111,110, 95, 98,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,109,111,116,105,111,110, 95, 98,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 83, 97,109,112,108,101,100, 32, 77,111,116,105,111,110, 32, 66,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 88, 1, 0, 0,152, 45,215, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,120, 47,215, 3, 0, 0, 0, 0, +184, 43,215, 3, 0, 0, 0, 0, 72, 42,221, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, + 84, 95,115,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, + 84, 95,115,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 34,254,187, 0, 0, 0, 20, 0, 0, 0, 4, 0, 6, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10,254,197, 0, 0, 0, + 0, 0, 0, 0, 4, 0, 6, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 88, 1, 0, 0,216,167, 43, 5, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,120,169, 43, 5, 0, 0, 0, 0, 56,166, 43, 5, - 0, 0, 0, 0,200, 8,183, 76,130,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,104, - 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,104, - 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,104, 97,100,105,110,103, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,120, 47,215, 3, 0, 0, 0, 0, +213, 0, 0, 0, 1, 0, 0, 0, 88, 49,215, 3, 0, 0, 0, 0,152, 45,215, 3, 0, 0, 0, 0,232, 43,221, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10,254,187, 0, 0, 0, 0, 0, 0, 0, - 4, 0, 6, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 80,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,120,169, 43, 5, 0, 0, 0, 0,214, 0, 0, 0, - 1, 0, 0, 0, 24,171, 43, 5, 0, 0, 0, 0,216,167, 43, 5, 0, 0, 0, 0,152, 30,227, 76,130,127, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,242,253,197, 0, 0, 0, 0, 0, 0, 0, 4, 0, 6, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 80,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,242,253,187, 0, 0, 0, 0, 0, 0, 0, 4, 0, 6, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 88, 1, 0, 0, 88, 49,215, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 56, 51,215, 3, 0, 0, 0, 0, +120, 47,215, 3, 0, 0, 0, 0,136, 45,221, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, + 84, 95,112,111,115,116, 95,112,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, + 84, 95,112,111,115,116, 95,112,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,111,115,116, 32, 80,114,111, + 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,218,253,197, 0, 0, 0, + 0, 0, 0, 0, 4, 0, 6, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 88, 1, 0, 0, 24,171, 43, 5, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,184,172, 43, 5, 0, 0, 0, 0,120,169, 43, 5, - 0, 0, 0, 0, 88, 34,227, 76,130,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,111, -115,116, 95,112,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,111, -115,116, 95,112,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,111,115,116, 32, 80,114,111, 99,101,115,115, -105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,218,253,187, 0, 0, 0, 0, 0, 0, 0, - 4, 0, 6, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 56, 51,215, 3, 0, 0, 0, 0, +213, 0, 0, 0, 1, 0, 0, 0, 24, 53,215, 3, 0, 0, 0, 0, 88, 49,215, 3, 0, 0, 0, 0, 72, 48,221, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,184,172, 43, 5, 0, 0, 0, 0,214, 0, 0, 0, - 1, 0, 0, 0, 88,174, 43, 5, 0, 0, 0, 0, 24,171, 43, 5, 0, 0, 0, 0,200, 36,227, 76,130,127, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 83,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,194,253,197, 0, 0, 0, 20, 0, 0, 0, 4, 0, 6, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 83,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,194,253,187, 0, 0, 0, 20, 0, 0, 0, 4, 0, 6, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 88, 1, 0, 0, 24, 53,215, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,248, 54,215, 3, 0, 0, 0, 0, + 56, 51,215, 3, 0, 0, 0, 0,232, 49,221, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, + 84, 95,111,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, + 84, 95,111,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 88, 1, 0, 0, 88,174, 43, 5, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,248,175, 43, 5, 0, 0, 0, 0,184,172, 43, 5, - 0, 0, 0, 0,200, 39,227, 76,130,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,111,117, -116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,111,117, -116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79,117,116,112,117,116, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36,253,197, 0,134, 0, + 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36,253,187, 0,134, 0, 0, 0, 0, 0, - 0, 0, 6, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,248, 54,215, 3, 0, 0, 0, 0, +213, 0, 0, 0, 1, 0, 0, 0,216, 56,215, 3, 0, 0, 0, 0, 24, 53,215, 3, 0, 0, 0, 0, 40, 53,221, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 98, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,248,175, 43, 5, 0, 0, 0, 0,214, 0, 0, 0, - 1, 0, 0, 0,152,177, 43, 5, 0, 0, 0, 0, 88,174, 43, 5, 0, 0, 0, 0, 56, 46,227, 76,130,127, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 98, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 98, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 98, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 66, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 66, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12,253,197, 0, 0, 0, 0, 0, 0, 0, 4, 0, 7, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 12,253,187, 0, 0, 0, 0, 0, 0, 0, 4, 0, 7, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 88, 1, 0, 0,152,177, 43, 5, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 56,179, 43, 5, 0, 0, 0, 0,248,175, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,115, 99,101, -110,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,115, 99,101, -110,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 99,101,110,101, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 88, 1, 0, 0,216, 56,215, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,184, 58,215, 3, 0, 0, 0, 0, +248, 54,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, + 95,115, 99,101,110,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, + 95,115, 99,101,110,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 99,101,110,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,135,255, 41, 1, 61, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,135,255, 41, 1, 61, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 56,179, 43, 5, 0, 0, 0, 0,214, 0, 0, 0, - 1, 0, 0, 0,216,180, 43, 5, 0, 0, 0, 0,152,177, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,117,110,105,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,184, 58,215, 3, 0, 0, 0, 0, +213, 0, 0, 0, 1, 0, 0, 0,152, 60,215, 3, 0, 0, 0, 0,216, 56,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,117,110,105,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,117,110,105,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,117,110,105,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 85,110,105,116,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 85,110,105,116,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 28,255, 41, 1, 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28,255, 41, 1, 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 88, 1, 0, 0,216,180, 43, 5, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,120,182, 43, 5, 0, 0, 0, 0, 56,179, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,107,101,121, -105,110,103, 95,115,101,116,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,107,101,121, -105,110,103, 95,115,101,116,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75,101,121,105,110,103, 32, 83,101,116,115, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191,254, 41, 1, 69, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,120,182, 43, 5, 0, 0, 0, 0,214, 0, 0, 0, - 1, 0, 0, 0, 24,184, 43, 5, 0, 0, 0, 0,216,180, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,112,104,121,115,105, 99,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 88, 1, 0, 0,152, 60,215, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,120, 62,215, 3, 0, 0, 0, 0, +184, 58,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, + 95,107,101,121,105,110,103, 95,115,101,116,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, + 95,107,101,121,105,110,103, 95,115,101,116,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75,101,121,105,110,103, 32, 83, +101,116,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191,254, 41, 1, 69, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,112,104,121,115,105, 99,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,120, 62,215, 3, 0, 0, 0, 0, +213, 0, 0, 0, 1, 0, 0, 0, 88, 64,215, 3, 0, 0, 0, 0,152, 60,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,112,104,121,115,105, 99,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 71,114, 97,118,105,116,121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,112,104,121,115,105, 99,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,131,254, 41, 1, 36, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 71,114, 97,118,105,116,121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,131,254, 41, 1, 36, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 88, 1, 0, 0, 24,184, 43, 5, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,184,185, 43, 5, 0, 0, 0, 0,120,182, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,115,105,109, -112,108,105,102,121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95,115,105,109, -112,108,105,102,121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,105,109,112,108,105,102,121, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27,254, 41, 1, 80, 0, 20, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,184,185, 43, 5, 0, 0, 0, 0,214, 0, 0, 0, - 1, 0, 0, 0,184, 56,138, 77,130,127, 0, 0, 24,184, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95, 99,117,115,116,111,109, 95,112,114,111,112,115, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 88, 1, 0, 0, 88, 64,215, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 56, 66,215, 3, 0, 0, 0, 0, +120, 62,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, + 95,115,105,109,112,108,105,102,121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, + 95,115,105,109,112,108,105,102,121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,105,109,112,108,105,102,121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95, 99,117,115,116,111,109, 95,112,114,111,112,115, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27,254, 41, 1, 80, 0, + 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 67,117,115,116,111,109, 32, 80,114,111,112,101,114,116,105,101,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,223,253, 41, 1, 36, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 56, 66,215, 3, 0, 0, 0, 0, +213, 0, 0, 0, 1, 0, 0, 0, 24, 68,215, 3, 0, 0, 0, 0, 88, 64,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95, 99,117,115,116,111,109, 95,112,114,111,112,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 69, 78, 69, 95, 80, 84, 95, 99,117,115,116,111,109, 95,112,114,111,112,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 88, 1, 0, 0,184, 56,138, 77,130,127, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 88,245,148, 77,130,127, 0, 0,184,185, 43, 5, - 0, 0, 0, 0,152, 78,227, 76,130,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 69, 88, 84, 85, 82, 69, 95, 80, 84, 95, 99, -111,110,116,101,120,116, 95,116,101,120,116,117,114,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 69, 88, 84, 85, 82, 69, 95, 80, 84, 95, 99, -111,110,116,101,120,116, 95,116,101,120,116,117,114,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 67,117,115,116,111,109, 32, 80,114,111,112,101,114,116,105,101,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,223,253, 41, 1, 36, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16,255,187, 0,204, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 5, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 88,245,148, 77,130,127, 0, 0,214, 0, 0, 0, - 1, 0, 0, 0, 72, 67,149, 77,130,127, 0, 0,184, 56,138, 77,130,127, 0, 0, 8,142,227, 76,130,127, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 84, 69, 88, 84, 85, 82, 69, 95, 80, 84, 95,109, 97,112,112,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 84, 69, 88, 84, 85, 82, 69, 95, 80, 84, 95,109, 97,112,112,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 88, 1, 0, 0, 24, 68,215, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,248, 69,215, 3, 0, 0, 0, 0, + 56, 66,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 69, 88, 84, 85, 82, 69, 95, + 80, 84, 95, 99,111,110,116,101,120,116, 95,116,101,120,116,117,114,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 69, 88, 84, 85, 82, 69, 95, + 80, 84, 95, 99,111,110,116,101,120,116, 95,116,101,120,116,117,114,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 77, 97,112,112,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 77,254,187, 0,171, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16,255,187, 0,204, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 5, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,248, 69,215, 3, 0, 0, 0, 0, +213, 0, 0, 0, 1, 0, 0, 0,216, 71,215, 3, 0, 0, 0, 0, 24, 68,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 84, 69, 88, 84, 85, 82, 69, 95, 80, 84, 95,109, 97,112,112,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 88, 1, 0, 0, 72, 67,149, 77,130,127, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,168,216,148, 77,130,127, 0, 0, 88,245,148, 77, -130,127, 0, 0, 24,145,227, 76,130,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 69, 88, 84, 85, 82, 69, 95, 80, 84, 95,105, -110,102,108,117,101,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 69, 88, 84, 85, 82, 69, 95, 80, 84, 95,105, -110,102,108,117,101,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 73,110,102,108,117,101,110, 99,101, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,223,252,187, 0, 86, 1, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 84, 69, 88, 84, 85, 82, 69, 95, 80, 84, 95,109, 97,112,112,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 77, 97,112,112,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,168,216,148, 77,130,127, 0, 0,214, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 67,149, 77,130,127, 0, 0,184, 63,226, 76,130,127, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 79, 66, 74, 69, 67, 84, 95, 80, 84, 95, 99,111,110,115,116,114, 97,105,110,116,115, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77,254,187, 0,171, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 79, 66, 74, 69, 67, 84, 95, 80, 84, 95, 99,111,110,115,116,114, 97,105,110,116,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 79, 98,106,101, 99,116, 32, 67,111,110,115,116,114, 97,105,110,116,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,160,255,187, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 88, 1, 0, 0,216, 71,215, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,184, 75,215, 3, 0, 0, 0, 0, +248, 69,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 69, 88, 84, 85, 82, 69, 95, + 80, 84, 95,105,110,102,108,117,101,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 69, 88, 84, 85, 82, 69, 95, + 80, 84, 95,105,110,102,108,117,101,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 73,110,102,108,117,101,110, 99, +101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,223,252,187, 0, 86, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, -248, 0, 0, 0, 88,187, 43, 5, 0, 0, 0, 0,180, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 8,107,139, 77,130,127, 0, 0,255, 21, 0, 0,160, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,152,188, 43, 5, 0, 0, 0, 0,215, 0, 0, 0, - 1, 0, 0, 0,136,193, 43, 5, 0, 0, 0, 0, 72,154, 43, 5, 0, 0, 0, 0, 88,137, 43, 5, 0, 0, 0, 0,184,141, 43, 5, - 0, 0, 0, 0, 40,142, 43, 5, 0, 0, 0, 0,248,139, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 47, 4, 0, 0, 0, 0, 0, 0, 79, 0, 0, 0, 15, 15, 48, 4, 80, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,105, 12, 5, - 0, 0, 0, 0,104,192, 43, 5, 0, 0, 0, 0,104,192, 43, 5, 0, 0, 0, 0,136,189, 43, 5, 0, 0, 0, 0,248,190, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184, 66,185, 77,130,127, 0, 0,216, 90,138, 77, -130,127, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,136,189, 43, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0,248,190, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96,146, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, - 0, 0,134, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 4, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,224,133, 68, - 0, 0,200, 65, 0,224,133, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, - 10, 0, 48, 4, 26, 0, 48, 4, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 47, 4, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 4, 26, 0, - 6, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248,107, 12, 5, - 0, 0, 0, 0,168,170,141, 77,130,127, 0, 0,168,170,141, 77,130,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,232,212, 53, 76,130,127, 0, 0, 88,215, 53, 76,130,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,248,190, 43, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,136,189, 43, 5, 0, 0, 0, 0, 0, 0, 64,192, 0, 0,126, 67, 0, 0, 0, 0, 0, 0, 72, 66, 88,218,103,194, - 40,147,141, 67, 0, 0, 0, 0, 0, 0, 72, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 47, 4, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 47, 4, 0, 0, 18, 0, 0, 0, 53, 0, 0, 0, 0, 0,128, 63, - 0, 0, 72, 66, 0,124,146, 72, 0, 0, 72, 66,205,204,204, 61, 0, 0, 32, 65, 72, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, 4, - 8, 0, 48, 4, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 47, 4, 0, 0, 26, 0, 0, 0, 79, 0, 0, 0, 0, 0, 0, 0, 47, 4, 0, 0, 26, 0, 0, 0, 79, 0, 0, 0, 48, 4, 54, 0, - 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,107, 12, 5, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,184, 75,215, 3, 0, 0, 0, 0, +213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216, 71,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 79, 66, 74, 69, 67, 84, 95, 80, 84, 95, 99,111,110,115,116,114, 97,105,110,116,115, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 79, 66, 74, 69, 67, 84, 95, 80, 84, 95, 99,111,110,115,116,114, 97,105,110,116,115, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 79, 98,106,101, 99,116, 32, 67,111,110,115,116,114, 97,105,110,116,115, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160,255,187, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65,248, 0, 0, 0,184,126,199, 3, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0,232,198,226, 3, 0, 0, 0, 0,255, 21, 0, 0,160, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,248, 13,215, 3, 0, 0, 0, 0, +214, 0, 0, 0, 1, 0, 0, 0, 24, 15,215, 3, 0, 0, 0, 0,216, 12,215, 3, 0, 0, 0, 0,168, 29,201, 3, 0, 0, 0, 0, +232, 35,201, 3, 0, 0, 0, 0,136, 36,201, 3, 0, 0, 0, 0,104, 33,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,111, 4, 0, 0, 0, 0, 0, 0, 83, 0, 0, 0, 15, 15,112, 4, 84, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, +152,104,177, 3, 0, 0, 0, 0,120, 95,200, 3, 0, 0, 0, 0,120, 95,200, 3, 0, 0, 0, 0, 40,188,214, 3, 0, 0, 0, 0, +216,189,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88,207,207, 3, 0, 0, 0, 0, +216,205,207, 3, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 40,188,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, +216,189,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 96,146, 68, 0, 0, 0, 0, 0, 0,208, 65, + 0, 0, 0, 0, 0, 0,142, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,111, 4, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, + 0,224,141, 68, 0, 0,200, 65, 0,224,141, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, + 4, 0, 12, 0, 10, 0,112, 4, 26, 0,112, 4, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,111, 4, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +112, 4, 26, 0, 6, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +232,186,177, 3, 0, 0, 0, 0,232,169,209, 15, 0, 0, 0, 0,232,169,209, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,168,128,208, 3, 0, 0, 0, 0,216,131,208, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,216,189,214, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 40,188,214, 3, 0, 0, 0, 0, 0, 0, 64,192, 0, 0,126, 67, 0, 0, 0, 0, 0, 0, 72, 66, + 88,218,103,194, 40,147,141, 67, 0, 0, 0, 0, 0, 0, 72, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,111, 4, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,111, 4, 0, 0, 18, 0, 0, 0, 57, 0, 0, 0, + 0, 0,128, 63, 0, 0, 72, 66, 0,124,146, 72, 0, 0, 72, 66,205,204,204, 61, 0, 0, 32, 65, 72, 0, 0, 0, 0, 0, 0, 2, + 4, 0, 0, 4, 8, 0,112, 4, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,111, 4, 0, 0, 26, 0, 0, 0, 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +112, 4, 58, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +184,185,177, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,232,132,208, 3, 0, 0, 0, 0, 88,140,208, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,208, 0, 0, 0,120, 95,200, 3, 0, 0, 0, 0,190, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 1, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, 24, 15,215, 3, 0, 0, 0, 0, +214, 0, 0, 0, 1, 0, 0, 0, 56, 16,215, 3, 0, 0, 0, 0,248, 13,215, 3, 0, 0, 0, 0,168, 34,201, 3, 0, 0, 0, 0, + 8, 34,201, 3, 0, 0, 0, 0,200, 32,201, 3, 0, 0, 0, 0, 72, 35,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +113, 4, 0, 0, 70, 5, 0, 0, 57, 2, 0, 0,150, 2, 0, 0, 3, 3,214, 0, 94, 0, 1, 0, 0, 0, 0, 0, 0, 0, 8, 0, + 72,103,177, 3, 0, 0, 0, 0,200, 0,209, 3, 0, 0, 0, 0,200, 0,209, 3, 0, 0, 0, 0,184,107,215, 3, 0, 0, 0, 0, +104,109,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152,209,207, 3, 0, 0, 0, 0, + 24,208,207, 3, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,184,107,215, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, +104,109,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,244, 67, 0, 0, 0, 0, 0, 0,208, 65, + 0, 0, 0, 0, 0, 0, 86, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,213, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, + 0, 0, 85, 67, 0, 0,200, 65, 0, 0, 85, 67, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, + 4, 0, 12, 0, 10, 0,214, 0, 26, 0,214, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +113, 4, 0, 0, 70, 5, 0, 0,125, 2, 0, 0,150, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +214, 0, 26, 0, 8, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +136,184,177, 3, 0, 0, 0, 0, 40, 59,163, 3, 0, 0, 0, 0, 40, 59,163, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,104,141,208, 3, 0, 0, 0, 0,152,144,208, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,104,109,215, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,184,107,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,141, 67, 0, 0,244,194, 0, 0, 0, 0, + 0, 0, 0, 64, 0, 0, 71, 67, 0, 0,143,194, 0, 0,172,193,197, 0, 0, 0,214, 0, 0, 0, 18, 0, 0, 0, 67, 0, 0, 0, + 0, 0, 0, 0,196, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,196, 0, 0, 0, 18, 0, 0, 0, 67, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 18, 0, 0, 0, 2, 0, 3, 3, + 0, 0, 12, 4, 6, 0,214, 0, 68, 0,197, 0, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +113, 4, 0, 0, 70, 5, 0, 0, 57, 2, 0, 0,124, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +214, 0, 68, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 88,183,177, 3, 0, 0, 0, 0,232, 69,163, 3, 0, 0, 0, 0,232, 69,163, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,168,145,208, 3, 0, 0, 0, 0, 8,231,207, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 1, 0, 0,200, 0,209, 3, 0, 0, 0, 0,183, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,152,216, 53, 76,130,127, 0, 0, 72,222, 53, 76,130,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65,208, 0, 0, 0,104,192, 43, 5, 0, 0, 0, 0,191, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,120,243,211, 15, 0, 0, 0, 0,120,243,211, 15, 0, 0, 0, 0,136, 17,214, 3, 0, 0, 0, 0, + 0,115,101, 32, 83, 99,117,108,112,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 68, 65, 84, 65, 16, 0, 0, 0, +136, 17,214, 3, 0, 0, 0, 0,237, 0, 0, 0, 1, 0, 0, 0, 42, 11, 0, 0, 42, 11, 0, 0,136,139,215, 3, 0, 0, 0, 0, + 68, 65, 84, 65,160,178, 0, 0,136,139,215, 3, 0, 0, 0, 0,236, 0, 0, 0, 42, 11, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, +168,194,217, 3, 0, 0, 0, 0, 19, 0, 0, 0, 1, 0, 1, 0,168,194,217, 3, 0, 0, 0, 0, 20, 0, 0, 0, 1, 0, 1, 0, +168,194,217, 3, 0, 0, 0, 0, 21, 0, 1, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, + 24, 51,163, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,184,219,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, +136, 48,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,152, 7,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, +216, 29,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,168,225,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, +120,209,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,200,213,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, + 24, 98,200, 3, 0, 0, 0, 0, 21, 0, 0, 0, 1, 0, 1, 0,168,194,217, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, +200, 66,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, +200, 85,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, + 8,103,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, + 72,120,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, +136,137,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, + 72,183,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, + 8,197,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, +200,210,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, +136,224,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, +200,219,210, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, +232,233,210, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, +152,231,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, +184,245,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, +216, 3,219, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, +248, 17,219, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, +200, 66,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, +200, 66,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, +200, 66,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, +200, 66,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, +200, 66,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, +200, 66,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, +200, 66,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, +200, 66,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, +200, 66,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, +200, 66,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, +200, 66,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, +200, 66,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, +200, 66,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, +200, 66,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, +200, 66,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, +200, 66,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0, +200, 66,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0, +200, 66,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0, +200, 66,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0, +200, 66,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0, +200, 66,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0, +200, 66,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0, +200, 66,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0, +200, 66,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0, +200, 66,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0, +200, 66,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0, +200, 66,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0, +200, 66,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0, +200, 66,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0, +200, 66,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0, +200, 66,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0, +200, 66,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0, +200, 66,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0, +200, 66,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0, +200, 66,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, + 24, 98,200, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,120,209,217, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 30, 0,255,255, 3, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,136, 7,214, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, + 8,156,214, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,248, 9,215, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, +152, 66,216, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 56, 43,217, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, +232,117,217, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 24,157,217, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, +216, 29,218, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 8, 78,210, 3, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, + 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, + 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, + 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, + 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, + 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, + 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, + 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, + 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, + 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, + 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, + 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, + 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, + 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, + 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, + 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, + 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, + 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, + 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, + 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, + 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, + 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, + 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, + 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, + 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, + 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, + 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, + 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, + 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, + 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, + 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, + 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, + 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, + 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, + 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, + 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, + 40, 77,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, +200, 85,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, +200, 85,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, +200, 85,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, +200, 85,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, +200, 85,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, +200, 85,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, +200, 85,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, +200, 85,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, +200, 85,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, +200, 85,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, +200, 85,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, +200, 85,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, +200, 85,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, +200, 85,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, +200, 85,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, +200, 85,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, +200, 85,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, +200, 85,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, +200, 85,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, +200, 85,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, +200, 85,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, +200, 85,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, +200, 85,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, +200, 85,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, +200, 85,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, +200, 85,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, +200, 85,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, +200, 85,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, +200, 85,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, +200, 85,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, +200, 85,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, +200, 85,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, +200, 85,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, +200, 85,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, +200, 85,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, +104, 94,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, +104, 94,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, +104, 94,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, +104, 94,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, +104, 94,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, +104, 94,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, +104, 94,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, +104, 94,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, +104, 94,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, +104, 94,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, +104, 94,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, +104, 94,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, +104, 94,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, +104, 94,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, +104, 94,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, +104, 94,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, +104, 94,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, +104, 94,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, +104, 94,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, +104, 94,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, +104, 94,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, +104, 94,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, +104, 94,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, +104, 94,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, +104, 94,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, +104, 94,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, +104, 94,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, +104, 94,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, +104, 94,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, +104, 94,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, +104, 94,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, +104, 94,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, +104, 94,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, +104, 94,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, +104, 94,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, + 8,103,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, + 8,103,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, + 8,103,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, + 8,103,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, + 8,103,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, + 8,103,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, + 8,103,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, + 8,103,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, + 8,103,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, + 8,103,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, + 8,103,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, + 8,103,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, + 8,103,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, + 8,103,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, + 8,103,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, + 8,103,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, + 8,103,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, + 8,103,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, + 8,103,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, + 8,103,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, + 8,103,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, + 8,103,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, + 8,103,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, + 8,103,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, + 8,103,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, + 8,103,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, + 8,103,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, + 8,103,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, + 8,103,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, + 8,103,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, + 8,103,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, + 8,103,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, + 8,103,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, + 8,103,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, + 8,103,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, +168,111,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, +168,111,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, +168,111,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, +168,111,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, +168,111,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, +168,111,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, +168,111,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, +168,111,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, +168,111,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, +168,111,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, +168,111,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, +168,111,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, +168,111,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, +168,111,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, +168,111,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, +168,111,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, +168,111,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, +168,111,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, +168,111,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, +168,111,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, +168,111,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, +168,111,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, +168,111,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, +168,111,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, +168,111,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, +168,111,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, +168,111,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, +168,111,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, +168,111,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, +168,111,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, +168,111,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, +168,111,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, +168,111,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, +168,111,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, +168,111,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, + 72,120,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, + 72,120,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, + 72,120,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, + 72,120,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, + 72,120,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, + 72,120,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, + 72,120,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, + 72,120,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, + 72,120,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, + 72,120,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, + 72,120,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, + 72,120,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, + 72,120,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, + 72,120,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, + 72,120,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, + 72,120,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, + 72,120,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, + 72,120,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, + 72,120,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, + 72,120,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, + 72,120,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, + 72,120,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, + 72,120,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, + 72,120,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, + 72,120,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, + 72,120,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, + 72,120,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, + 72,120,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, + 72,120,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, + 72,120,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, + 72,120,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, + 72,120,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, + 72,120,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, + 72,120,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, + 72,120,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, +232,128,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, +232,128,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, +232,128,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, +232,128,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, +232,128,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, +232,128,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, +232,128,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, +232,128,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, +232,128,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, +232,128,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, +232,128,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, +232,128,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, +232,128,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, +232,128,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, +232,128,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, +232,128,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, +232,128,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, +232,128,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, +232,128,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, +232,128,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, +232,128,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, +232,128,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, +232,128,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, +232,128,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, +232,128,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, +232,128,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, +232,128,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, +232,128,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, +232,128,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, +232,128,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, +232,128,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, +232,128,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, +232,128,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, +232,128,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, +232,128,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, +136,137,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, +136,137,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, +136,137,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, +136,137,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, +136,137,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, +136,137,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, +136,137,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, +136,137,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, +136,137,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, +136,137,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, +136,137,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, +136,137,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, +136,137,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, +136,137,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, +136,137,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, +136,137,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, +136,137,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, +136,137,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, +136,137,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, +136,137,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, +136,137,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, +136,137,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, +136,137,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, +136,137,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, +136,137,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, +136,137,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, +136,137,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, +136,137,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, +136,137,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, +136,137,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, +136,137,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, +136,137,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, +136,137,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, +136,137,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, +136,137,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, +104,176,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, +104,176,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, +104,176,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, +104,176,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, +104,176,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, +104,176,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, +104,176,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, +104,176,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, +104,176,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, +104,176,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, +104,176,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, +104,176,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, +104,176,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, +104,176,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, +104,176,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, +104,176,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, +104,176,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, +104,176,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, +104,176,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, +104,176,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, +104,176,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, +104,176,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, +104,176,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, +104,176,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, +104,176,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, +104,176,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, +104,176,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, +104,176,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, +104,176,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, +104,176,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, +104,176,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, +104,176,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, +104,176,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, +104,176,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, +104,176,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, + 72,183,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, + 72,183,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, + 72,183,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, + 72,183,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, + 72,183,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, + 72,183,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, + 72,183,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, + 72,183,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, + 72,183,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, + 72,183,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, + 72,183,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, + 72,183,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, + 72,183,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, + 72,183,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, + 72,183,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, + 72,183,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, + 72,183,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, + 72,183,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, + 72,183,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, + 72,183,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, + 72,183,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, + 72,183,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, + 72,183,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, + 72,183,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, + 72,183,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, + 72,183,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, + 72,183,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, + 72,183,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, + 72,183,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, + 72,183,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, + 72,183,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, + 72,183,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, + 72,183,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, + 72,183,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, + 72,183,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, + 40,190,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, + 40,190,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, + 40,190,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, + 40,190,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, + 40,190,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, + 40,190,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, + 40,190,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, + 40,190,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, + 40,190,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, + 40,190,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, + 40,190,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, + 40,190,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, + 40,190,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, + 40,190,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, + 40,190,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, + 40,190,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, + 40,190,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, + 40,190,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, + 40,190,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, + 40,190,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, + 40,190,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, + 40,190,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, + 40,190,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, + 40,190,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, + 40,190,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, + 40,190,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, + 40,190,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, + 40,190,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, + 40,190,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, + 40,190,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, + 40,190,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, + 40,190,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, + 40,190,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, + 40,190,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, + 40,190,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, + 8,197,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, + 8,197,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, + 8,197,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, + 8,197,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, + 8,197,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, + 8,197,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, + 8,197,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, + 8,197,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, + 8,197,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, + 8,197,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, + 8,197,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, + 8,197,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, + 8,197,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, + 8,197,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, + 8,197,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, + 8,197,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, + 8,197,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, + 8,197,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, + 8,197,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, + 8,197,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, + 8,197,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, + 8,197,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, + 8,197,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, + 8,197,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, + 8,197,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, + 8,197,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, + 8,197,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, + 8,197,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, + 8,197,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, + 8,197,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, + 8,197,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, + 8,197,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, + 8,197,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, + 8,197,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, + 8,197,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, +232,203,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, +232,203,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, +232,203,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, +232,203,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, +232,203,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, +232,203,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, +232,203,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, +232,203,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, +232,203,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, +232,203,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, +232,203,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, +232,203,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, +232,203,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, +232,203,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, +232,203,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, +232,203,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, +232,203,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, +232,203,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, +232,203,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, +232,203,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, +232,203,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, +232,203,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, +232,203,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, +232,203,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, +232,203,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, +232,203,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, +232,203,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, +232,203,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, +232,203,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, +232,203,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, +232,203,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, +232,203,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, +232,203,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, +232,203,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, +232,203,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, +200,210,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, +200,210,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, +200,210,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, +200,210,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, +200,210,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, +200,210,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, +200,210,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, +200,210,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, +200,210,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, +200,210,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, +200,210,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, +200,210,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, +200,210,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, +200,210,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, +200,210,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, +200,210,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, +200,210,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, +200,210,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, +200,210,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, +200,210,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, +200,210,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, +200,210,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, +200,210,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, +200,210,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, +200,210,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, +200,210,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, +200,210,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, +200,210,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, +200,210,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, +200,210,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, +200,210,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, +200,210,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, +200,210,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, +200,210,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, +200,210,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, +168,217,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, +168,217,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, +168,217,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, +168,217,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, +168,217,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, +168,217,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, +168,217,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, +168,217,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, +168,217,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, +168,217,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, +168,217,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, +168,217,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, +168,217,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, +168,217,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, +168,217,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, +168,217,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, +168,217,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, +168,217,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, +168,217,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, +168,217,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, +168,217,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, +168,217,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, +168,217,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, +168,217,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, +168,217,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, +168,217,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, +168,217,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, +168,217,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, +168,217,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, +168,217,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, +168,217,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, +168,217,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, +168,217,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, +168,217,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, +168,217,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, +136,224,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, +136,224,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, +136,224,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, +136,224,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, +136,224,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, +136,224,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, +136,224,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, +136,224,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, +136,224,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, +136,224,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, +136,224,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, +136,224,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, +136,224,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, +136,224,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, +136,224,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, +136,224,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, +136,224,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, +136,224,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, +136,224,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, +136,224,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, +136,224,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, +136,224,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, +136,224,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, +136,224,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, +136,224,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, +136,224,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, +136,224,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, +136,224,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, +136,224,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, +136,224,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, +136,224,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, +136,224,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, +136,224,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, +136,224,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, +136,224,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, +184,212,210, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, +184,212,210, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, +184,212,210, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, +184,212,210, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, +184,212,210, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, +184,212,210, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, +184,212,210, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, +184,212,210, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, +184,212,210, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, +184,212,210, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, +184,212,210, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, +184,212,210, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, +184,212,210, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, +184,212,210, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, +184,212,210, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, +184,212,210, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, +184,212,210, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, +184,212,210, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, +184,212,210, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, +184,212,210, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, +184,212,210, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, +184,212,210, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, +184,212,210, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, +184,212,210, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, +184,212,210, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, +184,212,210, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, +184,212,210, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, +184,212,210, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, +184,212,210, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, +184,212,210, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, +184,212,210, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, +184,212,210, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, +184,212,210, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, +184,212,210, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, +184,212,210, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, +200,219,210, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, +200,219,210, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, +200,219,210, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, +200,219,210, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, +200,219,210, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, +200,219,210, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, +200,219,210, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, +200,219,210, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, +200,219,210, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, +200,219,210, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, +200,219,210, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, +200,219,210, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, +200,219,210, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, +200,219,210, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, +200,219,210, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, +200,219,210, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, +200,219,210, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, +200,219,210, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, +200,219,210, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, +200,219,210, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, +200,219,210, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, +200,219,210, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, +200,219,210, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, +200,219,210, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, +200,219,210, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, +200,219,210, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, +200,219,210, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, +200,219,210, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, +200,219,210, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, +200,219,210, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, +200,219,210, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, +200,219,210, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, +200,219,210, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, +200,219,210, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, +200,219,210, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, +216,226,210, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, +216,226,210, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, +216,226,210, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, +216,226,210, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, +216,226,210, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, +216,226,210, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, +216,226,210, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, +216,226,210, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, +216,226,210, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, +216,226,210, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, +216,226,210, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, +216,226,210, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, +216,226,210, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, +216,226,210, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, +216,226,210, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, +216,226,210, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, +216,226,210, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, +216,226,210, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, +216,226,210, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, +216,226,210, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, +216,226,210, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, +216,226,210, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, +216,226,210, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, +216,226,210, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, +216,226,210, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, +216,226,210, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, +216,226,210, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, +216,226,210, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, +216,226,210, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, +216,226,210, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, +216,226,210, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, +216,226,210, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, +216,226,210, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, +216,226,210, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, +216,226,210, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, +232,233,210, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, +232,233,210, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, +232,233,210, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, +232,233,210, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, +232,233,210, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, +232,233,210, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, +232,233,210, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, +232,233,210, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, +232,233,210, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, +232,233,210, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, +232,233,210, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, +232,233,210, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, +232,233,210, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, +232,233,210, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, +232,233,210, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, +232,233,210, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, +232,233,210, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, +232,233,210, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, +232,233,210, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, +232,233,210, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, +232,233,210, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, +232,233,210, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, +232,233,210, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, +232,233,210, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, +232,233,210, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, +232,233,210, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, +232,233,210, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, +232,233,210, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, +232,233,210, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, +232,233,210, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, +232,233,210, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, +232,233,210, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, +232,233,210, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, +232,233,210, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, +232,233,210, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, +248,240,210, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, +248,240,210, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, +248,240,210, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, +248,240,210, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, +248,240,210, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, +248,240,210, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, +248,240,210, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, +248,240,210, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, +248,240,210, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, +248,240,210, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, +248,240,210, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, +248,240,210, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, +248,240,210, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, +248,240,210, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, +248,240,210, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, +248,240,210, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, +248,240,210, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, +248,240,210, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, +248,240,210, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, +248,240,210, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, +248,240,210, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, +248,240,210, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, +248,240,210, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, +248,240,210, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, +248,240,210, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, +248,240,210, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, +248,240,210, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, +248,240,210, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, +248,240,210, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, +248,240,210, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, +248,240,210, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, +248,240,210, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, +248,240,210, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, +248,240,210, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, +248,240,210, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, +152,231,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, +152,231,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, +152,231,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, +152,231,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, +152,231,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, +152,231,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, +152,231,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, +152,231,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, +152,231,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, +152,231,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, +152,231,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, +152,231,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, +152,231,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, +152,231,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, +152,231,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, +152,231,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, +152,231,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, +152,231,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, +152,231,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, +152,231,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, +152,231,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, +152,231,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, +152,231,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, +152,231,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, +152,231,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, +152,231,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, +152,231,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, +152,231,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, +152,231,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, +152,231,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, +152,231,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, +152,231,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, +152,231,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, +152,231,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, +152,231,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, +168,238,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, +168,238,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, +168,238,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, +168,238,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, +168,238,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, +168,238,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, +168,238,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, +168,238,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, +168,238,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, +168,238,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, +168,238,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, +168,238,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, +168,238,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, +168,238,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, +168,238,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, +168,238,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, +168,238,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, +168,238,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, +168,238,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, +168,238,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, +168,238,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, +168,238,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, +168,238,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, +168,238,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, +168,238,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, +168,238,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, +168,238,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, +168,238,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, +168,238,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, +168,238,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, +168,238,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, +168,238,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, +168,238,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, +168,238,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, +168,238,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, +184,245,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, +184,245,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, +184,245,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, +184,245,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, +184,245,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, +184,245,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, +184,245,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, +184,245,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, +184,245,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, +184,245,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, +184,245,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, +184,245,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, +184,245,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, +184,245,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, +184,245,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, +184,245,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, +184,245,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, +184,245,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, +184,245,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, +184,245,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, +184,245,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, +184,245,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, +184,245,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, +184,245,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, +184,245,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, +184,245,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, +184,245,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, +184,245,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, +184,245,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, +184,245,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, +184,245,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, +184,245,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, +184,245,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, +184,245,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, +184,245,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, +200,252,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, +200,252,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, +200,252,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, +200,252,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, +200,252,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, +200,252,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, +200,252,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, +200,252,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, +200,252,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, +200,252,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, +200,252,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, +200,252,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, +200,252,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, +200,252,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, +200,252,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, +200,252,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, +200,252,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, +200,252,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, +200,252,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, +200,252,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, +200,252,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, +200,252,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, +200,252,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, +200,252,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, +200,252,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, +200,252,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, +200,252,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, +200,252,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, +200,252,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, +200,252,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, +200,252,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, +200,252,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, +200,252,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, +200,252,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, +200,252,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, +216, 3,219, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, +216, 3,219, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, +216, 3,219, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, +216, 3,219, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, +216, 3,219, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, +216, 3,219, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, +216, 3,219, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, +216, 3,219, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, +216, 3,219, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, +216, 3,219, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, +216, 3,219, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, +216, 3,219, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, +216, 3,219, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, +216, 3,219, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, +216, 3,219, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, +216, 3,219, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, +216, 3,219, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, +216, 3,219, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, +216, 3,219, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, +216, 3,219, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, +216, 3,219, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, +216, 3,219, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, +216, 3,219, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, +216, 3,219, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, +216, 3,219, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, +216, 3,219, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, +216, 3,219, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, +216, 3,219, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, +216, 3,219, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, +216, 3,219, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, +216, 3,219, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, +216, 3,219, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, +216, 3,219, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, +216, 3,219, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, +216, 3,219, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, +232, 10,219, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, +232, 10,219, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, +232, 10,219, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, +232, 10,219, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, +232, 10,219, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, +232, 10,219, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, +232, 10,219, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, +232, 10,219, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, +232, 10,219, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, +232, 10,219, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, +232, 10,219, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, +232, 10,219, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, +232, 10,219, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, +232, 10,219, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, +232, 10,219, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, +232, 10,219, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, +232, 10,219, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, +232, 10,219, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, +232, 10,219, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, +232, 10,219, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, +232, 10,219, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, +232, 10,219, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, +232, 10,219, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, +232, 10,219, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, +232, 10,219, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, +232, 10,219, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, +232, 10,219, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, +232, 10,219, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, +232, 10,219, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, +232, 10,219, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, +232, 10,219, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, +232, 10,219, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, +232, 10,219, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, +232, 10,219, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, +232, 10,219, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, +248, 17,219, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, +248, 17,219, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, +248, 17,219, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, +248, 17,219, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, +248, 17,219, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, +248, 17,219, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, +248, 17,219, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, +248, 17,219, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, +248, 17,219, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, +248, 17,219, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, +248, 17,219, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, +248, 17,219, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, +248, 17,219, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, +248, 17,219, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, +248, 17,219, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, +248, 17,219, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, +248, 17,219, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, +248, 17,219, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, +248, 17,219, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, +248, 17,219, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, +248, 17,219, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, +248, 17,219, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, +248, 17,219, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, +248, 17,219, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, +248, 17,219, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, +248, 17,219, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, +248, 17,219, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, +248, 17,219, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, +248, 17,219, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, +248, 17,219, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, +248, 17,219, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, +248, 17,219, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, +248, 17,219, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, +248, 17,219, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, +248, 17,219, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, + 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, + 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, + 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, + 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, + 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, + 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, + 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, + 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, + 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, + 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, + 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, + 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, + 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, + 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, + 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, + 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, + 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, + 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, + 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, + 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, + 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, + 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, + 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, + 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, + 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, + 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, + 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, + 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, + 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, + 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, + 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, + 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, + 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, + 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, + 8, 25,219, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, + 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, + 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, + 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, + 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, + 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, + 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, + 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, + 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, + 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, + 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, + 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, + 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, + 24, 98,200, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,120,209,217, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, +120,209,217, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,120,209,217, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, +120,209,217, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,120,209,217, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, +120,209,217, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,120,209,217, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, +120,209,217, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,120,209,217, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, +120,209,217, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,120,209,217, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, +120,209,217, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,120,209,217, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, +120,209,217, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,120,209,217, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, +120,209,217, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,120,209,217, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, +120,209,217, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,120,209,217, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, +120,209,217, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,120,209,217, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, +120,209,217, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,120,209,217, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, +120,209,217, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,120,209,217, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, +120,209,217, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,120,209,217, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, +120,209,217, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,120,209,217, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, +120,209,217, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,120,209,217, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 70, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 71, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 72, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 73, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 74, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 75, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 76, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 77, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 78, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 79, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 80, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 81, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 82, 0, 1, 0, 0, 0, +152, 7,218, 3, 0, 0, 0, 0, 31, 0, 83, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, +136, 48,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, +136, 48,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, +136, 48,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, +136, 48,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, +136, 48,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, +136, 48,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, +136, 48,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, +136, 48,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, +136, 48,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, +136, 48,218, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, +136, 48,218, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, +136, 48,218, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, +136, 48,218, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, +136, 48,218, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, +136, 48,218, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, +136, 48,218, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0, +136, 48,218, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0, +136, 48,218, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0, +136, 48,218, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0, +136, 48,218, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0, +136, 48,218, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0, +136, 48,218, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0, +136, 48,218, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0, +136, 48,218, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0, +136, 48,218, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0, +136, 48,218, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 70, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 71, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 72, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 73, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 74, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 75, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 76, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 77, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 78, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 79, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 80, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 81, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 82, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 83, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 84, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 85, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 86, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 87, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 88, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 89, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 90, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 91, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 92, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 93, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 94, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 95, 0, 1, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 31, 0, 96, 0, 1, 0, 0, 0, +200,213,217, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 70, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 71, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 72, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 73, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 74, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 75, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 76, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 77, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 78, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 79, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 80, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 81, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 82, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 83, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 84, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 85, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 86, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 87, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 88, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 89, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 90, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 91, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 92, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 93, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 94, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 95, 0, 1, 0, 0, 0, +184,219,217, 3, 0, 0, 0, 0, 31, 0, 96, 0, 1, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 70, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 71, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 72, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 73, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 74, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 75, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 76, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 77, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 78, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 79, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 80, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 81, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 82, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 83, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 84, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 85, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 86, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 87, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 88, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 89, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 90, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 91, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 92, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 93, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 94, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 95, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0, 31, 0, 96, 0, 1, 0, 0, 0, +168,225,217, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,136, 7,214, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, +136, 7,214, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,136, 7,214, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, +136, 7,214, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,136, 7,214, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, +136, 7,214, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,136, 7,214, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, +136, 7,214, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,136, 7,214, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, +136, 7,214, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 8,156,214, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, + 8,156,214, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 8,156,214, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, + 8,156,214, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 8,156,214, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, + 8,156,214, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 8,156,214, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, + 8,156,214, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 8,156,214, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, + 8,156,214, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,248, 9,215, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, +248, 9,215, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,248, 9,215, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, +248, 9,215, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,248, 9,215, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, +248, 9,215, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,248, 9,215, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, +248, 9,215, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,248, 9,215, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, +248, 9,215, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,152, 66,216, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, +152, 66,216, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,152, 66,216, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, +152, 66,216, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,152, 66,216, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, +152, 66,216, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,152, 66,216, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, +152, 66,216, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,152, 66,216, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, +152, 66,216, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 56, 43,217, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, + 56, 43,217, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 56, 43,217, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, + 56, 43,217, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 56, 43,217, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, + 56, 43,217, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 56, 43,217, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, + 56, 43,217, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 56, 43,217, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, + 56, 43,217, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,232,117,217, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, +232,117,217, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,232,117,217, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, +232,117,217, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,232,117,217, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, +232,117,217, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,232,117,217, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, +232,117,217, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,232,117,217, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, +232,117,217, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 24,157,217, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, + 24,157,217, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 24,157,217, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, + 24,157,217, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 24,157,217, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, + 24,157,217, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 24,157,217, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, + 24,157,217, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 24,157,217, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, + 24,157,217, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,216, 29,218, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, +216, 29,218, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,216, 29,218, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, +216, 29,218, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,216, 29,218, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, +216, 29,218, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,216, 29,218, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, +216, 29,218, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,216, 29,218, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, +216, 29,218, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,216, 29,218, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, +216, 29,218, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,216, 29,218, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, +216, 29,218, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,216, 29,218, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, +216, 29,218, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,216, 29,218, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, +216, 29,218, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,216, 29,218, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, + 8, 78,210, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 8, 78,210, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, + 8, 78,210, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 8, 78,210, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, + 8, 78,210, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 8, 78,210, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, + 8, 78,210, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 8, 78,210, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, + 8, 78,210, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 8, 78,210, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, + 8, 78,210, 3, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, + 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, + 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, + 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, + 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, + 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, + 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, + 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, + 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, + 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, + 24, 51,163, 3, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 24, 51,163, 3, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, + 56, 16,215, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 15,215, 3, 0, 0, 0, 0, +232, 35,201, 3, 0, 0, 0, 0, 40, 32,201, 3, 0, 0, 0, 0, 8, 34,201, 3, 0, 0, 0, 0,136, 36,201, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,111, 4, 0, 0, 85, 0, 0, 0,150, 2, 0, 0, 1, 1,112, 4, 66, 2, 1, 0, + 0, 0, 0, 0, 0, 0, 8, 0,232,105,177, 3, 0, 0, 0, 0,152, 92,215, 3, 0, 0, 0, 0,152, 92,215, 3, 0, 0, 0, 0, + 24,111,215, 3, 0, 0, 0, 0,216,117,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 24,214,207, 3, 0, 0, 0, 0, 88,210,207, 3, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 24,111,215, 3, 0, 0, 0, 0, +215, 0, 0, 0, 1, 0, 0, 0,200,112,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,108, 68, + 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,142, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,111, 4, 0, 0, + 0, 0, 0, 0, 25, 0, 0, 0, 0,224,141, 68, 0, 0,200, 65, 0,224,141, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,112, 4, 26, 0,112, 4, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,111, 4, 0, 0, 85, 0, 0, 0,110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,112, 4, 26, 0, 10, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 88,199,177, 3, 0, 0, 0, 0,248, 77,163, 3, 0, 0, 0, 0,248, 77,163, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,233,207, 3, 0, 0, 0, 0,120,238,207, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,200,112,215, 3, 0, 0, 0, 0, +215, 0, 0, 0, 1, 0, 0, 0,120,114,215, 3, 0, 0, 0, 0, 24,111,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,178, 67, + 0,192, 5,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67, 0, 0,168,195, 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, + 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, + 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, + 10, 1, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,160, 0, 80, 1,143, 0, 80, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,159, 0, 0, 0, 71, 1, 0, 0,150, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,160, 0, 80, 1, 11, 0, 5, 0, 3, 0, 0, 0, 0, 0, 0, 0,160, 0, 50, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 88,195,177, 3, 0, 0, 0, 0,136, 64,163, 3, 0, 0, 0, 0,136, 64,163, 3, 0, 0, 0, 0, +152, 77,215, 3, 0, 0, 0, 0, 8,165,165, 15, 0, 0, 0, 0,136,239,207, 3, 0, 0, 0, 0,184,242,207, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,152, 77,215, 3, 0, 0, 0, 0, +213, 0, 0, 0, 1, 0, 0, 0,120, 79,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,235,223, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95,111, 98,106,101, 99,116,109,111, +100,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95,111, 98,106,101, 99,116,109,111, +100,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 79, 98,106,101, 99,116, 32, 84,111,111,108,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,233,253,143, 0,255, 1, 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, 0, 0, 9, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 88, 1, 0, 0,120, 79,215, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 88, 81,215, 3, 0, 0, 0, 0, +152, 77,215, 3, 0, 0, 0, 0,136, 0,225, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, + 84, 95,116,111,111,108,115, 95, 98,114,117,115,104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, + 84, 95,116,111,111,108,115, 95, 98,114,117,115,104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,114,117,115,104, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,117,254,143, 0,115, 1, + 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 88, 81,215, 3, 0, 0, 0, 0, +213, 0, 0, 0, 1, 0, 0, 0, 56, 83,215, 3, 0, 0, 0, 0,120, 79,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95, 98,114,117,115,104, 95,116,111, +111,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95, 98,114,117,115,104, 95,116,111, +111,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 84,111,111,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 74,254,143, 0, 61, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 88, 1, 0, 0, 56, 83,215, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 24, 85,215, 3, 0, 0, 0, 0, + 88, 81,215, 3, 0, 0, 0, 0,200, 3,225, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, + 84, 95,116,111,111,108,115, 95, 98,114,117,115,104, 95,115,116,114,111,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, + 84, 95,116,111,111,108,115, 95, 98,114,117,115,104, 95,115,116,114,111,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,116,114,111,107,101, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69,254,143, 0, 0, 0, + 0, 0, 0, 0, 4, 0, 4, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 24, 85,215, 3, 0, 0, 0, 0, +213, 0, 0, 0, 1, 0, 0, 0,248, 86,215, 3, 0, 0, 0, 0, 56, 83,215, 3, 0, 0, 0, 0,104, 5,225, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95, 98,114,117,115,104, 95, 99,117, +114,118,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95, 98,114,117,115,104, 95, 99,117, +114,118,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 67,117,114,118,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45,254,143, 0, 0, 0, 0, 0, 0, 0, 4, 0, 4, 0, 0, 0, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 88, 1, 0, 0,248, 86,215, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,216, 88,215, 3, 0, 0, 0, 0, + 24, 85,215, 3, 0, 0, 0, 0, 72, 10,225, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, + 84, 95,116,111,111,108,115, 95, 98,114,117,115,104, 95, 97,112,112,101, 97,114, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, + 84, 95,116,111,111,108,115, 95, 98,114,117,115,104, 95, 97,112,112,101, 97,114, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65,112,112,101, 97,114, 97,110, + 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,229,253,143, 0, 0, 0, + 0, 0, 0, 0, 4, 0, 4, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,216, 88,215, 3, 0, 0, 0, 0, +213, 0, 0, 0, 1, 0, 0, 0,200,168,165, 15, 0, 0, 0, 0,248, 86,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95,118,101,114,116,101,120,112, 97, +105,110,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95,118,101,114,116,101,120,112, 97, +105,110,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 79,112,116,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 63, 0, 0, 0, 1, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,136,193, 43, 5, 0, 0, 0, 0,215, 0, 0, 0, - 1, 0, 0, 0, 8,122, 44, 5, 0, 0, 0, 0,152,188, 43, 5, 0, 0, 0, 0,216,140, 43, 5, 0, 0, 0, 0,104,140, 43, 5, - 0, 0, 0, 0,136,139, 43, 5, 0, 0, 0, 0, 72,141, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 4, 0, 0, -252, 4, 0, 0, 57, 2, 0, 0,153, 2, 0, 0, 3, 3,204, 0, 97, 0, 1, 0, 0, 0, 0, 0, 0, 0, 8, 0,232,102, 12, 5, - 0, 0, 0, 0, 88,197, 43, 5, 0, 0, 0, 0, 88,197, 43, 5, 0, 0, 0, 0,120,194, 43, 5, 0, 0, 0, 0,232,195, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136,204,184, 77,130,127, 0, 0,120, 25,151, 77, -130,127, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,120,194, 43, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0,232,195, 43, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,244, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 55, - 0, 0, 76, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,203, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 75, 67, - 0, 0,200, 65, 0, 0, 75, 67, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, - 10, 0,204, 0, 26, 0,204, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 4, 0, 0, -252, 4, 0, 0,128, 2, 0, 0,153, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,204, 0, 26, 0, - 8, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248,104, 12, 5, - 0, 0, 0, 0,200, 39,244, 77,130,127, 0, 0,200, 39,244, 77,130,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 56,225, 53, 76,130,127, 0, 0,168,227, 53, 76,130,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,232,195, 43, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,120,194, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,141, 67, 0, 0,244,194, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 59, 67, 0, 0,172,194, 0, 0, 4,194,187, 0, 0, 0,204, 0, 0, 0, 18, 0, 0, 0, 70, 0, 0, 0, 0, 0, 0, 0, -186, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,186, 0, 0, 0, 18, 0, 0, 0, 70, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 18, 0, 0, 0, 2, 0, 3, 3, 0, 0, 12, 4, - 6, 0,204, 0, 71, 0,187, 0, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 4, 0, 0, -252, 4, 0, 0, 57, 2, 0, 0,127, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,204, 0, 71, 0, - 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,104, 12, 5, - 0, 0, 0, 0, 40, 21,188, 77,130,127, 0, 0, 40, 21,188, 77,130,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,232,228, 53, 76,130,127, 0, 0, 88,231, 53, 76,130,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 24, 1, 0, 0, 88,197, 43, 5, 0, 0, 0, 0,184, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 8, 51,139, 77,130,127, 0, 0, 8, 51,139, 77,130,127, 0, 0,184,198, 43, 5, 0, 0, 0, 0, 0,115,101, 32, - 83, 99,117,108,112,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 68, 65, 84, 65, 16, 0, 0, 0,184,198, 43, 5, - 0, 0, 0, 0,238, 0, 0, 0, 1, 0, 0, 0, 42, 11, 0, 0, 42, 11, 0, 0, 24,199, 43, 5, 0, 0, 0, 0, 68, 65, 84, 65, -160,178, 0, 0, 24,199, 43, 5, 0, 0, 0, 0,237, 0, 0, 0, 42, 11, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 88,162, 45, 5, - 0, 0, 0, 0, 19, 0, 0, 0, 1, 0, 1, 0, 88,162, 45, 5, 0, 0, 0, 0, 20, 0, 0, 0, 1, 0, 1, 0, 88,162, 45, 5, - 0, 0, 0, 0, 21, 0, 1, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 8,189, 45, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,120,198, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 8, 30, 47, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,168,212, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 8,123, 46, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 8,206, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 72,184, 45, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,216,191, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 56,183, 45, 5, - 0, 0, 0, 0, 21, 0, 0, 0, 1, 0, 1, 0, 88,162, 45, 5, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 8, 45, 47, 5, - 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,232, 63, 47, 5, - 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,152, 72, 47, 5, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 72, 81, 47, 5, - 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,248, 89, 47, 5, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,168, 98, 47, 5, - 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 88,107, 47, 5, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 8,116, 47, 5, - 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,184,124, 47, 5, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,104,133, 47, 5, - 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 24,142, 47, 5, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,200,150, 47, 5, - 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,120,159, 47, 5, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 40,168, 47, 5, - 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,216,176, 47, 5, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,136,185, 47, 5, - 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 56,194, 47, 5, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,232,202, 47, 5, - 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,152,211, 47, 5, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 72,220, 47, 5, - 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,248,228, 47, 5, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,168,237, 47, 5, - 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 88,246, 47, 5, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 8,255, 47, 5, - 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,184, 7, 48, 5, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,104, 16, 48, 5, - 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,200, 33, 48, 5, - 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,120, 42, 48, 5, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 8, 45, 47, 5, - 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 8, 45, 47, 5, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 8, 45, 47, 5, - 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 8, 45, 47, 5, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 8, 45, 47, 5, - 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 8, 45, 47, 5, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 8, 45, 47, 5, - 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 8, 45, 47, 5, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 8, 45, 47, 5, - 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 8, 45, 47, 5, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 8, 45, 47, 5, - 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, 8, 45, 47, 5, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 8, 45, 47, 5, - 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, 8, 45, 47, 5, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 8, 45, 47, 5, - 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, 8, 45, 47, 5, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 8, 45, 47, 5, - 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, 8, 45, 47, 5, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 8, 45, 47, 5, - 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, 8, 45, 47, 5, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 8, 45, 47, 5, - 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, 8, 45, 47, 5, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, 8, 45, 47, 5, - 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, 8, 45, 47, 5, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, 8, 45, 47, 5, - 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, 8, 45, 47, 5, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, 8, 45, 47, 5, - 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, 8, 45, 47, 5, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, 8, 45, 47, 5, - 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, 8, 45, 47, 5, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, 8, 45, 47, 5, - 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, 8, 45, 47, 5, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0, 8, 45, 47, 5, - 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, 8, 45, 47, 5, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0, 8, 45, 47, 5, - 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, 8, 45, 47, 5, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0, 8, 45, 47, 5, - 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, 8, 45, 47, 5, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0, 8, 45, 47, 5, - 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, 8, 45, 47, 5, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0, 8, 45, 47, 5, - 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, 8, 45, 47, 5, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0, 8, 45, 47, 5, - 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, 8, 45, 47, 5, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0, 8, 45, 47, 5, - 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, 8, 45, 47, 5, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0, 8, 45, 47, 5, - 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, 8, 45, 47, 5, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0, 8, 45, 47, 5, - 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, 8, 45, 47, 5, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0, 8, 45, 47, 5, - 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, 8, 45, 47, 5, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0, 8, 45, 47, 5, - 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, 8, 45, 47, 5, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0, 8, 45, 47, 5, - 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, 8, 45, 47, 5, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0, 8, 45, 47, 5, - 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, 8, 45, 47, 5, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0, 8, 45, 47, 5, - 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, 8, 45, 47, 5, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0, 8, 45, 47, 5, - 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, 8, 45, 47, 5, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0, 8, 45, 47, 5, - 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, 8, 45, 47, 5, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0, 8, 45, 47, 5, - 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, 8, 45, 47, 5, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0, 8, 45, 47, 5, - 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, 8, 45, 47, 5, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0, 8, 45, 47, 5, - 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, 8, 45, 47, 5, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 56,183, 45, 5, - 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 72,184, 45, 5, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 8, 30, 47, 5, 0, 0, 0, 0, 30, 0,255,255, 3, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,184,182, 42, 5, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,136, 27, 43, 5, - 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 8,136, 43, 5, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,104,139, 44, 5, - 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,120,219, 44, 5, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0,232, 42, 45, 5, - 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 8,114, 45, 5, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 8,123, 46, 5, - 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 24,181, 42, 5, 0, 0, 0, 0, 30, 0,255,255, 1, 0, 0, 0, 8,189, 45, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 56, 55, 47, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 56, 55, 47, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 56, 55, 47, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 56, 55, 47, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 56, 55, 47, 5, - 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, 56, 55, 47, 5, - 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, 56, 55, 47, 5, - 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, 56, 55, 47, 5, - 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, 56, 55, 47, 5, - 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, 56, 55, 47, 5, - 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, 56, 55, 47, 5, - 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, 56, 55, 47, 5, - 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, 56, 55, 47, 5, - 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, 56, 55, 47, 5, - 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, 56, 55, 47, 5, - 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, 56, 55, 47, 5, - 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, 56, 55, 47, 5, - 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, 56, 55, 47, 5, - 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, 56, 55, 47, 5, - 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, 56, 55, 47, 5, - 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, 56, 55, 47, 5, - 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, 56, 55, 47, 5, - 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, 56, 55, 47, 5, - 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, 56, 55, 47, 5, - 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, 56, 55, 47, 5, - 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, 56, 55, 47, 5, - 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, 56, 55, 47, 5, - 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, 56, 55, 47, 5, - 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, 56, 55, 47, 5, - 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, 56, 55, 47, 5, - 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, 56, 55, 47, 5, - 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, 56, 55, 47, 5, - 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, 56, 55, 47, 5, - 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, 56, 55, 47, 5, - 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, 56, 55, 47, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,232, 63, 47, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,232, 63, 47, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,232, 63, 47, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,232, 63, 47, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,232, 63, 47, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,232, 63, 47, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,232, 63, 47, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,232, 63, 47, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,232, 63, 47, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,232, 63, 47, 5, - 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,232, 63, 47, 5, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,232, 63, 47, 5, - 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,232, 63, 47, 5, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,232, 63, 47, 5, - 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,232, 63, 47, 5, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,232, 63, 47, 5, - 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,232, 63, 47, 5, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,232, 63, 47, 5, - 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,232, 63, 47, 5, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,232, 63, 47, 5, - 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,232, 63, 47, 5, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,232, 63, 47, 5, - 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,232, 63, 47, 5, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,232, 63, 47, 5, - 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,232, 63, 47, 5, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,232, 63, 47, 5, - 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,232, 63, 47, 5, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,232, 63, 47, 5, - 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,232, 63, 47, 5, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,232, 63, 47, 5, - 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,232, 63, 47, 5, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,232, 63, 47, 5, - 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,232, 63, 47, 5, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,232, 63, 47, 5, - 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,232, 63, 47, 5, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,232, 63, 47, 5, - 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,232, 63, 47, 5, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,232, 63, 47, 5, - 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,232, 63, 47, 5, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,232, 63, 47, 5, - 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,232, 63, 47, 5, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,232, 63, 47, 5, - 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,232, 63, 47, 5, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,232, 63, 47, 5, - 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,232, 63, 47, 5, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,232, 63, 47, 5, - 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,232, 63, 47, 5, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,232, 63, 47, 5, - 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,232, 63, 47, 5, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,232, 63, 47, 5, - 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,232, 63, 47, 5, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,232, 63, 47, 5, - 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,232, 63, 47, 5, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,232, 63, 47, 5, - 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,232, 63, 47, 5, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,232, 63, 47, 5, - 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,232, 63, 47, 5, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,232, 63, 47, 5, - 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,232, 63, 47, 5, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,232, 63, 47, 5, - 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,232, 63, 47, 5, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,232, 63, 47, 5, - 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,232, 63, 47, 5, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,232, 63, 47, 5, - 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,232, 63, 47, 5, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,232, 63, 47, 5, - 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,232, 63, 47, 5, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,232, 63, 47, 5, - 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,232, 63, 47, 5, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,232, 63, 47, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,152, 72, 47, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,152, 72, 47, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,152, 72, 47, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,152, 72, 47, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,152, 72, 47, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,152, 72, 47, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,152, 72, 47, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,152, 72, 47, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,152, 72, 47, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,152, 72, 47, 5, - 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,152, 72, 47, 5, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,152, 72, 47, 5, - 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,152, 72, 47, 5, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,152, 72, 47, 5, - 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,152, 72, 47, 5, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,152, 72, 47, 5, - 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,152, 72, 47, 5, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,152, 72, 47, 5, - 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,152, 72, 47, 5, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,152, 72, 47, 5, - 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,152, 72, 47, 5, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,152, 72, 47, 5, - 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,152, 72, 47, 5, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,152, 72, 47, 5, - 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,152, 72, 47, 5, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,152, 72, 47, 5, - 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,152, 72, 47, 5, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,152, 72, 47, 5, - 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,152, 72, 47, 5, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,152, 72, 47, 5, - 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,152, 72, 47, 5, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,152, 72, 47, 5, - 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,152, 72, 47, 5, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,152, 72, 47, 5, - 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,152, 72, 47, 5, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,152, 72, 47, 5, - 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,152, 72, 47, 5, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,152, 72, 47, 5, - 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,152, 72, 47, 5, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,152, 72, 47, 5, - 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,152, 72, 47, 5, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,152, 72, 47, 5, - 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,152, 72, 47, 5, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,152, 72, 47, 5, - 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,152, 72, 47, 5, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,152, 72, 47, 5, - 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,152, 72, 47, 5, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,152, 72, 47, 5, - 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,152, 72, 47, 5, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,152, 72, 47, 5, - 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,152, 72, 47, 5, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,152, 72, 47, 5, - 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,152, 72, 47, 5, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,152, 72, 47, 5, - 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,152, 72, 47, 5, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,152, 72, 47, 5, - 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,152, 72, 47, 5, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,152, 72, 47, 5, - 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,152, 72, 47, 5, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,152, 72, 47, 5, - 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,152, 72, 47, 5, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,152, 72, 47, 5, - 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,152, 72, 47, 5, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,152, 72, 47, 5, - 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,152, 72, 47, 5, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,152, 72, 47, 5, - 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,152, 72, 47, 5, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,152, 72, 47, 5, - 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,152, 72, 47, 5, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,152, 72, 47, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 72, 81, 47, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 72, 81, 47, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 72, 81, 47, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 72, 81, 47, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 72, 81, 47, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 72, 81, 47, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 72, 81, 47, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 72, 81, 47, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 72, 81, 47, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 72, 81, 47, 5, - 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 72, 81, 47, 5, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, 72, 81, 47, 5, - 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 72, 81, 47, 5, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, 72, 81, 47, 5, - 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 72, 81, 47, 5, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, 72, 81, 47, 5, - 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 72, 81, 47, 5, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, 72, 81, 47, 5, - 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 72, 81, 47, 5, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, 72, 81, 47, 5, - 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 72, 81, 47, 5, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, 72, 81, 47, 5, - 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, 72, 81, 47, 5, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, 72, 81, 47, 5, - 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, 72, 81, 47, 5, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, 72, 81, 47, 5, - 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, 72, 81, 47, 5, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, 72, 81, 47, 5, - 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, 72, 81, 47, 5, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, 72, 81, 47, 5, - 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, 72, 81, 47, 5, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, 72, 81, 47, 5, - 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0, 72, 81, 47, 5, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, 72, 81, 47, 5, - 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0, 72, 81, 47, 5, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, 72, 81, 47, 5, - 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0, 72, 81, 47, 5, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, 72, 81, 47, 5, - 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0, 72, 81, 47, 5, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, 72, 81, 47, 5, - 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0, 72, 81, 47, 5, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, 72, 81, 47, 5, - 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0, 72, 81, 47, 5, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, 72, 81, 47, 5, - 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0, 72, 81, 47, 5, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, 72, 81, 47, 5, - 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0, 72, 81, 47, 5, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, 72, 81, 47, 5, - 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0, 72, 81, 47, 5, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, 72, 81, 47, 5, - 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0, 72, 81, 47, 5, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, 72, 81, 47, 5, - 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0, 72, 81, 47, 5, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, 72, 81, 47, 5, - 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0, 72, 81, 47, 5, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, 72, 81, 47, 5, - 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0, 72, 81, 47, 5, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, 72, 81, 47, 5, - 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0, 72, 81, 47, 5, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, 72, 81, 47, 5, - 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0, 72, 81, 47, 5, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, 72, 81, 47, 5, - 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0, 72, 81, 47, 5, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, 72, 81, 47, 5, - 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0, 72, 81, 47, 5, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, 72, 81, 47, 5, - 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0, 72, 81, 47, 5, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, 72, 81, 47, 5, - 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0, 72, 81, 47, 5, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, 72, 81, 47, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,248, 89, 47, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,248, 89, 47, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,248, 89, 47, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,248, 89, 47, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,248, 89, 47, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,248, 89, 47, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,248, 89, 47, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,248, 89, 47, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,248, 89, 47, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,248, 89, 47, 5, - 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,248, 89, 47, 5, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,248, 89, 47, 5, - 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,248, 89, 47, 5, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,248, 89, 47, 5, - 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,248, 89, 47, 5, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,248, 89, 47, 5, - 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,248, 89, 47, 5, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,248, 89, 47, 5, - 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,248, 89, 47, 5, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,248, 89, 47, 5, - 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,248, 89, 47, 5, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,248, 89, 47, 5, - 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,248, 89, 47, 5, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,248, 89, 47, 5, - 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,248, 89, 47, 5, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,248, 89, 47, 5, - 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,248, 89, 47, 5, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,248, 89, 47, 5, - 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,248, 89, 47, 5, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,248, 89, 47, 5, - 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,248, 89, 47, 5, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,248, 89, 47, 5, - 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,248, 89, 47, 5, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,248, 89, 47, 5, - 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,248, 89, 47, 5, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,248, 89, 47, 5, - 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,248, 89, 47, 5, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,248, 89, 47, 5, - 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,248, 89, 47, 5, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,248, 89, 47, 5, - 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,248, 89, 47, 5, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,248, 89, 47, 5, - 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,248, 89, 47, 5, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,248, 89, 47, 5, - 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,248, 89, 47, 5, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,248, 89, 47, 5, - 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,248, 89, 47, 5, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,248, 89, 47, 5, - 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,248, 89, 47, 5, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,248, 89, 47, 5, - 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,248, 89, 47, 5, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,248, 89, 47, 5, - 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,248, 89, 47, 5, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,248, 89, 47, 5, - 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,248, 89, 47, 5, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,248, 89, 47, 5, - 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,248, 89, 47, 5, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,248, 89, 47, 5, - 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,248, 89, 47, 5, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,248, 89, 47, 5, - 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,248, 89, 47, 5, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,248, 89, 47, 5, - 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,248, 89, 47, 5, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,248, 89, 47, 5, - 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,248, 89, 47, 5, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,248, 89, 47, 5, - 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,248, 89, 47, 5, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,248, 89, 47, 5, - 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,248, 89, 47, 5, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,248, 89, 47, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,168, 98, 47, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,168, 98, 47, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,168, 98, 47, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,168, 98, 47, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,168, 98, 47, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,168, 98, 47, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,168, 98, 47, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,168, 98, 47, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,168, 98, 47, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,168, 98, 47, 5, - 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,168, 98, 47, 5, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,168, 98, 47, 5, - 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,168, 98, 47, 5, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,168, 98, 47, 5, - 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,168, 98, 47, 5, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,168, 98, 47, 5, - 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,168, 98, 47, 5, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,168, 98, 47, 5, - 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,168, 98, 47, 5, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,168, 98, 47, 5, - 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,168, 98, 47, 5, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,168, 98, 47, 5, - 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,168, 98, 47, 5, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,168, 98, 47, 5, - 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,168, 98, 47, 5, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,168, 98, 47, 5, - 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,168, 98, 47, 5, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,168, 98, 47, 5, - 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,168, 98, 47, 5, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,168, 98, 47, 5, - 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,168, 98, 47, 5, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,168, 98, 47, 5, - 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,168, 98, 47, 5, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,168, 98, 47, 5, - 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,168, 98, 47, 5, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,168, 98, 47, 5, - 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,168, 98, 47, 5, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,168, 98, 47, 5, - 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,168, 98, 47, 5, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,168, 98, 47, 5, - 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,168, 98, 47, 5, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,168, 98, 47, 5, - 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,168, 98, 47, 5, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,168, 98, 47, 5, - 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,168, 98, 47, 5, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,168, 98, 47, 5, - 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,168, 98, 47, 5, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,168, 98, 47, 5, - 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,168, 98, 47, 5, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,168, 98, 47, 5, - 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,168, 98, 47, 5, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,168, 98, 47, 5, - 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,168, 98, 47, 5, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,168, 98, 47, 5, - 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,168, 98, 47, 5, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,168, 98, 47, 5, - 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,168, 98, 47, 5, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,168, 98, 47, 5, - 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,168, 98, 47, 5, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,168, 98, 47, 5, - 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,168, 98, 47, 5, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,168, 98, 47, 5, - 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,168, 98, 47, 5, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,168, 98, 47, 5, - 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,168, 98, 47, 5, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,168, 98, 47, 5, - 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,168, 98, 47, 5, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,168, 98, 47, 5, - 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,168, 98, 47, 5, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,168, 98, 47, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 88,107, 47, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 88,107, 47, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 88,107, 47, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 88,107, 47, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 88,107, 47, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 88,107, 47, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 88,107, 47, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 88,107, 47, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 88,107, 47, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 88,107, 47, 5, - 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 88,107, 47, 5, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, 88,107, 47, 5, - 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 88,107, 47, 5, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, 88,107, 47, 5, - 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 88,107, 47, 5, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, 88,107, 47, 5, - 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 88,107, 47, 5, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, 88,107, 47, 5, - 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 88,107, 47, 5, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, 88,107, 47, 5, - 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 88,107, 47, 5, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, 88,107, 47, 5, - 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, 88,107, 47, 5, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, 88,107, 47, 5, - 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, 88,107, 47, 5, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, 88,107, 47, 5, - 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, 88,107, 47, 5, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, 88,107, 47, 5, - 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, 88,107, 47, 5, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, 88,107, 47, 5, - 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, 88,107, 47, 5, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, 88,107, 47, 5, - 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0, 88,107, 47, 5, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, 88,107, 47, 5, - 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0, 88,107, 47, 5, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, 88,107, 47, 5, - 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0, 88,107, 47, 5, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, 88,107, 47, 5, - 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0, 88,107, 47, 5, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, 88,107, 47, 5, - 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0, 88,107, 47, 5, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, 88,107, 47, 5, - 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0, 88,107, 47, 5, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, 88,107, 47, 5, - 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0, 88,107, 47, 5, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, 88,107, 47, 5, - 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0, 88,107, 47, 5, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, 88,107, 47, 5, - 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0, 88,107, 47, 5, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, 88,107, 47, 5, - 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0, 88,107, 47, 5, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, 88,107, 47, 5, - 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0, 88,107, 47, 5, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, 88,107, 47, 5, - 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0, 88,107, 47, 5, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, 88,107, 47, 5, - 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0, 88,107, 47, 5, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, 88,107, 47, 5, - 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0, 88,107, 47, 5, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, 88,107, 47, 5, - 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0, 88,107, 47, 5, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, 88,107, 47, 5, - 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0, 88,107, 47, 5, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, 88,107, 47, 5, - 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0, 88,107, 47, 5, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, 88,107, 47, 5, - 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0, 88,107, 47, 5, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, 88,107, 47, 5, - 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0, 88,107, 47, 5, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, 88,107, 47, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 8,116, 47, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 8,116, 47, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 8,116, 47, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 8,116, 47, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 8,116, 47, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 8,116, 47, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 8,116, 47, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 8,116, 47, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 8,116, 47, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 8,116, 47, 5, - 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 8,116, 47, 5, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, 8,116, 47, 5, - 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 8,116, 47, 5, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, 8,116, 47, 5, - 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 8,116, 47, 5, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, 8,116, 47, 5, - 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 8,116, 47, 5, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, 8,116, 47, 5, - 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 8,116, 47, 5, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, 8,116, 47, 5, - 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 8,116, 47, 5, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, 8,116, 47, 5, - 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, 8,116, 47, 5, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, 8,116, 47, 5, - 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, 8,116, 47, 5, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, 8,116, 47, 5, - 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, 8,116, 47, 5, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, 8,116, 47, 5, - 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, 8,116, 47, 5, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, 8,116, 47, 5, - 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, 8,116, 47, 5, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, 8,116, 47, 5, - 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0, 8,116, 47, 5, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, 8,116, 47, 5, - 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0, 8,116, 47, 5, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, 8,116, 47, 5, - 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0, 8,116, 47, 5, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, 8,116, 47, 5, - 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0, 8,116, 47, 5, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, 8,116, 47, 5, - 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0, 8,116, 47, 5, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, 8,116, 47, 5, - 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0, 8,116, 47, 5, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, 8,116, 47, 5, - 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0, 8,116, 47, 5, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, 8,116, 47, 5, - 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0, 8,116, 47, 5, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, 8,116, 47, 5, - 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0, 8,116, 47, 5, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, 8,116, 47, 5, - 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0, 8,116, 47, 5, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, 8,116, 47, 5, - 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0, 8,116, 47, 5, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, 8,116, 47, 5, - 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0, 8,116, 47, 5, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, 8,116, 47, 5, - 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0, 8,116, 47, 5, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, 8,116, 47, 5, - 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0, 8,116, 47, 5, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, 8,116, 47, 5, - 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0, 8,116, 47, 5, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, 8,116, 47, 5, - 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0, 8,116, 47, 5, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, 8,116, 47, 5, - 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0, 8,116, 47, 5, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, 8,116, 47, 5, - 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0, 8,116, 47, 5, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, 8,116, 47, 5, - 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0, 8,116, 47, 5, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, 8,116, 47, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,184,124, 47, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,184,124, 47, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,184,124, 47, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,184,124, 47, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,184,124, 47, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,184,124, 47, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,184,124, 47, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,184,124, 47, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,184,124, 47, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,184,124, 47, 5, - 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,184,124, 47, 5, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,184,124, 47, 5, - 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,184,124, 47, 5, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,184,124, 47, 5, - 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,184,124, 47, 5, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,184,124, 47, 5, - 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,184,124, 47, 5, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,184,124, 47, 5, - 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,184,124, 47, 5, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,184,124, 47, 5, - 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,184,124, 47, 5, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,184,124, 47, 5, - 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,184,124, 47, 5, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,184,124, 47, 5, - 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,184,124, 47, 5, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,184,124, 47, 5, - 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,184,124, 47, 5, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,184,124, 47, 5, - 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,184,124, 47, 5, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,184,124, 47, 5, - 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,184,124, 47, 5, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,184,124, 47, 5, - 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,184,124, 47, 5, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,184,124, 47, 5, - 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,184,124, 47, 5, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,184,124, 47, 5, - 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,184,124, 47, 5, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,184,124, 47, 5, - 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,184,124, 47, 5, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,184,124, 47, 5, - 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,184,124, 47, 5, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,184,124, 47, 5, - 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,184,124, 47, 5, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,184,124, 47, 5, - 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,184,124, 47, 5, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,184,124, 47, 5, - 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,184,124, 47, 5, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,184,124, 47, 5, - 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,184,124, 47, 5, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,184,124, 47, 5, - 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,184,124, 47, 5, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,184,124, 47, 5, - 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,184,124, 47, 5, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,184,124, 47, 5, - 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,184,124, 47, 5, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,184,124, 47, 5, - 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,184,124, 47, 5, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,184,124, 47, 5, - 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,184,124, 47, 5, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,184,124, 47, 5, - 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,184,124, 47, 5, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,184,124, 47, 5, - 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,184,124, 47, 5, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,184,124, 47, 5, - 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,184,124, 47, 5, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,184,124, 47, 5, - 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,184,124, 47, 5, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,184,124, 47, 5, - 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,184,124, 47, 5, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,184,124, 47, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,104,133, 47, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,104,133, 47, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,104,133, 47, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,104,133, 47, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,104,133, 47, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,104,133, 47, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,104,133, 47, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,104,133, 47, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,104,133, 47, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,104,133, 47, 5, - 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,104,133, 47, 5, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,104,133, 47, 5, - 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,104,133, 47, 5, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,104,133, 47, 5, - 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,104,133, 47, 5, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,104,133, 47, 5, - 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,104,133, 47, 5, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,104,133, 47, 5, - 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,104,133, 47, 5, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,104,133, 47, 5, - 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,104,133, 47, 5, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,104,133, 47, 5, - 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,104,133, 47, 5, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,104,133, 47, 5, - 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,104,133, 47, 5, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,104,133, 47, 5, - 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,104,133, 47, 5, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,104,133, 47, 5, - 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,104,133, 47, 5, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,104,133, 47, 5, - 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,104,133, 47, 5, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,104,133, 47, 5, - 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,104,133, 47, 5, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,104,133, 47, 5, - 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,104,133, 47, 5, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,104,133, 47, 5, - 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,104,133, 47, 5, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,104,133, 47, 5, - 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,104,133, 47, 5, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,104,133, 47, 5, - 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,104,133, 47, 5, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,104,133, 47, 5, - 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,104,133, 47, 5, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,104,133, 47, 5, - 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,104,133, 47, 5, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,104,133, 47, 5, - 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,104,133, 47, 5, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,104,133, 47, 5, - 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,104,133, 47, 5, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,104,133, 47, 5, - 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,104,133, 47, 5, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,104,133, 47, 5, - 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,104,133, 47, 5, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,104,133, 47, 5, - 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,104,133, 47, 5, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,104,133, 47, 5, - 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,104,133, 47, 5, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,104,133, 47, 5, - 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,104,133, 47, 5, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,104,133, 47, 5, - 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,104,133, 47, 5, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,104,133, 47, 5, - 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,104,133, 47, 5, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,104,133, 47, 5, - 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,104,133, 47, 5, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,104,133, 47, 5, - 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,104,133, 47, 5, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,104,133, 47, 5, - 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,104,133, 47, 5, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,104,133, 47, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 24,142, 47, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 24,142, 47, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 24,142, 47, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 24,142, 47, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 24,142, 47, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 24,142, 47, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 24,142, 47, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 24,142, 47, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 24,142, 47, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 24,142, 47, 5, - 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 24,142, 47, 5, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, 24,142, 47, 5, - 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 24,142, 47, 5, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, 24,142, 47, 5, - 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 24,142, 47, 5, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, 24,142, 47, 5, - 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 24,142, 47, 5, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, 24,142, 47, 5, - 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 24,142, 47, 5, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, 24,142, 47, 5, - 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 24,142, 47, 5, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, 24,142, 47, 5, - 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, 24,142, 47, 5, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, 24,142, 47, 5, - 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, 24,142, 47, 5, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, 24,142, 47, 5, - 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, 24,142, 47, 5, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, 24,142, 47, 5, - 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, 24,142, 47, 5, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, 24,142, 47, 5, - 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, 24,142, 47, 5, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, 24,142, 47, 5, - 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0, 24,142, 47, 5, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, 24,142, 47, 5, - 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0, 24,142, 47, 5, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, 24,142, 47, 5, - 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0, 24,142, 47, 5, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, 24,142, 47, 5, - 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0, 24,142, 47, 5, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, 24,142, 47, 5, - 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0, 24,142, 47, 5, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, 24,142, 47, 5, - 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0, 24,142, 47, 5, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, 24,142, 47, 5, - 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0, 24,142, 47, 5, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, 24,142, 47, 5, - 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0, 24,142, 47, 5, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, 24,142, 47, 5, - 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0, 24,142, 47, 5, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, 24,142, 47, 5, - 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0, 24,142, 47, 5, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, 24,142, 47, 5, - 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0, 24,142, 47, 5, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, 24,142, 47, 5, - 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0, 24,142, 47, 5, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, 24,142, 47, 5, - 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0, 24,142, 47, 5, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, 24,142, 47, 5, - 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0, 24,142, 47, 5, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, 24,142, 47, 5, - 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0, 24,142, 47, 5, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, 24,142, 47, 5, - 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0, 24,142, 47, 5, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, 24,142, 47, 5, - 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0, 24,142, 47, 5, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, 24,142, 47, 5, - 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0, 24,142, 47, 5, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, 24,142, 47, 5, - 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0, 24,142, 47, 5, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, 24,142, 47, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,200,150, 47, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,200,150, 47, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,200,150, 47, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,200,150, 47, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,200,150, 47, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,200,150, 47, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,200,150, 47, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,200,150, 47, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,200,150, 47, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,200,150, 47, 5, - 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,200,150, 47, 5, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,200,150, 47, 5, - 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,200,150, 47, 5, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,200,150, 47, 5, - 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,200,150, 47, 5, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,200,150, 47, 5, - 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,200,150, 47, 5, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,200,150, 47, 5, - 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,200,150, 47, 5, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,200,150, 47, 5, - 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,200,150, 47, 5, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,200,150, 47, 5, - 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,200,150, 47, 5, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,200,150, 47, 5, - 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,200,150, 47, 5, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,200,150, 47, 5, - 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,200,150, 47, 5, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,200,150, 47, 5, - 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,200,150, 47, 5, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,200,150, 47, 5, - 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,200,150, 47, 5, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,200,150, 47, 5, - 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,200,150, 47, 5, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,200,150, 47, 5, - 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,200,150, 47, 5, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,200,150, 47, 5, - 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,200,150, 47, 5, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,200,150, 47, 5, - 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,200,150, 47, 5, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,200,150, 47, 5, - 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,200,150, 47, 5, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,200,150, 47, 5, - 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,200,150, 47, 5, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,200,150, 47, 5, - 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,200,150, 47, 5, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,200,150, 47, 5, - 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,200,150, 47, 5, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,200,150, 47, 5, - 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,200,150, 47, 5, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,200,150, 47, 5, - 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,200,150, 47, 5, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,200,150, 47, 5, - 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,200,150, 47, 5, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,200,150, 47, 5, - 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,200,150, 47, 5, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,200,150, 47, 5, - 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,200,150, 47, 5, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,200,150, 47, 5, - 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,200,150, 47, 5, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,200,150, 47, 5, - 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,200,150, 47, 5, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,200,150, 47, 5, - 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,200,150, 47, 5, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,200,150, 47, 5, - 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,200,150, 47, 5, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,200,150, 47, 5, - 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,200,150, 47, 5, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,200,150, 47, 5, - 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,200,150, 47, 5, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,200,150, 47, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,120,159, 47, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,120,159, 47, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,120,159, 47, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,120,159, 47, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,120,159, 47, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,120,159, 47, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,120,159, 47, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,120,159, 47, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,120,159, 47, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,120,159, 47, 5, - 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,120,159, 47, 5, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,120,159, 47, 5, - 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,120,159, 47, 5, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,120,159, 47, 5, - 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,120,159, 47, 5, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,120,159, 47, 5, - 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,120,159, 47, 5, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,120,159, 47, 5, - 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,120,159, 47, 5, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,120,159, 47, 5, - 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,120,159, 47, 5, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,120,159, 47, 5, - 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,120,159, 47, 5, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,120,159, 47, 5, - 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,120,159, 47, 5, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,120,159, 47, 5, - 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,120,159, 47, 5, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,120,159, 47, 5, - 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,120,159, 47, 5, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,120,159, 47, 5, - 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,120,159, 47, 5, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,120,159, 47, 5, - 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,120,159, 47, 5, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,120,159, 47, 5, - 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,120,159, 47, 5, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,120,159, 47, 5, - 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,120,159, 47, 5, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,120,159, 47, 5, - 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,120,159, 47, 5, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,120,159, 47, 5, - 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,120,159, 47, 5, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,120,159, 47, 5, - 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,120,159, 47, 5, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,120,159, 47, 5, - 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,120,159, 47, 5, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,120,159, 47, 5, - 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,120,159, 47, 5, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,120,159, 47, 5, - 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,120,159, 47, 5, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,120,159, 47, 5, - 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,120,159, 47, 5, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,120,159, 47, 5, - 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,120,159, 47, 5, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,120,159, 47, 5, - 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,120,159, 47, 5, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,120,159, 47, 5, - 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,120,159, 47, 5, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,120,159, 47, 5, - 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,120,159, 47, 5, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,120,159, 47, 5, - 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,120,159, 47, 5, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,120,159, 47, 5, - 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,120,159, 47, 5, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,120,159, 47, 5, - 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,120,159, 47, 5, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,120,159, 47, 5, - 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,120,159, 47, 5, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,120,159, 47, 5, - 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,120,159, 47, 5, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,120,159, 47, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 40,168, 47, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 40,168, 47, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 40,168, 47, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 40,168, 47, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 40,168, 47, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 40,168, 47, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 40,168, 47, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 40,168, 47, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 40,168, 47, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 40,168, 47, 5, - 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 40,168, 47, 5, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, 40,168, 47, 5, - 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 40,168, 47, 5, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, 40,168, 47, 5, - 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 40,168, 47, 5, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, 40,168, 47, 5, - 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 40,168, 47, 5, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, 40,168, 47, 5, - 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 40,168, 47, 5, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, 40,168, 47, 5, - 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 40,168, 47, 5, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, 40,168, 47, 5, - 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, 40,168, 47, 5, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, 40,168, 47, 5, - 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, 40,168, 47, 5, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, 40,168, 47, 5, - 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, 40,168, 47, 5, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, 40,168, 47, 5, - 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, 40,168, 47, 5, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, 40,168, 47, 5, - 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, 40,168, 47, 5, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, 40,168, 47, 5, - 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0, 40,168, 47, 5, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, 40,168, 47, 5, - 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0, 40,168, 47, 5, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, 40,168, 47, 5, - 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0, 40,168, 47, 5, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, 40,168, 47, 5, - 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0, 40,168, 47, 5, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, 40,168, 47, 5, - 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0, 40,168, 47, 5, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, 40,168, 47, 5, - 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0, 40,168, 47, 5, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, 40,168, 47, 5, - 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0, 40,168, 47, 5, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, 40,168, 47, 5, - 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0, 40,168, 47, 5, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, 40,168, 47, 5, - 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0, 40,168, 47, 5, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, 40,168, 47, 5, - 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0, 40,168, 47, 5, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, 40,168, 47, 5, - 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0, 40,168, 47, 5, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, 40,168, 47, 5, - 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0, 40,168, 47, 5, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, 40,168, 47, 5, - 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0, 40,168, 47, 5, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, 40,168, 47, 5, - 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0, 40,168, 47, 5, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, 40,168, 47, 5, - 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0, 40,168, 47, 5, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, 40,168, 47, 5, - 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0, 40,168, 47, 5, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, 40,168, 47, 5, - 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0, 40,168, 47, 5, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, 40,168, 47, 5, - 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0, 40,168, 47, 5, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, 40,168, 47, 5, - 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0, 40,168, 47, 5, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, 40,168, 47, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,216,176, 47, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,216,176, 47, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,216,176, 47, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,216,176, 47, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,216,176, 47, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,216,176, 47, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,216,176, 47, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,216,176, 47, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,216,176, 47, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,216,176, 47, 5, - 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,216,176, 47, 5, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,216,176, 47, 5, - 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,216,176, 47, 5, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,216,176, 47, 5, - 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,216,176, 47, 5, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,216,176, 47, 5, - 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,216,176, 47, 5, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,216,176, 47, 5, - 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,216,176, 47, 5, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,216,176, 47, 5, - 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,216,176, 47, 5, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,216,176, 47, 5, - 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,216,176, 47, 5, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,216,176, 47, 5, - 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,216,176, 47, 5, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,216,176, 47, 5, - 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,216,176, 47, 5, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,216,176, 47, 5, - 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,216,176, 47, 5, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,216,176, 47, 5, - 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,216,176, 47, 5, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,216,176, 47, 5, - 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,216,176, 47, 5, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,216,176, 47, 5, - 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,216,176, 47, 5, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,216,176, 47, 5, - 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,216,176, 47, 5, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,216,176, 47, 5, - 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,216,176, 47, 5, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,216,176, 47, 5, - 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,216,176, 47, 5, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,216,176, 47, 5, - 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,216,176, 47, 5, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,216,176, 47, 5, - 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,216,176, 47, 5, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,216,176, 47, 5, - 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,216,176, 47, 5, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,216,176, 47, 5, - 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,216,176, 47, 5, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,216,176, 47, 5, - 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,216,176, 47, 5, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,216,176, 47, 5, - 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,216,176, 47, 5, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,216,176, 47, 5, - 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,216,176, 47, 5, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,216,176, 47, 5, - 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,216,176, 47, 5, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,216,176, 47, 5, - 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,216,176, 47, 5, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,216,176, 47, 5, - 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,216,176, 47, 5, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,216,176, 47, 5, - 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,216,176, 47, 5, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,216,176, 47, 5, - 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,216,176, 47, 5, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,216,176, 47, 5, - 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,216,176, 47, 5, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,216,176, 47, 5, - 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,216,176, 47, 5, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,216,176, 47, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,136,185, 47, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,136,185, 47, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,136,185, 47, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,136,185, 47, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,136,185, 47, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,136,185, 47, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,136,185, 47, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,136,185, 47, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,136,185, 47, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,136,185, 47, 5, - 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,136,185, 47, 5, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,136,185, 47, 5, - 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,136,185, 47, 5, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,136,185, 47, 5, - 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,136,185, 47, 5, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,136,185, 47, 5, - 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,136,185, 47, 5, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,136,185, 47, 5, - 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,136,185, 47, 5, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,136,185, 47, 5, - 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,136,185, 47, 5, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,136,185, 47, 5, - 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,136,185, 47, 5, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,136,185, 47, 5, - 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,136,185, 47, 5, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,136,185, 47, 5, - 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,136,185, 47, 5, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,136,185, 47, 5, - 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,136,185, 47, 5, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,136,185, 47, 5, - 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,136,185, 47, 5, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,136,185, 47, 5, - 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,136,185, 47, 5, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,136,185, 47, 5, - 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,136,185, 47, 5, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,136,185, 47, 5, - 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,136,185, 47, 5, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,136,185, 47, 5, - 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,136,185, 47, 5, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,136,185, 47, 5, - 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,136,185, 47, 5, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,136,185, 47, 5, - 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,136,185, 47, 5, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,136,185, 47, 5, - 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,136,185, 47, 5, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,136,185, 47, 5, - 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,136,185, 47, 5, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,136,185, 47, 5, - 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,136,185, 47, 5, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,136,185, 47, 5, - 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,136,185, 47, 5, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,136,185, 47, 5, - 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,136,185, 47, 5, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,136,185, 47, 5, - 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,136,185, 47, 5, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,136,185, 47, 5, - 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,136,185, 47, 5, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,136,185, 47, 5, - 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,136,185, 47, 5, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,136,185, 47, 5, - 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,136,185, 47, 5, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,136,185, 47, 5, - 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,136,185, 47, 5, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,136,185, 47, 5, - 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,136,185, 47, 5, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,136,185, 47, 5, - 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,136,185, 47, 5, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,136,185, 47, 5, - 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,136,185, 47, 5, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,136,185, 47, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 56,194, 47, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 56,194, 47, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 56,194, 47, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 56,194, 47, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 56,194, 47, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 56,194, 47, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 56,194, 47, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 56,194, 47, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 56,194, 47, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 56,194, 47, 5, - 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 56,194, 47, 5, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, 56,194, 47, 5, - 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 56,194, 47, 5, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, 56,194, 47, 5, - 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 56,194, 47, 5, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, 56,194, 47, 5, - 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 56,194, 47, 5, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, 56,194, 47, 5, - 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 56,194, 47, 5, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, 56,194, 47, 5, - 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 56,194, 47, 5, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, 56,194, 47, 5, - 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, 56,194, 47, 5, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, 56,194, 47, 5, - 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, 56,194, 47, 5, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, 56,194, 47, 5, - 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, 56,194, 47, 5, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, 56,194, 47, 5, - 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, 56,194, 47, 5, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, 56,194, 47, 5, - 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, 56,194, 47, 5, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, 56,194, 47, 5, - 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0, 56,194, 47, 5, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, 56,194, 47, 5, - 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0, 56,194, 47, 5, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, 56,194, 47, 5, - 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0, 56,194, 47, 5, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, 56,194, 47, 5, - 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0, 56,194, 47, 5, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, 56,194, 47, 5, - 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0, 56,194, 47, 5, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, 56,194, 47, 5, - 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0, 56,194, 47, 5, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, 56,194, 47, 5, - 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0, 56,194, 47, 5, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, 56,194, 47, 5, - 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0, 56,194, 47, 5, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, 56,194, 47, 5, - 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0, 56,194, 47, 5, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, 56,194, 47, 5, - 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0, 56,194, 47, 5, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, 56,194, 47, 5, - 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0, 56,194, 47, 5, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, 56,194, 47, 5, - 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0, 56,194, 47, 5, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, 56,194, 47, 5, - 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0, 56,194, 47, 5, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, 56,194, 47, 5, - 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0, 56,194, 47, 5, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, 56,194, 47, 5, - 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0, 56,194, 47, 5, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, 56,194, 47, 5, - 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0, 56,194, 47, 5, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, 56,194, 47, 5, - 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0, 56,194, 47, 5, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, 56,194, 47, 5, - 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0, 56,194, 47, 5, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, 56,194, 47, 5, - 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0, 56,194, 47, 5, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, 56,194, 47, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,232,202, 47, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,232,202, 47, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,232,202, 47, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,232,202, 47, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,232,202, 47, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,232,202, 47, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,232,202, 47, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,232,202, 47, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,232,202, 47, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,232,202, 47, 5, - 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,232,202, 47, 5, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,232,202, 47, 5, - 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,232,202, 47, 5, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,232,202, 47, 5, - 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,232,202, 47, 5, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,232,202, 47, 5, - 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,232,202, 47, 5, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,232,202, 47, 5, - 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,232,202, 47, 5, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,232,202, 47, 5, - 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,232,202, 47, 5, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,232,202, 47, 5, - 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,232,202, 47, 5, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,232,202, 47, 5, - 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,232,202, 47, 5, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,232,202, 47, 5, - 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,232,202, 47, 5, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,232,202, 47, 5, - 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,232,202, 47, 5, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,232,202, 47, 5, - 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,232,202, 47, 5, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,232,202, 47, 5, - 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,232,202, 47, 5, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,232,202, 47, 5, - 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,232,202, 47, 5, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,232,202, 47, 5, - 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,232,202, 47, 5, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,232,202, 47, 5, - 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,232,202, 47, 5, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,232,202, 47, 5, - 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,232,202, 47, 5, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,232,202, 47, 5, - 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,232,202, 47, 5, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,232,202, 47, 5, - 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,232,202, 47, 5, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,232,202, 47, 5, - 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,232,202, 47, 5, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,232,202, 47, 5, - 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,232,202, 47, 5, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,232,202, 47, 5, - 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,232,202, 47, 5, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,232,202, 47, 5, - 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,232,202, 47, 5, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,232,202, 47, 5, - 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,232,202, 47, 5, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,232,202, 47, 5, - 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,232,202, 47, 5, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,232,202, 47, 5, - 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,232,202, 47, 5, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,232,202, 47, 5, - 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,232,202, 47, 5, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,232,202, 47, 5, - 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,232,202, 47, 5, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,232,202, 47, 5, - 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,232,202, 47, 5, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,232,202, 47, 5, - 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,232,202, 47, 5, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,232,202, 47, 5, - 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,232,202, 47, 5, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,232,202, 47, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,152,211, 47, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,152,211, 47, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,152,211, 47, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,152,211, 47, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,152,211, 47, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,152,211, 47, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,152,211, 47, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,152,211, 47, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,152,211, 47, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,152,211, 47, 5, - 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,152,211, 47, 5, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,152,211, 47, 5, - 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,152,211, 47, 5, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,152,211, 47, 5, - 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,152,211, 47, 5, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,152,211, 47, 5, - 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,152,211, 47, 5, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,152,211, 47, 5, - 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,152,211, 47, 5, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,152,211, 47, 5, - 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,152,211, 47, 5, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,152,211, 47, 5, - 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,152,211, 47, 5, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,152,211, 47, 5, - 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,152,211, 47, 5, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,152,211, 47, 5, - 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,152,211, 47, 5, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,152,211, 47, 5, - 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,152,211, 47, 5, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,152,211, 47, 5, - 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,152,211, 47, 5, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,152,211, 47, 5, - 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,152,211, 47, 5, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,152,211, 47, 5, - 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,152,211, 47, 5, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,152,211, 47, 5, - 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,152,211, 47, 5, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,152,211, 47, 5, - 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,152,211, 47, 5, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,152,211, 47, 5, - 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,152,211, 47, 5, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,152,211, 47, 5, - 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,152,211, 47, 5, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,152,211, 47, 5, - 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,152,211, 47, 5, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,152,211, 47, 5, - 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,152,211, 47, 5, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,152,211, 47, 5, - 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,152,211, 47, 5, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,152,211, 47, 5, - 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,152,211, 47, 5, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,152,211, 47, 5, - 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,152,211, 47, 5, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,152,211, 47, 5, - 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,152,211, 47, 5, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,152,211, 47, 5, - 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,152,211, 47, 5, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,152,211, 47, 5, - 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,152,211, 47, 5, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,152,211, 47, 5, - 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,152,211, 47, 5, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,152,211, 47, 5, - 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,152,211, 47, 5, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,152,211, 47, 5, - 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,152,211, 47, 5, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,152,211, 47, 5, - 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,152,211, 47, 5, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,152,211, 47, 5, - 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,152,211, 47, 5, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,152,211, 47, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 72,220, 47, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 72,220, 47, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 72,220, 47, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 72,220, 47, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 72,220, 47, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 72,220, 47, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 72,220, 47, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 72,220, 47, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 72,220, 47, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 72,220, 47, 5, - 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 72,220, 47, 5, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, 72,220, 47, 5, - 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 72,220, 47, 5, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, 72,220, 47, 5, - 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 72,220, 47, 5, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, 72,220, 47, 5, - 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 72,220, 47, 5, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, 72,220, 47, 5, - 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 72,220, 47, 5, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, 72,220, 47, 5, - 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 72,220, 47, 5, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, 72,220, 47, 5, - 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, 72,220, 47, 5, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, 72,220, 47, 5, - 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, 72,220, 47, 5, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, 72,220, 47, 5, - 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, 72,220, 47, 5, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, 72,220, 47, 5, - 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, 72,220, 47, 5, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, 72,220, 47, 5, - 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, 72,220, 47, 5, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, 72,220, 47, 5, - 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0, 72,220, 47, 5, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, 72,220, 47, 5, - 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0, 72,220, 47, 5, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, 72,220, 47, 5, - 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0, 72,220, 47, 5, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, 72,220, 47, 5, - 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0, 72,220, 47, 5, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, 72,220, 47, 5, - 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0, 72,220, 47, 5, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, 72,220, 47, 5, - 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0, 72,220, 47, 5, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, 72,220, 47, 5, - 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0, 72,220, 47, 5, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, 72,220, 47, 5, - 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0, 72,220, 47, 5, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, 72,220, 47, 5, - 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0, 72,220, 47, 5, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, 72,220, 47, 5, - 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0, 72,220, 47, 5, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, 72,220, 47, 5, - 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0, 72,220, 47, 5, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, 72,220, 47, 5, - 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0, 72,220, 47, 5, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, 72,220, 47, 5, - 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0, 72,220, 47, 5, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, 72,220, 47, 5, - 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0, 72,220, 47, 5, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, 72,220, 47, 5, - 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0, 72,220, 47, 5, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, 72,220, 47, 5, - 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0, 72,220, 47, 5, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, 72,220, 47, 5, - 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0, 72,220, 47, 5, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, 72,220, 47, 5, - 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0, 72,220, 47, 5, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, 72,220, 47, 5, - 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0, 72,220, 47, 5, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, 72,220, 47, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,248,228, 47, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,248,228, 47, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,248,228, 47, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,248,228, 47, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,248,228, 47, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,248,228, 47, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,248,228, 47, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,248,228, 47, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,248,228, 47, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,248,228, 47, 5, - 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,248,228, 47, 5, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,248,228, 47, 5, - 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,248,228, 47, 5, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,248,228, 47, 5, - 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,248,228, 47, 5, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,248,228, 47, 5, - 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,248,228, 47, 5, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,248,228, 47, 5, - 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,248,228, 47, 5, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,248,228, 47, 5, - 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,248,228, 47, 5, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,248,228, 47, 5, - 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,248,228, 47, 5, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,248,228, 47, 5, - 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,248,228, 47, 5, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,248,228, 47, 5, - 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,248,228, 47, 5, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,248,228, 47, 5, - 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,248,228, 47, 5, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,248,228, 47, 5, - 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,248,228, 47, 5, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,248,228, 47, 5, - 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,248,228, 47, 5, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,248,228, 47, 5, - 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,248,228, 47, 5, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,248,228, 47, 5, - 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,248,228, 47, 5, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,248,228, 47, 5, - 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,248,228, 47, 5, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,248,228, 47, 5, - 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,248,228, 47, 5, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,248,228, 47, 5, - 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,248,228, 47, 5, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,248,228, 47, 5, - 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,248,228, 47, 5, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,248,228, 47, 5, - 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,248,228, 47, 5, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,248,228, 47, 5, - 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,248,228, 47, 5, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,248,228, 47, 5, - 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,248,228, 47, 5, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,248,228, 47, 5, - 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,248,228, 47, 5, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,248,228, 47, 5, - 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,248,228, 47, 5, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,248,228, 47, 5, - 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,248,228, 47, 5, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,248,228, 47, 5, - 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,248,228, 47, 5, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,248,228, 47, 5, - 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,248,228, 47, 5, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,248,228, 47, 5, - 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,248,228, 47, 5, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,248,228, 47, 5, - 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,248,228, 47, 5, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,248,228, 47, 5, - 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,248,228, 47, 5, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,248,228, 47, 5, - 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,248,228, 47, 5, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,248,228, 47, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,168,237, 47, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,168,237, 47, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,168,237, 47, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,168,237, 47, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,168,237, 47, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,168,237, 47, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,168,237, 47, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,168,237, 47, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,168,237, 47, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,168,237, 47, 5, - 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,168,237, 47, 5, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,168,237, 47, 5, - 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,168,237, 47, 5, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,168,237, 47, 5, - 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,168,237, 47, 5, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,168,237, 47, 5, - 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,168,237, 47, 5, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,168,237, 47, 5, - 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,168,237, 47, 5, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,168,237, 47, 5, - 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,168,237, 47, 5, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,168,237, 47, 5, - 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,168,237, 47, 5, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,168,237, 47, 5, - 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,168,237, 47, 5, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,168,237, 47, 5, - 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,168,237, 47, 5, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,168,237, 47, 5, - 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,168,237, 47, 5, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,168,237, 47, 5, - 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,168,237, 47, 5, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,168,237, 47, 5, - 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,168,237, 47, 5, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,168,237, 47, 5, - 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,168,237, 47, 5, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,168,237, 47, 5, - 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,168,237, 47, 5, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,168,237, 47, 5, - 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,168,237, 47, 5, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,168,237, 47, 5, - 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,168,237, 47, 5, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,168,237, 47, 5, - 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,168,237, 47, 5, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,168,237, 47, 5, - 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,168,237, 47, 5, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,168,237, 47, 5, - 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,168,237, 47, 5, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,168,237, 47, 5, - 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,168,237, 47, 5, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,168,237, 47, 5, - 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,168,237, 47, 5, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,168,237, 47, 5, - 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,168,237, 47, 5, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,168,237, 47, 5, - 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,168,237, 47, 5, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,168,237, 47, 5, - 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,168,237, 47, 5, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,168,237, 47, 5, - 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,168,237, 47, 5, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,168,237, 47, 5, - 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,168,237, 47, 5, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,168,237, 47, 5, - 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,168,237, 47, 5, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,168,237, 47, 5, - 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,168,237, 47, 5, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,168,237, 47, 5, - 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,168,237, 47, 5, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,168,237, 47, 5, - 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,168,237, 47, 5, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,168,237, 47, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 88,246, 47, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 88,246, 47, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 88,246, 47, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 88,246, 47, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 88,246, 47, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 88,246, 47, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 88,246, 47, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 88,246, 47, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 88,246, 47, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 88,246, 47, 5, - 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 88,246, 47, 5, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, 88,246, 47, 5, - 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 88,246, 47, 5, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, 88,246, 47, 5, - 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 88,246, 47, 5, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, 88,246, 47, 5, - 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 88,246, 47, 5, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, 88,246, 47, 5, - 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 88,246, 47, 5, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, 88,246, 47, 5, - 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 88,246, 47, 5, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, 88,246, 47, 5, - 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, 88,246, 47, 5, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, 88,246, 47, 5, - 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, 88,246, 47, 5, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, 88,246, 47, 5, - 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, 88,246, 47, 5, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, 88,246, 47, 5, - 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, 88,246, 47, 5, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, 88,246, 47, 5, - 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, 88,246, 47, 5, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, 88,246, 47, 5, - 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0, 88,246, 47, 5, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, 88,246, 47, 5, - 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0, 88,246, 47, 5, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, 88,246, 47, 5, - 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0, 88,246, 47, 5, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, 88,246, 47, 5, - 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0, 88,246, 47, 5, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, 88,246, 47, 5, - 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0, 88,246, 47, 5, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, 88,246, 47, 5, - 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0, 88,246, 47, 5, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, 88,246, 47, 5, - 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0, 88,246, 47, 5, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, 88,246, 47, 5, - 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0, 88,246, 47, 5, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, 88,246, 47, 5, - 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0, 88,246, 47, 5, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, 88,246, 47, 5, - 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0, 88,246, 47, 5, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, 88,246, 47, 5, - 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0, 88,246, 47, 5, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, 88,246, 47, 5, - 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0, 88,246, 47, 5, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, 88,246, 47, 5, - 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0, 88,246, 47, 5, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, 88,246, 47, 5, - 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0, 88,246, 47, 5, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, 88,246, 47, 5, - 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0, 88,246, 47, 5, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, 88,246, 47, 5, - 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0, 88,246, 47, 5, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, 88,246, 47, 5, - 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0, 88,246, 47, 5, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, 88,246, 47, 5, - 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0, 88,246, 47, 5, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, 88,246, 47, 5, - 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0, 88,246, 47, 5, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, 88,246, 47, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 8,255, 47, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 8,255, 47, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 8,255, 47, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 8,255, 47, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 8,255, 47, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 8,255, 47, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 8,255, 47, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 8,255, 47, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 8,255, 47, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 8,255, 47, 5, - 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 8,255, 47, 5, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, 8,255, 47, 5, - 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 8,255, 47, 5, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, 8,255, 47, 5, - 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 8,255, 47, 5, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, 8,255, 47, 5, - 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 8,255, 47, 5, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, 8,255, 47, 5, - 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 8,255, 47, 5, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, 8,255, 47, 5, - 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 8,255, 47, 5, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, 8,255, 47, 5, - 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, 8,255, 47, 5, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, 8,255, 47, 5, - 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, 8,255, 47, 5, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, 8,255, 47, 5, - 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, 8,255, 47, 5, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, 8,255, 47, 5, - 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, 8,255, 47, 5, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, 8,255, 47, 5, - 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, 8,255, 47, 5, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, 8,255, 47, 5, - 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0, 8,255, 47, 5, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, 8,255, 47, 5, - 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0, 8,255, 47, 5, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, 8,255, 47, 5, - 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0, 8,255, 47, 5, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, 8,255, 47, 5, - 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0, 8,255, 47, 5, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, 8,255, 47, 5, - 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0, 8,255, 47, 5, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, 8,255, 47, 5, - 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0, 8,255, 47, 5, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, 8,255, 47, 5, - 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0, 8,255, 47, 5, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, 8,255, 47, 5, - 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0, 8,255, 47, 5, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, 8,255, 47, 5, - 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0, 8,255, 47, 5, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, 8,255, 47, 5, - 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0, 8,255, 47, 5, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, 8,255, 47, 5, - 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0, 8,255, 47, 5, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, 8,255, 47, 5, - 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0, 8,255, 47, 5, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, 8,255, 47, 5, - 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0, 8,255, 47, 5, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, 8,255, 47, 5, - 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0, 8,255, 47, 5, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, 8,255, 47, 5, - 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0, 8,255, 47, 5, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, 8,255, 47, 5, - 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0, 8,255, 47, 5, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, 8,255, 47, 5, - 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0, 8,255, 47, 5, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, 8,255, 47, 5, - 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0, 8,255, 47, 5, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, 8,255, 47, 5, - 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0, 8,255, 47, 5, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, 8,255, 47, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,184, 7, 48, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,184, 7, 48, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,184, 7, 48, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,184, 7, 48, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,184, 7, 48, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,184, 7, 48, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,184, 7, 48, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,184, 7, 48, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,184, 7, 48, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,184, 7, 48, 5, - 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,184, 7, 48, 5, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,184, 7, 48, 5, - 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,184, 7, 48, 5, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,184, 7, 48, 5, - 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,184, 7, 48, 5, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,184, 7, 48, 5, - 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,184, 7, 48, 5, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,184, 7, 48, 5, - 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,184, 7, 48, 5, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,184, 7, 48, 5, - 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,184, 7, 48, 5, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,184, 7, 48, 5, - 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,184, 7, 48, 5, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,184, 7, 48, 5, - 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,184, 7, 48, 5, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,184, 7, 48, 5, - 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,184, 7, 48, 5, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,184, 7, 48, 5, - 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,184, 7, 48, 5, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,184, 7, 48, 5, - 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,184, 7, 48, 5, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,184, 7, 48, 5, - 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,184, 7, 48, 5, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,184, 7, 48, 5, - 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,184, 7, 48, 5, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,184, 7, 48, 5, - 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,184, 7, 48, 5, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,184, 7, 48, 5, - 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,184, 7, 48, 5, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,184, 7, 48, 5, - 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,184, 7, 48, 5, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,184, 7, 48, 5, - 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,184, 7, 48, 5, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,184, 7, 48, 5, - 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,184, 7, 48, 5, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,184, 7, 48, 5, - 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,184, 7, 48, 5, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,184, 7, 48, 5, - 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,184, 7, 48, 5, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,184, 7, 48, 5, - 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,184, 7, 48, 5, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,184, 7, 48, 5, - 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,184, 7, 48, 5, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,184, 7, 48, 5, - 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,184, 7, 48, 5, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,184, 7, 48, 5, - 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,184, 7, 48, 5, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,184, 7, 48, 5, - 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,184, 7, 48, 5, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,184, 7, 48, 5, - 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,184, 7, 48, 5, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,184, 7, 48, 5, - 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,184, 7, 48, 5, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,184, 7, 48, 5, - 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,184, 7, 48, 5, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,184, 7, 48, 5, - 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,184, 7, 48, 5, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,184, 7, 48, 5, - 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,184, 7, 48, 5, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,184, 7, 48, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,104, 16, 48, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,104, 16, 48, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,104, 16, 48, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,104, 16, 48, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,104, 16, 48, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,104, 16, 48, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,104, 16, 48, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,104, 16, 48, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,104, 16, 48, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,104, 16, 48, 5, - 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,104, 16, 48, 5, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,104, 16, 48, 5, - 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,104, 16, 48, 5, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,104, 16, 48, 5, - 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,104, 16, 48, 5, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,104, 16, 48, 5, - 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,104, 16, 48, 5, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,104, 16, 48, 5, - 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,104, 16, 48, 5, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,104, 16, 48, 5, - 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,104, 16, 48, 5, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,104, 16, 48, 5, - 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,104, 16, 48, 5, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,104, 16, 48, 5, - 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,104, 16, 48, 5, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,104, 16, 48, 5, - 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,104, 16, 48, 5, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,104, 16, 48, 5, - 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,104, 16, 48, 5, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,104, 16, 48, 5, - 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,104, 16, 48, 5, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,104, 16, 48, 5, - 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,104, 16, 48, 5, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,104, 16, 48, 5, - 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,104, 16, 48, 5, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,104, 16, 48, 5, - 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,104, 16, 48, 5, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,104, 16, 48, 5, - 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,104, 16, 48, 5, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,104, 16, 48, 5, - 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,104, 16, 48, 5, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,104, 16, 48, 5, - 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,104, 16, 48, 5, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,104, 16, 48, 5, - 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,104, 16, 48, 5, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,104, 16, 48, 5, - 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,104, 16, 48, 5, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,104, 16, 48, 5, - 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,104, 16, 48, 5, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,104, 16, 48, 5, - 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,104, 16, 48, 5, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,104, 16, 48, 5, - 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,104, 16, 48, 5, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,104, 16, 48, 5, - 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,104, 16, 48, 5, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,104, 16, 48, 5, - 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,104, 16, 48, 5, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,104, 16, 48, 5, - 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,104, 16, 48, 5, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,104, 16, 48, 5, - 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,104, 16, 48, 5, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,104, 16, 48, 5, - 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,104, 16, 48, 5, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,104, 16, 48, 5, - 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,104, 16, 48, 5, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,104, 16, 48, 5, - 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,104, 16, 48, 5, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,104, 16, 48, 5, - 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,104, 16, 48, 5, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,104, 16, 48, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 24, 25, 48, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 24, 25, 48, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 24, 25, 48, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 24, 25, 48, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 24, 25, 48, 5, - 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, 24, 25, 48, 5, - 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, 24, 25, 48, 5, - 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, 24, 25, 48, 5, - 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, 24, 25, 48, 5, - 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, 24, 25, 48, 5, - 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, 24, 25, 48, 5, - 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, 24, 25, 48, 5, - 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, 24, 25, 48, 5, - 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, 24, 25, 48, 5, - 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, 24, 25, 48, 5, - 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, 24, 25, 48, 5, - 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, 24, 25, 48, 5, - 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, 24, 25, 48, 5, - 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, 24, 25, 48, 5, - 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, 24, 25, 48, 5, - 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, 24, 25, 48, 5, - 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, 24, 25, 48, 5, - 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, 24, 25, 48, 5, - 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, 24, 25, 48, 5, - 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, 24, 25, 48, 5, - 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, 24, 25, 48, 5, - 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, 24, 25, 48, 5, - 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, 24, 25, 48, 5, - 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, 24, 25, 48, 5, - 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, 24, 25, 48, 5, - 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, 24, 25, 48, 5, - 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, 24, 25, 48, 5, - 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, 24, 25, 48, 5, - 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, 24, 25, 48, 5, - 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, 24, 25, 48, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,200, 33, 48, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,200, 33, 48, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,200, 33, 48, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,200, 33, 48, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,200, 33, 48, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,200, 33, 48, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,200, 33, 48, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,200, 33, 48, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,200, 33, 48, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,200, 33, 48, 5, - 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,200, 33, 48, 5, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,200, 33, 48, 5, - 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,200, 33, 48, 5, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,200, 33, 48, 5, - 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,200, 33, 48, 5, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,200, 33, 48, 5, - 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,200, 33, 48, 5, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,200, 33, 48, 5, - 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,200, 33, 48, 5, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,200, 33, 48, 5, - 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,200, 33, 48, 5, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,200, 33, 48, 5, - 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,200, 33, 48, 5, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,200, 33, 48, 5, - 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,200, 33, 48, 5, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,200, 33, 48, 5, - 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,200, 33, 48, 5, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,200, 33, 48, 5, - 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,200, 33, 48, 5, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,200, 33, 48, 5, - 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,200, 33, 48, 5, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,200, 33, 48, 5, - 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,200, 33, 48, 5, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,200, 33, 48, 5, - 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,200, 33, 48, 5, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,200, 33, 48, 5, - 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,200, 33, 48, 5, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,200, 33, 48, 5, - 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,200, 33, 48, 5, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,200, 33, 48, 5, - 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,200, 33, 48, 5, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,200, 33, 48, 5, - 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,200, 33, 48, 5, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,200, 33, 48, 5, - 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,200, 33, 48, 5, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,200, 33, 48, 5, - 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,200, 33, 48, 5, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,200, 33, 48, 5, - 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,200, 33, 48, 5, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,200, 33, 48, 5, - 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,200, 33, 48, 5, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,200, 33, 48, 5, - 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,200, 33, 48, 5, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,200, 33, 48, 5, - 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,200, 33, 48, 5, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,200, 33, 48, 5, - 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,200, 33, 48, 5, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,200, 33, 48, 5, - 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,200, 33, 48, 5, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,200, 33, 48, 5, - 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,200, 33, 48, 5, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,200, 33, 48, 5, - 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,200, 33, 48, 5, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,200, 33, 48, 5, - 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,200, 33, 48, 5, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,200, 33, 48, 5, - 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,200, 33, 48, 5, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,200, 33, 48, 5, - 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,200, 33, 48, 5, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,200, 33, 48, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,120, 42, 48, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,120, 42, 48, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,120, 42, 48, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,120, 42, 48, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,120, 42, 48, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,120, 42, 48, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,120, 42, 48, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,120, 42, 48, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,120, 42, 48, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,120, 42, 48, 5, - 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,120, 42, 48, 5, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,120, 42, 48, 5, - 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,120, 42, 48, 5, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,120, 42, 48, 5, - 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,120, 42, 48, 5, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,120, 42, 48, 5, - 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,120, 42, 48, 5, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,120, 42, 48, 5, - 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,120, 42, 48, 5, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,120, 42, 48, 5, - 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,120, 42, 48, 5, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,120, 42, 48, 5, - 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,120, 42, 48, 5, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,120, 42, 48, 5, - 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,120, 42, 48, 5, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,120, 42, 48, 5, - 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,120, 42, 48, 5, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,120, 42, 48, 5, - 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,120, 42, 48, 5, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,120, 42, 48, 5, - 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,120, 42, 48, 5, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,120, 42, 48, 5, - 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,120, 42, 48, 5, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,120, 42, 48, 5, - 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,120, 42, 48, 5, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,120, 42, 48, 5, - 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,120, 42, 48, 5, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,120, 42, 48, 5, - 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,120, 42, 48, 5, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,120, 42, 48, 5, - 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,120, 42, 48, 5, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,120, 42, 48, 5, - 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,120, 42, 48, 5, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,120, 42, 48, 5, - 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,120, 42, 48, 5, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,120, 42, 48, 5, - 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,120, 42, 48, 5, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,120, 42, 48, 5, - 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,120, 42, 48, 5, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,120, 42, 48, 5, - 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,120, 42, 48, 5, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,120, 42, 48, 5, - 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,120, 42, 48, 5, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,120, 42, 48, 5, - 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,120, 42, 48, 5, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,120, 42, 48, 5, - 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,120, 42, 48, 5, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,120, 42, 48, 5, - 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,120, 42, 48, 5, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,120, 42, 48, 5, - 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,120, 42, 48, 5, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,120, 42, 48, 5, - 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,120, 42, 48, 5, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,120, 42, 48, 5, - 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,120, 42, 48, 5, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,120, 42, 48, 5, - 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,120, 42, 48, 5, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,120, 42, 48, 5, - 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,120, 42, 48, 5, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,120, 42, 48, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 56,183, 45, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 56,183, 45, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 56,183, 45, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 56,183, 45, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 56,183, 45, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 56,183, 45, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 56,183, 45, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 56,183, 45, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 56,183, 45, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 56,183, 45, 5, - 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 56,183, 45, 5, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, 56,183, 45, 5, - 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 56,183, 45, 5, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, 56,183, 45, 5, - 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 56,183, 45, 5, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, 56,183, 45, 5, - 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 56,183, 45, 5, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, 56,183, 45, 5, - 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 56,183, 45, 5, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, 56,183, 45, 5, - 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 56,183, 45, 5, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, 56,183, 45, 5, - 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, 56,183, 45, 5, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, 56,183, 45, 5, - 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, 56,183, 45, 5, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, 56,183, 45, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 72,184, 45, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 72,184, 45, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 72,184, 45, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 72,184, 45, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 72,184, 45, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 72,184, 45, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 72,184, 45, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 72,184, 45, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 72,184, 45, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 72,184, 45, 5, - 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 72,184, 45, 5, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, 72,184, 45, 5, - 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 72,184, 45, 5, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, 72,184, 45, 5, - 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 72,184, 45, 5, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, 72,184, 45, 5, - 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 72,184, 45, 5, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, 72,184, 45, 5, - 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 72,184, 45, 5, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, 72,184, 45, 5, - 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 72,184, 45, 5, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, 72,184, 45, 5, - 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, 72,184, 45, 5, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, 72,184, 45, 5, - 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, 72,184, 45, 5, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, 72,184, 45, 5, - 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, 72,184, 45, 5, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, 72,184, 45, 5, - 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, 72,184, 45, 5, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, 72,184, 45, 5, - 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, 72,184, 45, 5, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 70, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 71, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 72, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 73, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 74, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 75, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 76, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 77, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 78, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 79, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 80, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 81, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 82, 0, 1, 0, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 31, 0, 83, 0, 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 8, 30, 47, 5, - 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 8, 30, 47, 5, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 8, 30, 47, 5, - 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 8, 30, 47, 5, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 8, 30, 47, 5, - 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 8, 30, 47, 5, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 8, 30, 47, 5, - 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 8, 30, 47, 5, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 8, 30, 47, 5, - 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 8, 30, 47, 5, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 8, 30, 47, 5, - 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, 8, 30, 47, 5, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 8, 30, 47, 5, - 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, 8, 30, 47, 5, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 8, 30, 47, 5, - 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, 8, 30, 47, 5, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 8, 30, 47, 5, - 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, 8, 30, 47, 5, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 8, 30, 47, 5, - 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, 8, 30, 47, 5, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 8, 30, 47, 5, - 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, 8, 30, 47, 5, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, 8, 30, 47, 5, - 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, 8, 30, 47, 5, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, 8, 30, 47, 5, - 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, 8, 30, 47, 5, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, 8, 30, 47, 5, - 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, 8, 30, 47, 5, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, 8, 30, 47, 5, - 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, 8, 30, 47, 5, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, 8, 30, 47, 5, - 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, 8, 30, 47, 5, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0, 8, 30, 47, 5, - 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, 8, 30, 47, 5, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0, 8, 30, 47, 5, - 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, 8, 30, 47, 5, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0, 8, 30, 47, 5, - 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, 8, 30, 47, 5, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0, 8, 30, 47, 5, - 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, 8, 30, 47, 5, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0, 8, 30, 47, 5, - 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, 8, 30, 47, 5, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0, 8, 30, 47, 5, - 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, 8, 30, 47, 5, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0, 8, 30, 47, 5, - 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, 8, 30, 47, 5, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0, 8, 30, 47, 5, - 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, 8, 30, 47, 5, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0, 8, 30, 47, 5, - 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, 8, 30, 47, 5, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0, 8, 30, 47, 5, - 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, 8, 30, 47, 5, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 70, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 71, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 72, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 73, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 74, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 75, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 76, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 77, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 78, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 79, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 80, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 81, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 82, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 83, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 84, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 85, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 86, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 87, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 88, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 89, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 90, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 91, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 92, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 93, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 94, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 95, 0, 1, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 31, 0, 96, 0, 1, 0, 0, 0,216,191, 45, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 70, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 71, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 72, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 73, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 74, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 75, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 76, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 77, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 78, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 79, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 80, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 81, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 82, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 83, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 84, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 85, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 86, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 87, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 88, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 89, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 90, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 91, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 92, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 93, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 94, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 95, 0, 1, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 31, 0, 96, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 21, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 22, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 23, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 24, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 25, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 26, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 27, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 28, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 29, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 30, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 31, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 32, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 33, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 34, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 35, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 36, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 37, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 38, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 39, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 40, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 41, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 42, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 43, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 44, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 45, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 46, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 47, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 48, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 49, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 50, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 51, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 52, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 53, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 54, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 55, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 56, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 57, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 58, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 59, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 60, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 61, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 62, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 63, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 64, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 65, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 66, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 67, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 68, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 69, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 70, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 71, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 72, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 73, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 74, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 75, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 76, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 77, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 78, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 79, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 80, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 81, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 82, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 83, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 84, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 85, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 86, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 87, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 88, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 89, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 90, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 91, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 92, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 93, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 94, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 95, 0, 1, 0, 0, 0, 8,206, 45, 5, 0, 0, 0, 0, 31, 0, 96, 0, 1, 0, 0, 0, 8,206, 45, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,184,182, 42, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,184,182, 42, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,184,182, 42, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,184,182, 42, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,184,182, 42, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,184,182, 42, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,184,182, 42, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,184,182, 42, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,184,182, 42, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,184,182, 42, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,136, 27, 43, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,136, 27, 43, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,136, 27, 43, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,136, 27, 43, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,136, 27, 43, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,136, 27, 43, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,136, 27, 43, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,136, 27, 43, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,136, 27, 43, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,136, 27, 43, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 8,136, 43, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 8,136, 43, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 8,136, 43, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 8,136, 43, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 8,136, 43, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 8,136, 43, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 8,136, 43, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 8,136, 43, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 8,136, 43, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 8,136, 43, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,104,139, 44, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,104,139, 44, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,104,139, 44, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,104,139, 44, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,104,139, 44, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,104,139, 44, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,104,139, 44, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,104,139, 44, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,104,139, 44, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,104,139, 44, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,120,219, 44, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,120,219, 44, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,120,219, 44, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,120,219, 44, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,120,219, 44, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,120,219, 44, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,120,219, 44, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,120,219, 44, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,120,219, 44, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,120,219, 44, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0,232, 42, 45, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0,232, 42, 45, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0,232, 42, 45, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0,232, 42, 45, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0,232, 42, 45, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0,232, 42, 45, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0,232, 42, 45, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0,232, 42, 45, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0,232, 42, 45, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0,232, 42, 45, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 8,114, 45, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 8,114, 45, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 8,114, 45, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 8,114, 45, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 8,114, 45, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 8,114, 45, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 8,114, 45, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 8,114, 45, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 8,114, 45, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 8,114, 45, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 8,123, 46, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 8,123, 46, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 8,123, 46, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 8,123, 46, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 8,123, 46, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 8,123, 46, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 8,123, 46, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 8,123, 46, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 8,123, 46, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 8,123, 46, 5, - 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 8,123, 46, 5, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, 8,123, 46, 5, - 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 8,123, 46, 5, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, 8,123, 46, 5, - 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 8,123, 46, 5, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, 8,123, 46, 5, - 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 8,123, 46, 5, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, 8,123, 46, 5, - 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 8,123, 46, 5, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 24,181, 42, 5, - 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 24,181, 42, 5, 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 24,181, 42, 5, - 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 24,181, 42, 5, 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 24,181, 42, 5, - 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 24,181, 42, 5, 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 24,181, 42, 5, - 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 24,181, 42, 5, 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 24,181, 42, 5, - 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 24,181, 42, 5, 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 24,181, 42, 5, - 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 8,189, 45, 5, 0, 0, 0, 0, 31, 0, 1, 0, 1, 0, 0, 0, 8,189, 45, 5, - 0, 0, 0, 0, 31, 0, 2, 0, 1, 0, 0, 0, 8,189, 45, 5, 0, 0, 0, 0, 31, 0, 3, 0, 1, 0, 0, 0, 8,189, 45, 5, - 0, 0, 0, 0, 31, 0, 4, 0, 1, 0, 0, 0, 8,189, 45, 5, 0, 0, 0, 0, 31, 0, 5, 0, 1, 0, 0, 0, 8,189, 45, 5, - 0, 0, 0, 0, 31, 0, 6, 0, 1, 0, 0, 0, 8,189, 45, 5, 0, 0, 0, 0, 31, 0, 7, 0, 1, 0, 0, 0, 8,189, 45, 5, - 0, 0, 0, 0, 31, 0, 8, 0, 1, 0, 0, 0, 8,189, 45, 5, 0, 0, 0, 0, 31, 0, 9, 0, 1, 0, 0, 0, 8,189, 45, 5, - 0, 0, 0, 0, 31, 0, 10, 0, 1, 0, 0, 0, 8,189, 45, 5, 0, 0, 0, 0, 31, 0, 11, 0, 1, 0, 0, 0, 8,189, 45, 5, - 0, 0, 0, 0, 31, 0, 12, 0, 1, 0, 0, 0, 8,189, 45, 5, 0, 0, 0, 0, 31, 0, 13, 0, 1, 0, 0, 0, 8,189, 45, 5, - 0, 0, 0, 0, 31, 0, 14, 0, 1, 0, 0, 0, 8,189, 45, 5, 0, 0, 0, 0, 31, 0, 15, 0, 1, 0, 0, 0, 8,189, 45, 5, - 0, 0, 0, 0, 31, 0, 16, 0, 1, 0, 0, 0, 8,189, 45, 5, 0, 0, 0, 0, 31, 0, 17, 0, 1, 0, 0, 0, 8,189, 45, 5, - 0, 0, 0, 0, 31, 0, 18, 0, 1, 0, 0, 0, 8,189, 45, 5, 0, 0, 0, 0, 31, 0, 19, 0, 1, 0, 0, 0, 8,189, 45, 5, - 0, 0, 0, 0, 31, 0, 20, 0, 1, 0, 0, 0, 8,189, 45, 5, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, 8,122, 44, 5, - 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136,193, 43, 5, 0, 0, 0, 0,184,141, 43, 5, - 0, 0, 0, 0, 24,139, 43, 5, 0, 0, 0, 0,104,140, 43, 5, 0, 0, 0, 0, 40,142, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 47, 4, 0, 0, 81, 0, 0, 0,153, 2, 0, 0, 1, 1, 48, 4, 73, 2, 1, 0, 0, 0, 0, 0, - 0, 0, 8, 0,232,108, 12, 5, 0, 0, 0, 0, 40,137, 44, 5, 0, 0, 0, 0, 40,137, 44, 5, 0, 0, 0, 0,248,122, 44, 5, - 0, 0, 0, 0,248,131, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232, 20,156, 77, -130,127, 0, 0,152,149,185, 77,130,127, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,248,122, 44, 5, 0, 0, 0, 0,216, 0, 0, 0, - 1, 0, 0, 0,104,124, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,108, 68, 0, 0, 0, 0, - 0, 0,208, 65, 0, 0, 0, 0, 0, 0,134, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 4, 0, 0, 0, 0, 0, 0, - 25, 0, 0, 0, 0,224,133, 68, 0, 0,200, 65, 0,224,133, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, - 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 48, 4, 26, 0, 48, 4, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 47, 4, 0, 0, 81, 0, 0, 0,106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 48, 4, 26, 0, 10, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 72,119, 12, 5, 0, 0, 0, 0,184,250,138, 77,130,127, 0, 0,184,250,138, 77,130,127, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,236, 53, 76,130,127, 0, 0,216,240, 53, 76,130,127, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,104,124, 44, 5, 0, 0, 0, 0,216, 0, 0, 0, - 1, 0, 0, 0,120,127, 44, 5, 0, 0, 0, 0,248,122, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,178, 67, 0,192, 5,196, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67, 0,128,171,195, 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, 0, 0, 0, 0, - 86, 1, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, - 86, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 1, 0, 0, - 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,160, 0, 87, 1,143, 0, 87, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,159, 0, 0, 0, 67, 1, 0, 0,153, 2, 0, 0, 0, 0, 0, 0,159, 0, 0, 0, 67, 1, 0, 0, -153, 2, 0, 0,160, 0, 87, 1, 11, 0, 5, 0, 3, 0, 0, 0, 0, 0, 0, 0,160, 0, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 8,116, 12, 5, 0, 0, 0, 0,120, 64,141, 77,130,127, 0, 0,120, 64,141, 77,130,127, 0, 0,216,125, 44, 5, - 0, 0, 0, 0, 88,230,149, 77,130,127, 0, 0, 24,242, 53, 76,130,127, 0, 0,136,244, 53, 76,130,127, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,216,125, 44, 5, 0, 0, 0, 0,214, 0, 0, 0, - 1, 0, 0, 0,216,204,146, 77,130,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,235,230, 76,130,127, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95,111, 98,106,101, 99,116,109,111,100,101, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95,111, 98,106,101, 99,116,109,111,100,101, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 79, 98,106,101, 99,116, 32, 84,111,111,108,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,233,253,143, 0,255, 1, 0, 0, 0, 0, 0, 0, 39, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,149,253,143, 0,146, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 88, 1, 0, 0,216,204,146, 77,130,127, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 8, 92,138, 77,130,127, 0, 0,216,125, 44, 5, - 0, 0, 0, 0, 88, 18,231, 76,130,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111, -111,108,115, 95, 98,114,117,115,104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111, -111,108,115, 95, 98,114,117,115,104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66,114,117,115,104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,159,254,143, 0, 73, 1, 0, 0, 0, 0, + 68, 65, 84, 65, 88, 1, 0, 0,200,168,165, 15, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,232,166,165, 15, 0, 0, 0, 0, +216, 88,215, 3, 0, 0, 0, 0, 40, 2,225, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, + 84, 95,116,111,111,108,115, 95, 98,114,117,115,104, 95,116,101,120,116,117,114,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, + 84, 95,116,111,111,108,115, 95, 98,114,117,115,104, 95,116,101,120,116,117,114,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84,101,120,116,117,114,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93,254,143, 0, 0, 0, + 0, 0, 0, 0, 4, 0, 4, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 8, 92,138, 77,130,127, 0, 0,214, 0, 0, 0, - 1, 0, 0, 0,136,203,138, 77,130,127, 0, 0,216,204,146, 77,130,127, 0, 0, 24, 24,231, 76,130,127, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95, 98,114,117,115,104, 95,116,111,111,108, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,232,166,165, 15, 0, 0, 0, 0, +213, 0, 0, 0, 1, 0, 0, 0, 8,165,165, 15, 0, 0, 0, 0,200,168,165, 15, 0, 0, 0, 0, 8, 7,225, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,115, 99,117,108,112,116, 95,111,112,116,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95, 98,114,117,115,104, 95,116,111,111,108, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,115, 99,117,108,112,116, 95,111,112,116,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 84,111,111,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 79,112,116,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 74,254,143, 0, 61, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21,254,143, 0, 0, 0, 0, 0, 0, 0, 4, 0, 4, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 88, 1, 0, 0,136,203,138, 77,130,127, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,152,154,145, 77,130,127, 0, 0, 8, 92,138, 77, -130,127, 0, 0,232, 26,231, 76,130,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111, -111,108,115, 95, 98,114,117,115,104, 95,115,116,114,111,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111, -111,108,115, 95, 98,114,117,115,104, 95,115,116,114,111,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,116,114,111,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,111,254,143, 0, 0, 0, 0, 0, 0, 0, - 4, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 88, 1, 0, 0, 8,165,165, 15, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +232,166,165, 15, 0, 0, 0, 0,168, 8,225, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, + 84, 95,115, 99,117,108,112,116, 95,115,121,109,109,101,116,114,121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, + 84, 95,115, 99,117,108,112,116, 95,115,121,109,109,101,116,114,121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,121,109,109,101,116,114,121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,253,253,143, 0, 0, 0, + 0, 0, 0, 0, 4, 0, 4, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,152,154,145, 77,130,127, 0, 0,214, 0, 0, 0, - 1, 0, 0, 0,184,192,149, 77,130,127, 0, 0,136,203,138, 77,130,127, 0, 0,184, 29,231, 76,130,127, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95, 98,114,117,115,104, 95, 99,117,114,118,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95, 98,114,117,115,104, 95, 99,117,114,118,101, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,120,114,215, 3, 0, 0, 0, 0, +215, 0, 0, 0, 1, 0, 0, 0, 40,116,215, 3, 0, 0, 0, 0,200,112,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,178, 67, + 0, 0, 90,195, 0, 0, 0, 0, 0, 0, 0, 0,227,102, 16, 67, 24, 30, 90,195, 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, + 0, 0, 0, 0,215, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, + 0, 0, 0, 0,215, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, + 10, 3, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,160, 0,216, 0,143, 0,216, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,159, 0, 0, 0,111, 0, 0, 0, 70, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,160, 0,216, 0, 12, 0, 6, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0,216, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,136,196,177, 3, 0, 0, 0, 0, 88, 83,163, 3, 0, 0, 0, 0, 88, 83,163, 3, 0, 0, 0, 0, +184, 90,215, 3, 0, 0, 0, 0,184, 90,215, 3, 0, 0, 0, 0,200,243,207, 3, 0, 0, 0, 0,248,246,207, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,184, 90,215, 3, 0, 0, 0, 0, +213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184,197,177, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,108, 97,115,116, 95,111,112,101,114, 97,116,111,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 67,117,114,118,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,108, 97,115,116, 95,111,112,101,114, 97,116,111,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 87,254,143, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 83, 99,117,108,112,116, 32, 77,111,100,101, 0, 32, 77,111,100,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216,255,144, 0, 16, 0, 0, 0, 0, 0, 0, 0, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 88, 1, 0, 0,184,192,149, 77,130,127, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 88,230,149, 77,130,127, 0, 0,152,154,145, 77, -130,127, 0, 0,184, 38,231, 76,130,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111, -111,108,115, 95, 98,114,117,115,104, 95, 97,112,112,101, 97,114, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111, -111,108,115, 95, 98,114,117,115,104, 95, 97,112,112,101, 97,114, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65,112,112,101, 97,114, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63,254,143, 0, 0, 0, 0, 0, 0, 0, - 4, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 40, 1, 0, 0, 40,116,215, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,216,117,215, 3, 0, 0, 0, 0, +120,114,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 52, 67, 0, 96,158,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 67, + 0, 96,158,196, 0,128,142,195,163, 0, 0, 0,180, 0, 0, 0, 0, 0, 0, 0,213, 3, 0, 0, 0, 0, 0, 0,162, 0, 0, 0, + 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,162, 0, 0, 0, 0, 0, 0, 0,213, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 1, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,180, 0, +214, 3,163, 0,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,111, 4, 0, 0,111, 4, 0, 0, +111, 0, 0, 0,150, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, + 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,189,177, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 88,230,149, 77,130,127, 0, 0,214, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184,192,149, 77,130,127, 0, 0,168, 47,231, 76,130,127, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95,118,101,114,116,101,120,112, 97,105,110,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95,118,101,114,116,101,120,112, 97,105,110,116, 0, + 68, 65, 84, 65, 40, 1, 0, 0,216,117,215, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 40,116,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 79,112,116,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,149,253,143, 0,146, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160, 0, 0, 0,111, 4, 0, 0, +111, 0, 0, 0,150, 2, 0, 0,160, 0, 0, 0,111, 4, 0, 0,111, 0, 0, 0,150, 2, 0, 0,208, 3, 40, 2, 13, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24,188,177, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 1, 0, 0,120,127, 44, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0,136,130, 44, 5, 0, 0, 0, 0,104,124, 44, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0,128,178, 67, 0, 0, 90,195, 0, 0, 0, 0, 0, 0, 0, 0,227,102, 16, 67, 24, 30, 90,195, - 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, 0, 0, 0, 0,215, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, - 17, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0,215, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 3, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,160, 0,216, 0,143, 0, -216, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,159, 0, 0, 0,107, 0, 0, 0, - 66, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160, 0,216, 0, 12, 0, 6, 0, 34, 0, 0, 0, - 0, 0, 0, 0, 0, 0,216, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248,116, 12, 5, 0, 0, 0, 0, 8,212,149, 77, -130,127, 0, 0, 8,212,149, 77,130,127, 0, 0,232,128, 44, 5, 0, 0, 0, 0,232,128, 44, 5, 0, 0, 0, 0,200,245, 53, 76, -130,127, 0, 0, 56,248, 53, 76,130,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 88, 1, 0, 0,232,128, 44, 5, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,232,117, 12, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,108, 97, -115,116, 95,111,112,101,114, 97,116,111,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,108, 97, -115,116, 95,111,112,101,114, 97,116,111,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86,101,114,116,101,120, 32, 80, 97,105,110,116, - 32, 77,111,100,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216,255,144, 0, 16, 0, 0, 0, 0, 0, - 0, 0, 39, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,136,130, 44, 5, 0, 0, 0, 0,216, 0, 0, 0, - 1, 0, 0, 0,248,131, 44, 5, 0, 0, 0, 0,120,127, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 52, 67, 0, 96,158,196, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 67, 0, 96,158,196, 0,128,142,195,163, 0, 0, 0,180, 0, 0, 0, 0, 0, 0, 0, -213, 3, 0, 0, 0, 0, 0, 0,162, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,162, 0, 0, 0, 0, 0, 0, 0, -213, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 1, 0, 0, - 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,180, 0,214, 3,163, 0,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 47, 4, 0, 0, 47, 4, 0, 0,107, 0, 0, 0,153, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,248,110, 12, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,248,131, 44, 5, 0, 0, 0, 0,216, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136,130, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,160, 0, 0, 0, 47, 4, 0, 0,107, 0, 0, 0,153, 2, 0, 0,160, 0, 0, 0, 47, 4, 0, 0,107, 0, 0, 0, -153, 2, 0, 0,144, 3, 47, 2, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 8,110, 12, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 25, 54, 76,130,127, 0, 0, 40, 25, 54, 76,130,127, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,104,133, 44, 5, 0, 0, 0, 0, 68, 65, 84, 65,120, 3, 0, 0,104,133, 44, 5, 0, 0, 0, 0,174, 0, 0, 0, - 1, 0, 0, 0, 0, 0,140, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,106,104,228, 63, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,142, 6,128,191, 0, 0,128,191, 0, 0, 0, 0, 0, 0, 0, 0, 11,210, 76,190, - 0, 0, 0, 0, 68,239,209, 62, 51,177,205,190,184,158, 81, 63, 0, 0, 0, 0, 70,119,105, 63,143, 74, 70, 62, 35, 44,185,190, - 0, 0, 0, 0,162, 84, 89,188,166, 33,101, 63, 42, 61,228, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33,210,111,193, - 0, 0,128, 63, 68,239,209, 62, 70,119,105, 63,176, 84, 89,188, 0, 0, 0, 0, 52,177,205,190,142, 74, 70, 62,166, 33,101, 63, - 0, 0, 0, 0,185,158, 81, 63, 35, 44,185,190, 43, 61,228, 62, 0, 0, 0, 0, 62, 95, 68, 65, 51,120,173,192,115,208,213, 64, - 0, 0,128, 63,178,157,229, 62,183,133, 55,191,116,169, 81,191,184,158, 81,191,117, 90,127, 63, 72,235,176, 62,158, 53,185, 62, - 35, 44,185, 62,145,180,109,188,108,111,204, 63,218, 72,228,190, 42, 61,228,190, 0, 0, 0, 0, 0, 0, 0, 0, 33,171,108, 65, - 33,210,111, 65,100,240,191, 62,110,116, 85, 63, 48,185, 70,188, 0, 0, 82,180,115,138,102,190,232, 62,222, 61,202,103, 0, 63, - 0, 0, 64,179,197,112,117,194,178,208,216, 65,221,158, 5,194,231,251,159,192,221, 54,114, 66, 29,247,213,193, 59,221, 3, 66, - 25, 4,160, 64, 68,239,209, 62, 51,177,205,190,184,158, 81, 63, 0, 0, 0, 0, 70,119,105, 63,143, 74, 70, 62, 35, 44,185,190, - 0, 0, 0, 0,162, 84, 89,188,166, 33,101, 63, 42, 61,228, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33,210,111,193, - 0, 0,128, 63,178,157,229, 62,183,133, 55,191,116,169, 81,191,184,158, 81,191,117, 90,127, 63, 72,235,176, 62,158, 53,185, 62, - 35, 44,185, 62,145,180,109,188,108,111,204, 63,218, 72,228,190, 42, 61,228,190, 0, 0, 0, 0, 0, 0, 0, 0, 33,171,108, 65, - 33,210,111, 65,204, 64, 16, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,204, 64, 16, 64, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,204, 64, 16, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,128, 63, 92, 62, 55, 63, 56,186,224,190,237,203,148,190, 3,236,234,190, 33,210,111, 65, 33,210,111, 65, 0, 0, 0, 0, - 0, 0, 0, 0,135,102, 3, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255, 1, 0, 0, 0, 0, 0, 0, 0, + 40,151,207, 3, 0, 0, 0, 0,168, 34,208, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168, 62,216, 3, 0, 0, 0, 0, + 68, 65, 84, 65,112, 3, 0, 0,168, 62,216, 3, 0, 0, 0, 0,173, 0, 0, 0, 1, 0, 0, 0, 0, 0,140, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71,137,247, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +142, 6,128,191, 0, 0,128,191, 0, 0, 0, 0, 0, 0, 0, 0, 11,210, 76,190, 0, 0, 0, 0, 68,239,209, 62, 51,177,205,190, +184,158, 81, 63, 0, 0, 0, 0, 70,119,105, 63,143, 74, 70, 62, 35, 44,185,190, 0, 0, 0, 0,162, 84, 89,188,166, 33,101, 63, + 42, 61,228, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33,210,111,193, 0, 0,128, 63, 68,239,209, 62, 70,119,105, 63, +176, 84, 89,188, 0, 0, 0, 0, 52,177,205,190,142, 74, 70, 62,166, 33,101, 63, 0, 0, 0, 0,185,158, 81, 63, 35, 44,185,190, + 43, 61,228, 62, 0, 0, 0, 0, 62, 95, 68, 65, 51,120,173,192,115,208,213, 64, 0, 0,128, 63,178,157,229, 62, 69,228, 70,191, +116,169, 81,191,184,158, 81,191,117, 90,127, 63, 69,188,191, 62,158, 53,185, 62, 35, 44,185, 62,145,180,109,188, 86,142,221, 63, +218, 72,228,190, 42, 61,228,190, 0, 0, 0, 0, 0, 0, 0, 0, 33,171,108, 65, 33,210,111, 65,100,240,191, 62,110,116, 85, 63, + 48,185, 70,188, 0, 0, 82,180,137,185, 84,190, 30, 18,205, 61, 77,247,236, 62, 0, 0, 40, 51,197,112,117,194,178,208,216, 65, +220,158, 5,194,231,251,159,192,221, 54,114, 66, 29,247,213,193, 58,221, 3, 66, 25, 4,160, 64, 68,239,209, 62, 51,177,205,190, +184,158, 81, 63, 0, 0, 0, 0, 70,119,105, 63,143, 74, 70, 62, 35, 44,185,190, 0, 0, 0, 0,162, 84, 89,188,166, 33,101, 63, + 42, 61,228, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33,210,111,193, 0, 0,128, 63,178,157,229, 62, 69,228, 70,191, +116,169, 81,191,184,158, 81,191,117, 90,127, 63, 69,188,191, 62,158, 53,185, 62, 35, 44,185, 62,145,180,109,188, 86,142,221, 63, +218, 72,228,190, 42, 61,228,190, 0, 0, 0, 0, 0, 0, 0, 0, 33,171,108, 65, 33,210,111, 65, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60,203, 6, 64, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60,203, 6, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 60,203, 6, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 92, 62, 55, 63, 56,186,224,190, +237,203,148,190, 3,236,234,190, 33,210,111, 65, 33,210,111, 65, 0, 0, 0, 0, 0, 0, 0, 0,114,145,245, 58, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 32, 33, 12, 66, 85,152,137, 66,113, 27,126, 66, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 96, 1, 0, 0,152, 92,215, 3, 0, 0, 0, 0,174, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 51, 51, 51, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65,205,204, 76, 62, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, 0, +200,213,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 3, 0, + 8, 24,128, 0, 0, 0, 12, 66, 0, 0,128, 63,205,204,204, 61, 0, 0,122, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 10, 0, 7, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 83, 78, 0, 0, 8, 1, 0, 0,152, 66,216, 3, 0, 0, 0, 0,210, 0, 0, 0, 1, 0, 0, 0, 56, 43,217, 3, 0, 0, 0, 0, +248, 9,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 82, 71, 97,109,101, 32, 76, +111,103,105, 99, 0, 46, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 37,201, 3, 0, 0, 0, 0, 72, 45,201, 3, 0, 0, 0, 0, + 40,136,171, 3, 0, 0, 0, 0,184, 80,216, 3, 0, 0, 0, 0, 88, 17,215, 3, 0, 0, 0, 0,248, 22,215, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 32, 0, 0, 0, 40, 37,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,200, 37,201, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, +200, 37,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,104, 38,201, 3, 0, 0, 0, 0, 40, 37,201, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 4, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,104, 38,201, 3, 0, 0, 0, 0, +211, 0, 0, 0, 1, 0, 0, 0, 8, 39,201, 3, 0, 0, 0, 0,200, 37,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +126, 7, 5, 4, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 8, 39,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, +168, 39,201, 3, 0, 0, 0, 0,104, 38,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 32, 0, 0, 0,168, 39,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 72, 40,201, 3, 0, 0, 0, 0, + 8, 39,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,234, 3, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, + 72, 40,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,232, 40,201, 3, 0, 0, 0, 0,168, 39,201, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,126, 7,234, 3, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,232, 40,201, 3, 0, 0, 0, 0, +211, 0, 0, 0, 1, 0, 0, 0,136, 41,201, 3, 0, 0, 0, 0, 72, 40,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,140, 1, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,136, 41,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, + 40, 42,201, 3, 0, 0, 0, 0,232, 40,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 6,140, 1, 0, 0, 0, 0, + 68, 65, 84, 65, 32, 0, 0, 0, 40, 42,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,200, 42,201, 3, 0, 0, 0, 0, +136, 41,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 6, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, +200, 42,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,104, 43,201, 3, 0, 0, 0, 0, 40, 42,201, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,126, 7,140, 1, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,104, 43,201, 3, 0, 0, 0, 0, +211, 0, 0, 0, 1, 0, 0, 0, 8, 44,201, 3, 0, 0, 0, 0,200, 42,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 64, 5,140, 1, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 8, 44,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, +168, 44,201, 3, 0, 0, 0, 0,104, 43,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 5,234, 3, 1, 0, 0, 0, + 68, 65, 84, 65, 32, 0, 0, 0,168, 44,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 72, 45,201, 3, 0, 0, 0, 0, + 8, 44,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 1,140, 1, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, + 72, 45,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168, 44,201, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 1,234, 3, 1, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 40,136,171, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0,216,136,171, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200, 37,201, 3, 0, 0, 0, 0, +104, 38,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,216,136,171, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0, 88, 68,216, 3, 0, 0, 0, 0, 40,136,171, 3, 0, 0, 0, 0,200, 37,201, 3, 0, 0, 0, 0, +168, 39,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 88, 68,216, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0, 8, 69,216, 3, 0, 0, 0, 0,216,136,171, 3, 0, 0, 0, 0,104, 38,201, 3, 0, 0, 0, 0, + 72, 40,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 8, 69,216, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0,184, 69,216, 3, 0, 0, 0, 0, 88, 68,216, 3, 0, 0, 0, 0,168, 39,201, 3, 0, 0, 0, 0, + 72, 40,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,184, 69,216, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0,104, 70,216, 3, 0, 0, 0, 0, 8, 69,216, 3, 0, 0, 0, 0,168, 39,201, 3, 0, 0, 0, 0, +232, 40,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,104, 70,216, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0, 24, 71,216, 3, 0, 0, 0, 0,184, 69,216, 3, 0, 0, 0, 0,232, 40,201, 3, 0, 0, 0, 0, +136, 41,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 24, 71,216, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0,200, 71,216, 3, 0, 0, 0, 0,104, 70,216, 3, 0, 0, 0, 0, 8, 39,201, 3, 0, 0, 0, 0, + 40, 42,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,200, 71,216, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0,120, 72,216, 3, 0, 0, 0, 0, 24, 71,216, 3, 0, 0, 0, 0,136, 41,201, 3, 0, 0, 0, 0, + 40, 42,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,120, 72,216, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0, 40, 73,216, 3, 0, 0, 0, 0,200, 71,216, 3, 0, 0, 0, 0, 40, 37,201, 3, 0, 0, 0, 0, +232, 40,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 40, 73,216, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0,216, 73,216, 3, 0, 0, 0, 0,120, 72,216, 3, 0, 0, 0, 0, 40, 37,201, 3, 0, 0, 0, 0, + 40, 42,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,216, 73,216, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0,136, 74,216, 3, 0, 0, 0, 0, 40, 73,216, 3, 0, 0, 0, 0, 72, 40,201, 3, 0, 0, 0, 0, +200, 42,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,136, 74,216, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0, 56, 75,216, 3, 0, 0, 0, 0,216, 73,216, 3, 0, 0, 0, 0, 8, 39,201, 3, 0, 0, 0, 0, +200, 42,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 56, 75,216, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0,232, 75,216, 3, 0, 0, 0, 0,136, 74,216, 3, 0, 0, 0, 0,136, 41,201, 3, 0, 0, 0, 0, +200, 42,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,232, 75,216, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0,152, 76,216, 3, 0, 0, 0, 0, 56, 75,216, 3, 0, 0, 0, 0,104, 43,201, 3, 0, 0, 0, 0, + 8, 44,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,152, 76,216, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0, 72, 77,216, 3, 0, 0, 0, 0,232, 75,216, 3, 0, 0, 0, 0, 72, 40,201, 3, 0, 0, 0, 0, + 8, 44,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 72, 77,216, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0,248, 77,216, 3, 0, 0, 0, 0,152, 76,216, 3, 0, 0, 0, 0,200, 42,201, 3, 0, 0, 0, 0, +104, 43,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,248, 77,216, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0,168, 78,216, 3, 0, 0, 0, 0, 72, 77,216, 3, 0, 0, 0, 0,232, 40,201, 3, 0, 0, 0, 0, +168, 44,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,168, 78,216, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0, 88, 79,216, 3, 0, 0, 0, 0,248, 77,216, 3, 0, 0, 0, 0,104, 43,201, 3, 0, 0, 0, 0, +168, 44,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 88, 79,216, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0, 8, 80,216, 3, 0, 0, 0, 0,168, 78,216, 3, 0, 0, 0, 0,168, 39,201, 3, 0, 0, 0, 0, + 72, 45,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 8, 80,216, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0,184, 80,216, 3, 0, 0, 0, 0, 88, 79,216, 3, 0, 0, 0, 0, 8, 44,201, 3, 0, 0, 0, 0, + 72, 45,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,184, 80,216, 3, 0, 0, 0, 0, +212, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 80,216, 3, 0, 0, 0, 0,168, 44,201, 3, 0, 0, 0, 0, + 72, 45,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, 88, 17,215, 3, 0, 0, 0, 0, +214, 0, 0, 0, 1, 0, 0, 0,120, 18,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168, 39,201, 3, 0, 0, 0, 0, +200, 37,201, 3, 0, 0, 0, 0,104, 38,201, 3, 0, 0, 0, 0, 72, 40,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,126, 7, 0, 0,235, 3, 0, 0, 5, 4, 0, 0, 7, 7,127, 7, 27, 0, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,216,199,207, 3, 0, 0, 0, 0,216,199,207, 3, 0, 0, 0, 0,136,119,215, 3, 0, 0, 0, 0, + 56,121,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,136,119,215, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, + 56,121,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,148, 68, 0, 0, 0, 0, 0, 0,208, 65, + 0, 0, 0, 0, 0,224,239, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, + 0,192,239, 68, 0, 0,200, 65, 0,192,239, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, + 4, 0, 12, 0, 10, 0,127, 7, 26, 0,127, 7, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,126, 7, 0, 0,235, 3, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +127, 7, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 56,121,215, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,136,119,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,240,109, 69, 0, 0,128,192, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,238, 68, 0, 0, 0, 0, 0, 0, 0, 64,112, 7, 0, 0,129, 7, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0,111, 7, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 2, 0, 0, 0, 1, 0, 3, 3, + 2, 0, 0, 4, 10, 0,129, 7, 2, 0,112, 7, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 5, 4, 0, 0, 5, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,120, 18,215, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, +152, 19,215, 3, 0, 0, 0, 0, 88, 17,215, 3, 0, 0, 0, 0, 40, 42,201, 3, 0, 0, 0, 0,136, 41,201, 3, 0, 0, 0, 0, +200, 42,201, 3, 0, 0, 0, 0, 8, 39,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 6, 0, 0,126, 7, 0, 0, + 0, 0, 0, 0,139, 1, 0, 0, 4, 4, 94, 1,140, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 56,128,199, 3, 0, 0, 0, 0, 56,128,199, 3, 0, 0, 0, 0,232,122,215, 3, 0, 0, 0, 0,152,124,215, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 40, 1, 0, 0,232,122,215, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,152,124,215, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,148, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,175, 67, + 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 1, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,174, 67, 0, 0,200, 65, + 0,128,174, 67, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 94, 1, + 26, 0, 94, 1, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 6, 0, 0,126, 7, 0, 0, +114, 1, 0, 0,139, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, 1, 26, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 40, 1, 0, 0,152,124,215, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +232,122,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,174, 67, 0, 0, 61,196, 0, 0, 0, 0, 0, 0, 0, 0,255,127,166, 67, +255,255,184,195, 0, 0, 0, 0, 77, 1, 0, 0, 94, 1, 0, 0, 0, 0, 0, 0,113, 1, 0, 0, 0, 0, 0, 0, 78, 1, 0, 0, + 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 76, 1, 0, 0, 0, 0, 0, 0,113, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 1, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0, 94, 1, +114, 1, 77, 1,114, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 6, 0, 0,126, 7, 0, 0, + 0, 0, 0, 0,113, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, 1,114, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120, 94,215, 3, 0, 0, 0, 0,184,205,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 88, 1, 0, 0,120, 94,215, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 88, 96,215, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 83, 95, + 80, 84, 95, 99,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 83, 95, + 80, 84, 95, 99,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,220,255, 76, 1, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 32, 33, 12, 66, - 85,152,137, 66,113, 27,126, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 96, 1, 0, 0, 40,137, 44, 5, 0, 0, 0, 0,175, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 51, 51, 51, 63, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65, -205,204, 76, 62, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, 0,216,191, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 88, 96,215, 3, 0, 0, 0, 0, +213, 0, 0, 0, 1, 0, 0, 0, 56, 98,215, 3, 0, 0, 0, 0,120, 94,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,114,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,114,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 3, 0, 8, 24,128, 0, 0, 0, 12, 66, 0, 0,128, 63, -205,204,204, 61, 0, 0,122, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 16, 0, 10, 0, 7, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 78, 0, 0, 8, 1, 0, 0,104,139, 44, 5, - 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,120,219, 44, 5, 0, 0, 0, 0, 8,136, 43, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 82, 71, 97,109,101, 32, 76,111,103,105, 99, 0, 46, 48, 48, 49, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,135,255, 76, 1, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,184,140, 44, 5, 0, 0, 0, 0,104,146, 44, 5, 0, 0, 0, 0,216,146, 44, 5, 0, 0, 0, 0,152,155, 44, 5, - 0, 0, 0, 0, 8,156, 44, 5, 0, 0, 0, 0, 40,212, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,184,140, 44, 5, - 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 40,141, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 40,141, 44, 5, 0, 0, 0, 0,212, 0, 0, 0, - 1, 0, 0, 0,152,141, 44, 5, 0, 0, 0, 0,184,140, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 4, - 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,152,141, 44, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 8,142, 44, 5, - 0, 0, 0, 0, 40,141, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 5, 4, 0, 0, 0, 0, 68, 65, 84, 65, - 32, 0, 0, 0, 8,142, 44, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,120,142, 44, 5, 0, 0, 0, 0,152,141, 44, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,120,142, 44, 5, - 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,232,142, 44, 5, 0, 0, 0, 0, 8,142, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,234, 3, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,232,142, 44, 5, 0, 0, 0, 0,212, 0, 0, 0, - 1, 0, 0, 0, 88,143, 44, 5, 0, 0, 0, 0,120,142, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7,234, 3, - 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 88,143, 44, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,200,143, 44, 5, - 0, 0, 0, 0,232,142, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140, 1, 0, 0, 0, 0, 68, 65, 84, 65, - 32, 0, 0, 0,200,143, 44, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 56,144, 44, 5, 0, 0, 0, 0, 88,143, 44, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 6,140, 1, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 56,144, 44, 5, - 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,168,144, 44, 5, 0, 0, 0, 0,200,143, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 32, 6, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,168,144, 44, 5, 0, 0, 0, 0,212, 0, 0, 0, - 1, 0, 0, 0, 24,145, 44, 5, 0, 0, 0, 0, 56,144, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7,140, 1, - 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 24,145, 44, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,136,145, 44, 5, - 0, 0, 0, 0,168,144, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 5,140, 1, 0, 0, 0, 0, 68, 65, 84, 65, - 32, 0, 0, 0,136,145, 44, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,248,145, 44, 5, 0, 0, 0, 0, 24,145, 44, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 5,234, 3, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,248,145, 44, 5, - 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,104,146, 44, 5, 0, 0, 0, 0,136,145, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 1,140, 1, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,104,146, 44, 5, 0, 0, 0, 0,212, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248,145, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 1,234, 3, - 1, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,216,146, 44, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 72,147, 44, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,141, 44, 5, 0, 0, 0, 0,152,141, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 72,147, 44, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,184,147, 44, 5, - 0, 0, 0, 0,216,146, 44, 5, 0, 0, 0, 0, 40,141, 44, 5, 0, 0, 0, 0,120,142, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,184,147, 44, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 40,148, 44, 5, - 0, 0, 0, 0, 72,147, 44, 5, 0, 0, 0, 0,152,141, 44, 5, 0, 0, 0, 0,232,142, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 40,148, 44, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,152,148, 44, 5, - 0, 0, 0, 0,184,147, 44, 5, 0, 0, 0, 0,120,142, 44, 5, 0, 0, 0, 0,232,142, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,152,148, 44, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 8,149, 44, 5, - 0, 0, 0, 0, 40,148, 44, 5, 0, 0, 0, 0,120,142, 44, 5, 0, 0, 0, 0, 88,143, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 8,149, 44, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,120,149, 44, 5, - 0, 0, 0, 0,152,148, 44, 5, 0, 0, 0, 0, 88,143, 44, 5, 0, 0, 0, 0,200,143, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,120,149, 44, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,232,149, 44, 5, - 0, 0, 0, 0, 8,149, 44, 5, 0, 0, 0, 0, 8,142, 44, 5, 0, 0, 0, 0, 56,144, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,232,149, 44, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 88,150, 44, 5, - 0, 0, 0, 0,120,149, 44, 5, 0, 0, 0, 0,200,143, 44, 5, 0, 0, 0, 0, 56,144, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 88,150, 44, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,200,150, 44, 5, - 0, 0, 0, 0,232,149, 44, 5, 0, 0, 0, 0,184,140, 44, 5, 0, 0, 0, 0, 88,143, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,200,150, 44, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 56,151, 44, 5, - 0, 0, 0, 0, 88,150, 44, 5, 0, 0, 0, 0,184,140, 44, 5, 0, 0, 0, 0, 56,144, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 56,151, 44, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,168,151, 44, 5, - 0, 0, 0, 0,200,150, 44, 5, 0, 0, 0, 0,232,142, 44, 5, 0, 0, 0, 0,168,144, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,168,151, 44, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 24,152, 44, 5, - 0, 0, 0, 0, 56,151, 44, 5, 0, 0, 0, 0, 8,142, 44, 5, 0, 0, 0, 0,168,144, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 24,152, 44, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,136,152, 44, 5, - 0, 0, 0, 0,168,151, 44, 5, 0, 0, 0, 0,200,143, 44, 5, 0, 0, 0, 0,168,144, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,136,152, 44, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,248,152, 44, 5, - 0, 0, 0, 0, 24,152, 44, 5, 0, 0, 0, 0, 24,145, 44, 5, 0, 0, 0, 0,136,145, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,248,152, 44, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,104,153, 44, 5, - 0, 0, 0, 0,136,152, 44, 5, 0, 0, 0, 0,232,142, 44, 5, 0, 0, 0, 0,136,145, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,104,153, 44, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,216,153, 44, 5, - 0, 0, 0, 0,248,152, 44, 5, 0, 0, 0, 0,168,144, 44, 5, 0, 0, 0, 0, 24,145, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,216,153, 44, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 72,154, 44, 5, - 0, 0, 0, 0,104,153, 44, 5, 0, 0, 0, 0, 88,143, 44, 5, 0, 0, 0, 0,248,145, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 72,154, 44, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,184,154, 44, 5, - 0, 0, 0, 0,216,153, 44, 5, 0, 0, 0, 0, 24,145, 44, 5, 0, 0, 0, 0,248,145, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,184,154, 44, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 40,155, 44, 5, - 0, 0, 0, 0, 72,154, 44, 5, 0, 0, 0, 0,120,142, 44, 5, 0, 0, 0, 0,104,146, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 40,155, 44, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,152,155, 44, 5, - 0, 0, 0, 0,184,154, 44, 5, 0, 0, 0, 0,136,145, 44, 5, 0, 0, 0, 0,104,146, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,152,155, 44, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 40,155, 44, 5, 0, 0, 0, 0,248,145, 44, 5, 0, 0, 0, 0,104,146, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, 8,156, 44, 5, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,216,159, 44, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120,142, 44, 5, 0, 0, 0, 0, 40,141, 44, 5, 0, 0, 0, 0,152,141, 44, 5, - 0, 0, 0, 0,232,142, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,235, 3, 0, 0, - 5, 4, 0, 0, 7, 7,127, 7, 27, 0, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,218, 44, 5, - 0, 0, 0, 0,232,218, 44, 5, 0, 0, 0, 0,248,156, 44, 5, 0, 0, 0, 0,104,158, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 1, 0, 0,248,156, 44, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0,104,158, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,148, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,224,239, 68, 0, 0, 0, 0, - 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,192,239, 68, 0, 0,200, 65, 0,192,239, 68, - 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,127, 7, 26, 0,127, 7, - 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,235, 3, 0, 0, - 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,127, 7, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 1, 0, 0,104,158, 44, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248,156, 44, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0,240,109, 69, 0, 0,128,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,238, 68, 0, 0, 0, 0, - 0, 0, 0, 64,112, 7, 0, 0,129, 7, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0, 0, 0, 0, 0, - 17, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 2, 0, 0, 0, 1, 0, 3, 3, 2, 0, 0, 4, 10, 0,129, 7, 2, 0,112, 7, - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 4, 0, 0, - 5, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, + 68, 65, 84, 65, 88, 1, 0, 0, 56, 98,215, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 24,100,215, 3, 0, 0, 0, 0, + 88, 96,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, + 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, + 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,111,255, 76, 1, 0, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, -160, 0, 0, 0,216,159, 44, 5, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,104,184, 44, 5, 0, 0, 0, 0, 8,156, 44, 5, - 0, 0, 0, 0, 56,144, 44, 5, 0, 0, 0, 0,200,143, 44, 5, 0, 0, 0, 0,168,144, 44, 5, 0, 0, 0, 0, 8,142, 44, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 6, 0, 0,126, 7, 0, 0, 0, 0, 0, 0,139, 1, 0, 0, 4, 4, 94, 1, -140, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,183, 44, 5, 0, 0, 0, 0, 40,183, 44, 5, - 0, 0, 0, 0,200,160, 44, 5, 0, 0, 0, 0, 56,162, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,200,160, 44, 5, - 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 56,162, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,148, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,175, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 93, 1, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,174, 67, 0, 0,200, 65, 0,128,174, 67, 0, 0,200, 65, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 94, 1, 26, 0, 94, 1, 26, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 6, 0, 0,126, 7, 0, 0,114, 1, 0, 0,139, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, 1, 26, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 24,100,215, 3, 0, 0, 0, 0, +213, 0, 0, 0, 1, 0, 0, 0,248,101,215, 3, 0, 0, 0, 0, 56, 98,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,100,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,100,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 56,162, 44, 5, - 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,160, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0,128,174, 67, 0, 0, 61,196, 0, 0, 0, 0, 0, 0, 0, 0,255,127,166, 67,255,255,184,195, 0, 0, 0, 0, 77, 1, 0, 0, - 94, 1, 0, 0, 0, 0, 0, 0,113, 1, 0, 0, 0, 0, 0, 0, 78, 1, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, - 76, 1, 0, 0, 0, 0, 0, 0,113, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 64, 10, 1, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0, 94, 1,114, 1, 77, 1,114, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 6, 0, 0,126, 7, 0, 0, 0, 0, 0, 0,113, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, 1,114, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,168,163, 44, 5, 0, 0, 0, 0,136,181, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,168,163, 44, 5, - 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 72,165, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 83, 95, 80, 84, 95, 99,111,110,116,101,120,116, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140,254, 76, 1,203, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, 79, 78, 83, 95, 80, 84, 95, 99,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,220,255, 76, 1, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 88, 1, 0, 0,248,101,215, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,216,103,215, 3, 0, 0, 0, 0, + 24,100,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, + 84, 95, 97,110,116,105, 97,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, + 84, 95, 97,110,116,105, 97,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65,110,116,105, 45, 65,108,105, + 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58,254, 76, 1, 58, 0, + 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,216,103,215, 3, 0, 0, 0, 0, +213, 0, 0, 0, 1, 0, 0, 0, 88,196,216, 3, 0, 0, 0, 0,248,101,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,109,111,116,105,111,110, 95, 98,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 72,165, 44, 5, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,232,166, 44, 5, - 0, 0, 0, 0,168,163, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, - 69, 82, 95, 80, 84, 95,114,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, - 69, 82, 95, 80, 84, 95,114,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82,101,110,100, -101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,135,255, - 76, 1, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,109,111,116,105,111,110, 95, 98,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 83, 97,109,112,108,101,100, 32, 77,111,116,105,111,110, 32, 66,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,232,166, 44, 5, - 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,136,168, 44, 5, 0, 0, 0, 0, 72,165, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,254, 76, 1, 0, 0, 20, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,111,255, 76, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 88, 1, 0, 0, 88,196,216, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 56,198,216, 3, 0, 0, 0, 0, +216,103,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, + 84, 95,115,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, + 84, 95,115,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10,254, 76, 1, 0, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,136,168, 44, 5, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 40,170, 44, 5, - 0, 0, 0, 0,232,166, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, - 69, 82, 95, 80, 84, 95,100,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, - 69, 82, 95, 80, 84, 95,100,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68,105,109,101, -110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140,254, - 76, 1,203, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 56,198,216, 3, 0, 0, 0, 0, +213, 0, 0, 0, 1, 0, 0, 0, 24,200,216, 3, 0, 0, 0, 0, 88,196,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 40,170, 44, 5, - 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,200,171, 44, 5, 0, 0, 0, 0,136,168, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 97,110,116,105, 97,108,105, 97,115,105, -110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 97,110,116,105, 97,108,105, 97,115,105, -110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65,110,116,105, 45, 65,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58,254, 76, 1, 58, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 80,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,242,253, 76, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,200,171, 44, 5, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,104,173, 44, 5, - 0, 0, 0, 0, 40,170, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, - 69, 82, 95, 80, 84, 95,109,111,116,105,111,110, 95, 98,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, - 69, 82, 95, 80, 84, 95,109,111,116,105,111,110, 95, 98,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 97,109,112, -108,101,100, 32, 77,111,116,105,111,110, 32, 66,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,254, - 76, 1, 0, 0, 20, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,104,173, 44, 5, - 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 8,175, 44, 5, 0, 0, 0, 0,200,171, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,104, 97,100,105,110,103, 0, 0, 0, + 68, 65, 84, 65, 88, 1, 0, 0, 24,200,216, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,248,201,216, 3, 0, 0, 0, 0, + 56,198,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, + 84, 95,112,111,115,116, 95,112,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, + 84, 95,112,111,115,116, 95,112,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,111,115,116, 32, 80,114,111, + 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,218,253, 76, 1, 0, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,248,201,216, 3, 0, 0, 0, 0, +213, 0, 0, 0, 1, 0, 0, 0,216,203,216, 3, 0, 0, 0, 0, 24,200,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10,254, 76, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, - 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 83,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 8,175, 44, 5, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,168,176, 44, 5, - 0, 0, 0, 0,104,173, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, - 69, 82, 95, 80, 84, 95,112,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, - 69, 82, 95, 80, 84, 95,112,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,101,114,102, -111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,242,253, - 76, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,194,253, 76, 1, 0, 0, 20, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,168,176, 44, 5, - 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 72,178, 44, 5, 0, 0, 0, 0, 8,175, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,111,115,116, 95,112,114,111, 99,101, -115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,111,115,116, 95,112,114,111, 99,101, -115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,111,115,116, 32, 80,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,218,253, 76, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, - 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 88, 1, 0, 0,216,203,216, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,184,205,216, 3, 0, 0, 0, 0, +248,201,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, + 84, 95,111,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, + 84, 95,111,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,253, 76, 1,130, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 72,178, 44, 5, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,232,179, 44, 5, - 0, 0, 0, 0,168,176, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, - 69, 82, 95, 80, 84, 95,115,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, - 69, 82, 95, 80, 84, 95,115,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,116, 97,109, -112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,194,253, - 76, 1, 0, 0, 20, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,184,205,216, 3, 0, 0, 0, 0, +213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216,203,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 98, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,232,179, 44, 5, - 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,136,181, 44, 5, 0, 0, 0, 0, 72,178, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,111,117,116,112,117,116, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 98, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,111,117,116,112,117,116, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 66, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16,253, 76, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,253, 76, 1,130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,136,181, 44, 5, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,232,179, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, - 69, 82, 95, 80, 84, 95, 98, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, - 69, 82, 95, 80, 84, 95, 98, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 97,107,101, + 68, 65, 84, 65,248, 0, 0, 0, 56,128,199, 3, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16,253, - 76, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,248, 0, 0, 0, 40,183, 44, 5, - 0, 0, 0, 0,180, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, 21, 0, 0,160, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,152, 19,215, 3, 0, 0, 0, 0, +214, 0, 0, 0, 1, 0, 0, 0,184, 20,215, 3, 0, 0, 0, 0,120, 18,215, 3, 0, 0, 0, 0, 40, 37,201, 3, 0, 0, 0, 0, +232, 40,201, 3, 0, 0, 0, 0,136, 41,201, 3, 0, 0, 0, 0, 40, 42,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 31, 6, 0, 0, 0, 0, 0, 0,139, 1, 0, 0, 17, 17, 32, 6,140, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,248,217,208, 3, 0, 0, 0, 0,248,217,208, 3, 0, 0, 0, 0, 72,126,215, 3, 0, 0, 0, 0, +168,129,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 72,126,215, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, +248,127,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 74, 67, 0, 0, 0, 0, 0, 0,208, 65, + 0, 0, 0, 0, 0, 0,196, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 6, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, + 0,224,195, 68, 0, 0,200, 65, 0,224,195, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, + 4, 0, 12, 0, 10, 0, 32, 6, 26, 0, 32, 6, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 31, 6, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 32, 6, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, 21, 0, 0,160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,104,184, 44, 5, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,216,191, 44, 5, - 0, 0, 0, 0,216,159, 44, 5, 0, 0, 0, 0,184,140, 44, 5, 0, 0, 0, 0, 88,143, 44, 5, 0, 0, 0, 0,200,143, 44, 5, - 0, 0, 0, 0, 56,144, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 6, 0, 0, 0, 0, 0, 0, -139, 1, 0, 0, 17, 17, 32, 6,140, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,191, 44, 5, - 0, 0, 0, 0, 72,191, 44, 5, 0, 0, 0, 0, 88,185, 44, 5, 0, 0, 0, 0,216,189, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 1, 0, 0, 88,185, 44, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0,200,186, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 74, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,196, 68, 0, 0, 0, 0, - 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 31, 6, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,224,195, 68, 0, 0,200, 65, 0,224,195, 68, - 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 32, 6, 26, 0, 32, 6, - 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 6, 0, 0, 0, 0, 0, 0, - 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 6, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,248,127,215, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, +168,129,215, 3, 0, 0, 0, 0, 72,126,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 67, 0, 0,185,195, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 75, 67, 0, 0,185,195, 0, 0, 0, 0,203, 0, 0, 0,220, 0, 0, 0, 0, 0, 0, 0,113, 1, 0, 0, + 0, 0, 0, 0,202, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,202, 0, 0, 0, 0, 0, 0, 0,113, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 3, 0, 0, 1, 0, 7, 0, + 18, 0, 0, 4, 6, 0,220, 0,114, 1,203, 0,114, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,219, 0, 0, 0, 26, 0, 0, 0,139, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +220, 0,114, 1, 0, 0, 4, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152,207,216, 3, 0, 0, 0, 0, +152,207,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,152,207,216, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 76, 79, 71, 73, 67, 95, 80, 84, 95,112,114,111,112,101,114,116,105,101,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 40, 1, 0, 0,200,186, 44, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0,216,189, 44, 5, 0, 0, 0, 0, 88,185, 44, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 67, 0, 0,185,195, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 67, 0, 0,185,195, - 0, 0, 0, 0,203, 0, 0, 0,220, 0, 0, 0, 0, 0, 0, 0,113, 1, 0, 0, 0, 0, 0, 0,202, 0, 0, 0, 0, 0, 0, 0, - 17, 0, 0, 0, 0, 0, 0, 0,202, 0, 0, 0, 0, 0, 0, 0,113, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 3, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,220, 0,114, 1,203, 0, -114, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,219, 0, 0, 0, 26, 0, 0, 0, -139, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,220, 0,114, 1, 0, 0, 4, 0, 3, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,188, 44, 5, 0, 0, 0, 0, 56,188, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 88, 1, 0, 0, 56,188, 44, 5, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 79, 71, 73, 67, 95, 80, 84, 95,112,114,111, -112,101,114,116,105,101,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 79, 71, 73, 67, 95, 80, 84, 95,112,114,111, -112,101,114,116,105,101,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,114,111,112,101,114,116,105,101,115, 0, 0, + 76, 79, 71, 73, 67, 95, 80, 84, 95,112,114,111,112,101,114,116,105,101,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,196,255,203, 0, 36, 0, 0, 0, 0, 0, + 80,114,111,112,101,114,116,105,101,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,196,255,203, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,216,189, 44, 5, 0, 0, 0, 0,216, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,186, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160, 68, 0, 0, 0, 0, - 0, 0,112, 67, 0, 80, 31,195, 0,234,179, 68,224,198,182,194,184,177,165, 67, 51, 5, 0, 0, 68, 5, 0, 0, 18, 0, 0, 0, -113, 1, 0, 0, 0, 0, 0, 0, 50, 5, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 50, 5, 0, 0, 18, 0, 0, 0, -113, 1, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,250, 70, 0, 0,250, 70, 0, 0, 0, 63, 72,225,154, 63, 10, 0, 0, 0, - 0, 0, 3, 0, 0, 0, 0, 4, 0, 0, 68, 5,114, 1, 51, 5, 96, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,220, 0, 0, 0, 31, 6, 0, 0, 26, 0, 0, 0,139, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 5,114, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, +168,129,215, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248,127,215, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,160, 68, 0, 0, 0, 0, 0, 0,112, 67, 0, 80, 31,195, 0,234,179, 68,224,198,182,194,184,177,165, 67, + 51, 5, 0, 0, 68, 5, 0, 0, 18, 0, 0, 0,113, 1, 0, 0, 0, 0, 0, 0, 50, 5, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, + 0, 0, 0, 0, 50, 5, 0, 0, 18, 0, 0, 0,113, 1, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,250, 70, 0, 0,250, 70, + 0, 0, 0, 63, 72,225,154, 63, 10, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 4, 0, 0, 68, 5,114, 1, 51, 5, 96, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,220, 0, 0, 0, 31, 6, 0, 0, 26, 0, 0, 0,139, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 5,114, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 72, 0, 0, 0, +248,217,208, 3, 0, 0, 0, 0,192, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, +184, 20,215, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,216, 21,215, 3, 0, 0, 0, 0,152, 19,215, 3, 0, 0, 0, 0, +104, 43,201, 3, 0, 0, 0, 0, 8, 44,201, 3, 0, 0, 0, 0, 72, 40,201, 3, 0, 0, 0, 0,200, 42,201, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 65, 5, 0, 0,126, 7, 0, 0,141, 1, 0, 0,233, 3, 0, 0, 9, 9, 62, 2, 93, 2, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,228,216, 3, 0, 0, 0, 0, 40,228,216, 3, 0, 0, 0, 0, + 88,131,215, 3, 0, 0, 0, 0, 8,133,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 88,131,215, 3, 0, 0, 0, 0, +215, 0, 0, 0, 1, 0, 0, 0, 8,133,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,230, 67, + 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,128, 15, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 61, 2, 0, 0, + 0, 0, 0, 0, 25, 0, 0, 0, 0, 64, 15, 68, 0, 0,200, 65, 0, 64, 15, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 62, 2, 26, 0, 62, 2, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 65, 5, 0, 0,126, 7, 0, 0,141, 1, 0, 0,166, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 62, 2, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 8,133,215, 3, 0, 0, 0, 0, +215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88,131,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,181, 67, + 0, 0, 0, 0, 0,128,218, 67, 0, 0, 0, 0,131,248, 1, 68, 0, 0, 0, 0, 86, 26, 3, 68, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 61, 2, 0, 0, + 0, 0, 0, 0, 66, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10,215, 35, 60, 0, 0,122, 68, + 0, 0, 0, 0, 1, 0, 3, 0, 0, 0, 0, 4, 10, 0, 62, 2, 67, 2, 62, 2, 67, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 65, 5, 0, 0,126, 7, 0, 0,167, 1, 0, 0,233, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 62, 2, 67, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 2, 0, 0, 40,228,216, 3, 0, 0, 0, 0, +186, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 72, 0, 0, 0, 72,191, 44, 5, 0, 0, 0, 0,193, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, 7, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,216,191, 44, 5, 0, 0, 0, 0,215, 0, 0, 0, - 1, 0, 0, 0,152,198, 44, 5, 0, 0, 0, 0,104,184, 44, 5, 0, 0, 0, 0, 24,145, 44, 5, 0, 0, 0, 0,136,145, 44, 5, - 0, 0, 0, 0,232,142, 44, 5, 0, 0, 0, 0,168,144, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 5, 0, 0, -126, 7, 0, 0,141, 1, 0, 0,233, 3, 0, 0, 9, 9, 62, 2, 93, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,168,195, 44, 5, 0, 0, 0, 0,168,195, 44, 5, 0, 0, 0, 0,200,192, 44, 5, 0, 0, 0, 0, 56,194, 44, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,200,192, 44, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 56,194, 44, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,230, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, - 0,128, 15, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 61, 2, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 64, 15, 68, - 0, 0,200, 65, 0, 64, 15, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, - 10, 0, 62, 2, 26, 0, 62, 2, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 5, 0, 0, -126, 7, 0, 0,141, 1, 0, 0,166, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 2, 26, 0, - 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 56,194, 44, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,200,192, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,181, 67, 0, 0, 0, 0, 0,128,218, 67, 0, 0, 0, 0, -131,248, 1, 68, 0, 0, 0, 0, 86, 26, 3, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 61, 2, 0, 0, 0, 0, 0, 0, 66, 2, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10,215, 35, 60, 0, 0,122, 68, 0, 0, 0, 0, 1, 0, 3, 0, 0, 0, 0, 4, - 10, 0, 62, 2, 67, 2, 62, 2, 67, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 5, 0, 0, -126, 7, 0, 0,167, 1, 0, 0,233, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 2, 67, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65,160, 2, 0, 0,168,195, 44, 5, 0, 0, 0, 0,187, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -3871,648 +3913,635 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,216, 21,215, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, +248, 22,215, 3, 0, 0, 0, 0,184, 20,215, 3, 0, 0, 0, 0,168, 44,201, 3, 0, 0, 0, 0, 72, 45,201, 3, 0, 0, 0, 0, + 8, 44,201, 3, 0, 0, 0, 0,104, 43,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 1, 0, 0, 63, 5, 0, 0, +141, 1, 0, 0,233, 3, 0, 0, 1, 1,251, 3, 93, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +120,209,216, 3, 0, 0, 0, 0,120,209,216, 3, 0, 0, 0, 0,184,134,215, 3, 0, 0, 0, 0,216,234,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 40, 1, 0, 0,184,134,215, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,104,136,215, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64,113, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,192,126, 68, + 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,250, 3, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,126, 68, 0, 0,200, 65, + 0,128,126, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,251, 3, + 26, 0,251, 3, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 1, 0, 0, 63, 5, 0, 0, +141, 1, 0, 0,166, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,251, 3, 26, 0, 0, 0, 1, 0, + 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 40, 1, 0, 0,104,136,215, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,120,231,216, 3, 0, 0, 0, 0, +184,134,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67, 0, 64, 70,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67, +255,127, 70,196, 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, 18, 0, 0, 0, 43, 3, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, + 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 18, 0, 0, 0, 43, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,160, 0, + 44, 3,143, 0, 26, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 1, 0, 0, 69, 1, 0, 0, +167, 1, 0, 0,233, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 67, 2, 0, 0, 5, 0, + 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 40, 1, 0, 0,120,231,216, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 40,233,216, 3, 0, 0, 0, 0, +104,136,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 67, 0, 0,206,194, 0, 0, 0, 0, 0, 0, 0, 0,231,102, 16, 67, + 0, 0,206,194, 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, 18, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, + 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 18, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,160, 0, +120, 0,143, 0,102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 1, 0, 0, 63, 5, 0, 0, +167, 1, 0, 0,167, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 6, 0, + 34, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 40, 1, 0, 0, 40,233,216, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,216,234,216, 3, 0, 0, 0, 0, +120,231,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 52, 67, 0, 0,109,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 67, + 0, 0,109,196, 0,128,145,195,163, 0, 0, 0,180, 0, 0, 0, 0, 0, 0, 0,144, 2, 0, 0, 0, 0, 0, 0,162, 0, 0, 0, + 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,162, 0, 0, 0, 0, 0, 0, 0,144, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 1, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,180, 0, +145, 2,163, 0,145, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 5, 0, 0, 63, 5, 0, 0, +167, 1, 0, 0,233, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, + 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, -160, 0, 0, 0,152,198, 44, 5, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 40,212, 44, 5, 0, 0, 0, 0,216,191, 44, 5, - 0, 0, 0, 0,248,145, 44, 5, 0, 0, 0, 0,104,146, 44, 5, 0, 0, 0, 0,136,145, 44, 5, 0, 0, 0, 0, 24,145, 44, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 1, 0, 0, 63, 5, 0, 0,141, 1, 0, 0,233, 3, 0, 0, 1, 1,251, 3, - 93, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120,210, 44, 5, 0, 0, 0, 0,120,210, 44, 5, - 0, 0, 0, 0,136,199, 44, 5, 0, 0, 0, 0, 72,205, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,136,199, 44, 5, - 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0,248,200, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 64,113, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,192,126, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -250, 3, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,126, 68, 0, 0,200, 65, 0,128,126, 68, 0, 0,200, 65, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,251, 3, 26, 0,251, 3, 26, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 1, 0, 0, 63, 5, 0, 0,141, 1, 0, 0,166, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,251, 3, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,248,200, 44, 5, - 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0,104,202, 44, 5, 0, 0, 0, 0,136,199, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 15, 67, 0, 64, 70,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67,255,127, 70,196, 0, 0, 0, 0,143, 0, 0, 0, -160, 0, 0, 0, 18, 0, 0, 0, 43, 3, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, -142, 0, 0, 0, 18, 0, 0, 0, 43, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,160, 0, 44, 3,143, 0, 26, 3, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 1, 0, 0, 69, 1, 0, 0,167, 1, 0, 0,233, 3, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 67, 2, 0, 0, 5, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,104,202, 44, 5, - 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0,216,203, 44, 5, 0, 0, 0, 0,248,200, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 16, 67, 0, 0,206,194, 0, 0, 0, 0, 0, 0, 0, 0,231,102, 16, 67, 0, 0,206,194, 0, 0, 0, 0,143, 0, 0, 0, -160, 0, 0, 0, 18, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, -142, 0, 0, 0, 18, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,160, 0,120, 0,143, 0,102, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 1, 0, 0, 63, 5, 0, 0,167, 1, 0, 0,167, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 6, 0, 34, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,216,203, 44, 5, - 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 72,205, 44, 5, 0, 0, 0, 0,104,202, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 52, 67, 0, 0,109,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 67, 0, 0,109,196, 0,128,145,195,163, 0, 0, 0, -180, 0, 0, 0, 0, 0, 0, 0,144, 2, 0, 0, 0, 0, 0, 0,162, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, -162, 0, 0, 0, 0, 0, 0, 0,144, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 64, 10, 1, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,180, 0,145, 2,163, 0,145, 2, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 5, 0, 0, 63, 5, 0, 0,167, 1, 0, 0,233, 3, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 40, 1, 0, 0,216,234,216, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 40,233,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 72,205, 44, 5, - 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216,203, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 1, 0, 0, 63, 5, 0, 0, +167, 1, 0, 0,233, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,251, 3, 67, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 1, 0, 0, 63, 5, 0, 0,167, 1, 0, 0,233, 3, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,251, 3, 67, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 7,217, 3, 0, 0, 0, 0, + 68, 65, 84, 65,112, 3, 0, 0, 72, 7,217, 3, 0, 0, 0, 0,173, 0, 0, 0, 1, 0, 0, 0,190, 35, 30, 61, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 40,139, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +111, 18, 3,187, 0, 0, 0, 0, 0, 0, 0,128, 0, 0, 0,128, 0, 0, 0,128, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,190, 35, 30, 61, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 40,139, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +111, 18, 3,187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,149, 53,207, 65, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,112,121,107, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +255,255,249,195, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,190, 35, 30, 61, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 40,139, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +111, 18, 3,187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184,206, 44, 5, 0, 0, 0, 0, 68, 65, 84, 65,120, 3, 0, 0,184,206, 44, 5, - 0, 0, 0, 0,174, 0, 0, 0, 1, 0, 0, 0,190, 35, 30, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 75, 40,139, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,111, 18, 3,187, 0, 0, 0, 0, 0, 0, 0,128, - 0, 0, 0,128, 0, 0, 0,128, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,190, 35, 30, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 75, 40,139, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,111, 18, 3,187, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,149, 53,207, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -112,121,107, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,249,195, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,190, 35, 30, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 75, 40,139, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,111, 18, 3,187, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,207, 3,116, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -207, 3,116, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,207, 3,116, 64, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,149, 53,207, 65, -214,211,111, 65, 0, 0, 0, 0, 0, 0, 0, 0,221, 57, 80, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0,251,251, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,207, 3,116, 64, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,207, 3,116, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +207, 3,116, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,149, 53,207, 65,214,211,111, 65, 0, 0, 0, 0, 0, 0, 0, 0,221, 57, 80, 61, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160, 65, 0, 0, 5, 0,251,251, 0, 0, 92, 62, 55, 63, 56,186,224,190,237,203,148,190, + 3,236,234,190, 1, 0, 0, 0, 0, 0,128, 63, 0, 0,180, 66, 0, 0,180, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 96, 1, 0, 0,120,209,216, 3, 0, 0, 0, 0,174, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 51, 51, 51, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65,205,204, 76, 62, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, 0, +200,213,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 62, 55, 63, 56,186,224,190,237,203,148,190, 3,236,234,190, 1, 0, 0, 0, - 0, 0,128, 63, 0, 0,180, 66, 0, 0,180, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 96, 1, 0, 0,120,210, 44, 5, 0, 0, 0, 0,175, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, - 51, 51, 51, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 32, 65,205,204, 76, 62, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, 0,216,191, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 3, 0, + 8, 8,128, 0, 0, 0, 12, 66, 0, 0,128, 63,205,204,204, 61, 0, 0,122, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 10, 0, 7, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 3, 0, 8, 8,128, 0, - 0, 0, 12, 66, 0, 0,128, 63,205,204,204, 61, 0, 0,122, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 10, 0, 7, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65,160, 0, 0, 0,248, 22,215, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +216, 21,215, 3, 0, 0, 0, 0,232, 40,201, 3, 0, 0, 0, 0,168, 39,201, 3, 0, 0, 0, 0, 72, 45,201, 3, 0, 0, 0, 0, +168, 44,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 1, 0, 0,141, 1, 0, 0,233, 3, 0, 0, + 3, 3, 68, 1, 93, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,104, 2,209, 3, 0, 0, 0, 0, +104, 2,209, 3, 0, 0, 0, 0,136,236,216, 3, 0, 0, 0, 0, 56,238,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, +136,236,216, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 56,238,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0,128,244, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,162, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, -160, 0, 0, 0, 40,212, 44, 5, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152,198, 44, 5, - 0, 0, 0, 0, 88,143, 44, 5, 0, 0, 0, 0,120,142, 44, 5, 0, 0, 0, 0,104,146, 44, 5, 0, 0, 0, 0,248,145, 44, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 1, 0, 0,141, 1, 0, 0,233, 3, 0, 0, 3, 3, 68, 1, - 93, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248,215, 44, 5, 0, 0, 0, 0,248,215, 44, 5, - 0, 0, 0, 0, 24,213, 44, 5, 0, 0, 0, 0,136,214, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 24,213, 44, 5, - 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0,136,214, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0,128,244, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,162, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 67, 1, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,161, 67, 0, 0,200, 65, 0,128,161, 67, 0, 0,200, 65, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 68, 1, 26, 0, 68, 1, 26, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 1, 0, 0,141, 1, 0, 0,166, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 1, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,136,214, 44, 5, - 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24,213, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0,128,141, 67, 0, 0,244,194, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,153, 67, 0, 64, 12,196, 0, 0, 0, 0, 51, 1, 0, 0, - 68, 1, 0, 0, 18, 0, 0, 0, 66, 2, 0, 0, 0, 0, 0, 0, 50, 1, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, - 50, 1, 0, 0, 18, 0, 0, 0, 66, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 18, 6, 0, 0, 2, 0, 3, 3, 0, 0, 12, 4, 6, 0, 68, 1, 67, 2, 51, 1, 49, 2, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 1, 0, 0,167, 1, 0, 0,233, 3, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 1, 67, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 1, 0, 0,248,215, 44, 5, - 0, 0, 0, 0,184, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,161, 67, 0, 0,200, 65, 0,128,161, 67, 0, 0,200, 65, + 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 68, 1, 26, 0, 68, 1, 26, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 1, 0, 0,141, 1, 0, 0,166, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 1, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, + 56,238,216, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136,236,216, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0,128,141, 67, 0, 0,244,194, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,153, 67, 0, 64, 12,196, 0, 0, 0, 0, + 51, 1, 0, 0, 68, 1, 0, 0, 18, 0, 0, 0, 66, 2, 0, 0, 0, 0, 0, 0, 50, 1, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, + 0, 0, 0, 0, 50, 1, 0, 0, 18, 0, 0, 0, 66, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 18, 6, 0, 0, 2, 0, 3, 3, 0, 0, 12, 4, 6, 0, 68, 1, 67, 2, 51, 1, 49, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 1, 0, 0,167, 1, 0, 0,233, 3, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 1, 67, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 1, 0, 0, +104, 2,209, 3, 0, 0, 0, 0,183, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,104, 11,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 68, 65, 84, 65, 16, 0, 0, 0,104, 11,217, 3, 0, 0, 0, 0,237, 0, 0, 0, 1, 0, 0, 0, + 14, 0, 0, 0, 14, 0, 0, 0, 88, 32,199, 3, 0, 0, 0, 0, 68, 65, 84, 65,224, 0, 0, 0, 88, 32,199, 3, 0, 0, 0, 0, +236, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,168,194,217, 3, 0, 0, 0, 0, 19, 0, 0, 0, 1, 0, 1, 0, +168,194,217, 3, 0, 0, 0, 0, 20, 0, 0, 0, 1, 0, 1, 0,168,194,217, 3, 0, 0, 0, 0, 21, 0, 1, 0, 1, 0, 0, 0, +168,194,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 24, 51,163, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, +184,219,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,136, 48,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, +152, 7,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,216, 29,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, +168,225,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,120,209,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, +200,213,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 24, 98,200, 3, 0, 0, 0, 0, 21, 0, 0, 0, 1, 0, 1, 0, +168,194,217, 3, 0, 0, 0, 0, 83, 78, 0, 0, 8, 1, 0, 0, 56, 43,217, 3, 0, 0, 0, 0,210, 0, 0, 0, 1, 0, 0, 0, +232,117,217, 3, 0, 0, 0, 0,152, 66,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 83, 82, 83, 99,114,105,112,116,105,110,103, 0,103, 46, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232, 45,201, 3, 0, 0, 0, 0, + 8, 54,201, 3, 0, 0, 0, 0,104, 81,216, 3, 0, 0, 0, 0,216, 95,216, 3, 0, 0, 0, 0, 24, 24,215, 3, 0, 0, 0, 0, +184, 29,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,232, 45,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, +136, 46,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 32, 0, 0, 0,136, 46,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 40, 47,201, 3, 0, 0, 0, 0, +232, 45,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 4, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, + 40, 47,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,200, 47,201, 3, 0, 0, 0, 0,136, 46,201, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 5, 4, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,200, 47,201, 3, 0, 0, 0, 0, +211, 0, 0, 0, 1, 0, 0, 0,104, 48,201, 3, 0, 0, 0, 0, 40, 47,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +126, 7, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,104, 48,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, + 8, 49,201, 3, 0, 0, 0, 0,200, 47,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168, 3, 0, 0, 0, 0, + 68, 65, 84, 65, 32, 0, 0, 0, 8, 49,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,168, 49,201, 3, 0, 0, 0, 0, +104, 48,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7,168, 3, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, +168, 49,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 72, 50,201, 3, 0, 0, 0, 0, 8, 49,201, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,240, 5,168, 3, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 72, 50,201, 3, 0, 0, 0, 0, +211, 0, 0, 0, 1, 0, 0, 0,232, 50,201, 3, 0, 0, 0, 0,168, 49,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +240, 5, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,232, 50,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, +136, 51,201, 3, 0, 0, 0, 0, 72, 50,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,104, 1, 1, 0, 0, 0, + 68, 65, 84, 65, 32, 0, 0, 0,136, 51,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 40, 52,201, 3, 0, 0, 0, 0, +232, 50,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 5,104, 1, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, + 40, 52,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,200, 52,201, 3, 0, 0, 0, 0,136, 51,201, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,248, 2,104, 1, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,200, 52,201, 3, 0, 0, 0, 0, +211, 0, 0, 0, 1, 0, 0, 0,104, 53,201, 3, 0, 0, 0, 0, 40, 52,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +240, 5,236, 2, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,104, 53,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, + 8, 54,201, 3, 0, 0, 0, 0,200, 52,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7,236, 2, 0, 0, 0, 0, + 68, 65, 84, 65, 32, 0, 0, 0, 8, 54,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +104, 53,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 2,168, 3, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, +104, 81,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 24, 82,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +136, 46,201, 3, 0, 0, 0, 0, 40, 47,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, + 24, 82,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,200, 82,216, 3, 0, 0, 0, 0,104, 81,216, 3, 0, 0, 0, 0, +136, 46,201, 3, 0, 0, 0, 0,104, 48,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, +200, 82,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,120, 83,216, 3, 0, 0, 0, 0, 24, 82,216, 3, 0, 0, 0, 0, + 40, 47,201, 3, 0, 0, 0, 0, 8, 49,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, +120, 83,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 40, 84,216, 3, 0, 0, 0, 0,200, 82,216, 3, 0, 0, 0, 0, +104, 48,201, 3, 0, 0, 0, 0, 8, 49,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, + 40, 84,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,216, 84,216, 3, 0, 0, 0, 0,120, 83,216, 3, 0, 0, 0, 0, + 8, 49,201, 3, 0, 0, 0, 0,168, 49,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, +216, 84,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,136, 85,216, 3, 0, 0, 0, 0, 40, 84,216, 3, 0, 0, 0, 0, +200, 47,201, 3, 0, 0, 0, 0, 72, 50,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, +136, 85,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 56, 86,216, 3, 0, 0, 0, 0,216, 84,216, 3, 0, 0, 0, 0, +232, 45,201, 3, 0, 0, 0, 0,232, 50,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, + 56, 86,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,232, 86,216, 3, 0, 0, 0, 0,136, 85,216, 3, 0, 0, 0, 0, +104, 48,201, 3, 0, 0, 0, 0,232, 50,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, +232, 86,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,152, 87,216, 3, 0, 0, 0, 0, 56, 86,216, 3, 0, 0, 0, 0, +168, 49,201, 3, 0, 0, 0, 0,136, 51,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, +152, 87,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 72, 88,216, 3, 0, 0, 0, 0,232, 86,216, 3, 0, 0, 0, 0, + 72, 50,201, 3, 0, 0, 0, 0,136, 51,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, + 72, 88,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,248, 88,216, 3, 0, 0, 0, 0,152, 87,216, 3, 0, 0, 0, 0, +232, 50,201, 3, 0, 0, 0, 0, 40, 52,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, +248, 88,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,168, 89,216, 3, 0, 0, 0, 0, 72, 88,216, 3, 0, 0, 0, 0, +136, 51,201, 3, 0, 0, 0, 0, 40, 52,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, +168, 89,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 88, 90,216, 3, 0, 0, 0, 0,248, 88,216, 3, 0, 0, 0, 0, + 72, 50,201, 3, 0, 0, 0, 0,200, 52,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, + 88, 90,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 8, 91,216, 3, 0, 0, 0, 0,168, 89,216, 3, 0, 0, 0, 0, +168, 49,201, 3, 0, 0, 0, 0,200, 52,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, + 8, 91,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,184, 91,216, 3, 0, 0, 0, 0, 88, 90,216, 3, 0, 0, 0, 0, + 8, 49,201, 3, 0, 0, 0, 0,104, 53,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, +184, 91,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,104, 92,216, 3, 0, 0, 0, 0, 8, 91,216, 3, 0, 0, 0, 0, +200, 47,201, 3, 0, 0, 0, 0,104, 53,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, +104, 92,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 24, 93,216, 3, 0, 0, 0, 0,184, 91,216, 3, 0, 0, 0, 0, +200, 52,201, 3, 0, 0, 0, 0,104, 53,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, + 24, 93,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,200, 93,216, 3, 0, 0, 0, 0,104, 92,216, 3, 0, 0, 0, 0, +104, 48,201, 3, 0, 0, 0, 0, 8, 54,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, +200, 93,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,120, 94,216, 3, 0, 0, 0, 0, 24, 93,216, 3, 0, 0, 0, 0, +168, 49,201, 3, 0, 0, 0, 0, 8, 54,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, +120, 94,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 40, 95,216, 3, 0, 0, 0, 0,200, 93,216, 3, 0, 0, 0, 0, + 40, 52,201, 3, 0, 0, 0, 0, 8, 54,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, + 40, 95,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,216, 95,216, 3, 0, 0, 0, 0,120, 94,216, 3, 0, 0, 0, 0, +232, 50,201, 3, 0, 0, 0, 0,136, 51,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, +216, 95,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 95,216, 3, 0, 0, 0, 0, +232, 45,201, 3, 0, 0, 0, 0, 72, 50,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, + 24, 24,215, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 56, 25,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +104, 48,201, 3, 0, 0, 0, 0,136, 46,201, 3, 0, 0, 0, 0, 40, 47,201, 3, 0, 0, 0, 0, 8, 49,201, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,169, 3, 0, 0, 5, 4, 0, 0, 7, 7,127, 7, 93, 0, 1, 0, + 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152,200,207, 3, 0, 0, 0, 0,152,200,207, 3, 0, 0, 0, 0, +232,239,216, 3, 0, 0, 0, 0,152,241,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,232,239,216, 3, 0, 0, 0, 0, +215, 0, 0, 0, 1, 0, 0, 0,152,241,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,148, 68, + 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,224,239, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0, + 0, 0, 0, 0, 25, 0, 0, 0, 0,192,239, 68, 0, 0,200, 65, 0,192,239, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,127, 7, 26, 0,127, 7, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,236, 3, 0, 0, 5, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,127, 7, 26, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,152,241,216, 3, 0, 0, 0, 0, +215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,239,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,239, 68, + 0, 0, 0, 0, 0, 0, 28, 66, 0, 0, 0, 0, 0,192,237, 68, 0, 0, 0, 0, 0, 0,134, 66,110, 7, 0, 0,127, 7, 0, 0, + 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,109, 7, 0, 0, + 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 2, 2, 0, 0, 1, 0, 3, 3, 2, 0, 0, 4, 10, 0,127, 7, 67, 0,110, 7, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,169, 3, 0, 0,235, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,127, 7, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, 56, 25,215, 3, 0, 0, 0, 0, +214, 0, 0, 0, 1, 0, 0, 0, 88, 26,215, 3, 0, 0, 0, 0, 24, 24,215, 3, 0, 0, 0, 0, 72, 50,201, 3, 0, 0, 0, 0, +200, 52,201, 3, 0, 0, 0, 0,104, 53,201, 3, 0, 0, 0, 0,200, 47,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +241, 5, 0, 0,126, 7, 0, 0, 0, 0, 0, 0,235, 2, 0, 0, 4, 4,142, 1,236, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,184,129,199, 3, 0, 0, 0, 0,184,129,199, 3, 0, 0, 0, 0, 72,243,216, 3, 0, 0, 0, 0, +248,244,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 72,243,216, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, +248,244,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,148, 67, 0, 0, 0, 0, 0, 0,208, 65, + 0, 0, 0, 0, 0, 0,199, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,141, 1, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, + 0,128,198, 67, 0, 0,200, 65, 0,128,198, 67, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, + 4, 0, 12, 0, 10, 0,142, 1, 26, 0,142, 1, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +241, 5, 0, 0,126, 7, 0, 0,210, 2, 0, 0,235, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +142, 1, 26, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,248,244,216, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 72,243,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,198, 67, 0, 0, 61,196, 0, 0, 0, 0, + 0, 0, 0, 0,254,127,190, 67,254,127, 52,196, 0, 0, 0, 0,125, 1, 0, 0,142, 1, 0, 0, 0, 0, 0, 0,209, 2, 0, 0, + 0, 0, 0, 0,126, 1, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,124, 1, 0, 0, 0, 0, 0, 0,209, 2, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 1, 0, 0, 1, 0, 7, 0, + 18, 0, 0, 4, 6, 0,142, 1,210, 2,125, 1,210, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +241, 5, 0, 0,126, 7, 0, 0, 0, 0, 0, 0,209, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +142, 1,210, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88,211,216, 3, 0, 0, 0, 0, +152, 50,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 88,211,216, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, + 56,213,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 66, 85, 84, 84, 79, 78, 83, 95, 80, 84, 95, 99,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 66, 85, 84, 84, 79, 78, 83, 95, 80, 84, 95, 99,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 67,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,220,255,124, 1, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, + 56,213,216, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 24,215,216, 3, 0, 0, 0, 0, 88,211,216, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,114,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 88,217, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,114,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 68, 65, 84, 65, 16, 0, 0, 0, 88,217, 44, 5, 0, 0, 0, 0,238, 0, 0, 0, 1, 0, 0, 0, 14, 0, 0, 0, - 14, 0, 0, 0,184,217, 44, 5, 0, 0, 0, 0, 68, 65, 84, 65,224, 0, 0, 0,184,217, 44, 5, 0, 0, 0, 0,237, 0, 0, 0, - 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 88,162, 45, 5, 0, 0, 0, 0, 19, 0, 0, 0, 1, 0, 1, 0, 88,162, 45, 5, - 0, 0, 0, 0, 20, 0, 0, 0, 1, 0, 1, 0, 88,162, 45, 5, 0, 0, 0, 0, 21, 0, 1, 0, 1, 0, 0, 0, 88,162, 45, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 8,189, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,120,198, 45, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 8, 30, 47, 5, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,168,212, 45, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 8,123, 46, 5, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 8,206, 45, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 72,184, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,216,191, 45, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 56,183, 45, 5, 0, 0, 0, 0, 21, 0, 0, 0, 1, 0, 1, 0, 88,162, 45, 5, - 0, 0, 0, 0, 83, 78, 0, 0, 8, 1, 0, 0,120,219, 44, 5, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,232, 42, 45, 5, - 0, 0, 0, 0,104,139, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 82, 83, 99, -114,105,112,116,105,110,103, 0,103, 46, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,220, 44, 5, 0, 0, 0, 0,120,226, 44, 5, - 0, 0, 0, 0,232,226, 44, 5, 0, 0, 0, 0, 24,236, 44, 5, 0, 0, 0, 0,136,236, 44, 5, 0, 0, 0, 0,152, 35, 45, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,135,255,124, 1, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,200,220, 44, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 56,221, 44, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 32, 0, 0, 0, 56,221, 44, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,168,221, 44, 5, 0, 0, 0, 0,200,220, 44, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 4, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,168,221, 44, 5, - 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 24,222, 44, 5, 0, 0, 0, 0, 56,221, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,126, 7, 5, 4, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 24,222, 44, 5, 0, 0, 0, 0,212, 0, 0, 0, - 1, 0, 0, 0,136,222, 44, 5, 0, 0, 0, 0,168,221, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,136,222, 44, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,248,222, 44, 5, - 0, 0, 0, 0, 24,222, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168, 3, 0, 0, 0, 0, 68, 65, 84, 65, - 32, 0, 0, 0,248,222, 44, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,104,223, 44, 5, 0, 0, 0, 0,136,222, 44, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7,168, 3, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,104,223, 44, 5, - 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,216,223, 44, 5, 0, 0, 0, 0,248,222, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,240, 5,168, 3, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,216,223, 44, 5, 0, 0, 0, 0,212, 0, 0, 0, - 1, 0, 0, 0, 72,224, 44, 5, 0, 0, 0, 0,104,223, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 5, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 72,224, 44, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,184,224, 44, 5, - 0, 0, 0, 0,216,223, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,104, 1, 1, 0, 0, 0, 68, 65, 84, 65, - 32, 0, 0, 0,184,224, 44, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 40,225, 44, 5, 0, 0, 0, 0, 72,224, 44, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 5,104, 1, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 40,225, 44, 5, - 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,152,225, 44, 5, 0, 0, 0, 0,184,224, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,248, 2,104, 1, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,152,225, 44, 5, 0, 0, 0, 0,212, 0, 0, 0, - 1, 0, 0, 0, 8,226, 44, 5, 0, 0, 0, 0, 40,225, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 5,236, 2, - 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 8,226, 44, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,120,226, 44, 5, - 0, 0, 0, 0,152,225, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7,236, 2, 0, 0, 0, 0, 68, 65, 84, 65, - 32, 0, 0, 0,120,226, 44, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,226, 44, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 2,168, 3, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,232,226, 44, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 88,227, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,221, 44, 5, - 0, 0, 0, 0,168,221, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 88,227, 44, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,200,227, 44, 5, 0, 0, 0, 0,232,226, 44, 5, 0, 0, 0, 0, 56,221, 44, 5, - 0, 0, 0, 0,136,222, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,200,227, 44, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 56,228, 44, 5, 0, 0, 0, 0, 88,227, 44, 5, 0, 0, 0, 0,168,221, 44, 5, - 0, 0, 0, 0,248,222, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 56,228, 44, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,168,228, 44, 5, 0, 0, 0, 0,200,227, 44, 5, 0, 0, 0, 0,136,222, 44, 5, - 0, 0, 0, 0,248,222, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,168,228, 44, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 24,229, 44, 5, 0, 0, 0, 0, 56,228, 44, 5, 0, 0, 0, 0,248,222, 44, 5, - 0, 0, 0, 0,104,223, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 24,229, 44, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,136,229, 44, 5, 0, 0, 0, 0,168,228, 44, 5, 0, 0, 0, 0, 24,222, 44, 5, - 0, 0, 0, 0,216,223, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,136,229, 44, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,248,229, 44, 5, 0, 0, 0, 0, 24,229, 44, 5, 0, 0, 0, 0,200,220, 44, 5, - 0, 0, 0, 0, 72,224, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,248,229, 44, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,104,230, 44, 5, 0, 0, 0, 0,136,229, 44, 5, 0, 0, 0, 0,136,222, 44, 5, - 0, 0, 0, 0, 72,224, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,104,230, 44, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,216,230, 44, 5, 0, 0, 0, 0,248,229, 44, 5, 0, 0, 0, 0,104,223, 44, 5, - 0, 0, 0, 0,184,224, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,216,230, 44, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 72,231, 44, 5, 0, 0, 0, 0,104,230, 44, 5, 0, 0, 0, 0,216,223, 44, 5, - 0, 0, 0, 0,184,224, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 72,231, 44, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,184,231, 44, 5, 0, 0, 0, 0,216,230, 44, 5, 0, 0, 0, 0, 72,224, 44, 5, - 0, 0, 0, 0, 40,225, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,184,231, 44, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 40,232, 44, 5, 0, 0, 0, 0, 72,231, 44, 5, 0, 0, 0, 0,184,224, 44, 5, - 0, 0, 0, 0, 40,225, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 40,232, 44, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,152,232, 44, 5, 0, 0, 0, 0,184,231, 44, 5, 0, 0, 0, 0,216,223, 44, 5, - 0, 0, 0, 0,152,225, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,152,232, 44, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 8,233, 44, 5, 0, 0, 0, 0, 40,232, 44, 5, 0, 0, 0, 0,104,223, 44, 5, - 0, 0, 0, 0,152,225, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 8,233, 44, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,120,233, 44, 5, 0, 0, 0, 0,152,232, 44, 5, 0, 0, 0, 0,248,222, 44, 5, - 0, 0, 0, 0, 8,226, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,120,233, 44, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,232,233, 44, 5, 0, 0, 0, 0, 8,233, 44, 5, 0, 0, 0, 0, 24,222, 44, 5, - 0, 0, 0, 0, 8,226, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,232,233, 44, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 88,234, 44, 5, 0, 0, 0, 0,120,233, 44, 5, 0, 0, 0, 0,152,225, 44, 5, - 0, 0, 0, 0, 8,226, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 88,234, 44, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,200,234, 44, 5, 0, 0, 0, 0,232,233, 44, 5, 0, 0, 0, 0,136,222, 44, 5, - 0, 0, 0, 0,120,226, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,200,234, 44, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 56,235, 44, 5, 0, 0, 0, 0, 88,234, 44, 5, 0, 0, 0, 0,104,223, 44, 5, - 0, 0, 0, 0,120,226, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 56,235, 44, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,168,235, 44, 5, 0, 0, 0, 0,200,234, 44, 5, 0, 0, 0, 0, 40,225, 44, 5, - 0, 0, 0, 0,120,226, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,168,235, 44, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 24,236, 44, 5, 0, 0, 0, 0, 56,235, 44, 5, 0, 0, 0, 0, 72,224, 44, 5, - 0, 0, 0, 0,184,224, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 24,236, 44, 5, - 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168,235, 44, 5, 0, 0, 0, 0,200,220, 44, 5, - 0, 0, 0, 0,216,223, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,136,236, 44, 5, - 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 88,240, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136,222, 44, 5, - 0, 0, 0, 0, 56,221, 44, 5, 0, 0, 0, 0,168,221, 44, 5, 0, 0, 0, 0,248,222, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,169, 3, 0, 0, 5, 4, 0, 0, 7, 7,127, 7, 93, 0, 1, 0, 0, 0, 0, 0, - 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 42, 45, 5, 0, 0, 0, 0, 88, 42, 45, 5, 0, 0, 0, 0,120,237, 44, 5, - 0, 0, 0, 0,232,238, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,120,237, 44, 5, 0, 0, 0, 0,216, 0, 0, 0, - 1, 0, 0, 0,232,238, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,148, 68, 0, 0, 0, 0, - 0, 0,208, 65, 0, 0, 0, 0, 0,224,239, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0, 0, 0, 0, 0, - 25, 0, 0, 0, 0,192,239, 68, 0, 0,200, 65, 0,192,239, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, - 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,127, 7, 26, 0,127, 7, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,236, 3, 0, 0, 5, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,127, 7, 26, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,232,238, 44, 5, 0, 0, 0, 0,216, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120,237, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0,192,239, 68, 0, 0, 0, 0, - 0, 0, 28, 66, 0, 0, 0, 0, 0,192,237, 68, 0, 0, 0, 0, 0, 0,134, 66,110, 7, 0, 0,127, 7, 0, 0, 0, 0, 0, 0, - 66, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,109, 7, 0, 0, 0, 0, 0, 0, - 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 2, 2, 0, 0, - 1, 0, 3, 3, 2, 0, 0, 4, 10, 0,127, 7, 67, 0,110, 7, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,169, 3, 0, 0,235, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,127, 7, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, 88,240, 44, 5, 0, 0, 0, 0,215, 0, 0, 0, - 1, 0, 0, 0,232, 8, 45, 5, 0, 0, 0, 0,136,236, 44, 5, 0, 0, 0, 0,216,223, 44, 5, 0, 0, 0, 0,152,225, 44, 5, - 0, 0, 0, 0, 8,226, 44, 5, 0, 0, 0, 0, 24,222, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,241, 5, 0, 0, -126, 7, 0, 0, 0, 0, 0, 0,235, 2, 0, 0, 4, 4,142, 1,236, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,168, 7, 45, 5, 0, 0, 0, 0,168, 7, 45, 5, 0, 0, 0, 0, 72,241, 44, 5, 0, 0, 0, 0,184,242, 44, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 72,241, 44, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0,184,242, 44, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,148, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, - 0, 0,199, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,141, 1, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,198, 67, - 0, 0,200, 65, 0,128,198, 67, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, - 10, 0,142, 1, 26, 0,142, 1, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,241, 5, 0, 0, -126, 7, 0, 0,210, 2, 0, 0,235, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,142, 1, 26, 0, - 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,184,242, 44, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 72,241, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,198, 67, 0, 0, 61,196, 0, 0, 0, 0, 0, 0, 0, 0, -254,127,190, 67,254,127, 52,196, 0, 0, 0, 0,125, 1, 0, 0,142, 1, 0, 0, 0, 0, 0, 0,209, 2, 0, 0, 0, 0, 0, 0, -126, 1, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,124, 1, 0, 0, 0, 0, 0, 0,209, 2, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 1, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, - 6, 0,142, 1,210, 2,125, 1,210, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,241, 5, 0, 0, -126, 7, 0, 0, 0, 0, 0, 0,209, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,142, 1,210, 2, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,244, 44, 5, 0, 0, 0, 0, 8, 6, 45, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 40,244, 44, 5, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,200,245, 44, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, - 79, 78, 83, 95, 80, 84, 95, 99,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 85, 84, 84, - 79, 78, 83, 95, 80, 84, 95, 99,111,110,116,101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67,111,110,116, -101,120,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,220,255, -124, 1, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,200,245, 44, 5, - 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,104,247, 44, 5, 0, 0, 0, 0, 40,244, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,114,101,110,100,101,114, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,114,101,110,100,101,114, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82,101,110,100,101,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,135,255,124, 1, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 24,215,216, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, +248,216,216, 3, 0, 0, 0, 0, 56,213,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,104,247, 44, 5, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 8,249, 44, 5, - 0, 0, 0, 0,200,245, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, - 69, 82, 95, 80, 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, - 69, 82, 95, 80, 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 97,121,101, -114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,111,255, -124, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,108, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 76, 97,121,101,114,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 8,249, 44, 5, - 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,168,250, 44, 5, 0, 0, 0, 0,104,247, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,100,105,109,101,110,115,105,111,110,115, + 0, 0,111,255,124, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,100,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, +248,216,216, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,216,218,216, 3, 0, 0, 0, 0, 24,215,216, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,100,105,109,101,110,115, +105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,100,105,109,101,110,115, +105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68,105,109,101,110,115,105,111,110,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140,254,124, 1,203, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,140,254,124, 1,203, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,168,250, 44, 5, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 72,252, 44, 5, - 0, 0, 0, 0, 8,249, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, - 69, 82, 95, 80, 84, 95, 97,110,116,105, 97,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, - 69, 82, 95, 80, 84, 95, 97,110,116,105, 97,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65,110,116,105, - 45, 65,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58,254, -124, 1, 58, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,216,218,216, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, +184,220,216, 3, 0, 0, 0, 0,248,216,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 97,110,116,105, 97,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 97,110,116,105, 97,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 72,252, 44, 5, - 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,232,253, 44, 5, 0, 0, 0, 0,168,250, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,109,111,116,105,111,110, 95, 98,108,117, -114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,109,111,116,105,111,110, 95, 98,108,117, -114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 97,109,112,108,101,100, 32, 77,111,116,105,111,110, 32, 66,108,117,114, 0, + 65,110,116,105, 45, 65,108,105, 97,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,254,124, 1, 0, 0, 20, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, - 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 58,254,124, 1, 58, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,232,253, 44, 5, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,136,255, 44, 5, - 0, 0, 0, 0, 72,252, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, - 69, 82, 95, 80, 84, 95,115,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, - 69, 82, 95, 80, 84, 95,115,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,104, 97,100, -105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10,254, -124, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, +184,220,216, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,152,222,216, 3, 0, 0, 0, 0,216,218,216, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,109,111,116,105,111,110, + 95, 98,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,109,111,116,105,111,110, + 95, 98,108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 97,109,112,108,101,100, 32, 77,111,116,105,111,110, 32, 66, +108,117,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,254,124, 1, 0, 0, 20, 0, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,136,255, 44, 5, - 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 40, 1, 45, 5, 0, 0, 0, 0,232,253, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,101,114,102,111,114,109, 97,110, 99, -101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,101,114,102,111,114,109, 97,110, 99, -101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,152,222,216, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, +120,224,216, 3, 0, 0, 0, 0,184,220,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,242,253,124, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, - 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 83,104, 97,100,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 40, 1, 45, 5, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,200, 2, 45, 5, - 0, 0, 0, 0,136,255, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, - 69, 82, 95, 80, 84, 95,112,111,115,116, 95,112,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, - 69, 82, 95, 80, 84, 95,112,111,115,116, 95,112,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,111,115,116, - 32, 80,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,218,253, -124, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 10,254,124, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,200, 2, 45, 5, - 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,104, 4, 45, 5, 0, 0, 0, 0, 40, 1, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,116, 97,109,112, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, +120,224,216, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,248, 44,217, 3, 0, 0, 0, 0,152,222,216, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,101,114,102,111,114, +109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,101,114,102,111,114, +109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,101,114,102,111,114,109, 97,110, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,116, 97,109,112, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,242,253,124, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,194,253,124, 1, 0, 0, 20, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, - 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,248, 44,217, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, +216, 46,217, 3, 0, 0, 0, 0,120,224,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,111,115,116, 95,112,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,112,111,115,116, 95,112,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,104, 4, 45, 5, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 8, 6, 45, 5, - 0, 0, 0, 0,200, 2, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, - 69, 82, 95, 80, 84, 95,111,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, - 69, 82, 95, 80, 84, 95,111,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79,117,116,112, -117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,253, -124, 1,130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 80,111,115,116, 32, 80,114,111, 99,101,115,115,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,218,253,124, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 8, 6, 45, 5, - 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,104, 4, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 98, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 98, 97,107,101, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, +216, 46,217, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,184, 48,217, 3, 0, 0, 0, 0,248, 44,217, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,115,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16,253,124, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, - 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,116, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,194,253,124, 1, 0, 0, 20, 0, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65,248, 0, 0, 0,168, 7, 45, 5, 0, 0, 0, 0,180, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,184, 48,217, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, +152, 50,217, 3, 0, 0, 0, 0,216, 46,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,111,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 82, 69, 78, 68, 69, 82, 95, 80, 84, 95,111,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 79,117,116,112,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 40,253,124, 1,130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, 21, 0, 0, -160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,232, 8, 45, 5, - 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,120, 22, 45, 5, 0, 0, 0, 0, 88,240, 44, 5, 0, 0, 0, 0, 40,225, 44, 5, - 0, 0, 0, 0,120,226, 44, 5, 0, 0, 0, 0,104,223, 44, 5, 0, 0, 0, 0,184,224, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,249, 2, 0, 0,239, 5, 0, 0,105, 1, 0, 0,167, 3, 0, 0, 1, 1,247, 2, 63, 2, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200, 20, 45, 5, 0, 0, 0, 0,200, 20, 45, 5, 0, 0, 0, 0,216, 9, 45, 5, - 0, 0, 0, 0,152, 15, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,216, 9, 45, 5, 0, 0, 0, 0,216, 0, 0, 0, - 1, 0, 0, 0, 72, 11, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64,113, 68, 0, 0, 0, 0, - 0, 0,208, 65, 0, 0, 0, 0, 0,192, 61, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,246, 2, 0, 0, 0, 0, 0, 0, - 25, 0, 0, 0, 0,128, 61, 68, 0, 0,200, 65, 0,128, 61, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, - 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,247, 2, 26, 0,247, 2, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,249, 2, 0, 0,239, 5, 0, 0,105, 1, 0, 0,130, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,247, 2, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, +152, 50,217, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184, 48,217, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 98, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 72, 11, 45, 5, 0, 0, 0, 0,216, 0, 0, 0, - 1, 0, 0, 0,184, 12, 45, 5, 0, 0, 0, 0,216, 9, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67, 0, 64, 70,196, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67,255,127, 70,196, 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, 18, 0, 0, 0, - 43, 3, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 18, 0, 0, 0, - 43, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, - 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,160, 0, 44, 3,143, 0, 26, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,249, 2, 0, 0,249, 2, 0, 0,131, 1, 0, 0,167, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 37, 2, 0, 0, 5, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 69, 78, 68, 69, 82, 95, 80, 84, 95, 98, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 97,107,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,184, 12, 45, 5, 0, 0, 0, 0,216, 0, 0, 0, - 1, 0, 0, 0, 40, 14, 45, 5, 0, 0, 0, 0, 72, 11, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 67, 0, 0,206,194, - 0, 0, 0, 0, 0, 0, 0, 0,231,102, 16, 67, 0, 0,206,194, 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, 18, 0, 0, 0, -119, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 18, 0, 0, 0, -119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, - 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,160, 0,120, 0,143, 0,102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,249, 2, 0, 0,239, 5, 0, 0,131, 1, 0, 0,131, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 6, 0, 34, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16,253,124, 1, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 40, 14, 45, 5, 0, 0, 0, 0,216, 0, 0, 0, - 1, 0, 0, 0,152, 15, 45, 5, 0, 0, 0, 0,184, 12, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 67, 0,128,142,196, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 67, 0, 0, 26,196, 0, 0, 0, 0,163, 0, 0, 0,180, 0, 0, 0, 18, 0, 0, 0, -121, 2, 0, 0, 0, 0, 0, 0,162, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,162, 0, 0, 0, 18, 0, 0, 0, -121, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, - 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,180, 0,122, 2,163, 0,104, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,239, 5, 0, 0,239, 5, 0, 0,131, 1, 0, 0,167, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,248, 0, 0, 0,184,129,199, 3, 0, 0, 0, 0,179, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,152, 15, 45, 5, 0, 0, 0, 0,216, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 14, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +255, 21, 0, 0,160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, + 88, 26,215, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,120, 27,215, 3, 0, 0, 0, 0, 56, 25,215, 3, 0, 0, 0, 0, + 40, 52,201, 3, 0, 0, 0, 0, 8, 54,201, 3, 0, 0, 0, 0,168, 49,201, 3, 0, 0, 0, 0,136, 51,201, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,249, 2, 0, 0,239, 5, 0, 0,105, 1, 0, 0,167, 3, 0, 0, 1, 1,247, 2, 63, 2, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120, 52,217, 3, 0, 0, 0, 0,120, 52,217, 3, 0, 0, 0, 0, +168,246,216, 3, 0, 0, 0, 0,104,253,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,168,246,216, 3, 0, 0, 0, 0, +215, 0, 0, 0, 1, 0, 0, 0, 88,248,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64,113, 68, + 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,192, 61, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,246, 2, 0, 0, + 0, 0, 0, 0, 25, 0, 0, 0, 0,128, 61, 68, 0, 0,200, 65, 0,128, 61, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,247, 2, 26, 0,247, 2, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,249, 2, 0, 0,239, 5, 0, 0,105, 1, 0, 0,130, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,247, 2, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 88,248,216, 3, 0, 0, 0, 0, +215, 0, 0, 0, 1, 0, 0, 0, 8,250,216, 3, 0, 0, 0, 0,168,246,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67, + 0, 64, 70,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67,255,127, 70,196, 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, + 18, 0, 0, 0, 43, 3, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, + 18, 0, 0, 0, 43, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, + 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,160, 0, 44, 3,143, 0, 26, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,249, 2, 0, 0,249, 2, 0, 0,131, 1, 0, 0,167, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 37, 2, 0, 0, 5, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 8,250,216, 3, 0, 0, 0, 0, +215, 0, 0, 0, 1, 0, 0, 0,184,251,216, 3, 0, 0, 0, 0, 88,248,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 67, + 0, 0,206,194, 0, 0, 0, 0, 0, 0, 0, 0,231,102, 16, 67, 0, 0,206,194, 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, + 18, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, + 18, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, + 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,160, 0,120, 0,143, 0,102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,249, 2, 0, 0,239, 5, 0, 0,131, 1, 0, 0,131, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 6, 0, 34, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,184,251,216, 3, 0, 0, 0, 0, +215, 0, 0, 0, 1, 0, 0, 0,104,253,216, 3, 0, 0, 0, 0, 8,250,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 67, + 0,128,142,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 67, 0, 0, 26,196, 0, 0, 0, 0,163, 0, 0, 0,180, 0, 0, 0, + 18, 0, 0, 0,121, 2, 0, 0, 0, 0, 0, 0,162, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,162, 0, 0, 0, + 18, 0, 0, 0,121, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, + 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,180, 0,122, 2,163, 0,104, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,239, 5, 0, 0,239, 5, 0, 0,131, 1, 0, 0,167, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,249, 2, 0, 0,239, 5, 0, 0,131, 1, 0, 0,167, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,247, 2, 37, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,104,253,216, 3, 0, 0, 0, 0, +215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184,251,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 8, 17, 45, 5, 0, 0, 0, 0, 68, 65, 84, 65,120, 3, 0, 0, 8, 17, 45, 5, 0, 0, 0, 0,174, 0, 0, 0, - 1, 0, 0, 0, 0, 0,140, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 74,141,193, 63, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 1,128,191, 0, 0,128,191, 0, 0, 0, 0, 0, 0, 0, 0,225,215,163,188, - 0, 0, 0, 0, 68,239,209, 62, 51,177,205,190,184,158, 81, 63, 0, 0, 0, 0, 70,119,105, 63,143, 74, 70, 62, 35, 44,185,190, - 0, 0, 0, 0,162, 84, 89,188,166, 33,101, 63, 42, 61,228, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,214,211,111,193, - 0, 0,128, 63, 69,239,209, 62, 70,119,105, 63,176, 84, 89,188, 0, 0, 0, 0, 53,177,205,190,142, 74, 70, 62,166, 33,101, 63, - 0, 0, 0, 0,185,158, 81, 63, 35, 44,185,190, 43, 61,228, 62, 0, 0, 0, 0,164, 96, 68, 65,111,121,173,192,248,209,213, 64, - 0, 0,128, 63,178,157,229, 62, 30,132, 27,191,222,160, 81,191,184,158, 81,191,117, 90,127, 63,166,235,149, 62, 9, 46,185, 62, - 35, 44,185, 62,145,180,109,188,212, 60,173, 63,129, 63,228,190, 42, 61,228,190, 0, 0, 0, 0, 0, 0, 0, 0, 96,132,111, 65, -214,211,111, 65,217,236,191, 62, 54,117, 85, 63,224,246, 70,188, 0,160, 32,182,252, 5,136,190, 43, 33, 3, 62,235,135, 23, 63, - 0, 0, 96, 53,215,104, 25,196,133,132,135, 67, 37, 9,167,195,136,252, 71,194, 3, 54, 25, 68,158, 87,135,195,205,209,166, 67, -151,254, 71, 66, 68,239,209, 62, 51,177,205,190,184,158, 81, 63, 0, 0, 0, 0, 70,119,105, 63,143, 74, 70, 62, 35, 44,185,190, - 0, 0, 0, 0,162, 84, 89,188,166, 33,101, 63, 42, 61,228, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,214,211,111,193, - 0, 0,128, 63,178,157,229, 62, 30,132, 27,191,222,160, 81,191,184,158, 81,191,117, 90,127, 63,166,235,149, 62, 9, 46,185, 62, - 35, 44,185, 62,145,180,109,188,212, 60,173, 63,129, 63,228,190, 42, 61,228,190, 0, 0, 0, 0, 0, 0, 0, 0, 96,132,111, 65, -214,211,111, 65, 46, 86, 45, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 86, 45, 64, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 86, 45, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,128, 63, 92, 62, 55, 63, 56,186,224,190,237,203,148,190, 3,236,234,190,214,211,111, 65,214,211,111, 65, 0, 0, 0, 0, - 0, 0, 0, 0,107,227, 29, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255, 1, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,249, 2, 0, 0,239, 5, 0, 0,131, 1, 0, 0,167, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,247, 2, 37, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,200, 76,217, 3, 0, 0, 0, 0, 68, 65, 84, 65,112, 3, 0, 0,200, 76,217, 3, 0, 0, 0, 0, +173, 0, 0, 0, 1, 0, 0, 0, 0, 0,140, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 74,141,193, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 1,128,191, 0, 0,128,191, 0, 0, 0, 0, 0, 0, 0, 0, +225,215,163,188, 0, 0, 0, 0, 68,239,209, 62, 51,177,205,190,184,158, 81, 63, 0, 0, 0, 0, 70,119,105, 63,143, 74, 70, 62, + 35, 44,185,190, 0, 0, 0, 0,162, 84, 89,188,166, 33,101, 63, 42, 61,228, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +214,211,111,193, 0, 0,128, 63, 69,239,209, 62, 70,119,105, 63,176, 84, 89,188, 0, 0, 0, 0, 53,177,205,190,142, 74, 70, 62, +166, 33,101, 63, 0, 0, 0, 0,185,158, 81, 63, 35, 44,185,190, 43, 61,228, 62, 0, 0, 0, 0,164, 96, 68, 65,111,121,173,192, +248,209,213, 64, 0, 0,128, 63,178,157,229, 62, 30,132, 27,191,222,160, 81,191,184,158, 81,191,117, 90,127, 63,166,235,149, 62, + 9, 46,185, 62, 35, 44,185, 62,145,180,109,188,212, 60,173, 63,129, 63,228,190, 42, 61,228,190, 0, 0, 0, 0, 0, 0, 0, 0, + 96,132,111, 65,214,211,111, 65,217,236,191, 62, 54,117, 85, 63,224,246, 70,188, 0,160, 32,182,252, 5,136,190, 43, 33, 3, 62, +235,135, 23, 63, 0, 0, 96, 53,215,104, 25,196,133,132,135, 67, 37, 9,167,195,136,252, 71,194, 3, 54, 25, 68,158, 87,135,195, +205,209,166, 67,151,254, 71, 66, 68,239,209, 62, 51,177,205,190,184,158, 81, 63, 0, 0, 0, 0, 70,119,105, 63,143, 74, 70, 62, + 35, 44,185,190, 0, 0, 0, 0,162, 84, 89,188,166, 33,101, 63, 42, 61,228, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +214,211,111,193, 0, 0,128, 63,178,157,229, 62, 30,132, 27,191,222,160, 81,191,184,158, 81,191,117, 90,127, 63,166,235,149, 62, + 9, 46,185, 62, 35, 44,185, 62,145,180,109,188,212, 60,173, 63,129, 63,228,190, 42, 61,228,190, 0, 0, 0, 0, 0, 0, 0, 0, + 96,132,111, 65,214,211,111, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 30, 33, 12, 66, - 86,152,137, 66,116, 27,126, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 96, 1, 0, 0,200, 20, 45, 5, 0, 0, 0, 0,175, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 51, 51, 51, 63, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65, -205,204, 76, 62, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, 0,216,191, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 3, 0, 8, 8,128, 0, 0, 0, 12, 66, 0, 0,128, 63, - 10,215, 35, 60, 0, 0,250, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 16, 0, 10, 0, 7, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,120, 22, 45, 5, - 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,216, 28, 45, 5, 0, 0, 0, 0,232, 8, 45, 5, 0, 0, 0, 0,200,220, 44, 5, - 0, 0, 0, 0, 72,224, 44, 5, 0, 0, 0, 0,184,224, 44, 5, 0, 0, 0, 0,216,223, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,239, 5, 0, 0, 0, 0, 0, 0,103, 1, 0, 0, 18, 18,240, 5,104, 1, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 27, 45, 5, 0, 0, 0, 0, 8, 27, 45, 5, 0, 0, 0, 0,104, 23, 45, 5, - 0, 0, 0, 0,216, 24, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,104, 23, 45, 5, 0, 0, 0, 0,216, 0, 0, 0, - 1, 0, 0, 0,216, 24, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,160, 67, 0, 0, 0, 0, - 0, 0,208, 65, 0, 0, 0, 0, 0, 0,190, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,239, 5, 0, 0, 0, 0, 0, 0, - 25, 0, 0, 0, 0,224,189, 68, 0, 0,200, 65, 0,224,189, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, - 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,240, 5, 26, 0,240, 5, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,239, 5, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,240, 5, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 46, 86, 45, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 86, 45, 64, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 86, 45, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 92, 62, 55, 63, 56,186,224,190,237,203,148,190, 3,236,234,190,214,211,111, 65,214,211,111, 65, + 0, 0, 0, 0, 0, 0, 0, 0,107,227, 29, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, +255,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 30, 33, 12, 66, + 86,152,137, 66,116, 27,126, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 96, 1, 0, 0, +120, 52,217, 3, 0, 0, 0, 0,174, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 51, 51, 51, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65,205,204, 76, 62, + 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, 0,200,213,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,216, 24, 45, 5, 0, 0, 0, 0,216, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,104, 23, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0,224,189, 68, 0, 0, 0, 0, - 0, 0, 51, 67, 0, 0, 0, 0, 0,224,187, 68, 0, 0, 0, 0, 0, 0,167, 67,223, 5, 0, 0,240, 5, 0, 0, 0, 0, 0, 0, - 77, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,222, 5, 0, 0, 0, 0, 0, 0, - 77, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 2, 2, 0, 0, - 1, 0, 3, 3, 2, 0, 0, 4, 10, 0,240, 5, 78, 1,223, 5, 78, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,239, 5, 0, 0, 26, 0, 0, 0,103, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,240, 5, 78, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 72, 26, 45, 5, 0, 0, 0, 0,194, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,184, 26, 45, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 4, 0, 0, 0,184, 26, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,136, 1, 0, 0, 8, 27, 45, 5, 0, 0, 0, 0,195, 0, 0, 0, 1, 0, 0, 0, + 1, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 3, 0, 8, 8,128, 0, 0, 0, 12, 66, 0, 0,128, 63, 10,215, 35, 60, + 0, 0,250, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, + 10, 0, 7, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 26, 45, 5, 0, 0, 0, 0, 72, 26, 45, 5, 0, 0, 0, 0, - 62, 62, 62, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,120, 27,215, 3, 0, 0, 0, 0, +214, 0, 0, 0, 1, 0, 0, 0,152, 28,215, 3, 0, 0, 0, 0, 88, 26,215, 3, 0, 0, 0, 0,232, 45,201, 3, 0, 0, 0, 0, +232, 50,201, 3, 0, 0, 0, 0,136, 51,201, 3, 0, 0, 0, 0, 72, 50,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,239, 5, 0, 0, 0, 0, 0, 0,103, 1, 0, 0, 18, 18,240, 5,104, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,184, 80,217, 3, 0, 0, 0, 0,184, 80,217, 3, 0, 0, 0, 0, 24,255,216, 3, 0, 0, 0, 0, +200, 0,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 24,255,216, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, +200, 0,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,160, 67, 0, 0, 0, 0, 0, 0,208, 65, + 0, 0, 0, 0, 0, 0,190, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,239, 5, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, + 0,224,189, 68, 0, 0,200, 65, 0,224,189, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, + 4, 0, 12, 0, 10, 0,240, 5, 26, 0,240, 5, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,239, 5, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +240, 5, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,200, 0,217, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 24,255,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,224,189, 68, 0, 0, 0, 0, 0, 0, 51, 67, + 0, 0, 0, 0, 0,224,187, 68, 0, 0, 0, 0, 0, 0,167, 67,223, 5, 0, 0,240, 5, 0, 0, 0, 0, 0, 0, 77, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,222, 5, 0, 0, 0, 0, 0, 0, 77, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 2, 2, 0, 0, 1, 0, 3, 3, + 2, 0, 0, 4, 10, 0,240, 5, 78, 1,223, 5, 78, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,239, 5, 0, 0, 26, 0, 0, 0,103, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +240, 5, 78, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,136, 96,216, 3, 0, 0, 0, 0,193, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 40,182,117, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 4, 0, 0, 0, 40,182,117, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 68, 65, 84, 65,136, 1, 0, 0,184, 80,217, 3, 0, 0, 0, 0,194, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136, 96,216, 3, 0, 0, 0, 0,136, 96,216, 3, 0, 0, 0, 0, 62, 62, 62, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -112,121,116,104,111,110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 8, 4, 0, 0, 8, 4, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,216, 28, 45, 5, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, -152, 35, 45, 5, 0, 0, 0, 0,120, 22, 45, 5, 0, 0, 0, 0,152,225, 44, 5, 0, 0, 0, 0,104,223, 44, 5, 0, 0, 0, 0, -248,222, 44, 5, 0, 0, 0, 0, 8,226, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,241, 5, 0, 0,126, 7, 0, 0, -237, 2, 0, 0,167, 3, 0, 0, 3, 3,142, 1,187, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -168, 32, 45, 5, 0, 0, 0, 0,168, 32, 45, 5, 0, 0, 0, 0,200, 29, 45, 5, 0, 0, 0, 0, 56, 31, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 1, 0, 0,200, 29, 45, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 56, 31, 45, 5, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,244, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,199, 67, - 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,141, 1, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,198, 67, 0, 0,200, 65, - 0,128,198, 67, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,142, 1, - 26, 0,142, 1, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,241, 5, 0, 0,126, 7, 0, 0, -237, 2, 0, 0, 6, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,142, 1, 26, 0, 0, 0, 1, 0, - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 1, 0, 0, 56, 31, 45, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -200, 29, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,141, 67, 0, 0,244,194, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,190, 67, - 0, 0, 15,195, 0, 0, 0, 0,125, 1, 0, 0,142, 1, 0, 0, 18, 0, 0, 0,160, 0, 0, 0, 0, 0, 0, 0,124, 1, 0, 0, - 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,124, 1, 0, 0, 18, 0, 0, 0,160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 18, 6, 0, 0, 2, 0, 3, 3, 0, 0, 12, 4, 6, 0,142, 1, -161, 0,125, 1,143, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,241, 5, 0, 0,126, 7, 0, 0, - 7, 3, 0, 0,167, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,142, 1,161, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,112,121,116,104, +111,110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 4, 0, 0, + 8, 4, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,152, 28,215, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,184, 29,215, 3, + 0, 0, 0, 0,120, 27,215, 3, 0, 0, 0, 0,200, 52,201, 3, 0, 0, 0, 0,168, 49,201, 3, 0, 0, 0, 0, 8, 49,201, 3, + 0, 0, 0, 0,104, 53,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,241, 5, 0, 0,126, 7, 0, 0,237, 2, 0, 0, +167, 3, 0, 0, 3, 3,142, 1,187, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 4,209, 3, + 0, 0, 0, 0, 8, 4,209, 3, 0, 0, 0, 0,120, 2,217, 3, 0, 0, 0, 0, 40, 4,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, + 40, 1, 0, 0,120, 2,217, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 40, 4,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0,128,244, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,199, 67, 0, 0, 0, 0, + 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,141, 1, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,128,198, 67, 0, 0,200, 65, 0,128,198, 67, + 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,142, 1, 26, 0,142, 1, + 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,241, 5, 0, 0,126, 7, 0, 0,237, 2, 0, 0, + 6, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,142, 1, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 24, 1, 0, 0,168, 32, 45, 5, 0, 0, 0, 0,184, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, + 40, 1, 0, 0, 40, 4,217, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120, 2,217, 3, + 0, 0, 0, 0, 0, 0, 0, 0, 0,128,141, 67, 0, 0,244,194, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,190, 67, 0, 0, 15,195, + 0, 0, 0, 0,125, 1, 0, 0,142, 1, 0, 0, 18, 0, 0, 0,160, 0, 0, 0, 0, 0, 0, 0,124, 1, 0, 0, 0, 0, 0, 0, + 17, 0, 0, 0, 0, 0, 0, 0,124, 1, 0, 0, 18, 0, 0, 0,160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 18, 6, 0, 0, 2, 0, 3, 3, 0, 0, 12, 4, 6, 0,142, 1,161, 0,125, 1, +143, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,241, 5, 0, 0,126, 7, 0, 0, 7, 3, 0, 0, +167, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,142, 1,161, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, + 24, 1, 0, 0, 8, 4,209, 3, 0, 0, 0, 0,183, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 34, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 68, 65, 84, 65, 16, 0, 0, 0, 8, 34, 45, 5, 0, 0, 0, 0, -238, 0, 0, 0, 1, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0,104, 34, 45, 5, 0, 0, 0, 0, 68, 65, 84, 65,224, 0, 0, 0, -104, 34, 45, 5, 0, 0, 0, 0,237, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 88,162, 45, 5, 0, 0, 0, 0, - 19, 0, 0, 0, 1, 0, 1, 0, 88,162, 45, 5, 0, 0, 0, 0, 20, 0, 0, 0, 1, 0, 1, 0, 88,162, 45, 5, 0, 0, 0, 0, - 21, 0, 1, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 8,189, 45, 5, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 1, 0,120,198, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 8, 30, 47, 5, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 1, 0,168,212, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 8,123, 46, 5, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 1, 0, 8,206, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 72,184, 45, 5, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 1, 0,216,191, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 56,183, 45, 5, 0, 0, 0, 0, - 21, 0, 0, 0, 1, 0, 1, 0, 88,162, 45, 5, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,152, 35, 45, 5, 0, 0, 0, 0, -215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216, 28, 45, 5, 0, 0, 0, 0, 72,224, 44, 5, 0, 0, 0, 0, -136,222, 44, 5, 0, 0, 0, 0,120,226, 44, 5, 0, 0, 0, 0, 40,225, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,247, 2, 0, 0,105, 1, 0, 0,167, 3, 0, 0, 9, 9,248, 2, 63, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,104, 39, 45, 5, 0, 0, 0, 0,104, 39, 45, 5, 0, 0, 0, 0,136, 36, 45, 5, 0, 0, 0, 0, -248, 37, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,136, 36, 45, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, -248, 37, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,230, 67, 0, 0, 0, 0, 0, 0,208, 65, - 0, 0, 0, 0, 0, 0, 62, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,247, 2, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, - 0,192, 61, 68, 0, 0,200, 65, 0,192, 61, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, - 4, 0, 12, 0, 10, 0,248, 2, 26, 0,248, 2, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,247, 2, 0, 0,105, 1, 0, 0,130, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -248, 2, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 11,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,248, 37, 45, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,136, 36, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0,224,189, 68, 0, 0, 0, 0, 0,192, 22, 68, -248,150, 23, 68, 8, 41,100, 68, 46,224, 62, 67,233, 15,206, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,247, 2, 0, 0, 0, 0, 0, 0, 36, 2, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10,215, 35, 60, 0, 0,122, 68, 0, 0, 0, 0, 1, 0, 3, 0, - 0, 0, 0, 4, 10, 0,248, 2, 37, 2,248, 2, 37, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,247, 2, 0, 0,131, 1, 0, 0,167, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -248, 2, 37, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 68, 65, 84, 65, 16, 0, 0, 0,248, 11,217, 3, 0, 0, 0, 0,237, 0, 0, 0, + 1, 0, 0, 0, 14, 0, 0, 0, 14, 0, 0, 0,184, 33,199, 3, 0, 0, 0, 0, 68, 65, 84, 65,224, 0, 0, 0,184, 33,199, 3, + 0, 0, 0, 0,236, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,168,194,217, 3, 0, 0, 0, 0, 19, 0, 0, 0, + 1, 0, 1, 0,168,194,217, 3, 0, 0, 0, 0, 20, 0, 0, 0, 1, 0, 1, 0,168,194,217, 3, 0, 0, 0, 0, 21, 0, 1, 0, + 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 24, 51,163, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 1, 0,184,219,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,136, 48,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 1, 0,152, 7,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,216, 29,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 1, 0,168,225,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0,120,209,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 1, 0,200,213,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 24, 98,200, 3, 0, 0, 0, 0, 21, 0, 0, 0, + 1, 0, 1, 0,168,194,217, 3, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,184, 29,215, 3, 0, 0, 0, 0,214, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152, 28,215, 3, 0, 0, 0, 0,232, 50,201, 3, 0, 0, 0, 0,104, 48,201, 3, + 0, 0, 0, 0, 8, 54,201, 3, 0, 0, 0, 0, 40, 52,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +247, 2, 0, 0,105, 1, 0, 0,167, 3, 0, 0, 9, 9,248, 2, 63, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,200,114,217, 3, 0, 0, 0, 0,200,114,217, 3, 0, 0, 0, 0,248, 82,217, 3, 0, 0, 0, 0,168, 84,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,248, 82,217, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,168, 84,217, 3, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,230, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, + 0, 0, 62, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,247, 2, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,192, 61, 68, + 0, 0,200, 65, 0,192, 61, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, + 10, 0,248, 2, 26, 0,248, 2, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +247, 2, 0, 0,105, 1, 0, 0,130, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 2, 26, 0, + 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 2, 0, 0,104, 39, 45, 5, 0, 0, 0, 0,187, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 12, 0, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0,205,204,204, 61,231, 1, 0, 0,243, 1, 0, 0,122, 1, 0, 0,124, 1, 0, 0,231, 1, 0, 0,243, 1, 0, 0, - 4, 0, 0, 0,124, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,168, 84,217, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,248, 82,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,224,189, 68, 0, 0, 0, 0, 0,192, 22, 68,248,150, 23, 68, + 8, 41,100, 68, 46,224, 62, 67,233, 15,206, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,247, 2, 0, 0, 0, 0, 0, 0, 36, 2, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10,215, 35, 60, 0, 0,122, 68, 0, 0, 0, 0, 1, 0, 3, 0, 0, 0, 0, 4, + 10, 0,248, 2, 37, 2,248, 2, 37, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +247, 2, 0, 0,131, 1, 0, 0,167, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 2, 37, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 68, 65, 84, 65,160, 2, 0, 0,200,114,217, 3, 0, 0, 0, 0,186, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 32, 0, 0, 0, 0, 0, 0, 0, 12, 0, 7, 0, 0, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, +205,204,204, 61,231, 1, 0, 0,243, 1, 0, 0,122, 1, 0, 0,124, 1, 0, 0,231, 1, 0, 0,243, 1, 0, 0, 4, 0, 0, 0, +124, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -4525,129 +4554,136 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 83, 78, 0, 0, 8, 1, 0, 0,232, 42, 45, 5, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 8,114, 45, 5, 0, 0, 0, 0, -120,219, 44, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 82, 85, 86, 32, 69,100,105, -116,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 44, 45, 5, 0, 0, 0, 0, 72, 47, 45, 5, 0, 0, 0, 0, -184, 47, 45, 5, 0, 0, 0, 0, 24, 52, 45, 5, 0, 0, 0, 0,136, 52, 45, 5, 0, 0, 0, 0,168, 96, 45, 5, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 32, 0, 0, 0, 56, 44, 45, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,168, 44, 45, 5, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, -168, 44, 45, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 24, 45, 45, 5, 0, 0, 0, 0, 56, 44, 45, 5, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 4, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 24, 45, 45, 5, 0, 0, 0, 0, -212, 0, 0, 0, 1, 0, 0, 0,136, 45, 45, 5, 0, 0, 0, 0,168, 44, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -126, 7, 5, 4, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,136, 45, 45, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, -248, 45, 45, 5, 0, 0, 0, 0, 24, 45, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 32, 0, 0, 0,248, 45, 45, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,104, 46, 45, 5, 0, 0, 0, 0, -136, 45, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,234, 3, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, -104, 46, 45, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,216, 46, 45, 5, 0, 0, 0, 0,248, 45, 45, 5, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,126, 7,234, 3, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,216, 46, 45, 5, 0, 0, 0, 0, -212, 0, 0, 0, 1, 0, 0, 0, 72, 47, 45, 5, 0, 0, 0, 0,104, 46, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -200, 3,234, 3, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 72, 47, 45, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,216, 46, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200, 3, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 0, 0, 0,184, 47, 45, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 40, 48, 45, 5, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,168, 44, 45, 5, 0, 0, 0, 0, 24, 45, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 0, 0, 0, 40, 48, 45, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,152, 48, 45, 5, 0, 0, 0, 0, -184, 47, 45, 5, 0, 0, 0, 0,168, 44, 45, 5, 0, 0, 0, 0,248, 45, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 0, 0, 0,152, 48, 45, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 8, 49, 45, 5, 0, 0, 0, 0, - 40, 48, 45, 5, 0, 0, 0, 0, 24, 45, 45, 5, 0, 0, 0, 0,104, 46, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 0, 0, 0, 8, 49, 45, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,120, 49, 45, 5, 0, 0, 0, 0, -152, 48, 45, 5, 0, 0, 0, 0,248, 45, 45, 5, 0, 0, 0, 0,104, 46, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 0, 0, 0,120, 49, 45, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,232, 49, 45, 5, 0, 0, 0, 0, - 8, 49, 45, 5, 0, 0, 0, 0,248, 45, 45, 5, 0, 0, 0, 0,216, 46, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 0, 0, 0,232, 49, 45, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 88, 50, 45, 5, 0, 0, 0, 0, -120, 49, 45, 5, 0, 0, 0, 0, 56, 44, 45, 5, 0, 0, 0, 0, 72, 47, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 0, 0, 0, 88, 50, 45, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,200, 50, 45, 5, 0, 0, 0, 0, -232, 49, 45, 5, 0, 0, 0, 0, 56, 44, 45, 5, 0, 0, 0, 0,248, 45, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 0, 0, 0,200, 50, 45, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 56, 51, 45, 5, 0, 0, 0, 0, - 88, 50, 45, 5, 0, 0, 0, 0,216, 46, 45, 5, 0, 0, 0, 0, 72, 47, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 0, 0, 0, 56, 51, 45, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,168, 51, 45, 5, 0, 0, 0, 0, -200, 50, 45, 5, 0, 0, 0, 0,104, 46, 45, 5, 0, 0, 0, 0,216, 46, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 0, 0, 0,168, 51, 45, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 24, 52, 45, 5, 0, 0, 0, 0, - 56, 51, 45, 5, 0, 0, 0, 0,136, 45, 45, 5, 0, 0, 0, 0, 72, 47, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 0, 0, 0, 24, 52, 45, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -168, 51, 45, 5, 0, 0, 0, 0,136, 45, 45, 5, 0, 0, 0, 0,104, 46, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65,160, 0, 0, 0,136, 52, 45, 5, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 88, 56, 45, 5, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,248, 45, 45, 5, 0, 0, 0, 0,168, 44, 45, 5, 0, 0, 0, 0, 24, 45, 45, 5, 0, 0, 0, 0, -104, 46, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,235, 3, 0, 0, 5, 4, 0, 0, - 7, 7,127, 7, 27, 0, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120,113, 45, 5, 0, 0, 0, 0, -120,113, 45, 5, 0, 0, 0, 0,120, 53, 45, 5, 0, 0, 0, 0,232, 54, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, -120, 53, 45, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0,232, 54, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 32,148, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,224,239, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,126, 7, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,192,239, 68, 0, 0,200, 65, 0,192,239, 68, 0, 0,200, 65, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,127, 7, 26, 0,127, 7, 26, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,235, 3, 0, 0, 4, 4, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,127, 7, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 78, 0, 0, + 8, 1, 0, 0,232,117,217, 3, 0, 0, 0, 0,210, 0, 0, 0, 1, 0, 0, 0, 24,157,217, 3, 0, 0, 0, 0, 56, 43,217, 3, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 82, 85, 86, 32, 69,100,105,116,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, -232, 54, 45, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120, 53, 45, 5, 0, 0, 0, 0, - 0, 0, 0, 0, 0,240,109, 69, 0, 0,128,192, 0, 0, 0, 0, 0, 0, 0, 0,255,255,109, 69, 0, 0, 0,192, 0, 0, 0, 0, -112, 7, 0, 0,129, 7, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, - 0, 0, 0, 0,111, 7, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0,128, 63, 2, 0, 0, 0, 1, 0, 3, 3, 2, 0, 0, 4, 10, 0,129, 7, 2, 0,112, 7, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 4, 0, 0, 5, 4, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168, 54,201, 3, 0, 0, 0, 0, 8, 59,201, 3, 0, 0, 0, 0, 56, 97,216, 3, + 0, 0, 0, 0, 24,104,216, 3, 0, 0, 0, 0,216, 30,215, 3, 0, 0, 0, 0, 24, 33,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, + 32, 0, 0, 0,168, 54,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 72, 55,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 72, 55,201, 3, + 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,232, 55,201, 3, 0, 0, 0, 0,168, 54,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 5, 4, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,232, 55,201, 3, 0, 0, 0, 0,211, 0, 0, 0, + 1, 0, 0, 0,136, 56,201, 3, 0, 0, 0, 0, 72, 55,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 5, 4, + 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,136, 56,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 40, 57,201, 3, + 0, 0, 0, 0,232, 55,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, + 32, 0, 0, 0, 40, 57,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,200, 57,201, 3, 0, 0, 0, 0,136, 56,201, 3, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,234, 3, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,200, 57,201, 3, + 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,104, 58,201, 3, 0, 0, 0, 0, 40, 57,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,126, 7,234, 3, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,104, 58,201, 3, 0, 0, 0, 0,211, 0, 0, 0, + 1, 0, 0, 0, 8, 59,201, 3, 0, 0, 0, 0,200, 57,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200, 3,234, 3, + 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 8, 59,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,104, 58,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200, 3, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, + 40, 0, 0, 0, 56, 97,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,232, 97,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 72, 55,201, 3, 0, 0, 0, 0,232, 55,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, + 40, 0, 0, 0,232, 97,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,152, 98,216, 3, 0, 0, 0, 0, 56, 97,216, 3, + 0, 0, 0, 0, 72, 55,201, 3, 0, 0, 0, 0, 40, 57,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, + 40, 0, 0, 0,152, 98,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 72, 99,216, 3, 0, 0, 0, 0,232, 97,216, 3, + 0, 0, 0, 0,232, 55,201, 3, 0, 0, 0, 0,200, 57,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, + 40, 0, 0, 0, 72, 99,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,248, 99,216, 3, 0, 0, 0, 0,152, 98,216, 3, + 0, 0, 0, 0, 40, 57,201, 3, 0, 0, 0, 0,200, 57,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, + 40, 0, 0, 0,248, 99,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,168,100,216, 3, 0, 0, 0, 0, 72, 99,216, 3, + 0, 0, 0, 0, 40, 57,201, 3, 0, 0, 0, 0,104, 58,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, + 40, 0, 0, 0,168,100,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 88,101,216, 3, 0, 0, 0, 0,248, 99,216, 3, + 0, 0, 0, 0,168, 54,201, 3, 0, 0, 0, 0, 8, 59,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, + 40, 0, 0, 0, 88,101,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 8,102,216, 3, 0, 0, 0, 0,168,100,216, 3, + 0, 0, 0, 0,168, 54,201, 3, 0, 0, 0, 0, 40, 57,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, + 40, 0, 0, 0, 8,102,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,184,102,216, 3, 0, 0, 0, 0, 88,101,216, 3, + 0, 0, 0, 0,104, 58,201, 3, 0, 0, 0, 0, 8, 59,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, + 40, 0, 0, 0,184,102,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,104,103,216, 3, 0, 0, 0, 0, 8,102,216, 3, + 0, 0, 0, 0,200, 57,201, 3, 0, 0, 0, 0,104, 58,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, + 40, 0, 0, 0,104,103,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 24,104,216, 3, 0, 0, 0, 0,184,102,216, 3, + 0, 0, 0, 0,136, 56,201, 3, 0, 0, 0, 0, 8, 59,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, + 40, 0, 0, 0, 24,104,216, 3, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,104,103,216, 3, + 0, 0, 0, 0,136, 56,201, 3, 0, 0, 0, 0,200, 57,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, +160, 0, 0, 0,216, 30,215, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0,248, 31,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 40, 57,201, 3, 0, 0, 0, 0, 72, 55,201, 3, 0, 0, 0, 0,232, 55,201, 3, 0, 0, 0, 0,200, 57,201, 3, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,235, 3, 0, 0, 5, 4, 0, 0, 7, 7,127, 7, + 27, 0, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88,201,207, 3, 0, 0, 0, 0, 88,201,207, 3, + 0, 0, 0, 0, 88, 86,217, 3, 0, 0, 0, 0, 8, 88,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 88, 86,217, 3, + 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 8, 88,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 32,148, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,224,239, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +126, 7, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,192,239, 68, 0, 0,200, 65, 0,192,239, 68, 0, 0,200, 65, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,127, 7, 26, 0,127, 7, 26, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,235, 3, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,127, 7, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 8, 88,217, 3, + 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 86,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 0,240,109, 69, 0, 0,128,192, 0, 0, 0, 0, 0, 0, 0, 0,255,255,109, 69, 0, 0, 0,192, 0, 0, 0, 0,112, 7, 0, 0, +129, 7, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, +111, 7, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0,128, 63, 2, 0, 0, 0, 1, 0, 3, 3, 2, 0, 0, 4, 10, 0,129, 7, 2, 0,112, 7, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 4, 0, 0, 5, 4, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, - 88, 56, 45, 5, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,168, 96, 45, 5, 0, 0, 0, 0,136, 52, 45, 5, 0, 0, 0, 0, - 56, 44, 45, 5, 0, 0, 0, 0,248, 45, 45, 5, 0, 0, 0, 0,216, 46, 45, 5, 0, 0, 0, 0, 72, 47, 45, 5, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,199, 3, 0, 0, 0, 0, 0, 0,233, 3, 0, 0, 6, 6,200, 3,234, 3, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 63, 45, 5, 0, 0, 0, 0, 56, 63, 45, 5, 0, 0, 0, 0, - 72, 57, 45, 5, 0, 0, 0, 0,200, 61, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 72, 57, 45, 5, 0, 0, 0, 0, -216, 0, 0, 0, 1, 0, 0, 0,184, 58, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,215, 67, - 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0,114, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,199, 3, 0, 0, - 0, 0, 0, 0, 25, 0, 0, 0, 0,192,113, 68, 0, 0,200, 65, 0,192,113, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,200, 3, 26, 0,200, 3, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,199, 3, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,200, 3, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,248, 31,215, 3, + 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 24, 33,215, 3, 0, 0, 0, 0,216, 30,215, 3, 0, 0, 0, 0,168, 54,201, 3, + 0, 0, 0, 0, 40, 57,201, 3, 0, 0, 0, 0,104, 58,201, 3, 0, 0, 0, 0, 8, 59,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,199, 3, 0, 0, 0, 0, 0, 0,233, 3, 0, 0, 6, 6,200, 3,234, 3, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120,119,217, 3, 0, 0, 0, 0,120,119,217, 3, 0, 0, 0, 0,184, 89,217, 3, + 0, 0, 0, 0, 24, 93,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,184, 89,217, 3, 0, 0, 0, 0,215, 0, 0, 0, + 1, 0, 0, 0,104, 91,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,215, 67, 0, 0, 0, 0, + 0, 0,208, 65, 0, 0, 0, 0, 0, 0,114, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,199, 3, 0, 0, 0, 0, 0, 0, + 25, 0, 0, 0, 0,192,113, 68, 0, 0,200, 65, 0,192,113, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,200, 3, 26, 0,200, 3, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,199, 3, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,200, 3, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,104, 91,217, 3, 0, 0, 0, 0,215, 0, 0, 0, + 1, 0, 0, 0, 24, 93,217, 3, 0, 0, 0, 0,184, 89,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 91, 67, 0,192,115,196, + 0, 0, 0, 0, 0, 0, 0, 0,254,255, 74, 67,254,255,115,196, 0, 0, 0, 0,203, 0, 0, 0,220, 0, 0, 0, 0, 0, 0, 0, +207, 3, 0, 0, 0, 0, 0, 0,202, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,202, 0, 0, 0, 0, 0, 0, 0, +207, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 3, 0, 0, + 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,220, 0,208, 3,203, 0,208, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,219, 0, 0, 0, 26, 0, 0, 0,233, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,220, 0,208, 3, 0, 0, 4, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 54,217, 3, + 0, 0, 0, 0, 88, 54,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 88, 54,217, 3, 0, 0, 0, 0,213, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 73, 77, 65, 71, 69, 95, 80, 84, 95,103,112,101,110, 99,105,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,184, 58, 45, 5, 0, 0, 0, 0, -216, 0, 0, 0, 1, 0, 0, 0,200, 61, 45, 5, 0, 0, 0, 0, 72, 57, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 91, 67, - 0,192,115,196, 0, 0, 0, 0, 0, 0, 0, 0,254,255, 74, 67,254,255,115,196, 0, 0, 0, 0,203, 0, 0, 0,220, 0, 0, 0, - 0, 0, 0, 0,207, 3, 0, 0, 0, 0, 0, 0,202, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,202, 0, 0, 0, - 0, 0, 0, 0,207, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, - 10, 3, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,220, 0,208, 3,203, 0,208, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,219, 0, 0, 0, 26, 0, 0, 0,233, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,220, 0,208, 3, 0, 0, 4, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 73, 77, 65, 71, 69, 95, 80, 84, 95,103,112,101,110, 99,105,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 40, 60, 45, 5, 0, 0, 0, 0, 40, 60, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 40, 60, 45, 5, 0, 0, 0, 0, -214, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 73, 77, 65, 71, 69, 95, 80, 84, 95,103,112,101,110, 99,105,108, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 71,114,101, 97,115,101, 32, 80,101,110, 99,105,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 73, 77, 65, 71, 69, 95, 80, 84, 95,103,112,101,110, 99,105,108, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,152,255,202, 0, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 71,114,101, 97,115,101, 32, 80,101,110, 99,105,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152,255,202, 0, 80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, + 40, 1, 0, 0, 24, 93,217, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,104, 91,217, 3, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 67, 51, 51, 43,191,154,153,213, 63, 51, 51,131,191, +154,153, 1, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,236, 2, 0, 0, 0, 0, 0, 0,208, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,220, 0, 0, 0,199, 3, 0, 0, 26, 0, 0, 0, +233, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,236, 2,208, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 1, 0, 0,200, 61, 45, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -184, 58, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 67, 51, 51, 43,191,154,153,213, 63, - 51, 51,131,191,154,153, 1, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,236, 2, 0, 0, 0, 0, 0, 0,208, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, + 40, 33, 0, 0,120,119,217, 3, 0, 0, 0, 0,184, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,220, 0, 0, 0,199, 3, 0, 0, - 26, 0, 0, 0,233, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,236, 2,208, 3, 0, 0, 0, 0, + 0, 0,240, 65, 0, 0, 0, 0,154,153,153, 62, 0, 0, 0, 0,100, 0, 0, 0,154,153,153, 62,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 33, 0, 0, 56, 63, 45, 5, 0, 0, 0, 0,185, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,240, 65, 0, 0, 0, 0,154,153,153, 62, 0, 0, 0, 0,100, 0, 0, 0,154,153,153, 62,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -4774,10 +4810,10 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -4904,445 +4940,448 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,160, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, +160, 0, 0, 0, 24, 33,215, 3, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 31,215, 3, + 0, 0, 0, 0, 8, 59,201, 3, 0, 0, 0, 0,104, 58,201, 3, 0, 0, 0, 0,200, 57,201, 3, 0, 0, 0, 0,136, 56,201, 3, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,201, 3, 0, 0,126, 7, 0, 0, 0, 0, 0, 0,233, 3, 0, 0, 1, 1,182, 3, +234, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 59,217, 3, 0, 0, 0, 0,248, 59,217, 3, + 0, 0, 0, 0,200, 94,217, 3, 0, 0, 0, 0,136,101,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,200, 94,217, 3, + 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,120, 96,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 64,113, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,128,109, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +181, 3, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 64,109, 68, 0, 0,200, 65, 0, 64,109, 68, 0, 0,200, 65, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,182, 3, 26, 0,182, 3, 26, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,201, 3, 0, 0,126, 7, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,182, 3, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65,160, 0, 0, 0,168, 96, 45, 5, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 88, 56, 45, 5, 0, 0, 0, 0, 72, 47, 45, 5, 0, 0, 0, 0,216, 46, 45, 5, 0, 0, 0, 0,104, 46, 45, 5, 0, 0, 0, 0, -136, 45, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,201, 3, 0, 0,126, 7, 0, 0, 0, 0, 0, 0,233, 3, 0, 0, - 1, 1,182, 3,234, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,111, 45, 5, 0, 0, 0, 0, -200,111, 45, 5, 0, 0, 0, 0,152, 97, 45, 5, 0, 0, 0, 0,152,106, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, -152, 97, 45, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 8, 99, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 64,113, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0,128,109, 68, 0, 0, 0, 0, 0, 0,208, 65, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,120, 96,217, 3, + 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 40, 98,217, 3, 0, 0, 0, 0,200, 94,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 32, 67, 0, 0, 86,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67, 0, 0, 86,196, 0, 0, 0, 0,143, 0, 0, 0, +160, 0, 0, 0, 0, 0, 0, 0, 87, 3, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, +142, 0, 0, 0, 0, 0, 0, 0, 87, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, + 0, 0, 0, 64, 10, 3, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,160, 0, 88, 3,143, 0, 88, 3, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,201, 3, 0, 0,104, 4, 0, 0,146, 0, 0, 0,233, 3, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160, 0, 88, 3, 0, 0, 5, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,181, 3, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 64,109, 68, 0, 0,200, 65, 0, 64,109, 68, 0, 0,200, 65, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,182, 3, 26, 0,182, 3, 26, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,201, 3, 0, 0,126, 7, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,182, 3, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 56, 56,217, 3, 0, 0, 0, 0, 56, 56,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 56, 56,217, 3, + 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95,111, 98,106,101, + 99,116,109,111,100,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95,111, 98,106,101, + 99,116,109,111,100,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 98,106,101, 99,116, 32, 84,111,111,108,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,233,253,143, 0,255, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, - 8, 99, 45, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 24,102, 45, 5, 0, 0, 0, 0,152, 97, 45, 5, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 32, 67, 0, 0, 86,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 67, 0, 0, 86,196, 0, 0, 0, 0, -143, 0, 0, 0,160, 0, 0, 0, 0, 0, 0, 0, 87, 3, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, - 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 87, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 63, 0, 0, 0, 64, 10, 3, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,160, 0, 88, 3,143, 0, 88, 3, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,201, 3, 0, 0,104, 4, 0, 0,146, 0, 0, 0,233, 3, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160, 0, 88, 3, 0, 0, 5, 0, 3, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,120,100, 45, 5, 0, 0, 0, 0,120,100, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, -120,100, 45, 5, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95, -111, 98,106,101, 99,116,109,111,100,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,116,111,111,108,115, 95, -111, 98,106,101, 99,116,109,111,100,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 98,106,101, 99,116, 32, 84,111,111,108,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,233,253,143, 0,255, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 40, 98,217, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,216, 99,217, 3, + 0, 0, 0, 0,120, 96,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0,242,194, 0, 0, 0, 0, 0, 0, 0, 0, +231,102, 16, 67, 91, 90,242,194, 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, 0, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0, +142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0,119, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 3, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, + 6, 0,160, 0,120, 0,143, 0,120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,201, 3, 0, 0, +104, 4, 0, 0, 26, 0, 0, 0,145, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160, 0,120, 0, + 0, 0, 6, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 58,217, 3, 0, 0, 0, 0, 24, 58,217, 3, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0, 24, 58,217, 3, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, + 51, 68, 95, 80, 84, 95,108, 97,115,116, 95,111,112,101,114, 97,116,111,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 73, 69, 87, + 51, 68, 95, 80, 84, 95,108, 97,115,116, 95,111,112,101,114, 97,116,111,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79,112,101,114, + 97,116,111,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216,255, +144, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,216, 99,217, 3, + 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,136,101,217, 3, 0, 0, 0, 0, 40, 98,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 35, 67, 0,128,126,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 67,255,191,126,196, 0, 0, 0, 0,163, 0, 0, 0, +180, 0, 0, 0, 18, 0, 0, 0, 12, 4, 0, 0, 0, 0, 0, 0,162, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, +162, 0, 0, 0, 18, 0, 0, 0, 12, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, + 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,180, 0, 13, 4,163, 0,251, 3, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,126, 7, 0, 0, 26, 0, 0, 0,233, 3, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 24,102, 45, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, - 40,105, 45, 5, 0, 0, 0, 0, 8, 99, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 67, 0, 0,242,194, 0, 0, 0, 0, - 0, 0, 0, 0,231,102, 16, 67, 91, 90,242,194, 0, 0, 0, 0,143, 0, 0, 0,160, 0, 0, 0, 0, 0, 0, 0,119, 0, 0, 0, - 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,142, 0, 0, 0, 0, 0, 0, 0,119, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 3, 0, 0, 1, 0, 7, 0, - 18, 0, 0, 4, 6, 0,160, 0,120, 0,143, 0,120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -201, 3, 0, 0,104, 4, 0, 0, 26, 0, 0, 0,145, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -160, 0,120, 0, 0, 0, 6, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136,103, 45, 5, 0, 0, 0, 0, -136,103, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 88, 1, 0, 0,136,103, 45, 5, 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,136,101,217, 3, + 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216, 99,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,108, 97,115,116, 95,111,112,101,114, 97,116,111,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 86, 73, 69, 87, 51, 68, 95, 80, 84, 95,108, 97,115,116, 95,111,112,101,114, 97,116,111,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 79,112,101,114, 97,116,111,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,216,255,144, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,105, 4, 0, 0,126, 7, 0, 0, 26, 0, 0, 0,233, 3, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 3,208, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, - 40,105, 45, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0,152,106, 45, 5, 0, 0, 0, 0, 24,102, 45, 5, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 35, 67, 0,128,126,196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 67,255,191,126,196, 0, 0, 0, 0, -163, 0, 0, 0,180, 0, 0, 0, 18, 0, 0, 0, 12, 4, 0, 0, 0, 0, 0, 0,162, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, - 0, 0, 0, 0,162, 0, 0, 0, 18, 0, 0, 0, 12, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 63, 0, 0, 0, 64, 10, 0, 0, 0, 1, 0, 7, 0, 18, 0, 0, 0, 6, 0,180, 0, 13, 4,163, 0,251, 3, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,126, 7, 0, 0,126, 7, 0, 0, 26, 0, 0, 0,233, 3, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 4, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,153,217, 3, 0, 0, 0, 0, 68, 65, 84, 65,112, 3, 0, 0, 40,153,217, 3, + 0, 0, 0, 0,173, 0, 0, 0, 1, 0, 0, 0, 72,246,172, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,140, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 13,128,191, 0, 0,128,191, 0, 0, 0, 0, + 0, 0, 0, 0, 74,215, 76,190, 0, 0, 0, 0, 68,239,209, 62, 51,177,205,190,184,158, 81, 63, 0, 0, 0, 0, 70,119,105, 63, +143, 74, 70, 62, 35, 44,185,190, 0, 0, 0, 0,162, 84, 89,188,166, 33,101, 63, 42, 61,228, 62, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 25, 95,192, 0, 0,128, 63, 69,239,209, 62, 70,119,105, 63,160, 84, 89,188, 0, 0, 0, 0, 52,177,205,190, +142, 74, 70, 62,166, 33,101, 63, 0, 0, 0, 0,185,158, 81, 63, 35, 44,185,190, 43, 61,228, 62, 0, 0, 0, 0,188,173, 54, 64, +136, 95,161,191,147,231,198, 63, 0, 0,128, 63,185,214, 13, 63,208,249,224,190, 48,180, 81,191,184,158, 81,191,189,188,157, 63, +140,225, 88, 62, 26, 63,185, 62, 35, 44,185, 62,241,213,146,188,206,156,122, 63,138, 84,228,190, 42, 61,228,190, 0, 0, 0, 0, + 0, 0, 0, 0,100, 98, 82, 64, 0, 25, 95, 64,121, 92,155, 62,151,198, 44, 63,192,214, 32,188, 0, 0, 40,180,195, 15,188,190, +132, 75, 53, 62,216,125, 81, 63, 0, 0,192,179,115, 77,100,193, 17,173,201, 64,181,148,248,192,203,247,159,192,233, 74, 87, 65, +247, 46,190,192, 88,106,234, 64, 45, 8,160, 64, 68,239,209, 62, 51,177,205,190,184,158, 81, 63, 0, 0, 0, 0, 70,119,105, 63, +143, 74, 70, 62, 35, 44,185,190, 0, 0, 0, 0,162, 84, 89,188,166, 33,101, 63, 42, 61,228, 62, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 25, 95,192, 0, 0,128, 63,185,214, 13, 63,208,249,224,190, 48,180, 81,191,184,158, 81,191,189,188,157, 63, +140,225, 88, 62, 26, 63,185, 62, 35, 44,185, 62,241,213,146,188,206,156,122, 63,138, 84,228,190, 42, 61,228,190, 0, 0, 0, 0, + 0, 0, 0, 0,100, 98, 82, 64, 0, 25, 95, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, -152,106, 45, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,105, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,105, 4, 0, 0,126, 7, 0, 0, 26, 0, 0, 0,233, 3, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 3,208, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248,201,250, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +248,201,250, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248,201,250, 62, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 92, 62, 55, 63, 56,186,224,190,237,203,148,190, 3,236,234,190, 0, 25, 95, 64, + 0, 25, 95, 64, 0, 0, 0, 0, 0, 0, 0, 0,114,145,245, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 0, 0,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 30, 33, 12, 66, 85,152,137, 66,116, 27,126, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, + 96, 1, 0, 0,248, 59,217, 3, 0, 0, 0, 0,174, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 51, 51, 51, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65, +205,204, 76, 62, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, 0,200,213,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,108, 45, 5, 0, 0, 0, 0, 68, 65, 84, 65,120, 3, 0, 0, - 8,108, 45, 5, 0, 0, 0, 0,174, 0, 0, 0, 1, 0, 0, 0, 72,246,172, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,140, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 13,128,191, 0, 0,128,191, - 0, 0, 0, 0, 0, 0, 0, 0, 74,215, 76,190, 0, 0, 0, 0, 68,239,209, 62, 51,177,205,190,184,158, 81, 63, 0, 0, 0, 0, - 70,119,105, 63,143, 74, 70, 62, 35, 44,185,190, 0, 0, 0, 0,162, 84, 89,188,166, 33,101, 63, 42, 61,228, 62, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 95,192, 0, 0,128, 63, 69,239,209, 62, 70,119,105, 63,160, 84, 89,188, 0, 0, 0, 0, - 52,177,205,190,142, 74, 70, 62,166, 33,101, 63, 0, 0, 0, 0,185,158, 81, 63, 35, 44,185,190, 43, 61,228, 62, 0, 0, 0, 0, -188,173, 54, 64,136, 95,161,191,147,231,198, 63, 0, 0,128, 63,185,214, 13, 63,208,249,224,190, 48,180, 81,191,184,158, 81,191, -189,188,157, 63,140,225, 88, 62, 26, 63,185, 62, 35, 44,185, 62,241,213,146,188,206,156,122, 63,138, 84,228,190, 42, 61,228,190, - 0, 0, 0, 0, 0, 0, 0, 0,100, 98, 82, 64, 0, 25, 95, 64,121, 92,155, 62,151,198, 44, 63,192,214, 32,188, 0, 0, 40,180, -195, 15,188,190,132, 75, 53, 62,216,125, 81, 63, 0, 0,192,179,115, 77,100,193, 17,173,201, 64,181,148,248,192,203,247,159,192, -233, 74, 87, 65,247, 46,190,192, 88,106,234, 64, 45, 8,160, 64, 68,239,209, 62, 51,177,205,190,184,158, 81, 63, 0, 0, 0, 0, - 70,119,105, 63,143, 74, 70, 62, 35, 44,185,190, 0, 0, 0, 0,162, 84, 89,188,166, 33,101, 63, 42, 61,228, 62, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 95,192, 0, 0,128, 63,185,214, 13, 63,208,249,224,190, 48,180, 81,191,184,158, 81,191, -189,188,157, 63,140,225, 88, 62, 26, 63,185, 62, 35, 44,185, 62,241,213,146,188,206,156,122, 63,138, 84,228,190, 42, 61,228,190, - 0, 0, 0, 0, 0, 0, 0, 0,100, 98, 82, 64, 0, 25, 95, 64,248,201,250, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,248,201,250, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248,201,250, 62, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 92, 62, 55, 63, 56,186,224,190,237,203,148,190, 3,236,234,190, - 0, 25, 95, 64, 0, 25, 95, 64, 0, 0, 0, 0, 0, 0, 0, 0,114,145,245, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,255,255, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 3, 0, 8, 8,128, 0, 0, 0, 12, 66, 0, 0,128, 63, +205,204,204, 61, 0, 0,250, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 16, 0, 10, 0, 7, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 78, 0, 0, 8, 1, 0, 0, 24,157,217, 3, + 0, 0, 0, 0,210, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,117,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 82, 86,105,100,101,111, 32, 69,100,105,116,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,168, 59,201, 3, 0, 0, 0, 0,136, 66,201, 3, 0, 0, 0, 0,200,104,216, 3, 0, 0, 0, 0,120,116,216, 3, + 0, 0, 0, 0, 56, 34,215, 3, 0, 0, 0, 0,184, 38,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,168, 59,201, 3, + 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 72, 60,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 72, 60,201, 3, 0, 0, 0, 0,211, 0, 0, 0, + 1, 0, 0, 0,232, 60,201, 3, 0, 0, 0, 0,168, 59,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,222, 2, + 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,232, 60,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,136, 61,201, 3, + 0, 0, 0, 0, 72, 60,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4,222, 2, 0, 0, 0, 0, 68, 65, 84, 65, + 32, 0, 0, 0,136, 61,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 40, 62,201, 3, 0, 0, 0, 0,232, 60,201, 3, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 40, 62,201, 3, + 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,200, 62,201, 3, 0, 0, 0, 0,136, 61,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,195, 2, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,200, 62,201, 3, 0, 0, 0, 0,211, 0, 0, 0, + 1, 0, 0, 0,104, 63,201, 3, 0, 0, 0, 0, 40, 62,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4,195, 2, + 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,104, 63,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 8, 64,201, 3, + 0, 0, 0, 0,200, 62,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 92, 1, 0, 0, 0, 0, 68, 65, 84, 65, + 32, 0, 0, 0, 8, 64,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,168, 64,201, 3, 0, 0, 0, 0,104, 63,201, 3, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,168, 64,201, 3, + 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 72, 65,201, 3, 0, 0, 0, 0, 8, 64,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 48, 2,195, 2, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 72, 65,201, 3, 0, 0, 0, 0,211, 0, 0, 0, + 1, 0, 0, 0,232, 65,201, 3, 0, 0, 0, 0,168, 64,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 1, + 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,232, 65,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0,136, 66,201, 3, + 0, 0, 0, 0, 72, 65,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 2, 92, 1, 0, 0, 0, 0, 68, 65, 84, 65, + 32, 0, 0, 0,136, 66,201, 3, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232, 65,201, 3, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 68, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,200,104,216, 3, + 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,120,105,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 60,201, 3, + 0, 0, 0, 0,232, 60,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,120,105,216, 3, + 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 40,106,216, 3, 0, 0, 0, 0,200,104,216, 3, 0, 0, 0, 0, 72, 60,201, 3, + 0, 0, 0, 0, 40, 62,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 40,106,216, 3, + 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,216,106,216, 3, 0, 0, 0, 0,120,105,216, 3, 0, 0, 0, 0,232, 60,201, 3, + 0, 0, 0, 0,200, 62,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,216,106,216, 3, + 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,136,107,216, 3, 0, 0, 0, 0, 40,106,216, 3, 0, 0, 0, 0, 40, 62,201, 3, + 0, 0, 0, 0,200, 62,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,136,107,216, 3, + 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 56,108,216, 3, 0, 0, 0, 0,216,106,216, 3, 0, 0, 0, 0,200, 62,201, 3, + 0, 0, 0, 0,104, 63,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 56,108,216, 3, + 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,232,108,216, 3, 0, 0, 0, 0,136,107,216, 3, 0, 0, 0, 0,168, 59,201, 3, + 0, 0, 0, 0, 8, 64,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,232,108,216, 3, + 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,152,109,216, 3, 0, 0, 0, 0, 56,108,216, 3, 0, 0, 0, 0, 40, 62,201, 3, + 0, 0, 0, 0,168, 64,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,152,109,216, 3, + 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 72,110,216, 3, 0, 0, 0, 0,232,108,216, 3, 0, 0, 0, 0, 8, 64,201, 3, + 0, 0, 0, 0, 72, 65,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 72,110,216, 3, + 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,248,110,216, 3, 0, 0, 0, 0,152,109,216, 3, 0, 0, 0, 0, 72, 65,201, 3, + 0, 0, 0, 0,232, 65,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,248,110,216, 3, + 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,168,111,216, 3, 0, 0, 0, 0, 72,110,216, 3, 0, 0, 0, 0,168, 64,201, 3, + 0, 0, 0, 0,232, 65,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,168,111,216, 3, + 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 88,112,216, 3, 0, 0, 0, 0,248,110,216, 3, 0, 0, 0, 0,104, 63,201, 3, + 0, 0, 0, 0,136, 66,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 88,112,216, 3, + 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 8,113,216, 3, 0, 0, 0, 0,168,111,216, 3, 0, 0, 0, 0,136, 61,201, 3, + 0, 0, 0, 0,136, 66,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 8,113,216, 3, + 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,184,113,216, 3, 0, 0, 0, 0, 88,112,216, 3, 0, 0, 0, 0, 8, 64,201, 3, + 0, 0, 0, 0,136, 66,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,184,113,216, 3, + 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,104,114,216, 3, 0, 0, 0, 0, 8,113,216, 3, 0, 0, 0, 0,168, 59,201, 3, + 0, 0, 0, 0,136, 61,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,104,114,216, 3, + 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 24,115,216, 3, 0, 0, 0, 0,184,113,216, 3, 0, 0, 0, 0,200, 62,201, 3, + 0, 0, 0, 0,168, 64,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 24,115,216, 3, + 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,200,115,216, 3, 0, 0, 0, 0,104,114,216, 3, 0, 0, 0, 0,104, 63,201, 3, + 0, 0, 0, 0,232, 65,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,200,115,216, 3, + 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,120,116,216, 3, 0, 0, 0, 0, 24,115,216, 3, 0, 0, 0, 0, 40, 62,201, 3, + 0, 0, 0, 0, 72, 65,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,120,116,216, 3, + 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,115,216, 3, 0, 0, 0, 0,104, 63,201, 3, + 0, 0, 0, 0, 72, 65,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, 56, 34,215, 3, + 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 88, 35,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 62,201, 3, + 0, 0, 0, 0, 72, 60,201, 3, 0, 0, 0, 0,232, 60,201, 3, 0, 0, 0, 0,200, 62,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0,196, 2, 0, 0,222, 2, 0, 0, 7, 7,241, 4, 27, 0, 1, 0, 0, 0, 0, 0, + 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24,202,207, 3, 0, 0, 0, 0, 24,202,207, 3, 0, 0, 0, 0, 56,103,217, 3, + 0, 0, 0, 0,232,104,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 56,103,217, 3, 0, 0, 0, 0,215, 0, 0, 0, + 1, 0, 0, 0,232,104,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,148, 68, 0, 0, 0, 0, + 0, 0,208, 65, 0, 0, 0, 0, 0, 32,158, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0, 0, 0, 0, 0, + 25, 0, 0, 0, 0, 0,158, 68, 0, 0,200, 65, 0, 0,158, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,241, 4, 26, 0,241, 4, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0,196, 2, 0, 0,221, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,241, 4, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,232,104,217, 3, 0, 0, 0, 0,215, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,103,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,240,109, 69, 0, 0,128,192, + 0, 0, 0, 0, 0, 0, 0, 0,255,255,109, 69, 0, 0, 0,192, 0, 0, 0, 0,112, 7, 0, 0,129, 7, 0, 0, 18, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0, 18, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 2, 0, 0, 0, + 1, 0, 3, 3, 2, 0, 0, 4, 10, 0,129, 7, 2, 0,112, 7, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,222, 2, 0, 0,222, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, 88, 35,215, 3, 0, 0, 0, 0,214, 0, 0, 0, + 1, 0, 0, 0,120, 36,215, 3, 0, 0, 0, 0, 56, 34,215, 3, 0, 0, 0, 0,168, 59,201, 3, 0, 0, 0, 0, 8, 64,201, 3, + 0, 0, 0, 0,136, 66,201, 3, 0, 0, 0, 0,136, 61,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +240, 4, 0, 0, 0, 0, 0, 0, 67, 0, 0, 0, 15, 15,241, 4, 68, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,200, 96,200, 3, 0, 0, 0, 0,200, 96,200, 3, 0, 0, 0, 0,152,106,217, 3, 0, 0, 0, 0, 72,108,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,152,106,217, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 72,108,217, 3, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,140, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, + 0, 32,158, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0,158, 68, + 0, 0,200, 65, 0, 0,158, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, + 10, 0,241, 4, 26, 0,241, 4, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +240, 4, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,241, 4, 26, 0, + 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,128, 63, 30, 33, 12, 66, 85,152,137, 66,116, 27,126, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 96, 1, 0, 0,200,111, 45, 5, 0, 0, 0, 0,175, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 51, 51, 51, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65,205,204, 76, 62, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 7, 0, -216,191, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 72,108,217, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,152,106,217, 3, 0, 0, 0, 0, 0, 0, 64,192, 0, 0,126, 67, 0, 0, 0, 0, 0, 0, 72, 66,112,189, 17,192, +246, 70,125, 67, 0, 0, 0, 0, 0, 0, 72, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +240, 4, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0, 18, 0, 0, 0, 41, 0, 0, 0, 0, 0,128, 63, + 0, 0, 72, 66, 0,124,146, 72, 0, 0, 72, 66,205,204,204, 61, 0, 0, 32, 65, 72, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, 4, + 8, 0,241, 4, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +240, 4, 0, 0, 26, 0, 0, 0, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,241, 4, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 3, 0, - 8, 8,128, 0, 0, 0, 12, 66, 0, 0,128, 63,205,204,204, 61, 0, 0,250, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 10, 0, 7, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 68, 65, 84, 65,208, 0, 0, 0,200, 96,200, 3, 0, 0, 0, 0,190, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 83, 78, 0, 0, 8, 1, 0, 0, 8,114, 45, 5, 0, 0, 0, 0,211, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -232, 42, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 82, 86,105,100,101,111, 32, - 69,100,105,116,105,110,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88,115, 45, 5, 0, 0, 0, 0, 40,120, 45, 5, 0, 0, 0, 0, -152,120, 45, 5, 0, 0, 0, 0, 8,128, 45, 5, 0, 0, 0, 0,120,128, 45, 5, 0, 0, 0, 0,216,153, 45, 5, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 32, 0, 0, 0, 88,115, 45, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,200,115, 45, 5, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, -200,115, 45, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 56,116, 45, 5, 0, 0, 0, 0, 88,115, 45, 5, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,222, 2, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 56,116, 45, 5, 0, 0, 0, 0, -212, 0, 0, 0, 1, 0, 0, 0,168,116, 45, 5, 0, 0, 0, 0,200,115, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -240, 4,222, 2, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,168,116, 45, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, - 24,117, 45, 5, 0, 0, 0, 0, 56,116, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 32, 0, 0, 0, 24,117, 45, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,136,117, 45, 5, 0, 0, 0, 0, -168,116, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,195, 2, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, -136,117, 45, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,248,117, 45, 5, 0, 0, 0, 0, 24,117, 45, 5, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,240, 4,195, 2, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,248,117, 45, 5, 0, 0, 0, 0, -212, 0, 0, 0, 1, 0, 0, 0,104,118, 45, 5, 0, 0, 0, 0,136,117, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -240, 4, 92, 1, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,104,118, 45, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, -216,118, 45, 5, 0, 0, 0, 0,248,117, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 32, 0, 0, 0,216,118, 45, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, 72,119, 45, 5, 0, 0, 0, 0, -104,118, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 2,195, 2, 1, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, - 72,119, 45, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0,184,119, 45, 5, 0, 0, 0, 0,216,118, 45, 5, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 1, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0,184,119, 45, 5, 0, 0, 0, 0, -212, 0, 0, 0, 1, 0, 0, 0, 40,120, 45, 5, 0, 0, 0, 0, 72,119, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 48, 2, 92, 1, 0, 0, 0, 0, 68, 65, 84, 65, 32, 0, 0, 0, 40,120, 45, 5, 0, 0, 0, 0,212, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,184,119, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 68, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 0, 0, 0,152,120, 45, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 8,121, 45, 5, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,200,115, 45, 5, 0, 0, 0, 0, 56,116, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 0, 0, 0, 8,121, 45, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,120,121, 45, 5, 0, 0, 0, 0, -152,120, 45, 5, 0, 0, 0, 0,200,115, 45, 5, 0, 0, 0, 0, 24,117, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 0, 0, 0,120,121, 45, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,232,121, 45, 5, 0, 0, 0, 0, - 8,121, 45, 5, 0, 0, 0, 0, 56,116, 45, 5, 0, 0, 0, 0,136,117, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 0, 0, 0,232,121, 45, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 88,122, 45, 5, 0, 0, 0, 0, -120,121, 45, 5, 0, 0, 0, 0, 24,117, 45, 5, 0, 0, 0, 0,136,117, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 0, 0, 0, 88,122, 45, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,200,122, 45, 5, 0, 0, 0, 0, -232,121, 45, 5, 0, 0, 0, 0,136,117, 45, 5, 0, 0, 0, 0,248,117, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 0, 0, 0,200,122, 45, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 56,123, 45, 5, 0, 0, 0, 0, - 88,122, 45, 5, 0, 0, 0, 0, 88,115, 45, 5, 0, 0, 0, 0,104,118, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 0, 0, 0, 56,123, 45, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,168,123, 45, 5, 0, 0, 0, 0, -200,122, 45, 5, 0, 0, 0, 0, 24,117, 45, 5, 0, 0, 0, 0,216,118, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 0, 0, 0,168,123, 45, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 24,124, 45, 5, 0, 0, 0, 0, - 56,123, 45, 5, 0, 0, 0, 0,104,118, 45, 5, 0, 0, 0, 0, 72,119, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 0, 0, 0, 24,124, 45, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,136,124, 45, 5, 0, 0, 0, 0, -168,123, 45, 5, 0, 0, 0, 0, 72,119, 45, 5, 0, 0, 0, 0,184,119, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 0, 0, 0,136,124, 45, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,248,124, 45, 5, 0, 0, 0, 0, - 24,124, 45, 5, 0, 0, 0, 0,216,118, 45, 5, 0, 0, 0, 0,184,119, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 0, 0, 0,248,124, 45, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,104,125, 45, 5, 0, 0, 0, 0, -136,124, 45, 5, 0, 0, 0, 0,248,117, 45, 5, 0, 0, 0, 0, 40,120, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 0, 0, 0,104,125, 45, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,216,125, 45, 5, 0, 0, 0, 0, -248,124, 45, 5, 0, 0, 0, 0,168,116, 45, 5, 0, 0, 0, 0, 40,120, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 0, 0, 0,216,125, 45, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 72,126, 45, 5, 0, 0, 0, 0, -104,125, 45, 5, 0, 0, 0, 0,104,118, 45, 5, 0, 0, 0, 0, 40,120, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 0, 0, 0, 72,126, 45, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,184,126, 45, 5, 0, 0, 0, 0, -216,125, 45, 5, 0, 0, 0, 0, 88,115, 45, 5, 0, 0, 0, 0,168,116, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 0, 0, 0,184,126, 45, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 40,127, 45, 5, 0, 0, 0, 0, - 72,126, 45, 5, 0, 0, 0, 0,136,117, 45, 5, 0, 0, 0, 0,216,118, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 0, 0, 0, 40,127, 45, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0,152,127, 45, 5, 0, 0, 0, 0, -184,126, 45, 5, 0, 0, 0, 0,248,117, 45, 5, 0, 0, 0, 0,184,119, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 0, 0, 0,152,127, 45, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 8,128, 45, 5, 0, 0, 0, 0, - 40,127, 45, 5, 0, 0, 0, 0, 24,117, 45, 5, 0, 0, 0, 0, 72,119, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 0, 0, 0, 8,128, 45, 5, 0, 0, 0, 0,213, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -152,127, 45, 5, 0, 0, 0, 0,248,117, 45, 5, 0, 0, 0, 0, 72,119, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65,160, 0, 0, 0,120,128, 45, 5, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 72,132, 45, 5, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 24,117, 45, 5, 0, 0, 0, 0,200,115, 45, 5, 0, 0, 0, 0, 56,116, 45, 5, 0, 0, 0, 0, -136,117, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0,196, 2, 0, 0,222, 2, 0, 0, - 7, 7,241, 4, 27, 0, 1, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,161, 45, 5, 0, 0, 0, 0, -200,161, 45, 5, 0, 0, 0, 0,104,129, 45, 5, 0, 0, 0, 0,216,130, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, -104,129, 45, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0,216,130, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0,128,148, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 32,158, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,240, 4, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0,158, 68, 0, 0,200, 65, 0, 0,158, 68, 0, 0,200, 65, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,241, 4, 26, 0,241, 4, 26, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0,196, 2, 0, 0,221, 2, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,241, 4, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, -216,130, 45, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,104,129, 45, 5, 0, 0, 0, 0, - 0, 0, 0, 0, 0,240,109, 69, 0, 0,128,192, 0, 0, 0, 0, 0, 0, 0, 0,255,255,109, 69, 0, 0, 0,192, 0, 0, 0, 0, -112, 7, 0, 0,129, 7, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,111, 7, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, - 0, 0, 0, 0,111, 7, 0, 0, 18, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0,128, 63, 2, 0, 0, 0, 1, 0, 3, 3, 2, 0, 0, 4, 10, 0,129, 7, 2, 0,112, 7, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,222, 2, 0, 0,222, 2, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,120, 36,215, 3, 0, 0, 0, 0,214, 0, 0, 0, + 1, 0, 0, 0,152, 37,215, 3, 0, 0, 0, 0, 88, 35,215, 3, 0, 0, 0, 0, 8, 64,201, 3, 0, 0, 0, 0, 72, 65,201, 3, + 0, 0, 0, 0,104, 63,201, 3, 0, 0, 0, 0,136, 66,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +240, 4, 0, 0, 69, 0, 0, 0, 91, 1, 0, 0, 8, 8,241, 4, 23, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,120,150,199, 3, 0, 0, 0, 0,120,150,199, 3, 0, 0, 0, 0,248,109,217, 3, 0, 0, 0, 0,136,160,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,248,109,217, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,168,111,217, 3, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 26, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, + 0, 32,158, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0,158, 68, + 0, 0,200, 65, 0, 0,158, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, + 10, 0,241, 4, 26, 0,241, 4, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +240, 4, 0, 0, 69, 0, 0, 0, 94, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,241, 4, 26, 0, + 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, - 72,132, 45, 5, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 56,137, 45, 5, 0, 0, 0, 0,120,128, 45, 5, 0, 0, 0, 0, - 88,115, 45, 5, 0, 0, 0, 0,104,118, 45, 5, 0, 0, 0, 0, 40,120, 45, 5, 0, 0, 0, 0,168,116, 45, 5, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0, 0, 0, 0, 0, 67, 0, 0, 0, 15, 15,241, 4, 68, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24,136, 45, 5, 0, 0, 0, 0, 24,136, 45, 5, 0, 0, 0, 0, - 56,133, 45, 5, 0, 0, 0, 0,168,134, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 56,133, 45, 5, 0, 0, 0, 0, -216, 0, 0, 0, 1, 0, 0, 0,168,134, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32,140, 68, - 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 32,158, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0, - 0, 0, 0, 0, 25, 0, 0, 0, 0, 0,158, 68, 0, 0,200, 65, 0, 0,158, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,241, 4, 26, 0,241, 4, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,241, 4, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,168,111,217, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,216,158,217, 3, + 0, 0, 0, 0,248,109,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 67, 0, 0,125,195, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 75, 67, 1, 0,125,195, 0, 0, 0, 0,203, 0, 0, 0,220, 0, 0, 0, 0, 0, 0, 0,252, 0, 0, 0, 0, 0, 0, 0, +202, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,202, 0, 0, 0, 0, 0, 0, 0,252, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, 10, 3, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, + 6, 0,220, 0,253, 0,203, 0,253, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 4, 0, 0, +240, 4, 0, 0, 95, 0, 0, 0, 91, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,220, 0,253, 0, + 0, 0, 4, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,168,134, 45, 5, 0, 0, 0, 0, -216, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,133, 45, 5, 0, 0, 0, 0, 0, 0, 64,192, 0, 0,126, 67, - 0, 0, 0, 0, 0, 0, 72, 66,112,189, 17,192,246, 70,125, 67, 0, 0, 0, 0, 0, 0, 72, 66, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0, - 18, 0, 0, 0, 41, 0, 0, 0, 0, 0,128, 63, 0, 0, 72, 66, 0,124,146, 72, 0, 0, 72, 66,205,204,204, 61, 0, 0, 32, 65, - 72, 0, 0, 0, 0, 0, 0, 2, 4, 0, 0, 4, 8, 0,241, 4, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0, 26, 0, 0, 0, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,241, 4, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,216,158,217, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,136,160,217, 3, + 0, 0, 0, 0,168,111,217, 3, 0, 0, 0, 0, 0, 0,112,196, 0, 0,112, 68, 0, 0, 7,196, 0, 0, 7, 68, 0, 0,112,196, + 0, 0,112, 68, 0, 0, 7,196, 0, 0, 7, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,208, 0, 0, 0, 24,136, 45, 5, 0, 0, 0, 0, -191, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0,128, 59, 70, 0,128, 59, 70,172,197, 39, 55, 0, 80,195, 71, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 20, 4, 0, 0, 91, 1, 0, 0, 91, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, + 0, 0, 7, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,136,160,217, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,216,158,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,122, 67, 0, 0, 0, 0, 0, 0, 0, 65, 0, 0, 0, 0, + 0, 0,122, 67, 0, 0, 0, 0, 0, 0, 0, 65, 0, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0,252, 0, 0, 0, 18, 0, 0, 0, + 20, 4, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 20, 4, 0, 0, 18, 0, 0, 0,252, 0, 0, 0, 0, 0, 32, 65, + 0, 0, 0, 63, 0,124,146, 72, 0, 0, 0, 66, 10,215, 35, 60, 0, 0,200, 66,105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, + 8, 0, 21, 4,253, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 20, 4, 0, 0, 95, 0, 0, 0, 91, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 4,253, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 1, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, - 56,137, 45, 5, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 40,145, 45, 5, 0, 0, 0, 0, 72,132, 45, 5, 0, 0, 0, 0, -104,118, 45, 5, 0, 0, 0, 0, 72,119, 45, 5, 0, 0, 0, 0,248,117, 45, 5, 0, 0, 0, 0, 40,120, 45, 5, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0, 69, 0, 0, 0, 91, 1, 0, 0, 8, 8,241, 4, 23, 1, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,143, 45, 5, 0, 0, 0, 0,232,143, 45, 5, 0, 0, 0, 0, - 40,138, 45, 5, 0, 0, 0, 0,120,142, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 40,138, 45, 5, 0, 0, 0, 0, -216, 0, 0, 0, 1, 0, 0, 0,152,139, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 26, 68, - 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 32,158, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0, - 0, 0, 0, 0, 25, 0, 0, 0, 0, 0,158, 68, 0, 0,200, 65, 0, 0,158, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,241, 4, 26, 0,241, 4, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0, 69, 0, 0, 0, 94, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,241, 4, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,152,139, 45, 5, 0, 0, 0, 0, -216, 0, 0, 0, 1, 0, 0, 0, 8,141, 45, 5, 0, 0, 0, 0, 40,138, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 92, 67, - 0, 0,125,195, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 67, 1, 0,125,195, 0, 0, 0, 0,203, 0, 0, 0,220, 0, 0, 0, - 0, 0, 0, 0,252, 0, 0, 0, 0, 0, 0, 0,202, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,202, 0, 0, 0, - 0, 0, 0, 0,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 64, - 10, 3, 0, 0, 1, 0, 7, 0, 18, 0, 0, 4, 6, 0,220, 0,253, 0,203, 0,253, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 21, 4, 0, 0,240, 4, 0, 0, 95, 0, 0, 0, 91, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,220, 0,253, 0, 0, 0, 4, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 68, 65, 84, 65,240, 0, 0, 0,120,150,199, 3, 0, 0, 0, 0,180, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 8,141, 45, 5, 0, 0, 0, 0, -216, 0, 0, 0, 1, 0, 0, 0,120,142, 45, 5, 0, 0, 0, 0,152,139, 45, 5, 0, 0, 0, 0, 0, 0,112,196, 0, 0,112, 68, - 0, 0, 7,196, 0, 0, 7, 68, 0, 0,112,196, 0, 0,112, 68, 0, 0, 7,196, 0, 0, 7, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 59, 70, 0,128, 59, 70,172,197, 39, 55, 0, 80,195, 71, - 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 4, 0, 0, 91, 1, 0, 0, 91, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 7, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,120,142, 45, 5, 0, 0, 0, 0, -216, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,141, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,122, 67, - 0, 0, 0, 0, 0, 0, 0, 65, 0, 0, 0, 0, 0, 0,122, 67, 0, 0, 0, 0, 0, 0, 0, 65, 0, 0, 0, 0, 17, 0, 0, 0, - 18, 0, 0, 0,252, 0, 0, 0, 18, 0, 0, 0, 20, 4, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 20, 4, 0, 0, - 18, 0, 0, 0,252, 0, 0, 0, 0, 0, 32, 65, 0, 0, 0, 63, 0,124,146, 72, 0, 0, 0, 66, 10,215, 35, 60, 0, 0,200, 66, -105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 8, 0, 21, 4,253, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 4, 0, 0, 95, 0, 0, 0, 91, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 21, 4,253, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 64, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,152, 37,215, 3, 0, 0, 0, 0,214, 0, 0, 0, + 1, 0, 0, 0,184, 38,215, 3, 0, 0, 0, 0,120, 36,215, 3, 0, 0, 0, 0, 72, 65,201, 3, 0, 0, 0, 0, 40, 62,201, 3, + 0, 0, 0, 0,168, 64,201, 3, 0, 0, 0, 0,232, 65,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 47, 2, 0, 0, 93, 1, 0, 0,194, 2, 0, 0, 2, 2, 48, 2,102, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,232,151,199, 3, 0, 0, 0, 0,232,151,199, 3, 0, 0, 0, 0, 56,162,217, 3, 0, 0, 0, 0, 72,167,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 56,162,217, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,232,163,217, 3, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 89, 68, 0, 0, 0, 0, 0, 0,208, 65,154,216, 65, 55, + 0, 0, 12, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 2, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,192, 11, 68, + 0, 0,200, 65, 0,192, 11, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, + 10, 0, 48, 2, 26, 0, 48, 2, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 47, 2, 0, 0, 93, 1, 0, 0,118, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 2, 26, 0, + 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,240, 0, 0, 0,232,143, 45, 5, 0, 0, 0, 0, -181, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,232,163,217, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,152,165,217, 3, + 0, 0, 0, 0, 56,162,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 67, 0, 0,112,193, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 72, 67, 0, 0,157,195, 0, 0, 0, 0,200, 0, 0, 0,217, 0, 0, 0, 18, 0, 0, 0, 75, 1, 0, 0, 0, 0, 0, 0, +199, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,199, 0, 0, 0, 18, 0, 0, 0, 75, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 10, 6, 0, 0, 2, 0, 3, 3, 0, 0, 0, 4, + 6, 0,217, 0, 76, 1,200, 0, 58, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +216, 0, 0, 0,119, 1, 0, 0,194, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,217, 0, 76, 1, + 0, 0, 2, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,152,165,217, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 72,167,217, 3, + 0, 0, 0, 0,232,163,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,128, 64, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0, - 40,145, 45, 5, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0,216,153, 45, 5, 0, 0, 0, 0, 56,137, 45, 5, 0, 0, 0, 0, - 72,119, 45, 5, 0, 0, 0, 0, 24,117, 45, 5, 0, 0, 0, 0,216,118, 45, 5, 0, 0, 0, 0,184,119, 45, 5, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 2, 0, 0, 93, 1, 0, 0,194, 2, 0, 0, 2, 2, 48, 2,102, 1, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216,151, 45, 5, 0, 0, 0, 0,216,151, 45, 5, 0, 0, 0, 0, - 24,146, 45, 5, 0, 0, 0, 0,104,150, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 24,146, 45, 5, 0, 0, 0, 0, -216, 0, 0, 0, 1, 0, 0, 0,136,147, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 89, 68, - 0, 0, 0, 0, 0, 0,208, 65,154,216, 65, 55, 0, 0, 12, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 2, 0, 0, - 0, 0, 0, 0, 25, 0, 0, 0, 0,192, 11, 68, 0, 0,200, 65, 0,192, 11, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0, 48, 2, 26, 0, 48, 2, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 2, 0, 0, 93, 1, 0, 0,118, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 48, 2, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,136,147, 45, 5, 0, 0, 0, 0, -216, 0, 0, 0, 1, 0, 0, 0,248,148, 45, 5, 0, 0, 0, 0, 24,146, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 67, - 0, 0,112,193, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 67, 0, 0,157,195, 0, 0, 0, 0,200, 0, 0, 0,217, 0, 0, 0, - 18, 0, 0, 0, 75, 1, 0, 0, 0, 0, 0, 0,199, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0,199, 0, 0, 0, - 18, 0, 0, 0, 75, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 10, 6, 0, 0, 2, 0, 3, 3, 0, 0, 0, 4, 6, 0,217, 0, 76, 1,200, 0, 58, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216, 0, 0, 0,119, 1, 0, 0,194, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,217, 0, 76, 1, 0, 0, 2, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 2, 0, 0, + 47, 2, 0, 0,119, 1, 0, 0,194, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, + 0, 0, 4, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,248,148, 45, 5, 0, 0, 0, 0, -216, 0, 0, 0, 1, 0, 0, 0,104,150, 45, 5, 0, 0, 0, 0,136,147, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 72,167,217, 3, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,152,165,217, 3, 0, 0, 0, 0, 0, 0, 16,193, 0, 0,130, 67, 0, 0,160,192, 0, 0,160, 64, 0, 0, 0, 0, + 0, 0,122, 67, 0, 0, 16,193, 0, 0, 32, 65, 0, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 75, 1, 0, 0, 18, 0, 0, 0, + 86, 1, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 86, 1, 0, 0, 18, 0, 0, 0, 75, 1, 0, 0,111, 18,131, 58, +111, 18,131, 58, 0,124,146, 72, 0, 80, 67, 71, 0, 0, 0, 0, 0, 0, 0, 0,105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, + 0, 0, 87, 1, 76, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,217, 0, 0, 0, + 47, 2, 0, 0,119, 1, 0, 0,194, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 1, 76, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 68, 65, 84, 65,240, 0, 0, 0,232,151,199, 3, 0, 0, 0, 0,178, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 47, 2, 0, 0, 47, 2, 0, 0,119, 1, 0, 0,194, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,104,150, 45, 5, 0, 0, 0, 0, -216, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248,148, 45, 5, 0, 0, 0, 0, 0, 0, 16,193, 0, 0,130, 67, - 0, 0,160,192, 0, 0,160, 64, 0, 0, 0, 0, 0, 0,122, 67, 0, 0, 16,193, 0, 0, 32, 65, 0, 0, 0, 0, 17, 0, 0, 0, - 18, 0, 0, 0, 75, 1, 0, 0, 18, 0, 0, 0, 86, 1, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 86, 1, 0, 0, - 18, 0, 0, 0, 75, 1, 0, 0,111, 18,131, 58,111, 18,131, 58, 0,124,146, 72, 0, 80, 67, 71, 0, 0, 0, 0, 0, 0, 0, 0, -105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 87, 1, 76, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,217, 0, 0, 0, 47, 2, 0, 0,119, 1, 0, 0,194, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 87, 1, 76, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,240, 0, 0, 0,216,151, 45, 5, 0, 0, 0, 0, -179, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 24,120,214, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, + 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,112, 0, 0, 0, 24,120,214, 3, 0, 0, 0, 0, 37, 1, 0, 0, + 1, 0, 0, 0,168,194,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,184, 38,215, 3, + 0, 0, 0, 0,214, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152, 37,215, 3, 0, 0, 0, 0,232, 65,201, 3, + 0, 0, 0, 0,168, 64,201, 3, 0, 0, 0, 0,200, 62,201, 3, 0, 0, 0, 0,104, 63,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 49, 2, 0, 0,240, 4, 0, 0, 93, 1, 0, 0,194, 2, 0, 0, 8, 8,192, 2,102, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88,153,199, 3, 0, 0, 0, 0, 88,153,199, 3, 0, 0, 0, 0,248,168,217, 3, + 0, 0, 0, 0, 8,174,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,248,168,217, 3, 0, 0, 0, 0,215, 0, 0, 0, + 1, 0, 0, 0,168,170,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,245, 67, 0, 0, 0, 0, + 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 48, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191, 2, 0, 0, 0, 0, 0, 0, + 25, 0, 0, 0, 0,192, 47, 68, 0, 0,200, 65, 0,192, 47, 68, 0, 0,200, 65, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,192, 2, 26, 0,192, 2, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 49, 2, 0, 0,240, 4, 0, 0, 93, 1, 0, 0,118, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,192, 2, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24,153, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,112, 0, 0, 0, - 24,153, 45, 5, 0, 0, 0, 0, 38, 1, 0, 0, 1, 0, 0, 0, 88,162, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0,168,170,217, 3, 0, 0, 0, 0,215, 0, 0, 0, + 1, 0, 0, 0, 88,172,217, 3, 0, 0, 0, 0,248,168,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65,160, 0, 0, 0,216,153, 45, 5, 0, 0, 0, 0,215, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 40,145, 45, 5, 0, 0, 0, 0,184,119, 45, 5, 0, 0, 0, 0,216,118, 45, 5, 0, 0, 0, 0,136,117, 45, 5, 0, 0, 0, 0, -248,117, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 2, 0, 0,240, 4, 0, 0, 93, 1, 0, 0,194, 2, 0, 0, - 8, 8,192, 2,102, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136,160, 45, 5, 0, 0, 0, 0, -136,160, 45, 5, 0, 0, 0, 0,200,154, 45, 5, 0, 0, 0, 0, 24,159, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, -200,154, 45, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 56,156, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,245, 67, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 48, 68, 0, 0, 0, 0, 0, 0,208, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,191, 2, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0,192, 47, 68, 0, 0,200, 65, 0,192, 47, 68, 0, 0,200, 65, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 2, 0, 3, 3, 4, 0, 12, 0, 10, 0,192, 2, 26, 0,192, 2, 26, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 2, 0, 0,240, 4, 0, 0, 93, 1, 0, 0,118, 1, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 2, 26, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, - 56,156, 45, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0,168,157, 45, 5, 0, 0, 0, 0,200,154, 45, 5, 0, 0, 0, 0, + 0, 0, 0, 0,240, 4, 0, 0,240, 4, 0, 0,119, 1, 0, 0,194, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 4, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 88,172,217, 3, 0, 0, 0, 0,215, 0, 0, 0, + 1, 0, 0, 0, 8,174,217, 3, 0, 0, 0, 0,168,170,217, 3, 0, 0, 0, 0, 0, 0,240,195, 0, 0,240, 67, 0, 0,135,195, + 0, 0,135, 67,238, 33,143,196,238, 33,143, 68, 0, 0, 7,196, 0, 0, 7, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,191, 2, 0, 0, 0, 0, 0, 0, + 75, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 59, 70, 0,128, 59, 70,172,197, 39, 55, 0, 80,195, 71, 0, 0, 0, 0, + 0, 0, 6, 0, 0, 0, 0, 4, 0, 0,192, 2, 76, 1,192, 2, 76, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 49, 2, 0, 0,240, 4, 0, 0,119, 1, 0, 0,194, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,192, 2, 76, 1, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,240, 4, 0, 0,240, 4, 0, 0,119, 1, 0, 0,194, 2, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 4, 0, 4, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, 8,174,217, 3, 0, 0, 0, 0,215, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88,172,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,122, 67, 0, 0, 0, 0, + 0, 0, 0, 65, 0, 0, 0, 0, 0, 0,122, 67, 0, 0, 0, 0, 0, 0, 0, 65, 0, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, + 75, 1, 0, 0, 18, 0, 0, 0,201, 2, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0,201, 2, 0, 0, 18, 0, 0, 0, + 75, 1, 0, 0, 0, 0, 32, 65, 0, 0, 0, 63, 0,124,146, 72, 0, 0, 0, 66, 10,215, 35, 60, 0, 0,200, 66,105, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 8, 0,202, 2, 76, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, -168,157, 45, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 24,159, 45, 5, 0, 0, 0, 0, 56,156, 45, 5, 0, 0, 0, 0, - 0, 0,240,195, 0, 0,240, 67, 0, 0,135,195, 0, 0,135, 67,238, 33,143,196,238, 33,143, 68, 0, 0, 7,196, 0, 0, 7, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,191, 2, 0, 0, 0, 0, 0, 0, 75, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 59, 70, 0,128, 59, 70, -172,197, 39, 55, 0, 80,195, 71, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 4, 0, 0,192, 2, 76, 1,192, 2, 76, 1, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 2, 0, 0,240, 4, 0, 0,119, 1, 0, 0,194, 2, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 2, 76, 1, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,240, 0, 0, 0, 88,153,199, 3, 0, 0, 0, 0,180, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 1, 0, 0, - 24,159, 45, 5, 0, 0, 0, 0,216, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168,157, 45, 5, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,122, 67, 0, 0, 0, 0, 0, 0, 0, 65, 0, 0, 0, 0, 0, 0,122, 67, 0, 0, 0, 0, 0, 0, 0, 65, - 0, 0, 0, 0, 17, 0, 0, 0, 18, 0, 0, 0, 75, 1, 0, 0, 18, 0, 0, 0,201, 2, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, - 18, 0, 0, 0,201, 2, 0, 0, 18, 0, 0, 0, 75, 1, 0, 0, 0, 0, 32, 65, 0, 0, 0, 63, 0,124,146, 72, 0, 0, 0, 66, - 10,215, 35, 60, 0, 0,200, 66,105, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0,202, 2, 76, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 64, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 0, 0,216, 11, 0, 0,168,194,217, 3, + 0, 0, 0, 0,171, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 83, 99,101,110,101, 0,116, 97,103,101, 0, 97,105,110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,240, 0, 0, 0, -136,160, 45, 5, 0, 0, 0, 0,181, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24,173,200, 3, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,213,217, 3, 0, 0, 0, 0, 24, 51,163, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 40,117,216, 3, 0, 0, 0, 0,136,118,216, 3, 0, 0, 0, 0, 40,117,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,207,217, 3, 0, 0, 0, 0,232,141,214, 15, + 0, 0, 0, 0, 17, 2, 24, 0, 90, 90, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,192, 0, 0, 0, + 68,172, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,250, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,100, 0, 0, 0,100, 0, 0, 0, 0, 0, 1, 0, 0, 0,128, 63, 0, 0, 0, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 2,224, 1, 60, 0, 32, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, + 6, 0, 50, 0,141, 0,128, 7, 56, 4, 8, 0, 8, 0, 24, 0, 17, 0, 0, 0, 90, 0, 1, 0, 81, 0, 0, 0, 23, 0, 33, 0, + 2, 0, 0, 0, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 8, 0, 24, 0, 10, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 24,174,200, 3, 0, 0, 0, 0, 24,174,200, 3, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63, 1, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 5, 0, 2, 0, + 1, 0, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47,116,109,112, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 64, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 83, 67, 0, 0,216, 11, 0, 0, 88,162, 45, 5, 0, 0, 0, 0,172, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 67, 83, 99,101,110,101, 0, -116, 97,103,101, 0, 97,105,110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,120,174, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, - 8,189, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,175, 45, 5, 0, 0, 0, 0, 40,176, 45, 5, 0, 0, 0, 0, - 72,175, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -152,176, 45, 5, 0, 0, 0, 0,152,142,138, 77,130,127, 0, 0, 17, 2, 24, 0, 90, 90, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,192, 0, 0, 0, 68,172, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 0, 0,250, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,100, 0, 0, 0,100, 0, 0, 0, - 0, 0, 1, 0, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 2,224, 1, 60, 0, - 32, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 6, 0, 50, 0,141, 0,128, 7, 56, 4, 8, 0, 8, 0, 24, 0, 17, 0, 0, 0, - 90, 0, 1, 0, 81, 0, 0, 0, 23, 0, 33, 0, 2, 0, 0, 0, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 8, 0, 24, 0, 10, 0, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120,180, 45, 5, 0, 0, 0, 0,120,180, 45, 5, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 1, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0, 0, 0, 5, 0, 2, 0, 1, 0, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 47,116,109,112, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -5367,6 +5406,7 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 5, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -5374,7 +5414,6 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 31, 5, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -5391,466 +5430,490 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,205,204, 76, 63, +205,204, 76, 63,205,204, 76, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 62, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 16, 0, 0, 0,128, 63, 0, 0,128, 63,173, 2, 95, 0,154,153,217, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 4, 0, 1, 0,180, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 76, 69, 78, + 68, 69, 82, 95, 82, 69, 78, 68, 69, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68,172, 0, 0, + 0, 0,128, 63,102,166,171, 67, 0, 0,128, 63, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48,209,117, 3, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80,149,158, 15, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 88, 87,171, 3, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 2,224, 1, 60, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 4, 0, 1, 0,180, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 5, 0, +205,204,204, 61,154,153,153, 62,205,204, 76, 62,219, 15, 73, 63,102,102,102, 63, 0, 0, 0, 64,154,153, 25, 63, 0, 0, 64, 65, +102,102,166, 63, 0, 0, 0, 65, 0, 0,160, 65, 6, 0, 0, 0, 0, 0,192, 64, 0, 0,128, 63, 0, 0, 0, 0,205,204, 28, 65, + 0, 0, 0, 0, 32, 0, 0, 0, 32, 0, 1, 0,128, 0, 5, 0,218, 0, 0, 0, 60, 0, 5, 0, 1, 0, 5, 0, 0, 0, 0, 0, + 0, 0, 0, 64, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,195,245, 28,193, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 68, 65, 84, 65,128, 0, 0, 0, 24,173,200, 3, 0, 0, 0, 0, 9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, + 40, 0, 0, 0, 40,117,216, 3, 0, 0, 0, 0,143, 0, 0, 0, 1, 0, 0, 0,216,117,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,232, 1, 20, 1,184,219,217, 3, 0, 0, 0, 0, 68, 65, 84, 65, + 40, 0, 0, 0,216,117,216, 3, 0, 0, 0, 0,143, 0, 0, 0, 1, 0, 0, 0,136,118,216, 3, 0, 0, 0, 0, 40,117,216, 3, + 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 4, 0, 0,118, 2,238, 1,168,225,217, 3, 0, 0, 0, 0, 68, 65, 84, 65, + 40, 0, 0, 0,136,118,216, 3, 0, 0, 0, 0,143, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216,117,216, 3, + 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 4, 0, 0,108, 0, 86, 1,200,213,217, 3, 0, 0, 0, 0, 68, 65, 84, 65, +232, 1, 0, 0, 8,207,217, 3, 0, 0, 0, 0,167, 0, 0, 0, 1, 0, 0, 0,216,202,207, 3, 0, 0, 0, 0,152,203,207, 3, + 0, 0, 0, 0,168, 1,211, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 1, 0, 1, 0,205,204, 76, 63, + 0, 0,180, 66, 9, 0, 1, 0, 0, 0,128, 63,111, 18,131, 58,205,204,204, 61, 0, 0, 1, 0, 32, 0, 32, 0, 32, 0, 1, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,232, 10,219, 3, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 80, 0, 0, 2, 0, 2, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 5, 0, 5, 0,255,255, 50, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 72, 66, 50, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200, 66, 50, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 72, 66, 50, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 66, 50, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 72, 66, 50, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 66, 50, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 72, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 62, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 10,215, 35, 60,205,204,204, 61, + 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,250, 0,205,204,204, 61,205,204,204, 61,102,102,166, 63, 0, 0,192, 63, 0, 0,240, 65, + 72,225,122, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 67, 2, 0, 3, 2, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, + 35, 0, 0, 0,204,197,121, 63, 0, 0, 0, 63, 35, 0, 0, 0,204,197,121, 63, 0, 0, 0, 63, 17, 0, 0, 0, 68, 65, 84, 65, + 56, 0, 0, 0,216,202,207, 3, 0, 0, 0, 0,164, 0, 0, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,255,255,255,128, 1, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 0, 0, 0,152,203,207, 3, 0, 0, 0, 0,164, 0, 0, 0, + 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,200,255,128, 1, 0, 0, 0, 2, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, + 96, 0, 0, 0,168, 1,211, 3, 0, 0, 0, 0,162, 0, 0, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0,120, 58,171, 3, + 0, 0, 0, 0,255,100,100,128, 1, 0, 0, 0,128, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,155, 9, 25, 67, +190, 23,237, 64, 75, 1,147, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,120, 0, 0, 0, 24,174,200, 3, + 0, 0, 0, 0,149, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82,101,110,100, +101,114, 76, 97,121,101,114, 0,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255, 15, 0, 0, 0, 0, 0,255,127, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, + 0, 0, 0, 0, 67, 65, 0, 0,200, 0, 0, 0, 24, 98,200, 3, 0, 0, 0, 0, 22, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 65, 67, 97, +109,101,114, 97, 0, 97,109,101,114, 97, 46, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, + 0, 0, 0, 63,205,204,204, 61, 0, 0,200, 66, 0, 0, 12, 66,161, 14,234, 64, 0, 0, 0, 63, 0, 0, 0, 66, 0, 0,144, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 76, 65, 0, 0, 16, 2, 0, 0,120,209,217, 3, 0, 0, 0, 0, 36, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 65, 76, 97, +109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,205,204, 76, 63,205,204, 76, 63,205,204, 76, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,128, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 16, 0, 0, 0,128, 63, 0, 0,128, 63, -173, 2, 95, 0,154,153,217, 63, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 1, 0,180, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 66, 76, 69, 78, 68, 69, 82, 95, 82, 69, 78, 68, 69, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68,172, 0, 0, 0, 0,128, 63,102,166,171, 67, 0, 0,128, 63, 2, 0, 0, 0, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,224,182, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -192,164,145, 77,130,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,131, 48, 5, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 2,224, 1, 60, 0, - 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 1, 0,180, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 5, 0,205,204,204, 61,154,153,153, 62,205,204, 76, 62,219, 15, 73, 63,102,102,102, 63, - 0, 0, 0, 64,154,153, 25, 63, 0, 0, 64, 65,102,102,166, 63, 0, 0, 0, 65, 0, 0,160, 65, 6, 0, 0, 0, 0, 0,192, 64, - 0, 0,128, 63, 0, 0, 0, 0,205,204, 28, 65, 0, 0, 0, 0, 32, 0, 0, 0, 32, 0, 1, 0,128, 0, 5, 0,218, 0, 0, 0, - 60, 0, 5, 0, 1, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,195,245, 28,193, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 25, 0, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,128, 0, 0, 0,120,174, 45, 5, 0, 0, 0, 0, - 9, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 72,175, 45, 5, 0, 0, 0, 0,144, 0, 0, 0, 1, 0, 0, 0, -184,175, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0,200, 1, 23, 1, -120,198, 45, 5, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,184,175, 45, 5, 0, 0, 0, 0,144, 0, 0, 0, 1, 0, 0, 0, - 40,176, 45, 5, 0, 0, 0, 0, 72,175, 45, 5, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 4, 0, 0, 77, 2,226, 1, - 8,206, 45, 5, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 40,176, 45, 5, 0, 0, 0, 0,144, 0, 0, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,184,175, 45, 5, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 4, 0, 0,100, 0, 85, 1, -216,191, 45, 5, 0, 0, 0, 0, 68, 65, 84, 65,232, 1, 0, 0,152,176, 45, 5, 0, 0, 0, 0,168, 0, 0, 0, 1, 0, 0, 0, -200,178, 45, 5, 0, 0, 0, 0, 72,179, 45, 5, 0, 0, 0, 0,200,179, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,128, 63, 1, 0, 1, 0,205,204, 76, 63, 0, 0,180, 66, 9, 0, 1, 0, 0, 0,128, 63,111, 18,131, 58,205,204,204, 61, - 0, 0, 1, 0, 32, 0, 32, 0, 32, 0, 1, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 1, 0, 0, 0, - 0, 0, 0, 0, 2, 0, 80, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 5, 0, 5, 0,255,255, - 50, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 66, 50, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200, 66, - 50, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 66, 50, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 66, - 50, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 66, 50, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 66, - 50, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 62, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,128, 63, 10,215, 35, 60,205,204,204, 61, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,250, 0,205,204,204, 61,205,204,204, 61, -102,102,166, 63, 0, 0,192, 63, 0, 0,240, 65, 72,225,122, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 67, 2, 0, 3, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 35, 0, 0, 0,204,197,121, 63, 0, 0, 0, 63, 35, 0, 0, 0,204,197,121, 63, - 0, 0, 0, 63, 17, 0, 0, 0, 68, 65, 84, 65, 56, 0, 0, 0,200,178, 45, 5, 0, 0, 0, 0,165, 0, 0, 0, 1, 0, 0, 0, - 8,116, 47, 5, 0, 0, 0, 0,168,148,145, 77,130,127, 0, 0,255,255,255,128, 1, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 0, 0, 0, - 72,179, 45, 5, 0, 0, 0, 0,165, 0, 0, 0, 1, 0, 0, 0, 8,116, 47, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -200,200,255,128, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 96, 0, 0, 0,200,179, 45, 5, 0, 0, 0, 0,163, 0, 0, 0, 1, 0, 0, 0, -248,228, 47, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,100,100,128, 1, 0, 0, 0,128, 0, 0, 0, 1, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 0, 0,124, 7,231, 65,255, 74, 20, 65, 54, 86,123, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65,120, 0, 0, 0,120,180, 45, 5, 0, 0, 0, 0,150, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 82,101,110,100,101,114, 76, 97,121,101,114, 0,114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255, 15, 0, 0, 0, 0, 0, -255,127, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 67, 65, 0, 0,200, 0, 0, 0, 56,183, 45, 5, 0, 0, 0, 0, - 22, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 67, 65, 67, 97,109,101,114, 97, 0, 97,109,101,114, 97, 46, 48, 48, 49, 0, 0, 0, 0, 0, 0, + 0, 32, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,247,255,239, 65, 0, 0,150, 66,154,153, 25, 62, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 8,212,217, 3, 0, 0, 0, 0, 2, 0, 0, 0, 46, 26,128, 63, 25, 4,240, 65, 0, 0, 52, 66, 0, 0,128, 63, + 0, 0, 64, 64,205,204, 76, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 11, 3, 0, 1, 0, 0, 0, 0, 2, 1, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,111, 18,131, 58, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 64, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 63,205,204,204, 61, 0, 0,200, 66, 0, 0, 12, 66,161, 14,234, 64, - 0, 0, 0, 63, 0, 0, 0, 66, 0, 0,144, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 65, 0, 0, 16, 2, 0, 0, 72,184, 45, 5, 0, 0, 0, 0, - 36, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 76, 65, 76, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63,247,255,239, 65, 0, 0,150, 66, -154,153, 25, 62, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,168,186, 45, 5, 0, 0, 0, 0, 2, 0, 0, 0, 46, 26,128, 63, - 25, 4,240, 65, 0, 0, 52, 66, 0, 0,128, 63, 0, 0, 64, 64,205,204, 76, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 64, 11, 3, 0, 1, 0, 0, 0, 0, 2, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, -111, 18,131, 58, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 64, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,119,216, 3, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 64, 1, 0, 0, 8,212,217, 3, 0, 0, 0, 0,119, 1, 0, 0, + 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 2, 0, 1, 0, 0, 0,128, 67, 0, 0, 0, 0, + 0, 0,128, 63,243, 4, 53,191,242, 4, 53, 63,242, 4, 53,191,243, 4, 53, 63, 40, 67,201, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0, 40, 67,201, 3, 0, 0, 0, 0,117, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 56,119,216, 3, + 0, 0, 0, 0, 12, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 79, 0, 0, 24, 2, 0, 0, 24, 51,163, 3, + 0, 0, 0, 0,142, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 79, 87,111,114,108,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,114, 99, 80, 61,114, 99, 80, 61,114, 99, 80, 61, +199, 54, 36, 60,199, 54, 36, 60,199, 54, 36, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0,205,204, 28, 65, 0, 0, 0, 0, 0, 0, 32, 0, +128, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160, 64, 0, 0,200, 65, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0,112, 65, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 32, 65, 0, 0, 0, 0, 0, 0,128, 63,205,204, 76, 61, 0, 0, 5, 0, 0, 0, 0, 0, 10,215,163, 59, + 0, 0, 0, 0, 0, 0,128, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,152,188, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 64, 1, 0, 0, -168,186, 45, 5, 0, 0, 0, 0,120, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, - 2, 0, 1, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,243, 4, 53,191,242, 4, 53, 63,242, 4, 53,191,243, 4, 53, 63, - 56,188, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,119,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,232,119,216, 3, 0, 0, 0, 0, 12, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 79, 66, 0, 0,112, 5, 0, 0,200,213,217, 3, 0, 0, 0, 0,129, 0, 0, 0, 1, 0, 0, 0,184,219,217, 3, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 66, 67, 97, +109,101,114, 97, 0, 97,109,101,114, 97, 46, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 24, 98,200, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,250, 0, 0, 0, 10, 0, 0, 0, + 10, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 6, 0, 0, 0, 1, 0, 0, 0,250, 0, 0, 0, 10, 0, 0, 0, + 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,110,101,239, 64, +150, 62,208,192, 78,255,170, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 42,254,141, 63,192, 57, 49, 60, 34,159, 80, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,222,149, 47, 63, + 53, 70, 58, 63,222, 56, 49,188, 0, 0, 0, 0, 86,126,162,190,227,251,159, 62, 55, 53,101, 63, 0, 0, 0, 0, 7,165, 39, 63, +149, 84, 28,191, 51,247,227, 62, 0, 0, 0, 0,110,101,239, 64,150, 62,208,192, 78,255,170, 64, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 1, 0,128, 63, + 1, 0,128, 51, 1, 0, 0,179, 0, 0, 0, 0, 0, 0, 0, 51, 0, 0,128, 63, 1, 0,128, 51, 0, 0, 0, 0, 2, 0, 0,179, + 2, 0, 0,167, 1, 0,128, 63, 0, 0, 0, 0, 1, 0, 0, 53, 1, 0, 0, 41, 1, 0,128,168, 0, 0,128, 63,221,149, 47, 63, + 86,126,162,190, 8,165, 39, 63, 0, 0, 0, 0, 51, 70, 58, 63,225,251,159, 62,149, 84, 28,191, 0, 0, 0, 0,192, 56, 49,188, + 55, 53,101, 63, 52,247,227, 62, 0, 0, 0, 0, 90, 38,173,190, 0,222,192,190,152, 9, 52,193, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 5, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0,100, 0, 0, 0, 0, 0, 0, 0, 56,180,150,201, 0, 0,128, 63,187,225, 16, 63, 0, 0,128, 63,205,204,204, 62, +237, 54, 32, 63, 0, 0, 0, 0,143,194,117, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 2, 0, 1, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 40,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,152, 0, 0, 0,248, 40,215, 3, 0, 0, 0, 0,132, 0, 0, 0, + 1, 0, 0, 0, 0,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,205,204,204, 61, +205,204, 76, 62, 10,215,163, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 79, 66, 0, 0, +112, 5, 0, 0,184,219,217, 3, 0, 0, 0, 0,129, 0, 0, 0, 1, 0, 0, 0,168,225,217, 3, 0, 0, 0, 0,200,213,217, 3, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 66, 67,117, 98,101, 0,112,104,101,114,101, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 4, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,107,205, 15, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136, 48,218, 3, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,250, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 0, 0, 1, 0, + 0, 0, 0, 0, 0, 0, 1, 0, 6, 0, 0, 0, 1, 0, 0, 0,250, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 24, 0, 0, 0, 56,188, 45, 5, 0, 0, 0, 0, -118, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, - 68, 65, 84, 65, 40, 0, 0, 0,152,188, 45, 5, 0, 0, 0, 0, 12, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 87, 79, 0, 0, 24, 2, 0, 0, 8,189, 45, 5, 0, 0, 0, 0,143, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 87, 79, 87,111,114,108,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136, 12,217, 3, + 0, 0, 0, 0,168,182,117, 3, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -114, 99, 80, 61,114, 99, 80, 61,114, 99, 80, 61,199, 54, 36, 60,199, 54, 36, 60,199, 54, 36, 60, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, -205,204, 28, 65, 0, 0, 0, 0, 0, 0, 32, 0,128, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160, 64, - 0, 0,200, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, - 0, 0,112, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 65, 0, 0, 0, 0, 0, 0,128, 63,205,204, 76, 61, - 0, 0, 5, 0, 0, 0, 0, 0, 10,215,163, 59, 0, 0, 0, 0, 0, 0,128, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 68, 0, 0, 0, 7, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,100, 0, 0, 0, + 0, 0, 0, 0, 56,180,150,201, 0, 0,128, 63,169, 19,208, 60, 0, 0,128, 63,205,204,204, 62,229,208, 34, 62, 0, 0, 0, 0, +143,194,117, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 5, 0, 1, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 64, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 24, 42,215, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,243,206, 3, 0, 0, 0, 0,136,250,206, 3, 0, 0, 0, 0, 25, 0, 0, 38, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 68, 65, 84, 65, 8, 0, 0, 0,136, 12,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 68, 65, 84, 65, 4, 0, 0, 0,168,182,117, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65,152, 0, 0, 0, 24, 42,215, 3, 0, 0, 0, 0,132, 0, 0, 0, 1, 0, 0, 0, 0,192, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,205,204,204, 61,205,204, 76, 62, 10,215,163, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -104,191, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,104,191, 45, 5, 0, 0, 0, 0, - 12, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 66, 0, 0,112, 5, 0, 0,216,191, 45, 5, 0, 0, 0, 0, -130, 0, 0, 0, 1, 0, 0, 0,120,198, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 79, 66, 67, 97,109,101,114, 97, 0, 97,109,101,114, 97, 46, 48, 48, 49, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 79, 66, 0, 0,112, 5, 0, 0,168,225,217, 3, 0, 0, 0, 0, +129, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184,219,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 79, 66, 76, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56,183, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120,209,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,250, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 6, 0, 0, 0, 1, 0, 0, 0,250, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,110,101,239, 64,150, 62,208,192, 78,255,170, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,154,112,130, 64,183,178,128, 63,112,236,188, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 42,254,141, 63,192, 57, 49, 60, 34,159, 80, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,229,123, 38, 63, 87, 43, 98, 61,229,229,238, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,222,149, 47, 63, 53, 70, 58, 63,222, 56, 49,188, 0, 0, 0, 0, 86,126,162,190,227,251,159, 62, - 55, 53,101, 63, 0, 0, 0, 0, 7,165, 39, 63,149, 84, 28,191, 51,247,227, 62, 0, 0, 0, 0,110,101,239, 64,150, 62,208,192, - 78,255,170, 64, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 54,236,148,190, 25,134,116, 63,236, 13, 98,189, 0, 0, 0, 0,221,102, 69,191, 57,174, 76,190, + 34,194, 26, 63, 0, 0, 0, 0, 37,255, 16, 63,241,161, 95, 62,164,111, 75, 63, 0, 0, 0, 0,154,112,130, 64,183,178,128, 63, +112,236,188, 64, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,128, 63, 1, 0,128, 63, 1, 0,128, 51, 1, 0, 0,179, 0, 0, 0, 0, 0, 0, 0, 51, 0, 0,128, 63, - 1, 0,128, 51, 0, 0, 0, 0, 2, 0, 0,179, 2, 0, 0,167, 1, 0,128, 63, 0, 0, 0, 0, 1, 0, 0, 53, 1, 0, 0, 41, - 1, 0,128,168, 0, 0,128, 63,221,149, 47, 63, 86,126,162,190, 8,165, 39, 63, 0, 0, 0, 0, 51, 70, 58, 63,225,251,159, 62, -149, 84, 28,191, 0, 0, 0, 0,192, 56, 49,188, 55, 53,101, 63, 52,247,227, 62, 0, 0, 0, 0, 90, 38,173,190, 0,222,192,190, -152, 9, 52,193, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 1, 0,128, 50, 0, 0, 0,179, 0, 0, 0, 0, 1, 0,128, 50, 1, 0,128, 63, + 1, 0, 0, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 1, 0, 0, 39, 1, 0, 0, 52, + 1, 0,128, 39, 0, 0,128, 63, 54,236,148,190,221,102, 69,191, 38,255, 16, 63, 0, 0, 0, 0, 24,134,116, 63, 57,174, 76,190, +239,161, 95, 62, 0, 0, 0, 0,237, 13, 98,189, 35,194, 26, 63,166,111, 75, 63, 0, 0, 0, 0,209, 19, 13, 63,241, 65,102,190, + 10, 10,231,192, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 5, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 5, 0, 1, 0, 0, 0, 68, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,100, 0, 0, 0, 0, 0, 0, 0, 56,180,150,201, 0, 0,128, 63, -187,225, 16, 63, 0, 0,128, 63,205,204,204, 62,237, 54, 32, 63, 0, 0, 0, 0,143,194,117, 61, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 1, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, +169, 19,208, 60, 0, 0,128, 63,205,204,204, 62,229,208, 34, 62, 0, 0, 0, 0,143,194,117, 61, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 5, 0, 1, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152,197, 45, 5, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,231,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,152, 0, 0, 0, -152,197, 45, 5, 0, 0, 0, 0,133, 0, 0, 0, 1, 0, 0, 0, 0,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +200,231,217, 3, 0, 0, 0, 0,132, 0, 0, 0, 1, 0, 0, 0, 0,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,205,204,204, 61,205,204, 76, 62, 10,215,163, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2, 0, 0, 0, 79, 66, 0, 0,112, 5, 0, 0,120,198, 45, 5, 0, 0, 0, 0,130, 0, 0, 0, 1, 0, 0, 0, - 8,206, 45, 5, 0, 0, 0, 0,216,191, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 79, 66, 67,117, 98,101, 0,112,104,101,114,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 0, 0, 0, 77, 65, 0, 0,128, 3, 0, 0,152, 7,218, 3, 0, 0, 0, 0, 39, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 8, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 77, 65, 77, 97,116,101,114,105, 97,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 0,205,204, 76, 63,205,204, 76, 63,205,204, 76, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,205,204, 76, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 10,215, 35, 60, 0, 0, 0, 0, + 0, 0, 8, 0, 1, 0, 50, 0,205,204, 76, 62, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 16, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160, 63, 0, 0, 0, 0, 0, 0,160, 63, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 2, 0, 2, 0, 50, 0, 0, 6, 0, 0,128, 63, 0, 0,128, 63, 18, 0, 18, 0, 10,215,163, 59, 10,215,163, 59, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 4, 0, 67, 0, 64, 3, 67, 0, 64, 3, 1, 0, 4, 0, 12, 0, 4, 0, 0, 0, 0, 63, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 63, 0, 0,128, 64, 0, 0, 0, 63,205,204,204, 61, 0, 0, 0, 63,205,204,204, 61,205,204,204, 61, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63,152, 11,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,248,139,141, 77,130,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 8, 30, 47, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,250, 0, 0, 0, - 10, 0, 0, 0, 10, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 6, 0, 0, 0, 1, 0, 0, 0,250, 0, 0, 0, - 10, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152,120,216, 3, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,111,148, 26, 63, +111,148, 26, 63,111,148, 26, 63,205,204, 76, 61,205,204,204, 61,102,102,166, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 56, 1, 0, 0,152, 11,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,216, 29,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 40, 0, 0, 0,152,120,216, 3, 0, 0, 0, 0, + 12, 0, 0, 0, 1, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 53, 0, 53, 0, + 88, 13,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 16, 0, 0, 88, 13,218, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 51, 2, 2, 2, 51, + 6, 6, 6,153, 6, 6, 6,153, 6, 6, 6,153, 4, 4, 4,102, 3, 3, 3,102, 2, 2, 2, 51, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 51, 8, 8, 8,153, 11, 11, 11,204, 13, 13, 13,255, 12, 12, 12,255, + 12, 12, 12,255, 11, 11, 11,255, 10, 10, 10,255, 10, 10, 10,255, 9, 9, 9,255, 9, 9, 9,255, 9, 9, 9,255, 4, 4, 4,102, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 3, 3, 51, 10, 10, 10,153, 18, 18, 18,255, 20, 20, 20,255, 22, 22, 22,255, 23, 23, 23,255, 22, 22, 22,255, + 20, 20, 20,255, 19, 19, 19,255, 16, 16, 16,255, 14, 14, 14,255, 11, 11, 11,255, 10, 10, 10,255, 9, 9, 9,255, 9, 9, 9,255, + 9, 9, 9,255, 8, 8, 8,204, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 7, 7, 7,102, 19, 19, 19,204, 27, 27, 27,255, 31, 31, 31,255, 32, 32, 32,255, 33, 33, 33,255, 33, 33, 33,255, 31, 31, 31,255, + 30, 30, 30,255, 27, 27, 27,255, 25, 25, 25,255, 22, 22, 22,255, 19, 19, 19,255, 16, 16, 16,255, 12, 12, 12,255, 10, 10, 10,255, + 10, 10, 10,255, 10, 10, 10,255, 10, 10, 10,255, 4, 4, 4,102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 13, 13,153, + 29, 29, 29,255, 37, 37, 37,255, 40, 40, 40,255, 42, 42, 42,255, 42, 42, 42,255, 43, 43, 43,255, 41, 41, 41,255, 40, 40, 40,255, + 38, 38, 38,255, 36, 36, 36,255, 33, 33, 33,255, 30, 30, 30,255, 27, 27, 27,255, 24, 24, 24,255, 20, 20, 20,255, 16, 16, 16,255, + 12, 12, 12,255, 10, 10, 10,255, 10, 10, 10,255, 10, 10, 10,255, 7, 7, 7,153, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 13, 13,102, 37, 37, 37,255, + 44, 44, 44,255, 48, 48, 48,255, 50, 50, 50,255, 51, 51, 51,255, 51, 51, 51,255, 50, 50, 50,255, 49, 49, 49,255, 48, 48, 48,255, + 45, 45, 45,255, 43, 43, 43,255, 41, 41, 41,255, 37, 37, 37,255, 34, 34, 34,255, 31, 31, 31,255, 28, 28, 28,255, 24, 24, 24,255, + 20, 20, 20,255, 15, 15, 15,255, 11, 11, 11,255, 10, 10, 10,255, 11, 11, 11,255, 7, 7, 7,153, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 13, 13,102, 41, 41, 41,255, 50, 50, 50,255, + 54, 54, 54,255, 57, 57, 57,255, 58, 58, 58,255, 59, 59, 59,255, 59, 59, 59,255, 58, 58, 58,255, 57, 57, 57,255, 55, 55, 55,255, + 53, 53, 53,255, 51, 51, 51,255, 48, 48, 48,255, 45, 45, 45,255, 41, 41, 41,255, 38, 38, 38,255, 35, 35, 35,255, 31, 31, 31,255, + 27, 27, 27,255, 23, 23, 23,255, 17, 17, 17,255, 12, 12, 12,255, 11, 11, 11,255, 11, 11, 11,255, 5, 5, 5,102, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 36, 36,204, 53, 53, 53,255, 59, 59, 59,255, + 63, 63, 63,255, 65, 65, 65,255, 66, 66, 66,255, 66, 66, 66,255, 66, 66, 66,255, 65, 65, 65,255, 64, 64, 64,255, 62, 62, 62,255, + 60, 60, 60,255, 57, 57, 57,255, 54, 54, 54,255, 51, 51, 51,255, 48, 48, 48,255, 44, 44, 44,255, 41, 41, 41,255, 37, 37, 37,255, + 33, 33, 33,255, 29, 29, 29,255, 24, 24, 24,255, 19, 19, 19,255, 13, 13, 13,255, 11, 11, 11,255, 12, 12, 12,255, 3, 3, 3, 51, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 19, 19,102, 56, 56, 56,255, 64, 64, 64,255, 68, 68, 68,255, + 71, 71, 71,255, 73, 73, 73,255, 74, 74, 74,255, 74, 74, 74,255, 73, 73, 73,255, 72, 72, 72,255, 71, 71, 71,255, 69, 69, 69,255, + 67, 67, 67,255, 64, 64, 64,255, 61, 61, 61,255, 58, 58, 58,255, 54, 54, 54,255, 50, 50, 50,255, 47, 47, 47,255, 43, 43, 43,255, + 39, 39, 39,255, 34, 34, 34,255, 30, 30, 30,255, 25, 25, 25,255, 19, 19, 19,255, 13, 13, 13,255, 12, 12, 12,255, 10, 10, 10,204, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54, 54, 54,255, 66, 66, 66,255, 72, 72, 72,255, 77, 77, 77,255, + 79, 79, 79,255, 81, 81, 81,255, 81, 81, 81,255, 81, 81, 81,255, 80, 80, 80,255, 79, 79, 79,255, 77, 77, 77,255, 75, 75, 75,255, + 73, 73, 73,255, 70, 70, 70,255, 67, 67, 67,255, 63, 63, 63,255, 60, 60, 60,255, 56, 56, 56,255, 52, 52, 52,255, 49, 49, 49,255, + 44, 44, 44,255, 40, 40, 40,255, 35, 35, 35,255, 30, 30, 30,255, 24, 24, 24,255, 18, 18, 18,255, 12, 12, 12,255, 12, 12, 12,255, + 6, 6, 6,102, 0, 0, 0, 0, 0, 0, 0, 0, 22, 22, 22,102, 67, 67, 67,255, 76, 76, 76,255, 81, 81, 81,255, 84, 84, 84,255, + 87, 87, 87,255, 88, 88, 88,255, 88, 88, 88,255, 88, 88, 88,255, 87, 87, 87,255, 86, 86, 86,255, 84, 84, 84,255, 82, 82, 82,255, + 79, 79, 79,255, 76, 76, 76,255, 73, 73, 73,255, 69, 69, 69,255, 65, 65, 65,255, 62, 62, 62,255, 58, 58, 58,255, 54, 54, 54,255, + 49, 49, 49,255, 45, 45, 45,255, 40, 40, 40,255, 35, 35, 35,255, 29, 29, 29,255, 23, 23, 23,255, 16, 16, 16,255, 12, 12, 12,255, + 12, 12, 12,204, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49,204, 76, 76, 76,255, 84, 84, 84,255, 89, 89, 89,255, 92, 92, 92,255, + 94, 94, 94,255, 95, 95, 95,255, 95, 95, 95,255, 95, 95, 95,255, 94, 94, 94,255, 93, 93, 93,255, 91, 91, 91,255, 88, 88, 88,255, + 85, 85, 85,255, 82, 82, 82,255, 79, 79, 79,255, 75, 75, 75,255, 71, 71, 71,255, 67, 67, 67,255, 63, 63, 63,255, 59, 59, 59,255, + 55, 55, 55,255, 50, 50, 50,255, 45, 45, 45,255, 40, 40, 40,255, 34, 34, 34,255, 28, 28, 28,255, 21, 21, 21,255, 13, 13, 13,255, + 14, 14, 14,255, 0, 0, 0, 0, 14, 14, 14,102, 70, 70, 70,255, 85, 85, 85,255, 92, 92, 92,255, 97, 97, 97,255,100,100,100,255, +102,102,102,255,102,102,102,255,103,103,103,255,102,102,102,255,101,101,101,255, 99, 99, 99,255, 97, 97, 97,255, 94, 94, 94,255, + 91, 91, 91,255, 88, 88, 88,255, 84, 84, 84,255, 81, 81, 81,255, 77, 77, 77,255, 72, 72, 72,255, 68, 68, 68,255, 64, 64, 64,255, + 59, 59, 59,255, 55, 55, 55,255, 50, 50, 50,255, 44, 44, 44,255, 39, 39, 39,255, 32, 32, 32,255, 25, 25, 25,255, 17, 17, 17,255, + 13, 13, 13,255, 7, 7, 7,102, 24, 24, 24,102, 80, 80, 80,255, 93, 93, 93,255,100,100,100,255,104,104,104,255,107,107,107,255, +109,109,109,255,109,109,109,255,109,109,109,255,109,109,109,255,107,107,107,255,106,106,106,255,103,103,103,255,100,100,100,255, + 97, 97, 97,255, 94, 94, 94,255, 90, 90, 90,255, 86, 86, 86,255, 82, 82, 82,255, 77, 77, 77,255, 73, 73, 73,255, 69, 69, 69,255, + 64, 64, 64,255, 59, 59, 59,255, 54, 54, 54,255, 49, 49, 49,255, 43, 43, 43,255, 36, 36, 36,255, 29, 29, 29,255, 21, 21, 21,255, + 14, 14, 14,255, 10, 10, 10,153, 29, 29, 29,102, 89, 89, 89,255,100,100,100,255,107,107,107,255,112,112,112,255,114,114,114,255, +116,116,116,255,116,116,116,255,116,116,116,255,115,115,115,255,114,114,114,255,112,112,112,255,110,110,110,255,107,107,107,255, +104,104,104,255,100,100,100,255, 96, 96, 96,255, 92, 92, 92,255, 87, 87, 87,255, 83, 83, 83,255, 78, 78, 78,255, 73, 73, 73,255, + 68, 68, 68,255, 63, 63, 63,255, 58, 58, 58,255, 52, 52, 52,255, 46, 46, 46,255, 40, 40, 40,255, 33, 33, 33,255, 24, 24, 24,255, + 17, 17, 17,255, 13, 13, 13,204, 46, 46, 46,153, 95, 95, 95,255,107,107,107,255,114,114,114,255,118,118,118,255,121,121,121,255, +122,122,122,255,123,123,123,255,123,123,123,255,122,122,122,255,122,122,122,255,120,120,120,255,118,118,118,255,114,114,114,255, +110,110,110,255,106,106,106,255,101,101,101,255, 97, 97, 97,255, 92, 92, 92,255, 87, 87, 87,255, 83, 83, 83,255, 78, 78, 78,255, + 73, 73, 73,255, 68, 68, 68,255, 62, 62, 62,255, 56, 56, 56,255, 50, 50, 50,255, 44, 44, 44,255, 36, 36, 36,255, 28, 28, 28,255, + 19, 19, 19,255, 12, 12, 12,204, 47, 47, 47,153,101,101,101,255,113,113,113,255,120,120,120,255,125,125,125,255,127,127,127,255, +129,129,129,255,130,130,130,255,130,130,130,255,131,131,131,255,131,131,131,255,131,131,131,255,129,129,129,255,125,125,125,255, +120,120,120,255,113,113,113,255,108,108,108,255,103,103,103,255, 97, 97, 97,255, 92, 92, 92,255, 87, 87, 87,255, 82, 82, 82,255, + 77, 77, 77,255, 72, 72, 72,255, 66, 66, 66,255, 60, 60, 60,255, 54, 54, 54,255, 47, 47, 47,255, 39, 39, 39,255, 31, 31, 31,255, + 22, 22, 22,255, 12, 12, 12,204, 48, 48, 48,153,106,106,106,255,118,118,118,255,126,126,126,255,131,131,131,255,134,134,134,255, +135,135,135,255,137,137,137,255,138,138,138,255,142,142,142,255,147,147,147,255,149,149,149,255,148,148,148,255,142,142,142,255, +133,133,133,255,124,124,124,255,115,115,115,255,108,108,108,255,102,102,102,255, 97, 97, 97,255, 92, 92, 92,255, 87, 87, 87,255, + 81, 81, 81,255, 75, 75, 75,255, 69, 69, 69,255, 63, 63, 63,255, 57, 57, 57,255, 49, 49, 49,255, 42, 42, 42,255, 33, 33, 33,255, + 24, 24, 24,255, 9, 9, 9,153, 32, 32, 32,102,109,109,109,255,123,123,123,255,131,131,131,255,136,136,136,255,140,140,140,255, +142,142,142,255,144,144,144,255,148,148,148,255,156,156,156,255,168,168,168,255,176,176,176,255,177,177,177,255,168,168,168,255, +153,153,153,255,137,137,137,255,124,124,124,255,114,114,114,255,107,107,107,255,101,101,101,255, 96, 96, 96,255, 90, 90, 90,255, + 85, 85, 85,255, 79, 79, 79,255, 72, 72, 72,255, 66, 66, 66,255, 59, 59, 59,255, 52, 52, 52,255, 44, 44, 44,255, 35, 35, 35,255, + 26, 26, 26,255, 10, 10, 10,153, 17, 17, 17, 51,110,110,110,255,127,127,127,255,136,136,136,255,142,142,142,255,145,145,145,255, +148,148,148,255,151,151,151,255,159,159,159,255,174,174,174,255,195,195,195,255,212,212,212,255,216,216,216,255,204,204,204,255, +179,179,179,255,154,154,154,255,135,135,135,255,121,121,121,255,112,112,112,255,106,106,106,255, 99, 99, 99,255, 94, 94, 94,255, + 88, 88, 88,255, 82, 82, 82,255, 76, 76, 76,255, 69, 69, 69,255, 62, 62, 62,255, 54, 54, 54,255, 46, 46, 46,255, 37, 37, 37,255, + 26, 26, 26,255, 6, 6, 6,102, 0, 0, 0, 0,107,107,107,255,130,130,130,255,140,140,140,255,146,146,146,255,150,150,150,255, +153,153,153,255,158,158,158,255,169,169,169,255,191,191,191,255,219,219,219,255,246,246,246,255,254,254,254,255,237,237,237,255, +204,204,204,255,170,170,170,255,145,145,145,255,127,127,127,255,117,117,117,255,110,110,110,255,103,103,103,255, 97, 97, 97,255, + 91, 91, 91,255, 85, 85, 85,255, 78, 78, 78,255, 71, 71, 71,255, 64, 64, 64,255, 55, 55, 55,255, 47, 47, 47,255, 37, 37, 37,255, + 25, 25, 25,255, 3, 3, 3, 51, 0, 0, 0, 0, 65, 65, 65,153,129,129,129,255,142,142,142,255,149,149,149,255,154,154,154,255, +158,158,158,255,163,163,163,255,176,176,176,255,199,199,199,255,232,232,232,255,255,255,255,255,255,255,255,255,255,255,255,255, +220,220,220,255,181,181,181,255,151,151,151,255,132,132,132,255,121,121,121,255,113,113,113,255,106,106,106,255,100,100,100,255, + 94, 94, 94,255, 87, 87, 87,255, 80, 80, 80,255, 73, 73, 73,255, 65, 65, 65,255, 57, 57, 57,255, 48, 48, 48,255, 38, 38, 38,255, + 16, 16, 16,153, 0, 0, 0, 0, 0, 0, 0, 0, 21, 21, 21, 51,127,127,127,255,143,143,143,255,152,152,152,255,157,157,157,255, +161,161,161,255,165,165,165,255,177,177,177,255,198,198,198,255,227,227,227,255,253,253,253,255,255,255,255,255,250,250,250,255, +217,217,217,255,181,181,181,255,153,153,153,255,135,135,135,255,124,124,124,255,117,117,117,255,110,110,110,255,103,103,103,255, + 96, 96, 96,255, 89, 89, 89,255, 82, 82, 82,255, 74, 74, 74,255, 66, 66, 66,255, 57, 57, 57,255, 48, 48, 48,255, 35, 35, 35,255, + 10, 10, 10,153, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 93, 93,204,141,141,141,255,153,153,153,255,159,159,159,255, +163,163,163,255,167,167,167,255,174,174,174,255,188,188,188,255,209,209,209,255,228,228,228,255,234,234,234,255,224,224,224,255, +200,200,200,255,173,173,173,255,151,151,151,255,136,136,136,255,127,127,127,255,119,119,119,255,112,112,112,255,105,105,105,255, + 98, 98, 98,255, 90, 90, 90,255, 83, 83, 83,255, 75, 75, 75,255, 66, 66, 66,255, 57, 57, 57,255, 46, 46, 46,255, 24, 24, 24,204, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 20, 20, 51,134,134,134,255,151,151,151,255,160,160,160,255, +164,164,164,255,167,167,167,255,171,171,171,255,178,178,178,255,189,189,189,255,200,200,200,255,202,202,202,255,195,195,195,255, +180,180,180,255,163,163,163,255,148,148,148,255,137,137,137,255,129,129,129,255,121,121,121,255,114,114,114,255,107,107,107,255, + 99, 99, 99,255, 91, 91, 91,255, 83, 83, 83,255, 74, 74, 74,255, 65, 65, 65,255, 55, 55, 55,255, 41, 41, 41,255, 7, 7, 7, 51, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49,102,145,145,145,255,157,157,157,255, +164,164,164,255,167,167,167,255,170,170,170,255,172,172,172,255,176,176,176,255,180,180,180,255,179,179,179,255,174,174,174,255, +165,165,165,255,155,155,155,255,145,145,145,255,137,137,137,255,130,130,130,255,122,122,122,255,115,115,115,255,107,107,107,255, + 99, 99, 99,255, 91, 91, 91,255, 82, 82, 82,255, 73, 73, 73,255, 63, 63, 63,255, 50, 50, 50,255, 22, 22, 22,153, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 78, 78, 78,153,149,149,149,255, +160,160,160,255,166,166,166,255,168,168,168,255,169,169,169,255,170,170,170,255,169,169,169,255,167,167,167,255,164,164,164,255, +158,158,158,255,151,151,151,255,144,144,144,255,137,137,137,255,130,130,130,255,123,123,123,255,115,115,115,255,106,106,106,255, + 98, 98, 98,255, 89, 89, 89,255, 80, 80, 80,255, 70, 70, 70,255, 58, 58, 58,255, 27, 27, 27,153, 3, 3, 3, 51, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 80, 80,153, +150,150,150,255,160,160,160,255,165,165,165,255,167,167,167,255,167,167,167,255,166,166,166,255,163,163,163,255,160,160,160,255, +155,155,155,255,149,149,149,255,143,143,143,255,137,137,137,255,129,129,129,255,121,121,121,255,113,113,113,255,105,105,105,255, + 96, 96, 96,255, 86, 86, 86,255, 76, 76, 76,255, 63, 63, 63,255, 38, 38, 38,204, 7, 7, 7, 51, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 78, 78, 78,153,147,147,147,255,157,157,157,255,161,161,161,255,163,163,163,255,162,162,162,255,160,160,160,255,157,157,157,255, +152,152,152,255,147,147,147,255,141,141,141,255,135,135,135,255,127,127,127,255,119,119,119,255,110,110,110,255,101,101,101,255, + 91, 91, 91,255, 80, 80, 80,255, 66, 66, 66,255, 32, 32, 32,153, 7, 7, 7, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,134,134,134,255,148,148,148,255,154,154,154,255,155,155,155,255,154,154,154,255,152,152,152,255, +147,147,147,255,142,142,142,255,136,136,136,255,130,130,130,255,122,122,122,255,114,114,114,255,104,104,104,255, 93, 93, 93,255, + 81, 81, 81,255, 54, 54, 54,204, 22, 22, 22,102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 73, 73, 73,153,103,103,103,204,137,137,137,255,140,140,140,255,140,140,140,255, +137,137,137,255,133,133,133,255,127,127,127,255,120,120,120,255,113,113,113,255,102,102,102,255, 91, 91, 91,255, 64, 64, 64,204, + 28, 28, 28,102, 6, 6, 6, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 46, 46,102, 72, 72, 72,153, + 72, 72, 72,153, 92, 92, 92,204, 88, 88, 88,204, 81, 81, 81,204, 54, 54, 54,153, 35, 35, 35,102, 16, 16, 16, 51, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 84, 69, 0, 0,168, 1, 0, 0,216, 29,218, 3, 0, 0, 0, 0, 33, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 84, 69, 84,101,120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 62, 0, 0,160, 64, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 64, 0, 0, 0, 64, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 64, 0, 0, 0, 0, 2, 0, 0, 0, + 0, 0, 0, 0, 7, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 8, 0, 0, 0, 1, 0, 1, 0, 3, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, +205,204,204, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,184,205, 45, 5, 0, 0, 0, 0,136,204, 45, 5, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, + 72,121,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0, 72,121,216, 3, 0, 0, 0, 0, 12, 0, 0, 0, 1, 0, 0, 0, + 32, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 16, 0, 15, 0, 8, 32,218, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 16, 0, 0, 8, 32,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 68, 0, 0, 0, 7, 0, 1, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0,100, 0, 0, 0, 0, 0, 0, 0, 56,180,150,201, 0, 0,128, 63,169, 19,208, 60, 0, 0,128, 63, -205,204,204, 62,229,208, 34, 62, 0, 0, 0, 0,143,194,117, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 5, 0, 1, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 64, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,216,204, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136,215,140, 77,130,127, 0, 0, - 56, 36,149, 77,130,127, 0, 0, 25, 0, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 8, 0, 0, 0,184,205, 45, 5, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 4, 0, 0, 0,136,204, 45, 5, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,152, 0, 0, 0,216,204, 45, 5, 0, 0, 0, 0,133, 0, 0, 0, - 1, 0, 0, 0, 0,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,205,204,204, 61, -205,204, 76, 62, 10,215,163, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 79, 66, 0, 0, -112, 5, 0, 0, 8,206, 45, 5, 0, 0, 0, 0,130, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120,198, 45, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 79, 66, 76, 97,109,112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 4, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,184, 45, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,250, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 1, 0, 6, 0, 0, 0, 1, 0, 0, 0,250, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,154,112,130, 64,183,178,128, 63,112,236,188, 64, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,229,123, 38, 63, - 87, 43, 98, 61,229,229,238, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54,236,148,190, 25,134,116, 63,236, 13, 98,189, - 0, 0, 0, 0,221,102, 69,191, 57,174, 76,190, 34,194, 26, 63, 0, 0, 0, 0, 37,255, 16, 63,241,161, 95, 62,164,111, 75, 63, - 0, 0, 0, 0,154,112,130, 64,183,178,128, 63,112,236,188, 64, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 1, 0,128, 50, 0, 0, 0,179, - 0, 0, 0, 0, 1, 0,128, 50, 1, 0,128, 63, 1, 0, 0, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0, 0, 0, 1, 0, 0, 39, 1, 0, 0, 52, 1, 0,128, 39, 0, 0,128, 63, 54,236,148,190,221,102, 69,191, 38,255, 16, 63, - 0, 0, 0, 0, 24,134,116, 63, 57,174, 76,190,239,161, 95, 62, 0, 0, 0, 0,237, 13, 98,189, 35,194, 26, 63,166,111, 75, 63, - 0, 0, 0, 0,209, 19, 13, 63,241, 65,102,190, 10, 10,231,192, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, - 0, 0, 0, 0, 5, 0, 1, 0, 0, 0, 68, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,100, 0, 0, 0, - 0, 0, 0, 0, 56,180,150,201, 0, 0,128, 63,169, 19,208, 60, 0, 0,128, 63,205,204,204, 62,229,208, 34, 62, 0, 0, 0, 0, -143,194,117, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 5, 0, 1, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 64, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,200,211, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65,152, 0, 0, 0,200,211, 45, 5, 0, 0, 0, 0,133, 0, 0, 0, 1, 0, 0, 0, 0,192, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,205,204,204, 61,205,204, 76, 62, 10,215,163, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 77, 65, 0, 0,128, 3, 0, 0,168,212, 45, 5, - 0, 0, 0, 0, 39, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 8, 90, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 65, 77, 97,116,101,114,105, 97,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 51, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,205,204, 76, 63,205,204, 76, 63,205,204, 76, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63,205,204, 76, 63, 0, 0, 0, 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 10,215, 35, 60, 0, 0, 0, 0, 0, 0, 8, 0, 1, 0, 50, 0,205,204, 76, 62, 0, 0,128, 63, 0, 0,128, 63, -205,204, 76, 62, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,160, 63, 0, 0, 0, 0, - 0, 0,160, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 2, 0, 2, 0, 50, 0, 0, 6, 0, 0,128, 63, 0, 0,128, 63, - 18, 0, 18, 0, 10,215,163, 59, 10,215,163, 59, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 4, 0, 67, 0, 64, 3, 67, 0, 64, 3, - 1, 0, 4, 0, 12, 0, 4, 0, 0, 0, 0, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0,128, 64, 0, 0, 0, 63,205,204,204, 61, - 0, 0, 0, 63,205,204,204, 61,205,204,204, 61, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63,120,216, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248,217, 45, 5, - 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63,111,148, 26, 63,111,148, 26, 63,111,148, 26, 63,205,204, 76, 61,205,204,204, 61,102,102,166, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0,120,216, 45, 5, 0, 0, 0, 0, 25, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8,123, 46, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 1, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, - 40, 0, 0, 0,248,217, 45, 5, 0, 0, 0, 0, 12, 0, 0, 0, 1, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 1, 0, 53, 0, 53, 0,104,218, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 0, 16, 0, 0,104,218, 45, 5, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2, 2, 2, 51, 2, 2, 2, 51, 6, 6, 6,153, 6, 6, 6,153, 6, 6, 6,153, 4, 4, 4,102, 3, 3, 3,102, - 2, 2, 2, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 51, 8, 8, 8,153, - 11, 11, 11,204, 13, 13, 13,255, 12, 12, 12,255, 12, 12, 12,255, 11, 11, 11,255, 10, 10, 10,255, 10, 10, 10,255, 9, 9, 9,255, - 9, 9, 9,255, 9, 9, 9,255, 4, 4, 4,102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 51, 10, 10, 10,153, 18, 18, 18,255, 20, 20, 20,255, - 22, 22, 22,255, 23, 23, 23,255, 22, 22, 22,255, 20, 20, 20,255, 19, 19, 19,255, 16, 16, 16,255, 14, 14, 14,255, 11, 11, 11,255, - 10, 10, 10,255, 9, 9, 9,255, 9, 9, 9,255, 9, 9, 9,255, 8, 8, 8,204, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7,102, 19, 19, 19,204, 27, 27, 27,255, 31, 31, 31,255, 32, 32, 32,255, - 33, 33, 33,255, 33, 33, 33,255, 31, 31, 31,255, 30, 30, 30,255, 27, 27, 27,255, 25, 25, 25,255, 22, 22, 22,255, 19, 19, 19,255, - 16, 16, 16,255, 12, 12, 12,255, 10, 10, 10,255, 10, 10, 10,255, 10, 10, 10,255, 10, 10, 10,255, 4, 4, 4,102, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 13, 13, 13,153, 29, 29, 29,255, 37, 37, 37,255, 40, 40, 40,255, 42, 42, 42,255, 42, 42, 42,255, - 43, 43, 43,255, 41, 41, 41,255, 40, 40, 40,255, 38, 38, 38,255, 36, 36, 36,255, 33, 33, 33,255, 30, 30, 30,255, 27, 27, 27,255, - 24, 24, 24,255, 20, 20, 20,255, 16, 16, 16,255, 12, 12, 12,255, 10, 10, 10,255, 10, 10, 10,255, 10, 10, 10,255, 7, 7, 7,153, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 13, 13, 13,102, 37, 37, 37,255, 44, 44, 44,255, 48, 48, 48,255, 50, 50, 50,255, 51, 51, 51,255, 51, 51, 51,255, - 50, 50, 50,255, 49, 49, 49,255, 48, 48, 48,255, 45, 45, 45,255, 43, 43, 43,255, 41, 41, 41,255, 37, 37, 37,255, 34, 34, 34,255, - 31, 31, 31,255, 28, 28, 28,255, 24, 24, 24,255, 20, 20, 20,255, 15, 15, 15,255, 11, 11, 11,255, 10, 10, 10,255, 11, 11, 11,255, - 7, 7, 7,153, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 13, 13, 13,102, 41, 41, 41,255, 50, 50, 50,255, 54, 54, 54,255, 57, 57, 57,255, 58, 58, 58,255, 59, 59, 59,255, 59, 59, 59,255, - 58, 58, 58,255, 57, 57, 57,255, 55, 55, 55,255, 53, 53, 53,255, 51, 51, 51,255, 48, 48, 48,255, 45, 45, 45,255, 41, 41, 41,255, - 38, 38, 38,255, 35, 35, 35,255, 31, 31, 31,255, 27, 27, 27,255, 23, 23, 23,255, 17, 17, 17,255, 12, 12, 12,255, 11, 11, 11,255, - 11, 11, 11,255, 5, 5, 5,102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 36, 36, 36,204, 53, 53, 53,255, 59, 59, 59,255, 63, 63, 63,255, 65, 65, 65,255, 66, 66, 66,255, 66, 66, 66,255, 66, 66, 66,255, - 65, 65, 65,255, 64, 64, 64,255, 62, 62, 62,255, 60, 60, 60,255, 57, 57, 57,255, 54, 54, 54,255, 51, 51, 51,255, 48, 48, 48,255, - 44, 44, 44,255, 41, 41, 41,255, 37, 37, 37,255, 33, 33, 33,255, 29, 29, 29,255, 24, 24, 24,255, 19, 19, 19,255, 13, 13, 13,255, - 11, 11, 11,255, 12, 12, 12,255, 3, 3, 3, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 19, 19,102, - 56, 56, 56,255, 64, 64, 64,255, 68, 68, 68,255, 71, 71, 71,255, 73, 73, 73,255, 74, 74, 74,255, 74, 74, 74,255, 73, 73, 73,255, - 72, 72, 72,255, 71, 71, 71,255, 69, 69, 69,255, 67, 67, 67,255, 64, 64, 64,255, 61, 61, 61,255, 58, 58, 58,255, 54, 54, 54,255, - 50, 50, 50,255, 47, 47, 47,255, 43, 43, 43,255, 39, 39, 39,255, 34, 34, 34,255, 30, 30, 30,255, 25, 25, 25,255, 19, 19, 19,255, - 13, 13, 13,255, 12, 12, 12,255, 10, 10, 10,204, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54, 54, 54,255, - 66, 66, 66,255, 72, 72, 72,255, 77, 77, 77,255, 79, 79, 79,255, 81, 81, 81,255, 81, 81, 81,255, 81, 81, 81,255, 80, 80, 80,255, - 79, 79, 79,255, 77, 77, 77,255, 75, 75, 75,255, 73, 73, 73,255, 70, 70, 70,255, 67, 67, 67,255, 63, 63, 63,255, 60, 60, 60,255, - 56, 56, 56,255, 52, 52, 52,255, 49, 49, 49,255, 44, 44, 44,255, 40, 40, 40,255, 35, 35, 35,255, 30, 30, 30,255, 24, 24, 24,255, - 18, 18, 18,255, 12, 12, 12,255, 12, 12, 12,255, 6, 6, 6,102, 0, 0, 0, 0, 0, 0, 0, 0, 22, 22, 22,102, 67, 67, 67,255, - 76, 76, 76,255, 81, 81, 81,255, 84, 84, 84,255, 87, 87, 87,255, 88, 88, 88,255, 88, 88, 88,255, 88, 88, 88,255, 87, 87, 87,255, - 86, 86, 86,255, 84, 84, 84,255, 82, 82, 82,255, 79, 79, 79,255, 76, 76, 76,255, 73, 73, 73,255, 69, 69, 69,255, 65, 65, 65,255, - 62, 62, 62,255, 58, 58, 58,255, 54, 54, 54,255, 49, 49, 49,255, 45, 45, 45,255, 40, 40, 40,255, 35, 35, 35,255, 29, 29, 29,255, - 23, 23, 23,255, 16, 16, 16,255, 12, 12, 12,255, 12, 12, 12,204, 0, 0, 0, 0, 0, 0, 0, 0, 49, 49, 49,204, 76, 76, 76,255, - 84, 84, 84,255, 89, 89, 89,255, 92, 92, 92,255, 94, 94, 94,255, 95, 95, 95,255, 95, 95, 95,255, 95, 95, 95,255, 94, 94, 94,255, - 93, 93, 93,255, 91, 91, 91,255, 88, 88, 88,255, 85, 85, 85,255, 82, 82, 82,255, 79, 79, 79,255, 75, 75, 75,255, 71, 71, 71,255, - 67, 67, 67,255, 63, 63, 63,255, 59, 59, 59,255, 55, 55, 55,255, 50, 50, 50,255, 45, 45, 45,255, 40, 40, 40,255, 34, 34, 34,255, - 28, 28, 28,255, 21, 21, 21,255, 13, 13, 13,255, 14, 14, 14,255, 0, 0, 0, 0, 14, 14, 14,102, 70, 70, 70,255, 85, 85, 85,255, - 92, 92, 92,255, 97, 97, 97,255,100,100,100,255,102,102,102,255,102,102,102,255,103,103,103,255,102,102,102,255,101,101,101,255, - 99, 99, 99,255, 97, 97, 97,255, 94, 94, 94,255, 91, 91, 91,255, 88, 88, 88,255, 84, 84, 84,255, 81, 81, 81,255, 77, 77, 77,255, - 72, 72, 72,255, 68, 68, 68,255, 64, 64, 64,255, 59, 59, 59,255, 55, 55, 55,255, 50, 50, 50,255, 44, 44, 44,255, 39, 39, 39,255, - 32, 32, 32,255, 25, 25, 25,255, 17, 17, 17,255, 13, 13, 13,255, 7, 7, 7,102, 24, 24, 24,102, 80, 80, 80,255, 93, 93, 93,255, -100,100,100,255,104,104,104,255,107,107,107,255,109,109,109,255,109,109,109,255,109,109,109,255,109,109,109,255,107,107,107,255, -106,106,106,255,103,103,103,255,100,100,100,255, 97, 97, 97,255, 94, 94, 94,255, 90, 90, 90,255, 86, 86, 86,255, 82, 82, 82,255, - 77, 77, 77,255, 73, 73, 73,255, 69, 69, 69,255, 64, 64, 64,255, 59, 59, 59,255, 54, 54, 54,255, 49, 49, 49,255, 43, 43, 43,255, - 36, 36, 36,255, 29, 29, 29,255, 21, 21, 21,255, 14, 14, 14,255, 10, 10, 10,153, 29, 29, 29,102, 89, 89, 89,255,100,100,100,255, -107,107,107,255,112,112,112,255,114,114,114,255,116,116,116,255,116,116,116,255,116,116,116,255,115,115,115,255,114,114,114,255, -112,112,112,255,110,110,110,255,107,107,107,255,104,104,104,255,100,100,100,255, 96, 96, 96,255, 92, 92, 92,255, 87, 87, 87,255, - 83, 83, 83,255, 78, 78, 78,255, 73, 73, 73,255, 68, 68, 68,255, 63, 63, 63,255, 58, 58, 58,255, 52, 52, 52,255, 46, 46, 46,255, - 40, 40, 40,255, 33, 33, 33,255, 24, 24, 24,255, 17, 17, 17,255, 13, 13, 13,204, 46, 46, 46,153, 95, 95, 95,255,107,107,107,255, -114,114,114,255,118,118,118,255,121,121,121,255,122,122,122,255,123,123,123,255,123,123,123,255,122,122,122,255,122,122,122,255, -120,120,120,255,118,118,118,255,114,114,114,255,110,110,110,255,106,106,106,255,101,101,101,255, 97, 97, 97,255, 92, 92, 92,255, - 87, 87, 87,255, 83, 83, 83,255, 78, 78, 78,255, 73, 73, 73,255, 68, 68, 68,255, 62, 62, 62,255, 56, 56, 56,255, 50, 50, 50,255, - 44, 44, 44,255, 36, 36, 36,255, 28, 28, 28,255, 19, 19, 19,255, 12, 12, 12,204, 47, 47, 47,153,101,101,101,255,113,113,113,255, -120,120,120,255,125,125,125,255,127,127,127,255,129,129,129,255,130,130,130,255,130,130,130,255,131,131,131,255,131,131,131,255, -131,131,131,255,129,129,129,255,125,125,125,255,120,120,120,255,113,113,113,255,108,108,108,255,103,103,103,255, 97, 97, 97,255, - 92, 92, 92,255, 87, 87, 87,255, 82, 82, 82,255, 77, 77, 77,255, 72, 72, 72,255, 66, 66, 66,255, 60, 60, 60,255, 54, 54, 54,255, - 47, 47, 47,255, 39, 39, 39,255, 31, 31, 31,255, 22, 22, 22,255, 12, 12, 12,204, 48, 48, 48,153,106,106,106,255,118,118,118,255, -126,126,126,255,131,131,131,255,134,134,134,255,135,135,135,255,137,137,137,255,138,138,138,255,142,142,142,255,147,147,147,255, -149,149,149,255,148,148,148,255,142,142,142,255,133,133,133,255,124,124,124,255,115,115,115,255,108,108,108,255,102,102,102,255, - 97, 97, 97,255, 92, 92, 92,255, 87, 87, 87,255, 81, 81, 81,255, 75, 75, 75,255, 69, 69, 69,255, 63, 63, 63,255, 57, 57, 57,255, - 49, 49, 49,255, 42, 42, 42,255, 33, 33, 33,255, 24, 24, 24,255, 9, 9, 9,153, 32, 32, 32,102,109,109,109,255,123,123,123,255, -131,131,131,255,136,136,136,255,140,140,140,255,142,142,142,255,144,144,144,255,148,148,148,255,156,156,156,255,168,168,168,255, -176,176,176,255,177,177,177,255,168,168,168,255,153,153,153,255,137,137,137,255,124,124,124,255,114,114,114,255,107,107,107,255, -101,101,101,255, 96, 96, 96,255, 90, 90, 90,255, 85, 85, 85,255, 79, 79, 79,255, 72, 72, 72,255, 66, 66, 66,255, 59, 59, 59,255, - 52, 52, 52,255, 44, 44, 44,255, 35, 35, 35,255, 26, 26, 26,255, 10, 10, 10,153, 17, 17, 17, 51,110,110,110,255,127,127,127,255, -136,136,136,255,142,142,142,255,145,145,145,255,148,148,148,255,151,151,151,255,159,159,159,255,174,174,174,255,195,195,195,255, -212,212,212,255,216,216,216,255,204,204,204,255,179,179,179,255,154,154,154,255,135,135,135,255,121,121,121,255,112,112,112,255, -106,106,106,255, 99, 99, 99,255, 94, 94, 94,255, 88, 88, 88,255, 82, 82, 82,255, 76, 76, 76,255, 69, 69, 69,255, 62, 62, 62,255, - 54, 54, 54,255, 46, 46, 46,255, 37, 37, 37,255, 26, 26, 26,255, 6, 6, 6,102, 0, 0, 0, 0,107,107,107,255,130,130,130,255, -140,140,140,255,146,146,146,255,150,150,150,255,153,153,153,255,158,158,158,255,169,169,169,255,191,191,191,255,219,219,219,255, -246,246,246,255,254,254,254,255,237,237,237,255,204,204,204,255,170,170,170,255,145,145,145,255,127,127,127,255,117,117,117,255, -110,110,110,255,103,103,103,255, 97, 97, 97,255, 91, 91, 91,255, 85, 85, 85,255, 78, 78, 78,255, 71, 71, 71,255, 64, 64, 64,255, - 55, 55, 55,255, 47, 47, 47,255, 37, 37, 37,255, 25, 25, 25,255, 3, 3, 3, 51, 0, 0, 0, 0, 65, 65, 65,153,129,129,129,255, -142,142,142,255,149,149,149,255,154,154,154,255,158,158,158,255,163,163,163,255,176,176,176,255,199,199,199,255,232,232,232,255, -255,255,255,255,255,255,255,255,255,255,255,255,220,220,220,255,181,181,181,255,151,151,151,255,132,132,132,255,121,121,121,255, -113,113,113,255,106,106,106,255,100,100,100,255, 94, 94, 94,255, 87, 87, 87,255, 80, 80, 80,255, 73, 73, 73,255, 65, 65, 65,255, - 57, 57, 57,255, 48, 48, 48,255, 38, 38, 38,255, 16, 16, 16,153, 0, 0, 0, 0, 0, 0, 0, 0, 21, 21, 21, 51,127,127,127,255, -143,143,143,255,152,152,152,255,157,157,157,255,161,161,161,255,165,165,165,255,177,177,177,255,198,198,198,255,227,227,227,255, -253,253,253,255,255,255,255,255,250,250,250,255,217,217,217,255,181,181,181,255,153,153,153,255,135,135,135,255,124,124,124,255, -117,117,117,255,110,110,110,255,103,103,103,255, 96, 96, 96,255, 89, 89, 89,255, 82, 82, 82,255, 74, 74, 74,255, 66, 66, 66,255, - 57, 57, 57,255, 48, 48, 48,255, 35, 35, 35,255, 10, 10, 10,153, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 93, 93, 93,204, -141,141,141,255,153,153,153,255,159,159,159,255,163,163,163,255,167,167,167,255,174,174,174,255,188,188,188,255,209,209,209,255, -228,228,228,255,234,234,234,255,224,224,224,255,200,200,200,255,173,173,173,255,151,151,151,255,136,136,136,255,127,127,127,255, -119,119,119,255,112,112,112,255,105,105,105,255, 98, 98, 98,255, 90, 90, 90,255, 83, 83, 83,255, 75, 75, 75,255, 66, 66, 66,255, - 57, 57, 57,255, 46, 46, 46,255, 24, 24, 24,204, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 20, 20, 51, -134,134,134,255,151,151,151,255,160,160,160,255,164,164,164,255,167,167,167,255,171,171,171,255,178,178,178,255,189,189,189,255, -200,200,200,255,202,202,202,255,195,195,195,255,180,180,180,255,163,163,163,255,148,148,148,255,137,137,137,255,129,129,129,255, -121,121,121,255,114,114,114,255,107,107,107,255, 99, 99, 99,255, 91, 91, 91,255, 83, 83, 83,255, 74, 74, 74,255, 65, 65, 65,255, - 55, 55, 55,255, 41, 41, 41,255, 7, 7, 7, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 49, 49, 49,102,145,145,145,255,157,157,157,255,164,164,164,255,167,167,167,255,170,170,170,255,172,172,172,255,176,176,176,255, -180,180,180,255,179,179,179,255,174,174,174,255,165,165,165,255,155,155,155,255,145,145,145,255,137,137,137,255,130,130,130,255, -122,122,122,255,115,115,115,255,107,107,107,255, 99, 99, 99,255, 91, 91, 91,255, 82, 82, 82,255, 73, 73, 73,255, 63, 63, 63,255, - 50, 50, 50,255, 22, 22, 22,153, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 78, 78, 78,153,149,149,149,255,160,160,160,255,166,166,166,255,168,168,168,255,169,169,169,255,170,170,170,255, -169,169,169,255,167,167,167,255,164,164,164,255,158,158,158,255,151,151,151,255,144,144,144,255,137,137,137,255,130,130,130,255, -123,123,123,255,115,115,115,255,106,106,106,255, 98, 98, 98,255, 89, 89, 89,255, 80, 80, 80,255, 70, 70, 70,255, 58, 58, 58,255, - 27, 27, 27,153, 3, 3, 3, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 80, 80, 80,153,150,150,150,255,160,160,160,255,165,165,165,255,167,167,167,255,167,167,167,255, -166,166,166,255,163,163,163,255,160,160,160,255,155,155,155,255,149,149,149,255,143,143,143,255,137,137,137,255,129,129,129,255, -121,121,121,255,113,113,113,255,105,105,105,255, 96, 96, 96,255, 86, 86, 86,255, 76, 76, 76,255, 63, 63, 63,255, 38, 38, 38,204, - 7, 7, 7, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 78, 78, 78,153,147,147,147,255,157,157,157,255,161,161,161,255,163,163,163,255, -162,162,162,255,160,160,160,255,157,157,157,255,152,152,152,255,147,147,147,255,141,141,141,255,135,135,135,255,127,127,127,255, -119,119,119,255,110,110,110,255,101,101,101,255, 91, 91, 91,255, 80, 80, 80,255, 66, 66, 66,255, 32, 32, 32,153, 7, 7, 7, 51, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,134,134,134,255,148,148,148,255,154,154,154,255, -155,155,155,255,154,154,154,255,152,152,152,255,147,147,147,255,142,142,142,255,136,136,136,255,130,130,130,255,122,122,122,255, -114,114,114,255,104,104,104,255, 93, 93, 93,255, 81, 81, 81,255, 54, 54, 54,204, 22, 22, 22,102, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 73, 73, 73,153,103,103,103,204, -137,137,137,255,140,140,140,255,140,140,140,255,137,137,137,255,133,133,133,255,127,127,127,255,120,120,120,255,113,113,113,255, -102,102,102,255, 91, 91, 91,255, 64, 64, 64,204, 28, 28, 28,102, 6, 6, 6, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 46, 46, 46,102, 72, 72, 72,153, 72, 72, 72,153, 92, 92, 92,204, 88, 88, 88,204, 81, 81, 81,204, 54, 54, 54,153, - 35, 35, 35,102, 16, 16, 16, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 69, 0, 0,168, 1, 0, 0, 8,123, 46, 5, - 0, 0, 0, 0, 33, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 84, 69, 84,101,120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 50, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 62, 0, 0,160, 64, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 64, 0, 0, 0, 64, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 32, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 7, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 8, 0, 0, 0, 1, 0, 1, 0, 3, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,205,204,204, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248,124, 46, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 40, 0, 0, 0,248,124, 46, 5, - 0, 0, 0, 0, 12, 0, 0, 0, 1, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, - 16, 0, 15, 0,104,125, 46, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 0, 16, 0, 0,104,125, 46, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -5948,9 +6011,51 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 77, 69, 0, 0,232, 4, 0, 0,136, 48,218, 3, 0, 0, 0, 0, 50, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 69, 67,117, 98,101, 0,112, +104,101,114,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 13,217, 3, 0, 0, 0, 0,200,218,208, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 56, 98,198, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136, 2,211, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,232,217, 3, 0, 0, 0, 0, + 24, 7,163, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184,122,209, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 53,218, 3, 0, 0, 0, 0, + 0, 0, 0, 0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255, 1, 0, 0, 0, 5, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,136, 56,218, 3, 0, 0, 0, 0,255,255,255,255,255,255,255,255,255,255,255,255, 0, 0, 0, 0, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 1, 0, 0, 0, 5, 0, 0, 0, + 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,156,173, 15, 0, 0, 0, 0, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 0, 0, 0, 0,255,255,255,255, 1, 0, 0, 0,255,255,255,255, +255,255,255,255, 2, 0, 0, 0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255, 3, 0, 0, 0, 5, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 56, 64,218, 3, 0, 0, 0, 0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 0, 0, 0, 0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 1, 0, 0, 0, 5, 0, 0, 0, + 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168, 61,218, 3, 0, 0, 0, 0, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255, 0, 0, 0, 0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255, 1, 0, 0, 0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255, 2, 0, 0, 0, 5, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 24, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 51, 0, 0, 0,180, 0, 0, 0, 0, 4, 0,128, 63, 4, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 67, 0, 30, 0, 6, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 8, 0, 0, 0, 24, 13,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,152, 7,218, 3, 0, 0, 0, 0, + 68, 65, 84, 65, 8, 2, 0, 0,248, 53,218, 3, 0, 0, 0, 0,124, 1, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,232,232,217, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -5964,8 +6069,16 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65,160, 0, 0, 0,232,232,217, 3, 0, 0, 0, 0, 56, 0, 0, 0, 8, 0, 0, 0, 0, 0,128, 63,255,255,127, 63, + 0, 0,128,191,230, 73,230, 73, 26,182, 1, 0, 0, 0,128, 63, 0, 0,128,191, 0, 0,128,191,230, 73, 26,182, 26,182, 1, 0, + 1, 0,128,191,253,255,127,191, 0, 0,128,191, 26,182, 26,182, 26,182, 1, 0,250,255,127,191, 3, 0,128, 63, 0, 0,128,191, + 26,182,230, 73, 26,182, 1, 0, 4, 0,128, 63,247,255,127, 63, 0, 0,128, 63,230, 73,230, 73,230, 73, 1, 0,245,255,127, 63, + 5, 0,128,191, 0, 0,128, 63,230, 73, 26,182,230, 73, 1, 0, 3, 0,128,191,250,255,127,191, 0, 0,128, 63, 26,182, 26,182, +230, 73, 1, 0,255,255,127,191, 0, 0,128, 63, 0, 0,128, 63, 26,182,230, 73,230, 73, 1, 0, 68, 65, 84, 65, 8, 2, 0, 0, +136, 56,218, 3, 0, 0, 0, 0,124, 1, 0, 0, 5, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 7,163, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -5978,76 +6091,61 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 69, 0, 0,232, 4, 0, 0, 8, 30, 47, 5, 0, 0, 0, 0, 50, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 77, 69, 67,117, 98,101, 0,112,104,101,114,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,144, 0, 0, 0, + 24, 7,163, 3, 0, 0, 0, 0, 53, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 35, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 35, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 35, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 35, 0, + 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 35, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 35, 0, 2, 0, 0, 0, 6, 0, 0, 0, + 0, 0, 35, 0, 3, 0, 0, 0, 7, 0, 0, 0, 0, 0, 35, 0, 4, 0, 0, 0, 5, 0, 0, 0, 0, 0, 35, 0, 4, 0, 0, 0, + 7, 0, 0, 0, 0, 0, 35, 0, 5, 0, 0, 0, 6, 0, 0, 0, 0, 0, 35, 0, 6, 0, 0, 0, 7, 0, 0, 0, 0, 0, 35, 0, + 68, 65, 84, 65, 8, 2, 0, 0, 72,156,173, 15, 0, 0, 0, 0,124, 1, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,184, 44, 47, 5, - 0, 0, 0, 0,152,131, 48, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120,134, 48, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 24, 30,139, 77,130,127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,136, 37, 47, 5, 0, 0, 0, 0,200, 40, 47, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 56, 35, 47, 5, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, -255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, -255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, -255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, -255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 1, 0, 0, 0, 5, 0, 0, 0, 24, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120, 38, 47, 5, 0, 0, 0, 0,255,255,255,255, -255,255,255,255,255,255,255,255, 0, 0, 0, 0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, -255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, -255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, -255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, -255,255,255,255, 1, 0, 0, 0, 5, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,184, 69,146, 77,130,127, 0, 0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, -255,255,255,255, 0, 0, 0, 0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, -255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, -255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, -255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 1, 0, 0, 0, 5, 0, 0, 0, 16, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40,132, 48, 5, 0, 0, 0, 0,255,255,255,255, -255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, -255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, -255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, - 0, 0, 0, 0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, -255,255,255,255, 1, 0, 0, 0, 5, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,136,135, 48, 5, 0, 0, 0, 0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, -255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, -255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 0, 0, 0, 0,255,255,255,255,255,255,255,255,255,255,255,255, -255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 1, 0, 0, 0,255,255,255,255,255,255,255,255, -255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 2, 0, 0, 0, 5, 0, 0, 0, 12, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 6, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 51, 0, 0, 0,180, 0, 0, 0, 0, 4, 0,128, 63, - 4, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 67, 0, 30, 0, 6, 0, 1, 0, 1, 0, - 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 8, 0, 0, 0,184, 44, 47, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0,168,212, 45, 5, 0, 0, 0, 0, 68, 65, 84, 65, 8, 2, 0, 0, 56, 35, 47, 5, 0, 0, 0, 0,125, 1, 0, 0, - 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72,205,203, 15, 0, 0, 0, 0, + 6, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 67,111,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +184,122,209, 15, 0, 0, 0, 0, 9, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,200,136,205, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,136, 37, 47, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 8, 2, 0, 0,168, 61,218, 3, 0, 0, 0, 0,124, 1, 0, 0, 5, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67,111,108, 0, 32, 70, 97, 99, +101, 45, 86,101,114,116,101,120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,136, 2,211, 3, 0, 0, 0, 0, + 26, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 78, 71,111,110, 32, 70, 97, 99,101, 45, 86,101,114,116,101,120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 56, 98,198, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,160, 0, 0, 0,136, 37, 47, 5, 0, 0, 0, 0, 56, 0, 0, 0, - 8, 0, 0, 0, 0, 0,128, 63,255,255,127, 63, 0, 0,128,191,230, 73,230, 73, 26,182, 1, 0, 0, 0,128, 63, 0, 0,128,191, - 0, 0,128,191,230, 73, 26,182, 26,182, 1, 0, 1, 0,128,191,253,255,127,191, 0, 0,128,191, 26,182, 26,182, 26,182, 1, 0, -250,255,127,191, 3, 0,128, 63, 0, 0,128,191, 26,182,230, 73, 26,182, 1, 0, 4, 0,128, 63,247,255,127, 63, 0, 0,128, 63, -230, 73,230, 73,230, 73, 1, 0,245,255,127, 63, 5, 0,128,191, 0, 0,128, 63,230, 73, 26,182,230, 73, 1, 0, 3, 0,128,191, -250,255,127,191, 0, 0,128, 63, 26,182, 26,182,230, 73, 1, 0,255,255,127,191, 0, 0,128, 63, 0, 0,128, 63, 26,182,230, 73, -230, 73, 1, 0, 68, 65, 84, 65, 8, 2, 0, 0,120, 38, 47, 5, 0, 0, 0, 0,125, 1, 0, 0, 5, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200, 40, 47, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 96, 0, 0, 0,136, 2,211, 3, 0, 0, 0, 0, 62, 0, 0, 0, 24, 0, 0, 0,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 68, 65, 84, 65,192, 0, 0, 0, + 56, 98,198, 3, 0, 0, 0, 0, 59, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, + 2, 0, 0, 0, 5, 0, 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 0, 9, 0, 0, 0, 7, 0, 0, 0, 11, 0, 0, 0, + 6, 0, 0, 0, 10, 0, 0, 0, 5, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 4, 0, 0, 0, 8, 0, 0, 0, + 5, 0, 0, 0, 4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 10, 0, 0, 0, + 6, 0, 0, 0, 6, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 2, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 11, 0, 0, 0, + 7, 0, 0, 0, 7, 0, 0, 0, 3, 0, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 3, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0, 9, 0, 0, 0, 68, 65, 84, 65, 8, 2, 0, 0, 56, 64,218, 3, 0, 0, 0, 0, +124, 1, 0, 0, 5, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 78, 71,111,110, 32, 70, 97, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,200,218,208, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -6059,17 +6157,26 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65,144, 0, 0, 0,200, 40, 47, 5, 0, 0, 0, 0, 53, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 35, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 35, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 35, 0, - 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 35, 0, 1, 0, 0, 0, 5, 0, 0, 0, 0, 0, 35, 0, 2, 0, 0, 0, 3, 0, 0, 0, - 0, 0, 35, 0, 2, 0, 0, 0, 6, 0, 0, 0, 0, 0, 35, 0, 3, 0, 0, 0, 7, 0, 0, 0, 0, 0, 35, 0, 4, 0, 0, 0, - 5, 0, 0, 0, 0, 0, 35, 0, 4, 0, 0, 0, 7, 0, 0, 0, 0, 0, 35, 0, 5, 0, 0, 0, 6, 0, 0, 0, 0, 0, 35, 0, - 6, 0, 0, 0, 7, 0, 0, 0, 0, 0, 35, 0, 68, 65, 84, 65, 8, 2, 0, 0,184, 69,146, 77,130,127, 0, 0,125, 1, 0, 0, - 5, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 67,111,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 72, 0, 0, 0,200,218,208, 3, 0, 0, 0, 0, + 58, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 2, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 2, 0, + 8, 0, 0, 0, 4, 0, 0, 0, 0, 0, 2, 0, 12, 0, 0, 0, 4, 0, 0, 0, 0, 0, 2, 0, 16, 0, 0, 0, 4, 0, 0, 0, + 0, 0, 2, 0, 20, 0, 0, 0, 4, 0, 0, 0, 0, 0, 2, 0, 66, 82, 0, 0, 88, 6, 0, 0,200, 66,218, 3, 0, 0, 0, 0, +123, 1, 0, 0, 1, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 65,100,100, 0,104, 46, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,104, 75,218, 3, 0, 0, 0, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -6081,14 +6188,8 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 8, 2, 0, 0,136,135, 48, 5, 0, 0, 0, 0,125, 1, 0, 0, - 5, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 67,111,108, 0, 32, 70, 97, 99,101, 45, 86,101,114,116,101,120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 24, 30,139, 77,130,127, 0, 0, 26, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 78, 71,111,110, 32, 70, 97, 99,101, 45, 86,101,114,116,101,120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,120,134, 48, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -6098,21 +6199,7 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 96, 0, 0, 0, 24, 30,139, 77,130,127, 0, 0, 62, 0, 0, 0, - 24, 0, 0, 0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, -255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, -255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, -255,255,255,255, 68, 65, 84, 65,192, 0, 0, 0,120,134, 48, 5, 0, 0, 0, 0, 59, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 2, 0, 0, 0, 5, 0, 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 0, - 9, 0, 0, 0, 7, 0, 0, 0, 11, 0, 0, 0, 6, 0, 0, 0, 10, 0, 0, 0, 5, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, - 2, 0, 0, 0, 4, 0, 0, 0, 8, 0, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, - 4, 0, 0, 0, 5, 0, 0, 0, 10, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 2, 0, 0, 0, - 6, 0, 0, 0, 6, 0, 0, 0, 11, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0, 3, 0, 0, 0, 5, 0, 0, 0, 4, 0, 0, 0, - 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, 7, 0, 0, 0, 9, 0, 0, 0, 68, 65, 84, 65, - 8, 2, 0, 0, 40,132, 48, 5, 0, 0, 0, 0,125, 1, 0, 0, 5, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 78, 71,111,110, 32, 70, 97, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,152,131, 48, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -6122,29 +6209,49 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 35, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, + 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 56, 1, 0, 0, 96, 67,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,104, 75,218, 3, 0, 0, 0, 0, +119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, + 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191, 54,189,194, 61, 14,215,126,191, 46,189,194, 61,248,121,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 72, 0, 0, 0,152,131, 48, 5, 0, 0, 0, 0, 58, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 2, 0, - 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 2, 0, 8, 0, 0, 0, 4, 0, 0, 0, 0, 0, 2, 0, 12, 0, 0, 0, 4, 0, 0, 0, - 0, 0, 2, 0, 16, 0, 0, 0, 4, 0, 0, 0, 0, 0, 2, 0, 20, 0, 0, 0, 4, 0, 0, 0, 0, 0, 2, 0, 66, 82, 0, 0, - 88, 6, 0, 0, 8, 45, 47, 5, 0, 0, 0, 0,124, 1, 0, 0, 1, 0, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 65,100,100, 0,104, 46, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 12, 3, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 0, 40, 53, 47, 5, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,248,121,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62, 31,133,107, 63, 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, +123, 1, 0, 0, 1, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0,200, 66,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 66,108,111, 98, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 13, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 8, 84,218, 3, 0, 0, 0, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -6176,50 +6283,50 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 35, 0, 0, 0, - 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0,160, 45, 47, 5, 0, 0, 0, 0, 25, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0, + 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 0, 0,128, 63, + 68, 65, 84, 65, 56, 1, 0, 0,192, 77,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, - 64, 1, 0, 0, 40, 53, 47, 5, 0, 0, 0, 0,120, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191, 54,189,194, 61, 14,215,126,191, - 46,189,194, 61,184, 54, 47, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 8, 84,218, 3, 0, 0, 0, 0, +119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, + 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186,168,122,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,184, 54, 47, 5, - 0, 0, 0, 0,118, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62, 31,133,107, 63, - 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, - 88, 6, 0, 0, 56, 55, 47, 5, 0, 0, 0, 0,124, 1, 0, 0, 1, 0, 0, 0,232, 63, 47, 5, 0, 0, 0, 0, 8, 45, 47, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 66,108,111, 98, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 0,216, 61, 47, 5, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,168,122,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,200, 85,218, 3, 0, 0, 0, 0, +123, 1, 0, 0, 1, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 40, 77,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 66,108,117,114, 0, 46, 48, 48, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,168, 92,218, 3, 0, 0, 0, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -6251,50 +6358,50 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, - 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 20,174,199, 62, 20,174,199, 62, - 20,174,199, 62, 20,174,199, 62, 0, 0,128, 63, 68, 65, 84, 65, 56, 1, 0, 0,208, 55, 47, 5, 0, 0, 0, 0, 25, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 35, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, + 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 56, 1, 0, 0, 96, 86,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, - 64, 1, 0, 0,216, 61, 47, 5, 0, 0, 0, 0,120, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191, -114, 97,255,186,104, 63, 47, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,168, 92,218, 3, 0, 0, 0, 0, +119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, + 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191, 54,189,194, 61, 14,215,126,191, 46,189,194, 61, 88,123,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,104, 63, 47, 5, - 0, 0, 0, 0,118, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, - 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, - 88, 6, 0, 0,232, 63, 47, 5, 0, 0, 0, 0,124, 1, 0, 0, 1, 0, 0, 0,152, 72, 47, 5, 0, 0, 0, 0, 56, 55, 47, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 66,108,117,114, 0, 46, 48, 48, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 14, 3, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 0,136, 70, 47, 5, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0, 88,123,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62, 31,133,107, 63, 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,104, 94,218, 3, 0, 0, 0, 0, +123, 1, 0, 0, 1, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0,200, 85,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 66,114,117,115,104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 31, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 72,101,218, 3, 0, 0, 0, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -6326,50 +6433,50 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 35, 0, 0, 0, - 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0, 0, 0, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0,128, 64, 47, 5, 0, 0, 0, 0, 25, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 35, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0, + 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 0, 0,128, 63, + 68, 65, 84, 65, 56, 1, 0, 0, 0, 95,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, - 64, 1, 0, 0,136, 70, 47, 5, 0, 0, 0, 0,120, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191, 54,189,194, 61, 14,215,126,191, - 46,189,194, 61, 24, 72, 47, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 72,101,218, 3, 0, 0, 0, 0, +119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, + 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186, 8,124,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0, 24, 72, 47, 5, - 0, 0, 0, 0,118, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62, 31,133,107, 63, - 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, - 88, 6, 0, 0,152, 72, 47, 5, 0, 0, 0, 0,124, 1, 0, 0, 1, 0, 0, 0, 72, 81, 47, 5, 0, 0, 0, 0,232, 63, 47, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 66,114,117,115,104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 25, 3, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 0, 56, 79, 47, 5, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0, 8,124,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0, 8,103,218, 3, 0, 0, 0, 0, +123, 1, 0, 0, 1, 0, 0, 0,168,205,210, 3, 0, 0, 0, 0,104, 94,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 67,108, 97,121, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 15, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,232,109,218, 3, 0, 0, 0, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -6401,50 +6508,50 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 35, 0, 0, 0, - 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 20,174,199, 62, 20,174,199, 62, - 20,174,199, 62, 20,174,199, 62, 0, 0,128, 63, 68, 65, 84, 65, 56, 1, 0, 0, 48, 73, 47, 5, 0, 0, 0, 0, 25, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, 4, 4, 4, 8, 0, 0, 0, 0, 10, 0, 0, 0, + 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 0, 0,128, 63, + 68, 65, 84, 65, 56, 1, 0, 0,160,103,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, - 64, 1, 0, 0, 56, 79, 47, 5, 0, 0, 0, 0,120, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191, -114, 97,255,186,200, 80, 47, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,232,109,218, 3, 0, 0, 0, 0, +119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, + 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186,184,124,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,200, 80, 47, 5, - 0, 0, 0, 0,118, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, - 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, - 88, 6, 0, 0, 72, 81, 47, 5, 0, 0, 0, 0,124, 1, 0, 0, 1, 0, 0, 0,248, 89, 47, 5, 0, 0, 0, 0,152, 72, 47, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 67,108, 97,121, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 0,232, 87, 47, 5, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,184,124,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,168,205,210, 3, 0, 0, 0, 0, +123, 1, 0, 0, 1, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 8,103,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 67,108, 97,121, 32, 83,116,114,105,112,115, 0, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 3, 16, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 24,114,219, 3, 0, 0, 0, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -6476,50 +6583,50 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, - 4, 4, 4, 8, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 20,174,199, 62, 20,174,199, 62, - 20,174,199, 62, 20,174,199, 62, 0, 0,128, 63, 68, 65, 84, 65, 56, 1, 0, 0,224, 81, 47, 5, 0, 0, 0, 0, 25, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0, + 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, + 33, 0, 0, 0,160,119, 78, 63, 0, 0,128, 63, 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 0, 0,128, 63, + 68, 65, 84, 65, 56, 1, 0, 0, 64,206,210, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, - 64, 1, 0, 0,232, 87, 47, 5, 0, 0, 0, 0,120, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191, -114, 97,255,186,120, 89, 47, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 24,114,219, 3, 0, 0, 0, 0, +119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, + 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186,152, 62,171, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,120, 89, 47, 5, - 0, 0, 0, 0,118, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, - 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, - 88, 6, 0, 0,248, 89, 47, 5, 0, 0, 0, 0,124, 1, 0, 0, 1, 0, 0, 0,168, 98, 47, 5, 0, 0, 0, 0, 72, 81, 47, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 67,108,111,110,101, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 0,152, 96, 47, 5, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,152, 62,171, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,168,111,218, 3, 0, 0, 0, 0, +123, 1, 0, 0, 1, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0,168,205,210, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 67,108,111,110,101, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,136,118,218, 3, 0, 0, 0, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -6551,50 +6658,50 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 35, 0, 0, 0, - 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 51, 51, 51, 63, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0,144, 90, 47, 5, 0, 0, 0, 0, 25, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 35, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, + 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 51, 51, 51, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 56, 1, 0, 0, 64,112,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, - 64, 1, 0, 0,152, 96, 47, 5, 0, 0, 0, 0,120, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191, 54,189,194, 61, 14,215,126,191, - 46,189,194, 61, 40, 98, 47, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,136,118,218, 3, 0, 0, 0, 0, +119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, + 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191, 54,189,194, 61, 14,215,126,191, 46,189,194, 61,104,125,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0, 40, 98, 47, 5, - 0, 0, 0, 0,118, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62, 31,133,107, 63, - 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, - 88, 6, 0, 0,168, 98, 47, 5, 0, 0, 0, 0,124, 1, 0, 0, 1, 0, 0, 0, 88,107, 47, 5, 0, 0, 0, 0,248, 89, 47, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 67,114,101, 97,115,101, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 0, 72,105, 47, 5, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,104,125,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62, 31,133,107, 63, 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0, 72,120,218, 3, 0, 0, 0, 0, +123, 1, 0, 0, 1, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0,168,111,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 67,114,101, 97,115,101, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 18, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 40,127,218, 3, 0, 0, 0, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -6626,50 +6733,50 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, - 4, 6, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 62, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 20,174,199, 62, 20,174,199, 62, - 20,174,199, 62, 20,174,199, 62, 0, 0,128, 63, 68, 65, 84, 65, 56, 1, 0, 0, 64, 99, 47, 5, 0, 0, 0, 0, 25, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, 4, 6, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0, + 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 62, 0, 0, 0, 0, + 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 0, 0,128, 63, + 68, 65, 84, 65, 56, 1, 0, 0,224,120,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, - 64, 1, 0, 0, 72,105, 47, 5, 0, 0, 0, 0,120, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, - 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,228, 97,175,190, 50,131,112, 63,218,243,127,191, - 10,183,157,188,216,106, 47, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 40,127,218, 3, 0, 0, 0, 0, +119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, + 0, 0, 0, 0, 0, 0,128, 63,228, 97,175,190, 50,131,112, 63,218,243,127,191, 10,183,157,188, 24,126,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,216,106, 47, 5, - 0, 0, 0, 0,118, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62, 0, 0, 0, 63, - 0, 0, 0, 0, 0, 0, 64, 63, 10,215, 35, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, - 88, 6, 0, 0, 88,107, 47, 5, 0, 0, 0, 0,124, 1, 0, 0, 1, 0, 0, 0, 8,116, 47, 5, 0, 0, 0, 0,168, 98, 47, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 68, 97,114,107,101,110, 0, 48, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 18, 3, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 0,248,113, 47, 5, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0, 24,126,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 64, 63, 10,215, 35, 61, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,232,128,218, 3, 0, 0, 0, 0, +123, 1, 0, 0, 1, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 72,120,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 68, 97,114,107,101,110, 0, 48, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,200,135,218, 3, 0, 0, 0, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -6701,50 +6808,50 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 35, 0, 0, 0, - 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0, 0, 0, 1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0,240,107, 47, 5, 0, 0, 0, 0, 25, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 35, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, + 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 56, 1, 0, 0,128,129,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, - 64, 1, 0, 0,248,113, 47, 5, 0, 0, 0, 0,120, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191, 54,189,194, 61, 14,215,126,191, - 46,189,194, 61,136,115, 47, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,200,135,218, 3, 0, 0, 0, 0, +119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, + 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191, 54,189,194, 61, 14,215,126,191, 46,189,194, 61,200,126,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,136,115, 47, 5, - 0, 0, 0, 0,118, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62, 31,133,107, 63, - 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, - 88, 6, 0, 0, 8,116, 47, 5, 0, 0, 0, 0,124, 1, 0, 0, 1, 0, 0, 0,184,124, 47, 5, 0, 0, 0, 0, 88,107, 47, 5, - 0, 0, 0, 0, 0, 20, 1,160,255,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 68,114, 97,119, 0, 46, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 2, 25, 3, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 0,168,122, 47, 5, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,200,126,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62, 31,133,107, 63, 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,136,137,218, 3, 0, 0, 0, 0, +123, 1, 0, 0, 1, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0,232,128,218, 3, 0, 0, 0, 0, 0, 20, 1,160,255,255,255,255, + 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 68,114, 97,119, 0, 46, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 2, 31, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 88,146,218, 3, 0, 0, 0, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -6776,50 +6883,50 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 35, 0, 0, 0, - 0, 4, 0, 8, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 20,174,199, 62, 20,174,199, 62, - 20,174,199, 62, 20,174,199, 62, 0, 0,128, 63, 68, 65, 84, 65, 56, 1, 0, 0,160,116, 47, 5, 0, 0, 0, 0, 25, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 35, 0, 0, 0, 0, 4, 0, 8, 0, 0, 0, 0, 10, 0, 0, 0, + 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 0, 0,128, 63, + 68, 65, 84, 65, 56, 1, 0, 0, 32,138,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, - 64, 1, 0, 0,168,122, 47, 5, 0, 0, 0, 0,120, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191, -114, 97,255,186, 56,124, 47, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 88,146,218, 3, 0, 0, 0, 0, +119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, + 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186,120,127,216, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0, 56,124, 47, 5, - 0, 0, 0, 0,118, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, - 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, - 88, 6, 0, 0,184,124, 47, 5, 0, 0, 0, 0,124, 1, 0, 0, 1, 0, 0, 0,104,133, 47, 5, 0, 0, 0, 0, 8,116, 47, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 70,105,108,108, 47, 68,101,101,112,101, -110, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 0, 88,131, 47, 5, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,120,127,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,104,176,218, 3, 0, 0, 0, 0, +123, 1, 0, 0, 1, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0,136,137,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 70,105,108,108, 47, 68,101,101,112,101,110, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 20, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 24,148,218, 3, 0, 0, 0, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -6851,50 +6958,50 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, - 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 20,174,199, 62, - 0, 0,128, 62, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 56, 1, 0, 0, 80,125, 47, 5, 0, 0, 0, 0, 25, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0, + 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 20,174,199, 62, 0, 0,128, 62, 0, 0,128, 63, 0, 0,128, 63, + 68, 65, 84, 65, 56, 1, 0, 0, 0,177,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, - 64, 1, 0, 0, 88,131, 47, 5, 0, 0, 0, 0,120, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191, -114, 97,255,186,232,132, 47, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 24,148,218, 3, 0, 0, 0, 0, +119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, + 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186, 40,128,216, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,232,132, 47, 5, - 0, 0, 0, 0,118, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, - 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, - 88, 6, 0, 0,104,133, 47, 5, 0, 0, 0, 0,124, 1, 0, 0, 1, 0, 0, 0, 24,142, 47, 5, 0, 0, 0, 0,184,124, 47, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 70,108, 97,116,116,101,110, 47, 67,111, -110,116,114, 97,115,116, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 0, 8,140, 47, 5, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0, 40,128,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0, 72,183,218, 3, 0, 0, 0, 0, +123, 1, 0, 0, 1, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0,104,176,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 70,108, 97,116,116,101,110, 47, 67,111,110,116,114, 97,115,116, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 21, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,216,149,218, 3, 0, 0, 0, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -6926,50 +7033,50 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, - 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 20,174,199, 62, - 0, 0,128, 62, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 56, 1, 0, 0, 0,134, 47, 5, 0, 0, 0, 0, 25, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0, + 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 20,174,199, 62, 0, 0,128, 62, 0, 0,128, 63, 0, 0,128, 63, + 68, 65, 84, 65, 56, 1, 0, 0,224,183,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, - 64, 1, 0, 0, 8,140, 47, 5, 0, 0, 0, 0,120, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191, -114, 97,255,186,152,141, 47, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,216,149,218, 3, 0, 0, 0, 0, +119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, + 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186,216,128,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,152,141, 47, 5, - 0, 0, 0, 0,118, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, - 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, - 88, 6, 0, 0, 24,142, 47, 5, 0, 0, 0, 0,124, 1, 0, 0, 1, 0, 0, 0,200,150, 47, 5, 0, 0, 0, 0,104,133, 47, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 71,114, 97, 98, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 0,184,148, 47, 5, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,216,128,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0, 40,190,218, 3, 0, 0, 0, 0, +123, 1, 0, 0, 1, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 72,183,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 71,114, 97, 98, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 22, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,152,151,218, 3, 0, 0, 0, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -7001,50 +7108,50 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 75, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 62, 0, 0,128, 63, 0, 0,128, 62, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0,176,142, 47, 5, 0, 0, 0, 0, 25, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, + 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, + 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 62, 0, 0,128, 63, 0, 0,128, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 56, 1, 0, 0,192,190,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, - 64, 1, 0, 0,184,148, 47, 5, 0, 0, 0, 0,120, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191, -114, 97,255,186, 72,150, 47, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,152,151,218, 3, 0, 0, 0, 0, +119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, + 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186,136,129,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0, 72,150, 47, 5, - 0, 0, 0, 0,118, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, - 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, - 88, 6, 0, 0,200,150, 47, 5, 0, 0, 0, 0,124, 1, 0, 0, 1, 0, 0, 0,120,159, 47, 5, 0, 0, 0, 0, 24,142, 47, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 73,110,102,108, 97,116,101, 47, 68,101, -102,108, 97,116,101, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 0,104,157, 47, 5, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,136,129,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0, 8,197,218, 3, 0, 0, 0, 0, +123, 1, 0, 0, 1, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 40,190,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 73,110,102,108, 97,116,101, 47, 68,101,102,108, 97,116,101, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 23, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 88,153,218, 3, 0, 0, 0, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -7076,50 +7183,50 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, - 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0, 64, 63, 0, 0, 64, 63, 0, 0, 64, 63, - 0, 0,128, 62, 0, 0,128, 62, 0, 0,128, 62, 68, 65, 84, 65, 56, 1, 0, 0, 96,151, 47, 5, 0, 0, 0, 0, 25, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0, + 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 0, 0, 62, 0, 0, 64, 63, 0, 0, 64, 63, 0, 0, 64, 63, 0, 0,128, 62, 0, 0,128, 62, 0, 0,128, 62, + 68, 65, 84, 65, 56, 1, 0, 0,160,197,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, - 64, 1, 0, 0,104,157, 47, 5, 0, 0, 0, 0,120, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191, -114, 97,255,186,248,158, 47, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 88,153,218, 3, 0, 0, 0, 0, +119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, + 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186, 56,130,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,248,158, 47, 5, - 0, 0, 0, 0,118, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, - 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, - 88, 6, 0, 0,120,159, 47, 5, 0, 0, 0, 0,124, 1, 0, 0, 1, 0, 0, 0, 40,168, 47, 5, 0, 0, 0, 0,200,150, 47, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 76, 97,121,101,114, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 0, 24,166, 47, 5, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0, 56,130,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,232,203,218, 3, 0, 0, 0, 0, +123, 1, 0, 0, 1, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 8,197,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 76, 97,121,101,114, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 24, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 24,155,218, 3, 0, 0, 0, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -7151,50 +7258,50 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, - 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 20,174,199, 62, 20,174,199, 62, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0, 16,160, 47, 5, 0, 0, 0, 0, 25, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0, + 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 20,174,199, 62, 20,174,199, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 56, 1, 0, 0,128,204,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, - 64, 1, 0, 0, 24,166, 47, 5, 0, 0, 0, 0,120, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191, -114, 97,255,186,168,167, 47, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 24,155,218, 3, 0, 0, 0, 0, +119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, + 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186,232,130,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,168,167, 47, 5, - 0, 0, 0, 0,118, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, - 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, - 88, 6, 0, 0, 40,168, 47, 5, 0, 0, 0, 0,124, 1, 0, 0, 1, 0, 0, 0,216,176, 47, 5, 0, 0, 0, 0,120,159, 47, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 76,105,103,104,116,101,110, 0, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 24, 3, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 0,200,174, 47, 5, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,232,130,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,200,210,218, 3, 0, 0, 0, 0, +123, 1, 0, 0, 1, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0,232,203,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 76,105,103,104,116,101,110, 0, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,216,156,218, 3, 0, 0, 0, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -7226,50 +7333,50 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 35, 0, 0, 0, - 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0, 0, 0, 1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0,192,168, 47, 5, 0, 0, 0, 0, 25, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 35, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, + 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 56, 1, 0, 0, 96,211,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, - 64, 1, 0, 0,200,174, 47, 5, 0, 0, 0, 0,120, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191, 54,189,194, 61, 14,215,126,191, - 46,189,194, 61, 88,176, 47, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,216,156,218, 3, 0, 0, 0, 0, +119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, + 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191, 54,189,194, 61, 14,215,126,191, 46,189,194, 61,152,131,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0, 88,176, 47, 5, - 0, 0, 0, 0,118, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62, 31,133,107, 63, - 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, - 88, 6, 0, 0,216,176, 47, 5, 0, 0, 0, 0,124, 1, 0, 0, 1, 0, 0, 0,136,185, 47, 5, 0, 0, 0, 0, 40,168, 47, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 77,105,120, 0,104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 25, 3, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 0,120,183, 47, 5, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,152,131,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62, 31,133,107, 63, 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,168,217,218, 3, 0, 0, 0, 0, +123, 1, 0, 0, 1, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0,200,210,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 77,105,120, 0,104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,152,158,218, 3, 0, 0, 0, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -7301,50 +7408,50 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 35, 0, 0, 0, - 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 51, 51, 51, 63, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0,112,177, 47, 5, 0, 0, 0, 0, 25, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 35, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, + 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 51, 51, 51, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 56, 1, 0, 0, 64,218,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, - 64, 1, 0, 0,120,183, 47, 5, 0, 0, 0, 0,120, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191, 54,189,194, 61, 14,215,126,191, - 46,189,194, 61, 8,185, 47, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,152,158,218, 3, 0, 0, 0, 0, +119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, + 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191, 54,189,194, 61, 14,215,126,191, 46,189,194, 61, 72,132,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0, 8,185, 47, 5, - 0, 0, 0, 0,118, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62, 31,133,107, 63, - 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, - 88, 6, 0, 0,136,185, 47, 5, 0, 0, 0, 0,124, 1, 0, 0, 1, 0, 0, 0, 56,194, 47, 5, 0, 0, 0, 0,216,176, 47, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 77,117,108,116,105,112,108,121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 26, 3, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 0, 40,192, 47, 5, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0, 72,132,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62, 31,133,107, 63, 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,136,224,218, 3, 0, 0, 0, 0, +123, 1, 0, 0, 1, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0,168,217,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 77,117,108,116,105,112,108,121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 88,160,218, 3, 0, 0, 0, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -7376,50 +7483,50 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 35, 0, 0, 0, - 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0, 32,186, 47, 5, 0, 0, 0, 0, 25, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 35, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, + 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 56, 1, 0, 0, 32,225,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, - 64, 1, 0, 0, 40,192, 47, 5, 0, 0, 0, 0,120, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191, 54,189,194, 61, 14,215,126,191, - 46,189,194, 61,184,193, 47, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 88,160,218, 3, 0, 0, 0, 0, +119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, + 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191, 54,189,194, 61, 14,215,126,191, 46,189,194, 61,248,132,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,184,193, 47, 5, - 0, 0, 0, 0,118, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62, 31,133,107, 63, - 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, - 88, 6, 0, 0, 56,194, 47, 5, 0, 0, 0, 0,124, 1, 0, 0, 1, 0, 0, 0,232,202, 47, 5, 0, 0, 0, 0,136,185, 47, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 78,117,100,103,101, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 0,216,200, 47, 5, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,248,132,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62, 31,133,107, 63, 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,184,212,210, 3, 0, 0, 0, 0, +123, 1, 0, 0, 1, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0,136,224,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 78,117,100,103,101, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 28, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 24,162,218, 3, 0, 0, 0, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -7451,50 +7558,50 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, - 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 62, 0, 0,128, 63, 0, 0,128, 62, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0,208,194, 47, 5, 0, 0, 0, 0, 25, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0, + 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 62, 0, 0,128, 63, 0, 0,128, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 56, 1, 0, 0, 80,213,210, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, - 64, 1, 0, 0,216,200, 47, 5, 0, 0, 0, 0,120, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191, -114, 97,255,186,104,202, 47, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 24,162,218, 3, 0, 0, 0, 0, +119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, + 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186,168,133,216, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,104,202, 47, 5, - 0, 0, 0, 0,118, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, - 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, - 88, 6, 0, 0,232,202, 47, 5, 0, 0, 0, 0,124, 1, 0, 0, 1, 0, 0, 0,152,211, 47, 5, 0, 0, 0, 0, 56,194, 47, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 80,105,110, 99,104, 47, 77, 97,103,110, -105,102,121, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 25, 3, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 0,136,209, 47, 5, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,168,133,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,200,219,210, 3, 0, 0, 0, 0, +123, 1, 0, 0, 1, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0,184,212,210, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 80,105,110, 99,104, 47, 77, 97,103,110,105,102,121, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 29, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,216,163,218, 3, 0, 0, 0, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -7526,50 +7633,50 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, - 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0, 64, 63, 0, 0, 64, 63, 0, 0, 64, 63, - 0, 0,128, 62, 0, 0,128, 62, 0, 0,128, 62, 68, 65, 84, 65, 56, 1, 0, 0,128,203, 47, 5, 0, 0, 0, 0, 25, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0, + 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 0, 0, 62, 0, 0, 64, 63, 0, 0, 64, 63, 0, 0, 64, 63, 0, 0,128, 62, 0, 0,128, 62, 0, 0,128, 62, + 68, 65, 84, 65, 56, 1, 0, 0, 96,220,210, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, - 64, 1, 0, 0,136,209, 47, 5, 0, 0, 0, 0,120, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191, -114, 97,255,186, 24,211, 47, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,216,163,218, 3, 0, 0, 0, 0, +119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, + 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186, 88,134,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0, 24,211, 47, 5, - 0, 0, 0, 0,118, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, - 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, - 88, 6, 0, 0,152,211, 47, 5, 0, 0, 0, 0,124, 1, 0, 0, 1, 0, 0, 0, 72,220, 47, 5, 0, 0, 0, 0,232,202, 47, 5, - 0, 0, 0, 0,253, 21,192, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 80,111,108,105,115,104, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 0, 56,218, 47, 5, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0, 88,134,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,216,226,210, 3, 0, 0, 0, 0, +123, 1, 0, 0, 1, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0,200,219,210, 3, 0, 0, 0, 0,253, 21,192, 32, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 80,111,108,105,115,104, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 21, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,152,165,218, 3, 0, 0, 0, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -7601,50 +7708,50 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, - 4, 4, 4, 1, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 63, - 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 20,174,199, 62, - 0, 0,128, 62, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 56, 1, 0, 0, 48,212, 47, 5, 0, 0, 0, 0, 25, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, 4, 4, 4, 1, 0, 0, 0, 0, 10, 0, 0, 0, + 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 20,174,199, 62, 0, 0,128, 62, 0, 0,128, 63, 0, 0,128, 63, + 68, 65, 84, 65, 56, 1, 0, 0,112,227,210, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, - 64, 1, 0, 0, 56,218, 47, 5, 0, 0, 0, 0,120, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191, -114, 97,255,186,200,219, 47, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,152,165,218, 3, 0, 0, 0, 0, +119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, + 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186, 8,135,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,200,219, 47, 5, - 0, 0, 0, 0,118, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, - 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, - 88, 6, 0, 0, 72,220, 47, 5, 0, 0, 0, 0,124, 1, 0, 0, 1, 0, 0, 0,248,228, 47, 5, 0, 0, 0, 0,152,211, 47, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 83, 99,114, 97,112,101, 47, 80,101, 97, -107,115, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 0,232,226, 47, 5, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0, 8,135,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,232,233,210, 3, 0, 0, 0, 0, +123, 1, 0, 0, 1, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0,216,226,210, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 83, 99,114, 97,112,101, 47, 80,101, 97,107,115, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 30, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 88,167,218, 3, 0, 0, 0, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -7676,50 +7783,50 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, - 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 20,174,199, 62, - 0, 0,128, 62, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 56, 1, 0, 0,224,220, 47, 5, 0, 0, 0, 0, 25, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0, + 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 20,174,199, 62, 0, 0,128, 62, 0, 0,128, 63, 0, 0,128, 63, + 68, 65, 84, 65, 56, 1, 0, 0,128,234,210, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, - 64, 1, 0, 0,232,226, 47, 5, 0, 0, 0, 0,120, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191, -114, 97,255,186,120,228, 47, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 88,167,218, 3, 0, 0, 0, 0, +119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, + 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186,184,135,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,120,228, 47, 5, - 0, 0, 0, 0,118, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, - 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, - 88, 6, 0, 0,248,228, 47, 5, 0, 0, 0, 0,124, 1, 0, 0, 1, 0, 0, 0,168,237, 47, 5, 0, 0, 0, 0, 72,220, 47, 5, - 0, 0, 0, 0, 12,215, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 83, 99,117,108,112,116, 68,114, 97,119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 3, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 0,152,235, 47, 5, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,184,135,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,248,240,210, 3, 0, 0, 0, 0, +123, 1, 0, 0, 1, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0,232,233,210, 3, 0, 0, 0, 0,168,205,210, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 83, 99,117,108,112,116, 68,114, 97,119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 3, 31, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 24,169,218, 3, 0, 0, 0, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -7751,50 +7858,50 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, - 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0,160,119, 78, 63, 0, 0,128, 63, 20,174,199, 62, 20,174,199, 62, - 20,174,199, 62, 20,174,199, 62, 0, 0,128, 63, 68, 65, 84, 65, 56, 1, 0, 0,144,229, 47, 5, 0, 0, 0, 0, 25, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 10, 0, 0, 0, + 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, + 33, 0, 0, 0,160,119, 78, 63, 0, 0,128, 63, 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 20,174,199, 62, 0, 0,128, 63, + 68, 65, 84, 65, 56, 1, 0, 0,144,241,210, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, - 64, 1, 0, 0,152,235, 47, 5, 0, 0, 0, 0,120, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191, -114, 97,255,186, 40,237, 47, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 24,169,218, 3, 0, 0, 0, 0, +119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, + 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186,104,136,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0, 40,237, 47, 5, - 0, 0, 0, 0,118, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, - 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, - 88, 6, 0, 0,168,237, 47, 5, 0, 0, 0, 0,124, 1, 0, 0, 1, 0, 0, 0, 88,246, 47, 5, 0, 0, 0, 0,248,228, 47, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 83,109,101, 97,114, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 0, 72,244, 47, 5, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,104,136,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,152,231,218, 3, 0, 0, 0, 0, +123, 1, 0, 0, 1, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0,248,240,210, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 83,109,101, 97,114, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,216,170,218, 3, 0, 0, 0, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -7826,50 +7933,50 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 35, 0, 0, 0, - 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0, 64,238, 47, 5, 0, 0, 0, 0, 25, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 35, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, + 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 56, 1, 0, 0, 48,232,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, - 64, 1, 0, 0, 72,244, 47, 5, 0, 0, 0, 0,120, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191, 54,189,194, 61, 14,215,126,191, - 46,189,194, 61,216,245, 47, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,216,170,218, 3, 0, 0, 0, 0, +119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, + 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191, 54,189,194, 61, 14,215,126,191, 46,189,194, 61, 24,137,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,216,245, 47, 5, - 0, 0, 0, 0,118, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62, 31,133,107, 63, - 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, - 88, 6, 0, 0, 88,246, 47, 5, 0, 0, 0, 0,124, 1, 0, 0, 1, 0, 0, 0, 8,255, 47, 5, 0, 0, 0, 0,168,237, 47, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 83,109,111,111,116,104, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 0,248,252, 47, 5, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0, 24,137,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62, 31,133,107, 63, 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,168,238,218, 3, 0, 0, 0, 0, +123, 1, 0, 0, 1, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0,152,231,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 83,109,111,111,116,104, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 33, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,152,172,218, 3, 0, 0, 0, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -7901,50 +8008,50 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, - 4, 4, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0, 64, 63, 0, 0, 64, 63, 0, 0, 64, 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0,240,246, 47, 5, 0, 0, 0, 0, 25, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 35, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, + 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 0, 0, 62, 0, 0, 64, 63, 0, 0, 64, 63, 0, 0, 64, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 56, 1, 0, 0, 64,239,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, - 64, 1, 0, 0,248,252, 47, 5, 0, 0, 0, 0,120, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191, -114, 97,255,186,136,254, 47, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,152,172,218, 3, 0, 0, 0, 0, +119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, + 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186,200,137,216, 3, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,136,254, 47, 5, - 0, 0, 0, 0,118, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, - 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, - 88, 6, 0, 0, 8,255, 47, 5, 0, 0, 0, 0,124, 1, 0, 0, 1, 0, 0, 0,184, 7, 48, 5, 0, 0, 0, 0, 88,246, 47, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 83,110, 97,107,101, 32, 72,111,111,107, - 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 0,168, 5, 48, 5, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,200,137,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,184,245,218, 3, 0, 0, 0, 0, +123, 1, 0, 0, 1, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0,168,238,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 83,110, 97,107,101, 32, 72,111,111,107, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 34, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 88,174,218, 3, 0, 0, 0, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -7976,50 +8083,50 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 75, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 62, 0, 0,128, 63, 0, 0,128, 62, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0,160,255, 47, 5, 0, 0, 0, 0, 25, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, + 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 62, 0, 0,128, 63, 0, 0,128, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 56, 1, 0, 0, 80,246,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, - 64, 1, 0, 0,168, 5, 48, 5, 0, 0, 0, 0,120, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191, -114, 97,255,186, 56, 7, 48, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 88,174,218, 3, 0, 0, 0, 0, +119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, + 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186,120,138,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0, 56, 7, 48, 5, - 0, 0, 0, 0,118, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, - 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, - 88, 6, 0, 0,184, 7, 48, 5, 0, 0, 0, 0,124, 1, 0, 0, 1, 0, 0, 0,104, 16, 48, 5, 0, 0, 0, 0, 8,255, 47, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 83,111,102,116,101,110, 0, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 0, 88, 14, 48, 5, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,120,138,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,200,252,218, 3, 0, 0, 0, 0, +123, 1, 0, 0, 1, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0,184,245,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 83,111,102,116,101,110, 0, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,152,103,219, 3, 0, 0, 0, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -8051,50 +8158,50 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 35, 0, 0, 0, - 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0, 80, 8, 48, 5, 0, 0, 0, 0, 25, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 35, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, + 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 56, 1, 0, 0, 96,253,218, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, - 64, 1, 0, 0, 88, 14, 48, 5, 0, 0, 0, 0,120, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191, 54,189,194, 61, 14,215,126,191, - 46,189,194, 61,232, 15, 48, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,152,103,219, 3, 0, 0, 0, 0, +119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, + 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191, 54,189,194, 61, 14,215,126,191, 46,189,194, 61, 40,139,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,232, 15, 48, 5, - 0, 0, 0, 0,118, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62, 31,133,107, 63, - 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, - 88, 6, 0, 0,104, 16, 48, 5, 0, 0, 0, 0,124, 1, 0, 0, 1, 0, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0,184, 7, 48, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 83,117, 98,116,114, 97, 99,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 35, 3, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 0, 8, 23, 48, 5, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0, 40,139,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62, 31,133,107, 63, 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,216, 3,219, 3, 0, 0, 0, 0, +123, 1, 0, 0, 1, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0,200,252,218, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 83,117, 98,116,114, 97, 99,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 88,105,219, 3, 0, 0, 0, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -8126,50 +8233,50 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 35, 0, 0, 0, - 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0, 0, 17, 48, 5, 0, 0, 0, 0, 25, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 35, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, + 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 56, 1, 0, 0,112, 4,219, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, - 64, 1, 0, 0, 8, 23, 48, 5, 0, 0, 0, 0,120, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191, 54,189,194, 61, 14,215,126,191, - 46,189,194, 61,152, 24, 48, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 88,105,219, 3, 0, 0, 0, 0, +119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, + 0, 0, 0, 0, 0, 0,128, 63, 14,215,126,191, 54,189,194, 61, 14,215,126,191, 46,189,194, 61,216,139,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,152, 24, 48, 5, - 0, 0, 0, 0,118, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62, 31,133,107, 63, - 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, - 88, 6, 0, 0, 24, 25, 48, 5, 0, 0, 0, 0,124, 1, 0, 0, 1, 0, 0, 0,200, 33, 48, 5, 0, 0, 0, 0,104, 16, 48, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 84,101,120, 68,114, 97,119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 3, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 0,184, 31, 48, 5, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,216,139,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62, 31,133,107, 63, 0, 0, 0, 0, 0, 0, 64, 63, 10,215,163, 61, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,232, 10,219, 3, 0, 0, 0, 0, +123, 1, 0, 0, 1, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0,216, 3,219, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 84,101,120, 68,114, 97,119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 24,107,219, 3, 0, 0, 0, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -8201,50 +8308,50 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 35, 0, 0, 0, - 4, 4, 0, 8, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 51, 51, 51, 63, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 20,174,199, 62, 20,174,199, 62, 0, 0,128, 63, 68, 65, 84, 65, 56, 1, 0, 0,176, 25, 48, 5, 0, 0, 0, 0, 25, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 35, 0, 0, 0, 4, 4, 0, 8, 0, 0, 0, 0, 10, 0, 0, 0, + 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 51, 51, 51, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 20,174,199, 62, 20,174,199, 62, 0, 0,128, 63, + 68, 65, 84, 65, 56, 1, 0, 0,128, 11,219, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, - 64, 1, 0, 0,184, 31, 48, 5, 0, 0, 0, 0,120, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191, -114, 97,255,186, 72, 33, 48, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0, 24,107,219, 3, 0, 0, 0, 0, +119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, + 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186,136,140,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0, 72, 33, 48, 5, - 0, 0, 0, 0,118, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, - 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, - 88, 6, 0, 0,200, 33, 48, 5, 0, 0, 0, 0,124, 1, 0, 0, 1, 0, 0, 0,120, 42, 48, 5, 0, 0, 0, 0, 24, 25, 48, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 84,104,117,109, 98, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 0,104, 40, 48, 5, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,136,140,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0,248, 17,219, 3, 0, 0, 0, 0, +123, 1, 0, 0, 1, 0, 0, 0, 8, 25,219, 3, 0, 0, 0, 0,232, 10,219, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 84,104,117,109, 98, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 38, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,216,108,219, 3, 0, 0, 0, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -8276,51 +8383,50 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 75, 0, 0, 0, - 4, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 62, 0, 0,128, 63, 0, 0,128, 62, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0, 96, 34, 48, 5, 0, 0, 0, 0, 25, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 75, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, + 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 62, 0, 0,128, 63, 0, 0,128, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 56, 1, 0, 0,144, 18,219, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, - 64, 1, 0, 0,104, 40, 48, 5, 0, 0, 0, 0,120, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191, -114, 97,255,186,248, 41, 48, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,216,108,219, 3, 0, 0, 0, 0, +119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, + 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186, 56,141,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,248, 41, 48, 5, - 0, 0, 0, 0,118, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, - 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, - 88, 6, 0, 0,120, 42, 48, 5, 0, 0, 0, 0,124, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200, 33, 48, 5, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 84,119,105,115,116, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 0, 24, 49, 48, 5, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0, 56,141,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 0, 0, 88, 6, 0, 0, 8, 25,219, 3, 0, 0, 0, 0, +123, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,248, 17,219, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 66, 82, 84,119,105,115,116, 0, 48, 48, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 3, 39, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0,152,110,219, 3, 0, 0, 0, 0, + 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -8351,39 +8457,38 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 75, 0, 0, 0, - 0, 0, 0, 1, 0, 0, 0, 0, 10, 0, 0, 0, 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 62, 0, 0,128, 63, 0, 0,128, 62, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 56, 1, 0, 0, 16, 43, 48, 5, 0, 0, 0, 0, 25, 0, 0, 0, - 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, - 64, 1, 0, 0, 24, 49, 48, 5, 0, 0, 0, 0,120, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, - 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191, -114, 97,255,186,168, 50, 48, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 75, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 10, 0, 0, 0, + 75, 0, 0, 0,102,102,102, 63,205,204,204, 61, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63,205,204,204, 62, 0, 0, 0, 0, + 33, 0, 0, 0, 0, 0, 0, 62, 0, 0,128, 62, 0, 0,128, 63, 0, 0,128, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 56, 1, 0, 0,160, 25,219, 3, 0, 0, 0, 0, 25, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0,128, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63,205,204, 76, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 68, 65, 84, 65, 64, 1, 0, 0,152,110,219, 3, 0, 0, 0, 0, +119, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 63, 4, 0, 0, 0, 0, 0,128, 67, + 0, 0, 0, 0, 0, 0,128, 63,224,255,127,191, 46, 95,255,186,224,255,127,191,114, 97,255,186,232,141,216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, - 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,168, 50, 48, 5, - 0, 0, 0, 0,118, 1, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, - 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 85, 83, 69, 82, -104, 38, 0, 0, 32,206,200, 4, 0, 0, 0, 0,210, 0, 0, 0, 1, 0, 0, 0, 1, 8, 17, 1, 63, 6, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 48, 0, 0, 0,232,141,216, 3, 0, 0, 0, 0,117, 1, 0, 0, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0,128, 62,215,163,112, 63, 0, 0, 0, 0, 0, 0, 64, 63,143,194,117, 61, + 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 85, 83, 69, 82,112, 38, 0, 0, 96, 41,141, 67, 1, 0, 0, 0, +209, 0, 0, 0, 1, 0, 0, 0, 1, 8, 17, 1, 63, 6, 0, 0, 5, 0, 0, 0, 67, 58, 92, 85,115,101,114,115, 92,115,101,114, +103,101,121, 92, 65,112,112, 68, 97,116, 97, 92, 76,111, 99, 97,108, 92, 84,101,109,112, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -8404,10 +8509,11 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 47, 47, 0, 85,115,101,114,115, 47,116,111,110, 47, 68,101,115,107,116,111,112, 47, 0, 45,112,111,119,101,114,112, 99, 47, 98, -105,110, 47, 98,108,101,110,100,101,114, 46, 97,112,112, 47, 67,111,110,116,101,110,116,115, 47, 82,101,115,111,117,114, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 0, 85,115,101,114,115, 47,116,111,110, + 47, 68,101,115,107,116,111,112, 47, 0, 45,112,111,119,101,114,112, 99, 47, 98,105,110, 47, 98,108,101,110,100,101,114, 46, 97, +112,112, 47, 67,111,110,116,101,110,116,115, 47, 82,101,115,111,117,114, 99,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -8428,8 +8534,8 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 47, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -8460,8 +8566,8 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 47, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -8556,8 +8662,8 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 47, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -8644,1701 +8750,1715 @@ char datatoc_startup_blend[]= { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 0, 35, 0, 0, 0, 2, 0, 94, 1, 8, 0, 0, 0, 3, 0, 0, 0, 56, 52, 39, 0, 0, 0, 0, 0, 1, 0, 2, 0, - 0, 8, 0, 0, 2, 0, 0, 0, 68,172, 0, 0, 36, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 72, 0, 0, 0, 0, 0, 64, 0, - 5, 0, 2, 0,216, 89, 48, 5, 0, 0, 0, 0,216, 89, 48, 5, 0, 0, 0, 0,104, 62, 48, 5, 0, 0, 0, 0,104, 62, 48, 5, - 0, 0, 0, 0,248,129, 48, 5, 0, 0, 0, 0,248,129, 48, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,168, 51, 47, 5, 0, 0, 0, 0,200, 61, 48, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 35, 0, 0, 0, 2, 0, 94, 1, + 8, 0, 0, 0, 3, 0, 0, 0, 56, 52, 39, 0, 0, 0, 0, 0, 1, 0, 2, 0, 0, 8, 0, 0, 2, 0, 0, 0, 68,172, 0, 0, + 36, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 72, 0, 0, 0, 0, 0, 64, 0, 5, 0, 2, 0, 88,174,219, 3, 0, 0, 0, 0, + 88,174,219, 3, 0, 0, 0, 0,200,152,170, 3, 0, 0, 0, 0,200,152,170, 3, 0, 0, 0, 0,200,154,199, 3, 0, 0, 0, 0, +200,154,199, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0,184,211,219, 3, 0, 0, 0, 0, 8,219,219, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 32, 0, 0, 0, 1, 0, 2, 0, 25, 0, 0, 0, 20, 0, 20, 0, 1, 0, 0, 0, 0, 0, 0, 0,205,204, 76, 63, -205,204, 76, 63,205,204, 76, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 30, 90,100,191, -154,153,153, 62,102,102,102, 63, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 31,250,254, 62, 9, 0, 0, 63,156,153, 25, 63, - 0, 0, 0, 0,205,204, 76, 62,205,204, 76, 62,205,204, 76, 62, 0, 0,128, 63, 44,135, 22, 63, 32,133,235, 62,184,243,125, 62, - 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0,195, 73, 76, 63, 42,135, 86, 63, 0, 0,128, 63, 0, 0, 0, 0, 1, 43,135, 61, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 16, 47, 93, 62, 58,180,200,190, 24, 47, 93,190, 0, 0, 0, 0, 14, 0, 1, 0, - 25, 0, 15, 0,120, 0, 60, 0, 3, 0, 5, 0,128, 0, 0, 0, 0, 0, 0, 0,144, 31, 15, 0, 6, 0, 25, 0, 8, 0, 10, 0, -200, 0, 0, 0, 0, 0, 0, 0, 2, 0, 4, 0, 10, 0, 50, 0, 20, 0, 2, 0, 1, 0, 0, 0, 0, 0,128, 63, 60, 0, 0, 0, - 0, 0, 2, 0, 2, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, - 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, - 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, - 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, - 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, - 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, - 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, - 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, - 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, - 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, - 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, - 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, - 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, - 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, - 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, - 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, - 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 1, 0, 2, 0, + 25, 0, 0, 0, 20, 0, 20, 0, 1, 0, 0, 0, 0, 0, 0, 0,205,204, 76, 63,205,204, 76, 63,205,204, 76, 63, 0, 0, 0, 0, + 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 30, 90,100,191,154,153,153, 62,102,102,102, 63, 0, 0, 0, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 31,250,254, 62, 9, 0, 0, 63,156,153, 25, 63, 0, 0, 0, 0,205,204, 76, 62,205,204, 76, 62, +205,204, 76, 62, 0, 0,128, 63, 44,135, 22, 63, 32,133,235, 62,184,243,125, 62, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, +195, 73, 76, 63, 42,135, 86, 63, 0, 0,128, 63, 0, 0, 0, 0, 1, 43,135, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, + 16, 47, 93, 62, 58,180,200,190, 24, 47, 93,190, 0, 0, 0, 0, 14, 0, 1, 0, 25, 0, 15, 0,120, 0, 60, 0, 3, 0, 5, 0, +128, 0, 0, 0, 0, 0, 0, 0,144, 31, 15, 0, 6, 0, 25, 0, 8, 0, 10, 0,200, 0, 0, 0, 0, 0, 0, 0, 2, 0, 4, 0, + 10, 0, 50, 0, 20, 0, 2, 0, 1, 0, 0, 0, 0, 0,128, 63, 60, 0, 0, 0, 0, 0, 2, 0, 2, 0, 8, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0,128, 63, + 0, 0,128, 63, 0, 0,128, 63, 0, 0,128, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, + 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, + 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, + 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, + 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, + 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, + 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, + 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, + 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, + 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, + 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, + 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, + 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, + 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, + 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, + 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, + 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, + 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, + 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, + 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, + 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, + 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, + 0, 0, 0, 63, 0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0, 0, 63, 0, 0,128, 63, 0, 0, 0, 63, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, -120, 35, 0, 0,216, 89, 48, 5, 0, 0, 0, 0,207, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68,101,102, 97,117,108,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 25, 25, 25,255,153,153,153,255,100,100,100,255, 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, 0, 0, 0, 0, - 0, 0, 0, 0, 25, 25, 25,255,153,153,153,255,100,100,100,255, 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, 1, 0, 15, 0, -241,255, 0, 0, 25, 25, 25,255,153,153,153,255,153,153,153,255, 90, 90, 90,255, 0, 0, 0,255,255,255,255,255, 1, 0, 0, 0, - 25, 0, 0, 0, 0, 0, 0,255, 70, 70, 70,255, 86,128,194,255,255,255,255,255,255,255,255,255, 0, 0, 0,255, 1, 0, 15, 0, -241,255, 0, 0, 0, 0, 0,255, 70, 70, 70,255, 70, 70, 70,255,255,255,255,255, 0, 0, 0,255,255,255,255,255, 1, 0, 15, 0, -241,255, 0, 0, 25, 25, 25,255,153,153,153,255,100,100,100,255, 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, 0, 0, 0, 0, - 0, 0, 0, 0, 25, 25, 25,255,180,180,180,255,153,153,153,255, 90, 90, 90,255, 0, 0, 0,255,255,255,255,255, 1, 0,236,255, - 0, 0, 0, 0, 25, 25, 25,255,180,180,180,255,153,153,153,255,128,128,128,255, 0, 0, 0,255,255,255,255,255, 1, 0,236,255, - 0, 0, 0, 0, 0, 0, 0,255, 70, 70, 70,255, 70, 70, 70,255,255,255,255,255,255,255,255,255,204,204,204,255, 1, 0, 15, 0, -241,255, 0, 0, 0, 0, 0,255, 63, 63, 63,255, 86,128,194,255,255,255,255,255, 0, 0, 0,255, 0, 0, 0,255, 0, 0, 25, 0, -236,255, 0, 0, 0, 0, 0,255, 25, 25, 25,230, 45, 45, 45,230,100,100,100,255,160,160,160,255,255,255,255,255, 0, 0, 25, 0, -236,255, 0, 0, 0, 0, 0,255, 0, 0, 0, 0, 86,128,194,255,255,255,255,255,255,255,255,255, 0, 0, 0,255, 1, 0, 38, 0, - 0, 0, 0, 0, 25, 25, 25,255,128,128,128,255,100,100,100,255, 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, 0, 0, 0, 0, - 0, 0, 0, 0, 50, 50, 50,180, 80, 80, 80,180,100,100,100,180,128,128,128,255, 0, 0, 0,255,255,255,255,255, 1, 0, 5, 0, -251,255, 0, 0, 0, 0, 0,255,190,190,190,255,100,100,100,180, 68, 68, 68,255, 0, 0, 0,255,255,255,255,255, 0, 0, 5, 0, -251,255, 0, 0, 0, 0, 0,255, 0, 0, 0, 0, 86,128,194,255, 0, 0, 0,255, 0, 0, 0,255, 0, 0, 0,255, 0, 0, 0, 0, - 0, 0, 0, 0,115,190, 76,255, 90,166, 51,255,240,235,100,255,215,211, 75,255,180, 0,255,255,153, 0,230,255, 0, 0, 0, 63, - 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255, -255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255, -255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,130,130,130,255, 0, 0, 0,255, 0, 0, 0,255, -255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, - 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, - 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0, 0, 0, 0, 18,255,133, 0, 60, -255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, 35, 97,221,255,200,200,200,255, - 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,219, 37, 18,255,240,255, 64,255, -240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, 0, 0, 0, 0, 0, 0, 0,255, -240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 57, 57, 57,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255, -255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255, -255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, - 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0,255, 0, 0, 0, 0,255,170, 64,255, 8, 48, 8,255, - 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255, 32,255,255,255, - 75, 75, 75,255,204, 0,153,255, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 32, 0, 0,255, 0, 32, 0,255, 0, 0,128,255, - 0, 0, 0, 0, 34,221,221,255, 35, 97,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, -144,144, 0,255,128, 48, 96,255,219, 37, 18,255,240,255, 64,255,240,144,160,255,255,255,255,255, 0, 0, 0,255,144,144, 0,255, - 64,144, 48,255,128, 48, 96,255, 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 4, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,200,200,255, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 76, 76,255, 0, 0, 0, 0,250,250,250,255, - 15, 15, 15,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255, -255,255,255,255,102,102,102,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,255, 0, 0, 0,255, 0, 0, 0,255, -255,255,255,255,160,160,160,100,127,112,112,100,255,140, 25,255,250,250,250,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, - 0, 0, 0, 0, 0, 0, 0, 0,130,130,130,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, - 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0, 0, 0, 0, 18,255,133, 0, 60, -255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, 35, 97,221,255,200,200,200,255, - 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,219, 37, 18,255,240,255, 64,255, -240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, 0, 0, 0, 0, 0, 0, 0,255, -240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,250,250,250,255,250,250,250,255,250,250,250,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255, -255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,102,102,102,255, 0, 0, 0,255, 0, 0, 0,255, -255,255,255,255,255,255,255,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,150,150,150,100,112,112,112,100, 96,192, 64,255, - 94, 94, 94,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 79,101, 73,255, -135,177,125,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, - 75, 75, 75,255, 0, 0, 0, 0, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 34,221,221,255, 35, 97,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, -144,144, 0,255,128, 48, 96,255,219, 37, 18,255,240,255, 64,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, - 64,144, 48,255,128, 48, 96,255,153, 64, 48,255, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255,240,175,144,255, - 82, 96,110,255,124,137,150,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0,255,255,133, 0,255, - 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255, -255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255, -255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255, -255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, - 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, - 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0, 0, 0, 0, 18,255,133, 0, 60, -255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, 35, 97,221,255,200,200,200,255, - 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,219, 37, 18,255,240,255, 64,255, -240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, 0, 0, 0, 0, 0, 0, 0,255, -240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255, -255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,102,102,102,255, 0, 0, 0,255, 0, 0, 0,255, -255,255,255,255,255,255,255,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,150,150,150,100,112,112,112,100, 96,192, 64,255, - 94, 94, 94,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 79,101, 73,255, -135,177,125,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, - 75, 75, 75,255, 0, 0, 0, 0, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 34,221,221,255, 35, 97,221,255,200,200,200,255, 80,200,255, 80, 12, 10, 10,128,255,140, 0,255, 96,192, 64,255, -144,144, 0,255,128, 48, 96,255,219, 37, 18,255,240,255, 64,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, - 64,144, 48,255,128, 48, 96,255, 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, - 82, 96,110,255,124,137,150,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0,255,255,133, 0,255, - 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 62, 0, 0, 0, 0, 68, 65, 84, 65,168, 36, 0, 0, + 88,174,219, 3, 0, 0, 0, 0,206, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68,101,102, 97,117,108,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 25, 25, 25,255,153,153,153,255,100,100,100,255, 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, + 25, 25, 25,255,153,153,153,255,100,100,100,255, 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, 1, 0, 15, 0,241,255, 0, 0, + 25, 25, 25,255,153,153,153,255,153,153,153,255, 90, 90, 90,255, 0, 0, 0,255,255,255,255,255, 1, 0, 0, 0, 25, 0, 0, 0, + 0, 0, 0,255, 70, 70, 70,255, 86,128,194,255,255,255,255,255,255,255,255,255, 0, 0, 0,255, 1, 0, 15, 0,241,255, 0, 0, + 0, 0, 0,255, 70, 70, 70,255, 70, 70, 70,255,255,255,255,255, 0, 0, 0,255,255,255,255,255, 1, 0, 15, 0,241,255, 0, 0, + 25, 25, 25,255,153,153,153,255,100,100,100,255, 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, + 25, 25, 25,255,180,180,180,255,153,153,153,255, 90, 90, 90,255, 0, 0, 0,255,255,255,255,255, 1, 0,236,255, 0, 0, 0, 0, + 25, 25, 25,255,180,180,180,255,153,153,153,255,128,128,128,255, 0, 0, 0,255,255,255,255,255, 1, 0,236,255, 0, 0, 0, 0, + 0, 0, 0,255, 70, 70, 70,255, 70, 70, 70,255,255,255,255,255,255,255,255,255,204,204,204,255, 1, 0, 15, 0,241,255, 0, 0, + 0, 0, 0,255, 63, 63, 63,255, 86,128,194,255,255,255,255,255, 0, 0, 0,255, 0, 0, 0,255, 0, 0, 25, 0,236,255, 0, 0, + 0, 0, 0,255, 25, 25, 25,230, 45, 45, 45,230,100,100,100,255,160,160,160,255,255,255,255,255, 0, 0, 25, 0,236,255, 0, 0, + 0, 0, 0,255, 0, 0, 0, 0, 86,128,194,255,172,172,172,128,255,255,255,255, 0, 0, 0,255, 1, 0, 38, 0, 0, 0, 0, 0, + 0, 0, 0,255, 25, 25, 25,230, 45, 45, 45,230,100,100,100,255,255,255,255,255,255,255,255,255, 0, 0, 25, 0,236,255, 0, 0, + 25, 25, 25,255,128,128,128,255,100,100,100,255, 25, 25, 25,255, 0, 0, 0,255,255,255,255,255, 0, 0, 0, 0, 0, 0, 0, 0, + 50, 50, 50,180, 80, 80, 80,180,100,100,100,180,128,128,128,255, 0, 0, 0,255,255,255,255,255, 1, 0, 5, 0,251,255, 0, 0, + 0, 0, 0,255,190,190,190,255,100,100,100,180, 68, 68, 68,255, 0, 0, 0,255,255,255,255,255, 0, 0, 5, 0,251,255, 0, 0, + 0, 0, 0,255, 0, 0, 0, 0, 86,128,194,255, 0, 0, 0,255, 0, 0, 0,255, 0, 0, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, +115,190, 76,255, 90,166, 51,255,240,235,100,255,215,211, 75,255,180, 0,255,255,153, 0,230,255, 0, 0, 0, 63, 0, 0, 0, 0, + 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255, -255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255, -255,255,255,255,102,102,102,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,255,255,255,150, 0, 0, 0,255, 0, 0, 0,255, -255,255,255,255,150,150,150,100,112,112,112,100, 96,192, 64,255, 94, 94, 94,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, - 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 79,101, 73,255,135,177,125,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, - 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0, 0, 0, 0, 18,255,133, 0, 60, -255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, 35, 97,221,255,200,200,200,255, - 80,200,255, 80, 12, 10, 10,128,255,140, 0,255, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,219, 37, 18,255,240,255, 64,255, -240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, 0, 0, 0, 0, 0, 0, 0,255, -240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 82, 96,110,255,124,137,150,255, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,255,255,255,128, 0, 0, 0,255,255,133, 0,255, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,116,116,116,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255, -255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255, -255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, - 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, - 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, - 75, 75, 75,255, 0, 0, 0, 0, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 34,221,221,255, 35, 97,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, -144,144, 0,255,128, 48, 96,255,219, 37, 18,255,240,255, 64,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, - 64,144, 48,255,128, 48, 96,255, 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81,105,135,255,109, 88,129,255, 78,152, 62,255, - 46,143,143,255,169, 84,124,255,126,126, 80,255,162, 95,111,255,109,145,131,255,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, 53, 53,255, 0, 0, 0, 0, 0, 0, 0,255, -255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255, -255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255, -255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, - 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, - 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0,255,255,255, 10,255,133, 0, 60, -255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, 35, 97,221,255,200,200,200,255, - 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,219, 37, 18,255,240,255, 64,255, -240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, 0, 0, 0, 0, 0, 0, 0,255, -240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -114,114,114,255, 18, 66,176, 38,255,133, 0,178,255,133, 0,127, 0,255, 0,255,255, 0, 0,255,225,210,195, 35, 0, 0, 0, 0, - 0, 0, 0, 0,153,153,153,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255, -255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255, -255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,143,143,143,255,198,119,119,255,255, 0, 0,255, - 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, - 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, - 75, 75, 75,255, 0, 0, 0, 0, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 34,221,221,255, 35, 97,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, -144,144, 0,255,128, 48, 96,255,219, 37, 18,255,240,255, 64,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, - 64,144, 48,255,128, 48, 96,255, 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, -100, 0, 0,255, 0, 0,200,255,128, 0, 80,255, 95, 95, 0,255, 0,100, 50,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255, -255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255, -255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255, -255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, - 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, - 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0, 0, 0, 0, 18,255,133, 0, 60, -255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, 35, 97,221,255,200,200,200,255, - 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,219, 37, 18,255,240,255, 64,255, -240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, 0, 0, 0, 0, 0, 0, 0,255, -240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51,127, 51, 76, -130,135,140, 76,114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255, -255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255, -255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,173,173,173,255,127,112,112,100, 0, 0, 0, 0, - 91, 91, 91,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, - 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, - 75, 75, 75,255, 0, 0, 0, 0, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 34,221,221,255, 35, 97,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, -144,144, 0,255,128, 48, 96,255,219, 37, 18,255,240,255, 64,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, - 64,144, 48,255,128, 48, 96,255, 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57, 57, 57,255, 0, 0, 0, 0, 0, 0, 0,255, -255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255, -255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255, -255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, - 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, - 0, 0, 0,255,255,255,255,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0, 0, 0, 0, 18,255,133, 0, 60, -255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, 35, 97,221,255,200,200,200,255, - 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,219, 37, 18,255,240,255, 64,255, -240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, 0, 0, 0, 0, 0, 0, 0,255, -240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 5,155,155,155,160,100,104,111,255,111,106,100,255,104,106,117,255, -105,117,110,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,100,100,100,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255, -255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255, -255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, - 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, - 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, - 75, 75, 75,255, 0, 0, 0, 0, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 34,221,221,255, 35, 97,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, -144,144, 0,255,128, 48, 96,255,219, 37, 18,255,240,255, 64,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, - 64,144, 48,255,128, 48, 96,255, 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255, -255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255, -255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255, -255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, - 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, - 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0, 0, 0, 0, 18,255,133, 0, 60, -255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, 35, 97,221,255,200,200,200,255, - 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,219, 37, 18,255,240,255, 64,255, -240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, 0, 0, 0, 0, 0, 0, 0,255, -240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255, -255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255, -255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, - 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, - 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, - 75, 75, 75,255, 0, 0, 0, 0, 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 34,221,221,255, 35, 97,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255, -144,144, 0,255,128, 48, 96,255,219, 37, 18,255,240,255, 64,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, - 64,144, 48,255,128, 48, 96,255, 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 96,128,255,255,255,255,255,255, 0,170, 0,255,220, 96, 96,255,220, 96, 96,255, 3, 0, 4, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57, 57, 57,255, 0, 0, 0, 0, 0, 0, 0,255, -255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255, -255,255,255,255,165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255, -255,255,255,255,160,160,160,100,127,112,112,100, 0, 0, 0, 0, 94, 94, 94,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, - 0, 0, 0,255, 0, 0, 0, 0,255,170, 64,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255, 0, 0, 0,255,255,133, 0,255, - 0, 0, 0,255,255,160, 0,255,219, 37, 18,255, 32,255,255,255, 75, 75, 75,255,204, 0,153,255, 0, 0, 0, 18,255,133, 0, 60, -255,133, 0,255, 32, 0, 0,255, 0, 32, 0,255, 0, 0,128,255, 0, 0, 0, 0, 34,221,221,255, 35, 97,221,255,200,200,200,255, - 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255,219, 37, 18,255,240,255, 64,255, -240,144,160,255,255,255,255,255, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, 0, 0, 0, 0, 0, 0, 0,255, -240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,255,255,255,128, 0, 0, 0,255,255,255, 0,255, 4, 0, 0, 0,255,127,127, 0,255,255,255,255,255,255,255, 0, -255,127, 0, 0,255,127,127,127,255,200,200,200,255,255, 0, 0,255, 0, 0,255,255, 0, 0, 0,255, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,154, 0, 0,255,189, 17, 17,255,247, 10, 10,255, 0, 0, 0, 0,247, 64, 24,255,246,105, 19,255,250,153, 0,255, - 0, 0, 0, 0, 30,145, 9,255, 89,183, 11,255,131,239, 29,255, 0, 0, 0, 0, 10, 54,148,255, 54,103,223,255, 94,193,239,255, - 0, 0, 0, 0,169, 41, 78,255,193, 65,106,255,240, 93,145,255, 0, 0, 0, 0, 67, 12,120,255, 84, 58,163,255,135,100,213,255, - 0, 0, 0, 0, 36,120, 90,255, 60,149,121,255,111,182,171,255, 0, 0, 0, 0, 75,112,124,255,106,134,145,255,155,194,205,255, - 0, 0, 0, 0,244,201, 12,255,238,194, 54,255,243,255, 0,255, 0, 0, 0, 0, 30, 32, 36,255, 72, 76, 86,255,255,255,255,255, - 0, 0, 0, 0,111, 47,106,255,152, 69,190,255,211, 48,214,255, 0, 0, 0, 0,108,142, 34,255,127,176, 34,255,187,239, 91,255, - 0, 0, 0, 0,141,141,141,255,176,176,176,255,222,222,222,255, 0, 0, 0, 0,131, 67, 38,255,139, 88, 17,255,189,106, 17,255, - 0, 0, 0, 0, 8, 49, 14,255, 28, 67, 11,255, 52, 98, 43,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 0, 0, 0,168, 51, 47, 5, 0, 0, 0, 0,208, 0, 0, 0, - 1, 0, 0, 0, 72, 52, 47, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,105,111, 95,115, 99,101,110,101, 95, 51,100,115, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 0, 0, 0, 72, 52, 47, 5, - 0, 0, 0, 0,208, 0, 0, 0, 1, 0, 0, 0,152,125, 48, 5, 0, 0, 0, 0,168, 51, 47, 5, 0, 0, 0, 0,105,111, 95,115, - 99,101,110,101, 95,102, 98,120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 80, 0, 0, 0,152,125, 48, 5, 0, 0, 0, 0,208, 0, 0, 0, 1, 0, 0, 0, 56,126, 48, 5, 0, 0, 0, 0, 72, 52, 47, 5, - 0, 0, 0, 0,105,111, 95, 97,110,105,109, 95, 98,118,104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 80, 0, 0, 0, 56,126, 48, 5, 0, 0, 0, 0,208, 0, 0, 0, 1, 0, 0, 0,216,126, 48, 5, - 0, 0, 0, 0,152,125, 48, 5, 0, 0, 0, 0,105,111, 95,109,101,115,104, 95,112,108,121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 0, 0, 0,216,126, 48, 5, 0, 0, 0, 0,208, 0, 0, 0, - 1, 0, 0, 0,120,127, 48, 5, 0, 0, 0, 0, 56,126, 48, 5, 0, 0, 0, 0,105,111, 95,115, 99,101,110,101, 95,111, 98,106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 0, 0, 0,120,127, 48, 5, - 0, 0, 0, 0,208, 0, 0, 0, 1, 0, 0, 0, 24,128, 48, 5, 0, 0, 0, 0,216,126, 48, 5, 0, 0, 0, 0,105,111, 95,115, - 99,101,110,101, 95,120, 51,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, - 80, 0, 0, 0, 24,128, 48, 5, 0, 0, 0, 0,208, 0, 0, 0, 1, 0, 0, 0,184,128, 48, 5, 0, 0, 0, 0,120,127, 48, 5, - 0, 0, 0, 0,105,111, 95,109,101,115,104, 95,115,116,108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68, 65, 84, 65, 80, 0, 0, 0,184,128, 48, 5, 0, 0, 0, 0,208, 0, 0, 0, 1, 0, 0, 0, 88,129, 48, 5, - 0, 0, 0, 0, 24,128, 48, 5, 0, 0, 0, 0,105,111, 95,109,101,115,104, 95,117,118, 95,108, 97,121,111,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 0, 0, 0, 88,129, 48, 5, 0, 0, 0, 0,208, 0, 0, 0, - 1, 0, 0, 0,200, 61, 48, 5, 0, 0, 0, 0,184,128, 48, 5, 0, 0, 0, 0,105,111, 95, 99,117,114,118,101, 95,115,118,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 0, 0, 0,200, 61, 48, 5, - 0, 0, 0, 0,208, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88,129, 48, 5, 0, 0, 0, 0, 99,121, 99,108, -101,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, -232, 0, 0, 0,248,129, 48, 5, 0, 0, 0, 0,200, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 68,101,102, 97,117,108,116, 32, 83,116,121,108,101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 12, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,255,255, 0, 0,154,153, 25, 62, - 0, 0,128, 63, 0, 0, 12, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0,255,255, 0, 0, 0, 0,128, 62, - 0, 0, 0, 0, 0, 0, 11, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0,255,255, 0, 0,154,153, 25, 62, - 0, 0,128, 63, 0, 0, 11, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 62, - 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 8, 0, 5, 0, 5, 0, 8, 0, 2, 0, 8, 0, 4, 0, 0, 0, 68, 78, 65, 49, - 20, 4, 1, 0, 24, 38,172, 77,130,127, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 83, 68, 78, 65, 78, 65, 77, 69, 50, 13, 0, 0, - 42,110,101,120,116, 0, 42,112,114,101,118, 0, 42,100, 97,116, 97, 0, 42,102,105,114,115,116, 0, 42,108, 97,115,116, 0,120, - 0,121, 0,122, 0,120,109,105,110, 0,120,109, 97,120, 0,121,109,105,110, 0,121,109, 97,120, 0, 42,112,111,105,110,116,101, -114, 0,103,114,111,117,112, 0,118, 97,108, 0,118, 97,108, 50, 0,116,121,112,101, 0,115,117, 98,116,121,112,101, 0,102,108, - 97,103, 0,110, 97,109,101, 91, 54, 52, 93, 0,115, 97,118,101,100, 0,100, 97,116, 97, 0,108,101,110, 0,116,111,116, 97,108, -108,101,110, 0, 42,110,101,119,105,100, 0, 42,108,105, 98, 0,110, 97,109,101, 91, 54, 54, 93, 0,112, 97,100, 0,117,115, 0, -105, 99,111,110, 95,105,100, 0,112, 97,100, 50, 0, 42,112,114,111,112,101,114,116,105,101,115, 0,105,100, 0, 42,105,100, 98, -108,111, 99,107, 0, 42,102,105,108,101,100, 97,116, 97, 0,110, 97,109,101, 91, 49, 48, 50, 52, 93, 0,102,105,108,101,112, 97, -116,104, 91, 49, 48, 50, 52, 93, 0,116,111,116, 0, 42,112, 97,114,101,110,116, 0,119, 91, 50, 93, 0,104, 91, 50, 93, 0, 99, -104, 97,110,103,101,100, 91, 50, 93, 0, 99,104, 97,110,103,101,100, 95,116,105,109,101,115,116, 97,109,112, 91, 50, 93, 0, 42, -114,101, 99,116, 91, 50, 93, 0, 42,111, 98, 0, 98,108,111, 99,107,116,121,112,101, 0, 97,100,114, 99,111,100,101, 0,110, 97, -109,101, 91, 49, 50, 56, 93, 0, 42, 98,112, 0, 42, 98,101,122,116, 0,109, 97,120,114, 99,116, 0,116,111,116,114, 99,116, 0, -118, 97,114,116,121,112,101, 0,116,111,116,118,101,114,116, 0,105,112,111, 0,101,120,116,114, 97,112, 0,114,116, 0, 98,105, -116,109, 97,115,107, 0,115,108,105,100,101, 95,109,105,110, 0,115,108,105,100,101, 95,109, 97,120, 0, 99,117,114,118, 97,108, - 0, 42,100,114,105,118,101,114, 0, 99,117,114,118,101, 0, 99,117,114, 0,115,104,111,119,107,101,121, 0,109,117,116,101,105, -112,111, 0,112,111,115, 0,114,101,108, 97,116,105,118,101, 0,116,111,116,101,108,101,109, 0, 42,119,101,105,103,104,116,115, - 0,118,103,114,111,117,112, 91, 54, 52, 93, 0,115,108,105,100,101,114,109,105,110, 0,115,108,105,100,101,114,109, 97,120, 0, -117,105,100, 0,112, 97,100, 51, 0, 42, 97,100,116, 0, 42,114,101,102,107,101,121, 0,101,108,101,109,115,116,114, 91, 54, 52, - 93, 0,101,108,101,109,115,105,122,101, 0, 98,108,111, 99,107, 0, 42,105,112,111, 0, 42,102,114,111,109, 0,116,111,116,107, -101,121, 0,115,108,117,114,112,104, 0,117,105,100,103,101,110, 0, 42,108,105,110,101, 0, 42,102,111,114,109, 97,116, 0, 98, -108,101,110, 0,108,105,110,101,110,111, 0,115,116, 97,114,116, 0,101,110,100, 0,112, 97,100, 49, 0,102,108, 97,103,115, 0, - 99,111,108,111,114, 91, 52, 93, 0,112, 97,100, 91, 52, 93, 0, 42,110, 97,109,101, 0,110,108,105,110,101,115, 0,108,105,110, -101,115, 0, 42, 99,117,114,108, 0, 42,115,101,108,108, 0, 99,117,114, 99, 0,115,101,108, 99, 0,109, 97,114,107,101,114,115, - 0, 42,117,110,100,111, 95, 98,117,102, 0,117,110,100,111, 95,112,111,115, 0,117,110,100,111, 95,108,101,110, 0, 42, 99,111, -109,112,105,108,101,100, 0,109,116,105,109,101, 0,115,105,122,101, 0,115,101,101,107, 0,100,116,120, 0,112, 97,115,115,101, -112, 97,114,116, 97,108,112,104, 97, 0, 99,108,105,112,115,116, 97, 0, 99,108,105,112,101,110,100, 0,108,101,110,115, 0,111, -114,116,104,111, 95,115, 99, 97,108,101, 0,100,114, 97,119,115,105,122,101, 0,115,101,110,115,111,114, 95,120, 0,115,101,110, -115,111,114, 95,121, 0,115,104,105,102,116,120, 0,115,104,105,102,116,121, 0, 89, 70, 95,100,111,102,100,105,115,116, 0, 42, -100,111,102, 95,111, 98, 0,115,101,110,115,111,114, 95,102,105,116, 0,112, 97,100, 91, 55, 93, 0, 42,115, 99,101,110,101, 0, -102,114, 97,109,101,110,114, 0,102,114, 97,109,101,115, 0,111,102,102,115,101,116, 0,115,102,114, 97, 0,102,105,101, 95,105, -109, 97, 0, 99,121, 99,108, 0,111,107, 0,109,117,108,116,105, 95,105,110,100,101,120, 0,108, 97,121,101,114, 0,112, 97,115, -115, 0,105, 98,117,102,115, 0, 42,103,112,117,116,101,120,116,117,114,101, 0, 42, 97,110,105,109, 0, 42,114,114, 0, 42,114, -101,110,100,101,114,115, 91, 56, 93, 0,114,101,110,100,101,114, 95,115,108,111,116, 0,108, 97,115,116, 95,114,101,110,100,101, -114, 95,115,108,111,116, 0,115,111,117,114, 99,101, 0,108, 97,115,116,102,114, 97,109,101, 0,116,112, 97,103,101,102,108, 97, -103, 0,116,111,116, 98,105,110,100, 0,120,114,101,112, 0,121,114,101,112, 0,116,119,115,116, 97, 0,116,119,101,110,100, 0, - 98,105,110,100, 99,111,100,101, 0, 42,114,101,112, 98,105,110,100, 0, 42,112, 97, 99,107,101,100,102,105,108,101, 0, 42,112, -114,101,118,105,101,119, 0,108, 97,115,116,117,112,100, 97,116,101, 0,108, 97,115,116,117,115,101,100, 0, 97,110,105,109,115, -112,101,101,100, 0,103,101,110, 95,120, 0,103,101,110, 95,121, 0,103,101,110, 95,116,121,112,101, 0,103,101,110, 95,102,108, - 97,103, 0, 97,115,112,120, 0, 97,115,112,121, 0,116,101,120, 99,111, 0,109, 97,112,116,111, 0,109, 97,112,116,111,110,101, -103, 0, 98,108,101,110,100,116,121,112,101, 0, 42,111, 98,106,101, 99,116, 0, 42,116,101,120, 0,117,118,110, 97,109,101, 91, - 54, 52, 93, 0,112,114,111,106,120, 0,112,114,111,106,121, 0,112,114,111,106,122, 0,109, 97,112,112,105,110,103, 0,111,102, -115, 91, 51, 93, 0,115,105,122,101, 91, 51, 93, 0,114,111,116, 0,116,101,120,102,108, 97,103, 0, 99,111,108,111,114,109,111, -100,101,108, 0,112,109, 97,112,116,111, 0,112,109, 97,112,116,111,110,101,103, 0,110,111,114,109, 97,112,115,112, 97, 99,101, - 0,119,104,105, 99,104, 95,111,117,116,112,117,116, 0, 98,114,117,115,104, 95,109, 97,112, 95,109,111,100,101, 0,114, 0,103, - 0, 98, 0,107, 0,100,101,102, 95,118, 97,114, 0, 99,111,108,102, 97, 99, 0,118, 97,114,102, 97, 99, 0,110,111,114,102, 97, - 99, 0,100,105,115,112,102, 97, 99, 0,119, 97,114,112,102, 97, 99, 0, 99,111,108,115,112,101, 99,102, 97, 99, 0,109,105,114, -114,102, 97, 99, 0, 97,108,112,104, 97,102, 97, 99, 0,100,105,102,102,102, 97, 99, 0,115,112,101, 99,102, 97, 99, 0,101,109, -105,116,102, 97, 99, 0,104, 97,114,100,102, 97, 99, 0,114, 97,121,109,105,114,114,102, 97, 99, 0,116,114, 97,110,115,108,102, - 97, 99, 0, 97,109, 98,102, 97, 99, 0, 99,111,108,101,109,105,116,102, 97, 99, 0, 99,111,108,114,101,102,108,102, 97, 99, 0, - 99,111,108,116,114, 97,110,115,102, 97, 99, 0,100,101,110,115,102, 97, 99, 0,115, 99, 97,116,116,101,114,102, 97, 99, 0,114, -101,102,108,102, 97, 99, 0,116,105,109,101,102, 97, 99, 0,108,101,110,103,116,104,102, 97, 99, 0, 99,108,117,109,112,102, 97, - 99, 0,100, 97,109,112,102, 97, 99, 0,107,105,110,107,102, 97, 99, 0,114,111,117,103,104,102, 97, 99, 0,112, 97,100,101,110, -115,102, 97, 99, 0,103,114, 97,118,105,116,121,102, 97, 99, 0,108,105,102,101,102, 97, 99, 0,115,105,122,101,102, 97, 99, 0, -105,118,101,108,102, 97, 99, 0,102,105,101,108,100,102, 97, 99, 0,115,104, 97,100,111,119,102, 97, 99, 0,122,101,110,117,112, -102, 97, 99, 0,122,101,110,100,111,119,110,102, 97, 99, 0, 98,108,101,110,100,102, 97, 99, 0, 42,104, 97,110,100,108,101, 0, - 42,112,110, 97,109,101, 0, 42,115,116,110, 97,109,101,115, 0,115,116,121,112,101,115, 0,118, 97,114,115, 0, 42,118, 97,114, -115,116,114, 0, 42,114,101,115,117,108,116, 0, 42, 99,102,114, 97, 0,100, 97,116, 97, 91, 51, 50, 93, 0, 40, 42,100,111,105, -116, 41, 40, 41, 0, 40, 42,105,110,115,116, 97,110, 99,101, 95,105,110,105,116, 41, 40, 41, 0, 40, 42, 99, 97,108,108, 98, 97, - 99,107, 41, 40, 41, 0,118,101,114,115,105,111,110, 0, 97, 0,105,112,111,116,121,112,101, 0, 42,105,109, 97, 0, 42, 99,117, - 98,101, 91, 54, 93, 0,105,109, 97,116, 91, 52, 93, 91, 52, 93, 0,111, 98,105,109, 97,116, 91, 51, 93, 91, 51, 93, 0,115,116, -121,112,101, 0,118,105,101,119,115, 99, 97,108,101, 0,110,111,116,108, 97,121, 0, 99,117, 98,101,114,101,115, 0,100,101,112, -116,104, 0,114,101, 99, 97,108, 99, 0,108, 97,115,116,115,105,122,101, 0,102, 97,108,108,111,102,102, 95,116,121,112,101, 0, -102, 97,108,108,111,102,102, 95,115,111,102,116,110,101,115,115, 0,114, 97,100,105,117,115, 0, 99,111,108,111,114, 95,115,111, -117,114, 99,101, 0,116,111,116,112,111,105,110,116,115, 0,112,100,112, 97,100, 0,112,115,121,115, 0,112,115,121,115, 95, 99, - 97, 99,104,101, 95,115,112, 97, 99,101, 0,111, 98, 95, 99, 97, 99,104,101, 95,115,112, 97, 99,101, 0, 42,112,111,105,110,116, - 95,116,114,101,101, 0, 42,112,111,105,110,116, 95,100, 97,116, 97, 0,110,111,105,115,101, 95,115,105,122,101, 0,110,111,105, -115,101, 95,100,101,112,116,104, 0,110,111,105,115,101, 95,105,110,102,108,117,101,110, 99,101, 0,110,111,105,115,101, 95, 98, - 97,115,105,115, 0,112,100,112, 97,100, 51, 91, 51, 93, 0,110,111,105,115,101, 95,102, 97, 99, 0,115,112,101,101,100, 95,115, - 99, 97,108,101, 0,102, 97,108,108,111,102,102, 95,115,112,101,101,100, 95,115, 99, 97,108,101, 0,112,100,112, 97,100, 50, 0, - 42, 99,111, 98, 97, 0, 42,102, 97,108,108,111,102,102, 95, 99,117,114,118,101, 0,114,101,115,111,108, 91, 51, 93, 0,105,110, -116,101,114,112, 95,116,121,112,101, 0,102,105,108,101, 95,102,111,114,109, 97,116, 0,101,120,116,101,110,100, 0,115,109,111, -107,101,100, 95,116,121,112,101, 0,105,110,116, 95,109,117,108,116,105,112,108,105,101,114, 0,115,116,105,108,108, 95,102,114, - 97,109,101, 0,115,111,117,114, 99,101, 95,112, 97,116,104, 91, 49, 48, 50, 52, 93, 0, 42,100, 97,116, 97,115,101,116, 0, 99, - 97, 99,104,101,100,102,114, 97,109,101, 0,111, 99,101, 97,110,109,111,100, 91, 54, 52, 93, 0,111,117,116,112,117,116, 0,110, -111,105,115,101,115,105,122,101, 0,116,117,114, 98,117,108, 0, 98,114,105,103,104,116, 0, 99,111,110,116,114, 97,115,116, 0, -115, 97,116,117,114, 97,116,105,111,110, 0,114,102, 97, 99, 0,103,102, 97, 99, 0, 98,102, 97, 99, 0,102,105,108,116,101,114, -115,105,122,101, 0,109,103, 95, 72, 0,109,103, 95,108, 97, 99,117,110, 97,114,105,116,121, 0,109,103, 95,111, 99,116, 97,118, -101,115, 0,109,103, 95,111,102,102,115,101,116, 0,109,103, 95,103, 97,105,110, 0,100,105,115,116, 95, 97,109,111,117,110,116, - 0,110,115, 95,111,117,116,115, 99, 97,108,101, 0,118,110, 95,119, 49, 0,118,110, 95,119, 50, 0,118,110, 95,119, 51, 0,118, -110, 95,119, 52, 0,118,110, 95,109,101,120,112, 0,118,110, 95,100,105,115,116,109, 0,118,110, 95, 99,111,108,116,121,112,101, - 0,110,111,105,115,101,100,101,112,116,104, 0,110,111,105,115,101,116,121,112,101, 0,110,111,105,115,101, 98, 97,115,105,115, - 0,110,111,105,115,101, 98, 97,115,105,115, 50, 0,105,109, 97,102,108, 97,103, 0, 99,114,111,112,120,109,105,110, 0, 99,114, -111,112,121,109,105,110, 0, 99,114,111,112,120,109, 97,120, 0, 99,114,111,112,121,109, 97,120, 0,116,101,120,102,105,108,116, -101,114, 0, 97,102,109, 97,120, 0,120,114,101,112,101, 97,116, 0,121,114,101,112,101, 97,116, 0, 99,104,101, 99,107,101,114, -100,105,115,116, 0,110, 97, 98,108, 97, 0,105,117,115,101,114, 0, 42,110,111,100,101,116,114,101,101, 0, 42,112,108,117,103, -105,110, 0, 42,101,110,118, 0, 42,112,100, 0, 42,118,100, 0, 42,111,116, 0,117,115,101, 95,110,111,100,101,115, 0,108,111, - 99, 91, 51, 93, 0,114,111,116, 91, 51, 93, 0,109, 97,116, 91, 52, 93, 91, 52, 93, 0,109,105,110, 91, 51, 93, 0,109, 97,120, - 91, 51, 93, 0, 99,111, 98, 97, 0, 98,108,101,110,100, 95, 99,111,108,111,114, 91, 51, 93, 0, 98,108,101,110,100, 95,102, 97, - 99,116,111,114, 0, 98,108,101,110,100, 95,116,121,112,101, 0,112, 97,100, 91, 51, 93, 0,109,111,100,101, 0,116,111,116,101, -120, 0,115,104,100,119,114, 0,115,104,100,119,103, 0,115,104,100,119, 98, 0,115,104,100,119,112, 97,100, 0,101,110,101,114, -103,121, 0,100,105,115,116, 0,115,112,111,116,115,105,122,101, 0,115,112,111,116, 98,108,101,110,100, 0,104, 97,105,110,116, - 0, 97,116,116, 49, 0, 97,116,116, 50, 0, 42, 99,117,114,102, 97,108,108,111,102,102, 0,115,104, 97,100,115,112,111,116,115, -105,122,101, 0, 98,105, 97,115, 0,115,111,102,116, 0, 99,111,109,112,114,101,115,115,116,104,114,101,115,104, 0,112, 97,100, - 53, 91, 51, 93, 0, 98,117,102,115,105,122,101, 0,115, 97,109,112, 0, 98,117,102,102,101,114,115, 0,102,105,108,116,101,114, -116,121,112,101, 0, 98,117,102,102,108, 97,103, 0, 98,117,102,116,121,112,101, 0,114, 97,121, 95,115, 97,109,112, 0,114, 97, -121, 95,115, 97,109,112,121, 0,114, 97,121, 95,115, 97,109,112,122, 0,114, 97,121, 95,115, 97,109,112, 95,116,121,112,101, 0, - 97,114,101, 97, 95,115,104, 97,112,101, 0, 97,114,101, 97, 95,115,105,122,101, 0, 97,114,101, 97, 95,115,105,122,101,121, 0, - 97,114,101, 97, 95,115,105,122,101,122, 0, 97,100, 97,112,116, 95,116,104,114,101,115,104, 0,114, 97,121, 95,115, 97,109,112, - 95,109,101,116,104,111,100, 0,116,101,120, 97, 99,116, 0,115,104, 97,100,104, 97,108,111,115,116,101,112, 0,115,117,110, 95, -101,102,102,101, 99,116, 95,116,121,112,101, 0,115,107,121, 98,108,101,110,100,116,121,112,101, 0,104,111,114,105,122,111,110, - 95, 98,114,105,103,104,116,110,101,115,115, 0,115,112,114,101, 97,100, 0,115,117,110, 95, 98,114,105,103,104,116,110,101,115, -115, 0,115,117,110, 95,115,105,122,101, 0, 98, 97, 99,107,115, 99, 97,116,116,101,114,101,100, 95,108,105,103,104,116, 0,115, -117,110, 95,105,110,116,101,110,115,105,116,121, 0, 97,116,109, 95,116,117,114, 98,105,100,105,116,121, 0, 97,116,109, 95,105, -110,115, 99, 97,116,116,101,114,105,110,103, 95,102, 97, 99,116,111,114, 0, 97,116,109, 95,101,120,116,105,110, 99,116,105,111, -110, 95,102, 97, 99,116,111,114, 0, 97,116,109, 95,100,105,115,116, 97,110, 99,101, 95,102, 97, 99,116,111,114, 0,115,107,121, - 98,108,101,110,100,102, 97, 99, 0,115,107,121, 95,101,120,112,111,115,117,114,101, 0,115,107,121, 95, 99,111,108,111,114,115, -112, 97, 99,101, 0,112, 97,100, 52, 91, 54, 93, 0, 42,109,116,101,120, 91, 49, 56, 93, 0,112,114, 95,116,101,120,116,117,114, -101, 0,112, 97,100, 54, 91, 52, 93, 0,100,101,110,115,105,116,121, 0,101,109,105,115,115,105,111,110, 0,115, 99, 97,116,116, -101,114,105,110,103, 0,114,101,102,108,101, 99,116,105,111,110, 0,101,109,105,115,115,105,111,110, 95, 99,111,108, 91, 51, 93, - 0,116,114, 97,110,115,109,105,115,115,105,111,110, 95, 99,111,108, 91, 51, 93, 0,114,101,102,108,101, 99,116,105,111,110, 95, - 99,111,108, 91, 51, 93, 0,100,101,110,115,105,116,121, 95,115, 99, 97,108,101, 0,100,101,112,116,104, 95, 99,117,116,111,102, -102, 0, 97,115,121,109,109,101,116,114,121, 0,115,116,101,112,115,105,122,101, 95,116,121,112,101, 0,115,104, 97,100,101,102, -108, 97,103, 0,115,104, 97,100,101, 95,116,121,112,101, 0,112,114,101, 99, 97, 99,104,101, 95,114,101,115,111,108,117,116,105, -111,110, 0,115,116,101,112,115,105,122,101, 0,109,115, 95,100,105,102,102, 0,109,115, 95,105,110,116,101,110,115,105,116,121, - 0,109,115, 95,115,112,114,101, 97,100, 0, 97,108,112,104, 97, 95, 98,108,101,110,100, 0,102, 97, 99,101, 95,111,114,105,101, -110,116, 97,116,105,111,110, 0,109, 97,116,101,114,105, 97,108, 95,116,121,112,101, 0,115,112,101, 99,114, 0,115,112,101, 99, -103, 0,115,112,101, 99, 98, 0,109,105,114,114, 0,109,105,114,103, 0,109,105,114, 98, 0, 97,109, 98,114, 0, 97,109, 98, 98, - 0, 97,109, 98,103, 0, 97,109, 98, 0,101,109,105,116, 0, 97,110,103, 0,115,112,101, 99,116,114, 97, 0,114, 97,121, 95,109, -105,114,114,111,114, 0, 97,108,112,104, 97, 0,114,101,102, 0,115,112,101, 99, 0,122,111,102,102,115, 0, 97,100,100, 0,116, -114, 97,110,115,108,117, 99,101,110, 99,121, 0,118,111,108, 0,103, 97,109,101, 0,102,114,101,115,110,101,108, 95,109,105,114, - 0,102,114,101,115,110,101,108, 95,109,105,114, 95,105, 0,102,114,101,115,110,101,108, 95,116,114, 97, 0,102,114,101,115,110, -101,108, 95,116,114, 97, 95,105, 0,102,105,108,116,101,114, 0,116,120, 95,108,105,109,105,116, 0,116,120, 95,102, 97,108,108, -111,102,102, 0,114, 97,121, 95,100,101,112,116,104, 0,114, 97,121, 95,100,101,112,116,104, 95,116,114, 97, 0,104, 97,114, 0, -115,101,101,100, 49, 0,115,101,101,100, 50, 0,103,108,111,115,115, 95,109,105,114, 0,103,108,111,115,115, 95,116,114, 97, 0, -115, 97,109,112, 95,103,108,111,115,115, 95,109,105,114, 0,115, 97,109,112, 95,103,108,111,115,115, 95,116,114, 97, 0, 97,100, - 97,112,116, 95,116,104,114,101,115,104, 95,109,105,114, 0, 97,100, 97,112,116, 95,116,104,114,101,115,104, 95,116,114, 97, 0, - 97,110,105,115,111, 95,103,108,111,115,115, 95,109,105,114, 0,100,105,115,116, 95,109,105,114, 0,102, 97,100,101,116,111, 95, -109,105,114, 0,115,104, 97,100,101, 95,102,108, 97,103, 0,109,111,100,101, 95,108, 0,102,108, 97,114,101, 99, 0,115,116, 97, -114, 99, 0,108,105,110,101, 99, 0,114,105,110,103, 99, 0,104, 97,115,105,122,101, 0,102,108, 97,114,101,115,105,122,101, 0, -115,117, 98,115,105,122,101, 0,102,108, 97,114,101, 98,111,111,115,116, 0,115,116,114, 97,110,100, 95,115,116, 97, 0,115,116, -114, 97,110,100, 95,101,110,100, 0,115,116,114, 97,110,100, 95,101, 97,115,101, 0,115,116,114, 97,110,100, 95,115,117,114,102, -110,111,114, 0,115,116,114, 97,110,100, 95,109,105,110, 0,115,116,114, 97,110,100, 95,119,105,100,116,104,102, 97,100,101, 0, -115,116,114, 97,110,100, 95,117,118,110, 97,109,101, 91, 54, 52, 93, 0,115, 98,105, 97,115, 0,108, 98,105, 97,115, 0,115,104, - 97,100, 95, 97,108,112,104, 97, 0,115,101,112,116,101,120, 0,114,103, 98,115,101,108, 0,112,114, 95,116,121,112,101, 0,112, -114, 95, 98, 97, 99,107, 0,112,114, 95,108, 97,109,112, 0,109,108, 95,102,108, 97,103, 0,100,105,102,102, 95,115,104, 97,100, -101,114, 0,115,112,101, 99, 95,115,104, 97,100,101,114, 0,114,111,117,103,104,110,101,115,115, 0,114,101,102,114, 97, 99, 0, -112, 97,114, 97,109, 91, 52, 93, 0,114,109,115, 0,100, 97,114,107,110,101,115,115, 0, 42,114, 97,109,112, 95, 99,111,108, 0, - 42,114, 97,109,112, 95,115,112,101, 99, 0,114, 97,109,112,105,110, 95, 99,111,108, 0,114, 97,109,112,105,110, 95,115,112,101, - 99, 0,114, 97,109,112, 98,108,101,110,100, 95, 99,111,108, 0,114, 97,109,112, 98,108,101,110,100, 95,115,112,101, 99, 0,114, - 97,109,112, 95,115,104,111,119, 0,114, 97,109,112,102, 97, 99, 95, 99,111,108, 0,114, 97,109,112,102, 97, 99, 95,115,112,101, - 99, 0, 42,103,114,111,117,112, 0,102,114,105, 99,116,105,111,110, 0,102,104, 0,114,101,102,108,101, 99,116, 0,102,104,100, -105,115,116, 0,120,121,102,114,105, 99,116, 0,100,121,110, 97,109,111,100,101, 0,115,115,115, 95,114, 97,100,105,117,115, 91, - 51, 93, 0,115,115,115, 95, 99,111,108, 91, 51, 93, 0,115,115,115, 95,101,114,114,111,114, 0,115,115,115, 95,115, 99, 97,108, -101, 0,115,115,115, 95,105,111,114, 0,115,115,115, 95, 99,111,108,102, 97, 99, 0,115,115,115, 95,116,101,120,102, 97, 99, 0, -115,115,115, 95,102,114,111,110,116, 0,115,115,115, 95, 98, 97, 99,107, 0,115,115,115, 95,102,108, 97,103, 0,115,115,115, 95, -112,114,101,115,101,116, 0,109, 97,112,116,111, 95,116,101,120,116,117,114,101,100, 0,115,104, 97,100,111,119,111,110,108,121, - 95,102,108, 97,103, 0,105,110,100,101,120, 0,103,112,117,109, 97,116,101,114,105, 97,108, 0, 42, 98, 98, 0,115,101,108, 99, -111,108, 49, 0,115,101,108, 99,111,108, 50, 0,113,117, 97,116, 91, 52, 93, 0,101,120,112,120, 0,101,120,112,121, 0,101,120, -112,122, 0,114, 97,100, 0,114, 97,100, 50, 0,115, 0, 42,109, 97,116, 0, 42,105,109, 97,116, 0,101,108,101,109,115, 0,100, -105,115,112, 0, 42,101,100,105,116,101,108,101,109,115, 0, 42, 42,109, 97,116, 0,102,108, 97,103, 50, 0,116,111,116, 99,111, -108, 0,119,105,114,101,115,105,122,101, 0,114,101,110,100,101,114,115,105,122,101, 0,116,104,114,101,115,104, 0, 42,108, 97, -115,116,101,108,101,109, 0,118,101, 99, 91, 51, 93, 91, 51, 93, 0, 97,108,102, 97, 0,119,101,105,103,104,116, 0,104, 49, 0, -104, 50, 0,102, 49, 0,102, 50, 0,102, 51, 0,104,105,100,101, 0,118,101, 99, 91, 52, 93, 0,109, 97,116, 95,110,114, 0,112, -110,116,115,117, 0,112,110,116,115,118, 0,114,101,115,111,108,117, 0,114,101,115,111,108,118, 0,111,114,100,101,114,117, 0, -111,114,100,101,114,118, 0,102,108, 97,103,117, 0,102,108, 97,103,118, 0, 42,107,110,111,116,115,117, 0, 42,107,110,111,116, -115,118, 0,116,105,108,116, 95,105,110,116,101,114,112, 0,114, 97,100,105,117,115, 95,105,110,116,101,114,112, 0, 99,104, 97, -114,105,100,120, 0,107,101,114,110, 0,119, 0,104, 0,110,117,114, 98,115, 0, 42,107,101,121,105,110,100,101,120, 0,115,104, - 97,112,101,110,114, 0,110,117,114, 98, 0, 42,101,100,105,116,110,117,114, 98, 0, 42, 98,101,118,111, 98,106, 0, 42,116, 97, -112,101,114,111, 98,106, 0, 42,116,101,120,116,111,110, 99,117,114,118,101, 0, 42,112, 97,116,104, 0, 42,107,101,121, 0, 98, -101,118, 0,100,114, 97,119,102,108, 97,103, 0,116,119,105,115,116, 95,109,111,100,101, 0,116,119,105,115,116, 95,115,109,111, -111,116,104, 0,115,109, 97,108,108, 99, 97,112,115, 95,115, 99, 97,108,101, 0,112, 97,116,104,108,101,110, 0, 98,101,118,114, -101,115,111,108, 0,119,105,100,116,104, 0,101,120,116, 49, 0,101,120,116, 50, 0,114,101,115,111,108,117, 95,114,101,110, 0, -114,101,115,111,108,118, 95,114,101,110, 0, 97, 99,116,110,117, 0, 42,108, 97,115,116,115,101,108, 0,115,112, 97, 99,101,109, -111,100,101, 0,115,112, 97, 99,105,110,103, 0,108,105,110,101,100,105,115,116, 0,115,104,101, 97,114, 0,102,115,105,122,101, - 0,119,111,114,100,115,112, 97, 99,101, 0,117,108,112,111,115, 0,117,108,104,101,105,103,104,116, 0,120,111,102, 0,121,111, -102, 0,108,105,110,101,119,105,100,116,104, 0, 42,115,116,114, 0, 42,115,101,108, 98,111,120,101,115, 0, 42,101,100,105,116, -102,111,110,116, 0,102, 97,109,105,108,121, 91, 50, 52, 93, 0, 42,118,102,111,110,116, 0, 42,118,102,111,110,116, 98, 0, 42, -118,102,111,110,116,105, 0, 42,118,102,111,110,116, 98,105, 0,115,101,112, 99,104, 97,114, 0, 99,116,105,109,101, 0,116,111, -116, 98,111,120, 0, 97, 99,116, 98,111,120, 0, 42,116, 98, 0,115,101,108,115,116, 97,114,116, 0,115,101,108,101,110,100, 0, - 42,115,116,114,105,110,102,111, 0, 99,117,114,105,110,102,111, 0, 42,109,112,111,108,121, 0, 42,109,116,112,111,108,121, 0, - 42,109,108,111,111,112, 0, 42,109,108,111,111,112,117,118, 0, 42,109,108,111,111,112, 99,111,108, 0, 42,109,102, 97, 99,101, - 0, 42,109,116,102, 97, 99,101, 0, 42,116,102, 97, 99,101, 0, 42,109,118,101,114,116, 0, 42,109,101,100,103,101, 0, 42,100, -118,101,114,116, 0, 42,109, 99,111,108, 0, 42,109,115,116,105, 99,107,121, 0, 42,116,101,120, 99,111,109,101,115,104, 0, 42, -109,115,101,108,101, 99,116, 0, 42,101,100,105,116, 95, 98,116,109,101,115,104, 0,118,100, 97,116, 97, 0,101,100, 97,116, 97, - 0,102,100, 97,116, 97, 0,112,100, 97,116, 97, 0,108,100, 97,116, 97, 0,116,111,116,101,100,103,101, 0,116,111,116,102, 97, - 99,101, 0,116,111,116,115,101,108,101, 99,116, 0,116,111,116,112,111,108,121, 0,116,111,116,108,111,111,112, 0, 97, 99,116, - 95,102, 97, 99,101, 0,115,109,111,111,116,104,114,101,115,104, 0,115,117, 98,100,105,118, 0,115,117, 98,100,105,118,114, 0, -115,117, 98,115,117,114,102,116,121,112,101, 0,101,100,105,116,102,108, 97,103, 0, 42,109,114, 0, 42,116,112, 97,103,101, 0, -117,118, 91, 52, 93, 91, 50, 93, 0, 99,111,108, 91, 52, 93, 0,116,114, 97,110,115,112, 0,116,105,108,101, 0,117,110,119,114, - 97,112, 0,118, 49, 0,118, 50, 0,118, 51, 0,118, 52, 0,101,100, 99,111,100,101, 0, 99,114,101, 97,115,101, 0, 98,119,101, -105,103,104,116, 0,100,101,102, 95,110,114, 0, 42,100,119, 0,116,111,116,119,101,105,103,104,116, 0, 99,111, 91, 51, 93, 0, -110,111, 91, 51, 93, 0,108,111,111,112,115,116, 97,114,116, 0,118, 0,101, 0,117,118, 91, 50, 93, 0, 99,111, 91, 50, 93, 0, -102, 0,105, 0,115, 91, 50, 53, 54, 93, 0,116,111,116,100,105,115,112, 0, 40, 42,100,105,115,112,115, 41, 40, 41, 0,118, 91, - 52, 93, 0,109,105,100, 0,112, 97,100, 91, 50, 93, 0,118, 91, 50, 93, 0, 42,102, 97, 99,101,115, 0, 42, 99,111,108,102, 97, - 99,101,115, 0, 42,101,100,103,101,115, 0, 42,118,101,114,116,115, 0,108,101,118,101,108,115, 0,108,101,118,101,108, 95, 99, -111,117,110,116, 0, 99,117,114,114,101,110,116, 0,110,101,119,108,118,108, 0,101,100,103,101,108,118,108, 0,112,105,110,108, -118,108, 0,114,101,110,100,101,114,108,118,108, 0,117,115,101, 95, 99,111,108, 0, 42,101,100,103,101, 95,102,108, 97,103,115, - 0, 42,101,100,103,101, 95, 99,114,101, 97,115,101,115, 0,115,116, 97, 99,107,105,110,100,101,120, 0, 42,101,114,114,111,114, - 0,109,111,100,105,102,105,101,114, 0, 42,116,101,120,116,117,114,101, 0, 42,109, 97,112, 95,111, 98,106,101, 99,116, 0,117, -118,108, 97,121,101,114, 95,110, 97,109,101, 91, 54, 52, 93, 0,117,118,108, 97,121,101,114, 95,116,109,112, 0,116,101,120,109, - 97,112,112,105,110,103, 0,115,117, 98,100,105,118, 84,121,112,101, 0,114,101,110,100,101,114, 76,101,118,101,108,115, 0, 42, -101,109, 67, 97, 99,104,101, 0, 42,109, 67, 97, 99,104,101, 0,100,101,102, 97,120,105,115, 0,112, 97,100, 91, 54, 93, 0,108, -101,110,103,116,104, 0,114, 97,110,100,111,109,105,122,101, 0,115,101,101,100, 0, 42,111, 98, 95, 97,114,109, 0, 42,115,116, - 97,114,116, 95, 99, 97,112, 0, 42,101,110,100, 95, 99, 97,112, 0, 42, 99,117,114,118,101, 95,111, 98, 0, 42,111,102,102,115, -101,116, 95,111, 98, 0,111,102,102,115,101,116, 91, 51, 93, 0,115, 99, 97,108,101, 91, 51, 93, 0,109,101,114,103,101, 95,100, -105,115,116, 0,102,105,116, 95,116,121,112,101, 0,111,102,102,115,101,116, 95,116,121,112,101, 0, 99,111,117,110,116, 0, 97, -120,105,115, 0,116,111,108,101,114, 97,110, 99,101, 0, 42,109,105,114,114,111,114, 95,111, 98, 0,115,112,108,105,116, 95, 97, -110,103,108,101, 0,118, 97,108,117,101, 0,114,101,115, 0,118, 97,108, 95,102,108, 97,103,115, 0,108,105,109, 95,102,108, 97, -103,115, 0,101, 95,102,108, 97,103,115, 0, 98,101,118,101,108, 95, 97,110,103,108,101, 0,100,101,102,103,114,112, 95,110, 97, -109,101, 91, 54, 52, 93, 0, 42,100,111,109, 97,105,110, 0, 42,102,108,111,119, 0, 42, 99,111,108,108, 0,116,105,109,101, 0, -115,116,114,101,110,103,116,104, 0,100,105,114,101, 99,116,105,111,110, 0,109,105,100,108,101,118,101,108, 0, 42,112,114,111, -106,101, 99,116,111,114,115, 91, 49, 48, 93, 0, 42,105,109, 97,103,101, 0,110,117,109, 95,112,114,111,106,101, 99,116,111,114, -115, 0, 97,115,112,101, 99,116,120, 0, 97,115,112,101, 99,116,121, 0,115, 99, 97,108,101,120, 0,115, 99, 97,108,101,121, 0, -112,101,114, 99,101,110,116, 0,102, 97, 99,101, 67,111,117,110,116, 0,102, 97, 99, 0,114,101,112,101, 97,116, 0, 42,111, 98, -106,101, 99,116, 99,101,110,116,101,114, 0,115,116, 97,114,116,120, 0,115,116, 97,114,116,121, 0,104,101,105,103,104,116, 0, -110, 97,114,114,111,119, 0,115,112,101,101,100, 0,100, 97,109,112, 0,102, 97,108,108,111,102,102, 0,116,105,109,101,111,102, -102,115, 0,108,105,102,101,116,105,109,101, 0,100,101,102,111,114,109,102,108, 97,103, 0,109,117,108,116,105, 0, 42,112,114, -101,118, 67,111,115, 0,115,117, 98,116, 97,114,103,101,116, 91, 54, 52, 93, 0,112, 97,114,101,110,116,105,110,118, 91, 52, 93, - 91, 52, 93, 0, 99,101,110,116, 91, 51, 93, 0, 42,105,110,100,101,120, 97,114, 0,116,111,116,105,110,100,101,120, 0,102,111, -114, 99,101, 0, 42, 99,108,111,116,104, 79, 98,106,101, 99,116, 0, 42,115,105,109, 95,112, 97,114,109,115, 0, 42, 99,111,108, -108, 95,112, 97,114,109,115, 0, 42,112,111,105,110,116, 95, 99, 97, 99,104,101, 0,112,116, 99, 97, 99,104,101,115, 0, 42,120, - 0, 42,120,110,101,119, 0, 42,120,111,108,100, 0, 42, 99,117,114,114,101,110,116, 95,120,110,101,119, 0, 42, 99,117,114,114, -101,110,116, 95,120, 0, 42, 99,117,114,114,101,110,116, 95,118, 0, 42,109,102, 97, 99,101,115, 0,110,117,109,118,101,114,116, -115, 0,110,117,109,102, 97, 99,101,115, 0,116,105,109,101, 95,120, 0,116,105,109,101, 95,120,110,101,119, 0, 42, 98,118,104, -116,114,101,101, 0, 42,118, 0, 42,100,109, 0, 99,102,114, 97, 0,111,112,101,114, 97,116,105,111,110, 0,118,101,114,116,101, -120, 0,116,111,116,105,110,102,108,117,101,110, 99,101, 0,103,114,105,100,115,105,122,101, 0, 42, 98,105,110,100,105,110,102, -108,117,101,110, 99,101,115, 0, 42, 98,105,110,100,111,102,102,115,101,116,115, 0, 42, 98,105,110,100, 99, 97,103,101, 99,111, -115, 0,116,111,116, 99, 97,103,101,118,101,114,116, 0, 42,100,121,110,103,114,105,100, 0, 42,100,121,110,105,110,102,108,117, -101,110, 99,101,115, 0, 42,100,121,110,118,101,114,116,115, 0, 42,112, 97,100, 50, 0,100,121,110,103,114,105,100,115,105,122, -101, 0,100,121,110, 99,101,108,108,109,105,110, 91, 51, 93, 0,100,121,110, 99,101,108,108,119,105,100,116,104, 0, 98,105,110, -100,109, 97,116, 91, 52, 93, 91, 52, 93, 0, 42, 98,105,110,100,119,101,105,103,104,116,115, 0, 42, 98,105,110,100, 99,111,115, - 0, 40, 42, 98,105,110,100,102,117,110, 99, 41, 40, 41, 0, 42,112,115,121,115, 0,116,111,116,100,109,118,101,114,116, 0,116, -111,116,100,109,101,100,103,101, 0,116,111,116,100,109,102, 97, 99,101, 0,112,111,115,105,116,105,111,110, 0,114, 97,110,100, -111,109, 95,112,111,115,105,116,105,111,110, 0, 42,102, 97, 99,101,112, 97, 0,118,103,114,111,117,112, 0,112,114,111,116,101, - 99,116, 0,108,118,108, 0,115, 99,117,108,112,116,108,118,108, 0,116,111,116,108,118,108, 0,115,105,109,112,108,101, 0, 42, -102,115,115, 0, 42,116, 97,114,103,101,116, 0, 42, 97,117,120, 84, 97,114,103,101,116, 0,118,103,114,111,117,112, 95,110, 97, -109,101, 91, 54, 52, 93, 0,107,101,101,112, 68,105,115,116, 0,115,104,114,105,110,107, 84,121,112,101, 0,115,104,114,105,110, -107, 79,112,116,115, 0,112,114,111,106, 65,120,105,115, 0,115,117, 98,115,117,114,102, 76,101,118,101,108,115, 0, 42,111,114, -105,103,105,110, 0,102, 97, 99,116,111,114, 0,108,105,109,105,116, 91, 50, 93, 0,111,114,105,103,105,110, 79,112,116,115, 0, -111,102,102,115,101,116, 95,102, 97, 99, 0,111,102,102,115,101,116, 95,102, 97, 99, 95,118,103, 0, 99,114,101, 97,115,101, 95, -105,110,110,101,114, 0, 99,114,101, 97,115,101, 95,111,117,116,101,114, 0, 99,114,101, 97,115,101, 95,114,105,109, 0,109, 97, -116, 95,111,102,115, 0,109, 97,116, 95,111,102,115, 95,114,105,109, 0, 42,111, 98, 95, 97,120,105,115, 0,115,116,101,112,115, - 0,114,101,110,100,101,114, 95,115,116,101,112,115, 0,105,116,101,114, 0,115, 99,114,101,119, 95,111,102,115, 0, 97,110,103, -108,101, 0, 42,111, 99,101, 97,110, 0, 42,111, 99,101, 97,110, 99, 97, 99,104,101, 0,114,101,115,111,108,117,116,105,111,110, - 0,115,112, 97,116,105, 97,108, 95,115,105,122,101, 0,119,105,110,100, 95,118,101,108,111, 99,105,116,121, 0,115,109, 97,108, -108,101,115,116, 95,119, 97,118,101, 0,119, 97,118,101, 95, 97,108,105,103,110,109,101,110,116, 0,119, 97,118,101, 95,100,105, -114,101, 99,116,105,111,110, 0,119, 97,118,101, 95,115, 99, 97,108,101, 0, 99,104,111,112, 95, 97,109,111,117,110,116, 0,102, -111, 97,109, 95, 99,111,118,101,114, 97,103,101, 0, 98, 97,107,101,115,116, 97,114,116, 0, 98, 97,107,101,101,110,100, 0, 99, - 97, 99,104,101,112, 97,116,104, 91, 49, 48, 50, 52, 93, 0,102,111, 97,109,108, 97,121,101,114,110, 97,109,101, 91, 54, 52, 93, - 0, 99, 97, 99,104,101,100, 0,103,101,111,109,101,116,114,121, 95,109,111,100,101, 0,114,101,102,114,101,115,104, 0,114,101, -112,101, 97,116, 95,120, 0,114,101,112,101, 97,116, 95,121, 0,102,111, 97,109, 95,102, 97,100,101, 0,112, 97,100, 48, 0, 42, -111, 98,106,101, 99,116, 95,102,114,111,109, 0, 42,111, 98,106,101, 99,116, 95,116,111, 0,102, 97,108,108,111,102,102, 95,114, - 97,100,105,117,115, 0,101,100,105,116, 95,102,108, 97,103,115, 0,100,101,102, 97,117,108,116, 95,119,101,105,103,104,116, 0, - 42, 99,109, 97,112, 95, 99,117,114,118,101, 0, 97,100,100, 95,116,104,114,101,115,104,111,108,100, 0,114,101,109, 95,116,104, -114,101,115,104,111,108,100, 0,109, 97,115,107, 95, 99,111,110,115,116, 97,110,116, 0,109, 97,115,107, 95,100,101,102,103,114, -112, 95,110, 97,109,101, 91, 54, 52, 93, 0,109, 97,115,107, 95,116,101,120, 95,117,115,101, 95, 99,104, 97,110,110,101,108, 0, - 42,109, 97,115,107, 95,116,101,120,116,117,114,101, 0, 42,109, 97,115,107, 95,116,101,120, 95,109, 97,112, 95,111, 98,106, 0, -109, 97,115,107, 95,116,101,120, 95,109, 97,112,112,105,110,103, 0,109, 97,115,107, 95,116,101,120, 95,117,118,108, 97,121,101, -114, 95,110, 97,109,101, 91, 54, 52, 93, 0,112, 97,100, 95,105, 49, 0,100,101,102,103,114,112, 95,110, 97,109,101, 95, 97, 91, - 54, 52, 93, 0,100,101,102,103,114,112, 95,110, 97,109,101, 95, 98, 91, 54, 52, 93, 0,100,101,102, 97,117,108,116, 95,119,101, -105,103,104,116, 95, 97, 0,100,101,102, 97,117,108,116, 95,119,101,105,103,104,116, 95, 98, 0,109,105,120, 95,109,111,100,101, - 0,109,105,120, 95,115,101,116, 0,112, 97,100, 95, 99, 49, 91, 54, 93, 0,112,114,111,120,105,109,105,116,121, 95,109,111,100, -101, 0,112,114,111,120,105,109,105,116,121, 95,102,108, 97,103,115, 0, 42,112,114,111,120,105,109,105,116,121, 95,111, 98, 95, -116, 97,114,103,101,116, 0,109,105,110, 95,100,105,115,116, 0,109, 97,120, 95,100,105,115,116, 0,112, 97,100, 95,115, 49, 0, - 42, 99, 97,110,118, 97,115, 0, 42, 98,114,117,115,104, 0,116,104,114,101,115,104,111,108,100, 0,115, 99, 97,108,101, 0,104, -101,114,109,105,116,101, 95,110,117,109, 0, 42,108, 97,116,116, 0,112,110,116,115,119, 0,111,112,110,116,115,117, 0,111,112, -110,116,115,118, 0,111,112,110,116,115,119, 0,116,121,112,101,117, 0,116,121,112,101,118, 0,116,121,112,101,119, 0,102,117, - 0,102,118, 0,102,119, 0,100,117, 0,100,118, 0,100,119, 0, 42,100,101,102, 0, 42,108, 97,116,116,105, 99,101,100, 97,116, - 97, 0,108, 97,116,109, 97,116, 91, 52, 93, 91, 52, 93, 0, 42,101,100,105,116,108, 97,116,116, 0,118,101, 99, 91, 56, 93, 91, - 51, 93, 0, 42,115, 99,117,108,112,116, 0,112, 97,114,116,121,112,101, 0,112, 97,114, 49, 0,112, 97,114, 50, 0,112, 97,114, - 51, 0,112, 97,114,115,117, 98,115,116,114, 91, 54, 52, 93, 0, 42,116,114, 97, 99,107, 0, 42,112,114,111,120,121, 0, 42,112, -114,111,120,121, 95,103,114,111,117,112, 0, 42,112,114,111,120,121, 95,102,114,111,109, 0, 42, 97, 99,116,105,111,110, 0, 42, -112,111,115,101,108,105, 98, 0, 42,112,111,115,101, 0, 42,103,112,100, 0, 97,118,115, 0, 42,109,112, 97,116,104, 0, 99,111, -110,115,116,114, 97,105,110,116, 67,104, 97,110,110,101,108,115, 0,101,102,102,101, 99,116, 0,100,101,102, 98, 97,115,101, 0, -109,111,100,105,102,105,101,114,115, 0,114,101,115,116,111,114,101, 95,109,111,100,101, 0, 42,109, 97,116, 98,105,116,115, 0, - 97, 99,116, 99,111,108, 0,100,108,111, 99, 91, 51, 93, 0,111,114,105,103, 91, 51, 93, 0,100,115,105,122,101, 91, 51, 93, 0, -100,115, 99, 97,108,101, 91, 51, 93, 0,100,114,111,116, 91, 51, 93, 0,100,113,117, 97,116, 91, 52, 93, 0,114,111,116, 65,120, -105,115, 91, 51, 93, 0,100,114,111,116, 65,120,105,115, 91, 51, 93, 0,114,111,116, 65,110,103,108,101, 0,100,114,111,116, 65, -110,103,108,101, 0,111, 98,109, 97,116, 91, 52, 93, 91, 52, 93, 0, 99,111,110,115,116,105,110,118, 91, 52, 93, 91, 52, 93, 0, -105,109, 97,116, 95,114,101,110, 91, 52, 93, 91, 52, 93, 0,108, 97,121, 0,112, 97,100, 54, 0, 99,111,108, 98,105,116,115, 0, -116,114, 97,110,115,102,108, 97,103, 0,112,114,111,116,101, 99,116,102,108, 97,103, 0,116,114, 97, 99,107,102,108, 97,103, 0, -117,112,102,108, 97,103, 0,110,108, 97,102,108, 97,103, 0,105,112,111,102,108, 97,103, 0,115, 99, 97,102,108, 97,103, 0,115, - 99, 97,118,105,115,102,108, 97,103, 0,112, 97,100, 53, 0,100,117,112,111,110, 0,100,117,112,111,102,102, 0,100,117,112,115, -116, 97, 0,100,117,112,101,110,100, 0,115,102, 0,109, 97,115,115, 0,100, 97,109,112,105,110,103, 0,105,110,101,114,116,105, - 97, 0,102,111,114,109,102, 97, 99,116,111,114, 0,114,100, 97,109,112,105,110,103, 0,109, 97,114,103,105,110, 0,109, 97,120, - 95,118,101,108, 0,109,105,110, 95,118,101,108, 0,109, 95, 99,111,110,116, 97, 99,116, 80,114,111, 99,101,115,115,105,110,103, - 84,104,114,101,115,104,111,108,100, 0,111, 98,115,116, 97, 99,108,101, 82, 97,100, 0,114,111,116,109,111,100,101, 0, 98,111, -117,110,100,116,121,112,101, 0, 99,111,108,108,105,115,105,111,110, 95, 98,111,117,110,100,116,121,112,101, 0,114,101,115,116, -114,105, 99,116,102,108, 97,103, 0,100,116, 0,101,109,112,116,121, 95,100,114, 97,119,116,121,112,101, 0,101,109,112,116,121, - 95,100,114, 97,119,115,105,122,101, 0,100,117,112,102, 97, 99,101,115, 99, 97, 0,112,114,111,112, 0,115,101,110,115,111,114, -115, 0, 99,111,110,116,114,111,108,108,101,114,115, 0, 97, 99,116,117, 97,116,111,114,115, 0, 98, 98,115,105,122,101, 91, 51, - 93, 0, 97, 99,116,100,101,102, 0,103, 97,109,101,102,108, 97,103, 0,103, 97,109,101,102,108, 97,103, 50, 0, 42, 98,115,111, -102,116, 0,115,111,102,116,102,108, 97,103, 0, 97,110,105,115,111,116,114,111,112,105, 99, 70,114,105, 99,116,105,111,110, 91, - 51, 93, 0, 99,111,110,115,116,114, 97,105,110,116,115, 0,110,108, 97,115,116,114,105,112,115, 0,104,111,111,107,115, 0,112, - 97,114,116,105, 99,108,101,115,121,115,116,101,109, 0, 42,115,111,102,116, 0, 42,100,117,112, 95,103,114,111,117,112, 0, 98, -111,100,121, 95,116,121,112,101, 0,115,104, 97,112,101,102,108, 97,103, 0, 42,102,108,117,105,100,115,105,109, 83,101,116,116, -105,110,103,115, 0, 42,100,101,114,105,118,101,100, 68,101,102,111,114,109, 0, 42,100,101,114,105,118,101,100, 70,105,110, 97, -108, 0,108, 97,115,116, 68, 97,116, 97, 77, 97,115,107, 0, 99,117,115,116,111,109,100, 97,116, 97, 95,109, 97,115,107, 0,115, -116, 97,116,101, 0,105,110,105,116, 95,115,116, 97,116,101, 0,103,112,117,108, 97,109,112, 0,112, 99, 95,105,100,115, 0, 42, -100,117,112,108,105,108,105,115,116, 0,105,109, 97, 95,111,102,115, 91, 50, 93, 0, 99,117,114,105,110,100,101,120, 0, 97, 99, -116,105,118,101, 0,111,114,105,103,108, 97,121, 0,111,109, 97,116, 91, 52, 93, 91, 52, 93, 0,111,114, 99,111, 91, 51, 93, 0, -110,111, 95,100,114, 97,119, 0, 97,110,105,109, 97,116,101,100, 0,100,101,102,108,101, 99,116, 0,102,111,114, 99,101,102,105, -101,108,100, 0,115,104, 97,112,101, 0,116,101,120, 95,109,111,100,101, 0,107,105,110,107, 0,107,105,110,107, 95, 97,120,105, -115, 0,122,100,105,114, 0,102, 95,115,116,114,101,110,103,116,104, 0,102, 95,100, 97,109,112, 0,102, 95,102,108,111,119, 0, -102, 95,115,105,122,101, 0,102, 95,112,111,119,101,114, 0,109, 97,120,100,105,115,116, 0,109,105,110,100,105,115,116, 0,102, - 95,112,111,119,101,114, 95,114, 0,109, 97,120,114, 97,100, 0,109,105,110,114, 97,100, 0,112,100,101,102, 95,100, 97,109,112, - 0,112,100,101,102, 95,114,100, 97,109,112, 0,112,100,101,102, 95,112,101,114,109, 0,112,100,101,102, 95,102,114,105, 99,116, - 0,112,100,101,102, 95,114,102,114,105, 99,116, 0,112,100,101,102, 95,115,116,105, 99,107,110,101,115,115, 0, 97, 98,115,111, -114,112,116,105,111,110, 0,112,100,101,102, 95,115, 98,100, 97,109,112, 0,112,100,101,102, 95,115, 98,105,102,116, 0,112,100, -101,102, 95,115, 98,111,102,116, 0, 99,108,117,109,112, 95,102, 97, 99, 0, 99,108,117,109,112, 95,112,111,119, 0,107,105,110, -107, 95,102,114,101,113, 0,107,105,110,107, 95,115,104, 97,112,101, 0,107,105,110,107, 95, 97,109,112, 0,102,114,101,101, 95, -101,110,100, 0,116,101,120, 95,110, 97, 98,108, 97, 0, 42,114,110,103, 0,102, 95,110,111,105,115,101, 0,119,101,105,103,104, -116, 91, 49, 51, 93, 0,103,108,111, 98, 97,108, 95,103,114, 97,118,105,116,121, 0,114,116, 91, 51, 93, 0,116,111,116,100, 97, -116, 97, 0,102,114, 97,109,101, 0,116,111,116,112,111,105,110,116, 0,100, 97,116, 97, 95,116,121,112,101,115, 0, 42,100, 97, -116, 97, 91, 56, 93, 0, 42, 99,117,114, 91, 56, 93, 0,101,120,116,114, 97,100, 97,116, 97, 0,115,116,101,112, 0,115,105,109, -102,114, 97,109,101, 0,115,116, 97,114,116,102,114, 97,109,101, 0,101,110,100,102,114, 97,109,101, 0,101,100,105,116,102,114, - 97,109,101, 0,108, 97,115,116, 95,101,120, 97, 99,116, 0,108, 97,115,116, 95,118, 97,108,105,100, 0, 99,111,109,112,114,101, -115,115,105,111,110, 0,112,114,101,118, 95,110, 97,109,101, 91, 54, 52, 93, 0,105,110,102,111, 91, 54, 52, 93, 0,112, 97,116, -104, 91, 49, 48, 50, 52, 93, 0, 42, 99, 97, 99,104,101,100, 95,102,114, 97,109,101,115, 0,109,101,109, 95, 99, 97, 99,104,101, - 0, 42,101,100,105,116, 0, 40, 42,102,114,101,101, 95,101,100,105,116, 41, 40, 41, 0,108,105,110, 83,116,105,102,102, 0, 97, -110,103, 83,116,105,102,102, 0,118,111,108,117,109,101, 0,118,105,116,101,114, 97,116,105,111,110,115, 0,112,105,116,101,114, - 97,116,105,111,110,115, 0,100,105,116,101,114, 97,116,105,111,110,115, 0, 99,105,116,101,114, 97,116,105,111,110,115, 0,107, - 83, 82, 72, 82, 95, 67, 76, 0,107, 83, 75, 72, 82, 95, 67, 76, 0,107, 83, 83, 72, 82, 95, 67, 76, 0,107, 83, 82, 95, 83, 80, - 76, 84, 95, 67, 76, 0,107, 83, 75, 95, 83, 80, 76, 84, 95, 67, 76, 0,107, 83, 83, 95, 83, 80, 76, 84, 95, 67, 76, 0,107, 86, - 67, 70, 0,107, 68, 80, 0,107, 68, 71, 0,107, 76, 70, 0,107, 80, 82, 0,107, 86, 67, 0,107, 68, 70, 0,107, 77, 84, 0,107, - 67, 72, 82, 0,107, 75, 72, 82, 0,107, 83, 72, 82, 0,107, 65, 72, 82, 0, 99,111,108,108,105,115,105,111,110,102,108, 97,103, -115, 0,110,117,109, 99,108,117,115,116,101,114,105,116,101,114, 97,116,105,111,110,115, 0,119,101,108,100,105,110,103, 0,116, -111,116,115,112,114,105,110,103, 0, 42, 98,112,111,105,110,116, 0, 42, 98,115,112,114,105,110,103, 0,109,115,103, 95,108,111, - 99,107, 0,109,115,103, 95,118, 97,108,117,101, 0,110,111,100,101,109, 97,115,115, 0,110, 97,109,101,100, 86, 71, 95, 77, 97, -115,115, 91, 54, 52, 93, 0,103,114, 97,118, 0,109,101,100,105, 97,102,114,105, 99,116, 0,114,107,108,105,109,105,116, 0,112, -104,121,115,105, 99,115, 95,115,112,101,101,100, 0,103,111, 97,108,115,112,114,105,110,103, 0,103,111, 97,108,102,114,105, 99, -116, 0,109,105,110,103,111, 97,108, 0,109, 97,120,103,111, 97,108, 0,100,101,102,103,111, 97,108, 0,118,101,114,116,103,114, -111,117,112, 0,110, 97,109,101,100, 86, 71, 95, 83,111,102,116,103,111, 97,108, 91, 54, 52, 93, 0,102,117,122,122,121,110,101, -115,115, 0,105,110,115,112,114,105,110,103, 0,105,110,102,114,105, 99,116, 0,110, 97,109,101,100, 86, 71, 95, 83,112,114,105, -110,103, 95, 75, 91, 54, 52, 93, 0,101,102,114, 97, 0,105,110,116,101,114,118, 97,108, 0,108,111, 99, 97,108, 0,115,111,108, -118,101,114,102,108, 97,103,115, 0, 42, 42,107,101,121,115, 0,116,111,116,112,111,105,110,116,107,101,121, 0,115,101, 99,111, -110,100,115,112,114,105,110,103, 0, 99,111,108, 98, 97,108,108, 0, 98, 97,108,108,100, 97,109,112, 0, 98, 97,108,108,115,116, -105,102,102, 0,115, 98, 99, 95,109,111,100,101, 0, 97,101,114,111,101,100,103,101, 0,109,105,110,108,111,111,112,115, 0,109, - 97,120,108,111,111,112,115, 0, 99,104,111,107,101, 0,115,111,108,118,101,114, 95, 73, 68, 0,112,108, 97,115,116,105, 99, 0, -115,112,114,105,110,103,112,114,101,108,111, 97,100, 0, 42,115, 99,114, 97,116, 99,104, 0,115,104,101, 97,114,115,116,105,102, -102, 0,105,110,112,117,115,104, 0, 42,112,111,105,110,116, 99, 97, 99,104,101, 0, 42,101,102,102,101, 99,116,111,114, 95,119, -101,105,103,104,116,115, 0,108, 99,111,109, 91, 51, 93, 0,108,114,111,116, 91, 51, 93, 91, 51, 93, 0,108,115, 99, 97,108,101, - 91, 51, 93, 91, 51, 93, 0,108, 97,115,116, 95,102,114, 97,109,101, 0,118,101,108, 91, 51, 93, 0, 42,102,109,100, 0,115,104, -111,119, 95, 97,100,118, 97,110, 99,101,100,111,112,116,105,111,110,115, 0,114,101,115,111,108,117,116,105,111,110,120,121,122, - 0,112,114,101,118,105,101,119,114,101,115,120,121,122, 0,114,101, 97,108,115,105,122,101, 0,103,117,105, 68,105,115,112,108, - 97,121, 77,111,100,101, 0,114,101,110,100,101,114, 68,105,115,112,108, 97,121, 77,111,100,101, 0,118,105,115, 99,111,115,105, -116,121, 86, 97,108,117,101, 0,118,105,115, 99,111,115,105,116,121, 77,111,100,101, 0,118,105,115, 99,111,115,105,116,121, 69, -120,112,111,110,101,110,116, 0,103,114, 97,118, 91, 51, 93, 0, 97,110,105,109, 83,116, 97,114,116, 0, 97,110,105,109, 69,110, -100, 0, 98, 97,107,101, 83,116, 97,114,116, 0, 98, 97,107,101, 69,110,100, 0,102,114, 97,109,101, 79,102,102,115,101,116, 0, -103,115,116, 97,114, 0,109, 97,120, 82,101,102,105,110,101, 0,105,110,105, 86,101,108,120, 0,105,110,105, 86,101,108,121, 0, -105,110,105, 86,101,108,122, 0, 42,111,114,103, 77,101,115,104, 0, 42,109,101,115,104, 66, 66, 0,115,117,114,102,100, 97,116, - 97, 80, 97,116,104, 91, 49, 48, 50, 52, 93, 0, 98, 98, 83,116, 97,114,116, 91, 51, 93, 0, 98, 98, 83,105,122,101, 91, 51, 93, - 0,116,121,112,101, 70,108, 97,103,115, 0,100,111,109, 97,105,110, 78,111,118,101, 99,103,101,110, 0,118,111,108,117,109,101, - 73,110,105,116, 84,121,112,101, 0,112, 97,114,116, 83,108,105,112, 86, 97,108,117,101, 0,103,101,110,101,114, 97,116,101, 84, -114, 97, 99,101,114,115, 0,103,101,110,101,114, 97,116,101, 80, 97,114,116,105, 99,108,101,115, 0,115,117,114,102, 97, 99,101, - 83,109,111,111,116,104,105,110,103, 0,115,117,114,102, 97, 99,101, 83,117, 98,100,105,118,115, 0,112, 97,114,116,105, 99,108, -101, 73,110,102, 83,105,122,101, 0,112, 97,114,116,105, 99,108,101, 73,110,102, 65,108,112,104, 97, 0,102, 97,114, 70,105,101, -108,100, 83,105,122,101, 0, 42,109,101,115,104, 86,101,108,111, 99,105,116,105,101,115, 0, 99,112,115, 84,105,109,101, 83,116, - 97,114,116, 0, 99,112,115, 84,105,109,101, 69,110,100, 0, 99,112,115, 81,117, 97,108,105,116,121, 0, 97,116,116,114, 97, 99, -116,102,111,114, 99,101, 83,116,114,101,110,103,116,104, 0, 97,116,116,114, 97, 99,116,102,111,114, 99,101, 82, 97,100,105,117, -115, 0,118,101,108,111, 99,105,116,121,102,111,114, 99,101, 83,116,114,101,110,103,116,104, 0,118,101,108,111, 99,105,116,121, -102,111,114, 99,101, 82, 97,100,105,117,115, 0,108, 97,115,116,103,111,111,100,102,114, 97,109,101, 0, 97,110,105,109, 82, 97, -116,101, 0,109,105,115,116,121,112,101, 0,104,111,114,114, 0,104,111,114,103, 0,104,111,114, 98, 0,122,101,110,114, 0,122, -101,110,103, 0,122,101,110, 98, 0,102, 97,115,116, 99,111,108, 0,101,120,112,111,115,117,114,101, 0,101,120,112, 0,114, 97, -110,103,101, 0,108,105,110,102, 97, 99, 0,108,111,103,102, 97, 99, 0,103,114, 97,118,105,116,121, 0, 97, 99,116,105,118,105, -116,121, 66,111,120, 82, 97,100,105,117,115, 0,115,107,121,116,121,112,101, 0,111, 99, 99,108,117,115,105,111,110, 82,101,115, - 0,112,104,121,115,105, 99,115, 69,110,103,105,110,101, 0,116,105, 99,114, 97,116,101, 0,109, 97,120,108,111,103,105, 99,115, -116,101,112, 0,112,104,121,115,117, 98,115,116,101,112, 0,109, 97,120,112,104,121,115,116,101,112, 0,109,105,115,105, 0,109, -105,115,116,115,116, 97, 0,109,105,115,116,100,105,115,116, 0,109,105,115,116,104,105, 0,115,116, 97,114,114, 0,115,116, 97, -114,103, 0,115,116, 97,114, 98, 0,115,116, 97,114,107, 0,115,116, 97,114,115,105,122,101, 0,115,116, 97,114,109,105,110,100, -105,115,116, 0,115,116, 97,114,100,105,115,116, 0,115,116, 97,114, 99,111,108,110,111,105,115,101, 0,100,111,102,115,116, 97, - 0,100,111,102,101,110,100, 0,100,111,102,109,105,110, 0,100,111,102,109, 97,120, 0, 97,111,100,105,115,116, 0, 97,111,100, -105,115,116,102, 97, 99, 0, 97,111,101,110,101,114,103,121, 0, 97,111, 98,105, 97,115, 0, 97,111,109,111,100,101, 0, 97,111, -115, 97,109,112, 0, 97,111,109,105,120, 0, 97,111, 99,111,108,111,114, 0, 97,111, 95, 97,100, 97,112,116, 95,116,104,114,101, -115,104, 0, 97,111, 95, 97,100, 97,112,116, 95,115,112,101,101,100, 95,102, 97, 99, 0, 97,111, 95, 97,112,112,114,111,120, 95, -101,114,114,111,114, 0, 97,111, 95, 97,112,112,114,111,120, 95, 99,111,114,114,101, 99,116,105,111,110, 0, 97,111, 95,105,110, -100,105,114,101, 99,116, 95,101,110,101,114,103,121, 0, 97,111, 95,101,110,118, 95,101,110,101,114,103,121, 0, 97,111, 95,112, - 97,100, 50, 0, 97,111, 95,105,110,100,105,114,101, 99,116, 95, 98,111,117,110, 99,101,115, 0, 97,111, 95,112, 97,100, 0, 97, -111, 95,115, 97,109,112, 95,109,101,116,104,111,100, 0, 97,111, 95,103, 97,116,104,101,114, 95,109,101,116,104,111,100, 0, 97, -111, 95, 97,112,112,114,111,120, 95,112, 97,115,115,101,115, 0, 42, 97,111,115,112,104,101,114,101, 0, 42, 97,111,116, 97, 98, -108,101,115, 0,115,101,108, 99,111,108, 0,115,120, 0,115,121, 0, 42,108,112, 70,111,114,109, 97,116, 0, 42,108,112, 80, 97, -114,109,115, 0, 99, 98, 70,111,114,109, 97,116, 0, 99, 98, 80, 97,114,109,115, 0,102, 99, 99, 84,121,112,101, 0,102, 99, 99, - 72, 97,110,100,108,101,114, 0,100,119, 75,101,121, 70,114, 97,109,101, 69,118,101,114,121, 0,100,119, 81,117, 97,108,105,116, -121, 0,100,119, 66,121,116,101,115, 80,101,114, 83,101, 99,111,110,100, 0,100,119, 70,108, 97,103,115, 0,100,119, 73,110,116, -101,114,108,101, 97,118,101, 69,118,101,114,121, 0, 97,118,105, 99,111,100,101, 99,110, 97,109,101, 91, 49, 50, 56, 93, 0, 42, - 99,100, 80, 97,114,109,115, 0, 42,112, 97,100, 0, 99,100, 83,105,122,101, 0,113,116, 99,111,100,101, 99,110, 97,109,101, 91, - 49, 50, 56, 93, 0, 99,111,100,101, 99, 84,121,112,101, 0, 99,111,100,101, 99, 83,112, 97,116,105, 97,108, 81,117, 97,108,105, -116,121, 0, 99,111,100,101, 99, 0, 99,111,100,101, 99, 70,108, 97,103,115, 0, 99,111,108,111,114, 68,101,112,116,104, 0, 99, -111,100,101, 99, 84,101,109,112,111,114, 97,108, 81,117, 97,108,105,116,121, 0,109,105,110, 83,112, 97,116,105, 97,108, 81,117, - 97,108,105,116,121, 0,109,105,110, 84,101,109,112,111,114, 97,108, 81,117, 97,108,105,116,121, 0,107,101,121, 70,114, 97,109, -101, 82, 97,116,101, 0, 98,105,116, 82, 97,116,101, 0, 97,117,100,105,111, 99,111,100,101, 99, 84,121,112,101, 0, 97,117,100, -105,111, 83, 97,109,112,108,101, 82, 97,116,101, 0, 97,117,100,105,111, 66,105,116, 68,101,112,116,104, 0, 97,117,100,105,111, - 67,104, 97,110,110,101,108,115, 0, 97,117,100,105,111, 67,111,100,101, 99, 70,108, 97,103,115, 0, 97,117,100,105,111, 66,105, -116, 82, 97,116,101, 0, 97,117,100,105,111, 95, 99,111,100,101, 99, 0,118,105,100,101,111, 95, 98,105,116,114, 97,116,101, 0, - 97,117,100,105,111, 95, 98,105,116,114, 97,116,101, 0, 97,117,100,105,111, 95,109,105,120,114, 97,116,101, 0, 97,117,100,105, -111, 95, 99,104, 97,110,110,101,108,115, 0, 97,117,100,105,111, 95,112, 97,100, 0, 97,117,100,105,111, 95,118,111,108,117,109, -101, 0,103,111,112, 95,115,105,122,101, 0,114, 99, 95,109,105,110, 95,114, 97,116,101, 0,114, 99, 95,109, 97,120, 95,114, 97, -116,101, 0,114, 99, 95, 98,117,102,102,101,114, 95,115,105,122,101, 0,109,117,120, 95,112, 97, 99,107,101,116, 95,115,105,122, -101, 0,109,117,120, 95,114, 97,116,101, 0,109,105,120,114, 97,116,101, 0,109, 97,105,110, 0,115,112,101,101,100, 95,111,102, - 95,115,111,117,110,100, 0,100,111,112,112,108,101,114, 95,102, 97, 99,116,111,114, 0,100,105,115,116, 97,110, 99,101, 95,109, -111,100,101,108, 0, 42,109, 97,116, 95,111,118,101,114,114,105,100,101, 0, 42,108,105,103,104,116, 95,111,118,101,114,114,105, -100,101, 0,108, 97,121, 95,122,109, 97,115,107, 0,108, 97,121,102,108, 97,103, 0,112, 97,115,115,102,108, 97,103, 0,112, 97, -115,115, 95,120,111,114, 0,105,109,116,121,112,101, 0,112,108, 97,110,101,115, 0,113,117, 97,108,105,116,121, 0, 99,111,109, -112,114,101,115,115, 0,101,120,114, 95, 99,111,100,101, 99, 0, 99,105,110,101,111,110, 95,102,108, 97,103, 0, 99,105,110,101, -111,110, 95,119,104,105,116,101, 0, 99,105,110,101,111,110, 95, 98,108, 97, 99,107, 0, 99,105,110,101,111,110, 95,103, 97,109, -109, 97, 0,106,112, 50, 95,102,108, 97,103, 0,105,109, 95,102,111,114,109, 97,116, 0, 42, 97,118,105, 99,111,100,101, 99,100, - 97,116, 97, 0, 42,113,116, 99,111,100,101, 99,100, 97,116, 97, 0,113,116, 99,111,100,101, 99,115,101,116,116,105,110,103,115, - 0,102,102, 99,111,100,101, 99,100, 97,116, 97, 0,115,117, 98,102,114, 97,109,101, 0,112,115,102,114, 97, 0,112,101,102,114, - 97, 0,105,109, 97,103,101,115, 0,102,114, 97,109, 97,112,116,111, 0,116,104,114,101, 97,100,115, 0,102,114, 97,109,101,108, -101,110, 0, 98,108,117,114,102, 97, 99, 0,101,100,103,101, 82, 0,101,100,103,101, 71, 0,101,100,103,101, 66, 0,102,117,108, -108,115, 99,114,101,101,110, 0,120,112,108, 97,121, 0,121,112,108, 97,121, 0,102,114,101,113,112,108, 97,121, 0, 97,116,116, -114,105, 98, 0,102,114, 97,109,101, 95,115,116,101,112, 0,115,116,101,114,101,111,109,111,100,101, 0,100,105,109,101,110,115, -105,111,110,115,112,114,101,115,101,116, 0,109, 97,120,105,109,115,105,122,101, 0,120,115, 99,104, 0,121,115, 99,104, 0,120, -112, 97,114,116,115, 0,121,112, 97,114,116,115, 0,115,117, 98,105,109,116,121,112,101, 0,100,105,115,112,108, 97,121,109,111, -100,101, 0,115, 99,101,109,111,100,101, 0,114, 97,121,116,114, 97, 99,101, 95,111,112,116,105,111,110,115, 0,114, 97,121,116, -114, 97, 99,101, 95,115,116,114,117, 99,116,117,114,101, 0,111, 99,114,101,115, 0,112, 97,100, 52, 0, 97,108,112,104, 97,109, -111,100,101, 0,111,115, 97, 0,102,114,115, 95,115,101, 99, 0,101,100,103,101,105,110,116, 0,115, 97,102,101,116,121, 0, 98, -111,114,100,101,114, 0,100,105,115,112,114,101, 99,116, 0,108, 97,121,101,114,115, 0, 97, 99,116,108, 97,121, 0,109, 98,108, -117,114, 95,115, 97,109,112,108,101,115, 0,120, 97,115,112, 0,121, 97,115,112, 0,102,114,115, 95,115,101, 99, 95, 98, 97,115, -101, 0,103, 97,117,115,115, 0, 99,111,108,111,114, 95,109,103,116, 95,102,108, 97,103, 0,112,111,115,116,103, 97,109,109, 97, - 0,112,111,115,116,104,117,101, 0,112,111,115,116,115, 97,116, 0,100,105,116,104,101,114, 95,105,110,116,101,110,115,105,116, -121, 0, 98, 97,107,101, 95,111,115, 97, 0, 98, 97,107,101, 95,102,105,108,116,101,114, 0, 98, 97,107,101, 95,109,111,100,101, - 0, 98, 97,107,101, 95,102,108, 97,103, 0, 98, 97,107,101, 95,110,111,114,109, 97,108, 95,115,112, 97, 99,101, 0, 98, 97,107, -101, 95,113,117, 97,100, 95,115,112,108,105,116, 0, 98, 97,107,101, 95,109, 97,120,100,105,115,116, 0, 98, 97,107,101, 95, 98, -105, 97,115,100,105,115,116, 0, 98, 97,107,101, 95,112, 97,100, 0,112,105, 99, 91, 49, 48, 50, 52, 93, 0,115,116, 97,109,112, - 0,115,116, 97,109,112, 95,102,111,110,116, 95,105,100, 0,115,116, 97,109,112, 95,117,100, 97,116, 97, 91, 55, 54, 56, 93, 0, -102,103, 95,115,116, 97,109,112, 91, 52, 93, 0, 98,103, 95,115,116, 97,109,112, 91, 52, 93, 0,115,101,113, 95,112,114,101,118, - 95,116,121,112,101, 0,115,101,113, 95,114,101,110,100, 95,116,121,112,101, 0,115,101,113, 95,102,108, 97,103, 0,112, 97,100, - 53, 91, 53, 93, 0,115,105,109,112,108,105,102,121, 95,102,108, 97,103, 0,115,105,109,112,108,105,102,121, 95,115,117, 98,115, -117,114,102, 0,115,105,109,112,108,105,102,121, 95,115,104, 97,100,111,119,115, 97,109,112,108,101,115, 0,115,105,109,112,108, -105,102,121, 95,112, 97,114,116,105, 99,108,101,115, 0,115,105,109,112,108,105,102,121, 95, 97,111,115,115,115, 0, 99,105,110, -101,111,110,119,104,105,116,101, 0, 99,105,110,101,111,110, 98,108, 97, 99,107, 0, 99,105,110,101,111,110,103, 97,109,109, 97, - 0,106,112, 50, 95,112,114,101,115,101,116, 0,106,112, 50, 95,100,101,112,116,104, 0,114,112, 97,100, 51, 0,100,111,109,101, -114,101,115, 0,100,111,109,101,109,111,100,101, 0,100,111,109,101, 97,110,103,108,101, 0,100,111,109,101,116,105,108,116, 0, -100,111,109,101,114,101,115, 98,117,102, 0, 42,100,111,109,101,116,101,120,116, 0,101,110,103,105,110,101, 91, 51, 50, 93, 0, -110, 97,109,101, 91, 51, 50, 93, 0,112, 97,114,116,105, 99,108,101, 95,112,101,114, 99, 0,115,117, 98,115,117,114,102, 95,109, - 97,120, 0,115,104, 97,100, 98,117,102,115, 97,109,112,108,101, 95,109, 97,120, 0, 97,111, 95,101,114,114,111,114, 0,116,105, -108,116, 0,114,101,115, 98,117,102, 0, 42,119, 97,114,112,116,101,120,116, 0, 99,111,108, 91, 51, 93, 0, 99,101,108,108,115, -105,122,101, 0, 99,101,108,108,104,101,105,103,104,116, 0, 97,103,101,110,116,109, 97,120,115,108,111,112,101, 0, 97,103,101, -110,116,109, 97,120, 99,108,105,109, 98, 0, 97,103,101,110,116,104,101,105,103,104,116, 0, 97,103,101,110,116,114, 97,100,105, -117,115, 0,101,100,103,101,109, 97,120,108,101,110, 0,101,100,103,101,109, 97,120,101,114,114,111,114, 0,114,101,103,105,111, -110,109,105,110,115,105,122,101, 0,114,101,103,105,111,110,109,101,114,103,101,115,105,122,101, 0,118,101,114,116,115,112,101, -114,112,111,108,121, 0,100,101,116, 97,105,108,115, 97,109,112,108,101,100,105,115,116, 0,100,101,116, 97,105,108,115, 97,109, -112,108,101,109, 97,120,101,114,114,111,114, 0,102,114, 97,109,105,110,103, 0,112,108, 97,121,101,114,102,108, 97,103, 0,114, -116, 49, 0,114,116, 50, 0, 97, 97,115, 97,109,112,108,101,115, 0,112, 97,100, 52, 91, 51, 93, 0,100,111,109,101, 0,115,116, -101,114,101,111,102,108, 97,103, 0,101,121,101,115,101,112, 97,114, 97,116,105,111,110, 0,114,101, 99, 97,115,116, 68, 97,116, - 97, 0,109, 97,116,109,111,100,101, 0,101,120,105,116,107,101,121, 0,111, 98,115,116, 97, 99,108,101, 83,105,109,117,108, 97, -116,105,111,110, 0,108,101,118,101,108, 72,101,105,103,104,116, 0, 42, 99, 97,109,101,114, 97, 0, 42,112, 97,105,110,116, 95, - 99,117,114,115,111,114, 0,112, 97,105,110,116, 95, 99,117,114,115,111,114, 95, 99,111,108, 91, 52, 93, 0,112, 97,105,110,116, - 0,115,101, 97,109, 95, 98,108,101,101,100, 0,110,111,114,109, 97,108, 95, 97,110,103,108,101, 0,115, 99,114,101,101,110, 95, -103,114, 97, 98, 95,115,105,122,101, 91, 50, 93, 0, 42,112, 97,105,110,116, 99,117,114,115,111,114, 0,105,110,118,101,114,116, - 0,116,111,116,114,101,107,101,121, 0,116,111,116, 97,100,100,107,101,121, 0, 98,114,117,115,104,116,121,112,101, 0, 98,114, -117,115,104, 91, 55, 93, 0,101,109,105,116,116,101,114,100,105,115,116, 0,115,101,108,101, 99,116,109,111,100,101, 0,101,100, -105,116,116,121,112,101, 0,100,114, 97,119, 95,115,116,101,112, 0,102, 97,100,101, 95,102,114, 97,109,101,115, 0,114, 97,100, -105, 97,108, 95,115,121,109,109, 91, 51, 93, 0,108, 97,115,116, 95,120, 0,108, 97,115,116, 95,121, 0,108, 97,115,116, 95, 97, -110,103,108,101, 0,100,114, 97,119, 95, 97,110, 99,104,111,114,101,100, 0, 97,110, 99,104,111,114,101,100, 95,115,105,122,101, - 0, 97,110, 99,104,111,114,101,100, 95,108,111, 99, 97,116,105,111,110, 91, 51, 93, 0, 97,110, 99,104,111,114,101,100, 95,105, -110,105,116,105, 97,108, 95,109,111,117,115,101, 91, 50, 93, 0,100,114, 97,119, 95,112,114,101,115,115,117,114,101, 0,112,114, -101,115,115,117,114,101, 95,118, 97,108,117,101, 0,115,112,101, 99,105, 97,108, 95,114,111,116, 97,116,105,111,110, 0, 42,118, -112, 97,105,110,116, 95,112,114,101,118, 0, 42,119,112, 97,105,110,116, 95,112,114,101,118, 0,109, 97,116, 91, 51, 93, 91, 51, - 93, 0,117,110,112,114,111,106,101, 99,116,101,100, 95,114, 97,100,105,117,115, 0, 42,118,112, 97,105,110,116, 0, 42,119,112, - 97,105,110,116, 0, 42,117,118,115, 99,117,108,112,116, 0,118,103,114,111,117,112, 95,119,101,105,103,104,116, 0, 99,111,114, -110,101,114,116,121,112,101, 0,101,100,105,116, 98,117,116,102,108, 97,103, 0,106,111,105,110,116,114,105,108,105,109,105,116, - 0,100,101,103,114, 0,116,117,114,110, 0,101,120,116,114, 95,111,102,102,115, 0,100,111,117, 98,108,105,109,105,116, 0,110, -111,114,109, 97,108,115,105,122,101, 0, 97,117,116,111,109,101,114,103,101, 0,115,101,103,109,101,110,116,115, 0,114,105,110, -103,115, 0,118,101,114,116,105, 99,101,115, 0,117,110,119,114, 97,112,112,101,114, 0,117,118, 99, 97,108, 99, 95,114, 97,100, -105,117,115, 0,117,118, 99, 97,108, 99, 95, 99,117, 98,101,115,105,122,101, 0,117,118, 99, 97,108, 99, 95,109, 97,114,103,105, -110, 0,117,118, 99, 97,108, 99, 95,109, 97,112,100,105,114, 0,117,118, 99, 97,108, 99, 95,109, 97,112, 97,108,105,103,110, 0, -117,118, 99, 97,108, 99, 95,102,108, 97,103, 0,117,118, 95,102,108, 97,103, 0,117,118, 95,115,101,108,101, 99,116,109,111,100, -101, 0,117,118, 95,115,117, 98,115,117,114,102, 95,108,101,118,101,108, 0,103,112,101,110, 99,105,108, 95,102,108, 97,103,115, - 0, 97,117,116,111,105,107, 95, 99,104, 97,105,110,108,101,110, 0,105,109, 97,112, 97,105,110,116, 0,112, 97,114,116,105, 99, -108,101, 0,112,114,111,112,111,114,116,105,111,110, 97,108, 95,115,105,122,101, 0,115,101,108,101, 99,116, 95,116,104,114,101, -115,104, 0, 99,108,101, 97,110, 95,116,104,114,101,115,104, 0, 97,117,116,111,107,101,121, 95,109,111,100,101, 0, 97,117,116, -111,107,101,121, 95,102,108, 97,103, 0,109,117,108,116,105,114,101,115, 95,115,117, 98,100,105,118, 95,116,121,112,101, 0,112, - 97,100, 50, 91, 53, 93, 0,115,107,103,101,110, 95,114,101,115,111,108,117,116,105,111,110, 0,115,107,103,101,110, 95,116,104, -114,101,115,104,111,108,100, 95,105,110,116,101,114,110, 97,108, 0,115,107,103,101,110, 95,116,104,114,101,115,104,111,108,100, - 95,101,120,116,101,114,110, 97,108, 0,115,107,103,101,110, 95,108,101,110,103,116,104, 95,114, 97,116,105,111, 0,115,107,103, -101,110, 95,108,101,110,103,116,104, 95,108,105,109,105,116, 0,115,107,103,101,110, 95, 97,110,103,108,101, 95,108,105,109,105, -116, 0,115,107,103,101,110, 95, 99,111,114,114,101,108, 97,116,105,111,110, 95,108,105,109,105,116, 0,115,107,103,101,110, 95, -115,121,109,109,101,116,114,121, 95,108,105,109,105,116, 0,115,107,103,101,110, 95,114,101,116, 97,114,103,101,116, 95, 97,110, -103,108,101, 95,119,101,105,103,104,116, 0,115,107,103,101,110, 95,114,101,116, 97,114,103,101,116, 95,108,101,110,103,116,104, - 95,119,101,105,103,104,116, 0,115,107,103,101,110, 95,114,101,116, 97,114,103,101,116, 95,100,105,115,116, 97,110, 99,101, 95, -119,101,105,103,104,116, 0,115,107,103,101,110, 95,111,112,116,105,111,110,115, 0,115,107,103,101,110, 95,112,111,115,116,112, -114,111, 0,115,107,103,101,110, 95,112,111,115,116,112,114,111, 95,112, 97,115,115,101,115, 0,115,107,103,101,110, 95,115,117, - 98,100,105,118,105,115,105,111,110,115, 91, 51, 93, 0,115,107,103,101,110, 95,109,117,108,116,105, 95,108,101,118,101,108, 0, - 42,115,107,103,101,110, 95,116,101,109,112,108, 97,116,101, 0, 98,111,110,101, 95,115,107,101,116, 99,104,105,110,103, 0, 98, -111,110,101, 95,115,107,101,116, 99,104,105,110,103, 95, 99,111,110,118,101,114,116, 0,115,107,103,101,110, 95,115,117, 98,100, -105,118,105,115,105,111,110, 95,110,117,109, 98,101,114, 0,115,107,103,101,110, 95,114,101,116, 97,114,103,101,116, 95,111,112, -116,105,111,110,115, 0,115,107,103,101,110, 95,114,101,116, 97,114,103,101,116, 95,114,111,108,108, 0,115,107,103,101,110, 95, -115,105,100,101, 95,115,116,114,105,110,103, 91, 56, 93, 0,115,107,103,101,110, 95,110,117,109, 95,115,116,114,105,110,103, 91, - 56, 93, 0,101,100,103,101, 95,109,111,100,101, 0,101,100,103,101, 95,109,111,100,101, 95,108,105,118,101, 95,117,110,119,114, - 97,112, 0,115,110, 97,112, 95,109,111,100,101, 0,115,110, 97,112, 95,102,108, 97,103, 0,115,110, 97,112, 95,116, 97,114,103, -101,116, 0,112,114,111,112,111,114,116,105,111,110, 97,108, 0,112,114,111,112, 95,109,111,100,101, 0,112,114,111,112,111,114, -116,105,111,110, 97,108, 95,111, 98,106,101, 99,116,115, 0,112, 97,100, 91, 53, 93, 0, 97,117,116,111, 95,110,111,114,109, 97, -108,105,122,101, 0,109,117,108,116,105,112, 97,105,110,116, 0,117,115,101, 95,117,118, 95,115, 99,117,108,112,116, 0,117,118, - 95,115, 99,117,108,112,116, 95,115,101,116,116,105,110,103,115, 0,117,118, 95,115, 99,117,108,112,116, 95,116,111,111,108, 0, -117,118, 95,114,101,108, 97,120, 95,109,101,116,104,111,100, 0,115, 99,117,108,112,116, 95,112, 97,105,110,116, 95,115,101,116, -116,105,110,103,115, 0,115, 99,117,108,112,116, 95,112, 97,105,110,116, 95,117,110,105,102,105,101,100, 95,115,105,122,101, 0, -115, 99,117,108,112,116, 95,112, 97,105,110,116, 95,117,110,105,102,105,101,100, 95,117,110,112,114,111,106,101, 99,116,101,100, - 95,114, 97,100,105,117,115, 0,115, 99,117,108,112,116, 95,112, 97,105,110,116, 95,117,110,105,102,105,101,100, 95, 97,108,112, -104, 97, 0,117,110,105,102,105,101,100, 95,112, 97,105,110,116, 95,115,101,116,116,105,110,103,115, 0,116,111,116,111, 98,106, - 0,116,111,116,108, 97,109,112, 0,116,111,116,111, 98,106,115,101,108, 0,116,111,116, 99,117,114,118,101, 0,116,111,116,109, -101,115,104, 0,116,111,116, 97,114,109, 97,116,117,114,101, 0,115, 99, 97,108,101, 95,108,101,110,103,116,104, 0,115,121,115, -116,101,109, 0,115,121,115,116,101,109, 95,114,111,116, 97,116,105,111,110, 0,103,114, 97,118,105,116,121, 91, 51, 93, 0,113, -117,105, 99,107, 95, 99, 97, 99,104,101, 95,115,116,101,112, 0, 42,119,111,114,108,100, 0, 42,115,101,116, 0, 98, 97,115,101, - 0, 42, 98, 97,115, 97, 99,116, 0, 42,111, 98,101,100,105,116, 0, 99,117,114,115,111,114, 91, 51, 93, 0,116,119, 99,101,110, -116, 91, 51, 93, 0,116,119,109,105,110, 91, 51, 93, 0,116,119,109, 97,120, 91, 51, 93, 0,108, 97,121, 97, 99,116, 0,108, 97, -121, 95,117,112,100, 97,116,101,100, 0, 42,101,100, 0, 42,116,111,111,108,115,101,116,116,105,110,103,115, 0, 42,115,116, 97, -116,115, 0, 97,117,100,105,111, 0,116,114, 97,110,115,102,111,114,109, 95,115,112, 97, 99,101,115, 0, 42,115,111,117,110,100, - 95,115, 99,101,110,101, 0, 42,115,111,117,110,100, 95,115, 99,101,110,101, 95,104, 97,110,100,108,101, 0, 42,115,111,117,110, -100, 95,115, 99,114,117, 98, 95,104, 97,110,100,108,101, 0, 42,115,112,101, 97,107,101,114, 95,104, 97,110,100,108,101,115, 0, - 42,102,112,115, 95,105,110,102,111, 0, 42,116,104,101, 68, 97,103, 0,100, 97,103,105,115,118, 97,108,105,100, 0,100, 97,103, -102,108, 97,103,115, 0, 97, 99,116,105,118,101, 95,107,101,121,105,110,103,115,101,116, 0,107,101,121,105,110,103,115,101,116, -115, 0,103,109, 0,117,110,105,116, 0,112,104,121,115,105, 99,115, 95,115,101,116,116,105,110,103,115, 0, 42, 99,108,105,112, - 0, 99,117,115,116,111,109,100, 97,116, 97, 95,109, 97,115,107, 95,109,111,100, 97,108, 0, 99,117,115,101,114, 0, 98,108,101, -110,100, 0,118,105,101,119, 0,119,105,110,109, 97,116, 91, 52, 93, 91, 52, 93, 0,118,105,101,119,109, 97,116, 91, 52, 93, 91, - 52, 93, 0,118,105,101,119,105,110,118, 91, 52, 93, 91, 52, 93, 0,112,101,114,115,109, 97,116, 91, 52, 93, 91, 52, 93, 0,112, -101,114,115,105,110,118, 91, 52, 93, 91, 52, 93, 0,118,105,101,119,109, 97,116,111, 98, 91, 52, 93, 91, 52, 93, 0,112,101,114, -115,109, 97,116,111, 98, 91, 52, 93, 91, 52, 93, 0,116,119,109, 97,116, 91, 52, 93, 91, 52, 93, 0,118,105,101,119,113,117, 97, -116, 91, 52, 93, 0,122,102, 97, 99, 0, 99, 97,109,100,120, 0, 99, 97,109,100,121, 0,112,105,120,115,105,122,101, 0, 99, 97, -109,122,111,111,109, 0,116,119,100,114, 97,119,102,108, 97,103, 0,105,115, 95,112,101,114,115,112, 0,114,102,108, 97,103, 0, -118,105,101,119,108,111, 99,107, 0,112,101,114,115,112, 0, 99,108,105,112, 91, 54, 93, 91, 52, 93, 0, 99,108,105,112, 95,108, -111, 99, 97,108, 91, 54, 93, 91, 52, 93, 0, 42, 99,108,105,112, 98, 98, 0, 42,108,111, 99, 97,108,118,100, 0, 42,114,105, 0, - 42,114,101,110,100,101,114, 95,101,110,103,105,110,101, 0, 42,100,101,112,116,104,115, 0, 42,115,109,115, 0, 42,115,109,111, -111,116,104, 95,116,105,109,101,114, 0,108,118,105,101,119,113,117, 97,116, 91, 52, 93, 0,108,112,101,114,115,112, 0,108,118, -105,101,119, 0,103,114,105,100,118,105,101,119, 0,116,119, 97,110,103,108,101, 91, 51, 93, 0,114,111,116, 95, 97,110,103,108, -101, 0,114,111,116, 95, 97,120,105,115, 91, 51, 93, 0,112, 97,100, 50, 91, 52, 93, 0,114,101,103,105,111,110, 98, 97,115,101, - 0,115,112, 97, 99,101,116,121,112,101, 0, 98,108,111, 99,107,115, 99, 97,108,101, 0, 98,108,111, 99,107,104, 97,110,100,108, -101,114, 91, 56, 93, 0, 98,117,110,100,108,101, 95,115,105,122,101, 0, 98,117,110,100,108,101, 95,100,114, 97,119,116,121,112, -101, 0,108, 97,121, 95,117,115,101,100, 0, 42,111, 98, 95, 99,101,110,116,114,101, 0, 98,103,112,105, 99, 98, 97,115,101, 0, - 42, 98,103,112,105, 99, 0,111, 98, 95, 99,101,110,116,114,101, 95, 98,111,110,101, 91, 54, 52, 93, 0,100,114, 97,119,116,121, -112,101, 0,111, 98, 95, 99,101,110,116,114,101, 95, 99,117,114,115,111,114, 0,115, 99,101,110,101,108,111, 99,107, 0, 97,114, -111,117,110,100, 0,103,114,105,100, 0,110,101, 97,114, 0,102, 97,114, 0,109,111,100,101,115,101,108,101, 99,116, 0,103,114, -105,100,108,105,110,101,115, 0,103,114,105,100,115,117, 98,100,105,118, 0,103,114,105,100,102,108, 97,103, 0,116,119,116,121, -112,101, 0,116,119,109,111,100,101, 0,116,119,102,108, 97,103, 0,112, 97,100, 50, 91, 50, 93, 0, 97,102,116,101,114,100,114, - 97,119, 95,116,114, 97,110,115,112, 0, 97,102,116,101,114,100,114, 97,119, 95,120,114, 97,121, 0, 97,102,116,101,114,100,114, - 97,119, 95,120,114, 97,121,116,114, 97,110,115,112, 0,122, 98,117,102, 0,120,114, 97,121, 0,112, 97,100, 51, 91, 50, 93, 0, - 42,112,114,111,112,101,114,116,105,101,115, 95,115,116,111,114, 97,103,101, 0,118,101,114,116, 0,104,111,114, 0,109, 97,115, -107, 0,109,105,110, 91, 50, 93, 0,109, 97,120, 91, 50, 93, 0,109,105,110,122,111,111,109, 0,109, 97,120,122,111,111,109, 0, -115, 99,114,111,108,108, 0,115, 99,114,111,108,108, 95,117,105, 0,107,101,101,112,116,111,116, 0,107,101,101,112,122,111,111, -109, 0,107,101,101,112,111,102,115, 0, 97,108,105,103,110, 0,119,105,110,120, 0,119,105,110,121, 0,111,108,100,119,105,110, -120, 0,111,108,100,119,105,110,121, 0, 42,116, 97, 98, 95,111,102,102,115,101,116, 0,116, 97, 98, 95,110,117,109, 0,116, 97, - 98, 95, 99,117,114, 0,114,112,116, 95,109, 97,115,107, 0,118, 50,100, 0, 42, 97,100,115, 0,103,104,111,115,116, 67,117,114, -118,101,115, 0, 97,117,116,111,115,110, 97,112, 0, 99,117,114,115,111,114, 86, 97,108, 0,109, 97,105,110, 98, 0,109, 97,105, -110, 98,111, 0,109, 97,105,110, 98,117,115,101,114, 0,114,101, 95, 97,108,105,103,110, 0,112,114,101,118,105,101,119, 0,116, -101,120,116,117,114,101, 95, 99,111,110,116,101,120,116, 0,112, 97,116,104,102,108, 97,103, 0,100, 97,116, 97,105, 99,111,110, - 0, 42,112,105,110,105,100, 0, 42,116,101,120,117,115,101,114, 0,114,101,110,100,101,114, 95,115,105,122,101, 0, 99,104, 97, -110,115,104,111,119,110, 0,122,101, 98,114, 97, 0,122,111,111,109, 0,116,105,116,108,101, 91, 51, 50, 93, 0,100,105,114, 91, - 49, 48, 53, 54, 93, 0,102,105,108,101, 91, 50, 53, 54, 93, 0,114,101,110, 97,109,101,102,105,108,101, 91, 50, 53, 54, 93, 0, -114,101,110, 97,109,101,101,100,105,116, 91, 50, 53, 54, 93, 0,102,105,108,116,101,114, 95,103,108,111, 98, 91, 54, 52, 93, 0, - 97, 99,116,105,118,101, 95,102,105,108,101, 0,115,101,108, 95,102,105,114,115,116, 0,115,101,108, 95,108, 97,115,116, 0,115, -111,114,116, 0,100,105,115,112,108, 97,121, 0,102, 95,102,112, 0,102,112, 95,115,116,114, 91, 56, 93, 0,115, 99,114,111,108, -108, 95,111,102,102,115,101,116, 0, 42,112, 97,114, 97,109,115, 0, 42,102,105,108,101,115, 0, 42,102,111,108,100,101,114,115, - 95,112,114,101,118, 0, 42,102,111,108,100,101,114,115, 95,110,101,120,116, 0, 42,111,112, 0, 42,115,109,111,111,116,104,115, - 99,114,111,108,108, 95,116,105,109,101,114, 0, 42,108, 97,121,111,117,116, 0,114,101, 99,101,110,116,110,114, 0, 98,111,111, -107,109, 97,114,107,110,114, 0,115,121,115,116,101,109,110,114, 0,116,114,101,101, 0, 42,116,114,101,101,115,116,111,114,101, - 0,115,101, 97,114, 99,104, 95,115,116,114,105,110,103, 91, 51, 50, 93, 0,115,101, 97,114, 99,104, 95,116,115,101, 0,111,117, -116,108,105,110,101,118,105,115, 0,115,116,111,114,101,102,108, 97,103, 0,115,101, 97,114, 99,104, 95,102,108, 97,103,115, 0, - 42, 99,117,109, 97,112, 0,115, 99,111,112,101,115, 0,115, 97,109,112,108,101, 95,108,105,110,101, 95,104,105,115,116, 0, 99, -117,114,115,111,114, 91, 50, 93, 0, 99,101,110,116,120, 0, 99,101,110,116,121, 0, 99,117,114,116,105,108,101, 0,108,111, 99, -107, 0,112,105,110, 0,100,116, 95,117,118, 0,115,116,105, 99,107,121, 0,100,116, 95,117,118,115,116,114,101,116, 99,104, 0, - 42,116,101,120,116, 0,116,111,112, 0,118,105,101,119,108,105,110,101,115, 0,109,101,110,117,110,114, 0,108,104,101,105,103, -104,116, 0, 99,119,105,100,116,104, 0,108,105,110,101,110,114,115, 95,116,111,116, 0,108,101,102,116, 0,115,104,111,119,108, -105,110,101,110,114,115, 0,116, 97, 98,110,117,109, 98,101,114, 0,115,104,111,119,115,121,110,116, 97,120, 0,108,105,110,101, - 95,104,108,105,103,104,116, 0,111,118,101,114,119,114,105,116,101, 0,108,105,118,101, 95,101,100,105,116, 0,112,105,120, 95, -112,101,114, 95,108,105,110,101, 0,116,120,116,115, 99,114,111,108,108, 0,116,120,116, 98, 97,114, 0,119,111,114,100,119,114, - 97,112, 0,100,111,112,108,117,103,105,110,115, 0,102,105,110,100,115,116,114, 91, 50, 53, 54, 93, 0,114,101,112,108, 97, 99, -101,115,116,114, 91, 50, 53, 54, 93, 0,109, 97,114,103,105,110, 95, 99,111,108,117,109,110, 0, 42,100,114, 97,119, 99, 97, 99, -104,101, 0, 42,112,121, 95,100,114, 97,119, 0, 42,112,121, 95,101,118,101,110,116, 0, 42,112,121, 95, 98,117,116,116,111,110, - 0, 42,112,121, 95, 98,114,111,119,115,101,114, 99, 97,108,108, 98, 97, 99,107, 0, 42,112,121, 95,103,108,111, 98, 97,108,100, -105, 99,116, 0,108, 97,115,116,115,112, 97, 99,101, 0,115, 99,114,105,112,116,110, 97,109,101, 91, 49, 48, 50, 52, 93, 0,115, - 99,114,105,112,116, 97,114,103, 91, 50, 53, 54, 93, 0, 42,115, 99,114,105,112,116, 0, 42, 98,117,116, 95,114,101,102,115, 0, - 42, 97,114,114, 97,121, 0, 99, 97, 99,104,101,115, 0, 99, 97, 99,104,101, 95,100,105,115,112,108, 97,121, 0, 42,105,100, 0, - 97,115,112,101, 99,116, 0,112, 97,100,102, 0,109,120, 0,109,121, 0, 42,101,100,105,116,116,114,101,101, 0,116,114,101,101, -116,121,112,101, 0,116,101,120,102,114,111,109, 0,115,104, 97,100,101,114,102,114,111,109, 0,108,105,110,107,100,114, 97,103, - 0,108,101,110, 95, 97,108,108,111, 99, 0, 99,117,114,115,111,114, 0,115, 99,114,111,108,108, 98, 97, 99,107, 0,104,105,115, -116,111,114,121, 0,112,114,111,109,112,116, 91, 50, 53, 54, 93, 0,108, 97,110,103,117, 97,103,101, 91, 51, 50, 93, 0,115,101, -108, 95,115,116, 97,114,116, 0,115,101,108, 95,101,110,100, 0,102,105,108,116,101,114, 91, 54, 52, 93, 0,120,108,111, 99,107, -111,102, 0,121,108,111, 99,107,111,102, 0,117,115,101,114, 0,112, 97,116,104, 95,108,101,110,103,116,104, 0,108,111, 99, 91, - 50, 93, 0,115,116, 97, 98,109, 97,116, 91, 52, 93, 91, 52, 93, 0,117,110,105,115,116, 97, 98,109, 97,116, 91, 52, 93, 91, 52, - 93, 0,112,111,115,116,112,114,111, 99, 95,102,108, 97,103, 0,114,117,110,116,105,109,101, 95,102,108, 97,103, 0,102,105,108, -101,110, 97,109,101, 91, 49, 48, 50, 52, 93, 0, 98,108,102, 95,105,100, 0,117,105,102,111,110,116, 95,105,100, 0,114, 95,116, -111, 95,108, 0,112,111,105,110,116,115, 0,107,101,114,110,105,110,103, 0,105,116, 97,108,105, 99, 0, 98,111,108,100, 0,115, -104, 97,100,111,119, 0,115,104, 97,100,120, 0,115,104, 97,100,121, 0,115,104, 97,100,111,119, 97,108,112,104, 97, 0,115,104, - 97,100,111,119, 99,111,108,111,114, 0,112, 97,110,101,108,116,105,116,108,101, 0,103,114,111,117,112,108, 97, 98,101,108, 0, -119,105,100,103,101,116,108, 97, 98,101,108, 0,119,105,100,103,101,116, 0,112, 97,110,101,108,122,111,111,109, 0,109,105,110, -108, 97, 98,101,108, 99,104, 97,114,115, 0,109,105,110,119,105,100,103,101,116, 99,104, 97,114,115, 0, 99,111,108,117,109,110, -115,112, 97, 99,101, 0,116,101,109,112,108, 97,116,101,115,112, 97, 99,101, 0, 98,111,120,115,112, 97, 99,101, 0, 98,117,116, -116,111,110,115,112, 97, 99,101,120, 0, 98,117,116,116,111,110,115,112, 97, 99,101,121, 0,112, 97,110,101,108,115,112, 97, 99, -101, 0,112, 97,110,101,108,111,117,116,101,114, 0,111,117,116,108,105,110,101, 91, 52, 93, 0,105,110,110,101,114, 91, 52, 93, - 0,105,110,110,101,114, 95,115,101,108, 91, 52, 93, 0,105,116,101,109, 91, 52, 93, 0,116,101,120,116, 91, 52, 93, 0,116,101, -120,116, 95,115,101,108, 91, 52, 93, 0,115,104, 97,100,101,100, 0,115,104, 97,100,101,116,111,112, 0,115,104, 97,100,101,100, -111,119,110, 0, 97,108,112,104, 97, 95, 99,104,101, 99,107, 0,105,110,110,101,114, 95, 97,110,105,109, 91, 52, 93, 0,105,110, -110,101,114, 95, 97,110,105,109, 95,115,101,108, 91, 52, 93, 0,105,110,110,101,114, 95,107,101,121, 91, 52, 93, 0,105,110,110, -101,114, 95,107,101,121, 95,115,101,108, 91, 52, 93, 0,105,110,110,101,114, 95,100,114,105,118,101,110, 91, 52, 93, 0,105,110, -110,101,114, 95,100,114,105,118,101,110, 95,115,101,108, 91, 52, 93, 0,104,101, 97,100,101,114, 91, 52, 93, 0,115,104,111,119, - 95,104,101, 97,100,101,114, 0,119, 99,111,108, 95,114,101,103,117,108, 97,114, 0,119, 99,111,108, 95,116,111,111,108, 0,119, - 99,111,108, 95,116,101,120,116, 0,119, 99,111,108, 95,114, 97,100,105,111, 0,119, 99,111,108, 95,111,112,116,105,111,110, 0, -119, 99,111,108, 95,116,111,103,103,108,101, 0,119, 99,111,108, 95,110,117,109, 0,119, 99,111,108, 95,110,117,109,115,108,105, -100,101,114, 0,119, 99,111,108, 95,109,101,110,117, 0,119, 99,111,108, 95,112,117,108,108,100,111,119,110, 0,119, 99,111,108, - 95,109,101,110,117, 95, 98, 97, 99,107, 0,119, 99,111,108, 95,109,101,110,117, 95,105,116,101,109, 0,119, 99,111,108, 95, 98, -111,120, 0,119, 99,111,108, 95,115, 99,114,111,108,108, 0,119, 99,111,108, 95,112,114,111,103,114,101,115,115, 0,119, 99,111, -108, 95,108,105,115,116, 95,105,116,101,109, 0,119, 99,111,108, 95,115,116, 97,116,101, 0,112, 97,110,101,108, 0,105, 99,111, -110,102,105,108,101, 91, 50, 53, 54, 93, 0,105, 99,111,110, 95, 97,108,112,104, 97, 0, 98, 97, 99,107, 91, 52, 93, 0,116,105, -116,108,101, 91, 52, 93, 0,116,101,120,116, 95,104,105, 91, 52, 93, 0,104,101, 97,100,101,114, 95,116,105,116,108,101, 91, 52, - 93, 0,104,101, 97,100,101,114, 95,116,101,120,116, 91, 52, 93, 0,104,101, 97,100,101,114, 95,116,101,120,116, 95,104,105, 91, - 52, 93, 0, 98,117,116,116,111,110, 91, 52, 93, 0, 98,117,116,116,111,110, 95,116,105,116,108,101, 91, 52, 93, 0, 98,117,116, -116,111,110, 95,116,101,120,116, 91, 52, 93, 0, 98,117,116,116,111,110, 95,116,101,120,116, 95,104,105, 91, 52, 93, 0,108,105, -115,116, 91, 52, 93, 0,108,105,115,116, 95,116,105,116,108,101, 91, 52, 93, 0,108,105,115,116, 95,116,101,120,116, 91, 52, 93, - 0,108,105,115,116, 95,116,101,120,116, 95,104,105, 91, 52, 93, 0,112, 97,110,101,108, 91, 52, 93, 0,112, 97,110,101,108, 95, -116,105,116,108,101, 91, 52, 93, 0,112, 97,110,101,108, 95,116,101,120,116, 91, 52, 93, 0,112, 97,110,101,108, 95,116,101,120, -116, 95,104,105, 91, 52, 93, 0,115,104, 97,100,101, 49, 91, 52, 93, 0,115,104, 97,100,101, 50, 91, 52, 93, 0,104,105,108,105, -116,101, 91, 52, 93, 0,103,114,105,100, 91, 52, 93, 0,119,105,114,101, 91, 52, 93, 0,115,101,108,101, 99,116, 91, 52, 93, 0, -108, 97,109,112, 91, 52, 93, 0,115,112,101, 97,107,101,114, 91, 52, 93, 0, 97, 99,116,105,118,101, 91, 52, 93, 0,103,114,111, -117,112, 91, 52, 93, 0,103,114,111,117,112, 95, 97, 99,116,105,118,101, 91, 52, 93, 0,116,114, 97,110,115,102,111,114,109, 91, - 52, 93, 0,118,101,114,116,101,120, 91, 52, 93, 0,118,101,114,116,101,120, 95,115,101,108,101, 99,116, 91, 52, 93, 0,101,100, -103,101, 91, 52, 93, 0,101,100,103,101, 95,115,101,108,101, 99,116, 91, 52, 93, 0,101,100,103,101, 95,115,101, 97,109, 91, 52, - 93, 0,101,100,103,101, 95,115,104, 97,114,112, 91, 52, 93, 0,101,100,103,101, 95,102, 97, 99,101,115,101,108, 91, 52, 93, 0, -101,100,103,101, 95, 99,114,101, 97,115,101, 91, 52, 93, 0,102, 97, 99,101, 91, 52, 93, 0,102, 97, 99,101, 95,115,101,108,101, - 99,116, 91, 52, 93, 0,102, 97, 99,101, 95,100,111,116, 91, 52, 93, 0,101,120,116,114, 97, 95,101,100,103,101, 95,108,101,110, - 91, 52, 93, 0,101,120,116,114, 97, 95,102, 97, 99,101, 95, 97,110,103,108,101, 91, 52, 93, 0,101,120,116,114, 97, 95,102, 97, - 99,101, 95, 97,114,101, 97, 91, 52, 93, 0,112, 97,100, 51, 91, 52, 93, 0,110,111,114,109, 97,108, 91, 52, 93, 0,118,101,114, -116,101,120, 95,110,111,114,109, 97,108, 91, 52, 93, 0, 98,111,110,101, 95,115,111,108,105,100, 91, 52, 93, 0, 98,111,110,101, - 95,112,111,115,101, 91, 52, 93, 0,115,116,114,105,112, 91, 52, 93, 0,115,116,114,105,112, 95,115,101,108,101, 99,116, 91, 52, - 93, 0, 99,102,114, 97,109,101, 91, 52, 93, 0,110,117,114, 98, 95,117,108,105,110,101, 91, 52, 93, 0,110,117,114, 98, 95,118, -108,105,110,101, 91, 52, 93, 0, 97, 99,116, 95,115,112,108,105,110,101, 91, 52, 93, 0,110,117,114, 98, 95,115,101,108, 95,117, -108,105,110,101, 91, 52, 93, 0,110,117,114, 98, 95,115,101,108, 95,118,108,105,110,101, 91, 52, 93, 0,108, 97,115,116,115,101, -108, 95,112,111,105,110,116, 91, 52, 93, 0,104, 97,110,100,108,101, 95,102,114,101,101, 91, 52, 93, 0,104, 97,110,100,108,101, - 95, 97,117,116,111, 91, 52, 93, 0,104, 97,110,100,108,101, 95,118,101, 99,116, 91, 52, 93, 0,104, 97,110,100,108,101, 95, 97, -108,105,103,110, 91, 52, 93, 0,104, 97,110,100,108,101, 95, 97,117,116,111, 95, 99,108, 97,109,112,101,100, 91, 52, 93, 0,104, - 97,110,100,108,101, 95,115,101,108, 95,102,114,101,101, 91, 52, 93, 0,104, 97,110,100,108,101, 95,115,101,108, 95, 97,117,116, -111, 91, 52, 93, 0,104, 97,110,100,108,101, 95,115,101,108, 95,118,101, 99,116, 91, 52, 93, 0,104, 97,110,100,108,101, 95,115, -101,108, 95, 97,108,105,103,110, 91, 52, 93, 0,104, 97,110,100,108,101, 95,115,101,108, 95, 97,117,116,111, 95, 99,108, 97,109, -112,101,100, 91, 52, 93, 0,100,115, 95, 99,104, 97,110,110,101,108, 91, 52, 93, 0,100,115, 95,115,117, 98, 99,104, 97,110,110, -101,108, 91, 52, 93, 0, 99,111,110,115,111,108,101, 95,111,117,116,112,117,116, 91, 52, 93, 0, 99,111,110,115,111,108,101, 95, -105,110,112,117,116, 91, 52, 93, 0, 99,111,110,115,111,108,101, 95,105,110,102,111, 91, 52, 93, 0, 99,111,110,115,111,108,101, - 95,101,114,114,111,114, 91, 52, 93, 0, 99,111,110,115,111,108,101, 95, 99,117,114,115,111,114, 91, 52, 93, 0,118,101,114,116, -101,120, 95,115,105,122,101, 0,111,117,116,108,105,110,101, 95,119,105,100,116,104, 0,102, 97, 99,101,100,111,116, 95,115,105, -122,101, 0,110,111,111,100,108,101, 95, 99,117,114,118,105,110,103, 0,115,121,110,116, 97,120,108, 91, 52, 93, 0,115,121,110, -116, 97,120,110, 91, 52, 93, 0,115,121,110,116, 97,120, 98, 91, 52, 93, 0,115,121,110,116, 97,120,118, 91, 52, 93, 0,115,121, -110,116, 97,120, 99, 91, 52, 93, 0,109,111,118,105,101, 91, 52, 93, 0,105,109, 97,103,101, 91, 52, 93, 0,115, 99,101,110,101, - 91, 52, 93, 0, 97,117,100,105,111, 91, 52, 93, 0,101,102,102,101, 99,116, 91, 52, 93, 0,112,108,117,103,105,110, 91, 52, 93, - 0,116,114, 97,110,115,105,116,105,111,110, 91, 52, 93, 0,109,101,116, 97, 91, 52, 93, 0,101,100,105,116,109,101,115,104, 95, - 97, 99,116,105,118,101, 91, 52, 93, 0,104, 97,110,100,108,101, 95,118,101,114,116,101,120, 91, 52, 93, 0,104, 97,110,100,108, -101, 95,118,101,114,116,101,120, 95,115,101,108,101, 99,116, 91, 52, 93, 0,104, 97,110,100,108,101, 95,118,101,114,116,101,120, - 95,115,105,122,101, 0,109, 97,114,107,101,114, 95,111,117,116,108,105,110,101, 91, 52, 93, 0,109, 97,114,107,101,114, 91, 52, - 93, 0, 97, 99,116, 95,109, 97,114,107,101,114, 91, 52, 93, 0,115,101,108, 95,109, 97,114,107,101,114, 91, 52, 93, 0,100,105, -115, 95,109, 97,114,107,101,114, 91, 52, 93, 0,108,111, 99,107, 95,109, 97,114,107,101,114, 91, 52, 93, 0, 98,117,110,100,108, -101, 95,115,111,108,105,100, 91, 52, 93, 0,112, 97,116,104, 95, 98,101,102,111,114,101, 91, 52, 93, 0,112, 97,116,104, 95, 97, -102,116,101,114, 91, 52, 93, 0, 99, 97,109,101,114, 97, 95,112, 97,116,104, 91, 52, 93, 0,104,112, 97,100, 91, 55, 93, 0,112, -114,101,118,105,101,119, 95, 98, 97, 99,107, 91, 52, 93, 0,112,114,101,118,105,101,119, 95,115,116,105,116, 99,104, 95,102, 97, - 99,101, 91, 52, 93, 0,112,114,101,118,105,101,119, 95,115,116,105,116, 99,104, 95,101,100,103,101, 91, 52, 93, 0,112,114,101, -118,105,101,119, 95,115,116,105,116, 99,104, 95,118,101,114,116, 91, 52, 93, 0,112,114,101,118,105,101,119, 95,115,116,105,116, - 99,104, 95,115,116,105,116, 99,104, 97, 98,108,101, 91, 52, 93, 0,112,114,101,118,105,101,119, 95,115,116,105,116, 99,104, 95, -117,110,115,116,105,116, 99,104, 97, 98,108,101, 91, 52, 93, 0,112,114,101,118,105,101,119, 95,115,116,105,116, 99,104, 95, 97, - 99,116,105,118,101, 91, 52, 93, 0,109, 97,116, 99,104, 91, 52, 93, 0,115,101,108,101, 99,116,101,100, 95,104,105,103,104,108, -105,103,104,116, 91, 52, 93, 0,115,111,108,105,100, 91, 52, 93, 0,116,117,105, 0,116, 98,117,116,115, 0,116,118, 51,100, 0, -116,102,105,108,101, 0,116,105,112,111, 0,116,105,110,102,111, 0,116, 97, 99,116, 0,116,110,108, 97, 0,116,115,101,113, 0, -116,105,109, 97, 0,116,101,120,116, 0,116,111,111,112,115, 0,116,116,105,109,101, 0,116,110,111,100,101, 0,116,108,111,103, -105, 99, 0,116,117,115,101,114,112,114,101,102, 0,116, 99,111,110,115,111,108,101, 0,116, 99,108,105,112, 0,116, 97,114,109, - 91, 50, 48, 93, 0, 97, 99,116,105,118,101, 95,116,104,101,109,101, 95, 97,114,101, 97, 0,109,111,100,117,108,101, 91, 54, 52, - 93, 0,115,112,101, 99, 91, 52, 93, 0,100,117,112,102,108, 97,103, 0,115, 97,118,101,116,105,109,101, 0,116,101,109,112,100, -105,114, 91, 55, 54, 56, 93, 0,102,111,110,116,100,105,114, 91, 55, 54, 56, 93, 0,114,101,110,100,101,114,100,105,114, 91, 49, - 48, 50, 52, 93, 0,116,101,120,116,117,100,105,114, 91, 55, 54, 56, 93, 0,112,108,117,103,116,101,120,100,105,114, 91, 55, 54, - 56, 93, 0,112,108,117,103,115,101,113,100,105,114, 91, 55, 54, 56, 93, 0,112,121,116,104,111,110,100,105,114, 91, 55, 54, 56, - 93, 0,115,111,117,110,100,100,105,114, 91, 55, 54, 56, 93, 0,105,109, 97,103,101, 95,101,100,105,116,111,114, 91, 49, 48, 50, - 52, 93, 0, 97,110,105,109, 95,112,108, 97,121,101,114, 91, 49, 48, 50, 52, 93, 0, 97,110,105,109, 95,112,108, 97,121,101,114, - 95,112,114,101,115,101,116, 0,118, 50,100, 95,109,105,110, 95,103,114,105,100,115,105,122,101, 0,116,105,109,101, 99,111,100, -101, 95,115,116,121,108,101, 0,118,101,114,115,105,111,110,115, 0,100, 98,108, 95, 99,108,105, 99,107, 95,116,105,109,101, 0, -103, 97,109,101,102,108, 97,103,115, 0,119,104,101,101,108,108,105,110,101,115, 99,114,111,108,108, 0,117,105,102,108, 97,103, - 0,108, 97,110,103,117, 97,103,101, 0,117,115,101,114,112,114,101,102, 0,118,105,101,119,122,111,111,109, 0,109,105,120, 98, -117,102,115,105,122,101, 0, 97,117,100,105,111,100,101,118,105, 99,101, 0, 97,117,100,105,111,114, 97,116,101, 0, 97,117,100, -105,111,102,111,114,109, 97,116, 0, 97,117,100,105,111, 99,104, 97,110,110,101,108,115, 0,100,112,105, 0,101,110, 99,111,100, -105,110,103, 0,116,114, 97,110,115,111,112,116,115, 0,109,101,110,117,116,104,114,101,115,104,111,108,100, 49, 0,109,101,110, -117,116,104,114,101,115,104,111,108,100, 50, 0,116,104,101,109,101,115, 0,117,105,102,111,110,116,115, 0,117,105,115,116,121, -108,101,115, 0,107,101,121,109, 97,112,115, 0,117,115,101,114, 95,107,101,121,109, 97,112,115, 0, 97,100,100,111,110,115, 0, -107,101,121, 99,111,110,102,105,103,115,116,114, 91, 54, 52, 93, 0,117,110,100,111,115,116,101,112,115, 0,117,110,100,111,109, -101,109,111,114,121, 0,103,112, 95,109, 97,110,104, 97,116,116,101,110,100,105,115,116, 0,103,112, 95,101,117, 99,108,105,100, -101, 97,110,100,105,115,116, 0,103,112, 95,101,114, 97,115,101,114, 0,103,112, 95,115,101,116,116,105,110,103,115, 0,116, 98, - 95,108,101,102,116,109,111,117,115,101, 0,116, 98, 95,114,105,103,104,116,109,111,117,115,101, 0,108,105,103,104,116, 91, 51, - 93, 0,116,119, 95,104,111,116,115,112,111,116, 0,116,119, 95,102,108, 97,103, 0,116,119, 95,104, 97,110,100,108,101,115,105, -122,101, 0,116,119, 95,115,105,122,101, 0,116,101,120,116,105,109,101,111,117,116, 0,116,101,120, 99,111,108,108,101, 99,116, -114, 97,116,101, 0,119,109,100,114, 97,119,109,101,116,104,111,100, 0,100,114, 97,103,116,104,114,101,115,104,111,108,100, 0, -109,101,109, 99, 97, 99,104,101,108,105,109,105,116, 0,112,114,101,102,101,116, 99,104,102,114, 97,109,101,115, 0,102,114, 97, -109,101,115,101,114,118,101,114,112,111,114,116, 0,112, 97,100, 95,114,111,116, 95, 97,110,103,108,101, 0,111, 98, 99,101,110, -116,101,114, 95,100,105, 97, 0,114,118,105,115,105,122,101, 0,114,118,105, 98,114,105,103,104,116, 0,114,101, 99,101,110,116, - 95,102,105,108,101,115, 0,115,109,111,111,116,104, 95,118,105,101,119,116,120, 0,103,108,114,101,115,108,105,109,105,116, 0, - 99,117,114,115,115,105,122,101, 0, 99,111,108,111,114, 95,112,105, 99,107,101,114, 95,116,121,112,101, 0,105,112,111, 95,110, -101,119, 0,107,101,121,104, 97,110,100,108,101,115, 95,110,101,119, 0,115, 99,114, 99, 97,115,116,102,112,115, 0,115, 99,114, - 99, 97,115,116,119, 97,105,116, 0,119,105,100,103,101,116, 95,117,110,105,116, 0, 97,110,105,115,111,116,114,111,112,105, 99, - 95,102,105,108,116,101,114, 0,117,115,101, 95, 49, 54, 98,105,116, 95,116,101,120,116,117,114,101,115, 0,112, 97,100, 56, 0, -110,100,111,102, 95,115,101,110,115,105,116,105,118,105,116,121, 0,110,100,111,102, 95,102,108, 97,103, 0,103,108, 97,108,112, -104, 97, 99,108,105,112, 0,116,101,120,116, 95,114,101,110,100,101,114, 0,112, 97,100, 57, 0, 99,111, 98, 97, 95,119,101,105, -103,104,116, 0,115, 99,117,108,112,116, 95,112, 97,105,110,116, 95,111,118,101,114,108, 97,121, 95, 99,111,108, 91, 51, 93, 0, -116,119,101, 97,107, 95,116,104,114,101,115,104,111,108,100, 0, 97,117,116,104,111,114, 91, 56, 48, 93, 0, 99,111,109,112,117, -116,101, 95,100,101,118,105, 99,101, 95,116,121,112,101, 0, 99,111,109,112,117,116,101, 95,100,101,118,105, 99,101, 95,105,100, - 0,118,101,114,116, 98, 97,115,101, 0,101,100,103,101, 98, 97,115,101, 0, 97,114,101, 97, 98, 97,115,101, 0, 42,110,101,119, -115, 99,101,110,101, 0,114,101,100,114, 97,119,115, 95,102,108, 97,103, 0,102,117,108,108, 0,116,101,109,112, 0,119,105,110, -105,100, 0,100,111, 95,100,114, 97,119, 0,100,111, 95,114,101,102,114,101,115,104, 0,100,111, 95,100,114, 97,119, 95,103,101, -115,116,117,114,101, 0,100,111, 95,100,114, 97,119, 95,112, 97,105,110,116, 99,117,114,115,111,114, 0,100,111, 95,100,114, 97, -119, 95,100,114, 97,103, 0,115,119, 97,112, 0,109, 97,105,110,119,105,110, 0,115,117, 98,119,105,110, 97, 99,116,105,118,101, - 0, 42, 97,110,105,109,116,105,109,101,114, 0, 42, 99,111,110,116,101,120,116, 0,104, 97,110,100,108,101,114, 91, 56, 93, 0, - 42,110,101,119,118, 0,118,101, 99, 0, 42,118, 49, 0, 42,118, 50, 0, 42,116,121,112,101, 0,112, 97,110,101,108,110, 97,109, -101, 91, 54, 52, 93, 0,116, 97, 98,110, 97,109,101, 91, 54, 52, 93, 0,100,114, 97,119,110, 97,109,101, 91, 54, 52, 93, 0,111, -102,115,120, 0,111,102,115,121, 0,115,105,122,101,120, 0,115,105,122,101,121, 0,108, 97, 98,101,108,111,102,115, 0, 99,111, -110,116,114,111,108, 0,115,110, 97,112, 0,115,111,114,116,111,114,100,101,114, 0, 42,112, 97,110,101,108,116, 97, 98, 0, 42, - 97, 99,116,105,118,101,100, 97,116, 97, 0,108,105,115,116, 95,115, 99,114,111,108,108, 0,108,105,115,116, 95,115,105,122,101, - 0,108,105,115,116, 95,108, 97,115,116, 95,108,101,110, 0,108,105,115,116, 95,103,114,105,112, 95,115,105,122,101, 0,108,105, -115,116, 95,115,101, 97,114, 99,104, 91, 54, 52, 93, 0, 42,118, 51, 0, 42,118, 52, 0, 42,102,117,108,108, 0, 98,117,116,115, -112, 97, 99,101,116,121,112,101, 0,104,101, 97,100,101,114,116,121,112,101, 0,115,112, 97, 99,101,100, 97,116, 97, 0,104, 97, -110,100,108,101,114,115, 0, 97, 99,116,105,111,110,122,111,110,101,115, 0,119,105,110,114, 99,116, 0,100,114, 97,119,114, 99, -116, 0,115,119,105,110,105,100, 0,114,101,103,105,111,110,116,121,112,101, 0, 97,108,105,103,110,109,101,110,116, 0,100,111, - 95,100,114, 97,119, 95,111,118,101,114,108, 97,121, 0,117,105, 98,108,111, 99,107,115, 0,112, 97,110,101,108,115, 0, 42,104, -101, 97,100,101,114,115,116,114, 0, 42,114,101,103,105,111,110,100, 97,116, 97, 0,115,117, 98,118,115,116,114, 91, 52, 93, 0, -115,117, 98,118,101,114,115,105,111,110, 0,112, 97,100,115, 0,109,105,110,118,101,114,115,105,111,110, 0,109,105,110,115,117, - 98,118,101,114,115,105,111,110, 0,119,105,110,112,111,115, 0, 42, 99,117,114,115, 99,114,101,101,110, 0, 42, 99,117,114,115, - 99,101,110,101, 0,102,105,108,101,102,108, 97,103,115, 0,103,108,111, 98, 97,108,102, 0,114,101,118,105,115,105,111,110, 0, -110, 97,109,101, 91, 50, 53, 54, 93, 0,111,114,105,103, 95,119,105,100,116,104, 0,111,114,105,103, 95,104,101,105,103,104,116, - 0, 98,111,116,116,111,109, 0,114,105,103,104,116, 0,120,111,102,115, 0,121,111,102,115, 0,108,105,102,116, 91, 51, 93, 0, -103, 97,109,109, 97, 91, 51, 93, 0,103, 97,105,110, 91, 51, 93, 0,100,105,114, 91, 55, 54, 56, 93, 0,116, 99, 0, 98,117,105, -108,100, 95,115,105,122,101, 95,102,108, 97,103,115, 0, 98,117,105,108,100, 95,116, 99, 95,102,108, 97,103,115, 0,100,111,110, -101, 0,115,116, 97,114,116,115,116,105,108,108, 0,101,110,100,115,116,105,108,108, 0, 42,115,116,114,105,112,100, 97,116, 97, - 0, 42, 99,114,111,112, 0, 42,116,114, 97,110,115,102,111,114,109, 0, 42, 99,111,108,111,114, 95, 98, 97,108, 97,110, 99,101, - 0, 42,105,110,115,116, 97,110, 99,101, 95,112,114,105,118, 97,116,101, 95,100, 97,116, 97, 0, 42, 42, 99,117,114,114,101,110, -116, 95,112,114,105,118, 97,116,101, 95,100, 97,116, 97, 0, 42,116,109,112, 0,115,116, 97,114,116,111,102,115, 0,101,110,100, -111,102,115, 0,109, 97, 99,104,105,110,101, 0,115,116, 97,114,116,100,105,115,112, 0,101,110,100,100,105,115,112, 0,115, 97, -116, 0,109,117,108, 0,104, 97,110,100,115,105,122,101, 0, 97,110,105,109, 95,112,114,101,115,101,101,107, 0,115,116,114,101, - 97,109,105,110,100,101,120, 0, 42,115,116,114,105,112, 0, 42,115, 99,101,110,101, 95, 99, 97,109,101,114, 97, 0,101,102,102, -101, 99,116, 95,102, 97,100,101,114, 0,115,112,101,101,100, 95,102, 97,100,101,114, 0, 42,115,101,113, 49, 0, 42,115,101,113, - 50, 0, 42,115,101,113, 51, 0,115,101,113, 98, 97,115,101, 0, 42,115,111,117,110,100, 0, 42,115, 99,101,110,101, 95,115,111, -117,110,100, 0,112,105,116, 99,104, 0,112, 97,110, 0,115, 99,101,110,101,110,114, 0,109,117,108,116,105, 99, 97,109, 95,115, -111,117,114, 99,101, 0,115,116,114,111, 98,101, 0, 42,101,102,102,101, 99,116,100, 97,116, 97, 0, 97,110,105,109, 95,115,116, - 97,114,116,111,102,115, 0, 97,110,105,109, 95,101,110,100,111,102,115, 0, 98,108,101,110,100, 95,109,111,100,101, 0, 98,108, -101,110,100, 95,111,112, 97, 99,105,116,121, 0, 42,111,108,100, 98, 97,115,101,112, 0, 42,112, 97,114,115,101,113, 0, 42,115, -101,113, 98, 97,115,101,112, 0,109,101,116, 97,115,116, 97, 99,107, 0, 42, 97, 99,116, 95,115,101,113, 0, 97, 99,116, 95,105, -109, 97,103,101,100,105,114, 91, 49, 48, 50, 52, 93, 0, 97, 99,116, 95,115,111,117,110,100,100,105,114, 91, 49, 48, 50, 52, 93, - 0,111,118,101,114, 95,111,102,115, 0,111,118,101,114, 95, 99,102,114, 97, 0,111,118,101,114, 95,102,108, 97,103, 0,111,118, -101,114, 95, 98,111,114,100,101,114, 0,101,100,103,101, 87,105,100,116,104, 0,102,111,114,119, 97,114,100, 0,119,105,112,101, -116,121,112,101, 0,102, 77,105,110,105, 0,102, 67,108, 97,109,112, 0,102, 66,111,111,115,116, 0,100, 68,105,115,116, 0,100, - 81,117, 97,108,105,116,121, 0, 98, 78,111, 67,111,109,112, 0, 83, 99, 97,108,101,120, 73,110,105, 0, 83, 99, 97,108,101,121, - 73,110,105, 0,120, 73,110,105, 0,121, 73,110,105, 0,114,111,116, 73,110,105, 0,105,110,116,101,114,112,111,108, 97,116,105, -111,110, 0,117,110,105,102,111,114,109, 95,115, 99, 97,108,101, 0, 42,102,114, 97,109,101, 77, 97,112, 0,103,108,111, 98, 97, -108, 83,112,101,101,100, 0,108, 97,115,116, 86, 97,108,105,100, 70,114, 97,109,101, 0, 98,117,116,116,121,112,101, 0,117,115, -101,114,106,105,116, 0,115,116, 97, 0,116,111,116,112, 97,114,116, 0,110,111,114,109,102, 97, 99, 0,111, 98,102, 97, 99, 0, -114, 97,110,100,102, 97, 99, 0,116,101,120,102, 97, 99, 0,114, 97,110,100,108,105,102,101, 0,102,111,114, 99,101, 91, 51, 93, - 0,118,101, 99,116,115,105,122,101, 0,109, 97,120,108,101,110, 0,100,101,102,118,101, 99, 91, 51, 93, 0,109,117,108,116, 91, - 52, 93, 0,108,105,102,101, 91, 52, 93, 0, 99,104,105,108,100, 91, 52, 93, 0,109, 97,116, 91, 52, 93, 0,116,101,120,109, 97, -112, 0, 99,117,114,109,117,108,116, 0,115,116, 97,116,105, 99,115,116,101,112, 0,111,109, 97,116, 0,116,105,109,101,116,101, -120, 0,115,112,101,101,100,116,101,120, 0,102,108, 97,103, 50,110,101,103, 0,118,101,114,116,103,114,111,117,112, 95,118, 0, -118,103,114,111,117,112,110, 97,109,101, 91, 54, 52, 93, 0,118,103,114,111,117,112,110, 97,109,101, 95,118, 91, 54, 52, 93, 0, - 42,107,101,121,115, 0,109,105,110,102, 97, 99, 0,110,114, 0,117,115,101,100, 0,117,115,101,100,101,108,101,109, 0, 42,112, -111,105,110, 0,114,101,115,101,116,100,105,115,116, 0,108, 97,115,116,118, 97,108, 0, 42,109, 97, 0,107,101,121, 0,113,117, - 97,108, 0,113,117, 97,108, 50, 0,116, 97,114,103,101,116, 78, 97,109,101, 91, 54, 52, 93, 0,116,111,103,103,108,101, 78, 97, -109,101, 91, 54, 52, 93, 0,118, 97,108,117,101, 91, 54, 52, 93, 0,109, 97,120,118, 97,108,117,101, 91, 54, 52, 93, 0,100,101, -108, 97,121, 0,100,117,114, 97,116,105,111,110, 0,109, 97,116,101,114,105, 97,108, 78, 97,109,101, 91, 54, 52, 93, 0,100, 97, -109,112,116,105,109,101,114, 0,112,114,111,112,110, 97,109,101, 91, 54, 52, 93, 0,109, 97,116,110, 97,109,101, 91, 54, 52, 93, - 0, 97,120,105,115,102,108, 97,103, 0,112,111,115,101, 99,104, 97,110,110,101,108, 91, 54, 52, 93, 0, 99,111,110,115,116,114, - 97,105,110,116, 91, 54, 52, 93, 0, 42,102,114,111,109, 79, 98,106,101, 99,116, 0,115,117, 98,106,101, 99,116, 91, 54, 52, 93, - 0, 98,111,100,121, 91, 54, 52, 93, 0,111,116,121,112,101, 0,112,117,108,115,101, 0,102,114,101,113, 0,116,111,116,108,105, -110,107,115, 0, 42, 42,108,105,110,107,115, 0,108,101,118,101,108, 0,116, 97,112, 0,106,111,121,105,110,100,101,120, 0, 97, -120,105,115, 95,115,105,110,103,108,101, 0, 97,120,105,115,102, 0, 98,117,116,116,111,110, 0,104, 97,116, 0,104, 97,116,102, - 0,112,114,101, 99,105,115,105,111,110, 0,115,116,114, 91, 49, 50, 56, 93, 0, 42,109,121,110,101,119, 0,105,110,112,117,116, -115, 0,116,111,116,115,108,105,110,107,115, 0, 42, 42,115,108,105,110,107,115, 0,118, 97,108,111, 0,115,116, 97,116,101, 95, -109, 97,115,107, 0, 42, 97, 99,116, 0,102,114, 97,109,101, 80,114,111,112, 91, 54, 52, 93, 0, 98,108,101,110,100,105,110, 0, -112,114,105,111,114,105,116,121, 0,101,110,100, 95,114,101,115,101,116, 0,115,116,114,105,100,101, 97,120,105,115, 0,115,116, -114,105,100,101,108,101,110,103,116,104, 0,108, 97,121,101,114, 95,119,101,105,103,104,116, 0,109,105,110, 95,103, 97,105,110, - 0,109, 97,120, 95,103, 97,105,110, 0,114,101,102,101,114,101,110, 99,101, 95,100,105,115,116, 97,110, 99,101, 0,109, 97,120, - 95,100,105,115,116, 97,110, 99,101, 0,114,111,108,108,111,102,102, 95,102, 97, 99,116,111,114, 0, 99,111,110,101, 95,105,110, -110,101,114, 95, 97,110,103,108,101, 0, 99,111,110,101, 95,111,117,116,101,114, 95, 97,110,103,108,101, 0, 99,111,110,101, 95, -111,117,116,101,114, 95,103, 97,105,110, 0,115,110,100,110,114, 0,115,111,117,110,100, 51, 68, 0,112, 97,100, 54, 91, 49, 93, - 0, 42,109,101, 0,108,105,110, 86,101,108,111, 99,105,116,121, 91, 51, 93, 0, 97,110,103, 86,101,108,111, 99,105,116,121, 91, - 51, 93, 0,108,111, 99, 97,108,102,108, 97,103, 0,100,121,110, 95,111,112,101,114, 97,116,105,111,110, 0,102,111,114, 99,101, -108,111, 99, 91, 51, 93, 0,102,111,114, 99,101,114,111,116, 91, 51, 93, 0,112, 97,100, 49, 91, 51, 93, 0,108,105,110,101, 97, -114,118,101,108,111, 99,105,116,121, 91, 51, 93, 0, 97,110,103,117,108, 97,114,118,101,108,111, 99,105,116,121, 91, 51, 93, 0, - 42,114,101,102,101,114,101,110, 99,101, 0,109,105,110, 0,109, 97,120, 0,114,111,116,100, 97,109,112, 0,109,105,110,108,111, - 99, 91, 51, 93, 0,109, 97,120,108,111, 99, 91, 51, 93, 0,109,105,110,114,111,116, 91, 51, 93, 0,109, 97,120,114,111,116, 91, - 51, 93, 0,109, 97,116,112,114,111,112, 91, 54, 52, 93, 0, 98,117,116,115,116, 97, 0, 98,117,116,101,110,100, 0,100,105,115, -116,114,105, 98,117,116,105,111,110, 0,105,110,116, 95, 97,114,103, 95, 49, 0,105,110,116, 95, 97,114,103, 95, 50, 0,102,108, -111, 97,116, 95, 97,114,103, 95, 49, 0,102,108,111, 97,116, 95, 97,114,103, 95, 50, 0,116,111, 80,114,111,112, 78, 97,109,101, - 91, 54, 52, 93, 0, 42,116,111, 79, 98,106,101, 99,116, 0, 98,111,100,121, 84,121,112,101, 0,102,105,108,101,110, 97,109,101, - 91, 54, 52, 93, 0,108,111, 97,100, 97,110,105,110, 97,109,101, 91, 54, 52, 93, 0,105,110,116, 95, 97,114,103, 0,102,108,111, - 97,116, 95, 97,114,103, 0, 42,115,117, 98,116, 97,114,103,101,116, 0,102, 97, 99,105,110,103, 97,120,105,115, 0,118,101,108, -111, 99,105,116,121, 0, 97, 99, 99,101,108,101,114, 97,116,105,111,110, 0,116,117,114,110,115,112,101,101,100, 0,117,112,100, - 97,116,101, 84,105,109,101, 0, 42,110, 97,118,109,101,115,104, 0,103,111, 0, 42,110,101,119,112, 97, 99,107,101,100,102,105, -108,101, 0, 97,116,116,101,110,117, 97,116,105,111,110, 0,100,105,115,116, 97,110, 99,101, 0, 42, 99, 97, 99,104,101, 0, 42, -119, 97,118,101,102,111,114,109, 0, 42,112,108, 97,121, 98, 97, 99,107, 95,104, 97,110,100,108,101, 0, 42,108, 97,109,112,114, -101,110, 0,103,111, 98,106,101, 99,116, 0,100,117,112,108,105, 95,111,102,115, 91, 51, 93, 0, 42,112,114,111,112, 0, 99,104, -105,108,100, 98, 97,115,101, 0,114,111,108,108, 0,104,101, 97,100, 91, 51, 93, 0,116, 97,105,108, 91, 51, 93, 0, 98,111,110, -101, 95,109, 97,116, 91, 51, 93, 91, 51, 93, 0, 97,114,109, 95,104,101, 97,100, 91, 51, 93, 0, 97,114,109, 95,116, 97,105,108, - 91, 51, 93, 0, 97,114,109, 95,109, 97,116, 91, 52, 93, 91, 52, 93, 0, 97,114,109, 95,114,111,108,108, 0,120,119,105,100,116, -104, 0,122,119,105,100,116,104, 0,101, 97,115,101, 49, 0,101, 97,115,101, 50, 0,114, 97,100, 95,104,101, 97,100, 0,114, 97, -100, 95,116, 97,105,108, 0,112, 97,100, 91, 49, 93, 0, 98,111,110,101, 98, 97,115,101, 0, 99,104, 97,105,110, 98, 97,115,101, - 0, 42,101,100, 98,111, 0, 42, 97, 99,116, 95, 98,111,110,101, 0, 42, 97, 99,116, 95,101,100, 98,111,110,101, 0, 42,115,107, -101,116, 99,104, 0,103,101,118,101,114,116,100,101,102,111,114,109,101,114, 0,108, 97,121,101,114, 95,117,115,101,100, 0,108, - 97,121,101,114, 95,112,114,111,116,101, 99,116,101,100, 0,103,104,111,115,116,101,112, 0,103,104,111,115,116,115,105,122,101, - 0,103,104,111,115,116,116,121,112,101, 0,112, 97,116,104,115,105,122,101, 0,103,104,111,115,116,115,102, 0,103,104,111,115, -116,101,102, 0,112, 97,116,104,115,102, 0,112, 97,116,104,101,102, 0,112, 97,116,104, 98, 99, 0,112, 97,116,104, 97, 99, 0, - 42,112,111,105,110,116,115, 0,115,116, 97,114,116, 95,102,114, 97,109,101, 0,101,110,100, 95,102,114, 97,109,101, 0,103,104, -111,115,116, 95,115,102, 0,103,104,111,115,116, 95,101,102, 0,103,104,111,115,116, 95, 98, 99, 0,103,104,111,115,116, 95, 97, - 99, 0,103,104,111,115,116, 95,116,121,112,101, 0,103,104,111,115,116, 95,115,116,101,112, 0,103,104,111,115,116, 95,102,108, - 97,103, 0,112, 97,116,104, 95,116,121,112,101, 0,112, 97,116,104, 95,115,116,101,112, 0,112, 97,116,104, 95,118,105,101,119, -102,108, 97,103, 0,112, 97,116,104, 95, 98, 97,107,101,102,108, 97,103, 0,112, 97,116,104, 95,115,102, 0,112, 97,116,104, 95, -101,102, 0,112, 97,116,104, 95, 98, 99, 0,112, 97,116,104, 95, 97, 99, 0,105,107,102,108, 97,103, 0, 97,103,114,112, 95,105, -110,100,101,120, 0, 99,111,110,115,116,102,108, 97,103, 0,115,101,108,101, 99,116,102,108, 97,103, 0,112, 97,100, 48, 91, 54, - 93, 0, 42, 98,111,110,101, 0, 42, 99,104,105,108,100, 0,105,107,116,114,101,101, 0,115,105,107,116,114,101,101, 0, 42, 99, -117,115,116,111,109, 0, 42, 99,117,115,116,111,109, 95,116,120, 0,101,117,108, 91, 51, 93, 0, 99,104, 97,110, 95,109, 97,116, - 91, 52, 93, 91, 52, 93, 0,112,111,115,101, 95,109, 97,116, 91, 52, 93, 91, 52, 93, 0,112,111,115,101, 95,104,101, 97,100, 91, - 51, 93, 0,112,111,115,101, 95,116, 97,105,108, 91, 51, 93, 0,108,105,109,105,116,109,105,110, 91, 51, 93, 0,108,105,109,105, -116,109, 97,120, 91, 51, 93, 0,115,116,105,102,102,110,101,115,115, 91, 51, 93, 0,105,107,115,116,114,101,116, 99,104, 0,105, -107,114,111,116,119,101,105,103,104,116, 0,105,107,108,105,110,119,101,105,103,104,116, 0, 42,116,101,109,112, 0, 99,104, 97, -110, 98, 97,115,101, 0, 42, 99,104, 97,110,104, 97,115,104, 0,112,114,111,120,121, 95,108, 97,121,101,114, 0,115,116,114,105, -100,101, 95,111,102,102,115,101,116, 91, 51, 93, 0, 99,121, 99,108,105, 99, 95,111,102,102,115,101,116, 91, 51, 93, 0, 97,103, -114,111,117,112,115, 0, 97, 99,116,105,118,101, 95,103,114,111,117,112, 0,105,107,115,111,108,118,101,114, 0, 42,105,107,100, - 97,116, 97, 0, 42,105,107,112, 97,114, 97,109, 0,112,114,111,120,121, 95, 97, 99,116, 95, 98,111,110,101, 91, 54, 52, 93, 0, -110,117,109,105,116,101,114, 0,110,117,109,115,116,101,112, 0,109,105,110,115,116,101,112, 0,109, 97,120,115,116,101,112, 0, -115,111,108,118,101,114, 0,102,101,101,100, 98, 97, 99,107, 0,109, 97,120,118,101,108, 0,100, 97,109,112,109, 97,120, 0,100, - 97,109,112,101,112,115, 0, 99,104, 97,110,110,101,108,115, 0, 99,117,115,116,111,109, 67,111,108, 0, 99,115, 0, 99,117,114, -118,101,115, 0,103,114,111,117,112,115, 0, 97, 99,116,105,118,101, 95,109, 97,114,107,101,114, 0,105,100,114,111,111,116, 0, - 42,115,111,117,114, 99,101, 0, 42,102,105,108,116,101,114, 95,103,114,112, 0,115,101, 97,114, 99,104,115,116,114, 91, 54, 52, - 93, 0,102,105,108,116,101,114,102,108, 97,103, 0,114,101,110, 97,109,101, 73,110,100,101,120, 0, 97,100,115, 0,116,105,109, -101,115,108,105,100,101, 0, 42,103,114,112, 0,110, 97,109,101, 91, 51, 48, 93, 0,111,119,110,115,112, 97, 99,101, 0,116, 97, -114,115,112, 97, 99,101, 0,101,110,102,111,114, 99,101, 0,104,101, 97,100,116, 97,105,108, 0,108,105,110, 95,101,114,114,111, -114, 0,114,111,116, 95,101,114,114,111,114, 0, 42,116, 97,114, 0,109, 97,116,114,105,120, 91, 52, 93, 91, 52, 93, 0,115,112, - 97, 99,101, 0,114,111,116, 79,114,100,101,114, 0,116, 97,114,110,117,109, 0,116, 97,114,103,101,116,115, 0,105,116,101,114, - 97,116,105,111,110,115, 0,114,111,111,116, 98,111,110,101, 0,109, 97,120, 95,114,111,111,116, 98,111,110,101, 0, 42,112,111, -108,101,116, 97,114, 0,112,111,108,101,115,117, 98,116, 97,114,103,101,116, 91, 54, 52, 93, 0,112,111,108,101, 97,110,103,108, -101, 0,111,114,105,101,110,116,119,101,105,103,104,116, 0,103,114, 97, 98,116, 97,114,103,101,116, 91, 51, 93, 0,110,117,109, -112,111,105,110,116,115, 0, 99,104, 97,105,110,108,101,110, 0,120,122, 83, 99, 97,108,101, 77,111,100,101, 0,114,101,115,101, -114,118,101,100, 49, 0,114,101,115,101,114,118,101,100, 50, 0,109,105,110,109, 97,120,102,108, 97,103, 0,115,116,117, 99,107, - 0, 99, 97, 99,104,101, 91, 51, 93, 0,108,111, 99,107,102,108, 97,103, 0,102,111,108,108,111,119,102,108, 97,103, 0,118,111, -108,109,111,100,101, 0,112,108, 97,110,101, 0,111,114,103,108,101,110,103,116,104, 0, 98,117,108,103,101, 0,112,105,118, 88, - 0,112,105,118, 89, 0,112,105,118, 90, 0, 97,120, 88, 0, 97,120, 89, 0, 97,120, 90, 0,109,105,110, 76,105,109,105,116, 91, - 54, 93, 0,109, 97,120, 76,105,109,105,116, 91, 54, 93, 0,101,120,116,114, 97, 70,122, 0,105,110,118,109, 97,116, 91, 52, 93, - 91, 52, 93, 0,102,114,111,109, 0,116,111, 0,109, 97,112, 91, 51, 93, 0,101,120,112,111, 0,102,114,111,109, 95,109,105,110, - 91, 51, 93, 0,102,114,111,109, 95,109, 97,120, 91, 51, 93, 0,116,111, 95,109,105,110, 91, 51, 93, 0,116,111, 95,109, 97,120, - 91, 51, 93, 0,114,111,116, 65,120,105,115, 0,122,109,105,110, 0,122,109, 97,120, 0,112, 97,100, 91, 57, 93, 0,116,114, 97, - 99,107, 91, 54, 52, 93, 0,111, 98,106,101, 99,116, 91, 54, 52, 93, 0, 42,100,101,112,116,104, 95,111, 98, 0, 99,104, 97,110, -110,101,108, 91, 51, 50, 93, 0,110,111, 95,114,111,116, 95, 97,120,105,115, 0,115,116,114,105,100,101, 95, 97,120,105,115, 0, - 99,117,114,109,111,100, 0, 97, 99,116,115,116, 97,114,116, 0, 97, 99,116,101,110,100, 0, 97, 99,116,111,102,102,115, 0,115, -116,114,105,100,101,108,101,110, 0, 98,108,101,110,100,111,117,116, 0,115,116,114,105,100,101, 99,104, 97,110,110,101,108, 91, - 51, 50, 93, 0,111,102,102,115, 95, 98,111,110,101, 91, 51, 50, 93, 0,104, 97,115,105,110,112,117,116, 0,104, 97,115,111,117, -116,112,117,116, 0,100, 97,116, 97,116,121,112,101, 0,115,111, 99,107,101,116,116,121,112,101, 0,105,115, 95, 99,111,112,121, - 0,101,120,116,101,114,110, 97,108, 0, 42,110,101,119, 95,115,111, 99,107, 0, 42,115,116,111,114, 97,103,101, 0,108,105,109, -105,116, 0,115,116,114,117, 99,116, 95,116,121,112,101, 0,108,111, 99,120, 0,108,111, 99,121, 0, 42,100,101,102, 97,117,108, -116, 95,118, 97,108,117,101, 0,115,116, 97, 99,107, 95,105,110,100,101,120, 0,115,116, 97, 99,107, 95,116,121,112,101, 0,111, -119,110, 95,105,110,100,101,120, 0,116,111, 95,105,110,100,101,120, 0, 42,103,114,111,117,112,115,111, 99,107, 0, 42,108,105, -110,107, 0,110,115, 0, 42,114,101, 99,116, 0,120,115,105,122,101, 0,121,115,105,122,101, 0, 42,110,101,119, 95,110,111,100, -101, 0,108, 97,115,116,121, 0,111,117,116,112,117,116,115, 0,109,105,110,105,119,105,100,116,104, 0,117,112,100, 97,116,101, - 0,108, 97, 98,101,108, 91, 54, 52, 93, 0, 99,117,115,116,111,109, 49, 0, 99,117,115,116,111,109, 50, 0, 99,117,115,116,111, -109, 51, 0, 99,117,115,116,111,109, 52, 0,110,101,101,100, 95,101,120,101, 99, 0,101,120,101, 99, 0, 42,116,104,114,101, 97, -100,100, 97,116, 97, 0,116,111,116,114, 0, 98,117,116,114, 0,112,114,118,114, 0, 42, 98,108,111, 99,107, 0, 42,116,121,112, -101,105,110,102,111, 0, 42,102,114,111,109,110,111,100,101, 0, 42,116,111,110,111,100,101, 0, 42,102,114,111,109,115,111, 99, -107, 0, 42,116,111,115,111, 99,107, 0,110,111,100,101,115, 0,108,105,110,107,115, 0,105,110,105,116, 0, 99,117,114, 95,105, -110,100,101,120, 0,110,111,100,101,116,121,112,101, 0, 42,101,120,101, 99,100, 97,116, 97, 0, 40, 42,112,114,111,103,114,101, -115,115, 41, 40, 41, 0, 40, 42,115,116, 97,116,115, 95,100,114, 97,119, 41, 40, 41, 0, 40, 42,116,101,115,116, 95, 98,114,101, - 97,107, 41, 40, 41, 0, 42,116, 98,104, 0, 42,112,114,104, 0, 42,115,100,104, 0,118, 97,108,117,101, 91, 51, 93, 0,118, 97, -108,117,101, 91, 52, 93, 0, 99,121, 99,108,105, 99, 0,109,111,118,105,101, 0,115, 97,109,112,108,101,115, 0,109, 97,120,115, -112,101,101,100, 0,109,105,110,115,112,101,101,100, 0, 99,117,114,118,101,100, 0,112,101,114, 99,101,110,116,120, 0,112,101, -114, 99,101,110,116,121, 0, 98,111,107,101,104, 0,103, 97,109,109, 97, 0,105,109, 97,103,101, 95,105,110, 95,119,105,100,116, -104, 0,105,109, 97,103,101, 95,105,110, 95,104,101,105,103,104,116, 0, 99,101,110,116,101,114, 95,120, 0, 99,101,110,116,101, -114, 95,121, 0,115,112,105,110, 0,119,114, 97,112, 0,115,105,103,109, 97, 95, 99,111,108,111,114, 0,115,105,103,109, 97, 95, -115,112, 97, 99,101, 0,104,117,101, 0, 98, 97,115,101, 95,112, 97,116,104, 91, 49, 48, 50, 52, 93, 0, 97, 99,116,105,118,101, - 95,105,110,112,117,116, 0,117,115,101, 95,114,101,110,100,101,114, 95,102,111,114,109, 97,116, 0,102,111,114,109, 97,116, 0, -116, 49, 0,116, 50, 0,116, 51, 0,102,115,116,114,101,110,103,116,104, 0,102, 97,108,112,104, 97, 0,107,101,121, 91, 52, 93, - 0, 97,108,103,111,114,105,116,104,109, 0, 99,104, 97,110,110,101,108, 0,120, 49, 0,120, 50, 0,121, 49, 0,121, 50, 0,102, - 97, 99, 95,120, 49, 0,102, 97, 99, 95,120, 50, 0,102, 97, 99, 95,121, 49, 0,102, 97, 99, 95,121, 50, 0, 99,111,108,110, 97, -109,101, 91, 54, 52, 93, 0, 98,107,116,121,112,101, 0,112, 97,100, 95, 99, 49, 0,103, 97,109, 99,111, 0,110,111, 95,122, 98, -117,102, 0,102,115,116,111,112, 0,109, 97,120, 98,108,117,114, 0, 98,116,104,114,101,115,104, 0,114,111,116, 97,116,105,111, -110, 0,112, 97,100, 95,102, 49, 0, 42,100,105, 99,116, 0, 42,110,111,100,101, 0, 99,111,108,109,111,100, 0,109,105,120, 0, -102, 97,100,101, 0, 97,110,103,108,101, 95,111,102,115, 0,109, 0, 99, 0,106,105,116, 0,112,114,111,106, 0,102,105,116, 0, -115,108,111,112,101, 91, 51, 93, 0,112,111,119,101,114, 91, 51, 93, 0,108,105,102,116, 95,108,103,103, 91, 51, 93, 0,103, 97, -109,109, 97, 95,105,110,118, 91, 51, 93, 0,108,105,109, 99,104, 97,110, 0,117,110,115,112,105,108,108, 0,108,105,109,115, 99, - 97,108,101, 0,117,115,112,105,108,108,114, 0,117,115,112,105,108,108,103, 0,117,115,112,105,108,108, 98, 0,116,101,120, 95, -109, 97,112,112,105,110,103, 0, 99,111,108,111,114, 95,109, 97,112,112,105,110,103, 0,115,117,110, 95,100,105,114,101, 99,116, -105,111,110, 91, 51, 93, 0,116,117,114, 98,105,100,105,116,121, 0, 99,111,108,111,114, 95,115,112, 97, 99,101, 0,103,114, 97, -100,105,101,110,116, 95,116,121,112,101, 0, 99,111,108,111,114,105,110,103, 0,109,117,115,103,114, 97,118,101, 95,116,121,112, -101, 0,119, 97,118,101, 95,116,121,112,101, 0,115,104,111,114,116,121, 0,109,105,110,116, 97, 98,108,101, 0,109, 97,120,116, - 97, 98,108,101, 0,101,120,116, 95,105,110, 91, 50, 93, 0,101,120,116, 95,111,117,116, 91, 50, 93, 0, 42, 99,117,114,118,101, - 0, 42,116, 97, 98,108,101, 0, 42,112,114,101,109,117,108,116, 97, 98,108,101, 0,112,114,101,115,101,116, 0, 99,104, 97,110, -103,101,100, 95,116,105,109,101,115,116, 97,109,112, 0, 99,117,114,114, 0, 99,108,105,112,114, 0, 99,109, 91, 52, 93, 0, 98, -108, 97, 99,107, 91, 51, 93, 0,119,104,105,116,101, 91, 51, 93, 0, 98,119,109,117,108, 91, 51, 93, 0,115, 97,109,112,108,101, - 91, 51, 93, 0,120, 95,114,101,115,111,108,117,116,105,111,110, 0,100, 97,116, 97, 95,114, 91, 50, 53, 54, 93, 0,100, 97,116, - 97, 95,103, 91, 50, 53, 54, 93, 0,100, 97,116, 97, 95, 98, 91, 50, 53, 54, 93, 0,100, 97,116, 97, 95,108,117,109, 97, 91, 50, - 53, 54, 93, 0,115, 97,109,112,108,101, 95,102,117,108,108, 0,115, 97,109,112,108,101, 95,108,105,110,101,115, 0, 97, 99, 99, -117,114, 97, 99,121, 0,119, 97,118,101,102,114,109, 95,109,111,100,101, 0,119, 97,118,101,102,114,109, 95, 97,108,112,104, 97, - 0,119, 97,118,101,102,114,109, 95,121,102, 97, 99, 0,119, 97,118,101,102,114,109, 95,104,101,105,103,104,116, 0,118,101, 99, -115, 99,111,112,101, 95, 97,108,112,104, 97, 0,118,101, 99,115, 99,111,112,101, 95,104,101,105,103,104,116, 0,109,105,110,109, - 97,120, 91, 51, 93, 91, 50, 93, 0,104,105,115,116, 0, 42,119, 97,118,101,102,111,114,109, 95, 49, 0, 42,119, 97,118,101,102, -111,114,109, 95, 50, 0, 42,119, 97,118,101,102,111,114,109, 95, 51, 0, 42,118,101, 99,115, 99,111,112,101, 0,119, 97,118,101, -102,111,114,109, 95,116,111,116, 0,111,102,102,115,101,116, 91, 50, 93, 0, 99,108,111,110,101, 0,109,116,101,120, 0, 42,105, - 99,111,110, 95,105,109, 98,117,102, 0,105, 99,111,110, 95,102,105,108,101,112, 97,116,104, 91, 49, 48, 50, 52, 93, 0,110,111, -114,109, 97,108, 95,119,101,105,103,104,116, 0,111, 98, 95,109,111,100,101, 0,106,105,116,116,101,114, 0,115,109,111,111,116, -104, 95,115,116,114,111,107,101, 95,114, 97,100,105,117,115, 0,115,109,111,111,116,104, 95,115,116,114,111,107,101, 95,102, 97, - 99,116,111,114, 0,114, 97,116,101, 0,114,103, 98, 91, 51, 93, 0,115, 99,117,108,112,116, 95,112,108, 97,110,101, 0,112,108, - 97,110,101, 95,111,102,102,115,101,116, 0,115, 99,117,108,112,116, 95,116,111,111,108, 0,118,101,114,116,101,120,112, 97,105, -110,116, 95,116,111,111,108, 0,105,109, 97,103,101,112, 97,105,110,116, 95,116,111,111,108, 0,112, 97,100, 51, 91, 53, 93, 0, - 97,117,116,111,115,109,111,111,116,104, 95,102, 97, 99,116,111,114, 0, 99,114,101, 97,115,101, 95,112,105,110, 99,104, 95,102, - 97, 99,116,111,114, 0,112,108, 97,110,101, 95,116,114,105,109, 0,116,101,120,116,117,114,101, 95,115, 97,109,112,108,101, 95, - 98,105, 97,115, 0,116,101,120,116,117,114,101, 95,111,118,101,114,108, 97,121, 95, 97,108,112,104, 97, 0, 97,100,100, 95, 99, -111,108, 91, 51, 93, 0,115,117, 98, 95, 99,111,108, 91, 51, 93, 0, 97, 99,116,105,118,101, 95,114,110,100, 0, 97, 99,116,105, -118,101, 95, 99,108,111,110,101, 0, 97, 99,116,105,118,101, 95,109, 97,115,107, 0, 42,108, 97,121,101,114,115, 0,116,121,112, -101,109, 97,112, 91, 51, 52, 93, 0,116,111,116,108, 97,121,101,114, 0,109, 97,120,108, 97,121,101,114, 0,116,111,116,115,105, -122,101, 0, 42,112,111,111,108, 0, 42,101,120,116,101,114,110, 97,108, 0,114,111,116, 91, 52, 93, 0, 97,118,101, 91, 51, 93, - 0, 42,103,114,111,117,110,100, 0,119, 97,110,100,101,114, 91, 51, 93, 0,114,101,115,116, 95,108,101,110,103,116,104, 0,112, - 97,114,116,105, 99,108,101, 95,105,110,100,101,120, 91, 50, 93, 0,100,101,108,101,116,101, 95,102,108, 97,103, 0,110,117,109, - 0,112, 97,114,101,110,116, 0,112, 97, 91, 52, 93, 0,119, 91, 52, 93, 0,102,117,118, 91, 52, 93, 0,102,111,102,102,115,101, -116, 0,112,114,101,118, 95,115,116, 97,116,101, 0, 42,104, 97,105,114, 0, 42, 98,111,105,100, 0,100,105,101,116,105,109,101, - 0,110,117,109, 95,100,109, 99, 97, 99,104,101, 0,104, 97,105,114, 95,105,110,100,101,120, 0, 97,108,105,118,101, 0,115,112, -114,105,110,103, 95,107, 0,112,108, 97,115,116,105, 99,105,116,121, 95, 99,111,110,115,116, 97,110,116, 0,121,105,101,108,100, - 95,114, 97,116,105,111, 0,112,108, 97,115,116,105, 99,105,116,121, 95, 98, 97,108, 97,110, 99,101, 0,121,105,101,108,100, 95, - 98, 97,108, 97,110, 99,101, 0,118,105,115, 99,111,115,105,116,121, 95,111,109,101,103, 97, 0,118,105,115, 99,111,115,105,116, -121, 95, 98,101,116, 97, 0,115,116,105,102,102,110,101,115,115, 95,107, 0,115,116,105,102,102,110,101,115,115, 95,107,110,101, - 97,114, 0,114,101,115,116, 95,100,101,110,115,105,116,121, 0, 98,117,111,121, 97,110, 99,121, 0,115,112,114,105,110,103, 95, -102,114, 97,109,101,115, 0, 42, 98,111,105,100,115, 0, 42,102,108,117,105,100, 0,100,105,115,116,114, 0,112,104,121,115,116, -121,112,101, 0, 97,118,101,109,111,100,101, 0,114,101, 97, 99,116,101,118,101,110,116, 0,100,114, 97,119, 0,100,114, 97,119, - 95, 97,115, 0,100,114, 97,119, 95,115,105,122,101, 0, 99,104,105,108,100,116,121,112,101, 0,114,101,110, 95, 97,115, 0,115, -117, 98,102,114, 97,109,101,115, 0,100,114, 97,119, 95, 99,111,108, 0,114,101,110, 95,115,116,101,112, 0,104, 97,105,114, 95, -115,116,101,112, 0,107,101,121,115, 95,115,116,101,112, 0, 97,100, 97,112,116, 95, 97,110,103,108,101, 0, 97,100, 97,112,116, - 95,112,105,120, 0,114,111,116,102,114,111,109, 0,105,110,116,101,103,114, 97,116,111,114, 0, 98, 98, 95, 97,108,105,103,110, - 0, 98, 98, 95,117,118, 95,115,112,108,105,116, 0, 98, 98, 95, 97,110,105,109, 0, 98, 98, 95,115,112,108,105,116, 95,111,102, -102,115,101,116, 0, 98, 98, 95,116,105,108,116, 0, 98, 98, 95,114, 97,110,100, 95,116,105,108,116, 0, 98, 98, 95,111,102,102, -115,101,116, 91, 50, 93, 0, 98, 98, 95,115,105,122,101, 91, 50, 93, 0, 98, 98, 95,118,101,108, 95,104,101, 97,100, 0, 98, 98, - 95,118,101,108, 95,116, 97,105,108, 0, 99,111,108,111,114, 95,118,101, 99, 95,109, 97,120, 0,115,105,109,112,108,105,102,121, - 95,114,101,102,115,105,122,101, 0,115,105,109,112,108,105,102,121, 95,114, 97,116,101, 0,115,105,109,112,108,105,102,121, 95, -116,114, 97,110,115,105,116,105,111,110, 0,115,105,109,112,108,105,102,121, 95,118,105,101,119,112,111,114,116, 0,116,105,109, -101,116,119,101, 97,107, 0, 99,111,117,114, 97,110,116, 95,116, 97,114,103,101,116, 0,106,105,116,102, 97, 99, 0,101,102,102, - 95,104, 97,105,114, 0,103,114,105,100, 95,114, 97,110,100, 0,112,115, 95,111,102,102,115,101,116, 91, 49, 93, 0,103,114,105, -100, 95,114,101,115, 0,101,102,102,101, 99,116,111,114, 95, 97,109,111,117,110,116, 0,116,105,109,101, 95,102,108, 97,103, 0, -116,105,109,101, 95,112, 97,100, 91, 51, 93, 0,112, 97,114,116,102, 97, 99, 0,116, 97,110,102, 97, 99, 0,116, 97,110,112,104, - 97,115,101, 0,114,101, 97, 99,116,102, 97, 99, 0,111, 98, 95,118,101,108, 91, 51, 93, 0, 97,118,101,102, 97, 99, 0,112,104, - 97,115,101,102, 97, 99, 0,114, 97,110,100,114,111,116,102, 97, 99, 0,114, 97,110,100,112,104, 97,115,101,102, 97, 99, 0,114, - 97,110,100,115,105,122,101, 0, 97, 99, 99, 91, 51, 93, 0,100,114, 97,103,102, 97, 99, 0, 98,114,111,119,110,102, 97, 99, 0, -114, 97,110,100,108,101,110,103,116,104, 0, 99,104,105,108,100, 95,110, 98,114, 0,114,101,110, 95, 99,104,105,108,100, 95,110, - 98,114, 0,112, 97,114,101,110,116,115, 0, 99,104,105,108,100,115,105,122,101, 0, 99,104,105,108,100,114, 97,110,100,115,105, -122,101, 0, 99,104,105,108,100,114, 97,100, 0, 99,104,105,108,100,102,108, 97,116, 0, 99,108,117,109,112,112,111,119, 0,107, -105,110,107, 95,102,108, 97,116, 0,107,105,110,107, 95, 97,109,112, 95, 99,108,117,109,112, 0,114,111,117,103,104, 49, 0,114, -111,117,103,104, 49, 95,115,105,122,101, 0,114,111,117,103,104, 50, 0,114,111,117,103,104, 50, 95,115,105,122,101, 0,114,111, -117,103,104, 50, 95,116,104,114,101,115, 0,114,111,117,103,104, 95,101,110,100, 0,114,111,117,103,104, 95,101,110,100, 95,115, -104, 97,112,101, 0, 99,108,101,110,103,116,104, 0, 99,108,101,110,103,116,104, 95,116,104,114,101,115, 0,112, 97,114,116,105, -110,103, 95,102, 97, 99, 0,112, 97,114,116,105,110,103, 95,109,105,110, 0,112, 97,114,116,105,110,103, 95,109, 97,120, 0, 98, -114, 97,110, 99,104, 95,116,104,114,101,115, 0,100,114, 97,119, 95,108,105,110,101, 91, 50, 93, 0,112, 97,116,104, 95,115,116, - 97,114,116, 0,112, 97,116,104, 95,101,110,100, 0,116,114, 97,105,108, 95, 99,111,117,110,116, 0,107,101,121,101,100, 95,108, -111,111,112,115, 0,100,117,112,108,105,119,101,105,103,104,116,115, 0, 42,101,102,102, 95,103,114,111,117,112, 0, 42,100,117, -112, 95,111, 98, 0, 42, 98, 98, 95,111, 98, 0, 42,112,100, 50, 0, 42,112, 97,114,116, 0, 42,112, 97,114,116,105, 99,108,101, -115, 0, 42, 42,112, 97,116,104, 99, 97, 99,104,101, 0, 42, 42, 99,104,105,108,100, 99, 97, 99,104,101, 0,112, 97,116,104, 99, - 97, 99,104,101, 98,117,102,115, 0, 99,104,105,108,100, 99, 97, 99,104,101, 98,117,102,115, 0, 42, 99,108,109,100, 0, 42,104, - 97,105,114, 95,105,110, 95,100,109, 0, 42,104, 97,105,114, 95,111,117,116, 95,100,109, 0, 42,116, 97,114,103,101,116, 95,111, - 98, 0, 42,108, 97,116,116,105, 99,101, 0,116,114,101,101, 95,102,114, 97,109,101, 0, 98,118,104,116,114,101,101, 95,102,114, - 97,109,101, 0, 99,104,105,108,100, 95,115,101,101,100, 0,116,111,116,117,110,101,120,105,115,116, 0,116,111,116, 99,104,105, -108,100, 0,116,111,116, 99, 97, 99,104,101,100, 0,116,111,116, 99,104,105,108,100, 99, 97, 99,104,101, 0,116, 97,114,103,101, -116, 95,112,115,121,115, 0,116,111,116,107,101,121,101,100, 0, 98, 97,107,101,115,112, 97, 99,101, 0, 98, 98, 95,117,118,110, - 97,109,101, 91, 51, 93, 91, 54, 52, 93, 0,118,103,114,111,117,112, 91, 49, 50, 93, 0,118,103, 95,110,101,103, 0,114,116, 51, - 0, 42,114,101,110,100,101,114,100, 97,116, 97, 0, 42,101,102,102,101, 99,116,111,114,115, 0, 42,102,108,117,105,100, 95,115, -112,114,105,110,103,115, 0,116,111,116, 95,102,108,117,105,100,115,112,114,105,110,103,115, 0, 97,108,108,111, 99, 95,102,108, -117,105,100,115,112,114,105,110,103,115, 0, 42,116,114,101,101, 0, 42,112,100,100, 0, 42,102,114, 97,110,100, 0,100,116, 95, -102,114, 97, 99, 0, 95,112, 97,100, 0, 67,100,105,115, 0, 67,118,105, 0,115,116,114,117, 99,116,117,114, 97,108, 0, 98,101, -110,100,105,110,103, 0,109, 97,120, 95, 98,101,110,100, 0,109, 97,120, 95,115,116,114,117, 99,116, 0,109, 97,120, 95,115,104, -101, 97,114, 0, 97,118,103, 95,115,112,114,105,110,103, 95,108,101,110, 0,116,105,109,101,115, 99, 97,108,101, 0,101,102,102, - 95,102,111,114, 99,101, 95,115, 99, 97,108,101, 0,101,102,102, 95,119,105,110,100, 95,115, 99, 97,108,101, 0,115,105,109, 95, -116,105,109,101, 95,111,108,100, 0,118,101,108,111, 99,105,116,121, 95,115,109,111,111,116,104, 0, 99,111,108,108,105,100,101, -114, 95,102,114,105, 99,116,105,111,110, 0,118,101,108, 95,100, 97,109,112,105,110,103, 0,115,116,101,112,115, 80,101,114, 70, -114, 97,109,101, 0,112,114,101,114,111,108,108, 0,109, 97,120,115,112,114,105,110,103,108,101,110, 0,115,111,108,118,101,114, - 95,116,121,112,101, 0,118,103,114,111,117,112, 95, 98,101,110,100, 0,118,103,114,111,117,112, 95,109, 97,115,115, 0,118,103, -114,111,117,112, 95,115,116,114,117, 99,116, 0,115,104, 97,112,101,107,101,121, 95,114,101,115,116, 0,112,114,101,115,101,116, -115, 0,114,101,115,101,116, 0, 42, 99,111,108,108,105,115,105,111,110, 95,108,105,115,116, 0,101,112,115,105,108,111,110, 0, -115,101,108,102, 95,102,114,105, 99,116,105,111,110, 0,115,101,108,102,101,112,115,105,108,111,110, 0,114,101,112,101,108, 95, -102,111,114, 99,101, 0,100,105,115,116, 97,110, 99,101, 95,114,101,112,101,108, 0,115,101,108,102, 95,108,111,111,112, 95, 99, -111,117,110,116, 0,108,111,111,112, 95, 99,111,117,110,116, 0,112,114,101,115,115,117,114,101, 0,116,104,105, 99,107,110,101, -115,115, 0,115,116,114,111,107,101,115, 0,102,114, 97,109,101,110,117,109, 0, 42, 97, 99,116,102,114, 97,109,101, 0,103,115, -116,101,112, 0,105,110,102,111, 91, 49, 50, 56, 93, 0,115, 98,117,102,102,101,114, 95,115,105,122,101, 0,115, 98,117,102,102, -101,114, 95,115,102,108, 97,103, 0, 42,115, 98,117,102,102,101,114, 0,108,105,115,116, 0,112,114,105,110,116,108,101,118,101, -108, 0,115,116,111,114,101,108,101,118,101,108, 0, 42,114,101,112,111,114,116,116,105,109,101,114, 0, 42,119,105,110,100,114, - 97,119, 97, 98,108,101, 0, 42,119,105,110, 97, 99,116,105,118,101, 0,119,105,110,100,111,119,115, 0,105,110,105,116,105, 97, -108,105,122,101,100, 0,102,105,108,101, 95,115, 97,118,101,100, 0,111,112, 95,117,110,100,111, 95,100,101,112,116,104, 0,111, -112,101,114, 97,116,111,114,115, 0,113,117,101,117,101, 0,114,101,112,111,114,116,115, 0,106,111, 98,115, 0,112, 97,105,110, -116, 99,117,114,115,111,114,115, 0,100,114, 97,103,115, 0,107,101,121, 99,111,110,102,105,103,115, 0, 42,100,101,102, 97,117, -108,116, 99,111,110,102, 0, 42, 97,100,100,111,110, 99,111,110,102, 0, 42,117,115,101,114, 99,111,110,102, 0,116,105,109,101, -114,115, 0, 42, 97,117,116,111,115, 97,118,101,116,105,109,101,114, 0, 42,103,104,111,115,116,119,105,110, 0,103,114, 97, 98, - 99,117,114,115,111,114, 0, 42,115, 99,114,101,101,110, 0, 42,110,101,119,115, 99,114,101,101,110, 0,115, 99,114,101,101,110, -110, 97,109,101, 91, 54, 52, 93, 0,112,111,115,120, 0,112,111,115,121, 0,119,105,110,100,111,119,115,116, 97,116,101, 0,109, -111,110,105,116,111,114, 0,108, 97,115,116, 99,117,114,115,111,114, 0,109,111,100, 97,108, 99,117,114,115,111,114, 0, 97,100, -100,109,111,117,115,101,109,111,118,101, 0, 42,101,118,101,110,116,115,116, 97,116,101, 0, 42, 99,117,114,115,119,105,110, 0, - 42,116,119,101, 97,107, 0,100,114, 97,119,109,101,116,104,111,100, 0,100,114, 97,119,102, 97,105,108, 0, 42,100,114, 97,119, -100, 97,116, 97, 0,109,111,100, 97,108,104, 97,110,100,108,101,114,115, 0,115,117, 98,119,105,110,100,111,119,115, 0,103,101, -115,116,117,114,101, 0,105,100,110, 97,109,101, 91, 54, 52, 93, 0,112,114,111,112,118, 97,108,117,101, 0,115,104,105,102,116, - 0, 99,116,114,108, 0, 97,108,116, 0,111,115,107,101,121, 0,107,101,121,109,111,100,105,102,105,101,114, 0,109, 97,112,116, -121,112,101, 0, 42,112,116,114, 0, 42,114,101,109,111,118,101, 95,105,116,101,109, 0, 42, 97,100,100, 95,105,116,101,109, 0, -105,116,101,109,115, 0,100,105,102,102, 95,105,116,101,109,115, 0,115,112, 97, 99,101,105,100, 0,114,101,103,105,111,110,105, -100, 0,107,109,105, 95,105,100, 0, 40, 42,112,111,108,108, 41, 40, 41, 0, 42,109,111,100, 97,108, 95,105,116,101,109,115, 0, - 98, 97,115,101,110, 97,109,101, 91, 54, 52, 93, 0, 97, 99,116,107,101,121,109, 97,112, 0, 42, 99,117,115,116,111,109,100, 97, -116, 97, 0, 42,112,121, 95,105,110,115,116, 97,110, 99,101, 0, 42,114,101,112,111,114,116,115, 0,109, 97, 99,114,111, 0, 42, -111,112,109, 0, 42,101,100, 97,116, 97, 0,105,110,102,108,117,101,110, 99,101, 0, 42, 99,111,101,102,102,105, 99,105,101,110, -116,115, 0, 97,114,114, 97,121,115,105,122,101, 0,112,111,108,121, 95,111,114,100,101,114, 0, 97,109,112,108,105,116,117,100, -101, 0,112,104, 97,115,101, 95,109,117,108,116,105,112,108,105,101,114, 0,112,104, 97,115,101, 95,111,102,102,115,101,116, 0, -118, 97,108,117,101, 95,111,102,102,115,101,116, 0,109,105,100,118, 97,108, 0, 98,101,102,111,114,101, 95,109,111,100,101, 0, - 97,102,116,101,114, 95,109,111,100,101, 0, 98,101,102,111,114,101, 95, 99,121, 99,108,101,115, 0, 97,102,116,101,114, 95, 99, -121, 99,108,101,115, 0,114,101, 99,116, 0,112,104, 97,115,101, 0,109,111,100,105,102,105, 99, 97,116,105,111,110, 0,115,116, -101,112, 95,115,105,122,101, 0, 42,114,110, 97, 95,112, 97,116,104, 0,112, 99,104, 97,110, 95,110, 97,109,101, 91, 51, 50, 93, - 0,116,114, 97,110,115, 67,104, 97,110, 0,105,100,116,121,112,101, 0,116, 97,114,103,101,116,115, 91, 56, 93, 0,110,117,109, - 95,116, 97,114,103,101,116,115, 0,118, 97,114,105, 97, 98,108,101,115, 0,101,120,112,114,101,115,115,105,111,110, 91, 50, 53, - 54, 93, 0, 42,101,120,112,114, 95, 99,111,109,112, 0,118,101, 99, 91, 50, 93, 0, 42,102,112,116, 0, 97,114,114, 97,121, 95, -105,110,100,101,120, 0, 99,111,108,111,114, 95,109,111,100,101, 0, 99,111,108,111,114, 91, 51, 93, 0,102,114,111,109, 91, 49, - 50, 56, 93, 0,116,111, 91, 49, 50, 56, 93, 0,109, 97,112,112,105,110,103,115, 0,115,116,114,105,112,115, 0, 42,114,101,109, - 97,112, 0,102, 99,117,114,118,101,115, 0,115,116,114,105,112, 95,116,105,109,101, 0, 98,108,101,110,100,109,111,100,101, 0, -101,120,116,101,110,100,109,111,100,101, 0, 42,115,112,101, 97,107,101,114, 95,104, 97,110,100,108,101, 0,103,114,111,117,112, - 91, 54, 52, 93, 0,103,114,111,117,112,109,111,100,101, 0,107,101,121,105,110,103,102,108, 97,103, 0,112, 97,116,104,115, 0, -116,121,112,101,105,110,102,111, 91, 54, 52, 93, 0, 97, 99,116,105,118,101, 95,112, 97,116,104, 0, 42,116,109,112, 97, 99,116, - 0,110,108, 97, 95,116,114, 97, 99,107,115, 0, 42, 97, 99,116,115,116,114,105,112, 0,100,114,105,118,101,114,115, 0,111,118, -101,114,114,105,100,101,115, 0, 97, 99,116, 95, 98,108,101,110,100,109,111,100,101, 0, 97, 99,116, 95,101,120,116,101,110,100, -109,111,100,101, 0, 97, 99,116, 95,105,110,102,108,117,101,110, 99,101, 0,114,117,108,101, 0,111,112,116,105,111,110,115, 0, -102,101, 97,114, 95,102, 97, 99,116,111,114, 0,115,105,103,110, 97,108, 95,105,100, 0,108,111,111,107, 95, 97,104,101, 97,100, - 0,111,108,111, 99, 91, 51, 93, 0,113,117,101,117,101, 95,115,105,122,101, 0,119, 97,110,100,101,114, 0,102,108,101,101, 95, -100,105,115,116, 97,110, 99,101, 0,104,101, 97,108,116,104, 0,115,116, 97,116,101, 95,105,100, 0,114,117,108,101,115, 0, 99, -111,110,100,105,116,105,111,110,115, 0, 97, 99,116,105,111,110,115, 0,114,117,108,101,115,101,116, 95,116,121,112,101, 0,114, -117,108,101, 95,102,117,122,122,105,110,101,115,115, 0,108, 97,115,116, 95,115,116, 97,116,101, 95,105,100, 0,108, 97,110,100, -105,110,103, 95,115,109,111,111,116,104,110,101,115,115, 0, 98, 97,110,107,105,110,103, 0, 97,103,103,114,101,115,115,105,111, -110, 0, 97,105,114, 95,109,105,110, 95,115,112,101,101,100, 0, 97,105,114, 95,109, 97,120, 95,115,112,101,101,100, 0, 97,105, -114, 95,109, 97,120, 95, 97, 99, 99, 0, 97,105,114, 95,109, 97,120, 95, 97,118,101, 0, 97,105,114, 95,112,101,114,115,111,110, - 97,108, 95,115,112, 97, 99,101, 0,108, 97,110,100, 95,106,117,109,112, 95,115,112,101,101,100, 0,108, 97,110,100, 95,109, 97, -120, 95,115,112,101,101,100, 0,108, 97,110,100, 95,109, 97,120, 95, 97, 99, 99, 0,108, 97,110,100, 95,109, 97,120, 95, 97,118, -101, 0,108, 97,110,100, 95,112,101,114,115,111,110, 97,108, 95,115,112, 97, 99,101, 0,108, 97,110,100, 95,115,116,105, 99,107, - 95,102,111,114, 99,101, 0,115,116, 97,116,101,115, 0, 42,115,109,100, 0, 42,102,108,117,105,100, 95,103,114,111,117,112, 0, - 42, 99,111,108,108, 95,103,114,111,117,112, 0, 42,119,116, 0, 42,116,101,120, 95,119,116, 0, 42,116,101,120, 95,115,104, 97, -100,111,119, 0, 42,115,104, 97,100,111,119, 0,112, 48, 91, 51, 93, 0,112, 49, 91, 51, 93, 0,100,120, 0,111,109,101,103, 97, - 0,116,101,109,112, 65,109, 98, 0, 98,101,116, 97, 0,114,101,115, 91, 51, 93, 0, 97,109,112,108,105,102,121, 0,109, 97,120, -114,101,115, 0,118,105,101,119,115,101,116,116,105,110,103,115, 0,110,111,105,115,101, 0,100,105,115,115, 95,112,101,114, 99, -101,110,116, 0,100,105,115,115, 95,115,112,101,101,100, 0,114,101,115, 95,119,116, 91, 51, 93, 0,100,120, 95,119,116, 0,118, - 51,100,110,117,109, 0, 99, 97, 99,104,101, 95, 99,111,109,112, 0, 99, 97, 99,104,101, 95,104,105,103,104, 95, 99,111,109,112, - 0, 42,112,111,105,110,116, 95, 99, 97, 99,104,101, 91, 50, 93, 0,112,116, 99, 97, 99,104,101,115, 91, 50, 93, 0, 98,111,114, -100,101,114, 95, 99,111,108,108,105,115,105,111,110,115, 0,116,105,109,101, 95,115, 99, 97,108,101, 0,118,111,114,116,105, 99, -105,116,121, 0,118,101,108,111, 99,105,116,121, 91, 50, 93, 0,118,101,108, 95,109,117,108,116,105, 0,118,103,114,112, 95,104, -101, 97,116, 95,115, 99, 97,108,101, 91, 50, 93, 0,118,103,114,111,117,112, 95,102,108,111,119, 0,118,103,114,111,117,112, 95, -100,101,110,115,105,116,121, 0,118,103,114,111,117,112, 95,104,101, 97,116, 0, 42,112,111,105,110,116,115, 95,111,108,100, 0, - 42,118,101,108, 0,109, 97,116, 95,111,108,100, 91, 52, 93, 91, 52, 93, 0,118,111,108,117,109,101, 95,109, 97,120, 0,118,111, -108,117,109,101, 95,109,105,110, 0,100,105,115,116, 97,110, 99,101, 95,109, 97,120, 0,100,105,115,116, 97,110, 99,101, 95,114, -101,102,101,114,101,110, 99,101, 0, 99,111,110,101, 95, 97,110,103,108,101, 95,111,117,116,101,114, 0, 99,111,110,101, 95, 97, -110,103,108,101, 95,105,110,110,101,114, 0, 99,111,110,101, 95,118,111,108,117,109,101, 95,111,117,116,101,114, 0,114,101,110, -100,101,114, 95,102,108, 97,103, 0, 98,117,105,108,100, 95,115,105,122,101, 95,102,108, 97,103, 0, 98,117,105,108,100, 95,116, - 99, 95,102,108, 97,103, 0,108, 97,115,116,115,105,122,101, 91, 50, 93, 0,116,114, 97, 99,107,105,110,103, 0, 42,116,114, 97, - 99,107,105,110,103, 95, 99,111,110,116,101,120,116, 0,112,114,111,120,121, 0,116,114, 97, 99,107, 95,112,114,101,118,105,101, -119, 95,104,101,105,103,104,116, 0, 42,116,114, 97, 99,107, 95,112,114,101,118,105,101,119, 0,116,114, 97, 99,107, 95,112,111, -115, 91, 50, 93, 0,116,114, 97, 99,107, 95,100,105,115, 97, 98,108,101,100, 0, 42,109, 97,114,107,101,114, 0,115,108,105,100, -101, 95,115, 99, 97,108,101, 91, 50, 93, 0,101,114,114,111,114, 0, 42,105,110,116,114,105,110,115,105, 99,115, 0,115,101,110, -115,111,114, 95,119,105,100,116,104, 0,112,105,120,101,108, 95, 97,115,112,101, 99,116, 0,102,111, 99, 97,108, 0,117,110,105, -116,115, 0,112,114,105,110, 99,105,112, 97,108, 91, 50, 93, 0,107, 49, 0,107, 50, 0,107, 51, 0,112,111,115, 91, 50, 93, 0, -112, 97,116, 95,109,105,110, 91, 50, 93, 0,112, 97,116, 95,109, 97,120, 91, 50, 93, 0,115,101, 97,114, 99,104, 95,109,105,110, - 91, 50, 93, 0,115,101, 97,114, 99,104, 95,109, 97,120, 91, 50, 93, 0,109, 97,114,107,101,114,115,110,114, 0,108, 97,115,116, - 95,109, 97,114,107,101,114, 0, 42,109, 97,114,107,101,114,115, 0, 98,117,110,100,108,101, 95,112,111,115, 91, 51, 93, 0,112, - 97,116, 95,102,108, 97,103, 0,115,101, 97,114, 99,104, 95,102,108, 97,103, 0,102,114, 97,109,101,115, 95,108,105,109,105,116, - 0,112, 97,116,116,101,114,110, 95,109, 97,116, 99,104, 0,116,114, 97, 99,107,101,114, 0,112,121,114, 97,109,105,100, 95,108, -101,118,101,108,115, 0,109,105,110,105,109,117,109, 95, 99,111,114,114,101,108, 97,116,105,111,110, 0,100,101,102, 97,117,108, -116, 95,116,114, 97, 99,107,101,114, 0,100,101,102, 97,117,108,116, 95,112,121,114, 97,109,105,100, 95,108,101,118,101,108,115, - 0,100,101,102, 97,117,108,116, 95,109,105,110,105,109,117,109, 95, 99,111,114,114,101,108, 97,116,105,111,110, 0,100,101,102, - 97,117,108,116, 95,112, 97,116,116,101,114,110, 95,115,105,122,101, 0,100,101,102, 97,117,108,116, 95,115,101, 97,114, 99,104, - 95,115,105,122,101, 0,100,101,102, 97,117,108,116, 95,102,114, 97,109,101,115, 95,108,105,109,105,116, 0,100,101,102, 97,117, -108,116, 95,109, 97,114,103,105,110, 0,100,101,102, 97,117,108,116, 95,112, 97,116,116,101,114,110, 95,109, 97,116, 99,104, 0, -100,101,102, 97,117,108,116, 95,102,108, 97,103, 0,112,111,100, 0,107,101,121,102,114, 97,109,101, 49, 0,107,101,121,102,114, - 97,109,101, 50, 0,114,101,102,105,110,101, 95, 99, 97,109,101,114, 97, 95,105,110,116,114,105,110,115,105, 99,115, 0,112, 97, -100, 50, 51, 0, 99,108,101, 97,110, 95,102,114, 97,109,101,115, 0, 99,108,101, 97,110, 95, 97, 99,116,105,111,110, 0, 99,108, -101, 97,110, 95,101,114,114,111,114, 0,111, 98,106,101, 99,116, 95,100,105,115,116, 97,110, 99,101, 0,116,111,116, 95,116,114, - 97, 99,107, 0, 97, 99,116, 95,116,114, 97, 99,107, 0,109, 97,120,115, 99, 97,108,101, 0, 42,114,111,116, 95,116,114, 97, 99, -107, 0,108,111, 99,105,110,102, 0,115, 99, 97,108,101,105,110,102, 0,114,111,116,105,110,102, 0, 42,115, 99, 97,108,101,105, - 98,117,102, 0,108, 97,115,116, 95, 99, 97,109,101,114, 97, 0, 99, 97,109,110,114, 0, 42, 99, 97,109,101,114, 97,115, 0,116, -114, 97, 99,107,115, 0,114,101, 99,111,110,115,116,114,117, 99,116,105,111,110, 0,109,101,115,115, 97,103,101, 91, 50, 53, 54, - 93, 0,115,101,116,116,105,110,103,115, 0, 99, 97,109,101,114, 97, 0,115,116, 97, 98,105,108,105,122, 97,116,105,111,110, 0, - 42, 97, 99,116, 95,116,114, 97, 99,107, 0,111, 98,106,101, 99,116,115, 0,111, 98,106,101, 99,116,110,114, 0,116,111,116, 95, -111, 98,106,101, 99,116, 0, 42, 98,114,117,115,104, 95,103,114,111,117,112, 0, 99,117,114,114,101,110,116, 95,102,114, 97,109, -101, 0,100,105,115,112, 95,116,121,112,101, 0,105,109, 97,103,101, 95,102,105,108,101,102,111,114,109, 97,116, 0,101,102,102, -101, 99,116, 95,117,105, 0,112,114,101,118,105,101,119, 95,105,100, 0,105,110,105,116, 95, 99,111,108,111,114, 95,116,121,112, -101, 0,112, 97,100, 95,115, 0,105,109, 97,103,101, 95,114,101,115,111,108,117,116,105,111,110, 0,115,117, 98,115,116,101,112, -115, 0,105,110,105,116, 95, 99,111,108,111,114, 91, 52, 93, 0, 42,105,110,105,116, 95,116,101,120,116,117,114,101, 0,105,110, -105,116, 95,108, 97,121,101,114,110, 97,109,101, 91, 54, 52, 93, 0,100,114,121, 95,115,112,101,101,100, 0, 99,111,108,111,114, - 95,100,114,121, 95,116,104,114,101,115,104,111,108,100, 0,100,101,112,116,104, 95, 99,108, 97,109,112, 0,100,105,115,112, 95, -102, 97, 99,116,111,114, 0,115,112,114,101, 97,100, 95,115,112,101,101,100, 0, 99,111,108,111,114, 95,115,112,114,101, 97,100, - 95,115,112,101,101,100, 0,115,104,114,105,110,107, 95,115,112,101,101,100, 0,100,114,105,112, 95,118,101,108, 0,100,114,105, -112, 95, 97, 99, 99, 0,105,110,102,108,117,101,110, 99,101, 95,115, 99, 97,108,101, 0,114, 97,100,105,117,115, 95,115, 99, 97, -108,101, 0,119, 97,118,101, 95,100, 97,109,112,105,110,103, 0,119, 97,118,101, 95,115,112,101,101,100, 0,119, 97,118,101, 95, -116,105,109,101,115, 99, 97,108,101, 0,119, 97,118,101, 95,115,112,114,105,110,103, 0,105,109, 97,103,101, 95,111,117,116,112, -117,116, 95,112, 97,116,104, 91, 49, 48, 50, 52, 93, 0,111,117,116,112,117,116, 95,110, 97,109,101, 91, 54, 52, 93, 0,111,117, -116,112,117,116, 95,110, 97,109,101, 50, 91, 54, 52, 93, 0, 42,112,109,100, 0,115,117,114,102, 97, 99,101,115, 0, 97, 99,116, -105,118,101, 95,115,117,114, 0,101,114,114,111,114, 91, 54, 52, 93, 0, 99,111,108,108,105,115,105,111,110, 0,119,101,116,110, -101,115,115, 0,112, 97,114,116,105, 99,108,101, 95,114, 97,100,105,117,115, 0,112, 97,114,116,105, 99,108,101, 95,115,109,111, -111,116,104, 0,112, 97,105,110,116, 95,100,105,115,116, 97,110, 99,101, 0, 42,112, 97,105,110,116, 95,114, 97,109,112, 0, 42, -118,101,108, 95,114, 97,109,112, 0,112,114,111,120,105,109,105,116,121, 95,102, 97,108,108,111,102,102, 0,114, 97,121, 95,100, -105,114, 0,119, 97,118,101, 95,102, 97, 99,116,111,114, 0,119, 97,118,101, 95, 99,108, 97,109,112, 0,109, 97,120, 95,118,101, -108,111, 99,105,116,121, 0,115,109,117,100,103,101, 95,115,116,114,101,110,103,116,104, 0, 0, 84, 89, 80, 69, 17, 2, 0, 0, - 99,104, 97,114, 0,117, 99,104, 97,114, 0,115,104,111,114,116, 0,117,115,104,111,114,116, 0,105,110,116, 0,108,111,110,103, - 0,117,108,111,110,103, 0,102,108,111, 97,116, 0,100,111,117, 98,108,101, 0,105,110,116, 54, 52, 95,116, 0,117,105,110,116, - 54, 52, 95,116, 0,118,111,105,100, 0, 76,105,110,107, 0, 76,105,110,107, 68, 97,116, 97, 0, 76,105,115,116, 66, 97,115,101, - 0,118,101, 99, 50,115, 0,118,101, 99, 50,102, 0,118,101, 99, 51,102, 0,114, 99,116,105, 0,114, 99,116,102, 0, 73, 68, 80, -114,111,112,101,114,116,121, 68, 97,116, 97, 0, 73, 68, 80,114,111,112,101,114,116,121, 0, 73, 68, 0, 76,105, 98,114, 97,114, -121, 0, 70,105,108,101, 68, 97,116, 97, 0, 80,114,101,118,105,101,119, 73,109, 97,103,101, 0, 73,112,111, 68,114,105,118,101, -114, 0, 79, 98,106,101, 99,116, 0, 73,112,111, 67,117,114,118,101, 0, 66, 80,111,105,110,116, 0, 66,101,122, 84,114,105,112, -108,101, 0, 73,112,111, 0, 75,101,121, 66,108,111, 99,107, 0, 75,101,121, 0, 65,110,105,109, 68, 97,116, 97, 0, 84,101,120, -116, 76,105,110,101, 0, 84,101,120,116, 77, 97,114,107,101,114, 0, 84,101,120,116, 0, 80, 97, 99,107,101,100, 70,105,108,101, - 0, 67, 97,109,101,114, 97, 0, 73,109, 97,103,101, 85,115,101,114, 0, 83, 99,101,110,101, 0, 73,109, 97,103,101, 0, 71, 80, - 85, 84,101,120,116,117,114,101, 0, 97,110,105,109, 0, 82,101,110,100,101,114, 82,101,115,117,108,116, 0, 77, 84,101,120, 0, - 84,101,120, 0, 80,108,117,103,105,110, 84,101,120, 0, 67, 66, 68, 97,116, 97, 0, 67,111,108,111,114, 66, 97,110,100, 0, 69, -110,118, 77, 97,112, 0, 73,109, 66,117,102, 0, 80,111,105,110,116, 68,101,110,115,105,116,121, 0, 67,117,114,118,101, 77, 97, -112,112,105,110,103, 0, 86,111,120,101,108, 68, 97,116, 97, 0, 79, 99,101, 97,110, 84,101,120, 0, 98, 78,111,100,101, 84,114, -101,101, 0, 84,101,120, 77, 97,112,112,105,110,103, 0, 67,111,108,111,114, 77, 97,112,112,105,110,103, 0, 76, 97,109,112, 0, - 86,111,108,117,109,101, 83,101,116,116,105,110,103,115, 0, 71, 97,109,101, 83,101,116,116,105,110,103,115, 0, 77, 97,116,101, -114,105, 97,108, 0, 71,114,111,117,112, 0, 86, 70,111,110,116, 0, 86, 70,111,110,116, 68, 97,116, 97, 0, 77,101,116, 97, 69, -108,101,109, 0, 66,111,117,110,100, 66,111,120, 0, 77,101,116, 97, 66, 97,108,108, 0, 78,117,114, 98, 0, 67,104, 97,114, 73, -110,102,111, 0, 84,101,120,116, 66,111,120, 0, 69,100,105,116, 78,117,114, 98, 0, 71, 72, 97,115,104, 0, 67,117,114,118,101, - 0, 80, 97,116,104, 0, 83,101,108, 66,111,120, 0, 69,100,105,116, 70,111,110,116, 0, 77,101,115,104, 0, 77, 80,111,108,121, - 0, 77, 84,101,120, 80,111,108,121, 0, 77, 76,111,111,112, 0, 77, 76,111,111,112, 85, 86, 0, 77, 76,111,111,112, 67,111,108, - 0, 77, 70, 97, 99,101, 0, 77, 84, 70, 97, 99,101, 0, 84, 70, 97, 99,101, 0, 77, 86,101,114,116, 0, 77, 69,100,103,101, 0, - 77, 68,101,102,111,114,109, 86,101,114,116, 0, 77, 67,111,108, 0, 77, 83,116,105, 99,107,121, 0, 77, 83,101,108,101, 99,116, - 0, 66, 77, 69,100,105,116, 77,101,115,104, 0, 67,117,115,116,111,109, 68, 97,116, 97, 0, 77,117,108,116,105,114,101,115, 0, - 77, 68,101,102,111,114,109, 87,101,105,103,104,116, 0, 77, 70,108,111, 97,116, 80,114,111,112,101,114,116,121, 0, 77, 73,110, -116, 80,114,111,112,101,114,116,121, 0, 77, 83,116,114,105,110,103, 80,114,111,112,101,114,116,121, 0, 79,114,105,103, 83,112, - 97, 99,101, 70, 97, 99,101, 0, 79,114,105,103, 83,112, 97, 99,101, 76,111,111,112, 0, 77, 68,105,115,112,115, 0, 77,117,108, -116,105,114,101,115, 67,111,108, 0, 77,117,108,116,105,114,101,115, 67,111,108, 70, 97, 99,101, 0, 77,117,108,116,105,114,101, -115, 70, 97, 99,101, 0, 77,117,108,116,105,114,101,115, 69,100,103,101, 0, 77,117,108,116,105,114,101,115, 76,101,118,101,108, - 0, 77, 82,101, 99, 97,115,116, 0, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 77, 97,112,112,105,110,103, 73,110,102, -111, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 83,117, 98,115,117,114,102, 77,111,100,105,102,105,101,114, 68, 97,116, - 97, 0, 76, 97,116,116,105, 99,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 67,117,114,118,101, 77,111,100,105,102, -105,101,114, 68, 97,116, 97, 0, 66,117,105,108,100, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 77, 97,115,107, 77,111, -100,105,102,105,101,114, 68, 97,116, 97, 0, 65,114,114, 97,121, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 77,105,114, -114,111,114, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 69,100,103,101, 83,112,108,105,116, 77,111,100,105,102,105,101, -114, 68, 97,116, 97, 0, 66,101,118,101,108, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 66, 77,101,115,104, 77,111,100, -105,102,105,101,114, 68, 97,116, 97, 0, 83,109,111,107,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 83,109,111,107, -101, 68,111,109, 97,105,110, 83,101,116,116,105,110,103,115, 0, 83,109,111,107,101, 70,108,111,119, 83,101,116,116,105,110,103, -115, 0, 83,109,111,107,101, 67,111,108,108, 83,101,116,116,105,110,103,115, 0, 68,105,115,112,108, 97, 99,101, 77,111,100,105, -102,105,101,114, 68, 97,116, 97, 0, 85, 86, 80,114,111,106,101, 99,116, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 68, -101, 99,105,109, 97,116,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 83,109,111,111,116,104, 77,111,100,105,102,105, -101,114, 68, 97,116, 97, 0, 67, 97,115,116, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 87, 97,118,101, 77,111,100,105, -102,105,101,114, 68, 97,116, 97, 0, 65,114,109, 97,116,117,114,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 72,111, -111,107, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 83,111,102,116, 98,111,100,121, 77,111,100,105,102,105,101,114, 68, - 97,116, 97, 0, 67,108,111,116,104, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 67,108,111,116,104, 0, 67,108,111,116, -104, 83,105,109, 83,101,116,116,105,110,103,115, 0, 67,108,111,116,104, 67,111,108,108, 83,101,116,116,105,110,103,115, 0, 80, -111,105,110,116, 67, 97, 99,104,101, 0, 67,111,108,108,105,115,105,111,110, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, - 66, 86, 72, 84,114,101,101, 0, 83,117,114,102, 97, 99,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 68,101,114,105, -118,101,100, 77,101,115,104, 0, 66, 86, 72, 84,114,101,101, 70,114,111,109, 77,101,115,104, 0, 66,111,111,108,101, 97,110, 77, -111,100,105,102,105,101,114, 68, 97,116, 97, 0, 77, 68,101,102, 73,110,102,108,117,101,110, 99,101, 0, 77, 68,101,102, 67,101, -108,108, 0, 77,101,115,104, 68,101,102,111,114,109, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 80, 97,114,116,105, 99, -108,101, 83,121,115,116,101,109, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 80, 97,114,116,105, 99,108,101, 83,121,115, -116,101,109, 0, 80, 97,114,116,105, 99,108,101, 73,110,115,116, 97,110, 99,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, - 0, 69,120,112,108,111,100,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 77,117,108,116,105,114,101,115, 77,111,100, -105,102,105,101,114, 68, 97,116, 97, 0, 70,108,117,105,100,115,105,109, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 70, -108,117,105,100,115,105,109, 83,101,116,116,105,110,103,115, 0, 83,104,114,105,110,107,119,114, 97,112, 77,111,100,105,102,105, -101,114, 68, 97,116, 97, 0, 83,105,109,112,108,101, 68,101,102,111,114,109, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, - 83,104, 97,112,101, 75,101,121, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 83,111,108,105,100,105,102,121, 77,111,100, -105,102,105,101,114, 68, 97,116, 97, 0, 83, 99,114,101,119, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 79, 99,101, 97, -110, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 79, 99,101, 97,110, 0, 79, 99,101, 97,110, 67, 97, 99,104,101, 0, 78, -103,111,110, 73,110,116,101,114,112, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 87, 97,114,112, 77,111,100,105,102,105, -101,114, 68, 97,116, 97, 0, 87,101,105,103,104,116, 86, 71, 69,100,105,116, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, - 87,101,105,103,104,116, 86, 71, 77,105,120, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 87,101,105,103,104,116, 86, 71, - 80,114,111,120,105,109,105,116,121, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 68,121,110, 97,109,105, 99, 80, 97,105, -110,116, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 68,121,110, 97,109,105, 99, 80, 97,105,110,116, 67, 97,110,118, 97, -115, 83,101,116,116,105,110,103,115, 0, 68,121,110, 97,109,105, 99, 80, 97,105,110,116, 66,114,117,115,104, 83,101,116,116,105, -110,103,115, 0, 82,101,109,101,115,104, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 69,100,105,116, 76, 97,116,116, 0, - 76, 97,116,116,105, 99,101, 0, 98, 68,101,102,111,114,109, 71,114,111,117,112, 0, 83, 99,117,108,112,116, 83,101,115,115,105, -111,110, 0, 98, 65, 99,116,105,111,110, 0, 98, 80,111,115,101, 0, 98, 71, 80,100, 97,116, 97, 0, 98, 65,110,105,109, 86,105, -122, 83,101,116,116,105,110,103,115, 0, 98, 77,111,116,105,111,110, 80, 97,116,104, 0, 66,117,108,108,101,116, 83,111,102,116, - 66,111,100,121, 0, 80, 97,114,116, 68,101,102,108,101, 99,116, 0, 83,111,102,116, 66,111,100,121, 0, 79, 98, 72,111,111,107, - 0, 68,117,112,108,105, 79, 98,106,101, 99,116, 0, 82, 78, 71, 0, 69,102,102,101, 99,116,111,114, 87,101,105,103,104,116,115, - 0, 80, 84, 67, 97, 99,104,101, 69,120,116,114, 97, 0, 80, 84, 67, 97, 99,104,101, 77,101,109, 0, 80, 84, 67, 97, 99,104,101, - 69,100,105,116, 0, 83, 66, 86,101,114,116,101,120, 0, 66,111,100,121, 80,111,105,110,116, 0, 66,111,100,121, 83,112,114,105, -110,103, 0, 83, 66, 83, 99,114, 97,116, 99,104, 0, 70,108,117,105,100, 86,101,114,116,101,120, 86,101,108,111, 99,105,116,121, - 0, 87,111,114,108,100, 0, 66, 97,115,101, 0, 65,118,105, 67,111,100,101, 99, 68, 97,116, 97, 0, 81,117,105, 99,107,116,105, -109,101, 67,111,100,101, 99, 68, 97,116, 97, 0, 81,117,105, 99,107,116,105,109,101, 67,111,100,101, 99, 83,101,116,116,105,110, -103,115, 0, 70, 70, 77,112,101,103, 67,111,100,101, 99, 68, 97,116, 97, 0, 65,117,100,105,111, 68, 97,116, 97, 0, 83, 99,101, -110,101, 82,101,110,100,101,114, 76, 97,121,101,114, 0, 73,109, 97,103,101, 70,111,114,109, 97,116, 68, 97,116, 97, 0, 82,101, -110,100,101,114, 68, 97,116, 97, 0, 82,101,110,100,101,114, 80,114,111,102,105,108,101, 0, 71, 97,109,101, 68,111,109,101, 0, - 71, 97,109,101, 70,114, 97,109,105,110,103, 0, 82,101, 99, 97,115,116, 68, 97,116, 97, 0, 71, 97,109,101, 68, 97,116, 97, 0, - 84,105,109,101, 77, 97,114,107,101,114, 0, 80, 97,105,110,116, 0, 66,114,117,115,104, 0, 73,109, 97,103,101, 80, 97,105,110, -116, 83,101,116,116,105,110,103,115, 0, 80, 97,114,116,105, 99,108,101, 66,114,117,115,104, 68, 97,116, 97, 0, 80, 97,114,116, -105, 99,108,101, 69,100,105,116, 83,101,116,116,105,110,103,115, 0, 83, 99,117,108,112,116, 0, 85,118, 83, 99,117,108,112,116, - 0, 86, 80, 97,105,110,116, 0, 84,114, 97,110,115,102,111,114,109, 79,114,105,101,110,116, 97,116,105,111,110, 0, 85,110,105, -102,105,101,100, 80, 97,105,110,116, 83,101,116,116,105,110,103,115, 0, 84,111,111,108, 83,101,116,116,105,110,103,115, 0, 98, - 83,116, 97,116,115, 0, 85,110,105,116, 83,101,116,116,105,110,103,115, 0, 80,104,121,115,105, 99,115, 83,101,116,116,105,110, -103,115, 0, 69,100,105,116,105,110,103, 0, 83, 99,101,110,101, 83,116, 97,116,115, 0, 68, 97,103, 70,111,114,101,115,116, 0, - 77,111,118,105,101, 67,108,105,112, 0, 66, 71,112,105, 99, 0, 77,111,118,105,101, 67,108,105,112, 85,115,101,114, 0, 82,101, -103,105,111,110, 86,105,101,119, 51, 68, 0, 82,101,110,100,101,114, 73,110,102,111, 0, 82,101,110,100,101,114, 69,110,103,105, -110,101, 0, 86,105,101,119, 68,101,112,116,104,115, 0, 83,109,111,111,116,104, 86,105,101,119, 83,116,111,114,101, 0,119,109, - 84,105,109,101,114, 0, 86,105,101,119, 51, 68, 0, 83,112, 97, 99,101, 76,105,110,107, 0, 86,105,101,119, 50, 68, 0, 83,112, - 97, 99,101, 73,110,102,111, 0, 83,112, 97, 99,101, 73,112,111, 0, 98, 68,111,112,101, 83,104,101,101,116, 0, 83,112, 97, 99, -101, 66,117,116,115, 0, 83,112, 97, 99,101, 83,101,113, 0, 70,105,108,101, 83,101,108,101, 99,116, 80, 97,114, 97,109,115, 0, - 83,112, 97, 99,101, 70,105,108,101, 0, 70,105,108,101, 76,105,115,116, 0,119,109, 79,112,101,114, 97,116,111,114, 0, 70,105, -108,101, 76, 97,121,111,117,116, 0, 83,112, 97, 99,101, 79,111,112,115, 0, 84,114,101,101, 83,116,111,114,101, 0, 84,114,101, -101, 83,116,111,114,101, 69,108,101,109, 0, 83,112, 97, 99,101, 73,109, 97,103,101, 0, 83, 99,111,112,101,115, 0, 72,105,115, -116,111,103,114, 97,109, 0, 83,112, 97, 99,101, 78,108, 97, 0, 83,112, 97, 99,101, 84,101,120,116, 0, 83, 99,114,105,112,116, - 0, 83,112, 97, 99,101, 83, 99,114,105,112,116, 0, 83,112, 97, 99,101, 84,105,109,101, 67, 97, 99,104,101, 0, 83,112, 97, 99, -101, 84,105,109,101, 0, 83,112, 97, 99,101, 78,111,100,101, 0, 83,112, 97, 99,101, 76,111,103,105, 99, 0, 67,111,110,115,111, -108,101, 76,105,110,101, 0, 83,112, 97, 99,101, 67,111,110,115,111,108,101, 0, 83,112, 97, 99,101, 85,115,101,114, 80,114,101, -102, 0, 83,112, 97, 99,101, 67,108,105,112, 0, 77,111,118,105,101, 67,108,105,112, 83, 99,111,112,101,115, 0,117,105, 70,111, -110,116, 0,117,105, 70,111,110,116, 83,116,121,108,101, 0,117,105, 83,116,121,108,101, 0,117,105, 87,105,100,103,101,116, 67, -111,108,111,114,115, 0,117,105, 87,105,100,103,101,116, 83,116, 97,116,101, 67,111,108,111,114,115, 0,117,105, 80, 97,110,101, -108, 67,111,108,111,114,115, 0, 84,104,101,109,101, 85, 73, 0, 84,104,101,109,101, 83,112, 97, 99,101, 0, 84,104,101,109,101, - 87,105,114,101, 67,111,108,111,114, 0, 98, 84,104,101,109,101, 0, 98, 65,100,100,111,110, 0, 83,111,108,105,100, 76,105,103, -104,116, 0, 85,115,101,114, 68,101,102, 0, 98, 83, 99,114,101,101,110, 0, 83, 99,114, 86,101,114,116, 0, 83, 99,114, 69,100, -103,101, 0, 80, 97,110,101,108, 0, 80, 97,110,101,108, 84,121,112,101, 0,117,105, 76, 97,121,111,117,116, 0, 83, 99,114, 65, -114,101, 97, 0, 83,112, 97, 99,101, 84,121,112,101, 0, 65, 82,101,103,105,111,110, 0, 65, 82,101,103,105,111,110, 84,121,112, -101, 0, 70,105,108,101, 71,108,111, 98, 97,108, 0, 83,116,114,105,112, 69,108,101,109, 0, 83,116,114,105,112, 67,114,111,112, - 0, 83,116,114,105,112, 84,114, 97,110,115,102,111,114,109, 0, 83,116,114,105,112, 67,111,108,111,114, 66, 97,108, 97,110, 99, -101, 0, 83,116,114,105,112, 80,114,111,120,121, 0, 83,116,114,105,112, 0, 80,108,117,103,105,110, 83,101,113, 0, 83,101,113, -117,101,110, 99,101, 0, 98, 83,111,117,110,100, 0, 77,101,116, 97, 83,116, 97, 99,107, 0, 87,105,112,101, 86, 97,114,115, 0, - 71,108,111,119, 86, 97,114,115, 0, 84,114, 97,110,115,102,111,114,109, 86, 97,114,115, 0, 83,111,108,105,100, 67,111,108,111, -114, 86, 97,114,115, 0, 83,112,101,101,100, 67,111,110,116,114,111,108, 86, 97,114,115, 0, 69,102,102,101, 99,116, 0, 66,117, -105,108,100, 69,102,102, 0, 80, 97,114,116, 69,102,102, 0, 80, 97,114,116,105, 99,108,101, 0, 87, 97,118,101, 69,102,102, 0, - 98, 80,114,111,112,101,114,116,121, 0, 98, 78,101, 97,114, 83,101,110,115,111,114, 0, 98, 77,111,117,115,101, 83,101,110,115, -111,114, 0, 98, 84,111,117, 99,104, 83,101,110,115,111,114, 0, 98, 75,101,121, 98,111, 97,114,100, 83,101,110,115,111,114, 0, - 98, 80,114,111,112,101,114,116,121, 83,101,110,115,111,114, 0, 98, 65, 99,116,117, 97,116,111,114, 83,101,110,115,111,114, 0, - 98, 68,101,108, 97,121, 83,101,110,115,111,114, 0, 98, 67,111,108,108,105,115,105,111,110, 83,101,110,115,111,114, 0, 98, 82, - 97,100, 97,114, 83,101,110,115,111,114, 0, 98, 82, 97,110,100,111,109, 83,101,110,115,111,114, 0, 98, 82, 97,121, 83,101,110, -115,111,114, 0, 98, 65,114,109, 97,116,117,114,101, 83,101,110,115,111,114, 0, 98, 77,101,115,115, 97,103,101, 83,101,110,115, -111,114, 0, 98, 83,101,110,115,111,114, 0, 98, 67,111,110,116,114,111,108,108,101,114, 0, 98, 74,111,121,115,116,105, 99,107, - 83,101,110,115,111,114, 0, 98, 69,120,112,114,101,115,115,105,111,110, 67,111,110,116, 0, 98, 80,121,116,104,111,110, 67,111, -110,116, 0, 98, 65, 99,116,117, 97,116,111,114, 0, 98, 65,100,100, 79, 98,106,101, 99,116, 65, 99,116,117, 97,116,111,114, 0, - 98, 65, 99,116,105,111,110, 65, 99,116,117, 97,116,111,114, 0, 83,111,117,110,100, 51, 68, 0, 98, 83,111,117,110,100, 65, 99, -116,117, 97,116,111,114, 0, 98, 69,100,105,116, 79, 98,106,101, 99,116, 65, 99,116,117, 97,116,111,114, 0, 98, 83, 99,101,110, -101, 65, 99,116,117, 97,116,111,114, 0, 98, 80,114,111,112,101,114,116,121, 65, 99,116,117, 97,116,111,114, 0, 98, 79, 98,106, -101, 99,116, 65, 99,116,117, 97,116,111,114, 0, 98, 73,112,111, 65, 99,116,117, 97,116,111,114, 0, 98, 67, 97,109,101,114, 97, - 65, 99,116,117, 97,116,111,114, 0, 98, 67,111,110,115,116,114, 97,105,110,116, 65, 99,116,117, 97,116,111,114, 0, 98, 71,114, -111,117,112, 65, 99,116,117, 97,116,111,114, 0, 98, 82, 97,110,100,111,109, 65, 99,116,117, 97,116,111,114, 0, 98, 77,101,115, -115, 97,103,101, 65, 99,116,117, 97,116,111,114, 0, 98, 71, 97,109,101, 65, 99,116,117, 97,116,111,114, 0, 98, 86,105,115,105, - 98,105,108,105,116,121, 65, 99,116,117, 97,116,111,114, 0, 98, 84,119,111, 68, 70,105,108,116,101,114, 65, 99,116,117, 97,116, -111,114, 0, 98, 80, 97,114,101,110,116, 65, 99,116,117, 97,116,111,114, 0, 98, 83,116, 97,116,101, 65, 99,116,117, 97,116,111, -114, 0, 98, 65,114,109, 97,116,117,114,101, 65, 99,116,117, 97,116,111,114, 0, 98, 83,116,101,101,114,105,110,103, 65, 99,116, -117, 97,116,111,114, 0, 71,114,111,117,112, 79, 98,106,101, 99,116, 0, 66,111,110,101, 0, 98, 65,114,109, 97,116,117,114,101, - 0, 98, 77,111,116,105,111,110, 80, 97,116,104, 86,101,114,116, 0, 98, 80,111,115,101, 67,104, 97,110,110,101,108, 0, 98, 73, - 75, 80, 97,114, 97,109, 0, 98, 73,116, 97,115, 99, 0, 98, 65, 99,116,105,111,110, 71,114,111,117,112, 0, 83,112, 97, 99,101, - 65, 99,116,105,111,110, 0, 98, 65, 99,116,105,111,110, 67,104, 97,110,110,101,108, 0, 98, 67,111,110,115,116,114, 97,105,110, -116, 67,104, 97,110,110,101,108, 0, 98, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 67,111,110,115,116,114, 97,105,110,116, - 84, 97,114,103,101,116, 0, 98, 80,121,116,104,111,110, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 75,105,110,101,109, 97, -116,105, 99, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 83,112,108,105,110,101, 73, 75, 67,111,110,115,116,114, 97,105,110, -116, 0, 98, 84,114, 97, 99,107, 84,111, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 82,111,116, 97,116,101, 76,105,107,101, - 67,111,110,115,116,114, 97,105,110,116, 0, 98, 76,111, 99, 97,116,101, 76,105,107,101, 67,111,110,115,116,114, 97,105,110,116, - 0, 98, 83,105,122,101, 76,105,107,101, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 83, 97,109,101, 86,111,108,117,109,101, - 67,111,110,115,116,114, 97,105,110,116, 0, 98, 84,114, 97,110,115, 76,105,107,101, 67,111,110,115,116,114, 97,105,110,116, 0, - 98, 77,105,110, 77, 97,120, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 65, 99,116,105,111,110, 67,111,110,115,116,114, 97, -105,110,116, 0, 98, 76,111, 99,107, 84,114, 97, 99,107, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 68, 97,109,112, 84,114, - 97, 99,107, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 70,111,108,108,111,119, 80, 97,116,104, 67,111,110,115,116,114, 97, -105,110,116, 0, 98, 83,116,114,101,116, 99,104, 84,111, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 82,105,103,105,100, 66, -111,100,121, 74,111,105,110,116, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 67,108, 97,109,112, 84,111, 67,111,110,115,116, -114, 97,105,110,116, 0, 98, 67,104,105,108,100, 79,102, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 84,114, 97,110,115,102, -111,114,109, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 80,105,118,111,116, 67,111,110,115,116,114, 97,105,110,116, 0, 98, - 76,111, 99, 76,105,109,105,116, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 82,111,116, 76,105,109,105,116, 67,111,110,115, -116,114, 97,105,110,116, 0, 98, 83,105,122,101, 76,105,109,105,116, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 68,105,115, -116, 76,105,109,105,116, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 83,104,114,105,110,107,119,114, 97,112, 67,111,110,115, -116,114, 97,105,110,116, 0, 98, 70,111,108,108,111,119, 84,114, 97, 99,107, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 67, - 97,109,101,114, 97, 83,111,108,118,101,114, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 79, 98,106,101, 99,116, 83,111,108, -118,101,114, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 65, 99,116,105,111,110, 77,111,100,105,102,105,101,114, 0, 98, 65, - 99,116,105,111,110, 83,116,114,105,112, 0, 98, 78,111,100,101, 83,116, 97, 99,107, 0, 98, 78,111,100,101, 83,111, 99,107,101, -116, 0, 98, 78,111,100,101, 76,105,110,107, 0, 98, 78,111,100,101, 80,114,101,118,105,101,119, 0, 98, 78,111,100,101, 0,117, -105, 66,108,111, 99,107, 0, 98, 78,111,100,101, 84,121,112,101, 0, 98, 78,111,100,101, 84,114,101,101, 69,120,101, 99, 0, 98, - 78,111,100,101, 83,111, 99,107,101,116, 86, 97,108,117,101, 73,110,116, 0, 98, 78,111,100,101, 83,111, 99,107,101,116, 86, 97, -108,117,101, 70,108,111, 97,116, 0, 98, 78,111,100,101, 83,111, 99,107,101,116, 86, 97,108,117,101, 66,111,111,108,101, 97,110, - 0, 98, 78,111,100,101, 83,111, 99,107,101,116, 86, 97,108,117,101, 86,101, 99,116,111,114, 0, 98, 78,111,100,101, 83,111, 99, -107,101,116, 86, 97,108,117,101, 82, 71, 66, 65, 0, 78,111,100,101, 73,109, 97,103,101, 65,110,105,109, 0, 78,111,100,101, 66, -108,117,114, 68, 97,116, 97, 0, 78,111,100,101, 68, 66,108,117,114, 68, 97,116, 97, 0, 78,111,100,101, 66,105,108, 97,116,101, -114, 97,108, 66,108,117,114, 68, 97,116, 97, 0, 78,111,100,101, 72,117,101, 83, 97,116, 0, 78,111,100,101, 73,109, 97,103,101, - 70,105,108,101, 0, 78,111,100,101, 73,109, 97,103,101, 77,117,108,116,105, 70,105,108,101, 0, 78,111,100,101, 73,109, 97,103, -101, 77,117,108,116,105, 70,105,108,101, 83,111, 99,107,101,116, 0, 78,111,100,101, 67,104,114,111,109, 97, 0, 78,111,100,101, - 84,119,111, 88, 89,115, 0, 78,111,100,101, 84,119,111, 70,108,111, 97,116,115, 0, 78,111,100,101, 71,101,111,109,101,116,114, -121, 0, 78,111,100,101, 86,101,114,116,101,120, 67,111,108, 0, 78,111,100,101, 68,101,102,111, 99,117,115, 0, 78,111,100,101, - 83, 99,114,105,112,116, 68,105, 99,116, 0, 78,111,100,101, 71,108, 97,114,101, 0, 78,111,100,101, 84,111,110,101,109, 97,112, - 0, 78,111,100,101, 76,101,110,115, 68,105,115,116, 0, 78,111,100,101, 67,111,108,111,114, 66, 97,108, 97,110, 99,101, 0, 78, -111,100,101, 67,111,108,111,114,115,112,105,108,108, 0, 78,111,100,101, 84,101,120, 66, 97,115,101, 0, 78,111,100,101, 84,101, -120, 83,107,121, 0, 78,111,100,101, 84,101,120, 73,109, 97,103,101, 0, 78,111,100,101, 84,101,120, 67,104,101, 99,107,101,114, - 0, 78,111,100,101, 84,101,120, 69,110,118,105,114,111,110,109,101,110,116, 0, 78,111,100,101, 84,101,120, 71,114, 97,100,105, -101,110,116, 0, 78,111,100,101, 84,101,120, 78,111,105,115,101, 0, 78,111,100,101, 84,101,120, 86,111,114,111,110,111,105, 0, - 78,111,100,101, 84,101,120, 77,117,115,103,114, 97,118,101, 0, 78,111,100,101, 84,101,120, 87, 97,118,101, 0, 78,111,100,101, - 84,101,120, 77, 97,103,105, 99, 0, 78,111,100,101, 83,104, 97,100,101,114, 65,116,116,114,105, 98,117,116,101, 0, 84,101,120, - 78,111,100,101, 79,117,116,112,117,116, 0, 67,117,114,118,101, 77, 97,112, 80,111,105,110,116, 0, 67,117,114,118,101, 77, 97, -112, 0, 66,114,117,115,104, 67,108,111,110,101, 0, 67,117,115,116,111,109, 68, 97,116, 97, 76, 97,121,101,114, 0, 67,117,115, -116,111,109, 68, 97,116, 97, 69,120,116,101,114,110, 97,108, 0, 72, 97,105,114, 75,101,121, 0, 80, 97,114,116,105, 99,108,101, - 75,101,121, 0, 66,111,105,100, 80, 97,114,116,105, 99,108,101, 0, 66,111,105,100, 68, 97,116, 97, 0, 80, 97,114,116,105, 99, -108,101, 83,112,114,105,110,103, 0, 67,104,105,108,100, 80, 97,114,116,105, 99,108,101, 0, 80, 97,114,116,105, 99,108,101, 84, - 97,114,103,101,116, 0, 80, 97,114,116,105, 99,108,101, 68,117,112,108,105, 87,101,105,103,104,116, 0, 80, 97,114,116,105, 99, -108,101, 68, 97,116, 97, 0, 83, 80, 72, 70,108,117,105,100, 83,101,116,116,105,110,103,115, 0, 80, 97,114,116,105, 99,108,101, - 83,101,116,116,105,110,103,115, 0, 66,111,105,100, 83,101,116,116,105,110,103,115, 0, 80, 97,114,116,105, 99,108,101, 67, 97, - 99,104,101, 75,101,121, 0, 75, 68, 84,114,101,101, 0, 80, 97,114,116,105, 99,108,101, 68,114, 97,119, 68, 97,116, 97, 0, 76, -105,110,107, 78,111,100,101, 0, 98, 71, 80, 68,115,112,111,105,110,116, 0, 98, 71, 80, 68,115,116,114,111,107,101, 0, 98, 71, - 80, 68,102,114, 97,109,101, 0, 98, 71, 80, 68,108, 97,121,101,114, 0, 82,101,112,111,114,116, 76,105,115,116, 0,119,109, 87, -105,110,100,111,119, 77, 97,110, 97,103,101,114, 0,119,109, 87,105,110,100,111,119, 0,119,109, 75,101,121, 67,111,110,102,105, -103, 0,119,109, 69,118,101,110,116, 0,119,109, 83,117, 98, 87,105,110,100,111,119, 0,119,109, 71,101,115,116,117,114,101, 0, -119,109, 75,101,121, 77, 97,112, 73,116,101,109, 0, 80,111,105,110,116,101,114, 82, 78, 65, 0,119,109, 75,101,121, 77, 97,112, - 68,105,102,102, 73,116,101,109, 0,119,109, 75,101,121, 77, 97,112, 0,119,109, 79,112,101,114, 97,116,111,114, 84,121,112,101, - 0, 70, 77,111,100,105,102,105,101,114, 0, 70, 77,111,100, 95, 71,101,110,101,114, 97,116,111,114, 0, 70, 77,111,100, 95, 70, -117,110, 99,116,105,111,110, 71,101,110,101,114, 97,116,111,114, 0, 70, 67, 77, 95, 69,110,118,101,108,111,112,101, 68, 97,116, - 97, 0, 70, 77,111,100, 95, 69,110,118,101,108,111,112,101, 0, 70, 77,111,100, 95, 67,121, 99,108,101,115, 0, 70, 77,111,100, - 95, 80,121,116,104,111,110, 0, 70, 77,111,100, 95, 76,105,109,105,116,115, 0, 70, 77,111,100, 95, 78,111,105,115,101, 0, 70, - 77,111,100, 95, 83,116,101,112,112,101,100, 0, 68,114,105,118,101,114, 84, 97,114,103,101,116, 0, 68,114,105,118,101,114, 86, - 97,114, 0, 67,104, 97,110,110,101,108, 68,114,105,118,101,114, 0, 70, 80,111,105,110,116, 0, 70, 67,117,114,118,101, 0, 65, -110,105,109, 77, 97,112, 80, 97,105,114, 0, 65,110,105,109, 77, 97,112,112,101,114, 0, 78,108, 97, 83,116,114,105,112, 0, 78, -108, 97, 84,114, 97, 99,107, 0, 75, 83, 95, 80, 97,116,104, 0, 75,101,121,105,110,103, 83,101,116, 0, 65,110,105,109, 79,118, -101,114,114,105,100,101, 0, 73,100, 65,100,116, 84,101,109,112,108, 97,116,101, 0, 66,111,105,100, 82,117,108,101, 0, 66,111, -105,100, 82,117,108,101, 71,111, 97,108, 65,118,111,105,100, 0, 66,111,105,100, 82,117,108,101, 65,118,111,105,100, 67,111,108, -108,105,115,105,111,110, 0, 66,111,105,100, 82,117,108,101, 70,111,108,108,111,119, 76,101, 97,100,101,114, 0, 66,111,105,100, - 82,117,108,101, 65,118,101,114, 97,103,101, 83,112,101,101,100, 0, 66,111,105,100, 82,117,108,101, 70,105,103,104,116, 0, 66, -111,105,100, 83,116, 97,116,101, 0, 70, 76, 85, 73, 68, 95, 51, 68, 0, 87, 84, 85, 82, 66, 85, 76, 69, 78, 67, 69, 0, 83,112, -101, 97,107,101,114, 0, 77,111,118,105,101, 67,108,105,112, 80,114,111,120,121, 0, 77,111,118,105,101, 67,108,105,112, 67, 97, - 99,104,101, 0, 77,111,118,105,101, 84,114, 97, 99,107,105,110,103, 0, 77,111,118,105,101, 84,114, 97, 99,107,105,110,103, 84, -114, 97, 99,107, 0, 77,111,118,105,101, 84,114, 97, 99,107,105,110,103, 77, 97,114,107,101,114, 0, 77,111,118,105,101, 82,101, - 99,111,110,115,116,114,117, 99,116,101,100, 67, 97,109,101,114, 97, 0, 77,111,118,105,101, 84,114, 97, 99,107,105,110,103, 67, - 97,109,101,114, 97, 0, 77,111,118,105,101, 84,114, 97, 99,107,105,110,103, 83,101,116,116,105,110,103,115, 0, 77,111,118,105, -101, 84,114, 97, 99,107,105,110,103, 83,116, 97, 98,105,108,105,122, 97,116,105,111,110, 0, 77,111,118,105,101, 84,114, 97, 99, -107,105,110,103, 82,101, 99,111,110,115,116,114,117, 99,116,105,111,110, 0, 77,111,118,105,101, 84,114, 97, 99,107,105,110,103, - 79, 98,106,101, 99,116, 0, 77,111,118,105,101, 84,114, 97, 99,107,105,110,103, 83,116, 97,116,115, 0, 68,121,110, 97,109,105, - 99, 80, 97,105,110,116, 83,117,114,102, 97, 99,101, 0, 80, 97,105,110,116, 83,117,114,102, 97, 99,101, 68, 97,116, 97, 0, 0, - 84, 76, 69, 78, 1, 0, 1, 0, 2, 0, 2, 0, 4, 0, 4, 0, 4, 0, 4, 0, 8, 0, 8, 0, 8, 0, 0, 0, 16, 0, 24, 0, - 16, 0, 4, 0, 8, 0, 12, 0, 16, 0, 16, 0, 32, 0,128, 0,120, 0,152, 8, 0, 0, 40, 0,144, 0,112, 5,112, 0, 36, 0, - 56, 0,160, 0,200, 0, 0, 1, 96, 0, 40, 0, 48, 0,224, 0, 16, 0,200, 0, 40, 0,216, 11, 48, 5, 0, 0, 0, 0, 0, 0, - 56, 1,168, 1,216, 4, 24, 0, 8, 3,200, 0, 0, 0,104, 0, 64, 1, 56, 4, 80, 0, 24, 1,144, 0, 56, 3, 16, 2, 88, 0, - 16, 0,128, 3,152, 0,136, 4, 0, 0,104, 0,104, 0, 0, 1, 80, 0, 8, 0, 16, 0, 32, 0, 0, 0, 8, 2, 0, 0, 0, 0, - 0, 0,232, 4, 12, 0, 16, 0, 8, 0, 12, 0, 4, 0, 20, 0, 48, 0, 64, 0, 20, 0, 12, 0, 16, 0, 4, 0, 8, 0, 8, 0, - 0, 0,176, 0,144, 1, 8, 0, 4, 0, 4, 0, 0, 1, 32, 0, 8, 0, 16, 0, 16, 0, 64, 0, 24, 0, 12, 0, 64, 0, 4, 0, -112, 0,200, 0,136, 0,184, 0,192, 0,128, 0,192, 0,192, 0,128, 0,120, 0,200, 0,120, 0,144, 0, 16, 1, 56, 0,192, 0, - 24, 1, 40, 1,120, 0,184, 0,200, 0, 64, 1,200, 0, 88, 1,112, 0,168, 0, 0, 0,152, 0, 48, 0, 40, 5,192, 0, 0, 0, -152, 0, 0, 0, 0, 0,128, 0, 8, 0, 8, 0,112, 1,144, 0,152, 2,136, 0,192, 0,120, 0,128, 0,224, 4,208, 0,200, 0, -112, 0,208, 0,144, 0, 16, 5, 0, 0, 0, 0,120, 0, 48, 1,104, 1,160, 1,104, 1,136, 0,104, 0,112, 0,128, 0, 16, 0, - 96, 1, 88, 0, 0, 0,200, 0,216, 0,152, 0, 48, 0, 24, 0,120, 0,152, 0,216, 1, 0, 1,184, 0, 0, 0, 72, 0, 32, 0, -176, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 12, 0, 24, 2, 40, 0,184, 0,152, 0, 64, 0, 72, 0, 32, 0,120, 0, 24, 0, - 56, 9, 64, 0, 24, 0, 16, 0, 56, 0,168, 0, 96, 0, 24, 0, 88, 6, 48, 0, 16, 0,168, 0, 96, 0, 24, 0, 56, 0,120, 0, - 16, 0,232, 1, 32, 0, 8, 0, 24, 0, 80, 8, 0, 0, 0, 0,192, 8,104, 0, 8, 0,120, 3, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 96, 1, 56, 0,144, 0, 64, 0,240, 0,112, 0,248, 0,240, 0,160, 7,104, 0, 0, 0,168, 0, 0, 0, 24, 1, 16, 0, - 16, 0, 40, 33,128, 16, 24, 16,216, 0,160, 2,168, 5, 64, 0, 24, 0,208, 0, 48, 1, 72, 0, 40, 0,136, 1,104, 0, 40, 1, - 56, 0, 24, 4, 32, 0,232, 0, 32, 0, 32, 0, 8, 0, 48, 3,208, 1, 16, 0,120, 35, 80, 0, 56, 0,104, 38, 8, 1, 32, 0, - 40, 0, 88, 1, 0, 0, 0, 0,160, 0, 0, 0, 40, 1, 0, 0, 48, 4, 8, 1, 16, 0, 8, 0, 44, 0, 16, 4, 80, 3,200, 4, - 72, 1,208, 4, 32, 0, 12, 0, 24, 0, 32, 0, 16, 0, 24, 0, 24, 0, 32, 0,136, 1, 0, 0, 64, 0, 96, 0, 80, 0, 8, 0, - 80, 0,136, 0,200, 0, 72, 0, 8, 0,136, 0, 76, 0, 72, 0,204, 0,136, 0,136, 0,128, 0,136, 0, 92, 0,128, 0, 80, 0, -112, 0, 16, 0,168, 0, 32, 0, 72, 0,120, 0, 24, 0,144, 0,112, 0,148, 0, 32, 0,128, 0, 88, 0, 88, 0,208, 0,140, 0, - 4, 0, 24, 0, 16, 0, 8, 0,152, 0, 48, 0, 40, 0, 72, 1, 0, 1, 16, 0, 32, 2, 4, 0, 40, 0,120, 0, 72, 1,120, 0, - 56, 0,120, 0,160, 0,112, 0,184, 0, 24, 0, 88, 0, 80, 0, 80, 0, 80, 0, 8, 0, 72, 0,104, 0,104, 0, 80, 0, 80, 0, - 24, 0, 88, 0,104, 0, 16, 0,144, 0,128, 0, 88, 0, 28, 0, 28, 0, 28, 0, 88, 0, 24, 0,160, 0, 16, 0,152, 0, 72, 0, -168, 0, 48, 0,208, 0, 56, 0, 16, 0, 88, 1, 0, 0, 0, 0, 0, 0, 16, 0, 16, 0, 4, 0, 24, 0, 16, 0, 16, 0, 40, 0, - 28, 0, 12, 0, 12, 0, 32, 4, 8, 4, 32, 0, 44, 0, 24, 0, 8, 0,128, 0, 64, 0, 32, 0, 16, 0, 32, 0, 32, 0, 8, 0, - 96, 0, 20, 0,200, 3,216, 3,208, 3,200, 3,208, 3,208, 3,200, 3,208, 3,208, 3,208, 3,208, 3, 64, 0, 64, 0, 12, 0, - 56, 0, 24, 0,104, 0, 0, 4, 24, 0, 56, 0, 56, 0, 20, 0, 16, 0, 64, 0, 40, 0, 32, 0,192, 0, 60, 0, 16, 3,104, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 32, 0, 40, 0,192, 0, 40, 0, 88, 1, 0, 1,168, 0, 0, 0, 0, 0, 0, 0,120, 0, - 0, 0, 32, 0,136, 0, 0, 0,120, 0, 24, 0, 24, 0, 16, 0, 24, 0, 8, 0, 16, 0, 24, 0, 20, 0, 20, 0, 56, 0, 24, 2, - 40, 1, 16, 0,104, 0, 0, 1, 40, 0,208, 0,104, 0,112, 0,168, 0, 32, 0,128, 0, 56, 0, 80, 0, 64, 0,104, 0, 72, 0, - 64, 0,128, 0, 0, 0, 0, 0,184, 0, 8, 3, 0, 0,248, 0,192, 0, 16, 0, 72, 0, 48, 0, 64, 0, 56, 0, 24, 0,128, 0, - 0, 1, 16, 6, 0, 0, 0, 0, 83, 84, 82, 67,208, 1, 0, 0, 12, 0, 2, 0, 12, 0, 0, 0, 12, 0, 1, 0, 13, 0, 3, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0,114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255, +114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,130,130,130,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255, + 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0, + 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, + 35, 97,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255, +219, 37, 18,255,240,255, 64,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, + 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57, 57, 57,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255, +114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0,255, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,170, 64,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255, + 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255, 32,255,255,255, 75, 75, 75,255,204, 0,153,255, + 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 32, 0, 0,255, 0, 32, 0,255, 0, 0,128,255, 0, 0, 0, 0, 34,221,221,255, + 35, 97,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255, +219, 37, 18,255,240,255, 64,255,240,144,160,255,255,255,255,255, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, + 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,200,200,200,255, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 76, 76,255, 0, 0, 0, 0,250,250,250,255, 15, 15, 15,255, +114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +102,102,102,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,145,145,145,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +160,160,160,100,127,112,112,100,255,140, 25,255,250,250,250,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,130,130,130,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255, + 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0, + 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, + 35, 97,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255, +219, 37, 18,255,240,255, 64,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, + 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,250,250,250,255, 0, 0, 0, 0,250,250,250,255,250,250,250,255, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255, +114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +102,102,102,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,255,255,255,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +150,150,150,100,112,112,112,100, 96,192, 64,255, 94, 94, 94,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 79,101, 73,255,135,177,125,255,255,255,255,255, + 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0, + 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, + 35, 97,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255, +219, 37, 18,255,240,255, 64,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, +153, 64, 48,255, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255,240,175,144,255, 82, 96,110,255,124,137,150,255, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0,255,255,133, 0,255, 4, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255, +114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255, + 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0, + 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, + 35, 97,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255, +219, 37, 18,255,240,255, 64,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, + 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255, +114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +102,102,102,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,255,255,255,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +150,150,150,100,112,112,112,100, 96,192, 64,255, 94, 94, 94,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 79,101, 73,255,135,177,125,255,255,255,255,255, + 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0, + 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, + 35, 97,221,255,200,200,200,255, 80,200,255, 80, 12, 10, 10,128,255,140, 0,255, 96,192, 64,255,144,144, 0,255,128, 48, 96,255, +219, 37, 18,255,240,255, 64,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, + 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 82, 96,110,255,124,137,150,255, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0,255,255,133, 0,255, 3, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,107,107,107,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255, +114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +102,102,102,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,255,255,255,150, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +150,150,150,100,112,112,112,100, 96,192, 64,255, 94, 94, 94,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 79,101, 73,255,135,177,125,255,255,255,255,255, + 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0, + 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, + 35, 97,221,255,200,200,200,255, 80,200,255, 80, 12, 10, 10,128,255,140, 0,255, 96,192, 64,255,144,144, 0,255,128, 48, 96,255, +219, 37, 18,255,240,255, 64,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, + 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 82, 96,110,255,124,137,150,255, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0,255,255,133, 0,255, 3, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,116,116,116,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255, +114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255, + 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0, + 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, + 35, 97,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255, +219, 37, 18,255,240,255, 64,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, + 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 81,105,135,255, 32, 32,143,255,109, 88,129,255, 78,152, 62,255, 46,143,143,255, +169, 84,124,255,126,126, 80,255,162, 95,111,255,109,145,131,255,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53, 53, 53,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255, +114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255, + 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0, +255,255,255, 10,255,133, 0, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, + 35, 97,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255, +219, 37, 18,255,240,255, 64,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, + 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,114,114,114,255, 18, 66,176, 38,255,133, 0,178,255,133, 0,127, 0,255, 0,255, +255, 0, 0,255,225,210,195, 35, 0, 0, 0, 0, 0, 0, 0, 0,153,153,153,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255, +114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +143,143,143,255,198,119,119,255,255, 0, 0,255, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255, + 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0, + 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, + 35, 97,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255, +219, 37, 18,255,240,255, 64,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, + 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0,100, 0, 0,255, 0, 0,200,255, +128, 0, 80,255, 95, 95, 0,255, 0,100, 50,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255, +114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255, + 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0, + 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, + 35, 97,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255, +219, 37, 18,255,240,255, 64,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, + 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 51,127, 51, 76,130,135,140, 76,114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255, +114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +173,173,173,255,127,112,112,100, 0, 0, 0, 0, 91, 91, 91,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255, + 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0, + 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, + 35, 97,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255, +219, 37, 18,255,240,255, 64,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, + 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57, 57, 57,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255, +114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255, + 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,255,255,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0, + 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, + 35, 97,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255, +219, 37, 18,255,240,255, 64,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, + 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 5,155,155,155,160,100,104,111,255, +111,106,100,255,104,106,117,255,105,117,110,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,100,100,100,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255, +114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255, + 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0, + 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, + 35, 97,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255, +219, 37, 18,255,240,255, 64,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, + 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,114,114,114,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255, +114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255, + 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0, + 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, + 35, 97,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255, +219, 37, 18,255,240,255, 64,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, + 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255, +114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +160,160,160,100,127,112,112,100, 0, 0, 0, 0, 64, 64, 64,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,140, 25,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255, + 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255,255, 32, 32,255, 75, 75, 75,255, 0, 0, 0, 0, + 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34,221,221,255, + 35, 97,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255, +219, 37, 18,255,240,255, 64,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, + 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 96,128,255,255,255,255,255,255, 0,170, 0,255,220, 96, 96,255,220, 96, 96,255, 3, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57, 57, 57,255, 0, 0, 0, 0, 0, 0, 0,255,255,255,255,255, +114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,114,114,114,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +165,165,165,255, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255,165,165,165,127, 0, 0, 0,255, 0, 0, 0,255,255,255,255,255, +160,160,160,100,127,112,112,100, 0, 0, 0, 0, 94, 94, 94,255, 0, 0, 0,255,241, 88, 0,255, 0, 0, 0, 40, 0, 0, 0,255, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,170, 64,255, 8, 48, 8,255, 85,187, 85,255,255,255,255,255, + 0, 0, 0,255,255,133, 0,255, 0, 0, 0,255,255,160, 0,255,219, 37, 18,255, 32,255,255,255, 75, 75, 75,255,204, 0,153,255, + 0, 0, 0, 18,255,133, 0, 60,255,133, 0,255, 32, 0, 0,255, 0, 32, 0,255, 0, 0,128,255, 0, 0, 0, 0, 34,221,221,255, + 35, 97,221,255,200,200,200,255, 80,200,255, 80, 0, 0, 0, 0, 0, 0, 0, 0, 96,192, 64,255,144,144, 0,255,128, 48, 96,255, +219, 37, 18,255,240,255, 64,255,240,144,160,255,255,255,255,255, 0, 0, 0,255,144,144, 0,255, 64,144, 48,255,128, 48, 96,255, + 0, 0, 0, 0, 0, 0, 0,255,240,255, 64,255, 64,192, 48,255,240,144,160,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255,255,128, 0, 0, 0,255,255,255, 0,255, 4, 0, 0, 0, +255,127,127, 0,255,255,255,255,255,255,255, 0,255,127, 0, 0,255,127,127,127,255,200,200,200,255,255, 0, 0,255, 0, 0,255, +255, 0, 0, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,154, 0, 0,255,189, 17, 17,255,247, 10, 10,255, 0, 0, 0, 0, +247, 64, 24,255,246,105, 19,255,250,153, 0,255, 0, 0, 0, 0, 30,145, 9,255, 89,183, 11,255,131,239, 29,255, 0, 0, 0, 0, + 10, 54,148,255, 54,103,223,255, 94,193,239,255, 0, 0, 0, 0,169, 41, 78,255,193, 65,106,255,240, 93,145,255, 0, 0, 0, 0, + 67, 12,120,255, 84, 58,163,255,135,100,213,255, 0, 0, 0, 0, 36,120, 90,255, 60,149,121,255,111,182,171,255, 0, 0, 0, 0, + 75,112,124,255,106,134,145,255,155,194,205,255, 0, 0, 0, 0,244,201, 12,255,238,194, 54,255,243,255, 0,255, 0, 0, 0, 0, + 30, 32, 36,255, 72, 76, 86,255,255,255,255,255, 0, 0, 0, 0,111, 47,106,255,152, 69,190,255,211, 48,214,255, 0, 0, 0, 0, +108,142, 34,255,127,176, 34,255,187,239, 91,255, 0, 0, 0, 0,141,141,141,255,176,176,176,255,222,222,222,255, 0, 0, 0, 0, +131, 67, 38,255,139, 88, 17,255,189,106, 17,255, 0, 0, 0, 0, 8, 49, 14,255, 28, 67, 11,255, 52, 98, 43,255, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 0, 0, 0, +184,211,219, 3, 0, 0, 0, 0,207, 0, 0, 0, 1, 0, 0, 0,136,212,219, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +105,111, 95,115, 99,101,110,101, 95, 51,100,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 80, 0, 0, 0,136,212,219, 3, 0, 0, 0, 0,207, 0, 0, 0, 1, 0, 0, 0, 88,213,219, 3, 0, 0, 0, 0, +184,211,219, 3, 0, 0, 0, 0,105,111, 95,115, 99,101,110,101, 95,102, 98,120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 0, 0, 0, 88,213,219, 3, 0, 0, 0, 0,207, 0, 0, 0, 1, 0, 0, 0, + 40,214,219, 3, 0, 0, 0, 0,136,212,219, 3, 0, 0, 0, 0,105,111, 95, 97,110,105,109, 95, 98,118,104, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 0, 0, 0, 40,214,219, 3, 0, 0, 0, 0, +207, 0, 0, 0, 1, 0, 0, 0,248,214,219, 3, 0, 0, 0, 0, 88,213,219, 3, 0, 0, 0, 0,105,111, 95,109,101,115,104, 95, +112,108,121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 0, 0, 0, +248,214,219, 3, 0, 0, 0, 0,207, 0, 0, 0, 1, 0, 0, 0,200,215,219, 3, 0, 0, 0, 0, 40,214,219, 3, 0, 0, 0, 0, +105,111, 95,115, 99,101,110,101, 95,111, 98,106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 80, 0, 0, 0,200,215,219, 3, 0, 0, 0, 0,207, 0, 0, 0, 1, 0, 0, 0,152,216,219, 3, 0, 0, 0, 0, +248,214,219, 3, 0, 0, 0, 0,105,111, 95,115, 99,101,110,101, 95,120, 51,100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 0, 0, 0,152,216,219, 3, 0, 0, 0, 0,207, 0, 0, 0, 1, 0, 0, 0, +104,217,219, 3, 0, 0, 0, 0,200,215,219, 3, 0, 0, 0, 0,105,111, 95,109,101,115,104, 95,115,116,108, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 0, 0, 0,104,217,219, 3, 0, 0, 0, 0, +207, 0, 0, 0, 1, 0, 0, 0, 56,218,219, 3, 0, 0, 0, 0,152,216,219, 3, 0, 0, 0, 0,105,111, 95,109,101,115,104, 95, +117,118, 95,108, 97,121,111,117,116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65, 80, 0, 0, 0, + 56,218,219, 3, 0, 0, 0, 0,207, 0, 0, 0, 1, 0, 0, 0, 8,219,219, 3, 0, 0, 0, 0,104,217,219, 3, 0, 0, 0, 0, +105,111, 95, 99,117,114,118,101, 95,115,118,103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 68, 65, 84, 65, 80, 0, 0, 0, 8,219,219, 3, 0, 0, 0, 0,207, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 56,218,219, 3, 0, 0, 0, 0, 99,121, 99,108,101,115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 68, 65, 84, 65,232, 0, 0, 0,200,154,199, 3, 0, 0, 0, 0,199, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68,101,102, 97,117,108,116, 32, 83,116,121,108,101, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 0, 0, 0,255,255, 0, 0,154,153, 25, 62, 0, 0,128, 63, 0, 0, 12, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0,255,255, 0, 0, 0, 0,128, 62, 0, 0, 0, 0, 0, 0, 11, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 3, 0, 0, 0,255,255, 0, 0,154,153, 25, 62, 0, 0,128, 63, 0, 0, 11, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 62, 0, 0, 0, 0, 0, 0,128, 63, 0, 0, 0, 0, 8, 0, 5, 0, 5, 0, 8, 0, + 2, 0, 8, 0, 4, 0, 0, 0, 68, 78, 65, 49,136, 4, 1, 0,200,254,218, 15, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 83, 68, 78, 65, 78, 65, 77, 69, 58, 13, 0, 0, 42,110,101,120,116, 0, 42,112,114,101,118, 0, 42,100, 97,116, 97, 0, 42,102, +105,114,115,116, 0, 42,108, 97,115,116, 0,120, 0,121, 0,122, 0,120,109,105,110, 0,120,109, 97,120, 0,121,109,105,110, 0, +121,109, 97,120, 0, 42,112,111,105,110,116,101,114, 0,103,114,111,117,112, 0,118, 97,108, 0,118, 97,108, 50, 0,116,121,112, +101, 0,115,117, 98,116,121,112,101, 0,102,108, 97,103, 0,110, 97,109,101, 91, 54, 52, 93, 0,115, 97,118,101,100, 0,100, 97, +116, 97, 0,108,101,110, 0,116,111,116, 97,108,108,101,110, 0, 42,110,101,119,105,100, 0, 42,108,105, 98, 0,110, 97,109,101, + 91, 54, 54, 93, 0,112, 97,100, 0,117,115, 0,105, 99,111,110, 95,105,100, 0,112, 97,100, 50, 0, 42,112,114,111,112,101,114, +116,105,101,115, 0,105,100, 0, 42,105,100, 98,108,111, 99,107, 0, 42,102,105,108,101,100, 97,116, 97, 0,110, 97,109,101, 91, + 49, 48, 50, 52, 93, 0,102,105,108,101,112, 97,116,104, 91, 49, 48, 50, 52, 93, 0,116,111,116, 0, 42,112, 97,114,101,110,116, + 0,119, 91, 50, 93, 0,104, 91, 50, 93, 0, 99,104, 97,110,103,101,100, 91, 50, 93, 0, 99,104, 97,110,103,101,100, 95,116,105, +109,101,115,116, 97,109,112, 91, 50, 93, 0, 42,114,101, 99,116, 91, 50, 93, 0, 42,111, 98, 0, 98,108,111, 99,107,116,121,112, +101, 0, 97,100,114, 99,111,100,101, 0,110, 97,109,101, 91, 49, 50, 56, 93, 0, 42, 98,112, 0, 42, 98,101,122,116, 0,109, 97, +120,114, 99,116, 0,116,111,116,114, 99,116, 0,118, 97,114,116,121,112,101, 0,116,111,116,118,101,114,116, 0,105,112,111, 0, +101,120,116,114, 97,112, 0,114,116, 0, 98,105,116,109, 97,115,107, 0,115,108,105,100,101, 95,109,105,110, 0,115,108,105,100, +101, 95,109, 97,120, 0, 99,117,114,118, 97,108, 0, 42,100,114,105,118,101,114, 0, 99,117,114,118,101, 0, 99,117,114, 0,115, +104,111,119,107,101,121, 0,109,117,116,101,105,112,111, 0,112,111,115, 0,114,101,108, 97,116,105,118,101, 0,116,111,116,101, +108,101,109, 0, 42,119,101,105,103,104,116,115, 0,118,103,114,111,117,112, 91, 54, 52, 93, 0,115,108,105,100,101,114,109,105, +110, 0,115,108,105,100,101,114,109, 97,120, 0,117,105,100, 0,112, 97,100, 51, 0, 42, 97,100,116, 0, 42,114,101,102,107,101, +121, 0,101,108,101,109,115,116,114, 91, 54, 52, 93, 0,101,108,101,109,115,105,122,101, 0, 98,108,111, 99,107, 0, 42,105,112, +111, 0, 42,102,114,111,109, 0,116,111,116,107,101,121, 0,115,108,117,114,112,104, 0,117,105,100,103,101,110, 0, 42,108,105, +110,101, 0, 42,102,111,114,109, 97,116, 0, 98,108,101,110, 0,108,105,110,101,110,111, 0,115,116, 97,114,116, 0,101,110,100, + 0,112, 97,100, 49, 0,102,108, 97,103,115, 0, 99,111,108,111,114, 91, 52, 93, 0,112, 97,100, 91, 52, 93, 0, 42,110, 97,109, +101, 0,110,108,105,110,101,115, 0,108,105,110,101,115, 0, 42, 99,117,114,108, 0, 42,115,101,108,108, 0, 99,117,114, 99, 0, +115,101,108, 99, 0,109, 97,114,107,101,114,115, 0, 42,117,110,100,111, 95, 98,117,102, 0,117,110,100,111, 95,112,111,115, 0, +117,110,100,111, 95,108,101,110, 0, 42, 99,111,109,112,105,108,101,100, 0,109,116,105,109,101, 0,115,105,122,101, 0,115,101, +101,107, 0,100,116,120, 0,112, 97,115,115,101,112, 97,114,116, 97,108,112,104, 97, 0, 99,108,105,112,115,116, 97, 0, 99,108, +105,112,101,110,100, 0,108,101,110,115, 0,111,114,116,104,111, 95,115, 99, 97,108,101, 0,100,114, 97,119,115,105,122,101, 0, +115,101,110,115,111,114, 95,120, 0,115,101,110,115,111,114, 95,121, 0,115,104,105,102,116,120, 0,115,104,105,102,116,121, 0, + 89, 70, 95,100,111,102,100,105,115,116, 0, 42,100,111,102, 95,111, 98, 0,115,101,110,115,111,114, 95,102,105,116, 0,112, 97, +100, 91, 55, 93, 0, 42,115, 99,101,110,101, 0,102,114, 97,109,101,110,114, 0,102,114, 97,109,101,115, 0,111,102,102,115,101, +116, 0,115,102,114, 97, 0,102,105,101, 95,105,109, 97, 0, 99,121, 99,108, 0,111,107, 0,109,117,108,116,105, 95,105,110,100, +101,120, 0,108, 97,121,101,114, 0,112, 97,115,115, 0,105, 98,117,102,115, 0, 42,103,112,117,116,101,120,116,117,114,101, 0, + 42, 97,110,105,109, 0, 42,114,114, 0, 42,114,101,110,100,101,114,115, 91, 56, 93, 0,114,101,110,100,101,114, 95,115,108,111, +116, 0,108, 97,115,116, 95,114,101,110,100,101,114, 95,115,108,111,116, 0,115,111,117,114, 99,101, 0,108, 97,115,116,102,114, + 97,109,101, 0,116,112, 97,103,101,102,108, 97,103, 0,116,111,116, 98,105,110,100, 0,120,114,101,112, 0,121,114,101,112, 0, +116,119,115,116, 97, 0,116,119,101,110,100, 0, 98,105,110,100, 99,111,100,101, 0, 42,114,101,112, 98,105,110,100, 0, 42,112, + 97, 99,107,101,100,102,105,108,101, 0, 42,112,114,101,118,105,101,119, 0,108, 97,115,116,117,112,100, 97,116,101, 0,108, 97, +115,116,117,115,101,100, 0, 97,110,105,109,115,112,101,101,100, 0,103,101,110, 95,120, 0,103,101,110, 95,121, 0,103,101,110, + 95,116,121,112,101, 0,103,101,110, 95,102,108, 97,103, 0, 97,115,112,120, 0, 97,115,112,121, 0,116,101,120, 99,111, 0,109, + 97,112,116,111, 0,109, 97,112,116,111,110,101,103, 0, 98,108,101,110,100,116,121,112,101, 0, 42,111, 98,106,101, 99,116, 0, + 42,116,101,120, 0,117,118,110, 97,109,101, 91, 54, 52, 93, 0,112,114,111,106,120, 0,112,114,111,106,121, 0,112,114,111,106, +122, 0,109, 97,112,112,105,110,103, 0,111,102,115, 91, 51, 93, 0,115,105,122,101, 91, 51, 93, 0,114,111,116, 0,116,101,120, +102,108, 97,103, 0, 99,111,108,111,114,109,111,100,101,108, 0,112,109, 97,112,116,111, 0,112,109, 97,112,116,111,110,101,103, + 0,110,111,114,109, 97,112,115,112, 97, 99,101, 0,119,104,105, 99,104, 95,111,117,116,112,117,116, 0, 98,114,117,115,104, 95, +109, 97,112, 95,109,111,100,101, 0,114, 0,103, 0, 98, 0,107, 0,100,101,102, 95,118, 97,114, 0, 99,111,108,102, 97, 99, 0, +118, 97,114,102, 97, 99, 0,110,111,114,102, 97, 99, 0,100,105,115,112,102, 97, 99, 0,119, 97,114,112,102, 97, 99, 0, 99,111, +108,115,112,101, 99,102, 97, 99, 0,109,105,114,114,102, 97, 99, 0, 97,108,112,104, 97,102, 97, 99, 0,100,105,102,102,102, 97, + 99, 0,115,112,101, 99,102, 97, 99, 0,101,109,105,116,102, 97, 99, 0,104, 97,114,100,102, 97, 99, 0,114, 97,121,109,105,114, +114,102, 97, 99, 0,116,114, 97,110,115,108,102, 97, 99, 0, 97,109, 98,102, 97, 99, 0, 99,111,108,101,109,105,116,102, 97, 99, + 0, 99,111,108,114,101,102,108,102, 97, 99, 0, 99,111,108,116,114, 97,110,115,102, 97, 99, 0,100,101,110,115,102, 97, 99, 0, +115, 99, 97,116,116,101,114,102, 97, 99, 0,114,101,102,108,102, 97, 99, 0,116,105,109,101,102, 97, 99, 0,108,101,110,103,116, +104,102, 97, 99, 0, 99,108,117,109,112,102, 97, 99, 0,100, 97,109,112,102, 97, 99, 0,107,105,110,107,102, 97, 99, 0,114,111, +117,103,104,102, 97, 99, 0,112, 97,100,101,110,115,102, 97, 99, 0,103,114, 97,118,105,116,121,102, 97, 99, 0,108,105,102,101, +102, 97, 99, 0,115,105,122,101,102, 97, 99, 0,105,118,101,108,102, 97, 99, 0,102,105,101,108,100,102, 97, 99, 0,115,104, 97, +100,111,119,102, 97, 99, 0,122,101,110,117,112,102, 97, 99, 0,122,101,110,100,111,119,110,102, 97, 99, 0, 98,108,101,110,100, +102, 97, 99, 0, 42,104, 97,110,100,108,101, 0, 42,112,110, 97,109,101, 0, 42,115,116,110, 97,109,101,115, 0,115,116,121,112, +101,115, 0,118, 97,114,115, 0, 42,118, 97,114,115,116,114, 0, 42,114,101,115,117,108,116, 0, 42, 99,102,114, 97, 0,100, 97, +116, 97, 91, 51, 50, 93, 0, 40, 42,100,111,105,116, 41, 40, 41, 0, 40, 42,105,110,115,116, 97,110, 99,101, 95,105,110,105,116, + 41, 40, 41, 0, 40, 42, 99, 97,108,108, 98, 97, 99,107, 41, 40, 41, 0,118,101,114,115,105,111,110, 0, 97, 0,105,112,111,116, +121,112,101, 0, 42,105,109, 97, 0, 42, 99,117, 98,101, 91, 54, 93, 0,105,109, 97,116, 91, 52, 93, 91, 52, 93, 0,111, 98,105, +109, 97,116, 91, 51, 93, 91, 51, 93, 0,115,116,121,112,101, 0,118,105,101,119,115, 99, 97,108,101, 0,110,111,116,108, 97,121, + 0, 99,117, 98,101,114,101,115, 0,100,101,112,116,104, 0,114,101, 99, 97,108, 99, 0,108, 97,115,116,115,105,122,101, 0,102, + 97,108,108,111,102,102, 95,116,121,112,101, 0,102, 97,108,108,111,102,102, 95,115,111,102,116,110,101,115,115, 0,114, 97,100, +105,117,115, 0, 99,111,108,111,114, 95,115,111,117,114, 99,101, 0,116,111,116,112,111,105,110,116,115, 0,112,100,112, 97,100, + 0,112,115,121,115, 0,112,115,121,115, 95, 99, 97, 99,104,101, 95,115,112, 97, 99,101, 0,111, 98, 95, 99, 97, 99,104,101, 95, +115,112, 97, 99,101, 0, 42,112,111,105,110,116, 95,116,114,101,101, 0, 42,112,111,105,110,116, 95,100, 97,116, 97, 0,110,111, +105,115,101, 95,115,105,122,101, 0,110,111,105,115,101, 95,100,101,112,116,104, 0,110,111,105,115,101, 95,105,110,102,108,117, +101,110, 99,101, 0,110,111,105,115,101, 95, 98, 97,115,105,115, 0,112,100,112, 97,100, 51, 91, 51, 93, 0,110,111,105,115,101, + 95,102, 97, 99, 0,115,112,101,101,100, 95,115, 99, 97,108,101, 0,102, 97,108,108,111,102,102, 95,115,112,101,101,100, 95,115, + 99, 97,108,101, 0,112,100,112, 97,100, 50, 0, 42, 99,111, 98, 97, 0, 42,102, 97,108,108,111,102,102, 95, 99,117,114,118,101, + 0,114,101,115,111,108, 91, 51, 93, 0,105,110,116,101,114,112, 95,116,121,112,101, 0,102,105,108,101, 95,102,111,114,109, 97, +116, 0,101,120,116,101,110,100, 0,115,109,111,107,101,100, 95,116,121,112,101, 0,105,110,116, 95,109,117,108,116,105,112,108, +105,101,114, 0,115,116,105,108,108, 95,102,114, 97,109,101, 0,115,111,117,114, 99,101, 95,112, 97,116,104, 91, 49, 48, 50, 52, + 93, 0, 42,100, 97,116, 97,115,101,116, 0, 99, 97, 99,104,101,100,102,114, 97,109,101, 0,111, 99,101, 97,110,109,111,100, 91, + 54, 52, 93, 0,111,117,116,112,117,116, 0,110,111,105,115,101,115,105,122,101, 0,116,117,114, 98,117,108, 0, 98,114,105,103, +104,116, 0, 99,111,110,116,114, 97,115,116, 0,115, 97,116,117,114, 97,116,105,111,110, 0,114,102, 97, 99, 0,103,102, 97, 99, + 0, 98,102, 97, 99, 0,102,105,108,116,101,114,115,105,122,101, 0,109,103, 95, 72, 0,109,103, 95,108, 97, 99,117,110, 97,114, +105,116,121, 0,109,103, 95,111, 99,116, 97,118,101,115, 0,109,103, 95,111,102,102,115,101,116, 0,109,103, 95,103, 97,105,110, + 0,100,105,115,116, 95, 97,109,111,117,110,116, 0,110,115, 95,111,117,116,115, 99, 97,108,101, 0,118,110, 95,119, 49, 0,118, +110, 95,119, 50, 0,118,110, 95,119, 51, 0,118,110, 95,119, 52, 0,118,110, 95,109,101,120,112, 0,118,110, 95,100,105,115,116, +109, 0,118,110, 95, 99,111,108,116,121,112,101, 0,110,111,105,115,101,100,101,112,116,104, 0,110,111,105,115,101,116,121,112, +101, 0,110,111,105,115,101, 98, 97,115,105,115, 0,110,111,105,115,101, 98, 97,115,105,115, 50, 0,105,109, 97,102,108, 97,103, + 0, 99,114,111,112,120,109,105,110, 0, 99,114,111,112,121,109,105,110, 0, 99,114,111,112,120,109, 97,120, 0, 99,114,111,112, +121,109, 97,120, 0,116,101,120,102,105,108,116,101,114, 0, 97,102,109, 97,120, 0,120,114,101,112,101, 97,116, 0,121,114,101, +112,101, 97,116, 0, 99,104,101, 99,107,101,114,100,105,115,116, 0,110, 97, 98,108, 97, 0,105,117,115,101,114, 0, 42,110,111, +100,101,116,114,101,101, 0, 42,112,108,117,103,105,110, 0, 42,101,110,118, 0, 42,112,100, 0, 42,118,100, 0, 42,111,116, 0, +117,115,101, 95,110,111,100,101,115, 0,108,111, 99, 91, 51, 93, 0,114,111,116, 91, 51, 93, 0,109, 97,116, 91, 52, 93, 91, 52, + 93, 0,109,105,110, 91, 51, 93, 0,109, 97,120, 91, 51, 93, 0, 99,111, 98, 97, 0, 98,108,101,110,100, 95, 99,111,108,111,114, + 91, 51, 93, 0, 98,108,101,110,100, 95,102, 97, 99,116,111,114, 0, 98,108,101,110,100, 95,116,121,112,101, 0,112, 97,100, 91, + 51, 93, 0,109,111,100,101, 0,116,111,116,101,120, 0,115,104,100,119,114, 0,115,104,100,119,103, 0,115,104,100,119, 98, 0, +115,104,100,119,112, 97,100, 0,101,110,101,114,103,121, 0,100,105,115,116, 0,115,112,111,116,115,105,122,101, 0,115,112,111, +116, 98,108,101,110,100, 0,104, 97,105,110,116, 0, 97,116,116, 49, 0, 97,116,116, 50, 0, 42, 99,117,114,102, 97,108,108,111, +102,102, 0,115,104, 97,100,115,112,111,116,115,105,122,101, 0, 98,105, 97,115, 0,115,111,102,116, 0, 99,111,109,112,114,101, +115,115,116,104,114,101,115,104, 0,112, 97,100, 53, 91, 51, 93, 0, 98,117,102,115,105,122,101, 0,115, 97,109,112, 0, 98,117, +102,102,101,114,115, 0,102,105,108,116,101,114,116,121,112,101, 0, 98,117,102,102,108, 97,103, 0, 98,117,102,116,121,112,101, + 0,114, 97,121, 95,115, 97,109,112, 0,114, 97,121, 95,115, 97,109,112,121, 0,114, 97,121, 95,115, 97,109,112,122, 0,114, 97, +121, 95,115, 97,109,112, 95,116,121,112,101, 0, 97,114,101, 97, 95,115,104, 97,112,101, 0, 97,114,101, 97, 95,115,105,122,101, + 0, 97,114,101, 97, 95,115,105,122,101,121, 0, 97,114,101, 97, 95,115,105,122,101,122, 0, 97,100, 97,112,116, 95,116,104,114, +101,115,104, 0,114, 97,121, 95,115, 97,109,112, 95,109,101,116,104,111,100, 0,116,101,120, 97, 99,116, 0,115,104, 97,100,104, + 97,108,111,115,116,101,112, 0,115,117,110, 95,101,102,102,101, 99,116, 95,116,121,112,101, 0,115,107,121, 98,108,101,110,100, +116,121,112,101, 0,104,111,114,105,122,111,110, 95, 98,114,105,103,104,116,110,101,115,115, 0,115,112,114,101, 97,100, 0,115, +117,110, 95, 98,114,105,103,104,116,110,101,115,115, 0,115,117,110, 95,115,105,122,101, 0, 98, 97, 99,107,115, 99, 97,116,116, +101,114,101,100, 95,108,105,103,104,116, 0,115,117,110, 95,105,110,116,101,110,115,105,116,121, 0, 97,116,109, 95,116,117,114, + 98,105,100,105,116,121, 0, 97,116,109, 95,105,110,115, 99, 97,116,116,101,114,105,110,103, 95,102, 97, 99,116,111,114, 0, 97, +116,109, 95,101,120,116,105,110, 99,116,105,111,110, 95,102, 97, 99,116,111,114, 0, 97,116,109, 95,100,105,115,116, 97,110, 99, +101, 95,102, 97, 99,116,111,114, 0,115,107,121, 98,108,101,110,100,102, 97, 99, 0,115,107,121, 95,101,120,112,111,115,117,114, +101, 0,115,107,121, 95, 99,111,108,111,114,115,112, 97, 99,101, 0,112, 97,100, 52, 91, 54, 93, 0, 42,109,116,101,120, 91, 49, + 56, 93, 0,112,114, 95,116,101,120,116,117,114,101, 0,112, 97,100, 54, 91, 52, 93, 0,100,101,110,115,105,116,121, 0,101,109, +105,115,115,105,111,110, 0,115, 99, 97,116,116,101,114,105,110,103, 0,114,101,102,108,101, 99,116,105,111,110, 0,101,109,105, +115,115,105,111,110, 95, 99,111,108, 91, 51, 93, 0,116,114, 97,110,115,109,105,115,115,105,111,110, 95, 99,111,108, 91, 51, 93, + 0,114,101,102,108,101, 99,116,105,111,110, 95, 99,111,108, 91, 51, 93, 0,100,101,110,115,105,116,121, 95,115, 99, 97,108,101, + 0,100,101,112,116,104, 95, 99,117,116,111,102,102, 0, 97,115,121,109,109,101,116,114,121, 0,115,116,101,112,115,105,122,101, + 95,116,121,112,101, 0,115,104, 97,100,101,102,108, 97,103, 0,115,104, 97,100,101, 95,116,121,112,101, 0,112,114,101, 99, 97, + 99,104,101, 95,114,101,115,111,108,117,116,105,111,110, 0,115,116,101,112,115,105,122,101, 0,109,115, 95,100,105,102,102, 0, +109,115, 95,105,110,116,101,110,115,105,116,121, 0,109,115, 95,115,112,114,101, 97,100, 0, 97,108,112,104, 97, 95, 98,108,101, +110,100, 0,102, 97, 99,101, 95,111,114,105,101,110,116, 97,116,105,111,110, 0,109, 97,116,101,114,105, 97,108, 95,116,121,112, +101, 0,115,112,101, 99,114, 0,115,112,101, 99,103, 0,115,112,101, 99, 98, 0,109,105,114,114, 0,109,105,114,103, 0,109,105, +114, 98, 0, 97,109, 98,114, 0, 97,109, 98, 98, 0, 97,109, 98,103, 0, 97,109, 98, 0,101,109,105,116, 0, 97,110,103, 0,115, +112,101, 99,116,114, 97, 0,114, 97,121, 95,109,105,114,114,111,114, 0, 97,108,112,104, 97, 0,114,101,102, 0,115,112,101, 99, + 0,122,111,102,102,115, 0, 97,100,100, 0,116,114, 97,110,115,108,117, 99,101,110, 99,121, 0,118,111,108, 0,103, 97,109,101, + 0,102,114,101,115,110,101,108, 95,109,105,114, 0,102,114,101,115,110,101,108, 95,109,105,114, 95,105, 0,102,114,101,115,110, +101,108, 95,116,114, 97, 0,102,114,101,115,110,101,108, 95,116,114, 97, 95,105, 0,102,105,108,116,101,114, 0,116,120, 95,108, +105,109,105,116, 0,116,120, 95,102, 97,108,108,111,102,102, 0,114, 97,121, 95,100,101,112,116,104, 0,114, 97,121, 95,100,101, +112,116,104, 95,116,114, 97, 0,104, 97,114, 0,115,101,101,100, 49, 0,115,101,101,100, 50, 0,103,108,111,115,115, 95,109,105, +114, 0,103,108,111,115,115, 95,116,114, 97, 0,115, 97,109,112, 95,103,108,111,115,115, 95,109,105,114, 0,115, 97,109,112, 95, +103,108,111,115,115, 95,116,114, 97, 0, 97,100, 97,112,116, 95,116,104,114,101,115,104, 95,109,105,114, 0, 97,100, 97,112,116, + 95,116,104,114,101,115,104, 95,116,114, 97, 0, 97,110,105,115,111, 95,103,108,111,115,115, 95,109,105,114, 0,100,105,115,116, + 95,109,105,114, 0,102, 97,100,101,116,111, 95,109,105,114, 0,115,104, 97,100,101, 95,102,108, 97,103, 0,109,111,100,101, 95, +108, 0,102,108, 97,114,101, 99, 0,115,116, 97,114, 99, 0,108,105,110,101, 99, 0,114,105,110,103, 99, 0,104, 97,115,105,122, +101, 0,102,108, 97,114,101,115,105,122,101, 0,115,117, 98,115,105,122,101, 0,102,108, 97,114,101, 98,111,111,115,116, 0,115, +116,114, 97,110,100, 95,115,116, 97, 0,115,116,114, 97,110,100, 95,101,110,100, 0,115,116,114, 97,110,100, 95,101, 97,115,101, + 0,115,116,114, 97,110,100, 95,115,117,114,102,110,111,114, 0,115,116,114, 97,110,100, 95,109,105,110, 0,115,116,114, 97,110, +100, 95,119,105,100,116,104,102, 97,100,101, 0,115,116,114, 97,110,100, 95,117,118,110, 97,109,101, 91, 54, 52, 93, 0,115, 98, +105, 97,115, 0,108, 98,105, 97,115, 0,115,104, 97,100, 95, 97,108,112,104, 97, 0,115,101,112,116,101,120, 0,114,103, 98,115, +101,108, 0,112,114, 95,116,121,112,101, 0,112,114, 95, 98, 97, 99,107, 0,112,114, 95,108, 97,109,112, 0,109,108, 95,102,108, + 97,103, 0,100,105,102,102, 95,115,104, 97,100,101,114, 0,115,112,101, 99, 95,115,104, 97,100,101,114, 0,114,111,117,103,104, +110,101,115,115, 0,114,101,102,114, 97, 99, 0,112, 97,114, 97,109, 91, 52, 93, 0,114,109,115, 0,100, 97,114,107,110,101,115, +115, 0, 42,114, 97,109,112, 95, 99,111,108, 0, 42,114, 97,109,112, 95,115,112,101, 99, 0,114, 97,109,112,105,110, 95, 99,111, +108, 0,114, 97,109,112,105,110, 95,115,112,101, 99, 0,114, 97,109,112, 98,108,101,110,100, 95, 99,111,108, 0,114, 97,109,112, + 98,108,101,110,100, 95,115,112,101, 99, 0,114, 97,109,112, 95,115,104,111,119, 0,114, 97,109,112,102, 97, 99, 95, 99,111,108, + 0,114, 97,109,112,102, 97, 99, 95,115,112,101, 99, 0, 42,103,114,111,117,112, 0,102,114,105, 99,116,105,111,110, 0,102,104, + 0,114,101,102,108,101, 99,116, 0,102,104,100,105,115,116, 0,120,121,102,114,105, 99,116, 0,100,121,110, 97,109,111,100,101, + 0,115,115,115, 95,114, 97,100,105,117,115, 91, 51, 93, 0,115,115,115, 95, 99,111,108, 91, 51, 93, 0,115,115,115, 95,101,114, +114,111,114, 0,115,115,115, 95,115, 99, 97,108,101, 0,115,115,115, 95,105,111,114, 0,115,115,115, 95, 99,111,108,102, 97, 99, + 0,115,115,115, 95,116,101,120,102, 97, 99, 0,115,115,115, 95,102,114,111,110,116, 0,115,115,115, 95, 98, 97, 99,107, 0,115, +115,115, 95,102,108, 97,103, 0,115,115,115, 95,112,114,101,115,101,116, 0,109, 97,112,116,111, 95,116,101,120,116,117,114,101, +100, 0,115,104, 97,100,111,119,111,110,108,121, 95,102,108, 97,103, 0,105,110,100,101,120, 0,103,112,117,109, 97,116,101,114, +105, 97,108, 0, 42, 98, 98, 0,115,101,108, 99,111,108, 49, 0,115,101,108, 99,111,108, 50, 0,113,117, 97,116, 91, 52, 93, 0, +101,120,112,120, 0,101,120,112,121, 0,101,120,112,122, 0,114, 97,100, 0,114, 97,100, 50, 0,115, 0, 42,109, 97,116, 0, 42, +105,109, 97,116, 0,101,108,101,109,115, 0,100,105,115,112, 0, 42,101,100,105,116,101,108,101,109,115, 0, 42, 42,109, 97,116, + 0,102,108, 97,103, 50, 0,116,111,116, 99,111,108, 0,119,105,114,101,115,105,122,101, 0,114,101,110,100,101,114,115,105,122, +101, 0,116,104,114,101,115,104, 0, 42,108, 97,115,116,101,108,101,109, 0,118,101, 99, 91, 51, 93, 91, 51, 93, 0, 97,108,102, + 97, 0,119,101,105,103,104,116, 0,104, 49, 0,104, 50, 0,102, 49, 0,102, 50, 0,102, 51, 0,104,105,100,101, 0,118,101, 99, + 91, 52, 93, 0,109, 97,116, 95,110,114, 0,112,110,116,115,117, 0,112,110,116,115,118, 0,114,101,115,111,108,117, 0,114,101, +115,111,108,118, 0,111,114,100,101,114,117, 0,111,114,100,101,114,118, 0,102,108, 97,103,117, 0,102,108, 97,103,118, 0, 42, +107,110,111,116,115,117, 0, 42,107,110,111,116,115,118, 0,116,105,108,116, 95,105,110,116,101,114,112, 0,114, 97,100,105,117, +115, 95,105,110,116,101,114,112, 0, 99,104, 97,114,105,100,120, 0,107,101,114,110, 0,119, 0,104, 0,110,117,114, 98,115, 0, + 42,107,101,121,105,110,100,101,120, 0,115,104, 97,112,101,110,114, 0,110,117,114, 98, 0, 42,101,100,105,116,110,117,114, 98, + 0, 42, 98,101,118,111, 98,106, 0, 42,116, 97,112,101,114,111, 98,106, 0, 42,116,101,120,116,111,110, 99,117,114,118,101, 0, + 42,112, 97,116,104, 0, 42,107,101,121, 0, 98,101,118, 0,100,114, 97,119,102,108, 97,103, 0,116,119,105,115,116, 95,109,111, +100,101, 0,116,119,105,115,116, 95,115,109,111,111,116,104, 0,115,109, 97,108,108, 99, 97,112,115, 95,115, 99, 97,108,101, 0, +112, 97,116,104,108,101,110, 0, 98,101,118,114,101,115,111,108, 0,119,105,100,116,104, 0,101,120,116, 49, 0,101,120,116, 50, + 0,114,101,115,111,108,117, 95,114,101,110, 0,114,101,115,111,108,118, 95,114,101,110, 0, 97, 99,116,110,117, 0, 42,108, 97, +115,116,115,101,108, 0,115,112, 97, 99,101,109,111,100,101, 0,115,112, 97, 99,105,110,103, 0,108,105,110,101,100,105,115,116, + 0,115,104,101, 97,114, 0,102,115,105,122,101, 0,119,111,114,100,115,112, 97, 99,101, 0,117,108,112,111,115, 0,117,108,104, +101,105,103,104,116, 0,120,111,102, 0,121,111,102, 0,108,105,110,101,119,105,100,116,104, 0, 42,115,116,114, 0, 42,115,101, +108, 98,111,120,101,115, 0, 42,101,100,105,116,102,111,110,116, 0,102, 97,109,105,108,121, 91, 50, 52, 93, 0, 42,118,102,111, +110,116, 0, 42,118,102,111,110,116, 98, 0, 42,118,102,111,110,116,105, 0, 42,118,102,111,110,116, 98,105, 0,115,101,112, 99, +104, 97,114, 0, 99,116,105,109,101, 0,116,111,116, 98,111,120, 0, 97, 99,116, 98,111,120, 0, 42,116, 98, 0,115,101,108,115, +116, 97,114,116, 0,115,101,108,101,110,100, 0, 42,115,116,114,105,110,102,111, 0, 99,117,114,105,110,102,111, 0, 42,109,112, +111,108,121, 0, 42,109,116,112,111,108,121, 0, 42,109,108,111,111,112, 0, 42,109,108,111,111,112,117,118, 0, 42,109,108,111, +111,112, 99,111,108, 0, 42,109,102, 97, 99,101, 0, 42,109,116,102, 97, 99,101, 0, 42,116,102, 97, 99,101, 0, 42,109,118,101, +114,116, 0, 42,109,101,100,103,101, 0, 42,100,118,101,114,116, 0, 42,109, 99,111,108, 0, 42,109,115,116,105, 99,107,121, 0, + 42,116,101,120, 99,111,109,101,115,104, 0, 42,109,115,101,108,101, 99,116, 0, 42,101,100,105,116, 95, 98,116,109,101,115,104, + 0,118,100, 97,116, 97, 0,101,100, 97,116, 97, 0,102,100, 97,116, 97, 0,112,100, 97,116, 97, 0,108,100, 97,116, 97, 0,116, +111,116,101,100,103,101, 0,116,111,116,102, 97, 99,101, 0,116,111,116,115,101,108,101, 99,116, 0,116,111,116,112,111,108,121, + 0,116,111,116,108,111,111,112, 0, 97, 99,116, 95,102, 97, 99,101, 0,115,109,111,111,116,104,114,101,115,104, 0,115,117, 98, +100,105,118, 0,115,117, 98,100,105,118,114, 0,115,117, 98,115,117,114,102,116,121,112,101, 0,101,100,105,116,102,108, 97,103, + 0, 42,109,114, 0, 42,116,112, 97,103,101, 0,117,118, 91, 52, 93, 91, 50, 93, 0, 99,111,108, 91, 52, 93, 0,116,114, 97,110, +115,112, 0,116,105,108,101, 0,117,110,119,114, 97,112, 0,118, 49, 0,118, 50, 0,118, 51, 0,118, 52, 0,101,100, 99,111,100, +101, 0, 99,114,101, 97,115,101, 0, 98,119,101,105,103,104,116, 0,100,101,102, 95,110,114, 0, 42,100,119, 0,116,111,116,119, +101,105,103,104,116, 0, 99,111, 91, 51, 93, 0,110,111, 91, 51, 93, 0,108,111,111,112,115,116, 97,114,116, 0,118, 0,101, 0, +117,118, 91, 50, 93, 0, 99,111, 91, 50, 93, 0,102, 0,105, 0,115, 91, 50, 53, 54, 93, 0,116,111,116,100,105,115,112, 0,108, +101,118,101,108, 0, 40, 42,100,105,115,112,115, 41, 40, 41, 0, 42,104,105,100,100,101,110, 0,118, 91, 52, 93, 0,109,105,100, + 0,112, 97,100, 91, 50, 93, 0,118, 91, 50, 93, 0, 42,102, 97, 99,101,115, 0, 42, 99,111,108,102, 97, 99,101,115, 0, 42,101, +100,103,101,115, 0, 42,118,101,114,116,115, 0,108,101,118,101,108,115, 0,108,101,118,101,108, 95, 99,111,117,110,116, 0, 99, +117,114,114,101,110,116, 0,110,101,119,108,118,108, 0,101,100,103,101,108,118,108, 0,112,105,110,108,118,108, 0,114,101,110, +100,101,114,108,118,108, 0,117,115,101, 95, 99,111,108, 0, 42,101,100,103,101, 95,102,108, 97,103,115, 0, 42,101,100,103,101, + 95, 99,114,101, 97,115,101,115, 0,115,116, 97, 99,107,105,110,100,101,120, 0, 42,101,114,114,111,114, 0,109,111,100,105,102, +105,101,114, 0, 42,116,101,120,116,117,114,101, 0, 42,109, 97,112, 95,111, 98,106,101, 99,116, 0,117,118,108, 97,121,101,114, + 95,110, 97,109,101, 91, 54, 52, 93, 0,117,118,108, 97,121,101,114, 95,116,109,112, 0,116,101,120,109, 97,112,112,105,110,103, + 0,115,117, 98,100,105,118, 84,121,112,101, 0,114,101,110,100,101,114, 76,101,118,101,108,115, 0, 42,101,109, 67, 97, 99,104, +101, 0, 42,109, 67, 97, 99,104,101, 0,115,116,114,101,110,103,116,104, 0,100,101,102, 97,120,105,115, 0,112, 97,100, 91, 54, + 93, 0,108,101,110,103,116,104, 0,114, 97,110,100,111,109,105,122,101, 0,115,101,101,100, 0, 42,111, 98, 95, 97,114,109, 0, + 42,115,116, 97,114,116, 95, 99, 97,112, 0, 42,101,110,100, 95, 99, 97,112, 0, 42, 99,117,114,118,101, 95,111, 98, 0, 42,111, +102,102,115,101,116, 95,111, 98, 0,111,102,102,115,101,116, 91, 51, 93, 0,115, 99, 97,108,101, 91, 51, 93, 0,109,101,114,103, +101, 95,100,105,115,116, 0,102,105,116, 95,116,121,112,101, 0,111,102,102,115,101,116, 95,116,121,112,101, 0, 99,111,117,110, +116, 0, 97,120,105,115, 0,116,111,108,101,114, 97,110, 99,101, 0, 42,109,105,114,114,111,114, 95,111, 98, 0,115,112,108,105, +116, 95, 97,110,103,108,101, 0,118, 97,108,117,101, 0,114,101,115, 0,118, 97,108, 95,102,108, 97,103,115, 0,108,105,109, 95, +102,108, 97,103,115, 0,101, 95,102,108, 97,103,115, 0, 98,101,118,101,108, 95, 97,110,103,108,101, 0,100,101,102,103,114,112, + 95,110, 97,109,101, 91, 54, 52, 93, 0, 42,100,111,109, 97,105,110, 0, 42,102,108,111,119, 0, 42, 99,111,108,108, 0,116,105, +109,101, 0,100,105,114,101, 99,116,105,111,110, 0,109,105,100,108,101,118,101,108, 0, 42,112,114,111,106,101, 99,116,111,114, +115, 91, 49, 48, 93, 0, 42,105,109, 97,103,101, 0,110,117,109, 95,112,114,111,106,101, 99,116,111,114,115, 0, 97,115,112,101, + 99,116,120, 0, 97,115,112,101, 99,116,121, 0,115, 99, 97,108,101,120, 0,115, 99, 97,108,101,121, 0,112,101,114, 99,101,110, +116, 0,102, 97, 99,101, 67,111,117,110,116, 0,102, 97, 99, 0,114,101,112,101, 97,116, 0, 42,111, 98,106,101, 99,116, 99,101, +110,116,101,114, 0,115,116, 97,114,116,120, 0,115,116, 97,114,116,121, 0,104,101,105,103,104,116, 0,110, 97,114,114,111,119, + 0,115,112,101,101,100, 0,100, 97,109,112, 0,102, 97,108,108,111,102,102, 0,116,105,109,101,111,102,102,115, 0,108,105,102, +101,116,105,109,101, 0,100,101,102,111,114,109,102,108, 97,103, 0,109,117,108,116,105, 0, 42,112,114,101,118, 67,111,115, 0, +115,117, 98,116, 97,114,103,101,116, 91, 54, 52, 93, 0,112, 97,114,101,110,116,105,110,118, 91, 52, 93, 91, 52, 93, 0, 99,101, +110,116, 91, 51, 93, 0, 42,105,110,100,101,120, 97,114, 0,116,111,116,105,110,100,101,120, 0,102,111,114, 99,101, 0, 42, 99, +108,111,116,104, 79, 98,106,101, 99,116, 0, 42,115,105,109, 95,112, 97,114,109,115, 0, 42, 99,111,108,108, 95,112, 97,114,109, +115, 0, 42,112,111,105,110,116, 95, 99, 97, 99,104,101, 0,112,116, 99, 97, 99,104,101,115, 0, 42,120, 0, 42,120,110,101,119, + 0, 42,120,111,108,100, 0, 42, 99,117,114,114,101,110,116, 95,120,110,101,119, 0, 42, 99,117,114,114,101,110,116, 95,120, 0, + 42, 99,117,114,114,101,110,116, 95,118, 0, 42,109,102, 97, 99,101,115, 0,110,117,109,118,101,114,116,115, 0,110,117,109,102, + 97, 99,101,115, 0,116,105,109,101, 95,120, 0,116,105,109,101, 95,120,110,101,119, 0, 42, 98,118,104,116,114,101,101, 0, 42, +118, 0, 42,100,109, 0, 99,102,114, 97, 0,111,112,101,114, 97,116,105,111,110, 0,118,101,114,116,101,120, 0,116,111,116,105, +110,102,108,117,101,110, 99,101, 0,103,114,105,100,115,105,122,101, 0, 42, 98,105,110,100,105,110,102,108,117,101,110, 99,101, +115, 0, 42, 98,105,110,100,111,102,102,115,101,116,115, 0, 42, 98,105,110,100, 99, 97,103,101, 99,111,115, 0,116,111,116, 99, + 97,103,101,118,101,114,116, 0, 42,100,121,110,103,114,105,100, 0, 42,100,121,110,105,110,102,108,117,101,110, 99,101,115, 0, + 42,100,121,110,118,101,114,116,115, 0, 42,112, 97,100, 50, 0,100,121,110,103,114,105,100,115,105,122,101, 0,100,121,110, 99, +101,108,108,109,105,110, 91, 51, 93, 0,100,121,110, 99,101,108,108,119,105,100,116,104, 0, 98,105,110,100,109, 97,116, 91, 52, + 93, 91, 52, 93, 0, 42, 98,105,110,100,119,101,105,103,104,116,115, 0, 42, 98,105,110,100, 99,111,115, 0, 40, 42, 98,105,110, +100,102,117,110, 99, 41, 40, 41, 0, 42,112,115,121,115, 0,116,111,116,100,109,118,101,114,116, 0,116,111,116,100,109,101,100, +103,101, 0,116,111,116,100,109,102, 97, 99,101, 0,112,111,115,105,116,105,111,110, 0,114, 97,110,100,111,109, 95,112,111,115, +105,116,105,111,110, 0, 42,102, 97, 99,101,112, 97, 0,118,103,114,111,117,112, 0,112,114,111,116,101, 99,116, 0,108,118,108, + 0,115, 99,117,108,112,116,108,118,108, 0,116,111,116,108,118,108, 0,115,105,109,112,108,101, 0, 42,102,115,115, 0, 42,116, + 97,114,103,101,116, 0, 42, 97,117,120, 84, 97,114,103,101,116, 0,118,103,114,111,117,112, 95,110, 97,109,101, 91, 54, 52, 93, + 0,107,101,101,112, 68,105,115,116, 0,115,104,114,105,110,107, 84,121,112,101, 0,115,104,114,105,110,107, 79,112,116,115, 0, +112,114,111,106, 65,120,105,115, 0,115,117, 98,115,117,114,102, 76,101,118,101,108,115, 0, 42,111,114,105,103,105,110, 0,102, + 97, 99,116,111,114, 0,108,105,109,105,116, 91, 50, 93, 0,111,114,105,103,105,110, 79,112,116,115, 0,111,102,102,115,101,116, + 95,102, 97, 99, 0,111,102,102,115,101,116, 95,102, 97, 99, 95,118,103, 0, 99,114,101, 97,115,101, 95,105,110,110,101,114, 0, + 99,114,101, 97,115,101, 95,111,117,116,101,114, 0, 99,114,101, 97,115,101, 95,114,105,109, 0,109, 97,116, 95,111,102,115, 0, +109, 97,116, 95,111,102,115, 95,114,105,109, 0, 42,111, 98, 95, 97,120,105,115, 0,115,116,101,112,115, 0,114,101,110,100,101, +114, 95,115,116,101,112,115, 0,105,116,101,114, 0,115, 99,114,101,119, 95,111,102,115, 0, 97,110,103,108,101, 0, 42,111, 99, +101, 97,110, 0, 42,111, 99,101, 97,110, 99, 97, 99,104,101, 0,114,101,115,111,108,117,116,105,111,110, 0,115,112, 97,116,105, + 97,108, 95,115,105,122,101, 0,119,105,110,100, 95,118,101,108,111, 99,105,116,121, 0,115,109, 97,108,108,101,115,116, 95,119, + 97,118,101, 0,119, 97,118,101, 95, 97,108,105,103,110,109,101,110,116, 0,119, 97,118,101, 95,100,105,114,101, 99,116,105,111, +110, 0,119, 97,118,101, 95,115, 99, 97,108,101, 0, 99,104,111,112, 95, 97,109,111,117,110,116, 0,102,111, 97,109, 95, 99,111, +118,101,114, 97,103,101, 0, 98, 97,107,101,115,116, 97,114,116, 0, 98, 97,107,101,101,110,100, 0, 99, 97, 99,104,101,112, 97, +116,104, 91, 49, 48, 50, 52, 93, 0,102,111, 97,109,108, 97,121,101,114,110, 97,109,101, 91, 54, 52, 93, 0, 99, 97, 99,104,101, +100, 0,103,101,111,109,101,116,114,121, 95,109,111,100,101, 0,114,101,102,114,101,115,104, 0,114,101,112,101, 97,116, 95,120, + 0,114,101,112,101, 97,116, 95,121, 0,102,111, 97,109, 95,102, 97,100,101, 0, 42,111, 98,106,101, 99,116, 95,102,114,111,109, + 0, 42,111, 98,106,101, 99,116, 95,116,111, 0,102, 97,108,108,111,102,102, 95,114, 97,100,105,117,115, 0,101,100,105,116, 95, +102,108, 97,103,115, 0,100,101,102, 97,117,108,116, 95,119,101,105,103,104,116, 0, 42, 99,109, 97,112, 95, 99,117,114,118,101, + 0, 97,100,100, 95,116,104,114,101,115,104,111,108,100, 0,114,101,109, 95,116,104,114,101,115,104,111,108,100, 0,109, 97,115, +107, 95, 99,111,110,115,116, 97,110,116, 0,109, 97,115,107, 95,100,101,102,103,114,112, 95,110, 97,109,101, 91, 54, 52, 93, 0, +109, 97,115,107, 95,116,101,120, 95,117,115,101, 95, 99,104, 97,110,110,101,108, 0, 42,109, 97,115,107, 95,116,101,120,116,117, +114,101, 0, 42,109, 97,115,107, 95,116,101,120, 95,109, 97,112, 95,111, 98,106, 0,109, 97,115,107, 95,116,101,120, 95,109, 97, +112,112,105,110,103, 0,109, 97,115,107, 95,116,101,120, 95,117,118,108, 97,121,101,114, 95,110, 97,109,101, 91, 54, 52, 93, 0, +112, 97,100, 95,105, 49, 0,100,101,102,103,114,112, 95,110, 97,109,101, 95, 97, 91, 54, 52, 93, 0,100,101,102,103,114,112, 95, +110, 97,109,101, 95, 98, 91, 54, 52, 93, 0,100,101,102, 97,117,108,116, 95,119,101,105,103,104,116, 95, 97, 0,100,101,102, 97, +117,108,116, 95,119,101,105,103,104,116, 95, 98, 0,109,105,120, 95,109,111,100,101, 0,109,105,120, 95,115,101,116, 0,112, 97, +100, 95, 99, 49, 91, 54, 93, 0,112,114,111,120,105,109,105,116,121, 95,109,111,100,101, 0,112,114,111,120,105,109,105,116,121, + 95,102,108, 97,103,115, 0, 42,112,114,111,120,105,109,105,116,121, 95,111, 98, 95,116, 97,114,103,101,116, 0,109,105,110, 95, +100,105,115,116, 0,109, 97,120, 95,100,105,115,116, 0,112, 97,100, 95,115, 49, 0, 42, 99, 97,110,118, 97,115, 0, 42, 98,114, +117,115,104, 0,116,104,114,101,115,104,111,108,100, 0,115, 99, 97,108,101, 0,104,101,114,109,105,116,101, 95,110,117,109, 0, + 42,108, 97,116,116, 0,112,110,116,115,119, 0,111,112,110,116,115,117, 0,111,112,110,116,115,118, 0,111,112,110,116,115,119, + 0,116,121,112,101,117, 0,116,121,112,101,118, 0,116,121,112,101,119, 0,102,117, 0,102,118, 0,102,119, 0,100,117, 0,100, +118, 0,100,119, 0, 42,100,101,102, 0, 42,108, 97,116,116,105, 99,101,100, 97,116, 97, 0,108, 97,116,109, 97,116, 91, 52, 93, + 91, 52, 93, 0, 42,101,100,105,116,108, 97,116,116, 0,118,101, 99, 91, 56, 93, 91, 51, 93, 0, 42,115, 99,117,108,112,116, 0, +112, 97,114,116,121,112,101, 0,112, 97,114, 49, 0,112, 97,114, 50, 0,112, 97,114, 51, 0,112, 97,114,115,117, 98,115,116,114, + 91, 54, 52, 93, 0, 42,116,114, 97, 99,107, 0, 42,112,114,111,120,121, 0, 42,112,114,111,120,121, 95,103,114,111,117,112, 0, + 42,112,114,111,120,121, 95,102,114,111,109, 0, 42, 97, 99,116,105,111,110, 0, 42,112,111,115,101,108,105, 98, 0, 42,112,111, +115,101, 0, 42,103,112,100, 0, 97,118,115, 0, 42,109,112, 97,116,104, 0, 99,111,110,115,116,114, 97,105,110,116, 67,104, 97, +110,110,101,108,115, 0,101,102,102,101, 99,116, 0,100,101,102, 98, 97,115,101, 0,109,111,100,105,102,105,101,114,115, 0,114, +101,115,116,111,114,101, 95,109,111,100,101, 0, 42,109, 97,116, 98,105,116,115, 0, 97, 99,116, 99,111,108, 0,100,108,111, 99, + 91, 51, 93, 0,111,114,105,103, 91, 51, 93, 0,100,115,105,122,101, 91, 51, 93, 0,100,115, 99, 97,108,101, 91, 51, 93, 0,100, +114,111,116, 91, 51, 93, 0,100,113,117, 97,116, 91, 52, 93, 0,114,111,116, 65,120,105,115, 91, 51, 93, 0,100,114,111,116, 65, +120,105,115, 91, 51, 93, 0,114,111,116, 65,110,103,108,101, 0,100,114,111,116, 65,110,103,108,101, 0,111, 98,109, 97,116, 91, + 52, 93, 91, 52, 93, 0, 99,111,110,115,116,105,110,118, 91, 52, 93, 91, 52, 93, 0,105,109, 97,116, 95,114,101,110, 91, 52, 93, + 91, 52, 93, 0,108, 97,121, 0,112, 97,100, 54, 0, 99,111,108, 98,105,116,115, 0,116,114, 97,110,115,102,108, 97,103, 0,112, +114,111,116,101, 99,116,102,108, 97,103, 0,116,114, 97, 99,107,102,108, 97,103, 0,117,112,102,108, 97,103, 0,110,108, 97,102, +108, 97,103, 0,105,112,111,102,108, 97,103, 0,115, 99, 97,102,108, 97,103, 0,115, 99, 97,118,105,115,102,108, 97,103, 0,112, + 97,100, 53, 0,100,117,112,111,110, 0,100,117,112,111,102,102, 0,100,117,112,115,116, 97, 0,100,117,112,101,110,100, 0,115, +102, 0,109, 97,115,115, 0,100, 97,109,112,105,110,103, 0,105,110,101,114,116,105, 97, 0,102,111,114,109,102, 97, 99,116,111, +114, 0,114,100, 97,109,112,105,110,103, 0,109, 97,114,103,105,110, 0,109, 97,120, 95,118,101,108, 0,109,105,110, 95,118,101, +108, 0,109, 95, 99,111,110,116, 97, 99,116, 80,114,111, 99,101,115,115,105,110,103, 84,104,114,101,115,104,111,108,100, 0,111, + 98,115,116, 97, 99,108,101, 82, 97,100, 0,114,111,116,109,111,100,101, 0, 98,111,117,110,100,116,121,112,101, 0, 99,111,108, +108,105,115,105,111,110, 95, 98,111,117,110,100,116,121,112,101, 0,114,101,115,116,114,105, 99,116,102,108, 97,103, 0,100,116, + 0,101,109,112,116,121, 95,100,114, 97,119,116,121,112,101, 0,101,109,112,116,121, 95,100,114, 97,119,115,105,122,101, 0,100, +117,112,102, 97, 99,101,115, 99, 97, 0,112,114,111,112, 0,115,101,110,115,111,114,115, 0, 99,111,110,116,114,111,108,108,101, +114,115, 0, 97, 99,116,117, 97,116,111,114,115, 0, 98, 98,115,105,122,101, 91, 51, 93, 0, 97, 99,116,100,101,102, 0,103, 97, +109,101,102,108, 97,103, 0,103, 97,109,101,102,108, 97,103, 50, 0, 42, 98,115,111,102,116, 0,115,111,102,116,102,108, 97,103, + 0, 97,110,105,115,111,116,114,111,112,105, 99, 70,114,105, 99,116,105,111,110, 91, 51, 93, 0, 99,111,110,115,116,114, 97,105, +110,116,115, 0,110,108, 97,115,116,114,105,112,115, 0,104,111,111,107,115, 0,112, 97,114,116,105, 99,108,101,115,121,115,116, +101,109, 0, 42,115,111,102,116, 0, 42,100,117,112, 95,103,114,111,117,112, 0, 98,111,100,121, 95,116,121,112,101, 0,115,104, + 97,112,101,102,108, 97,103, 0, 42,102,108,117,105,100,115,105,109, 83,101,116,116,105,110,103,115, 0, 42,100,101,114,105,118, +101,100, 68,101,102,111,114,109, 0, 42,100,101,114,105,118,101,100, 70,105,110, 97,108, 0,108, 97,115,116, 68, 97,116, 97, 77, + 97,115,107, 0, 99,117,115,116,111,109,100, 97,116, 97, 95,109, 97,115,107, 0,115,116, 97,116,101, 0,105,110,105,116, 95,115, +116, 97,116,101, 0,103,112,117,108, 97,109,112, 0,112, 99, 95,105,100,115, 0, 42,100,117,112,108,105,108,105,115,116, 0,105, +109, 97, 95,111,102,115, 91, 50, 93, 0, 99,117,114,105,110,100,101,120, 0, 97, 99,116,105,118,101, 0,111,114,105,103,108, 97, +121, 0,111,109, 97,116, 91, 52, 93, 91, 52, 93, 0,111,114, 99,111, 91, 51, 93, 0,110,111, 95,100,114, 97,119, 0, 97,110,105, +109, 97,116,101,100, 0,100,101,102,108,101, 99,116, 0,102,111,114, 99,101,102,105,101,108,100, 0,115,104, 97,112,101, 0,116, +101,120, 95,109,111,100,101, 0,107,105,110,107, 0,107,105,110,107, 95, 97,120,105,115, 0,122,100,105,114, 0,102, 95,115,116, +114,101,110,103,116,104, 0,102, 95,100, 97,109,112, 0,102, 95,102,108,111,119, 0,102, 95,115,105,122,101, 0,102, 95,112,111, +119,101,114, 0,109, 97,120,100,105,115,116, 0,109,105,110,100,105,115,116, 0,102, 95,112,111,119,101,114, 95,114, 0,109, 97, +120,114, 97,100, 0,109,105,110,114, 97,100, 0,112,100,101,102, 95,100, 97,109,112, 0,112,100,101,102, 95,114,100, 97,109,112, + 0,112,100,101,102, 95,112,101,114,109, 0,112,100,101,102, 95,102,114,105, 99,116, 0,112,100,101,102, 95,114,102,114,105, 99, +116, 0,112,100,101,102, 95,115,116,105, 99,107,110,101,115,115, 0, 97, 98,115,111,114,112,116,105,111,110, 0,112,100,101,102, + 95,115, 98,100, 97,109,112, 0,112,100,101,102, 95,115, 98,105,102,116, 0,112,100,101,102, 95,115, 98,111,102,116, 0, 99,108, +117,109,112, 95,102, 97, 99, 0, 99,108,117,109,112, 95,112,111,119, 0,107,105,110,107, 95,102,114,101,113, 0,107,105,110,107, + 95,115,104, 97,112,101, 0,107,105,110,107, 95, 97,109,112, 0,102,114,101,101, 95,101,110,100, 0,116,101,120, 95,110, 97, 98, +108, 97, 0, 42,114,110,103, 0,102, 95,110,111,105,115,101, 0,119,101,105,103,104,116, 91, 49, 51, 93, 0,103,108,111, 98, 97, +108, 95,103,114, 97,118,105,116,121, 0,114,116, 91, 51, 93, 0,116,111,116,100, 97,116, 97, 0,102,114, 97,109,101, 0,116,111, +116,112,111,105,110,116, 0,100, 97,116, 97, 95,116,121,112,101,115, 0, 42,100, 97,116, 97, 91, 56, 93, 0, 42, 99,117,114, 91, + 56, 93, 0,101,120,116,114, 97,100, 97,116, 97, 0,115,116,101,112, 0,115,105,109,102,114, 97,109,101, 0,115,116, 97,114,116, +102,114, 97,109,101, 0,101,110,100,102,114, 97,109,101, 0,101,100,105,116,102,114, 97,109,101, 0,108, 97,115,116, 95,101,120, + 97, 99,116, 0,108, 97,115,116, 95,118, 97,108,105,100, 0, 99,111,109,112,114,101,115,115,105,111,110, 0,112,114,101,118, 95, +110, 97,109,101, 91, 54, 52, 93, 0,105,110,102,111, 91, 54, 52, 93, 0,112, 97,116,104, 91, 49, 48, 50, 52, 93, 0, 42, 99, 97, + 99,104,101,100, 95,102,114, 97,109,101,115, 0,109,101,109, 95, 99, 97, 99,104,101, 0, 42,101,100,105,116, 0, 40, 42,102,114, +101,101, 95,101,100,105,116, 41, 40, 41, 0,108,105,110, 83,116,105,102,102, 0, 97,110,103, 83,116,105,102,102, 0,118,111,108, +117,109,101, 0,118,105,116,101,114, 97,116,105,111,110,115, 0,112,105,116,101,114, 97,116,105,111,110,115, 0,100,105,116,101, +114, 97,116,105,111,110,115, 0, 99,105,116,101,114, 97,116,105,111,110,115, 0,107, 83, 82, 72, 82, 95, 67, 76, 0,107, 83, 75, + 72, 82, 95, 67, 76, 0,107, 83, 83, 72, 82, 95, 67, 76, 0,107, 83, 82, 95, 83, 80, 76, 84, 95, 67, 76, 0,107, 83, 75, 95, 83, + 80, 76, 84, 95, 67, 76, 0,107, 83, 83, 95, 83, 80, 76, 84, 95, 67, 76, 0,107, 86, 67, 70, 0,107, 68, 80, 0,107, 68, 71, 0, +107, 76, 70, 0,107, 80, 82, 0,107, 86, 67, 0,107, 68, 70, 0,107, 77, 84, 0,107, 67, 72, 82, 0,107, 75, 72, 82, 0,107, 83, + 72, 82, 0,107, 65, 72, 82, 0, 99,111,108,108,105,115,105,111,110,102,108, 97,103,115, 0,110,117,109, 99,108,117,115,116,101, +114,105,116,101,114, 97,116,105,111,110,115, 0,119,101,108,100,105,110,103, 0,116,111,116,115,112,114,105,110,103, 0, 42, 98, +112,111,105,110,116, 0, 42, 98,115,112,114,105,110,103, 0,109,115,103, 95,108,111, 99,107, 0,109,115,103, 95,118, 97,108,117, +101, 0,110,111,100,101,109, 97,115,115, 0,110, 97,109,101,100, 86, 71, 95, 77, 97,115,115, 91, 54, 52, 93, 0,103,114, 97,118, + 0,109,101,100,105, 97,102,114,105, 99,116, 0,114,107,108,105,109,105,116, 0,112,104,121,115,105, 99,115, 95,115,112,101,101, +100, 0,103,111, 97,108,115,112,114,105,110,103, 0,103,111, 97,108,102,114,105, 99,116, 0,109,105,110,103,111, 97,108, 0,109, + 97,120,103,111, 97,108, 0,100,101,102,103,111, 97,108, 0,118,101,114,116,103,114,111,117,112, 0,110, 97,109,101,100, 86, 71, + 95, 83,111,102,116,103,111, 97,108, 91, 54, 52, 93, 0,102,117,122,122,121,110,101,115,115, 0,105,110,115,112,114,105,110,103, + 0,105,110,102,114,105, 99,116, 0,110, 97,109,101,100, 86, 71, 95, 83,112,114,105,110,103, 95, 75, 91, 54, 52, 93, 0,101,102, +114, 97, 0,105,110,116,101,114,118, 97,108, 0,108,111, 99, 97,108, 0,115,111,108,118,101,114,102,108, 97,103,115, 0, 42, 42, +107,101,121,115, 0,116,111,116,112,111,105,110,116,107,101,121, 0,115,101, 99,111,110,100,115,112,114,105,110,103, 0, 99,111, +108, 98, 97,108,108, 0, 98, 97,108,108,100, 97,109,112, 0, 98, 97,108,108,115,116,105,102,102, 0,115, 98, 99, 95,109,111,100, +101, 0, 97,101,114,111,101,100,103,101, 0,109,105,110,108,111,111,112,115, 0,109, 97,120,108,111,111,112,115, 0, 99,104,111, +107,101, 0,115,111,108,118,101,114, 95, 73, 68, 0,112,108, 97,115,116,105, 99, 0,115,112,114,105,110,103,112,114,101,108,111, + 97,100, 0, 42,115, 99,114, 97,116, 99,104, 0,115,104,101, 97,114,115,116,105,102,102, 0,105,110,112,117,115,104, 0, 42,112, +111,105,110,116, 99, 97, 99,104,101, 0, 42,101,102,102,101, 99,116,111,114, 95,119,101,105,103,104,116,115, 0,108, 99,111,109, + 91, 51, 93, 0,108,114,111,116, 91, 51, 93, 91, 51, 93, 0,108,115, 99, 97,108,101, 91, 51, 93, 91, 51, 93, 0,108, 97,115,116, + 95,102,114, 97,109,101, 0,118,101,108, 91, 51, 93, 0, 42,102,109,100, 0,115,104,111,119, 95, 97,100,118, 97,110, 99,101,100, +111,112,116,105,111,110,115, 0,114,101,115,111,108,117,116,105,111,110,120,121,122, 0,112,114,101,118,105,101,119,114,101,115, +120,121,122, 0,114,101, 97,108,115,105,122,101, 0,103,117,105, 68,105,115,112,108, 97,121, 77,111,100,101, 0,114,101,110,100, +101,114, 68,105,115,112,108, 97,121, 77,111,100,101, 0,118,105,115, 99,111,115,105,116,121, 86, 97,108,117,101, 0,118,105,115, + 99,111,115,105,116,121, 77,111,100,101, 0,118,105,115, 99,111,115,105,116,121, 69,120,112,111,110,101,110,116, 0,103,114, 97, +118, 91, 51, 93, 0, 97,110,105,109, 83,116, 97,114,116, 0, 97,110,105,109, 69,110,100, 0, 98, 97,107,101, 83,116, 97,114,116, + 0, 98, 97,107,101, 69,110,100, 0,102,114, 97,109,101, 79,102,102,115,101,116, 0,103,115,116, 97,114, 0,109, 97,120, 82,101, +102,105,110,101, 0,105,110,105, 86,101,108,120, 0,105,110,105, 86,101,108,121, 0,105,110,105, 86,101,108,122, 0, 42,111,114, +103, 77,101,115,104, 0, 42,109,101,115,104, 66, 66, 0,115,117,114,102,100, 97,116, 97, 80, 97,116,104, 91, 49, 48, 50, 52, 93, + 0, 98, 98, 83,116, 97,114,116, 91, 51, 93, 0, 98, 98, 83,105,122,101, 91, 51, 93, 0,116,121,112,101, 70,108, 97,103,115, 0, +100,111,109, 97,105,110, 78,111,118,101, 99,103,101,110, 0,118,111,108,117,109,101, 73,110,105,116, 84,121,112,101, 0,112, 97, +114,116, 83,108,105,112, 86, 97,108,117,101, 0,103,101,110,101,114, 97,116,101, 84,114, 97, 99,101,114,115, 0,103,101,110,101, +114, 97,116,101, 80, 97,114,116,105, 99,108,101,115, 0,115,117,114,102, 97, 99,101, 83,109,111,111,116,104,105,110,103, 0,115, +117,114,102, 97, 99,101, 83,117, 98,100,105,118,115, 0,112, 97,114,116,105, 99,108,101, 73,110,102, 83,105,122,101, 0,112, 97, +114,116,105, 99,108,101, 73,110,102, 65,108,112,104, 97, 0,102, 97,114, 70,105,101,108,100, 83,105,122,101, 0, 42,109,101,115, +104, 86,101,108,111, 99,105,116,105,101,115, 0, 99,112,115, 84,105,109,101, 83,116, 97,114,116, 0, 99,112,115, 84,105,109,101, + 69,110,100, 0, 99,112,115, 81,117, 97,108,105,116,121, 0, 97,116,116,114, 97, 99,116,102,111,114, 99,101, 83,116,114,101,110, +103,116,104, 0, 97,116,116,114, 97, 99,116,102,111,114, 99,101, 82, 97,100,105,117,115, 0,118,101,108,111, 99,105,116,121,102, +111,114, 99,101, 83,116,114,101,110,103,116,104, 0,118,101,108,111, 99,105,116,121,102,111,114, 99,101, 82, 97,100,105,117,115, + 0,108, 97,115,116,103,111,111,100,102,114, 97,109,101, 0, 97,110,105,109, 82, 97,116,101, 0,109,105,115,116,121,112,101, 0, +104,111,114,114, 0,104,111,114,103, 0,104,111,114, 98, 0,122,101,110,114, 0,122,101,110,103, 0,122,101,110, 98, 0,102, 97, +115,116, 99,111,108, 0,101,120,112,111,115,117,114,101, 0,101,120,112, 0,114, 97,110,103,101, 0,108,105,110,102, 97, 99, 0, +108,111,103,102, 97, 99, 0,103,114, 97,118,105,116,121, 0, 97, 99,116,105,118,105,116,121, 66,111,120, 82, 97,100,105,117,115, + 0,115,107,121,116,121,112,101, 0,111, 99, 99,108,117,115,105,111,110, 82,101,115, 0,112,104,121,115,105, 99,115, 69,110,103, +105,110,101, 0,116,105, 99,114, 97,116,101, 0,109, 97,120,108,111,103,105, 99,115,116,101,112, 0,112,104,121,115,117, 98,115, +116,101,112, 0,109, 97,120,112,104,121,115,116,101,112, 0,109,105,115,105, 0,109,105,115,116,115,116, 97, 0,109,105,115,116, +100,105,115,116, 0,109,105,115,116,104,105, 0,115,116, 97,114,114, 0,115,116, 97,114,103, 0,115,116, 97,114, 98, 0,115,116, + 97,114,107, 0,115,116, 97,114,115,105,122,101, 0,115,116, 97,114,109,105,110,100,105,115,116, 0,115,116, 97,114,100,105,115, +116, 0,115,116, 97,114, 99,111,108,110,111,105,115,101, 0,100,111,102,115,116, 97, 0,100,111,102,101,110,100, 0,100,111,102, +109,105,110, 0,100,111,102,109, 97,120, 0, 97,111,100,105,115,116, 0, 97,111,100,105,115,116,102, 97, 99, 0, 97,111,101,110, +101,114,103,121, 0, 97,111, 98,105, 97,115, 0, 97,111,109,111,100,101, 0, 97,111,115, 97,109,112, 0, 97,111,109,105,120, 0, + 97,111, 99,111,108,111,114, 0, 97,111, 95, 97,100, 97,112,116, 95,116,104,114,101,115,104, 0, 97,111, 95, 97,100, 97,112,116, + 95,115,112,101,101,100, 95,102, 97, 99, 0, 97,111, 95, 97,112,112,114,111,120, 95,101,114,114,111,114, 0, 97,111, 95, 97,112, +112,114,111,120, 95, 99,111,114,114,101, 99,116,105,111,110, 0, 97,111, 95,105,110,100,105,114,101, 99,116, 95,101,110,101,114, +103,121, 0, 97,111, 95,101,110,118, 95,101,110,101,114,103,121, 0, 97,111, 95,112, 97,100, 50, 0, 97,111, 95,105,110,100,105, +114,101, 99,116, 95, 98,111,117,110, 99,101,115, 0, 97,111, 95,112, 97,100, 0, 97,111, 95,115, 97,109,112, 95,109,101,116,104, +111,100, 0, 97,111, 95,103, 97,116,104,101,114, 95,109,101,116,104,111,100, 0, 97,111, 95, 97,112,112,114,111,120, 95,112, 97, +115,115,101,115, 0, 42, 97,111,115,112,104,101,114,101, 0, 42, 97,111,116, 97, 98,108,101,115, 0,115,101,108, 99,111,108, 0, +115,120, 0,115,121, 0, 42,108,112, 70,111,114,109, 97,116, 0, 42,108,112, 80, 97,114,109,115, 0, 99, 98, 70,111,114,109, 97, +116, 0, 99, 98, 80, 97,114,109,115, 0,102, 99, 99, 84,121,112,101, 0,102, 99, 99, 72, 97,110,100,108,101,114, 0,100,119, 75, +101,121, 70,114, 97,109,101, 69,118,101,114,121, 0,100,119, 81,117, 97,108,105,116,121, 0,100,119, 66,121,116,101,115, 80,101, +114, 83,101, 99,111,110,100, 0,100,119, 70,108, 97,103,115, 0,100,119, 73,110,116,101,114,108,101, 97,118,101, 69,118,101,114, +121, 0, 97,118,105, 99,111,100,101, 99,110, 97,109,101, 91, 49, 50, 56, 93, 0, 42, 99,100, 80, 97,114,109,115, 0, 42,112, 97, +100, 0, 99,100, 83,105,122,101, 0,113,116, 99,111,100,101, 99,110, 97,109,101, 91, 49, 50, 56, 93, 0, 99,111,100,101, 99, 84, +121,112,101, 0, 99,111,100,101, 99, 83,112, 97,116,105, 97,108, 81,117, 97,108,105,116,121, 0, 99,111,100,101, 99, 0, 99,111, +100,101, 99, 70,108, 97,103,115, 0, 99,111,108,111,114, 68,101,112,116,104, 0, 99,111,100,101, 99, 84,101,109,112,111,114, 97, +108, 81,117, 97,108,105,116,121, 0,109,105,110, 83,112, 97,116,105, 97,108, 81,117, 97,108,105,116,121, 0,109,105,110, 84,101, +109,112,111,114, 97,108, 81,117, 97,108,105,116,121, 0,107,101,121, 70,114, 97,109,101, 82, 97,116,101, 0, 98,105,116, 82, 97, +116,101, 0, 97,117,100,105,111, 99,111,100,101, 99, 84,121,112,101, 0, 97,117,100,105,111, 83, 97,109,112,108,101, 82, 97,116, +101, 0, 97,117,100,105,111, 66,105,116, 68,101,112,116,104, 0, 97,117,100,105,111, 67,104, 97,110,110,101,108,115, 0, 97,117, +100,105,111, 67,111,100,101, 99, 70,108, 97,103,115, 0, 97,117,100,105,111, 66,105,116, 82, 97,116,101, 0, 97,117,100,105,111, + 95, 99,111,100,101, 99, 0,118,105,100,101,111, 95, 98,105,116,114, 97,116,101, 0, 97,117,100,105,111, 95, 98,105,116,114, 97, +116,101, 0, 97,117,100,105,111, 95,109,105,120,114, 97,116,101, 0, 97,117,100,105,111, 95, 99,104, 97,110,110,101,108,115, 0, + 97,117,100,105,111, 95,112, 97,100, 0, 97,117,100,105,111, 95,118,111,108,117,109,101, 0,103,111,112, 95,115,105,122,101, 0, +114, 99, 95,109,105,110, 95,114, 97,116,101, 0,114, 99, 95,109, 97,120, 95,114, 97,116,101, 0,114, 99, 95, 98,117,102,102,101, +114, 95,115,105,122,101, 0,109,117,120, 95,112, 97, 99,107,101,116, 95,115,105,122,101, 0,109,117,120, 95,114, 97,116,101, 0, +109,105,120,114, 97,116,101, 0,109, 97,105,110, 0,115,112,101,101,100, 95,111,102, 95,115,111,117,110,100, 0,100,111,112,112, +108,101,114, 95,102, 97, 99,116,111,114, 0,100,105,115,116, 97,110, 99,101, 95,109,111,100,101,108, 0, 42,109, 97,116, 95,111, +118,101,114,114,105,100,101, 0, 42,108,105,103,104,116, 95,111,118,101,114,114,105,100,101, 0,108, 97,121, 95,122,109, 97,115, +107, 0,108, 97,121,102,108, 97,103, 0,112, 97,115,115,102,108, 97,103, 0,112, 97,115,115, 95,120,111,114, 0,105,109,116,121, +112,101, 0,112,108, 97,110,101,115, 0,113,117, 97,108,105,116,121, 0, 99,111,109,112,114,101,115,115, 0,101,120,114, 95, 99, +111,100,101, 99, 0, 99,105,110,101,111,110, 95,102,108, 97,103, 0, 99,105,110,101,111,110, 95,119,104,105,116,101, 0, 99,105, +110,101,111,110, 95, 98,108, 97, 99,107, 0, 99,105,110,101,111,110, 95,103, 97,109,109, 97, 0,106,112, 50, 95,102,108, 97,103, + 0,105,109, 95,102,111,114,109, 97,116, 0, 42, 97,118,105, 99,111,100,101, 99,100, 97,116, 97, 0, 42,113,116, 99,111,100,101, + 99,100, 97,116, 97, 0,113,116, 99,111,100,101, 99,115,101,116,116,105,110,103,115, 0,102,102, 99,111,100,101, 99,100, 97,116, + 97, 0,115,117, 98,102,114, 97,109,101, 0,112,115,102,114, 97, 0,112,101,102,114, 97, 0,105,109, 97,103,101,115, 0,102,114, + 97,109, 97,112,116,111, 0,116,104,114,101, 97,100,115, 0,102,114, 97,109,101,108,101,110, 0, 98,108,117,114,102, 97, 99, 0, +101,100,103,101, 82, 0,101,100,103,101, 71, 0,101,100,103,101, 66, 0,102,117,108,108,115, 99,114,101,101,110, 0,120,112,108, + 97,121, 0,121,112,108, 97,121, 0,102,114,101,113,112,108, 97,121, 0, 97,116,116,114,105, 98, 0,102,114, 97,109,101, 95,115, +116,101,112, 0,115,116,101,114,101,111,109,111,100,101, 0,100,105,109,101,110,115,105,111,110,115,112,114,101,115,101,116, 0, +109, 97,120,105,109,115,105,122,101, 0,120,115, 99,104, 0,121,115, 99,104, 0,120,112, 97,114,116,115, 0,121,112, 97,114,116, +115, 0,115,117, 98,105,109,116,121,112,101, 0,100,105,115,112,108, 97,121,109,111,100,101, 0,115, 99,101,109,111,100,101, 0, +114, 97,121,116,114, 97, 99,101, 95,111,112,116,105,111,110,115, 0,114, 97,121,116,114, 97, 99,101, 95,115,116,114,117, 99,116, +117,114,101, 0,111, 99,114,101,115, 0,112, 97,100, 52, 0, 97,108,112,104, 97,109,111,100,101, 0,111,115, 97, 0,102,114,115, + 95,115,101, 99, 0,101,100,103,101,105,110,116, 0,115, 97,102,101,116,121, 0, 98,111,114,100,101,114, 0,100,105,115,112,114, +101, 99,116, 0,108, 97,121,101,114,115, 0, 97, 99,116,108, 97,121, 0,109, 98,108,117,114, 95,115, 97,109,112,108,101,115, 0, +120, 97,115,112, 0,121, 97,115,112, 0,102,114,115, 95,115,101, 99, 95, 98, 97,115,101, 0,103, 97,117,115,115, 0, 99,111,108, +111,114, 95,109,103,116, 95,102,108, 97,103, 0,112,111,115,116,103, 97,109,109, 97, 0,112,111,115,116,104,117,101, 0,112,111, +115,116,115, 97,116, 0,100,105,116,104,101,114, 95,105,110,116,101,110,115,105,116,121, 0, 98, 97,107,101, 95,111,115, 97, 0, + 98, 97,107,101, 95,102,105,108,116,101,114, 0, 98, 97,107,101, 95,109,111,100,101, 0, 98, 97,107,101, 95,102,108, 97,103, 0, + 98, 97,107,101, 95,110,111,114,109, 97,108, 95,115,112, 97, 99,101, 0, 98, 97,107,101, 95,113,117, 97,100, 95,115,112,108,105, +116, 0, 98, 97,107,101, 95,109, 97,120,100,105,115,116, 0, 98, 97,107,101, 95, 98,105, 97,115,100,105,115,116, 0, 98, 97,107, +101, 95,112, 97,100, 0,112,105, 99, 91, 49, 48, 50, 52, 93, 0,115,116, 97,109,112, 0,115,116, 97,109,112, 95,102,111,110,116, + 95,105,100, 0,115,116, 97,109,112, 95,117,100, 97,116, 97, 91, 55, 54, 56, 93, 0,102,103, 95,115,116, 97,109,112, 91, 52, 93, + 0, 98,103, 95,115,116, 97,109,112, 91, 52, 93, 0,115,101,113, 95,112,114,101,118, 95,116,121,112,101, 0,115,101,113, 95,114, +101,110,100, 95,116,121,112,101, 0,115,101,113, 95,102,108, 97,103, 0,112, 97,100, 53, 91, 53, 93, 0,115,105,109,112,108,105, +102,121, 95,102,108, 97,103, 0,115,105,109,112,108,105,102,121, 95,115,117, 98,115,117,114,102, 0,115,105,109,112,108,105,102, +121, 95,115,104, 97,100,111,119,115, 97,109,112,108,101,115, 0,115,105,109,112,108,105,102,121, 95,112, 97,114,116,105, 99,108, +101,115, 0,115,105,109,112,108,105,102,121, 95, 97,111,115,115,115, 0, 99,105,110,101,111,110,119,104,105,116,101, 0, 99,105, +110,101,111,110, 98,108, 97, 99,107, 0, 99,105,110,101,111,110,103, 97,109,109, 97, 0,106,112, 50, 95,112,114,101,115,101,116, + 0,106,112, 50, 95,100,101,112,116,104, 0,114,112, 97,100, 51, 0,100,111,109,101,114,101,115, 0,100,111,109,101,109,111,100, +101, 0,100,111,109,101, 97,110,103,108,101, 0,100,111,109,101,116,105,108,116, 0,100,111,109,101,114,101,115, 98,117,102, 0, + 42,100,111,109,101,116,101,120,116, 0,101,110,103,105,110,101, 91, 51, 50, 93, 0,110, 97,109,101, 91, 51, 50, 93, 0,112, 97, +114,116,105, 99,108,101, 95,112,101,114, 99, 0,115,117, 98,115,117,114,102, 95,109, 97,120, 0,115,104, 97,100, 98,117,102,115, + 97,109,112,108,101, 95,109, 97,120, 0, 97,111, 95,101,114,114,111,114, 0,116,105,108,116, 0,114,101,115, 98,117,102, 0, 42, +119, 97,114,112,116,101,120,116, 0, 99,111,108, 91, 51, 93, 0, 99,101,108,108,115,105,122,101, 0, 99,101,108,108,104,101,105, +103,104,116, 0, 97,103,101,110,116,109, 97,120,115,108,111,112,101, 0, 97,103,101,110,116,109, 97,120, 99,108,105,109, 98, 0, + 97,103,101,110,116,104,101,105,103,104,116, 0, 97,103,101,110,116,114, 97,100,105,117,115, 0,101,100,103,101,109, 97,120,108, +101,110, 0,101,100,103,101,109, 97,120,101,114,114,111,114, 0,114,101,103,105,111,110,109,105,110,115,105,122,101, 0,114,101, +103,105,111,110,109,101,114,103,101,115,105,122,101, 0,118,101,114,116,115,112,101,114,112,111,108,121, 0,100,101,116, 97,105, +108,115, 97,109,112,108,101,100,105,115,116, 0,100,101,116, 97,105,108,115, 97,109,112,108,101,109, 97,120,101,114,114,111,114, + 0,102,114, 97,109,105,110,103, 0,112,108, 97,121,101,114,102,108, 97,103, 0,114,116, 49, 0,114,116, 50, 0, 97, 97,115, 97, +109,112,108,101,115, 0,112, 97,100, 52, 91, 51, 93, 0,100,111,109,101, 0,115,116,101,114,101,111,102,108, 97,103, 0,101,121, +101,115,101,112, 97,114, 97,116,105,111,110, 0,114,101, 99, 97,115,116, 68, 97,116, 97, 0,109, 97,116,109,111,100,101, 0,101, +120,105,116,107,101,121, 0,111, 98,115,116, 97, 99,108,101, 83,105,109,117,108, 97,116,105,111,110, 0,108,101,118,101,108, 72, +101,105,103,104,116, 0, 42, 99, 97,109,101,114, 97, 0, 42,112, 97,105,110,116, 95, 99,117,114,115,111,114, 0,112, 97,105,110, +116, 95, 99,117,114,115,111,114, 95, 99,111,108, 91, 52, 93, 0,112, 97,105,110,116, 0,115,101, 97,109, 95, 98,108,101,101,100, + 0,110,111,114,109, 97,108, 95, 97,110,103,108,101, 0,115, 99,114,101,101,110, 95,103,114, 97, 98, 95,115,105,122,101, 91, 50, + 93, 0, 42,112, 97,105,110,116, 99,117,114,115,111,114, 0,105,110,118,101,114,116, 0,116,111,116,114,101,107,101,121, 0,116, +111,116, 97,100,100,107,101,121, 0, 98,114,117,115,104,116,121,112,101, 0, 98,114,117,115,104, 91, 55, 93, 0,101,109,105,116, +116,101,114,100,105,115,116, 0,115,101,108,101, 99,116,109,111,100,101, 0,101,100,105,116,116,121,112,101, 0,100,114, 97,119, + 95,115,116,101,112, 0,102, 97,100,101, 95,102,114, 97,109,101,115, 0,114, 97,100,105, 97,108, 95,115,121,109,109, 91, 51, 93, + 0,108, 97,115,116, 95,120, 0,108, 97,115,116, 95,121, 0,108, 97,115,116, 95, 97,110,103,108,101, 0,100,114, 97,119, 95, 97, +110, 99,104,111,114,101,100, 0, 97,110, 99,104,111,114,101,100, 95,115,105,122,101, 0, 97,110, 99,104,111,114,101,100, 95,108, +111, 99, 97,116,105,111,110, 91, 51, 93, 0, 97,110, 99,104,111,114,101,100, 95,105,110,105,116,105, 97,108, 95,109,111,117,115, +101, 91, 50, 93, 0,100,114, 97,119, 95,112,114,101,115,115,117,114,101, 0,112,114,101,115,115,117,114,101, 95,118, 97,108,117, +101, 0,115,112,101, 99,105, 97,108, 95,114,111,116, 97,116,105,111,110, 0, 42,118,112, 97,105,110,116, 95,112,114,101,118, 0, + 42,119,112, 97,105,110,116, 95,112,114,101,118, 0,109, 97,116, 91, 51, 93, 91, 51, 93, 0,117,110,112,114,111,106,101, 99,116, +101,100, 95,114, 97,100,105,117,115, 0, 42,118,112, 97,105,110,116, 0, 42,119,112, 97,105,110,116, 0, 42,117,118,115, 99,117, +108,112,116, 0,118,103,114,111,117,112, 95,119,101,105,103,104,116, 0, 99,111,114,110,101,114,116,121,112,101, 0,101,100,105, +116, 98,117,116,102,108, 97,103, 0,106,111,105,110,116,114,105,108,105,109,105,116, 0,100,101,103,114, 0,116,117,114,110, 0, +101,120,116,114, 95,111,102,102,115, 0,100,111,117, 98,108,105,109,105,116, 0,110,111,114,109, 97,108,115,105,122,101, 0, 97, +117,116,111,109,101,114,103,101, 0,115,101,103,109,101,110,116,115, 0,114,105,110,103,115, 0,118,101,114,116,105, 99,101,115, + 0,117,110,119,114, 97,112,112,101,114, 0,117,118, 99, 97,108, 99, 95,114, 97,100,105,117,115, 0,117,118, 99, 97,108, 99, 95, + 99,117, 98,101,115,105,122,101, 0,117,118, 99, 97,108, 99, 95,109, 97,114,103,105,110, 0,117,118, 99, 97,108, 99, 95,109, 97, +112,100,105,114, 0,117,118, 99, 97,108, 99, 95,109, 97,112, 97,108,105,103,110, 0,117,118, 99, 97,108, 99, 95,102,108, 97,103, + 0,117,118, 95,102,108, 97,103, 0,117,118, 95,115,101,108,101, 99,116,109,111,100,101, 0,117,118, 95,115,117, 98,115,117,114, +102, 95,108,101,118,101,108, 0,103,112,101,110, 99,105,108, 95,102,108, 97,103,115, 0, 97,117,116,111,105,107, 95, 99,104, 97, +105,110,108,101,110, 0,105,109, 97,112, 97,105,110,116, 0,112, 97,114,116,105, 99,108,101, 0,112,114,111,112,111,114,116,105, +111,110, 97,108, 95,115,105,122,101, 0,115,101,108,101, 99,116, 95,116,104,114,101,115,104, 0, 99,108,101, 97,110, 95,116,104, +114,101,115,104, 0, 97,117,116,111,107,101,121, 95,109,111,100,101, 0, 97,117,116,111,107,101,121, 95,102,108, 97,103, 0,109, +117,108,116,105,114,101,115, 95,115,117, 98,100,105,118, 95,116,121,112,101, 0,112, 97,100, 50, 91, 53, 93, 0,115,107,103,101, +110, 95,114,101,115,111,108,117,116,105,111,110, 0,115,107,103,101,110, 95,116,104,114,101,115,104,111,108,100, 95,105,110,116, +101,114,110, 97,108, 0,115,107,103,101,110, 95,116,104,114,101,115,104,111,108,100, 95,101,120,116,101,114,110, 97,108, 0,115, +107,103,101,110, 95,108,101,110,103,116,104, 95,114, 97,116,105,111, 0,115,107,103,101,110, 95,108,101,110,103,116,104, 95,108, +105,109,105,116, 0,115,107,103,101,110, 95, 97,110,103,108,101, 95,108,105,109,105,116, 0,115,107,103,101,110, 95, 99,111,114, +114,101,108, 97,116,105,111,110, 95,108,105,109,105,116, 0,115,107,103,101,110, 95,115,121,109,109,101,116,114,121, 95,108,105, +109,105,116, 0,115,107,103,101,110, 95,114,101,116, 97,114,103,101,116, 95, 97,110,103,108,101, 95,119,101,105,103,104,116, 0, +115,107,103,101,110, 95,114,101,116, 97,114,103,101,116, 95,108,101,110,103,116,104, 95,119,101,105,103,104,116, 0,115,107,103, +101,110, 95,114,101,116, 97,114,103,101,116, 95,100,105,115,116, 97,110, 99,101, 95,119,101,105,103,104,116, 0,115,107,103,101, +110, 95,111,112,116,105,111,110,115, 0,115,107,103,101,110, 95,112,111,115,116,112,114,111, 0,115,107,103,101,110, 95,112,111, +115,116,112,114,111, 95,112, 97,115,115,101,115, 0,115,107,103,101,110, 95,115,117, 98,100,105,118,105,115,105,111,110,115, 91, + 51, 93, 0,115,107,103,101,110, 95,109,117,108,116,105, 95,108,101,118,101,108, 0, 42,115,107,103,101,110, 95,116,101,109,112, +108, 97,116,101, 0, 98,111,110,101, 95,115,107,101,116, 99,104,105,110,103, 0, 98,111,110,101, 95,115,107,101,116, 99,104,105, +110,103, 95, 99,111,110,118,101,114,116, 0,115,107,103,101,110, 95,115,117, 98,100,105,118,105,115,105,111,110, 95,110,117,109, + 98,101,114, 0,115,107,103,101,110, 95,114,101,116, 97,114,103,101,116, 95,111,112,116,105,111,110,115, 0,115,107,103,101,110, + 95,114,101,116, 97,114,103,101,116, 95,114,111,108,108, 0,115,107,103,101,110, 95,115,105,100,101, 95,115,116,114,105,110,103, + 91, 56, 93, 0,115,107,103,101,110, 95,110,117,109, 95,115,116,114,105,110,103, 91, 56, 93, 0,101,100,103,101, 95,109,111,100, +101, 0,101,100,103,101, 95,109,111,100,101, 95,108,105,118,101, 95,117,110,119,114, 97,112, 0,115,110, 97,112, 95,109,111,100, +101, 0,115,110, 97,112, 95,102,108, 97,103, 0,115,110, 97,112, 95,116, 97,114,103,101,116, 0,112,114,111,112,111,114,116,105, +111,110, 97,108, 0,112,114,111,112, 95,109,111,100,101, 0,112,114,111,112,111,114,116,105,111,110, 97,108, 95,111, 98,106,101, + 99,116,115, 0,112, 97,100, 91, 53, 93, 0, 97,117,116,111, 95,110,111,114,109, 97,108,105,122,101, 0,109,117,108,116,105,112, + 97,105,110,116, 0,117,115,101, 95,117,118, 95,115, 99,117,108,112,116, 0,117,118, 95,115, 99,117,108,112,116, 95,115,101,116, +116,105,110,103,115, 0,117,118, 95,115, 99,117,108,112,116, 95,116,111,111,108, 0,117,118, 95,114,101,108, 97,120, 95,109,101, +116,104,111,100, 0,115, 99,117,108,112,116, 95,112, 97,105,110,116, 95,115,101,116,116,105,110,103,115, 0,115, 99,117,108,112, +116, 95,112, 97,105,110,116, 95,117,110,105,102,105,101,100, 95,115,105,122,101, 0,115, 99,117,108,112,116, 95,112, 97,105,110, +116, 95,117,110,105,102,105,101,100, 95,117,110,112,114,111,106,101, 99,116,101,100, 95,114, 97,100,105,117,115, 0,115, 99,117, +108,112,116, 95,112, 97,105,110,116, 95,117,110,105,102,105,101,100, 95, 97,108,112,104, 97, 0,117,110,105,102,105,101,100, 95, +112, 97,105,110,116, 95,115,101,116,116,105,110,103,115, 0,116,111,116,111, 98,106, 0,116,111,116,108, 97,109,112, 0,116,111, +116,111, 98,106,115,101,108, 0,116,111,116, 99,117,114,118,101, 0,116,111,116,109,101,115,104, 0,116,111,116, 97,114,109, 97, +116,117,114,101, 0,115, 99, 97,108,101, 95,108,101,110,103,116,104, 0,115,121,115,116,101,109, 0,115,121,115,116,101,109, 95, +114,111,116, 97,116,105,111,110, 0,103,114, 97,118,105,116,121, 91, 51, 93, 0,113,117,105, 99,107, 95, 99, 97, 99,104,101, 95, +115,116,101,112, 0, 42,119,111,114,108,100, 0, 42,115,101,116, 0, 98, 97,115,101, 0, 42, 98, 97,115, 97, 99,116, 0, 42,111, + 98,101,100,105,116, 0, 99,117,114,115,111,114, 91, 51, 93, 0,116,119, 99,101,110,116, 91, 51, 93, 0,116,119,109,105,110, 91, + 51, 93, 0,116,119,109, 97,120, 91, 51, 93, 0,108, 97,121, 97, 99,116, 0,108, 97,121, 95,117,112,100, 97,116,101,100, 0, 42, +101,100, 0, 42,116,111,111,108,115,101,116,116,105,110,103,115, 0, 42,115,116, 97,116,115, 0, 97,117,100,105,111, 0,116,114, + 97,110,115,102,111,114,109, 95,115,112, 97, 99,101,115, 0, 42,115,111,117,110,100, 95,115, 99,101,110,101, 0, 42,115,111,117, +110,100, 95,115, 99,101,110,101, 95,104, 97,110,100,108,101, 0, 42,115,111,117,110,100, 95,115, 99,114,117, 98, 95,104, 97,110, +100,108,101, 0, 42,115,112,101, 97,107,101,114, 95,104, 97,110,100,108,101,115, 0, 42,102,112,115, 95,105,110,102,111, 0, 42, +116,104,101, 68, 97,103, 0,100, 97,103,105,115,118, 97,108,105,100, 0,100, 97,103,102,108, 97,103,115, 0, 97, 99,116,105,118, +101, 95,107,101,121,105,110,103,115,101,116, 0,107,101,121,105,110,103,115,101,116,115, 0,103,109, 0,117,110,105,116, 0,112, +104,121,115,105, 99,115, 95,115,101,116,116,105,110,103,115, 0, 42, 99,108,105,112, 0, 99,117,115,116,111,109,100, 97,116, 97, + 95,109, 97,115,107, 95,109,111,100, 97,108, 0, 99,117,115,101,114, 0, 98,108,101,110,100, 0,118,105,101,119, 0,119,105,110, +109, 97,116, 91, 52, 93, 91, 52, 93, 0,118,105,101,119,109, 97,116, 91, 52, 93, 91, 52, 93, 0,118,105,101,119,105,110,118, 91, + 52, 93, 91, 52, 93, 0,112,101,114,115,109, 97,116, 91, 52, 93, 91, 52, 93, 0,112,101,114,115,105,110,118, 91, 52, 93, 91, 52, + 93, 0,118,105,101,119,109, 97,116,111, 98, 91, 52, 93, 91, 52, 93, 0,112,101,114,115,109, 97,116,111, 98, 91, 52, 93, 91, 52, + 93, 0, 99,108,105,112, 91, 54, 93, 91, 52, 93, 0, 99,108,105,112, 95,108,111, 99, 97,108, 91, 54, 93, 91, 52, 93, 0, 42, 99, +108,105,112, 98, 98, 0, 42,108,111, 99, 97,108,118,100, 0, 42,114,105, 0, 42,114,101,110,100,101,114, 95,101,110,103,105,110, +101, 0, 42,100,101,112,116,104,115, 0, 42,115,109,115, 0, 42,115,109,111,111,116,104, 95,116,105,109,101,114, 0,116,119,109, + 97,116, 91, 52, 93, 91, 52, 93, 0,118,105,101,119,113,117, 97,116, 91, 52, 93, 0,122,102, 97, 99, 0, 99, 97,109,100,120, 0, + 99, 97,109,100,121, 0,112,105,120,115,105,122,101, 0, 99, 97,109,122,111,111,109, 0,105,115, 95,112,101,114,115,112, 0,112, +101,114,115,112, 0,118,105,101,119,108,111, 99,107, 0,116,119,100,114, 97,119,102,108, 97,103, 0,114,102,108, 97,103, 0,108, +118,105,101,119,113,117, 97,116, 91, 52, 93, 0,108,112,101,114,115,112, 0,108,118,105,101,119, 0,103,114,105,100,118,105,101, +119, 0,116,119, 97,110,103,108,101, 91, 51, 93, 0,114,111,116, 95, 97,110,103,108,101, 0,114,111,116, 95, 97,120,105,115, 91, + 51, 93, 0,114,101,103,105,111,110, 98, 97,115,101, 0,115,112, 97, 99,101,116,121,112,101, 0, 98,108,111, 99,107,115, 99, 97, +108,101, 0, 98,108,111, 99,107,104, 97,110,100,108,101,114, 91, 56, 93, 0, 98,117,110,100,108,101, 95,115,105,122,101, 0, 98, +117,110,100,108,101, 95,100,114, 97,119,116,121,112,101, 0,108, 97,121, 95,117,115,101,100, 0, 42,111, 98, 95, 99,101,110,116, +114,101, 0, 98,103,112,105, 99, 98, 97,115,101, 0, 42, 98,103,112,105, 99, 0,111, 98, 95, 99,101,110,116,114,101, 95, 98,111, +110,101, 91, 54, 52, 93, 0,100,114, 97,119,116,121,112,101, 0,111, 98, 95, 99,101,110,116,114,101, 95, 99,117,114,115,111,114, + 0,115, 99,101,110,101,108,111, 99,107, 0, 97,114,111,117,110,100, 0,103,114,105,100, 0,110,101, 97,114, 0,102, 97,114, 0, +109,111,100,101,115,101,108,101, 99,116, 0,103,114,105,100,108,105,110,101,115, 0,103,114,105,100,115,117, 98,100,105,118, 0, +103,114,105,100,102,108, 97,103, 0,116,119,116,121,112,101, 0,116,119,109,111,100,101, 0,116,119,102,108, 97,103, 0,112, 97, +100, 50, 91, 50, 93, 0, 97,102,116,101,114,100,114, 97,119, 95,116,114, 97,110,115,112, 0, 97,102,116,101,114,100,114, 97,119, + 95,120,114, 97,121, 0, 97,102,116,101,114,100,114, 97,119, 95,120,114, 97,121,116,114, 97,110,115,112, 0,122, 98,117,102, 0, +120,114, 97,121, 0,112, 97,100, 51, 91, 50, 93, 0, 42,112,114,111,112,101,114,116,105,101,115, 95,115,116,111,114, 97,103,101, + 0,118,101,114,116, 0,104,111,114, 0,109, 97,115,107, 0,109,105,110, 91, 50, 93, 0,109, 97,120, 91, 50, 93, 0,109,105,110, +122,111,111,109, 0,109, 97,120,122,111,111,109, 0,115, 99,114,111,108,108, 0,115, 99,114,111,108,108, 95,117,105, 0,107,101, +101,112,116,111,116, 0,107,101,101,112,122,111,111,109, 0,107,101,101,112,111,102,115, 0, 97,108,105,103,110, 0,119,105,110, +120, 0,119,105,110,121, 0,111,108,100,119,105,110,120, 0,111,108,100,119,105,110,121, 0, 42,116, 97, 98, 95,111,102,102,115, +101,116, 0,116, 97, 98, 95,110,117,109, 0,116, 97, 98, 95, 99,117,114, 0,114,112,116, 95,109, 97,115,107, 0,118, 50,100, 0, + 42, 97,100,115, 0,103,104,111,115,116, 67,117,114,118,101,115, 0, 97,117,116,111,115,110, 97,112, 0, 99,117,114,115,111,114, + 86, 97,108, 0,109, 97,105,110, 98, 0,109, 97,105,110, 98,111, 0,109, 97,105,110, 98,117,115,101,114, 0,114,101, 95, 97,108, +105,103,110, 0,112,114,101,118,105,101,119, 0,116,101,120,116,117,114,101, 95, 99,111,110,116,101,120,116, 0,112, 97,116,104, +102,108, 97,103, 0,100, 97,116, 97,105, 99,111,110, 0, 42,112,105,110,105,100, 0, 42,116,101,120,117,115,101,114, 0,114,101, +110,100,101,114, 95,115,105,122,101, 0, 99,104, 97,110,115,104,111,119,110, 0,122,101, 98,114, 97, 0,122,111,111,109, 0,116, +105,116,108,101, 91, 51, 50, 93, 0,100,105,114, 91, 49, 48, 53, 54, 93, 0,102,105,108,101, 91, 50, 53, 54, 93, 0,114,101,110, + 97,109,101,102,105,108,101, 91, 50, 53, 54, 93, 0,114,101,110, 97,109,101,101,100,105,116, 91, 50, 53, 54, 93, 0,102,105,108, +116,101,114, 95,103,108,111, 98, 91, 54, 52, 93, 0, 97, 99,116,105,118,101, 95,102,105,108,101, 0,115,101,108, 95,102,105,114, +115,116, 0,115,101,108, 95,108, 97,115,116, 0,115,111,114,116, 0,100,105,115,112,108, 97,121, 0,102, 95,102,112, 0,102,112, + 95,115,116,114, 91, 56, 93, 0,115, 99,114,111,108,108, 95,111,102,102,115,101,116, 0, 42,112, 97,114, 97,109,115, 0, 42,102, +105,108,101,115, 0, 42,102,111,108,100,101,114,115, 95,112,114,101,118, 0, 42,102,111,108,100,101,114,115, 95,110,101,120,116, + 0, 42,111,112, 0, 42,115,109,111,111,116,104,115, 99,114,111,108,108, 95,116,105,109,101,114, 0, 42,108, 97,121,111,117,116, + 0,114,101, 99,101,110,116,110,114, 0, 98,111,111,107,109, 97,114,107,110,114, 0,115,121,115,116,101,109,110,114, 0,116,114, +101,101, 0, 42,116,114,101,101,115,116,111,114,101, 0,115,101, 97,114, 99,104, 95,115,116,114,105,110,103, 91, 51, 50, 93, 0, +115,101, 97,114, 99,104, 95,116,115,101, 0,111,117,116,108,105,110,101,118,105,115, 0,115,116,111,114,101,102,108, 97,103, 0, +115,101, 97,114, 99,104, 95,102,108, 97,103,115, 0, 42, 99,117,109, 97,112, 0,115, 99,111,112,101,115, 0,115, 97,109,112,108, +101, 95,108,105,110,101, 95,104,105,115,116, 0, 99,117,114,115,111,114, 91, 50, 93, 0, 99,101,110,116,120, 0, 99,101,110,116, +121, 0, 99,117,114,116,105,108,101, 0,108,111, 99,107, 0,112,105,110, 0,100,116, 95,117,118, 0,115,116,105, 99,107,121, 0, +100,116, 95,117,118,115,116,114,101,116, 99,104, 0, 42,116,101,120,116, 0,116,111,112, 0,118,105,101,119,108,105,110,101,115, + 0,109,101,110,117,110,114, 0,108,104,101,105,103,104,116, 0, 99,119,105,100,116,104, 0,108,105,110,101,110,114,115, 95,116, +111,116, 0,108,101,102,116, 0,115,104,111,119,108,105,110,101,110,114,115, 0,116, 97, 98,110,117,109, 98,101,114, 0,115,104, +111,119,115,121,110,116, 97,120, 0,108,105,110,101, 95,104,108,105,103,104,116, 0,111,118,101,114,119,114,105,116,101, 0,108, +105,118,101, 95,101,100,105,116, 0,112,105,120, 95,112,101,114, 95,108,105,110,101, 0,116,120,116,115, 99,114,111,108,108, 0, +116,120,116, 98, 97,114, 0,119,111,114,100,119,114, 97,112, 0,100,111,112,108,117,103,105,110,115, 0,102,105,110,100,115,116, +114, 91, 50, 53, 54, 93, 0,114,101,112,108, 97, 99,101,115,116,114, 91, 50, 53, 54, 93, 0,109, 97,114,103,105,110, 95, 99,111, +108,117,109,110, 0, 42,100,114, 97,119, 99, 97, 99,104,101, 0, 42,112,121, 95,100,114, 97,119, 0, 42,112,121, 95,101,118,101, +110,116, 0, 42,112,121, 95, 98,117,116,116,111,110, 0, 42,112,121, 95, 98,114,111,119,115,101,114, 99, 97,108,108, 98, 97, 99, +107, 0, 42,112,121, 95,103,108,111, 98, 97,108,100,105, 99,116, 0,108, 97,115,116,115,112, 97, 99,101, 0,115, 99,114,105,112, +116,110, 97,109,101, 91, 49, 48, 50, 52, 93, 0,115, 99,114,105,112,116, 97,114,103, 91, 50, 53, 54, 93, 0, 42,115, 99,114,105, +112,116, 0, 42, 98,117,116, 95,114,101,102,115, 0, 42, 97,114,114, 97,121, 0, 99, 97, 99,104,101,115, 0, 99, 97, 99,104,101, + 95,100,105,115,112,108, 97,121, 0, 42,105,100, 0, 97,115,112,101, 99,116, 0,112, 97,100,102, 0,109,120, 0,109,121, 0, 42, +101,100,105,116,116,114,101,101, 0,116,114,101,101,116,121,112,101, 0,116,101,120,102,114,111,109, 0,115,104, 97,100,101,114, +102,114,111,109, 0,108,105,110,107,100,114, 97,103, 0,108,101,110, 95, 97,108,108,111, 99, 0, 99,117,114,115,111,114, 0,115, + 99,114,111,108,108, 98, 97, 99,107, 0,104,105,115,116,111,114,121, 0,112,114,111,109,112,116, 91, 50, 53, 54, 93, 0,108, 97, +110,103,117, 97,103,101, 91, 51, 50, 93, 0,115,101,108, 95,115,116, 97,114,116, 0,115,101,108, 95,101,110,100, 0,102,105,108, +116,101,114, 91, 54, 52, 93, 0,120,108,111, 99,107,111,102, 0,121,108,111, 99,107,111,102, 0,117,115,101,114, 0,112, 97,116, +104, 95,108,101,110,103,116,104, 0,108,111, 99, 91, 50, 93, 0,115,116, 97, 98,109, 97,116, 91, 52, 93, 91, 52, 93, 0,117,110, +105,115,116, 97, 98,109, 97,116, 91, 52, 93, 91, 52, 93, 0,112,111,115,116,112,114,111, 99, 95,102,108, 97,103, 0,114,117,110, +116,105,109,101, 95,102,108, 97,103, 0,102,105,108,101,110, 97,109,101, 91, 49, 48, 50, 52, 93, 0, 98,108,102, 95,105,100, 0, +117,105,102,111,110,116, 95,105,100, 0,114, 95,116,111, 95,108, 0,112,111,105,110,116,115, 0,107,101,114,110,105,110,103, 0, +105,116, 97,108,105, 99, 0, 98,111,108,100, 0,115,104, 97,100,111,119, 0,115,104, 97,100,120, 0,115,104, 97,100,121, 0,115, +104, 97,100,111,119, 97,108,112,104, 97, 0,115,104, 97,100,111,119, 99,111,108,111,114, 0,112, 97,110,101,108,116,105,116,108, +101, 0,103,114,111,117,112,108, 97, 98,101,108, 0,119,105,100,103,101,116,108, 97, 98,101,108, 0,119,105,100,103,101,116, 0, +112, 97,110,101,108,122,111,111,109, 0,109,105,110,108, 97, 98,101,108, 99,104, 97,114,115, 0,109,105,110,119,105,100,103,101, +116, 99,104, 97,114,115, 0, 99,111,108,117,109,110,115,112, 97, 99,101, 0,116,101,109,112,108, 97,116,101,115,112, 97, 99,101, + 0, 98,111,120,115,112, 97, 99,101, 0, 98,117,116,116,111,110,115,112, 97, 99,101,120, 0, 98,117,116,116,111,110,115,112, 97, + 99,101,121, 0,112, 97,110,101,108,115,112, 97, 99,101, 0,112, 97,110,101,108,111,117,116,101,114, 0,111,117,116,108,105,110, +101, 91, 52, 93, 0,105,110,110,101,114, 91, 52, 93, 0,105,110,110,101,114, 95,115,101,108, 91, 52, 93, 0,105,116,101,109, 91, + 52, 93, 0,116,101,120,116, 91, 52, 93, 0,116,101,120,116, 95,115,101,108, 91, 52, 93, 0,115,104, 97,100,101,100, 0,115,104, + 97,100,101,116,111,112, 0,115,104, 97,100,101,100,111,119,110, 0, 97,108,112,104, 97, 95, 99,104,101, 99,107, 0,105,110,110, +101,114, 95, 97,110,105,109, 91, 52, 93, 0,105,110,110,101,114, 95, 97,110,105,109, 95,115,101,108, 91, 52, 93, 0,105,110,110, +101,114, 95,107,101,121, 91, 52, 93, 0,105,110,110,101,114, 95,107,101,121, 95,115,101,108, 91, 52, 93, 0,105,110,110,101,114, + 95,100,114,105,118,101,110, 91, 52, 93, 0,105,110,110,101,114, 95,100,114,105,118,101,110, 95,115,101,108, 91, 52, 93, 0,104, +101, 97,100,101,114, 91, 52, 93, 0,115,104,111,119, 95,104,101, 97,100,101,114, 0,119, 99,111,108, 95,114,101,103,117,108, 97, +114, 0,119, 99,111,108, 95,116,111,111,108, 0,119, 99,111,108, 95,116,101,120,116, 0,119, 99,111,108, 95,114, 97,100,105,111, + 0,119, 99,111,108, 95,111,112,116,105,111,110, 0,119, 99,111,108, 95,116,111,103,103,108,101, 0,119, 99,111,108, 95,110,117, +109, 0,119, 99,111,108, 95,110,117,109,115,108,105,100,101,114, 0,119, 99,111,108, 95,109,101,110,117, 0,119, 99,111,108, 95, +112,117,108,108,100,111,119,110, 0,119, 99,111,108, 95,109,101,110,117, 95, 98, 97, 99,107, 0,119, 99,111,108, 95,109,101,110, +117, 95,105,116,101,109, 0,119, 99,111,108, 95,116,111,111,108,116,105,112, 0,119, 99,111,108, 95, 98,111,120, 0,119, 99,111, +108, 95,115, 99,114,111,108,108, 0,119, 99,111,108, 95,112,114,111,103,114,101,115,115, 0,119, 99,111,108, 95,108,105,115,116, + 95,105,116,101,109, 0,119, 99,111,108, 95,115,116, 97,116,101, 0,112, 97,110,101,108, 0,105, 99,111,110,102,105,108,101, 91, + 50, 53, 54, 93, 0,105, 99,111,110, 95, 97,108,112,104, 97, 0, 98, 97, 99,107, 91, 52, 93, 0,116,105,116,108,101, 91, 52, 93, + 0,116,101,120,116, 95,104,105, 91, 52, 93, 0,104,101, 97,100,101,114, 95,116,105,116,108,101, 91, 52, 93, 0,104,101, 97,100, +101,114, 95,116,101,120,116, 91, 52, 93, 0,104,101, 97,100,101,114, 95,116,101,120,116, 95,104,105, 91, 52, 93, 0, 98,117,116, +116,111,110, 91, 52, 93, 0, 98,117,116,116,111,110, 95,116,105,116,108,101, 91, 52, 93, 0, 98,117,116,116,111,110, 95,116,101, +120,116, 91, 52, 93, 0, 98,117,116,116,111,110, 95,116,101,120,116, 95,104,105, 91, 52, 93, 0,108,105,115,116, 91, 52, 93, 0, +108,105,115,116, 95,116,105,116,108,101, 91, 52, 93, 0,108,105,115,116, 95,116,101,120,116, 91, 52, 93, 0,108,105,115,116, 95, +116,101,120,116, 95,104,105, 91, 52, 93, 0,112, 97,110,101,108, 91, 52, 93, 0,112, 97,110,101,108, 95,116,105,116,108,101, 91, + 52, 93, 0,112, 97,110,101,108, 95,116,101,120,116, 91, 52, 93, 0,112, 97,110,101,108, 95,116,101,120,116, 95,104,105, 91, 52, + 93, 0,115,104, 97,100,101, 49, 91, 52, 93, 0,115,104, 97,100,101, 50, 91, 52, 93, 0,104,105,108,105,116,101, 91, 52, 93, 0, +103,114,105,100, 91, 52, 93, 0,119,105,114,101, 91, 52, 93, 0,115,101,108,101, 99,116, 91, 52, 93, 0,108, 97,109,112, 91, 52, + 93, 0,115,112,101, 97,107,101,114, 91, 52, 93, 0,101,109,112,116,121, 91, 52, 93, 0, 99, 97,109,101,114, 97, 91, 52, 93, 0, +112, 97,100, 91, 56, 93, 0, 97, 99,116,105,118,101, 91, 52, 93, 0,103,114,111,117,112, 91, 52, 93, 0,103,114,111,117,112, 95, + 97, 99,116,105,118,101, 91, 52, 93, 0,116,114, 97,110,115,102,111,114,109, 91, 52, 93, 0,118,101,114,116,101,120, 91, 52, 93, + 0,118,101,114,116,101,120, 95,115,101,108,101, 99,116, 91, 52, 93, 0,101,100,103,101, 91, 52, 93, 0,101,100,103,101, 95,115, +101,108,101, 99,116, 91, 52, 93, 0,101,100,103,101, 95,115,101, 97,109, 91, 52, 93, 0,101,100,103,101, 95,115,104, 97,114,112, + 91, 52, 93, 0,101,100,103,101, 95,102, 97, 99,101,115,101,108, 91, 52, 93, 0,101,100,103,101, 95, 99,114,101, 97,115,101, 91, + 52, 93, 0,102, 97, 99,101, 91, 52, 93, 0,102, 97, 99,101, 95,115,101,108,101, 99,116, 91, 52, 93, 0,102, 97, 99,101, 95,100, +111,116, 91, 52, 93, 0,101,120,116,114, 97, 95,101,100,103,101, 95,108,101,110, 91, 52, 93, 0,101,120,116,114, 97, 95,102, 97, + 99,101, 95, 97,110,103,108,101, 91, 52, 93, 0,101,120,116,114, 97, 95,102, 97, 99,101, 95, 97,114,101, 97, 91, 52, 93, 0,112, + 97,100, 51, 91, 52, 93, 0,110,111,114,109, 97,108, 91, 52, 93, 0,118,101,114,116,101,120, 95,110,111,114,109, 97,108, 91, 52, + 93, 0, 98,111,110,101, 95,115,111,108,105,100, 91, 52, 93, 0, 98,111,110,101, 95,112,111,115,101, 91, 52, 93, 0,115,116,114, +105,112, 91, 52, 93, 0,115,116,114,105,112, 95,115,101,108,101, 99,116, 91, 52, 93, 0, 99,102,114, 97,109,101, 91, 52, 93, 0, +110,117,114, 98, 95,117,108,105,110,101, 91, 52, 93, 0,110,117,114, 98, 95,118,108,105,110,101, 91, 52, 93, 0, 97, 99,116, 95, +115,112,108,105,110,101, 91, 52, 93, 0,110,117,114, 98, 95,115,101,108, 95,117,108,105,110,101, 91, 52, 93, 0,110,117,114, 98, + 95,115,101,108, 95,118,108,105,110,101, 91, 52, 93, 0,108, 97,115,116,115,101,108, 95,112,111,105,110,116, 91, 52, 93, 0,104, + 97,110,100,108,101, 95,102,114,101,101, 91, 52, 93, 0,104, 97,110,100,108,101, 95, 97,117,116,111, 91, 52, 93, 0,104, 97,110, +100,108,101, 95,118,101, 99,116, 91, 52, 93, 0,104, 97,110,100,108,101, 95, 97,108,105,103,110, 91, 52, 93, 0,104, 97,110,100, +108,101, 95, 97,117,116,111, 95, 99,108, 97,109,112,101,100, 91, 52, 93, 0,104, 97,110,100,108,101, 95,115,101,108, 95,102,114, +101,101, 91, 52, 93, 0,104, 97,110,100,108,101, 95,115,101,108, 95, 97,117,116,111, 91, 52, 93, 0,104, 97,110,100,108,101, 95, +115,101,108, 95,118,101, 99,116, 91, 52, 93, 0,104, 97,110,100,108,101, 95,115,101,108, 95, 97,108,105,103,110, 91, 52, 93, 0, +104, 97,110,100,108,101, 95,115,101,108, 95, 97,117,116,111, 95, 99,108, 97,109,112,101,100, 91, 52, 93, 0,100,115, 95, 99,104, + 97,110,110,101,108, 91, 52, 93, 0,100,115, 95,115,117, 98, 99,104, 97,110,110,101,108, 91, 52, 93, 0, 99,111,110,115,111,108, +101, 95,111,117,116,112,117,116, 91, 52, 93, 0, 99,111,110,115,111,108,101, 95,105,110,112,117,116, 91, 52, 93, 0, 99,111,110, +115,111,108,101, 95,105,110,102,111, 91, 52, 93, 0, 99,111,110,115,111,108,101, 95,101,114,114,111,114, 91, 52, 93, 0, 99,111, +110,115,111,108,101, 95, 99,117,114,115,111,114, 91, 52, 93, 0,118,101,114,116,101,120, 95,115,105,122,101, 0,111,117,116,108, +105,110,101, 95,119,105,100,116,104, 0,102, 97, 99,101,100,111,116, 95,115,105,122,101, 0,110,111,111,100,108,101, 95, 99,117, +114,118,105,110,103, 0,115,121,110,116, 97,120,108, 91, 52, 93, 0,115,121,110,116, 97,120,110, 91, 52, 93, 0,115,121,110,116, + 97,120, 98, 91, 52, 93, 0,115,121,110,116, 97,120,118, 91, 52, 93, 0,115,121,110,116, 97,120, 99, 91, 52, 93, 0,109,111,118, +105,101, 91, 52, 93, 0,109,111,118,105,101, 99,108,105,112, 91, 52, 93, 0,105,109, 97,103,101, 91, 52, 93, 0,115, 99,101,110, +101, 91, 52, 93, 0, 97,117,100,105,111, 91, 52, 93, 0,101,102,102,101, 99,116, 91, 52, 93, 0,112,108,117,103,105,110, 91, 52, + 93, 0,116,114, 97,110,115,105,116,105,111,110, 91, 52, 93, 0,109,101,116, 97, 91, 52, 93, 0,101,100,105,116,109,101,115,104, + 95, 97, 99,116,105,118,101, 91, 52, 93, 0,104, 97,110,100,108,101, 95,118,101,114,116,101,120, 91, 52, 93, 0,104, 97,110,100, +108,101, 95,118,101,114,116,101,120, 95,115,101,108,101, 99,116, 91, 52, 93, 0,104, 97,110,100,108,101, 95,118,101,114,116,101, +120, 95,115,105,122,101, 0,109, 97,114,107,101,114, 95,111,117,116,108,105,110,101, 91, 52, 93, 0,109, 97,114,107,101,114, 91, + 52, 93, 0, 97, 99,116, 95,109, 97,114,107,101,114, 91, 52, 93, 0,115,101,108, 95,109, 97,114,107,101,114, 91, 52, 93, 0,100, +105,115, 95,109, 97,114,107,101,114, 91, 52, 93, 0,108,111, 99,107, 95,109, 97,114,107,101,114, 91, 52, 93, 0, 98,117,110,100, +108,101, 95,115,111,108,105,100, 91, 52, 93, 0,112, 97,116,104, 95, 98,101,102,111,114,101, 91, 52, 93, 0,112, 97,116,104, 95, + 97,102,116,101,114, 91, 52, 93, 0, 99, 97,109,101,114, 97, 95,112, 97,116,104, 91, 52, 93, 0,104,112, 97,100, 91, 55, 93, 0, +112,114,101,118,105,101,119, 95, 98, 97, 99,107, 91, 52, 93, 0,112,114,101,118,105,101,119, 95,115,116,105,116, 99,104, 95,102, + 97, 99,101, 91, 52, 93, 0,112,114,101,118,105,101,119, 95,115,116,105,116, 99,104, 95,101,100,103,101, 91, 52, 93, 0,112,114, +101,118,105,101,119, 95,115,116,105,116, 99,104, 95,118,101,114,116, 91, 52, 93, 0,112,114,101,118,105,101,119, 95,115,116,105, +116, 99,104, 95,115,116,105,116, 99,104, 97, 98,108,101, 91, 52, 93, 0,112,114,101,118,105,101,119, 95,115,116,105,116, 99,104, + 95,117,110,115,116,105,116, 99,104, 97, 98,108,101, 91, 52, 93, 0,112,114,101,118,105,101,119, 95,115,116,105,116, 99,104, 95, + 97, 99,116,105,118,101, 91, 52, 93, 0,109, 97,116, 99,104, 91, 52, 93, 0,115,101,108,101, 99,116,101,100, 95,104,105,103,104, +108,105,103,104,116, 91, 52, 93, 0,115,111,108,105,100, 91, 52, 93, 0,116,117,105, 0,116, 98,117,116,115, 0,116,118, 51,100, + 0,116,102,105,108,101, 0,116,105,112,111, 0,116,105,110,102,111, 0,116, 97, 99,116, 0,116,110,108, 97, 0,116,115,101,113, + 0,116,105,109, 97, 0,116,101,120,116, 0,116,111,111,112,115, 0,116,116,105,109,101, 0,116,110,111,100,101, 0,116,108,111, +103,105, 99, 0,116,117,115,101,114,112,114,101,102, 0,116, 99,111,110,115,111,108,101, 0,116, 99,108,105,112, 0,116, 97,114, +109, 91, 50, 48, 93, 0, 97, 99,116,105,118,101, 95,116,104,101,109,101, 95, 97,114,101, 97, 0,109,111,100,117,108,101, 91, 54, + 52, 93, 0,115,112,101, 99, 91, 52, 93, 0,100,117,112,102,108, 97,103, 0,115, 97,118,101,116,105,109,101, 0,116,101,109,112, +100,105,114, 91, 55, 54, 56, 93, 0,102,111,110,116,100,105,114, 91, 55, 54, 56, 93, 0,114,101,110,100,101,114,100,105,114, 91, + 49, 48, 50, 52, 93, 0,116,101,120,116,117,100,105,114, 91, 55, 54, 56, 93, 0,112,108,117,103,116,101,120,100,105,114, 91, 55, + 54, 56, 93, 0,112,108,117,103,115,101,113,100,105,114, 91, 55, 54, 56, 93, 0,112,121,116,104,111,110,100,105,114, 91, 55, 54, + 56, 93, 0,115,111,117,110,100,100,105,114, 91, 55, 54, 56, 93, 0,105,109, 97,103,101, 95,101,100,105,116,111,114, 91, 49, 48, + 50, 52, 93, 0, 97,110,105,109, 95,112,108, 97,121,101,114, 91, 49, 48, 50, 52, 93, 0, 97,110,105,109, 95,112,108, 97,121,101, +114, 95,112,114,101,115,101,116, 0,118, 50,100, 95,109,105,110, 95,103,114,105,100,115,105,122,101, 0,116,105,109,101, 99,111, +100,101, 95,115,116,121,108,101, 0,118,101,114,115,105,111,110,115, 0,100, 98,108, 95, 99,108,105, 99,107, 95,116,105,109,101, + 0,103, 97,109,101,102,108, 97,103,115, 0,119,104,101,101,108,108,105,110,101,115, 99,114,111,108,108, 0,117,105,102,108, 97, +103, 0,108, 97,110,103,117, 97,103,101, 0,117,115,101,114,112,114,101,102, 0,118,105,101,119,122,111,111,109, 0,109,105,120, + 98,117,102,115,105,122,101, 0, 97,117,100,105,111,100,101,118,105, 99,101, 0, 97,117,100,105,111,114, 97,116,101, 0, 97,117, +100,105,111,102,111,114,109, 97,116, 0, 97,117,100,105,111, 99,104, 97,110,110,101,108,115, 0,100,112,105, 0,101,110, 99,111, +100,105,110,103, 0,116,114, 97,110,115,111,112,116,115, 0,109,101,110,117,116,104,114,101,115,104,111,108,100, 49, 0,109,101, +110,117,116,104,114,101,115,104,111,108,100, 50, 0,116,104,101,109,101,115, 0,117,105,102,111,110,116,115, 0,117,105,115,116, +121,108,101,115, 0,107,101,121,109, 97,112,115, 0,117,115,101,114, 95,107,101,121,109, 97,112,115, 0, 97,100,100,111,110,115, + 0,107,101,121, 99,111,110,102,105,103,115,116,114, 91, 54, 52, 93, 0,117,110,100,111,115,116,101,112,115, 0,117,110,100,111, +109,101,109,111,114,121, 0,103,112, 95,109, 97,110,104, 97,116,116,101,110,100,105,115,116, 0,103,112, 95,101,117, 99,108,105, +100,101, 97,110,100,105,115,116, 0,103,112, 95,101,114, 97,115,101,114, 0,103,112, 95,115,101,116,116,105,110,103,115, 0,116, + 98, 95,108,101,102,116,109,111,117,115,101, 0,116, 98, 95,114,105,103,104,116,109,111,117,115,101, 0,108,105,103,104,116, 91, + 51, 93, 0,116,119, 95,104,111,116,115,112,111,116, 0,116,119, 95,102,108, 97,103, 0,116,119, 95,104, 97,110,100,108,101,115, +105,122,101, 0,116,119, 95,115,105,122,101, 0,116,101,120,116,105,109,101,111,117,116, 0,116,101,120, 99,111,108,108,101, 99, +116,114, 97,116,101, 0,119,109,100,114, 97,119,109,101,116,104,111,100, 0,100,114, 97,103,116,104,114,101,115,104,111,108,100, + 0,109,101,109, 99, 97, 99,104,101,108,105,109,105,116, 0,112,114,101,102,101,116, 99,104,102,114, 97,109,101,115, 0,102,114, + 97,109,101,115,101,114,118,101,114,112,111,114,116, 0,112, 97,100, 95,114,111,116, 95, 97,110,103,108,101, 0,111, 98, 99,101, +110,116,101,114, 95,100,105, 97, 0,114,118,105,115,105,122,101, 0,114,118,105, 98,114,105,103,104,116, 0,114,101, 99,101,110, +116, 95,102,105,108,101,115, 0,115,109,111,111,116,104, 95,118,105,101,119,116,120, 0,103,108,114,101,115,108,105,109,105,116, + 0, 99,117,114,115,115,105,122,101, 0, 99,111,108,111,114, 95,112,105, 99,107,101,114, 95,116,121,112,101, 0,105,112,111, 95, +110,101,119, 0,107,101,121,104, 97,110,100,108,101,115, 95,110,101,119, 0,115, 99,114, 99, 97,115,116,102,112,115, 0,115, 99, +114, 99, 97,115,116,119, 97,105,116, 0,119,105,100,103,101,116, 95,117,110,105,116, 0, 97,110,105,115,111,116,114,111,112,105, + 99, 95,102,105,108,116,101,114, 0,117,115,101, 95, 49, 54, 98,105,116, 95,116,101,120,116,117,114,101,115, 0,112, 97,100, 56, + 0,110,100,111,102, 95,115,101,110,115,105,116,105,118,105,116,121, 0,110,100,111,102, 95,102,108, 97,103, 0,103,108, 97,108, +112,104, 97, 99,108,105,112, 0,116,101,120,116, 95,114,101,110,100,101,114, 0,112, 97,100, 57, 0, 99,111, 98, 97, 95,119,101, +105,103,104,116, 0,115, 99,117,108,112,116, 95,112, 97,105,110,116, 95,111,118,101,114,108, 97,121, 95, 99,111,108, 91, 51, 93, + 0,116,119,101, 97,107, 95,116,104,114,101,115,104,111,108,100, 0, 97,117,116,104,111,114, 91, 56, 48, 93, 0, 99,111,109,112, +117,116,101, 95,100,101,118,105, 99,101, 95,116,121,112,101, 0, 99,111,109,112,117,116,101, 95,100,101,118,105, 99,101, 95,105, +100, 0,102, 99,117, 95,105,110, 97, 99,116,105,118,101, 95, 97,108,112,104, 97, 0,118,101,114,116, 98, 97,115,101, 0,101,100, +103,101, 98, 97,115,101, 0, 97,114,101, 97, 98, 97,115,101, 0, 42,110,101,119,115, 99,101,110,101, 0,114,101,100,114, 97,119, +115, 95,102,108, 97,103, 0,102,117,108,108, 0,116,101,109,112, 0,119,105,110,105,100, 0,100,111, 95,100,114, 97,119, 0,100, +111, 95,114,101,102,114,101,115,104, 0,100,111, 95,100,114, 97,119, 95,103,101,115,116,117,114,101, 0,100,111, 95,100,114, 97, +119, 95,112, 97,105,110,116, 99,117,114,115,111,114, 0,100,111, 95,100,114, 97,119, 95,100,114, 97,103, 0,115,119, 97,112, 0, +109, 97,105,110,119,105,110, 0,115,117, 98,119,105,110, 97, 99,116,105,118,101, 0, 42, 97,110,105,109,116,105,109,101,114, 0, + 42, 99,111,110,116,101,120,116, 0,104, 97,110,100,108,101,114, 91, 56, 93, 0, 42,110,101,119,118, 0,118,101, 99, 0, 42,118, + 49, 0, 42,118, 50, 0, 42,116,121,112,101, 0,112, 97,110,101,108,110, 97,109,101, 91, 54, 52, 93, 0,116, 97, 98,110, 97,109, +101, 91, 54, 52, 93, 0,100,114, 97,119,110, 97,109,101, 91, 54, 52, 93, 0,111,102,115,120, 0,111,102,115,121, 0,115,105,122, +101,120, 0,115,105,122,101,121, 0,108, 97, 98,101,108,111,102,115, 0, 99,111,110,116,114,111,108, 0,115,110, 97,112, 0,115, +111,114,116,111,114,100,101,114, 0, 42,112, 97,110,101,108,116, 97, 98, 0, 42, 97, 99,116,105,118,101,100, 97,116, 97, 0,108, +105,115,116, 95,115, 99,114,111,108,108, 0,108,105,115,116, 95,115,105,122,101, 0,108,105,115,116, 95,108, 97,115,116, 95,108, +101,110, 0,108,105,115,116, 95,103,114,105,112, 95,115,105,122,101, 0,108,105,115,116, 95,115,101, 97,114, 99,104, 91, 54, 52, + 93, 0, 42,118, 51, 0, 42,118, 52, 0, 42,102,117,108,108, 0, 98,117,116,115,112, 97, 99,101,116,121,112,101, 0,104,101, 97, +100,101,114,116,121,112,101, 0,115,112, 97, 99,101,100, 97,116, 97, 0,104, 97,110,100,108,101,114,115, 0, 97, 99,116,105,111, +110,122,111,110,101,115, 0,119,105,110,114, 99,116, 0,100,114, 97,119,114, 99,116, 0,115,119,105,110,105,100, 0,114,101,103, +105,111,110,116,121,112,101, 0, 97,108,105,103,110,109,101,110,116, 0,100,111, 95,100,114, 97,119, 95,111,118,101,114,108, 97, +121, 0,117,105, 98,108,111, 99,107,115, 0,112, 97,110,101,108,115, 0, 42,104,101, 97,100,101,114,115,116,114, 0, 42,114,101, +103,105,111,110,100, 97,116, 97, 0,115,117, 98,118,115,116,114, 91, 52, 93, 0,115,117, 98,118,101,114,115,105,111,110, 0,112, + 97,100,115, 0,109,105,110,118,101,114,115,105,111,110, 0,109,105,110,115,117, 98,118,101,114,115,105,111,110, 0,119,105,110, +112,111,115, 0, 42, 99,117,114,115, 99,114,101,101,110, 0, 42, 99,117,114,115, 99,101,110,101, 0,102,105,108,101,102,108, 97, +103,115, 0,103,108,111, 98, 97,108,102, 0,114,101,118,105,115,105,111,110, 0,110, 97,109,101, 91, 50, 53, 54, 93, 0,111,114, +105,103, 95,119,105,100,116,104, 0,111,114,105,103, 95,104,101,105,103,104,116, 0, 98,111,116,116,111,109, 0,114,105,103,104, +116, 0,120,111,102,115, 0,121,111,102,115, 0,108,105,102,116, 91, 51, 93, 0,103, 97,109,109, 97, 91, 51, 93, 0,103, 97,105, +110, 91, 51, 93, 0,100,105,114, 91, 55, 54, 56, 93, 0,116, 99, 0, 98,117,105,108,100, 95,115,105,122,101, 95,102,108, 97,103, +115, 0, 98,117,105,108,100, 95,116, 99, 95,102,108, 97,103,115, 0,100,111,110,101, 0,115,116, 97,114,116,115,116,105,108,108, + 0,101,110,100,115,116,105,108,108, 0, 42,115,116,114,105,112,100, 97,116, 97, 0, 42, 99,114,111,112, 0, 42,116,114, 97,110, +115,102,111,114,109, 0, 42, 99,111,108,111,114, 95, 98, 97,108, 97,110, 99,101, 0, 42,105,110,115,116, 97,110, 99,101, 95,112, +114,105,118, 97,116,101, 95,100, 97,116, 97, 0, 42, 42, 99,117,114,114,101,110,116, 95,112,114,105,118, 97,116,101, 95,100, 97, +116, 97, 0, 42,116,109,112, 0,115,116, 97,114,116,111,102,115, 0,101,110,100,111,102,115, 0,109, 97, 99,104,105,110,101, 0, +115,116, 97,114,116,100,105,115,112, 0,101,110,100,100,105,115,112, 0,115, 97,116, 0,109,117,108, 0,104, 97,110,100,115,105, +122,101, 0, 97,110,105,109, 95,112,114,101,115,101,101,107, 0,115,116,114,101, 97,109,105,110,100,101,120, 0,109,117,108,116, +105, 99, 97,109, 95,115,111,117,114, 99,101, 0, 99,108,105,112, 95,102,108, 97,103, 0, 42,115,116,114,105,112, 0, 42,115, 99, +101,110,101, 95, 99, 97,109,101,114, 97, 0,101,102,102,101, 99,116, 95,102, 97,100,101,114, 0,115,112,101,101,100, 95,102, 97, +100,101,114, 0, 42,115,101,113, 49, 0, 42,115,101,113, 50, 0, 42,115,101,113, 51, 0,115,101,113, 98, 97,115,101, 0, 42,115, +111,117,110,100, 0, 42,115, 99,101,110,101, 95,115,111,117,110,100, 0,112,105,116, 99,104, 0,112, 97,110, 0,115,116,114,111, + 98,101, 0, 42,101,102,102,101, 99,116,100, 97,116, 97, 0, 97,110,105,109, 95,115,116, 97,114,116,111,102,115, 0, 97,110,105, +109, 95,101,110,100,111,102,115, 0, 98,108,101,110,100, 95,109,111,100,101, 0, 98,108,101,110,100, 95,111,112, 97, 99,105,116, +121, 0, 42,111,108,100, 98, 97,115,101,112, 0, 42,112, 97,114,115,101,113, 0, 42,115,101,113, 98, 97,115,101,112, 0,109,101, +116, 97,115,116, 97, 99,107, 0, 42, 97, 99,116, 95,115,101,113, 0, 97, 99,116, 95,105,109, 97,103,101,100,105,114, 91, 49, 48, + 50, 52, 93, 0, 97, 99,116, 95,115,111,117,110,100,100,105,114, 91, 49, 48, 50, 52, 93, 0,111,118,101,114, 95,111,102,115, 0, +111,118,101,114, 95, 99,102,114, 97, 0,111,118,101,114, 95,102,108, 97,103, 0,111,118,101,114, 95, 98,111,114,100,101,114, 0, +101,100,103,101, 87,105,100,116,104, 0,102,111,114,119, 97,114,100, 0,119,105,112,101,116,121,112,101, 0,102, 77,105,110,105, + 0,102, 67,108, 97,109,112, 0,102, 66,111,111,115,116, 0,100, 68,105,115,116, 0,100, 81,117, 97,108,105,116,121, 0, 98, 78, +111, 67,111,109,112, 0, 83, 99, 97,108,101,120, 73,110,105, 0, 83, 99, 97,108,101,121, 73,110,105, 0,120, 73,110,105, 0,121, + 73,110,105, 0,114,111,116, 73,110,105, 0,105,110,116,101,114,112,111,108, 97,116,105,111,110, 0,117,110,105,102,111,114,109, + 95,115, 99, 97,108,101, 0, 42,102,114, 97,109,101, 77, 97,112, 0,103,108,111, 98, 97,108, 83,112,101,101,100, 0,108, 97,115, +116, 86, 97,108,105,100, 70,114, 97,109,101, 0, 98,117,116,116,121,112,101, 0,117,115,101,114,106,105,116, 0,115,116, 97, 0, +116,111,116,112, 97,114,116, 0,110,111,114,109,102, 97, 99, 0,111, 98,102, 97, 99, 0,114, 97,110,100,102, 97, 99, 0,116,101, +120,102, 97, 99, 0,114, 97,110,100,108,105,102,101, 0,102,111,114, 99,101, 91, 51, 93, 0,118,101, 99,116,115,105,122,101, 0, +109, 97,120,108,101,110, 0,100,101,102,118,101, 99, 91, 51, 93, 0,109,117,108,116, 91, 52, 93, 0,108,105,102,101, 91, 52, 93, + 0, 99,104,105,108,100, 91, 52, 93, 0,109, 97,116, 91, 52, 93, 0,116,101,120,109, 97,112, 0, 99,117,114,109,117,108,116, 0, +115,116, 97,116,105, 99,115,116,101,112, 0,111,109, 97,116, 0,116,105,109,101,116,101,120, 0,115,112,101,101,100,116,101,120, + 0,102,108, 97,103, 50,110,101,103, 0,118,101,114,116,103,114,111,117,112, 95,118, 0,118,103,114,111,117,112,110, 97,109,101, + 91, 54, 52, 93, 0,118,103,114,111,117,112,110, 97,109,101, 95,118, 91, 54, 52, 93, 0, 42,107,101,121,115, 0,109,105,110,102, + 97, 99, 0,110,114, 0,117,115,101,100, 0,117,115,101,100,101,108,101,109, 0, 42,112,111,105,110, 0,114,101,115,101,116,100, +105,115,116, 0,108, 97,115,116,118, 97,108, 0, 42,109, 97, 0,107,101,121, 0,113,117, 97,108, 0,113,117, 97,108, 50, 0,116, + 97,114,103,101,116, 78, 97,109,101, 91, 54, 52, 93, 0,116,111,103,103,108,101, 78, 97,109,101, 91, 54, 52, 93, 0,118, 97,108, +117,101, 91, 54, 52, 93, 0,109, 97,120,118, 97,108,117,101, 91, 54, 52, 93, 0,100,101,108, 97,121, 0,100,117,114, 97,116,105, +111,110, 0,109, 97,116,101,114,105, 97,108, 78, 97,109,101, 91, 54, 52, 93, 0,100, 97,109,112,116,105,109,101,114, 0,112,114, +111,112,110, 97,109,101, 91, 54, 52, 93, 0,109, 97,116,110, 97,109,101, 91, 54, 52, 93, 0, 97,120,105,115,102,108, 97,103, 0, +112,111,115,101, 99,104, 97,110,110,101,108, 91, 54, 52, 93, 0, 99,111,110,115,116,114, 97,105,110,116, 91, 54, 52, 93, 0, 42, +102,114,111,109, 79, 98,106,101, 99,116, 0,115,117, 98,106,101, 99,116, 91, 54, 52, 93, 0, 98,111,100,121, 91, 54, 52, 93, 0, +111,116,121,112,101, 0,112,117,108,115,101, 0,102,114,101,113, 0,116,111,116,108,105,110,107,115, 0, 42, 42,108,105,110,107, +115, 0,116, 97,112, 0,106,111,121,105,110,100,101,120, 0, 97,120,105,115, 95,115,105,110,103,108,101, 0, 97,120,105,115,102, + 0, 98,117,116,116,111,110, 0,104, 97,116, 0,104, 97,116,102, 0,112,114,101, 99,105,115,105,111,110, 0,115,116,114, 91, 49, + 50, 56, 93, 0, 42,109,121,110,101,119, 0,105,110,112,117,116,115, 0,116,111,116,115,108,105,110,107,115, 0, 42, 42,115,108, +105,110,107,115, 0,118, 97,108,111, 0,115,116, 97,116,101, 95,109, 97,115,107, 0, 42, 97, 99,116, 0,102,114, 97,109,101, 80, +114,111,112, 91, 54, 52, 93, 0, 98,108,101,110,100,105,110, 0,112,114,105,111,114,105,116,121, 0,101,110,100, 95,114,101,115, +101,116, 0,115,116,114,105,100,101, 97,120,105,115, 0,115,116,114,105,100,101,108,101,110,103,116,104, 0,108, 97,121,101,114, + 95,119,101,105,103,104,116, 0,109,105,110, 95,103, 97,105,110, 0,109, 97,120, 95,103, 97,105,110, 0,114,101,102,101,114,101, +110, 99,101, 95,100,105,115,116, 97,110, 99,101, 0,109, 97,120, 95,100,105,115,116, 97,110, 99,101, 0,114,111,108,108,111,102, +102, 95,102, 97, 99,116,111,114, 0, 99,111,110,101, 95,105,110,110,101,114, 95, 97,110,103,108,101, 0, 99,111,110,101, 95,111, +117,116,101,114, 95, 97,110,103,108,101, 0, 99,111,110,101, 95,111,117,116,101,114, 95,103, 97,105,110, 0,115,110,100,110,114, + 0,115,111,117,110,100, 51, 68, 0,112, 97,100, 54, 91, 49, 93, 0, 42,109,101, 0,108,105,110, 86,101,108,111, 99,105,116,121, + 91, 51, 93, 0, 97,110,103, 86,101,108,111, 99,105,116,121, 91, 51, 93, 0,108,111, 99, 97,108,102,108, 97,103, 0,100,121,110, + 95,111,112,101,114, 97,116,105,111,110, 0,102,111,114, 99,101,108,111, 99, 91, 51, 93, 0,102,111,114, 99,101,114,111,116, 91, + 51, 93, 0,112, 97,100, 49, 91, 51, 93, 0,108,105,110,101, 97,114,118,101,108,111, 99,105,116,121, 91, 51, 93, 0, 97,110,103, +117,108, 97,114,118,101,108,111, 99,105,116,121, 91, 51, 93, 0, 42,114,101,102,101,114,101,110, 99,101, 0,109,105,110, 0,109, + 97,120, 0,114,111,116,100, 97,109,112, 0,109,105,110,108,111, 99, 91, 51, 93, 0,109, 97,120,108,111, 99, 91, 51, 93, 0,109, +105,110,114,111,116, 91, 51, 93, 0,109, 97,120,114,111,116, 91, 51, 93, 0,109, 97,116,112,114,111,112, 91, 54, 52, 93, 0, 98, +117,116,115,116, 97, 0, 98,117,116,101,110,100, 0,100,105,115,116,114,105, 98,117,116,105,111,110, 0,105,110,116, 95, 97,114, +103, 95, 49, 0,105,110,116, 95, 97,114,103, 95, 50, 0,102,108,111, 97,116, 95, 97,114,103, 95, 49, 0,102,108,111, 97,116, 95, + 97,114,103, 95, 50, 0,116,111, 80,114,111,112, 78, 97,109,101, 91, 54, 52, 93, 0, 42,116,111, 79, 98,106,101, 99,116, 0, 98, +111,100,121, 84,121,112,101, 0,102,105,108,101,110, 97,109,101, 91, 54, 52, 93, 0,108,111, 97,100, 97,110,105,110, 97,109,101, + 91, 54, 52, 93, 0,105,110,116, 95, 97,114,103, 0,102,108,111, 97,116, 95, 97,114,103, 0,105,110,102,108,117,101,110, 99,101, + 0, 42,115,117, 98,116, 97,114,103,101,116, 0,102, 97, 99,105,110,103, 97,120,105,115, 0,118,101,108,111, 99,105,116,121, 0, + 97, 99, 99,101,108,101,114, 97,116,105,111,110, 0,116,117,114,110,115,112,101,101,100, 0,117,112,100, 97,116,101, 84,105,109, +101, 0, 42,110, 97,118,109,101,115,104, 0,103,111, 0, 42,110,101,119,112, 97, 99,107,101,100,102,105,108,101, 0, 97,116,116, +101,110,117, 97,116,105,111,110, 0,100,105,115,116, 97,110, 99,101, 0, 42, 99, 97, 99,104,101, 0, 42,119, 97,118,101,102,111, +114,109, 0, 42,112,108, 97,121, 98, 97, 99,107, 95,104, 97,110,100,108,101, 0, 42,108, 97,109,112,114,101,110, 0,103,111, 98, +106,101, 99,116, 0,100,117,112,108,105, 95,111,102,115, 91, 51, 93, 0, 42,112,114,111,112, 0, 99,104,105,108,100, 98, 97,115, +101, 0,114,111,108,108, 0,104,101, 97,100, 91, 51, 93, 0,116, 97,105,108, 91, 51, 93, 0, 98,111,110,101, 95,109, 97,116, 91, + 51, 93, 91, 51, 93, 0, 97,114,109, 95,104,101, 97,100, 91, 51, 93, 0, 97,114,109, 95,116, 97,105,108, 91, 51, 93, 0, 97,114, +109, 95,109, 97,116, 91, 52, 93, 91, 52, 93, 0, 97,114,109, 95,114,111,108,108, 0,120,119,105,100,116,104, 0,122,119,105,100, +116,104, 0,101, 97,115,101, 49, 0,101, 97,115,101, 50, 0,114, 97,100, 95,104,101, 97,100, 0,114, 97,100, 95,116, 97,105,108, + 0,112, 97,100, 91, 49, 93, 0, 98,111,110,101, 98, 97,115,101, 0, 99,104, 97,105,110, 98, 97,115,101, 0, 42,101,100, 98,111, + 0, 42, 97, 99,116, 95, 98,111,110,101, 0, 42, 97, 99,116, 95,101,100, 98,111,110,101, 0, 42,115,107,101,116, 99,104, 0,103, +101,118,101,114,116,100,101,102,111,114,109,101,114, 0,108, 97,121,101,114, 95,117,115,101,100, 0,108, 97,121,101,114, 95,112, +114,111,116,101, 99,116,101,100, 0,103,104,111,115,116,101,112, 0,103,104,111,115,116,115,105,122,101, 0,103,104,111,115,116, +116,121,112,101, 0,112, 97,116,104,115,105,122,101, 0,103,104,111,115,116,115,102, 0,103,104,111,115,116,101,102, 0,112, 97, +116,104,115,102, 0,112, 97,116,104,101,102, 0,112, 97,116,104, 98, 99, 0,112, 97,116,104, 97, 99, 0, 42,112,111,105,110,116, +115, 0,115,116, 97,114,116, 95,102,114, 97,109,101, 0,101,110,100, 95,102,114, 97,109,101, 0,103,104,111,115,116, 95,115,102, + 0,103,104,111,115,116, 95,101,102, 0,103,104,111,115,116, 95, 98, 99, 0,103,104,111,115,116, 95, 97, 99, 0,103,104,111,115, +116, 95,116,121,112,101, 0,103,104,111,115,116, 95,115,116,101,112, 0,103,104,111,115,116, 95,102,108, 97,103, 0,112, 97,116, +104, 95,116,121,112,101, 0,112, 97,116,104, 95,115,116,101,112, 0,112, 97,116,104, 95,118,105,101,119,102,108, 97,103, 0,112, + 97,116,104, 95, 98, 97,107,101,102,108, 97,103, 0,112, 97,116,104, 95,115,102, 0,112, 97,116,104, 95,101,102, 0,112, 97,116, +104, 95, 98, 99, 0,112, 97,116,104, 95, 97, 99, 0,105,107,102,108, 97,103, 0, 97,103,114,112, 95,105,110,100,101,120, 0, 99, +111,110,115,116,102,108, 97,103, 0,115,101,108,101, 99,116,102,108, 97,103, 0,112, 97,100, 48, 91, 54, 93, 0, 42, 98,111,110, +101, 0, 42, 99,104,105,108,100, 0,105,107,116,114,101,101, 0,115,105,107,116,114,101,101, 0, 42, 99,117,115,116,111,109, 0, + 42, 99,117,115,116,111,109, 95,116,120, 0,101,117,108, 91, 51, 93, 0, 99,104, 97,110, 95,109, 97,116, 91, 52, 93, 91, 52, 93, + 0,112,111,115,101, 95,109, 97,116, 91, 52, 93, 91, 52, 93, 0,112,111,115,101, 95,104,101, 97,100, 91, 51, 93, 0,112,111,115, +101, 95,116, 97,105,108, 91, 51, 93, 0,108,105,109,105,116,109,105,110, 91, 51, 93, 0,108,105,109,105,116,109, 97,120, 91, 51, + 93, 0,115,116,105,102,102,110,101,115,115, 91, 51, 93, 0,105,107,115,116,114,101,116, 99,104, 0,105,107,114,111,116,119,101, +105,103,104,116, 0,105,107,108,105,110,119,101,105,103,104,116, 0, 42,116,101,109,112, 0, 99,104, 97,110, 98, 97,115,101, 0, + 42, 99,104, 97,110,104, 97,115,104, 0,112,114,111,120,121, 95,108, 97,121,101,114, 0,115,116,114,105,100,101, 95,111,102,102, +115,101,116, 91, 51, 93, 0, 99,121, 99,108,105, 99, 95,111,102,102,115,101,116, 91, 51, 93, 0, 97,103,114,111,117,112,115, 0, + 97, 99,116,105,118,101, 95,103,114,111,117,112, 0,105,107,115,111,108,118,101,114, 0, 42,105,107,100, 97,116, 97, 0, 42,105, +107,112, 97,114, 97,109, 0,112,114,111,120,121, 95, 97, 99,116, 95, 98,111,110,101, 91, 54, 52, 93, 0,110,117,109,105,116,101, +114, 0,110,117,109,115,116,101,112, 0,109,105,110,115,116,101,112, 0,109, 97,120,115,116,101,112, 0,115,111,108,118,101,114, + 0,102,101,101,100, 98, 97, 99,107, 0,109, 97,120,118,101,108, 0,100, 97,109,112,109, 97,120, 0,100, 97,109,112,101,112,115, + 0, 99,104, 97,110,110,101,108,115, 0, 99,117,115,116,111,109, 67,111,108, 0, 99,115, 0, 99,117,114,118,101,115, 0,103,114, +111,117,112,115, 0, 97, 99,116,105,118,101, 95,109, 97,114,107,101,114, 0,105,100,114,111,111,116, 0, 42,115,111,117,114, 99, +101, 0, 42,102,105,108,116,101,114, 95,103,114,112, 0,115,101, 97,114, 99,104,115,116,114, 91, 54, 52, 93, 0,102,105,108,116, +101,114,102,108, 97,103, 0,114,101,110, 97,109,101, 73,110,100,101,120, 0, 97,100,115, 0,116,105,109,101,115,108,105,100,101, + 0, 42,103,114,112, 0,110, 97,109,101, 91, 51, 48, 93, 0,111,119,110,115,112, 97, 99,101, 0,116, 97,114,115,112, 97, 99,101, + 0,101,110,102,111,114, 99,101, 0,104,101, 97,100,116, 97,105,108, 0,108,105,110, 95,101,114,114,111,114, 0,114,111,116, 95, +101,114,114,111,114, 0, 42,116, 97,114, 0,109, 97,116,114,105,120, 91, 52, 93, 91, 52, 93, 0,115,112, 97, 99,101, 0,114,111, +116, 79,114,100,101,114, 0,116, 97,114,110,117,109, 0,116, 97,114,103,101,116,115, 0,105,116,101,114, 97,116,105,111,110,115, + 0,114,111,111,116, 98,111,110,101, 0,109, 97,120, 95,114,111,111,116, 98,111,110,101, 0, 42,112,111,108,101,116, 97,114, 0, +112,111,108,101,115,117, 98,116, 97,114,103,101,116, 91, 54, 52, 93, 0,112,111,108,101, 97,110,103,108,101, 0,111,114,105,101, +110,116,119,101,105,103,104,116, 0,103,114, 97, 98,116, 97,114,103,101,116, 91, 51, 93, 0,110,117,109,112,111,105,110,116,115, + 0, 99,104, 97,105,110,108,101,110, 0,120,122, 83, 99, 97,108,101, 77,111,100,101, 0,114,101,115,101,114,118,101,100, 49, 0, +114,101,115,101,114,118,101,100, 50, 0,109,105,110,109, 97,120,102,108, 97,103, 0,115,116,117, 99,107, 0, 99, 97, 99,104,101, + 91, 51, 93, 0,108,111, 99,107,102,108, 97,103, 0,102,111,108,108,111,119,102,108, 97,103, 0,118,111,108,109,111,100,101, 0, +112,108, 97,110,101, 0,111,114,103,108,101,110,103,116,104, 0, 98,117,108,103,101, 0,112,105,118, 88, 0,112,105,118, 89, 0, +112,105,118, 90, 0, 97,120, 88, 0, 97,120, 89, 0, 97,120, 90, 0,109,105,110, 76,105,109,105,116, 91, 54, 93, 0,109, 97,120, + 76,105,109,105,116, 91, 54, 93, 0,101,120,116,114, 97, 70,122, 0,105,110,118,109, 97,116, 91, 52, 93, 91, 52, 93, 0,102,114, +111,109, 0,116,111, 0,109, 97,112, 91, 51, 93, 0,101,120,112,111, 0,102,114,111,109, 95,109,105,110, 91, 51, 93, 0,102,114, +111,109, 95,109, 97,120, 91, 51, 93, 0,116,111, 95,109,105,110, 91, 51, 93, 0,116,111, 95,109, 97,120, 91, 51, 93, 0,114,111, +116, 65,120,105,115, 0,122,109,105,110, 0,122,109, 97,120, 0,112, 97,100, 91, 57, 93, 0,116,114, 97, 99,107, 91, 54, 52, 93, + 0,111, 98,106,101, 99,116, 91, 54, 52, 93, 0, 42,100,101,112,116,104, 95,111, 98, 0, 99,104, 97,110,110,101,108, 91, 51, 50, + 93, 0,110,111, 95,114,111,116, 95, 97,120,105,115, 0,115,116,114,105,100,101, 95, 97,120,105,115, 0, 99,117,114,109,111,100, + 0, 97, 99,116,115,116, 97,114,116, 0, 97, 99,116,101,110,100, 0, 97, 99,116,111,102,102,115, 0,115,116,114,105,100,101,108, +101,110, 0, 98,108,101,110,100,111,117,116, 0,115,116,114,105,100,101, 99,104, 97,110,110,101,108, 91, 51, 50, 93, 0,111,102, +102,115, 95, 98,111,110,101, 91, 51, 50, 93, 0,104, 97,115,105,110,112,117,116, 0,104, 97,115,111,117,116,112,117,116, 0,100, + 97,116, 97,116,121,112,101, 0,115,111, 99,107,101,116,116,121,112,101, 0,105,115, 95, 99,111,112,121, 0,101,120,116,101,114, +110, 97,108, 0, 42,110,101,119, 95,115,111, 99,107, 0, 42,115,116,111,114, 97,103,101, 0,108,105,109,105,116, 0,115,116,114, +117, 99,116, 95,116,121,112,101, 0,108,111, 99,120, 0,108,111, 99,121, 0, 42,100,101,102, 97,117,108,116, 95,118, 97,108,117, +101, 0,115,116, 97, 99,107, 95,105,110,100,101,120, 0,115,116, 97, 99,107, 95,116,121,112,101, 0,111,119,110, 95,105,110,100, +101,120, 0,116,111, 95,105,110,100,101,120, 0, 42,103,114,111,117,112,115,111, 99,107, 0, 42,108,105,110,107, 0,110,115, 0, + 42,114,101, 99,116, 0,120,115,105,122,101, 0,121,115,105,122,101, 0, 42,110,101,119, 95,110,111,100,101, 0,108, 97,115,116, +121, 0,111,117,116,112,117,116,115, 0,109,105,110,105,119,105,100,116,104, 0,117,112,100, 97,116,101, 0,108, 97, 98,101,108, + 91, 54, 52, 93, 0, 99,117,115,116,111,109, 49, 0, 99,117,115,116,111,109, 50, 0, 99,117,115,116,111,109, 51, 0, 99,117,115, +116,111,109, 52, 0,110,101,101,100, 95,101,120,101, 99, 0,101,120,101, 99, 0, 42,116,104,114,101, 97,100,100, 97,116, 97, 0, +116,111,116,114, 0, 98,117,116,114, 0,112,114,118,114, 0, 42, 98,108,111, 99,107, 0, 42,116,121,112,101,105,110,102,111, 0, + 42,102,114,111,109,110,111,100,101, 0, 42,116,111,110,111,100,101, 0, 42,102,114,111,109,115,111, 99,107, 0, 42,116,111,115, +111, 99,107, 0,110,111,100,101,115, 0,108,105,110,107,115, 0,105,110,105,116, 0, 99,117,114, 95,105,110,100,101,120, 0,110, +111,100,101,116,121,112,101, 0, 42,101,120,101, 99,100, 97,116, 97, 0, 40, 42,112,114,111,103,114,101,115,115, 41, 40, 41, 0, + 40, 42,115,116, 97,116,115, 95,100,114, 97,119, 41, 40, 41, 0, 40, 42,116,101,115,116, 95, 98,114,101, 97,107, 41, 40, 41, 0, + 42,116, 98,104, 0, 42,112,114,104, 0, 42,115,100,104, 0,118, 97,108,117,101, 91, 51, 93, 0,118, 97,108,117,101, 91, 52, 93, + 0, 99,121, 99,108,105, 99, 0,109,111,118,105,101, 0,115, 97,109,112,108,101,115, 0,109, 97,120,115,112,101,101,100, 0,109, +105,110,115,112,101,101,100, 0, 99,117,114,118,101,100, 0,112,101,114, 99,101,110,116,120, 0,112,101,114, 99,101,110,116,121, + 0, 98,111,107,101,104, 0,103, 97,109,109, 97, 0,105,109, 97,103,101, 95,105,110, 95,119,105,100,116,104, 0,105,109, 97,103, +101, 95,105,110, 95,104,101,105,103,104,116, 0, 99,101,110,116,101,114, 95,120, 0, 99,101,110,116,101,114, 95,121, 0,115,112, +105,110, 0,119,114, 97,112, 0,115,105,103,109, 97, 95, 99,111,108,111,114, 0,115,105,103,109, 97, 95,115,112, 97, 99,101, 0, +104,117,101, 0, 98, 97,115,101, 95,112, 97,116,104, 91, 49, 48, 50, 52, 93, 0,102,111,114,109, 97,116, 0, 97, 99,116,105,118, +101, 95,105,110,112,117,116, 0,117,115,101, 95,114,101,110,100,101,114, 95,102,111,114,109, 97,116, 0,117,115,101, 95,110,111, +100,101, 95,102,111,114,109, 97,116, 0,116, 49, 0,116, 50, 0,116, 51, 0,102,115,116,114,101,110,103,116,104, 0,102, 97,108, +112,104, 97, 0,107,101,121, 91, 52, 93, 0, 97,108,103,111,114,105,116,104,109, 0, 99,104, 97,110,110,101,108, 0,120, 49, 0, +120, 50, 0,121, 49, 0,121, 50, 0,102, 97, 99, 95,120, 49, 0,102, 97, 99, 95,120, 50, 0,102, 97, 99, 95,121, 49, 0,102, 97, + 99, 95,121, 50, 0, 99,111,108,110, 97,109,101, 91, 54, 52, 93, 0, 98,107,116,121,112,101, 0,112, 97,100, 95, 99, 49, 0,103, + 97,109, 99,111, 0,110,111, 95,122, 98,117,102, 0,102,115,116,111,112, 0,109, 97,120, 98,108,117,114, 0, 98,116,104,114,101, +115,104, 0,114,111,116, 97,116,105,111,110, 0,112, 97,100, 95,102, 49, 0, 42,100,105, 99,116, 0, 42,110,111,100,101, 0, 99, +111,108,109,111,100, 0,109,105,120, 0,102, 97,100,101, 0, 97,110,103,108,101, 95,111,102,115, 0,109, 0, 99, 0,106,105,116, + 0,112,114,111,106, 0,102,105,116, 0,115,108,111,112,101, 91, 51, 93, 0,112,111,119,101,114, 91, 51, 93, 0,108,105,102,116, + 95,108,103,103, 91, 51, 93, 0,103, 97,109,109, 97, 95,105,110,118, 91, 51, 93, 0,108,105,109, 99,104, 97,110, 0,117,110,115, +112,105,108,108, 0,108,105,109,115, 99, 97,108,101, 0,117,115,112,105,108,108,114, 0,117,115,112,105,108,108,103, 0,117,115, +112,105,108,108, 98, 0,116,101,120, 95,109, 97,112,112,105,110,103, 0, 99,111,108,111,114, 95,109, 97,112,112,105,110,103, 0, +115,117,110, 95,100,105,114,101, 99,116,105,111,110, 91, 51, 93, 0,116,117,114, 98,105,100,105,116,121, 0, 99,111,108,111,114, + 95,115,112, 97, 99,101, 0,112,114,111,106,101, 99,116,105,111,110, 0,103,114, 97,100,105,101,110,116, 95,116,121,112,101, 0, + 99,111,108,111,114,105,110,103, 0,109,117,115,103,114, 97,118,101, 95,116,121,112,101, 0,119, 97,118,101, 95,116,121,112,101, + 0,115,104,111,114,116,121, 0,109,105,110,116, 97, 98,108,101, 0,109, 97,120,116, 97, 98,108,101, 0,101,120,116, 95,105,110, + 91, 50, 93, 0,101,120,116, 95,111,117,116, 91, 50, 93, 0, 42, 99,117,114,118,101, 0, 42,116, 97, 98,108,101, 0, 42,112,114, +101,109,117,108,116, 97, 98,108,101, 0,112,114,101,115,101,116, 0, 99,104, 97,110,103,101,100, 95,116,105,109,101,115,116, 97, +109,112, 0, 99,117,114,114, 0, 99,108,105,112,114, 0, 99,109, 91, 52, 93, 0, 98,108, 97, 99,107, 91, 51, 93, 0,119,104,105, +116,101, 91, 51, 93, 0, 98,119,109,117,108, 91, 51, 93, 0,115, 97,109,112,108,101, 91, 51, 93, 0,120, 95,114,101,115,111,108, +117,116,105,111,110, 0,100, 97,116, 97, 95,114, 91, 50, 53, 54, 93, 0,100, 97,116, 97, 95,103, 91, 50, 53, 54, 93, 0,100, 97, +116, 97, 95, 98, 91, 50, 53, 54, 93, 0,100, 97,116, 97, 95,108,117,109, 97, 91, 50, 53, 54, 93, 0,115, 97,109,112,108,101, 95, +102,117,108,108, 0,115, 97,109,112,108,101, 95,108,105,110,101,115, 0, 97, 99, 99,117,114, 97, 99,121, 0,119, 97,118,101,102, +114,109, 95,109,111,100,101, 0,119, 97,118,101,102,114,109, 95, 97,108,112,104, 97, 0,119, 97,118,101,102,114,109, 95,121,102, + 97, 99, 0,119, 97,118,101,102,114,109, 95,104,101,105,103,104,116, 0,118,101, 99,115, 99,111,112,101, 95, 97,108,112,104, 97, + 0,118,101, 99,115, 99,111,112,101, 95,104,101,105,103,104,116, 0,109,105,110,109, 97,120, 91, 51, 93, 91, 50, 93, 0,104,105, +115,116, 0, 42,119, 97,118,101,102,111,114,109, 95, 49, 0, 42,119, 97,118,101,102,111,114,109, 95, 50, 0, 42,119, 97,118,101, +102,111,114,109, 95, 51, 0, 42,118,101, 99,115, 99,111,112,101, 0,119, 97,118,101,102,111,114,109, 95,116,111,116, 0,111,102, +102,115,101,116, 91, 50, 93, 0, 99,108,111,110,101, 0,109,116,101,120, 0, 42,105, 99,111,110, 95,105,109, 98,117,102, 0,105, + 99,111,110, 95,102,105,108,101,112, 97,116,104, 91, 49, 48, 50, 52, 93, 0,110,111,114,109, 97,108, 95,119,101,105,103,104,116, + 0,111, 98, 95,109,111,100,101, 0,106,105,116,116,101,114, 0,115,109,111,111,116,104, 95,115,116,114,111,107,101, 95,114, 97, +100,105,117,115, 0,115,109,111,111,116,104, 95,115,116,114,111,107,101, 95,102, 97, 99,116,111,114, 0,114, 97,116,101, 0,114, +103, 98, 91, 51, 93, 0,115, 99,117,108,112,116, 95,112,108, 97,110,101, 0,112,108, 97,110,101, 95,111,102,102,115,101,116, 0, +115, 99,117,108,112,116, 95,116,111,111,108, 0,118,101,114,116,101,120,112, 97,105,110,116, 95,116,111,111,108, 0,105,109, 97, +103,101,112, 97,105,110,116, 95,116,111,111,108, 0,112, 97,100, 51, 91, 53, 93, 0, 97,117,116,111,115,109,111,111,116,104, 95, +102, 97, 99,116,111,114, 0, 99,114,101, 97,115,101, 95,112,105,110, 99,104, 95,102, 97, 99,116,111,114, 0,112,108, 97,110,101, + 95,116,114,105,109, 0,116,101,120,116,117,114,101, 95,115, 97,109,112,108,101, 95, 98,105, 97,115, 0,116,101,120,116,117,114, +101, 95,111,118,101,114,108, 97,121, 95, 97,108,112,104, 97, 0, 97,100,100, 95, 99,111,108, 91, 51, 93, 0,115,117, 98, 95, 99, +111,108, 91, 51, 93, 0, 97, 99,116,105,118,101, 95,114,110,100, 0, 97, 99,116,105,118,101, 95, 99,108,111,110,101, 0, 97, 99, +116,105,118,101, 95,109, 97,115,107, 0, 42,108, 97,121,101,114,115, 0,116,121,112,101,109, 97,112, 91, 51, 52, 93, 0,116,111, +116,108, 97,121,101,114, 0,109, 97,120,108, 97,121,101,114, 0,116,111,116,115,105,122,101, 0, 42,112,111,111,108, 0, 42,101, +120,116,101,114,110, 97,108, 0,114,111,116, 91, 52, 93, 0, 97,118,101, 91, 51, 93, 0, 42,103,114,111,117,110,100, 0,119, 97, +110,100,101,114, 91, 51, 93, 0,114,101,115,116, 95,108,101,110,103,116,104, 0,112, 97,114,116,105, 99,108,101, 95,105,110,100, +101,120, 91, 50, 93, 0,100,101,108,101,116,101, 95,102,108, 97,103, 0,110,117,109, 0,112, 97,114,101,110,116, 0,112, 97, 91, + 52, 93, 0,119, 91, 52, 93, 0,102,117,118, 91, 52, 93, 0,102,111,102,102,115,101,116, 0,112,114,101,118, 95,115,116, 97,116, +101, 0, 42,104, 97,105,114, 0, 42, 98,111,105,100, 0,100,105,101,116,105,109,101, 0,110,117,109, 95,100,109, 99, 97, 99,104, +101, 0,104, 97,105,114, 95,105,110,100,101,120, 0, 97,108,105,118,101, 0,115,112,114,105,110,103, 95,107, 0,112,108, 97,115, +116,105, 99,105,116,121, 95, 99,111,110,115,116, 97,110,116, 0,121,105,101,108,100, 95,114, 97,116,105,111, 0,112,108, 97,115, +116,105, 99,105,116,121, 95, 98, 97,108, 97,110, 99,101, 0,121,105,101,108,100, 95, 98, 97,108, 97,110, 99,101, 0,118,105,115, + 99,111,115,105,116,121, 95,111,109,101,103, 97, 0,118,105,115, 99,111,115,105,116,121, 95, 98,101,116, 97, 0,115,116,105,102, +102,110,101,115,115, 95,107, 0,115,116,105,102,102,110,101,115,115, 95,107,110,101, 97,114, 0,114,101,115,116, 95,100,101,110, +115,105,116,121, 0, 98,117,111,121, 97,110, 99,121, 0,115,112,114,105,110,103, 95,102,114, 97,109,101,115, 0, 42, 98,111,105, +100,115, 0, 42,102,108,117,105,100, 0,100,105,115,116,114, 0,112,104,121,115,116,121,112,101, 0, 97,118,101,109,111,100,101, + 0,114,101, 97, 99,116,101,118,101,110,116, 0,100,114, 97,119, 0,100,114, 97,119, 95, 97,115, 0,100,114, 97,119, 95,115,105, +122,101, 0, 99,104,105,108,100,116,121,112,101, 0,114,101,110, 95, 97,115, 0,115,117, 98,102,114, 97,109,101,115, 0,100,114, + 97,119, 95, 99,111,108, 0,114,101,110, 95,115,116,101,112, 0,104, 97,105,114, 95,115,116,101,112, 0,107,101,121,115, 95,115, +116,101,112, 0, 97,100, 97,112,116, 95, 97,110,103,108,101, 0, 97,100, 97,112,116, 95,112,105,120, 0,114,111,116,102,114,111, +109, 0,105,110,116,101,103,114, 97,116,111,114, 0, 98, 98, 95, 97,108,105,103,110, 0, 98, 98, 95,117,118, 95,115,112,108,105, +116, 0, 98, 98, 95, 97,110,105,109, 0, 98, 98, 95,115,112,108,105,116, 95,111,102,102,115,101,116, 0, 98, 98, 95,116,105,108, +116, 0, 98, 98, 95,114, 97,110,100, 95,116,105,108,116, 0, 98, 98, 95,111,102,102,115,101,116, 91, 50, 93, 0, 98, 98, 95,115, +105,122,101, 91, 50, 93, 0, 98, 98, 95,118,101,108, 95,104,101, 97,100, 0, 98, 98, 95,118,101,108, 95,116, 97,105,108, 0, 99, +111,108,111,114, 95,118,101, 99, 95,109, 97,120, 0,115,105,109,112,108,105,102,121, 95,114,101,102,115,105,122,101, 0,115,105, +109,112,108,105,102,121, 95,114, 97,116,101, 0,115,105,109,112,108,105,102,121, 95,116,114, 97,110,115,105,116,105,111,110, 0, +115,105,109,112,108,105,102,121, 95,118,105,101,119,112,111,114,116, 0,116,105,109,101,116,119,101, 97,107, 0, 99,111,117,114, + 97,110,116, 95,116, 97,114,103,101,116, 0,106,105,116,102, 97, 99, 0,101,102,102, 95,104, 97,105,114, 0,103,114,105,100, 95, +114, 97,110,100, 0,112,115, 95,111,102,102,115,101,116, 91, 49, 93, 0,103,114,105,100, 95,114,101,115, 0,101,102,102,101, 99, +116,111,114, 95, 97,109,111,117,110,116, 0,116,105,109,101, 95,102,108, 97,103, 0,116,105,109,101, 95,112, 97,100, 91, 51, 93, + 0,112, 97,114,116,102, 97, 99, 0,116, 97,110,102, 97, 99, 0,116, 97,110,112,104, 97,115,101, 0,114,101, 97, 99,116,102, 97, + 99, 0,111, 98, 95,118,101,108, 91, 51, 93, 0, 97,118,101,102, 97, 99, 0,112,104, 97,115,101,102, 97, 99, 0,114, 97,110,100, +114,111,116,102, 97, 99, 0,114, 97,110,100,112,104, 97,115,101,102, 97, 99, 0,114, 97,110,100,115,105,122,101, 0, 97, 99, 99, + 91, 51, 93, 0,100,114, 97,103,102, 97, 99, 0, 98,114,111,119,110,102, 97, 99, 0,114, 97,110,100,108,101,110,103,116,104, 0, + 99,104,105,108,100, 95,110, 98,114, 0,114,101,110, 95, 99,104,105,108,100, 95,110, 98,114, 0,112, 97,114,101,110,116,115, 0, + 99,104,105,108,100,115,105,122,101, 0, 99,104,105,108,100,114, 97,110,100,115,105,122,101, 0, 99,104,105,108,100,114, 97,100, + 0, 99,104,105,108,100,102,108, 97,116, 0, 99,108,117,109,112,112,111,119, 0,107,105,110,107, 95,102,108, 97,116, 0,107,105, +110,107, 95, 97,109,112, 95, 99,108,117,109,112, 0,114,111,117,103,104, 49, 0,114,111,117,103,104, 49, 95,115,105,122,101, 0, +114,111,117,103,104, 50, 0,114,111,117,103,104, 50, 95,115,105,122,101, 0,114,111,117,103,104, 50, 95,116,104,114,101,115, 0, +114,111,117,103,104, 95,101,110,100, 0,114,111,117,103,104, 95,101,110,100, 95,115,104, 97,112,101, 0, 99,108,101,110,103,116, +104, 0, 99,108,101,110,103,116,104, 95,116,104,114,101,115, 0,112, 97,114,116,105,110,103, 95,102, 97, 99, 0,112, 97,114,116, +105,110,103, 95,109,105,110, 0,112, 97,114,116,105,110,103, 95,109, 97,120, 0, 98,114, 97,110, 99,104, 95,116,104,114,101,115, + 0,100,114, 97,119, 95,108,105,110,101, 91, 50, 93, 0,112, 97,116,104, 95,115,116, 97,114,116, 0,112, 97,116,104, 95,101,110, +100, 0,116,114, 97,105,108, 95, 99,111,117,110,116, 0,107,101,121,101,100, 95,108,111,111,112,115, 0,100,117,112,108,105,119, +101,105,103,104,116,115, 0, 42,101,102,102, 95,103,114,111,117,112, 0, 42,100,117,112, 95,111, 98, 0, 42, 98, 98, 95,111, 98, + 0, 42,112,100, 50, 0, 42,112, 97,114,116, 0, 42,112, 97,114,116,105, 99,108,101,115, 0, 42, 42,112, 97,116,104, 99, 97, 99, +104,101, 0, 42, 42, 99,104,105,108,100, 99, 97, 99,104,101, 0,112, 97,116,104, 99, 97, 99,104,101, 98,117,102,115, 0, 99,104, +105,108,100, 99, 97, 99,104,101, 98,117,102,115, 0, 42, 99,108,109,100, 0, 42,104, 97,105,114, 95,105,110, 95,100,109, 0, 42, +104, 97,105,114, 95,111,117,116, 95,100,109, 0, 42,116, 97,114,103,101,116, 95,111, 98, 0, 42,108, 97,116,116,105, 99,101, 0, +116,114,101,101, 95,102,114, 97,109,101, 0, 98,118,104,116,114,101,101, 95,102,114, 97,109,101, 0, 99,104,105,108,100, 95,115, +101,101,100, 0,116,111,116,117,110,101,120,105,115,116, 0,116,111,116, 99,104,105,108,100, 0,116,111,116, 99, 97, 99,104,101, +100, 0,116,111,116, 99,104,105,108,100, 99, 97, 99,104,101, 0,116, 97,114,103,101,116, 95,112,115,121,115, 0,116,111,116,107, +101,121,101,100, 0, 98, 97,107,101,115,112, 97, 99,101, 0, 98, 98, 95,117,118,110, 97,109,101, 91, 51, 93, 91, 54, 52, 93, 0, +118,103,114,111,117,112, 91, 49, 50, 93, 0,118,103, 95,110,101,103, 0,114,116, 51, 0, 42,114,101,110,100,101,114,100, 97,116, + 97, 0, 42,101,102,102,101, 99,116,111,114,115, 0, 42,102,108,117,105,100, 95,115,112,114,105,110,103,115, 0,116,111,116, 95, +102,108,117,105,100,115,112,114,105,110,103,115, 0, 97,108,108,111, 99, 95,102,108,117,105,100,115,112,114,105,110,103,115, 0, + 42,116,114,101,101, 0, 42,112,100,100, 0, 42,102,114, 97,110,100, 0,100,116, 95,102,114, 97, 99, 0, 95,112, 97,100, 0, 67, +100,105,115, 0, 67,118,105, 0,115,116,114,117, 99,116,117,114, 97,108, 0, 98,101,110,100,105,110,103, 0,109, 97,120, 95, 98, +101,110,100, 0,109, 97,120, 95,115,116,114,117, 99,116, 0,109, 97,120, 95,115,104,101, 97,114, 0, 97,118,103, 95,115,112,114, +105,110,103, 95,108,101,110, 0,116,105,109,101,115, 99, 97,108,101, 0,101,102,102, 95,102,111,114, 99,101, 95,115, 99, 97,108, +101, 0,101,102,102, 95,119,105,110,100, 95,115, 99, 97,108,101, 0,115,105,109, 95,116,105,109,101, 95,111,108,100, 0,118,101, +108,111, 99,105,116,121, 95,115,109,111,111,116,104, 0, 99,111,108,108,105,100,101,114, 95,102,114,105, 99,116,105,111,110, 0, +118,101,108, 95,100, 97,109,112,105,110,103, 0,115,116,101,112,115, 80,101,114, 70,114, 97,109,101, 0,112,114,101,114,111,108, +108, 0,109, 97,120,115,112,114,105,110,103,108,101,110, 0,115,111,108,118,101,114, 95,116,121,112,101, 0,118,103,114,111,117, +112, 95, 98,101,110,100, 0,118,103,114,111,117,112, 95,109, 97,115,115, 0,118,103,114,111,117,112, 95,115,116,114,117, 99,116, + 0,115,104, 97,112,101,107,101,121, 95,114,101,115,116, 0,112,114,101,115,101,116,115, 0,114,101,115,101,116, 0, 42, 99,111, +108,108,105,115,105,111,110, 95,108,105,115,116, 0,101,112,115,105,108,111,110, 0,115,101,108,102, 95,102,114,105, 99,116,105, +111,110, 0,115,101,108,102,101,112,115,105,108,111,110, 0,114,101,112,101,108, 95,102,111,114, 99,101, 0,100,105,115,116, 97, +110, 99,101, 95,114,101,112,101,108, 0,115,101,108,102, 95,108,111,111,112, 95, 99,111,117,110,116, 0,108,111,111,112, 95, 99, +111,117,110,116, 0,112,114,101,115,115,117,114,101, 0,116,104,105, 99,107,110,101,115,115, 0,115,116,114,111,107,101,115, 0, +102,114, 97,109,101,110,117,109, 0, 42, 97, 99,116,102,114, 97,109,101, 0,103,115,116,101,112, 0,105,110,102,111, 91, 49, 50, + 56, 93, 0,115, 98,117,102,102,101,114, 95,115,105,122,101, 0,115, 98,117,102,102,101,114, 95,115,102,108, 97,103, 0, 42,115, + 98,117,102,102,101,114, 0,108,105,115,116, 0,112,114,105,110,116,108,101,118,101,108, 0,115,116,111,114,101,108,101,118,101, +108, 0, 42,114,101,112,111,114,116,116,105,109,101,114, 0, 42,119,105,110,100,114, 97,119, 97, 98,108,101, 0, 42,119,105,110, + 97, 99,116,105,118,101, 0,119,105,110,100,111,119,115, 0,105,110,105,116,105, 97,108,105,122,101,100, 0,102,105,108,101, 95, +115, 97,118,101,100, 0,111,112, 95,117,110,100,111, 95,100,101,112,116,104, 0,111,112,101,114, 97,116,111,114,115, 0,113,117, +101,117,101, 0,114,101,112,111,114,116,115, 0,106,111, 98,115, 0,112, 97,105,110,116, 99,117,114,115,111,114,115, 0,100,114, + 97,103,115, 0,107,101,121, 99,111,110,102,105,103,115, 0, 42,100,101,102, 97,117,108,116, 99,111,110,102, 0, 42, 97,100,100, +111,110, 99,111,110,102, 0, 42,117,115,101,114, 99,111,110,102, 0,116,105,109,101,114,115, 0, 42, 97,117,116,111,115, 97,118, +101,116,105,109,101,114, 0, 42,103,104,111,115,116,119,105,110, 0,103,114, 97, 98, 99,117,114,115,111,114, 0, 42,115, 99,114, +101,101,110, 0, 42,110,101,119,115, 99,114,101,101,110, 0,115, 99,114,101,101,110,110, 97,109,101, 91, 54, 52, 93, 0,112,111, +115,120, 0,112,111,115,121, 0,119,105,110,100,111,119,115,116, 97,116,101, 0,109,111,110,105,116,111,114, 0,108, 97,115,116, + 99,117,114,115,111,114, 0,109,111,100, 97,108, 99,117,114,115,111,114, 0, 97,100,100,109,111,117,115,101,109,111,118,101, 0, + 42,101,118,101,110,116,115,116, 97,116,101, 0, 42, 99,117,114,115,119,105,110, 0, 42,116,119,101, 97,107, 0,100,114, 97,119, +109,101,116,104,111,100, 0,100,114, 97,119,102, 97,105,108, 0, 42,100,114, 97,119,100, 97,116, 97, 0,109,111,100, 97,108,104, + 97,110,100,108,101,114,115, 0,115,117, 98,119,105,110,100,111,119,115, 0,103,101,115,116,117,114,101, 0,105,100,110, 97,109, +101, 91, 54, 52, 93, 0,112,114,111,112,118, 97,108,117,101, 0,115,104,105,102,116, 0, 99,116,114,108, 0, 97,108,116, 0,111, +115,107,101,121, 0,107,101,121,109,111,100,105,102,105,101,114, 0,109, 97,112,116,121,112,101, 0, 42,112,116,114, 0, 42,114, +101,109,111,118,101, 95,105,116,101,109, 0, 42, 97,100,100, 95,105,116,101,109, 0,105,116,101,109,115, 0,100,105,102,102, 95, +105,116,101,109,115, 0,115,112, 97, 99,101,105,100, 0,114,101,103,105,111,110,105,100, 0,107,109,105, 95,105,100, 0, 40, 42, +112,111,108,108, 41, 40, 41, 0, 42,109,111,100, 97,108, 95,105,116,101,109,115, 0, 98, 97,115,101,110, 97,109,101, 91, 54, 52, + 93, 0, 97, 99,116,107,101,121,109, 97,112, 0, 42, 99,117,115,116,111,109,100, 97,116, 97, 0, 42,112,121, 95,105,110,115,116, + 97,110, 99,101, 0, 42,114,101,112,111,114,116,115, 0,109, 97, 99,114,111, 0, 42,111,112,109, 0, 42,101,100, 97,116, 97, 0, + 42, 99,111,101,102,102,105, 99,105,101,110,116,115, 0, 97,114,114, 97,121,115,105,122,101, 0,112,111,108,121, 95,111,114,100, +101,114, 0, 97,109,112,108,105,116,117,100,101, 0,112,104, 97,115,101, 95,109,117,108,116,105,112,108,105,101,114, 0,112,104, + 97,115,101, 95,111,102,102,115,101,116, 0,118, 97,108,117,101, 95,111,102,102,115,101,116, 0,109,105,100,118, 97,108, 0, 98, +101,102,111,114,101, 95,109,111,100,101, 0, 97,102,116,101,114, 95,109,111,100,101, 0, 98,101,102,111,114,101, 95, 99,121, 99, +108,101,115, 0, 97,102,116,101,114, 95, 99,121, 99,108,101,115, 0,114,101, 99,116, 0,112,104, 97,115,101, 0,109,111,100,105, +102,105, 99, 97,116,105,111,110, 0,115,116,101,112, 95,115,105,122,101, 0, 42,114,110, 97, 95,112, 97,116,104, 0,112, 99,104, + 97,110, 95,110, 97,109,101, 91, 51, 50, 93, 0,116,114, 97,110,115, 67,104, 97,110, 0,105,100,116,121,112,101, 0,116, 97,114, +103,101,116,115, 91, 56, 93, 0,110,117,109, 95,116, 97,114,103,101,116,115, 0,118, 97,114,105, 97, 98,108,101,115, 0,101,120, +112,114,101,115,115,105,111,110, 91, 50, 53, 54, 93, 0, 42,101,120,112,114, 95, 99,111,109,112, 0,118,101, 99, 91, 50, 93, 0, + 42,102,112,116, 0, 97,114,114, 97,121, 95,105,110,100,101,120, 0, 99,111,108,111,114, 95,109,111,100,101, 0, 99,111,108,111, +114, 91, 51, 93, 0,102,114,111,109, 91, 49, 50, 56, 93, 0,116,111, 91, 49, 50, 56, 93, 0,109, 97,112,112,105,110,103,115, 0, +115,116,114,105,112,115, 0, 42,114,101,109, 97,112, 0,102, 99,117,114,118,101,115, 0,115,116,114,105,112, 95,116,105,109,101, + 0, 98,108,101,110,100,109,111,100,101, 0,101,120,116,101,110,100,109,111,100,101, 0, 42,115,112,101, 97,107,101,114, 95,104, + 97,110,100,108,101, 0,103,114,111,117,112, 91, 54, 52, 93, 0,103,114,111,117,112,109,111,100,101, 0,107,101,121,105,110,103, +102,108, 97,103, 0,112, 97,116,104,115, 0,100,101,115, 99,114,105,112,116,105,111,110, 91, 50, 52, 48, 93, 0,116,121,112,101, +105,110,102,111, 91, 54, 52, 93, 0, 97, 99,116,105,118,101, 95,112, 97,116,104, 0, 42,116,109,112, 97, 99,116, 0,110,108, 97, + 95,116,114, 97, 99,107,115, 0, 42, 97, 99,116,115,116,114,105,112, 0,100,114,105,118,101,114,115, 0,111,118,101,114,114,105, +100,101,115, 0, 97, 99,116, 95, 98,108,101,110,100,109,111,100,101, 0, 97, 99,116, 95,101,120,116,101,110,100,109,111,100,101, + 0, 97, 99,116, 95,105,110,102,108,117,101,110, 99,101, 0,114,117,108,101, 0,111,112,116,105,111,110,115, 0,102,101, 97,114, + 95,102, 97, 99,116,111,114, 0,115,105,103,110, 97,108, 95,105,100, 0,108,111,111,107, 95, 97,104,101, 97,100, 0,111,108,111, + 99, 91, 51, 93, 0,113,117,101,117,101, 95,115,105,122,101, 0,119, 97,110,100,101,114, 0,102,108,101,101, 95,100,105,115,116, + 97,110, 99,101, 0,104,101, 97,108,116,104, 0,115,116, 97,116,101, 95,105,100, 0,114,117,108,101,115, 0, 99,111,110,100,105, +116,105,111,110,115, 0, 97, 99,116,105,111,110,115, 0,114,117,108,101,115,101,116, 95,116,121,112,101, 0,114,117,108,101, 95, +102,117,122,122,105,110,101,115,115, 0,108, 97,115,116, 95,115,116, 97,116,101, 95,105,100, 0,108, 97,110,100,105,110,103, 95, +115,109,111,111,116,104,110,101,115,115, 0, 98, 97,110,107,105,110,103, 0, 97,103,103,114,101,115,115,105,111,110, 0, 97,105, +114, 95,109,105,110, 95,115,112,101,101,100, 0, 97,105,114, 95,109, 97,120, 95,115,112,101,101,100, 0, 97,105,114, 95,109, 97, +120, 95, 97, 99, 99, 0, 97,105,114, 95,109, 97,120, 95, 97,118,101, 0, 97,105,114, 95,112,101,114,115,111,110, 97,108, 95,115, +112, 97, 99,101, 0,108, 97,110,100, 95,106,117,109,112, 95,115,112,101,101,100, 0,108, 97,110,100, 95,109, 97,120, 95,115,112, +101,101,100, 0,108, 97,110,100, 95,109, 97,120, 95, 97, 99, 99, 0,108, 97,110,100, 95,109, 97,120, 95, 97,118,101, 0,108, 97, +110,100, 95,112,101,114,115,111,110, 97,108, 95,115,112, 97, 99,101, 0,108, 97,110,100, 95,115,116,105, 99,107, 95,102,111,114, + 99,101, 0,115,116, 97,116,101,115, 0, 42,115,109,100, 0, 42,102,108,117,105,100, 95,103,114,111,117,112, 0, 42, 99,111,108, +108, 95,103,114,111,117,112, 0, 42,119,116, 0, 42,116,101,120, 95,119,116, 0, 42,116,101,120, 95,115,104, 97,100,111,119, 0, + 42,115,104, 97,100,111,119, 0,112, 48, 91, 51, 93, 0,112, 49, 91, 51, 93, 0,100,120, 0,111,109,101,103, 97, 0,116,101,109, +112, 65,109, 98, 0, 98,101,116, 97, 0,114,101,115, 91, 51, 93, 0, 97,109,112,108,105,102,121, 0,109, 97,120,114,101,115, 0, +118,105,101,119,115,101,116,116,105,110,103,115, 0,110,111,105,115,101, 0,100,105,115,115, 95,112,101,114, 99,101,110,116, 0, +100,105,115,115, 95,115,112,101,101,100, 0,114,101,115, 95,119,116, 91, 51, 93, 0,100,120, 95,119,116, 0,118, 51,100,110,117, +109, 0, 99, 97, 99,104,101, 95, 99,111,109,112, 0, 99, 97, 99,104,101, 95,104,105,103,104, 95, 99,111,109,112, 0, 42,112,111, +105,110,116, 95, 99, 97, 99,104,101, 91, 50, 93, 0,112,116, 99, 97, 99,104,101,115, 91, 50, 93, 0, 98,111,114,100,101,114, 95, + 99,111,108,108,105,115,105,111,110,115, 0,116,105,109,101, 95,115, 99, 97,108,101, 0,118,111,114,116,105, 99,105,116,121, 0, +118,101,108,111, 99,105,116,121, 91, 50, 93, 0,118,101,108, 95,109,117,108,116,105, 0,118,103,114,112, 95,104,101, 97,116, 95, +115, 99, 97,108,101, 91, 50, 93, 0,118,103,114,111,117,112, 95,102,108,111,119, 0,118,103,114,111,117,112, 95,100,101,110,115, +105,116,121, 0,118,103,114,111,117,112, 95,104,101, 97,116, 0, 42,112,111,105,110,116,115, 95,111,108,100, 0, 42,118,101,108, + 0,109, 97,116, 95,111,108,100, 91, 52, 93, 91, 52, 93, 0,118,111,108,117,109,101, 95,109, 97,120, 0,118,111,108,117,109,101, + 95,109,105,110, 0,100,105,115,116, 97,110, 99,101, 95,109, 97,120, 0,100,105,115,116, 97,110, 99,101, 95,114,101,102,101,114, +101,110, 99,101, 0, 99,111,110,101, 95, 97,110,103,108,101, 95,111,117,116,101,114, 0, 99,111,110,101, 95, 97,110,103,108,101, + 95,105,110,110,101,114, 0, 99,111,110,101, 95,118,111,108,117,109,101, 95,111,117,116,101,114, 0,114,101,110,100,101,114, 95, +102,108, 97,103, 0, 98,117,105,108,100, 95,115,105,122,101, 95,102,108, 97,103, 0, 98,117,105,108,100, 95,116, 99, 95,102,108, + 97,103, 0,108, 97,115,116,115,105,122,101, 91, 50, 93, 0,116,114, 97, 99,107,105,110,103, 0, 42,116,114, 97, 99,107,105,110, +103, 95, 99,111,110,116,101,120,116, 0,112,114,111,120,121, 0,116,114, 97, 99,107, 95,112,114,101,118,105,101,119, 95,104,101, +105,103,104,116, 0, 42,116,114, 97, 99,107, 95,112,114,101,118,105,101,119, 0,116,114, 97, 99,107, 95,112,111,115, 91, 50, 93, + 0,116,114, 97, 99,107, 95,100,105,115, 97, 98,108,101,100, 0, 42,109, 97,114,107,101,114, 0,115,108,105,100,101, 95,115, 99, + 97,108,101, 91, 50, 93, 0,101,114,114,111,114, 0, 42,105,110,116,114,105,110,115,105, 99,115, 0,115,101,110,115,111,114, 95, +119,105,100,116,104, 0,112,105,120,101,108, 95, 97,115,112,101, 99,116, 0,102,111, 99, 97,108, 0,117,110,105,116,115, 0,112, +114,105,110, 99,105,112, 97,108, 91, 50, 93, 0,107, 49, 0,107, 50, 0,107, 51, 0,112,111,115, 91, 50, 93, 0,112, 97,116, 95, +109,105,110, 91, 50, 93, 0,112, 97,116, 95,109, 97,120, 91, 50, 93, 0,115,101, 97,114, 99,104, 95,109,105,110, 91, 50, 93, 0, +115,101, 97,114, 99,104, 95,109, 97,120, 91, 50, 93, 0,109, 97,114,107,101,114,115,110,114, 0,108, 97,115,116, 95,109, 97,114, +107,101,114, 0, 42,109, 97,114,107,101,114,115, 0, 98,117,110,100,108,101, 95,112,111,115, 91, 51, 93, 0,112, 97,116, 95,102, +108, 97,103, 0,115,101, 97,114, 99,104, 95,102,108, 97,103, 0,102,114, 97,109,101,115, 95,108,105,109,105,116, 0,112, 97,116, +116,101,114,110, 95,109, 97,116, 99,104, 0,116,114, 97, 99,107,101,114, 0,112,121,114, 97,109,105,100, 95,108,101,118,101,108, +115, 0,109,105,110,105,109,117,109, 95, 99,111,114,114,101,108, 97,116,105,111,110, 0,100,101,102, 97,117,108,116, 95,116,114, + 97, 99,107,101,114, 0,100,101,102, 97,117,108,116, 95,112,121,114, 97,109,105,100, 95,108,101,118,101,108,115, 0,100,101,102, + 97,117,108,116, 95,109,105,110,105,109,117,109, 95, 99,111,114,114,101,108, 97,116,105,111,110, 0,100,101,102, 97,117,108,116, + 95,112, 97,116,116,101,114,110, 95,115,105,122,101, 0,100,101,102, 97,117,108,116, 95,115,101, 97,114, 99,104, 95,115,105,122, +101, 0,100,101,102, 97,117,108,116, 95,102,114, 97,109,101,115, 95,108,105,109,105,116, 0,100,101,102, 97,117,108,116, 95,109, + 97,114,103,105,110, 0,100,101,102, 97,117,108,116, 95,112, 97,116,116,101,114,110, 95,109, 97,116, 99,104, 0,100,101,102, 97, +117,108,116, 95,102,108, 97,103, 0,112,111,100, 0,107,101,121,102,114, 97,109,101, 49, 0,107,101,121,102,114, 97,109,101, 50, + 0,114,101,102,105,110,101, 95, 99, 97,109,101,114, 97, 95,105,110,116,114,105,110,115,105, 99,115, 0,112, 97,100, 50, 51, 0, + 99,108,101, 97,110, 95,102,114, 97,109,101,115, 0, 99,108,101, 97,110, 95, 97, 99,116,105,111,110, 0, 99,108,101, 97,110, 95, +101,114,114,111,114, 0,111, 98,106,101, 99,116, 95,100,105,115,116, 97,110, 99,101, 0,116,111,116, 95,116,114, 97, 99,107, 0, + 97, 99,116, 95,116,114, 97, 99,107, 0,109, 97,120,115, 99, 97,108,101, 0, 42,114,111,116, 95,116,114, 97, 99,107, 0,108,111, + 99,105,110,102, 0,115, 99, 97,108,101,105,110,102, 0,114,111,116,105,110,102, 0, 42,115, 99, 97,108,101,105, 98,117,102, 0, +108, 97,115,116, 95, 99, 97,109,101,114, 97, 0, 99, 97,109,110,114, 0, 42, 99, 97,109,101,114, 97,115, 0,116,114, 97, 99,107, +115, 0,114,101, 99,111,110,115,116,114,117, 99,116,105,111,110, 0,109,101,115,115, 97,103,101, 91, 50, 53, 54, 93, 0,115,101, +116,116,105,110,103,115, 0, 99, 97,109,101,114, 97, 0,115,116, 97, 98,105,108,105,122, 97,116,105,111,110, 0, 42, 97, 99,116, + 95,116,114, 97, 99,107, 0,111, 98,106,101, 99,116,115, 0,111, 98,106,101, 99,116,110,114, 0,116,111,116, 95,111, 98,106,101, + 99,116, 0, 42, 98,114,117,115,104, 95,103,114,111,117,112, 0, 99,117,114,114,101,110,116, 95,102,114, 97,109,101, 0,100,105, +115,112, 95,116,121,112,101, 0,105,109, 97,103,101, 95,102,105,108,101,102,111,114,109, 97,116, 0,101,102,102,101, 99,116, 95, +117,105, 0,112,114,101,118,105,101,119, 95,105,100, 0,105,110,105,116, 95, 99,111,108,111,114, 95,116,121,112,101, 0,112, 97, +100, 95,115, 0,105,109, 97,103,101, 95,114,101,115,111,108,117,116,105,111,110, 0,115,117, 98,115,116,101,112,115, 0,105,110, +105,116, 95, 99,111,108,111,114, 91, 52, 93, 0, 42,105,110,105,116, 95,116,101,120,116,117,114,101, 0,105,110,105,116, 95,108, + 97,121,101,114,110, 97,109,101, 91, 54, 52, 93, 0,100,114,121, 95,115,112,101,101,100, 0, 99,111,108,111,114, 95,100,114,121, + 95,116,104,114,101,115,104,111,108,100, 0,100,101,112,116,104, 95, 99,108, 97,109,112, 0,100,105,115,112, 95,102, 97, 99,116, +111,114, 0,115,112,114,101, 97,100, 95,115,112,101,101,100, 0, 99,111,108,111,114, 95,115,112,114,101, 97,100, 95,115,112,101, +101,100, 0,115,104,114,105,110,107, 95,115,112,101,101,100, 0,100,114,105,112, 95,118,101,108, 0,100,114,105,112, 95, 97, 99, + 99, 0,105,110,102,108,117,101,110, 99,101, 95,115, 99, 97,108,101, 0,114, 97,100,105,117,115, 95,115, 99, 97,108,101, 0,119, + 97,118,101, 95,100, 97,109,112,105,110,103, 0,119, 97,118,101, 95,115,112,101,101,100, 0,119, 97,118,101, 95,116,105,109,101, +115, 99, 97,108,101, 0,119, 97,118,101, 95,115,112,114,105,110,103, 0,105,109, 97,103,101, 95,111,117,116,112,117,116, 95,112, + 97,116,104, 91, 49, 48, 50, 52, 93, 0,111,117,116,112,117,116, 95,110, 97,109,101, 91, 54, 52, 93, 0,111,117,116,112,117,116, + 95,110, 97,109,101, 50, 91, 54, 52, 93, 0, 42,112,109,100, 0,115,117,114,102, 97, 99,101,115, 0, 97, 99,116,105,118,101, 95, +115,117,114, 0,101,114,114,111,114, 91, 54, 52, 93, 0, 99,111,108,108,105,115,105,111,110, 0,119,101,116,110,101,115,115, 0, +112, 97,114,116,105, 99,108,101, 95,114, 97,100,105,117,115, 0,112, 97,114,116,105, 99,108,101, 95,115,109,111,111,116,104, 0, +112, 97,105,110,116, 95,100,105,115,116, 97,110, 99,101, 0, 42,112, 97,105,110,116, 95,114, 97,109,112, 0, 42,118,101,108, 95, +114, 97,109,112, 0,112,114,111,120,105,109,105,116,121, 95,102, 97,108,108,111,102,102, 0,114, 97,121, 95,100,105,114, 0,119, + 97,118,101, 95,102, 97, 99,116,111,114, 0,119, 97,118,101, 95, 99,108, 97,109,112, 0,109, 97,120, 95,118,101,108,111, 99,105, +116,121, 0,115,109,117,100,103,101, 95,115,116,114,101,110,103,116,104, 0, 0, 84, 89, 80, 69, 16, 2, 0, 0, 99,104, 97,114, + 0,117, 99,104, 97,114, 0,115,104,111,114,116, 0,117,115,104,111,114,116, 0,105,110,116, 0,108,111,110,103, 0,117,108,111, +110,103, 0,102,108,111, 97,116, 0,100,111,117, 98,108,101, 0,105,110,116, 54, 52, 95,116, 0,117,105,110,116, 54, 52, 95,116, + 0,118,111,105,100, 0, 76,105,110,107, 0, 76,105,110,107, 68, 97,116, 97, 0, 76,105,115,116, 66, 97,115,101, 0,118,101, 99, + 50,115, 0,118,101, 99, 50,102, 0,118,101, 99, 51,102, 0,114, 99,116,105, 0,114, 99,116,102, 0, 73, 68, 80,114,111,112,101, +114,116,121, 68, 97,116, 97, 0, 73, 68, 80,114,111,112,101,114,116,121, 0, 73, 68, 0, 76,105, 98,114, 97,114,121, 0, 70,105, +108,101, 68, 97,116, 97, 0, 80,114,101,118,105,101,119, 73,109, 97,103,101, 0, 73,112,111, 68,114,105,118,101,114, 0, 79, 98, +106,101, 99,116, 0, 73,112,111, 67,117,114,118,101, 0, 66, 80,111,105,110,116, 0, 66,101,122, 84,114,105,112,108,101, 0, 73, +112,111, 0, 75,101,121, 66,108,111, 99,107, 0, 75,101,121, 0, 65,110,105,109, 68, 97,116, 97, 0, 84,101,120,116, 76,105,110, +101, 0, 84,101,120,116, 77, 97,114,107,101,114, 0, 84,101,120,116, 0, 80, 97, 99,107,101,100, 70,105,108,101, 0, 67, 97,109, +101,114, 97, 0, 73,109, 97,103,101, 85,115,101,114, 0, 83, 99,101,110,101, 0, 73,109, 97,103,101, 0, 71, 80, 85, 84,101,120, +116,117,114,101, 0, 97,110,105,109, 0, 82,101,110,100,101,114, 82,101,115,117,108,116, 0, 77, 84,101,120, 0, 84,101,120, 0, + 80,108,117,103,105,110, 84,101,120, 0, 67, 66, 68, 97,116, 97, 0, 67,111,108,111,114, 66, 97,110,100, 0, 69,110,118, 77, 97, +112, 0, 73,109, 66,117,102, 0, 80,111,105,110,116, 68,101,110,115,105,116,121, 0, 67,117,114,118,101, 77, 97,112,112,105,110, +103, 0, 86,111,120,101,108, 68, 97,116, 97, 0, 79, 99,101, 97,110, 84,101,120, 0, 98, 78,111,100,101, 84,114,101,101, 0, 84, +101,120, 77, 97,112,112,105,110,103, 0, 67,111,108,111,114, 77, 97,112,112,105,110,103, 0, 76, 97,109,112, 0, 86,111,108,117, +109,101, 83,101,116,116,105,110,103,115, 0, 71, 97,109,101, 83,101,116,116,105,110,103,115, 0, 77, 97,116,101,114,105, 97,108, + 0, 71,114,111,117,112, 0, 86, 70,111,110,116, 0, 86, 70,111,110,116, 68, 97,116, 97, 0, 77,101,116, 97, 69,108,101,109, 0, + 66,111,117,110,100, 66,111,120, 0, 77,101,116, 97, 66, 97,108,108, 0, 78,117,114, 98, 0, 67,104, 97,114, 73,110,102,111, 0, + 84,101,120,116, 66,111,120, 0, 69,100,105,116, 78,117,114, 98, 0, 71, 72, 97,115,104, 0, 67,117,114,118,101, 0, 80, 97,116, +104, 0, 83,101,108, 66,111,120, 0, 69,100,105,116, 70,111,110,116, 0, 77,101,115,104, 0, 77, 80,111,108,121, 0, 77, 84,101, +120, 80,111,108,121, 0, 77, 76,111,111,112, 0, 77, 76,111,111,112, 85, 86, 0, 77, 76,111,111,112, 67,111,108, 0, 77, 70, 97, + 99,101, 0, 77, 84, 70, 97, 99,101, 0, 84, 70, 97, 99,101, 0, 77, 86,101,114,116, 0, 77, 69,100,103,101, 0, 77, 68,101,102, +111,114,109, 86,101,114,116, 0, 77, 67,111,108, 0, 77, 83,116,105, 99,107,121, 0, 77, 83,101,108,101, 99,116, 0, 66, 77, 69, +100,105,116, 77,101,115,104, 0, 67,117,115,116,111,109, 68, 97,116, 97, 0, 77,117,108,116,105,114,101,115, 0, 77, 68,101,102, +111,114,109, 87,101,105,103,104,116, 0, 77, 70,108,111, 97,116, 80,114,111,112,101,114,116,121, 0, 77, 73,110,116, 80,114,111, +112,101,114,116,121, 0, 77, 83,116,114,105,110,103, 80,114,111,112,101,114,116,121, 0, 79,114,105,103, 83,112, 97, 99,101, 70, + 97, 99,101, 0, 79,114,105,103, 83,112, 97, 99,101, 76,111,111,112, 0, 77, 68,105,115,112,115, 0, 77,117,108,116,105,114,101, +115, 67,111,108, 0, 77,117,108,116,105,114,101,115, 67,111,108, 70, 97, 99,101, 0, 77,117,108,116,105,114,101,115, 70, 97, 99, +101, 0, 77,117,108,116,105,114,101,115, 69,100,103,101, 0, 77,117,108,116,105,114,101,115, 76,101,118,101,108, 0, 77, 82,101, + 99, 97,115,116, 0, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 77, 97,112,112,105,110,103, 73,110,102,111, 77,111,100, +105,102,105,101,114, 68, 97,116, 97, 0, 83,117, 98,115,117,114,102, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 76, 97, +116,116,105, 99,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 67,117,114,118,101, 77,111,100,105,102,105,101,114, 68, + 97,116, 97, 0, 66,117,105,108,100, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 77, 97,115,107, 77,111,100,105,102,105, +101,114, 68, 97,116, 97, 0, 65,114,114, 97,121, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 77,105,114,114,111,114, 77, +111,100,105,102,105,101,114, 68, 97,116, 97, 0, 69,100,103,101, 83,112,108,105,116, 77,111,100,105,102,105,101,114, 68, 97,116, + 97, 0, 66,101,118,101,108, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 66, 77,101,115,104, 77,111,100,105,102,105,101, +114, 68, 97,116, 97, 0, 83,109,111,107,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 83,109,111,107,101, 68,111,109, + 97,105,110, 83,101,116,116,105,110,103,115, 0, 83,109,111,107,101, 70,108,111,119, 83,101,116,116,105,110,103,115, 0, 83,109, +111,107,101, 67,111,108,108, 83,101,116,116,105,110,103,115, 0, 68,105,115,112,108, 97, 99,101, 77,111,100,105,102,105,101,114, + 68, 97,116, 97, 0, 85, 86, 80,114,111,106,101, 99,116, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 68,101, 99,105,109, + 97,116,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 83,109,111,111,116,104, 77,111,100,105,102,105,101,114, 68, 97, +116, 97, 0, 67, 97,115,116, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 87, 97,118,101, 77,111,100,105,102,105,101,114, + 68, 97,116, 97, 0, 65,114,109, 97,116,117,114,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 72,111,111,107, 77,111, +100,105,102,105,101,114, 68, 97,116, 97, 0, 83,111,102,116, 98,111,100,121, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, + 67,108,111,116,104, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 67,108,111,116,104, 0, 67,108,111,116,104, 83,105,109, + 83,101,116,116,105,110,103,115, 0, 67,108,111,116,104, 67,111,108,108, 83,101,116,116,105,110,103,115, 0, 80,111,105,110,116, + 67, 97, 99,104,101, 0, 67,111,108,108,105,115,105,111,110, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 66, 86, 72, 84, +114,101,101, 0, 83,117,114,102, 97, 99,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 68,101,114,105,118,101,100, 77, +101,115,104, 0, 66, 86, 72, 84,114,101,101, 70,114,111,109, 77,101,115,104, 0, 66,111,111,108,101, 97,110, 77,111,100,105,102, +105,101,114, 68, 97,116, 97, 0, 77, 68,101,102, 73,110,102,108,117,101,110, 99,101, 0, 77, 68,101,102, 67,101,108,108, 0, 77, +101,115,104, 68,101,102,111,114,109, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 80, 97,114,116,105, 99,108,101, 83,121, +115,116,101,109, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 80, 97,114,116,105, 99,108,101, 83,121,115,116,101,109, 0, + 80, 97,114,116,105, 99,108,101, 73,110,115,116, 97,110, 99,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 69,120,112, +108,111,100,101, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 77,117,108,116,105,114,101,115, 77,111,100,105,102,105,101, +114, 68, 97,116, 97, 0, 70,108,117,105,100,115,105,109, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 70,108,117,105,100, +115,105,109, 83,101,116,116,105,110,103,115, 0, 83,104,114,105,110,107,119,114, 97,112, 77,111,100,105,102,105,101,114, 68, 97, +116, 97, 0, 83,105,109,112,108,101, 68,101,102,111,114,109, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 83,104, 97,112, +101, 75,101,121, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 83,111,108,105,100,105,102,121, 77,111,100,105,102,105,101, +114, 68, 97,116, 97, 0, 83, 99,114,101,119, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 79, 99,101, 97,110, 77,111,100, +105,102,105,101,114, 68, 97,116, 97, 0, 79, 99,101, 97,110, 0, 79, 99,101, 97,110, 67, 97, 99,104,101, 0, 87, 97,114,112, 77, +111,100,105,102,105,101,114, 68, 97,116, 97, 0, 87,101,105,103,104,116, 86, 71, 69,100,105,116, 77,111,100,105,102,105,101,114, + 68, 97,116, 97, 0, 87,101,105,103,104,116, 86, 71, 77,105,120, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 87,101,105, +103,104,116, 86, 71, 80,114,111,120,105,109,105,116,121, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 68,121,110, 97,109, +105, 99, 80, 97,105,110,116, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 68,121,110, 97,109,105, 99, 80, 97,105,110,116, + 67, 97,110,118, 97,115, 83,101,116,116,105,110,103,115, 0, 68,121,110, 97,109,105, 99, 80, 97,105,110,116, 66,114,117,115,104, + 83,101,116,116,105,110,103,115, 0, 82,101,109,101,115,104, 77,111,100,105,102,105,101,114, 68, 97,116, 97, 0, 69,100,105,116, + 76, 97,116,116, 0, 76, 97,116,116,105, 99,101, 0, 98, 68,101,102,111,114,109, 71,114,111,117,112, 0, 83, 99,117,108,112,116, + 83,101,115,115,105,111,110, 0, 98, 65, 99,116,105,111,110, 0, 98, 80,111,115,101, 0, 98, 71, 80,100, 97,116, 97, 0, 98, 65, +110,105,109, 86,105,122, 83,101,116,116,105,110,103,115, 0, 98, 77,111,116,105,111,110, 80, 97,116,104, 0, 66,117,108,108,101, +116, 83,111,102,116, 66,111,100,121, 0, 80, 97,114,116, 68,101,102,108,101, 99,116, 0, 83,111,102,116, 66,111,100,121, 0, 79, + 98, 72,111,111,107, 0, 68,117,112,108,105, 79, 98,106,101, 99,116, 0, 82, 78, 71, 0, 69,102,102,101, 99,116,111,114, 87,101, +105,103,104,116,115, 0, 80, 84, 67, 97, 99,104,101, 69,120,116,114, 97, 0, 80, 84, 67, 97, 99,104,101, 77,101,109, 0, 80, 84, + 67, 97, 99,104,101, 69,100,105,116, 0, 83, 66, 86,101,114,116,101,120, 0, 66,111,100,121, 80,111,105,110,116, 0, 66,111,100, +121, 83,112,114,105,110,103, 0, 83, 66, 83, 99,114, 97,116, 99,104, 0, 70,108,117,105,100, 86,101,114,116,101,120, 86,101,108, +111, 99,105,116,121, 0, 87,111,114,108,100, 0, 66, 97,115,101, 0, 65,118,105, 67,111,100,101, 99, 68, 97,116, 97, 0, 81,117, +105, 99,107,116,105,109,101, 67,111,100,101, 99, 68, 97,116, 97, 0, 81,117,105, 99,107,116,105,109,101, 67,111,100,101, 99, 83, +101,116,116,105,110,103,115, 0, 70, 70, 77,112,101,103, 67,111,100,101, 99, 68, 97,116, 97, 0, 65,117,100,105,111, 68, 97,116, + 97, 0, 83, 99,101,110,101, 82,101,110,100,101,114, 76, 97,121,101,114, 0, 73,109, 97,103,101, 70,111,114,109, 97,116, 68, 97, +116, 97, 0, 82,101,110,100,101,114, 68, 97,116, 97, 0, 82,101,110,100,101,114, 80,114,111,102,105,108,101, 0, 71, 97,109,101, + 68,111,109,101, 0, 71, 97,109,101, 70,114, 97,109,105,110,103, 0, 82,101, 99, 97,115,116, 68, 97,116, 97, 0, 71, 97,109,101, + 68, 97,116, 97, 0, 84,105,109,101, 77, 97,114,107,101,114, 0, 80, 97,105,110,116, 0, 66,114,117,115,104, 0, 73,109, 97,103, +101, 80, 97,105,110,116, 83,101,116,116,105,110,103,115, 0, 80, 97,114,116,105, 99,108,101, 66,114,117,115,104, 68, 97,116, 97, + 0, 80, 97,114,116,105, 99,108,101, 69,100,105,116, 83,101,116,116,105,110,103,115, 0, 83, 99,117,108,112,116, 0, 85,118, 83, + 99,117,108,112,116, 0, 86, 80, 97,105,110,116, 0, 84,114, 97,110,115,102,111,114,109, 79,114,105,101,110,116, 97,116,105,111, +110, 0, 85,110,105,102,105,101,100, 80, 97,105,110,116, 83,101,116,116,105,110,103,115, 0, 84,111,111,108, 83,101,116,116,105, +110,103,115, 0, 98, 83,116, 97,116,115, 0, 85,110,105,116, 83,101,116,116,105,110,103,115, 0, 80,104,121,115,105, 99,115, 83, +101,116,116,105,110,103,115, 0, 69,100,105,116,105,110,103, 0, 83, 99,101,110,101, 83,116, 97,116,115, 0, 68, 97,103, 70,111, +114,101,115,116, 0, 77,111,118,105,101, 67,108,105,112, 0, 66, 71,112,105, 99, 0, 77,111,118,105,101, 67,108,105,112, 85,115, +101,114, 0, 82,101,103,105,111,110, 86,105,101,119, 51, 68, 0, 82,101,110,100,101,114, 73,110,102,111, 0, 82,101,110,100,101, +114, 69,110,103,105,110,101, 0, 86,105,101,119, 68,101,112,116,104,115, 0, 83,109,111,111,116,104, 86,105,101,119, 83,116,111, +114,101, 0,119,109, 84,105,109,101,114, 0, 86,105,101,119, 51, 68, 0, 83,112, 97, 99,101, 76,105,110,107, 0, 86,105,101,119, + 50, 68, 0, 83,112, 97, 99,101, 73,110,102,111, 0, 83,112, 97, 99,101, 73,112,111, 0, 98, 68,111,112,101, 83,104,101,101,116, + 0, 83,112, 97, 99,101, 66,117,116,115, 0, 83,112, 97, 99,101, 83,101,113, 0, 70,105,108,101, 83,101,108,101, 99,116, 80, 97, +114, 97,109,115, 0, 83,112, 97, 99,101, 70,105,108,101, 0, 70,105,108,101, 76,105,115,116, 0,119,109, 79,112,101,114, 97,116, +111,114, 0, 70,105,108,101, 76, 97,121,111,117,116, 0, 83,112, 97, 99,101, 79,111,112,115, 0, 84,114,101,101, 83,116,111,114, +101, 0, 84,114,101,101, 83,116,111,114,101, 69,108,101,109, 0, 83,112, 97, 99,101, 73,109, 97,103,101, 0, 83, 99,111,112,101, +115, 0, 72,105,115,116,111,103,114, 97,109, 0, 83,112, 97, 99,101, 78,108, 97, 0, 83,112, 97, 99,101, 84,101,120,116, 0, 83, + 99,114,105,112,116, 0, 83,112, 97, 99,101, 83, 99,114,105,112,116, 0, 83,112, 97, 99,101, 84,105,109,101, 67, 97, 99,104,101, + 0, 83,112, 97, 99,101, 84,105,109,101, 0, 83,112, 97, 99,101, 78,111,100,101, 0, 83,112, 97, 99,101, 76,111,103,105, 99, 0, + 67,111,110,115,111,108,101, 76,105,110,101, 0, 83,112, 97, 99,101, 67,111,110,115,111,108,101, 0, 83,112, 97, 99,101, 85,115, +101,114, 80,114,101,102, 0, 83,112, 97, 99,101, 67,108,105,112, 0, 77,111,118,105,101, 67,108,105,112, 83, 99,111,112,101,115, + 0,117,105, 70,111,110,116, 0,117,105, 70,111,110,116, 83,116,121,108,101, 0,117,105, 83,116,121,108,101, 0,117,105, 87,105, +100,103,101,116, 67,111,108,111,114,115, 0,117,105, 87,105,100,103,101,116, 83,116, 97,116,101, 67,111,108,111,114,115, 0,117, +105, 80, 97,110,101,108, 67,111,108,111,114,115, 0, 84,104,101,109,101, 85, 73, 0, 84,104,101,109,101, 83,112, 97, 99,101, 0, + 84,104,101,109,101, 87,105,114,101, 67,111,108,111,114, 0, 98, 84,104,101,109,101, 0, 98, 65,100,100,111,110, 0, 83,111,108, +105,100, 76,105,103,104,116, 0, 85,115,101,114, 68,101,102, 0, 98, 83, 99,114,101,101,110, 0, 83, 99,114, 86,101,114,116, 0, + 83, 99,114, 69,100,103,101, 0, 80, 97,110,101,108, 0, 80, 97,110,101,108, 84,121,112,101, 0,117,105, 76, 97,121,111,117,116, + 0, 83, 99,114, 65,114,101, 97, 0, 83,112, 97, 99,101, 84,121,112,101, 0, 65, 82,101,103,105,111,110, 0, 65, 82,101,103,105, +111,110, 84,121,112,101, 0, 70,105,108,101, 71,108,111, 98, 97,108, 0, 83,116,114,105,112, 69,108,101,109, 0, 83,116,114,105, +112, 67,114,111,112, 0, 83,116,114,105,112, 84,114, 97,110,115,102,111,114,109, 0, 83,116,114,105,112, 67,111,108,111,114, 66, + 97,108, 97,110, 99,101, 0, 83,116,114,105,112, 80,114,111,120,121, 0, 83,116,114,105,112, 0, 80,108,117,103,105,110, 83,101, +113, 0, 83,101,113,117,101,110, 99,101, 0, 98, 83,111,117,110,100, 0, 77,101,116, 97, 83,116, 97, 99,107, 0, 87,105,112,101, + 86, 97,114,115, 0, 71,108,111,119, 86, 97,114,115, 0, 84,114, 97,110,115,102,111,114,109, 86, 97,114,115, 0, 83,111,108,105, +100, 67,111,108,111,114, 86, 97,114,115, 0, 83,112,101,101,100, 67,111,110,116,114,111,108, 86, 97,114,115, 0, 69,102,102,101, + 99,116, 0, 66,117,105,108,100, 69,102,102, 0, 80, 97,114,116, 69,102,102, 0, 80, 97,114,116,105, 99,108,101, 0, 87, 97,118, +101, 69,102,102, 0, 98, 80,114,111,112,101,114,116,121, 0, 98, 78,101, 97,114, 83,101,110,115,111,114, 0, 98, 77,111,117,115, +101, 83,101,110,115,111,114, 0, 98, 84,111,117, 99,104, 83,101,110,115,111,114, 0, 98, 75,101,121, 98,111, 97,114,100, 83,101, +110,115,111,114, 0, 98, 80,114,111,112,101,114,116,121, 83,101,110,115,111,114, 0, 98, 65, 99,116,117, 97,116,111,114, 83,101, +110,115,111,114, 0, 98, 68,101,108, 97,121, 83,101,110,115,111,114, 0, 98, 67,111,108,108,105,115,105,111,110, 83,101,110,115, +111,114, 0, 98, 82, 97,100, 97,114, 83,101,110,115,111,114, 0, 98, 82, 97,110,100,111,109, 83,101,110,115,111,114, 0, 98, 82, + 97,121, 83,101,110,115,111,114, 0, 98, 65,114,109, 97,116,117,114,101, 83,101,110,115,111,114, 0, 98, 77,101,115,115, 97,103, +101, 83,101,110,115,111,114, 0, 98, 83,101,110,115,111,114, 0, 98, 67,111,110,116,114,111,108,108,101,114, 0, 98, 74,111,121, +115,116,105, 99,107, 83,101,110,115,111,114, 0, 98, 69,120,112,114,101,115,115,105,111,110, 67,111,110,116, 0, 98, 80,121,116, +104,111,110, 67,111,110,116, 0, 98, 65, 99,116,117, 97,116,111,114, 0, 98, 65,100,100, 79, 98,106,101, 99,116, 65, 99,116,117, + 97,116,111,114, 0, 98, 65, 99,116,105,111,110, 65, 99,116,117, 97,116,111,114, 0, 83,111,117,110,100, 51, 68, 0, 98, 83,111, +117,110,100, 65, 99,116,117, 97,116,111,114, 0, 98, 69,100,105,116, 79, 98,106,101, 99,116, 65, 99,116,117, 97,116,111,114, 0, + 98, 83, 99,101,110,101, 65, 99,116,117, 97,116,111,114, 0, 98, 80,114,111,112,101,114,116,121, 65, 99,116,117, 97,116,111,114, + 0, 98, 79, 98,106,101, 99,116, 65, 99,116,117, 97,116,111,114, 0, 98, 73,112,111, 65, 99,116,117, 97,116,111,114, 0, 98, 67, + 97,109,101,114, 97, 65, 99,116,117, 97,116,111,114, 0, 98, 67,111,110,115,116,114, 97,105,110,116, 65, 99,116,117, 97,116,111, +114, 0, 98, 71,114,111,117,112, 65, 99,116,117, 97,116,111,114, 0, 98, 82, 97,110,100,111,109, 65, 99,116,117, 97,116,111,114, + 0, 98, 77,101,115,115, 97,103,101, 65, 99,116,117, 97,116,111,114, 0, 98, 71, 97,109,101, 65, 99,116,117, 97,116,111,114, 0, + 98, 86,105,115,105, 98,105,108,105,116,121, 65, 99,116,117, 97,116,111,114, 0, 98, 84,119,111, 68, 70,105,108,116,101,114, 65, + 99,116,117, 97,116,111,114, 0, 98, 80, 97,114,101,110,116, 65, 99,116,117, 97,116,111,114, 0, 98, 83,116, 97,116,101, 65, 99, +116,117, 97,116,111,114, 0, 98, 65,114,109, 97,116,117,114,101, 65, 99,116,117, 97,116,111,114, 0, 98, 83,116,101,101,114,105, +110,103, 65, 99,116,117, 97,116,111,114, 0, 71,114,111,117,112, 79, 98,106,101, 99,116, 0, 66,111,110,101, 0, 98, 65,114,109, + 97,116,117,114,101, 0, 98, 77,111,116,105,111,110, 80, 97,116,104, 86,101,114,116, 0, 98, 80,111,115,101, 67,104, 97,110,110, +101,108, 0, 98, 73, 75, 80, 97,114, 97,109, 0, 98, 73,116, 97,115, 99, 0, 98, 65, 99,116,105,111,110, 71,114,111,117,112, 0, + 83,112, 97, 99,101, 65, 99,116,105,111,110, 0, 98, 65, 99,116,105,111,110, 67,104, 97,110,110,101,108, 0, 98, 67,111,110,115, +116,114, 97,105,110,116, 67,104, 97,110,110,101,108, 0, 98, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 67,111,110,115,116, +114, 97,105,110,116, 84, 97,114,103,101,116, 0, 98, 80,121,116,104,111,110, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 75, +105,110,101,109, 97,116,105, 99, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 83,112,108,105,110,101, 73, 75, 67,111,110,115, +116,114, 97,105,110,116, 0, 98, 84,114, 97, 99,107, 84,111, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 82,111,116, 97,116, +101, 76,105,107,101, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 76,111, 99, 97,116,101, 76,105,107,101, 67,111,110,115,116, +114, 97,105,110,116, 0, 98, 83,105,122,101, 76,105,107,101, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 83, 97,109,101, 86, +111,108,117,109,101, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 84,114, 97,110,115, 76,105,107,101, 67,111,110,115,116,114, + 97,105,110,116, 0, 98, 77,105,110, 77, 97,120, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 65, 99,116,105,111,110, 67,111, +110,115,116,114, 97,105,110,116, 0, 98, 76,111, 99,107, 84,114, 97, 99,107, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 68, + 97,109,112, 84,114, 97, 99,107, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 70,111,108,108,111,119, 80, 97,116,104, 67,111, +110,115,116,114, 97,105,110,116, 0, 98, 83,116,114,101,116, 99,104, 84,111, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 82, +105,103,105,100, 66,111,100,121, 74,111,105,110,116, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 67,108, 97,109,112, 84,111, + 67,111,110,115,116,114, 97,105,110,116, 0, 98, 67,104,105,108,100, 79,102, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 84, +114, 97,110,115,102,111,114,109, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 80,105,118,111,116, 67,111,110,115,116,114, 97, +105,110,116, 0, 98, 76,111, 99, 76,105,109,105,116, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 82,111,116, 76,105,109,105, +116, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 83,105,122,101, 76,105,109,105,116, 67,111,110,115,116,114, 97,105,110,116, + 0, 98, 68,105,115,116, 76,105,109,105,116, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 83,104,114,105,110,107,119,114, 97, +112, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 70,111,108,108,111,119, 84,114, 97, 99,107, 67,111,110,115,116,114, 97,105, +110,116, 0, 98, 67, 97,109,101,114, 97, 83,111,108,118,101,114, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 79, 98,106,101, + 99,116, 83,111,108,118,101,114, 67,111,110,115,116,114, 97,105,110,116, 0, 98, 65, 99,116,105,111,110, 77,111,100,105,102,105, +101,114, 0, 98, 65, 99,116,105,111,110, 83,116,114,105,112, 0, 98, 78,111,100,101, 83,116, 97, 99,107, 0, 98, 78,111,100,101, + 83,111, 99,107,101,116, 0, 98, 78,111,100,101, 76,105,110,107, 0, 98, 78,111,100,101, 80,114,101,118,105,101,119, 0, 98, 78, +111,100,101, 0,117,105, 66,108,111, 99,107, 0, 98, 78,111,100,101, 84,121,112,101, 0, 98, 78,111,100,101, 84,114,101,101, 69, +120,101, 99, 0, 98, 78,111,100,101, 83,111, 99,107,101,116, 86, 97,108,117,101, 73,110,116, 0, 98, 78,111,100,101, 83,111, 99, +107,101,116, 86, 97,108,117,101, 70,108,111, 97,116, 0, 98, 78,111,100,101, 83,111, 99,107,101,116, 86, 97,108,117,101, 66,111, +111,108,101, 97,110, 0, 98, 78,111,100,101, 83,111, 99,107,101,116, 86, 97,108,117,101, 86,101, 99,116,111,114, 0, 98, 78,111, +100,101, 83,111, 99,107,101,116, 86, 97,108,117,101, 82, 71, 66, 65, 0, 78,111,100,101, 73,109, 97,103,101, 65,110,105,109, 0, + 78,111,100,101, 66,108,117,114, 68, 97,116, 97, 0, 78,111,100,101, 68, 66,108,117,114, 68, 97,116, 97, 0, 78,111,100,101, 66, +105,108, 97,116,101,114, 97,108, 66,108,117,114, 68, 97,116, 97, 0, 78,111,100,101, 72,117,101, 83, 97,116, 0, 78,111,100,101, + 73,109, 97,103,101, 70,105,108,101, 0, 78,111,100,101, 73,109, 97,103,101, 77,117,108,116,105, 70,105,108,101, 0, 78,111,100, +101, 73,109, 97,103,101, 77,117,108,116,105, 70,105,108,101, 83,111, 99,107,101,116, 0, 78,111,100,101, 67,104,114,111,109, 97, + 0, 78,111,100,101, 84,119,111, 88, 89,115, 0, 78,111,100,101, 84,119,111, 70,108,111, 97,116,115, 0, 78,111,100,101, 71,101, +111,109,101,116,114,121, 0, 78,111,100,101, 86,101,114,116,101,120, 67,111,108, 0, 78,111,100,101, 68,101,102,111, 99,117,115, + 0, 78,111,100,101, 83, 99,114,105,112,116, 68,105, 99,116, 0, 78,111,100,101, 71,108, 97,114,101, 0, 78,111,100,101, 84,111, +110,101,109, 97,112, 0, 78,111,100,101, 76,101,110,115, 68,105,115,116, 0, 78,111,100,101, 67,111,108,111,114, 66, 97,108, 97, +110, 99,101, 0, 78,111,100,101, 67,111,108,111,114,115,112,105,108,108, 0, 78,111,100,101, 84,101,120, 66, 97,115,101, 0, 78, +111,100,101, 84,101,120, 83,107,121, 0, 78,111,100,101, 84,101,120, 73,109, 97,103,101, 0, 78,111,100,101, 84,101,120, 67,104, +101, 99,107,101,114, 0, 78,111,100,101, 84,101,120, 69,110,118,105,114,111,110,109,101,110,116, 0, 78,111,100,101, 84,101,120, + 71,114, 97,100,105,101,110,116, 0, 78,111,100,101, 84,101,120, 78,111,105,115,101, 0, 78,111,100,101, 84,101,120, 86,111,114, +111,110,111,105, 0, 78,111,100,101, 84,101,120, 77,117,115,103,114, 97,118,101, 0, 78,111,100,101, 84,101,120, 87, 97,118,101, + 0, 78,111,100,101, 84,101,120, 77, 97,103,105, 99, 0, 78,111,100,101, 83,104, 97,100,101,114, 65,116,116,114,105, 98,117,116, +101, 0, 84,101,120, 78,111,100,101, 79,117,116,112,117,116, 0, 67,117,114,118,101, 77, 97,112, 80,111,105,110,116, 0, 67,117, +114,118,101, 77, 97,112, 0, 66,114,117,115,104, 67,108,111,110,101, 0, 67,117,115,116,111,109, 68, 97,116, 97, 76, 97,121,101, +114, 0, 67,117,115,116,111,109, 68, 97,116, 97, 69,120,116,101,114,110, 97,108, 0, 72, 97,105,114, 75,101,121, 0, 80, 97,114, +116,105, 99,108,101, 75,101,121, 0, 66,111,105,100, 80, 97,114,116,105, 99,108,101, 0, 66,111,105,100, 68, 97,116, 97, 0, 80, + 97,114,116,105, 99,108,101, 83,112,114,105,110,103, 0, 67,104,105,108,100, 80, 97,114,116,105, 99,108,101, 0, 80, 97,114,116, +105, 99,108,101, 84, 97,114,103,101,116, 0, 80, 97,114,116,105, 99,108,101, 68,117,112,108,105, 87,101,105,103,104,116, 0, 80, + 97,114,116,105, 99,108,101, 68, 97,116, 97, 0, 83, 80, 72, 70,108,117,105,100, 83,101,116,116,105,110,103,115, 0, 80, 97,114, +116,105, 99,108,101, 83,101,116,116,105,110,103,115, 0, 66,111,105,100, 83,101,116,116,105,110,103,115, 0, 80, 97,114,116,105, + 99,108,101, 67, 97, 99,104,101, 75,101,121, 0, 75, 68, 84,114,101,101, 0, 80, 97,114,116,105, 99,108,101, 68,114, 97,119, 68, + 97,116, 97, 0, 76,105,110,107, 78,111,100,101, 0, 98, 71, 80, 68,115,112,111,105,110,116, 0, 98, 71, 80, 68,115,116,114,111, +107,101, 0, 98, 71, 80, 68,102,114, 97,109,101, 0, 98, 71, 80, 68,108, 97,121,101,114, 0, 82,101,112,111,114,116, 76,105,115, +116, 0,119,109, 87,105,110,100,111,119, 77, 97,110, 97,103,101,114, 0,119,109, 87,105,110,100,111,119, 0,119,109, 75,101,121, + 67,111,110,102,105,103, 0,119,109, 69,118,101,110,116, 0,119,109, 83,117, 98, 87,105,110,100,111,119, 0,119,109, 71,101,115, +116,117,114,101, 0,119,109, 75,101,121, 77, 97,112, 73,116,101,109, 0, 80,111,105,110,116,101,114, 82, 78, 65, 0,119,109, 75, +101,121, 77, 97,112, 68,105,102,102, 73,116,101,109, 0,119,109, 75,101,121, 77, 97,112, 0,119,109, 79,112,101,114, 97,116,111, +114, 84,121,112,101, 0, 70, 77,111,100,105,102,105,101,114, 0, 70, 77,111,100, 95, 71,101,110,101,114, 97,116,111,114, 0, 70, + 77,111,100, 95, 70,117,110, 99,116,105,111,110, 71,101,110,101,114, 97,116,111,114, 0, 70, 67, 77, 95, 69,110,118,101,108,111, +112,101, 68, 97,116, 97, 0, 70, 77,111,100, 95, 69,110,118,101,108,111,112,101, 0, 70, 77,111,100, 95, 67,121, 99,108,101,115, + 0, 70, 77,111,100, 95, 80,121,116,104,111,110, 0, 70, 77,111,100, 95, 76,105,109,105,116,115, 0, 70, 77,111,100, 95, 78,111, +105,115,101, 0, 70, 77,111,100, 95, 83,116,101,112,112,101,100, 0, 68,114,105,118,101,114, 84, 97,114,103,101,116, 0, 68,114, +105,118,101,114, 86, 97,114, 0, 67,104, 97,110,110,101,108, 68,114,105,118,101,114, 0, 70, 80,111,105,110,116, 0, 70, 67,117, +114,118,101, 0, 65,110,105,109, 77, 97,112, 80, 97,105,114, 0, 65,110,105,109, 77, 97,112,112,101,114, 0, 78,108, 97, 83,116, +114,105,112, 0, 78,108, 97, 84,114, 97, 99,107, 0, 75, 83, 95, 80, 97,116,104, 0, 75,101,121,105,110,103, 83,101,116, 0, 65, +110,105,109, 79,118,101,114,114,105,100,101, 0, 73,100, 65,100,116, 84,101,109,112,108, 97,116,101, 0, 66,111,105,100, 82,117, +108,101, 0, 66,111,105,100, 82,117,108,101, 71,111, 97,108, 65,118,111,105,100, 0, 66,111,105,100, 82,117,108,101, 65,118,111, +105,100, 67,111,108,108,105,115,105,111,110, 0, 66,111,105,100, 82,117,108,101, 70,111,108,108,111,119, 76,101, 97,100,101,114, + 0, 66,111,105,100, 82,117,108,101, 65,118,101,114, 97,103,101, 83,112,101,101,100, 0, 66,111,105,100, 82,117,108,101, 70,105, +103,104,116, 0, 66,111,105,100, 83,116, 97,116,101, 0, 70, 76, 85, 73, 68, 95, 51, 68, 0, 87, 84, 85, 82, 66, 85, 76, 69, 78, + 67, 69, 0, 83,112,101, 97,107,101,114, 0, 77,111,118,105,101, 67,108,105,112, 80,114,111,120,121, 0, 77,111,118,105,101, 67, +108,105,112, 67, 97, 99,104,101, 0, 77,111,118,105,101, 84,114, 97, 99,107,105,110,103, 0, 77,111,118,105,101, 84,114, 97, 99, +107,105,110,103, 84,114, 97, 99,107, 0, 77,111,118,105,101, 84,114, 97, 99,107,105,110,103, 77, 97,114,107,101,114, 0, 77,111, +118,105,101, 82,101, 99,111,110,115,116,114,117, 99,116,101,100, 67, 97,109,101,114, 97, 0, 77,111,118,105,101, 84,114, 97, 99, +107,105,110,103, 67, 97,109,101,114, 97, 0, 77,111,118,105,101, 84,114, 97, 99,107,105,110,103, 83,101,116,116,105,110,103,115, + 0, 77,111,118,105,101, 84,114, 97, 99,107,105,110,103, 83,116, 97, 98,105,108,105,122, 97,116,105,111,110, 0, 77,111,118,105, +101, 84,114, 97, 99,107,105,110,103, 82,101, 99,111,110,115,116,114,117, 99,116,105,111,110, 0, 77,111,118,105,101, 84,114, 97, + 99,107,105,110,103, 79, 98,106,101, 99,116, 0, 77,111,118,105,101, 84,114, 97, 99,107,105,110,103, 83,116, 97,116,115, 0, 68, +121,110, 97,109,105, 99, 80, 97,105,110,116, 83,117,114,102, 97, 99,101, 0, 80, 97,105,110,116, 83,117,114,102, 97, 99,101, 68, + 97,116, 97, 0, 84, 76, 69, 78, 1, 0, 1, 0, 2, 0, 2, 0, 4, 0, 4, 0, 4, 0, 4, 0, 8, 0, 8, 0, 8, 0, 0, 0, + 16, 0, 24, 0, 16, 0, 4, 0, 8, 0, 12, 0, 16, 0, 16, 0, 32, 0,128, 0,120, 0,152, 8, 0, 0, 40, 0,144, 0,112, 5, +112, 0, 36, 0, 56, 0,160, 0,200, 0, 0, 1, 96, 0, 40, 0, 48, 0,224, 0, 16, 0,200, 0, 40, 0,216, 11, 48, 5, 0, 0, + 0, 0, 0, 0, 56, 1,168, 1,216, 4, 24, 0, 8, 3,200, 0, 0, 0,104, 0, 64, 1, 56, 4, 80, 0, 24, 1,144, 0, 56, 3, + 16, 2, 88, 0, 16, 0,128, 3,152, 0,136, 4, 0, 0,104, 0,104, 0, 0, 1, 80, 0, 8, 0, 16, 0, 32, 0, 0, 0, 8, 2, + 0, 0, 0, 0, 0, 0,232, 4, 12, 0, 16, 0, 8, 0, 12, 0, 4, 0, 20, 0, 48, 0, 64, 0, 20, 0, 12, 0, 16, 0, 4, 0, + 8, 0, 8, 0, 0, 0,176, 0,144, 1, 8, 0, 4, 0, 4, 0, 0, 1, 32, 0, 8, 0, 24, 0, 16, 0, 64, 0, 24, 0, 12, 0, + 64, 0, 4, 0,112, 0,200, 0,136, 0,192, 0,192, 0,128, 0,192, 0,192, 0,128, 0,120, 0,200, 0,120, 0,144, 0, 16, 1, + 56, 0,192, 0, 24, 1, 40, 1,120, 0,184, 0,200, 0, 64, 1,200, 0, 88, 1,112, 0,168, 0, 0, 0,152, 0, 48, 0, 40, 5, +192, 0, 0, 0,152, 0, 0, 0, 0, 0,128, 0, 8, 0, 8, 0,112, 1,144, 0,152, 2,136, 0,192, 0,120, 0,128, 0,224, 4, +208, 0,200, 0,112, 0,208, 0,144, 0, 16, 5, 0, 0, 0, 0, 48, 1,104, 1,160, 1,104, 1,136, 0,104, 0,112, 0,128, 0, + 16, 0, 96, 1, 88, 0, 0, 0,200, 0,216, 0,152, 0, 48, 0, 24, 0,120, 0,152, 0,216, 1, 0, 1,184, 0, 0, 0, 72, 0, + 32, 0,176, 0, 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 12, 0, 24, 2, 40, 0,184, 0,152, 0, 64, 0, 72, 0, 32, 0,120, 0, + 24, 0, 56, 9, 64, 0, 24, 0, 16, 0, 56, 0,168, 0, 96, 0, 24, 0, 88, 6, 48, 0, 16, 0,168, 0, 96, 0, 24, 0, 56, 0, +120, 0, 16, 0,232, 1, 32, 0, 8, 0, 24, 0, 80, 8, 0, 0, 0, 0,192, 8,104, 0, 8, 0,112, 3, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 96, 1, 56, 0,144, 0, 64, 0,240, 0,112, 0,248, 0,240, 0,160, 7,104, 0, 0, 0,168, 0, 0, 0, 24, 1, + 16, 0, 16, 0, 40, 33,128, 16, 24, 16,216, 0,160, 2,168, 5, 64, 0, 24, 0,208, 0, 48, 1, 72, 0, 40, 0,136, 1,104, 0, + 40, 1, 56, 0, 24, 4, 32, 0,232, 0, 32, 0, 32, 0, 8, 0, 80, 3,224, 1, 16, 0,168, 36, 80, 0, 56, 0,112, 38, 8, 1, + 32, 0, 40, 0, 88, 1, 0, 0, 0, 0,160, 0, 0, 0, 40, 1, 0, 0, 48, 4, 8, 1, 16, 0, 8, 0, 44, 0, 16, 4, 72, 3, +200, 4, 72, 1,208, 4, 32, 0, 12, 0, 24, 0, 32, 0, 16, 0, 24, 0, 24, 0, 32, 0,136, 1, 0, 0, 64, 0, 96, 0, 80, 0, + 8, 0, 80, 0,136, 0,200, 0, 72, 0, 8, 0,136, 0, 76, 0, 72, 0,204, 0,136, 0,136, 0,128, 0,136, 0, 92, 0,128, 0, + 80, 0,112, 0, 16, 0,168, 0, 32, 0, 72, 0,120, 0, 24, 0,144, 0,112, 0,148, 0, 32, 0,128, 0, 88, 0, 88, 0,208, 0, +140, 0, 4, 0, 24, 0, 16, 0, 8, 0,160, 0, 48, 0, 40, 0, 72, 1, 0, 1, 16, 0, 32, 2, 4, 0, 40, 0,120, 0, 72, 1, +120, 0, 56, 0,120, 0,160, 0,112, 0,184, 0, 24, 0, 88, 0, 80, 0, 80, 0, 80, 0, 8, 0, 72, 0,104, 0,104, 0, 80, 0, + 80, 0, 24, 0, 88, 0,104, 0, 16, 0,144, 0,128, 0, 88, 0, 28, 0, 28, 0, 28, 0, 88, 0, 24, 0,160, 0, 16, 0,152, 0, + 72, 0,168, 0, 48, 0,208, 0, 56, 0, 16, 0, 88, 1, 0, 0, 0, 0, 0, 0, 16, 0, 16, 0, 4, 0, 24, 0, 16, 0, 16, 0, + 40, 0, 28, 0, 12, 0, 12, 0, 32, 4, 40, 4, 32, 0, 44, 0, 24, 0, 8, 0,128, 0, 64, 0, 32, 0, 16, 0, 32, 0, 32, 0, + 8, 0, 96, 0, 20, 0,200, 3,216, 3,208, 3,200, 3,208, 3,208, 3,200, 3,208, 3,208, 3,208, 3,208, 3, 64, 0, 64, 0, + 12, 0, 56, 0, 24, 0,104, 0, 0, 4, 24, 0, 56, 0, 56, 0, 20, 0, 16, 0, 64, 0, 40, 0, 32, 0,192, 0, 60, 0, 16, 3, +104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 32, 0, 40, 0,192, 0, 40, 0, 88, 1, 0, 1,168, 0, 0, 0, 0, 0, 0, 0, +120, 0, 0, 0, 32, 0,136, 0, 0, 0,120, 0, 24, 0, 24, 0, 16, 0, 24, 0, 8, 0, 16, 0, 24, 0, 20, 0, 20, 0, 56, 0, + 24, 2, 40, 1, 16, 0,104, 0, 0, 1, 40, 0,208, 0,104, 0,112, 0,216, 1, 32, 0,128, 0, 56, 0, 80, 0, 64, 0,104, 0, + 72, 0, 64, 0,128, 0, 0, 0, 0, 0,184, 0, 8, 3, 0, 0,248, 0,192, 0, 16, 0, 72, 0, 48, 0, 64, 0, 56, 0, 24, 0, +128, 0, 0, 1, 16, 6, 0, 0, 83, 84, 82, 67,207, 1, 0, 0, 12, 0, 2, 0, 12, 0, 0, 0, 12, 0, 1, 0, 13, 0, 3, 0, 13, 0, 0, 0, 13, 0, 1, 0, 11, 0, 2, 0, 14, 0, 2, 0, 11, 0, 3, 0, 11, 0, 4, 0, 15, 0, 2, 0, 2, 0, 5, 0, 2, 0, 6, 0, 16, 0, 2, 0, 7, 0, 5, 0, 7, 0, 6, 0, 17, 0, 3, 0, 7, 0, 5, 0, 7, 0, 6, 0, 7, 0, 7, 0, 18, 0, 4, 0, 4, 0, 8, 0, 4, 0, 9, 0, 4, 0, 10, 0, 4, 0, 11, 0, 19, 0, 4, 0, 7, 0, 8, 0, 7, 0, 9, 0, @@ -10464,635 +10584,636 @@ char datatoc_startup_blend[]= { 2, 0,166, 2, 0, 0, 18, 0, 0, 0,161, 2, 91, 0, 4, 0, 0, 0,240, 0, 0, 0,185, 0, 0, 0,186, 0, 0, 0,187, 0, 80, 0, 5, 0, 4, 0,167, 2, 4, 0,141, 2, 2, 0, 47, 2, 0, 0, 18, 0, 0, 0, 27, 0, 82, 0, 2, 0, 4, 0,168, 2, 4, 0,169, 2, 81, 0, 6, 0, 42, 0,149, 2, 0, 0, 18, 0, 0, 0,152, 2, 2, 0, 87, 1, 2, 0,153, 2, 2, 0,154, 2, - 83, 0, 2, 0, 7, 0,170, 2, 4, 0, 18, 0, 84, 0, 4, 0, 0, 0,240, 0, 0, 0,185, 0, 0, 0,186, 0, 0, 0,187, 0, + 83, 0, 2, 0, 7, 0,170, 2, 4, 0, 18, 0, 84, 0, 4, 0, 0, 0,185, 0, 0, 0,186, 0, 0, 0,187, 0, 0, 0,240, 0, 92, 0, 1, 0, 7, 0,171, 2, 93, 0, 2, 0, 4, 0, 13, 2, 4, 0, 16, 0, 86, 0, 7, 0, 7, 0,150, 2, 42, 0,149, 2, 0, 0, 18, 0, 0, 0,152, 2, 2, 0, 87, 1, 2, 0,153, 2, 2, 0,154, 2, 98, 0, 1, 0, 7, 0,172, 2, 99, 0, 1, 0, - 4, 0,173, 2,100, 0, 1, 0, 0, 0,174, 2,101, 0, 1, 0, 7, 0,150, 2,102, 0, 1, 0, 7, 0,170, 2,103, 0, 3, 0, - 4, 0,175, 2, 0, 0, 94, 0, 7, 0,176, 2,104, 0, 4, 0, 7, 0,240, 0, 7, 0,185, 0, 7, 0,186, 0, 7, 0,187, 0, -105, 0, 1, 0,104, 0,151, 2,106, 0, 5, 0, 4, 0,177, 2, 4, 0,178, 2, 0, 0, 18, 0, 0, 0, 47, 2, 0, 0,179, 2, -107, 0, 2, 0, 4, 0,180, 2, 4, 0,178, 2,108, 0, 10, 0,108, 0, 0, 0,108, 0, 1, 0,106, 0,181, 2,105, 0,182, 2, -107, 0,183, 2, 4, 0, 53, 0, 4, 0,138, 2, 4, 0,137, 2, 4, 0, 27, 0, 88, 0,184, 2, 96, 0, 14, 0, 14, 0,185, 2, - 88, 0,184, 2, 0, 0,186, 2, 0, 0,187, 2, 0, 0,188, 2, 0, 0,189, 2, 0, 0,190, 2, 0, 0,191, 2, 0, 0,192, 2, - 0, 0, 18, 0, 95, 0,132, 2, 95, 0,134, 2, 2, 0,193, 2, 0, 0,194, 2,109, 0, 1, 0, 4, 0,173, 2,110, 0, 9, 0, -110, 0, 0, 0,110, 0, 1, 0, 4, 0, 16, 0, 4, 0, 87, 1, 4, 0,195, 2, 4, 0, 27, 0, 0, 0, 19, 0, 41, 0,125, 0, - 0, 0,196, 2,111, 0, 6, 0,110, 0,197, 2, 47, 0,198, 2, 27, 0,199, 2, 0, 0,200, 2, 4, 0,201, 2, 4, 0,202, 2, -112, 0, 7, 0,110, 0,197, 2, 2, 0,203, 2, 2, 0,185, 2, 2, 0,204, 2, 2, 0, 92, 0, 11, 0,205, 2, 11, 0,206, 2, -113, 0, 3, 0,110, 0,197, 2, 27, 0,168, 0, 0, 0, 19, 0,114, 0, 5, 0,110, 0,197, 2, 27, 0,168, 0, 0, 0, 19, 0, - 2, 0,207, 2, 0, 0,208, 2,115, 0, 5, 0,110, 0,197, 2, 7, 0, 89, 0, 7, 0,209, 2, 4, 0,210, 2, 4, 0,211, 2, -116, 0, 5, 0,110, 0,197, 2, 27, 0,212, 2, 0, 0, 70, 0, 4, 0, 87, 1, 4, 0, 18, 0,117, 0, 13, 0,110, 0,197, 2, - 27, 0,213, 2, 27, 0,214, 2, 27, 0,215, 2, 27, 0,216, 2, 7, 0,217, 2, 7, 0,218, 2, 7, 0,209, 2, 7, 0,219, 2, - 4, 0,220, 2, 4, 0,221, 2, 4, 0, 92, 0, 4, 0,222, 2,118, 0, 5, 0,110, 0,197, 2, 2, 0,223, 2, 2, 0, 18, 0, - 7, 0,224, 2, 27, 0,225, 2,119, 0, 3, 0,110, 0,197, 2, 7, 0,226, 2, 4, 0, 92, 0,120, 0, 10, 0,110, 0,197, 2, - 7, 0,227, 2, 4, 0,228, 2, 4, 0, 27, 0, 2, 0, 92, 0, 2, 0,229, 2, 2, 0,230, 2, 2, 0,231, 2, 7, 0,232, 2, - 0, 0,233, 2,121, 0, 3, 0,110, 0,197, 2, 7, 0, 27, 0, 4, 0, 16, 0,122, 0, 6, 0,110, 0,197, 2,123, 0,234, 2, -124, 0,235, 2,125, 0,236, 2, 7, 0,237, 2, 4, 0, 16, 0,126, 0, 11, 0,110, 0,197, 2, 47, 0,198, 2, 27, 0,199, 2, - 0, 0,200, 2, 4, 0,201, 2, 4, 0,202, 2, 7, 0,238, 2, 4, 0,239, 2, 0, 0,233, 2, 7, 0,240, 2, 4, 0, 27, 0, -127, 0, 12, 0,110, 0,197, 2, 27, 0,241, 2, 42, 0,242, 2, 4, 0, 92, 0, 4, 0,243, 2, 7, 0,244, 2, 7, 0,245, 2, - 7, 0,246, 2, 7, 0,247, 2, 0, 0,200, 2, 4, 0,201, 2, 4, 0, 27, 0,128, 0, 3, 0,110, 0,197, 2, 7, 0,248, 2, - 4, 0,249, 2,129, 0, 5, 0,110, 0,197, 2, 7, 0,250, 2, 0, 0,233, 2, 2, 0, 18, 0, 2, 0,251, 2,130, 0, 8, 0, -110, 0,197, 2, 27, 0,168, 0, 7, 0,250, 2, 7, 0,255, 0, 7, 0,108, 0, 0, 0,233, 2, 2, 0, 18, 0, 2, 0, 16, 0, -131, 0, 21, 0,110, 0,197, 2, 47, 0,198, 2, 27, 0,199, 2, 0, 0,200, 2, 4, 0,201, 2, 4, 0,202, 2, 27, 0,252, 2, - 0, 0,233, 2, 2, 0, 18, 0, 2, 0, 27, 0, 7, 0,253, 2, 7, 0,254, 2, 7, 0,255, 2, 7, 0, 81, 2, 7, 0, 0, 3, - 7, 0, 1, 3, 7, 0, 2, 3, 7, 0, 3, 3, 7, 0, 4, 3, 7, 0, 5, 3, 7, 0, 91, 0,132, 0, 7, 0,110, 0,197, 2, - 2, 0, 6, 3, 2, 0, 7, 3, 4, 0, 30, 0, 27, 0,168, 0, 7, 0, 8, 3, 0, 0,233, 2,133, 0, 10, 0,110, 0,197, 2, - 27, 0,168, 0, 0, 0, 9, 3, 7, 0, 10, 3, 7, 0, 11, 3, 7, 0, 3, 3, 4, 0, 12, 3, 4, 0, 13, 3, 7, 0, 14, 3, - 0, 0, 19, 0,134, 0, 1, 0,110, 0,197, 2,135, 0, 7, 0,110, 0,197, 2, 41, 0,125, 0,136, 0, 15, 3,137, 0, 16, 3, -138, 0, 17, 3,139, 0, 18, 3, 14, 0, 19, 3,140, 0, 13, 0,110, 0,197, 2, 88, 0, 20, 3, 88, 0, 21, 3, 88, 0, 22, 3, - 88, 0, 23, 3, 88, 0, 24, 3, 88, 0, 25, 3, 85, 0, 26, 3, 4, 0, 27, 3, 4, 0, 28, 3, 7, 0, 29, 3, 7, 0, 30, 3, -141, 0, 31, 3,142, 0, 7, 0,110, 0,197, 2, 88, 0, 20, 3, 88, 0, 32, 3,143, 0, 33, 3,144, 0, 31, 3, 4, 0, 34, 3, - 4, 0, 27, 3,145, 0, 4, 0,110, 0,197, 2, 27, 0,168, 0, 4, 0, 35, 3, 4, 0, 27, 0,146, 0, 2, 0, 4, 0, 36, 3, - 7, 0, 39, 2,147, 0, 2, 0, 4, 0,128, 0, 4, 0, 37, 3,148, 0, 24, 0,110, 0,197, 2, 27, 0,168, 0, 0, 0,233, 2, - 2, 0, 38, 3, 2, 0, 18, 0, 2, 0, 87, 1, 2, 0, 27, 0,146, 0, 39, 3, 4, 0, 40, 3, 7, 0, 41, 3, 4, 0, 53, 0, - 4, 0, 42, 3,147, 0, 43, 3,146, 0, 44, 3, 4, 0, 45, 3, 4, 0, 46, 3, 4, 0, 47, 3, 4, 0, 37, 3, 7, 0, 48, 3, - 7, 0, 49, 3, 7, 0, 50, 3, 7, 0, 51, 3, 7, 0, 52, 3, 11, 0, 53, 3,149, 0, 8, 0,110, 0,197, 2,150, 0, 54, 3, -143, 0, 33, 3, 4, 0, 55, 3, 4, 0, 56, 3, 4, 0, 57, 3, 2, 0, 18, 0, 2, 0, 56, 0,151, 0, 8, 0,110, 0,197, 2, - 27, 0, 44, 0, 2, 0, 3, 1, 2, 0, 18, 0, 2, 0,223, 2, 2, 0, 56, 0, 7, 0, 58, 3, 7, 0, 59, 3,152, 0, 6, 0, -110, 0,197, 2, 4, 0, 60, 3, 2, 0, 18, 0, 2, 0, 61, 3, 7, 0, 62, 3, 0, 0,170, 0,153, 0, 8, 0,110, 0,197, 2, - 0, 0, 63, 3, 0, 0, 64, 3, 0, 0,191, 2, 0, 0, 65, 3, 0, 0, 66, 3, 0, 0, 92, 0, 0, 0,179, 2,154, 0, 3, 0, -110, 0,197, 2,155, 0, 67, 3,139, 0, 18, 3,156, 0, 10, 0,110, 0,197, 2, 27, 0, 68, 3, 27, 0, 69, 3, 0, 0, 70, 3, - 7, 0, 71, 3, 2, 0, 72, 3, 2, 0, 73, 3, 0, 0, 74, 3, 0, 0, 75, 3, 0, 0,208, 2,157, 0, 9, 0,110, 0,197, 2, - 27, 0, 76, 3, 0, 0, 70, 3, 7, 0, 77, 3, 7, 0, 78, 3, 0, 0, 87, 1, 0, 0,223, 2, 0, 0, 79, 3, 0, 0, 27, 0, -158, 0, 1, 0,110, 0,197, 2,159, 0, 11, 0,110, 0,197, 2, 0, 0,233, 2, 7, 0,128, 0, 7, 0, 80, 3, 7, 0, 81, 3, - 7, 0, 82, 3, 7, 0, 83, 3, 7, 0, 84, 3, 4, 0, 18, 0, 2, 0, 85, 3, 2, 0, 86, 3,160, 0, 9, 0,110, 0,197, 2, - 27, 0, 87, 3, 4, 0, 88, 3, 4, 0, 89, 3, 4, 0, 90, 3, 7, 0, 91, 3, 7, 0, 92, 3, 2, 0,223, 2, 2, 0, 18, 0, -161, 0, 29, 0,110, 0,197, 2,162, 0, 93, 3,163, 0, 94, 3, 4, 0, 95, 3, 4, 0, 96, 3, 7, 0, 97, 3, 7, 0, 2, 3, - 7, 0, 98, 3, 7, 0,250, 0, 7, 0, 99, 3, 7, 0,100, 3, 7, 0,101, 3, 7, 0,102, 3, 7, 0,103, 3, 7, 0,237, 2, - 4, 0,104, 3, 4, 0,105, 3, 0, 0,106, 3, 0, 0,107, 3, 0, 0,108, 3, 0, 0,109, 3, 0, 0, 18, 0, 0, 0,110, 3, - 2, 0,111, 3, 2, 0,112, 3, 4, 0,211, 2, 7, 0,108, 0, 7, 0,113, 3, 4, 0, 27, 0,164, 0, 3, 0,110, 0,197, 2, - 4, 0, 95, 3, 4, 0,114, 3,165, 0, 15, 0,110, 0,197, 2, 47, 0,198, 2, 27, 0,199, 2, 0, 0,200, 2, 4, 0,201, 2, - 4, 0,202, 2, 27, 0,115, 3, 27, 0,116, 3, 54, 0,100, 1, 0, 0,233, 2, 7, 0,238, 2, 7, 0,117, 3, 0, 0, 18, 0, - 0, 0,253, 0, 0, 0,208, 2,166, 0, 16, 0,110, 0,197, 2, 0, 0,233, 2, 2, 0,118, 3, 2, 0,253, 0, 7, 0,119, 3, - 54, 0,120, 3, 7, 0,121, 3, 7, 0,122, 3, 7, 0,123, 3, 0, 0,124, 3, 4, 0,125, 3, 47, 0,126, 3, 27, 0,127, 3, - 4, 0,128, 3, 0, 0,129, 3, 4, 0,130, 3,167, 0, 16, 0,110, 0,197, 2, 0, 0,131, 3, 0, 0,132, 3, 7, 0,133, 3, - 7, 0,134, 3, 0, 0,135, 3, 0, 0,136, 3, 0, 0,137, 3, 7, 0,123, 3, 0, 0,124, 3, 4, 0,125, 3, 47, 0,126, 3, - 27, 0,127, 3, 4, 0,128, 3, 0, 0,129, 3, 4, 0,130, 3,168, 0, 16, 0,110, 0,197, 2, 0, 0,233, 2, 4, 0,138, 3, - 4, 0,139, 3, 27, 0,140, 3, 7, 0,123, 3, 0, 0,124, 3, 4, 0,125, 3, 47, 0,126, 3, 27, 0,127, 3, 4, 0,128, 3, - 0, 0,129, 3, 7, 0,141, 3, 7, 0,142, 3, 2, 0,253, 0, 2, 0,143, 3,169, 0, 5, 0,110, 0,197, 2,170, 0,144, 3, -171, 0,145, 3, 4, 0, 16, 0, 4, 0, 27, 0,172, 0, 8, 0,110, 0,197, 2, 7, 0,146, 3, 7, 0,147, 3, 7, 0,148, 3, - 0, 0,250, 0, 0, 0, 18, 0, 0, 0, 87, 1, 0, 0, 27, 0,173, 0, 3, 0,174, 0,149, 3, 4, 0, 66, 2, 0, 0, 94, 0, -174, 0, 29, 0, 22, 0, 32, 0, 34, 0, 75, 0, 2, 0, 48, 2, 2, 0, 49, 2, 2, 0,150, 3, 2, 0, 18, 0, 2, 0,151, 3, - 2, 0,152, 3, 2, 0,153, 3, 2, 0, 30, 0, 0, 0,154, 3, 0, 0,155, 3, 0, 0,156, 3, 0, 0, 74, 0, 4, 0, 27, 0, - 7, 0,157, 3, 7, 0,158, 3, 7, 0,159, 3, 7, 0,160, 3, 7, 0,161, 3, 7, 0,162, 3, 29, 0,163, 3, 31, 0, 80, 0, - 33, 0, 73, 2, 90, 0,126, 2, 0, 0, 70, 0, 7, 0,164, 3, 7, 0,165, 3,173, 0,166, 3,175, 0, 5, 0,175, 0, 0, 0, -175, 0, 1, 0, 0, 0, 19, 0, 0, 0, 18, 0, 0, 0,124, 0, 68, 0, 3, 0, 7, 0,167, 3, 4, 0, 18, 0, 4, 0, 27, 0, - 27, 0,128, 0, 22, 0, 32, 0, 34, 0, 75, 0,176, 0,168, 3, 2, 0, 16, 0, 2, 0,169, 3, 4, 0,170, 3, 4, 0,171, 3, - 4, 0,172, 3, 0, 0,173, 3, 27, 0, 38, 0, 27, 0,174, 3, 27, 0,175, 3, 27, 0,176, 3, 27, 0,177, 3, 31, 0, 80, 0, - 68, 0, 15, 2,177, 0,178, 3,177, 0,179, 3,178, 0,180, 3, 11, 0, 2, 0,179, 0,181, 3,180, 0,182, 3,181, 0,183, 3, - 14, 0,184, 3, 14, 0,185, 3, 14, 0, 28, 2, 14, 0,186, 3, 14, 0,187, 3, 4, 0, 87, 1, 4, 0,188, 3, 63, 0, 30, 2, - 0, 0,189, 3, 4, 0, 32, 2, 4, 0,190, 3, 7, 0, 77, 1, 7, 0,191, 3, 7, 0,192, 3, 7, 0,176, 0, 7, 0,193, 3, - 7, 0,194, 3, 7, 0, 78, 1, 7, 0,195, 3, 7, 0, 18, 2, 7, 0,196, 3, 7, 0,197, 3, 7, 0,198, 3, 7, 0,199, 3, - 7, 0,200, 3, 7, 0,201, 3, 7, 0, 10, 3, 7, 0,202, 3, 7, 0,244, 0, 7, 0,203, 3, 4, 0,204, 3, 4, 0,205, 3, - 2, 0, 18, 0, 2, 0,206, 3, 2, 0,207, 3, 2, 0,208, 3, 2, 0,209, 3, 2, 0,210, 3, 2, 0,211, 3, 2, 0,212, 3, - 2, 0,213, 3, 0, 0,214, 3, 0, 0,215, 3, 4, 0,216, 3, 4, 0,217, 3, 4, 0,218, 3, 4, 0,219, 3, 7, 0,220, 3, - 7, 0,108, 2, 7, 0,221, 3, 7, 0,222, 3, 7, 0,223, 3, 7, 0,224, 3, 7, 0,225, 3, 7, 0,220, 0, 7, 0,226, 3, - 7, 0,227, 3, 7, 0,228, 3, 7, 0,229, 3, 7, 0,230, 3, 2, 0,231, 3, 0, 0,232, 3, 0, 0,233, 3, 0, 0,234, 3, - 0, 0,235, 3, 0, 0,110, 0, 0, 0,236, 3, 7, 0,237, 3, 7, 0,238, 3, 14, 0,239, 3, 14, 0,240, 3, 14, 0,241, 3, - 14, 0,242, 3, 7, 0,243, 3, 2, 0, 13, 2, 2, 0,244, 3, 7, 0,151, 2, 4, 0,245, 3, 4, 0,246, 3,182, 0,247, 3, - 2, 0,248, 3, 2, 0,251, 0, 7, 0,249, 3, 14, 0,250, 3, 14, 0,251, 3, 14, 0,252, 3, 14, 0,253, 3,183, 0, 73, 1, -184, 0,254, 3, 64, 0,255, 3, 0, 0, 0, 4, 0, 0, 1, 4, 2, 0, 66, 2, 7, 0,143, 2,155, 0, 2, 4,143, 0, 3, 4, -143, 0, 4, 4, 10, 0, 5, 4, 10, 0, 6, 4, 4, 0, 7, 4, 4, 0, 8, 4, 14, 0, 9, 4, 14, 0, 10, 4, 14, 0, 11, 4, - 7, 0, 12, 4,185, 0, 14, 0,185, 0, 0, 0,185, 0, 1, 0, 27, 0, 38, 0, 7, 0, 10, 3, 7, 0, 79, 1, 7, 0, 11, 3, - 7, 0, 3, 3, 0, 0, 19, 0, 4, 0, 12, 3, 4, 0, 13, 3, 4, 0, 13, 4, 2, 0, 16, 0, 2, 0, 14, 4, 7, 0, 14, 3, -186, 0, 12, 0,186, 0, 0, 0,186, 0, 1, 0, 27, 0, 44, 0, 4, 0, 15, 4, 4, 0, 13, 2, 7, 0, 79, 1, 7, 0, 16, 4, - 7, 0, 17, 4, 7, 0,170, 2, 2, 0, 16, 0, 0, 0, 18, 4, 0, 0, 19, 4,183, 0, 40, 0, 4, 0, 18, 0, 2, 0, 20, 4, - 2, 0, 21, 4, 2, 0, 3, 3, 2, 0, 22, 4, 2, 0, 23, 4, 2, 0, 24, 4, 2, 0, 25, 4, 2, 0, 26, 4, 7, 0, 27, 4, - 7, 0, 28, 4, 7, 0, 29, 4, 7, 0, 30, 4, 7, 0, 31, 4, 7, 0, 32, 4, 7, 0, 33, 4, 7, 0, 34, 4, 7, 0, 35, 4, - 7, 0, 36, 4, 7, 0, 37, 4, 7, 0, 38, 4, 7, 0, 39, 4, 7, 0, 40, 4, 7, 0, 41, 4, 7, 0, 42, 4, 7, 0, 43, 4, - 7, 0, 44, 4, 7, 0, 45, 4, 7, 0, 46, 4, 7, 0, 47, 4, 7, 0, 48, 4, 7, 0, 49, 4, 7, 0, 50, 4, 7, 0, 51, 4, - 7, 0, 52, 4, 7, 0, 53, 4, 47, 0,169, 0,187, 0, 54, 4, 7, 0, 55, 4, 4, 0,211, 2,188, 0, 5, 0, 64, 0,249, 1, - 7, 0, 56, 4, 7, 0, 57, 4, 2, 0, 18, 0, 2, 0, 58, 4,189, 0, 5, 0,189, 0, 0, 0,189, 0, 1, 0, 4, 0, 16, 0, - 4, 0, 59, 4, 11, 0, 2, 0,190, 0, 9, 0,190, 0, 0, 0,190, 0, 1, 0, 4, 0, 60, 4, 4, 0, 61, 4, 4, 0, 62, 4, - 4, 0, 18, 0, 11, 0, 63, 4, 11, 0, 64, 4, 14, 0, 65, 4,139, 0, 23, 0,139, 0, 0, 0,139, 0, 1, 0, 4, 0, 18, 0, - 4, 0, 66, 4, 4, 0, 67, 4, 4, 0, 68, 4, 4, 0, 69, 4, 4, 0, 70, 4, 4, 0, 71, 4, 4, 0, 72, 4, 4, 0, 27, 0, - 4, 0, 61, 4, 4, 0, 13, 2, 2, 0, 73, 4, 2, 0, 56, 0, 0, 0, 19, 0, 0, 0, 74, 4, 0, 0, 75, 4, 0, 0, 76, 4, - 0, 0, 77, 4, 14, 0, 78, 4,191, 0, 79, 4, 11, 0, 80, 4,192, 0, 1, 0, 7, 0, 46, 2,182, 0, 30, 0, 4, 0, 18, 0, - 7, 0, 81, 4, 7, 0, 82, 4, 7, 0, 83, 4, 4, 0, 84, 4, 4, 0, 85, 4, 4, 0, 86, 4, 4, 0, 87, 4, 7, 0, 88, 4, - 7, 0, 89, 4, 7, 0, 90, 4, 7, 0, 91, 4, 7, 0, 92, 4, 7, 0, 93, 4, 7, 0, 94, 4, 7, 0, 95, 4, 7, 0, 96, 4, - 7, 0, 97, 4, 7, 0, 98, 4, 7, 0, 99, 4, 7, 0,100, 4, 7, 0,101, 4, 7, 0,102, 4, 7, 0,103, 4, 7, 0,104, 4, - 7, 0,105, 4, 4, 0,106, 4, 4, 0,107, 4, 7, 0,108, 4, 7, 0,226, 3,184, 0, 54, 0, 4, 0, 61, 4, 4, 0,109, 4, -193, 0,110, 4,194, 0,111, 4, 0, 0, 27, 0, 0, 0,112, 4, 2, 0,113, 4, 7, 0,114, 4, 0, 0,115, 4, 7, 0,116, 4, - 7, 0,117, 4, 7, 0,118, 4, 7, 0,119, 4, 7, 0,120, 4, 7, 0,121, 4, 7, 0,122, 4, 7, 0,123, 4, 7, 0,124, 4, - 2, 0,125, 4, 0, 0,126, 4, 2, 0,127, 4, 7, 0,128, 4, 7, 0,129, 4, 0, 0,130, 4, 4, 0,129, 0, 4, 0,131, 4, - 4, 0,132, 4, 2, 0,133, 4, 2, 0,134, 4,192, 0,135, 4, 4, 0,136, 4, 4, 0, 82, 0, 7, 0,137, 4, 7, 0,138, 4, - 7, 0,139, 4, 7, 0,140, 4, 2, 0,141, 4, 2, 0,142, 4, 2, 0,143, 4, 2, 0,144, 4, 2, 0,145, 4, 2, 0,146, 4, - 2, 0,147, 4, 2, 0,148, 4,195, 0,149, 4, 7, 0,150, 4, 7, 0,151, 4,139, 0,152, 4, 14, 0, 19, 3,188, 0,153, 4, - 7, 0,154, 4, 7, 0,155, 4, 7, 0,156, 4, 4, 0,157, 4,196, 0, 1, 0, 7, 0,158, 4,155, 0, 52, 0,154, 0,159, 4, - 2, 0, 16, 0, 2, 0,160, 4, 2, 0,161, 4, 2, 0,162, 4, 7, 0,163, 4, 2, 0,164, 4, 2, 0,165, 4, 7, 0,166, 4, - 2, 0,167, 4, 2, 0,168, 4, 7, 0,169, 4, 7, 0,170, 4, 7, 0,171, 4, 4, 0,172, 4, 4, 0,173, 4, 4, 0,174, 4, - 4, 0, 27, 0, 7, 0,175, 4, 4, 0,176, 4, 7, 0,177, 4, 7, 0,178, 4, 7, 0,179, 4, 79, 0,180, 4, 79, 0,181, 4, - 0, 0,182, 4, 7, 0,183, 4, 7, 0,184, 4, 31, 0, 80, 0, 2, 0,185, 4, 0, 0,186, 4, 0, 0,187, 4, 7, 0,188, 4, - 4, 0,189, 4, 7, 0,190, 4, 7, 0,191, 4, 4, 0,192, 4, 4, 0, 18, 0, 7, 0,193, 4, 7, 0,194, 4, 7, 0,195, 4, -196, 0,196, 4, 4, 0, 53, 0, 7, 0,197, 4, 7, 0,198, 4, 7, 0,199, 4, 7, 0,200, 4, 7, 0,201, 4, 7, 0,202, 4, - 7, 0,203, 4, 4, 0,204, 4, 7, 0,205, 4,197, 0, 78, 0, 22, 0, 32, 0, 34, 0, 75, 0, 2, 0,179, 0, 2, 0, 88, 1, - 2, 0,122, 1, 2, 0,206, 4, 7, 0,207, 4, 7, 0,208, 4, 7, 0,209, 4, 7, 0,210, 4, 7, 0,211, 4, 7, 0,212, 4, - 7, 0,170, 1, 7, 0,172, 1, 7, 0,171, 1, 7, 0, 30, 0, 4, 0,213, 4, 7, 0,214, 4, 7, 0,215, 4, 7, 0,216, 4, - 7, 0,217, 4, 7, 0,218, 4, 7, 0,219, 4, 7, 0,220, 4, 2, 0,221, 4, 2, 0, 87, 1, 2, 0,222, 4, 2, 0,223, 4, - 2, 0,224, 4, 2, 0,225, 4, 2, 0,226, 4, 2, 0,227, 4, 7, 0,228, 4, 7, 0,229, 4, 7, 0,230, 4, 7, 0,231, 4, - 7, 0,232, 4, 7, 0,233, 4, 7, 0,234, 4, 7, 0,235, 4, 7, 0,236, 4, 7, 0,237, 4, 7, 0,238, 4, 7, 0,239, 4, - 2, 0,240, 4, 2, 0,241, 4, 2, 0,242, 4, 2, 0,243, 4, 7, 0,244, 4, 7, 0,245, 4, 7, 0,246, 4, 7, 0,247, 4, - 2, 0,248, 4, 2, 0,249, 4, 2, 0,250, 4, 2, 0,251, 4, 7, 0,252, 4, 7, 0,253, 4, 7, 0,254, 4, 7, 0,255, 4, - 7, 0, 0, 5, 7, 0, 1, 5, 7, 0, 2, 5, 2, 0, 3, 5, 2, 0, 4, 5, 2, 0, 5, 5, 2, 0, 6, 5, 2, 0, 7, 5, - 2, 0, 18, 0, 7, 0, 8, 5, 7, 0, 9, 5, 31, 0, 80, 0, 46, 0,140, 1, 2, 0,141, 1, 2, 0, 76, 1, 2, 0,179, 2, - 25, 0,154, 0, 57, 0, 70, 1,198, 0, 8, 0,198, 0, 0, 0,198, 0, 1, 0, 4, 0,204, 3, 4, 0, 10, 5, 4, 0, 18, 0, - 2, 0, 11, 5, 2, 0, 12, 5, 27, 0,168, 0,199, 0, 13, 0, 11, 0, 13, 5, 11, 0, 14, 5, 4, 0, 15, 5, 4, 0, 16, 5, - 4, 0, 17, 5, 4, 0, 18, 5, 4, 0, 19, 5, 4, 0, 20, 5, 4, 0, 21, 5, 4, 0, 22, 5, 4, 0, 23, 5, 4, 0, 27, 0, - 0, 0, 24, 5,200, 0, 5, 0, 11, 0, 25, 5, 11, 0, 26, 5, 4, 0, 27, 5, 4, 0, 30, 0, 0, 0, 28, 5,201, 0, 17, 0, - 4, 0, 29, 5, 4, 0, 30, 5, 4, 0, 31, 5, 4, 0, 32, 5, 4, 0, 33, 5, 4, 0, 34, 5, 4, 0, 35, 5, 4, 0, 36, 5, - 4, 0, 37, 5, 4, 0, 38, 5, 4, 0, 39, 5, 4, 0, 40, 5, 2, 0, 41, 5, 2, 0, 42, 5, 4, 0, 43, 5, 4, 0, 44, 5, - 4, 0, 91, 0,202, 0, 17, 0, 4, 0, 16, 0, 4, 0, 31, 5, 4, 0, 45, 5, 4, 0, 46, 5, 4, 0, 47, 5, 4, 0, 48, 5, - 4, 0, 49, 5, 4, 0, 50, 5, 7, 0, 51, 5, 4, 0, 52, 5, 4, 0, 92, 0, 4, 0, 53, 5, 4, 0, 54, 5, 4, 0, 55, 5, - 4, 0, 56, 5, 4, 0, 57, 5, 21, 0, 31, 0,203, 0, 9, 0, 4, 0, 58, 5, 7, 0, 59, 5, 7, 0, 60, 5, 7, 0, 61, 5, - 4, 0, 62, 5, 2, 0, 18, 0, 2, 0, 27, 0, 7, 0, 83, 4, 7, 0, 30, 0,204, 0, 11, 0,204, 0, 0, 0,204, 0, 1, 0, - 0, 0, 19, 0, 63, 0, 63, 5, 64, 0, 64, 5, 4, 0,204, 3, 4, 0, 65, 5, 4, 0, 66, 5, 4, 0, 27, 0, 4, 0, 67, 5, - 4, 0, 68, 5,205, 0, 13, 0, 0, 0, 69, 5, 0, 0,250, 0, 0, 0, 70, 5, 0, 0, 18, 0, 0, 0, 71, 5, 0, 0, 72, 5, - 0, 0, 73, 5, 0, 0, 74, 5, 2, 0, 75, 5, 2, 0, 76, 5, 7, 0, 77, 5, 0, 0, 78, 5, 0, 0,124, 0,206, 0,106, 0, -205, 0, 79, 5,199, 0, 80, 5,200, 0, 81, 5,201, 0, 82, 5,202, 0, 83, 5, 4, 0, 34, 3, 4, 0,129, 0, 4, 0,131, 4, - 7, 0, 84, 5, 4, 0, 85, 5, 4, 0, 86, 5, 4, 0, 87, 5, 4, 0, 88, 5, 2, 0, 18, 0, 2, 0, 89, 5, 7, 0, 90, 5, - 7, 0, 91, 5, 7, 0, 92, 5, 7, 0, 93, 5, 7, 0, 94, 5, 2, 0, 95, 5, 2, 0, 96, 5, 2, 0, 97, 5, 2, 0, 98, 5, - 2, 0,250, 0, 2, 0, 99, 5, 4, 0,100, 5, 2, 0,101, 5, 2, 0,102, 5, 2, 0,109, 1, 2, 0,108, 0, 2, 0,103, 5, - 2, 0,104, 5, 2, 0,105, 5, 2, 0,106, 5, 2, 0,107, 5, 2, 0, 70, 5, 2, 0, 69, 5, 2, 0,108, 5, 2, 0, 71, 5, - 2, 0,109, 5, 4, 0,110, 5, 4, 0, 87, 1, 4, 0,111, 5, 2, 0,112, 5, 2, 0, 91, 0, 2, 0,113, 5, 2, 0,114, 5, - 2, 0,115, 5, 2, 0,116, 5, 2, 0,117, 5, 2, 0,118, 5, 19, 0,119, 5, 19, 0,120, 5, 18, 0,121, 5, 14, 0,122, 5, - 2, 0,123, 5, 2, 0,124, 5, 7, 0,125, 5, 7, 0,126, 5, 7, 0,127, 5, 7, 0,128, 5, 4, 0,129, 5, 7, 0,130, 5, - 7, 0,131, 5, 7, 0,132, 5, 7, 0,133, 5, 2, 0,134, 5, 2, 0,135, 5, 2, 0,136, 5, 2, 0,137, 5, 2, 0,138, 5, - 2, 0,139, 5, 7, 0,140, 5, 7, 0,141, 5, 7, 0,142, 5, 0, 0,143, 5, 4, 0,144, 5, 2, 0,145, 5, 2, 0, 74, 0, - 0, 0,146, 5, 7, 0,147, 5, 7, 0,148, 5, 0, 0,149, 5, 0, 0,150, 5, 0, 0,151, 5, 0, 0,152, 5, 4, 0,153, 5, - 2, 0,154, 5, 2, 0,155, 5, 7, 0,156, 5, 7, 0,157, 5, 2, 0,158, 5, 2, 0,159, 5, 7, 0,160, 5, 2, 0,161, 5, - 2, 0,162, 5, 4, 0,163, 5, 2, 0,164, 5, 2, 0,165, 5, 2, 0,166, 5, 2, 0,167, 5, 7, 0,168, 5, 7, 0, 30, 0, - 37, 0,169, 5, 0, 0,170, 5,207, 0, 9, 0,207, 0, 0, 0,207, 0, 1, 0, 0, 0,171, 5, 2, 0,172, 5, 2, 0,173, 5, - 2, 0,174, 5, 2, 0, 91, 0, 7, 0,175, 5, 7, 0, 30, 0,208, 0, 7, 0, 2, 0,228, 2, 2, 0, 87, 1, 2, 0, 92, 3, - 2, 0,176, 5, 7, 0,177, 5, 7, 0, 30, 0, 37, 0,178, 5,209, 0, 5, 0, 7, 0,179, 5, 0, 0, 16, 0, 0, 0, 91, 0, - 0, 0, 30, 0, 0, 0, 74, 0,210, 0, 15, 0, 7, 0,180, 5, 7, 0,181, 5, 7, 0,182, 5, 7, 0,183, 5, 7, 0,184, 5, - 7, 0,185, 5, 7, 0,186, 5, 7, 0,187, 5, 7, 0,188, 5, 7, 0,189, 5, 4, 0,190, 5, 7, 0,191, 5, 7, 0,192, 5, - 2, 0, 91, 0, 2, 0, 30, 0,211, 0, 32, 0,209, 0,193, 5, 2, 0,194, 5, 2, 0, 96, 5, 2, 0, 97, 5, 2, 0, 98, 5, - 2, 0,250, 0, 2, 0, 99, 5, 2, 0,195, 5, 2, 0,196, 5, 2, 0,197, 5, 2, 0,198, 5,208, 0,199, 5, 2, 0,200, 5, - 2, 0,101, 5, 7, 0,201, 5,210, 0,202, 5, 7, 0,219, 4, 7, 0,220, 4, 4, 0, 18, 0, 2, 0, 87, 1, 2, 0,203, 5, - 2, 0,222, 4, 2, 0,223, 4, 2, 0,204, 5, 2, 0, 27, 0, 2, 0,224, 4, 2, 0,225, 4, 2, 0,226, 4, 2, 0,227, 4, - 2, 0,205, 5, 2, 0, 91, 0, 7, 0,206, 5,212, 0, 6, 0,212, 0, 0, 0,212, 0, 1, 0, 4, 0, 60, 4, 0, 0, 19, 0, - 4, 0, 18, 0, 27, 0,207, 5,213, 0, 4, 0,214, 0,145, 3, 11, 0,208, 5, 0, 0,209, 5, 4, 0, 92, 0,215, 0, 8, 0, -213, 0,210, 5, 2, 0, 18, 0, 2, 0, 27, 0, 2, 0,211, 5, 2, 0,212, 5, 2, 0,213, 5, 4, 0, 91, 0, 11, 0,214, 5, -216, 0, 6, 0, 2, 0,108, 0, 2, 0, 66, 4, 2, 0,215, 5, 2, 0,222, 2, 4, 0, 18, 0, 7, 0,238, 2,217, 0, 14, 0, - 2, 0, 18, 0, 2, 0,216, 5, 2, 0,217, 5, 2, 0,218, 5,216, 0,219, 5, 11, 0,214, 5, 7, 0,220, 5, 7, 0, 56, 0, - 4, 0,221, 5, 4, 0,222, 5, 4, 0,223, 5, 4, 0,224, 5, 41, 0,125, 0, 27, 0,168, 0,218, 0, 14, 0,213, 0,210, 5, - 4, 0, 92, 0, 4, 0,225, 5, 7, 0,226, 5, 7, 0,227, 5, 7, 0,228, 5, 4, 0,229, 5, 4, 0,230, 5, 7, 0,231, 5, - 7, 0,232, 5, 4, 0,233, 5, 7, 0,234, 5, 7, 0,235, 5, 4, 0, 27, 0,219, 0, 1, 0,213, 0,210, 5,220, 0, 7, 0, -213, 0,210, 5, 2, 0, 18, 0, 2, 0, 27, 0, 4, 0, 37, 0, 4, 0,236, 5, 90, 0,237, 5, 11, 0,214, 5,221, 0, 5, 0, -221, 0, 0, 0,221, 0, 1, 0, 0, 0, 19, 0, 7, 0,238, 5, 4, 0, 27, 0,222, 0, 4, 0, 4, 0,108, 0, 7, 0,239, 5, - 7, 0,178, 1, 4, 0, 18, 0,223, 0, 85, 0,220, 0,240, 5,220, 0,241, 5,218, 0,168, 3,219, 0,242, 5, 7, 0,243, 5, - 2, 0,244, 5, 2, 0,245, 5, 7, 0,246, 5, 7, 0,247, 5, 2, 0, 66, 4, 2, 0,248, 5, 7, 0,249, 5, 7, 0,250, 5, - 7, 0,251, 5, 2, 0,252, 5, 2, 0,221, 5, 2, 0,253, 5, 2, 0,254, 5, 2, 0,255, 5, 2, 0, 0, 6, 7, 0, 1, 6, - 7, 0, 2, 6, 7, 0, 3, 6, 2, 0, 4, 6, 2, 0, 5, 6, 2, 0, 6, 6, 2, 0, 7, 6, 2, 0, 8, 6, 2, 0, 9, 6, - 2, 0, 10, 6, 2, 0, 11, 6,215, 0, 12, 6,217, 0, 13, 6, 7, 0, 14, 6, 7, 0, 15, 6, 7, 0, 16, 6, 2, 0, 17, 6, - 2, 0, 18, 6, 0, 0, 19, 6, 0, 0, 20, 6, 2, 0, 21, 6, 7, 0, 22, 6, 7, 0, 23, 6, 7, 0, 24, 6, 7, 0, 25, 6, - 7, 0, 26, 6, 7, 0, 27, 6, 7, 0, 28, 6, 7, 0, 29, 6, 7, 0, 30, 6, 7, 0, 31, 6, 2, 0, 32, 6, 0, 0, 33, 6, - 0, 0, 34, 6, 0, 0, 35, 6, 0, 0, 36, 6, 27, 0, 37, 6, 0, 0, 38, 6, 0, 0, 39, 6, 0, 0, 40, 6, 0, 0, 41, 6, - 0, 0, 42, 6, 0, 0, 43, 6, 0, 0, 44, 6, 0, 0, 45, 6, 0, 0, 46, 6, 0, 0, 47, 6, 2, 0, 48, 6, 2, 0, 49, 6, - 2, 0, 50, 6, 2, 0, 51, 6, 0, 0, 52, 6, 0, 0, 53, 6, 0, 0, 54, 6, 0, 0, 55, 6, 4, 0, 56, 6, 4, 0, 57, 6, - 4, 0, 58, 6, 4, 0, 59, 6, 2, 0, 60, 6, 2, 0, 91, 0, 4, 0, 61, 6, 7, 0, 62, 6, 7, 0, 63, 6,222, 0, 64, 6, -224, 0, 8, 0, 4, 0, 65, 6, 4, 0, 66, 6, 4, 0, 67, 6, 4, 0, 68, 6, 4, 0, 69, 6, 4, 0, 70, 6, 4, 0, 53, 0, - 4, 0,138, 2,225, 0, 4, 0, 7, 0, 71, 6, 0, 0, 72, 6, 0, 0, 73, 6, 2, 0, 18, 0,226, 0, 4, 0, 7, 0, 74, 6, - 4, 0, 18, 0, 4, 0, 75, 6, 4, 0, 56, 0, 41, 0, 46, 0, 22, 0, 32, 0, 34, 0, 75, 0, 27, 0,207, 5,197, 0, 76, 6, - 41, 0, 77, 6, 14, 0, 78, 6,198, 0, 79, 6, 27, 0, 80, 6, 7, 0, 81, 6, 7, 0, 82, 6, 7, 0, 83, 6, 7, 0, 84, 6, - 4, 0,204, 3, 4, 0, 85, 6, 4, 0, 86, 6, 2, 0, 18, 0, 2, 0, 76, 1, 57, 0, 70, 1,227, 0, 87, 6,223, 0, 88, 6, -228, 0, 89, 6,206, 0,185, 0,203, 0, 90, 6, 14, 0,102, 0, 14, 0, 91, 6, 11, 0, 92, 6, 11, 0, 93, 6, 11, 0, 94, 6, - 11, 0, 95, 6, 11, 0, 96, 6,229, 0, 97, 6, 2, 0, 98, 6, 2, 0, 99, 6, 2, 0,251, 0, 2, 0,205, 3, 4, 0,215, 3, - 4, 0,100, 6, 14, 0,101, 6,209, 0,193, 5,211, 0,102, 6,225, 0,103, 6,179, 0,181, 3,226, 0,104, 6,230, 0,105, 6, - 10, 0, 6, 4, 10, 0,106, 6,231, 0, 14, 0,231, 0, 0, 0,231, 0, 1, 0, 42, 0,242, 0, 40, 0, 69, 1,230, 0,105, 6, -232, 0,107, 6, 7, 0, 96, 2, 7, 0, 97, 2, 7, 0,108, 0, 7, 0,108, 6, 2, 0,109, 6, 2, 0, 18, 0, 2, 0,143, 0, - 2, 0, 27, 0,233, 0, 41, 0, 7, 0,110, 6, 7, 0,111, 6, 7, 0,112, 6, 7, 0,113, 6, 7, 0,114, 6, 7, 0,115, 6, - 7, 0,116, 6, 7, 0,117, 6, 7, 0,118, 6, 7, 0, 94, 1, 7, 0,119, 6, 7, 0,120, 6, 7, 0,121, 6, 7, 0,122, 6, - 7, 0,175, 0, 2, 0,123, 6, 2, 0,124, 6, 0, 0,125, 6, 0, 0, 86, 1, 2, 0,126, 6, 2, 0,127, 6, 2, 0,128, 6, - 2, 0,109, 6, 7, 0,129, 6, 7, 0,130, 6, 68, 0,131, 6,179, 0,181, 3,233, 0,132, 6,234, 0,133, 6,235, 0,134, 6, -236, 0,135, 6,237, 0,136, 6,238, 0,137, 6, 7, 0,138, 6, 2, 0,139, 6, 2, 0,140, 6, 7, 0,141, 6, 7, 0,142, 6, - 7, 0,143, 6, 7, 0,144, 6, 0, 0,145, 6,239, 0, 51, 0,240, 0, 0, 0,240, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, - 7, 0,148, 6, 2, 0,149, 6, 7, 0,118, 6, 7, 0, 94, 1, 7, 0,150, 6, 2, 0,151, 6, 0, 0,208, 2, 4, 0,152, 6, - 2, 0,128, 6, 2, 0,109, 6, 27, 0,207, 5, 27, 0,153, 6, 14, 0,154, 6,231, 0,155, 6,239, 0,132, 6, 0, 0,156, 6, - 4, 0,204, 3, 4, 0, 85, 6, 2, 0,157, 6, 2, 0,158, 6, 2, 0,159, 6, 2, 0,160, 6, 2, 0, 18, 0, 2, 0, 31, 2, - 7, 0,114, 0, 7, 0,161, 6, 7, 0,162, 6, 7, 0,163, 6, 7, 0,175, 0, 7, 0, 81, 6, 2, 0,164, 6, 2, 0,165, 6, - 2, 0,166, 6, 0, 0,167, 6, 0, 0,168, 6, 0, 0,169, 6, 0, 0,170, 6, 0, 0,171, 6, 14, 0,172, 6, 14, 0,173, 6, - 14, 0,174, 6, 2, 0,175, 6, 2, 0,152, 2, 2, 0,176, 6, 0, 0,177, 6, 11, 0,178, 6,179, 0,181, 3,241, 0, 24, 0, - 19, 0, 37, 0, 19, 0, 63, 0, 18, 0,179, 6, 18, 0,180, 6, 18, 0,181, 6, 7, 0,182, 6, 7, 0,183, 6, 7, 0,184, 6, - 7, 0,185, 6, 2, 0,186, 6, 2, 0,187, 6, 2, 0,188, 6, 2, 0,189, 6, 2, 0,190, 6, 2, 0, 18, 0, 2, 0,191, 6, - 2, 0,192, 6, 2, 0,193, 6, 2, 0,194, 6, 2, 0,195, 6, 2, 0,160, 6, 7, 0,196, 6, 4, 0,197, 6, 4, 0,198, 6, -240, 0, 6, 0,240, 0, 0, 0,240, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 7, 0,148, 6, 2, 0,149, 6,242, 0, 8, 0, -240, 0, 0, 0,240, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 7, 0,148, 6, 2, 0,149, 6, 0, 0,199, 6, 0, 0,124, 0, -243, 0, 14, 0,240, 0, 0, 0,240, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 7, 0,148, 6, 2, 0,149, 6,241, 0,200, 6, -244, 0,201, 6, 14, 0,202, 6, 2, 0, 87, 1, 2, 0,203, 6, 4, 0, 18, 0, 7, 0,204, 6, 4, 0,160, 6,245, 0, 21, 0, -240, 0, 0, 0,240, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 7, 0,148, 6, 2, 0,149, 6,241, 0,200, 6, 2, 0,205, 6, - 2, 0,206, 6, 2, 0,207, 6, 2, 0,208, 6, 2, 0,191, 6, 2, 0,209, 6, 2, 0,210, 6, 0, 0, 18, 0, 0, 0, 27, 0, - 11, 0, 72, 2, 4, 0,211, 6, 4, 0,212, 6, 22, 0,213, 6, 11, 0,214, 6,246, 0, 18, 0,240, 0, 0, 0,240, 0, 1, 0, - 14, 0,146, 6, 4, 0,147, 6, 7, 0,148, 6, 2, 0,149, 6,241, 0,200, 6, 7, 0, 96, 2, 7, 0, 97, 2, 2, 0,205, 6, - 2, 0,215, 6, 2, 0,216, 6, 2, 0,217, 6, 4, 0, 18, 0, 7, 0,218, 6, 4, 0,109, 6, 4, 0, 27, 0,179, 0,181, 3, -247, 0, 16, 0, 0, 0,219, 6, 0, 0,220, 6, 0, 0,221, 6, 0, 0,222, 6, 0, 0,223, 6, 0, 0,224, 6, 4, 0,225, 6, - 4, 0,226, 6, 4, 0,227, 6, 2, 0, 16, 0, 2, 0, 18, 0, 2, 0,228, 6, 2, 0,229, 6, 2, 0,190, 1, 2, 0,230, 6, - 0, 0,231, 6,248, 0, 16, 0,240, 0, 0, 0,240, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 4, 0,232, 6,247, 0,233, 6, -249, 0,234, 6, 14, 0,235, 6, 14, 0,236, 6,250, 0,237, 6,238, 0,238, 6,251, 0,239, 6, 2, 0,240, 6, 2, 0,241, 6, - 2, 0,242, 6, 2, 0, 30, 0,252, 0, 15, 0,240, 0, 0, 0,240, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 7, 0,148, 6, - 2, 0,149, 6,241, 0,200, 6, 14, 0,243, 6,253, 0,244, 6, 0, 0,245, 6,254, 0,246, 6, 2, 0, 18, 0, 2, 0,247, 6, - 2, 0,248, 6, 2, 0,249, 6,255, 0, 25, 0,240, 0, 0, 0,240, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 4, 0, 18, 0, - 42, 0,242, 2, 40, 0, 69, 1, 54, 0,250, 6, 0, 1,251, 6, 1, 1,252, 6,179, 0,181, 3, 7, 0,253, 6, 7, 0, 96, 2, - 7, 0, 97, 2, 7, 0,218, 6, 7, 0,254, 6, 7, 0,255, 6, 2, 0, 0, 7, 2, 0, 27, 0, 2, 0, 1, 7, 2, 0, 2, 7, - 0, 0, 3, 7, 0, 0, 4, 7, 0, 0, 5, 7, 0, 0,160, 6, 2, 1, 11, 0,240, 0, 0, 0,240, 0, 1, 0, 14, 0,146, 6, - 4, 0,147, 6, 7, 0,148, 6, 2, 0,149, 6, 2, 0,203, 6, 2, 0, 18, 0, 4, 0, 27, 0,244, 0,201, 6,241, 0,200, 6, - 3, 1, 31, 0,240, 0, 0, 0,240, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 7, 0,148, 6, 2, 0,149, 6, 37, 0, 6, 7, - 4, 0, 7, 7, 4, 0, 8, 7, 2, 0, 92, 0, 2, 0, 9, 7, 2, 0, 10, 7, 0, 0, 11, 7, 0, 0, 12, 7, 4, 0, 13, 7, - 4, 0, 14, 7, 4, 0, 15, 7, 2, 0, 16, 7, 2, 0, 17, 7, 2, 0, 18, 7, 2, 0, 19, 7, 7, 0, 20, 7, 18, 0, 21, 7, - 18, 0, 22, 7, 4, 0, 23, 7, 4, 0, 24, 7, 0, 0, 25, 7, 0, 0, 26, 7, 2, 0, 27, 7, 0, 0,208, 2, 11, 0, 28, 7, - 4, 1, 10, 0, 22, 0, 32, 0, 11, 0, 29, 7, 11, 0, 30, 7, 11, 0, 31, 7, 11, 0, 32, 7, 11, 0, 33, 7, 4, 0, 92, 0, - 4, 0, 34, 7, 0, 0, 35, 7, 0, 0, 36, 7, 5, 1, 10, 0,240, 0, 0, 0,240, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, - 7, 0,148, 6, 4, 1, 37, 7, 2, 0, 92, 0, 2, 0, 9, 7, 4, 0, 91, 0, 11, 0, 38, 7, 6, 1, 3, 0, 6, 1, 0, 0, - 6, 1, 1, 0, 7, 0, 39, 7, 7, 1, 9, 0,240, 0, 0, 0,240, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 7, 0,148, 6, -241, 0,200, 6, 14, 0, 40, 7, 4, 0, 41, 7, 4, 0, 18, 0, 8, 1, 27, 0,240, 0, 0, 0,240, 0, 1, 0, 14, 0,146, 6, - 4, 0,147, 6, 7, 0,148, 6, 2, 0,149, 6,241, 0,200, 6, 22, 0, 42, 7, 22, 0, 81, 0, 2, 0, 18, 0, 2, 0, 91, 0, - 7, 0, 43, 7, 7, 0, 96, 2, 7, 0, 97, 2, 7, 0,218, 6, 7, 0, 44, 7, 7, 0, 45, 7, 7, 0, 46, 7, 57, 0, 70, 1, - 57, 0, 47, 7, 4, 0, 48, 7, 2, 0, 49, 7, 2, 0, 50, 7, 2, 0,251, 0, 2, 0, 86, 1, 14, 0, 51, 7,179, 0,181, 3, - 9, 1, 10, 0,240, 0, 0, 0,240, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 7, 0,148, 6, 2, 0,149, 6, 2, 0, 18, 0, - 2, 0,213, 3, 4, 0, 27, 0,179, 0,181, 3, 10, 1, 7, 0, 10, 1, 0, 0, 10, 1, 1, 0, 4, 0, 52, 7, 4, 0, 22, 0, - 0, 0, 85, 0, 4, 0, 53, 7, 4, 0, 16, 0, 11, 1, 14, 0,240, 0, 0, 0,240, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, - 7, 0,148, 6, 2, 0,149, 6, 4, 0, 10, 7, 4, 0, 27, 0, 14, 0, 54, 7, 14, 0, 55, 7, 0, 0, 56, 7, 0, 0, 57, 7, - 4, 0, 58, 7, 4, 0, 59, 7, 12, 1, 6, 0,240, 0, 0, 0,240, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 4, 0, 27, 0, - 0, 0, 60, 7, 13, 1, 24, 0,240, 0, 0, 0,240, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 7, 0, 96, 2, 7, 0, 97, 2, - 7, 0, 61, 7, 7, 0, 62, 7, 7, 0,218, 6,232, 0, 63, 7,230, 0,105, 6, 14, 1,251, 6, 4, 0, 18, 0, 2, 0, 87, 1, - 2, 0,109, 6, 4, 0, 64, 7, 7, 0, 65, 7, 7, 0,147, 3, 7, 0, 92, 3, 4, 0, 27, 0, 7, 0, 66, 7, 7, 0, 67, 7, - 4, 0, 68, 7, 4, 0, 69, 7, 15, 1, 7, 0, 15, 1, 0, 0, 15, 1, 1, 0, 0, 0, 70, 7, 2, 0, 71, 7, 2, 0, 72, 7, - 2, 0, 73, 7, 2, 0, 27, 0, 16, 1, 12, 0, 2, 0, 72, 7, 2, 0, 74, 7, 2, 0, 75, 7, 0, 0,208, 2, 2, 0, 76, 7, - 2, 0, 77, 7, 2, 0, 78, 7, 2, 0, 79, 7, 2, 0, 80, 7, 2, 0,191, 6, 7, 0, 81, 7, 7, 0, 82, 7, 17, 1, 18, 0, - 17, 1, 0, 0, 17, 1, 1, 0, 0, 0, 19, 0, 16, 1, 83, 7, 16, 1, 84, 7, 16, 1, 85, 7, 16, 1, 86, 7, 7, 0, 87, 7, - 2, 0, 88, 7, 2, 0, 89, 7, 2, 0, 90, 7, 2, 0, 91, 7, 2, 0, 92, 7, 2, 0, 93, 7, 2, 0, 94, 7, 2, 0, 95, 7, - 2, 0, 96, 7, 2, 0, 27, 0, 18, 1, 10, 0, 0, 0, 97, 7, 0, 0, 98, 7, 0, 0, 99, 7, 0, 0,100, 7, 0, 0,101, 7, - 0, 0,102, 7, 2, 0,103, 7, 2, 0,104, 7, 2, 0,105, 7, 2, 0,106, 7, 19, 1, 8, 0, 0, 0,107, 7, 0, 0,108, 7, - 0, 0,109, 7, 0, 0,110, 7, 0, 0,111, 7, 0, 0,112, 7, 7, 0,108, 6, 7, 0, 27, 0, 20, 1, 3, 0, 0, 0,113, 7, - 2, 0,114, 7, 2, 0, 27, 0, 21, 1, 21, 0, 18, 1,115, 7, 18, 1,116, 7, 18, 1,117, 7, 18, 1,118, 7, 18, 1,119, 7, - 18, 1,120, 7, 18, 1,121, 7, 18, 1,122, 7, 18, 1,123, 7, 18, 1,124, 7, 18, 1,125, 7, 18, 1,126, 7, 18, 1,127, 7, - 18, 1,128, 7, 18, 1,129, 7, 18, 1,130, 7, 19, 1,131, 7, 20, 1,132, 7, 0, 0,133, 7, 7, 0,134, 7, 7, 0, 27, 0, - 22, 1,119, 0, 0, 0,135, 7, 0, 0,136, 7, 0, 0,101, 7, 0, 0,137, 7, 0, 0,113, 7, 0, 0,138, 7, 0, 0,139, 7, - 0, 0,140, 7, 0, 0,141, 7, 0, 0,142, 7, 0, 0,143, 7, 0, 0,144, 7, 0, 0,145, 7, 0, 0,146, 7, 0, 0,147, 7, - 0, 0,148, 7, 0, 0,149, 7, 0, 0,150, 7, 0, 0,151, 7, 0, 0,152, 7, 0, 0,153, 7, 0, 0,154, 7, 0, 0,155, 7, - 0, 0,156, 7, 0, 0,157, 7, 0, 0,158, 7, 0, 0,159, 7, 0, 0,160, 7, 0, 0,145, 6, 0, 0,161, 7, 0, 0,162, 7, - 0, 0,163, 7, 0, 0,164, 7, 0, 0,165, 7, 0, 0,166, 7, 0, 0,167, 7, 0, 0,168, 7, 0, 0,169, 7, 0, 0,170, 7, - 0, 0,171, 7, 0, 0,172, 7, 0, 0,173, 7, 0, 0,174, 7, 0, 0,175, 7, 0, 0,176, 7, 0, 0,177, 7, 0, 0,178, 7, - 0, 0,179, 7, 0, 0,180, 7, 0, 0,181, 7, 0, 0,182, 7, 0, 0,183, 7, 0, 0,184, 7, 0, 0,185, 7, 0, 0,186, 7, - 0, 0,187, 7, 0, 0,188, 7, 0, 0,189, 7, 0, 0,190, 7, 0, 0,191, 7, 0, 0,192, 7, 0, 0,193, 7, 0, 0,194, 7, - 0, 0,195, 7, 0, 0,196, 7, 0, 0,197, 7, 0, 0,198, 7, 0, 0,199, 7, 0, 0,200, 7, 0, 0,201, 7, 0, 0,202, 7, - 0, 0,203, 7, 0, 0,204, 7, 0, 0,205, 7, 0, 0,206, 7, 0, 0,207, 7, 0, 0,208, 7, 0, 0,209, 7, 0, 0,210, 7, - 0, 0,211, 7, 0, 0,212, 7, 0, 0,213, 7, 0, 0,214, 7, 0, 0,215, 7, 0, 0,216, 7, 0, 0,217, 7, 0, 0,218, 7, - 0, 0,219, 7, 0, 0,220, 7, 0, 0,221, 7, 0, 0,222, 7, 0, 0,223, 7, 0, 0,224, 7, 0, 0,225, 7, 0, 0,226, 7, - 0, 0,227, 7, 0, 0,228, 7, 0, 0,229, 7, 0, 0,230, 7, 0, 0,231, 7, 0, 0,232, 7, 0, 0,233, 7, 0, 0,234, 7, - 0, 0,235, 7, 0, 0,236, 7, 0, 0,237, 7, 0, 0,238, 7, 0, 0,239, 7, 0, 0,240, 7, 0, 0,241, 7, 0, 0,242, 7, - 0, 0,243, 7, 0, 0,244, 7, 0, 0,245, 7, 0, 0,246, 7, 0, 0,247, 7, 0, 0,248, 7, 0, 0,249, 7, 0, 0,250, 7, - 23, 1, 5, 0, 0, 0,251, 7, 0, 0,158, 7, 0, 0,161, 7, 2, 0, 18, 0, 2, 0, 27, 0, 24, 1, 24, 0, 24, 1, 0, 0, - 24, 1, 1, 0, 0, 0,171, 5, 21, 1,252, 7, 22, 1,253, 7, 22, 1,254, 7, 22, 1,255, 7, 22, 1, 0, 8, 22, 1, 1, 8, - 22, 1, 2, 8, 22, 1, 3, 8, 22, 1, 4, 8, 22, 1, 5, 8, 22, 1, 6, 8, 22, 1, 7, 8, 22, 1, 8, 8, 22, 1, 9, 8, - 22, 1, 10, 8, 22, 1, 11, 8, 22, 1, 12, 8, 22, 1, 13, 8, 23, 1, 14, 8, 4, 0, 15, 8, 4, 0, 27, 0, 25, 1, 3, 0, - 25, 1, 0, 0, 25, 1, 1, 0, 0, 0, 16, 8, 26, 1, 5, 0, 4, 0, 18, 0, 4, 0, 27, 0, 7, 0,151, 2, 7, 0, 17, 8, - 7, 0, 46, 2, 27, 1, 93, 0, 4, 0, 18, 0, 4, 0, 18, 8, 4, 0, 19, 8, 0, 0, 20, 8, 0, 0, 21, 8, 0, 0, 22, 8, - 0, 0, 23, 8, 0, 0, 24, 8, 0, 0, 25, 8, 0, 0, 26, 8, 0, 0, 27, 8, 0, 0, 28, 8, 0, 0, 29, 8, 4, 0, 30, 8, - 2, 0, 31, 8, 2, 0, 32, 8, 2, 0, 33, 8, 2, 0, 34, 8, 4, 0, 35, 8, 4, 0, 36, 8, 4, 0, 37, 8, 4, 0, 38, 8, - 2, 0, 39, 8, 2, 0, 40, 8, 4, 0, 41, 8, 4, 0, 42, 8, 4, 0, 43, 8, 4, 0, 44, 8, 4, 0, 45, 8, 4, 0, 54, 7, - 4, 0, 46, 8, 2, 0, 47, 8, 2, 0, 48, 8, 2, 0, 49, 8, 2, 0, 50, 8, 14, 0, 51, 8, 14, 0, 52, 8, 14, 0, 53, 8, - 14, 0, 54, 8, 14, 0, 55, 8, 14, 0, 56, 8, 0, 0, 57, 8, 2, 0, 58, 8, 2, 0, 59, 8, 2, 0, 60, 8, 2, 0, 61, 8, - 2, 0, 62, 8, 2, 0, 63, 8, 2, 0, 64, 8, 2, 0, 65, 8, 26, 1, 66, 8, 2, 0, 67, 8, 2, 0, 68, 8, 2, 0, 69, 8, - 2, 0, 70, 8, 2, 0, 71, 8, 2, 0, 72, 8, 2, 0, 73, 8, 2, 0, 74, 8, 4, 0, 75, 8, 4, 0, 76, 8, 2, 0, 77, 8, - 2, 0, 78, 8, 2, 0, 79, 8, 2, 0, 80, 8, 2, 0, 81, 8, 2, 0, 82, 8, 2, 0, 83, 8, 2, 0, 84, 8, 2, 0, 85, 8, - 2, 0, 86, 8, 2, 0, 87, 8, 2, 0, 88, 8, 2, 0, 89, 8, 2, 0, 90, 8, 2, 0, 91, 8, 2, 0, 92, 8, 2, 0, 93, 8, - 2, 0, 94, 8, 7, 0, 95, 8, 4, 0, 96, 8, 7, 0, 97, 8, 2, 0, 17, 6, 2, 0, 18, 6, 2, 0, 98, 8, 2, 0, 99, 8, - 50, 0,100, 8, 7, 0,101, 8, 2, 0,102, 8, 2, 0, 74, 0, 0, 0,103, 8, 4, 0,104, 8, 4, 0,105, 8, 28, 1, 24, 0, - 22, 0, 32, 0, 14, 0,106, 8, 14, 0,107, 8, 14, 0,108, 8, 14, 0,146, 6, 41, 0,125, 0, 41, 0,109, 8, 4, 0,110, 8, - 4, 0, 91, 0, 2, 0,111, 8, 2, 0,112, 8, 2, 0,113, 8, 2, 0,114, 8, 2, 0,115, 8, 2, 0,116, 8, 2, 0,117, 8, - 2, 0,118, 8, 2, 0,119, 8, 2, 0,120, 8, 2, 0,121, 8, 2, 0, 27, 0,238, 0,122, 8, 11, 0,123, 8, 2, 0,124, 8, - 29, 1, 5, 0, 29, 1, 0, 0, 29, 1, 1, 0, 29, 1,125, 8, 15, 0,126, 8, 4, 0, 18, 0, 30, 1, 7, 0, 30, 1, 0, 0, - 30, 1, 1, 0, 29, 1,127, 8, 29, 1,128, 8, 2, 0,120, 5, 2, 0, 18, 0, 4, 0, 27, 0, 31, 1, 25, 0, 31, 1, 0, 0, - 31, 1, 1, 0, 32, 1,129, 8, 33, 1,239, 6, 0, 0,130, 8, 0, 0,131, 8, 0, 0,132, 8, 2, 0,133, 8, 2, 0,134, 8, - 2, 0,135, 8, 2, 0,136, 8, 2, 0,137, 8, 2, 0, 27, 0, 2, 0, 18, 0, 2, 0, 69, 7, 2, 0,138, 8, 2, 0,139, 8, - 4, 0,140, 8, 31, 1,141, 8, 11, 0,142, 8, 4, 0,143, 8, 4, 0,144, 8, 4, 0,145, 8, 4, 0,146, 8, 0, 0,147, 8, - 34, 1, 22, 0, 34, 1, 0, 0, 34, 1, 1, 0, 29, 1,127, 8, 29, 1,128, 8, 29, 1,148, 8, 29, 1,149, 8, 28, 1,150, 8, - 18, 0, 51, 0, 0, 0,147, 6, 0, 0,151, 8, 2, 0,192, 6, 2, 0,193, 6, 2, 0,152, 8, 2, 0, 27, 0, 2, 0,115, 8, - 2, 0, 53, 7, 2, 0, 18, 0, 35, 1,129, 8, 14, 0,153, 8, 14, 0,146, 6, 14, 0,154, 8, 14, 0,155, 8, 36, 1, 24, 0, - 36, 1, 0, 0, 36, 1, 1, 0,241, 0,200, 6, 18, 0,156, 8, 18, 0,157, 8, 2, 0,192, 6, 2, 0,193, 6, 2, 0,158, 8, - 2, 0,159, 8, 2, 0,160, 8, 2, 0, 18, 0, 7, 0, 92, 2, 2, 0,135, 8, 2, 0,136, 8, 2, 0,114, 8, 2, 0,161, 8, - 2, 0,119, 8, 2, 0, 86, 1, 37, 1,129, 8, 14, 0,162, 8, 14, 0,163, 8, 14, 0,154, 8, 0, 0,164, 8, 11, 0,165, 8, - 38, 1, 14, 0, 0, 0,166, 8, 2, 0,167, 8, 2, 0,168, 8, 2, 0,169, 8, 2, 0,170, 8, 2, 0,109, 5, 2, 0,171, 8, - 28, 1,172, 8, 41, 0,173, 8, 4, 0,174, 8, 4, 0,175, 8, 4, 0,176, 8, 4, 0, 27, 0, 0, 0, 70, 7, 39, 1, 3, 0, - 0, 0,177, 8, 4, 0,178, 8, 4, 0,179, 8, 40, 1, 4, 0, 4, 0, 7, 7, 4, 0,180, 8, 4, 0, 13, 7, 4, 0,181, 8, - 41, 1, 2, 0, 4, 0,182, 8, 4, 0,183, 8, 42, 1, 5, 0, 7, 0,184, 8, 7, 0,185, 8, 7, 0,186, 8, 4, 0, 18, 0, - 4, 0, 27, 0, 43, 1, 7, 0, 0, 0,187, 8, 0, 0,221, 6, 44, 0,138, 0, 2, 0,188, 8, 2, 0, 71, 5, 2, 0,189, 8, - 2, 0,190, 8, 44, 1, 14, 0, 44, 1, 0, 0, 44, 1, 1, 0, 4, 0, 56, 0, 4, 0, 22, 0, 4, 0, 28, 0, 4, 0,191, 8, - 4, 0,192, 8, 4, 0,193, 8, 39, 1,194, 8, 0, 0,187, 8, 43, 1,175, 3, 40, 1,195, 8, 41, 1,196, 8, 42, 1,197, 8, - 45, 1, 12, 0, 0, 0, 35, 0, 11, 0,227, 0, 0, 0,228, 0, 4, 0,231, 0, 4, 0,239, 0, 11, 0,232, 0, 7, 0,234, 0, - 7, 0,235, 0, 11, 0,198, 8, 11, 0,199, 8, 11, 0,236, 0, 11, 0,238, 0, 46, 1, 48, 0, 46, 1, 0, 0, 46, 1, 1, 0, - 11, 0,200, 8, 11, 0, 25, 0, 0, 0, 19, 0, 4, 0, 18, 0, 4, 0, 16, 0, 4, 0, 22, 0, 4, 0, 89, 0, 4, 0,201, 8, - 4, 0,202, 8, 4, 0,192, 8, 4, 0,193, 8, 4, 0,203, 8, 4, 0,250, 0, 4, 0,204, 8, 4, 0,205, 8, 7, 0,206, 8, - 7, 0,207, 8, 7, 0,208, 8, 4, 0,129, 0, 4, 0,209, 8, 4, 0,210, 8, 44, 1,211, 8, 31, 0, 80, 0, 41, 0,125, 0, - 27, 0,212, 8, 44, 0,138, 0, 7, 0,213, 8, 7, 0,214, 8, 45, 1, 71, 1, 46, 1,215, 8, 46, 1,216, 8, 46, 1,217, 8, - 14, 0,218, 8, 47, 1,219, 8, 11, 0,220, 8, 7, 0, 83, 4, 7, 0,221, 8, 7, 0,222, 8, 4, 0,223, 8, 4, 0,224, 8, - 7, 0,225, 8, 11, 0,226, 8, 4, 0,227, 8, 4, 0,228, 8, 4, 0,229, 8, 7, 0,230, 8, 48, 1, 4, 0, 48, 1, 0, 0, - 48, 1, 1, 0, 14, 0,231, 8, 46, 1,232, 8,227, 0, 11, 0, 14, 0,233, 8, 14, 0,218, 8, 14, 0,234, 8, 46, 1,235, 8, - 0, 0,236, 8, 0, 0,237, 8, 4, 0,238, 8, 4, 0,239, 8, 4, 0,240, 8, 4, 0, 27, 0, 19, 0,241, 8, 49, 1, 4, 0, - 7, 0,242, 8, 7, 0, 92, 3, 2, 0,243, 8, 2, 0,244, 8, 50, 1, 6, 0, 7, 0,245, 8, 7, 0,246, 8, 7, 0,247, 8, - 7, 0,248, 8, 4, 0,249, 8, 4, 0,250, 8, 51, 1, 8, 0, 7, 0,251, 8, 7, 0,252, 8, 7, 0,253, 8, 7, 0,254, 8, - 7, 0,255, 8, 4, 0,248, 2, 4, 0, 0, 9, 4, 0, 1, 9, 52, 1, 2, 0, 7, 0,179, 5, 7, 0, 27, 0, 53, 1, 5, 0, - 7, 0, 2, 9, 7, 0, 3, 9, 4, 0, 92, 0, 4, 0,209, 2, 4, 0, 4, 9, 54, 1, 6, 0, 54, 1, 0, 0, 54, 1, 1, 0, - 2, 0, 16, 0, 2, 0, 18, 0, 2, 0, 5, 9, 2, 0, 56, 0, 55, 1, 8, 0, 55, 1, 0, 0, 55, 1, 1, 0, 2, 0, 16, 0, - 2, 0, 18, 0, 2, 0, 5, 9, 2, 0, 56, 0, 7, 0, 22, 0, 7, 0,129, 0, 56, 1, 45, 0, 56, 1, 0, 0, 56, 1, 1, 0, - 2, 0, 16, 0, 2, 0, 18, 0, 2, 0, 5, 9, 2, 0,246, 0, 2, 0,125, 4, 2, 0, 6, 9, 7, 0, 7, 9, 7, 0, 90, 0, - 7, 0, 5, 3, 4, 0, 8, 9, 4, 0, 82, 0, 4, 0,211, 2, 7, 0, 9, 9, 7, 0, 10, 9, 7, 0, 11, 9, 7, 0, 12, 9, - 7, 0, 13, 9, 7, 0, 14, 9, 7, 0, 2, 3, 7, 0, 68, 1, 7, 0, 15, 9, 7, 0, 16, 9, 7, 0, 27, 0, 7, 0, 17, 9, - 7, 0, 18, 9, 7, 0, 19, 9, 2, 0, 20, 9, 2, 0, 21, 9, 2, 0, 22, 9, 2, 0, 23, 9, 2, 0, 24, 9, 2, 0, 25, 9, - 2, 0, 26, 9, 2, 0, 27, 9, 2, 0, 31, 2, 2, 0, 28, 9, 2, 0, 28, 2, 2, 0, 29, 9, 0, 0, 30, 9, 0, 0, 31, 9, - 7, 0,244, 0, 57, 1, 32, 9, 64, 0,249, 1, 58, 1, 16, 0, 58, 1, 0, 0, 58, 1, 1, 0, 2, 0, 16, 0, 2, 0, 18, 0, - 2, 0, 5, 9, 2, 0,246, 0, 7, 0,253, 2, 7, 0,254, 2, 7, 0,255, 2, 7, 0, 81, 2, 7, 0, 0, 3, 7, 0, 1, 3, - 7, 0, 33, 9, 7, 0, 2, 3, 7, 0, 4, 3, 7, 0, 5, 3,254, 0, 5, 0, 2, 0, 16, 0, 2, 0, 34, 9, 2, 0, 18, 0, - 2, 0, 35, 9, 22, 0, 42, 7,253, 0, 3, 0, 4, 0, 68, 0, 4, 0, 36, 9,254, 0, 2, 0, 59, 1, 7, 0, 59, 1, 0, 0, - 59, 1, 1, 0, 0, 0, 19, 0, 2, 0, 16, 0, 2, 0, 18, 0, 4, 0, 21, 0, 11, 0, 37, 9, 60, 1, 5, 0, 0, 0, 19, 0, - 7, 0, 94, 1, 7, 0, 38, 9, 4, 0, 39, 9, 4, 0, 27, 0, 61, 1, 4, 0, 2, 0, 16, 0, 2, 0, 18, 0, 2, 0, 91, 0, - 2, 0, 30, 0, 62, 1, 4, 0, 0, 0, 19, 0, 63, 0, 40, 9, 7, 0, 94, 1, 7, 0, 27, 0, 63, 1, 6, 0, 2, 0, 41, 9, - 2, 0, 42, 9, 2, 0, 16, 0, 2, 0, 43, 9, 0, 0, 44, 9, 0, 0, 45, 9, 64, 1, 5, 0, 4, 0, 16, 0, 4, 0, 27, 0, - 0, 0, 19, 0, 0, 0, 46, 9, 0, 0, 47, 9, 65, 1, 3, 0, 4, 0, 16, 0, 4, 0, 27, 0, 0, 0, 19, 0, 66, 1, 4, 0, - 2, 0, 48, 9, 2, 0, 49, 9, 2, 0, 18, 0, 2, 0, 27, 0, 67, 1, 6, 0, 0, 0, 19, 0, 0, 0, 50, 9, 2, 0, 51, 9, - 2, 0, 2, 3, 2, 0, 87, 1, 2, 0, 30, 0, 68, 1, 5, 0, 0, 0, 19, 0, 7, 0, 92, 3, 7, 0,216, 4, 2, 0, 18, 0, - 2, 0,223, 2, 69, 1, 3, 0, 0, 0, 19, 0, 4, 0,211, 2, 4, 0, 48, 9, 70, 1, 7, 0, 0, 0, 19, 0, 7, 0,216, 4, - 0, 0, 52, 9, 0, 0, 53, 9, 2, 0, 87, 1, 2, 0, 91, 0, 4, 0, 54, 9, 71, 1, 4, 0, 0, 0, 55, 9, 0, 0, 56, 9, - 4, 0, 16, 0, 7, 0,227, 2, 72, 1, 3, 0, 27, 0, 57, 9, 0, 0, 58, 9, 0, 0, 59, 9, 73, 1, 18, 0, 73, 1, 0, 0, - 73, 1, 1, 0, 2, 0, 16, 0, 2, 0, 60, 9, 2, 0, 18, 0, 2, 0, 61, 9, 2, 0, 62, 9, 2, 0, 63, 9, 2, 0, 91, 0, - 2, 0, 30, 0, 0, 0, 19, 0, 11, 0, 2, 0, 74, 1, 64, 9, 27, 0, 44, 0, 2, 0,215, 5, 2, 0, 65, 9, 2, 0, 66, 9, - 2, 0, 27, 0, 75, 1, 11, 0, 0, 0, 19, 0, 0, 0, 16, 0, 0, 0, 67, 9, 2, 0, 18, 0, 2, 0,223, 2, 2, 0, 68, 9, - 4, 0, 69, 9, 4, 0, 70, 9, 4, 0, 71, 9, 4, 0, 72, 9, 4, 0, 73, 9, 76, 1, 1, 0, 0, 0, 74, 9, 77, 1, 4, 0, - 37, 0, 6, 7, 0, 0, 16, 8, 4, 0, 87, 1, 4, 0, 18, 0, 74, 1, 18, 0, 74, 1, 0, 0, 74, 1, 1, 0, 74, 1, 75, 9, - 2, 0, 16, 0, 2, 0, 18, 0, 2, 0, 76, 9, 2, 0, 63, 9, 2, 0, 60, 9, 2, 0, 77, 9, 2, 0, 30, 0, 2, 0, 74, 0, - 0, 0, 19, 0, 11, 0, 2, 0, 78, 1, 64, 9, 73, 1, 78, 9, 2, 0, 14, 0, 2, 0, 79, 9, 4, 0, 80, 9, 79, 1, 3, 0, - 4, 0,237, 2, 4, 0, 27, 0, 27, 0, 44, 0, 80, 1, 15, 0,177, 0, 81, 9, 2, 0, 16, 0, 2, 0, 18, 0, 7, 0, 7, 9, - 7, 0, 90, 0, 0, 0, 19, 0, 0, 0, 82, 9, 2, 0, 83, 9, 2, 0, 84, 9, 2, 0,134, 0, 2, 0, 85, 9, 2, 0, 86, 9, - 2, 0, 27, 0, 7, 0, 87, 9, 7, 0, 88, 9, 81, 1, 8, 0, 7, 0, 89, 9, 7, 0, 90, 9, 7, 0, 91, 9, 7, 0, 92, 9, - 7, 0, 93, 9, 7, 0, 94, 9, 7, 0, 95, 9, 7, 0, 96, 9, 82, 1, 13, 0, 2, 0, 18, 0, 2, 0, 97, 9, 4, 0, 91, 0, - 4, 0, 30, 0, 2, 0,177, 6, 7, 0, 83, 4, 7, 0,221, 8, 47, 1,219, 8, 81, 1, 98, 9, 2, 0, 16, 0, 2, 0,114, 5, - 2, 0,215, 3, 2, 0, 99, 9, 83, 1, 11, 0, 4, 0,237, 2, 2, 0, 16, 0, 2, 0, 18, 0, 27, 0, 44, 0, 79, 0,100, 9, - 0, 0, 19, 0, 7, 0,101, 9, 7, 0,102, 9, 7, 0,221, 3, 2, 0,103, 9, 2, 0,104, 9, 84, 1, 5, 0, 2, 0, 16, 0, - 2, 0, 91, 0, 4, 0, 27, 0, 41, 0,125, 0, 27, 0,207, 5, 85, 1, 5, 0, 4, 0, 27, 0, 4, 0, 16, 0, 0, 0, 19, 0, - 0, 0, 46, 9, 27, 0, 44, 0, 86, 1, 13, 0, 2, 0, 18, 0, 2, 0, 16, 0, 2, 0, 60, 9, 2, 0,222, 3, 7, 0,105, 9, - 7, 0,106, 9, 7, 0, 86, 1, 7, 0,107, 9, 7, 0,191, 3, 7, 0,195, 3, 7, 0,108, 9, 7, 0,109, 9, 27, 0,110, 9, - 87, 1, 10, 0, 2, 0, 18, 0, 2, 0, 16, 0, 7, 0, 7, 9, 7, 0, 90, 0, 0, 0, 19, 0, 0, 0, 82, 9, 2, 0, 91, 0, - 2, 0, 30, 0, 2, 0, 74, 0, 2, 0,114, 5, 88, 1, 8, 0, 27, 0, 44, 0, 7, 0,255, 2, 7, 0,111, 9, 7, 0,112, 9, - 7, 0,222, 3, 2, 0, 91, 0, 2, 0,223, 2, 7, 0, 30, 0, 89, 1, 12, 0, 2, 0, 16, 0, 2, 0, 87, 1, 2, 0, 18, 0, - 2, 0, 2, 3, 2, 0,237, 2, 2, 0,113, 9, 4, 0, 27, 0, 7, 0,114, 9, 7, 0,115, 9, 7, 0,116, 9, 7, 0,117, 9, - 0, 0,118, 9, 90, 1, 9, 0, 2, 0, 18, 0, 2, 0, 16, 0, 4, 0, 7, 9, 4, 0, 90, 0, 0, 0, 19, 0, 2, 0, 86, 1, - 2, 0, 63, 0, 2, 0,119, 9, 2, 0,120, 9, 91, 1, 7, 0, 4, 0,211, 2, 4, 0,121, 9, 4, 0,122, 9, 4, 0,123, 9, - 7, 0,124, 9, 7, 0,125, 9, 0, 0, 52, 9, 92, 1, 7, 0, 0, 0,126, 9, 27, 0,127, 9, 0, 0, 58, 9, 2, 0,128, 9, - 2, 0, 91, 0, 4, 0, 30, 0, 0, 0, 59, 9, 93, 1, 6, 0, 2, 0, 18, 0, 2, 0, 16, 0, 4, 0, 7, 9, 4, 0, 90, 0, - 0, 0,129, 9, 0, 0,130, 9, 94, 1, 1, 0, 4, 0, 18, 0, 95, 1, 6, 0, 0, 0, 94, 0, 2, 0, 16, 0, 2, 0, 18, 0, - 4, 0,131, 9, 7, 0,132, 9, 37, 0, 6, 7, 96, 1, 4, 0, 0, 0,179, 2, 2, 0, 18, 0, 4, 0, 16, 0, 27, 0, 44, 0, - 97, 1, 2, 0, 4, 0, 16, 0, 4, 0,181, 6, 98, 1, 6, 0, 0, 0, 55, 9, 0, 0, 56, 9, 4, 0, 16, 0, 7, 0, 39, 2, - 27, 0, 68, 3, 27, 0,133, 9, 99, 1, 11, 0, 0, 0, 53, 6, 0, 0, 18, 0, 2, 0,134, 9, 4, 0, 16, 0, 7, 0, 94, 1, - 7, 0,135, 9, 7, 0,136, 9, 7, 0,137, 9, 4, 0,138, 9, 27, 0, 68, 3, 27, 0,139, 9, 78, 1, 10, 0, 78, 1, 0, 0, - 78, 1, 1, 0, 78, 1, 75, 9, 2, 0, 16, 0, 2, 0, 18, 0, 2, 0, 60, 9, 2, 0,140, 9, 0, 0, 19, 0, 11, 0, 2, 0, - 27, 0, 44, 0, 47, 1, 17, 0, 22, 0, 32, 0, 0, 0, 35, 0, 38, 0,153, 0, 11, 0,227, 0, 38, 0,141, 9, 31, 0, 80, 0, - 7, 0, 83, 4, 7, 0,142, 9, 7, 0,221, 8, 7, 0, 89, 9, 7, 0, 90, 9, 7, 0,143, 9, 4, 0, 92, 0, 4, 0, 27, 0, - 11, 0,144, 9, 11, 0,145, 9, 11, 0,146, 9,100, 1, 6, 0,100, 1, 0, 0,100, 1, 1, 0, 27, 0, 44, 0, 11, 0,147, 9, - 2, 0,251, 0, 0, 0,208, 2, 64, 0, 4, 0, 22, 0, 32, 0, 14, 0,148, 9, 4, 0,134, 0, 7, 0,149, 9,101, 1, 28, 0, -101, 1, 0, 0,101, 1, 1, 0, 21, 0,150, 9,101, 1, 38, 0, 14, 0,151, 9, 0, 0, 19, 0, 7, 0,152, 9, 7, 0,153, 9, - 7, 0,154, 9, 7, 0,155, 9, 4, 0, 18, 0, 7, 0,156, 9, 7, 0,157, 9, 7, 0,158, 9, 7, 0,159, 9, 7, 0, 94, 1, - 7, 0, 39, 2, 7, 0,160, 9, 7, 0,209, 2, 7, 0,161, 9, 7, 0,162, 9, 7, 0,163, 9, 7, 0,164, 9, 7, 0,165, 9, - 7, 0,176, 0, 4, 0,134, 0, 2, 0,253, 5, 2, 0,166, 9,102, 1, 27, 0, 22, 0, 32, 0, 34, 0, 75, 0, 14, 0,167, 9, - 14, 0,168, 9, 14, 0,169, 9,101, 1,170, 9, 11, 0,171, 9, 11, 0,172, 9, 4, 0, 18, 0, 4, 0,157, 6, 4, 0,173, 9, - 4, 0, 27, 0, 2, 0, 6, 3, 2, 0,211, 6, 4, 0,174, 9, 4, 0,134, 0, 4, 0,175, 9, 2, 0,176, 9, 2, 0,177, 9, - 2, 0,178, 9, 2, 0,179, 9, 4, 0,180, 9, 4, 0,181, 9, 4, 0,182, 9, 4, 0,183, 9, 4, 0,184, 9, 4, 0,185, 9, -103, 1, 2, 0, 7, 0,165, 2, 4, 0, 18, 0,181, 0, 5, 0,103, 1,186, 9, 4, 0,209, 2, 4, 0,187, 9, 4, 0,188, 9, - 4, 0, 18, 0,180, 0, 16, 0, 4, 0,189, 9, 4, 0,190, 9, 4, 0,191, 9, 4, 0,192, 9, 2, 0,193, 9, 2, 0,194, 9, - 2, 0,195, 9, 2, 0,251, 0, 2, 0,196, 9, 2, 0,197, 9, 2, 0,198, 9, 2, 0,199, 9, 4, 0,200, 9, 4, 0,201, 9, - 4, 0,202, 9, 4, 0,203, 9,104, 1, 40, 0,104, 1, 0, 0,104, 1, 1, 0, 21, 0,150, 9, 14, 0,250, 3, 0, 0, 19, 0, - 2, 0, 18, 0, 2, 0,204, 9, 2, 0,208, 3, 2, 0,205, 9, 0, 0,206, 9, 0, 0,207, 9, 0, 0,208, 9,101, 1,209, 9, -104, 1, 38, 0,104, 1,210, 9, 14, 0,211, 9, 14, 0,212, 9,181, 0,183, 3, 27, 0,213, 9,104, 1,214, 9, 7, 0, 77, 1, - 7, 0,176, 0, 7, 0,215, 9, 7, 0, 18, 2, 7, 0,197, 3, 7, 0,199, 3, 2, 0,231, 3, 2, 0, 27, 0, 7, 0,216, 9, - 7, 0,217, 9, 7, 0,202, 3, 7, 0,218, 9, 7, 0,219, 9, 7, 0,220, 9, 7, 0,221, 9, 7, 0,222, 9, 7, 0,223, 9, - 7, 0,224, 9, 7, 0,225, 9, 11, 0,226, 9,178, 0, 16, 0, 14, 0,227, 9, 74, 0,228, 9, 2, 0, 18, 0, 2, 0, 27, 0, - 4, 0,229, 9, 4, 0, 91, 0, 7, 0,108, 2, 7, 0,230, 9, 7, 0,231, 9, 14, 0,232, 9, 4, 0,233, 9, 4, 0,234, 9, - 11, 0,235, 9, 11, 0,236, 9,180, 0,182, 3, 0, 0,237, 9,105, 1, 1, 0, 4, 0,234, 9,106, 1, 12, 0, 4, 0,234, 9, - 7, 0, 73, 9, 2, 0,238, 9, 2, 0,239, 9, 7, 0,240, 9, 7, 0,241, 9, 2, 0,242, 9, 2, 0, 18, 0, 7, 0,243, 9, - 7, 0,244, 9, 7, 0,245, 9, 7, 0,246, 9,107, 1, 7, 0,107, 1, 0, 0,107, 1, 1, 0, 14, 0,247, 9, 4, 0, 18, 0, - 4, 0,248, 9, 0, 0, 19, 0, 23, 1,249, 9,177, 0, 9, 0, 22, 0, 32, 0, 14, 0,250, 9, 14, 0,227, 9, 14, 0,251, 9, - 14, 0,102, 0, 4, 0, 18, 0, 4, 0,252, 9, 4, 0,253, 9, 4, 0, 27, 0,244, 0, 8, 0, 22, 0,254, 9, 14, 0,227, 9, - 64, 0,255, 9, 0, 0, 0, 10, 4, 0, 1, 10, 4, 0, 18, 0, 4, 0, 2, 10, 4, 0, 27, 0,108, 1, 13, 0,240, 0, 0, 0, -240, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 7, 0,148, 6, 2, 0,149, 6,241, 0,200, 6,177, 0,178, 3,244, 0, 3, 10, - 0, 0, 87, 1, 0, 0,203, 6, 2, 0, 18, 0, 7, 0, 4, 10,109, 1, 8, 0,109, 1, 0, 0,109, 1, 1, 0,107, 1, 5, 10, - 31, 0, 80, 0, 14, 0,184, 3, 4, 0, 18, 0, 0, 0, 19, 0, 4, 0,112, 8,110, 1, 5, 0,110, 1, 0, 0,110, 1, 1, 0, - 31, 0, 80, 0, 2, 0, 18, 0, 0, 0, 6, 10,111, 1, 14, 0,111, 1, 0, 0,111, 1, 1, 0, 11, 0, 2, 0, 2, 0, 16, 0, - 2, 0, 18, 0, 0, 0, 7, 10, 0, 0, 8, 10, 0, 0, 19, 0, 2, 0, 27, 0, 7, 0, 9, 10, 7, 0, 10, 10, 31, 0, 80, 0, - 7, 0, 11, 10, 7, 0, 12, 10,112, 1, 9, 0,112, 1, 0, 0,112, 1, 1, 0, 27, 0, 13, 10, 0, 0, 9, 3, 7, 0, 14, 10, - 2, 0, 15, 10, 2, 0, 18, 0, 2, 0, 16, 0, 2, 0, 16, 10,113, 1, 7, 0, 37, 0, 6, 7, 21, 0,150, 9, 4, 0, 18, 0, - 4, 0, 17, 10, 14, 0, 18, 10, 27, 0, 13, 10, 0, 0, 9, 3,114, 1, 15, 0, 27, 0, 13, 10, 2, 0, 19, 10, 2, 0, 18, 0, - 2, 0, 20, 10, 2, 0, 21, 10, 0, 0, 9, 3, 27, 0, 22, 10, 0, 0, 23, 10, 7, 0, 24, 10, 7, 0, 39, 2, 7, 0, 25, 10, - 7, 0, 26, 10, 2, 0, 16, 0, 2, 0, 87, 1, 7, 0, 94, 1,115, 1, 6, 0, 27, 0, 13, 10, 7, 0,186, 9, 2, 0, 27, 10, - 2, 0, 28, 10, 2, 0, 18, 0, 2, 0, 29, 10,116, 1, 6, 0, 27, 0, 13, 10, 4, 0, 30, 10, 4, 0, 31, 10, 4, 0, 92, 0, - 4, 0, 27, 0, 0, 0, 9, 3,117, 1, 4, 0, 27, 0, 13, 10, 4, 0, 18, 0, 4, 0, 30, 10, 0, 0, 9, 3,118, 1, 4, 0, - 27, 0, 13, 10, 4, 0, 18, 0, 4, 0, 30, 10, 0, 0, 9, 3,119, 1, 4, 0, 27, 0, 13, 10, 4, 0, 18, 0, 4, 0, 30, 10, - 0, 0, 9, 3,120, 1, 2, 0, 4, 0, 18, 0, 7, 0, 83, 4,121, 1, 2, 0, 27, 0, 13, 10, 0, 0, 9, 3,122, 1, 10, 0, - 27, 0, 13, 10, 4, 0, 32, 10, 7, 0,128, 0, 4, 0, 18, 0, 2, 0, 4, 7, 2, 0, 33, 10, 2, 0, 91, 0, 2, 0, 30, 0, - 7, 0, 34, 10, 0, 0, 9, 3,123, 1, 10, 0, 27, 0, 13, 10, 2, 0, 16, 0, 2, 0,133, 4, 4, 0, 89, 0, 4, 0, 90, 0, - 7, 0,111, 9, 7, 0,112, 9, 4, 0, 27, 0,177, 0, 81, 9, 0, 0, 9, 3,124, 1, 4, 0, 27, 0, 13, 10, 4, 0,209, 3, - 4, 0, 35, 10, 0, 0, 9, 3,125, 1, 4, 0, 27, 0, 13, 10, 4, 0,209, 3, 4, 0, 27, 0, 0, 0, 9, 3,126, 1, 6, 0, - 27, 0, 13, 10, 7, 0,128, 0, 7, 0, 80, 3, 4, 0, 36, 10, 2, 0,209, 3, 2, 0,210, 3,127, 1, 6, 0, 27, 0, 13, 10, - 4, 0, 37, 10, 4, 0, 38, 10, 7, 0, 39, 10, 7, 0, 40, 10, 0, 0, 9, 3,128, 1, 16, 0, 27, 0, 13, 10, 27, 0,210, 9, - 4, 0, 16, 0, 7, 0, 41, 10, 7, 0, 42, 10, 7, 0, 43, 10, 7, 0, 44, 10, 7, 0, 45, 10, 7, 0, 46, 10, 7, 0, 47, 10, - 7, 0, 48, 10, 7, 0, 49, 10, 2, 0, 18, 0, 2, 0, 27, 0, 2, 0, 91, 0, 2, 0, 30, 0,129, 1, 3, 0, 27, 0, 13, 10, - 4, 0, 18, 0, 4, 0, 31, 2,130, 1, 5, 0, 27, 0, 13, 10, 4, 0, 18, 0, 4, 0, 27, 0, 7, 0, 50, 10, 0, 0, 9, 3, -131, 1, 10, 0, 27, 0, 13, 10, 0, 0, 9, 3, 2, 0, 51, 10, 2, 0, 52, 10, 0, 0, 53, 10, 0, 0, 54, 10, 7, 0, 55, 10, - 7, 0, 56, 10, 7, 0, 57, 10, 7, 0, 58, 10,132, 1, 5, 0, 27, 0, 13, 10, 0, 0, 9, 3, 7, 0,217, 2, 2, 0, 59, 10, - 2, 0, 18, 0,133, 1, 8, 0, 7, 0, 8, 0, 7, 0, 9, 0, 7, 0, 10, 0, 7, 0, 11, 0, 7, 0, 60, 10, 7, 0, 61, 10, - 2, 0, 18, 0, 2, 0, 31, 2,134, 1, 8, 0, 7, 0, 8, 0, 7, 0, 9, 0, 7, 0, 10, 0, 7, 0, 11, 0, 7, 0, 60, 10, - 7, 0, 61, 10, 2, 0, 18, 0, 2, 0, 31, 2,135, 1, 8, 0, 7, 0, 8, 0, 7, 0, 9, 0, 7, 0, 10, 0, 7, 0, 11, 0, - 7, 0, 60, 10, 7, 0, 61, 10, 2, 0, 18, 0, 2, 0, 31, 2,136, 1, 7, 0, 27, 0, 13, 10, 0, 0, 9, 3, 7, 0, 94, 1, - 7, 0,103, 1, 2, 0, 18, 0, 2, 0, 87, 1, 4, 0, 27, 0,137, 1, 5, 0, 27, 0, 68, 3, 7, 0, 94, 1, 2, 0, 72, 3, - 0, 0, 74, 3, 0, 0, 62, 10,138, 1, 7, 0,230, 0,105, 6, 0, 0, 63, 10, 4, 0, 18, 0, 4, 0, 27, 0, 0, 0, 64, 10, - 27, 0,207, 5, 27, 0, 65, 10,139, 1, 3, 0,230, 0,105, 6, 4, 0, 18, 0, 4, 0, 27, 0,140, 1, 6, 0,230, 0,105, 6, - 4, 0, 18, 0, 4, 0, 27, 0, 0, 0, 64, 10, 7, 0, 50, 10, 27, 0,207, 5,141, 1, 10, 0,141, 1, 0, 0,141, 1, 1, 0, - 2, 0, 16, 0, 2, 0, 18, 0, 0, 0, 66, 10, 7, 0, 31, 1, 7, 0, 32, 1, 2, 0,247, 9, 2, 0, 67, 10, 27, 0, 44, 0, -142, 1, 22, 0,142, 1, 0, 0,142, 1, 1, 0, 2, 0, 18, 0, 2, 0, 87, 1, 2, 0, 68, 10, 2, 0, 69, 10, 31, 0, 80, 0, -177, 0, 81, 9, 27, 0,168, 0, 7, 0, 89, 0, 7, 0, 90, 0, 7, 0, 70, 10, 7, 0, 71, 10, 7, 0, 72, 10, 7, 0, 73, 10, - 7, 0,251, 2, 7, 0,147, 3, 7, 0, 83, 9, 7, 0, 74, 10, 0, 0, 75, 10, 0, 0, 76, 10, 14, 0,187, 3,143, 1, 11, 0, - 7, 0, 46, 2, 7, 0,111, 9, 7, 0,112, 9, 11, 0, 2, 0, 2, 0, 77, 10, 2, 0, 78, 10, 2, 0, 79, 10, 2, 0, 80, 10, - 2, 0, 81, 10, 2, 0, 82, 10, 2, 0,179, 2,144, 1, 21, 0,144, 1, 0, 0,144, 1, 1, 0,144, 1, 83, 10, 0, 0, 19, 0, - 11, 0, 84, 10, 2, 0, 16, 0, 2, 0, 18, 0, 2, 0, 85, 10, 2, 0, 86, 10, 7, 0, 87, 10, 7, 0, 88, 10, 11, 0, 89, 10, - 2, 0, 90, 10, 2, 0, 91, 10, 4, 0, 74, 0, 11, 0,144, 9, 4, 0, 92, 10, 4, 0, 93, 10,144, 1, 94, 10,145, 1, 95, 10, -143, 1, 96, 10,146, 1, 4, 0, 0, 0, 97, 10, 2, 0, 98, 10, 2, 0, 99, 10, 4, 0, 27, 0,147, 1, 37, 0,147, 1, 0, 0, -147, 1, 1, 0,147, 1,100, 10, 0, 0, 19, 0, 2, 0, 16, 0, 2, 0, 18, 0, 2, 0,191, 8, 2, 0, 65, 9, 2, 0,101, 10, - 2, 0, 9, 7, 2, 0, 90, 10, 2, 0, 34, 9, 14, 0, 76, 9, 14, 0,102, 10,147, 1, 38, 0, 22, 0, 42, 7, 11, 0, 84, 10, - 7, 0, 87, 10, 7, 0, 88, 10, 7, 0, 81, 2, 7, 0,255, 2, 7, 0,103, 10, 4, 0,104, 10, 0, 0,105, 10, 2, 0,106, 10, - 2, 0,107, 10, 7, 0,108, 10, 7, 0,109, 10, 2, 0,110, 10, 2, 0,111, 10, 11, 0,112, 10, 19, 0,113, 10, 19, 0,114, 10, - 19, 0,115, 10,146, 1,154, 0,148, 1,116, 10,149, 1,117, 10,145, 1, 8, 0,145, 1, 0, 0,145, 1, 1, 0,147, 1,118, 10, -147, 1,119, 10,144, 1,120, 10,144, 1,121, 10, 4, 0, 18, 0, 4, 0, 27, 0, 57, 0, 20, 0, 22, 0, 32, 0, 34, 0, 75, 0, -179, 0,181, 3, 14, 0,122, 10, 14, 0,123, 10, 4, 0, 16, 0, 4, 0,124, 10, 4, 0,125, 10, 4, 0, 18, 0, 4, 0,104, 10, - 4, 0,126, 10, 14, 0, 76, 9, 14, 0,102, 10,150, 1,127, 10, 11, 0,128, 10, 11, 0,129, 10, 4, 0,130, 10, 11, 0,131, 10, - 11, 0,132, 10, 11, 0,133, 10,151, 1, 4, 0, 4, 0, 17, 0, 4, 0,227, 2, 4, 0,111, 9, 4, 0,112, 9,152, 1, 4, 0, - 4, 0, 17, 0, 7, 0,227, 2, 7, 0,111, 9, 7, 0,112, 9,153, 1, 2, 0, 0, 0,227, 2, 0, 0, 86, 1,154, 1, 4, 0, - 4, 0, 17, 0, 7, 0,134, 10, 7, 0,111, 9, 7, 0,112, 9,155, 1, 1, 0, 7, 0,135, 10,156, 1, 6, 0, 4, 0,127, 0, - 4, 0,129, 0, 4, 0, 34, 9, 0, 0,136, 10, 0, 0,137, 10, 2, 0, 27, 0,157, 1, 16, 0, 2, 0,135, 8, 2, 0,136, 8, - 2, 0,138, 10, 2, 0,139, 10, 2, 0,140, 10, 2, 0, 67, 0, 2, 0, 43, 7, 2, 0,141, 10, 7, 0,250, 2, 7, 0,142, 10, - 7, 0,143, 10, 2, 0,109, 1, 0, 0,144, 10, 0, 0,145, 10, 4, 0,146, 10, 4, 0,147, 10,158, 1, 9, 0, 7, 0,148, 10, - 7, 0,149, 10, 7, 0,143, 9, 7, 0, 92, 3, 7, 0,150, 10, 7, 0,218, 6, 2, 0, 90, 3, 0, 0,151, 10, 0, 0, 27, 0, -159, 1, 4, 0, 7, 0,152, 10, 7, 0,153, 10, 2, 0, 90, 3, 2, 0, 27, 0,160, 1, 3, 0, 7, 0,154, 10, 7, 0,206, 8, - 7, 0, 14, 0,161, 1, 4, 0, 0, 0, 35, 0,205, 0, 79, 5, 4, 0,129, 0, 4, 0,131, 4,162, 1, 3, 0, 0, 0,155, 10, - 4, 0,156, 10, 4, 0, 27, 0,163, 1, 4, 0, 2, 0,157, 10, 2, 0, 91, 0, 4, 0, 30, 0,205, 0,158, 10,164, 1, 9, 0, - 7, 0,159, 10, 7, 0,160, 10, 7, 0,161, 10, 7, 0, 92, 2, 7, 0,162, 10, 7, 0,163, 10, 7, 0,164, 10, 2, 0,165, 10, - 2, 0,166, 10,165, 1, 8, 0, 2, 0,167, 10, 2, 0,168, 10, 2, 0,169, 10, 2, 0,170, 10, 7, 0,171, 10, 7, 0,172, 10, - 7, 0,173, 10, 7, 0,174, 10,166, 1, 2, 0, 7, 0, 5, 0, 7, 0, 6, 0,167, 1, 2, 0, 0, 0,170, 0, 0, 0,175, 10, -168, 1, 1, 0, 0, 0, 19, 0,169, 1, 12, 0, 0, 0,176, 10, 0, 0,177, 10, 0, 0,209, 6, 0, 0,178, 10, 2, 0,138, 10, - 2, 0,179, 10, 7, 0,180, 10, 7, 0,181, 10, 7, 0,182, 10, 7, 0,147, 3, 7, 0,183, 10, 7, 0,184, 10,170, 1, 2, 0, - 11, 0,185, 10, 11, 0,186, 10,171, 1, 13, 0, 0, 0, 71, 5, 0, 0, 16, 0, 0, 0, 90, 3, 0, 0, 92, 3, 0, 0,177, 10, - 0, 0,108, 0, 0, 0,179, 2, 7, 0,187, 10, 7, 0,188, 10, 7, 0,146, 3, 7, 0,189, 10, 7, 0,190, 10, 7, 0,184, 10, -172, 1, 8, 0, 7, 0, 41, 9, 7, 0,128, 0, 7, 0,145, 10, 7, 0,172, 2, 7, 0,191, 10, 7, 0,240, 0, 7, 0,192, 10, - 4, 0, 16, 0,173, 1, 4, 0, 2, 0,193, 10, 2, 0,194, 10, 2, 0,195, 10, 2, 0, 27, 0,174, 1, 8, 0, 7, 0,196, 10, - 7, 0,217, 2, 7, 0,197, 10, 7, 0,184, 8, 7, 0,185, 8, 7, 0,186, 8, 7, 0,198, 10, 7, 0,199, 10,175, 1, 6, 0, - 2, 0,200, 10, 2, 0,201, 10, 7, 0,202, 10, 7, 0,203, 10, 7, 0,204, 10, 7, 0,205, 10,176, 1, 2, 0, 58, 0,206, 10, - 59, 0,207, 10,177, 1, 3, 0,176, 1, 78, 6, 7, 0,208, 10, 7, 0,209, 10,178, 1, 3, 0,176, 1, 78, 6, 4, 0,210, 10, - 4, 0, 27, 0,179, 1, 1, 0,176, 1, 78, 6,180, 1, 3, 0,176, 1, 78, 6, 4, 0,210, 10, 4, 0, 27, 0,181, 1, 3, 0, -176, 1, 78, 6, 4, 0,211, 10, 4, 0, 27, 0,182, 1, 1, 0,176, 1, 78, 6,183, 1, 3, 0,176, 1, 78, 6, 4, 0,212, 10, - 4, 0, 27, 0,184, 1, 3, 0,176, 1, 78, 6, 4, 0,213, 10, 4, 0, 27, 0,185, 1, 3, 0,176, 1, 78, 6, 4, 0,214, 10, - 4, 0, 27, 0,186, 1, 3, 0,176, 1, 78, 6, 4, 0,250, 0, 4, 0, 27, 0,187, 1, 1, 0, 0, 0, 19, 0,188, 1, 1, 0, - 0, 0, 19, 0,189, 1, 4, 0, 7, 0, 5, 0, 7, 0, 6, 0, 2, 0, 18, 0, 2, 0,215, 10,190, 1, 10, 0, 2, 0, 61, 4, - 2, 0, 18, 0, 7, 0,216, 4, 7, 0,216, 10, 7, 0,217, 10, 7, 0,218, 10, 7, 0,219, 10,189, 1,220, 10,189, 1,221, 10, -189, 1,222, 10, 54, 0, 11, 0, 4, 0, 18, 0, 4, 0, 63, 0, 4, 0,223, 10, 4, 0,224, 10, 19, 0,225, 10, 19, 0,226, 10, -190, 1,227, 10, 7, 0,228, 10, 7, 0,229, 10, 7, 0,230, 10, 7, 0,231, 10, 1, 1, 10, 0, 4, 0,247, 9, 4, 0,232, 10, - 7, 0,233, 10, 7, 0,234, 10, 7, 0,235, 10, 7, 0,236, 10, 7, 0, 9, 0, 7, 0, 11, 0, 4, 0, 87, 1, 4, 0,255, 2, - 0, 1, 18, 0, 4, 0,132, 0, 4, 0,237, 10, 4, 0,238, 10, 7, 0,239, 10, 4, 0,240, 10, 7, 0,241, 10, 7, 0,242, 10, - 4, 0,243, 10, 7, 0,244, 10, 4, 0,245, 10, 7, 0,246, 10, 1, 1,247, 10, 7, 0,248, 10, 7, 0,249, 10, 7, 0,250, 10, - 7, 0,251, 10, 4, 0,252, 10, 4, 0, 27, 0,191, 1, 4, 0, 42, 0,242, 2, 7, 0,253, 10, 7, 0,178, 1, 7, 0, 27, 0, -214, 0, 34, 0, 22, 0, 32, 0,191, 1,254, 10, 54, 0,220, 10, 46, 0,255, 10, 52, 0, 0, 11, 25, 0,154, 0, 0, 0, 1, 11, - 7, 0, 2, 11, 2, 0,108, 6, 2, 0, 3, 11, 4, 0,108, 0, 4, 0, 18, 0, 7, 0, 4, 11, 4, 0, 89, 2, 4, 0, 5, 11, - 7, 0, 6, 11, 7, 0, 7, 11, 7, 0, 8, 11, 7, 0,178, 1, 4, 0, 9, 11, 7, 0, 10, 11, 0, 0, 11, 11, 0, 0, 12, 11, - 0, 0, 13, 11, 0, 0, 14, 11, 7, 0, 15, 11, 7, 0, 16, 11, 7, 0, 17, 11, 7, 0,255, 2, 7, 0, 18, 11, 4, 0, 19, 11, - 7, 0,239, 5, 7, 0, 20, 11, 7, 0, 21, 11,192, 1, 10, 0, 4, 0, 16, 0, 4, 0,128, 0, 4, 0, 18, 0, 4, 0, 14, 4, - 4, 0, 22, 11, 4, 0, 23, 11, 4, 0, 24, 11, 4, 0, 73, 0, 0, 0, 19, 0, 11, 0, 2, 0,193, 1, 1, 0, 0, 0, 70, 7, - 95, 0, 8, 0,192, 1, 25, 11, 4, 0, 26, 11, 4, 0, 27, 11, 4, 0, 28, 11, 4, 0, 29, 11, 4, 0, 30, 0, 11, 0, 30, 11, -193, 1, 31, 11,194, 1, 5, 0, 7, 0,165, 2, 7, 0,237, 2, 7, 0, 39, 2, 2, 0,147, 2, 2, 0, 27, 0,195, 1, 5, 0, - 7, 0,165, 2, 7, 0,158, 4, 7, 0, 32, 11, 7, 0, 33, 11, 7, 0,237, 2,196, 1, 5, 0, 27, 0, 34, 11,197, 1, 21, 0, - 7, 0, 74, 6, 7, 0, 35, 11, 7, 0, 56, 0,198, 1, 3, 0, 7, 0, 36, 11, 4, 0, 37, 11, 4, 0, 38, 11,199, 1, 7, 0, - 4, 0, 39, 11, 4, 0, 40, 11, 4, 0, 41, 11, 7, 0, 42, 11, 7, 0, 43, 11, 7, 0, 44, 11, 7, 0, 56, 0,200, 1, 8, 0, -200, 1, 0, 0,200, 1, 1, 0, 27, 0, 44, 0, 4, 0, 3, 1, 2, 0, 18, 0, 2, 0, 87, 1, 7, 0,237, 2, 7, 0, 49, 9, -201, 1, 7, 0,201, 1, 0, 0,201, 1, 1, 0, 27, 0, 44, 0, 2, 0,222, 2, 2, 0, 18, 0, 2, 0, 13, 2, 2, 0, 56, 0, -202, 1, 17, 0,195, 1, 7, 4,195, 1, 45, 11,194, 1, 46, 11,195, 1, 32, 9,196, 1, 47, 11, 4, 0, 82, 0, 7, 0,237, 2, - 7, 0, 5, 3, 7, 0, 48, 11, 4, 0, 39, 11, 4, 0, 49, 11, 7, 0, 43, 11, 7, 0, 44, 11, 7, 0,108, 0, 4, 0, 50, 11, - 2, 0, 18, 0, 2, 0, 51, 11,203, 1, 15, 0, 7, 0,255, 0, 7, 0, 52, 11, 7, 0, 36, 11, 7, 0, 53, 11, 7, 0, 54, 11, - 7, 0, 55, 11, 7, 0, 56, 11, 7, 0, 57, 11, 7, 0, 58, 11, 7, 0, 59, 11, 7, 0, 60, 11, 7, 0, 61, 11, 7, 0, 62, 11, - 4, 0, 18, 0, 4, 0, 63, 11,204, 1,128, 0, 22, 0, 32, 0, 34, 0, 75, 0,205, 1, 64, 11,203, 1, 65, 11,188, 0,153, 4, - 4, 0, 18, 0, 4, 0, 56, 0, 2, 0, 16, 0, 2, 0, 51, 10, 2, 0, 66, 11, 2, 0,122, 1, 2, 0, 67, 11, 2, 0,231, 3, - 2, 0, 68, 11, 2, 0, 69, 11, 2, 0, 70, 11, 2, 0, 71, 11, 2, 0, 72, 11, 2, 0, 73, 11, 2, 0, 74, 11, 2, 0, 75, 11, - 2, 0, 76, 11, 2, 0,223, 5, 2, 0, 77, 11, 2, 0, 78, 11, 2, 0, 79, 11, 2, 0, 80, 11, 2, 0, 81, 11, 2, 0, 28, 2, - 2, 0, 25, 9, 2, 0, 0, 9, 2, 0, 82, 11, 2, 0, 83, 11, 2, 0, 24, 4, 2, 0, 25, 4, 2, 0, 84, 11, 2, 0, 85, 11, - 2, 0, 86, 11, 2, 0, 87, 11, 7, 0, 88, 11, 7, 0, 89, 11, 7, 0, 90, 11, 7, 0, 91, 11, 7, 0, 92, 11, 7, 0, 93, 11, - 7, 0, 94, 11, 2, 0,153, 5, 2, 0, 95, 11, 7, 0, 96, 11, 7, 0, 97, 11, 7, 0, 98, 11, 7, 0, 7, 9, 7, 0, 90, 0, - 7, 0, 5, 3, 7, 0, 13, 9, 7, 0, 99, 11, 7, 0,100, 11, 7, 0,101, 11, 7, 0,102, 11, 7, 0,103, 11, 7, 0,104, 11, - 4, 0, 8, 9, 4, 0, 6, 9, 4, 0,105, 11, 4, 0,106, 11, 2, 0,107, 11, 2, 0,108, 11, 7, 0, 9, 9, 7, 0, 10, 9, - 7, 0, 11, 9, 7, 0,109, 11, 7, 0,110, 11, 7, 0,111, 11, 7, 0,112, 11, 7, 0,113, 11, 7, 0,114, 11, 7, 0,115, 11, - 7, 0,116, 11, 7, 0,117, 11, 7, 0,221, 3, 7, 0,108, 0, 7, 0,118, 11, 7, 0,119, 11, 7, 0,120, 11, 7, 0,121, 11, - 7, 0,214, 0, 7, 0,122, 11, 4, 0,123, 11, 4, 0,124, 11, 7, 0,125, 11, 7, 0,126, 11, 7, 0,127, 11, 7, 0,128, 11, - 7, 0,129, 11, 7, 0,213, 0, 7, 0,130, 11, 7, 0, 51, 4, 7, 0, 49, 4, 7, 0, 50, 4, 7, 0,131, 11, 7, 0,132, 11, - 7, 0,133, 11, 7, 0,134, 11, 7, 0,135, 11, 7, 0,136, 11, 7, 0,137, 11, 7, 0,138, 11, 7, 0,139, 11, 7, 0,140, 11, - 7, 0,141, 11, 7, 0,142, 11, 7, 0,143, 11, 7, 0,144, 11, 7, 0,145, 11, 7, 0,146, 11, 7, 0,147, 11, 7, 0,148, 11, - 4, 0,149, 11, 4, 0,150, 11, 46, 0,140, 1, 64, 0,255, 3, 14, 0,151, 11, 64, 0,152, 11, 27, 0,153, 11, 27, 0,154, 11, - 31, 0, 80, 0,183, 0, 73, 1,183, 0,155, 11,150, 0, 52, 0,150, 0, 0, 0,150, 0, 1, 0,204, 1,156, 11,202, 1,157, 11, -199, 1,210, 9,191, 0, 79, 4, 11, 0, 80, 4,206, 1,158, 11,206, 1,159, 11, 14, 0,160, 11, 14, 0,161, 11,135, 0,162, 11, -143, 0,163, 11,143, 0,164, 11, 27, 0,165, 11, 27, 0,166, 11, 27, 0, 38, 0, 14, 0, 18, 10, 0, 0, 19, 0, 7, 0,244, 0, - 7, 0, 34, 3, 7, 0,167, 11, 7, 0,168, 11, 4, 0,211, 2, 4, 0,169, 11, 4, 0, 18, 0, 4, 0, 8, 9, 4, 0,170, 11, - 4, 0,171, 11, 4, 0,172, 11, 4, 0,173, 11, 2, 0,251, 0, 2, 0,174, 11, 2, 0,175, 11, 2, 0,176, 11, 0, 0,177, 11, - 2, 0,178, 11, 2, 0,179, 11, 2, 0,180, 11, 11, 0,181, 11,139, 0,152, 4, 14, 0, 19, 3, 14, 0,182, 11,198, 1,183, 11, - 4, 0,184, 11, 4, 0,185, 11,207, 1,186, 11,141, 0, 31, 3,208, 1,187, 11, 7, 0,188, 11, 7, 0,189, 11, 7, 0,190, 11, -137, 0, 38, 0,209, 1,144, 9, 7, 0,122, 4, 7, 0,191, 11, 7, 0,192, 11, 7, 0, 74, 6, 7, 0,235, 3, 7, 0,221, 3, - 7, 0,193, 11, 7, 0, 91, 2, 7, 0,194, 11, 7, 0,195, 11, 7, 0,196, 11, 7, 0,197, 11, 7, 0,198, 11, 7, 0,199, 11, - 7, 0,123, 4, 7, 0,200, 11, 7, 0,201, 11, 7, 0,202, 11, 7, 0,124, 4, 7, 0,120, 4, 7, 0,121, 4, 7, 0,203, 11, - 7, 0,204, 11, 7, 0,205, 11, 4, 0,206, 11, 4, 0, 92, 0, 4, 0,207, 11, 4, 0,208, 11, 2, 0,209, 11, 2, 0,210, 11, - 2, 0,211, 11, 2, 0,212, 11, 2, 0,213, 11, 2, 0,214, 11, 2, 0,215, 11, 2, 0, 27, 0,188, 0,153, 4,138, 0, 11, 0, -209, 1,216, 11, 7, 0,217, 11, 7, 0,218, 11, 7, 0,250, 1, 7, 0,219, 11, 7, 0,220, 11, 7, 0,221, 11, 4, 0, 92, 0, - 2, 0,222, 11, 2, 0,223, 11, 64, 0,249, 1,210, 1, 4, 0, 7, 0, 5, 0, 7, 0, 6, 0, 7, 0, 7, 0, 7, 0,224, 11, -211, 1, 6, 0,211, 1, 0, 0,211, 1, 1, 0,210, 1,186, 9, 4, 0, 1, 1, 2, 0,225, 11, 2, 0, 18, 0,212, 1, 5, 0, -212, 1, 0, 0,212, 1, 1, 0, 14, 0,226, 11, 4, 0,227, 11, 4, 0, 18, 0,213, 1, 9, 0,213, 1, 0, 0,213, 1, 1, 0, - 14, 0,127, 0,212, 1,228, 11, 4, 0, 18, 0, 2, 0,225, 11, 2, 0,229, 11, 7, 0, 93, 0, 0, 0,230, 11,179, 0, 6, 0, - 22, 0, 32, 0, 14, 0,122, 5, 4, 0, 18, 0, 2, 0,231, 11, 2, 0,232, 11, 11, 0,233, 11,214, 1, 6, 0, 14, 0,234, 11, - 4, 0,235, 11, 4, 0,236, 11, 4, 0, 18, 0, 4, 0, 27, 0,238, 0,237, 11,215, 1, 19, 0, 22, 0, 32, 0,216, 1,238, 11, -216, 1,239, 11, 14, 0,240, 11, 4, 0,241, 11, 2, 0,242, 11, 2, 0,243, 11, 14, 0,244, 11, 14, 0,245, 11,214, 1,246, 11, - 14, 0,247, 11, 14, 0,248, 11, 14, 0,249, 11, 14, 0,250, 11,217, 1,251, 11,217, 1,252, 11,217, 1,253, 11, 14, 0,254, 11, -238, 0,255, 11,216, 1, 32, 0,216, 1, 0, 0,216, 1, 1, 0, 11, 0, 0, 12, 4, 0,113, 8, 2, 0, 1, 12, 2, 0, 27, 0, - 28, 1, 2, 12, 28, 1, 3, 12, 0, 0, 4, 12, 2, 0, 5, 12, 2, 0, 6, 12, 2, 0,135, 8, 2, 0,136, 8, 2, 0, 7, 12, - 2, 0, 8, 12, 2, 0, 14, 4, 2, 0, 53, 7, 2, 0, 9, 12, 2, 0, 10, 12, 2, 0, 11, 12, 2, 0, 30, 0,218, 1, 12, 12, -219, 1, 13, 12,220, 1, 14, 12, 4, 0, 15, 12, 4, 0, 16, 12, 11, 0, 17, 12, 14, 0,245, 11, 14, 0,154, 8, 14, 0, 18, 12, - 14, 0, 19, 12, 14, 0, 20, 12,221, 1, 17, 0,221, 1, 0, 0,221, 1, 1, 0, 0, 0, 21, 12, 21, 0, 31, 0, 2, 0, 22, 12, - 2, 0, 16, 0, 2, 0, 14, 0, 2, 0, 23, 12, 2, 0, 24, 12, 2, 0, 25, 12, 2, 0, 26, 12, 2, 0, 27, 12, 2, 0, 18, 0, - 2, 0, 28, 12, 2, 0, 32, 0, 2, 0, 27, 0,222, 1, 29, 12,223, 1, 4, 0,223, 1, 0, 0,223, 1, 1, 0,221, 1, 30, 12, -221, 1, 31, 12,224, 1, 11, 0,224, 1, 0, 0,224, 1, 1, 0, 14, 0, 32, 12, 14, 0, 33, 12, 0, 0, 21, 12, 2, 0, 34, 12, - 2, 0, 35, 12, 2, 0, 18, 0, 2, 0, 36, 12, 4, 0, 37, 12, 11, 0, 38, 12,217, 1, 7, 0,217, 1, 0, 0,217, 1, 1, 0, - 0, 0, 21, 12, 0, 0, 39, 12, 14, 0, 54, 8, 4, 0, 40, 12, 4, 0, 18, 0,250, 0, 14, 0,250, 0, 0, 0,250, 0, 1, 0, - 0, 0, 21, 12, 21, 0, 31, 0,225, 1,129, 8, 11, 0, 41, 12, 11, 0, 42, 12,222, 1, 29, 12,214, 1, 43, 12, 14, 0, 44, 12, -250, 0, 45, 12, 33, 1,239, 6, 2, 0, 18, 0, 2, 0, 86, 1,226, 1, 12, 0,226, 1, 0, 0,226, 1, 1, 0, 11, 0, 2, 0, - 11, 0, 46, 12, 0, 0, 19, 0, 2, 0, 16, 0, 2, 0, 18, 0, 7, 0, 47, 12, 7, 0,129, 0, 7, 0,131, 4, 7, 0, 83, 9, - 7, 0, 74, 10,227, 1, 5, 0, 7, 0, 48, 12, 4, 0, 49, 12, 4, 0, 50, 12, 4, 0, 87, 1, 4, 0, 18, 0,228, 1, 6, 0, - 7, 0, 51, 12, 7, 0, 52, 12, 7, 0, 53, 12, 7, 0, 54, 12, 4, 0, 16, 0, 4, 0, 18, 0,229, 1, 5, 0, 7, 0,111, 9, - 7, 0,112, 9, 7, 0,237, 2, 2, 0, 42, 2, 2, 0, 43, 2,230, 1, 5, 0,229, 1, 2, 0, 4, 0, 53, 0, 7, 0, 55, 12, - 7, 0,111, 9, 7, 0,112, 9,231, 1, 4, 0, 2, 0, 56, 12, 2, 0, 57, 12, 2, 0, 58, 12, 2, 0, 59, 12,232, 1, 2, 0, - 37, 0, 37, 7, 21, 0,150, 9,233, 1, 3, 0, 19, 0, 60, 12, 4, 0, 18, 0, 4, 0, 27, 0,234, 1, 6, 0, 7, 0,108, 0, - 7, 0,238, 2, 7, 0, 61, 12, 7, 0, 27, 0, 2, 0,250, 0, 2, 0, 62, 12,235, 1, 5, 0, 7, 0, 63, 12, 7, 0,128, 0, - 7, 0,187, 9, 7, 0,188, 9, 4, 0, 18, 0,236, 1, 6, 0, 22, 0, 42, 7, 0, 0, 64, 12, 0, 0, 65, 12, 2, 0, 66, 12, - 2, 0, 18, 0, 4, 0, 67, 12,237, 1, 7, 0,237, 1, 0, 0,237, 1, 1, 0, 0, 0, 19, 0,236, 1, 68, 12, 2, 0, 69, 12, - 2, 0, 16, 0, 7, 0, 60, 0,238, 1, 7, 0, 14, 0, 70, 12, 0, 0, 71, 12, 11, 0, 72, 12, 7, 0, 60, 0, 7, 0, 47, 12, - 4, 0, 16, 0, 4, 0, 18, 0,239, 1, 3, 0, 7, 0, 73, 12, 4, 0, 18, 0, 4, 0, 27, 0,240, 1, 15, 0,240, 1, 0, 0, -240, 1, 1, 0,107, 1, 5, 10,238, 1, 61, 0, 14, 0,187, 3, 30, 0, 49, 0,239, 1, 74, 12, 4, 0, 53, 0, 7, 0, 60, 0, - 2, 0, 18, 0, 2, 0, 22, 1, 4, 0, 75, 12, 0, 0, 64, 12, 4, 0, 76, 12, 7, 0, 77, 12,241, 1, 2, 0, 0, 0, 78, 12, - 0, 0, 79, 12,242, 1, 4, 0,242, 1, 0, 0,242, 1, 1, 0,177, 0, 68, 3, 14, 0, 80, 12,243, 1, 25, 0,243, 1, 0, 0, -243, 1, 1, 0, 14, 0, 81, 12,177, 0, 81, 9,242, 1, 82, 12, 14, 0, 83, 12, 14, 0,187, 3, 0, 0, 19, 0, 7, 0, 47, 12, - 7, 0, 84, 12, 7, 0, 89, 0, 7, 0, 90, 0, 7, 0, 70, 10, 7, 0, 71, 10, 7, 0,251, 2, 7, 0,147, 3, 7, 0, 83, 9, - 7, 0, 74, 10, 2, 0, 85, 12, 2, 0, 86, 12, 2, 0, 91, 0, 2, 0, 16, 0, 11, 0, 87, 12, 4, 0, 18, 0, 4, 0, 30, 0, -244, 1, 6, 0,244, 1, 0, 0,244, 1, 1, 0, 14, 0, 81, 12, 4, 0, 18, 0, 4, 0, 13, 2, 0, 0, 19, 0,245, 1, 11, 0, -245, 1, 0, 0,245, 1, 1, 0, 22, 0, 42, 7, 0, 0, 88, 12, 4, 0, 67, 12, 2, 0, 89, 12, 2, 0, 27, 0, 0, 0, 64, 12, - 4, 0, 75, 12, 2, 0, 18, 0, 2, 0, 90, 12,246, 1, 8, 0,246, 1, 0, 0,246, 1, 1, 0, 14, 0, 91, 12, 0, 0, 19, 0, - 0, 0, 92, 12, 2, 0, 18, 0, 2, 0, 90, 12, 4, 0, 93, 12,247, 1, 5, 0,247, 1, 0, 0,247, 1, 1, 0, 0, 0, 64, 12, - 4, 0, 75, 12, 7, 0,227, 2, 34, 0, 12, 0,177, 0,178, 3,177, 0, 94, 12,242, 1, 82, 12, 14, 0, 95, 12,243, 1, 96, 12, - 14, 0, 97, 12, 14, 0, 98, 12, 4, 0, 18, 0, 4, 0,251, 0, 2, 0, 99, 12, 2, 0,100, 12, 7, 0,101, 12,248, 1, 2, 0, - 22, 0, 32, 0, 34, 0, 75, 0,249, 1, 5, 0,249, 1, 0, 0,249, 1, 1, 0, 4, 0, 16, 0, 4, 0, 18, 0, 0, 0,171, 5, -250, 1, 6, 0,249, 1,102, 12, 27, 0, 44, 0, 4, 0,103, 12, 7, 0,104, 12, 4, 0,105, 12, 4, 0,247, 9,251, 1, 3, 0, -249, 1,102, 12, 4, 0,103, 12, 7, 0,106, 12,252, 1, 8, 0,249, 1,102, 12, 27, 0, 44, 0, 7, 0, 77, 1, 7, 0,107, 12, - 7, 0, 34, 3, 7, 0,143, 9, 4, 0,103, 12, 4, 0,108, 12,253, 1, 5, 0,249, 1,102, 12, 7, 0,109, 12, 7, 0, 65, 9, - 7, 0, 1, 3, 7, 0, 56, 0,254, 1, 3, 0,249, 1,102, 12, 7, 0,143, 9, 7, 0,110, 12,197, 1, 4, 0, 7, 0,111, 12, - 7, 0,119, 11, 2, 0,112, 12, 2, 0, 87, 1,255, 1, 14, 0,255, 1, 0, 0,255, 1, 1, 0, 14, 0,113, 12, 14, 0,114, 12, - 14, 0,115, 12, 0, 0,171, 5, 4, 0, 32, 0, 4, 0, 18, 0, 4, 0,116, 12, 7, 0,117, 12, 4, 0,105, 12, 4, 0,247, 9, - 7, 0, 83, 4, 7, 0, 3, 3,205, 1, 23, 0, 4, 0,103, 12, 4, 0,118, 12, 7, 0,119, 12, 7, 0,255, 2, 7, 0,120, 12, - 7, 0,221, 8, 7, 0,111, 12, 7, 0,121, 12, 7, 0,238, 2, 7, 0,239, 10, 7, 0,216, 4, 7, 0,122, 12, 7, 0,123, 12, - 7, 0,124, 12, 7, 0,125, 12, 7, 0,126, 12, 7, 0,127, 12, 7, 0,128, 12, 7, 0,129, 12, 7, 0,130, 12, 7, 0,131, 12, - 7, 0,132, 12, 14, 0,133, 12,123, 0, 40, 0,122, 0,134, 12, 0, 2, 65, 11, 64, 0,135, 12, 64, 0,152, 11, 64, 0,136, 12, - 1, 2,137, 12, 43, 0,169, 0, 43, 0,138, 12, 43, 0,139, 12, 7, 0,140, 12, 7, 0,141, 12, 7, 0,142, 12, 7, 0,143, 12, - 7, 0,144, 12, 7, 0,112, 8, 7, 0,145, 12, 7, 0,178, 1, 7, 0,146, 12, 4, 0,147, 12, 4, 0,148, 12, 4, 0,149, 12, - 4, 0, 92, 0, 4, 0, 27, 0, 4, 0,150, 12, 2, 0,151, 12, 2, 0,152, 12, 4, 0,153, 12, 7, 0,238, 2, 4, 0,154, 12, - 7, 0,155, 12, 4, 0,156, 12, 4, 0,157, 12, 4, 0,158, 12,139, 0,159, 12, 14, 0,160, 12,188, 0,153, 4, 4, 0,161, 12, - 7, 0,162, 12, 7, 0,163, 12, 4, 0, 30, 0,124, 0, 12, 0,122, 0,134, 12,150, 0, 54, 3, 7, 0,143, 1, 7, 0,112, 8, - 7, 0,164, 12, 7, 0,165, 12, 7, 0,166, 12, 2, 0,167, 12, 2, 0,168, 12, 2, 0,169, 12, 2, 0, 16, 0, 4, 0, 92, 0, -125, 0, 13, 0,122, 0,134, 12,141, 0, 31, 3,143, 0, 33, 3, 7, 0,186, 9, 7, 0,170, 12, 7, 0,171, 12, 7, 0, 79, 1, - 7, 0,172, 12, 4, 0, 27, 10, 4, 0, 27, 3, 2, 0, 16, 0, 2, 0, 27, 0, 4, 0, 30, 0, 2, 2, 15, 0, 22, 0, 32, 0, - 34, 0, 75, 0, 47, 1,219, 8, 7, 0,173, 12, 7, 0,174, 12, 7, 0,175, 12, 7, 0,176, 12, 7, 0,142, 9, 7, 0,177, 12, - 7, 0,178, 12, 7, 0,179, 12, 7, 0, 83, 4, 7, 0,221, 8, 2, 0, 18, 0, 2, 0,107, 9,232, 0, 3, 0, 4, 0,126, 0, - 2, 0,215, 6, 2, 0,180, 12, 3, 2, 5, 0, 0, 0,187, 8, 2, 0,188, 8, 2, 0, 71, 5, 2, 0,181, 12, 2, 0,182, 12, -230, 0, 16, 0, 22, 0, 32, 0, 34, 0, 75, 0, 0, 0, 35, 0, 4, 0,143, 0, 4, 0,144, 0, 4, 0,183, 12, 7, 0,162, 0, - 7, 0,163, 0, 44, 0,138, 0, 4, 2,144, 9,179, 0,181, 3, 5, 2,184, 12, 11, 0,185, 12, 3, 2,186, 12, 4, 0, 18, 0, - 4, 0, 27, 0, 14, 1, 10, 0, 4, 0,132, 0, 4, 0,187, 12, 52, 0,188, 12, 7, 0,189, 12, 2, 0,190, 12, 0, 0,179, 2, - 4, 0,126, 0, 6, 2,174, 3, 7, 2,191, 12, 7, 0,192, 12, 8, 2, 3, 0, 4, 0,126, 0, 7, 0,193, 12, 7, 0, 79, 1, - 9, 2, 11, 0, 11, 0,194, 12, 7, 0,195, 12, 7, 0,196, 12, 7, 0, 27, 0, 7, 0,197, 12, 2, 0,198, 12, 2, 0, 91, 0, - 7, 0,199, 12, 7, 0,200, 12, 7, 0,201, 12, 7, 0,202, 12, 7, 2, 3, 0, 7, 0,203, 12, 4, 0,126, 0, 4, 0, 18, 0, - 6, 2, 24, 0, 6, 2, 0, 0, 6, 2, 1, 0, 0, 0, 19, 0, 7, 0,204, 12, 7, 0,205, 12, 7, 0,206, 12, 7, 0,207, 12, - 7, 0,253, 10, 4, 0,208, 12, 4, 0,209, 12, 7, 2,210, 12, 7, 0,211, 12, 7, 0,193, 12, 4, 0, 18, 0, 4, 0,212, 12, - 4, 0,213, 12, 7, 0, 77, 12, 2, 0,214, 12, 2, 0,226, 3, 2, 0,215, 12, 2, 0,216, 12, 2, 0,217, 12, 2, 0, 30, 0, - 7, 0,218, 12, 10, 2, 22, 0, 4, 0, 18, 0, 2, 0,219, 12, 2, 0,220, 12, 7, 0,221, 12, 2, 0,222, 12, 2, 0,223, 12, - 2, 0,224, 12, 2, 0,225, 12, 2, 0,226, 12, 2, 0,227, 12, 2, 0,228, 12, 2, 0, 1, 3, 4, 0,229, 12, 4, 0,230, 12, - 2, 0,231, 12, 2, 0,232, 12, 7, 0, 94, 1, 4, 0,233, 12, 4, 0,234, 12, 7, 0,235, 12, 7, 0,236, 12, 4, 0, 74, 0, - 11, 2, 12, 0, 4, 0, 18, 0, 4, 0,237, 12, 4, 0,238, 12, 7, 0,239, 12, 6, 2,240, 12, 7, 0,241, 12, 7, 0,242, 12, - 7, 0,243, 12, 4, 0,190, 1, 4, 0,132, 0, 7, 0,147, 3, 52, 0,244, 12, 12, 2, 5, 0, 4, 0, 18, 0, 7, 0,193, 12, - 4, 0,245, 12, 4, 0,246, 12, 8, 2,247, 12, 13, 2, 7, 0, 13, 2, 0, 0, 13, 2, 1, 0, 0, 0, 19, 0, 4, 0, 18, 0, - 7, 0,147, 3, 14, 0,248, 12, 12, 2,249, 12, 14, 2, 1, 0, 0, 0,250, 12, 5, 2, 10, 0, 10, 2,251, 12, 9, 2,252, 12, - 14, 0,248, 12, 12, 2,249, 12, 11, 2,253, 12, 6, 2,254, 12, 14, 0,255, 12, 4, 0, 0, 13, 4, 0, 1, 13, 14, 2, 89, 6, - 15, 2, 48, 0, 15, 2, 0, 0, 15, 2, 1, 0,170, 0,144, 3, 16, 2, 2, 0, 64, 0, 2, 13,188, 0,153, 4,139, 0,152, 4, - 14, 0, 19, 3, 4, 0, 3, 13, 0, 0, 19, 0, 2, 0,158, 10, 2, 0, 16, 0, 2, 0, 4, 13, 2, 0, 5, 13, 2, 0, 6, 13, - 2, 0, 7, 13, 2, 0, 8, 13, 2, 0, 9, 13, 4, 0, 92, 0, 4, 0,185, 3, 4, 0, 10, 13, 4, 0, 11, 13, 4, 0,187, 9, - 4, 0,188, 9, 4, 0, 27, 0, 7, 0, 12, 13, 47, 0, 13, 13, 0, 0, 14, 13, 4, 0, 15, 13, 4, 0,153, 12, 7, 0, 16, 13, - 7, 0, 17, 13, 7, 0, 18, 13, 7, 0, 19, 13, 7, 0, 20, 13, 7, 0, 21, 13, 7, 0, 22, 13, 7, 0, 23, 13, 7, 0, 24, 13, - 7, 0, 25, 13, 7, 0, 26, 13, 7, 0, 27, 13, 7, 0, 28, 13, 7, 0, 29, 13, 0, 0,200, 2, 0, 0, 30, 13, 0, 0, 31, 13, - 0, 0, 32, 13,170, 0, 7, 0,169, 0, 33, 13,143, 0, 33, 3, 14, 0, 34, 13, 2, 0, 35, 13, 2, 0, 92, 0, 4, 0, 27, 0, - 0, 0, 36, 13,171, 0, 24, 0,169, 0, 33, 13,143, 0, 33, 3,150, 0, 54, 3, 63, 0, 25, 2, 4, 0, 92, 0, 4, 0, 37, 13, - 7, 0,185, 0, 7, 0,186, 0, 7, 0,187, 0, 7, 0,178, 1, 7, 0, 38, 13, 7, 0, 39, 13, 7, 0, 40, 13, 7, 0, 41, 13, - 50, 0, 42, 13, 50, 0, 43, 13, 2, 0, 44, 13, 2, 0,214, 10, 2, 0, 45, 13, 2, 0, 27, 0, 7, 0, 46, 13, 7, 0, 47, 13, - 7, 0, 48, 13, 7, 0, 49, 13, 69, 78, 68, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 4, 0,173, 2,100, 0, 1, 0, 0, 0,174, 2,101, 0, 1, 0, 7, 0,150, 2,102, 0, 1, 0, 7, 0,170, 2,103, 0, 4, 0, + 4, 0,175, 2, 4, 0,176, 2, 7, 0,177, 2, 4, 0,178, 2,104, 0, 4, 0, 7, 0,240, 0, 7, 0,185, 0, 7, 0,186, 0, + 7, 0,187, 0,105, 0, 1, 0,104, 0,151, 2,106, 0, 5, 0, 4, 0,179, 2, 4, 0,180, 2, 0, 0, 18, 0, 0, 0, 47, 2, + 0, 0,181, 2,107, 0, 2, 0, 4, 0,182, 2, 4, 0,180, 2,108, 0, 10, 0,108, 0, 0, 0,108, 0, 1, 0,106, 0,183, 2, +105, 0,184, 2,107, 0,185, 2, 4, 0, 53, 0, 4, 0,138, 2, 4, 0,137, 2, 4, 0, 27, 0, 88, 0,186, 2, 96, 0, 14, 0, + 14, 0,187, 2, 88, 0,186, 2, 0, 0,188, 2, 0, 0,189, 2, 0, 0,190, 2, 0, 0,191, 2, 0, 0,192, 2, 0, 0,193, 2, + 0, 0,194, 2, 0, 0, 18, 0, 95, 0,132, 2, 95, 0,134, 2, 2, 0,195, 2, 0, 0,196, 2,109, 0, 1, 0, 4, 0,173, 2, +110, 0, 9, 0,110, 0, 0, 0,110, 0, 1, 0, 4, 0, 16, 0, 4, 0, 87, 1, 4, 0,197, 2, 4, 0, 27, 0, 0, 0, 19, 0, + 41, 0,125, 0, 0, 0,198, 2,111, 0, 6, 0,110, 0,199, 2, 47, 0,200, 2, 27, 0,201, 2, 0, 0,202, 2, 4, 0,203, 2, + 4, 0,204, 2,112, 0, 7, 0,110, 0,199, 2, 2, 0,205, 2, 2, 0,187, 2, 2, 0,206, 2, 2, 0, 92, 0, 11, 0,207, 2, + 11, 0,208, 2,113, 0, 5, 0,110, 0,199, 2, 27, 0,168, 0, 0, 0, 19, 0, 7, 0,209, 2, 0, 0, 94, 0,114, 0, 5, 0, +110, 0,199, 2, 27, 0,168, 0, 0, 0, 19, 0, 2, 0,210, 2, 0, 0,211, 2,115, 0, 5, 0,110, 0,199, 2, 7, 0, 89, 0, + 7, 0,212, 2, 4, 0,213, 2, 4, 0,214, 2,116, 0, 5, 0,110, 0,199, 2, 27, 0,215, 2, 0, 0, 70, 0, 4, 0, 87, 1, + 4, 0, 18, 0,117, 0, 13, 0,110, 0,199, 2, 27, 0,216, 2, 27, 0,217, 2, 27, 0,218, 2, 27, 0,219, 2, 7, 0,220, 2, + 7, 0,221, 2, 7, 0,212, 2, 7, 0,222, 2, 4, 0,223, 2, 4, 0,224, 2, 4, 0, 92, 0, 4, 0,225, 2,118, 0, 5, 0, +110, 0,199, 2, 2, 0,226, 2, 2, 0, 18, 0, 7, 0,227, 2, 27, 0,228, 2,119, 0, 3, 0,110, 0,199, 2, 7, 0,229, 2, + 4, 0, 92, 0,120, 0, 10, 0,110, 0,199, 2, 7, 0,230, 2, 4, 0,231, 2, 4, 0, 27, 0, 2, 0, 92, 0, 2, 0,232, 2, + 2, 0,233, 2, 2, 0,234, 2, 7, 0,235, 2, 0, 0,236, 2,121, 0, 3, 0,110, 0,199, 2, 7, 0, 27, 0, 4, 0, 16, 0, +122, 0, 6, 0,110, 0,199, 2,123, 0,237, 2,124, 0,238, 2,125, 0,239, 2, 7, 0,240, 2, 4, 0, 16, 0,126, 0, 11, 0, +110, 0,199, 2, 47, 0,200, 2, 27, 0,201, 2, 0, 0,202, 2, 4, 0,203, 2, 4, 0,204, 2, 7, 0,209, 2, 4, 0,241, 2, + 0, 0,236, 2, 7, 0,242, 2, 4, 0, 27, 0,127, 0, 12, 0,110, 0,199, 2, 27, 0,243, 2, 42, 0,244, 2, 4, 0, 92, 0, + 4, 0,245, 2, 7, 0,246, 2, 7, 0,247, 2, 7, 0,248, 2, 7, 0,249, 2, 0, 0,202, 2, 4, 0,203, 2, 4, 0, 27, 0, +128, 0, 3, 0,110, 0,199, 2, 7, 0,250, 2, 4, 0,251, 2,129, 0, 5, 0,110, 0,199, 2, 7, 0,252, 2, 0, 0,236, 2, + 2, 0, 18, 0, 2, 0,253, 2,130, 0, 8, 0,110, 0,199, 2, 27, 0,168, 0, 7, 0,252, 2, 7, 0,255, 0, 7, 0,108, 0, + 0, 0,236, 2, 2, 0, 18, 0, 2, 0, 16, 0,131, 0, 21, 0,110, 0,199, 2, 47, 0,200, 2, 27, 0,201, 2, 0, 0,202, 2, + 4, 0,203, 2, 4, 0,204, 2, 27, 0,254, 2, 0, 0,236, 2, 2, 0, 18, 0, 2, 0, 27, 0, 7, 0,255, 2, 7, 0, 0, 3, + 7, 0, 1, 3, 7, 0, 81, 2, 7, 0, 2, 3, 7, 0, 3, 3, 7, 0, 4, 3, 7, 0, 5, 3, 7, 0, 6, 3, 7, 0, 7, 3, + 7, 0, 91, 0,132, 0, 7, 0,110, 0,199, 2, 2, 0, 8, 3, 2, 0, 9, 3, 4, 0, 30, 0, 27, 0,168, 0, 7, 0, 10, 3, + 0, 0,236, 2,133, 0, 10, 0,110, 0,199, 2, 27, 0,168, 0, 0, 0, 11, 3, 7, 0, 12, 3, 7, 0, 13, 3, 7, 0, 5, 3, + 4, 0, 14, 3, 4, 0, 15, 3, 7, 0, 16, 3, 0, 0, 19, 0,134, 0, 1, 0,110, 0,199, 2,135, 0, 7, 0,110, 0,199, 2, + 41, 0,125, 0,136, 0, 17, 3,137, 0, 18, 3,138, 0, 19, 3,139, 0, 20, 3, 14, 0, 21, 3,140, 0, 13, 0,110, 0,199, 2, + 88, 0, 22, 3, 88, 0, 23, 3, 88, 0, 24, 3, 88, 0, 25, 3, 88, 0, 26, 3, 88, 0, 27, 3, 85, 0, 28, 3, 4, 0, 29, 3, + 4, 0, 30, 3, 7, 0, 31, 3, 7, 0, 32, 3,141, 0, 33, 3,142, 0, 7, 0,110, 0,199, 2, 88, 0, 22, 3, 88, 0, 34, 3, +143, 0, 35, 3,144, 0, 33, 3, 4, 0, 36, 3, 4, 0, 29, 3,145, 0, 4, 0,110, 0,199, 2, 27, 0,168, 0, 4, 0, 37, 3, + 4, 0, 27, 0,146, 0, 2, 0, 4, 0, 38, 3, 7, 0, 39, 2,147, 0, 2, 0, 4, 0,128, 0, 4, 0, 39, 3,148, 0, 24, 0, +110, 0,199, 2, 27, 0,168, 0, 0, 0,236, 2, 2, 0, 40, 3, 2, 0, 18, 0, 2, 0, 87, 1, 2, 0, 27, 0,146, 0, 41, 3, + 4, 0, 42, 3, 7, 0, 43, 3, 4, 0, 53, 0, 4, 0, 44, 3,147, 0, 45, 3,146, 0, 46, 3, 4, 0, 47, 3, 4, 0, 48, 3, + 4, 0, 49, 3, 4, 0, 39, 3, 7, 0, 50, 3, 7, 0, 51, 3, 7, 0, 52, 3, 7, 0, 53, 3, 7, 0, 54, 3, 11, 0, 55, 3, +149, 0, 8, 0,110, 0,199, 2,150, 0, 56, 3,143, 0, 35, 3, 4, 0, 57, 3, 4, 0, 58, 3, 4, 0, 59, 3, 2, 0, 18, 0, + 2, 0, 56, 0,151, 0, 8, 0,110, 0,199, 2, 27, 0, 44, 0, 2, 0, 3, 1, 2, 0, 18, 0, 2, 0,226, 2, 2, 0, 56, 0, + 7, 0, 60, 3, 7, 0, 61, 3,152, 0, 6, 0,110, 0,199, 2, 4, 0, 62, 3, 2, 0, 18, 0, 2, 0, 63, 3, 7, 0, 64, 3, + 0, 0,170, 0,153, 0, 8, 0,110, 0,199, 2, 0, 0, 65, 3, 0, 0, 66, 3, 0, 0,193, 2, 0, 0, 67, 3, 0, 0, 68, 3, + 0, 0, 92, 0, 0, 0,181, 2,154, 0, 3, 0,110, 0,199, 2,155, 0, 69, 3,139, 0, 20, 3,156, 0, 10, 0,110, 0,199, 2, + 27, 0, 70, 3, 27, 0, 71, 3, 0, 0, 72, 3, 7, 0, 73, 3, 2, 0, 74, 3, 2, 0, 75, 3, 0, 0, 76, 3, 0, 0, 77, 3, + 0, 0,211, 2,157, 0, 9, 0,110, 0,199, 2, 27, 0, 78, 3, 0, 0, 72, 3, 7, 0, 79, 3, 7, 0, 80, 3, 0, 0, 87, 1, + 0, 0,226, 2, 0, 0, 81, 3, 0, 0, 27, 0,158, 0, 1, 0,110, 0,199, 2,159, 0, 11, 0,110, 0,199, 2, 0, 0,236, 2, + 7, 0,128, 0, 7, 0, 82, 3, 7, 0, 83, 3, 7, 0, 84, 3, 7, 0, 85, 3, 7, 0, 86, 3, 4, 0, 18, 0, 2, 0, 87, 3, + 2, 0, 88, 3,160, 0, 9, 0,110, 0,199, 2, 27, 0, 89, 3, 4, 0, 90, 3, 4, 0, 91, 3, 4, 0, 92, 3, 7, 0, 93, 3, + 7, 0, 94, 3, 2, 0,226, 2, 2, 0, 18, 0,161, 0, 29, 0,110, 0,199, 2,162, 0, 95, 3,163, 0, 96, 3, 4, 0, 97, 3, + 4, 0, 98, 3, 7, 0, 99, 3, 7, 0, 4, 3, 7, 0,100, 3, 7, 0,250, 0, 7, 0,101, 3, 7, 0,102, 3, 7, 0,103, 3, + 7, 0,104, 3, 7, 0,105, 3, 7, 0,240, 2, 4, 0,106, 3, 4, 0,107, 3, 0, 0,108, 3, 0, 0,109, 3, 0, 0,110, 3, + 0, 0,111, 3, 0, 0, 18, 0, 0, 0,112, 3, 2, 0,113, 3, 2, 0,114, 3, 4, 0,214, 2, 7, 0,108, 0, 7, 0,115, 3, + 4, 0, 27, 0,164, 0, 15, 0,110, 0,199, 2, 47, 0,200, 2, 27, 0,201, 2, 0, 0,202, 2, 4, 0,203, 2, 4, 0,204, 2, + 27, 0,116, 3, 27, 0,117, 3, 54, 0,100, 1, 0, 0,236, 2, 7, 0,209, 2, 7, 0,118, 3, 0, 0, 18, 0, 0, 0,253, 0, + 0, 0,211, 2,165, 0, 16, 0,110, 0,199, 2, 0, 0,236, 2, 2, 0,119, 3, 2, 0,253, 0, 7, 0,120, 3, 54, 0,121, 3, + 7, 0,122, 3, 7, 0,123, 3, 7, 0,124, 3, 0, 0,125, 3, 4, 0,126, 3, 47, 0,127, 3, 27, 0,128, 3, 4, 0,129, 3, + 0, 0,130, 3, 4, 0,131, 3,166, 0, 16, 0,110, 0,199, 2, 0, 0,132, 3, 0, 0,133, 3, 7, 0,134, 3, 7, 0,135, 3, + 0, 0,136, 3, 0, 0,137, 3, 0, 0,138, 3, 7, 0,124, 3, 0, 0,125, 3, 4, 0,126, 3, 47, 0,127, 3, 27, 0,128, 3, + 4, 0,129, 3, 0, 0,130, 3, 4, 0,131, 3,167, 0, 16, 0,110, 0,199, 2, 0, 0,236, 2, 4, 0,139, 3, 4, 0,140, 3, + 27, 0,141, 3, 7, 0,124, 3, 0, 0,125, 3, 4, 0,126, 3, 47, 0,127, 3, 27, 0,128, 3, 4, 0,129, 3, 0, 0,130, 3, + 7, 0,142, 3, 7, 0,143, 3, 2, 0,253, 0, 2, 0,144, 3,168, 0, 5, 0,110, 0,199, 2,169, 0,145, 3,170, 0,146, 3, + 4, 0, 16, 0, 4, 0, 27, 0,171, 0, 8, 0,110, 0,199, 2, 7, 0,147, 3, 7, 0,148, 3, 7, 0,149, 3, 0, 0,250, 0, + 0, 0, 18, 0, 0, 0, 87, 1, 0, 0, 27, 0,172, 0, 3, 0,173, 0,150, 3, 4, 0, 66, 2, 0, 0, 94, 0,173, 0, 29, 0, + 22, 0, 32, 0, 34, 0, 75, 0, 2, 0, 48, 2, 2, 0, 49, 2, 2, 0,151, 3, 2, 0, 18, 0, 2, 0,152, 3, 2, 0,153, 3, + 2, 0,154, 3, 2, 0, 30, 0, 0, 0,155, 3, 0, 0,156, 3, 0, 0,157, 3, 0, 0, 74, 0, 4, 0, 27, 0, 7, 0,158, 3, + 7, 0,159, 3, 7, 0,160, 3, 7, 0,161, 3, 7, 0,162, 3, 7, 0,163, 3, 29, 0,164, 3, 31, 0, 80, 0, 33, 0, 73, 2, + 90, 0,126, 2, 0, 0, 70, 0, 7, 0,165, 3, 7, 0,166, 3,172, 0,167, 3,174, 0, 5, 0,174, 0, 0, 0,174, 0, 1, 0, + 0, 0, 19, 0, 0, 0, 18, 0, 0, 0,124, 0, 68, 0, 3, 0, 7, 0,168, 3, 4, 0, 18, 0, 4, 0, 27, 0, 27, 0,128, 0, + 22, 0, 32, 0, 34, 0, 75, 0,175, 0,169, 3, 2, 0, 16, 0, 2, 0,170, 3, 4, 0,171, 3, 4, 0,172, 3, 4, 0,173, 3, + 0, 0,174, 3, 27, 0, 38, 0, 27, 0,175, 3, 27, 0,176, 3, 27, 0,177, 3, 27, 0,178, 3, 31, 0, 80, 0, 68, 0, 15, 2, +176, 0,179, 3,176, 0,180, 3,177, 0,181, 3, 11, 0, 2, 0,178, 0,182, 3,179, 0,183, 3,180, 0,184, 3, 14, 0,185, 3, + 14, 0,186, 3, 14, 0, 28, 2, 14, 0,187, 3, 14, 0,188, 3, 4, 0, 87, 1, 4, 0,189, 3, 63, 0, 30, 2, 0, 0,190, 3, + 4, 0, 32, 2, 4, 0,191, 3, 7, 0, 77, 1, 7, 0,192, 3, 7, 0,193, 3, 7, 0,176, 0, 7, 0,194, 3, 7, 0,195, 3, + 7, 0, 78, 1, 7, 0,196, 3, 7, 0, 18, 2, 7, 0,197, 3, 7, 0,198, 3, 7, 0,199, 3, 7, 0,200, 3, 7, 0,201, 3, + 7, 0,202, 3, 7, 0, 12, 3, 7, 0,203, 3, 7, 0,244, 0, 7, 0,204, 3, 4, 0,205, 3, 4, 0,206, 3, 2, 0, 18, 0, + 2, 0,207, 3, 2, 0,208, 3, 2, 0,209, 3, 2, 0,210, 3, 2, 0,211, 3, 2, 0,212, 3, 2, 0,213, 3, 2, 0,214, 3, + 0, 0,215, 3, 0, 0,216, 3, 4, 0,217, 3, 4, 0,218, 3, 4, 0,219, 3, 4, 0,220, 3, 7, 0,221, 3, 7, 0,108, 2, + 7, 0,222, 3, 7, 0,223, 3, 7, 0,224, 3, 7, 0,225, 3, 7, 0,226, 3, 7, 0,220, 0, 7, 0,227, 3, 7, 0,228, 3, + 7, 0,229, 3, 7, 0,230, 3, 7, 0,231, 3, 2, 0,232, 3, 0, 0,233, 3, 0, 0,234, 3, 0, 0,235, 3, 0, 0,236, 3, + 0, 0,110, 0, 0, 0,237, 3, 7, 0,238, 3, 7, 0,239, 3, 14, 0,240, 3, 14, 0,241, 3, 14, 0,242, 3, 14, 0,243, 3, + 7, 0,244, 3, 2, 0, 13, 2, 2, 0,245, 3, 7, 0,151, 2, 4, 0,246, 3, 4, 0,247, 3,181, 0,248, 3, 2, 0,249, 3, + 2, 0,251, 0, 7, 0,250, 3, 14, 0,251, 3, 14, 0,252, 3, 14, 0,253, 3, 14, 0,254, 3,182, 0, 73, 1,183, 0,255, 3, + 64, 0, 0, 4, 0, 0, 1, 4, 0, 0, 2, 4, 2, 0, 66, 2, 7, 0,143, 2,155, 0, 3, 4,143, 0, 4, 4,143, 0, 5, 4, + 10, 0, 6, 4, 10, 0, 7, 4, 4, 0, 8, 4, 4, 0, 9, 4, 14, 0, 10, 4, 14, 0, 11, 4, 14, 0, 12, 4, 7, 0, 13, 4, +184, 0, 14, 0,184, 0, 0, 0,184, 0, 1, 0, 27, 0, 38, 0, 7, 0, 12, 3, 7, 0, 79, 1, 7, 0, 13, 3, 7, 0, 5, 3, + 0, 0, 19, 0, 4, 0, 14, 3, 4, 0, 15, 3, 4, 0, 14, 4, 2, 0, 16, 0, 2, 0, 15, 4, 7, 0, 16, 3,185, 0, 12, 0, +185, 0, 0, 0,185, 0, 1, 0, 27, 0, 44, 0, 4, 0, 16, 4, 4, 0, 13, 2, 7, 0, 79, 1, 7, 0, 17, 4, 7, 0, 18, 4, + 7, 0,170, 2, 2, 0, 16, 0, 0, 0, 19, 4, 0, 0, 20, 4,182, 0, 40, 0, 4, 0, 18, 0, 2, 0, 21, 4, 2, 0, 22, 4, + 2, 0, 5, 3, 2, 0, 23, 4, 2, 0, 24, 4, 2, 0, 25, 4, 2, 0, 26, 4, 2, 0, 27, 4, 7, 0, 28, 4, 7, 0, 29, 4, + 7, 0, 30, 4, 7, 0, 31, 4, 7, 0, 32, 4, 7, 0, 33, 4, 7, 0, 34, 4, 7, 0, 35, 4, 7, 0, 36, 4, 7, 0, 37, 4, + 7, 0, 38, 4, 7, 0, 39, 4, 7, 0, 40, 4, 7, 0, 41, 4, 7, 0, 42, 4, 7, 0, 43, 4, 7, 0, 44, 4, 7, 0, 45, 4, + 7, 0, 46, 4, 7, 0, 47, 4, 7, 0, 48, 4, 7, 0, 49, 4, 7, 0, 50, 4, 7, 0, 51, 4, 7, 0, 52, 4, 7, 0, 53, 4, + 7, 0, 54, 4, 47, 0,169, 0,186, 0, 55, 4, 7, 0, 56, 4, 4, 0,214, 2,187, 0, 5, 0, 64, 0,249, 1, 7, 0, 57, 4, + 7, 0, 58, 4, 2, 0, 18, 0, 2, 0, 59, 4,188, 0, 5, 0,188, 0, 0, 0,188, 0, 1, 0, 4, 0, 16, 0, 4, 0, 60, 4, + 11, 0, 2, 0,189, 0, 9, 0,189, 0, 0, 0,189, 0, 1, 0, 4, 0, 61, 4, 4, 0, 62, 4, 4, 0, 63, 4, 4, 0, 18, 0, + 11, 0, 64, 4, 11, 0, 65, 4, 14, 0, 66, 4,139, 0, 23, 0,139, 0, 0, 0,139, 0, 1, 0, 4, 0, 18, 0, 4, 0, 67, 4, + 4, 0, 68, 4, 4, 0, 69, 4, 4, 0, 70, 4, 4, 0, 71, 4, 4, 0, 72, 4, 4, 0, 73, 4, 4, 0, 27, 0, 4, 0, 62, 4, + 4, 0, 13, 2, 2, 0, 74, 4, 2, 0, 56, 0, 0, 0, 19, 0, 0, 0, 75, 4, 0, 0, 76, 4, 0, 0, 77, 4, 0, 0, 78, 4, + 14, 0, 79, 4,190, 0, 80, 4, 11, 0, 81, 4,191, 0, 1, 0, 7, 0, 46, 2,181, 0, 30, 0, 4, 0, 18, 0, 7, 0, 82, 4, + 7, 0, 83, 4, 7, 0, 84, 4, 4, 0, 85, 4, 4, 0, 86, 4, 4, 0, 87, 4, 4, 0, 88, 4, 7, 0, 89, 4, 7, 0, 90, 4, + 7, 0, 91, 4, 7, 0, 92, 4, 7, 0, 93, 4, 7, 0, 94, 4, 7, 0, 95, 4, 7, 0, 96, 4, 7, 0, 97, 4, 7, 0, 98, 4, + 7, 0, 99, 4, 7, 0,100, 4, 7, 0,101, 4, 7, 0,102, 4, 7, 0,103, 4, 7, 0,104, 4, 7, 0,105, 4, 7, 0,106, 4, + 4, 0,107, 4, 4, 0,108, 4, 7, 0,109, 4, 7, 0,227, 3,183, 0, 54, 0, 4, 0, 62, 4, 4, 0,110, 4,192, 0,111, 4, +193, 0,112, 4, 0, 0, 27, 0, 0, 0,113, 4, 2, 0,114, 4, 7, 0,115, 4, 0, 0,116, 4, 7, 0,117, 4, 7, 0,118, 4, + 7, 0,119, 4, 7, 0,120, 4, 7, 0,121, 4, 7, 0,122, 4, 7, 0,123, 4, 7, 0,124, 4, 7, 0,125, 4, 2, 0,126, 4, + 0, 0,127, 4, 2, 0,128, 4, 7, 0,129, 4, 7, 0,130, 4, 0, 0,131, 4, 4, 0,129, 0, 4, 0,132, 4, 4, 0,133, 4, + 2, 0,134, 4, 2, 0,135, 4,191, 0,136, 4, 4, 0,137, 4, 4, 0, 82, 0, 7, 0,138, 4, 7, 0,139, 4, 7, 0,140, 4, + 7, 0,141, 4, 2, 0,142, 4, 2, 0,143, 4, 2, 0,144, 4, 2, 0,145, 4, 2, 0,146, 4, 2, 0,147, 4, 2, 0,148, 4, + 2, 0,149, 4,194, 0,150, 4, 7, 0,151, 4, 7, 0,152, 4,139, 0,153, 4, 14, 0, 21, 3,187, 0,154, 4, 7, 0,155, 4, + 7, 0,156, 4, 7, 0,157, 4, 4, 0,158, 4,195, 0, 1, 0, 7, 0,159, 4,155, 0, 52, 0,154, 0,160, 4, 2, 0, 16, 0, + 2, 0,161, 4, 2, 0,162, 4, 2, 0,163, 4, 7, 0,164, 4, 2, 0,165, 4, 2, 0,166, 4, 7, 0,167, 4, 2, 0,168, 4, + 2, 0,169, 4, 7, 0,170, 4, 7, 0,171, 4, 7, 0,172, 4, 4, 0,173, 4, 4, 0,174, 4, 4, 0,175, 4, 4, 0, 27, 0, + 7, 0,176, 4, 4, 0,177, 4, 7, 0,178, 4, 7, 0,179, 4, 7, 0,180, 4, 79, 0,181, 4, 79, 0,182, 4, 0, 0,183, 4, + 7, 0,184, 4, 7, 0,185, 4, 31, 0, 80, 0, 2, 0,186, 4, 0, 0,187, 4, 0, 0,188, 4, 7, 0,189, 4, 4, 0,190, 4, + 7, 0,191, 4, 7, 0,192, 4, 4, 0,193, 4, 4, 0, 18, 0, 7, 0,194, 4, 7, 0,195, 4, 7, 0,196, 4,195, 0,197, 4, + 4, 0, 53, 0, 7, 0,198, 4, 7, 0,199, 4, 7, 0,200, 4, 7, 0,201, 4, 7, 0,202, 4, 7, 0,203, 4, 7, 0,204, 4, + 4, 0,205, 4, 7, 0,206, 4,196, 0, 78, 0, 22, 0, 32, 0, 34, 0, 75, 0, 2, 0,179, 0, 2, 0, 88, 1, 2, 0,122, 1, + 2, 0,207, 4, 7, 0,208, 4, 7, 0,209, 4, 7, 0,210, 4, 7, 0,211, 4, 7, 0,212, 4, 7, 0,213, 4, 7, 0,170, 1, + 7, 0,172, 1, 7, 0,171, 1, 7, 0, 30, 0, 4, 0,214, 4, 7, 0,215, 4, 7, 0,216, 4, 7, 0,217, 4, 7, 0,218, 4, + 7, 0,219, 4, 7, 0,220, 4, 7, 0,221, 4, 2, 0,222, 4, 2, 0, 87, 1, 2, 0,223, 4, 2, 0,224, 4, 2, 0,225, 4, + 2, 0,226, 4, 2, 0,227, 4, 2, 0,228, 4, 7, 0,229, 4, 7, 0,230, 4, 7, 0,231, 4, 7, 0,232, 4, 7, 0,233, 4, + 7, 0,234, 4, 7, 0,235, 4, 7, 0,236, 4, 7, 0,237, 4, 7, 0,238, 4, 7, 0,239, 4, 7, 0,240, 4, 2, 0,241, 4, + 2, 0,242, 4, 2, 0,243, 4, 2, 0,244, 4, 7, 0,245, 4, 7, 0,246, 4, 7, 0,247, 4, 7, 0,248, 4, 2, 0,249, 4, + 2, 0,250, 4, 2, 0,251, 4, 2, 0,252, 4, 7, 0,253, 4, 7, 0,254, 4, 7, 0,255, 4, 7, 0, 0, 5, 7, 0, 1, 5, + 7, 0, 2, 5, 7, 0, 3, 5, 2, 0, 4, 5, 2, 0, 5, 5, 2, 0, 6, 5, 2, 0, 7, 5, 2, 0, 8, 5, 2, 0, 18, 0, + 7, 0, 9, 5, 7, 0, 10, 5, 31, 0, 80, 0, 46, 0,140, 1, 2, 0,141, 1, 2, 0, 76, 1, 2, 0,181, 2, 25, 0,154, 0, + 57, 0, 70, 1,197, 0, 8, 0,197, 0, 0, 0,197, 0, 1, 0, 4, 0,205, 3, 4, 0, 11, 5, 4, 0, 18, 0, 2, 0, 12, 5, + 2, 0, 13, 5, 27, 0,168, 0,198, 0, 13, 0, 11, 0, 14, 5, 11, 0, 15, 5, 4, 0, 16, 5, 4, 0, 17, 5, 4, 0, 18, 5, + 4, 0, 19, 5, 4, 0, 20, 5, 4, 0, 21, 5, 4, 0, 22, 5, 4, 0, 23, 5, 4, 0, 24, 5, 4, 0, 27, 0, 0, 0, 25, 5, +199, 0, 5, 0, 11, 0, 26, 5, 11, 0, 27, 5, 4, 0, 28, 5, 4, 0, 30, 0, 0, 0, 29, 5,200, 0, 17, 0, 4, 0, 30, 5, + 4, 0, 31, 5, 4, 0, 32, 5, 4, 0, 33, 5, 4, 0, 34, 5, 4, 0, 35, 5, 4, 0, 36, 5, 4, 0, 37, 5, 4, 0, 38, 5, + 4, 0, 39, 5, 4, 0, 40, 5, 4, 0, 41, 5, 2, 0, 42, 5, 2, 0, 43, 5, 4, 0, 44, 5, 4, 0, 45, 5, 4, 0, 91, 0, +201, 0, 17, 0, 4, 0, 16, 0, 4, 0, 32, 5, 4, 0, 46, 5, 4, 0, 47, 5, 4, 0, 48, 5, 4, 0, 49, 5, 4, 0, 50, 5, + 4, 0, 51, 5, 7, 0, 52, 5, 4, 0, 53, 5, 4, 0, 92, 0, 4, 0, 54, 5, 4, 0, 55, 5, 4, 0, 56, 5, 4, 0, 57, 5, + 4, 0, 58, 5, 21, 0, 31, 0,202, 0, 9, 0, 4, 0, 59, 5, 7, 0, 60, 5, 7, 0, 61, 5, 7, 0, 62, 5, 4, 0, 63, 5, + 2, 0, 18, 0, 2, 0, 27, 0, 7, 0, 84, 4, 7, 0, 30, 0,203, 0, 11, 0,203, 0, 0, 0,203, 0, 1, 0, 0, 0, 19, 0, + 63, 0, 64, 5, 64, 0, 65, 5, 4, 0,205, 3, 4, 0, 66, 5, 4, 0, 67, 5, 4, 0, 27, 0, 4, 0, 68, 5, 4, 0, 69, 5, +204, 0, 13, 0, 0, 0, 70, 5, 0, 0,250, 0, 0, 0, 71, 5, 0, 0, 18, 0, 0, 0, 72, 5, 0, 0, 73, 5, 0, 0, 74, 5, + 0, 0, 75, 5, 2, 0, 76, 5, 2, 0, 77, 5, 7, 0, 78, 5, 0, 0, 79, 5, 0, 0,124, 0,205, 0,106, 0,204, 0, 80, 5, +198, 0, 81, 5,199, 0, 82, 5,200, 0, 83, 5,201, 0, 84, 5, 4, 0, 36, 3, 4, 0,129, 0, 4, 0,132, 4, 7, 0, 85, 5, + 4, 0, 86, 5, 4, 0, 87, 5, 4, 0, 88, 5, 4, 0, 89, 5, 2, 0, 18, 0, 2, 0, 90, 5, 7, 0, 91, 5, 7, 0, 92, 5, + 7, 0, 93, 5, 7, 0, 94, 5, 7, 0, 95, 5, 2, 0, 96, 5, 2, 0, 97, 5, 2, 0, 98, 5, 2, 0, 99, 5, 2, 0,250, 0, + 2, 0,100, 5, 4, 0,101, 5, 2, 0,102, 5, 2, 0,103, 5, 2, 0,109, 1, 2, 0,108, 0, 2, 0,104, 5, 2, 0,105, 5, + 2, 0,106, 5, 2, 0,107, 5, 2, 0,108, 5, 2, 0, 71, 5, 2, 0, 70, 5, 2, 0,109, 5, 2, 0, 72, 5, 2, 0,110, 5, + 4, 0,111, 5, 4, 0, 87, 1, 4, 0,112, 5, 2, 0,113, 5, 2, 0, 91, 0, 2, 0,114, 5, 2, 0,115, 5, 2, 0,116, 5, + 2, 0,117, 5, 2, 0,118, 5, 2, 0,119, 5, 19, 0,120, 5, 19, 0,121, 5, 18, 0,122, 5, 14, 0,123, 5, 2, 0,124, 5, + 2, 0,125, 5, 7, 0,126, 5, 7, 0,127, 5, 7, 0,128, 5, 7, 0,129, 5, 4, 0,130, 5, 7, 0,131, 5, 7, 0,132, 5, + 7, 0,133, 5, 7, 0,134, 5, 2, 0,135, 5, 2, 0,136, 5, 2, 0,137, 5, 2, 0,138, 5, 2, 0,139, 5, 2, 0,140, 5, + 7, 0,141, 5, 7, 0,142, 5, 7, 0,143, 5, 0, 0,144, 5, 4, 0,145, 5, 2, 0,146, 5, 2, 0, 74, 0, 0, 0,147, 5, + 7, 0,148, 5, 7, 0,149, 5, 0, 0,150, 5, 0, 0,151, 5, 0, 0,152, 5, 0, 0,153, 5, 4, 0,154, 5, 2, 0,155, 5, + 2, 0,156, 5, 7, 0,157, 5, 7, 0,158, 5, 2, 0,159, 5, 2, 0,160, 5, 7, 0,161, 5, 2, 0,162, 5, 2, 0,163, 5, + 4, 0,164, 5, 2, 0,165, 5, 2, 0,166, 5, 2, 0,167, 5, 2, 0,168, 5, 7, 0,169, 5, 7, 0, 30, 0, 37, 0,170, 5, + 0, 0,171, 5,206, 0, 9, 0,206, 0, 0, 0,206, 0, 1, 0, 0, 0,172, 5, 2, 0,173, 5, 2, 0,174, 5, 2, 0,175, 5, + 2, 0, 91, 0, 7, 0,176, 5, 7, 0, 30, 0,207, 0, 7, 0, 2, 0,231, 2, 2, 0, 87, 1, 2, 0, 94, 3, 2, 0,177, 5, + 7, 0,178, 5, 7, 0, 30, 0, 37, 0,179, 5,208, 0, 5, 0, 7, 0,180, 5, 0, 0, 16, 0, 0, 0, 91, 0, 0, 0, 30, 0, + 0, 0, 74, 0,209, 0, 15, 0, 7, 0,181, 5, 7, 0,182, 5, 7, 0,183, 5, 7, 0,184, 5, 7, 0,185, 5, 7, 0,186, 5, + 7, 0,187, 5, 7, 0,188, 5, 7, 0,189, 5, 7, 0,190, 5, 4, 0,191, 5, 7, 0,192, 5, 7, 0,193, 5, 2, 0, 91, 0, + 2, 0, 30, 0,210, 0, 32, 0,208, 0,194, 5, 2, 0,195, 5, 2, 0, 97, 5, 2, 0, 98, 5, 2, 0, 99, 5, 2, 0,250, 0, + 2, 0,100, 5, 2, 0,196, 5, 2, 0,197, 5, 2, 0,198, 5, 2, 0,199, 5,207, 0,200, 5, 2, 0,201, 5, 2, 0,102, 5, + 7, 0,202, 5,209, 0,203, 5, 7, 0,220, 4, 7, 0,221, 4, 4, 0, 18, 0, 2, 0, 87, 1, 2, 0,204, 5, 2, 0,223, 4, + 2, 0,224, 4, 2, 0,205, 5, 2, 0, 27, 0, 2, 0,225, 4, 2, 0,226, 4, 2, 0,227, 4, 2, 0,228, 4, 2, 0,206, 5, + 2, 0, 91, 0, 7, 0,207, 5,211, 0, 6, 0,211, 0, 0, 0,211, 0, 1, 0, 4, 0, 61, 4, 0, 0, 19, 0, 4, 0, 18, 0, + 27, 0,208, 5,212, 0, 4, 0,213, 0,146, 3, 11, 0,209, 5, 0, 0,210, 5, 4, 0, 92, 0,214, 0, 8, 0,212, 0,211, 5, + 2, 0, 18, 0, 2, 0, 27, 0, 2, 0,212, 5, 2, 0,213, 5, 2, 0,214, 5, 4, 0, 91, 0, 11, 0,215, 5,215, 0, 6, 0, + 2, 0,108, 0, 2, 0, 67, 4, 2, 0,216, 5, 2, 0,225, 2, 4, 0, 18, 0, 7, 0,209, 2,216, 0, 14, 0, 2, 0, 18, 0, + 2, 0,217, 5, 2, 0,218, 5, 2, 0,219, 5,215, 0,220, 5, 11, 0,215, 5, 7, 0,221, 5, 7, 0, 56, 0, 4, 0,222, 5, + 4, 0,223, 5, 4, 0,224, 5, 4, 0,225, 5, 41, 0,125, 0, 27, 0,168, 0,217, 0, 14, 0,212, 0,211, 5, 4, 0, 92, 0, + 4, 0,226, 5, 7, 0,227, 5, 7, 0,228, 5, 7, 0,229, 5, 4, 0,230, 5, 4, 0,231, 5, 7, 0,232, 5, 7, 0,233, 5, + 4, 0,234, 5, 7, 0,235, 5, 7, 0,236, 5, 4, 0, 27, 0,218, 0, 1, 0,212, 0,211, 5,219, 0, 7, 0,212, 0,211, 5, + 2, 0, 18, 0, 2, 0, 27, 0, 4, 0, 37, 0, 4, 0,237, 5, 90, 0,238, 5, 11, 0,215, 5,220, 0, 5, 0,220, 0, 0, 0, +220, 0, 1, 0, 0, 0, 19, 0, 7, 0,239, 5, 4, 0, 27, 0,221, 0, 4, 0, 4, 0,108, 0, 7, 0,240, 5, 7, 0,178, 1, + 4, 0, 18, 0,222, 0, 85, 0,219, 0,241, 5,219, 0,242, 5,217, 0,169, 3,218, 0,243, 5, 7, 0,244, 5, 2, 0,245, 5, + 2, 0,246, 5, 7, 0,247, 5, 7, 0,248, 5, 2, 0, 67, 4, 2, 0,249, 5, 7, 0,250, 5, 7, 0,251, 5, 7, 0,252, 5, + 2, 0,253, 5, 2, 0,222, 5, 2, 0,254, 5, 2, 0,255, 5, 2, 0, 0, 6, 2, 0, 1, 6, 7, 0, 2, 6, 7, 0, 3, 6, + 7, 0, 4, 6, 2, 0, 5, 6, 2, 0, 6, 6, 2, 0, 7, 6, 2, 0, 8, 6, 2, 0, 9, 6, 2, 0, 10, 6, 2, 0, 11, 6, + 2, 0, 12, 6,214, 0, 13, 6,216, 0, 14, 6, 7, 0, 15, 6, 7, 0, 16, 6, 7, 0, 17, 6, 2, 0, 18, 6, 2, 0, 19, 6, + 0, 0, 20, 6, 0, 0, 21, 6, 2, 0, 22, 6, 7, 0, 23, 6, 7, 0, 24, 6, 7, 0, 25, 6, 7, 0, 26, 6, 7, 0, 27, 6, + 7, 0, 28, 6, 7, 0, 29, 6, 7, 0, 30, 6, 7, 0, 31, 6, 7, 0, 32, 6, 2, 0, 33, 6, 0, 0, 34, 6, 0, 0, 35, 6, + 0, 0, 36, 6, 0, 0, 37, 6, 27, 0, 38, 6, 0, 0, 39, 6, 0, 0, 40, 6, 0, 0, 41, 6, 0, 0, 42, 6, 0, 0, 43, 6, + 0, 0, 44, 6, 0, 0, 45, 6, 0, 0, 46, 6, 0, 0, 47, 6, 0, 0, 48, 6, 2, 0, 49, 6, 2, 0, 50, 6, 2, 0, 51, 6, + 2, 0, 52, 6, 0, 0, 53, 6, 0, 0, 54, 6, 0, 0, 55, 6, 0, 0, 56, 6, 4, 0, 57, 6, 4, 0, 58, 6, 4, 0, 59, 6, + 4, 0, 60, 6, 2, 0, 61, 6, 2, 0, 91, 0, 4, 0, 62, 6, 7, 0, 63, 6, 7, 0, 64, 6,221, 0, 65, 6,223, 0, 8, 0, + 4, 0, 66, 6, 4, 0, 67, 6, 4, 0, 68, 6, 4, 0, 69, 6, 4, 0, 70, 6, 4, 0, 71, 6, 4, 0, 53, 0, 4, 0,138, 2, +224, 0, 4, 0, 7, 0, 72, 6, 0, 0, 73, 6, 0, 0, 74, 6, 2, 0, 18, 0,225, 0, 4, 0, 7, 0, 75, 6, 4, 0, 18, 0, + 4, 0, 76, 6, 4, 0, 56, 0, 41, 0, 46, 0, 22, 0, 32, 0, 34, 0, 75, 0, 27, 0,208, 5,196, 0, 77, 6, 41, 0, 78, 6, + 14, 0, 79, 6,197, 0, 80, 6, 27, 0, 81, 6, 7, 0, 82, 6, 7, 0, 83, 6, 7, 0, 84, 6, 7, 0, 85, 6, 4, 0,205, 3, + 4, 0, 86, 6, 4, 0, 87, 6, 2, 0, 18, 0, 2, 0, 76, 1, 57, 0, 70, 1,226, 0, 88, 6,222, 0, 89, 6,227, 0, 90, 6, +205, 0,185, 0,202, 0, 91, 6, 14, 0,102, 0, 14, 0, 92, 6, 11, 0, 93, 6, 11, 0, 94, 6, 11, 0, 95, 6, 11, 0, 96, 6, + 11, 0, 97, 6,228, 0, 98, 6, 2, 0, 99, 6, 2, 0,100, 6, 2, 0,251, 0, 2, 0,206, 3, 4, 0,216, 3, 4, 0,101, 6, + 14, 0,102, 6,208, 0,194, 5,210, 0,103, 6,224, 0,104, 6,178, 0,182, 3,225, 0,105, 6,229, 0,106, 6, 10, 0, 7, 4, + 10, 0,107, 6,230, 0, 14, 0,230, 0, 0, 0,230, 0, 1, 0, 42, 0,242, 0, 40, 0, 69, 1,229, 0,106, 6,231, 0,108, 6, + 7, 0, 96, 2, 7, 0, 97, 2, 7, 0,108, 0, 7, 0,109, 6, 2, 0,110, 6, 2, 0, 18, 0, 2, 0,143, 0, 2, 0, 27, 0, +232, 0, 39, 0, 7, 0,111, 6, 7, 0,112, 6, 7, 0,113, 6, 7, 0,114, 6, 7, 0,115, 6, 7, 0,116, 6, 7, 0,117, 6, + 7, 0,118, 6, 7, 0,119, 6, 68, 0,120, 6,178, 0,182, 3,232, 0,121, 6,233, 0,122, 6,234, 0,123, 6,235, 0,124, 6, +236, 0,125, 6,237, 0,126, 6, 7, 0,127, 6, 7, 0,128, 6, 7, 0, 94, 1, 7, 0,129, 6, 7, 0,130, 6, 7, 0,131, 6, + 7, 0,132, 6, 7, 0,175, 0, 7, 0,133, 6, 0, 0,134, 6, 0, 0,135, 6, 0, 0,110, 6, 0, 0,136, 6, 2, 0,137, 6, + 2, 0,138, 6, 7, 0,139, 6, 2, 0,140, 6, 2, 0,141, 6, 7, 0,142, 6, 7, 0,143, 6, 7, 0,144, 6, 7, 0,145, 6, +238, 0, 51, 0,239, 0, 0, 0,239, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 7, 0,148, 6, 2, 0,149, 6, 7, 0,128, 6, + 7, 0, 94, 1, 7, 0,150, 6, 2, 0,151, 6, 0, 0,211, 2, 4, 0,152, 6, 2, 0,135, 6, 2, 0,110, 6, 27, 0,208, 5, + 27, 0,153, 6, 14, 0,154, 6,230, 0,155, 6,238, 0,121, 6, 0, 0,156, 6, 4, 0,205, 3, 4, 0, 86, 6, 2, 0,157, 6, + 2, 0,158, 6, 2, 0,159, 6, 2, 0,160, 6, 2, 0, 18, 0, 2, 0, 31, 2, 7, 0,114, 0, 7, 0,161, 6, 7, 0,162, 6, + 7, 0,163, 6, 7, 0,175, 0, 7, 0, 82, 6, 2, 0,164, 6, 2, 0,165, 6, 2, 0,166, 6, 0, 0,167, 6, 0, 0,168, 6, + 0, 0,169, 6, 0, 0,170, 6, 0, 0,171, 6, 14, 0,172, 6, 14, 0,173, 6, 14, 0,174, 6, 2, 0,175, 6, 2, 0,152, 2, + 2, 0,176, 6, 0, 0,177, 6, 11, 0,178, 6,178, 0,182, 3,240, 0, 24, 0, 19, 0, 37, 0, 19, 0, 63, 0, 18, 0,179, 6, + 18, 0,180, 6, 18, 0,181, 6, 7, 0,182, 6, 7, 0,183, 6, 7, 0,184, 6, 7, 0,185, 6, 2, 0,186, 6, 2, 0,187, 6, + 2, 0,188, 6, 2, 0,189, 6, 2, 0,190, 6, 2, 0, 18, 0, 2, 0,191, 6, 2, 0,192, 6, 2, 0,193, 6, 2, 0,194, 6, + 2, 0,195, 6, 2, 0,160, 6, 7, 0,196, 6, 4, 0,197, 6, 4, 0,198, 6,239, 0, 6, 0,239, 0, 0, 0,239, 0, 1, 0, + 14, 0,146, 6, 4, 0,147, 6, 7, 0,148, 6, 2, 0,149, 6,241, 0, 8, 0,239, 0, 0, 0,239, 0, 1, 0, 14, 0,146, 6, + 4, 0,147, 6, 7, 0,148, 6, 2, 0,149, 6, 0, 0,199, 6, 0, 0,124, 0,242, 0, 14, 0,239, 0, 0, 0,239, 0, 1, 0, + 14, 0,146, 6, 4, 0,147, 6, 7, 0,148, 6, 2, 0,149, 6,240, 0,200, 6,243, 0,201, 6, 14, 0,202, 6, 2, 0, 87, 1, + 2, 0,203, 6, 4, 0, 18, 0, 7, 0,204, 6, 4, 0,160, 6,244, 0, 21, 0,239, 0, 0, 0,239, 0, 1, 0, 14, 0,146, 6, + 4, 0,147, 6, 7, 0,148, 6, 2, 0,149, 6,240, 0,200, 6, 2, 0,205, 6, 2, 0,206, 6, 2, 0,207, 6, 2, 0,208, 6, + 2, 0,191, 6, 2, 0,209, 6, 2, 0,210, 6, 0, 0, 18, 0, 0, 0, 27, 0, 11, 0, 72, 2, 4, 0,211, 6, 4, 0,212, 6, + 22, 0,213, 6, 11, 0,214, 6,245, 0, 18, 0,239, 0, 0, 0,239, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 7, 0,148, 6, + 2, 0,149, 6,240, 0,200, 6, 7, 0, 96, 2, 7, 0, 97, 2, 2, 0,205, 6, 2, 0,215, 6, 2, 0,216, 6, 2, 0,217, 6, + 4, 0, 18, 0, 7, 0,218, 6, 4, 0,110, 6, 4, 0, 27, 0,178, 0,182, 3,246, 0, 16, 0, 0, 0,219, 6, 0, 0,220, 6, + 0, 0,221, 6, 0, 0,222, 6, 0, 0,223, 6, 0, 0,224, 6, 4, 0,225, 6, 4, 0,226, 6, 4, 0,227, 6, 2, 0, 16, 0, + 2, 0, 18, 0, 2, 0,228, 6, 2, 0,229, 6, 2, 0,190, 1, 2, 0,230, 6, 0, 0,231, 6,247, 0, 16, 0,239, 0, 0, 0, +239, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 4, 0,232, 6,246, 0,233, 6,248, 0,234, 6, 14, 0,235, 6, 14, 0,236, 6, +249, 0,237, 6,237, 0,238, 6,250, 0,239, 6, 2, 0,240, 6, 2, 0,241, 6, 2, 0,242, 6, 2, 0, 30, 0,251, 0, 15, 0, +239, 0, 0, 0,239, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 7, 0,148, 6, 2, 0,149, 6,240, 0,200, 6, 14, 0,243, 6, +252, 0,244, 6, 0, 0,245, 6,253, 0,246, 6, 2, 0, 18, 0, 2, 0,247, 6, 2, 0,248, 6, 2, 0,249, 6,254, 0, 25, 0, +239, 0, 0, 0,239, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 4, 0, 18, 0, 42, 0,244, 2, 40, 0, 69, 1, 54, 0,250, 6, +255, 0,251, 6, 0, 1,252, 6,178, 0,182, 3, 7, 0,253, 6, 7, 0, 96, 2, 7, 0, 97, 2, 7, 0,218, 6, 7, 0,254, 6, + 7, 0,255, 6, 2, 0, 0, 7, 2, 0, 27, 0, 2, 0, 1, 7, 2, 0, 2, 7, 0, 0, 3, 7, 0, 0, 4, 7, 0, 0, 5, 7, + 0, 0,160, 6, 1, 1, 11, 0,239, 0, 0, 0,239, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 7, 0,148, 6, 2, 0,149, 6, + 2, 0,203, 6, 2, 0, 18, 0, 4, 0, 27, 0,243, 0,201, 6,240, 0,200, 6, 2, 1, 31, 0,239, 0, 0, 0,239, 0, 1, 0, + 14, 0,146, 6, 4, 0,147, 6, 7, 0,148, 6, 2, 0,149, 6, 37, 0, 6, 7, 4, 0, 7, 7, 4, 0, 8, 7, 2, 0, 92, 0, + 2, 0, 9, 7, 2, 0, 10, 7, 0, 0, 11, 7, 0, 0, 12, 7, 4, 0, 13, 7, 4, 0, 14, 7, 4, 0, 15, 7, 2, 0, 16, 7, + 2, 0, 17, 7, 2, 0, 18, 7, 2, 0, 19, 7, 7, 0, 20, 7, 18, 0, 21, 7, 18, 0, 22, 7, 4, 0, 23, 7, 4, 0, 24, 7, + 0, 0, 25, 7, 0, 0, 26, 7, 2, 0, 27, 7, 0, 0,211, 2, 11, 0, 28, 7, 3, 1, 10, 0, 22, 0, 32, 0, 11, 0, 29, 7, + 11, 0, 30, 7, 11, 0, 31, 7, 11, 0, 32, 7, 11, 0, 33, 7, 4, 0, 92, 0, 4, 0, 34, 7, 0, 0, 35, 7, 0, 0, 36, 7, + 4, 1, 10, 0,239, 0, 0, 0,239, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 7, 0,148, 6, 3, 1, 37, 7, 2, 0, 92, 0, + 2, 0, 9, 7, 4, 0, 91, 0, 11, 0, 38, 7, 5, 1, 3, 0, 5, 1, 0, 0, 5, 1, 1, 0, 7, 0, 39, 7, 6, 1, 9, 0, +239, 0, 0, 0,239, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 7, 0,148, 6,240, 0,200, 6, 14, 0, 40, 7, 4, 0, 41, 7, + 4, 0, 18, 0, 7, 1, 27, 0,239, 0, 0, 0,239, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 7, 0,148, 6, 2, 0,149, 6, +240, 0,200, 6, 22, 0, 42, 7, 22, 0, 81, 0, 2, 0, 18, 0, 2, 0, 91, 0, 7, 0, 43, 7, 7, 0, 96, 2, 7, 0, 97, 2, + 7, 0,218, 6, 7, 0, 44, 7, 7, 0, 45, 7, 7, 0, 46, 7, 57, 0, 70, 1, 57, 0, 47, 7, 4, 0, 48, 7, 2, 0, 49, 7, + 2, 0, 50, 7, 2, 0,251, 0, 2, 0, 86, 1, 14, 0, 51, 7,178, 0,182, 3, 8, 1, 10, 0,239, 0, 0, 0,239, 0, 1, 0, + 14, 0,146, 6, 4, 0,147, 6, 7, 0,148, 6, 2, 0,149, 6, 2, 0, 18, 0, 2, 0,214, 3, 4, 0, 27, 0,178, 0,182, 3, + 9, 1, 7, 0, 9, 1, 0, 0, 9, 1, 1, 0, 4, 0, 52, 7, 4, 0, 22, 0, 0, 0, 85, 0, 4, 0, 53, 7, 4, 0, 16, 0, + 10, 1, 14, 0,239, 0, 0, 0,239, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 7, 0,148, 6, 2, 0,149, 6, 4, 0, 10, 7, + 4, 0, 27, 0, 14, 0, 54, 7, 14, 0, 55, 7, 0, 0, 56, 7, 0, 0, 57, 7, 4, 0, 58, 7, 4, 0, 59, 7, 11, 1, 6, 0, +239, 0, 0, 0,239, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 4, 0, 27, 0, 0, 0, 60, 7, 12, 1, 24, 0,239, 0, 0, 0, +239, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 7, 0, 96, 2, 7, 0, 97, 2, 7, 0, 61, 7, 7, 0, 62, 7, 7, 0,218, 6, +231, 0, 63, 7,229, 0,106, 6, 13, 1,251, 6, 4, 0, 18, 0, 2, 0, 87, 1, 2, 0,110, 6, 4, 0, 64, 7, 7, 0, 65, 7, + 7, 0,148, 3, 7, 0, 94, 3, 4, 0, 27, 0, 7, 0, 66, 7, 7, 0, 67, 7, 4, 0, 68, 7, 4, 0, 69, 7, 14, 1, 7, 0, + 14, 1, 0, 0, 14, 1, 1, 0, 0, 0, 70, 7, 2, 0, 71, 7, 2, 0, 72, 7, 2, 0, 73, 7, 2, 0, 27, 0, 15, 1, 12, 0, + 2, 0, 72, 7, 2, 0, 74, 7, 2, 0, 75, 7, 0, 0,211, 2, 2, 0, 76, 7, 2, 0, 77, 7, 2, 0, 78, 7, 2, 0, 79, 7, + 2, 0, 80, 7, 2, 0,191, 6, 7, 0, 81, 7, 7, 0, 82, 7, 16, 1, 18, 0, 16, 1, 0, 0, 16, 1, 1, 0, 0, 0, 19, 0, + 15, 1, 83, 7, 15, 1, 84, 7, 15, 1, 85, 7, 15, 1, 86, 7, 7, 0, 87, 7, 2, 0, 88, 7, 2, 0, 89, 7, 2, 0, 90, 7, + 2, 0, 91, 7, 2, 0, 92, 7, 2, 0, 93, 7, 2, 0, 94, 7, 2, 0, 95, 7, 2, 0, 96, 7, 2, 0, 27, 0, 17, 1, 10, 0, + 0, 0, 97, 7, 0, 0, 98, 7, 0, 0, 99, 7, 0, 0,100, 7, 0, 0,101, 7, 0, 0,102, 7, 2, 0,103, 7, 2, 0,104, 7, + 2, 0,105, 7, 2, 0,106, 7, 18, 1, 8, 0, 0, 0,107, 7, 0, 0,108, 7, 0, 0,109, 7, 0, 0,110, 7, 0, 0,111, 7, + 0, 0,112, 7, 7, 0,109, 6, 7, 0, 27, 0, 19, 1, 3, 0, 0, 0,113, 7, 2, 0,114, 7, 2, 0, 27, 0, 20, 1, 22, 0, + 17, 1,115, 7, 17, 1,116, 7, 17, 1,117, 7, 17, 1,118, 7, 17, 1,119, 7, 17, 1,120, 7, 17, 1,121, 7, 17, 1,122, 7, + 17, 1,123, 7, 17, 1,124, 7, 17, 1,125, 7, 17, 1,126, 7, 17, 1,127, 7, 17, 1,128, 7, 17, 1,129, 7, 17, 1,130, 7, + 17, 1,131, 7, 18, 1,132, 7, 19, 1,133, 7, 0, 0,134, 7, 7, 0,135, 7, 7, 0, 27, 0, 21, 1,122, 0, 0, 0,136, 7, + 0, 0,137, 7, 0, 0,101, 7, 0, 0,138, 7, 0, 0,113, 7, 0, 0,139, 7, 0, 0,140, 7, 0, 0,141, 7, 0, 0,142, 7, + 0, 0,143, 7, 0, 0,144, 7, 0, 0,145, 7, 0, 0,146, 7, 0, 0,147, 7, 0, 0,148, 7, 0, 0,149, 7, 0, 0,150, 7, + 0, 0,151, 7, 0, 0,152, 7, 0, 0,153, 7, 0, 0,154, 7, 0, 0,155, 7, 0, 0,156, 7, 0, 0,157, 7, 0, 0,158, 7, + 0, 0,159, 7, 0, 0,160, 7, 0, 0,161, 7, 0, 0,162, 7, 0, 0,163, 7, 0, 0,164, 7, 0, 0,165, 7, 0, 0,166, 7, + 0, 0,167, 7, 0, 0,168, 7, 0, 0,169, 7, 0, 0,170, 7, 0, 0,171, 7, 0, 0,172, 7, 0, 0,173, 7, 0, 0,174, 7, + 0, 0,175, 7, 0, 0,176, 7, 0, 0,177, 7, 0, 0,178, 7, 0, 0,179, 7, 0, 0,180, 7, 0, 0,181, 7, 0, 0,182, 7, + 0, 0,183, 7, 0, 0,184, 7, 0, 0,185, 7, 0, 0,186, 7, 0, 0,187, 7, 0, 0,188, 7, 0, 0,189, 7, 0, 0,190, 7, + 0, 0,191, 7, 0, 0,192, 7, 0, 0,193, 7, 0, 0,194, 7, 0, 0,195, 7, 0, 0,196, 7, 0, 0,197, 7, 0, 0,198, 7, + 0, 0,199, 7, 0, 0,200, 7, 0, 0,201, 7, 0, 0,202, 7, 0, 0,203, 7, 0, 0,204, 7, 0, 0,205, 7, 0, 0,206, 7, + 0, 0,207, 7, 0, 0,208, 7, 0, 0,209, 7, 0, 0,210, 7, 0, 0,211, 7, 0, 0,212, 7, 0, 0,213, 7, 0, 0,214, 7, + 0, 0,215, 7, 0, 0,216, 7, 0, 0,217, 7, 0, 0,218, 7, 0, 0,219, 7, 0, 0,220, 7, 0, 0,221, 7, 0, 0,222, 7, + 0, 0,223, 7, 0, 0,224, 7, 0, 0,225, 7, 0, 0,226, 7, 0, 0,227, 7, 0, 0,228, 7, 0, 0,229, 7, 0, 0,230, 7, + 0, 0,231, 7, 0, 0,232, 7, 0, 0,233, 7, 0, 0,234, 7, 0, 0,235, 7, 0, 0,236, 7, 0, 0,237, 7, 0, 0,238, 7, + 0, 0,239, 7, 0, 0,240, 7, 0, 0,241, 7, 0, 0,242, 7, 0, 0,243, 7, 0, 0,244, 7, 0, 0,245, 7, 0, 0,246, 7, + 0, 0,247, 7, 0, 0,248, 7, 0, 0,249, 7, 0, 0,250, 7, 0, 0,251, 7, 0, 0,252, 7, 0, 0,253, 7, 0, 0,254, 7, + 0, 0,255, 7, 22, 1, 5, 0, 0, 0, 0, 8, 0, 0,159, 7, 0, 0,165, 7, 2, 0, 18, 0, 2, 0, 27, 0, 23, 1, 24, 0, + 23, 1, 0, 0, 23, 1, 1, 0, 0, 0,172, 5, 20, 1, 1, 8, 21, 1, 2, 8, 21, 1, 3, 8, 21, 1, 4, 8, 21, 1, 5, 8, + 21, 1, 6, 8, 21, 1, 7, 8, 21, 1, 8, 8, 21, 1, 9, 8, 21, 1, 10, 8, 21, 1, 11, 8, 21, 1, 12, 8, 21, 1, 13, 8, + 21, 1, 14, 8, 21, 1, 15, 8, 21, 1, 16, 8, 21, 1, 17, 8, 21, 1, 18, 8, 22, 1, 19, 8, 4, 0, 20, 8, 4, 0, 27, 0, + 24, 1, 3, 0, 24, 1, 0, 0, 24, 1, 1, 0, 0, 0, 21, 8, 25, 1, 5, 0, 4, 0, 18, 0, 4, 0, 27, 0, 7, 0,151, 2, + 7, 0, 22, 8, 7, 0, 46, 2, 26, 1, 95, 0, 4, 0, 18, 0, 4, 0, 23, 8, 4, 0, 24, 8, 0, 0, 25, 8, 0, 0, 26, 8, + 0, 0, 27, 8, 0, 0, 28, 8, 0, 0, 29, 8, 0, 0, 30, 8, 0, 0, 31, 8, 0, 0, 32, 8, 0, 0, 33, 8, 0, 0, 34, 8, + 4, 0, 35, 8, 2, 0, 36, 8, 2, 0, 37, 8, 2, 0, 38, 8, 2, 0, 39, 8, 4, 0, 40, 8, 4, 0, 41, 8, 4, 0, 42, 8, + 4, 0, 43, 8, 2, 0, 44, 8, 2, 0, 45, 8, 4, 0, 46, 8, 4, 0, 47, 8, 4, 0, 48, 8, 4, 0, 49, 8, 4, 0, 50, 8, + 4, 0, 54, 7, 4, 0, 51, 8, 2, 0, 52, 8, 2, 0, 53, 8, 2, 0, 54, 8, 2, 0, 55, 8, 14, 0, 56, 8, 14, 0, 57, 8, + 14, 0, 58, 8, 14, 0, 59, 8, 14, 0, 60, 8, 14, 0, 61, 8, 0, 0, 62, 8, 2, 0, 63, 8, 2, 0, 64, 8, 2, 0, 65, 8, + 2, 0, 66, 8, 2, 0, 67, 8, 2, 0, 68, 8, 2, 0, 69, 8, 2, 0, 70, 8, 25, 1, 71, 8, 2, 0, 72, 8, 2, 0, 73, 8, + 2, 0, 74, 8, 2, 0, 75, 8, 2, 0, 76, 8, 2, 0, 77, 8, 2, 0, 78, 8, 2, 0, 79, 8, 4, 0, 80, 8, 4, 0, 81, 8, + 2, 0, 82, 8, 2, 0, 83, 8, 2, 0, 84, 8, 2, 0, 85, 8, 2, 0, 86, 8, 2, 0, 87, 8, 2, 0, 88, 8, 2, 0, 89, 8, + 2, 0, 90, 8, 2, 0, 91, 8, 2, 0, 92, 8, 2, 0, 93, 8, 2, 0, 94, 8, 2, 0, 95, 8, 2, 0, 96, 8, 2, 0, 97, 8, + 2, 0, 98, 8, 2, 0, 99, 8, 7, 0,100, 8, 4, 0,101, 8, 7, 0,102, 8, 2, 0, 18, 6, 2, 0, 19, 6, 2, 0,103, 8, + 2, 0,104, 8, 50, 0,105, 8, 7, 0,106, 8, 2, 0,107, 8, 2, 0, 74, 0, 0, 0,108, 8, 4, 0,109, 8, 4, 0,110, 8, + 7, 0,111, 8, 7, 0, 27, 0, 27, 1, 24, 0, 22, 0, 32, 0, 14, 0,112, 8, 14, 0,113, 8, 14, 0,114, 8, 14, 0,146, 6, + 41, 0,125, 0, 41, 0,115, 8, 4, 0,116, 8, 4, 0, 91, 0, 2, 0,117, 8, 2, 0,118, 8, 2, 0,119, 8, 2, 0,120, 8, + 2, 0,121, 8, 2, 0,122, 8, 2, 0,123, 8, 2, 0,124, 8, 2, 0,125, 8, 2, 0,126, 8, 2, 0,127, 8, 2, 0, 27, 0, +237, 0,128, 8, 11, 0,129, 8, 2, 0,130, 8, 28, 1, 5, 0, 28, 1, 0, 0, 28, 1, 1, 0, 28, 1,131, 8, 15, 0,132, 8, + 4, 0, 18, 0, 29, 1, 7, 0, 29, 1, 0, 0, 29, 1, 1, 0, 28, 1,133, 8, 28, 1,134, 8, 2, 0,121, 5, 2, 0, 18, 0, + 4, 0, 27, 0, 30, 1, 25, 0, 30, 1, 0, 0, 30, 1, 1, 0, 31, 1,135, 8, 32, 1,239, 6, 0, 0,136, 8, 0, 0,137, 8, + 0, 0,138, 8, 2, 0,139, 8, 2, 0,140, 8, 2, 0,141, 8, 2, 0,142, 8, 2, 0,143, 8, 2, 0, 27, 0, 2, 0, 18, 0, + 2, 0, 69, 7, 2, 0,144, 8, 2, 0,145, 8, 4, 0,146, 8, 30, 1,147, 8, 11, 0,148, 8, 4, 0,149, 8, 4, 0,150, 8, + 4, 0,151, 8, 4, 0,152, 8, 0, 0,153, 8, 33, 1, 22, 0, 33, 1, 0, 0, 33, 1, 1, 0, 28, 1,133, 8, 28, 1,134, 8, + 28, 1,154, 8, 28, 1,155, 8, 27, 1,156, 8, 18, 0, 51, 0, 0, 0,147, 6, 0, 0,157, 8, 2, 0,192, 6, 2, 0,193, 6, + 2, 0,158, 8, 2, 0, 27, 0, 2, 0,121, 8, 2, 0, 53, 7, 2, 0, 18, 0, 34, 1,135, 8, 14, 0,159, 8, 14, 0,146, 6, + 14, 0,160, 8, 14, 0,161, 8, 35, 1, 24, 0, 35, 1, 0, 0, 35, 1, 1, 0,240, 0,200, 6, 18, 0,162, 8, 18, 0,163, 8, + 2, 0,192, 6, 2, 0,193, 6, 2, 0,164, 8, 2, 0,165, 8, 2, 0,166, 8, 2, 0, 18, 0, 7, 0, 92, 2, 2, 0,141, 8, + 2, 0,142, 8, 2, 0,120, 8, 2, 0,167, 8, 2, 0,125, 8, 2, 0, 86, 1, 36, 1,135, 8, 14, 0,168, 8, 14, 0,169, 8, + 14, 0,160, 8, 0, 0,170, 8, 11, 0,171, 8, 37, 1, 14, 0, 0, 0,172, 8, 2, 0,173, 8, 2, 0,174, 8, 2, 0,175, 8, + 2, 0,176, 8, 2, 0,110, 5, 2, 0,177, 8, 27, 1,178, 8, 41, 0,179, 8, 4, 0,180, 8, 4, 0,181, 8, 4, 0,182, 8, + 4, 0, 27, 0, 0, 0, 70, 7, 38, 1, 3, 0, 0, 0,183, 8, 4, 0,184, 8, 4, 0,185, 8, 39, 1, 4, 0, 4, 0, 7, 7, + 4, 0,186, 8, 4, 0, 13, 7, 4, 0,187, 8, 40, 1, 2, 0, 4, 0,188, 8, 4, 0,189, 8, 41, 1, 5, 0, 7, 0,190, 8, + 7, 0,191, 8, 7, 0,192, 8, 4, 0, 18, 0, 4, 0, 27, 0, 42, 1, 7, 0, 0, 0,193, 8, 0, 0,221, 6, 44, 0,138, 0, + 2, 0,194, 8, 2, 0, 72, 5, 2, 0,195, 8, 2, 0,196, 8, 43, 1, 12, 0, 43, 1, 0, 0, 43, 1, 1, 0, 4, 0, 28, 0, + 4, 0,197, 8, 4, 0,198, 8, 4, 0,199, 8, 38, 1,200, 8, 0, 0,193, 8, 42, 1,176, 3, 39, 1,201, 8, 40, 1,202, 8, + 41, 1,203, 8, 44, 1, 12, 0, 0, 0, 35, 0, 11, 0,227, 0, 0, 0,228, 0, 4, 0,231, 0, 4, 0,239, 0, 11, 0,232, 0, + 7, 0,234, 0, 7, 0,235, 0, 11, 0,204, 8, 11, 0,205, 8, 11, 0,236, 0, 11, 0,238, 0, 45, 1, 48, 0, 45, 1, 0, 0, + 45, 1, 1, 0, 11, 0,206, 8, 11, 0, 25, 0, 0, 0, 19, 0, 4, 0, 18, 0, 4, 0, 16, 0, 4, 0, 22, 0, 4, 0, 89, 0, + 4, 0,207, 8, 4, 0,208, 8, 4, 0,198, 8, 4, 0,199, 8, 4, 0,209, 8, 4, 0,250, 0, 4, 0,210, 8, 4, 0,211, 8, + 7, 0,212, 8, 7, 0,213, 8, 7, 0,214, 8, 2, 0,215, 8, 2, 0,216, 8, 4, 0,217, 8, 4, 0,218, 8, 43, 1,219, 8, + 31, 0, 80, 0, 41, 0,125, 0, 27, 0,220, 8, 44, 0,138, 0,229, 0,106, 6, 7, 0,221, 8, 7, 0,222, 8, 44, 1, 71, 1, + 45, 1,223, 8, 45, 1,224, 8, 45, 1,225, 8, 14, 0,226, 8, 46, 1,227, 8, 11, 0,228, 8, 7, 0, 84, 4, 7, 0,229, 8, + 7, 0,230, 8, 7, 0,231, 8, 11, 0,232, 8, 4, 0,233, 8, 4, 0,234, 8, 4, 0,235, 8, 7, 0,236, 8, 47, 1, 4, 0, + 47, 1, 0, 0, 47, 1, 1, 0, 14, 0,237, 8, 45, 1,238, 8,226, 0, 11, 0, 14, 0,239, 8, 14, 0,226, 8, 14, 0,240, 8, + 45, 1,241, 8, 0, 0,242, 8, 0, 0,243, 8, 4, 0,244, 8, 4, 0,245, 8, 4, 0,246, 8, 4, 0, 27, 0, 19, 0,247, 8, + 48, 1, 4, 0, 7, 0,248, 8, 7, 0, 94, 3, 2, 0,249, 8, 2, 0,250, 8, 49, 1, 6, 0, 7, 0,251, 8, 7, 0,252, 8, + 7, 0,253, 8, 7, 0,254, 8, 4, 0,255, 8, 4, 0, 0, 9, 50, 1, 8, 0, 7, 0, 1, 9, 7, 0, 2, 9, 7, 0, 3, 9, + 7, 0, 4, 9, 7, 0, 5, 9, 4, 0,250, 2, 4, 0, 6, 9, 4, 0, 7, 9, 51, 1, 2, 0, 7, 0,180, 5, 7, 0, 27, 0, + 52, 1, 5, 0, 7, 0, 8, 9, 7, 0, 9, 9, 4, 0, 92, 0, 4, 0,212, 2, 4, 0, 10, 9, 53, 1, 6, 0, 53, 1, 0, 0, + 53, 1, 1, 0, 2, 0, 16, 0, 2, 0, 18, 0, 2, 0, 11, 9, 2, 0, 56, 0, 54, 1, 8, 0, 54, 1, 0, 0, 54, 1, 1, 0, + 2, 0, 16, 0, 2, 0, 18, 0, 2, 0, 11, 9, 2, 0, 56, 0, 7, 0, 22, 0, 7, 0,129, 0, 55, 1, 45, 0, 55, 1, 0, 0, + 55, 1, 1, 0, 2, 0, 16, 0, 2, 0, 18, 0, 2, 0, 11, 9, 2, 0,246, 0, 2, 0,126, 4, 2, 0, 12, 9, 7, 0, 13, 9, + 7, 0, 90, 0, 7, 0, 7, 3, 4, 0, 14, 9, 4, 0, 82, 0, 4, 0,214, 2, 7, 0, 15, 9, 7, 0, 16, 9, 7, 0, 17, 9, + 7, 0, 18, 9, 7, 0, 19, 9, 7, 0, 20, 9, 7, 0, 4, 3, 7, 0, 68, 1, 7, 0, 21, 9, 7, 0, 22, 9, 7, 0, 27, 0, + 7, 0, 23, 9, 7, 0, 24, 9, 7, 0, 25, 9, 2, 0, 26, 9, 2, 0, 27, 9, 2, 0, 28, 9, 2, 0, 29, 9, 2, 0, 30, 9, + 2, 0, 31, 9, 2, 0, 32, 9, 2, 0, 33, 9, 2, 0, 31, 2, 2, 0, 34, 9, 2, 0, 28, 2, 2, 0, 35, 9, 0, 0, 36, 9, + 0, 0, 37, 9, 7, 0,244, 0, 56, 1, 38, 9, 64, 0,249, 1, 57, 1, 16, 0, 57, 1, 0, 0, 57, 1, 1, 0, 2, 0, 16, 0, + 2, 0, 18, 0, 2, 0, 11, 9, 2, 0,246, 0, 7, 0,255, 2, 7, 0, 0, 3, 7, 0, 1, 3, 7, 0, 81, 2, 7, 0, 2, 3, + 7, 0, 3, 3, 7, 0, 39, 9, 7, 0, 4, 3, 7, 0, 6, 3, 7, 0, 7, 3,253, 0, 5, 0, 2, 0, 16, 0, 2, 0, 40, 9, + 2, 0, 18, 0, 2, 0, 41, 9, 22, 0, 42, 7,252, 0, 3, 0, 4, 0, 68, 0, 4, 0, 42, 9,253, 0, 2, 0, 58, 1, 7, 0, + 58, 1, 0, 0, 58, 1, 1, 0, 0, 0, 19, 0, 2, 0, 16, 0, 2, 0, 18, 0, 4, 0, 21, 0, 11, 0, 43, 9, 59, 1, 5, 0, + 0, 0, 19, 0, 7, 0, 94, 1, 7, 0, 44, 9, 4, 0, 45, 9, 4, 0, 27, 0, 60, 1, 4, 0, 2, 0, 16, 0, 2, 0, 18, 0, + 2, 0, 91, 0, 2, 0, 30, 0, 61, 1, 4, 0, 0, 0, 19, 0, 63, 0, 46, 9, 7, 0, 94, 1, 7, 0, 27, 0, 62, 1, 6, 0, + 2, 0, 47, 9, 2, 0, 48, 9, 2, 0, 16, 0, 2, 0, 49, 9, 0, 0, 50, 9, 0, 0, 51, 9, 63, 1, 5, 0, 4, 0, 16, 0, + 4, 0, 27, 0, 0, 0, 19, 0, 0, 0, 52, 9, 0, 0, 53, 9, 64, 1, 3, 0, 4, 0, 16, 0, 4, 0, 27, 0, 0, 0, 19, 0, + 65, 1, 4, 0, 2, 0, 54, 9, 2, 0, 55, 9, 2, 0, 18, 0, 2, 0, 27, 0, 66, 1, 6, 0, 0, 0, 19, 0, 0, 0, 56, 9, + 2, 0, 57, 9, 2, 0, 4, 3, 2, 0, 87, 1, 2, 0, 30, 0, 67, 1, 5, 0, 0, 0, 19, 0, 7, 0, 94, 3, 7, 0,217, 4, + 2, 0, 18, 0, 2, 0,226, 2, 68, 1, 3, 0, 0, 0, 19, 0, 4, 0,214, 2, 4, 0, 54, 9, 69, 1, 7, 0, 0, 0, 19, 0, + 7, 0,217, 4, 0, 0, 58, 9, 0, 0, 59, 9, 2, 0, 87, 1, 2, 0, 91, 0, 4, 0, 60, 9, 70, 1, 4, 0, 0, 0, 61, 9, + 0, 0, 62, 9, 4, 0, 16, 0, 7, 0,230, 2, 71, 1, 3, 0, 27, 0, 63, 9, 0, 0, 64, 9, 0, 0, 65, 9, 72, 1, 18, 0, + 72, 1, 0, 0, 72, 1, 1, 0, 2, 0, 16, 0, 2, 0, 66, 9, 2, 0, 18, 0, 2, 0, 67, 9, 2, 0, 68, 9, 2, 0, 69, 9, + 2, 0, 91, 0, 2, 0, 30, 0, 0, 0, 19, 0, 11, 0, 2, 0, 73, 1, 70, 9, 27, 0, 44, 0, 2, 0,216, 5, 2, 0,176, 2, + 2, 0, 71, 9, 2, 0, 27, 0, 74, 1, 11, 0, 0, 0, 19, 0, 0, 0, 16, 0, 0, 0, 72, 9, 2, 0, 18, 0, 2, 0,226, 2, + 2, 0, 73, 9, 4, 0, 74, 9, 4, 0, 75, 9, 4, 0, 76, 9, 4, 0, 77, 9, 4, 0, 78, 9, 75, 1, 1, 0, 0, 0, 79, 9, + 76, 1, 4, 0, 37, 0, 6, 7, 0, 0, 21, 8, 4, 0, 87, 1, 4, 0, 18, 0, 73, 1, 18, 0, 73, 1, 0, 0, 73, 1, 1, 0, + 73, 1, 80, 9, 2, 0, 16, 0, 2, 0, 18, 0, 2, 0, 81, 9, 2, 0, 69, 9, 2, 0, 66, 9, 2, 0, 82, 9, 2, 0, 30, 0, + 2, 0, 74, 0, 0, 0, 19, 0, 11, 0, 2, 0, 77, 1, 70, 9, 72, 1, 83, 9, 2, 0, 14, 0, 2, 0, 84, 9, 4, 0, 85, 9, + 78, 1, 3, 0, 4, 0,240, 2, 4, 0, 27, 0, 27, 0, 44, 0, 79, 1, 15, 0,176, 0, 86, 9, 2, 0, 16, 0, 2, 0, 18, 0, + 7, 0, 13, 9, 7, 0, 90, 0, 0, 0, 19, 0, 0, 0, 87, 9, 2, 0, 88, 9, 2, 0, 89, 9, 2, 0,134, 0, 2, 0, 90, 9, + 2, 0, 91, 9, 2, 0, 27, 0, 7, 0, 92, 9, 7, 0, 93, 9, 80, 1, 8, 0, 7, 0, 94, 9, 7, 0, 95, 9, 7, 0, 96, 9, + 7, 0, 97, 9, 7, 0, 98, 9, 7, 0, 99, 9, 7, 0,100, 9, 7, 0,101, 9, 81, 1, 13, 0, 2, 0, 18, 0, 2, 0,102, 9, + 4, 0, 91, 0, 4, 0, 30, 0, 2, 0,177, 6, 7, 0, 84, 4, 7, 0,229, 8, 46, 1,227, 8, 80, 1,103, 9, 2, 0, 16, 0, + 2, 0,115, 5, 2, 0,216, 3, 2, 0,104, 9, 82, 1, 11, 0, 4, 0,240, 2, 2, 0, 16, 0, 2, 0, 18, 0, 27, 0, 44, 0, + 79, 0,105, 9, 0, 0, 19, 0, 7, 0,106, 9, 7, 0,107, 9, 7, 0,222, 3, 2, 0,108, 9, 2, 0,109, 9, 83, 1, 5, 0, + 2, 0, 16, 0, 2, 0, 91, 0, 4, 0, 27, 0, 41, 0,125, 0, 27, 0,208, 5, 84, 1, 5, 0, 4, 0, 27, 0, 4, 0, 16, 0, + 0, 0, 19, 0, 0, 0, 52, 9, 27, 0, 44, 0, 85, 1, 13, 0, 2, 0, 18, 0, 2, 0, 16, 0, 2, 0, 66, 9, 2, 0,223, 3, + 7, 0,110, 9, 7, 0,111, 9, 7, 0, 86, 1, 7, 0,112, 9, 7, 0,192, 3, 7, 0,196, 3, 7, 0,113, 9, 7, 0,114, 9, + 27, 0,115, 9, 86, 1, 10, 0, 2, 0, 18, 0, 2, 0, 16, 0, 7, 0, 13, 9, 7, 0, 90, 0, 0, 0, 19, 0, 0, 0, 87, 9, + 2, 0, 91, 0, 2, 0, 30, 0, 2, 0, 74, 0, 2, 0,115, 5, 87, 1, 8, 0, 27, 0, 44, 0, 7, 0, 1, 3, 7, 0,116, 9, + 7, 0,117, 9, 7, 0,223, 3, 2, 0, 91, 0, 2, 0,226, 2, 7, 0, 30, 0, 88, 1, 12, 0, 2, 0, 16, 0, 2, 0, 87, 1, + 2, 0, 18, 0, 2, 0, 4, 3, 2, 0,240, 2, 2, 0,118, 9, 4, 0, 27, 0, 7, 0,119, 9, 7, 0,120, 9, 7, 0,121, 9, + 7, 0,122, 9, 0, 0,123, 9, 89, 1, 9, 0, 2, 0, 18, 0, 2, 0, 16, 0, 4, 0, 13, 9, 4, 0, 90, 0, 0, 0, 19, 0, + 2, 0, 86, 1, 2, 0, 63, 0, 2, 0,124, 9, 2, 0,125, 9, 90, 1, 7, 0, 4, 0,214, 2, 4, 0,126, 9, 4, 0,127, 9, + 4, 0,128, 9, 7, 0,129, 9, 7, 0,130, 9, 0, 0, 58, 9, 91, 1, 7, 0, 0, 0,131, 9, 27, 0,132, 9, 0, 0, 64, 9, + 2, 0,133, 9, 2, 0, 91, 0, 4, 0, 30, 0, 0, 0, 65, 9, 92, 1, 6, 0, 2, 0, 18, 0, 2, 0, 16, 0, 4, 0, 13, 9, + 4, 0, 90, 0, 0, 0,134, 9, 0, 0,135, 9, 93, 1, 1, 0, 4, 0, 18, 0, 94, 1, 6, 0, 0, 0, 94, 0, 2, 0, 16, 0, + 2, 0, 18, 0, 4, 0,136, 9, 7, 0,137, 9, 37, 0, 6, 7, 95, 1, 4, 0, 0, 0,181, 2, 2, 0, 18, 0, 4, 0, 16, 0, + 27, 0, 44, 0, 96, 1, 2, 0, 4, 0, 16, 0, 4, 0,181, 6, 97, 1, 8, 0, 0, 0, 61, 9, 0, 0, 62, 9, 4, 0, 16, 0, + 7, 0, 39, 2, 7, 0,138, 9, 7, 0, 27, 0, 27, 0, 70, 3, 27, 0,139, 9, 98, 1, 11, 0, 0, 0, 54, 6, 0, 0, 18, 0, + 2, 0,140, 9, 4, 0, 16, 0, 7, 0, 94, 1, 7, 0,141, 9, 7, 0,142, 9, 7, 0,143, 9, 4, 0,144, 9, 27, 0, 70, 3, + 27, 0,145, 9, 77, 1, 10, 0, 77, 1, 0, 0, 77, 1, 1, 0, 77, 1, 80, 9, 2, 0, 16, 0, 2, 0, 18, 0, 2, 0, 66, 9, + 2, 0,146, 9, 0, 0, 19, 0, 11, 0, 2, 0, 27, 0, 44, 0, 46, 1, 17, 0, 22, 0, 32, 0, 0, 0, 35, 0, 38, 0,153, 0, + 11, 0,227, 0, 38, 0,147, 9, 31, 0, 80, 0, 7, 0, 84, 4, 7, 0,148, 9, 7, 0,229, 8, 7, 0, 94, 9, 7, 0, 95, 9, + 7, 0,149, 9, 4, 0, 92, 0, 4, 0, 27, 0, 11, 0,150, 9, 11, 0,151, 9, 11, 0,152, 9, 99, 1, 6, 0, 99, 1, 0, 0, + 99, 1, 1, 0, 27, 0, 44, 0, 11, 0,153, 9, 2, 0,251, 0, 0, 0,211, 2, 64, 0, 4, 0, 22, 0, 32, 0, 14, 0,154, 9, + 4, 0,134, 0, 7, 0,155, 9,100, 1, 28, 0,100, 1, 0, 0,100, 1, 1, 0, 21, 0,156, 9,100, 1, 38, 0, 14, 0,157, 9, + 0, 0, 19, 0, 7, 0,158, 9, 7, 0,159, 9, 7, 0,160, 9, 7, 0,161, 9, 4, 0, 18, 0, 7, 0,162, 9, 7, 0,163, 9, + 7, 0,164, 9, 7, 0,165, 9, 7, 0, 94, 1, 7, 0, 39, 2, 7, 0,166, 9, 7, 0,212, 2, 7, 0,167, 9, 7, 0,168, 9, + 7, 0,169, 9, 7, 0,170, 9, 7, 0,171, 9, 7, 0,176, 0, 4, 0,134, 0, 2, 0,254, 5, 2, 0,172, 9,101, 1, 27, 0, + 22, 0, 32, 0, 34, 0, 75, 0, 14, 0,173, 9, 14, 0,174, 9, 14, 0,175, 9,100, 1,176, 9, 11, 0,177, 9, 11, 0,178, 9, + 4, 0, 18, 0, 4, 0,157, 6, 4, 0,179, 9, 4, 0, 27, 0, 2, 0, 8, 3, 2, 0,211, 6, 4, 0,180, 9, 4, 0,134, 0, + 4, 0,181, 9, 2, 0,182, 9, 2, 0,183, 9, 2, 0,184, 9, 2, 0,185, 9, 4, 0,186, 9, 4, 0,187, 9, 4, 0,188, 9, + 4, 0,189, 9, 4, 0,190, 9, 4, 0,191, 9,102, 1, 2, 0, 7, 0,165, 2, 4, 0, 18, 0,180, 0, 5, 0,102, 1,192, 9, + 4, 0,212, 2, 4, 0,193, 9, 4, 0,194, 9, 4, 0, 18, 0,179, 0, 16, 0, 4, 0,195, 9, 4, 0,196, 9, 4, 0,197, 9, + 4, 0,198, 9, 2, 0,199, 9, 2, 0,200, 9, 2, 0,201, 9, 2, 0,251, 0, 2, 0,202, 9, 2, 0,203, 9, 2, 0,204, 9, + 2, 0,205, 9, 4, 0,206, 9, 4, 0,207, 9, 4, 0,208, 9, 4, 0,209, 9,103, 1, 40, 0,103, 1, 0, 0,103, 1, 1, 0, + 21, 0,156, 9, 14, 0,251, 3, 0, 0, 19, 0, 2, 0, 18, 0, 2, 0,210, 9, 2, 0,209, 3, 2, 0,211, 9, 0, 0,212, 9, + 0, 0,213, 9, 0, 0,214, 9,100, 1,215, 9,103, 1, 38, 0,103, 1,216, 9, 14, 0,217, 9, 14, 0,218, 9,180, 0,184, 3, + 27, 0,219, 9,103, 1,220, 9, 7, 0, 77, 1, 7, 0,176, 0, 7, 0,221, 9, 7, 0, 18, 2, 7, 0,198, 3, 7, 0,200, 3, + 2, 0,232, 3, 2, 0, 27, 0, 7, 0,222, 9, 7, 0,223, 9, 7, 0,203, 3, 7, 0,224, 9, 7, 0,225, 9, 7, 0,226, 9, + 7, 0,227, 9, 7, 0,228, 9, 7, 0,229, 9, 7, 0,230, 9, 7, 0,231, 9, 11, 0,232, 9,177, 0, 16, 0, 14, 0,233, 9, + 74, 0,234, 9, 2, 0, 18, 0, 2, 0, 27, 0, 4, 0,235, 9, 4, 0, 91, 0, 7, 0,108, 2, 7, 0,236, 9, 7, 0,237, 9, + 14, 0,238, 9, 4, 0,239, 9, 4, 0,240, 9, 11, 0,241, 9, 11, 0,242, 9,179, 0,183, 3, 0, 0,243, 9,104, 1, 1, 0, + 4, 0,240, 9,105, 1, 12, 0, 4, 0,240, 9, 7, 0, 78, 9, 2, 0,244, 9, 2, 0,245, 9, 7, 0,246, 9, 7, 0,247, 9, + 2, 0,248, 9, 2, 0, 18, 0, 7, 0,249, 9, 7, 0,250, 9, 7, 0,251, 9, 7, 0,252, 9,106, 1, 7, 0,106, 1, 0, 0, +106, 1, 1, 0, 14, 0,253, 9, 4, 0, 18, 0, 4, 0,254, 9, 0, 0, 19, 0, 22, 1,255, 9,176, 0, 9, 0, 22, 0, 32, 0, + 14, 0, 0, 10, 14, 0,233, 9, 14, 0, 1, 10, 14, 0,102, 0, 4, 0, 18, 0, 4, 0, 2, 10, 4, 0, 3, 10, 4, 0, 27, 0, +243, 0, 8, 0, 22, 0, 4, 10, 14, 0,233, 9, 64, 0, 5, 10, 0, 0, 6, 10, 4, 0, 7, 10, 4, 0, 18, 0, 4, 0, 8, 10, + 4, 0, 27, 0,107, 1, 13, 0,239, 0, 0, 0,239, 0, 1, 0, 14, 0,146, 6, 4, 0,147, 6, 7, 0,148, 6, 2, 0,149, 6, +240, 0,200, 6,176, 0,179, 3,243, 0, 9, 10, 0, 0, 87, 1, 0, 0,203, 6, 2, 0, 18, 0, 7, 0, 10, 10,108, 1, 8, 0, +108, 1, 0, 0,108, 1, 1, 0,106, 1, 11, 10, 31, 0, 80, 0, 14, 0,185, 3, 4, 0, 18, 0, 0, 0, 19, 0, 4, 0,118, 8, +109, 1, 5, 0,109, 1, 0, 0,109, 1, 1, 0, 31, 0, 80, 0, 2, 0, 18, 0, 0, 0, 12, 10,110, 1, 14, 0,110, 1, 0, 0, +110, 1, 1, 0, 11, 0, 2, 0, 2, 0, 16, 0, 2, 0, 18, 0, 0, 0, 13, 10, 0, 0, 14, 10, 0, 0, 19, 0, 2, 0, 27, 0, + 7, 0, 15, 10, 7, 0, 16, 10, 31, 0, 80, 0, 7, 0, 17, 10, 7, 0, 18, 10,111, 1, 9, 0,111, 1, 0, 0,111, 1, 1, 0, + 27, 0, 19, 10, 0, 0, 11, 3, 7, 0, 20, 10, 2, 0, 21, 10, 2, 0, 18, 0, 2, 0, 16, 0, 2, 0, 22, 10,112, 1, 7, 0, + 37, 0, 6, 7, 21, 0,156, 9, 4, 0, 18, 0, 4, 0, 23, 10, 14, 0, 24, 10, 27, 0, 19, 10, 0, 0, 11, 3,113, 1, 15, 0, + 27, 0, 19, 10, 2, 0, 25, 10, 2, 0, 18, 0, 2, 0, 26, 10, 2, 0, 27, 10, 0, 0, 11, 3, 27, 0, 28, 10, 0, 0, 29, 10, + 7, 0, 30, 10, 7, 0, 39, 2, 7, 0, 31, 10, 7, 0, 32, 10, 2, 0, 16, 0, 2, 0, 87, 1, 7, 0, 94, 1,114, 1, 6, 0, + 27, 0, 19, 10, 7, 0,192, 9, 2, 0, 33, 10, 2, 0, 34, 10, 2, 0, 18, 0, 2, 0, 35, 10,115, 1, 6, 0, 27, 0, 19, 10, + 4, 0, 36, 10, 4, 0, 37, 10, 4, 0, 92, 0, 4, 0, 27, 0, 0, 0, 11, 3,116, 1, 4, 0, 27, 0, 19, 10, 4, 0, 18, 0, + 4, 0, 36, 10, 0, 0, 11, 3,117, 1, 4, 0, 27, 0, 19, 10, 4, 0, 18, 0, 4, 0, 36, 10, 0, 0, 11, 3,118, 1, 4, 0, + 27, 0, 19, 10, 4, 0, 18, 0, 4, 0, 36, 10, 0, 0, 11, 3,119, 1, 2, 0, 4, 0, 18, 0, 7, 0, 84, 4,120, 1, 2, 0, + 27, 0, 19, 10, 0, 0, 11, 3,121, 1, 10, 0, 27, 0, 19, 10, 4, 0, 38, 10, 7, 0,128, 0, 4, 0, 18, 0, 2, 0, 4, 7, + 2, 0, 39, 10, 2, 0, 91, 0, 2, 0, 30, 0, 7, 0, 40, 10, 0, 0, 11, 3,122, 1, 10, 0, 27, 0, 19, 10, 2, 0, 16, 0, + 2, 0,134, 4, 4, 0, 89, 0, 4, 0, 90, 0, 7, 0,116, 9, 7, 0,117, 9, 4, 0, 27, 0,176, 0, 86, 9, 0, 0, 11, 3, +123, 1, 4, 0, 27, 0, 19, 10, 4, 0,210, 3, 4, 0, 41, 10, 0, 0, 11, 3,124, 1, 4, 0, 27, 0, 19, 10, 4, 0,210, 3, + 4, 0, 27, 0, 0, 0, 11, 3,125, 1, 6, 0, 27, 0, 19, 10, 7, 0,128, 0, 7, 0, 82, 3, 4, 0, 42, 10, 2, 0,210, 3, + 2, 0,211, 3,126, 1, 6, 0, 27, 0, 19, 10, 4, 0, 43, 10, 4, 0, 44, 10, 7, 0, 45, 10, 7, 0, 46, 10, 0, 0, 11, 3, +127, 1, 16, 0, 27, 0, 19, 10, 27, 0,216, 9, 4, 0, 16, 0, 7, 0, 47, 10, 7, 0, 48, 10, 7, 0, 49, 10, 7, 0, 50, 10, + 7, 0, 51, 10, 7, 0, 52, 10, 7, 0, 53, 10, 7, 0, 54, 10, 7, 0, 55, 10, 2, 0, 18, 0, 2, 0, 27, 0, 2, 0, 91, 0, + 2, 0, 30, 0,128, 1, 3, 0, 27, 0, 19, 10, 4, 0, 18, 0, 4, 0, 31, 2,129, 1, 5, 0, 27, 0, 19, 10, 4, 0, 18, 0, + 4, 0, 27, 0, 7, 0, 56, 10, 0, 0, 11, 3,130, 1, 10, 0, 27, 0, 19, 10, 0, 0, 11, 3, 2, 0, 57, 10, 2, 0, 58, 10, + 0, 0, 59, 10, 0, 0, 60, 10, 7, 0, 61, 10, 7, 0, 62, 10, 7, 0, 63, 10, 7, 0, 64, 10,131, 1, 5, 0, 27, 0, 19, 10, + 0, 0, 11, 3, 7, 0,220, 2, 2, 0, 65, 10, 2, 0, 18, 0,132, 1, 8, 0, 7, 0, 8, 0, 7, 0, 9, 0, 7, 0, 10, 0, + 7, 0, 11, 0, 7, 0, 66, 10, 7, 0, 67, 10, 2, 0, 18, 0, 2, 0, 31, 2,133, 1, 8, 0, 7, 0, 8, 0, 7, 0, 9, 0, + 7, 0, 10, 0, 7, 0, 11, 0, 7, 0, 66, 10, 7, 0, 67, 10, 2, 0, 18, 0, 2, 0, 31, 2,134, 1, 8, 0, 7, 0, 8, 0, + 7, 0, 9, 0, 7, 0, 10, 0, 7, 0, 11, 0, 7, 0, 66, 10, 7, 0, 67, 10, 2, 0, 18, 0, 2, 0, 31, 2,135, 1, 7, 0, + 27, 0, 19, 10, 0, 0, 11, 3, 7, 0, 94, 1, 7, 0,103, 1, 2, 0, 18, 0, 2, 0, 87, 1, 4, 0, 27, 0,136, 1, 5, 0, + 27, 0, 70, 3, 7, 0, 94, 1, 2, 0, 74, 3, 0, 0, 76, 3, 0, 0, 68, 10,137, 1, 7, 0,229, 0,106, 6, 0, 0, 69, 10, + 4, 0, 18, 0, 4, 0, 27, 0, 0, 0, 70, 10, 27, 0,208, 5, 27, 0, 71, 10,138, 1, 3, 0,229, 0,106, 6, 4, 0, 18, 0, + 4, 0, 27, 0,139, 1, 6, 0,229, 0,106, 6, 4, 0, 18, 0, 4, 0, 27, 0, 0, 0, 70, 10, 7, 0, 56, 10, 27, 0,208, 5, +140, 1, 10, 0,140, 1, 0, 0,140, 1, 1, 0, 2, 0, 16, 0, 2, 0, 18, 0, 0, 0, 72, 10, 7, 0, 31, 1, 7, 0, 32, 1, + 2, 0,253, 9, 2, 0, 73, 10, 27, 0, 44, 0,141, 1, 22, 0,141, 1, 0, 0,141, 1, 1, 0, 2, 0, 18, 0, 2, 0, 87, 1, + 2, 0, 74, 10, 2, 0, 75, 10, 31, 0, 80, 0,176, 0, 86, 9, 27, 0,168, 0, 7, 0, 89, 0, 7, 0, 90, 0, 7, 0, 76, 10, + 7, 0, 77, 10, 7, 0, 78, 10, 7, 0, 79, 10, 7, 0,253, 2, 7, 0,148, 3, 7, 0, 88, 9, 7, 0, 80, 10, 0, 0, 81, 10, + 0, 0, 82, 10, 14, 0,188, 3,142, 1, 11, 0, 7, 0, 46, 2, 7, 0,116, 9, 7, 0,117, 9, 11, 0, 2, 0, 2, 0, 83, 10, + 2, 0, 84, 10, 2, 0, 85, 10, 2, 0, 86, 10, 2, 0, 87, 10, 2, 0, 88, 10, 2, 0,181, 2,143, 1, 21, 0,143, 1, 0, 0, +143, 1, 1, 0,143, 1, 89, 10, 0, 0, 19, 0, 11, 0, 90, 10, 2, 0, 16, 0, 2, 0, 18, 0, 2, 0, 91, 10, 2, 0, 92, 10, + 7, 0, 93, 10, 7, 0, 94, 10, 11, 0, 95, 10, 2, 0, 96, 10, 2, 0, 97, 10, 4, 0, 74, 0, 11, 0,150, 9, 4, 0, 98, 10, + 4, 0, 99, 10,143, 1,100, 10,144, 1,101, 10,142, 1,102, 10,145, 1, 4, 0, 0, 0,103, 10, 2, 0,104, 10, 2, 0,105, 10, + 4, 0, 27, 0,146, 1, 37, 0,146, 1, 0, 0,146, 1, 1, 0,146, 1,106, 10, 0, 0, 19, 0, 2, 0, 16, 0, 2, 0, 18, 0, + 2, 0,197, 8, 2, 0,176, 2, 2, 0,107, 10, 2, 0, 9, 7, 2, 0, 96, 10, 2, 0, 40, 9, 14, 0, 81, 9, 14, 0,108, 10, +146, 1, 38, 0, 22, 0, 42, 7, 11, 0, 90, 10, 7, 0, 93, 10, 7, 0, 94, 10, 7, 0, 81, 2, 7, 0, 1, 3, 7, 0,109, 10, + 4, 0,110, 10, 0, 0,111, 10, 2, 0,112, 10, 2, 0,113, 10, 7, 0,114, 10, 7, 0,115, 10, 2, 0,116, 10, 2, 0,117, 10, + 11, 0,118, 10, 19, 0,119, 10, 19, 0,120, 10, 19, 0,121, 10,145, 1,154, 0,147, 1,122, 10,148, 1,123, 10,144, 1, 8, 0, +144, 1, 0, 0,144, 1, 1, 0,146, 1,124, 10,146, 1,125, 10,143, 1,126, 10,143, 1,127, 10, 4, 0, 18, 0, 4, 0, 27, 0, + 57, 0, 20, 0, 22, 0, 32, 0, 34, 0, 75, 0,178, 0,182, 3, 14, 0,128, 10, 14, 0,129, 10, 4, 0, 16, 0, 4, 0,130, 10, + 4, 0,131, 10, 4, 0, 18, 0, 4, 0,110, 10, 4, 0,132, 10, 14, 0, 81, 9, 14, 0,108, 10,149, 1,133, 10, 11, 0,134, 10, + 11, 0,135, 10, 4, 0,136, 10, 11, 0,137, 10, 11, 0,138, 10, 11, 0,139, 10,150, 1, 4, 0, 4, 0, 17, 0, 4, 0,230, 2, + 4, 0,116, 9, 4, 0,117, 9,151, 1, 4, 0, 4, 0, 17, 0, 7, 0,230, 2, 7, 0,116, 9, 7, 0,117, 9,152, 1, 2, 0, + 0, 0,230, 2, 0, 0, 86, 1,153, 1, 4, 0, 4, 0, 17, 0, 7, 0,140, 10, 7, 0,116, 9, 7, 0,117, 9,154, 1, 1, 0, + 7, 0,141, 10,155, 1, 6, 0, 4, 0,127, 0, 4, 0,129, 0, 4, 0, 40, 9, 0, 0,142, 10, 0, 0,143, 10, 2, 0, 27, 0, +156, 1, 16, 0, 2, 0,141, 8, 2, 0,142, 8, 2, 0,144, 10, 2, 0,145, 10, 2, 0,146, 10, 2, 0, 67, 0, 2, 0, 43, 7, + 2, 0,147, 10, 7, 0,252, 2, 7, 0,148, 10, 7, 0,149, 10, 2, 0,109, 1, 0, 0,150, 10, 0, 0,151, 10, 4, 0,152, 10, + 4, 0,153, 10,157, 1, 9, 0, 7, 0,154, 10, 7, 0,155, 10, 7, 0,149, 9, 7, 0, 94, 3, 7, 0,156, 10, 7, 0,218, 6, + 2, 0, 92, 3, 0, 0,157, 10, 0, 0, 27, 0,158, 1, 4, 0, 7, 0,158, 10, 7, 0,159, 10, 2, 0, 92, 3, 2, 0, 27, 0, +159, 1, 3, 0, 7, 0,160, 10, 7, 0,212, 8, 7, 0, 14, 0,160, 1, 4, 0, 0, 0, 35, 0,204, 0, 80, 5, 4, 0,129, 0, + 4, 0,132, 4,161, 1, 6, 0, 0, 0,161, 10,204, 0,162, 10, 4, 0,129, 0, 4, 0,132, 4, 4, 0,163, 10, 4, 0, 27, 0, +162, 1, 4, 0, 2, 0,164, 10, 2, 0,165, 10, 4, 0, 30, 0,204, 0,162, 10,163, 1, 9, 0, 7, 0,166, 10, 7, 0,167, 10, + 7, 0,168, 10, 7, 0, 92, 2, 7, 0,169, 10, 7, 0,170, 10, 7, 0,171, 10, 2, 0,172, 10, 2, 0,173, 10,164, 1, 8, 0, + 2, 0,174, 10, 2, 0,175, 10, 2, 0,176, 10, 2, 0,177, 10, 7, 0,178, 10, 7, 0,179, 10, 7, 0,180, 10, 7, 0,181, 10, +165, 1, 2, 0, 7, 0, 5, 0, 7, 0, 6, 0,166, 1, 2, 0, 0, 0,170, 0, 0, 0,182, 10,167, 1, 1, 0, 0, 0, 19, 0, +168, 1, 12, 0, 0, 0,183, 10, 0, 0,184, 10, 0, 0,209, 6, 0, 0,185, 10, 2, 0,144, 10, 2, 0,186, 10, 7, 0,187, 10, + 7, 0,188, 10, 7, 0,189, 10, 7, 0,148, 3, 7, 0,190, 10, 7, 0,191, 10,169, 1, 2, 0, 11, 0,192, 10, 11, 0,193, 10, +170, 1, 13, 0, 0, 0, 72, 5, 0, 0, 16, 0, 0, 0, 92, 3, 0, 0, 94, 3, 0, 0,184, 10, 0, 0,108, 0, 0, 0,181, 2, + 7, 0,194, 10, 7, 0,195, 10, 7, 0,147, 3, 7, 0,196, 10, 7, 0,197, 10, 7, 0,191, 10,171, 1, 8, 0, 7, 0, 47, 9, + 7, 0,128, 0, 7, 0,151, 10, 7, 0,172, 2, 7, 0,198, 10, 7, 0,240, 0, 7, 0,199, 10, 4, 0, 16, 0,172, 1, 4, 0, + 2, 0,200, 10, 2, 0,201, 10, 2, 0,202, 10, 2, 0, 27, 0,173, 1, 8, 0, 7, 0,203, 10, 7, 0,220, 2, 7, 0,204, 10, + 7, 0,190, 8, 7, 0,191, 8, 7, 0,192, 8, 7, 0,205, 10, 7, 0,206, 10,174, 1, 6, 0, 2, 0,207, 10, 2, 0,208, 10, + 7, 0,209, 10, 7, 0,210, 10, 7, 0,211, 10, 7, 0,212, 10,175, 1, 2, 0, 58, 0,213, 10, 59, 0,214, 10,176, 1, 3, 0, +175, 1, 79, 6, 7, 0,215, 10, 7, 0,216, 10,177, 1, 3, 0,175, 1, 79, 6, 4, 0,217, 10, 4, 0, 27, 0,178, 1, 1, 0, +175, 1, 79, 6,179, 1, 3, 0,175, 1, 79, 6, 4, 0,217, 10, 4, 0,218, 10,180, 1, 3, 0,175, 1, 79, 6, 4, 0,219, 10, + 4, 0, 27, 0,181, 1, 1, 0,175, 1, 79, 6,182, 1, 3, 0,175, 1, 79, 6, 4, 0,220, 10, 4, 0, 27, 0,183, 1, 3, 0, +175, 1, 79, 6, 4, 0,221, 10, 4, 0, 27, 0,184, 1, 3, 0,175, 1, 79, 6, 4, 0,222, 10, 4, 0, 27, 0,185, 1, 3, 0, +175, 1, 79, 6, 4, 0,250, 0, 4, 0, 27, 0,186, 1, 1, 0, 0, 0, 19, 0,187, 1, 1, 0, 0, 0, 19, 0,188, 1, 4, 0, + 7, 0, 5, 0, 7, 0, 6, 0, 2, 0, 18, 0, 2, 0,223, 10,189, 1, 10, 0, 2, 0, 62, 4, 2, 0, 18, 0, 7, 0,217, 4, + 7, 0,224, 10, 7, 0,225, 10, 7, 0,226, 10, 7, 0,227, 10,188, 1,228, 10,188, 1,229, 10,188, 1,230, 10, 54, 0, 11, 0, + 4, 0, 18, 0, 4, 0, 63, 0, 4, 0,231, 10, 4, 0,232, 10, 19, 0,233, 10, 19, 0,234, 10,189, 1,235, 10, 7, 0,236, 10, + 7, 0,237, 10, 7, 0,238, 10, 7, 0,239, 10, 0, 1, 10, 0, 4, 0,253, 9, 4, 0,240, 10, 7, 0,241, 10, 7, 0,242, 10, + 7, 0,243, 10, 7, 0,244, 10, 7, 0, 9, 0, 7, 0, 11, 0, 4, 0, 87, 1, 4, 0, 1, 3,255, 0, 18, 0, 4, 0,132, 0, + 4, 0,245, 10, 4, 0,246, 10, 7, 0,247, 10, 4, 0,248, 10, 7, 0,249, 10, 7, 0,250, 10, 4, 0,251, 10, 7, 0,252, 10, + 4, 0,253, 10, 7, 0,254, 10, 0, 1,255, 10, 7, 0, 0, 11, 7, 0, 1, 11, 7, 0, 2, 11, 7, 0, 3, 11, 4, 0, 4, 11, + 4, 0, 27, 0,190, 1, 4, 0, 42, 0,244, 2, 7, 0, 5, 11, 7, 0,178, 1, 7, 0, 27, 0,213, 0, 34, 0, 22, 0, 32, 0, +190, 1, 6, 11, 54, 0,228, 10, 46, 0, 7, 11, 52, 0, 8, 11, 25, 0,154, 0, 0, 0, 9, 11, 7, 0, 10, 11, 2, 0,109, 6, + 2, 0, 11, 11, 4, 0,108, 0, 4, 0, 18, 0, 7, 0, 12, 11, 4, 0, 89, 2, 4, 0, 13, 11, 7, 0, 14, 11, 7, 0, 15, 11, + 7, 0, 16, 11, 7, 0,178, 1, 4, 0, 17, 11, 7, 0, 18, 11, 0, 0, 19, 11, 0, 0, 20, 11, 0, 0, 21, 11, 0, 0, 22, 11, + 7, 0, 23, 11, 7, 0, 24, 11, 7, 0, 25, 11, 7, 0, 1, 3, 7, 0, 26, 11, 4, 0, 27, 11, 7, 0,240, 5, 7, 0, 28, 11, + 7, 0, 29, 11,191, 1, 10, 0, 4, 0, 16, 0, 4, 0,128, 0, 4, 0, 18, 0, 4, 0, 15, 4, 4, 0, 30, 11, 4, 0, 31, 11, + 4, 0, 32, 11, 4, 0, 73, 0, 0, 0, 19, 0, 11, 0, 2, 0,192, 1, 1, 0, 0, 0, 70, 7, 95, 0, 8, 0,191, 1, 33, 11, + 4, 0, 34, 11, 4, 0, 35, 11, 4, 0, 36, 11, 4, 0, 37, 11, 4, 0, 30, 0, 11, 0, 38, 11,192, 1, 39, 11,193, 1, 5, 0, + 7, 0,165, 2, 7, 0,240, 2, 7, 0, 39, 2, 2, 0,147, 2, 2, 0, 27, 0,194, 1, 5, 0, 7, 0,165, 2, 7, 0,159, 4, + 7, 0, 40, 11, 7, 0, 41, 11, 7, 0,240, 2,195, 1, 5, 0, 27, 0, 42, 11,196, 1, 21, 0, 7, 0, 75, 6, 7, 0, 43, 11, + 7, 0, 56, 0,197, 1, 3, 0, 7, 0, 44, 11, 4, 0, 45, 11, 4, 0, 46, 11,198, 1, 7, 0, 4, 0, 47, 11, 4, 0, 48, 11, + 4, 0, 49, 11, 7, 0, 50, 11, 7, 0, 51, 11, 7, 0, 52, 11, 7, 0, 56, 0,199, 1, 8, 0,199, 1, 0, 0,199, 1, 1, 0, + 27, 0, 44, 0, 4, 0, 3, 1, 2, 0, 18, 0, 2, 0, 87, 1, 7, 0,240, 2, 7, 0, 55, 9,200, 1, 7, 0,200, 1, 0, 0, +200, 1, 1, 0, 27, 0, 44, 0, 2, 0,225, 2, 2, 0, 18, 0, 2, 0, 13, 2, 2, 0, 56, 0,201, 1, 17, 0,194, 1, 8, 4, +194, 1, 53, 11,193, 1, 54, 11,194, 1, 38, 9,195, 1, 55, 11, 4, 0, 82, 0, 7, 0,240, 2, 7, 0, 7, 3, 7, 0, 56, 11, + 4, 0, 47, 11, 4, 0, 57, 11, 7, 0, 51, 11, 7, 0, 52, 11, 7, 0,108, 0, 4, 0, 58, 11, 2, 0, 18, 0, 2, 0, 59, 11, +202, 1, 15, 0, 7, 0,255, 0, 7, 0, 60, 11, 7, 0, 44, 11, 7, 0, 61, 11, 7, 0, 62, 11, 7, 0, 63, 11, 7, 0, 64, 11, + 7, 0, 65, 11, 7, 0, 66, 11, 7, 0, 67, 11, 7, 0, 68, 11, 7, 0, 69, 11, 7, 0, 70, 11, 4, 0, 18, 0, 4, 0, 71, 11, +203, 1,128, 0, 22, 0, 32, 0, 34, 0, 75, 0,204, 1, 72, 11,202, 1, 73, 11,187, 0,154, 4, 4, 0, 18, 0, 4, 0, 56, 0, + 2, 0, 16, 0, 2, 0, 57, 10, 2, 0, 74, 11, 2, 0,122, 1, 2, 0, 75, 11, 2, 0,232, 3, 2, 0, 76, 11, 2, 0, 77, 11, + 2, 0, 78, 11, 2, 0, 79, 11, 2, 0, 80, 11, 2, 0, 81, 11, 2, 0, 82, 11, 2, 0, 83, 11, 2, 0, 84, 11, 2, 0,224, 5, + 2, 0, 85, 11, 2, 0, 86, 11, 2, 0, 87, 11, 2, 0, 88, 11, 2, 0, 89, 11, 2, 0, 28, 2, 2, 0, 31, 9, 2, 0, 6, 9, + 2, 0, 90, 11, 2, 0, 91, 11, 2, 0, 25, 4, 2, 0, 26, 4, 2, 0, 92, 11, 2, 0, 93, 11, 2, 0, 94, 11, 2, 0, 95, 11, + 7, 0, 96, 11, 7, 0, 97, 11, 7, 0, 98, 11, 7, 0, 99, 11, 7, 0,100, 11, 7, 0,101, 11, 7, 0,102, 11, 2, 0,154, 5, + 2, 0,103, 11, 7, 0,104, 11, 7, 0,105, 11, 7, 0,106, 11, 7, 0, 13, 9, 7, 0, 90, 0, 7, 0, 7, 3, 7, 0, 19, 9, + 7, 0,107, 11, 7, 0,108, 11, 7, 0,109, 11, 7, 0,110, 11, 7, 0,111, 11, 7, 0,112, 11, 4, 0, 14, 9, 4, 0, 12, 9, + 4, 0,113, 11, 4, 0,114, 11, 2, 0,115, 11, 2, 0,116, 11, 7, 0, 15, 9, 7, 0, 16, 9, 7, 0, 17, 9, 7, 0,117, 11, + 7, 0,118, 11, 7, 0,119, 11, 7, 0,120, 11, 7, 0,121, 11, 7, 0,122, 11, 7, 0,123, 11, 7, 0,124, 11, 7, 0,125, 11, + 7, 0,222, 3, 7, 0,108, 0, 7, 0,126, 11, 7, 0,127, 11, 7, 0,128, 11, 7, 0,129, 11, 7, 0,214, 0, 7, 0,130, 11, + 4, 0,131, 11, 4, 0,132, 11, 7, 0,133, 11, 7, 0,134, 11, 7, 0,135, 11, 7, 0,136, 11, 7, 0,137, 11, 7, 0,213, 0, + 7, 0,138, 11, 7, 0, 52, 4, 7, 0, 50, 4, 7, 0, 51, 4, 7, 0,139, 11, 7, 0,140, 11, 7, 0,141, 11, 7, 0,142, 11, + 7, 0,143, 11, 7, 0,144, 11, 7, 0,145, 11, 7, 0,146, 11, 7, 0,147, 11, 7, 0,148, 11, 7, 0,149, 11, 7, 0,150, 11, + 7, 0,151, 11, 7, 0,152, 11, 7, 0,153, 11, 7, 0,154, 11, 7, 0,155, 11, 7, 0,156, 11, 4, 0,157, 11, 4, 0,158, 11, + 46, 0,140, 1, 64, 0, 0, 4, 14, 0,159, 11, 64, 0,160, 11, 27, 0,161, 11, 27, 0,162, 11, 31, 0, 80, 0,182, 0, 73, 1, +182, 0,163, 11,150, 0, 52, 0,150, 0, 0, 0,150, 0, 1, 0,203, 1,164, 11,201, 1,165, 11,198, 1,216, 9,190, 0, 80, 4, + 11, 0, 81, 4,205, 1,166, 11,205, 1,167, 11, 14, 0,168, 11, 14, 0,169, 11,135, 0,170, 11,143, 0,171, 11,143, 0,172, 11, + 27, 0,173, 11, 27, 0,174, 11, 27, 0, 38, 0, 14, 0, 24, 10, 0, 0, 19, 0, 7, 0,244, 0, 7, 0, 36, 3, 7, 0,175, 11, + 7, 0,176, 11, 4, 0,214, 2, 4, 0,177, 11, 4, 0, 18, 0, 4, 0, 14, 9, 4, 0,178, 11, 4, 0,179, 11, 4, 0,180, 11, + 4, 0,181, 11, 2, 0,251, 0, 2, 0,182, 11, 2, 0,183, 11, 2, 0,184, 11, 0, 0,185, 11, 2, 0,186, 11, 2, 0,187, 11, + 2, 0,188, 11, 11, 0,189, 11,139, 0,153, 4, 14, 0, 21, 3, 14, 0,190, 11,197, 1,191, 11, 4, 0,192, 11, 4, 0,193, 11, +206, 1,194, 11,141, 0, 33, 3,207, 1,195, 11, 7, 0,196, 11, 7, 0,197, 11, 7, 0,198, 11,137, 0, 38, 0,208, 1,150, 9, + 7, 0,123, 4, 7, 0,199, 11, 7, 0,200, 11, 7, 0, 75, 6, 7, 0,236, 3, 7, 0,222, 3, 7, 0,201, 11, 7, 0, 91, 2, + 7, 0,202, 11, 7, 0,203, 11, 7, 0,204, 11, 7, 0,205, 11, 7, 0,206, 11, 7, 0,207, 11, 7, 0,124, 4, 7, 0,208, 11, + 7, 0,209, 11, 7, 0,210, 11, 7, 0,125, 4, 7, 0,121, 4, 7, 0,122, 4, 7, 0,211, 11, 7, 0,212, 11, 7, 0,213, 11, + 4, 0,214, 11, 4, 0, 92, 0, 4, 0,215, 11, 4, 0,216, 11, 2, 0,217, 11, 2, 0,218, 11, 2, 0,219, 11, 2, 0,220, 11, + 2, 0,221, 11, 2, 0,222, 11, 2, 0,223, 11, 2, 0, 27, 0,187, 0,154, 4,138, 0, 11, 0,208, 1,224, 11, 7, 0,225, 11, + 7, 0,226, 11, 7, 0,250, 1, 7, 0,227, 11, 7, 0,228, 11, 7, 0,229, 11, 4, 0, 92, 0, 2, 0,230, 11, 2, 0,231, 11, + 64, 0,249, 1,209, 1, 4, 0, 7, 0, 5, 0, 7, 0, 6, 0, 7, 0, 7, 0, 7, 0,232, 11,210, 1, 6, 0,210, 1, 0, 0, +210, 1, 1, 0,209, 1,192, 9, 4, 0, 1, 1, 2, 0,233, 11, 2, 0, 18, 0,211, 1, 5, 0,211, 1, 0, 0,211, 1, 1, 0, + 14, 0,234, 11, 4, 0,235, 11, 4, 0, 18, 0,212, 1, 9, 0,212, 1, 0, 0,212, 1, 1, 0, 14, 0,127, 0,211, 1,236, 11, + 4, 0, 18, 0, 2, 0,233, 11, 2, 0,237, 11, 7, 0, 93, 0, 0, 0,238, 11,178, 0, 6, 0, 22, 0, 32, 0, 14, 0,123, 5, + 4, 0, 18, 0, 2, 0,239, 11, 2, 0,240, 11, 11, 0,241, 11,213, 1, 6, 0, 14, 0,242, 11, 4, 0,243, 11, 4, 0,244, 11, + 4, 0, 18, 0, 4, 0, 27, 0,237, 0,245, 11,214, 1, 19, 0, 22, 0, 32, 0,215, 1,246, 11,215, 1,247, 11, 14, 0,248, 11, + 4, 0,249, 11, 2, 0,250, 11, 2, 0,251, 11, 14, 0,252, 11, 14, 0,253, 11,213, 1,254, 11, 14, 0,255, 11, 14, 0, 0, 12, + 14, 0, 1, 12, 14, 0, 2, 12,216, 1, 3, 12,216, 1, 4, 12,216, 1, 5, 12, 14, 0, 6, 12,237, 0, 7, 12,215, 1, 32, 0, +215, 1, 0, 0,215, 1, 1, 0, 11, 0, 8, 12, 4, 0,119, 8, 2, 0, 9, 12, 2, 0, 27, 0, 27, 1, 10, 12, 27, 1, 11, 12, + 0, 0, 12, 12, 2, 0, 13, 12, 2, 0, 14, 12, 2, 0,141, 8, 2, 0,142, 8, 2, 0, 15, 12, 2, 0, 16, 12, 2, 0, 15, 4, + 2, 0, 53, 7, 2, 0, 17, 12, 2, 0, 18, 12, 2, 0, 19, 12, 2, 0, 30, 0,217, 1, 20, 12,218, 1, 21, 12,219, 1, 22, 12, + 4, 0, 23, 12, 4, 0, 24, 12, 11, 0, 25, 12, 14, 0,253, 11, 14, 0,160, 8, 14, 0, 26, 12, 14, 0, 27, 12, 14, 0, 28, 12, +220, 1, 17, 0,220, 1, 0, 0,220, 1, 1, 0, 0, 0, 29, 12, 21, 0, 31, 0, 2, 0, 30, 12, 2, 0, 16, 0, 2, 0, 14, 0, + 2, 0, 31, 12, 2, 0, 32, 12, 2, 0, 33, 12, 2, 0, 34, 12, 2, 0, 35, 12, 2, 0, 18, 0, 2, 0, 36, 12, 2, 0, 32, 0, + 2, 0, 27, 0,221, 1, 37, 12,222, 1, 4, 0,222, 1, 0, 0,222, 1, 1, 0,220, 1, 38, 12,220, 1, 39, 12,223, 1, 11, 0, +223, 1, 0, 0,223, 1, 1, 0, 14, 0, 40, 12, 14, 0, 41, 12, 0, 0, 29, 12, 2, 0, 42, 12, 2, 0, 43, 12, 2, 0, 18, 0, + 2, 0, 44, 12, 4, 0, 45, 12, 11, 0, 46, 12,216, 1, 7, 0,216, 1, 0, 0,216, 1, 1, 0, 0, 0, 29, 12, 0, 0, 47, 12, + 14, 0, 59, 8, 4, 0, 48, 12, 4, 0, 18, 0,249, 0, 14, 0,249, 0, 0, 0,249, 0, 1, 0, 0, 0, 29, 12, 21, 0, 31, 0, +224, 1,135, 8, 11, 0, 49, 12, 11, 0, 50, 12,221, 1, 37, 12,213, 1, 51, 12, 14, 0, 52, 12,249, 0, 53, 12, 32, 1,239, 6, + 2, 0, 18, 0, 2, 0, 86, 1,225, 1, 12, 0,225, 1, 0, 0,225, 1, 1, 0, 11, 0, 2, 0, 11, 0, 54, 12, 0, 0, 19, 0, + 2, 0, 16, 0, 2, 0, 18, 0, 7, 0,138, 9, 7, 0,129, 0, 7, 0,132, 4, 7, 0, 88, 9, 7, 0, 80, 10,226, 1, 5, 0, + 7, 0, 55, 12, 4, 0, 56, 12, 4, 0, 57, 12, 4, 0, 87, 1, 4, 0, 18, 0,227, 1, 6, 0, 7, 0, 58, 12, 7, 0, 59, 12, + 7, 0, 60, 12, 7, 0, 61, 12, 4, 0, 16, 0, 4, 0, 18, 0,228, 1, 5, 0, 7, 0,116, 9, 7, 0,117, 9, 7, 0,240, 2, + 2, 0, 42, 2, 2, 0, 43, 2,229, 1, 5, 0,228, 1, 2, 0, 4, 0, 53, 0, 7, 0, 62, 12, 7, 0,116, 9, 7, 0,117, 9, +230, 1, 4, 0, 2, 0, 63, 12, 2, 0, 64, 12, 2, 0, 65, 12, 2, 0, 66, 12,231, 1, 2, 0, 37, 0, 37, 7, 21, 0,156, 9, +232, 1, 3, 0, 19, 0, 67, 12, 4, 0, 18, 0, 4, 0, 27, 0,233, 1, 6, 0, 7, 0,108, 0, 7, 0,209, 2, 7, 0, 68, 12, + 7, 0, 27, 0, 2, 0,250, 0, 2, 0, 69, 12,234, 1, 5, 0, 7, 0, 70, 12, 7, 0,128, 0, 7, 0,193, 9, 7, 0,194, 9, + 4, 0, 18, 0,235, 1, 6, 0, 22, 0, 42, 7, 0, 0, 71, 12, 0, 0, 72, 12, 2, 0, 73, 12, 2, 0, 18, 0, 4, 0, 74, 12, +236, 1, 7, 0,236, 1, 0, 0,236, 1, 1, 0, 0, 0, 19, 0,235, 1, 75, 12, 2, 0, 76, 12, 2, 0, 16, 0, 7, 0, 60, 0, +237, 1, 7, 0, 14, 0, 77, 12, 0, 0, 78, 12, 11, 0, 79, 12, 7, 0, 60, 0, 7, 0,138, 9, 4, 0, 16, 0, 4, 0, 18, 0, +238, 1, 3, 0, 7, 0, 80, 12, 4, 0, 18, 0, 4, 0, 27, 0,239, 1, 15, 0,239, 1, 0, 0,239, 1, 1, 0,106, 1, 11, 10, +237, 1, 61, 0, 14, 0,188, 3, 30, 0, 49, 0,238, 1, 81, 12, 4, 0, 53, 0, 7, 0, 60, 0, 2, 0, 18, 0, 2, 0, 22, 1, + 4, 0, 82, 12, 0, 0, 71, 12, 4, 0, 83, 12, 7, 0, 84, 12,240, 1, 2, 0, 0, 0, 85, 12, 0, 0, 86, 12,241, 1, 4, 0, +241, 1, 0, 0,241, 1, 1, 0,176, 0, 70, 3, 14, 0, 87, 12,242, 1, 25, 0,242, 1, 0, 0,242, 1, 1, 0, 14, 0, 88, 12, +176, 0, 86, 9,241, 1, 89, 12, 14, 0, 90, 12, 14, 0,188, 3, 0, 0, 19, 0, 7, 0,138, 9, 7, 0, 91, 12, 7, 0, 89, 0, + 7, 0, 90, 0, 7, 0, 76, 10, 7, 0, 77, 10, 7, 0,253, 2, 7, 0,148, 3, 7, 0, 88, 9, 7, 0, 80, 10, 2, 0, 92, 12, + 2, 0, 93, 12, 2, 0, 91, 0, 2, 0, 16, 0, 11, 0, 94, 12, 4, 0, 18, 0, 4, 0, 30, 0,243, 1, 6, 0,243, 1, 0, 0, +243, 1, 1, 0, 14, 0, 88, 12, 4, 0, 18, 0, 4, 0, 13, 2, 0, 0, 19, 0,244, 1, 11, 0,244, 1, 0, 0,244, 1, 1, 0, + 22, 0, 42, 7, 0, 0, 95, 12, 4, 0, 74, 12, 2, 0, 96, 12, 2, 0, 27, 0, 0, 0, 71, 12, 4, 0, 82, 12, 2, 0, 18, 0, + 2, 0, 97, 12,245, 1, 10, 0,245, 1, 0, 0,245, 1, 1, 0, 14, 0, 98, 12, 0, 0, 29, 12, 0, 0, 19, 0, 0, 0, 99, 12, + 0, 0,100, 12, 2, 0, 18, 0, 2, 0, 97, 12, 4, 0,101, 12,246, 1, 5, 0,246, 1, 0, 0,246, 1, 1, 0, 0, 0, 71, 12, + 4, 0, 82, 12, 7, 0,230, 2, 34, 0, 12, 0,176, 0,179, 3,176, 0,102, 12,241, 1, 89, 12, 14, 0,103, 12,242, 1,104, 12, + 14, 0,105, 12, 14, 0,106, 12, 4, 0, 18, 0, 4, 0,251, 0, 2, 0,107, 12, 2, 0,108, 12, 7, 0,109, 12,247, 1, 2, 0, + 22, 0, 32, 0, 34, 0, 75, 0,248, 1, 5, 0,248, 1, 0, 0,248, 1, 1, 0, 4, 0, 16, 0, 4, 0, 18, 0, 0, 0,172, 5, +249, 1, 6, 0,248, 1,110, 12, 27, 0, 44, 0, 4, 0,111, 12, 7, 0,112, 12, 4, 0,113, 12, 4, 0,253, 9,250, 1, 3, 0, +248, 1,110, 12, 4, 0,111, 12, 7, 0,114, 12,251, 1, 8, 0,248, 1,110, 12, 27, 0, 44, 0, 7, 0, 77, 1, 7, 0,115, 12, + 7, 0, 36, 3, 7, 0,149, 9, 4, 0,111, 12, 4, 0,116, 12,252, 1, 5, 0,248, 1,110, 12, 7, 0,117, 12, 7, 0,176, 2, + 7, 0, 3, 3, 7, 0, 56, 0,253, 1, 3, 0,248, 1,110, 12, 7, 0,149, 9, 7, 0,118, 12,196, 1, 4, 0, 7, 0,119, 12, + 7, 0,127, 11, 2, 0,120, 12, 2, 0, 87, 1,254, 1, 14, 0,254, 1, 0, 0,254, 1, 1, 0, 14, 0,121, 12, 14, 0,122, 12, + 14, 0,123, 12, 0, 0,172, 5, 4, 0, 32, 0, 4, 0, 18, 0, 4, 0,124, 12, 7, 0,125, 12, 4, 0,113, 12, 4, 0,253, 9, + 7, 0, 84, 4, 7, 0, 5, 3,204, 1, 23, 0, 4, 0,111, 12, 4, 0,126, 12, 7, 0,127, 12, 7, 0, 1, 3, 7, 0,128, 12, + 7, 0,229, 8, 7, 0,119, 12, 7, 0,129, 12, 7, 0,209, 2, 7, 0,247, 10, 7, 0,217, 4, 7, 0,130, 12, 7, 0,131, 12, + 7, 0,132, 12, 7, 0,133, 12, 7, 0,134, 12, 7, 0,135, 12, 7, 0,136, 12, 7, 0,137, 12, 7, 0,138, 12, 7, 0,139, 12, + 7, 0,140, 12, 14, 0,141, 12,123, 0, 40, 0,122, 0,142, 12,255, 1, 73, 11, 64, 0,143, 12, 64, 0,160, 11, 64, 0,144, 12, + 0, 2,145, 12, 43, 0,169, 0, 43, 0,146, 12, 43, 0,147, 12, 7, 0,148, 12, 7, 0,149, 12, 7, 0,150, 12, 7, 0,151, 12, + 7, 0,152, 12, 7, 0,118, 8, 7, 0,153, 12, 7, 0,178, 1, 7, 0,154, 12, 4, 0,155, 12, 4, 0,156, 12, 4, 0,157, 12, + 4, 0, 92, 0, 4, 0, 27, 0, 4, 0,158, 12, 2, 0,159, 12, 2, 0,160, 12, 4, 0,161, 12, 7, 0,209, 2, 4, 0,162, 12, + 7, 0,163, 12, 4, 0,164, 12, 4, 0,165, 12, 4, 0,166, 12,139, 0,167, 12, 14, 0,168, 12,187, 0,154, 4, 4, 0,169, 12, + 7, 0,170, 12, 7, 0,171, 12, 4, 0, 30, 0,124, 0, 12, 0,122, 0,142, 12,150, 0, 56, 3, 7, 0,143, 1, 7, 0,118, 8, + 7, 0,172, 12, 7, 0,173, 12, 7, 0,174, 12, 2, 0,175, 12, 2, 0,176, 12, 2, 0,177, 12, 2, 0, 16, 0, 4, 0, 92, 0, +125, 0, 13, 0,122, 0,142, 12,141, 0, 33, 3,143, 0, 35, 3, 7, 0,192, 9, 7, 0,178, 12, 7, 0,179, 12, 7, 0, 79, 1, + 7, 0,180, 12, 4, 0, 33, 10, 4, 0, 29, 3, 2, 0, 16, 0, 2, 0, 27, 0, 4, 0, 30, 0, 1, 2, 15, 0, 22, 0, 32, 0, + 34, 0, 75, 0, 46, 1,227, 8, 7, 0,181, 12, 7, 0,182, 12, 7, 0,183, 12, 7, 0,184, 12, 7, 0,148, 9, 7, 0,185, 12, + 7, 0,186, 12, 7, 0,187, 12, 7, 0, 84, 4, 7, 0,229, 8, 2, 0, 18, 0, 2, 0,112, 9,231, 0, 3, 0, 4, 0,126, 0, + 2, 0,215, 6, 2, 0,188, 12, 2, 2, 5, 0, 0, 0,193, 8, 2, 0,194, 8, 2, 0, 72, 5, 2, 0,189, 12, 2, 0,190, 12, +229, 0, 16, 0, 22, 0, 32, 0, 34, 0, 75, 0, 0, 0, 35, 0, 4, 0,143, 0, 4, 0,144, 0, 4, 0,191, 12, 7, 0,162, 0, + 7, 0,163, 0, 44, 0,138, 0, 3, 2,150, 9,178, 0,182, 3, 4, 2,192, 12, 11, 0,193, 12, 2, 2,194, 12, 4, 0, 18, 0, + 4, 0, 22, 0, 13, 1, 10, 0, 4, 0,132, 0, 4, 0,195, 12, 52, 0,196, 12, 7, 0,197, 12, 2, 0,198, 12, 0, 0,181, 2, + 4, 0,126, 0, 5, 2,175, 3, 6, 2,199, 12, 7, 0,200, 12, 7, 2, 3, 0, 4, 0,126, 0, 7, 0,201, 12, 7, 0, 79, 1, + 8, 2, 11, 0, 11, 0,202, 12, 7, 0,203, 12, 7, 0,204, 12, 7, 0, 27, 0, 7, 0,205, 12, 2, 0,206, 12, 2, 0, 91, 0, + 7, 0,207, 12, 7, 0,208, 12, 7, 0,209, 12, 7, 0,210, 12, 6, 2, 3, 0, 7, 0,211, 12, 4, 0,126, 0, 4, 0, 18, 0, + 5, 2, 24, 0, 5, 2, 0, 0, 5, 2, 1, 0, 0, 0, 19, 0, 7, 0,212, 12, 7, 0,213, 12, 7, 0,214, 12, 7, 0,215, 12, + 7, 0, 5, 11, 4, 0,216, 12, 4, 0,217, 12, 6, 2,218, 12, 7, 0,219, 12, 7, 0,201, 12, 4, 0, 18, 0, 4, 0,220, 12, + 4, 0,221, 12, 7, 0, 84, 12, 2, 0,222, 12, 2, 0,227, 3, 2, 0,223, 12, 2, 0,224, 12, 2, 0,225, 12, 2, 0, 30, 0, + 7, 0,226, 12, 9, 2, 22, 0, 4, 0, 18, 0, 2, 0,227, 12, 2, 0,228, 12, 7, 0,229, 12, 2, 0,230, 12, 2, 0,231, 12, + 2, 0,232, 12, 2, 0,233, 12, 2, 0,234, 12, 2, 0,235, 12, 2, 0,236, 12, 2, 0, 3, 3, 4, 0,237, 12, 4, 0,238, 12, + 2, 0,239, 12, 2, 0,240, 12, 7, 0, 94, 1, 4, 0,241, 12, 4, 0,242, 12, 7, 0,243, 12, 7, 0,244, 12, 4, 0, 74, 0, + 10, 2, 12, 0, 4, 0, 18, 0, 4, 0,245, 12, 4, 0,246, 12, 7, 0,247, 12, 5, 2,248, 12, 7, 0,249, 12, 7, 0,250, 12, + 7, 0,251, 12, 4, 0,190, 1, 4, 0,132, 0, 7, 0,148, 3, 52, 0,252, 12, 11, 2, 5, 0, 4, 0, 18, 0, 7, 0,201, 12, + 4, 0,253, 12, 4, 0,254, 12, 7, 2,255, 12, 12, 2, 7, 0, 12, 2, 0, 0, 12, 2, 1, 0, 0, 0, 19, 0, 4, 0, 18, 0, + 7, 0,148, 3, 14, 0, 0, 13, 11, 2, 1, 13, 13, 2, 1, 0, 0, 0, 2, 13, 4, 2, 10, 0, 9, 2, 3, 13, 8, 2, 4, 13, + 14, 0, 0, 13, 11, 2, 1, 13, 10, 2, 5, 13, 5, 2, 6, 13, 14, 0, 7, 13, 4, 0, 8, 13, 4, 0, 9, 13, 13, 2, 90, 6, + 14, 2, 48, 0, 14, 2, 0, 0, 14, 2, 1, 0,169, 0,145, 3, 15, 2, 2, 0, 64, 0, 10, 13,187, 0,154, 4,139, 0,153, 4, + 14, 0, 21, 3, 4, 0, 11, 13, 0, 0, 19, 0, 2, 0,162, 10, 2, 0, 16, 0, 2, 0, 12, 13, 2, 0, 13, 13, 2, 0, 14, 13, + 2, 0, 15, 13, 2, 0, 16, 13, 2, 0, 17, 13, 4, 0, 92, 0, 4, 0,186, 3, 4, 0, 18, 13, 4, 0, 19, 13, 4, 0,193, 9, + 4, 0,194, 9, 4, 0, 27, 0, 7, 0, 20, 13, 47, 0, 21, 13, 0, 0, 22, 13, 4, 0, 23, 13, 4, 0,161, 12, 7, 0, 24, 13, + 7, 0, 25, 13, 7, 0, 26, 13, 7, 0, 27, 13, 7, 0, 28, 13, 7, 0, 29, 13, 7, 0, 30, 13, 7, 0, 31, 13, 7, 0, 32, 13, + 7, 0, 33, 13, 7, 0, 34, 13, 7, 0, 35, 13, 7, 0, 36, 13, 7, 0, 37, 13, 0, 0,202, 2, 0, 0, 38, 13, 0, 0, 39, 13, + 0, 0, 40, 13,169, 0, 7, 0,168, 0, 41, 13,143, 0, 35, 3, 14, 0, 42, 13, 2, 0, 43, 13, 2, 0, 92, 0, 4, 0, 27, 0, + 0, 0, 44, 13,170, 0, 24, 0,168, 0, 41, 13,143, 0, 35, 3,150, 0, 56, 3, 63, 0, 25, 2, 4, 0, 92, 0, 4, 0, 45, 13, + 7, 0,185, 0, 7, 0,186, 0, 7, 0,187, 0, 7, 0,178, 1, 7, 0, 46, 13, 7, 0, 47, 13, 7, 0, 48, 13, 7, 0, 49, 13, + 50, 0, 50, 13, 50, 0, 51, 13, 2, 0, 52, 13, 2, 0,222, 10, 2, 0, 53, 13, 2, 0, 27, 0, 7, 0, 54, 13, 7, 0, 55, 13, + 7, 0, 56, 13, 7, 0, 57, 13, 69, 78, 68, 66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; -- cgit v1.2.3 From adbe628a1b6dfe4f61ce56fede9cc9ebba19caa7 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 26 Mar 2012 15:57:00 +0000 Subject: Fix crash of Refresh Sequencer when some Movie / MovieClip strips doesn't have animation opened --- source/blender/blenkernel/BKE_sequencer.h | 2 ++ source/blender/blenkernel/intern/movieclip.c | 22 ++++++++++++----- source/blender/blenkernel/intern/sequencer.c | 28 ++++++++++++++++++++++ source/blender/blenloader/intern/writefile.c | 2 +- .../editors/space_sequencer/sequencer_edit.c | 24 +------------------ 5 files changed, 48 insertions(+), 30 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h index 7a84e71c763..8f53dc041a3 100644 --- a/source/blender/blenkernel/BKE_sequencer.h +++ b/source/blender/blenkernel/BKE_sequencer.h @@ -348,4 +348,6 @@ extern SequencerDrawView sequencer_view3d_cb; extern ListBase seqbase_clipboard; extern int seqbase_clipboard_frame; +void seq_update_sequence_length(struct Scene *scene, struct Editing *ed, struct Sequence *seq); + #endif // __BKE_SEQUENCER_H__ diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c index 55f257e0feb..e375262c045 100644 --- a/source/blender/blenkernel/intern/movieclip.c +++ b/source/blender/blenkernel/intern/movieclip.c @@ -213,11 +213,8 @@ static ImBuf *movieclip_load_sequence_file(MovieClip *clip, MovieClipUser *user, return ibuf; } -static ImBuf *movieclip_load_movie_file(MovieClip *clip, MovieClipUser *user, int framenr, int flag) +static void movieclip_open_anim_file(MovieClip *clip) { - ImBuf *ibuf = NULL; - int tc = get_timecode(clip, flag); - int proxy = rendersize_to_proxy(user, flag); char str[FILE_MAX]; if (!clip->anim) { @@ -236,6 +233,15 @@ static ImBuf *movieclip_load_movie_file(MovieClip *clip, MovieClipUser *user, in } } } +} + +static ImBuf *movieclip_load_movie_file(MovieClip *clip, MovieClipUser *user, int framenr, int flag) +{ + ImBuf *ibuf = NULL; + int tc = get_timecode(clip, flag); + int proxy = rendersize_to_proxy(user, flag); + + movieclip_open_anim_file(clip); if (clip->anim) { int dur; @@ -258,8 +264,12 @@ static ImBuf *movieclip_load_movie_file(MovieClip *clip, MovieClipUser *user, in static void movieclip_calc_length(MovieClip *clip) { - if (clip->anim) { - clip->len = IMB_anim_get_duration(clip->anim, clip->proxy.tc); + if (clip->source == MCLIP_SRC_MOVIE) { + movieclip_open_anim_file(clip); + + if (clip->anim) { + clip->len = IMB_anim_get_duration(clip->anim, clip->proxy.tc); + } } else if (clip->source == MCLIP_SRC_SEQUENCE) { int framenr = 1; diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 18749d7b5a6..94069f94f4d 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -4007,3 +4007,31 @@ void seqbase_dupli_recursive(Scene *scene, Scene *scene_to, ListBase *nseqbase, } } } + +void seq_update_sequence_length(Scene *scene, Editing *ed, Sequence *seq) +{ + int changed = FALSE; + + switch (seq->type) { + case SEQ_SCENE: + seq->len = seq->scene->r.efra - seq->scene->r.sfra + 1; + changed = TRUE; + break; + case SEQ_MOVIECLIP: + seq->len = BKE_movieclip_get_duration(seq->clip); + changed = TRUE; + break; + case SEQ_MOVIE: + seq_open_anim_file(seq); + seq->len = IMB_anim_get_duration(seq->anim, IMB_TC_RECORD_RUN); + changed = TRUE; + break; + } + + if (changed) { + calc_sequence_disp(scene, seq); + + if (seq_test_overlap(ed->seqbasep, seq)) + shuffle_seq(ed->seqbasep, seq, scene); + } +} diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 32af95c3a84..c3f77f786c1 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -1863,7 +1863,7 @@ static void write_previews(WriteData *wd, PreviewImage *prv) short h = prv->h[1]; unsigned int *rect = prv->rect[1]; /* don't write out large previews if not requested */ - if (!(U.flag & USER_SAVE_PREVIEWS) ) { + if (!(U.flag & USER_SAVE_PREVIEWS)) { prv->w[1] = 0; prv->h[1] = 0; prv->rect[1] = NULL; diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 935c17b1af0..0afb2e461b5 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -1311,29 +1311,7 @@ static void sequencer_refresh_all_length(Scene *scene, Editing *ed) Sequence *seq; SEQP_BEGIN(ed, seq) { - int changed = FALSE; - - switch (seq->type) { - case SEQ_SCENE: - seq->len = seq->scene->r.efra - seq->scene->r.sfra + 1; - changed = TRUE; - break; - case SEQ_MOVIECLIP: - seq->len = BKE_movieclip_get_duration(seq->clip); - changed = TRUE; - break; - case SEQ_MOVIE: - seq->len = IMB_anim_get_duration(seq->anim, IMB_TC_RECORD_RUN); - changed = TRUE; - break; - } - - if (changed) { - calc_sequence_disp(scene, seq); - - if (seq_test_overlap(ed->seqbasep, seq)) - shuffle_seq(ed->seqbasep, seq, scene); - } + seq_update_sequence_length(scene, ed, seq); } SEQ_END } -- cgit v1.2.3 From 03336c0ba782a1608c635226c545b57ebbcb67e3 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 26 Mar 2012 16:04:10 +0000 Subject: Style cleanup of movie cache module --- source/blender/imbuf/intern/moviecache.c | 160 +++++++++++++++---------------- 1 file changed, 80 insertions(+), 80 deletions(-) (limited to 'source/blender') diff --git a/source/blender/imbuf/intern/moviecache.c b/source/blender/imbuf/intern/moviecache.c index 307c634b26a..8b18be87b3c 100644 --- a/source/blender/imbuf/intern/moviecache.c +++ b/source/blender/imbuf/intern/moviecache.c @@ -77,29 +77,29 @@ typedef struct MovieCacheItem { static unsigned int moviecache_hashhash(const void *keyv) { - MovieCacheKey *key= (MovieCacheKey*)keyv; + MovieCacheKey *key = (MovieCacheKey*)keyv; return key->cache_owner->hashfp(key->userkey); } static int moviecache_hashcmp(const void *av, const void *bv) { - const MovieCacheKey *a= (MovieCacheKey*)av; - const MovieCacheKey *b= (MovieCacheKey*)bv; + const MovieCacheKey *a = (MovieCacheKey*)av; + const MovieCacheKey *b = (MovieCacheKey*)bv; return a->cache_owner->cmpfp(a->userkey, b->userkey); } static void moviecache_keyfree(void *val) { - MovieCacheKey *key= (MovieCacheKey*)val; + MovieCacheKey *key = (MovieCacheKey*)val; BLI_mempool_free(key->cache_owner->keys_pool, key); } static void moviecache_valfree(void *val) { - MovieCacheItem *item= (MovieCacheItem*)val; + MovieCacheItem *item = (MovieCacheItem*)val; if (item->ibuf) { MEM_CacheLimiter_unmanage(item->c_handle); @@ -115,8 +115,8 @@ static void check_unused_keys(MovieCache *cache) iter= BLI_ghashIterator_new(cache->hash); while (!BLI_ghashIterator_isDone(iter)) { - MovieCacheKey *key= BLI_ghashIterator_getKey(iter); - MovieCacheItem *item= BLI_ghashIterator_getValue(iter); + MovieCacheKey *key = BLI_ghashIterator_getKey(iter); + MovieCacheItem *item = BLI_ghashIterator_getValue(iter); BLI_ghashIterator_step(iter); @@ -129,20 +129,20 @@ static void check_unused_keys(MovieCache *cache) static int compare_int(const void *av, const void *bv) { - const int *a= (int *)av; - const int *b= (int *)bv; - return *a-*b; + const int *a = (int *)av; + const int *b = (int *)bv; + return *a - *b; } static void IMB_moviecache_destructor(void *p) { - MovieCacheItem *item= (MovieCacheItem *) p; + MovieCacheItem *item = (MovieCacheItem *) p; if (item && item->ibuf) { IMB_freeImBuf(item->ibuf); - item->ibuf= NULL; - item->c_handle= NULL; + item->ibuf = NULL; + item->c_handle = NULL; } } @@ -150,27 +150,27 @@ static void IMB_moviecache_destructor(void *p) static size_t IMB_get_size_in_memory(ImBuf *ibuf) { int a; - size_t size= 0, channel_size= 0; + size_t size = 0, channel_size = 0; - size+= sizeof(ImBuf); + size += sizeof(ImBuf); if (ibuf->rect) - channel_size+= sizeof(char); + channel_size += sizeof(char); if (ibuf->rect_float) - channel_size+= sizeof(float); + channel_size += sizeof(float); - size+= channel_size*ibuf->x*ibuf->y*ibuf->channels; + size += channel_size * ibuf->x * ibuf->y * ibuf->channels; if (ibuf->miptot) { - for (a= 0; amiptot; a++) { + for (a = 0; a < ibuf->miptot; a++) { if (ibuf->mipmap[a]) - size+= IMB_get_size_in_memory(ibuf->mipmap[a]); + size += IMB_get_size_in_memory(ibuf->mipmap[a]); } } if (ibuf->tiles) { - size+= sizeof(unsigned int)*ibuf->ytiles*ibuf->xtiles; + size += sizeof(unsigned int)*ibuf->ytiles*ibuf->xtiles; } return size; @@ -178,18 +178,18 @@ static size_t IMB_get_size_in_memory(ImBuf *ibuf) static size_t get_item_size (void *p) { - size_t size= sizeof(MovieCacheItem); - MovieCacheItem *item= (MovieCacheItem *) p; + size_t size = sizeof(MovieCacheItem); + MovieCacheItem *item = (MovieCacheItem *) p; if (item->ibuf) - size+= IMB_get_size_in_memory(item->ibuf); + size += IMB_get_size_in_memory(item->ibuf); return size; } void IMB_moviecache_init(void) { - limitor= new_MEM_CacheLimiter(IMB_moviecache_destructor, get_item_size); + limitor = new_MEM_CacheLimiter(IMB_moviecache_destructor, get_item_size); } void IMB_moviecache_destruct(void) @@ -203,17 +203,17 @@ struct MovieCache *IMB_moviecache_create(int keysize, GHashHashFP hashfp, GHashC { MovieCache *cache; - cache= MEM_callocN(sizeof(MovieCache), "MovieCache"); - cache->keys_pool= BLI_mempool_create(sizeof(MovieCacheKey), 64, 64, 0); - cache->items_pool= BLI_mempool_create(sizeof(MovieCacheItem), 64, 64, 0); - cache->userkeys_pool= BLI_mempool_create(keysize, 64, 64, 0); - cache->hash= BLI_ghash_new(moviecache_hashhash, moviecache_hashcmp, "MovieClip ImBuf cache hash"); + cache = MEM_callocN(sizeof(MovieCache), "MovieCache"); + cache->keys_pool = BLI_mempool_create(sizeof(MovieCacheKey), 64, 64, 0); + cache->items_pool = BLI_mempool_create(sizeof(MovieCacheItem), 64, 64, 0); + cache->userkeys_pool = BLI_mempool_create(keysize, 64, 64, 0); + cache->hash = BLI_ghash_new(moviecache_hashhash, moviecache_hashcmp, "MovieClip ImBuf cache hash"); - cache->keysize= keysize; - cache->hashfp= hashfp; - cache->cmpfp= cmpfp; - cache->getdatafp= getdatafp; - cache->proxy= -1; + cache->keysize = keysize; + cache->hashfp = hashfp; + cache->cmpfp = cmpfp; + cache->getdatafp = getdatafp; + cache->proxy = -1; return cache; } @@ -228,21 +228,21 @@ void IMB_moviecache_put(MovieCache *cache, void *userkey, ImBuf *ibuf) IMB_refImBuf(ibuf); - key= BLI_mempool_alloc(cache->keys_pool); - key->cache_owner= cache; - key->userkey= BLI_mempool_alloc(cache->userkeys_pool); + key = BLI_mempool_alloc(cache->keys_pool); + key->cache_owner = cache; + key->userkey = BLI_mempool_alloc(cache->userkeys_pool); memcpy(key->userkey, userkey, cache->keysize); - item= BLI_mempool_alloc(cache->items_pool); - item->ibuf= ibuf; - item->cache_owner= cache; - item->last_access= cache->curtime++; - item->c_handle= NULL; + item = BLI_mempool_alloc(cache->items_pool); + item->ibuf = ibuf; + item->cache_owner = cache; + item->last_access = cache->curtime++; + item->c_handle = NULL; BLI_ghash_remove(cache->hash, key, moviecache_keyfree, moviecache_valfree); BLI_ghash_insert(cache->hash, key, item); - item->c_handle= MEM_CacheLimiter_insert(limitor, item); + item->c_handle = MEM_CacheLimiter_insert(limitor, item); MEM_CacheLimiter_ref(item->c_handle); MEM_CacheLimiter_enforce_limits(limitor); @@ -262,12 +262,12 @@ ImBuf* IMB_moviecache_get(MovieCache *cache, void *userkey) MovieCacheKey key; MovieCacheItem *item; - key.cache_owner= cache; - key.userkey= userkey; - item= (MovieCacheItem*)BLI_ghash_lookup(cache->hash, &key); + key.cache_owner = cache; + key.userkey = userkey; + item = (MovieCacheItem*)BLI_ghash_lookup(cache->hash, &key); if (item) { - item->last_access= cache->curtime++; + item->last_access = cache->curtime++; if (item->ibuf) { MEM_CacheLimiter_touch(item->c_handle); @@ -297,41 +297,41 @@ void IMB_moviecache_free(MovieCache *cache) /* get segments of cached frames. useful for debugging cache policies */ void IMB_moviecache_get_cache_segments(MovieCache *cache, int proxy, int render_flags, int *totseg_r, int **points_r) { - *totseg_r= 0; - *points_r= NULL; + *totseg_r = 0; + *points_r = NULL; if (!cache->getdatafp) return; - if (cache->proxy!=proxy || cache->render_flags!=render_flags) { + if (cache->proxy != proxy || cache->render_flags != render_flags) { if (cache->points) MEM_freeN(cache->points); - cache->points= NULL; + cache->points = NULL; } if (cache->points) { - *totseg_r= cache->totseg; - *points_r= cache->points; + *totseg_r = cache->totseg; + *points_r = cache->points; } else { - int totframe= BLI_ghash_size(cache->hash); - int *frames= MEM_callocN(totframe*sizeof(int), "movieclip cache frames"); - int a, totseg= 0; + int totframe = BLI_ghash_size(cache->hash); + int *frames = MEM_callocN(totframe*sizeof(int), "movieclip cache frames"); + int a, totseg = 0; GHashIterator *iter; - iter= BLI_ghashIterator_new(cache->hash); + iter = BLI_ghashIterator_new(cache->hash); a= 0; while (!BLI_ghashIterator_isDone(iter)) { - MovieCacheKey *key= BLI_ghashIterator_getKey(iter); - MovieCacheItem *item= BLI_ghashIterator_getValue(iter); + MovieCacheKey *key = BLI_ghashIterator_getKey(iter); + MovieCacheItem *item = BLI_ghashIterator_getValue(iter); int framenr, curproxy, curflags; if (item->ibuf) { cache->getdatafp(key->userkey, &framenr, &curproxy, &curflags); - if (curproxy==proxy && curflags==render_flags) - frames[a++]= framenr; + if (curproxy == proxy && curflags == render_flags) + frames[a++] = framenr; } BLI_ghashIterator_step(iter); @@ -342,40 +342,40 @@ void IMB_moviecache_get_cache_segments(MovieCache *cache, int proxy, int render_ qsort(frames, totframe, sizeof(int), compare_int); /* count */ - for (a= 0; atotseg= totseg; - cache->points= points; - cache->proxy= proxy; - cache->render_flags= render_flags; + cache->totseg = totseg; + cache->points = points; + cache->proxy = proxy; + cache->render_flags = render_flags; } MEM_freeN(frames); -- cgit v1.2.3 From 47cd3d4b8e5d8a0b7c30475a2b7944c70423eba2 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Mon, 26 Mar 2012 16:25:21 +0000 Subject: Fix for truncation of 64-bit CustomDataMasks. Can't use GET_INT_FROM_POINTER anymore with CD masks, as this truncates to 32-bit. Bug: http://projects.blender.org/tracker/index.php?func=detail&aid=30680&group_id=9&atid=498 CR: http://codereview.appspot.com/5905059/ --- source/blender/blenkernel/BKE_modifier.h | 15 +++++++++----- source/blender/blenkernel/intern/DerivedMesh.c | 18 ++++++++--------- source/blender/blenkernel/intern/modifier.c | 27 ++++++++++++++------------ 3 files changed, 34 insertions(+), 26 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h index b73982ca852..b4320b7025a 100644 --- a/source/blender/blenkernel/BKE_modifier.h +++ b/source/blender/blenkernel/BKE_modifier.h @@ -357,16 +357,21 @@ int modifiers_isPreview(struct Object *ob); int modifiers_indexInObject(struct Object *ob, struct ModifierData *md); +typedef struct CDMaskLink { + struct CDMaskLink *next; + CustomDataMask mask; +} CDMaskLink; + /* Calculates and returns a linked list of CustomDataMasks indicating the * data required by each modifier in the stack pointed to by md for correct * evaluation, assuming the data indicated by dataMask is required at the * end of the stack. */ -struct LinkNode *modifiers_calcDataMasks(struct Scene *scene, - struct Object *ob, - struct ModifierData *md, - CustomDataMask dataMask, - int required_mode); +struct CDMaskLink *modifiers_calcDataMasks(struct Scene *scene, + struct Object *ob, + struct ModifierData *md, + CustomDataMask dataMask, + int required_mode); struct ModifierData *modifiers_getLastPreview(struct Scene *scene, struct ModifierData *md, int required_mode); diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 074ea741f3a..a03bcb1fde9 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -1351,7 +1351,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos { Mesh *me = ob->data; ModifierData *firstmd, *md, *previewmd = NULL; - LinkNode *datamasks, *curr; + CDMaskLink *datamasks, *curr; /* XXX Always copying POLYINDEX, else tessellated data are no more valid! */ CustomDataMask mask, nextmask, append_mask = CD_MASK_POLYINDEX; float (*deformedVerts)[3] = NULL; @@ -1547,7 +1547,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos /* determine which data layers are needed by following modifiers */ if (curr->next) - nextmask= (CustomDataMask)GET_INT_FROM_POINTER(curr->next->link); + nextmask= curr->next->mask; else nextmask= dataMask; @@ -1597,7 +1597,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos /* set the DerivedMesh to only copy needed data */ - mask= (CustomDataMask)GET_INT_FROM_POINTER(curr->link); + mask= curr->mask; /* needMapping check here fixes bug [#28112], otherwise its * possible that it wont be copied */ mask |= append_mask; @@ -1608,7 +1608,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos add_orco_dm(ob, NULL, dm, clothorcodm, CD_CLOTH_ORCO); /* add an origspace layer if needed */ - if (((CustomDataMask)GET_INT_FROM_POINTER(curr->link)) & CD_MASK_ORIGSPACE_MLOOP) { + if ((curr->mask) & CD_MASK_ORIGSPACE_MLOOP) { if (!CustomData_has_layer(&dm->loopData, CD_ORIGSPACE_MLOOP)) { DM_add_loop_layer(dm, CD_ORIGSPACE_MLOOP, CD_CALLOC, NULL); DM_init_origspace(dm); @@ -1823,7 +1823,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos if (deformedVerts && deformedVerts != inputVertexCos) MEM_freeN(deformedVerts); - BLI_linklist_free(datamasks, NULL); + BLI_linklist_free((LinkNode*)datamasks, NULL); } float (*editbmesh_get_vertex_cos(BMEditMesh *em, int *numVerts_r))[3] @@ -1866,7 +1866,7 @@ static void editbmesh_calc_modifiers(Scene *scene, Object *ob, BMEditMesh *em, D CustomDataMask mask; DerivedMesh *dm, *orcodm = NULL; int i, numVerts = 0, cageIndex = modifiers_getCageIndex(scene, ob, NULL, 1); - LinkNode *datamasks, *curr; + CDMaskLink *datamasks, *curr; int required_mode = eModifierMode_Realtime | eModifierMode_Editmode; modifiers_clearErrors(ob); @@ -1953,7 +1953,7 @@ static void editbmesh_calc_modifiers(Scene *scene, Object *ob, BMEditMesh *em, D } /* create an orco derivedmesh in parallel */ - mask= (CustomDataMask)GET_INT_FROM_POINTER(curr->link); + mask= curr->mask; if (mask & CD_MASK_ORCO) { if (!orcodm) orcodm= create_orco_dm(ob, ob->data, em, CD_ORCO); @@ -1974,7 +1974,7 @@ static void editbmesh_calc_modifiers(Scene *scene, Object *ob, BMEditMesh *em, D } /* set the DerivedMesh to only copy needed data */ - mask= (CustomDataMask)GET_INT_FROM_POINTER(curr->link); /* CD_MASK_ORCO may have been cleared above */ + mask= curr->mask; /* CD_MASK_ORCO may have been cleared above */ DM_set_only_copy(dm, mask | CD_MASK_ORIGINDEX); @@ -2019,7 +2019,7 @@ static void editbmesh_calc_modifiers(Scene *scene, Object *ob, BMEditMesh *em, D } } - BLI_linklist_free(datamasks, NULL); + BLI_linklist_free((LinkNode*)datamasks, NULL); /* Yay, we are done. If we have a DerivedMesh and deformed vertices need * to apply these back onto the DerivedMesh. If we have no DerivedMesh diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index f5a303033a3..6c855b8f242 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -355,21 +355,24 @@ int modifier_isEnabled(struct Scene *scene, ModifierData *md, int required_mode) return 1; } -LinkNode *modifiers_calcDataMasks(struct Scene *scene, Object *ob, ModifierData *md, CustomDataMask dataMask, int required_mode) +CDMaskLink *modifiers_calcDataMasks(struct Scene *scene, Object *ob, ModifierData *md, CustomDataMask dataMask, int required_mode) { - LinkNode *dataMasks = NULL; - LinkNode *curr, *prev; + CDMaskLink *dataMasks = NULL; + CDMaskLink *curr, *prev; /* build a list of modifier data requirements in reverse order */ for (; md; md = md->next) { ModifierTypeInfo *mti = modifierType_getInfo(md->type); - CustomDataMask mask = 0; + curr = MEM_callocN(sizeof(CDMaskLink), "CDMaskLink"); + if (modifier_isEnabled(scene, md, required_mode)) if (mti->requiredDataMask) - mask = mti->requiredDataMask(ob, md); + curr->mask = mti->requiredDataMask(ob, md); - BLI_linklist_prepend(&dataMasks, SET_INT_IN_POINTER(mask)); + /* prepend new datamask */ + curr->next = dataMasks; + dataMasks = curr; } /* build the list of required data masks - each mask in the list must @@ -380,20 +383,20 @@ LinkNode *modifiers_calcDataMasks(struct Scene *scene, Object *ob, ModifierData */ for (curr = dataMasks, prev = NULL; curr; prev = curr, curr = curr->next) { if (prev) { - CustomDataMask prev_mask = (CustomDataMask)GET_INT_FROM_POINTER(prev->link); - CustomDataMask curr_mask = (CustomDataMask)GET_INT_FROM_POINTER(curr->link); + CustomDataMask prev_mask = prev->mask; + CustomDataMask curr_mask = curr->mask; - curr->link = SET_INT_IN_POINTER(curr_mask | prev_mask); + curr->mask = curr_mask | prev_mask; } else { - CustomDataMask curr_mask = (CustomDataMask)GET_INT_FROM_POINTER(curr->link); + CustomDataMask curr_mask = curr->mask; - curr->link = SET_INT_IN_POINTER(curr_mask | dataMask); + curr->mask = curr_mask | dataMask; } } /* reverse the list so it's in the correct order */ - BLI_linklist_reverse(&dataMasks); + BLI_linklist_reverse((LinkNode**)&dataMasks); return dataMasks; } -- cgit v1.2.3 From 9ffdad9f9cc252c32cdb104f7684cbc30de75c33 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 26 Mar 2012 17:24:54 +0000 Subject: Renaming pt_BR to pt, as a recent reform [1] made most country speaking portugese use a same, common version of it, which we want to use here. [1] http://www.reformaortografica.com/ --- source/blender/blenfont/intern/blf_lang.c | 2 +- source/blender/makesrna/intern/rna_userdef.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenfont/intern/blf_lang.c b/source/blender/blenfont/intern/blf_lang.c index 0c68bca20bd..ee825b8179d 100644 --- a/source/blender/blenfont/intern/blf_lang.c +++ b/source/blender/blenfont/intern/blf_lang.c @@ -82,7 +82,7 @@ static const char *locales[] = { "spanish", "es", "catalan", "ca_AD", "czech", "cs_CZ", - "ptb", "pt_BR", + "ptb", "pt", #if defined (_WIN32) && !defined(FREE_WINDOWS) "Chinese (Simplified)_China.1252", "zh_CN", "Chinese (Traditional)_China.1252", "zh_TW", diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 4fad3aaf815..2087ba7ee5f 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -2869,7 +2869,7 @@ static void rna_def_userdef_system(BlenderRNA *brna) { 0, "", 0, "In progress", ""}, /* using the utf8 flipped form of Arabic (العربية) */ {21, "ARABIC", 0, "Arabic (ﺔﻴﺑﺮﻌﻟﺍ)", "ar_EG"}, - {12, "BRAZILIAN_PORTUGUESE", 0, "Brazilian Portuguese (Português do Brasil)", "pt_BR"}, + {12, "BRAZILIAN_PORTUGUESE", 0, "Portuguese (Português)", "pt"}, {22, "BULGARIAN", 0, "Bulgarian (Български)", "bg_BG"}, {10, "CATALAN", 0, "Catalan (Català)", "ca_AD"}, {16, "CROATIAN", 0, "Croatian (Hrvatski)", "hr_HR"}, -- cgit v1.2.3 From f02d67918343d1f1a489ca5817f6ed9de0f79276 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Mon, 26 Mar 2012 19:44:25 +0000 Subject: Fix run-time warning of freeing null pointer in array modifier. --- source/blender/modifiers/intern/MOD_array.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender') diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c index 621be8023a2..18ccb357579 100644 --- a/source/blender/modifiers/intern/MOD_array.c +++ b/source/blender/modifiers/intern/MOD_array.c @@ -411,7 +411,8 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, BMEdit_Free(em); MEM_freeN(em); - MEM_freeN(indexMap); + if (indexMap) + MEM_freeN(indexMap); return result; } -- cgit v1.2.3 From 57f7aca8ee7d64c66ce8de950d1856c962841589 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Mon, 26 Mar 2012 19:50:45 +0000 Subject: Fix for position of array-modifier end cap when not using a fixed count. Moved calculation of final offset so that correct count value has been set. --- source/blender/modifiers/intern/MOD_array.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'source/blender') diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c index 18ccb357579..4304b617d77 100644 --- a/source/blender/modifiers/intern/MOD_array.c +++ b/source/blender/modifiers/intern/MOD_array.c @@ -237,14 +237,6 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, copy_m4_m4(offset, result_mat); } - /* calculate the offset matrix of the final copy (for merging) */ - unit_m4(final_offset); - - for (j=0; j < count - 1; j++) { - mult_m4_m4m4(tmp_mat, offset, final_offset); - copy_m4_m4(final_offset, tmp_mat); - } - if (amd->fit_type == MOD_ARR_FITCURVE && amd->curve_ob) { Curve *cu = amd->curve_ob->data; if (cu) { @@ -281,6 +273,14 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, if (count < 1) count = 1; + /* calculate the offset matrix of the final copy (for merging) */ + unit_m4(final_offset); + + for (j=0; j < count - 1; j++) { + mult_m4_m4m4(tmp_mat, offset, final_offset); + copy_m4_m4(final_offset, tmp_mat); + } + /* BMESH_TODO: bumping up the stack level avoids computing the normals * after every top-level operator execution (and this modifier has the * potential to execute a *lot* of top-level BMOps. There should be a -- cgit v1.2.3 From abf551b1a51fe7991be0eb9a8ced6a9c4db927e5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 26 Mar 2012 20:41:54 +0000 Subject: style cleanup: py api --- source/blender/python/bmesh/bmesh_py_types.c | 4 +- .../python/bmesh/bmesh_py_types_customdata.c | 4 +- source/blender/python/intern/bpy.c | 10 +- source/blender/python/intern/bpy_app.c | 3 +- source/blender/python/intern/bpy_app_ffmpeg.c | 12 +- source/blender/python/intern/bpy_app_handlers.c | 88 +- source/blender/python/intern/bpy_interface.c | 24 +- source/blender/python/intern/bpy_library.c | 87 +- source/blender/python/intern/bpy_operator.c | 26 +- source/blender/python/intern/bpy_operator_wrap.c | 3 +- source/blender/python/intern/bpy_props.c | 56 +- source/blender/python/intern/bpy_rna.c | 1621 ++++++++++---------- source/blender/python/intern/bpy_rna_anim.c | 18 +- source/blender/python/intern/bpy_rna_array.c | 4 +- source/blender/python/intern/bpy_traceback.c | 10 +- source/blender/python/intern/bpy_util.c | 8 +- source/blender/python/intern/gpu.c | 79 +- 17 files changed, 1031 insertions(+), 1026 deletions(-) (limited to 'source/blender') diff --git a/source/blender/python/bmesh/bmesh_py_types.c b/source/blender/python/bmesh/bmesh_py_types.c index 04ad9a298fd..afa628ee2cf 100644 --- a/source/blender/python/bmesh/bmesh_py_types.c +++ b/source/blender/python/bmesh/bmesh_py_types.c @@ -3054,8 +3054,8 @@ int bpy_bm_generic_valid_check(BPy_BMGeneric *self) } else { PyErr_Format(PyExc_ReferenceError, - "BMesh data of type %.200s has been removed", - Py_TYPE(self)->tp_name); + "BMesh data of type %.200s has been removed", + Py_TYPE(self)->tp_name); return -1; } } diff --git a/source/blender/python/bmesh/bmesh_py_types_customdata.c b/source/blender/python/bmesh/bmesh_py_types_customdata.c index 1f7f7290030..92142c1a036 100644 --- a/source/blender/python/bmesh/bmesh_py_types_customdata.c +++ b/source/blender/python/bmesh/bmesh_py_types_customdata.c @@ -712,7 +712,7 @@ void BPy_BM_init_types_customdata(void) /** * helper function for get/set, NULL return means the error is set -*/ + */ static void *bpy_bmlayeritem_ptr_get(BPy_BMElem *py_ele, BPy_BMLayerItem *py_layer) { void *value; @@ -746,7 +746,7 @@ static void *bpy_bmlayeritem_ptr_get(BPy_BMElem *py_ele, BPy_BMLayerItem *py_lay if (UNLIKELY(value == NULL)) { /* this should be fairly unlikely but possible if layers move about after we get them */ PyErr_SetString(PyExc_KeyError, - "BMElem[key]: layer not found"); + "BMElem[key]: layer not found"); return NULL; } else { diff --git a/source/blender/python/intern/bpy.c b/source/blender/python/intern/bpy.c index 71cfa50743d..1e2e2bf6b2b 100644 --- a/source/blender/python/intern/bpy.c +++ b/source/blender/python/intern/bpy.c @@ -52,7 +52,7 @@ #include "MEM_guardedalloc.h" - /* external util modules */ +/* external util modules */ #include "../generic/idprop_py_api.h" #include "../generic/bgl.h" #include "../generic/blf_py_api.h" @@ -211,11 +211,11 @@ static PyObject *bpy_resource_path(PyObject *UNUSED(self), PyObject *args, PyObj static PyMethodDef meth_bpy_script_paths = {"script_paths", (PyCFunction)bpy_script_paths, METH_NOARGS, bpy_script_paths_doc}; static PyMethodDef meth_bpy_blend_paths = - {"blend_paths", (PyCFunction)bpy_blend_paths, METH_VARARGS|METH_KEYWORDS, bpy_blend_paths_doc}; + {"blend_paths", (PyCFunction)bpy_blend_paths, METH_VARARGS | METH_KEYWORDS, bpy_blend_paths_doc}; static PyMethodDef meth_bpy_user_resource = - {"user_resource", (PyCFunction)bpy_user_resource, METH_VARARGS|METH_KEYWORDS, NULL}; + {"user_resource", (PyCFunction)bpy_user_resource, METH_VARARGS | METH_KEYWORDS, NULL}; static PyMethodDef meth_bpy_resource_path = - {"resource_path", (PyCFunction)bpy_resource_path, METH_VARARGS|METH_KEYWORDS, bpy_resource_path_doc}; + {"resource_path", (PyCFunction)bpy_resource_path, METH_VARARGS | METH_KEYWORDS, bpy_resource_path_doc}; static PyObject *bpy_import_test(const char *modname) @@ -279,7 +279,7 @@ void BPy_init_modules(void) PyModule_AddObject(mod, "data", BPY_rna_module()); /* imports bpy_types by running this */ bpy_import_test("bpy_types"); PyModule_AddObject(mod, "props", BPY_rna_props()); - /* ops is now a python module that does the conversion from SOME_OT_foo -> some.foo */ + /* ops is now a python module that does the conversion from SOME_OT_foo -> some.foo */ PyModule_AddObject(mod, "ops", BPY_operator_module()); PyModule_AddObject(mod, "app", BPY_app_struct()); diff --git a/source/blender/python/intern/bpy_app.c b/source/blender/python/intern/bpy_app.c index 7cd672ba0c5..aab1f508e32 100644 --- a/source/blender/python/intern/bpy_app.c +++ b/source/blender/python/intern/bpy_app.c @@ -223,10 +223,11 @@ PyDoc_STRVAR(bpy_app_driver_dict_doc, ); static PyObject *bpy_app_driver_dict_get(PyObject *UNUSED(self), void *UNUSED(closure)) { - if (bpy_pydriver_Dict == NULL) + if (bpy_pydriver_Dict == NULL) { if (bpy_pydriver_create_dict() != 0) { PyErr_SetString(PyExc_RuntimeError, "bpy.app.driver_namespace failed to create dictionary"); return NULL; + } } Py_INCREF(bpy_pydriver_Dict); diff --git a/source/blender/python/intern/bpy_app_ffmpeg.c b/source/blender/python/intern/bpy_app_ffmpeg.c index 778334c9600..44bba4c098f 100644 --- a/source/blender/python/intern/bpy_app_ffmpeg.c +++ b/source/blender/python/intern/bpy_app_ffmpeg.c @@ -88,16 +88,18 @@ static PyObject *make_ffmpeg_info(void) PyStructSequence_SET_ITEM(ffmpeg_info, pos++, obj) #ifdef WITH_FFMPEG - #define FFMPEG_LIB_VERSION(lib) \ +# define FFMPEG_LIB_VERSION(lib) { \ curversion = lib ## _version(); \ SetObjItem(Py_BuildValue("(iii)", \ - curversion >> 16, (curversion >> 8) % 256, curversion % 256)); \ + curversion >> 16, (curversion >> 8) % 256, curversion % 256)); \ SetObjItem(PyUnicode_FromFormat("%2d, %2d, %2d", \ - curversion >> 16, (curversion >> 8) % 256, curversion % 256)); + curversion >> 16, (curversion >> 8) % 256, curversion % 256)); \ +} (void)0 #else - #define FFMPEG_LIB_VERSION(lib) \ +# define FFMPEG_LIB_VERSION(lib) { \ SetStrItem("Unknown"); \ - SetStrItem("Unknown"); + SetStrItem("Unknown"); \ +} (void)0 #endif #ifdef WITH_FFMPEG diff --git a/source/blender/python/intern/bpy_app_handlers.c b/source/blender/python/intern/bpy_app_handlers.c index 2974e3cf3cb..5128cf0b924 100644 --- a/source/blender/python/intern/bpy_app_handlers.c +++ b/source/blender/python/intern/bpy_app_handlers.c @@ -71,7 +71,7 @@ static PyStructSequence_Desc app_cb_info_desc = { }; #if 0 -# if (BLI_CB_EVT_TOT != ((sizeof(app_cb_info_fields)/sizeof(PyStructSequence_Field)))) +# if (BLI_CB_EVT_TOT != ((sizeof(app_cb_info_fields) / sizeof(PyStructSequence_Field)))) # error "Callbacks are out of sync" # endif #endif @@ -118,51 +118,51 @@ static PyObject *bpy_app_handlers_persistent_new(PyTypeObject *UNUSED(type), PyO static PyTypeObject BPyPersistent_Type = { #if defined(_MSC_VER) || defined(FREE_WINDOWS) - PyVarObject_HEAD_INIT(NULL, 0) + PyVarObject_HEAD_INIT(NULL, 0) #else - PyVarObject_HEAD_INIT(&PyType_Type, 0) + PyVarObject_HEAD_INIT(&PyType_Type, 0) #endif - "persistent", /* tp_name */ - 0, /* tp_basicsize */ - 0, /* tp_itemsize */ - /* methods */ - 0, /* tp_dealloc */ - 0, /* tp_print */ - 0, /* tp_getattr */ - 0, /* tp_setattr */ - 0, /* tp_reserved */ - 0, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - 0, /* tp_hash */ - 0, /* tp_call */ - 0, /* tp_str */ - 0, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | - Py_TPFLAGS_BASETYPE, /* tp_flags */ - 0, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - 0, /* tp_iter */ - 0, /* tp_iternext */ - 0, /* tp_methods */ - 0, /* tp_members */ - 0, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - 0, /* tp_init */ - 0, /* tp_alloc */ - bpy_app_handlers_persistent_new, /* tp_new */ - 0, /* tp_free */ + "persistent", /* tp_name */ + 0, /* tp_basicsize */ + 0, /* tp_itemsize */ + /* methods */ + 0, /* tp_dealloc */ + 0, /* tp_print */ + 0, /* tp_getattr */ + 0, /* tp_setattr */ + 0, /* tp_reserved */ + 0, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + 0, /* tp_hash */ + 0, /* tp_call */ + 0, /* tp_str */ + 0, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | + Py_TPFLAGS_BASETYPE, /* tp_flags */ + 0, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + 0, /* tp_iter */ + 0, /* tp_iternext */ + 0, /* tp_methods */ + 0, /* tp_members */ + 0, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + 0, /* tp_init */ + 0, /* tp_alloc */ + bpy_app_handlers_persistent_new, /* tp_new */ + 0, /* tp_free */ }; static PyObject *py_cb_array[BLI_CB_EVT_TOT] = {NULL}; @@ -237,7 +237,7 @@ void BPY_app_handlers_reset(const short do_all) int pos = 0; if (do_all) { - for (pos = 0; pos < BLI_CB_EVT_TOT; pos++) { + for (pos = 0; pos < BLI_CB_EVT_TOT; pos++) { /* clear list */ PyList_SetSlice(py_cb_array[pos], 0, PY_SSIZE_T_MAX, NULL); } diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index f3d21c74080..61b3f7b1575 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -86,10 +86,10 @@ BPy_StructRNA *bpy_context_module = NULL; /* for fast access */ #ifdef TIME_PY_RUN #include "PIL_time.h" -static int bpy_timer_count = 0; -static double bpy_timer; /* time since python starts */ -static double bpy_timer_run; /* time for each python script run */ -static double bpy_timer_run_tot; /* accumulate python runs */ +static int bpy_timer_count = 0; +static double bpy_timer; /* time since python starts */ +static double bpy_timer_run; /* time for each python script run */ +static double bpy_timer_run_tot; /* accumulate python runs */ #endif /* use for updating while a python script runs - in case of file load */ @@ -184,7 +184,7 @@ extern PyObject *AUD_initPython(void); /* defined in cycles module */ static PyObject *CCL_initPython(void) { - return (PyObject*)CCL_python_module_init(); + return (PyObject *)CCL_python_module_init(); } #endif @@ -195,8 +195,8 @@ static struct _inittab bpy_internal_modules[] = { {(char *)"bgl", BPyInit_bgl}, {(char *)"blf", BPyInit_blf}, {(char *)"bmesh", BPyInit_bmesh}, - // {(char *)"bmesh.types", BPyInit_bmesh_types}, - // {(char *)"bmesh.utils", BPyInit_bmesh_utils}, + // {(char *)"bmesh.types", BPyInit_bmesh_types}, + // {(char *)"bmesh.utils", BPyInit_bmesh_utils}, #ifdef WITH_AUDASPACE {(char *)"aud", AUD_initPython}, #endif @@ -308,10 +308,10 @@ void BPY_python_end(void) printf("tot exec: %d, ", bpy_timer_count); printf("tot run: %.4fsec, ", bpy_timer_run_tot); if (bpy_timer_count > 0) - printf("average run: %.6fsec, ", (bpy_timer_run_tot/bpy_timer_count)); + printf("average run: %.6fsec, ", (bpy_timer_run_tot / bpy_timer_count)); if (bpy_timer > 0.0) - printf("tot usage %.4f%%", (bpy_timer_run_tot/bpy_timer) * 100.0); + printf("tot usage %.4f%%", (bpy_timer_run_tot / bpy_timer) * 100.0); printf("\n"); @@ -367,7 +367,7 @@ static int python_script_exec(bContext *C, const char *fn, struct Text *text, char fn_dummy[FILE_MAXDIR]; bpy_text_filename_get(fn_dummy, sizeof(fn_dummy), text); - if (text->compiled == NULL) { /* if it wasn't already compiled, do it now */ + if (text->compiled == NULL) { /* if it wasn't already compiled, do it now */ char *buf = txt_to_buf(text); text->compiled = Py_CompileString(buf, fn_dummy, Py_file_input); @@ -692,8 +692,8 @@ int BPY_context_member_get(bContext *C, const char *member, bContextDataResult * } if (done == 0) { - if (item) printf("PyContext '%s' not a valid type\n", member); - else printf("PyContext '%s' not found\n", member); + if (item) printf("PyContext '%s' not a valid type\n", member); + else printf("PyContext '%s' not found\n", member); } else { if (G.f & G_DEBUG) { diff --git a/source/blender/python/intern/bpy_library.c b/source/blender/python/intern/bpy_library.c index 9148ccde9a0..a5350b984c1 100644 --- a/source/blender/python/intern/bpy_library.c +++ b/source/blender/python/intern/bpy_library.c @@ -92,75 +92,75 @@ static void bpy_lib_dealloc(BPy_Library *self) static PyTypeObject bpy_lib_Type = { PyVarObject_HEAD_INIT(NULL, 0) - "bpy_lib", /* tp_name */ - sizeof(BPy_Library), /* tp_basicsize */ - 0, /* tp_itemsize */ + "bpy_lib", /* tp_name */ + sizeof(BPy_Library), /* tp_basicsize */ + 0, /* tp_itemsize */ /* methods */ - (destructor)bpy_lib_dealloc,/* tp_dealloc */ + (destructor)bpy_lib_dealloc, /* tp_dealloc */ NULL, /* printfunc tp_print; */ - NULL, /* getattrfunc tp_getattr; */ + NULL, /* getattrfunc tp_getattr; */ NULL, /* setattrfunc tp_setattr; */ - NULL, /* tp_compare */ /* DEPRECATED in python 3.0! */ - NULL, /* tp_repr */ + NULL, /* tp_compare */ /* DEPRECATED in python 3.0! */ + NULL, /* tp_repr */ /* Method suites for standard classes */ - NULL, /* PyNumberMethods *tp_as_number; */ - NULL, /* PySequenceMethods *tp_as_sequence; */ - NULL, /* PyMappingMethods *tp_as_mapping; */ + NULL, /* PyNumberMethods *tp_as_number; */ + NULL, /* PySequenceMethods *tp_as_sequence; */ + NULL, /* PyMappingMethods *tp_as_mapping; */ /* More standard operations (here for binary compatibility) */ - NULL, /* hashfunc tp_hash; */ + NULL, /* hashfunc tp_hash; */ NULL, /* ternaryfunc tp_call; */ NULL, /* reprfunc tp_str; */ /* will only use these if this is a subtype of a py class */ - NULL /*PyObject_GenericGetAttr is assigned later */, /* getattrofunc tp_getattro; */ - NULL, /* setattrofunc tp_setattro; */ + NULL /*PyObject_GenericGetAttr is assigned later */, /* getattrofunc tp_getattro; */ + NULL, /* setattrofunc tp_setattro; */ /* Functions to access object as input/output buffer */ NULL, /* PyBufferProcs *tp_as_buffer; */ - /*** Flags to define presence of optional/expanded features ***/ + /*** Flags to define presence of optional/expanded features ***/ Py_TPFLAGS_DEFAULT, /* long tp_flags; */ - NULL, /* char *tp_doc; Documentation string */ - /*** Assigned meaning in release 2.0 ***/ + NULL, /* char *tp_doc; Documentation string */ + /*** Assigned meaning in release 2.0 ***/ /* call function for all accessible objects */ NULL, /* traverseproc tp_traverse; */ /* delete references to contained objects */ NULL, /* inquiry tp_clear; */ - /*** Assigned meaning in release 2.1 ***/ - /*** rich comparisons ***/ + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ NULL, /* subclassed */ /* richcmpfunc tp_richcompare; */ - /*** weak reference enabler ***/ + /*** weak reference enabler ***/ 0, - /*** Added in release 2.2 ***/ + /*** Added in release 2.2 ***/ /* Iterators */ - NULL, /* getiterfunc tp_iter; */ + NULL, /* getiterfunc tp_iter; */ NULL, /* iternextfunc tp_iternext; */ - /*** Attribute descriptor and subclassing stuff ***/ - bpy_lib_methods, /* struct PyMethodDef *tp_methods; */ + /*** Attribute descriptor and subclassing stuff ***/ + bpy_lib_methods, /* struct PyMethodDef *tp_methods; */ NULL, /* struct PyMemberDef *tp_members; */ - NULL, /* struct PyGetSetDef *tp_getset; */ + NULL, /* struct PyGetSetDef *tp_getset; */ NULL, /* struct _typeobject *tp_base; */ NULL, /* PyObject *tp_dict; */ NULL, /* descrgetfunc tp_descr_get; */ NULL, /* descrsetfunc tp_descr_set; */ - offsetof(BPy_Library, dict),/* long tp_dictoffset; */ + offsetof(BPy_Library, dict), /* long tp_dictoffset; */ NULL, /* initproc tp_init; */ NULL, /* allocfunc tp_alloc; */ - NULL, /* newfunc tp_new; */ + NULL, /* newfunc tp_new; */ /* Low-level free-memory routine */ NULL, /* freefunc tp_free; */ /* For PyObject_IS_GC */ NULL, /* inquiry tp_is_gc; */ - NULL, /* PyObject *tp_bases; */ + NULL, /* PyObject *tp_bases; */ /* method resolution order */ NULL, /* PyObject *tp_mro; */ NULL, /* PyObject *tp_cache; */ @@ -170,18 +170,18 @@ static PyTypeObject bpy_lib_Type = { }; PyDoc_STRVAR(bpy_lib_load_doc, -".. method:: load(filepath, link=False, relative=False)\n" -"\n" -" Returns a context manager which exposes 2 library objects on entering.\n" -" Each object has attributes matching bpy.data which are lists of strings to be linked.\n" -"\n" -" :arg filepath: The path to a blend file.\n" -" :type filepath: string\n" -" :arg link: When False reference to the original file is lost.\n" -" :type link: bool\n" -" :arg relative: When True the path is stored relative to the open blend file.\n" -" :type relative: bool\n" -); + ".. method:: load(filepath, link=False, relative=False)\n" + "\n" + " Returns a context manager which exposes 2 library objects on entering.\n" + " Each object has attributes matching bpy.data which are lists of strings to be linked.\n" + "\n" + " :arg filepath: The path to a blend file.\n" + " :type filepath: string\n" + " :arg link: When False reference to the original file is lost.\n" + " :type link: bool\n" + " :arg relative: When True the path is stored relative to the open blend file.\n" + " :type relative: bool\n" + ); static PyObject *bpy_lib_load(PyObject *UNUSED(self), PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"filepath", "link", "relative", NULL}; @@ -222,7 +222,7 @@ static PyObject *_bpy_names(BPy_Library *self, int blocktype) PyList_SET_ITEM(list, counter, PyUnicode_FromString((char *)l->link)); counter++; } - BLI_linklist_free(names, free); /* free linklist *and* each node's data */ + BLI_linklist_free(names, free); /* free linklist *and* each node's data */ } else { list = PyList_New(0); @@ -401,7 +401,8 @@ static PyObject *bpy_lib_exit(BPy_Library *self, PyObject *UNUSED(args)) BLO_blendhandle_close(self->blo_handle); self->blo_handle = NULL; - { /* copied from wm_operator.c */ + /* copied from wm_operator.c */ + { /* mark all library linked objects to be updated */ recalc_all_library_objects(G.main); @@ -426,8 +427,8 @@ static PyObject *bpy_lib_dir(BPy_Library *self) int bpy_lib_init(PyObject *mod_par) { static PyMethodDef load_meth = {"load", (PyCFunction)bpy_lib_load, - METH_STATIC|METH_VARARGS|METH_KEYWORDS, - bpy_lib_load_doc}; + METH_STATIC | METH_VARARGS | METH_KEYWORDS, + bpy_lib_load_doc}; PyModule_AddObject(mod_par, "_library_load", PyCFunction_New(&load_meth, NULL)); diff --git a/source/blender/python/intern/bpy_operator.c b/source/blender/python/intern/bpy_operator.c index 14058c96633..8f5a9fec86b 100644 --- a/source/blender/python/intern/bpy_operator.c +++ b/source/blender/python/intern/bpy_operator.c @@ -65,11 +65,11 @@ static PyObject *pyop_poll(PyObject *UNUSED(self), PyObject *args) { wmOperatorType *ot; - char *opname; - PyObject *context_dict = NULL; /* optional args */ - PyObject *context_dict_back; - char *context_str = NULL; - PyObject *ret; + char *opname; + PyObject *context_dict = NULL; /* optional args */ + PyObject *context_dict_back; + char *context_str = NULL; + PyObject *ret; int context = WM_OP_EXEC_DEFAULT; @@ -139,11 +139,11 @@ static PyObject *pyop_call(PyObject *UNUSED(self), PyObject *args) PointerRNA ptr; int operator_ret = OPERATOR_CANCELLED; - char *opname; - char *context_str = NULL; - PyObject *kw = NULL; /* optional args */ - PyObject *context_dict = NULL; /* optional args */ - PyObject *context_dict_back; + char *opname; + char *context_str = NULL; + PyObject *kw = NULL; /* optional args */ + PyObject *context_dict = NULL; /* optional args */ + PyObject *context_dict_back; /* note that context is an int, python does the conversion in this case */ int context = WM_OP_EXEC_DEFAULT; @@ -306,8 +306,8 @@ static PyObject *pyop_as_string(PyObject *UNUSED(self), PyObject *args) wmOperatorType *ot; PointerRNA ptr; - char *opname; - PyObject *kw = NULL; /* optional args */ + char *opname; + PyObject *kw = NULL; /* optional args */ int all_args = 1; int error_val = 0; @@ -462,7 +462,7 @@ static struct PyModuleDef bpy_ops_module = { PyModuleDef_HEAD_INIT, "_bpy.ops", NULL, - -1,/* multiple "initialization" just copies the module dict. */ + -1, /* multiple "initialization" just copies the module dict. */ bpy_ops_methods, NULL, NULL, NULL, NULL }; diff --git a/source/blender/python/intern/bpy_operator_wrap.c b/source/blender/python/intern/bpy_operator_wrap.c index 39780e7e257..1caec294aa0 100644 --- a/source/blender/python/intern/bpy_operator_wrap.c +++ b/source/blender/python/intern/bpy_operator_wrap.c @@ -69,7 +69,8 @@ void operator_wrapper(wmOperatorType *ot, void *userdata) operator_properties_init(ot); - { /* XXX - not nice, set the first enum as searchable, should have a way for python to set */ + /* XXX - not nice, set the first enum as searchable, should have a way for python to set */ + { PointerRNA ptr; PropertyRNA *prop; diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c index ae818eb2491..4d0c05f6582 100644 --- a/source/blender/python/intern/bpy_props.c +++ b/source/blender/python/intern/bpy_props.c @@ -399,7 +399,7 @@ static PyObject *BPy_BoolProperty(PyObject *self, PyObject *args, PyObject *kw) if (srna) { static const char *kwlist[] = {"attr", "name", "description", "default", - "options", "subtype", "update", NULL}; + "options", "subtype", "update", NULL}; const char *id = NULL, *name = NULL, *description = ""; int id_len; int def = 0; @@ -475,7 +475,7 @@ static PyObject *BPy_BoolVectorProperty(PyObject *self, PyObject *args, PyObject if (srna) { static const char *kwlist[] = {"attr", "name", "description", "default", - "options", "subtype", "size", "update", NULL}; + "options", "subtype", "size", "update", NULL}; const char *id = NULL, *name = NULL, *description = ""; int id_len; int def[PYRNA_STACK_ARRAY] = {0}; @@ -561,7 +561,7 @@ static PyObject *BPy_IntProperty(PyObject *self, PyObject *args, PyObject *kw) if (srna) { static const char *kwlist[] = {"attr", "name", "description", "default", - "min", "max", "soft_min", "soft_max", + "min", "max", "soft_min", "soft_max", "step", "options", "subtype", "update", NULL}; const char *id = NULL, *name = NULL, *description = ""; int id_len; @@ -642,8 +642,8 @@ static PyObject *BPy_IntVectorProperty(PyObject *self, PyObject *args, PyObject if (srna) { static const char *kwlist[] = {"attr", "name", "description", "default", - "min", "max", "soft_min", "soft_max", - "step", "options", "subtype", "size", "update", NULL}; + "min", "max", "soft_min", "soft_max", + "step", "options", "subtype", "size", "update", NULL}; const char *id = NULL, *name = NULL, *description = ""; int id_len; int min = INT_MIN, max = INT_MAX, soft_min = INT_MIN, soft_max = INT_MAX, step = 1; @@ -736,8 +736,8 @@ static PyObject *BPy_FloatProperty(PyObject *self, PyObject *args, PyObject *kw) if (srna) { static const char *kwlist[] = {"attr", "name", "description", "default", - "min", "max", "soft_min", "soft_max", - "step", "precision", "options", "subtype", "unit", "update", NULL}; + "min", "max", "soft_min", "soft_max", + "step", "precision", "options", "subtype", "unit", "update", NULL}; const char *id = NULL, *name = NULL, *description = ""; int id_len; float min = -FLT_MAX, max = FLT_MAX, soft_min = -FLT_MAX, soft_max = FLT_MAX, step = 3, def = 0.0f; @@ -829,8 +829,8 @@ static PyObject *BPy_FloatVectorProperty(PyObject *self, PyObject *args, PyObjec if (srna) { static const char *kwlist[] = {"attr", "name", "description", "default", - "min", "max", "soft_min", "soft_max", - "step", "precision", "options", "subtype", "unit", "size", "update", NULL}; + "min", "max", "soft_min", "soft_max", + "step", "precision", "options", "subtype", "unit", "size", "update", NULL}; const char *id = NULL, *name = NULL, *description = ""; int id_len; float min = -FLT_MAX, max = FLT_MAX, soft_min = -FLT_MAX, soft_max = FLT_MAX, step = 3; @@ -924,7 +924,7 @@ static PyObject *BPy_StringProperty(PyObject *self, PyObject *args, PyObject *kw if (srna) { static const char *kwlist[] = {"attr", "name", "description", "default", - "maxlen", "options", "subtype", "update", NULL}; + "maxlen", "options", "subtype", "update", NULL}; const char *id = NULL, *name = NULL, *description = "", *def = ""; int id_len; int maxlen = 0; @@ -952,7 +952,7 @@ static PyObject *BPy_StringProperty(PyObject *self, PyObject *args, PyObject *kw } prop = RNA_def_property(srna, id, PROP_STRING, subtype); - if (maxlen != 0) RNA_def_property_string_maxlength(prop, maxlen + 1); /* +1 since it includes null terminator */ + if (maxlen != 0) RNA_def_property_string_maxlength(prop, maxlen + 1); /* +1 since it includes null terminator */ if (def) RNA_def_property_string_default(prop, def); RNA_def_property_ui_text(prop, name ? name : id, description); @@ -1110,7 +1110,7 @@ static EnumPropertyItem *enum_items_from_py(PyObject *seq_fast, PyObject *def, i * annoying because it works most of the time without this. */ { EnumPropertyItem *items_dup = MEM_mallocN((sizeof(EnumPropertyItem) * (seq_len + 1)) + (sizeof(char) * totbuf), - "enum_items_from_py2"); + "enum_items_from_py2"); EnumPropertyItem *items_ptr = items_dup; char *buf = ((char *)items_dup) + (sizeof(EnumPropertyItem) * (seq_len + 1)); memcpy(items_dup, items, sizeof(EnumPropertyItem) * (seq_len + 1)); @@ -1162,7 +1162,7 @@ static EnumPropertyItem *bpy_props_enum_itemf(struct bContext *C, PointerRNA *pt int defvalue_dummy = 0; if (!(items_fast = PySequence_Fast(items, "EnumProperty(...): " - "return value from the callback was not a sequence"))) + "return value from the callback was not a sequence"))) { err = -1; } @@ -1230,7 +1230,7 @@ static PyObject *BPy_EnumProperty(PyObject *self, PyObject *args, PyObject *kw) if (srna) { static const char *kwlist[] = {"attr", "items", "name", "description", "default", - "options", "update", NULL}; + "options", "update", NULL}; const char *id = NULL, *name = NULL, *description = ""; PyObject *def = NULL; int id_len; @@ -1281,7 +1281,7 @@ static PyObject *BPy_EnumProperty(PyObject *self, PyObject *args, PyObject *kw) } else { if (!(items_fast = PySequence_Fast(items, "EnumProperty(...): " - "expected a sequence of tuples for the enum items or a function"))) + "expected a sequence of tuples for the enum items or a function"))) { return NULL; } @@ -1531,18 +1531,18 @@ static PyObject *BPy_RemoveProperty(PyObject *self, PyObject *args, PyObject *kw } static struct PyMethodDef props_methods[] = { - {"BoolProperty", (PyCFunction)BPy_BoolProperty, METH_VARARGS|METH_KEYWORDS, BPy_BoolProperty_doc}, - {"BoolVectorProperty", (PyCFunction)BPy_BoolVectorProperty, METH_VARARGS|METH_KEYWORDS, BPy_BoolVectorProperty_doc}, - {"IntProperty", (PyCFunction)BPy_IntProperty, METH_VARARGS|METH_KEYWORDS, BPy_IntProperty_doc}, - {"IntVectorProperty", (PyCFunction)BPy_IntVectorProperty, METH_VARARGS|METH_KEYWORDS, BPy_IntVectorProperty_doc}, - {"FloatProperty", (PyCFunction)BPy_FloatProperty, METH_VARARGS|METH_KEYWORDS, BPy_FloatProperty_doc}, - {"FloatVectorProperty", (PyCFunction)BPy_FloatVectorProperty, METH_VARARGS|METH_KEYWORDS, BPy_FloatVectorProperty_doc}, - {"StringProperty", (PyCFunction)BPy_StringProperty, METH_VARARGS|METH_KEYWORDS, BPy_StringProperty_doc}, - {"EnumProperty", (PyCFunction)BPy_EnumProperty, METH_VARARGS|METH_KEYWORDS, BPy_EnumProperty_doc}, - {"PointerProperty", (PyCFunction)BPy_PointerProperty, METH_VARARGS|METH_KEYWORDS, BPy_PointerProperty_doc}, - {"CollectionProperty", (PyCFunction)BPy_CollectionProperty, METH_VARARGS|METH_KEYWORDS, BPy_CollectionProperty_doc}, - - {"RemoveProperty", (PyCFunction)BPy_RemoveProperty, METH_VARARGS|METH_KEYWORDS, BPy_RemoveProperty_doc}, + {"BoolProperty", (PyCFunction)BPy_BoolProperty, METH_VARARGS | METH_KEYWORDS, BPy_BoolProperty_doc}, + {"BoolVectorProperty", (PyCFunction)BPy_BoolVectorProperty, METH_VARARGS | METH_KEYWORDS, BPy_BoolVectorProperty_doc}, + {"IntProperty", (PyCFunction)BPy_IntProperty, METH_VARARGS | METH_KEYWORDS, BPy_IntProperty_doc}, + {"IntVectorProperty", (PyCFunction)BPy_IntVectorProperty, METH_VARARGS | METH_KEYWORDS, BPy_IntVectorProperty_doc}, + {"FloatProperty", (PyCFunction)BPy_FloatProperty, METH_VARARGS | METH_KEYWORDS, BPy_FloatProperty_doc}, + {"FloatVectorProperty", (PyCFunction)BPy_FloatVectorProperty, METH_VARARGS | METH_KEYWORDS, BPy_FloatVectorProperty_doc}, + {"StringProperty", (PyCFunction)BPy_StringProperty, METH_VARARGS | METH_KEYWORDS, BPy_StringProperty_doc}, + {"EnumProperty", (PyCFunction)BPy_EnumProperty, METH_VARARGS | METH_KEYWORDS, BPy_EnumProperty_doc}, + {"PointerProperty", (PyCFunction)BPy_PointerProperty, METH_VARARGS | METH_KEYWORDS, BPy_PointerProperty_doc}, + {"CollectionProperty", (PyCFunction)BPy_CollectionProperty, METH_VARARGS | METH_KEYWORDS, BPy_CollectionProperty_doc}, + + {"RemoveProperty", (PyCFunction)BPy_RemoveProperty, METH_VARARGS | METH_KEYWORDS, BPy_RemoveProperty_doc}, {NULL, NULL, 0, NULL} }; @@ -1551,7 +1551,7 @@ static struct PyModuleDef props_module = { "bpy.props", "This module defines properties to extend blenders internal data, the result of these functions" " is used to assign properties to classes registered with blender and can't be used directly.", - -1,/* multiple "initialization" just copies the module dict. */ + -1, /* multiple "initialization" just copies the module dict. */ props_methods, NULL, NULL, NULL, NULL }; diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index d66b7f98796..1f284ae01cb 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -508,11 +508,11 @@ static int mathutils_rna_vector_set_index(BaseMathObject *bmo, int UNUSED(subtyp } static Mathutils_Callback mathutils_rna_array_cb = { - (BaseMathCheckFunc) mathutils_rna_generic_check, - (BaseMathGetFunc) mathutils_rna_vector_get, - (BaseMathSetFunc) mathutils_rna_vector_set, - (BaseMathGetIndexFunc) mathutils_rna_vector_get_index, - (BaseMathSetIndexFunc) mathutils_rna_vector_set_index + (BaseMathCheckFunc) mathutils_rna_generic_check, + (BaseMathGetFunc) mathutils_rna_vector_get, + (BaseMathSetFunc) mathutils_rna_vector_set, + (BaseMathGetIndexFunc) mathutils_rna_vector_get_index, + (BaseMathSetIndexFunc) mathutils_rna_vector_set_index }; @@ -622,91 +622,91 @@ PyObject *pyrna_math_object_from_array(PointerRNA *ptr, PropertyRNA *prop) if (totdim == 1 || (totdim == 2 && subtype == PROP_MATRIX)) { if (!is_thick) - ret = pyrna_prop_CreatePyObject(ptr, prop); /* owned by the mathutils PyObject */ + ret = pyrna_prop_CreatePyObject(ptr, prop); /* owned by the mathutils PyObject */ switch (subtype) { - case PROP_ALL_VECTOR_SUBTYPES: - if (len >= 2 && len <= 4) { - if (is_thick) { - ret = Vector_CreatePyObject(NULL, len, Py_NEW, NULL); - RNA_property_float_get_array(ptr, prop, ((VectorObject *)ret)->vec); - } - else { - PyObject *vec_cb = Vector_CreatePyObject_cb(ret, len, mathutils_rna_array_cb_index, MATHUTILS_CB_SUBTYPE_VEC); - Py_DECREF(ret); /* the vector owns now */ - ret = vec_cb; /* return the vector instead */ - } - } - break; - case PROP_MATRIX: - if (len == 16) { - if (is_thick) { - ret = Matrix_CreatePyObject(NULL, 4, 4, Py_NEW, NULL); - RNA_property_float_get_array(ptr, prop, ((MatrixObject *)ret)->matrix); - } - else { - PyObject *mat_cb = Matrix_CreatePyObject_cb(ret, 4,4, mathutils_rna_matrix_cb_index, FALSE); - Py_DECREF(ret); /* the matrix owns now */ - ret = mat_cb; /* return the matrix instead */ - } - } - else if (len == 9) { - if (is_thick) { - ret = Matrix_CreatePyObject(NULL, 3, 3, Py_NEW, NULL); - RNA_property_float_get_array(ptr, prop, ((MatrixObject *)ret)->matrix); - } - else { - PyObject *mat_cb = Matrix_CreatePyObject_cb(ret, 3,3, mathutils_rna_matrix_cb_index, FALSE); - Py_DECREF(ret); /* the matrix owns now */ - ret = mat_cb; /* return the matrix instead */ - } - } - break; - case PROP_EULER: - case PROP_QUATERNION: - if (len == 3) { /* euler */ - if (is_thick) { - /* attempt to get order, only needed for thick types since wrapped with update via callbacks */ - PropertyRNA *prop_eul_order = NULL; - short order = pyrna_rotation_euler_order_get(ptr, &prop_eul_order, EULER_ORDER_XYZ); - - ret = Euler_CreatePyObject(NULL, order, Py_NEW, NULL); // TODO, get order from RNA - RNA_property_float_get_array(ptr, prop, ((EulerObject *)ret)->eul); + case PROP_ALL_VECTOR_SUBTYPES: + if (len >= 2 && len <= 4) { + if (is_thick) { + ret = Vector_CreatePyObject(NULL, len, Py_NEW, NULL); + RNA_property_float_get_array(ptr, prop, ((VectorObject *)ret)->vec); + } + else { + PyObject *vec_cb = Vector_CreatePyObject_cb(ret, len, mathutils_rna_array_cb_index, MATHUTILS_CB_SUBTYPE_VEC); + Py_DECREF(ret); /* the vector owns now */ + ret = vec_cb; /* return the vector instead */ + } } - else { - /* order will be updated from callback on use */ - PyObject *eul_cb = Euler_CreatePyObject_cb(ret, EULER_ORDER_XYZ, mathutils_rna_array_cb_index, MATHUTILS_CB_SUBTYPE_EUL); // TODO, get order from RNA - Py_DECREF(ret); /* the euler owns now */ - ret = eul_cb; /* return the euler instead */ + break; + case PROP_MATRIX: + if (len == 16) { + if (is_thick) { + ret = Matrix_CreatePyObject(NULL, 4, 4, Py_NEW, NULL); + RNA_property_float_get_array(ptr, prop, ((MatrixObject *)ret)->matrix); + } + else { + PyObject *mat_cb = Matrix_CreatePyObject_cb(ret, 4, 4, mathutils_rna_matrix_cb_index, FALSE); + Py_DECREF(ret); /* the matrix owns now */ + ret = mat_cb; /* return the matrix instead */ + } } - } - else if (len == 4) { - if (is_thick) { - ret = Quaternion_CreatePyObject(NULL, Py_NEW, NULL); - RNA_property_float_get_array(ptr, prop, ((QuaternionObject *)ret)->quat); + else if (len == 9) { + if (is_thick) { + ret = Matrix_CreatePyObject(NULL, 3, 3, Py_NEW, NULL); + RNA_property_float_get_array(ptr, prop, ((MatrixObject *)ret)->matrix); + } + else { + PyObject *mat_cb = Matrix_CreatePyObject_cb(ret, 3, 3, mathutils_rna_matrix_cb_index, FALSE); + Py_DECREF(ret); /* the matrix owns now */ + ret = mat_cb; /* return the matrix instead */ + } } - else { - PyObject *quat_cb = Quaternion_CreatePyObject_cb(ret, mathutils_rna_array_cb_index, MATHUTILS_CB_SUBTYPE_QUAT); - Py_DECREF(ret); /* the quat owns now */ - ret = quat_cb; /* return the quat instead */ + break; + case PROP_EULER: + case PROP_QUATERNION: + if (len == 3) { /* euler */ + if (is_thick) { + /* attempt to get order, only needed for thick types since wrapped with update via callbacks */ + PropertyRNA *prop_eul_order = NULL; + short order = pyrna_rotation_euler_order_get(ptr, &prop_eul_order, EULER_ORDER_XYZ); + + ret = Euler_CreatePyObject(NULL, order, Py_NEW, NULL); // TODO, get order from RNA + RNA_property_float_get_array(ptr, prop, ((EulerObject *)ret)->eul); + } + else { + /* order will be updated from callback on use */ + PyObject *eul_cb = Euler_CreatePyObject_cb(ret, EULER_ORDER_XYZ, mathutils_rna_array_cb_index, MATHUTILS_CB_SUBTYPE_EUL); // TODO, get order from RNA + Py_DECREF(ret); /* the euler owns now */ + ret = eul_cb; /* return the euler instead */ + } } - } - break; - case PROP_COLOR: - case PROP_COLOR_GAMMA: - if (len == 3) { /* color */ - if (is_thick) { - ret = Color_CreatePyObject(NULL, Py_NEW, NULL); // TODO, get order from RNA - RNA_property_float_get_array(ptr, prop, ((ColorObject *)ret)->col); + else if (len == 4) { + if (is_thick) { + ret = Quaternion_CreatePyObject(NULL, Py_NEW, NULL); + RNA_property_float_get_array(ptr, prop, ((QuaternionObject *)ret)->quat); + } + else { + PyObject *quat_cb = Quaternion_CreatePyObject_cb(ret, mathutils_rna_array_cb_index, MATHUTILS_CB_SUBTYPE_QUAT); + Py_DECREF(ret); /* the quat owns now */ + ret = quat_cb; /* return the quat instead */ + } } - else { - PyObject *col_cb = Color_CreatePyObject_cb(ret, mathutils_rna_array_cb_index, MATHUTILS_CB_SUBTYPE_COLOR); - Py_DECREF(ret); /* the color owns now */ - ret = col_cb; /* return the color instead */ + break; + case PROP_COLOR: + case PROP_COLOR_GAMMA: + if (len == 3) { /* color */ + if (is_thick) { + ret = Color_CreatePyObject(NULL, Py_NEW, NULL); // TODO, get order from RNA + RNA_property_float_get_array(ptr, prop, ((ColorObject *)ret)->col); + } + else { + PyObject *col_cb = Color_CreatePyObject_cb(ret, mathutils_rna_array_cb_index, MATHUTILS_CB_SUBTYPE_COLOR); + Py_DECREF(ret); /* the color owns now */ + ret = col_cb; /* return the color instead */ + } } - } - default: - break; + default: + break; } } @@ -840,8 +840,8 @@ static PyObject *pyrna_struct_str(BPy_StructRNA *self) name = RNA_struct_name_get_alloc(&self->ptr, NULL, 0, NULL); if (name) { ret = PyUnicode_FromFormat("", - RNA_struct_identifier(self->ptr.type), - name); + RNA_struct_identifier(self->ptr.type), + name); MEM_freeN((void *)name); return ret; } @@ -858,30 +858,30 @@ static PyObject *pyrna_struct_repr(BPy_StructRNA *self) PyObject *ret; if (id == NULL || !PYRNA_STRUCT_IS_VALID(self)) - return pyrna_struct_str(self); /* fallback */ + return pyrna_struct_str(self); /* fallback */ tmp_str = PyUnicode_FromString(id->name + 2); if (RNA_struct_is_ID(self->ptr.type)) { ret = PyUnicode_FromFormat("bpy.data.%s[%R]", - BKE_idcode_to_name_plural(GS(id->name)), - tmp_str); + BKE_idcode_to_name_plural(GS(id->name)), + tmp_str); } else { const char *path; path = RNA_path_from_ID_to_struct(&self->ptr); if (path) { ret = PyUnicode_FromFormat("bpy.data.%s[%R].%s", - BKE_idcode_to_name_plural(GS(id->name)), - tmp_str, - path); + BKE_idcode_to_name_plural(GS(id->name)), + tmp_str, + path); MEM_freeN((void *)path); } else { /* cant find, print something sane */ ret = PyUnicode_FromFormat("bpy.data.%s[%R]...%s", - BKE_idcode_to_name_plural(GS(id->name)), - tmp_str, - RNA_struct_identifier(self->ptr.type)); + BKE_idcode_to_name_plural(GS(id->name)), + tmp_str, + RNA_struct_identifier(self->ptr.type)); } } @@ -932,10 +932,10 @@ static PyObject *pyrna_prop_str(BPy_PropertyRNA *self) if (name) { ret = PyUnicode_FromFormat("", - type_fmt, - RNA_struct_identifier(self->ptr.type), - RNA_property_identifier(self->prop), - name); + type_fmt, + RNA_struct_identifier(self->ptr.type), + RNA_property_identifier(self->prop), + name); MEM_freeN((void *)name); return ret; } @@ -965,23 +965,23 @@ static PyObject *pyrna_prop_repr(BPy_PropertyRNA *self) PYRNA_PROP_CHECK_OBJ(self); if (id == NULL) - return pyrna_prop_str(self); /* fallback */ + return pyrna_prop_str(self); /* fallback */ tmp_str = PyUnicode_FromString(id->name + 2); path = RNA_path_from_ID_to_property(&self->ptr, self->prop); if (path) { ret = PyUnicode_FromFormat("bpy.data.%s[%R].%s", - BKE_idcode_to_name_plural(GS(id->name)), - tmp_str, - path); + BKE_idcode_to_name_plural(GS(id->name)), + tmp_str, + path); MEM_freeN((void *)path); } else { /* cant find, print something sane */ ret = PyUnicode_FromFormat("bpy.data.%s[%R]...%s", - BKE_idcode_to_name_plural(GS(id->name)), - tmp_str, - RNA_property_identifier(self->prop)); + BKE_idcode_to_name_plural(GS(id->name)), + tmp_str, + RNA_property_identifier(self->prop)); } Py_DECREF(tmp_str); @@ -1286,17 +1286,17 @@ static PyObject *pyrna_enum_to_py(PointerRNA *ptr, PropertyRNA *prop, int val) /* prefer not fail silently in case of api errors, maybe disable it later */ printf("RNA Warning: Current value \"%d\" " - "matches no enum in '%s', '%s', '%s'\n", - val, RNA_struct_identifier(ptr->type), - ptr_name, RNA_property_identifier(prop)); + "matches no enum in '%s', '%s', '%s'\n", + val, RNA_struct_identifier(ptr->type), + ptr_name, RNA_property_identifier(prop)); -#if 0 // gives python decoding errors while generating docs :( +#if 0 // gives python decoding errors while generating docs :( char error_str[256]; BLI_snprintf(error_str, sizeof(error_str), - "RNA Warning: Current value \"%d\" " - "matches no enum in '%s', '%s', '%s'", - val, RNA_struct_identifier(ptr->type), - ptr_name, RNA_property_identifier(prop)); + "RNA Warning: Current value \"%d\" " + "matches no enum in '%s', '%s', '%s'", + val, RNA_struct_identifier(ptr->type), + ptr_name, RNA_property_identifier(prop)); PyErr_Warn(PyExc_RuntimeWarning, error_str); #endif @@ -1331,73 +1331,73 @@ PyObject *pyrna_prop_to_py(PointerRNA *ptr, PropertyRNA *prop) /* see if we can coorce into a python type - PropertyType */ switch (type) { - case PROP_BOOLEAN: - ret = PyBool_FromLong(RNA_property_boolean_get(ptr, prop)); - break; - case PROP_INT: - ret = PyLong_FromSsize_t((Py_ssize_t)RNA_property_int_get(ptr, prop)); - break; - case PROP_FLOAT: - ret = PyFloat_FromDouble(RNA_property_float_get(ptr, prop)); - break; - case PROP_STRING: - { - const int subtype = RNA_property_subtype(prop); - const char *buf; - int buf_len; - char buf_fixed[32]; + case PROP_BOOLEAN: + ret = PyBool_FromLong(RNA_property_boolean_get(ptr, prop)); + break; + case PROP_INT: + ret = PyLong_FromSsize_t((Py_ssize_t)RNA_property_int_get(ptr, prop)); + break; + case PROP_FLOAT: + ret = PyFloat_FromDouble(RNA_property_float_get(ptr, prop)); + break; + case PROP_STRING: + { + const int subtype = RNA_property_subtype(prop); + const char *buf; + int buf_len; + char buf_fixed[32]; - buf = RNA_property_string_get_alloc(ptr, prop, buf_fixed, sizeof(buf_fixed), &buf_len); + buf = RNA_property_string_get_alloc(ptr, prop, buf_fixed, sizeof(buf_fixed), &buf_len); #ifdef USE_STRING_COERCE - /* only file paths get special treatment, they may contain non utf-8 chars */ - if (subtype == PROP_BYTESTRING) { - ret = PyBytes_FromStringAndSize(buf, buf_len); - } - else if (ELEM3(subtype, PROP_FILEPATH, PROP_DIRPATH, PROP_FILENAME)) { - ret = PyC_UnicodeFromByteAndSize(buf, buf_len); - } - else { - ret = PyUnicode_FromStringAndSize(buf, buf_len); - } + /* only file paths get special treatment, they may contain non utf-8 chars */ + if (subtype == PROP_BYTESTRING) { + ret = PyBytes_FromStringAndSize(buf, buf_len); + } + else if (ELEM3(subtype, PROP_FILEPATH, PROP_DIRPATH, PROP_FILENAME)) { + ret = PyC_UnicodeFromByteAndSize(buf, buf_len); + } + else { + ret = PyUnicode_FromStringAndSize(buf, buf_len); + } #else // USE_STRING_COERCE - if (subtype == PROP_BYTESTRING) { - ret = PyBytes_FromStringAndSize(buf, buf_len); - } - else { - ret = PyUnicode_FromStringAndSize(buf, buf_len); - } + if (subtype == PROP_BYTESTRING) { + ret = PyBytes_FromStringAndSize(buf, buf_len); + } + else { + ret = PyUnicode_FromStringAndSize(buf, buf_len); + } #endif // USE_STRING_COERCE - if (buf_fixed != buf) { - MEM_freeN((void *)buf); + if (buf_fixed != buf) { + MEM_freeN((void *)buf); + } + break; } - break; - } - case PROP_ENUM: - { - ret = pyrna_enum_to_py(ptr, prop, RNA_property_enum_get(ptr, prop)); - break; - } - case PROP_POINTER: - { - PointerRNA newptr; - newptr = RNA_property_pointer_get(ptr, prop); - if (newptr.data) { - ret = pyrna_struct_CreatePyObject(&newptr); + case PROP_ENUM: + { + ret = pyrna_enum_to_py(ptr, prop, RNA_property_enum_get(ptr, prop)); + break; } - else { - ret = Py_None; - Py_INCREF(ret); + case PROP_POINTER: + { + PointerRNA newptr; + newptr = RNA_property_pointer_get(ptr, prop); + if (newptr.data) { + ret = pyrna_struct_CreatePyObject(&newptr); + } + else { + ret = Py_None; + Py_INCREF(ret); + } + break; } - break; - } - case PROP_COLLECTION: - ret = pyrna_prop_CreatePyObject(ptr, prop); - break; - default: - PyErr_Format(PyExc_TypeError, - "bpy_struct internal error: unknown type '%d' (pyrna_prop_to_py)", type); - ret = NULL; - break; + case PROP_COLLECTION: + ret = pyrna_prop_CreatePyObject(ptr, prop); + break; + default: + PyErr_Format(PyExc_TypeError, + "bpy_struct internal error: unknown type '%d' (pyrna_prop_to_py)", type); + ret = NULL; + break; } return ret; @@ -1412,7 +1412,7 @@ int pyrna_pydict_to_props(PointerRNA *ptr, PyObject *kw, int all_args, const cha const char *arg_name = NULL; PyObject *item; - totkw = kw ? PyDict_Size(kw):0; + totkw = kw ? PyDict_Size(kw) : 0; RNA_STRUCT_BEGIN(ptr, prop) { arg_name = RNA_property_identifier(prop); @@ -1470,7 +1470,7 @@ int pyrna_pydict_to_props(PointerRNA *ptr, PyObject *kw, int all_args, const cha static PyObject *pyrna_func_to_py(PointerRNA *ptr, FunctionRNA *func) { - BPy_FunctionRNA* pyfunc = (BPy_FunctionRNA *) PyObject_NEW(BPy_FunctionRNA, &pyrna_func_Type); + BPy_FunctionRNA *pyfunc = (BPy_FunctionRNA *) PyObject_NEW(BPy_FunctionRNA, &pyrna_func_Type); pyfunc->ptr = *ptr; pyfunc->func = func; return (PyObject *)pyfunc; @@ -1494,298 +1494,310 @@ static int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyOb /* see if we can coorce into a python type - PropertyType */ switch (type) { - case PROP_BOOLEAN: - { - int param; - /* prefer not to have an exception here - * however so many poll functions return None or a valid Object. - * its a hassle to convert these into a bool before returning, */ - if (RNA_property_flag(prop) & PROP_OUTPUT) - param = PyObject_IsTrue(value); - else - param = PyLong_AsLong(value); + case PROP_BOOLEAN: + { + int param; + /* prefer not to have an exception here + * however so many poll functions return None or a valid Object. + * its a hassle to convert these into a bool before returning, */ + if (RNA_property_flag(prop) & PROP_OUTPUT) + param = PyObject_IsTrue(value); + else + param = PyLong_AsLong(value); - if (param < 0) { - PyErr_Format(PyExc_TypeError, - "%.200s %.200s.%.200s expected True/False or 0/1, not %.200s", - error_prefix, RNA_struct_identifier(ptr->type), - RNA_property_identifier(prop), Py_TYPE(value)->tp_name); - return -1; - } - else { - if (data) *((int *)data)= param; - else RNA_property_boolean_set(ptr, prop, param); - } - break; - } - case PROP_INT: - { - int overflow; - long param = PyLong_AsLongAndOverflow(value, &overflow); - if (overflow || (param > INT_MAX) || (param < INT_MIN)) { - PyErr_Format(PyExc_ValueError, - "%.200s %.200s.%.200s value not in 'int' range " - "(" STRINGIFY(INT_MIN) ", " STRINGIFY(INT_MAX) ")", - error_prefix, RNA_struct_identifier(ptr->type), - RNA_property_identifier(prop)); - return -1; - } - else if (param == -1 && PyErr_Occurred()) { - PyErr_Format(PyExc_TypeError, - "%.200s %.200s.%.200s expected an int type, not %.200s", - error_prefix, RNA_struct_identifier(ptr->type), - RNA_property_identifier(prop), Py_TYPE(value)->tp_name); - return -1; - } - else { - int param_i = (int)param; - RNA_property_int_clamp(ptr, prop, ¶m_i); - if (data) *((int *)data)= param_i; - else RNA_property_int_set(ptr, prop, param_i); + if (param < 0) { + PyErr_Format(PyExc_TypeError, + "%.200s %.200s.%.200s expected True/False or 0/1, not %.200s", + error_prefix, RNA_struct_identifier(ptr->type), + RNA_property_identifier(prop), Py_TYPE(value)->tp_name); + return -1; + } + else { + if (data) *((int *)data) = param; + else RNA_property_boolean_set(ptr, prop, param); + } + break; } - break; - } - case PROP_FLOAT: - { - float param = PyFloat_AsDouble(value); - if (PyErr_Occurred()) { - PyErr_Format(PyExc_TypeError, - "%.200s %.200s.%.200s expected a float type, not %.200s", - error_prefix, RNA_struct_identifier(ptr->type), - RNA_property_identifier(prop), Py_TYPE(value)->tp_name); - return -1; + case PROP_INT: + { + int overflow; + long param = PyLong_AsLongAndOverflow(value, &overflow); + if (overflow || (param > INT_MAX) || (param < INT_MIN)) { + PyErr_Format(PyExc_ValueError, + "%.200s %.200s.%.200s value not in 'int' range " + "(" STRINGIFY(INT_MIN) ", " STRINGIFY(INT_MAX) ")", + error_prefix, RNA_struct_identifier(ptr->type), + RNA_property_identifier(prop)); + return -1; + } + else if (param == -1 && PyErr_Occurred()) { + PyErr_Format(PyExc_TypeError, + "%.200s %.200s.%.200s expected an int type, not %.200s", + error_prefix, RNA_struct_identifier(ptr->type), + RNA_property_identifier(prop), Py_TYPE(value)->tp_name); + return -1; + } + else { + int param_i = (int)param; + RNA_property_int_clamp(ptr, prop, ¶m_i); + if (data) *((int *)data) = param_i; + else RNA_property_int_set(ptr, prop, param_i); + } + break; } - else { - RNA_property_float_clamp(ptr, prop, (float *)¶m); - if (data) *((float *)data)= param; - else RNA_property_float_set(ptr, prop, param); + case PROP_FLOAT: + { + float param = PyFloat_AsDouble(value); + if (PyErr_Occurred()) { + PyErr_Format(PyExc_TypeError, + "%.200s %.200s.%.200s expected a float type, not %.200s", + error_prefix, RNA_struct_identifier(ptr->type), + RNA_property_identifier(prop), Py_TYPE(value)->tp_name); + return -1; + } + else { + RNA_property_float_clamp(ptr, prop, (float *)¶m); + if (data) *((float *)data) = param; + else RNA_property_float_set(ptr, prop, param); + } + break; } - break; - } - case PROP_STRING: - { - const int subtype = RNA_property_subtype(prop); - const char *param; + case PROP_STRING: + { + const int subtype = RNA_property_subtype(prop); + const char *param; - if (subtype == PROP_BYTESTRING) { + if (subtype == PROP_BYTESTRING) { - /* Byte String */ + /* Byte String */ - param = PyBytes_AsString(value); + param = PyBytes_AsString(value); - if (param == NULL) { - if (PyBytes_Check(value)) { - /* there was an error assigning a string type, - * rather than setting a new error, prefix the existing one - */ - PyC_Err_Format_Prefix(PyExc_TypeError, - "%.200s %.200s.%.200s error assigning bytes", - error_prefix, RNA_struct_identifier(ptr->type), - RNA_property_identifier(prop)); + if (param == NULL) { + if (PyBytes_Check(value)) { + /* there was an error assigning a string type, + * rather than setting a new error, prefix the existing one + */ + PyC_Err_Format_Prefix(PyExc_TypeError, + "%.200s %.200s.%.200s error assigning bytes", + error_prefix, RNA_struct_identifier(ptr->type), + RNA_property_identifier(prop)); + } + else { + PyErr_Format(PyExc_TypeError, + "%.200s %.200s.%.200s expected a bytes type, not %.200s", + error_prefix, RNA_struct_identifier(ptr->type), + RNA_property_identifier(prop), Py_TYPE(value)->tp_name); + } + + return -1; } else { - PyErr_Format(PyExc_TypeError, - "%.200s %.200s.%.200s expected a bytes type, not %.200s", - error_prefix, RNA_struct_identifier(ptr->type), - RNA_property_identifier(prop), Py_TYPE(value)->tp_name); + /* same as unicode */ + if (data) *((char **)data) = (char *)param; /*XXX, this is suspect but needed for function calls, need to see if theres a better way */ + else RNA_property_string_set(ptr, prop, param); } - - return -1; } else { - /* same as unicode */ - if (data) *((char **)data)= (char *)param; /*XXX, this is suspect but needed for function calls, need to see if theres a better way */ - else RNA_property_string_set(ptr, prop, param); - } - } - else { - /* Unicode String */ + /* Unicode String */ #ifdef USE_STRING_COERCE - PyObject *value_coerce = NULL; - if (ELEM3(subtype, PROP_FILEPATH, PROP_DIRPATH, PROP_FILENAME)) { - /* TODO, get size */ - param = PyC_UnicodeAsByte(value, &value_coerce); - } - else { - param = _PyUnicode_AsString(value); -#ifdef WITH_INTERNATIONAL - if (subtype == PROP_TRANSLATE) { - param = IFACE_(param); + PyObject *value_coerce = NULL; + if (ELEM3(subtype, PROP_FILEPATH, PROP_DIRPATH, PROP_FILENAME)) { + /* TODO, get size */ + param = PyC_UnicodeAsByte(value, &value_coerce); } + else { + param = _PyUnicode_AsString(value); +#ifdef WITH_INTERNATIONAL + if (subtype == PROP_TRANSLATE) { + param = IFACE_(param); + } #endif // WITH_INTERNATIONAL - } + } #else // USE_STRING_COERCE - param = _PyUnicode_AsString(value); + param = _PyUnicode_AsString(value); #endif // USE_STRING_COERCE - if (param == NULL) { - if (PyUnicode_Check(value)) { - /* there was an error assigning a string type, - * rather than setting a new error, prefix the existing one - */ - PyC_Err_Format_Prefix(PyExc_TypeError, - "%.200s %.200s.%.200s error assigning string", - error_prefix, RNA_struct_identifier(ptr->type), - RNA_property_identifier(prop)); + if (param == NULL) { + if (PyUnicode_Check(value)) { + /* there was an error assigning a string type, + * rather than setting a new error, prefix the existing one + */ + PyC_Err_Format_Prefix(PyExc_TypeError, + "%.200s %.200s.%.200s error assigning string", + error_prefix, RNA_struct_identifier(ptr->type), + RNA_property_identifier(prop)); + } + else { + PyErr_Format(PyExc_TypeError, + "%.200s %.200s.%.200s expected a string type, not %.200s", + error_prefix, RNA_struct_identifier(ptr->type), + RNA_property_identifier(prop), Py_TYPE(value)->tp_name); + } + + return -1; } else { - PyErr_Format(PyExc_TypeError, - "%.200s %.200s.%.200s expected a string type, not %.200s", - error_prefix, RNA_struct_identifier(ptr->type), - RNA_property_identifier(prop), Py_TYPE(value)->tp_name); + /* same as bytes */ + if (data) *((char **)data) = (char *)param; /*XXX, this is suspect but needed for function calls, need to see if theres a better way */ + else RNA_property_string_set(ptr, prop, param); } - - return -1; - } - else { - /* same as bytes */ - if (data) *((char **)data)= (char *)param; /*XXX, this is suspect but needed for function calls, need to see if theres a better way */ - else RNA_property_string_set(ptr, prop, param); - } #ifdef USE_STRING_COERCE - Py_XDECREF(value_coerce); + Py_XDECREF(value_coerce); #endif // USE_STRING_COERCE + } + break; } - break; - } - case PROP_ENUM: - { - int val = 0; + case PROP_ENUM: + { + int val = 0; - /* type checkins is done by each function */ - if (RNA_property_flag(prop) & PROP_ENUM_FLAG) { - /* set of enum items, concatenate all values with OR */ - if (pyrna_prop_to_enum_bitfield(ptr, prop, value, &val, error_prefix) < 0) { - return -1; + /* type checkins is done by each function */ + if (RNA_property_flag(prop) & PROP_ENUM_FLAG) { + /* set of enum items, concatenate all values with OR */ + if (pyrna_prop_to_enum_bitfield(ptr, prop, value, &val, error_prefix) < 0) { + return -1; + } } - } - else { - /* simple enum string */ - if (pyrna_string_to_enum(value, ptr, prop, &val, error_prefix) < 0) { - return -1; + else { + /* simple enum string */ + if (pyrna_string_to_enum(value, ptr, prop, &val, error_prefix) < 0) { + return -1; + } } - } - - if (data) *((int *)data)= val; - else RNA_property_enum_set(ptr, prop, val); - - break; - } - case PROP_POINTER: - { - PyObject *value_new = NULL; - StructRNA *ptr_type = RNA_property_pointer_type(ptr, prop); - int flag = RNA_property_flag(prop); + if (data) *((int *)data) = val; + else RNA_property_enum_set(ptr, prop, val); - /* this is really nasty!, so we can fake the operator having direct properties eg: - * layout.prop(self, "filepath") - * ... which infact should be - * layout.prop(self.properties, "filepath") - * - * we need to do this trick. - * if the prop is not an operator type and the pyobject is an operator, - * use its properties in place of its self. - * - * this is so bad that its almost a good reason to do away with fake 'self.properties -> self' class mixing - * if this causes problems in the future it should be removed. - */ - if ((ptr_type == &RNA_AnyType) && - (BPy_StructRNA_Check(value)) && - (RNA_struct_is_a(((BPy_StructRNA *)value)->ptr.type, &RNA_Operator))) - { - value = PyObject_GetAttrString(value, "properties"); - value_new = value; + break; } + case PROP_POINTER: + { + PyObject *value_new = NULL; + + StructRNA *ptr_type = RNA_property_pointer_type(ptr, prop); + int flag = RNA_property_flag(prop); + + /* this is really nasty!, so we can fake the operator having direct properties eg: + * layout.prop(self, "filepath") + * ... which infact should be + * layout.prop(self.properties, "filepath") + * + * we need to do this trick. + * if the prop is not an operator type and the pyobject is an operator, + * use its properties in place of its self. + * + * this is so bad that its almost a good reason to do away with fake 'self.properties -> self' class mixing + * if this causes problems in the future it should be removed. + */ + if ((ptr_type == &RNA_AnyType) && + (BPy_StructRNA_Check(value)) && + (RNA_struct_is_a(((BPy_StructRNA *)value)->ptr.type, &RNA_Operator))) + { + value = PyObject_GetAttrString(value, "properties"); + value_new = value; + } - /* if property is an OperatorProperties pointer and value is a map, - * forward back to pyrna_pydict_to_props */ - if (RNA_struct_is_a(ptr_type, &RNA_OperatorProperties) && PyDict_Check(value)) { - PointerRNA opptr = RNA_property_pointer_get(ptr, prop); - return pyrna_pydict_to_props(&opptr, value, 0, error_prefix); - } + /* if property is an OperatorProperties pointer and value is a map, + * forward back to pyrna_pydict_to_props */ + if (RNA_struct_is_a(ptr_type, &RNA_OperatorProperties) && PyDict_Check(value)) { + PointerRNA opptr = RNA_property_pointer_get(ptr, prop); + return pyrna_pydict_to_props(&opptr, value, 0, error_prefix); + } - /* another exception, allow to pass a collection as an RNA property */ - if (Py_TYPE(value) == &pyrna_prop_collection_Type) { /* ok to ignore idprop collections */ - PointerRNA c_ptr; - BPy_PropertyRNA *value_prop = (BPy_PropertyRNA *)value; - if (RNA_property_collection_type_get(&value_prop->ptr, value_prop->prop, &c_ptr)) { - value = pyrna_struct_CreatePyObject(&c_ptr); - value_new = value; + /* another exception, allow to pass a collection as an RNA property */ + if (Py_TYPE(value) == &pyrna_prop_collection_Type) { /* ok to ignore idprop collections */ + PointerRNA c_ptr; + BPy_PropertyRNA *value_prop = (BPy_PropertyRNA *)value; + if (RNA_property_collection_type_get(&value_prop->ptr, value_prop->prop, &c_ptr)) { + value = pyrna_struct_CreatePyObject(&c_ptr); + value_new = value; + } + else { + PyErr_Format(PyExc_TypeError, + "%.200s %.200s.%.200s collection has no type, " + "cant be used as a %.200s type", + error_prefix, RNA_struct_identifier(ptr->type), + RNA_property_identifier(prop), RNA_struct_identifier(ptr_type)); + return -1; + } } - else { + + if (!BPy_StructRNA_Check(value) && value != Py_None) { + PyErr_Format(PyExc_TypeError, + "%.200s %.200s.%.200s expected a %.200s type, not %.200s", + error_prefix, RNA_struct_identifier(ptr->type), + RNA_property_identifier(prop), RNA_struct_identifier(ptr_type), + Py_TYPE(value)->tp_name); + Py_XDECREF(value_new); return -1; + } + else if ((flag & PROP_NEVER_NULL) && value == Py_None) { PyErr_Format(PyExc_TypeError, - "%.200s %.200s.%.200s collection has no type, " - "cant be used as a %.200s type", + "%.200s %.200s.%.200s does not support a 'None' assignment %.200s type", error_prefix, RNA_struct_identifier(ptr->type), RNA_property_identifier(prop), RNA_struct_identifier(ptr_type)); - return -1; + Py_XDECREF(value_new); return -1; } - } - - if (!BPy_StructRNA_Check(value) && value != Py_None) { - PyErr_Format(PyExc_TypeError, - "%.200s %.200s.%.200s expected a %.200s type, not %.200s", - error_prefix, RNA_struct_identifier(ptr->type), - RNA_property_identifier(prop), RNA_struct_identifier(ptr_type), - Py_TYPE(value)->tp_name); - Py_XDECREF(value_new); return -1; - } - else if ((flag & PROP_NEVER_NULL) && value == Py_None) { - PyErr_Format(PyExc_TypeError, - "%.200s %.200s.%.200s does not support a 'None' assignment %.200s type", - error_prefix, RNA_struct_identifier(ptr->type), - RNA_property_identifier(prop), RNA_struct_identifier(ptr_type)); - Py_XDECREF(value_new); return -1; - } - else if ((value != Py_None) && - ((flag & PROP_ID_SELF_CHECK) && ptr->id.data == ((BPy_StructRNA *)value)->ptr.id.data)) - { - PyErr_Format(PyExc_TypeError, - "%.200s %.200s.%.200s ID type does not support assignment to its self", - error_prefix, RNA_struct_identifier(ptr->type), - RNA_property_identifier(prop)); - Py_XDECREF(value_new); return -1; - } - else { - BPy_StructRNA *param = (BPy_StructRNA *)value; - int raise_error = FALSE; - if (data) { - - if (flag & PROP_RNAPTR) { - if (value == Py_None) - memset(data, 0, sizeof(PointerRNA)); - else - *((PointerRNA *)data)= param->ptr; - } - else if (value == Py_None) { - *((void **)data)= NULL; - } - else if (RNA_struct_is_a(param->ptr.type, ptr_type)) { - *((void **)data)= param->ptr.data; - } - else { - raise_error = TRUE; - } + else if ((value != Py_None) && + ((flag & PROP_ID_SELF_CHECK) && ptr->id.data == ((BPy_StructRNA *)value)->ptr.id.data)) + { + PyErr_Format(PyExc_TypeError, + "%.200s %.200s.%.200s ID type does not support assignment to its self", + error_prefix, RNA_struct_identifier(ptr->type), + RNA_property_identifier(prop)); + Py_XDECREF(value_new); return -1; } else { - /* data == NULL, assign to RNA */ - if (value == Py_None) { - PointerRNA valueptr = {{NULL}}; - RNA_property_pointer_set(ptr, prop, valueptr); - } - else if (RNA_struct_is_a(param->ptr.type, ptr_type)) { - RNA_property_pointer_set(ptr, prop, param->ptr); + BPy_StructRNA *param = (BPy_StructRNA *)value; + int raise_error = FALSE; + if (data) { + + if (flag & PROP_RNAPTR) { + if (value == Py_None) + memset(data, 0, sizeof(PointerRNA)); + else + *((PointerRNA *)data) = param->ptr; + } + else if (value == Py_None) { + *((void **)data) = NULL; + } + else if (RNA_struct_is_a(param->ptr.type, ptr_type)) { + *((void **)data) = param->ptr.data; + } + else { + raise_error = TRUE; + } } else { + /* data == NULL, assign to RNA */ + if (value == Py_None) { + PointerRNA valueptr = {{NULL}}; + RNA_property_pointer_set(ptr, prop, valueptr); + } + else if (RNA_struct_is_a(param->ptr.type, ptr_type)) { + RNA_property_pointer_set(ptr, prop, param->ptr); + } + else { + PointerRNA tmp; + RNA_pointer_create(NULL, ptr_type, NULL, &tmp); + PyErr_Format(PyExc_TypeError, + "%.200s %.200s.%.200s expected a %.200s type. not %.200s", + error_prefix, RNA_struct_identifier(ptr->type), + RNA_property_identifier(prop), RNA_struct_identifier(tmp.type), + RNA_struct_identifier(param->ptr.type)); + Py_XDECREF(value_new); return -1; + } + } + + if (raise_error) { PointerRNA tmp; RNA_pointer_create(NULL, ptr_type, NULL, &tmp); PyErr_Format(PyExc_TypeError, - "%.200s %.200s.%.200s expected a %.200s type. not %.200s", + "%.200s %.200s.%.200s expected a %.200s type, not %.200s", error_prefix, RNA_struct_identifier(ptr->type), RNA_property_identifier(prop), RNA_struct_identifier(tmp.type), RNA_struct_identifier(param->ptr.type)); @@ -1793,98 +1805,86 @@ static int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyOb } } - if (raise_error) { - PointerRNA tmp; - RNA_pointer_create(NULL, ptr_type, NULL, &tmp); - PyErr_Format(PyExc_TypeError, - "%.200s %.200s.%.200s expected a %.200s type, not %.200s", - error_prefix, RNA_struct_identifier(ptr->type), - RNA_property_identifier(prop), RNA_struct_identifier(tmp.type), - RNA_struct_identifier(param->ptr.type)); - Py_XDECREF(value_new); return -1; - } - } + Py_XDECREF(value_new); - Py_XDECREF(value_new); - - break; - } - case PROP_COLLECTION: - { - Py_ssize_t seq_len, i; - PyObject *item; - PointerRNA itemptr; - ListBase *lb; - CollectionPointerLink *link; - - lb = (data) ? (ListBase *)data : NULL; - - /* convert a sequence of dict's into a collection */ - if (!PySequence_Check(value)) { - PyErr_Format(PyExc_TypeError, - "%.200s %.200s.%.200s expected a sequence for an RNA collection, not %.200s", - error_prefix, RNA_struct_identifier(ptr->type), - RNA_property_identifier(prop), Py_TYPE(value)->tp_name); - return -1; + break; } + case PROP_COLLECTION: + { + Py_ssize_t seq_len, i; + PyObject *item; + PointerRNA itemptr; + ListBase *lb; + CollectionPointerLink *link; - seq_len = PySequence_Size(value); - for (i = 0; i < seq_len; i++) { - item = PySequence_GetItem(value, i); + lb = (data) ? (ListBase *)data : NULL; - if (item == NULL) { + /* convert a sequence of dict's into a collection */ + if (!PySequence_Check(value)) { PyErr_Format(PyExc_TypeError, - "%.200s %.200s.%.200s failed to get sequence index '%d' for an RNA collection", + "%.200s %.200s.%.200s expected a sequence for an RNA collection, not %.200s", error_prefix, RNA_struct_identifier(ptr->type), - RNA_property_identifier(prop), i); - Py_XDECREF(item); + RNA_property_identifier(prop), Py_TYPE(value)->tp_name); return -1; } - if (PyDict_Check(item) == 0) { - PyErr_Format(PyExc_TypeError, - "%.200s %.200s.%.200s expected a each sequence " - "member to be a dict for an RNA collection, not %.200s", - error_prefix, RNA_struct_identifier(ptr->type), - RNA_property_identifier(prop), Py_TYPE(item)->tp_name); - Py_XDECREF(item); - return -1; - } + seq_len = PySequence_Size(value); + for (i = 0; i < seq_len; i++) { + item = PySequence_GetItem(value, i); - if (lb) { - link = MEM_callocN(sizeof(CollectionPointerLink), "PyCollectionPointerLink"); - link->ptr = itemptr; - BLI_addtail(lb, link); - } - else - RNA_property_collection_add(ptr, prop, &itemptr); + if (item == NULL) { + PyErr_Format(PyExc_TypeError, + "%.200s %.200s.%.200s failed to get sequence index '%d' for an RNA collection", + error_prefix, RNA_struct_identifier(ptr->type), + RNA_property_identifier(prop), i); + Py_XDECREF(item); + return -1; + } + + if (PyDict_Check(item) == 0) { + PyErr_Format(PyExc_TypeError, + "%.200s %.200s.%.200s expected a each sequence " + "member to be a dict for an RNA collection, not %.200s", + error_prefix, RNA_struct_identifier(ptr->type), + RNA_property_identifier(prop), Py_TYPE(item)->tp_name); + Py_XDECREF(item); + return -1; + } - if (pyrna_pydict_to_props(&itemptr, item, 1, "Converting a python list to an RNA collection") == -1) { - PyObject *msg = PyC_ExceptionBuffer(); - const char *msg_char = _PyUnicode_AsString(msg); + if (lb) { + link = MEM_callocN(sizeof(CollectionPointerLink), "PyCollectionPointerLink"); + link->ptr = itemptr; + BLI_addtail(lb, link); + } + else + RNA_property_collection_add(ptr, prop, &itemptr); - PyErr_Format(PyExc_TypeError, - "%.200s %.200s.%.200s error converting a member of a collection " - "from a dicts into an RNA collection, failed with: %s", - error_prefix, RNA_struct_identifier(ptr->type), - RNA_property_identifier(prop), msg_char); + if (pyrna_pydict_to_props(&itemptr, item, 1, "Converting a python list to an RNA collection") == -1) { + PyObject *msg = PyC_ExceptionBuffer(); + const char *msg_char = _PyUnicode_AsString(msg); + PyErr_Format(PyExc_TypeError, + "%.200s %.200s.%.200s error converting a member of a collection " + "from a dicts into an RNA collection, failed with: %s", + error_prefix, RNA_struct_identifier(ptr->type), + RNA_property_identifier(prop), msg_char); + + Py_DECREF(item); + Py_DECREF(msg); + return -1; + } Py_DECREF(item); - Py_DECREF(msg); - return -1; } - Py_DECREF(item); - } - break; - } - default: - PyErr_Format(PyExc_AttributeError, - "%.200s %.200s.%.200s unknown property type (pyrna_py_to_prop)", - error_prefix, RNA_struct_identifier(ptr->type), - RNA_property_identifier(prop)); - return -1; - break; + break; + } + default: + PyErr_Format(PyExc_AttributeError, + "%.200s %.200s.%.200s unknown property type (pyrna_py_to_prop)", + error_prefix, RNA_struct_identifier(ptr->type), + RNA_property_identifier(prop)); + return -1; + break; } } @@ -1920,7 +1920,7 @@ static int pyrna_py_to_prop_array_index(BPy_PropertyArrayRNA *self, int index, P else { /* see if we can coerce into a python type - PropertyType */ switch (RNA_property_type(prop)) { - case PROP_BOOLEAN: + case PROP_BOOLEAN: { int param = PyLong_AsLong(value); @@ -1933,7 +1933,7 @@ static int pyrna_py_to_prop_array_index(BPy_PropertyArrayRNA *self, int index, P } break; } - case PROP_INT: + case PROP_INT: { int param = PyLong_AsLong(value); if (param == -1 && PyErr_Occurred()) { @@ -1946,7 +1946,7 @@ static int pyrna_py_to_prop_array_index(BPy_PropertyArrayRNA *self, int index, P } break; } - case PROP_FLOAT: + case PROP_FLOAT: { float param = PyFloat_AsDouble(value); if (PyErr_Occurred()) { @@ -1959,10 +1959,10 @@ static int pyrna_py_to_prop_array_index(BPy_PropertyArrayRNA *self, int index, P } break; } - default: - PyErr_SetString(PyExc_AttributeError, "not an array type"); - ret = -1; - break; + default: + PyErr_SetString(PyExc_AttributeError, "not an array type"); + ret = -1; + break; } } @@ -2172,9 +2172,9 @@ int pyrna_prop_collection_subscript_str_lib_pair_ptr(BPy_PropertyRNA *self, PyOb if (lib == NULL) { if (err_not_found) { PyErr_Format(PyExc_KeyError, - "%s: lib name '%.240s' " - "does not reference a valid library", - err_prefix, keylib_str); + "%s: lib name '%.240s' " + "does not reference a valid library", + err_prefix, keylib_str); return -1; } else { @@ -2300,7 +2300,7 @@ static PyObject *pyrna_prop_array_subscript_slice(BPy_PropertyArrayRNA *self, Po } else { switch (RNA_property_type(prop)) { - case PROP_FLOAT: + case PROP_FLOAT: { float values_stack[PYRNA_STACK_ARRAY]; float *values; @@ -2309,30 +2309,30 @@ static PyObject *pyrna_prop_array_subscript_slice(BPy_PropertyArrayRNA *self, Po RNA_property_float_get_array(ptr, prop, values); for (count = start; count < stop; count++) - PyTuple_SET_ITEM(tuple, count-start, PyFloat_FromDouble(values[count])); + PyTuple_SET_ITEM(tuple, count - start, PyFloat_FromDouble(values[count])); if (values != values_stack) { PyMem_FREE(values); } break; } - case PROP_BOOLEAN: + case PROP_BOOLEAN: { int values_stack[PYRNA_STACK_ARRAY]; int *values; - if (length > PYRNA_STACK_ARRAY) { values = PyMem_MALLOC(sizeof(int) * length); } + if (length > PYRNA_STACK_ARRAY) { values = PyMem_MALLOC(sizeof(int) * length); } else { values = values_stack; } RNA_property_boolean_get_array(ptr, prop, values); for (count = start; count < stop; count++) - PyTuple_SET_ITEM(tuple, count-start, PyBool_FromLong(values[count])); + PyTuple_SET_ITEM(tuple, count - start, PyBool_FromLong(values[count])); if (values != values_stack) { PyMem_FREE(values); } break; } - case PROP_INT: + case PROP_INT: { int values_stack[PYRNA_STACK_ARRAY]; int *values; @@ -2341,19 +2341,19 @@ static PyObject *pyrna_prop_array_subscript_slice(BPy_PropertyArrayRNA *self, Po RNA_property_int_get_array(ptr, prop, values); for (count = start; count < stop; count++) - PyTuple_SET_ITEM(tuple, count-start, PyLong_FromSsize_t(values[count])); + PyTuple_SET_ITEM(tuple, count - start, PyLong_FromSsize_t(values[count])); if (values != values_stack) { PyMem_FREE(values); } break; } - default: - BLI_assert(!"Invalid array type"); + default: + BLI_assert(!"Invalid array type"); - PyErr_SetString(PyExc_TypeError, "not an array type"); - Py_DECREF(tuple); - tuple = NULL; + PyErr_SetString(PyExc_TypeError, "not an array type"); + Py_DECREF(tuple); + tuple = NULL; } } return tuple; @@ -2392,7 +2392,7 @@ static PyObject *pyrna_prop_collection_subscript(BPy_PropertyRNA *self, PyObject /* avoid PySlice_GetIndicesEx because it needs to know the length ahead of time. */ if (key_slice->start != Py_None && !_PyEval_SliceIndex(key_slice->start, &start)) return NULL; - if (key_slice->stop != Py_None && !_PyEval_SliceIndex(key_slice->stop, &stop)) return NULL; + if (key_slice->stop != Py_None && !_PyEval_SliceIndex(key_slice->stop, &stop)) return NULL; if (start < 0 || stop < 0) { /* only get the length for negative values */ @@ -2517,8 +2517,8 @@ static int pyrna_prop_collection_ass_subscript(BPy_PropertyRNA *self, PyObject * Py_ssize_t start = 0, stop = PY_SSIZE_T_MAX; /* avoid PySlice_GetIndicesEx because it needs to know the length ahead of time. */ - if (key_slice->start != Py_None && !_PyEval_SliceIndex(key_slice->start, &start)) return NULL; - if (key_slice->stop != Py_None && !_PyEval_SliceIndex(key_slice->stop, &stop)) return NULL; + if (key_slice->start != Py_None && !_PyEval_SliceIndex(key_slice->start, &start)) return NULL; + if (key_slice->stop != Py_None && !_PyEval_SliceIndex(key_slice->stop, &stop)) return NULL; if (start < 0 || stop < 0) { /* only get the length for negative values */ @@ -2618,7 +2618,7 @@ static int prop_subscript_ass_array_slice(PointerRNA *ptr, PropertyRNA *prop, return -1; } - if (PySequence_Fast_GET_SIZE(value) != stop-start) { + if (PySequence_Fast_GET_SIZE(value) != stop - start) { Py_DECREF(value); PyErr_SetString(PyExc_TypeError, "bpy_prop_array[slice] = value: re-sizing bpy_struct arrays isn't supported"); @@ -2674,14 +2674,14 @@ static int prop_subscript_ass_array_slice(PointerRNA *ptr, PropertyRNA *prop, int min, max; RNA_property_int_range(ptr, prop, &min, &max); - if (length > PYRNA_STACK_ARRAY) { values = values_alloc = PyMem_MALLOC(sizeof(int) * length); } + if (length > PYRNA_STACK_ARRAY) { values = values_alloc = PyMem_MALLOC(sizeof(int) * length); } else { values = values_stack; } if (start != 0 || stop != length) /* partial assignment? - need to get the array */ RNA_property_int_get_array(ptr, prop, values); for (count = start; count < stop; count++) { - ival = PyLong_AsLong(PySequence_Fast_GET_ITEM(value, count-start)); + ival = PyLong_AsLong(PySequence_Fast_GET_ITEM(value, count - start)); CLAMP(ival, min, max); values[count] = ival; } @@ -2780,15 +2780,15 @@ static int pyrna_prop_array_ass_subscript(BPy_PropertyArrayRNA *self, PyObject * /* for slice only */ static PyMappingMethods pyrna_prop_array_as_mapping = { - (lenfunc) pyrna_prop_array_length, /* mp_length */ - (binaryfunc) pyrna_prop_array_subscript, /* mp_subscript */ - (objobjargproc) pyrna_prop_array_ass_subscript, /* mp_ass_subscript */ + (lenfunc) pyrna_prop_array_length, /* mp_length */ + (binaryfunc) pyrna_prop_array_subscript, /* mp_subscript */ + (objobjargproc) pyrna_prop_array_ass_subscript, /* mp_ass_subscript */ }; static PyMappingMethods pyrna_prop_collection_as_mapping = { - (lenfunc) pyrna_prop_collection_length, /* mp_length */ - (binaryfunc) pyrna_prop_collection_subscript, /* mp_subscript */ - (objobjargproc) pyrna_prop_collection_ass_subscript, /* mp_ass_subscript */ + (lenfunc) pyrna_prop_collection_length, /* mp_length */ + (binaryfunc) pyrna_prop_collection_subscript, /* mp_subscript */ + (objobjargproc) pyrna_prop_collection_ass_subscript, /* mp_ass_subscript */ }; /* only for fast bool's, large structs, assign nb_bool on init */ @@ -2871,44 +2871,44 @@ static int pyrna_struct_contains(BPy_StructRNA *self, PyObject *value) if (!group) return 0; - return IDP_GetPropertyFromGroup(group, name) ? 1:0; + return IDP_GetPropertyFromGroup(group, name) ? 1 : 0; } static PySequenceMethods pyrna_prop_array_as_sequence = { - (lenfunc)pyrna_prop_array_length, /* Cant set the len otherwise it can evaluate as false */ - NULL, /* sq_concat */ - NULL, /* sq_repeat */ + (lenfunc)pyrna_prop_array_length, /* Cant set the len otherwise it can evaluate as false */ + NULL, /* sq_concat */ + NULL, /* sq_repeat */ (ssizeargfunc)pyrna_prop_array_subscript_int, /* sq_item */ /* Only set this so PySequence_Check() returns True */ - NULL, /* sq_slice */ - (ssizeobjargproc)prop_subscript_ass_array_int, /* sq_ass_item */ - NULL, /* *was* sq_ass_slice */ - (objobjproc)pyrna_prop_array_contains, /* sq_contains */ + NULL, /* sq_slice */ + (ssizeobjargproc)prop_subscript_ass_array_int, /* sq_ass_item */ + NULL, /* *was* sq_ass_slice */ + (objobjproc)pyrna_prop_array_contains, /* sq_contains */ (binaryfunc) NULL, /* sq_inplace_concat */ (ssizeargfunc) NULL, /* sq_inplace_repeat */ }; static PySequenceMethods pyrna_prop_collection_as_sequence = { - (lenfunc)pyrna_prop_collection_length, /* Cant set the len otherwise it can evaluate as false */ - NULL, /* sq_concat */ - NULL, /* sq_repeat */ + (lenfunc)pyrna_prop_collection_length, /* Cant set the len otherwise it can evaluate as false */ + NULL, /* sq_concat */ + NULL, /* sq_repeat */ (ssizeargfunc)pyrna_prop_collection_subscript_int, /* sq_item */ /* Only set this so PySequence_Check() returns True */ - NULL, /* *was* sq_slice */ + NULL, /* *was* sq_slice */ (ssizeobjargproc)/* pyrna_prop_collection_ass_subscript_int */ NULL /* let mapping take this one */, /* sq_ass_item */ - NULL, /* *was* sq_ass_slice */ - (objobjproc)pyrna_prop_collection_contains, /* sq_contains */ + NULL, /* *was* sq_ass_slice */ + (objobjproc)pyrna_prop_collection_contains, /* sq_contains */ (binaryfunc) NULL, /* sq_inplace_concat */ (ssizeargfunc) NULL, /* sq_inplace_repeat */ }; static PySequenceMethods pyrna_struct_as_sequence = { - NULL, /* Cant set the len otherwise it can evaluate as false */ - NULL, /* sq_concat */ - NULL, /* sq_repeat */ - NULL, /* sq_item */ /* Only set this so PySequence_Check() returns True */ - NULL, /* *was* sq_slice */ - NULL, /* sq_ass_item */ - NULL, /* *was* sq_ass_slice */ - (objobjproc)pyrna_struct_contains, /* sq_contains */ + NULL, /* Cant set the len otherwise it can evaluate as false */ + NULL, /* sq_concat */ + NULL, /* sq_repeat */ + NULL, /* sq_item */ /* Only set this so PySequence_Check() returns True */ + NULL, /* *was* sq_slice */ + NULL, /* sq_ass_item */ + NULL, /* *was* sq_ass_slice */ + (objobjproc)pyrna_struct_contains, /* sq_contains */ (binaryfunc) NULL, /* sq_inplace_concat */ (ssizeargfunc) NULL, /* sq_inplace_repeat */ }; @@ -2971,9 +2971,9 @@ static int pyrna_struct_ass_subscript(BPy_StructRNA *self, PyObject *key, PyObje } static PyMappingMethods pyrna_struct_as_mapping = { - (lenfunc) NULL, /* mp_length */ - (binaryfunc) pyrna_struct_subscript, /* mp_subscript */ - (objobjargproc) pyrna_struct_ass_subscript, /* mp_ass_subscript */ + (lenfunc) NULL, /* mp_length */ + (binaryfunc) pyrna_struct_subscript, /* mp_subscript */ + (objobjargproc) pyrna_struct_ass_subscript, /* mp_ass_subscript */ }; PyDoc_STRVAR(pyrna_struct_keys_doc, @@ -3463,16 +3463,16 @@ static PyObject *pyrna_struct_getattro(BPy_StructRNA *self, PyObject *pyname) if (done == 1) { /* found */ switch (newtype) { - case CTX_DATA_TYPE_POINTER: - if (newptr.data == NULL) { - ret = Py_None; - Py_INCREF(ret); - } - else { - ret = pyrna_struct_CreatePyObject(&newptr); - } - break; - case CTX_DATA_TYPE_COLLECTION: + case CTX_DATA_TYPE_POINTER: + if (newptr.data == NULL) { + ret = Py_None; + Py_INCREF(ret); + } + else { + ret = pyrna_struct_CreatePyObject(&newptr); + } + break; + case CTX_DATA_TYPE_COLLECTION: { CollectionPointerLink *link; PyObject *linkptr; @@ -3486,14 +3486,14 @@ static PyObject *pyrna_struct_getattro(BPy_StructRNA *self, PyObject *pyname) } } break; - default: - /* should never happen */ - BLI_assert(!"Invalid context type"); - - PyErr_Format(PyExc_AttributeError, - "bpy_struct: Context type invalid %d, can't get \"%.200s\" from context", - newtype, name); - ret = NULL; + default: + /* should never happen */ + BLI_assert(!"Invalid context type"); + + PyErr_Format(PyExc_AttributeError, + "bpy_struct: Context type invalid %d, can't get \"%.200s\" from context", + newtype, name); + ret = NULL; } } else if (done == -1) { /* found but not set */ @@ -3542,10 +3542,10 @@ static int pyrna_struct_pydict_contains(PyObject *self, PyObject *pyname) //--------------- setattr------------------------------------------- static int pyrna_is_deferred_prop(const PyObject *value) { - return PyTuple_CheckExact(value) && - PyTuple_GET_SIZE(value) == 2 && - PyCFunction_Check(PyTuple_GET_ITEM(value, 0)) && - PyDict_CheckExact(PyTuple_GET_ITEM(value, 1)); + return PyTuple_CheckExact(value) && + PyTuple_GET_SIZE(value) == 2 && + PyCFunction_Check(PyTuple_GET_ITEM(value, 0)) && + PyDict_CheckExact(PyTuple_GET_ITEM(value, 1)); } #if 0 @@ -4132,7 +4132,7 @@ static PyObject *pyrna_prop_collection_get(BPy_PropertyRNA *self, PyObject *args } else if (PyTuple_Check(key_ob)) { PyObject *ret = pyrna_prop_collection_subscript_str_lib_pair(self, key_ob, - "bpy_prop_collection.get((id, lib))", FALSE); + "bpy_prop_collection.get((id, lib))", FALSE); if (ret) { return ret; } @@ -4205,20 +4205,19 @@ static void foreach_attr_type(BPy_PropertyRNA *self, const char *attr, prop = RNA_struct_find_property(&itemptr, attr); *raw_type = RNA_property_raw_type(prop); *attr_tot = RNA_property_array_length(&itemptr, prop); - *attr_signed = (RNA_property_subtype(prop) == PROP_UNSIGNED) ? FALSE:TRUE; + *attr_signed = (RNA_property_subtype(prop) == PROP_UNSIGNED) ? FALSE : TRUE; break; } RNA_PROP_END; } /* pyrna_prop_collection_foreach_get/set both use this */ -static int foreach_parse_args( - BPy_PropertyRNA *self, PyObject *args, +static int foreach_parse_args(BPy_PropertyRNA *self, PyObject *args, - /* values to assign */ - const char **attr, PyObject **seq, int *tot, int *size, - RawPropertyType *raw_type, int *attr_tot, int *attr_signed - ) + /* values to assign */ + const char **attr, PyObject **seq, int *tot, int *size, + RawPropertyType *raw_type, int *attr_tot, int *attr_signed + ) { #if 0 int array_tot; @@ -4239,7 +4238,7 @@ static int foreach_parse_args( foreach_attr_type(self, *attr, raw_type, attr_tot, attr_signed); *size = RNA_raw_type_sizeof(*raw_type); -#if 0 // works fine but not strictly needed, we could allow RNA_property_collection_raw_* to do the checks +#if 0 // works fine but not strictly needed, we could allow RNA_property_collection_raw_* to do the checks if ((*attr_tot) < 1) *attr_tot = 1; @@ -4272,22 +4271,22 @@ static int foreach_parse_args( static int foreach_compat_buffer(RawPropertyType raw_type, int attr_signed, const char *format) { - char f = format ? *format:'B'; /* B is assumed when not set */ + char f = format ? *format : 'B'; /* B is assumed when not set */ switch (raw_type) { case PROP_RAW_CHAR: - if (attr_signed) return (f == 'b') ? 1:0; - else return (f == 'B') ? 1:0; + if (attr_signed) return (f == 'b') ? 1 : 0; + else return (f == 'B') ? 1 : 0; case PROP_RAW_SHORT: - if (attr_signed) return (f == 'h') ? 1:0; - else return (f == 'H') ? 1:0; + if (attr_signed) return (f == 'h') ? 1 : 0; + else return (f == 'H') ? 1 : 0; case PROP_RAW_INT: - if (attr_signed) return (f == 'i') ? 1:0; - else return (f == 'I') ? 1:0; + if (attr_signed) return (f == 'i') ? 1 : 0; + else return (f == 'I') ? 1 : 0; case PROP_RAW_FLOAT: - return (f == 'f') ? 1:0; + return (f == 'f') ? 1 : 0; case PROP_RAW_DOUBLE: - return (f == 'd') ? 1:0; + return (f == 'd') ? 1 : 0; case PROP_RAW_UNSET: return 0; } @@ -4389,7 +4388,7 @@ static PyObject *foreach_getset(BPy_PropertyRNA *self, PyObject *args, int set) ok = RNA_property_collection_raw_get(NULL, &self->ptr, self->prop, attr, array, raw_type, tot); - if (!ok) i = tot; /* skip the loop */ + if (!ok) i = tot; /* skip the loop */ for ( ; i < tot; i++) { @@ -4537,8 +4536,8 @@ static struct PyMethodDef pyrna_struct_methods[] = { {"as_pointer", (PyCFunction)pyrna_struct_as_pointer, METH_NOARGS, pyrna_struct_as_pointer_doc}, /* bpy_rna_anim.c */ - {"keyframe_insert", (PyCFunction)pyrna_struct_keyframe_insert, METH_VARARGS|METH_KEYWORDS, pyrna_struct_keyframe_insert_doc}, - {"keyframe_delete", (PyCFunction)pyrna_struct_keyframe_delete, METH_VARARGS|METH_KEYWORDS, pyrna_struct_keyframe_delete_doc}, + {"keyframe_insert", (PyCFunction)pyrna_struct_keyframe_insert, METH_VARARGS | METH_KEYWORDS, pyrna_struct_keyframe_insert_doc}, + {"keyframe_delete", (PyCFunction)pyrna_struct_keyframe_delete, METH_VARARGS | METH_KEYWORDS, pyrna_struct_keyframe_delete_doc}, {"driver_add", (PyCFunction)pyrna_struct_driver_add, METH_VARARGS, pyrna_struct_driver_add_doc}, {"driver_remove", (PyCFunction)pyrna_struct_driver_remove, METH_VARARGS, pyrna_struct_driver_remove_doc}, @@ -4679,154 +4678,154 @@ static PyObject *pyrna_param_to_py(PointerRNA *ptr, PropertyRNA *prop, void *dat /* kazanbas: TODO make multidim sequences here */ switch (type) { - case PROP_BOOLEAN: - ret = PyTuple_New(len); - for (a = 0; a < len; a++) - PyTuple_SET_ITEM(ret, a, PyBool_FromLong(((int *)data)[a])); - break; - case PROP_INT: - ret = PyTuple_New(len); - for (a = 0; a < len; a++) - PyTuple_SET_ITEM(ret, a, PyLong_FromSsize_t((Py_ssize_t)((int *)data)[a])); - break; - case PROP_FLOAT: - switch (RNA_property_subtype(prop)) { + case PROP_BOOLEAN: + ret = PyTuple_New(len); + for (a = 0; a < len; a++) + PyTuple_SET_ITEM(ret, a, PyBool_FromLong(((int *)data)[a])); + break; + case PROP_INT: + ret = PyTuple_New(len); + for (a = 0; a < len; a++) + PyTuple_SET_ITEM(ret, a, PyLong_FromSsize_t((Py_ssize_t)((int *)data)[a])); + break; + case PROP_FLOAT: + switch (RNA_property_subtype(prop)) { #ifdef USE_MATHUTILS - case PROP_ALL_VECTOR_SUBTYPES: - ret = Vector_CreatePyObject(data, len, Py_NEW, NULL); - break; - case PROP_MATRIX: - if (len == 16) { - ret = Matrix_CreatePyObject(data, 4, 4, Py_NEW, NULL); - break; - } - else if (len == 9) { - ret = Matrix_CreatePyObject(data, 3, 3, Py_NEW, NULL); + case PROP_ALL_VECTOR_SUBTYPES: + ret = Vector_CreatePyObject(data, len, Py_NEW, NULL); break; - } - /* pass through */ + case PROP_MATRIX: + if (len == 16) { + ret = Matrix_CreatePyObject(data, 4, 4, Py_NEW, NULL); + break; + } + else if (len == 9) { + ret = Matrix_CreatePyObject(data, 3, 3, Py_NEW, NULL); + break; + } + /* pass through */ #endif - default: - ret = PyTuple_New(len); - for (a = 0; a < len; a++) - PyTuple_SET_ITEM(ret, a, PyFloat_FromDouble(((float *)data)[a])); + default: + ret = PyTuple_New(len); + for (a = 0; a < len; a++) + PyTuple_SET_ITEM(ret, a, PyFloat_FromDouble(((float *)data)[a])); - } - break; - default: - PyErr_Format(PyExc_TypeError, - "RNA Error: unknown array type \"%d\" (pyrna_param_to_py)", - type); - ret = NULL; - break; + } + break; + default: + PyErr_Format(PyExc_TypeError, + "RNA Error: unknown array type \"%d\" (pyrna_param_to_py)", + type); + ret = NULL; + break; } } else { /* see if we can coorce into a python type - PropertyType */ switch (type) { - case PROP_BOOLEAN: - ret = PyBool_FromLong(*(int *)data); - break; - case PROP_INT: - ret = PyLong_FromSsize_t((Py_ssize_t)*(int *)data); - break; - case PROP_FLOAT: - ret = PyFloat_FromDouble(*(float *)data); - break; - case PROP_STRING: - { - char *data_ch; - PyObject *value_coerce = NULL; - const int subtype = RNA_property_subtype(prop); + case PROP_BOOLEAN: + ret = PyBool_FromLong(*(int *)data); + break; + case PROP_INT: + ret = PyLong_FromSsize_t((Py_ssize_t)*(int *)data); + break; + case PROP_FLOAT: + ret = PyFloat_FromDouble(*(float *)data); + break; + case PROP_STRING: + { + char *data_ch; + PyObject *value_coerce = NULL; + const int subtype = RNA_property_subtype(prop); - if (flag & PROP_THICK_WRAP) - data_ch = (char *)data; - else - data_ch = *(char **)data; + if (flag & PROP_THICK_WRAP) + data_ch = (char *)data; + else + data_ch = *(char **)data; #ifdef USE_STRING_COERCE - if (subtype == PROP_BYTESTRING) { - ret = PyBytes_FromString(data_ch); - } - else if (ELEM3(subtype, PROP_FILEPATH, PROP_DIRPATH, PROP_FILENAME)) { - ret = PyC_UnicodeFromByte(data_ch); - } - else { - ret = PyUnicode_FromString(data_ch); - } + if (subtype == PROP_BYTESTRING) { + ret = PyBytes_FromString(data_ch); + } + else if (ELEM3(subtype, PROP_FILEPATH, PROP_DIRPATH, PROP_FILENAME)) { + ret = PyC_UnicodeFromByte(data_ch); + } + else { + ret = PyUnicode_FromString(data_ch); + } #else - if (subtype == PROP_BYTESTRING) { - ret = PyBytes_FromString(buf); - } - else { - ret = PyUnicode_FromString(data_ch); - } + if (subtype == PROP_BYTESTRING) { + ret = PyBytes_FromString(buf); + } + else { + ret = PyUnicode_FromString(data_ch); + } #endif #ifdef USE_STRING_COERCE - Py_XDECREF(value_coerce); + Py_XDECREF(value_coerce); #endif - break; - } - case PROP_ENUM: - { - ret = pyrna_enum_to_py(ptr, prop, *(int *)data); - break; - } - case PROP_POINTER: - { - PointerRNA newptr; - StructRNA *ptype = RNA_property_pointer_type(ptr, prop); - - if (flag & PROP_RNAPTR) { - /* in this case we get the full ptr */ - newptr = *(PointerRNA *)data; + break; } - else { - if (RNA_struct_is_ID(ptype)) { - RNA_id_pointer_create(*(void **)data, &newptr); + case PROP_ENUM: + { + ret = pyrna_enum_to_py(ptr, prop, *(int *)data); + break; + } + case PROP_POINTER: + { + PointerRNA newptr; + StructRNA *ptype = RNA_property_pointer_type(ptr, prop); + + if (flag & PROP_RNAPTR) { + /* in this case we get the full ptr */ + newptr = *(PointerRNA *)data; } else { - /* note: this is taken from the function's ID pointer - * and will break if a function returns a pointer from - * another ID block, watch this! - it should at least be - * easy to debug since they are all ID's */ - RNA_pointer_create(ptr->id.data, ptype, *(void **)data, &newptr); + if (RNA_struct_is_ID(ptype)) { + RNA_id_pointer_create(*(void **)data, &newptr); + } + else { + /* note: this is taken from the function's ID pointer + * and will break if a function returns a pointer from + * another ID block, watch this! - it should at least be + * easy to debug since they are all ID's */ + RNA_pointer_create(ptr->id.data, ptype, *(void **)data, &newptr); + } } - } - if (newptr.data) { - ret = pyrna_struct_CreatePyObject(&newptr); - } - else { - ret = Py_None; - Py_INCREF(ret); + if (newptr.data) { + ret = pyrna_struct_CreatePyObject(&newptr); + } + else { + ret = Py_None; + Py_INCREF(ret); + } + break; } - break; - } - case PROP_COLLECTION: - { - ListBase *lb = (ListBase *)data; - CollectionPointerLink *link; - PyObject *linkptr; + case PROP_COLLECTION: + { + ListBase *lb = (ListBase *)data; + CollectionPointerLink *link; + PyObject *linkptr; - ret = PyList_New(0); + ret = PyList_New(0); - for (link = lb->first; link; link = link->next) { - linkptr = pyrna_struct_CreatePyObject(&link->ptr); - PyList_Append(ret, linkptr); - Py_DECREF(linkptr); - } + for (link = lb->first; link; link = link->next) { + linkptr = pyrna_struct_CreatePyObject(&link->ptr); + PyList_Append(ret, linkptr); + Py_DECREF(linkptr); + } - break; - } - default: - PyErr_Format(PyExc_TypeError, - "RNA Error: unknown type \"%d\" (pyrna_param_to_py)", - type); - ret = NULL; - break; + break; + } + default: + PyErr_Format(PyExc_TypeError, + "RNA Error: unknown type \"%d\" (pyrna_param_to_py)", + type); + ret = NULL; + break; } } @@ -4954,7 +4953,7 @@ static PyObject *pyrna_func_call(BPy_FunctionRNA *self, PyObject *args, PyObject item = small_dict_get_item_string(kw, RNA_property_identifier(parm)); /* borrow ref */ #endif if (item) - kw_tot++; /* make sure invalid keywords are not given */ + kw_tot++; /* make sure invalid keywords are not given */ kw_arg = TRUE; } @@ -5206,30 +5205,30 @@ PyTypeObject pyrna_struct_meta_idprop_Type = { /* Functions to access object as input/output buffer */ NULL, /* PyBufferProcs *tp_as_buffer; */ - /*** Flags to define presence of optional/expanded features ***/ + /*** Flags to define presence of optional/expanded features ***/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ NULL, /* char *tp_doc; Documentation string */ - /*** Assigned meaning in release 2.0 ***/ + /*** Assigned meaning in release 2.0 ***/ /* call function for all accessible objects */ NULL, /* traverseproc tp_traverse; */ /* delete references to contained objects */ NULL, /* inquiry tp_clear; */ - /*** Assigned meaning in release 2.1 ***/ - /*** rich comparisons ***/ + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ NULL, /* richcmpfunc tp_richcompare; */ - /*** weak reference enabler ***/ + /*** weak reference enabler ***/ 0, /* long tp_weaklistoffset; */ - /*** Added in release 2.2 ***/ + /*** Added in release 2.2 ***/ /* Iterators */ NULL, /* getiterfunc tp_iter; */ NULL, /* iternextfunc tp_iternext; */ - /*** Attribute descriptor and subclassing stuff ***/ + /*** Attribute descriptor and subclassing stuff ***/ NULL, /* struct PyMethodDef *tp_methods; */ NULL, /* struct PyMemberDef *tp_members; */ NULL, /* struct PyGetSetDef *tp_getset; */ @@ -5266,7 +5265,7 @@ PyTypeObject pyrna_struct_Type = { sizeof(BPy_StructRNA), /* tp_basicsize */ 0, /* tp_itemsize */ /* methods */ - (destructor) pyrna_struct_dealloc,/* tp_dealloc */ + (destructor) pyrna_struct_dealloc, /* tp_dealloc */ NULL, /* printfunc tp_print; */ NULL, /* getattrfunc tp_getattr; */ NULL, /* setattrfunc tp_setattr; */ @@ -5290,11 +5289,11 @@ PyTypeObject pyrna_struct_Type = { /* Functions to access object as input/output buffer */ NULL, /* PyBufferProcs *tp_as_buffer; */ - /*** Flags to define presence of optional/expanded features ***/ + /*** Flags to define presence of optional/expanded features ***/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, /* long tp_flags; */ NULL, /* char *tp_doc; Documentation string */ - /*** Assigned meaning in release 2.0 ***/ + /*** Assigned meaning in release 2.0 ***/ /* call function for all accessible objects */ #ifdef USE_PYRNA_STRUCT_REFERENCE (traverseproc) pyrna_struct_traverse, /* traverseproc tp_traverse; */ @@ -5308,22 +5307,22 @@ PyTypeObject pyrna_struct_Type = { NULL, /* inquiry tp_clear; */ #endif /* !USE_PYRNA_STRUCT_REFERENCE */ - /*** Assigned meaning in release 2.1 ***/ - /*** rich comparisons ***/ + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ (richcmpfunc)pyrna_struct_richcmp, /* richcmpfunc tp_richcompare; */ - /*** weak reference enabler ***/ + /*** weak reference enabler ***/ #ifdef USE_WEAKREFS offsetof(BPy_StructRNA, in_weakreflist), /* long tp_weaklistoffset; */ #else 0, #endif - /*** Added in release 2.2 ***/ + /*** Added in release 2.2 ***/ /* Iterators */ NULL, /* getiterfunc tp_iter; */ NULL, /* iternextfunc tp_iternext; */ - /*** Attribute descriptor and subclassing stuff ***/ + /*** Attribute descriptor and subclassing stuff ***/ pyrna_struct_methods, /* struct PyMethodDef *tp_methods; */ NULL, /* struct PyMemberDef *tp_members; */ pyrna_struct_getseters, /* struct PyGetSetDef *tp_getset; */ @@ -5381,37 +5380,37 @@ PyTypeObject pyrna_prop_Type = { /* Functions to access object as input/output buffer */ NULL, /* PyBufferProcs *tp_as_buffer; */ - /*** Flags to define presence of optional/expanded features ***/ + /*** Flags to define presence of optional/expanded features ***/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ NULL, /* char *tp_doc; Documentation string */ - /*** Assigned meaning in release 2.0 ***/ + /*** Assigned meaning in release 2.0 ***/ /* call function for all accessible objects */ NULL, /* traverseproc tp_traverse; */ /* delete references to contained objects */ NULL, /* inquiry tp_clear; */ - /*** Assigned meaning in release 2.1 ***/ - /*** rich comparisons ***/ - (richcmpfunc)pyrna_prop_richcmp, /* richcmpfunc tp_richcompare; */ + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ + (richcmpfunc)pyrna_prop_richcmp, /* richcmpfunc tp_richcompare; */ - /*** weak reference enabler ***/ + /*** weak reference enabler ***/ #ifdef USE_WEAKREFS - offsetof(BPy_PropertyRNA, in_weakreflist), /* long tp_weaklistoffset; */ + offsetof(BPy_PropertyRNA, in_weakreflist), /* long tp_weaklistoffset; */ #else 0, #endif - /*** Added in release 2.2 ***/ + /*** Added in release 2.2 ***/ /* Iterators */ NULL, /* getiterfunc tp_iter; */ NULL, /* iternextfunc tp_iternext; */ - /*** Attribute descriptor and subclassing stuff ***/ + /*** Attribute descriptor and subclassing stuff ***/ pyrna_prop_methods, /* struct PyMethodDef *tp_methods; */ NULL, /* struct PyMemberDef *tp_members; */ - pyrna_prop_getseters, /* struct PyGetSetDef *tp_getset; */ + pyrna_prop_getseters, /* struct PyGetSetDef *tp_getset; */ NULL, /* struct _typeobject *tp_base; */ NULL, /* PyObject *tp_dict; */ NULL, /* descrgetfunc tp_descr_get; */ @@ -5436,7 +5435,7 @@ PyTypeObject pyrna_prop_Type = { PyTypeObject pyrna_prop_array_Type = { PyVarObject_HEAD_INIT(NULL, 0) "bpy_prop_array", /* tp_name */ - sizeof(BPy_PropertyArrayRNA), /* tp_basicsize */ + sizeof(BPy_PropertyArrayRNA), /* tp_basicsize */ 0, /* tp_itemsize */ /* methods */ (destructor)pyrna_prop_array_dealloc, /* tp_dealloc */ @@ -5444,7 +5443,7 @@ PyTypeObject pyrna_prop_array_Type = { NULL, /* getattrfunc tp_getattr; */ NULL, /* setattrfunc tp_setattr; */ NULL, /* tp_compare */ /* DEPRECATED in python 3.0! */ - NULL,/* subclassed */ /* tp_repr */ + NULL, /* subclassed */ /* tp_repr */ /* Method suites for standard classes */ @@ -5465,33 +5464,33 @@ PyTypeObject pyrna_prop_array_Type = { /* Functions to access object as input/output buffer */ NULL, /* PyBufferProcs *tp_as_buffer; */ - /*** Flags to define presence of optional/expanded features ***/ + /*** Flags to define presence of optional/expanded features ***/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ NULL, /* char *tp_doc; Documentation string */ - /*** Assigned meaning in release 2.0 ***/ + /*** Assigned meaning in release 2.0 ***/ /* call function for all accessible objects */ NULL, /* traverseproc tp_traverse; */ /* delete references to contained objects */ NULL, /* inquiry tp_clear; */ - /*** Assigned meaning in release 2.1 ***/ - /*** rich comparisons ***/ + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ NULL, /* subclassed */ /* richcmpfunc tp_richcompare; */ - /*** weak reference enabler ***/ + /*** weak reference enabler ***/ #ifdef USE_WEAKREFS - offsetof(BPy_PropertyArrayRNA, in_weakreflist), /* long tp_weaklistoffset; */ + offsetof(BPy_PropertyArrayRNA, in_weakreflist), /* long tp_weaklistoffset; */ #else 0, #endif - /*** Added in release 2.2 ***/ + /*** Added in release 2.2 ***/ /* Iterators */ - (getiterfunc)pyrna_prop_array_iter, /* getiterfunc tp_iter; */ + (getiterfunc)pyrna_prop_array_iter, /* getiterfunc tp_iter; */ NULL, /* iternextfunc tp_iternext; */ - /*** Attribute descriptor and subclassing stuff ***/ + /*** Attribute descriptor and subclassing stuff ***/ pyrna_prop_array_methods, /* struct PyMethodDef *tp_methods; */ NULL, /* struct PyMemberDef *tp_members; */ NULL /*pyrna_prop_getseters*/, /* struct PyGetSetDef *tp_getset; */ @@ -5548,34 +5547,34 @@ PyTypeObject pyrna_prop_collection_Type = { /* Functions to access object as input/output buffer */ NULL, /* PyBufferProcs *tp_as_buffer; */ - /*** Flags to define presence of optional/expanded features ***/ + /*** Flags to define presence of optional/expanded features ***/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ NULL, /* char *tp_doc; Documentation string */ - /*** Assigned meaning in release 2.0 ***/ + /*** Assigned meaning in release 2.0 ***/ /* call function for all accessible objects */ NULL, /* traverseproc tp_traverse; */ /* delete references to contained objects */ NULL, /* inquiry tp_clear; */ - /*** Assigned meaning in release 2.1 ***/ - /*** rich comparisons ***/ + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ NULL, /* subclassed */ /* richcmpfunc tp_richcompare; */ - /*** weak reference enabler ***/ + /*** weak reference enabler ***/ #ifdef USE_WEAKREFS offsetof(BPy_PropertyRNA, in_weakreflist), /* long tp_weaklistoffset; */ #else 0, #endif - /*** Added in release 2.2 ***/ + /*** Added in release 2.2 ***/ /* Iterators */ (getiterfunc)pyrna_prop_collection_iter, /* getiterfunc tp_iter; */ NULL, /* iternextfunc tp_iternext; */ - /*** Attribute descriptor and subclassing stuff ***/ + /*** Attribute descriptor and subclassing stuff ***/ pyrna_prop_collection_methods, /* struct PyMethodDef *tp_methods; */ NULL, /* struct PyMemberDef *tp_members; */ NULL /*pyrna_prop_getseters*/, /* struct PyGetSetDef *tp_getset; */ @@ -5633,38 +5632,38 @@ static PyTypeObject pyrna_prop_collection_idprop_Type = { /* Functions to access object as input/output buffer */ NULL, /* PyBufferProcs *tp_as_buffer; */ - /*** Flags to define presence of optional/expanded features ***/ + /*** Flags to define presence of optional/expanded features ***/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* long tp_flags; */ NULL, /* char *tp_doc; Documentation string */ - /*** Assigned meaning in release 2.0 ***/ + /*** Assigned meaning in release 2.0 ***/ /* call function for all accessible objects */ NULL, /* traverseproc tp_traverse; */ /* delete references to contained objects */ NULL, /* inquiry tp_clear; */ - /*** Assigned meaning in release 2.1 ***/ - /*** rich comparisons ***/ + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ NULL, /* subclassed */ /* richcmpfunc tp_richcompare; */ - /*** weak reference enabler ***/ + /*** weak reference enabler ***/ #ifdef USE_WEAKREFS offsetof(BPy_PropertyRNA, in_weakreflist), /* long tp_weaklistoffset; */ #else 0, #endif - /*** Added in release 2.2 ***/ + /*** Added in release 2.2 ***/ /* Iterators */ NULL, /* getiterfunc tp_iter; */ NULL, /* iternextfunc tp_iternext; */ - /*** Attribute descriptor and subclassing stuff ***/ + /*** Attribute descriptor and subclassing stuff ***/ pyrna_prop_collection_idprop_methods, /* struct PyMethodDef *tp_methods; */ NULL, /* struct PyMemberDef *tp_members; */ NULL /*pyrna_prop_getseters*/, /* struct PyGetSetDef *tp_getset; */ - &pyrna_prop_collection_Type,/* struct _typeobject *tp_base; */ + &pyrna_prop_collection_Type, /* struct _typeobject *tp_base; */ NULL, /* PyObject *tp_dict; */ NULL, /* descrgetfunc tp_descr_get; */ NULL, /* descrsetfunc tp_descr_set; */ @@ -5718,34 +5717,34 @@ PyTypeObject pyrna_func_Type = { /* Functions to access object as input/output buffer */ NULL, /* PyBufferProcs *tp_as_buffer; */ - /*** Flags to define presence of optional/expanded features ***/ + /*** Flags to define presence of optional/expanded features ***/ Py_TPFLAGS_DEFAULT, /* long tp_flags; */ NULL, /* char *tp_doc; Documentation string */ - /*** Assigned meaning in release 2.0 ***/ + /*** Assigned meaning in release 2.0 ***/ /* call function for all accessible objects */ NULL, /* traverseproc tp_traverse; */ /* delete references to contained objects */ NULL, /* inquiry tp_clear; */ - /*** Assigned meaning in release 2.1 ***/ - /*** rich comparisons ***/ + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ NULL, /* richcmpfunc tp_richcompare; */ - /*** weak reference enabler ***/ + /*** weak reference enabler ***/ #ifdef USE_WEAKREFS - offsetof(BPy_PropertyRNA, in_weakreflist), /* long tp_weaklistoffset; */ + offsetof(BPy_PropertyRNA, in_weakreflist), /* long tp_weaklistoffset; */ #else 0, #endif - /*** Added in release 2.2 ***/ + /*** Added in release 2.2 ***/ /* Iterators */ NULL, /* getiterfunc tp_iter; */ NULL, /* iternextfunc tp_iternext; */ - /*** Attribute descriptor and subclassing stuff ***/ + /*** Attribute descriptor and subclassing stuff ***/ NULL, /* struct PyMethodDef *tp_methods; */ NULL, /* struct PyMemberDef *tp_members; */ pyrna_func_getseters, /* struct PyGetSetDef *tp_getset; */ @@ -5793,7 +5792,7 @@ PyTypeObject pyrna_prop_collection_iter_Type = { NULL, /* getattrfunc tp_getattr; */ NULL, /* setattrfunc tp_setattr; */ NULL, /* tp_compare */ /* DEPRECATED in python 3.0! */ - NULL,/* subclassed */ /* tp_repr */ + NULL, /* subclassed */ /* tp_repr */ /* Method suites for standard classes */ @@ -5818,28 +5817,28 @@ PyTypeObject pyrna_prop_collection_iter_Type = { /* Functions to access object as input/output buffer */ NULL, /* PyBufferProcs *tp_as_buffer; */ - /*** Flags to define presence of optional/expanded features ***/ + /*** Flags to define presence of optional/expanded features ***/ Py_TPFLAGS_DEFAULT, /* long tp_flags; */ NULL, /* char *tp_doc; Documentation string */ - /*** Assigned meaning in release 2.0 ***/ + /*** Assigned meaning in release 2.0 ***/ /* call function for all accessible objects */ NULL, /* traverseproc tp_traverse; */ /* delete references to contained objects */ NULL, /* inquiry tp_clear; */ - /*** Assigned meaning in release 2.1 ***/ - /*** rich comparisons ***/ + /*** Assigned meaning in release 2.1 ***/ + /*** rich comparisons ***/ NULL, /* subclassed */ /* richcmpfunc tp_richcompare; */ - /*** weak reference enabler ***/ + /*** weak reference enabler ***/ #ifdef USE_WEAKREFS offsetof(BPy_PropertyCollectionIterRNA, in_weakreflist), /* long tp_weaklistoffset; */ #else 0, #endif - /*** Added in release 2.2 ***/ + /*** Added in release 2.2 ***/ /* Iterators */ #if defined(_MSC_VER) || defined(FREE_WINDOWS) NULL, /* defer assignment */ @@ -5848,7 +5847,7 @@ PyTypeObject pyrna_prop_collection_iter_Type = { #endif (iternextfunc) pyrna_prop_collection_iter_next, /* iternextfunc tp_iternext; */ - /*** Attribute descriptor and subclassing stuff ***/ + /*** Attribute descriptor and subclassing stuff ***/ NULL, /* struct PyMethodDef *tp_methods; */ NULL, /* struct PyMemberDef *tp_members; */ NULL, /* struct PyGetSetDef *tp_getset; */ @@ -5977,7 +5976,7 @@ static PyObject *pyrna_srna_PyBase(StructRNA *srna) //, PyObject *bpy_types_dict base = RNA_struct_base(srna); if (base && base != srna) { - /*/printf("debug subtype %s %p\n", RNA_struct_identifier(srna), srna); */ + /* printf("debug subtype %s %p\n", RNA_struct_identifier(srna), srna); */ py_base = pyrna_srna_Subtype(base); //, bpy_types_dict); Py_DECREF(py_base); /* srna owns, this is only to pass as an arg */ } @@ -6047,18 +6046,18 @@ static PyObject *pyrna_srna_Subtype(StructRNA *srna) { PyObject *newclass = NULL; - /* stupid/simple case */ + /* stupid/simple case */ if (srna == NULL) { newclass = NULL; /* Nothing to do */ - } /* the class may have already been declared & allocated */ + } /* the class may have already been declared & allocated */ else if ((newclass = RNA_struct_py_type_get(srna))) { Py_INCREF(newclass); - } /* check if bpy_types.py module has the class defined in it */ + } /* check if bpy_types.py module has the class defined in it */ else if ((newclass = pyrna_srna_ExternalType(srna))) { pyrna_subtype_set_rna(newclass, srna); Py_INCREF(newclass); - } /* create a new class instance with the C api - * mainly for the purposing of matching the C/rna type hierarchy */ + } /* create a new class instance with the C api + * mainly for the purposing of matching the C/rna type hierarchy */ else { /* subclass equivalents * - class myClass(myBase): @@ -6087,7 +6086,7 @@ static PyObject *pyrna_srna_Subtype(StructRNA *srna) /* always use O not N when calling, N causes refcount errors */ newclass = PyObject_CallFunction(metaclass, (char *)"s(O) {sss()}", - idname, py_base, "__module__","bpy.types", "__slots__"); + idname, py_base, "__module__", "bpy.types", "__slots__"); /* newclass will now have 2 ref's, ???, probably 1 is internal since decrefing here segfaults */ @@ -6782,24 +6781,24 @@ static int bpy_class_validate(PointerRNA *dummyptr, void *py_data, int *have_fun /* Sneaky workaround to use the class name as the bl_idname */ #define BPY_REPLACEMENT_STRING(rna_attr, py_attr) \ - if (strcmp(identifier, rna_attr) == 0) { \ - item = PyObject_GetAttrString(py_class, py_attr); \ - if (item && item != Py_None) { \ - if (pyrna_py_to_prop(dummyptr, prop, NULL, \ - item, "validating class:") != 0) \ - { \ - Py_DECREF(item); \ - return -1; \ - } \ - } \ - Py_XDECREF(item); \ + if (strcmp(identifier, rna_attr) == 0) { \ + item = PyObject_GetAttrString(py_class, py_attr); \ + if (item && item != Py_None) { \ + if (pyrna_py_to_prop(dummyptr, prop, NULL, \ + item, "validating class:") != 0) \ + { \ + Py_DECREF(item); \ + return -1; \ } \ + } \ + Py_XDECREF(item); \ + } \ BPY_REPLACEMENT_STRING("bl_idname", "__name__"); BPY_REPLACEMENT_STRING("bl_description", "__doc__"); -#undef BPY_REPLACEMENT_STRING +#undef BPY_REPLACEMENT_STRING if (item == NULL && (((flag & PROP_REGISTER_OPTIONAL) != PROP_REGISTER_OPTIONAL))) { PyErr_Format(PyExc_AttributeError, @@ -6848,8 +6847,8 @@ static int bpy_class_call(bContext *C, PointerRNA *ptr, FunctionRNA *func, Param const char *func_id = RNA_function_identifier(func); /* testing, for correctness, not operator and not draw function */ const short is_readonly = ((strncmp("draw", func_id, 4) == 0) || /* draw or draw_header */ - /*strstr("render", func_id) ||*/ - !is_operator); + /*strstr("render", func_id) ||*/ + !is_operator); #endif py_class = RNA_struct_py_type_get(ptr->type); @@ -7001,7 +7000,7 @@ static int bpy_class_call(bContext *C, PointerRNA *ptr, FunctionRNA *func, Param } #ifdef USE_PEDANTIC_WRITE - rna_disallow_writes = is_readonly ? TRUE:FALSE; + rna_disallow_writes = is_readonly ? TRUE : FALSE; #endif /* *** Main Caller *** */ @@ -7088,8 +7087,8 @@ static int bpy_class_call(bContext *C, PointerRNA *ptr, FunctionRNA *func, Param /* only useful for single argument returns, we'll need another list loop for multiple */ if (flag & PROP_OUTPUT) { err = pyrna_py_to_prop(&funcptr, parm, iter.data, - PyTuple_GET_ITEM(ret, i++), - "calling class function:"); + PyTuple_GET_ITEM(ret, i++), + "calling class function:"); if (err) { break; } @@ -7203,7 +7202,7 @@ void pyrna_free_types(void) void *py_ptr = RNA_struct_py_type_get(srna); if (py_ptr) { -#if 0 // XXX - should be able to do this but makes python crash on exit +#if 0 // XXX - should be able to do this but makes python crash on exit bpy_class_free(py_ptr); #endif RNA_struct_py_type_set(srna, NULL); @@ -7383,7 +7382,7 @@ PyDoc_STRVAR(pyrna_unregister_class_doc, " before unregistering.\n" ); PyMethodDef meth_bpy_unregister_class = { - "unregister_class", pyrna_unregister_class, METH_O, pyrna_unregister_class_doc + "unregister_class", pyrna_unregister_class, METH_O, pyrna_unregister_class_doc }; static PyObject *pyrna_unregister_class(PyObject *UNUSED(self), PyObject *py_class) { @@ -7482,7 +7481,7 @@ static PyObject *pyrna_unregister_class(PyObject *UNUSED(self), PyObject *py_cla PyDict_DelItem(((PyTypeObject *)py_class)->tp_dict, bpy_intern_str_bl_rna); if (PyErr_Occurred()) - PyErr_Clear(); //return NULL; + PyErr_Clear(); //return NULL; Py_RETURN_NONE; } diff --git a/source/blender/python/intern/bpy_rna_anim.c b/source/blender/python/intern/bpy_rna_anim.c index 4b4d0ff3535..b7a45897668 100644 --- a/source/blender/python/intern/bpy_rna_anim.c +++ b/source/blender/python/intern/bpy_rna_anim.c @@ -149,8 +149,8 @@ static int pyrna_struct_anim_args_parse( /* internal use for insert and delete */ static int pyrna_struct_keyframe_parse( - PointerRNA *ptr, PyObject *args, PyObject *kw, const char *parse_str, const char *error_prefix, - const char **path_full, int *index, float *cfra, const char **group_name) /* return values */ + PointerRNA *ptr, PyObject *args, PyObject *kw, const char *parse_str, const char *error_prefix, + const char **path_full, int *index, float *cfra, const char **group_name) /* return values */ { static const char *kwlist[] = {"data_path", "index", "frame", "group", NULL}; const char *path; @@ -195,8 +195,8 @@ PyObject *pyrna_struct_keyframe_insert(BPy_StructRNA *self, PyObject *args, PyOb PYRNA_STRUCT_CHECK_OBJ(self); if (pyrna_struct_keyframe_parse(&self->ptr, args, kw, - "s|ifs:bpy_struct.keyframe_insert()", "bpy_struct.keyframe_insert()", - &path_full, &index, &cfra, &group_name) == -1) + "s|ifs:bpy_struct.keyframe_insert()", "bpy_struct.keyframe_insert()", + &path_full, &index, &cfra, &group_name) == -1) { return NULL; } @@ -243,9 +243,9 @@ PyObject *pyrna_struct_keyframe_delete(BPy_StructRNA *self, PyObject *args, PyOb PYRNA_STRUCT_CHECK_OBJ(self); if (pyrna_struct_keyframe_parse(&self->ptr, args, kw, - "s|ifs:bpy_struct.keyframe_delete()", - "bpy_struct.keyframe_insert()", - &path_full, &index, &cfra, &group_name) == -1) + "s|ifs:bpy_struct.keyframe_delete()", + "bpy_struct.keyframe_insert()", + &path_full, &index, &cfra, &group_name) == -1) { return NULL; } @@ -327,7 +327,7 @@ PyObject *pyrna_struct_driver_add(BPy_StructRNA *self, PyObject *args) ret = pyrna_struct_CreatePyObject(&tptr); } - WM_event_add_notifier(BPy_GetContext(), NC_ANIMATION|ND_FCURVES_ORDER, NULL); + WM_event_add_notifier(BPy_GetContext(), NC_ANIMATION | ND_FCURVES_ORDER, NULL); } else { /* XXX, should be handled by reports, */ @@ -380,7 +380,7 @@ PyObject *pyrna_struct_driver_remove(BPy_StructRNA *self, PyObject *args) if (BPy_reports_to_error(&reports, PyExc_RuntimeError, TRUE) == -1) return NULL; - WM_event_add_notifier(BPy_GetContext(), NC_ANIMATION|ND_FCURVES_ORDER, NULL); + WM_event_add_notifier(BPy_GetContext(), NC_ANIMATION | ND_FCURVES_ORDER, NULL); return PyBool_FromLong(result); } diff --git a/source/blender/python/intern/bpy_rna_array.c b/source/blender/python/intern/bpy_rna_array.c index 6e6eb015387..8d8219df188 100644 --- a/source/blender/python/intern/bpy_rna_array.c +++ b/source/blender/python/intern/bpy_rna_array.c @@ -45,7 +45,7 @@ #define MAX_ARRAY_DIMENSION 10 typedef void (*ItemConvertFunc)(PyObject *, char *); -typedef int (*ItemTypeCheckFunc)(PyObject *); +typedef int (*ItemTypeCheckFunc)(PyObject *); typedef void (*RNA_SetArrayFunc)(PointerRNA *, PropertyRNA *, const char *); typedef void (*RNA_SetIndexFunc)(PointerRNA *, PropertyRNA *, int index, void *); @@ -65,7 +65,7 @@ typedef void (*RNA_SetIndexFunc)(PointerRNA *, PropertyRNA *, int index, void *) /* arr[3] = x, self->arraydim is 0, lvalue_dim is 1 */ /* Ensures that a python sequence has expected number of items/sub-items and items are of desired type. */ static int validate_array_type(PyObject *seq, int dim, int totdim, int dimsize[], - ItemTypeCheckFunc check_item_type, const char *item_type_str, const char *error_prefix) + ItemTypeCheckFunc check_item_type, const char *item_type_str, const char *error_prefix) { Py_ssize_t i; diff --git a/source/blender/python/intern/bpy_traceback.c b/source/blender/python/intern/bpy_traceback.c index aaba90604f5..0e3162e09a4 100644 --- a/source/blender/python/intern/bpy_traceback.c +++ b/source/blender/python/intern/bpy_traceback.c @@ -42,7 +42,7 @@ static const char *traceback_filepath(PyTracebackObject *tb, PyObject **coerce) /* copied from pythonrun.c, 3.2.0 */ static int parse_syntax_error(PyObject *err, PyObject **message, const char **filename, - int *lineno, int *offset, const char **text) + int *lineno, int *offset, const char **text) { long hold; PyObject *v; @@ -50,7 +50,7 @@ parse_syntax_error(PyObject *err, PyObject **message, const char **filename, /* old style errors */ if (PyTuple_Check(err)) return PyArg_ParseTuple(err, "O(ziiz)", message, filename, - lineno, offset, text); + lineno, offset, text); /* new style errors. `err' is an instance */ @@ -96,7 +96,7 @@ parse_syntax_error(PyObject *err, PyObject **message, const char **filename, if (v == Py_None) *text = NULL; else if (!PyUnicode_Check(v) || - !(*text = _PyUnicode_AsString(v))) + !(*text = _PyUnicode_AsString(v))) goto finally; Py_DECREF(v); return 1; @@ -122,7 +122,7 @@ void python_script_error_jump(const char *filepath, int *lineno, int *offset) /* no traceback available when SyntaxError. * python has no api's to this. reference parse_syntax_error() from pythonrun.c */ PyErr_NormalizeException(&exception, &value, (PyObject **)&tb); - PyErr_Restore(exception, value, (PyObject *)tb); /* takes away reference! */ + PyErr_Restore(exception, value, (PyObject *)tb); /* takes away reference! */ if (value) { /* should always be true */ PyObject *message; @@ -146,7 +146,7 @@ void python_script_error_jump(const char *filepath, int *lineno, int *offset) } else { PyErr_NormalizeException(&exception, &value, (PyObject **)&tb); - PyErr_Restore(exception, value, (PyObject *)tb); /* takes away reference! */ + PyErr_Restore(exception, value, (PyObject *)tb); /* takes away reference! */ PyErr_Print(); for (tb = (PyTracebackObject *)PySys_GetObject("last_traceback"); diff --git a/source/blender/python/intern/bpy_util.c b/source/blender/python/intern/bpy_util.c index ec7eff1756a..01495c793a8 100644 --- a/source/blender/python/intern/bpy_util.c +++ b/source/blender/python/intern/bpy_util.c @@ -37,9 +37,9 @@ #include "../generic/py_capi_utils.h" -static bContext* __py_context = NULL; -bContext* BPy_GetContext(void) { return __py_context; } -void BPy_SetContext(bContext *C) { __py_context = C; } +static bContext* __py_context = NULL; +bContext *BPy_GetContext(void) { return __py_context; } +void BPy_SetContext(bContext *C) { __py_context = C; } char *BPy_enum_as_string(EnumPropertyItem *item) { @@ -49,7 +49,7 @@ char *BPy_enum_as_string(EnumPropertyItem *item) for (e = item; item->identifier; item++) { if (item->identifier[0]) - BLI_dynstr_appendf(dynstr, (e == item)?"'%s'":", '%s'", item->identifier); + BLI_dynstr_appendf(dynstr, (e == item) ? "'%s'" : ", '%s'", item->identifier); } cstring = BLI_dynstr_get_cstring(dynstr); diff --git a/source/blender/python/intern/gpu.c b/source/blender/python/intern/gpu.c index cc7506f863e..e5f45ca7736 100644 --- a/source/blender/python/intern/gpu.c +++ b/source/blender/python/intern/gpu.c @@ -60,18 +60,18 @@ #include "gpu.h" -#define PY_MODULE_ADD_CONSTANT(module, name) PyModule_AddIntConstant(module, #name, name) +#define PY_MODULE_ADD_CONSTANT(module, name) PyModule_AddIntConstant(module, # name, name) PyDoc_STRVAR(M_gpu_doc, - "This module provides access to the GLSL shader."); - +"This module provides access to the GLSL shader." +); static struct PyModuleDef gpumodule = { PyModuleDef_HEAD_INIT, "gpu", /* name of module */ M_gpu_doc, /* module documentation */ -1, /* size of per-interpreter state of the module, * or -1 if the module keeps state in global variables. */ - NULL, NULL, NULL, NULL, NULL + NULL, NULL, NULL, NULL, NULL }; PyMODINIT_FUNC @@ -116,35 +116,35 @@ PyInit_gpu(void) return m; } -#define PY_DICT_ADD_STRING(d,s,f) \ - val = PyUnicode_FromString(s->f); \ - PyDict_SetItemString(d, #f, val); \ +#define PY_DICT_ADD_STRING(d, s, f) \ + val = PyUnicode_FromString(s->f); \ + PyDict_SetItemString(d, # f, val); \ Py_DECREF(val) -#define PY_DICT_ADD_LONG(d,s,f) \ - val = PyLong_FromLong(s->f); \ - PyDict_SetItemString(d, #f, val); \ +#define PY_DICT_ADD_LONG(d, s, f) \ + val = PyLong_FromLong(s->f); \ + PyDict_SetItemString(d, # f, val); \ Py_DECREF(val) -#define PY_DICT_ADD_ID(d,s,f) \ - RNA_id_pointer_create((struct ID*)s->f, &tptr); \ - val = pyrna_struct_CreatePyObject(&tptr); \ - PyDict_SetItemString(d, #f, val); \ +#define PY_DICT_ADD_ID(d, s, f) \ + RNA_id_pointer_create((struct ID *)s->f, &tptr); \ + val = pyrna_struct_CreatePyObject(&tptr); \ + PyDict_SetItemString(d, # f, val); \ Py_DECREF(val) -#define PY_OBJ_ADD_ID(d,s,f) \ - val = PyUnicode_FromString(&s->f->id.name[2]); \ - PyObject_SetAttrString(d, #f, val); \ +#define PY_OBJ_ADD_ID(d, s, f) \ + val = PyUnicode_FromString(&s->f->id.name[2]); \ + PyObject_SetAttrString(d, # f, val); \ Py_DECREF(val) -#define PY_OBJ_ADD_LONG(d,s,f) \ - val = PyLong_FromLong(s->f); \ - PyObject_SetAttrString(d, #f, val); \ +#define PY_OBJ_ADD_LONG(d, s, f) \ + val = PyLong_FromLong(s->f); \ + PyObject_SetAttrString(d, # f, val); \ Py_DECREF(val) -#define PY_OBJ_ADD_STRING(d,s,f) \ - val = PyUnicode_FromString(s->f); \ - PyObject_SetAttrString(d, #f, val); \ +#define PY_OBJ_ADD_STRING(d, s, f) \ + val = PyUnicode_FromString(s->f); \ + PyObject_SetAttrString(d, # f, val); \ Py_DECREF(val) PyDoc_STRVAR(GPU_export_shader_doc, @@ -196,33 +196,34 @@ static PyObject *GPU_export_shader(PyObject *UNUSED(self), PyObject *args, PyObj // build a dictionary result = PyDict_New(); if (shader->fragment) { - PY_DICT_ADD_STRING(result,shader,fragment); + PY_DICT_ADD_STRING(result, shader, fragment); } if (shader->vertex) { - PY_DICT_ADD_STRING(result,shader,vertex); + PY_DICT_ADD_STRING(result, shader, vertex); } seq = PyList_New(BLI_countlist(&shader->uniforms)); for (i = 0, uniform = shader->uniforms.first; uniform; uniform = uniform->next, i++) { dict = PyDict_New(); - PY_DICT_ADD_STRING(dict,uniform,varname); - PY_DICT_ADD_LONG(dict,uniform,datatype); - PY_DICT_ADD_LONG(dict,uniform,type); + PY_DICT_ADD_STRING(dict, uniform, varname); + PY_DICT_ADD_LONG(dict, uniform, datatype); + PY_DICT_ADD_LONG(dict, uniform, type); if (uniform->lamp) { - PY_DICT_ADD_ID(dict,uniform,lamp); + PY_DICT_ADD_ID(dict, uniform, lamp); } if (uniform->image) { - PY_DICT_ADD_ID(dict,uniform,image); + PY_DICT_ADD_ID(dict, uniform, image); } if (uniform->type == GPU_DYNAMIC_SAMPLER_2DBUFFER || - uniform->type == GPU_DYNAMIC_SAMPLER_2DIMAGE || - uniform->type == GPU_DYNAMIC_SAMPLER_2DSHADOW) { - PY_DICT_ADD_LONG(dict,uniform,texnumber); + uniform->type == GPU_DYNAMIC_SAMPLER_2DIMAGE || + uniform->type == GPU_DYNAMIC_SAMPLER_2DSHADOW) + { + PY_DICT_ADD_LONG(dict, uniform, texnumber); } if (uniform->texpixels) { val = PyByteArray_FromStringAndSize((const char *)uniform->texpixels, uniform->texsize * 4); PyDict_SetItemString(dict, "texpixels", val); Py_DECREF(val); - PY_DICT_ADD_LONG(dict,uniform,texsize); + PY_DICT_ADD_LONG(dict, uniform, texsize); } PyList_SET_ITEM(seq, i, dict); } @@ -232,13 +233,13 @@ static PyObject *GPU_export_shader(PyObject *UNUSED(self), PyObject *args, PyObj seq = PyList_New(BLI_countlist(&shader->attributes)); for (i = 0, attribute = shader->attributes.first; attribute; attribute = attribute->next, i++) { dict = PyDict_New(); - PY_DICT_ADD_STRING(dict,attribute,varname); - PY_DICT_ADD_LONG(dict,attribute,datatype); - PY_DICT_ADD_LONG(dict,attribute,type); - PY_DICT_ADD_LONG(dict,attribute,number); + PY_DICT_ADD_STRING(dict, attribute, varname); + PY_DICT_ADD_LONG(dict, attribute, datatype); + PY_DICT_ADD_LONG(dict, attribute, type); + PY_DICT_ADD_LONG(dict, attribute, number); if (attribute->name) { if (attribute->name[0] != 0) { - PY_DICT_ADD_STRING(dict,attribute,name); + PY_DICT_ADD_STRING(dict, attribute, name); } else { val = PyLong_FromLong(0); -- cgit v1.2.3 From 40c667e75e4e3bfa0bcbdbc678d72df061764aeb Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 26 Mar 2012 22:26:30 +0000 Subject: Clean-up logic of behavior of refresh/reload operators in sequencer After discussion with Campbell we found much nicer solution which keeps operation with data much more clear: - Refresh Sequencer is totally harmless, do not touch actual data and just removes everything from cache - Reload Strip will reload data and adjust it's length for all selected strips without affecting on length of strip itself - Reload Strip and Adjust length will do the same but will also adjust length of strip itself. --- source/blender/blenkernel/BKE_sequencer.h | 2 -- source/blender/blenkernel/intern/sequencer.c | 28 ---------------------- .../editors/space_sequencer/sequencer_edit.c | 25 +++++++++---------- .../editors/space_sequencer/sequencer_ops.c | 3 +++ 4 files changed, 16 insertions(+), 42 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h index 8f53dc041a3..7a84e71c763 100644 --- a/source/blender/blenkernel/BKE_sequencer.h +++ b/source/blender/blenkernel/BKE_sequencer.h @@ -348,6 +348,4 @@ extern SequencerDrawView sequencer_view3d_cb; extern ListBase seqbase_clipboard; extern int seqbase_clipboard_frame; -void seq_update_sequence_length(struct Scene *scene, struct Editing *ed, struct Sequence *seq); - #endif // __BKE_SEQUENCER_H__ diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 94069f94f4d..18749d7b5a6 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -4007,31 +4007,3 @@ void seqbase_dupli_recursive(Scene *scene, Scene *scene_to, ListBase *nseqbase, } } } - -void seq_update_sequence_length(Scene *scene, Editing *ed, Sequence *seq) -{ - int changed = FALSE; - - switch (seq->type) { - case SEQ_SCENE: - seq->len = seq->scene->r.efra - seq->scene->r.sfra + 1; - changed = TRUE; - break; - case SEQ_MOVIECLIP: - seq->len = BKE_movieclip_get_duration(seq->clip); - changed = TRUE; - break; - case SEQ_MOVIE: - seq_open_anim_file(seq); - seq->len = IMB_anim_get_duration(seq->anim, IMB_TC_RECORD_RUN); - changed = TRUE; - break; - } - - if (changed) { - calc_sequence_disp(scene, seq); - - if (seq_test_overlap(ed->seqbasep, seq)) - shuffle_seq(ed->seqbasep, seq, scene); - } -} diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 0afb2e461b5..a2c74d067f9 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -1273,15 +1273,22 @@ void SEQUENCER_OT_unlock(struct wmOperatorType *ot) } /* reload operator */ -static int sequencer_reload_exec(bContext *C, wmOperator *UNUSED(op)) +static int sequencer_reload_exec(bContext *C, wmOperator *op) { Scene *scene= CTX_data_scene(C); Editing *ed= seq_give_editing(scene, FALSE); Sequence *seq; + int adjust_length= RNA_boolean_get(op->ptr, "adjust_length"); for (seq= ed->seqbasep->first; seq; seq= seq->next) { if (seq->flag & SELECT) { update_changed_seq_and_deps(scene, seq, 0, 1); + reload_sequence_new_file(scene, seq, !adjust_length); + + if (adjust_length) { + if (seq_test_overlap(ed->seqbasep, seq)) + shuffle_seq(ed->seqbasep, seq, scene); + } } } @@ -1292,6 +1299,8 @@ static int sequencer_reload_exec(bContext *C, wmOperator *UNUSED(op)) void SEQUENCER_OT_reload(struct wmOperatorType *ot) { + PropertyRNA *prop; + /* identifiers */ ot->name = "Reload Strips"; ot->idname = "SEQUENCER_OT_reload"; @@ -1303,26 +1312,18 @@ void SEQUENCER_OT_reload(struct wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER; /* no undo, the data changed is stored outside 'main' */ -} - -/* reload operator */ -static void sequencer_refresh_all_length(Scene *scene, Editing *ed) -{ - Sequence *seq; - SEQP_BEGIN(ed, seq) { - seq_update_sequence_length(scene, ed, seq); - } - SEQ_END + prop = RNA_def_boolean(ot->srna, "adjust_length", 0, "Adjust Length", "Adjust lenght of strips to their data length"); + RNA_def_property_flag(prop, PROP_SKIP_SAVE); } +/* reload operator */ static int sequencer_refresh_all_exec(bContext *C, wmOperator *UNUSED(op)) { Scene *scene= CTX_data_scene(C); Editing *ed= seq_give_editing(scene, FALSE); free_imbuf_seq(scene, &ed->seqbase, FALSE, FALSE); - sequencer_refresh_all_length(scene, ed); WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene); diff --git a/source/blender/editors/space_sequencer/sequencer_ops.c b/source/blender/editors/space_sequencer/sequencer_ops.c index c0f1bd219f2..797d6fa36b8 100644 --- a/source/blender/editors/space_sequencer/sequencer_ops.c +++ b/source/blender/editors/space_sequencer/sequencer_ops.c @@ -159,7 +159,10 @@ void sequencer_keymap(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "SEQUENCER_OT_unlock", LKEY, KM_PRESS, KM_SHIFT|KM_ALT, 0); WM_keymap_add_item(keymap, "SEQUENCER_OT_reassign_inputs", RKEY, KM_PRESS, 0, 0); + WM_keymap_add_item(keymap, "SEQUENCER_OT_reload", RKEY, KM_PRESS, KM_ALT, 0); + kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_reload", RKEY, KM_PRESS, KM_SHIFT|KM_ALT, 0); + RNA_boolean_set(kmi->ptr, "adjust_length", TRUE); WM_keymap_add_item(keymap, "SEQUENCER_OT_offset_clear", OKEY, KM_PRESS, KM_ALT, 0); -- cgit v1.2.3 From 4d802ff682b81143012d9a10cf6a58322dd18d89 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 26 Mar 2012 22:36:32 +0000 Subject: Return back sfra property to Sequence structure to prevent data loose until things discussing in #30663 will be resolved. --- source/blender/makesdna/DNA_sequence_types.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender') diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h index ba64f332de5..7aa37b547f4 100644 --- a/source/blender/makesdna/DNA_sequence_types.h +++ b/source/blender/makesdna/DNA_sequence_types.h @@ -181,6 +181,8 @@ typedef struct Sequence { int blend_mode; float blend_opacity; + /* is sfra needed anymore? - it looks like its only used in one place */ + int sfra, pad; /* starting frame according to the timeline of the scene. */ } Sequence; typedef struct MetaStack { -- cgit v1.2.3 From ca05219f3ec3574d2e1cb9c8eaa2790f685f26bb Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 27 Mar 2012 00:01:35 +0000 Subject: fix [#30651] bpy.ops.object.mode_set(...) editmode removes faces. problem was that BMesh had tessellation call when undo pushes were called. if python called an operator with no undo push, tessfaces would not be created. fix this by making it the responsibility of each editmesh operator to re-tessellate, as it is with notifiers and depsgraph. added EDBM_update_generic() function to add notifier, tag for depsgraph update and optionally re-tessellate. --- source/blender/blenkernel/BKE_tessmesh.h | 4 - source/blender/blenkernel/intern/depsgraph.c | 2 +- source/blender/blenkernel/intern/dynamicpaint.c | 3 +- source/blender/editors/include/ED_mesh.h | 2 + source/blender/editors/mesh/editmesh_add.c | 15 +- source/blender/editors/mesh/editmesh_knife.c | 3 +- source/blender/editors/mesh/editmesh_select.c | 20 +-- source/blender/editors/mesh/editmesh_tools.c | 177 ++++++++---------------- source/blender/editors/mesh/editmesh_utils.c | 24 ++-- source/blender/editors/object/object_edit.c | 10 +- source/blender/editors/util/undo.c | 15 -- source/blender/makesdna/DNA_object_types.h | 13 +- source/blender/makesdna/DNA_particle_types.h | 14 +- 13 files changed, 109 insertions(+), 193 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/BKE_tessmesh.h b/source/blender/blenkernel/BKE_tessmesh.h index 947b980bb75..407b96320a4 100644 --- a/source/blender/blenkernel/BKE_tessmesh.h +++ b/source/blender/blenkernel/BKE_tessmesh.h @@ -80,10 +80,6 @@ typedef struct BMEditMesh { int mirr_free_arrays; } BMEditMesh; -/* undo triggers editmesh tessface update, this is odd but works OK. - * BMESH_TODO, look into having the update elsewhere. */ -#define BMESH_EM_UNDO_RECALC_TESSFACE_WORKAROUND - void BMEdit_RecalcTessellation(BMEditMesh *tm); BMEditMesh *BMEdit_Create(BMesh *bm, int do_tessellate); BMEditMesh *BMEdit_Copy(BMEditMesh *tm); diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c index 783652e9a75..a1a2465ceac 100644 --- a/source/blender/blenkernel/intern/depsgraph.c +++ b/source/blender/blenkernel/intern/depsgraph.c @@ -2716,7 +2716,6 @@ void DAG_id_tag_update(ID *id, short flag) /* flag is for objects and particle systems */ if (flag) { Object *ob; - ParticleSystem *psys; short idtype = GS(id->name); if (idtype == ID_OB) { @@ -2725,6 +2724,7 @@ void DAG_id_tag_update(ID *id, short flag) ob->recalc |= (flag & OB_RECALC_ALL); } else if (idtype == ID_PA) { + ParticleSystem *psys; /* this is weak still, should be done delayed as well */ for (ob=bmain->object.first; ob; ob=ob->id.next) { for (psys=ob->particlesystem.first; psys; psys=psys->next) { diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c index 70b55356e6a..40d829808ca 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.c +++ b/source/blender/blenkernel/intern/dynamicpaint.c @@ -511,7 +511,8 @@ static int subframe_updateObject(Scene *scene, Object *ob, int flags, float fram BKE_animsys_evaluate_animdata(scene, &cu->id, cu->adt, frame, ADT_RECALC_ANIM); } - ob->recalc |= OB_RECALC_ALL; + /* was originally OB_RECALC_ALL - TODO - which flags are really needed??? */ + ob->recalc |= OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME; BKE_animsys_evaluate_animdata(scene, &ob->id, ob->adt, frame, ADT_RECALC_ANIM); if (flags & UPDATE_MESH) { /* ignore cache clear during subframe updates diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index 45685740d3b..69376a9bde3 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -168,6 +168,8 @@ void EDBM_validate_selections(struct BMEditMesh *em); void EDBM_hide_mesh(struct BMEditMesh *em, int swap); void EDBM_reveal_mesh(struct BMEditMesh *em); +void EDBM_update_generic(struct bContext *C, struct BMEditMesh *em, const short do_tessface); + int EDBM_check_backbuf(unsigned int index); int EDBM_mask_init_backbuf_border(struct ViewContext *vc, int mcords[][2], short tot, short xmin, short ymin, short xmax, short ymax); void EDBM_free_backbuf(void); diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c index cb2442ff0b5..0d40e8585c3 100644 --- a/source/blender/editors/mesh/editmesh_add.c +++ b/source/blender/editors/mesh/editmesh_add.c @@ -98,29 +98,20 @@ static void make_prim_init(bContext *C, const char *idname, ED_object_enter_editmode(C, EM_DO_UNDO | EM_IGNORE_LAYER); /* rare cases the active layer is messed up */ *state = 1; } - else { - DAG_id_tag_update(&obedit->id, OB_RECALC_DATA); - } *dia *= new_primitive_matrix(C, loc, rot, mat); } static void make_prim_finish(bContext *C, int *state, int enter_editmode) { - Object *obedit; - Mesh *me; - BMEditMesh *em; - - obedit = CTX_data_edit_object(C); - me = obedit->data; - em = me->edit_btmesh; + Object *obedit = CTX_data_edit_object(C); + BMEditMesh *em = BMEdit_FromObject(obedit); /* Primitive has all verts selected, use vert select flush * to push this up to edges & faces. */ EDBM_selectmode_flush_ex(em, SCE_SELECT_VERTEX); - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); + EDBM_update_generic(C, em, TRUE); /* userdef */ if (*state && !enter_editmode) { diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index 10b1391c4d7..d1dc873aa08 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -2601,8 +2601,7 @@ static void knifetool_finish(bContext *C, wmOperator *op) knife_make_cuts(kcd); #endif - DAG_id_tag_update(kcd->ob->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, kcd->ob->data); + EDBM_update_generic(C, kcd->em, TRUE); } /* copied from paint_image.c */ diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index df1a824f3de..deca9228cdf 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -115,6 +115,7 @@ void EDBM_automerge(Scene *scene, Object *obedit, int update) BMO_op_callf(em->bm, "automerge verts=%hv dist=%f", BM_ELEM_SELECT, scene->toolsettings->doublimit); if (update) { DAG_id_tag_update(obedit->data, OB_RECALC_DATA); + BMEdit_RecalcTessellation(em); } } } @@ -722,9 +723,7 @@ static int similar_face_select_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - /* dependencies graph and notification stuff */ - DAG_id_tag_update(ob->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_SELECT, ob->data); + EDBM_update_generic(C, em, FALSE); /* we succeeded */ return OPERATOR_FINISHED; @@ -763,9 +762,7 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - /* dependencies graph and notification stuff */ - DAG_id_tag_update(ob->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_SELECT, ob->data); + EDBM_update_generic(C, em, FALSE); /* we succeeded */ return OPERATOR_FINISHED; @@ -807,9 +804,7 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op) EDBM_selectmode_flush(em); - /* dependencies graph and notification stuff */ - DAG_id_tag_update(ob->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_SELECT, ob->data); + EDBM_update_generic(C, em, FALSE); /* we succeeded */ return OPERATOR_FINISHED; @@ -1356,7 +1351,6 @@ static int edgetag_shortest_path(Scene *scene, BMEditMesh *em, BMEdge *source, B /* since you want to create paths with multiple selects, it doesn't have extend option */ static void mouse_mesh_shortest_path(bContext *C, int mval[2]) { - Object *ob = CTX_data_edit_object(C); ViewContext vc; BMEditMesh *em; BMEdge *e; @@ -1416,8 +1410,7 @@ static void mouse_mesh_shortest_path(bContext *C, int mval[2]) break; } - DAG_id_tag_update(ob->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_SELECT, ob->data); + EDBM_update_generic(C, em, FALSE); } } @@ -2172,8 +2165,7 @@ static int edbm_select_nth_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); + EDBM_update_generic(C, em, FALSE); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 03c00c6c96f..3e809f1241b 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -107,8 +107,7 @@ static int edbm_subdivide_exec(bContext *C, wmOperator *op) RNA_boolean_get(op->ptr, "quadtri"), TRUE, RNA_int_get(op->ptr, "seed")); - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); + EDBM_update_generic(C, em, TRUE); return OPERATOR_FINISHED; } @@ -407,8 +406,7 @@ static int edbm_extrude_repeat_exec(bContext *C, wmOperator *op) EDBM_RecalcNormals(em); - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); + EDBM_update_generic(C, em, TRUE); return OPERATOR_FINISHED; } @@ -528,9 +526,8 @@ static int edbm_extrude_region_exec(bContext *C, wmOperator *op) * like this one don't push undo data until after modal mode is * done.*/ EDBM_RecalcNormals(em); - BMEdit_RecalcTessellation(em); - WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit); + EDBM_update_generic(C, em, TRUE); return OPERATOR_FINISHED; } @@ -879,11 +876,9 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, wmEvent * like this one don't push undo data until after modal mode is * done. */ EDBM_RecalcNormals(vc.em); - BMEdit_RecalcTessellation(vc.em); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, vc.obedit->data); - DAG_id_tag_update(vc.obedit->data, OB_RECALC_DATA); - + EDBM_update_generic(C, vc.em, TRUE); + return OPERATOR_FINISHED; } @@ -947,9 +942,7 @@ static int edbm_delete_exec(bContext *C, wmOperator *op) EDBM_flag_disable_all(em, BM_ELEM_SELECT); - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - - WM_event_add_notifier(C, NC_GEOM | ND_DATA | ND_SELECT, obedit); + EDBM_update_generic(C, em, TRUE); return OPERATOR_FINISHED; } @@ -981,9 +974,8 @@ static int edbm_collapse_edge_exec(bContext *C, wmOperator *op) if (!EDBM_CallOpf(em, op, "collapse edges=%he", BM_ELEM_SELECT)) return OPERATOR_CANCELLED; - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA | ND_SELECT, obedit); + EDBM_update_generic(C, em, TRUE); return OPERATOR_FINISHED; } @@ -1010,9 +1002,8 @@ static int edbm_collapse_edge_loop_exec(bContext *C, wmOperator *op) if (!EDBM_CallOpf(em, op, "dissolve_edge_loop edges=%he", BM_ELEM_SELECT)) return OPERATOR_CANCELLED; - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA | ND_SELECT, obedit); + EDBM_update_generic(C, em, TRUE); return OPERATOR_FINISHED; } @@ -1048,8 +1039,7 @@ static int edbm_add_edge_face_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit); - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); + EDBM_update_generic(C, em, TRUE); return OPERATOR_FINISHED; } @@ -1102,8 +1092,7 @@ static int edbm_mark_seam(bContext *C, wmOperator *op) } } - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); + EDBM_update_generic(C, em, TRUE); return OPERATOR_FINISHED; } @@ -1157,9 +1146,7 @@ static int edbm_mark_sharp(bContext *C, wmOperator *op) } } - - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); + EDBM_update_generic(C, em, TRUE); return OPERATOR_FINISHED; } @@ -1199,8 +1186,7 @@ static int edbm_vert_connect(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); + EDBM_update_generic(C, em, TRUE); return len ? OPERATOR_FINISHED : OPERATOR_CANCELLED; } @@ -1236,8 +1222,7 @@ static int edbm_edge_split_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); + EDBM_update_generic(C, em, TRUE); return len ? OPERATOR_FINISHED : OPERATOR_CANCELLED; } @@ -1275,8 +1260,7 @@ static int edbm_duplicate_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - DAG_id_tag_update(ob->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); + EDBM_update_generic(C, em, TRUE); return OPERATOR_FINISHED; } @@ -1315,8 +1299,7 @@ static int edbm_flip_normals_exec(bContext *C, wmOperator *op) if (!EDBM_CallOpf(em, op, "reversefaces faces=%hf", BM_ELEM_SELECT)) return OPERATOR_CANCELLED; - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); + EDBM_update_generic(C, em, TRUE); return OPERATOR_FINISHED; } @@ -1396,8 +1379,7 @@ static int edbm_edge_rotate_selected_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); + EDBM_update_generic(C, em, TRUE); return OPERATOR_FINISHED; } @@ -1427,9 +1409,8 @@ static int edbm_hide_exec(bContext *C, wmOperator *op) BMEditMesh *em = BMEdit_FromObject(obedit); EDBM_hide_mesh(em, RNA_boolean_get(op->ptr, "unselected")); - - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); + + EDBM_update_generic(C, em, TRUE); return OPERATOR_FINISHED; } @@ -1459,8 +1440,7 @@ static int edbm_reveal_exec(bContext *C, wmOperator *UNUSED(op)) EDBM_reveal_mesh(em); - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); + EDBM_update_generic(C, em, TRUE); return OPERATOR_FINISHED; } @@ -1493,8 +1473,7 @@ static int edbm_normals_make_consistent_exec(bContext *C, wmOperator *op) if (RNA_boolean_get(op->ptr, "inside")) EDBM_CallOpf(em, op, "reversefaces faces=%hf", BM_ELEM_SELECT); - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); + EDBM_update_generic(C, em, TRUE); return OPERATOR_FINISHED; } @@ -1571,8 +1550,7 @@ static int edbm_do_smooth_vertex_exec(bContext *C, wmOperator *op) EDBM_EndMirrorCache(em); } - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); + EDBM_update_generic(C, em, TRUE); return OPERATOR_FINISHED; } @@ -1617,8 +1595,7 @@ static int edbm_faces_shade_smooth_exec(bContext *C, wmOperator *UNUSED(op)) mesh_set_smooth_faces(em, 1); - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); + EDBM_update_generic(C, em, FALSE); return OPERATOR_FINISHED; } @@ -1645,8 +1622,7 @@ static int edbm_faces_shade_flat_exec(bContext *C, wmOperator *UNUSED(op)) mesh_set_smooth_faces(em, 0); - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); + EDBM_update_generic(C, em, FALSE); return OPERATOR_FINISHED; } @@ -1689,9 +1665,7 @@ static int edbm_rotate_uvs_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - /* dependencies graph and notification stuff */ - DAG_id_tag_update(ob->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); + EDBM_update_generic(C, em, FALSE); /* we succeeded */ return OPERATOR_FINISHED; @@ -1714,9 +1688,7 @@ static int edbm_reverse_uvs_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - /* dependencies graph and notification stuff */ - DAG_id_tag_update(ob->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); + EDBM_update_generic(C, em, FALSE); /* we succeeded */ return OPERATOR_FINISHED; @@ -1743,11 +1715,8 @@ static int edbm_rotate_colors_exec(bContext *C, wmOperator *op) } /* dependencies graph and notification stuff */ - DAG_id_tag_update(ob->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); -/* DAG_object_flush_update(scene, ob, OB_RECALC_DATA); - * WM_event_add_notifier(C, NC_OBJECT | ND_GEOM_SELECT, ob); - */ + EDBM_update_generic(C, em, FALSE); + /* we succeeded */ return OPERATOR_FINISHED; } @@ -1770,8 +1739,7 @@ static int edbm_reverse_colors_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - DAG_id_tag_update(ob->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); + EDBM_update_generic(C, em, FALSE); /* we succeeded */ return OPERATOR_FINISHED; @@ -1952,8 +1920,7 @@ static int edbm_merge_exec(bContext *C, wmOperator *op) if (!status) return OPERATOR_CANCELLED; - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); + EDBM_update_generic(C, em, TRUE); return OPERATOR_FINISHED; } @@ -2052,9 +2019,7 @@ static int edbm_remove_doubles_exec(bContext *C, wmOperator *op) BKE_reportf(op->reports, RPT_INFO, "Removed %d vert%s", count, (count == 1) ? "ex" : "ices"); - - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); + EDBM_update_generic(C, em, TRUE); return OPERATOR_FINISHED; } @@ -2132,13 +2097,7 @@ static int edbm_select_vertex_path_exec(bContext *C, wmOperator *op) EDBM_selectmode_flush(em); - /* dependencies graph and notification stuff */ -/* DAG_object_flush_update(scene, ob, OB_RECALC_DATA); - * WM_event_add_notifier(C, NC_OBJECT | ND_GEOM_SELECT, ob); - */ - DAG_id_tag_update(ob->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); - + EDBM_update_generic(C, em, FALSE); /* we succeeded */ return OPERATOR_FINISHED; @@ -2409,9 +2368,8 @@ static int edbm_rip_invoke(bContext *C, wmOperator *op, wmEvent *event) if (bm->totvertsel == 0) { return OPERATOR_CANCELLED; } - - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); + + EDBM_update_generic(C, em, TRUE); return OPERATOR_FINISHED; } @@ -2437,7 +2395,7 @@ void MESH_OT_rip(wmOperatorType *ot) /************************ Shape Operators *************************/ /* BMESH_TODO this should be properly encapsulated in a bmop. but later.*/ -static void shape_propagate(Object *obedit, BMEditMesh *em, wmOperator *op) +static void shape_propagate(BMEditMesh *em, wmOperator *op) { BMIter iter; BMVert *eve = NULL; @@ -2467,8 +2425,6 @@ static void shape_propagate(Object *obedit, BMEditMesh *em, wmOperator *op) } } #endif - - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); } @@ -2478,10 +2434,9 @@ static int edbm_shape_propagate_to_all_exec(bContext *C, wmOperator *op) Mesh *me = obedit->data; BMEditMesh *em = me->edit_btmesh; - shape_propagate(obedit, em, op); + shape_propagate(em, op); - DAG_id_tag_update(&me->id, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, me); + EDBM_update_generic(C, em, FALSE); return OPERATOR_FINISHED; } @@ -2540,8 +2495,7 @@ static int edbm_blend_from_shape_exec(bContext *C, wmOperator *op) copy_v3_v3(sco, co); } - DAG_id_tag_update(&me->id, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, me); + EDBM_update_generic(C, em, TRUE); return OPERATOR_FINISHED; } @@ -2714,8 +2668,7 @@ static int edbm_solidify_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); + EDBM_update_generic(C, em, TRUE); return OPERATOR_FINISHED; } @@ -3039,8 +2992,7 @@ static int edbm_knife_cut_exec(bContext *C, wmOperator *op) BLI_ghash_free(gh, NULL, (GHashValFreeFP)MEM_freeN); - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); + EDBM_update_generic(C, em, TRUE); return OPERATOR_FINISHED; } @@ -3229,10 +3181,11 @@ static int edbm_separate_exec(bContext *C, wmOperator *op) retval = mesh_separate_material(bmain, scene, base, op); else if (type == 2) retval = mesh_separate_loose(bmain, scene, base, op); - + if (retval) { - DAG_id_tag_update(base->object->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, base->object->data); + BMEditMesh *em = BMEdit_FromObject(base->object); + EDBM_update_generic(C, em, TRUE); + return OPERATOR_FINISHED; } @@ -3285,9 +3238,8 @@ static int edbm_fill_exec(bContext *C, wmOperator *op) if (!EDBM_FinishOp(em, &bmop, op, TRUE)) { return OPERATOR_CANCELLED; } - - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); + + EDBM_update_generic(C, em, TRUE); return OPERATOR_FINISHED; @@ -3315,8 +3267,7 @@ static int edbm_beautify_fill_exec(bContext *C, wmOperator *op) if (!EDBM_CallOpf(em, op, "beautify_fill faces=%hf", BM_ELEM_SELECT)) return OPERATOR_CANCELLED; - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); + EDBM_update_generic(C, em, TRUE); return OPERATOR_FINISHED; } @@ -3346,8 +3297,7 @@ static int edbm_quads_convert_to_tris_exec(bContext *C, wmOperator *op) if (!EDBM_CallOpf(em, op, "triangulate faces=%hf use_beauty=%b", BM_ELEM_SELECT, use_beauty)) return OPERATOR_CANCELLED; - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); + EDBM_update_generic(C, em, TRUE); return OPERATOR_FINISHED; } @@ -3387,8 +3337,7 @@ static int edbm_tris_convert_to_quads_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); + EDBM_update_generic(C, em, TRUE); return OPERATOR_FINISHED; } @@ -3438,9 +3387,7 @@ static int edbm_dissolve_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - - WM_event_add_notifier(C, NC_GEOM | ND_DATA | ND_SELECT, obedit); + EDBM_update_generic(C, em, TRUE); return OPERATOR_FINISHED; } @@ -3477,8 +3424,7 @@ static int edbm_dissolve_limited_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); + EDBM_update_generic(C, em, TRUE); return OPERATOR_FINISHED; } @@ -3519,11 +3465,9 @@ static int edbm_split_exec(bContext *C, wmOperator *op) } /* Geometry has changed, need to recalc normals and looptris */ - BMEdit_RecalcTessellation(em); EDBM_RecalcNormals(em); - DAG_id_tag_update(ob->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); + EDBM_update_generic(C, em, TRUE); return OPERATOR_FINISHED; } @@ -3581,8 +3525,7 @@ static int edbm_spin_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); + EDBM_update_generic(C, em, TRUE); return OPERATOR_FINISHED; } @@ -3705,8 +3648,7 @@ static int edbm_screw_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); + EDBM_update_generic(C, em, TRUE); return OPERATOR_FINISHED; } @@ -4325,8 +4267,7 @@ static int edbm_noise_exec(bContext *C, wmOperator *op) EDBM_RecalcNormals(em); - DAG_id_tag_update(obedit->data, 0); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); + EDBM_update_generic(C, em, TRUE); return OPERATOR_FINISHED; } @@ -4414,8 +4355,7 @@ static int edbm_bevel_exec(bContext *C, wmOperator *op) EDBM_RecalcNormals(em); - DAG_id_tag_update(obedit->data, 0); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); + EDBM_update_generic(C, em, TRUE); return OPERATOR_FINISHED; } @@ -4450,8 +4390,7 @@ static int edbm_bridge_edge_loops_exec(bContext *C, wmOperator *op) if (!EDBM_CallOpf(em, op, "bridge_loops edges=%he", BM_ELEM_SELECT)) return OPERATOR_CANCELLED; - DAG_id_tag_update(obedit->data, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); + EDBM_update_generic(C, em, TRUE); return OPERATOR_FINISHED; } @@ -4501,9 +4440,7 @@ static int edbm_inset_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } else { - DAG_id_tag_update(obedit->data, 0); - WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); - + EDBM_update_generic(C, em, TRUE); return OPERATOR_FINISHED; } } diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index f5b28f88639..1c889a6169e 100644 --- a/source/blender/editors/mesh/editmesh_utils.c +++ b/source/blender/editors/mesh/editmesh_utils.c @@ -41,6 +41,7 @@ #include "BKE_DerivedMesh.h" #include "BKE_bmesh.h" #include "BKE_context.h" +#include "BKE_depsgraph.h" #include "BKE_key.h" #include "BKE_library.h" #include "BKE_mesh.h" @@ -147,7 +148,6 @@ int EDBM_FinishOp(BMEditMesh *em, BMOperator *bmop, wmOperator *op, const int re BMEdit_Free(em); *em = *emcopy; - BMEdit_RecalcTessellation(em); MEM_freeN(emcopy); em->emcopyusers = 0; @@ -523,14 +523,6 @@ static void *editbtMesh_to_undoMesh(void *emv, void *obdata) /* make sure shape keys work */ um->me.key = obme->key ? copy_key_nolib(obme->key) : NULL; -#ifdef BMESH_EM_UNDO_RECALC_TESSFACE_WORKAROUND - - /* we recalc the tessellation here, to avoid seeding calls to - * BMEdit_RecalcTessellation throughout the code. */ - BMEdit_RecalcTessellation(em); - -#endif - /* BM_mesh_validate(em->bm); */ /* for troubleshooting */ BMO_op_callf(em->bm, "bmesh_to_mesh mesh=%p notessellation=%b", &um->me, TRUE); @@ -1231,6 +1223,20 @@ void EDBM_reveal_mesh(BMEditMesh *em) EDBM_selectmode_flush(em); } +/* so many tools call these that we better make it a generic function. + */ +void EDBM_update_generic(bContext *C, BMEditMesh *em, const short do_tessface) +{ + Object *ob = em->ob; + /* order of calling isn't important */ + DAG_id_tag_update(ob->data, OB_RECALC_DATA); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); + + if (do_tessface) { + BMEdit_RecalcTessellation(em); + } +} + /* * Selection History ***************************************************** */ /* these wrap equivalent bmesh functions. I'm in two minds of it we should * just use the bm functions directly; on the one hand, there's no real diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 03ded30fb59..4d0e67eafee 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -440,11 +440,17 @@ void ED_object_enter_editmode(bContext *C, int flag) ob->mode= OB_MODE_EDIT; if (ob->type==OB_MESH) { + BMEditMesh *em; ok= 1; - scene->obedit= ob; // context sees this - + scene->obedit = ob; /* context sees this */ + EDBM_MakeEditBMesh(CTX_data_tool_settings(C), scene, ob); + em = BMEdit_FromObject(ob); + if (LIKELY(em)) { + BMEdit_RecalcTessellation(em); + } + WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_EDITMODE_MESH, scene); } else if (ob->type==OB_ARMATURE) { diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c index 40a95fc08ba..69dc1d1f1fb 100644 --- a/source/blender/editors/util/undo.c +++ b/source/blender/editors/util/undo.c @@ -48,8 +48,6 @@ #include "BKE_context.h" #include "BKE_global.h" #include "BKE_screen.h" -#include "BKE_tessmesh.h" /* BMESH_EM_UNDO_RECALC_TESSFACE_WORKAROUND */ - #include "ED_armature.h" #include "ED_particle.h" @@ -88,19 +86,6 @@ void ED_undo_push(bContext *C, const char *str) printf("undo push %s\n", str); if (obedit) { - -#ifdef BMESH_EM_UNDO_RECALC_TESSFACE_WORKAROUND - /* undo is causing tessface recalc, so without we need to do explicitly */ - - if (U.undosteps == 0) { - if (obedit->type == OB_MESH) { - Mesh *me= obedit->data; - BMEdit_RecalcTessellation(me->edit_btmesh); - } - } - -#endif /* BMESH_EM_UNDO_RECALC_TESSFACE_WORKAROUND */ - if (U.undosteps == 0) return; if (obedit->type==OB_MESH) diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index d3f8c65995a..86a2bb60cc9 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -439,13 +439,14 @@ typedef struct DupliObject { // #define OB_RADIO 2048 /* deprecated */ #define OB_FROMGROUP 4096 +/* WARNING - when adding flags check on PSYS_RECALC */ /* ob->recalc (flag bits!) */ -#define OB_RECALC_OB 1 -#define OB_RECALC_DATA 2 - /* time flag is set when time changes need recalc, so baked systems can ignore it */ -#define OB_RECALC_TIME 4 - /* only use for matching any flag, NOT as an argument since more flags may be added. */ -#define OB_RECALC_ALL (OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME) +#define OB_RECALC_OB (1 << 0) +#define OB_RECALC_DATA (1 << 1) +/* time flag is set when time changes need recalc, so baked systems can ignore it */ +#define OB_RECALC_TIME (1 << 2) +/* only use for matching any flag, NOT as an argument since more flags may be added. */ +#define OB_RECALC_ALL (OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME) /* controller state */ #define OB_MAX_STATES 30 diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h index 63c4806028a..58ffcf6480e 100644 --- a/source/blender/makesdna/DNA_particle_types.h +++ b/source/blender/makesdna/DNA_particle_types.h @@ -481,13 +481,13 @@ typedef struct ParticleSystem #define PART_CHILD_FACES 2 /* psys->recalc */ -/* starts from 8 so that the first bits can be ob->recalc */ -#define PSYS_RECALC_REDO 8 /* only do pathcache etc */ -#define PSYS_RECALC_RESET 16 /* reset everything including pointcache */ -#define PSYS_RECALC_TYPE 32 /* handle system type change */ -#define PSYS_RECALC_CHILD 64 /* only child settings changed */ -#define PSYS_RECALC_PHYS 128 /* physics type changed */ -#define PSYS_RECALC 248 +/* starts from (1 << 3) so that the first bits can be ob->recalc */ +#define PSYS_RECALC_REDO (1 << 3) /* only do pathcache etc */ +#define PSYS_RECALC_RESET (1 << 4) /* reset everything including pointcache */ +#define PSYS_RECALC_TYPE (1 << 5) /* handle system type change */ +#define PSYS_RECALC_CHILD (1 << 6) /* only child settings changed */ +#define PSYS_RECALC_PHYS (1 << 7) /* physics type changed */ +#define PSYS_RECALC (PSYS_RECALC_REDO | PSYS_RECALC_RESET | PSYS_RECALC_TYPE | PSYS_RECALC_CHILD | PSYS_RECALC_PHYS) /* psys->flag */ #define PSYS_CURRENT 1 -- cgit v1.2.3 From 126c9d4caa9ad92f2e8fb50c406f5b5932b0f058 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 27 Mar 2012 00:17:57 +0000 Subject: use cmake WITH_MOD_ * to exclude include paths which are not used. --- source/blender/blenkernel/CMakeLists.txt | 24 +++++++++++++++++++----- source/blender/blenkernel/intern/fluidsim.c | 14 +++++--------- source/blender/blenkernel/intern/object.c | 2 ++ source/blender/blenkernel/intern/pointcache.c | 2 ++ source/blender/blenkernel/intern/smoke.c | 4 ++-- 5 files changed, 30 insertions(+), 16 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt index fe06ba1ad2c..c2a83b5c048 100644 --- a/source/blender/blenkernel/CMakeLists.txt +++ b/source/blender/blenkernel/CMakeLists.txt @@ -23,7 +23,7 @@ # # ***** END GPL LICENSE BLOCK ***** -set(INC +set(INC . ../avi ../blenfont @@ -38,15 +38,11 @@ set(INC ../modifiers ../nodes ../render/extern/include - ../../../intern/bsp/extern - ../../../intern/decimation/extern - ../../../intern/elbeem/extern ../../../intern/guardedalloc ../../../intern/iksolver/extern ../../../intern/memutil ../../../intern/mikktspace ../../../intern/opennl/extern - ../../../intern/smoke/extern # XXX - BAD LEVEL CALL WM_api.h ../windowmanager @@ -333,10 +329,16 @@ if(WITH_OPENMP) endif() if(WITH_MOD_FLUID) + list(APPEND INC + ../../../intern/elbeem/extern + ) add_definitions(-DWITH_MOD_FLUID) endif() if(WITH_MOD_SMOKE) + list(APPEND INC + ../../../intern/smoke/extern + ) add_definitions(-DWITH_SMOKE) endif() @@ -344,6 +346,18 @@ if(WITH_MOD_OCEANSIM) add_definitions(-DWITH_OCEANSIM) endif() +if(WITH_MOD_DECIMATE) + list(APPEND INC + ../../../intern/decimation/extern + ) +endif() + +if(WITH_MOD_BOOLEAN) + list(APPEND INC + ../../../intern/bsp/extern + ) +endif() + if(WITH_JACK) add_definitions(-DWITH_JACK) endif() diff --git a/source/blender/blenkernel/intern/fluidsim.c b/source/blender/blenkernel/intern/fluidsim.c index d3d0952f3f8..a930818dd15 100644 --- a/source/blender/blenkernel/intern/fluidsim.c +++ b/source/blender/blenkernel/intern/fluidsim.c @@ -30,7 +30,11 @@ */ -#include +// headers for fluidsim bobj meshes +#include +#include +#include +#include #include "MEM_guardedalloc.h" @@ -54,14 +58,6 @@ #include "BKE_modifier.h" #include "BKE_mesh.h" - -// headers for fluidsim bobj meshes -#include -#include "LBM_fluidsim.h" -#include -#include -#include - /* ************************* fluidsim bobj file handling **************************** */ diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index b141a7f0cb2..cc5e59a6e92 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -103,7 +103,9 @@ #include "BKE_material.h" #include "BKE_camera.h" +#ifdef WITH_MOD_FLUID #include "LBM_fluidsim.h" +#endif #ifdef WITH_PYTHON #include "BPY_extern.h" diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index e3b2e190f03..3da70fd12d0 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -74,7 +74,9 @@ #include "BIK_api.h" /* both in intern */ +#ifdef WITH_MOD_SMOKE #include "smoke_API.h" +#endif #ifdef WITH_LZO #include "minilzo.h" diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c index 96194ff5b09..466f6edcaf7 100644 --- a/source/blender/blenkernel/intern/smoke.c +++ b/source/blender/blenkernel/intern/smoke.c @@ -73,8 +73,6 @@ #include "DNA_scene_types.h" #include "DNA_smoke_types.h" -#include "smoke_API.h" - #include "BKE_smoke.h" /* UNUSED so far, may be enabled later */ @@ -82,6 +80,8 @@ #ifdef WITH_SMOKE +#include "smoke_API.h" + #ifdef _WIN32 #include #include -- cgit v1.2.3 From ae654301b041cae9cce8107614c1d17bae3ff12a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 27 Mar 2012 01:24:16 +0000 Subject: style cleanup: wm, mosyly adding space around ops --- source/blender/windowmanager/intern/wm.c | 100 +- source/blender/windowmanager/intern/wm_apple.c | 32 +- source/blender/windowmanager/intern/wm_cursors.c | 699 ++++++----- source/blender/windowmanager/intern/wm_dragdrop.c | 144 +-- source/blender/windowmanager/intern/wm_draw.c | 272 ++--- .../blender/windowmanager/intern/wm_event_system.c | 1268 ++++++++++---------- source/blender/windowmanager/intern/wm_files.c | 246 ++-- source/blender/windowmanager/intern/wm_gesture.c | 150 +-- source/blender/windowmanager/intern/wm_init_exit.c | 48 +- source/blender/windowmanager/intern/wm_jobs.c | 158 +-- source/blender/windowmanager/intern/wm_keymap.c | 272 ++--- source/blender/windowmanager/intern/wm_operators.c | 1216 +++++++++---------- source/blender/windowmanager/intern/wm_subwindow.c | 158 +-- source/blender/windowmanager/intern/wm_window.c | 434 +++---- 14 files changed, 2598 insertions(+), 2599 deletions(-) (limited to 'source/blender') diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c index 9fd9defc0ce..638dd4ca807 100644 --- a/source/blender/windowmanager/intern/wm.c +++ b/source/blender/windowmanager/intern/wm.c @@ -69,7 +69,7 @@ /* ****************************************************** */ -#define MAX_OP_REGISTERED 32 +#define MAX_OP_REGISTERED 32 void WM_operator_free(wmOperator *op) { @@ -83,7 +83,7 @@ void WM_operator_free(wmOperator *op) #endif if (op->ptr) { - op->properties= op->ptr->data; + op->properties = op->ptr->data; MEM_freeN(op->ptr); } @@ -99,7 +99,7 @@ void WM_operator_free(wmOperator *op) if (op->macro.first) { wmOperator *opm, *opmnext; - for (opm= op->macro.first; opm; opm= opmnext) { + for (opm = op->macro.first; opm; opm = opmnext) { opmnext = opm->next; WM_operator_free(opm); } @@ -118,22 +118,22 @@ static void wm_reports_free(wmWindowManager *wm) /* called on event handling by event_system.c */ void wm_operator_register(bContext *C, wmOperator *op) { - wmWindowManager *wm= CTX_wm_manager(C); + wmWindowManager *wm = CTX_wm_manager(C); int tot; BLI_addtail(&wm->operators, op); - tot= BLI_countlist(&wm->operators); + tot = BLI_countlist(&wm->operators); - while (tot>MAX_OP_REGISTERED) { - wmOperator *opt= wm->operators.first; + while (tot > MAX_OP_REGISTERED) { + wmOperator *opt = wm->operators.first; BLI_remlink(&wm->operators, opt); WM_operator_free(opt); tot--; } /* so the console is redrawn */ - WM_event_add_notifier(C, NC_SPACE|ND_SPACE_INFO_REPORT, NULL); - WM_event_add_notifier(C, NC_WM|ND_HISTORY, NULL); + WM_event_add_notifier(C, NC_SPACE | ND_SPACE_INFO_REPORT, NULL); + WM_event_add_notifier(C, NC_WM | ND_HISTORY, NULL); } @@ -141,24 +141,24 @@ void WM_operator_stack_clear(wmWindowManager *wm) { wmOperator *op; - while ((op= wm->operators.first)) { + while ((op = wm->operators.first)) { BLI_remlink(&wm->operators, op); WM_operator_free(op); } - WM_main_add_notifier(NC_WM|ND_HISTORY, NULL); + WM_main_add_notifier(NC_WM | ND_HISTORY, NULL); } /* ****************************************** */ -static GHash *menutypes_hash= NULL; +static GHash *menutypes_hash = NULL; MenuType *WM_menutype_find(const char *idname, int quiet) { - MenuType* mt; + MenuType *mt; if (idname[0]) { - mt= BLI_ghash_lookup(menutypes_hash, idname); + mt = BLI_ghash_lookup(menutypes_hash, idname); if (mt) return mt; } @@ -169,13 +169,13 @@ MenuType *WM_menutype_find(const char *idname, int quiet) return NULL; } -int WM_menutype_add(MenuType* mt) +int WM_menutype_add(MenuType *mt) { BLI_ghash_insert(menutypes_hash, (void *)mt->idname, mt); return 1; } -void WM_menutype_freelink(MenuType* mt) +void WM_menutype_freelink(MenuType *mt) { BLI_ghash_remove(menutypes_hash, mt->idname, NULL, (GHashValFreeFP)MEM_freeN); } @@ -183,15 +183,15 @@ void WM_menutype_freelink(MenuType* mt) /* called on initialize WM_init() */ void WM_menutype_init(void) { - menutypes_hash= BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp, "menutypes_hash gh"); + menutypes_hash = BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp, "menutypes_hash gh"); } void WM_menutype_free(void) { - GHashIterator *iter= BLI_ghashIterator_new(menutypes_hash); + GHashIterator *iter = BLI_ghashIterator_new(menutypes_hash); - for ( ; !BLI_ghashIterator_isDone(iter); BLI_ghashIterator_step(iter)) { - MenuType *mt= BLI_ghashIterator_getValue(iter); + for (; !BLI_ghashIterator_isDone(iter); BLI_ghashIterator_step(iter)) { + MenuType *mt = BLI_ghashIterator_getValue(iter); if (mt->ext.free) { mt->ext.free(mt->ext.data); } @@ -199,22 +199,22 @@ void WM_menutype_free(void) BLI_ghashIterator_free(iter); BLI_ghash_free(menutypes_hash, NULL, (GHashValFreeFP)MEM_freeN); - menutypes_hash= NULL; + menutypes_hash = NULL; } /* ****************************************** */ void WM_keymap_init(bContext *C) { - wmWindowManager *wm= CTX_wm_manager(C); + wmWindowManager *wm = CTX_wm_manager(C); /* create standard key configs */ if (!wm->defaultconf) - wm->defaultconf= WM_keyconfig_new(wm, "Blender"); + wm->defaultconf = WM_keyconfig_new(wm, "Blender"); if (!wm->addonconf) - wm->addonconf= WM_keyconfig_new(wm, "Blender Addon"); + wm->addonconf = WM_keyconfig_new(wm, "Blender Addon"); if (!wm->userconf) - wm->userconf= WM_keyconfig_new(wm, "Blender User"); + wm->userconf = WM_keyconfig_new(wm, "Blender User"); /* initialize only after python init is done, for keymaps that * use python operators */ @@ -237,15 +237,15 @@ void WM_keymap_init(bContext *C) void WM_check(bContext *C) { - wmWindowManager *wm= CTX_wm_manager(C); + wmWindowManager *wm = CTX_wm_manager(C); /* wm context */ - if (wm==NULL) { - wm= CTX_data_main(C)->wm.first; + if (wm == NULL) { + wm = CTX_data_main(C)->wm.first; CTX_wm_manager_set(C, wm); } - if (wm==NULL) return; - if (wm->windows.first==NULL) return; + if (wm == NULL) return; + if (wm->windows.first == NULL) return; if (!G.background) { /* case: fileread */ @@ -268,18 +268,18 @@ void WM_check(bContext *C) void wm_clear_default_size(bContext *C) { - wmWindowManager *wm= CTX_wm_manager(C); + wmWindowManager *wm = CTX_wm_manager(C); wmWindow *win; /* wm context */ - if (wm==NULL) { - wm= CTX_data_main(C)->wm.first; + if (wm == NULL) { + wm = CTX_data_main(C)->wm.first; CTX_wm_manager_set(C, wm); } - if (wm==NULL) return; - if (wm->windows.first==NULL) return; + if (wm == NULL) return; + if (wm->windows.first == NULL) return; - for (win= wm->windows.first; win; win= win->next) { + for (win = wm->windows.first; win; win = win->next) { win->sizex = 0; win->sizey = 0; win->posx = 0; @@ -291,18 +291,18 @@ void wm_clear_default_size(bContext *C) /* on startup, it adds all data, for matching */ void wm_add_default(bContext *C) { - wmWindowManager *wm= alloc_libblock(&CTX_data_main(C)->wm, ID_WM, "WinMan"); + wmWindowManager *wm = alloc_libblock(&CTX_data_main(C)->wm, ID_WM, "WinMan"); wmWindow *win; - bScreen *screen= CTX_wm_screen(C); /* XXX from file read hrmf */ + bScreen *screen = CTX_wm_screen(C); /* XXX from file read hrmf */ CTX_wm_manager_set(C, wm); - win= wm_window_new(C); - win->screen= screen; - screen->winid= win->winid; - BLI_strncpy(win->screenname, screen->id.name+2, sizeof(win->screenname)); + win = wm_window_new(C); + win->screen = screen; + screen->winid = win->winid; + BLI_strncpy(win->screenname, screen->id.name + 2, sizeof(win->screenname)); - wm->winactive= win; - wm->file_saved= 1; + wm->winactive = win; + wm->file_saved = 1; wm_window_make_drawable(C, win); } @@ -317,19 +317,19 @@ void wm_close_and_free(bContext *C, wmWindowManager *wm) if (wm->autosavetimer) wm_autosave_timer_ended(wm); - while ((win= wm->windows.first)) { + while ((win = wm->windows.first)) { BLI_remlink(&wm->windows, win); - win->screen= NULL; /* prevent draw clear to use screen */ + win->screen = NULL; /* prevent draw clear to use screen */ wm_draw_window_clear(win); wm_window_free(C, wm, win); } - while ((op= wm->operators.first)) { + while ((op = wm->operators.first)) { BLI_remlink(&wm->operators, op); WM_operator_free(op); } - while ((keyconf=wm->keyconfigs.first)) { + while ((keyconf = wm->keyconfigs.first)) { BLI_remlink(&wm->keyconfigs, keyconf); WM_keyconfig_free(keyconf); } @@ -341,14 +341,14 @@ void wm_close_and_free(bContext *C, wmWindowManager *wm) wm_reports_free(wm); - if (C && CTX_wm_manager(C)==wm) CTX_wm_manager_set(C, NULL); + if (C && CTX_wm_manager(C) == wm) CTX_wm_manager_set(C, NULL); } void wm_close_and_free_all(bContext *C, ListBase *wmlist) { wmWindowManager *wm; - while ((wm=wmlist->first)) { + while ((wm = wmlist->first)) { wm_close_and_free(C, wm); BLI_remlink(wmlist, wm); MEM_freeN(wm); diff --git a/source/blender/windowmanager/intern/wm_apple.c b/source/blender/windowmanager/intern/wm_apple.c index a79d20ff8b6..161725386c5 100644 --- a/source/blender/windowmanager/intern/wm_apple.c +++ b/source/blender/windowmanager/intern/wm_apple.c @@ -62,23 +62,23 @@ static int checkAppleVideoCard(void) long value; long maxvram = 0; /* we get always more than 1 renderer, check one, at least, has 8 Mo */ - display_mask = CGDisplayIDToOpenGLDisplayMask (CGMainDisplayID() ); + display_mask = CGDisplayIDToOpenGLDisplayMask(CGMainDisplayID() ); - theErr = CGLQueryRendererInfo( display_mask, &rend, &nrend); + theErr = CGLQueryRendererInfo(display_mask, &rend, &nrend); if (theErr == 0) { - theErr = CGLDescribeRenderer (rend, 0, kCGLRPRendererCount, &nrend); + theErr = CGLDescribeRenderer(rend, 0, kCGLRPRendererCount, &nrend); if (theErr == 0) { for (j = 0; j < nrend; j++) { - theErr = CGLDescribeRenderer (rend, j, kCGLRPVideoMemory, &value); + theErr = CGLDescribeRenderer(rend, j, kCGLRPVideoMemory, &value); if (value > maxvram) maxvram = value; if ((theErr == 0) && (value >= 20000000)) { - theErr = CGLDescribeRenderer (rend, j, kCGLRPAccelerated, &value); + theErr = CGLDescribeRenderer(rend, j, kCGLRPAccelerated, &value); if ((theErr == 0) && (value != 0)) { - theErr = CGLDescribeRenderer (rend, j, kCGLRPCompliant, &value); + theErr = CGLDescribeRenderer(rend, j, kCGLRPCompliant, &value); if ((theErr == 0) && (value != 0)) { /*fprintf(stderr,"make it big\n");*/ - CGLDestroyRendererInfo (rend); + CGLDestroyRendererInfo(rend); macPrefState = 8; return 1; } @@ -87,18 +87,18 @@ static int checkAppleVideoCard(void) } } } - if (maxvram < 7500000 ) { /* put a standard alert and quit*/ + if (maxvram < 7500000) { /* put a standard alert and quit*/ SInt16 junkHit; - char inError[] = "* Not enough VRAM "; - char inText[] = "* blender needs at least 8Mb "; + char inError[] = "* Not enough VRAM "; + char inText[] = "* blender needs at least 8Mb "; inError[0] = 16; inText[0] = 28; fprintf(stderr, " vram is %li . not enough, aborting\n", maxvram); - StandardAlert ( kAlertStopAlert, (ConstStr255Param) &inError, (ConstStr255Param)&inText,NULL,&junkHit); + StandardAlert(kAlertStopAlert, (ConstStr255Param) & inError, (ConstStr255Param) & inText, NULL, &junkHit); abort(); } - CGLDestroyRendererInfo (rend); + CGLDestroyRendererInfo(rend); return 0; } @@ -106,7 +106,7 @@ static void getMacAvailableBounds(short *top, short *left, short *bottom, short { Rect outAvailableRect; - GetAvailableWindowPositioningBounds ( GetMainDevice(), &outAvailableRect); + GetAvailableWindowPositioningBounds(GetMainDevice(), &outAvailableRect); *top = outAvailableRect.top; *left = outAvailableRect.left; @@ -124,14 +124,14 @@ void wm_set_apple_prefsize(int scr_x, int scr_y) short top, left, bottom, right; getMacAvailableBounds(&top, &left, &bottom, &right); - WM_setprefsize(left +10,scr_y - bottom +10,right-left -20,bottom - 64); - G.windowstate= 0; + WM_setprefsize(left + 10, scr_y - bottom + 10, right - left - 20, bottom - 64); + G.windowstate = 0; } else { /* 40 + 684 + (headers) 22 + 22 = 768, the powerbook screen height */ WM_setprefsize(120, 40, 850, 684); - G.windowstate= 0; + G.windowstate = 0; } } diff --git a/source/blender/windowmanager/intern/wm_cursors.c b/source/blender/windowmanager/intern/wm_cursors.c index 2f0a118b54a..80a25913481 100644 --- a/source/blender/windowmanager/intern/wm_cursors.c +++ b/source/blender/windowmanager/intern/wm_cursors.c @@ -55,27 +55,27 @@ /* Some simple ghost <-> blender conversions */ static GHOST_TStandardCursor convert_cursor(int curs) { - switch(curs) { + switch (curs) { default: - case CURSOR_STD: return GHOST_kStandardCursorDefault; - case CURSOR_FACESEL: return GHOST_kStandardCursorRightArrow; - case CURSOR_WAIT: return GHOST_kStandardCursorWait; - case CURSOR_EDIT: return GHOST_kStandardCursorCrosshair; + case CURSOR_STD: return GHOST_kStandardCursorDefault; + case CURSOR_FACESEL: return GHOST_kStandardCursorRightArrow; + case CURSOR_WAIT: return GHOST_kStandardCursorWait; + case CURSOR_EDIT: return GHOST_kStandardCursorCrosshair; case CURSOR_HELP: #ifdef __APPLE__ return GHOST_kStandardCursorLeftRight; #else return GHOST_kStandardCursorHelp; #endif - case CURSOR_X_MOVE: return GHOST_kStandardCursorLeftRight; - case CURSOR_Y_MOVE: return GHOST_kStandardCursorUpDown; - case CURSOR_PENCIL: return GHOST_kStandardCursorPencil; - case CURSOR_COPY: return GHOST_kStandardCursorCopy; + case CURSOR_X_MOVE: return GHOST_kStandardCursorLeftRight; + case CURSOR_Y_MOVE: return GHOST_kStandardCursorUpDown; + case CURSOR_PENCIL: return GHOST_kStandardCursorPencil; + case CURSOR_COPY: return GHOST_kStandardCursorCopy; } } static void window_set_custom_cursor(wmWindow *win, unsigned char mask[16][2], - unsigned char bitmap[16][2], int hotx, int hoty) + unsigned char bitmap[16][2], int hotx, int hoty) { GHOST_SetCustomCursorShape(win->ghostwin, bitmap, mask, hotx, hoty); } @@ -84,17 +84,17 @@ static void window_set_custom_cursor_ex(wmWindow *win, BCursor *cursor, int useB { if (useBig) { GHOST_SetCustomCursorShapeEx(win->ghostwin, - (GHOST_TUns8 *)cursor->big_bm, (GHOST_TUns8 *)cursor->big_mask, - cursor->big_sizex,cursor->big_sizey, - cursor->big_hotx,cursor->big_hoty, - cursor->fg_color, cursor->bg_color); + (GHOST_TUns8 *)cursor->big_bm, (GHOST_TUns8 *)cursor->big_mask, + cursor->big_sizex, cursor->big_sizey, + cursor->big_hotx, cursor->big_hoty, + cursor->fg_color, cursor->bg_color); } else { GHOST_SetCustomCursorShapeEx(win->ghostwin, - (GHOST_TUns8 *)cursor->small_bm, (GHOST_TUns8 *)cursor->small_mask, - cursor->small_sizex,cursor->small_sizey, - cursor->small_hotx,cursor->small_hoty, - cursor->fg_color, cursor->bg_color); + (GHOST_TUns8 *)cursor->small_bm, (GHOST_TUns8 *)cursor->small_mask, + cursor->small_sizex, cursor->small_sizey, + cursor->small_hotx, cursor->small_hoty, + cursor->fg_color, cursor->bg_color); } } @@ -105,9 +105,9 @@ static BCursor *BlenderCursor[BC_NUMCURSORS]; /*Points to static BCursor Structs void WM_cursor_set(wmWindow *win, int curs) { - if (win==NULL) return; /* Can't set custom cursor before Window init */ + if (win == NULL) return; /* Can't set custom cursor before Window init */ - if (curs==CURSOR_NONE) { + if (curs == CURSOR_NONE) { GHOST_SetCursorVisibility(win->ghostwin, 0); return; } @@ -115,28 +115,28 @@ void WM_cursor_set(wmWindow *win, int curs) #ifdef _WIN32 /* the default win32 cross cursor is barely visible, * only 1 pixel thick, use another one instead */ - if (curs==CURSOR_EDIT) - curs= BC_CROSSCURSOR; + if (curs == CURSOR_EDIT) + curs = BC_CROSSCURSOR; #endif GHOST_SetCursorVisibility(win->ghostwin, 1); if (curs == CURSOR_STD && win->modalcursor) - curs= win->modalcursor; + curs = win->modalcursor; - win->cursor= curs; + win->cursor = curs; /* detect if we use system cursor or Blender cursor */ - if (curs>=BC_GHOST_CURSORS) { + if (curs >= BC_GHOST_CURSORS) { GHOST_SetCursorShape(win->ghostwin, convert_cursor(curs)); } else { - if ((curs=BC_NUMCURSORS)) return; + if ((curs < SYSCURSOR) || (curs >= BC_NUMCURSORS)) return; - if (curs==SYSCURSOR) { /* System default Cursor */ + if (curs == SYSCURSOR) { /* System default Cursor */ GHOST_SetCursorShape(win->ghostwin, convert_cursor(CURSOR_STD)); } - else if ( (U.curssize==0) || (BlenderCursor[curs]->big_bm == NULL) ) { + else if ( (U.curssize == 0) || (BlenderCursor[curs]->big_bm == NULL) ) { window_set_custom_cursor_ex(win, BlenderCursor[curs], 0); } else { @@ -165,10 +165,10 @@ void WM_cursor_restore(wmWindow *win) void WM_cursor_wait(int val) { if (!G.background) { - wmWindowManager *wm= G.main->wm.first; - wmWindow *win= wm?wm->windows.first:NULL; + wmWindowManager *wm = G.main->wm.first; + wmWindow *win = wm ? wm->windows.first : NULL; - for (; win; win= win->next) { + for (; win; win = win->next) { if (val) { WM_cursor_modal(win, BC_WAITCURSOR); } @@ -186,11 +186,11 @@ void WM_cursor_grab(wmWindow *win, int wrap, int hide, int *bounds) * */ GHOST_TGrabCursorMode mode = GHOST_kGrabNormal; - if (hide) mode = GHOST_kGrabHide; - else if (wrap) mode = GHOST_kGrabWrap; + if (hide) mode = GHOST_kGrabHide; + else if (wrap) mode = GHOST_kGrabWrap; if ((G.f & G_DEBUG) == 0) { if (win && win->ghostwin) { - const GHOST_TabletData *tabletdata= GHOST_GetTabletData(win->ghostwin); + const GHOST_TabletData *tabletdata = GHOST_GetTabletData(win->ghostwin); // Note: There is no tabletdata on Windows if no tablet device is connected. if (!tabletdata) GHOST_SetCursorGrab(win->ghostwin, mode, bounds); @@ -215,22 +215,22 @@ void WM_cursor_ungrab(wmWindow *win) /* give it a modal keymap one day? */ int wm_cursor_arrow_move(wmWindow *win, wmEvent *event) { - if (win && event->val==KM_PRESS) { + if (win && event->val == KM_PRESS) { - if (event->type==UPARROWKEY) { - WM_cursor_warp(win, event->x, event->y+1); + if (event->type == UPARROWKEY) { + WM_cursor_warp(win, event->x, event->y + 1); return 1; } - else if (event->type==DOWNARROWKEY) { - WM_cursor_warp(win, event->x, event->y-1); + else if (event->type == DOWNARROWKEY) { + WM_cursor_warp(win, event->x, event->y - 1); return 1; } - else if (event->type==LEFTARROWKEY) { - WM_cursor_warp(win, event->x-1, event->y); + else if (event->type == LEFTARROWKEY) { + WM_cursor_warp(win, event->x - 1, event->y); return 1; } - else if (event->type==RIGHTARROWKEY) { - WM_cursor_warp(win, event->x+1, event->y); + else if (event->type == RIGHTARROWKEY) { + WM_cursor_warp(win, event->x + 1, event->y); return 1; } } @@ -242,36 +242,36 @@ int wm_cursor_arrow_move(wmWindow *win, wmEvent *event) void WM_timecursor(wmWindow *win, int nr) { /* 10 8x8 digits */ - static char number_bitmaps[10][8]= { - {0, 56, 68, 68, 68, 68, 68, 56}, - {0, 24, 16, 16, 16, 16, 16, 56}, - {0, 60, 66, 32, 16, 8, 4, 126}, - {0, 124, 32, 16, 56, 64, 66, 60}, - {0, 32, 48, 40, 36, 126, 32, 32}, - {0, 124, 4, 60, 64, 64, 68, 56}, - {0, 56, 4, 4, 60, 68, 68, 56}, - {0, 124, 64, 32, 16, 8, 8, 8}, - {0, 60, 66, 66, 60, 66, 66, 60}, - {0, 56, 68, 68, 120, 64, 68, 56} + static char number_bitmaps[10][8] = { + {0, 56, 68, 68, 68, 68, 68, 56}, + {0, 24, 16, 16, 16, 16, 16, 56}, + {0, 60, 66, 32, 16, 8, 4, 126}, + {0, 124, 32, 16, 56, 64, 66, 60}, + {0, 32, 48, 40, 36, 126, 32, 32}, + {0, 124, 4, 60, 64, 64, 68, 56}, + {0, 56, 4, 4, 60, 68, 68, 56}, + {0, 124, 64, 32, 16, 8, 8, 8}, + {0, 60, 66, 66, 60, 66, 66, 60}, + {0, 56, 68, 68, 120, 64, 68, 56} }; unsigned char mask[16][2]; - unsigned char bitmap[16][2]= {{0}}; + unsigned char bitmap[16][2] = {{0}}; int i, idx; if (win->lastcursor == 0) - win->lastcursor= win->cursor; + win->lastcursor = win->cursor; memset(&mask, 0xFF, sizeof(mask)); /* print number bottom right justified */ - for (idx= 3; nr && idx>=0; idx--) { - char *digit= number_bitmaps[nr%10]; - int x = idx%2; - int y = idx/2; - - for (i=0; i<8; i++) - bitmap[i + y*8][x]= digit[i]; - nr/= 10; + for (idx = 3; nr && idx >= 0; idx--) { + char *digit = number_bitmaps[nr % 10]; + int x = idx % 2; + int y = idx / 2; + + for (i = 0; i < 8; i++) + bitmap[i + y * 8][x] = digit[i]; + nr /= 10; } window_set_custom_cursor(win, mask, bitmap, 7, 7); @@ -324,78 +324,78 @@ void wm_init_cursor_data(void) { /********************** NW_ARROW Cursor **************************/ BEGIN_CURSOR_BLOCK - static char nw_sbm[]={ - 0x03, 0x00, 0x05, 0x00, 0x09, 0x00, 0x11, 0x00, - 0x21, 0x00, 0x41, 0x00, 0x81, 0x00, 0x01, 0x01, - 0x01, 0x02, 0xc1, 0x03, 0x49, 0x00, 0x8d, 0x00, - 0x8b, 0x00, 0x10, 0x01, 0x90, 0x01, 0x60, 0x00, - }; - - static char nw_smsk[]={ - 0x03, 0x00, 0x07, 0x00, 0x0f, 0x00, 0x1f, 0x00, - 0x3f, 0x00, 0x7f, 0x00, 0xff, 0x00, 0xff, 0x01, - 0xff, 0x03, 0xff, 0x03, 0x7f, 0x00, 0xff, 0x00, - 0xfb, 0x00, 0xf0, 0x01, 0xf0, 0x01, 0x60, 0x00, - }; - - static BCursor NWArrowCursor = { - /*small*/ - nw_sbm, nw_smsk, - 16, 16, - 6, 7, - /*big*/ - NULL, NULL, - 32,32, - 15, 15, - /*color*/ - BC_BLACK, BC_WHITE - }; - - BlenderCursor[BC_NW_ARROWCURSOR]=&NWArrowCursor; + static char nw_sbm[] = { + 0x03, 0x00, 0x05, 0x00, 0x09, 0x00, 0x11, 0x00, + 0x21, 0x00, 0x41, 0x00, 0x81, 0x00, 0x01, 0x01, + 0x01, 0x02, 0xc1, 0x03, 0x49, 0x00, 0x8d, 0x00, + 0x8b, 0x00, 0x10, 0x01, 0x90, 0x01, 0x60, 0x00, + }; + + static char nw_smsk[] = { + 0x03, 0x00, 0x07, 0x00, 0x0f, 0x00, 0x1f, 0x00, + 0x3f, 0x00, 0x7f, 0x00, 0xff, 0x00, 0xff, 0x01, + 0xff, 0x03, 0xff, 0x03, 0x7f, 0x00, 0xff, 0x00, + 0xfb, 0x00, 0xf0, 0x01, 0xf0, 0x01, 0x60, 0x00, + }; + + static BCursor NWArrowCursor = { + /*small*/ + nw_sbm, nw_smsk, + 16, 16, + 6, 7, + /*big*/ + NULL, NULL, + 32, 32, + 15, 15, + /*color*/ + BC_BLACK, BC_WHITE + }; + + BlenderCursor[BC_NW_ARROWCURSOR] = &NWArrowCursor; END_CURSOR_BLOCK ///********************** NS_ARROW Cursor *************************/ BEGIN_CURSOR_BLOCK - static char ns_sbm[]={ - 0x40, 0x01, 0x20, 0x02, 0x10, 0x04, 0x08, 0x08, - 0x04, 0x10, 0x3c, 0x1e, 0x20, 0x02, 0x20, 0x02, - 0x20, 0x02, 0x20, 0x02, 0x3c, 0x1e, 0x04, 0x10, - 0x08, 0x08, 0x10, 0x04, 0x20, 0x02, 0x40, 0x01 - }; - - static char ns_smsk[]={ - 0xc0, 0x01, 0xe0, 0x03, 0xf0, 0x07, 0xf8, 0x0f, - 0xfc, 0x1f, 0xfc, 0x1f, 0xe0, 0x03, 0xe0, 0x03, - 0xe0, 0x03, 0xe0, 0x03, 0xfc, 0x1f, 0xfc, 0x1f, - 0xf8, 0x0f, 0xf0, 0x07, 0xe0, 0x03, 0xc0, 0x01 - }; - - static BCursor NSArrowCursor = { - /*small*/ - ns_sbm, ns_smsk, - 16, 16, - 6, 7, - /*big*/ - NULL, NULL, - 32,32, - 15, 15, - /*color*/ - BC_BLACK, BC_WHITE - }; - - BlenderCursor[BC_NS_ARROWCURSOR]=&NSArrowCursor; + static char ns_sbm[] = { + 0x40, 0x01, 0x20, 0x02, 0x10, 0x04, 0x08, 0x08, + 0x04, 0x10, 0x3c, 0x1e, 0x20, 0x02, 0x20, 0x02, + 0x20, 0x02, 0x20, 0x02, 0x3c, 0x1e, 0x04, 0x10, + 0x08, 0x08, 0x10, 0x04, 0x20, 0x02, 0x40, 0x01 + }; + + static char ns_smsk[] = { + 0xc0, 0x01, 0xe0, 0x03, 0xf0, 0x07, 0xf8, 0x0f, + 0xfc, 0x1f, 0xfc, 0x1f, 0xe0, 0x03, 0xe0, 0x03, + 0xe0, 0x03, 0xe0, 0x03, 0xfc, 0x1f, 0xfc, 0x1f, + 0xf8, 0x0f, 0xf0, 0x07, 0xe0, 0x03, 0xc0, 0x01 + }; + + static BCursor NSArrowCursor = { + /*small*/ + ns_sbm, ns_smsk, + 16, 16, + 6, 7, + /*big*/ + NULL, NULL, + 32, 32, + 15, 15, + /*color*/ + BC_BLACK, BC_WHITE + }; + + BlenderCursor[BC_NS_ARROWCURSOR] = &NSArrowCursor; END_CURSOR_BLOCK /********************** EW_ARROW Cursor *************************/ BEGIN_CURSOR_BLOCK - static char ew_sbm[]={ + static char ew_sbm[] = { 0x00, 0x00, 0x00, 0x00, 0x10, 0x08, 0x38, 0x1c, 0x2c, 0x34, 0xe6, 0x67, 0x03, 0xc0, 0x01, 0x80, 0x03, 0xc0, 0xe6, 0x67, 0x2c, 0x34, 0x38, 0x1c, 0x10, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; - static char ew_smsk[]={ + static char ew_smsk[] = { 0x00, 0x00, 0x00, 0x00, 0x10, 0x08, 0x38, 0x1c, 0x3c, 0x3c, 0xfe, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7f, 0x3c, 0x3c, 0x38, 0x1c, @@ -409,32 +409,32 @@ BEGIN_CURSOR_BLOCK 7, 6, /*big*/ NULL, NULL, - 32,32, + 32, 32, 15, 15, /*color*/ BC_BLACK, BC_WHITE }; - BlenderCursor[BC_EW_ARROWCURSOR]=&EWArrowCursor; + BlenderCursor[BC_EW_ARROWCURSOR] = &EWArrowCursor; END_CURSOR_BLOCK /********************** Wait Cursor *****************************/ BEGIN_CURSOR_BLOCK - static char wait_sbm[]={ + static char wait_sbm[] = { 0xfe, 0x7f, 0x02, 0x40, 0x02, 0x40, 0x84, 0x21, 0xc8, 0x13, 0xd0, 0x0b, 0xa0, 0x04, 0x20, 0x05, 0xa0, 0x04, 0x10, 0x09, 0x88, 0x11, 0xc4, 0x23, 0xe2, 0x47, 0xfa, 0x5f, 0x02, 0x40, 0xfe, 0x7f, }; - static char wait_smsk[]={ + static char wait_smsk[] = { 0xfe, 0x7f, 0xfe, 0x7f, 0x06, 0x60, 0x8c, 0x31, 0xd8, 0x1b, 0xf0, 0x0f, 0xe0, 0x06, 0x60, 0x07, 0xe0, 0x06, 0x30, 0x0d, 0x98, 0x19, 0xcc, 0x33, 0xe6, 0x67, 0xfe, 0x7f, 0xfe, 0x7f, 0xfe, 0x7f, }; - static char wait_lbm[]={ + static char wait_lbm[] = { 0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f, 0x0c, 0x00, 0x00, 0x30, 0x0c, 0x00, 0x00, 0x30, 0x0c, 0x00, 0x00, 0x30, 0x0c, 0x00, 0x00, 0x18, @@ -453,7 +453,7 @@ BEGIN_CURSOR_BLOCK 0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f, }; - static char wait_lmsk[]={ + static char wait_lmsk[] = { 0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f, 0xfc, 0xff, 0xff, 0x3f, 0x3c, 0x00, 0x00, 0x3c, 0x3c, 0x00, 0x00, 0x1e, @@ -474,36 +474,36 @@ BEGIN_CURSOR_BLOCK static BCursor WaitCursor = { /*small*/ - wait_sbm, wait_smsk, + wait_sbm, wait_smsk, 16, 16, 7, 7, /*big*/ wait_lbm, wait_lmsk, - 32,32, + 32, 32, 15, 15, /*color*/ BC_BLACK, BC_WHITE }; - BlenderCursor[BC_WAITCURSOR]=&WaitCursor; + BlenderCursor[BC_WAITCURSOR] = &WaitCursor; END_CURSOR_BLOCK /********************** Cross Cursor ***************************/ BEGIN_CURSOR_BLOCK - static char cross_sbm[]={ + static char cross_sbm[] = { 0x00, 0x00, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x7e, 0x7e, 0x7e, 0x7e, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x00, 0x00, }; - static char cross_smsk[]={ + static char cross_smsk[] = { 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0xc0, 0x03, 0x7f, 0xfe, 0x7f, 0xfe, 0xc0, 0x03, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01, }; - static char cross_lbm[]={ + static char cross_lbm[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, @@ -522,7 +522,7 @@ BEGIN_CURSOR_BLOCK 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; - static char cross_lmsk[]={ + static char cross_lmsk[] = { 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x00, @@ -548,25 +548,25 @@ BEGIN_CURSOR_BLOCK 7, 7, /*big*/ cross_lbm, cross_lmsk, - 32,32, + 32, 32, 15, 15, /*color*/ BC_BLACK, BC_WHITE }; - BlenderCursor[BC_CROSSCURSOR]=&CrossCursor; + BlenderCursor[BC_CROSSCURSOR] = &CrossCursor; END_CURSOR_BLOCK /********************** EditCross Cursor ***********************/ BEGIN_CURSOR_BLOCK - static char editcross_sbm[]={ + static char editcross_sbm[] = { 0x0e, 0x00, 0x11, 0x00, 0x1d, 0x00, 0x19, 0x03, 0x1d, 0x03, 0x11, 0x03, 0x0e, 0x03, 0x00, 0x03, 0xf8, 0x7c, 0xf8, 0x7c, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, }; - static char editcross_smsk[]={ + static char editcross_smsk[] = { 0x0e, 0x00, 0x1f, 0x00, 0x1f, 0x03, 0x1f, 0x03, 0x1f, 0x03, 0x1f, 0x03, 0x0e, 0x03, 0x80, 0x07, 0xfc, 0xfc, 0xfc, 0xfc, 0x80, 0x07, 0x00, 0x03, @@ -580,26 +580,26 @@ BEGIN_CURSOR_BLOCK 9, 8, /*big*/ NULL, NULL, - 32,32, + 32, 32, 15, 15, /*color*/ BC_BLACK, BC_WHITE }; - BlenderCursor[BC_EDITCROSSCURSOR]=&EditCrossCursor; + BlenderCursor[BC_EDITCROSSCURSOR] = &EditCrossCursor; END_CURSOR_BLOCK /********************** Box Select *************************/ BEGIN_CURSOR_BLOCK - static char box_sbm[32]={ - 0x7f, 0x00, 0x41, 0x00, 0x41, 0x00, 0x41, 0x06, + static char box_sbm[32] = { + 0x7f, 0x00, 0x41, 0x00, 0x41, 0x00, 0x41, 0x06, 0x41, 0x06, 0x41, 0x06, 0x7f, 0x06, 0x00, 0x06, 0xe0, 0x79, 0xe0, 0x79, 0x00, 0x06, 0x00, 0x06, 0x00, 0x06, 0x00, 0x06, 0x00, 0x06, 0x00, 0x00, }; - static char box_smsk[32]={ - 0x7f, 0x00, 0x7f, 0x00, 0x63, 0x06, 0x63, 0x06, + static char box_smsk[32] = { + 0x7f, 0x00, 0x7f, 0x00, 0x63, 0x06, 0x63, 0x06, 0x63, 0x06, 0x7f, 0x06, 0x7f, 0x06, 0x00, 0x0f, 0xf0, 0xf9, 0xf0, 0xf9, 0x00, 0x0f, 0x00, 0x06, 0x00, 0x06, 0x00, 0x06, 0x00, 0x06, 0x00, 0x06, @@ -613,32 +613,32 @@ BEGIN_CURSOR_BLOCK 9, 8, /*big*/ NULL, NULL, - 32,32, + 32, 32, 15, 15, /*color*/ BC_BLACK, BC_WHITE }; - BlenderCursor[BC_BOXSELCURSOR]=&BoxSelCursor; + BlenderCursor[BC_BOXSELCURSOR] = &BoxSelCursor; END_CURSOR_BLOCK /********************** Knife Cursor ***********************/ BEGIN_CURSOR_BLOCK - static char knife_sbm[]={ + static char knife_sbm[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x2c, 0x00, 0x5a, 0x00, 0x34, 0x00, 0x2a, 0x00, 0x17, 0x80, 0x06, 0x40, 0x03, 0xa0, 0x03, 0xd0, 0x01, 0x68, 0x00, 0x1c, 0x00, 0x06, 0x00, 0x00, 0x00 }; - static char knife_smsk[]={ + static char knife_smsk[] = { 0x00, 0x60, 0x00, 0xf0, 0x00, 0xfc, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0x7e, 0x00, 0x7f, 0x80, 0x3f, 0xc0, 0x0e, 0x60, 0x07, 0xb0, 0x07, 0xd8, 0x03, 0xec, 0x01, 0x7e, 0x00, 0x1f, 0x00, 0x07, 0x00 }; - static char knife_lbm[]={ + static char knife_lbm[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x1c, @@ -658,7 +658,7 @@ BEGIN_CURSOR_BLOCK }; - static char knife_lmsk[]={ + static char knife_lmsk[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x7e, @@ -680,41 +680,41 @@ BEGIN_CURSOR_BLOCK static BCursor KnifeCursor = { /*small*/ - knife_sbm, knife_smsk, + knife_sbm, knife_smsk, 16, 16, 0, 15, /*big*/ knife_lbm, knife_lmsk, - 32,32, + 32, 32, 0, 31, /*color*/ BC_BLACK, BC_WHITE }; - BlenderCursor[BC_KNIFECURSOR]=&KnifeCursor; + BlenderCursor[BC_KNIFECURSOR] = &KnifeCursor; END_CURSOR_BLOCK /********************** Loop Select Cursor ***********************/ BEGIN_CURSOR_BLOCK -static char vloop_sbm[]={ + static char vloop_sbm[] = { 0x00, 0x00, 0x7e, 0x00, 0x3e, 0x00, 0x1e, 0x00, 0x0e, 0x00, 0x66, 0x60, 0x62, 0x6f, 0x00, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x60, 0x60, 0x60, 0x6f, 0x00, 0x00, -}; + }; -static char vloop_smsk[]={ + static char vloop_smsk[] = { 0xff, 0x01, 0xff, 0x00, 0x7f, 0x00, 0x3f, 0x00, 0xff, 0xf0, 0xff, 0xff, 0xf7, 0xff, 0xf3, 0xf0, 0x61, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0xf0, 0xf0, 0xf0, 0xff, 0xf0, 0xff, 0xf0, 0xf0, -}; + }; -static char vloop_lbm[]={ + static char vloop_lbm[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x00, 0xfc, 0x3f, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x00, 0xfc, 0x0f, 0x00, 0x00, @@ -731,9 +731,9 @@ static char vloop_lbm[]={ 0x00, 0x3c, 0x00, 0x3c, 0x00, 0x3c, 0x00, 0x3c, 0x00, 0x3c, 0xff, 0x3c, 0x00, 0x3c, 0xff, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; + }; -static char vloop_lmsk[]={ + static char vloop_lmsk[] = { 0xff, 0xff, 0x03, 0x00, 0xff, 0xff, 0x03, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, 0xff, 0x3f, 0x00, 0x00, @@ -750,38 +750,38 @@ static char vloop_lmsk[]={ 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, -}; + }; static BCursor VLoopCursor = { /*small*/ - vloop_sbm, vloop_smsk, + vloop_sbm, vloop_smsk, 16, 16, 0, 0, /*big*/ vloop_lbm, vloop_lmsk, - 32,32, + 32, 32, 0, 0, /*color*/ BC_BLACK, BC_WHITE }; - BlenderCursor[BC_VLOOPCURSOR]=&VLoopCursor; + BlenderCursor[BC_VLOOPCURSOR] = &VLoopCursor; -END_CURSOR_BLOCK +END_CURSOR_BLOCK /********************** TextEdit Cursor ***********************/ BEGIN_CURSOR_BLOCK - static char textedit_sbm[]={ + static char textedit_sbm[] = { 0xe0, 0x03, 0x10, 0x04, 0x60, 0x03, 0x40, 0x01, 0x40, 0x01, 0x40, 0x01, 0x40, 0x01, 0x40, 0x01, 0x40, 0x01, 0x40, 0x01, 0x40, 0x01, 0x40, 0x01, 0x40, 0x01, 0x60, 0x03, 0x10, 0x04, 0xe0, 0x03, }; - static char textedit_smsk[]={ + static char textedit_smsk[] = { 0xe0, 0x03, 0xf0, 0x07, 0xe0, 0x03, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, @@ -795,19 +795,19 @@ BEGIN_CURSOR_BLOCK 9, 8, /*big*/ NULL, NULL, - 32,32, + 32, 32, 15, 15, /*color*/ BC_BLACK, BC_WHITE }; - BlenderCursor[BC_TEXTEDITCURSOR]=&TextEditCursor; + BlenderCursor[BC_TEXTEDITCURSOR] = &TextEditCursor; END_CURSOR_BLOCK /********************** Paintbrush Cursor ***********************/ BEGIN_CURSOR_BLOCK - static char paintbrush_sbm[]={ + static char paintbrush_sbm[] = { 0x00, 0xe0, 0x00, 0x98, 0x00, 0x44, 0x00, 0x42, 0x00, 0x21, 0x80, 0x20, 0x40, 0x13, 0x40, 0x17, @@ -818,7 +818,7 @@ BEGIN_CURSOR_BLOCK }; - static char paintbrush_smsk[]={ + static char paintbrush_smsk[] = { 0x00, 0xe0, 0x00, 0xf8, 0x00, 0x7c, 0x00, 0x7e, 0x00, 0x3f, 0x80, 0x3f, 0xc0, 0x1f, 0xc0, 0x1f, 0xe0, 0x0f, 0xf8, 0x07, 0xfc, 0x03, 0xfe, 0x01, @@ -834,83 +834,83 @@ BEGIN_CURSOR_BLOCK 0, 15, /*big*/ NULL, NULL, - 32,32, + 32, 32, 15, 15, /*color*/ BC_BLACK, BC_WHITE }; - BlenderCursor[BC_PAINTBRUSHCURSOR]=&PaintBrushCursor; + BlenderCursor[BC_PAINTBRUSHCURSOR] = &PaintBrushCursor; END_CURSOR_BLOCK /********************** Hand Cursor ***********************/ BEGIN_CURSOR_BLOCK -static char hand_sbm[]={ - 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x80, 0x0d, - 0x98, 0x6d, 0x98, 0x6d, 0xb0, 0x6d, 0xb0, 0x6d, - 0xe0, 0x6f, 0xe6, 0x7f, 0xee, 0x7f, 0xfc, 0x3f, - 0xf8, 0x3f, 0xf0, 0x1f, 0xc0, 0x1f, 0xc0, 0x1f, -}; - -static char hand_smsk[]={ - 0x00, 0x00, 0x80, 0x01, 0xc0, 0x0f, 0xd8, 0x7f, - 0xfc, 0xff, 0xfc, 0xff, 0xf8, 0xff, 0xf8, 0xff, - 0xf6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7f, - 0xfc, 0x7f, 0xf8, 0x3f, 0xf0, 0x3f, 0xe0, 0x3f, -}; - - -static BCursor HandCursor = { - /*small*/ - hand_sbm, hand_smsk, - 16, 16, - 8, 8, - /*big*/ - NULL, NULL, - 32,32, - 15, 15, - /*color*/ - BC_BLACK, BC_WHITE -}; - -BlenderCursor[BC_HANDCURSOR]=&HandCursor; + static char hand_sbm[] = { + 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x80, 0x0d, + 0x98, 0x6d, 0x98, 0x6d, 0xb0, 0x6d, 0xb0, 0x6d, + 0xe0, 0x6f, 0xe6, 0x7f, 0xee, 0x7f, 0xfc, 0x3f, + 0xf8, 0x3f, 0xf0, 0x1f, 0xc0, 0x1f, 0xc0, 0x1f, + }; + + static char hand_smsk[] = { + 0x00, 0x00, 0x80, 0x01, 0xc0, 0x0f, 0xd8, 0x7f, + 0xfc, 0xff, 0xfc, 0xff, 0xf8, 0xff, 0xf8, 0xff, + 0xf6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7f, + 0xfc, 0x7f, 0xf8, 0x3f, 0xf0, 0x3f, 0xe0, 0x3f, + }; + + + static BCursor HandCursor = { + /*small*/ + hand_sbm, hand_smsk, + 16, 16, + 8, 8, + /*big*/ + NULL, NULL, + 32, 32, + 15, 15, + /*color*/ + BC_BLACK, BC_WHITE + }; + + BlenderCursor[BC_HANDCURSOR] = &HandCursor; END_CURSOR_BLOCK /********************** NSEW Scroll Cursor ***********************/ BEGIN_CURSOR_BLOCK -static char nsewscroll_sbm[]={ - 0x00, 0x00, 0x80, 0x01, 0xc0, 0x03, 0xc0, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x0c, 0x30, 0x0e, 0x70, - 0x0e, 0x70, 0x0c, 0x30, 0x00, 0x00, 0x00, 0x00, - 0xc0, 0x03, 0xc0, 0x03, 0x80, 0x01, 0x00, 0x00, -}; - -static char nsewscroll_smsk[]={ - 0x80, 0x01, 0xc0, 0x03, 0xe0, 0x07, 0xe0, 0x07, - 0xc0, 0x03, 0x0c, 0x30, 0x1e, 0x78, 0x1f, 0xf8, - 0x1f, 0xf8, 0x1e, 0x78, 0x0c, 0x30, 0xc0, 0x03, - 0xe0, 0x07, 0xe0, 0x07, 0xc0, 0x03, 0x80, 0x01, -}; - - -static BCursor NSEWScrollCursor = { - /*small*/ - nsewscroll_sbm, nsewscroll_smsk, - 16, 16, - 8, 8, - /*big*/ - NULL, NULL, - 32,32, - 15, 15, - /*color*/ - BC_BLACK, BC_WHITE -}; - -BlenderCursor[BC_NSEW_SCROLLCURSOR]=&NSEWScrollCursor; + static char nsewscroll_sbm[] = { + 0x00, 0x00, 0x80, 0x01, 0xc0, 0x03, 0xc0, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x0c, 0x30, 0x0e, 0x70, + 0x0e, 0x70, 0x0c, 0x30, 0x00, 0x00, 0x00, 0x00, + 0xc0, 0x03, 0xc0, 0x03, 0x80, 0x01, 0x00, 0x00, + }; + + static char nsewscroll_smsk[] = { + 0x80, 0x01, 0xc0, 0x03, 0xe0, 0x07, 0xe0, 0x07, + 0xc0, 0x03, 0x0c, 0x30, 0x1e, 0x78, 0x1f, 0xf8, + 0x1f, 0xf8, 0x1e, 0x78, 0x0c, 0x30, 0xc0, 0x03, + 0xe0, 0x07, 0xe0, 0x07, 0xc0, 0x03, 0x80, 0x01, + }; + + + static BCursor NSEWScrollCursor = { + /*small*/ + nsewscroll_sbm, nsewscroll_smsk, + 16, 16, + 8, 8, + /*big*/ + NULL, NULL, + 32, 32, + 15, 15, + /*color*/ + BC_BLACK, BC_WHITE + }; + + BlenderCursor[BC_NSEW_SCROLLCURSOR] = &NSEWScrollCursor; END_CURSOR_BLOCK @@ -918,35 +918,35 @@ END_CURSOR_BLOCK /********************** NS Scroll Cursor ***********************/ BEGIN_CURSOR_BLOCK -static char nsscroll_sbm[]={ - 0x00, 0x00, 0x80, 0x01, 0xc0, 0x03, 0xc0, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xc0, 0x03, 0xc0, 0x03, 0x80, 0x01, 0x00, 0x00, -}; - -static char nsscroll_smsk[]={ - 0x80, 0x01, 0xc0, 0x03, 0xe0, 0x07, 0xe0, 0x07, - 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, - 0xe0, 0x07, 0xe0, 0x07, 0xc0, 0x03, 0x80, 0x01, -}; - - -static BCursor NSScrollCursor = { - /*small*/ - nsscroll_sbm, nsscroll_smsk, - 16, 16, - 8, 8, - /*big*/ - NULL, NULL, - 32,32, - 15, 15, - /*color*/ - BC_BLACK, BC_WHITE -}; - -BlenderCursor[BC_NS_SCROLLCURSOR]=&NSScrollCursor; + static char nsscroll_sbm[] = { + 0x00, 0x00, 0x80, 0x01, 0xc0, 0x03, 0xc0, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xc0, 0x03, 0xc0, 0x03, 0x80, 0x01, 0x00, 0x00, + }; + + static char nsscroll_smsk[] = { + 0x80, 0x01, 0xc0, 0x03, 0xe0, 0x07, 0xe0, 0x07, + 0xc0, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x03, + 0xe0, 0x07, 0xe0, 0x07, 0xc0, 0x03, 0x80, 0x01, + }; + + + static BCursor NSScrollCursor = { + /*small*/ + nsscroll_sbm, nsscroll_smsk, + 16, 16, + 8, 8, + /*big*/ + NULL, NULL, + 32, 32, + 15, 15, + /*color*/ + BC_BLACK, BC_WHITE + }; + + BlenderCursor[BC_NS_SCROLLCURSOR] = &NSScrollCursor; END_CURSOR_BLOCK @@ -954,110 +954,105 @@ END_CURSOR_BLOCK /********************** EW Scroll Cursor ***********************/ BEGIN_CURSOR_BLOCK -static char ewscroll_sbm[]={ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x0c, 0x30, 0x0e, 0x70, - 0x0e, 0x70, 0x0c, 0x30, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; - -static char ewscroll_smsk[]={ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x0c, 0x30, 0x1e, 0x78, 0x1f, 0xf8, - 0x1f, 0xf8, 0x1e, 0x78, 0x0c, 0x30, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -}; - - -static BCursor EWScrollCursor = { - /*small*/ - ewscroll_sbm, ewscroll_smsk, - 16, 16, - 8, 8, - /*big*/ - NULL, NULL, - 32,32, - 15, 15, - /*color*/ - BC_BLACK, BC_WHITE -}; - -BlenderCursor[BC_EW_SCROLLCURSOR]=&EWScrollCursor; + static char ewscroll_sbm[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0c, 0x30, 0x0e, 0x70, + 0x0e, 0x70, 0x0c, 0x30, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }; + + static char ewscroll_smsk[] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x0c, 0x30, 0x1e, 0x78, 0x1f, 0xf8, + 0x1f, 0xf8, 0x1e, 0x78, 0x0c, 0x30, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }; + + + static BCursor EWScrollCursor = { + /*small*/ + ewscroll_sbm, ewscroll_smsk, + 16, 16, + 8, 8, + /*big*/ + NULL, NULL, + 32, 32, + 15, 15, + /*color*/ + BC_BLACK, BC_WHITE + }; + + BlenderCursor[BC_EW_SCROLLCURSOR] = &EWScrollCursor; END_CURSOR_BLOCK /********************** Eyedropper Cursor ***********************/ BEGIN_CURSOR_BLOCK -static char eyedropper_sbm[]={ - 0x00, 0x30, 0x00, 0x48, 0x00, 0x85, 0x80, 0x82, - 0x40, 0x40, 0x80, 0x20, 0x40, 0x11, 0xa0, 0x23, - 0xd0, 0x15, 0xe8, 0x0a, 0x74, 0x01, 0xb4, 0x00, - 0x4a, 0x00, 0x35, 0x00, 0x08, 0x00, 0x04, 0x00, -}; - -static char eyedropper_smsk[]={ - 0x00, 0x30, 0x00, 0x78, 0x00, 0xfd, 0x80, 0xff, - 0xc0, 0x7f, 0x80, 0x3f, 0xc0, 0x1f, 0xe0, 0x3f, - 0xf0, 0x1f, 0xf8, 0x0b, 0xfc, 0x01, 0xfc, 0x00, - 0x7e, 0x00, 0x3f, 0x00, 0x0c, 0x00, 0x04, 0x00, -}; - - -static BCursor EyedropperCursor = { - /*small*/ - eyedropper_sbm, eyedropper_smsk, - 16, 16, - 1, 15, - /*big*/ - NULL, NULL, - 32,32, - 15, 15, - /*color*/ - BC_BLACK, BC_WHITE -}; - -BlenderCursor[BC_EYEDROPPER_CURSOR]=&EyedropperCursor; + static char eyedropper_sbm[] = { + 0x00, 0x30, 0x00, 0x48, 0x00, 0x85, 0x80, 0x82, + 0x40, 0x40, 0x80, 0x20, 0x40, 0x11, 0xa0, 0x23, + 0xd0, 0x15, 0xe8, 0x0a, 0x74, 0x01, 0xb4, 0x00, + 0x4a, 0x00, 0x35, 0x00, 0x08, 0x00, 0x04, 0x00, + }; + + static char eyedropper_smsk[] = { + 0x00, 0x30, 0x00, 0x78, 0x00, 0xfd, 0x80, 0xff, + 0xc0, 0x7f, 0x80, 0x3f, 0xc0, 0x1f, 0xe0, 0x3f, + 0xf0, 0x1f, 0xf8, 0x0b, 0xfc, 0x01, 0xfc, 0x00, + 0x7e, 0x00, 0x3f, 0x00, 0x0c, 0x00, 0x04, 0x00, + }; + + + static BCursor EyedropperCursor = { + /*small*/ + eyedropper_sbm, eyedropper_smsk, + 16, 16, + 1, 15, + /*big*/ + NULL, NULL, + 32, 32, + 15, 15, + /*color*/ + BC_BLACK, BC_WHITE + }; + + BlenderCursor[BC_EYEDROPPER_CURSOR] = &EyedropperCursor; END_CURSOR_BLOCK /********************** Swap Area Cursor ***********************/ BEGIN_CURSOR_BLOCK -static char swap_sbm[]={ - 0xc0, 0xff, 0x40, 0x80, 0x40, 0x80, 0x40, 0x9c, - 0x40, 0x98, 0x40, 0x94, 0x00, 0x82, 0xfe, 0x80, - 0x7e, 0xfd, 0xbe, 0x01, 0xda, 0x01, 0xe2, 0x01, - 0xe2, 0x01, 0xc2, 0x01, 0xfe, 0x01, 0x00, 0x00, -}; - -static char swap_smsk[]={ - 0xc0, 0xff, 0xc0, 0xff, 0xc0, 0xff, 0xc0, 0xff, - 0xc0, 0xff, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0x03, 0xff, 0x03, 0xff, 0x03, - 0xff, 0x03, 0xff, 0x03, 0xff, 0x03, 0xff, 0x03, -}; - -static BCursor SwapCursor = { - /*small*/ - swap_sbm, swap_smsk, - 16, 16, - 8, 8, - /*big*/ - NULL, NULL, - 32,32, - 15, 15, - /*color*/ - BC_YELLOW, BC_BLUE -}; - -BlenderCursor[BC_SWAPAREA_CURSOR]=&SwapCursor; - -END_CURSOR_BLOCK -/********************** Put the cursors in the array ***********************/ - + static char swap_sbm[] = { + 0xc0, 0xff, 0x40, 0x80, 0x40, 0x80, 0x40, 0x9c, + 0x40, 0x98, 0x40, 0x94, 0x00, 0x82, 0xfe, 0x80, + 0x7e, 0xfd, 0xbe, 0x01, 0xda, 0x01, 0xe2, 0x01, + 0xe2, 0x01, 0xc2, 0x01, 0xfe, 0x01, 0x00, 0x00, + }; + static char swap_smsk[] = { + 0xc0, 0xff, 0xc0, 0xff, 0xc0, 0xff, 0xc0, 0xff, + 0xc0, 0xff, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0x03, 0xff, 0x03, 0xff, 0x03, + 0xff, 0x03, 0xff, 0x03, 0xff, 0x03, 0xff, 0x03, + }; -} + static BCursor SwapCursor = { + /*small*/ + swap_sbm, swap_smsk, + 16, 16, + 8, 8, + /*big*/ + NULL, NULL, + 32, 32, + 15, 15, + /*color*/ + BC_YELLOW, BC_BLUE + }; + BlenderCursor[BC_SWAPAREA_CURSOR] = &SwapCursor; +END_CURSOR_BLOCK +/********************** Put the cursors in the array ***********************/ +} diff --git a/source/blender/windowmanager/intern/wm_dragdrop.c b/source/blender/windowmanager/intern/wm_dragdrop.c index d60a97ad9bc..5283bc0a7a5 100644 --- a/source/blender/windowmanager/intern/wm_dragdrop.c +++ b/source/blender/windowmanager/intern/wm_dragdrop.c @@ -63,7 +63,7 @@ /* ****************************************************** */ -static ListBase dropboxes= {NULL, NULL}; +static ListBase dropboxes = {NULL, NULL}; /* drop box maps are stored global for now */ /* these are part of blender's UI/space specs, and not like keymaps */ @@ -83,15 +83,15 @@ ListBase *WM_dropboxmap_find(const char *idname, int spaceid, int regionid) { wmDropBoxMap *dm; - for (dm= dropboxes.first; dm; dm= dm->next) - if (dm->spaceid==spaceid && dm->regionid==regionid) - if (0==strncmp(idname, dm->idname, KMAP_MAX_NAME)) + for (dm = dropboxes.first; dm; dm = dm->next) + if (dm->spaceid == spaceid && dm->regionid == regionid) + if (0 == strncmp(idname, dm->idname, KMAP_MAX_NAME)) return &dm->dropboxes; - dm= MEM_callocN(sizeof(struct wmDropBoxMap), "dropmap list"); + dm = MEM_callocN(sizeof(struct wmDropBoxMap), "dropmap list"); BLI_strncpy(dm->idname, idname, KMAP_MAX_NAME); - dm->spaceid= spaceid; - dm->regionid= regionid; + dm->spaceid = spaceid; + dm->regionid = regionid; BLI_addtail(&dropboxes, dm); return &dm->dropboxes; @@ -100,16 +100,16 @@ ListBase *WM_dropboxmap_find(const char *idname, int spaceid, int regionid) wmDropBox *WM_dropbox_add(ListBase *lb, const char *idname, int (*poll)(bContext *, wmDrag *, wmEvent *), - void (*copy)(wmDrag *, wmDropBox *)) + void (*copy)(wmDrag *, wmDropBox *)) { - wmDropBox *drop= MEM_callocN(sizeof(wmDropBox), "wmDropBox"); + wmDropBox *drop = MEM_callocN(sizeof(wmDropBox), "wmDropBox"); - drop->poll= poll; - drop->copy= copy; - drop->ot= WM_operatortype_find(idname, 0); - drop->opcontext= WM_OP_INVOKE_DEFAULT; + drop->poll = poll; + drop->copy = copy; + drop->ot = WM_operatortype_find(idname, 0); + drop->opcontext = WM_OP_INVOKE_DEFAULT; - if (drop->ot==NULL) { + if (drop->ot == NULL) { MEM_freeN(drop); printf("Error: dropbox with unknown operator: %s\n", idname); return NULL; @@ -125,10 +125,10 @@ void wm_dropbox_free(void) { wmDropBoxMap *dm; - for (dm= dropboxes.first; dm; dm= dm->next) { + for (dm = dropboxes.first; dm; dm = dm->next) { wmDropBox *drop; - for (drop= dm->dropboxes.first; drop; drop= drop->next) { + for (drop = dm->dropboxes.first; drop; drop = drop->next) { if (drop->ptr) { WM_operator_properties_free(drop->ptr); MEM_freeN(drop->ptr); @@ -145,40 +145,40 @@ void wm_dropbox_free(void) /* note that the pointer should be valid allocated and not on stack */ wmDrag *WM_event_start_drag(struct bContext *C, int icon, int type, void *poin, double value) { - wmWindowManager *wm= CTX_wm_manager(C); - wmDrag *drag= MEM_callocN(sizeof(struct wmDrag), "new drag"); + wmWindowManager *wm = CTX_wm_manager(C); + wmDrag *drag = MEM_callocN(sizeof(struct wmDrag), "new drag"); /* keep track of future multitouch drag too, add a mousepointer id or so */ /* if multiple drags are added, they're drawn as list */ BLI_addtail(&wm->drags, drag); - drag->icon= icon; - drag->type= type; - if (type==WM_DRAG_PATH) + drag->icon = icon; + drag->type = type; + if (type == WM_DRAG_PATH) BLI_strncpy(drag->path, poin, FILE_MAX); else - drag->poin= poin; - drag->value= value; + drag->poin = poin; + drag->value = value; return drag; } void WM_event_drag_image(wmDrag *drag, ImBuf *imb, float scale, int sx, int sy) { - drag->imb= imb; - drag->scale= scale; - drag->sx= sx; - drag->sy= sy; + drag->imb = imb; + drag->scale = scale; + drag->sx = sx; + drag->sy = sy; } static const char *dropbox_active(bContext *C, ListBase *handlers, wmDrag *drag, wmEvent *event) { - wmEventHandler *handler= handlers->first; - for (; handler; handler= handler->next) { + wmEventHandler *handler = handlers->first; + for (; handler; handler = handler->next) { if (handler->dropboxes) { - wmDropBox *drop= handler->dropboxes->first; - for (; drop; drop= drop->next) { + wmDropBox *drop = handler->dropboxes->first; + for (; drop; drop = drop->next) { if (drop->poll(C, drag, event)) return drop->ot->name; } @@ -190,18 +190,18 @@ static const char *dropbox_active(bContext *C, ListBase *handlers, wmDrag *drag, /* return active operator name when mouse is in box */ static const char *wm_dropbox_active(bContext *C, wmDrag *drag, wmEvent *event) { - wmWindow *win= CTX_wm_window(C); - ScrArea *sa= CTX_wm_area(C); - ARegion *ar= CTX_wm_region(C); + wmWindow *win = CTX_wm_window(C); + ScrArea *sa = CTX_wm_area(C); + ARegion *ar = CTX_wm_region(C); const char *name; - name= dropbox_active(C, &win->handlers, drag, event); + name = dropbox_active(C, &win->handlers, drag, event); if (name) return name; - name= dropbox_active(C, &sa->handlers, drag, event); + name = dropbox_active(C, &sa->handlers, drag, event); if (name) return name; - name= dropbox_active(C, &ar->handlers, drag, event); + name = dropbox_active(C, &ar->handlers, drag, event); if (name) return name; return NULL; @@ -210,20 +210,20 @@ static const char *wm_dropbox_active(bContext *C, wmDrag *drag, wmEvent *event) static void wm_drop_operator_options(bContext *C, wmDrag *drag, wmEvent *event) { - wmWindow *win= CTX_wm_window(C); + wmWindow *win = CTX_wm_window(C); /* for multiwin drags, we only do this if mouse inside */ - if (event->x<0 || event->y<0 || event->x>win->sizex || event->y>win->sizey) + if (event->x < 0 || event->y < 0 || event->x > win->sizex || event->y > win->sizey) return; - drag->opname[0]= 0; + drag->opname[0] = 0; /* check buttons (XXX todo rna and value) */ - if ( UI_but_active_drop_name(C) ) { + if (UI_but_active_drop_name(C) ) { strcpy(drag->opname, "Paste name"); } else { - const char *opname= wm_dropbox_active(C, drag, event); + const char *opname = wm_dropbox_active(C, drag, event); if (opname) { BLI_strncpy(drag->opname, opname, FILE_MAX); @@ -238,10 +238,10 @@ static void wm_drop_operator_options(bContext *C, wmDrag *drag, wmEvent *event) /* called in inner handler loop, region context */ void wm_drags_check_ops(bContext *C, wmEvent *event) { - wmWindowManager *wm= CTX_wm_manager(C); + wmWindowManager *wm = CTX_wm_manager(C); wmDrag *drag; - for (drag= wm->drags.first; drag; drag= drag->next) { + for (drag = wm->drags.first; drag; drag = drag->next) { wm_drop_operator_options(C, drag, event); } } @@ -250,7 +250,7 @@ void wm_drags_check_ops(bContext *C, wmEvent *event) static void wm_drop_operator_draw(const char *name, int x, int y) { - int width= UI_GetStringWidth(name); + int width = UI_GetStringWidth(name); glColor4ub(0, 0, 0, 50); @@ -258,16 +258,16 @@ static void wm_drop_operator_draw(const char *name, int x, int y) uiRoundBox(x, y, x + width + 8, y + 15, 4); glColor4ub(255, 255, 255, 255); - UI_DrawString(x+4, y+4, name); + UI_DrawString(x + 4, y + 4, name); } static const char *wm_drag_name(wmDrag *drag) { - switch(drag->type) { + switch (drag->type) { case WM_DRAG_ID: { - ID *id= (ID *)drag->poin; - return id->name+2; + ID *id = (ID *)drag->poin; + return id->name + 2; } case WM_DRAG_PATH: return drag->path; @@ -293,12 +293,12 @@ static void drag_rect_minmax(rcti *rect, int x1, int y1, int x2, int y2) /* if rect set, do not draw */ void wm_drags_draw(bContext *C, wmWindow *win, rcti *rect) { - wmWindowManager *wm= CTX_wm_manager(C); + wmWindowManager *wm = CTX_wm_manager(C); wmDrag *drag; int cursorx, cursory, x, y; - cursorx= win->eventstate->x; - cursory= win->eventstate->y; + cursorx = win->eventstate->x; + cursory = win->eventstate->y; if (rect) { rect->xmin = rect->xmax = cursorx; rect->ymin = rect->ymax = cursory; @@ -306,44 +306,44 @@ void wm_drags_draw(bContext *C, wmWindow *win, rcti *rect) /* XXX todo, multiline drag draws... but maybe not, more types mixed wont work well */ glEnable(GL_BLEND); - for (drag= wm->drags.first; drag; drag= drag->next) { + for (drag = wm->drags.first; drag; drag = drag->next) { /* image or icon */ if (drag->imb) { - x= cursorx - drag->sx/2; - y= cursory - drag->sy/2; + x = cursorx - drag->sx / 2; + y = cursory - drag->sy / 2; if (rect) - drag_rect_minmax(rect, x, y, x+drag->sx, y+drag->sy); + drag_rect_minmax(rect, x, y, x + drag->sx, y + drag->sy); else { - glColor4f(1.0, 1.0, 1.0, 0.65); /* this blends texture */ + glColor4f(1.0, 1.0, 1.0, 0.65); /* this blends texture */ glaDrawPixelsTexScaled(x, y, drag->imb->x, drag->imb->y, GL_UNSIGNED_BYTE, drag->imb->rect, drag->scale, drag->scale); } } else { - x= cursorx - 8; - y= cursory - 2; + x = cursorx - 8; + y = cursory - 2; /* icons assumed to be 16 pixels */ if (rect) - drag_rect_minmax(rect, x, y, x+16, y+16); + drag_rect_minmax(rect, x, y, x + 16, y + 16); else UI_icon_draw_aspect(x, y, drag->icon, 1.0, 0.8); } /* item name */ if (drag->imb) { - x= cursorx - drag->sx/2; - y= cursory - drag->sy/2 - 16; + x = cursorx - drag->sx / 2; + y = cursory - drag->sy / 2 - 16; } else { - x= cursorx + 10; - y= cursory + 1; + x = cursorx + 10; + y = cursory + 1; } if (rect) { - int w= UI_GetStringWidth(wm_drag_name(drag)); - drag_rect_minmax(rect, x, y, x+w, y+16); + int w = UI_GetStringWidth(wm_drag_name(drag)); + drag_rect_minmax(rect, x, y, x + w, y + 16); } else { glColor4ub(255, 255, 255, 255); @@ -353,17 +353,17 @@ void wm_drags_draw(bContext *C, wmWindow *win, rcti *rect) /* operator name with roundbox */ if (drag->opname[0]) { if (drag->imb) { - x= cursorx - drag->sx/2; - y= cursory + drag->sy/2 + 4; + x = cursorx - drag->sx / 2; + y = cursory + drag->sy / 2 + 4; } else { - x= cursorx - 8; - y= cursory + 16; + x = cursorx - 8; + y = cursory + 16; } if (rect) { - int w= UI_GetStringWidth(wm_drag_name(drag)); - drag_rect_minmax(rect, x, y, x+w, y+16); + int w = UI_GetStringWidth(wm_drag_name(drag)); + drag_rect_minmax(rect, x, y, x + w, y + 16); } else wm_drop_operator_draw(drag->opname, x, y); diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c index 588839ad18f..66cadf1e76a 100644 --- a/source/blender/windowmanager/intern/wm_draw.c +++ b/source/blender/windowmanager/intern/wm_draw.c @@ -66,27 +66,27 @@ #include "wm_event_system.h" /* swap */ -#define WIN_NONE_OK 0 +#define WIN_NONE_OK 0 #define WIN_BACK_OK 1 #define WIN_FRONT_OK 2 -#define WIN_BOTH_OK 3 +#define WIN_BOTH_OK 3 /* ******************* drawing, overlays *************** */ static void wm_paintcursor_draw(bContext *C, ARegion *ar) { - wmWindowManager *wm= CTX_wm_manager(C); + wmWindowManager *wm = CTX_wm_manager(C); if (wm->paintcursors.first) { - wmWindow *win= CTX_wm_window(C); - bScreen *screen= win->screen; + wmWindow *win = CTX_wm_window(C); + bScreen *screen = win->screen; wmPaintCursor *pc; if (screen->subwinactive == ar->swinid) { - for (pc= wm->paintcursors.first; pc; pc= pc->next) { + for (pc = wm->paintcursors.first; pc; pc = pc->next) { if (pc->poll == NULL || pc->poll(C)) { - ARegion *ar_other= CTX_wm_region(C); + ARegion *ar_other = CTX_wm_region(C); if (ELEM(win->grabcursor, GHOST_kGrabWrap, GHOST_kGrabHide)) { int x = 0, y = 0; wm_get_cursor_position(win, &x, &y); @@ -112,13 +112,13 @@ static void wm_paintcursor_draw(bContext *C, ARegion *ar) static void wm_area_mark_invalid_backbuf(ScrArea *sa) { if (sa->spacetype == SPACE_VIEW3D) - ((View3D*)sa->spacedata.first)->flag |= V3D_INVALID_BACKBUF; + ((View3D *)sa->spacedata.first)->flag |= V3D_INVALID_BACKBUF; } static int wm_area_test_invalid_backbuf(ScrArea *sa) { if (sa->spacetype == SPACE_VIEW3D) - return (((View3D*)sa->spacedata.first)->flag & V3D_INVALID_BACKBUF); + return (((View3D *)sa->spacedata.first)->flag & V3D_INVALID_BACKBUF); else return 1; } @@ -127,7 +127,7 @@ static void wm_region_test_render_do_draw(ScrArea *sa, ARegion *ar) { if (sa->spacetype == SPACE_VIEW3D) { RegionView3D *rv3d = ar->regiondata; - RenderEngine *engine = (rv3d)? rv3d->render_engine: NULL; + RenderEngine *engine = (rv3d) ? rv3d->render_engine : NULL; if (engine && (engine->flag & RE_ENGINE_DO_DRAW)) { ar->do_draw = 1; @@ -141,15 +141,15 @@ static void wm_region_test_render_do_draw(ScrArea *sa, ARegion *ar) static void wm_method_draw_full(bContext *C, wmWindow *win) { - bScreen *screen= win->screen; + bScreen *screen = win->screen; ScrArea *sa; ARegion *ar; /* draw area regions */ - for (sa= screen->areabase.first; sa; sa= sa->next) { + for (sa = screen->areabase.first; sa; sa = sa->next) { CTX_wm_area_set(C, sa); - for (ar=sa->regionbase.first; ar; ar= ar->next) { + for (ar = sa->regionbase.first; ar; ar = ar->next) { if (ar->swinid) { CTX_wm_region_set(C, ar); ED_region_do_draw(C, ar); @@ -167,7 +167,7 @@ static void wm_method_draw_full(bContext *C, wmWindow *win) ED_area_overdraw(C); /* draw overlapping regions */ - for (ar=screen->regionbase.first; ar; ar= ar->next) { + for (ar = screen->regionbase.first; ar; ar = ar->next) { if (ar->swinid) { CTX_wm_menu_set(C, ar); ED_region_do_draw(C, ar); @@ -191,12 +191,12 @@ static void wm_flush_regions_down(bScreen *screen, rcti *dirty) ScrArea *sa; ARegion *ar; - for (sa= screen->areabase.first; sa; sa= sa->next) { - for (ar= sa->regionbase.first; ar; ar= ar->next) { + for (sa = screen->areabase.first; sa; sa = sa->next) { + for (ar = sa->regionbase.first; ar; ar = ar->next) { if (BLI_isect_rcti(dirty, &ar->winrct, NULL)) { - ar->do_draw= RGN_DRAW; + ar->do_draw = RGN_DRAW; memset(&ar->drawrct, 0, sizeof(ar->drawrct)); - ar->swap= WIN_NONE_OK; + ar->swap = WIN_NONE_OK; } } } @@ -207,50 +207,50 @@ static void wm_flush_regions_up(bScreen *screen, rcti *dirty) { ARegion *ar; - for (ar= screen->regionbase.first; ar; ar= ar->next) { + for (ar = screen->regionbase.first; ar; ar = ar->next) { if (BLI_isect_rcti(dirty, &ar->winrct, NULL)) { - ar->do_draw= RGN_DRAW; + ar->do_draw = RGN_DRAW; memset(&ar->drawrct, 0, sizeof(ar->drawrct)); - ar->swap= WIN_NONE_OK; + ar->swap = WIN_NONE_OK; } } } static void wm_method_draw_overlap_all(bContext *C, wmWindow *win, int exchange) { - wmWindowManager *wm= CTX_wm_manager(C); - bScreen *screen= win->screen; + wmWindowManager *wm = CTX_wm_manager(C); + bScreen *screen = win->screen; ScrArea *sa; ARegion *ar; - static rcti rect= {0, 0, 0, 0}; + static rcti rect = {0, 0, 0, 0}; /* after backbuffer selection draw, we need to redraw */ - for (sa= screen->areabase.first; sa; sa= sa->next) - for (ar= sa->regionbase.first; ar; ar= ar->next) + for (sa = screen->areabase.first; sa; sa = sa->next) + for (ar = sa->regionbase.first; ar; ar = ar->next) if (ar->swinid && !wm_area_test_invalid_backbuf(sa)) ED_region_tag_redraw(ar); /* flush overlapping regions */ if (screen->regionbase.first) { /* flush redraws of area regions up to overlapping regions */ - for (sa= screen->areabase.first; sa; sa= sa->next) - for (ar= sa->regionbase.first; ar; ar= ar->next) + for (sa = screen->areabase.first; sa; sa = sa->next) + for (ar = sa->regionbase.first; ar; ar = ar->next) if (ar->swinid && ar->do_draw) wm_flush_regions_up(screen, &ar->winrct); /* flush between overlapping regions */ - for (ar= screen->regionbase.last; ar; ar= ar->prev) + for (ar = screen->regionbase.last; ar; ar = ar->prev) if (ar->swinid && ar->do_draw) wm_flush_regions_up(screen, &ar->winrct); /* flush redraws of overlapping regions down to area regions */ - for (ar= screen->regionbase.last; ar; ar= ar->prev) + for (ar = screen->regionbase.last; ar; ar = ar->prev) if (ar->swinid && ar->do_draw) wm_flush_regions_down(screen, &ar->winrct); } /* flush drag item */ - if (rect.xmin!=rect.xmax) { + if (rect.xmin != rect.xmax) { wm_flush_regions_down(screen, &rect); rect.xmin = rect.xmax = 0; } @@ -260,10 +260,10 @@ static void wm_method_draw_overlap_all(bContext *C, wmWindow *win, int exchange) } /* draw marked area regions */ - for (sa= screen->areabase.first; sa; sa= sa->next) { + for (sa = screen->areabase.first; sa; sa = sa->next) { CTX_wm_area_set(C, sa); - for (ar=sa->regionbase.first; ar; ar= ar->next) { + for (ar = sa->regionbase.first; ar; ar = ar->next) { if (ar->swinid) { if (ar->do_draw) { CTX_wm_region_set(C, ar); @@ -273,7 +273,7 @@ static void wm_method_draw_overlap_all(bContext *C, wmWindow *win, int exchange) CTX_wm_region_set(C, NULL); if (exchange) - ar->swap= WIN_FRONT_OK; + ar->swap = WIN_FRONT_OK; } else if (exchange) { if (ar->swap == WIN_FRONT_OK) { @@ -283,12 +283,12 @@ static void wm_method_draw_overlap_all(bContext *C, wmWindow *win, int exchange) ED_area_overdraw_flush(sa, ar); CTX_wm_region_set(C, NULL); - ar->swap= WIN_BOTH_OK; + ar->swap = WIN_BOTH_OK; } else if (ar->swap == WIN_BACK_OK) - ar->swap= WIN_FRONT_OK; + ar->swap = WIN_FRONT_OK; else if (ar->swap == WIN_BOTH_OK) - ar->swap= WIN_BOTH_OK; + ar->swap = WIN_BOTH_OK; } } } @@ -302,23 +302,23 @@ static void wm_method_draw_overlap_all(bContext *C, wmWindow *win, int exchange) ED_screen_draw(win); if (exchange) - screen->swap= WIN_FRONT_OK; + screen->swap = WIN_FRONT_OK; } else if (exchange) { - if (screen->swap==WIN_FRONT_OK) { + if (screen->swap == WIN_FRONT_OK) { ED_screen_draw(win); - screen->swap= WIN_BOTH_OK; + screen->swap = WIN_BOTH_OK; } - else if (screen->swap==WIN_BACK_OK) - screen->swap= WIN_FRONT_OK; - else if (screen->swap==WIN_BOTH_OK) - screen->swap= WIN_BOTH_OK; + else if (screen->swap == WIN_BACK_OK) + screen->swap = WIN_FRONT_OK; + else if (screen->swap == WIN_BOTH_OK) + screen->swap = WIN_BOTH_OK; } ED_area_overdraw(C); /* draw marked overlapping regions */ - for (ar=screen->regionbase.first; ar; ar= ar->next) { + for (ar = screen->regionbase.first; ar; ar = ar->next) { if (ar->swinid && ar->do_draw) { CTX_wm_menu_set(C, ar); ED_region_do_draw(C, ar); @@ -357,7 +357,7 @@ static void wm_method_draw_damage(bContext *C, wmWindow *win) #define MAX_N_TEX 3 typedef struct wmDrawTriple { - GLuint bind[MAX_N_TEX*MAX_N_TEX]; + GLuint bind[MAX_N_TEX * MAX_N_TEX]; int x[MAX_N_TEX], y[MAX_N_TEX]; int nx, ny; GLenum target; @@ -369,46 +369,46 @@ static void split_width(int x, int n, int *splitx, int *nx) /* if already power of two just use it */ if (is_power_of_2_i(x)) { - splitx[0]= x; + splitx[0] = x; (*nx)++; return; } if (n == 1) { /* last part, we have to go larger */ - splitx[0]= power_of_2_max_i(x); + splitx[0] = power_of_2_max_i(x); (*nx)++; } else { /* two or more parts to go, use smaller part */ - splitx[0]= power_of_2_min_i(x); - newnx= ++(*nx); - split_width(x-splitx[0], n-1, splitx+1, &newnx); + splitx[0] = power_of_2_min_i(x); + newnx = ++(*nx); + split_width(x - splitx[0], n - 1, splitx + 1, &newnx); - for (waste=0, a=0; a= power_of_2_max_i(x)) { - splitx[0]= power_of_2_max_i(x); - memset(splitx+1, 0, sizeof(int)*(n-1)); + splitx[0] = power_of_2_max_i(x); + memset(splitx + 1, 0, sizeof(int) * (n - 1)); } else - *nx= newnx; + *nx = newnx; } } static void wm_draw_triple_free(wmWindow *win) { if (win->drawdata) { - wmDrawTriple *triple= win->drawdata; + wmDrawTriple *triple = win->drawdata; - glDeleteTextures(triple->nx*triple->ny, triple->bind); + glDeleteTextures(triple->nx * triple->ny, triple->bind); MEM_freeN(triple); - win->drawdata= NULL; + win->drawdata = NULL; } } @@ -416,7 +416,7 @@ static void wm_draw_triple_fail(bContext *C, wmWindow *win) { wm_draw_window_clear(win); - win->drawfail= 1; + win->drawfail = 1; wm_method_draw_overlap_all(C, win, 0); } @@ -427,29 +427,29 @@ static int wm_triple_gen_textures(wmWindow *win, wmDrawTriple *triple) /* compute texture sizes */ if (GLEW_ARB_texture_rectangle || GLEW_NV_texture_rectangle || GLEW_EXT_texture_rectangle) { - triple->target= GL_TEXTURE_RECTANGLE_ARB; - triple->nx= 1; - triple->ny= 1; - triple->x[0]= win->sizex; - triple->y[0]= win->sizey; + triple->target = GL_TEXTURE_RECTANGLE_ARB; + triple->nx = 1; + triple->ny = 1; + triple->x[0] = win->sizex; + triple->y[0] = win->sizey; } else if (GPU_non_power_of_two_support()) { - triple->target= GL_TEXTURE_2D; - triple->nx= 1; - triple->ny= 1; - triple->x[0]= win->sizex; - triple->y[0]= win->sizey; + triple->target = GL_TEXTURE_2D; + triple->nx = 1; + triple->ny = 1; + triple->x[0] = win->sizex; + triple->y[0] = win->sizey; } else { - triple->target= GL_TEXTURE_2D; - triple->nx= 0; - triple->ny= 0; + triple->target = GL_TEXTURE_2D; + triple->nx = 0; + triple->ny = 0; split_width(win->sizex, MAX_N_TEX, triple->x, &triple->nx); split_width(win->sizey, MAX_N_TEX, triple->y, &triple->ny); } /* generate texture names */ - glGenTextures(triple->nx*triple->ny, triple->bind); + glGenTextures(triple->nx * triple->ny, triple->bind); if (!triple->bind[0]) { /* not the typical failure case but we handle it anyway */ @@ -457,8 +457,8 @@ static int wm_triple_gen_textures(wmWindow *win, wmDrawTriple *triple) return 0; } - for (y=0; yny; y++) { - for (x=0; xnx; x++) { + for (y = 0; y < triple->ny; y++) { + for (x = 0; x < triple->nx; x++) { /* proxy texture is only guaranteed to test for the cases that * there is only one texture in use, which may not be the case */ glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxsize); @@ -471,7 +471,7 @@ static int wm_triple_gen_textures(wmWindow *win, wmDrawTriple *triple) } /* setup actual texture */ - glBindTexture(triple->target, triple->bind[x + y*triple->nx]); + glBindTexture(triple->target, triple->bind[x + y * triple->nx]); glTexImage2D(triple->target, 0, GL_RGB8, triple->x[x], triple->y[y], 0, GL_RGB, GL_UNSIGNED_BYTE, NULL); glTexParameteri(triple->target, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(triple->target, GL_TEXTURE_MAG_FILTER, GL_NEAREST); @@ -497,16 +497,16 @@ static void wm_triple_draw_textures(wmWindow *win, wmDrawTriple *triple) glEnable(triple->target); - for (y=0, offy=0; yny; offy+=triple->y[y], y++) { - for (x=0, offx=0; xnx; offx+=triple->x[x], x++) { - sizex= (x == triple->nx-1)? win->sizex-offx: triple->x[x]; - sizey= (y == triple->ny-1)? win->sizey-offy: triple->y[y]; + for (y = 0, offy = 0; y < triple->ny; offy += triple->y[y], y++) { + for (x = 0, offx = 0; x < triple->nx; offx += triple->x[x], x++) { + sizex = (x == triple->nx - 1) ? win->sizex - offx : triple->x[x]; + sizey = (y == triple->ny - 1) ? win->sizey - offy : triple->y[y]; /* wmOrtho for the screen has this same offset */ - ratiox= sizex; - ratioy= sizey; - halfx= 0.375f; - halfy= 0.375f; + ratiox = sizex; + ratioy = sizey; + halfx = 0.375f; + halfy = 0.375f; /* texture rectangle has unnormalized coordinates */ if (triple->target == GL_TEXTURE_2D) { @@ -516,21 +516,21 @@ static void wm_triple_draw_textures(wmWindow *win, wmDrawTriple *triple) halfy /= triple->y[y]; } - glBindTexture(triple->target, triple->bind[x + y*triple->nx]); + glBindTexture(triple->target, triple->bind[x + y * triple->nx]); glColor3f(1.0f, 1.0f, 1.0f); glBegin(GL_QUADS); - glTexCoord2f(halfx, halfy); - glVertex2f(offx, offy); + glTexCoord2f(halfx, halfy); + glVertex2f(offx, offy); - glTexCoord2f(ratiox+halfx, halfy); - glVertex2f(offx+sizex, offy); + glTexCoord2f(ratiox + halfx, halfy); + glVertex2f(offx + sizex, offy); - glTexCoord2f(ratiox+halfx, ratioy+halfy); - glVertex2f(offx+sizex, offy+sizey); + glTexCoord2f(ratiox + halfx, ratioy + halfy); + glVertex2f(offx + sizex, offy + sizey); - glTexCoord2f(halfx, ratioy+halfy); - glVertex2f(offx, offy+sizey); + glTexCoord2f(halfx, ratioy + halfy); + glVertex2f(offx, offy + sizey); glEnd(); } } @@ -543,12 +543,12 @@ static void wm_triple_copy_textures(wmWindow *win, wmDrawTriple *triple) { int x, y, sizex, sizey, offx, offy; - for (y=0, offy=0; yny; offy+=triple->y[y], y++) { - for (x=0, offx=0; xnx; offx+=triple->x[x], x++) { - sizex= (x == triple->nx-1)? win->sizex-offx: triple->x[x]; - sizey= (y == triple->ny-1)? win->sizey-offy: triple->y[y]; + for (y = 0, offy = 0; y < triple->ny; offy += triple->y[y], y++) { + for (x = 0, offx = 0; x < triple->nx; offx += triple->x[x], x++) { + sizex = (x == triple->nx - 1) ? win->sizex - offx : triple->x[x]; + sizey = (y == triple->ny - 1) ? win->sizey - offy : triple->y[y]; - glBindTexture(triple->target, triple->bind[x + y*triple->nx]); + glBindTexture(triple->target, triple->bind[x + y * triple->nx]); glCopyTexSubImage2D(triple->target, 0, 0, 0, offx, offy, sizex, sizey); } } @@ -558,23 +558,23 @@ static void wm_triple_copy_textures(wmWindow *win, wmDrawTriple *triple) static void wm_method_draw_triple(bContext *C, wmWindow *win) { - wmWindowManager *wm= CTX_wm_manager(C); + wmWindowManager *wm = CTX_wm_manager(C); wmDrawTriple *triple; - bScreen *screen= win->screen; + bScreen *screen = win->screen; ScrArea *sa; ARegion *ar; - int copytex= 0, paintcursor= 1; + int copytex = 0, paintcursor = 1; if (win->drawdata) { glClearColor(0, 0, 0, 0); - glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); wmSubWindowSet(win, screen->mainwin); wm_triple_draw_textures(win, win->drawdata); } else { - win->drawdata= MEM_callocN(sizeof(wmDrawTriple), "wmDrawTriple"); + win->drawdata = MEM_callocN(sizeof(wmDrawTriple), "wmDrawTriple"); if (!wm_triple_gen_textures(win, win->drawdata)) { wm_draw_triple_fail(C, win); @@ -582,19 +582,19 @@ static void wm_method_draw_triple(bContext *C, wmWindow *win) } } - triple= win->drawdata; + triple = win->drawdata; /* draw marked area regions */ - for (sa= screen->areabase.first; sa; sa= sa->next) { + for (sa = screen->areabase.first; sa; sa = sa->next) { CTX_wm_area_set(C, sa); - for (ar=sa->regionbase.first; ar; ar= ar->next) { + for (ar = sa->regionbase.first; ar; ar = ar->next) { if (ar->swinid && ar->do_draw) { CTX_wm_region_set(C, ar); ED_region_do_draw(C, ar); ED_area_overdraw_flush(sa, ar); CTX_wm_region_set(C, NULL); - copytex= 1; + copytex = 1; } } @@ -613,13 +613,13 @@ static void wm_method_draw_triple(bContext *C, wmWindow *win) ED_screen_draw(win); /* draw overlapping regions */ - for (ar=screen->regionbase.first; ar; ar= ar->next) { + for (ar = screen->regionbase.first; ar; ar = ar->next) { if (ar->swinid) { CTX_wm_menu_set(C, ar); ED_region_do_draw(C, ar); CTX_wm_menu_set(C, NULL); /* when a menu is being drawn, don't do the paint cursors */ - paintcursor= 0; + paintcursor = 0; } } @@ -628,8 +628,8 @@ static void wm_method_draw_triple(bContext *C, wmWindow *win) wm_gesture_draw(win); if (paintcursor && wm->paintcursors.first) { - for (sa= screen->areabase.first; sa; sa= sa->next) { - for (ar=sa->regionbase.first; ar; ar= ar->next) { + for (sa = screen->areabase.first; sa; sa = sa->next) { + for (ar = sa->regionbase.first; ar; ar = ar->next) { if (ar->swinid == screen->subwinactive) { CTX_wm_area_set(C, sa); CTX_wm_region_set(C, ar); @@ -661,19 +661,19 @@ static int wm_draw_update_test_window(wmWindow *win) { ScrArea *sa; ARegion *ar; - int do_draw= 0; + int do_draw = 0; - for (ar= win->screen->regionbase.first; ar; ar= ar->next) { + for (ar = win->screen->regionbase.first; ar; ar = ar->next) { if (ar->do_draw_overlay) { wm_tag_redraw_overlay(win, ar); - ar->do_draw_overlay= 0; + ar->do_draw_overlay = 0; } if (ar->swinid && ar->do_draw) - do_draw= 1; + do_draw = 1; } - for (sa= win->screen->areabase.first; sa; sa= sa->next) { - for (ar=sa->regionbase.first; ar; ar= ar->next) { + for (sa = win->screen->areabase.first; sa; sa = sa->next) { + for (ar = sa->regionbase.first; ar; ar = ar->next) { wm_region_test_render_do_draw(sa, ar); if (ar->swinid && ar->do_draw) @@ -737,22 +737,22 @@ void wm_tag_redraw_overlay(wmWindow *win, ARegion *ar) if (ar && win) { if (wm_automatic_draw_method(win) != USER_DRAW_TRIPLE) ED_region_tag_redraw(ar); - win->screen->do_draw_paintcursor= 1; + win->screen->do_draw_paintcursor = 1; } } void wm_draw_update(bContext *C) { - wmWindowManager *wm= CTX_wm_manager(C); + wmWindowManager *wm = CTX_wm_manager(C); wmWindow *win; int drawmethod; GPU_free_unused_buffers(); - for (win= wm->windows.first; win; win= win->next) { + for (win = wm->windows.first; win; win = win->next) { if (win->drawmethod != U.wmdrawmethod) { wm_draw_window_clear(win); - win->drawmethod= U.wmdrawmethod; + win->drawmethod = U.wmdrawmethod; } if (wm_draw_update_test_window(win)) { @@ -765,7 +765,7 @@ void wm_draw_update(bContext *C) if (win->screen->do_refresh) ED_screen_refresh(wm, win); - drawmethod= wm_automatic_draw_method(win); + drawmethod = wm_automatic_draw_method(win); if (win->drawfail) wm_method_draw_overlap_all(C, win, 0); @@ -778,9 +778,9 @@ void wm_draw_update(bContext *C) else // if (drawmethod == USER_DRAW_TRIPLE) wm_method_draw_triple(C, win); - win->screen->do_draw_gesture= 0; - win->screen->do_draw_paintcursor= 0; - win->screen->do_draw_drag= 0; + win->screen->do_draw_gesture = 0; + win->screen->do_draw_paintcursor = 0; + win->screen->do_draw_drag = 0; wm_window_swap_buffers(win); @@ -791,39 +791,39 @@ void wm_draw_update(bContext *C) void wm_draw_window_clear(wmWindow *win) { - bScreen *screen= win->screen; + bScreen *screen = win->screen; ScrArea *sa; ARegion *ar; - int drawmethod= wm_automatic_draw_method(win); + int drawmethod = wm_automatic_draw_method(win); if (drawmethod == USER_DRAW_TRIPLE) wm_draw_triple_free(win); /* clear screen swap flags */ if (screen) { - for (sa= screen->areabase.first; sa; sa= sa->next) - for (ar=sa->regionbase.first; ar; ar= ar->next) - ar->swap= WIN_NONE_OK; + for (sa = screen->areabase.first; sa; sa = sa->next) + for (ar = sa->regionbase.first; ar; ar = ar->next) + ar->swap = WIN_NONE_OK; - screen->swap= WIN_NONE_OK; + screen->swap = WIN_NONE_OK; } } void wm_draw_region_clear(wmWindow *win, ARegion *ar) { - int drawmethod= wm_automatic_draw_method(win); + int drawmethod = wm_automatic_draw_method(win); if (ELEM(drawmethod, USER_DRAW_OVERLAP, USER_DRAW_OVERLAP_FLIP)) wm_flush_regions_down(win->screen, &ar->winrct); - win->screen->do_draw= 1; + win->screen->do_draw = 1; } void WM_redraw_windows(bContext *C) { - wmWindow *win_prev= CTX_wm_window(C); - ScrArea *area_prev= CTX_wm_area(C); - ARegion *ar_prev= CTX_wm_region(C); + wmWindow *win_prev = CTX_wm_window(C); + ScrArea *area_prev = CTX_wm_area(C); + ARegion *ar_prev = CTX_wm_region(C); wm_draw_update(C); diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index fb5a531cc38..2327ca46862 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -89,9 +89,9 @@ static int wm_operator_call_internal(bContext *C, wmOperatorType *ot, PointerRNA void wm_event_add(wmWindow *win, wmEvent *event_to_add) { - wmEvent *event= MEM_callocN(sizeof(wmEvent), "wmEvent"); + wmEvent *event = MEM_callocN(sizeof(wmEvent), "wmEvent"); - *event= *event_to_add; + *event = *event_to_add; BLI_addtail(&win->queue, event); } @@ -100,7 +100,7 @@ void wm_event_free(wmEvent *event) if (event->customdata) { if (event->customdatafree) { /* note: pointer to listbase struct elsewhere */ - if (event->custom==EVT_DATA_LISTBASE) + if (event->custom == EVT_DATA_LISTBASE) BLI_freelistN(event->customdata); else MEM_freeN(event->customdata); @@ -113,7 +113,7 @@ void wm_event_free_all(wmWindow *win) { wmEvent *event; - while ((event= win->queue.first)) { + while ((event = win->queue.first)) { BLI_remlink(&win->queue, event); wm_event_free(event); } @@ -125,8 +125,8 @@ static int wm_test_duplicate_notifier(wmWindowManager *wm, unsigned int type, vo { wmNotifier *note; - for (note=wm->queue.first; note; note=note->next) - if ((note->category|note->data|note->subtype|note->action) == type && note->reference == reference) + for (note = wm->queue.first; note; note = note->next) + if ((note->category | note->data | note->subtype | note->action) == type && note->reference == reference) return 1; return 0; @@ -135,47 +135,47 @@ static int wm_test_duplicate_notifier(wmWindowManager *wm, unsigned int type, vo /* XXX: in future, which notifiers to send to other windows? */ void WM_event_add_notifier(const bContext *C, unsigned int type, void *reference) { - wmNotifier *note= MEM_callocN(sizeof(wmNotifier), "notifier"); + wmNotifier *note = MEM_callocN(sizeof(wmNotifier), "notifier"); - note->wm= CTX_wm_manager(C); + note->wm = CTX_wm_manager(C); BLI_addtail(¬e->wm->queue, note); - note->window= CTX_wm_window(C); + note->window = CTX_wm_window(C); if (CTX_wm_region(C)) - note->swinid= CTX_wm_region(C)->swinid; + note->swinid = CTX_wm_region(C)->swinid; - note->category= type & NOTE_CATEGORY; - note->data= type & NOTE_DATA; - note->subtype= type & NOTE_SUBTYPE; - note->action= type & NOTE_ACTION; + note->category = type & NOTE_CATEGORY; + note->data = type & NOTE_DATA; + note->subtype = type & NOTE_SUBTYPE; + note->action = type & NOTE_ACTION; - note->reference= reference; + note->reference = reference; } void WM_main_add_notifier(unsigned int type, void *reference) { - Main *bmain= G.main; - wmWindowManager *wm= bmain->wm.first; + Main *bmain = G.main; + wmWindowManager *wm = bmain->wm.first; if (wm && !wm_test_duplicate_notifier(wm, type, reference)) { - wmNotifier *note= MEM_callocN(sizeof(wmNotifier), "notifier"); + wmNotifier *note = MEM_callocN(sizeof(wmNotifier), "notifier"); - note->wm= wm; + note->wm = wm; BLI_addtail(¬e->wm->queue, note); - note->category= type & NOTE_CATEGORY; - note->data= type & NOTE_DATA; - note->subtype= type & NOTE_SUBTYPE; - note->action= type & NOTE_ACTION; + note->category = type & NOTE_CATEGORY; + note->data = type & NOTE_DATA; + note->subtype = type & NOTE_SUBTYPE; + note->action = type & NOTE_ACTION; - note->reference= reference; + note->reference = reference; } } static wmNotifier *wm_notifier_next(wmWindowManager *wm) { - wmNotifier *note= wm->queue.first; + wmNotifier *note = wm->queue.first; if (note) BLI_remlink(&wm->queue, note); return note; @@ -184,40 +184,40 @@ static wmNotifier *wm_notifier_next(wmWindowManager *wm) /* called in mainloop */ void wm_event_do_notifiers(bContext *C) { - wmWindowManager *wm= CTX_wm_manager(C); + wmWindowManager *wm = CTX_wm_manager(C); wmNotifier *note, *next; wmWindow *win; - uint64_t win_combine_v3d_datamask= 0; + uint64_t win_combine_v3d_datamask = 0; - if (wm==NULL) + if (wm == NULL) return; /* cache & catch WM level notifiers, such as frame change, scene/screen set */ - for (win= wm->windows.first; win; win= win->next) { - int do_anim= 0; + for (win = wm->windows.first; win; win = win->next) { + int do_anim = 0; CTX_wm_window_set(C, win); - for (note= wm->queue.first; note; note= next) { - next= note->next; + for (note = wm->queue.first; note; note = next) { + next = note->next; - if (note->category==NC_WM) { - if ( ELEM(note->data, ND_FILEREAD, ND_FILESAVE)) { - wm->file_saved= 1; + if (note->category == NC_WM) { + if (ELEM(note->data, ND_FILEREAD, ND_FILESAVE)) { + wm->file_saved = 1; wm_window_title(wm, win); } - else if (note->data==ND_DATACHANGED) + else if (note->data == ND_DATACHANGED) wm_window_title(wm, win); } - if (note->window==win) { - if (note->category==NC_SCREEN) { - if (note->data==ND_SCREENBROWSE) { - ED_screen_set(C, note->reference); // XXX hrms, think this over! + if (note->window == win) { + if (note->category == NC_SCREEN) { + if (note->data == ND_SCREENBROWSE) { + ED_screen_set(C, note->reference); // XXX hrms, think this over! if (G.f & G_DEBUG) printf("screen set %p\n", note->reference); } - else if (note->data==ND_SCREENDELETE) { - ED_screen_delete(C, note->reference); // XXX hrms, think this over! + else if (note->data == ND_SCREENDELETE) { + ED_screen_delete(C, note->reference); // XXX hrms, think this over! if (G.f & G_DEBUG) printf("screen delete %p\n", note->reference); } @@ -225,16 +225,16 @@ void wm_event_do_notifiers(bContext *C) } if (note->window == win || - (note->window == NULL && (note->reference == NULL || note->reference == CTX_data_scene(C)))) + (note->window == NULL && (note->reference == NULL || note->reference == CTX_data_scene(C)))) { - if (note->category==NC_SCENE) { - if (note->data==ND_FRAME) - do_anim= 1; + if (note->category == NC_SCENE) { + if (note->data == ND_FRAME) + do_anim = 1; } } if (ELEM5(note->category, NC_SCENE, NC_OBJECT, NC_GEOM, NC_SCENE, NC_WM)) { ED_info_stats_clear(CTX_data_scene(C)); - WM_event_add_notifier(C, NC_SPACE|ND_SPACE_INFO, NULL); + WM_event_add_notifier(C, NC_SPACE | ND_SPACE_INFO, NULL); } } if (do_anim) { @@ -251,12 +251,12 @@ void wm_event_do_notifiers(bContext *C) } /* the notifiers are sent without context, to keep it clean */ - while ( (note=wm_notifier_next(wm)) ) { - for (win= wm->windows.first; win; win= win->next) { + while ( (note = wm_notifier_next(wm)) ) { + for (win = wm->windows.first; win; win = win->next) { /* filter out notifiers */ - if (note->category==NC_SCREEN && note->reference && note->reference!=win->screen); - else if (note->category==NC_SCENE && note->reference && note->reference!=win->screen->scene); + if (note->category == NC_SCREEN && note->reference && note->reference != win->screen) ; + else if (note->category == NC_SCENE && note->reference && note->reference != win->screen->scene) ; else { ScrArea *sa; ARegion *ar; @@ -267,13 +267,13 @@ void wm_event_do_notifiers(bContext *C) /* printf("notifier win %d screen %s cat %x\n", win->winid, win->screen->id.name+2, note->category); */ ED_screen_do_listen(C, note); - for (ar=win->screen->regionbase.first; ar; ar= ar->next) { + for (ar = win->screen->regionbase.first; ar; ar = ar->next) { ED_region_do_listen(ar, note); } - for (sa= win->screen->areabase.first; sa; sa= sa->next) { + for (sa = win->screen->areabase.first; sa; sa = sa->next) { ED_area_do_listen(sa, note); - for (ar=sa->regionbase.first; ar; ar= ar->next) { + for (ar = sa->regionbase.first; ar; ar = ar->next) { ED_region_do_listen(ar, note); } } @@ -284,16 +284,16 @@ void wm_event_do_notifiers(bContext *C) } /* combine datamasks so 1 win doesn't disable UV's in another [#26448] */ - for (win= wm->windows.first; win; win= win->next) { + for (win = wm->windows.first; win; win = win->next) { win_combine_v3d_datamask |= ED_view3d_screen_datamask(win->screen); } /* cached: editor refresh callbacks now, they get context */ - for (win= wm->windows.first; win; win= win->next) { + for (win = wm->windows.first; win; win = win->next) { ScrArea *sa; CTX_wm_window_set(C, win); - for (sa= win->screen->areabase.first; sa; sa= sa->next) { + for (sa = win->screen->areabase.first; sa; sa = sa->next) { if (sa->do_refresh) { CTX_wm_area_set(C, sa); ED_area_do_refresh(C, sa); @@ -306,7 +306,7 @@ void wm_event_do_notifiers(bContext *C) Main *bmain = CTX_data_main(C); /* copied to set's in scene_update_tagged_recursive() */ - win->screen->scene->customdata_mask= win_combine_v3d_datamask; + win->screen->scene->customdata_mask = win_combine_v3d_datamask; /* XXX, hack so operators can enforce datamasks [#26482], gl render */ win->screen->scene->customdata_mask |= win->screen->scene->customdata_mask_modal; @@ -328,20 +328,20 @@ static int wm_event_always_pass(wmEvent *event) static int wm_handler_ui_call(bContext *C, wmEventHandler *handler, wmEvent *event, int always_pass) { - ScrArea *area= CTX_wm_area(C); - ARegion *region= CTX_wm_region(C); - ARegion *menu= CTX_wm_menu(C); - static int do_wheel_ui= 1; - int is_wheel= ELEM(event->type, WHEELUPMOUSE, WHEELDOWNMOUSE); + ScrArea *area = CTX_wm_area(C); + ARegion *region = CTX_wm_region(C); + ARegion *menu = CTX_wm_menu(C); + static int do_wheel_ui = 1; + int is_wheel = ELEM(event->type, WHEELUPMOUSE, WHEELDOWNMOUSE); int retval; /* UI is quite aggressive with swallowing events, like scrollwheel */ /* I realize this is not extremely nice code... when UI gets keymaps it can be maybe smarter */ - if (do_wheel_ui==0) { + if (do_wheel_ui == 0) { if (is_wheel) return WM_HANDLER_CONTINUE; - else if (wm_event_always_pass(event)==0) - do_wheel_ui= 1; + else if (wm_event_always_pass(event) == 0) + do_wheel_ui = 1; } /* we set context to where ui handler came from */ @@ -349,7 +349,7 @@ static int wm_handler_ui_call(bContext *C, wmEventHandler *handler, wmEvent *eve if (handler->ui_region) CTX_wm_region_set(C, handler->ui_region); if (handler->ui_menu) CTX_wm_menu_set(C, handler->ui_menu); - retval= handler->ui_handle(C, event, handler->ui_userdata); + retval = handler->ui_handle(C, event, handler->ui_userdata); /* putting back screen context */ if ((retval != WM_UI_HANDLER_BREAK) || always_pass) { @@ -369,26 +369,26 @@ static int wm_handler_ui_call(bContext *C, wmEventHandler *handler, wmEvent *eve /* event not handled in UI, if wheel then we temporarily disable it */ if (is_wheel) - do_wheel_ui= 0; + do_wheel_ui = 0; return WM_HANDLER_CONTINUE; } static void wm_handler_ui_cancel(bContext *C) { - wmWindow *win= CTX_wm_window(C); - ARegion *ar= CTX_wm_region(C); + wmWindow *win = CTX_wm_window(C); + ARegion *ar = CTX_wm_region(C); wmEventHandler *handler, *nexthandler; if (!ar) return; - for (handler= ar->handlers.first; handler; handler= nexthandler) { - nexthandler= handler->next; + for (handler = ar->handlers.first; handler; handler = nexthandler) { + nexthandler = handler->next; if (handler->ui_handle) { - wmEvent event= *(win->eventstate); - event.type= EVT_BUT_CANCEL; + wmEvent event = *(win->eventstate); + event.type = EVT_BUT_CANCEL; handler->ui_handle(C, &event, handler->ui_userdata); } } @@ -400,10 +400,10 @@ int WM_operator_poll(bContext *C, wmOperatorType *ot) { wmOperatorTypeMacro *otmacro; - for (otmacro= ot->macro.first; otmacro; otmacro= otmacro->next) { - wmOperatorType *ot_macro= WM_operatortype_find(otmacro->idname, 0); + for (otmacro = ot->macro.first; otmacro; otmacro = otmacro->next) { + wmOperatorType *ot_macro = WM_operatortype_find(otmacro->idname, 0); - if (0==WM_operator_poll(C, ot_macro)) + if (0 == WM_operator_poll(C, ot_macro)) return 0; } @@ -436,9 +436,9 @@ static void wm_operator_print(bContext *C, wmOperator *op) void WM_event_print(wmEvent *event) { if (event) { - const char *unknown= "UNKNOWN"; - const char *type_id= unknown; - const char *val_id= unknown; + const char *unknown = "UNKNOWN"; + const char *type_id = unknown; + const char *val_id = unknown; RNA_enum_identifier(event_type_items, event->type, &type_id); RNA_enum_identifier(event_value_items, event->val, &val_id); @@ -466,11 +466,11 @@ static void wm_operator_reports(bContext *C, wmOperator *op, int retval, int cal if (caller_owns_reports == FALSE) { /* popup */ if (op->reports->list.first) { /* FIXME, temp setting window, see other call to uiPupMenuReports for why */ - wmWindow *win_prev= CTX_wm_window(C); - ScrArea *area_prev= CTX_wm_area(C); - ARegion *ar_prev= CTX_wm_region(C); + wmWindow *win_prev = CTX_wm_window(C); + ScrArea *area_prev = CTX_wm_area(C); + ARegion *ar_prev = CTX_wm_region(C); - if (win_prev==NULL) + if (win_prev == NULL) CTX_wm_window_set(C, CTX_wm_manager(C)->windows.first); uiPupMenuReports(C, op->reports); @@ -505,7 +505,7 @@ static void wm_operator_reports(bContext *C, wmOperator *op, int retval, int cal if (op->reports->list.first && (op->reports->flag & RPT_OP_HOLD) == 0) { wmWindowManager *wm = CTX_wm_manager(C); - ReportList *wm_reports= CTX_wm_reports(C); + ReportList *wm_reports = CTX_wm_reports(C); ReportTimerInfo *rti; /* add reports to the global list, otherwise they are not seen */ @@ -515,7 +515,7 @@ static void wm_operator_reports(bContext *C, wmOperator *op, int retval, int cal WM_event_remove_timer(wm, NULL, wm_reports->reporttimer); /* Records time since last report was added */ - wm_reports->reporttimer= WM_event_add_timer(wm, CTX_wm_window(C), TIMERREPORT, 0.05); + wm_reports->reporttimer = WM_event_add_timer(wm, CTX_wm_window(C), TIMERREPORT, 0.05); rti = MEM_callocN(sizeof(ReportTimerInfo), "ReportTimerInfo"); wm_reports->reporttimer->customdata = rti; @@ -532,9 +532,9 @@ static int wm_operator_register_check(wmWindowManager *wm, wmOperatorType *ot) static void wm_operator_finished(bContext *C, wmOperator *op, int repeat) { - wmWindowManager *wm= CTX_wm_manager(C); + wmWindowManager *wm = CTX_wm_manager(C); - op->customdata= NULL; + op->customdata = NULL; /* we don't want to do undo pushes for operators that are being * called from operators that already do an undo push. usually @@ -543,7 +543,7 @@ static void wm_operator_finished(bContext *C, wmOperator *op, int repeat) if (op->type->flag & OPTYPE_UNDO) ED_undo_push_op(C, op); - if (repeat==0) { + if (repeat == 0) { if (G.f & G_DEBUG) { char *buf = WM_operator_pystring(C, op->type, op->ptr, 1); BKE_report(CTX_wm_reports(C), RPT_OPERATOR, buf); @@ -560,29 +560,29 @@ static void wm_operator_finished(bContext *C, wmOperator *op, int repeat) /* if repeat is true, it doesn't register again, nor does it free */ static int wm_operator_exec(bContext *C, wmOperator *op, int repeat) { - wmWindowManager *wm= CTX_wm_manager(C); - int retval= OPERATOR_CANCELLED; + wmWindowManager *wm = CTX_wm_manager(C); + int retval = OPERATOR_CANCELLED; CTX_wm_operator_poll_msg_set(C, NULL); - if (op==NULL || op->type==NULL) + if (op == NULL || op->type == NULL) return retval; - if (0==WM_operator_poll(C, op->type)) + if (0 == WM_operator_poll(C, op->type)) return retval; if (op->type->exec) { if (op->type->flag & OPTYPE_UNDO) wm->op_undo_depth++; - retval= op->type->exec(C, op); + retval = op->type->exec(C, op); OPERATOR_RETVAL_CHECK(retval); if (op->type->flag & OPTYPE_UNDO && CTX_wm_manager(C) == wm) wm->op_undo_depth--; } - if (retval & (OPERATOR_FINISHED|OPERATOR_CANCELLED) && repeat == 0) + if (retval & (OPERATOR_FINISHED | OPERATOR_CANCELLED) && repeat == 0) wm_operator_reports(C, op, retval, FALSE); if (retval & OPERATOR_FINISHED) { @@ -593,7 +593,7 @@ static int wm_operator_exec(bContext *C, wmOperator *op, int repeat) } wm_operator_finished(C, op, repeat); } - else if (repeat==0) { + else if (repeat == 0) { WM_operator_free(op); } @@ -604,12 +604,12 @@ static int wm_operator_exec(bContext *C, wmOperator *op, int repeat) /* simply calls exec with basic checks */ static int wm_operator_exec_notest(bContext *C, wmOperator *op) { - int retval= OPERATOR_CANCELLED; + int retval = OPERATOR_CANCELLED; - if (op==NULL || op->type==NULL || op->type->exec==NULL) + if (op == NULL || op->type == NULL || op->type->exec == NULL) return retval; - retval= op->type->exec(C, op); + retval = op->type->exec(C, op); OPERATOR_RETVAL_CHECK(retval); return retval; @@ -648,40 +648,40 @@ int WM_operator_repeat_check(const bContext *UNUSED(C), wmOperator *op) static wmOperator *wm_operator_create(wmWindowManager *wm, wmOperatorType *ot, PointerRNA *properties, ReportList *reports) { /* XXX operatortype names are static still. for debug */ - wmOperator *op= MEM_callocN(sizeof(wmOperator), ot->idname); + wmOperator *op = MEM_callocN(sizeof(wmOperator), ot->idname); /* XXX adding new operator could be function, only happens here now */ - op->type= ot; + op->type = ot; BLI_strncpy(op->idname, ot->idname, OP_MAX_TYPENAME); /* initialize properties, either copy or create */ - op->ptr= MEM_callocN(sizeof(PointerRNA), "wmOperatorPtrRNA"); + op->ptr = MEM_callocN(sizeof(PointerRNA), "wmOperatorPtrRNA"); if (properties && properties->data) { - op->properties= IDP_CopyProperty(properties->data); + op->properties = IDP_CopyProperty(properties->data); } else { IDPropertyTemplate val = {0}; - op->properties= IDP_New(IDP_GROUP, &val, "wmOperatorProperties"); + op->properties = IDP_New(IDP_GROUP, &val, "wmOperatorProperties"); } RNA_pointer_create(&wm->id, ot->srna, op->properties, op->ptr); /* initialize error reports */ if (reports) { - op->reports= reports; /* must be initialized already */ + op->reports = reports; /* must be initialized already */ } else { - op->reports= MEM_mallocN(sizeof(ReportList), "wmOperatorReportList"); - BKE_reports_init(op->reports, RPT_STORE|RPT_FREE); + op->reports = MEM_mallocN(sizeof(ReportList), "wmOperatorReportList"); + BKE_reports_init(op->reports, RPT_STORE | RPT_FREE); } /* recursive filling of operator macro list */ if (ot->macro.first) { - static wmOperator *motherop= NULL; + static wmOperator *motherop = NULL; wmOperatorTypeMacro *otmacro; int root = 0; /* ensure all ops are in execution order in 1 list */ - if (motherop==NULL) { + if (motherop == NULL) { motherop = op; root = 1; } @@ -689,41 +689,42 @@ static wmOperator *wm_operator_create(wmWindowManager *wm, wmOperatorType *ot, P /* if properties exist, it will contain everything needed */ if (properties) { - otmacro= ot->macro.first; + otmacro = ot->macro.first; - RNA_STRUCT_BEGIN(properties, prop) { + RNA_STRUCT_BEGIN(properties, prop) + { if (otmacro == NULL) break; /* skip invalid properties */ if (strcmp(RNA_property_identifier(prop), otmacro->idname) == 0) { - wmOperatorType *otm= WM_operatortype_find(otmacro->idname, 0); + wmOperatorType *otm = WM_operatortype_find(otmacro->idname, 0); PointerRNA someptr = RNA_property_pointer_get(properties, prop); - wmOperator *opm= wm_operator_create(wm, otm, &someptr, NULL); + wmOperator *opm = wm_operator_create(wm, otm, &someptr, NULL); IDP_ReplaceGroupInGroup(opm->properties, otmacro->properties); BLI_addtail(&motherop->macro, opm); - opm->opm= motherop; /* pointer to mom, for modal() */ + opm->opm = motherop; /* pointer to mom, for modal() */ - otmacro= otmacro->next; + otmacro = otmacro->next; } } RNA_STRUCT_END; } else { for (otmacro = ot->macro.first; otmacro; otmacro = otmacro->next) { - wmOperatorType *otm= WM_operatortype_find(otmacro->idname, 0); - wmOperator *opm= wm_operator_create(wm, otm, otmacro->ptr, NULL); + wmOperatorType *otm = WM_operatortype_find(otmacro->idname, 0); + wmOperator *opm = wm_operator_create(wm, otm, otmacro->ptr, NULL); BLI_addtail(&motherop->macro, opm); - opm->opm= motherop; /* pointer to mom, for modal() */ + opm->opm = motherop; /* pointer to mom, for modal() */ } } if (root) - motherop= NULL; + motherop = NULL; } WM_operator_properties_sanitize(op->ptr, 0); @@ -733,22 +734,22 @@ static wmOperator *wm_operator_create(wmWindowManager *wm, wmOperatorType *ot, P static void wm_region_mouse_co(bContext *C, wmEvent *event) { - ARegion *ar= CTX_wm_region(C); + ARegion *ar = CTX_wm_region(C); if (ar) { /* compatibility convention */ - event->mval[0]= event->x - ar->winrct.xmin; - event->mval[1]= event->y - ar->winrct.ymin; + event->mval[0] = event->x - ar->winrct.xmin; + event->mval[1] = event->y - ar->winrct.ymin; } else { /* these values are invalid (avoid odd behavior by relying on old mval values) */ - event->mval[0]= -1; - event->mval[1]= -1; + event->mval[0] = -1; + event->mval[1] = -1; } } int WM_operator_last_properties_init(wmOperator *op) { - int change= FALSE; + int change = FALSE; if (op->type->last_properties) { PropertyRNA *iterprop; @@ -758,11 +759,11 @@ int WM_operator_last_properties_init(wmOperator *op) iterprop = RNA_struct_iterator_property(op->type->srna); RNA_PROP_BEGIN(op->ptr, itemptr, iterprop) { - PropertyRNA *prop= itemptr.data; + PropertyRNA *prop = itemptr.data; if ((RNA_property_flag(prop) & PROP_SKIP_SAVE) == 0) { if (!RNA_property_is_set(op->ptr, prop)) { /* don't override a setting already set */ - const char *identifier= RNA_property_identifier(prop); - IDProperty *idp_src= IDP_GetPropertyFromGroup(op->type->last_properties, identifier); + const char *identifier = RNA_property_identifier(prop); + IDProperty *idp_src = IDP_GetPropertyFromGroup(op->type->last_properties, identifier); if (idp_src) { IDProperty *idp_dst = IDP_CopyProperty(idp_src); @@ -771,7 +772,7 @@ int WM_operator_last_properties_init(wmOperator *op) idp_dst->flag |= IDP_FLAG_GHOST; IDP_ReplaceInGroup(op->properties, idp_dst); - change= TRUE; + change = TRUE; } } } @@ -802,15 +803,15 @@ int WM_operator_last_properties_store(wmOperator *op) static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, PointerRNA *properties, ReportList *reports, short poll_only) { - wmWindowManager *wm= CTX_wm_manager(C); - int retval= OPERATOR_PASS_THROUGH; + wmWindowManager *wm = CTX_wm_manager(C); + int retval = OPERATOR_PASS_THROUGH; /* this is done because complicated setup is done to call this function that is better not duplicated */ if (poll_only) return WM_operator_poll(C, ot); if (WM_operator_poll(C, ot)) { - wmOperator *op= wm_operator_create(wm, ot, properties, reports); /* if reports==NULL, theyll be initialized */ + wmOperator *op = wm_operator_create(wm, ot, properties, reports); /* if reports==NULL, theyll be initialized */ const short is_nested_call = (wm->op_undo_depth != 0); /* initialize setting from previous run */ @@ -818,8 +819,8 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, P WM_operator_last_properties_init(op); } - if ((G.f & G_DEBUG) && event && event->type!=MOUSEMOVE) - printf("handle evt %d win %d op %s\n", event?event->type:0, CTX_wm_screen(C)->subwinactive, ot->idname); + if ((G.f & G_DEBUG) && event && event->type != MOUSEMOVE) + printf("handle evt %d win %d op %s\n", event ? event->type : 0, CTX_wm_screen(C)->subwinactive, ot->idname); if (op->type->invoke && event) { wm_region_mouse_co(C, event); @@ -827,7 +828,7 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, P if (op->type->flag & OPTYPE_UNDO) wm->op_undo_depth++; - retval= op->type->invoke(C, op, event); + retval = op->type->invoke(C, op, event); OPERATOR_RETVAL_CHECK(retval); if (op->type->flag & OPTYPE_UNDO && CTX_wm_manager(C) == wm) @@ -837,7 +838,7 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, P if (op->type->flag & OPTYPE_UNDO) wm->op_undo_depth++; - retval= op->type->exec(C, op); + retval = op->type->exec(C, op); OPERATOR_RETVAL_CHECK(retval); if (op->type->flag & OPTYPE_UNDO && CTX_wm_manager(C) == wm) @@ -850,13 +851,13 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, P /* Note, if the report is given as an argument then assume the caller will deal with displaying them * currently python only uses this */ - if (!(retval & OPERATOR_HANDLED) && (retval & (OPERATOR_FINISHED|OPERATOR_CANCELLED))) { + if (!(retval & OPERATOR_HANDLED) && (retval & (OPERATOR_FINISHED | OPERATOR_CANCELLED))) { /* only show the report if the report list was not given in the function */ wm_operator_reports(C, op, retval, (reports != NULL)); } if (retval & OPERATOR_HANDLED) - ; /* do nothing, wm_operator_exec() has been called somewhere */ + ; /* do nothing, wm_operator_exec() has been called somewhere */ else if (retval & OPERATOR_FINISHED) { if (!is_nested_call) { /* not called by py script */ WM_operator_last_properties_store(op); @@ -868,7 +869,7 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, P * Also check for macro */ if (ot->flag & OPTYPE_BLOCKING || (op->opm && op->opm->type->flag & OPTYPE_BLOCKING)) { - int bounds[4] = {-1,-1,-1,-1}; + int bounds[4] = {-1, -1, -1, -1}; int wrap; if (op->opm) { @@ -882,31 +883,31 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, P /* exception, cont. grab in header is annoying */ if (wrap) { - ARegion *ar= CTX_wm_region(C); + ARegion *ar = CTX_wm_region(C); if (ar && ar->regiontype == RGN_TYPE_HEADER) { - wrap= FALSE; + wrap = FALSE; } } if (wrap) { - rcti *winrect= NULL; - ARegion *ar= CTX_wm_region(C); - ScrArea *sa= CTX_wm_area(C); + rcti *winrect = NULL; + ARegion *ar = CTX_wm_region(C); + ScrArea *sa = CTX_wm_area(C); if (ar && ar->regiontype == RGN_TYPE_WINDOW && event && BLI_in_rcti(&ar->winrct, event->x, event->y)) { - winrect= &ar->winrct; + winrect = &ar->winrct; } else if (sa) { - winrect= &sa->totrct; + winrect = &sa->totrct; } if (winrect) { - bounds[0]= winrect->xmin; - bounds[1]= winrect->ymax; - bounds[2]= winrect->xmax; - bounds[3]= winrect->ymin; + bounds[0] = winrect->xmin; + bounds[1] = winrect->ymax; + bounds[2] = winrect->xmax; + bounds[3] = winrect->ymin; } } @@ -919,8 +920,9 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, P * none to the UI handler */ wm_handler_ui_cancel(C); } - else + else { WM_operator_free(op); + } } return retval; @@ -933,7 +935,7 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, P static int wm_operator_call_internal(bContext *C, wmOperatorType *ot, PointerRNA *properties, ReportList *reports, short context, short poll_only) { - wmWindow *window= CTX_wm_window(C); + wmWindow *window = CTX_wm_window(C); wmEvent *event; int retval; @@ -942,7 +944,7 @@ static int wm_operator_call_internal(bContext *C, wmOperatorType *ot, PointerRNA /* dummie test */ if (ot && C) { - switch(context) { + switch (context) { case WM_OP_INVOKE_DEFAULT: case WM_OP_INVOKE_REGION_WIN: case WM_OP_INVOKE_AREA: @@ -951,13 +953,13 @@ static int wm_operator_call_internal(bContext *C, wmOperatorType *ot, PointerRNA if (window == NULL) return 0; else - event= window->eventstate; + event = window->eventstate; break; default: event = NULL; } - switch(context) { + switch (context) { case WM_OP_EXEC_REGION_WIN: case WM_OP_INVOKE_REGION_WIN: @@ -969,8 +971,8 @@ static int wm_operator_call_internal(bContext *C, wmOperatorType *ot, PointerRNA /* forces operator to go to the region window/channels/preview, for header menus * but we stay in the same region if we are already in one */ - ARegion *ar= CTX_wm_region(C); - ScrArea *area= CTX_wm_area(C); + ARegion *ar = CTX_wm_region(C); + ScrArea *area = CTX_wm_area(C); int type = RGN_TYPE_WINDOW; switch (context) { @@ -992,12 +994,12 @@ static int wm_operator_call_internal(bContext *C, wmOperatorType *ot, PointerRNA } if (!(ar && ar->regiontype == type) && area) { - ARegion *ar1= BKE_area_find_region_type(area, type); + ARegion *ar1 = BKE_area_find_region_type(area, type); if (ar1) CTX_wm_region_set(C, ar1); } - retval= wm_operator_invoke(C, ot, event, properties, reports, poll_only); + retval = wm_operator_invoke(C, ot, event, properties, reports, poll_only); /* set region back */ CTX_wm_region_set(C, ar); @@ -1007,11 +1009,11 @@ static int wm_operator_call_internal(bContext *C, wmOperatorType *ot, PointerRNA case WM_OP_EXEC_AREA: case WM_OP_INVOKE_AREA: { - /* remove region from context */ - ARegion *ar= CTX_wm_region(C); + /* remove region from context */ + ARegion *ar = CTX_wm_region(C); CTX_wm_region_set(C, NULL); - retval= wm_operator_invoke(C, ot, event, properties, reports, poll_only); + retval = wm_operator_invoke(C, ot, event, properties, reports, poll_only); CTX_wm_region_set(C, ar); return retval; @@ -1020,12 +1022,12 @@ static int wm_operator_call_internal(bContext *C, wmOperatorType *ot, PointerRNA case WM_OP_INVOKE_SCREEN: { /* remove region + area from context */ - ARegion *ar= CTX_wm_region(C); - ScrArea *area= CTX_wm_area(C); + ARegion *ar = CTX_wm_region(C); + ScrArea *area = CTX_wm_area(C); CTX_wm_region_set(C, NULL); CTX_wm_area_set(C, NULL); - retval= wm_operator_invoke(C, ot, event, properties, reports, poll_only); + retval = wm_operator_invoke(C, ot, event, properties, reports, poll_only); CTX_wm_area_set(C, area); CTX_wm_region_set(C, ar); @@ -1044,7 +1046,7 @@ static int wm_operator_call_internal(bContext *C, wmOperatorType *ot, PointerRNA /* invokes operator in context */ int WM_operator_name_call(bContext *C, const char *opstring, int context, PointerRNA *properties) { - wmOperatorType *ot= WM_operatortype_find(opstring, 0); + wmOperatorType *ot = WM_operatortype_find(opstring, 0); if (ot) return wm_operator_call_internal(C, ot, properties, NULL, context, FALSE); @@ -1058,17 +1060,17 @@ int WM_operator_name_call(bContext *C, const char *opstring, int context, Pointe */ int WM_operator_call_py(bContext *C, wmOperatorType *ot, int context, PointerRNA *properties, ReportList *reports) { - int retval= OPERATOR_CANCELLED; + int retval = OPERATOR_CANCELLED; #if 0 wmOperator *op; - op= wm_operator_create(wm, ot, properties, reports); + op = wm_operator_create(wm, ot, properties, reports); if (op->type->exec) { if (op->type->flag & OPTYPE_UNDO) wm->op_undo_depth++; - retval= op->type->exec(C, op); + retval = op->type->exec(C, op); OPERATOR_RETVAL_CHECK(retval); if (op->type->flag & OPTYPE_UNDO && CTX_wm_manager(C) == wm) @@ -1091,9 +1093,9 @@ int WM_operator_call_py(bContext *C, wmOperatorType *ot, int context, PointerRNA if (wm && (wm == CTX_wm_manager(C))) wm->op_undo_depth--; /* keep the reports around if needed later */ - if ( (retval & OPERATOR_RUNNING_MODAL) || - ((retval & OPERATOR_FINISHED) && wm_operator_register_check(CTX_wm_manager(C), ot)) - ) { + if ((retval & OPERATOR_RUNNING_MODAL) || + ((retval & OPERATOR_FINISHED) && wm_operator_register_check(CTX_wm_manager(C), ot))) + { reports->flag |= RPT_FREE; /* let blender manage freeing */ } @@ -1112,28 +1114,28 @@ void wm_event_free_handler(wmEventHandler *handler) /* only set context when area/region is part of screen */ static void wm_handler_op_context(bContext *C, wmEventHandler *handler) { - bScreen *screen= CTX_wm_screen(C); + bScreen *screen = CTX_wm_screen(C); if (screen && handler->op) { - if (handler->op_area==NULL) + if (handler->op_area == NULL) CTX_wm_area_set(C, NULL); else { ScrArea *sa; - for (sa= screen->areabase.first; sa; sa= sa->next) - if (sa==handler->op_area) + for (sa = screen->areabase.first; sa; sa = sa->next) + if (sa == handler->op_area) break; - if (sa==NULL) { + if (sa == NULL) { /* when changing screen layouts with running modal handlers (like render display), this * is not an error to print */ - if (handler->op==NULL) + if (handler->op == NULL) printf("internal error: handler (%s) has invalid area\n", handler->op->type->idname); } else { ARegion *ar; CTX_wm_area_set(C, sa); - for (ar= sa->regionbase.first; ar; ar= ar->next) - if (ar==handler->op_region) + for (ar = sa->regionbase.first; ar; ar = ar->next) + if (ar == handler->op_region) break; /* XXX no warning print here, after full-area and back regions are remade */ if (ar) @@ -1147,16 +1149,16 @@ static void wm_handler_op_context(bContext *C, wmEventHandler *handler) void WM_event_remove_handlers(bContext *C, ListBase *handlers) { wmEventHandler *handler; - wmWindowManager *wm= CTX_wm_manager(C); + wmWindowManager *wm = CTX_wm_manager(C); /* C is zero on freeing database, modal handlers then already were freed */ - while ((handler=handlers->first)) { + while ((handler = handlers->first)) { BLI_remlink(handlers, handler); if (handler->op) { if (handler->op->type->cancel) { - ScrArea *area= CTX_wm_area(C); - ARegion *region= CTX_wm_region(C); + ScrArea *area = CTX_wm_area(C); + ARegion *region = CTX_wm_region(C); wm_handler_op_context(C, handler); @@ -1176,9 +1178,9 @@ void WM_event_remove_handlers(bContext *C, ListBase *handlers) WM_operator_free(handler->op); } else if (handler->ui_remove) { - ScrArea *area= CTX_wm_area(C); - ARegion *region= CTX_wm_region(C); - ARegion *menu= CTX_wm_menu(C); + ScrArea *area = CTX_wm_area(C); + ARegion *region = CTX_wm_region(C); + ARegion *menu = CTX_wm_menu(C); if (handler->ui_area) CTX_wm_area_set(C, handler->ui_area); if (handler->ui_region) CTX_wm_region_set(C, handler->ui_region); @@ -1198,7 +1200,7 @@ void WM_event_remove_handlers(bContext *C, ListBase *handlers) /* do userdef mappings */ int WM_userdef_event_map(int kmitype) { - switch(kmitype) { + switch (kmitype) { case SELECTMOUSE: if (U.flag & USER_LMOUSESELECT) return LEFTMOUSE; @@ -1265,7 +1267,7 @@ static void wm_eventemulation(wmEvent *event) /* numpad emulation */ if (U.flag & USER_NONUMPAD) { - switch(event->type) { + switch (event->type) { case ZEROKEY: event->type = PAD0; break; case ONEKEY: event->type = PAD1; break; case TWOKEY: event->type = PAD2; break; @@ -1285,37 +1287,37 @@ static void wm_eventemulation(wmEvent *event) static int wm_eventmatch(wmEvent *winevent, wmKeyMapItem *kmi) { - int kmitype= WM_userdef_event_map(kmi->type); + int kmitype = WM_userdef_event_map(kmi->type); if (kmi->flag & KMI_INACTIVE) return 0; /* the matching rules */ - if (kmitype==KM_TEXTINPUT) + if (kmitype == KM_TEXTINPUT) if (ISTEXTINPUT(winevent->type) && (winevent->ascii || winevent->utf8_buf[0])) return 1; - if (kmitype!=KM_ANY) - if (winevent->type!=kmitype) return 0; + if (kmitype != KM_ANY) + if (winevent->type != kmitype) return 0; - if (kmi->val!=KM_ANY) - if (winevent->val!=kmi->val) return 0; + if (kmi->val != KM_ANY) + if (winevent->val != kmi->val) return 0; /* modifiers also check bits, so it allows modifier order */ - if (kmi->shift!=KM_ANY) + if (kmi->shift != KM_ANY) if (winevent->shift != kmi->shift && !(winevent->shift & kmi->shift)) return 0; - if (kmi->ctrl!=KM_ANY) + if (kmi->ctrl != KM_ANY) if (winevent->ctrl != kmi->ctrl && !(winevent->ctrl & kmi->ctrl)) return 0; - if (kmi->alt!=KM_ANY) + if (kmi->alt != KM_ANY) if (winevent->alt != kmi->alt && !(winevent->alt & kmi->alt)) return 0; - if (kmi->oskey!=KM_ANY) + if (kmi->oskey != KM_ANY) if (winevent->oskey != kmi->oskey && !(winevent->oskey & kmi->oskey)) return 0; if (kmi->keymodifier) - if (winevent->keymodifier!=kmi->keymodifier) return 0; + if (winevent->keymodifier != kmi->keymodifier) return 0; /* key modifiers always check when event has it */ /* otherwise regular keypresses with keymodifier still work */ if (winevent->keymodifier) if (ISTEXTINPUT(winevent->type)) - if (winevent->keymodifier!=kmi->keymodifier) return 0; + if (winevent->keymodifier != kmi->keymodifier) return 0; return 1; } @@ -1329,14 +1331,14 @@ static void wm_event_modalkeymap(const bContext *C, wmOperator *op, wmEvent *eve op = op->opm; if (op->type->modalkeymap) { - wmKeyMap *keymap= WM_keymap_active(CTX_wm_manager(C), op->type->modalkeymap); + wmKeyMap *keymap = WM_keymap_active(CTX_wm_manager(C), op->type->modalkeymap); wmKeyMapItem *kmi; for (kmi = keymap->items.first; kmi; kmi = kmi->next) { if (wm_eventmatch(event, kmi)) { - event->type= EVT_MODAL_MAP; - event->val= kmi->propvalue; + event->type = EVT_MODAL_MAP; + event->val = kmi->propvalue; } } } @@ -1346,18 +1348,18 @@ static void wm_event_modalkeymap(const bContext *C, wmOperator *op, wmEvent *eve static int wm_handler_operator_call(bContext *C, ListBase *handlers, wmEventHandler *handler, wmEvent *event, PointerRNA *properties) { - int retval= OPERATOR_PASS_THROUGH; + int retval = OPERATOR_PASS_THROUGH; /* derived, modal or blocking operator */ if (handler->op) { - wmOperator *op= handler->op; - wmOperatorType *ot= op->type; + wmOperator *op = handler->op; + wmOperatorType *ot = op->type; if (ot->modal) { /* we set context to where modal handler came from */ - wmWindowManager *wm= CTX_wm_manager(C); - ScrArea *area= CTX_wm_area(C); - ARegion *region= CTX_wm_region(C); + wmWindowManager *wm = CTX_wm_manager(C); + ScrArea *area = CTX_wm_area(C); + ARegion *region = CTX_wm_region(C); wm_handler_op_context(C, handler); wm_region_mouse_co(C, event); @@ -1366,7 +1368,7 @@ static int wm_handler_operator_call(bContext *C, ListBase *handlers, wmEventHand if (ot->flag & OPTYPE_UNDO) wm->op_undo_depth++; - retval= ot->modal(C, op, event); + retval = ot->modal(C, op, event); OPERATOR_RETVAL_CHECK(retval); /* when this is _not_ the case the modal modifier may have loaded @@ -1388,20 +1390,20 @@ static int wm_handler_operator_call(bContext *C, ListBase *handlers, wmEventHand CTX_wm_region_set(C, NULL); } - if (retval & (OPERATOR_CANCELLED|OPERATOR_FINISHED)) + if (retval & (OPERATOR_CANCELLED | OPERATOR_FINISHED)) wm_operator_reports(C, op, retval, FALSE); if (retval & OPERATOR_FINISHED) { wm_operator_finished(C, op, 0); - handler->op= NULL; + handler->op = NULL; } - else if (retval & (OPERATOR_CANCELLED|OPERATOR_FINISHED)) { + else if (retval & (OPERATOR_CANCELLED | OPERATOR_FINISHED)) { WM_operator_free(op); - handler->op= NULL; + handler->op = NULL; } /* remove modal handler, operator itself should have been canceled and freed */ - if (retval & (OPERATOR_CANCELLED|OPERATOR_FINISHED)) { + if (retval & (OPERATOR_CANCELLED | OPERATOR_FINISHED)) { WM_cursor_ungrab(CTX_wm_window(C)); BLI_remlink(handlers, handler); @@ -1417,20 +1419,20 @@ static int wm_handler_operator_call(bContext *C, ListBase *handlers, wmEventHand printf("wm_handler_operator_call error\n"); } else { - wmOperatorType *ot= WM_operatortype_find(event->keymap_idname, 0); + wmOperatorType *ot = WM_operatortype_find(event->keymap_idname, 0); if (ot) - retval= wm_operator_invoke(C, ot, event, properties, NULL, FALSE); + retval = wm_operator_invoke(C, ot, event, properties, NULL, FALSE); } /* Finished and pass through flag as handled */ /* Finished and pass through flag as handled */ - if (retval == (OPERATOR_FINISHED|OPERATOR_PASS_THROUGH)) + if (retval == (OPERATOR_FINISHED | OPERATOR_PASS_THROUGH)) return WM_HANDLER_HANDLED; /* Modal unhandled, break */ - if (retval == (OPERATOR_PASS_THROUGH|OPERATOR_RUNNING_MODAL)) - return (WM_HANDLER_BREAK|WM_HANDLER_MODAL); + if (retval == (OPERATOR_PASS_THROUGH | OPERATOR_RUNNING_MODAL)) + return (WM_HANDLER_BREAK | WM_HANDLER_MODAL); if (retval & OPERATOR_PASS_THROUGH) return WM_HANDLER_CONTINUE; @@ -1441,163 +1443,163 @@ static int wm_handler_operator_call(bContext *C, ListBase *handlers, wmEventHand /* fileselect handlers are only in the window queue, so it's save to switch screens or area types */ static int wm_handler_fileselect_call(bContext *C, ListBase *handlers, wmEventHandler *handler, wmEvent *event) { - wmWindowManager *wm= CTX_wm_manager(C); + wmWindowManager *wm = CTX_wm_manager(C); SpaceFile *sfile; - int action= WM_HANDLER_CONTINUE; + int action = WM_HANDLER_CONTINUE; if (event->type != EVT_FILESELECT) return action; if (handler->op != (wmOperator *)event->customdata) return action; - switch(event->val) { + switch (event->val) { case EVT_FILESELECT_OPEN: case EVT_FILESELECT_FULL_OPEN: - { - ScrArea *sa; + { + ScrArea *sa; - /* sa can be null when window A is active, but mouse is over window B */ - /* in this case, open file select in original window A */ - if (handler->op_area == NULL) { - bScreen *screen = CTX_wm_screen(C); - sa = (ScrArea *)screen->areabase.first; - } - else { - sa = handler->op_area; - } + /* sa can be null when window A is active, but mouse is over window B */ + /* in this case, open file select in original window A */ + if (handler->op_area == NULL) { + bScreen *screen = CTX_wm_screen(C); + sa = (ScrArea *)screen->areabase.first; + } + else { + sa = handler->op_area; + } - if (event->val==EVT_FILESELECT_OPEN) { - ED_area_newspace(C, sa, SPACE_FILE); /* 'sa' is modified in-place */ - } - else { - sa= ED_screen_full_newspace(C, sa, SPACE_FILE); /* sets context */ - } + if (event->val == EVT_FILESELECT_OPEN) { + ED_area_newspace(C, sa, SPACE_FILE); /* 'sa' is modified in-place */ + } + else { + sa = ED_screen_full_newspace(C, sa, SPACE_FILE); /* sets context */ + } - /* note, getting the 'sa' back from the context causes a nasty bug where the newly created - * 'sa' != CTX_wm_area(C). removed the line below and set 'sa' in the 'if' above */ - /* sa = CTX_wm_area(C); */ + /* note, getting the 'sa' back from the context causes a nasty bug where the newly created + * 'sa' != CTX_wm_area(C). removed the line below and set 'sa' in the 'if' above */ + /* sa = CTX_wm_area(C); */ - /* settings for filebrowser, sfile is not operator owner but sends events */ - sfile= (SpaceFile*)sa->spacedata.first; - sfile->op= handler->op; + /* settings for filebrowser, sfile is not operator owner but sends events */ + sfile = (SpaceFile *)sa->spacedata.first; + sfile->op = handler->op; - ED_fileselect_set_params(sfile); + ED_fileselect_set_params(sfile); - action= WM_HANDLER_BREAK; - } - break; + action = WM_HANDLER_BREAK; + } + break; case EVT_FILESELECT_EXEC: case EVT_FILESELECT_CANCEL: case EVT_FILESELECT_EXTERNAL_CANCEL: - { - /* XXX validate area and region? */ - bScreen *screen= CTX_wm_screen(C); + { + /* XXX validate area and region? */ + bScreen *screen = CTX_wm_screen(C); - /* remlink now, for load file case before removing*/ - BLI_remlink(handlers, handler); + /* remlink now, for load file case before removing*/ + BLI_remlink(handlers, handler); - if (event->val!=EVT_FILESELECT_EXTERNAL_CANCEL) { - if (screen != handler->filescreen) { - ED_screen_full_prevspace(C, CTX_wm_area(C)); - } - else { - ED_area_prevspace(C, CTX_wm_area(C)); - } + if (event->val != EVT_FILESELECT_EXTERNAL_CANCEL) { + if (screen != handler->filescreen) { + ED_screen_full_prevspace(C, CTX_wm_area(C)); + } + else { + ED_area_prevspace(C, CTX_wm_area(C)); } + } - wm_handler_op_context(C, handler); + wm_handler_op_context(C, handler); - /* needed for uiPupMenuReports */ + /* needed for uiPupMenuReports */ - if (event->val==EVT_FILESELECT_EXEC) { -#if 0 // use REDALERT now + if (event->val == EVT_FILESELECT_EXEC) { +#if 0 // use REDALERT now - /* a bit weak, might become arg for WM_event_fileselect? */ - /* XXX also extension code in image-save doesnt work for this yet */ - if (RNA_struct_find_property(handler->op->ptr, "check_existing") && - RNA_boolean_get(handler->op->ptr, "check_existing")) { - char *path= RNA_string_get_alloc(handler->op->ptr, "filepath", NULL, 0); - /* this gives ownership to pupmenu */ - uiPupMenuSaveOver(C, handler->op, (path)? path: ""); - if (path) - MEM_freeN(path); - } - else + /* a bit weak, might become arg for WM_event_fileselect? */ + /* XXX also extension code in image-save doesnt work for this yet */ + if (RNA_struct_find_property(handler->op->ptr, "check_existing") && + RNA_boolean_get(handler->op->ptr, "check_existing")) { + char *path = RNA_string_get_alloc(handler->op->ptr, "filepath", NULL, 0); + /* this gives ownership to pupmenu */ + uiPupMenuSaveOver(C, handler->op, (path) ? path : ""); + if (path) + MEM_freeN(path); + } + else #endif - { - int retval; + { + int retval; - if (handler->op->type->flag & OPTYPE_UNDO) - wm->op_undo_depth++; - - retval= handler->op->type->exec(C, handler->op); - - /* XXX check this carefully, CTX_wm_manager(C) == wm is a bit hackish */ - if (handler->op->type->flag & OPTYPE_UNDO && CTX_wm_manager(C) == wm) - wm->op_undo_depth--; + if (handler->op->type->flag & OPTYPE_UNDO) + wm->op_undo_depth++; - if (retval & OPERATOR_FINISHED) - if (G.f & G_DEBUG) - wm_operator_print(C, handler->op); - - /* XXX check this carefully, CTX_wm_manager(C) == wm is a bit hackish */ - if (CTX_wm_manager(C) == wm && wm->op_undo_depth == 0) - if (handler->op->type->flag & OPTYPE_UNDO) - ED_undo_push_op(C, handler->op); + retval = handler->op->type->exec(C, handler->op); - if (handler->op->reports->list.first) { + /* XXX check this carefully, CTX_wm_manager(C) == wm is a bit hackish */ + if (handler->op->type->flag & OPTYPE_UNDO && CTX_wm_manager(C) == wm) + wm->op_undo_depth--; - /* FIXME, temp setting window, this is really bad! - * only have because lib linking errors need to be seen by users :( - * it can be removed without breaking anything but then no linking errors - campbell */ - wmWindow *win_prev= CTX_wm_window(C); - ScrArea *area_prev= CTX_wm_area(C); - ARegion *ar_prev= CTX_wm_region(C); + if (retval & OPERATOR_FINISHED) + if (G.f & G_DEBUG) + wm_operator_print(C, handler->op); - if (win_prev==NULL) - CTX_wm_window_set(C, CTX_wm_manager(C)->windows.first); + /* XXX check this carefully, CTX_wm_manager(C) == wm is a bit hackish */ + if (CTX_wm_manager(C) == wm && wm->op_undo_depth == 0) + if (handler->op->type->flag & OPTYPE_UNDO) + ED_undo_push_op(C, handler->op); - handler->op->reports->printlevel = RPT_WARNING; - uiPupMenuReports(C, handler->op->reports); + if (handler->op->reports->list.first) { - /* XXX - copied from 'wm_operator_finished()' */ - /* add reports to the global list, otherwise they are not seen */ - BLI_movelisttolist(&CTX_wm_reports(C)->list, &handler->op->reports->list); + /* FIXME, temp setting window, this is really bad! + * only have because lib linking errors need to be seen by users :( + * it can be removed without breaking anything but then no linking errors - campbell */ + wmWindow *win_prev = CTX_wm_window(C); + ScrArea *area_prev = CTX_wm_area(C); + ARegion *ar_prev = CTX_wm_region(C); - CTX_wm_window_set(C, win_prev); - CTX_wm_area_set(C, area_prev); - CTX_wm_region_set(C, ar_prev); - } + if (win_prev == NULL) + CTX_wm_window_set(C, CTX_wm_manager(C)->windows.first); - if (retval & OPERATOR_FINISHED) { - WM_operator_last_properties_store(handler->op); - } + handler->op->reports->printlevel = RPT_WARNING; + uiPupMenuReports(C, handler->op->reports); - WM_operator_free(handler->op); - } - } - else { - if (handler->op->type->cancel) { - if (handler->op->type->flag & OPTYPE_UNDO) - wm->op_undo_depth++; + /* XXX - copied from 'wm_operator_finished()' */ + /* add reports to the global list, otherwise they are not seen */ + BLI_movelisttolist(&CTX_wm_reports(C)->list, &handler->op->reports->list); - handler->op->type->cancel(C, handler->op); + CTX_wm_window_set(C, win_prev); + CTX_wm_area_set(C, area_prev); + CTX_wm_region_set(C, ar_prev); + } - if (handler->op->type->flag & OPTYPE_UNDO) - wm->op_undo_depth--; + if (retval & OPERATOR_FINISHED) { + WM_operator_last_properties_store(handler->op); } WM_operator_free(handler->op); } + } + else { + if (handler->op->type->cancel) { + if (handler->op->type->flag & OPTYPE_UNDO) + wm->op_undo_depth++; - CTX_wm_area_set(C, NULL); + handler->op->type->cancel(C, handler->op); - wm_event_free_handler(handler); + if (handler->op->type->flag & OPTYPE_UNDO) + wm->op_undo_depth--; + } - action= WM_HANDLER_BREAK; + WM_operator_free(handler->op); } - break; + + CTX_wm_area_set(C, NULL); + + wm_event_free_handler(handler); + + action = WM_HANDLER_BREAK; + } + break; } return action; @@ -1607,12 +1609,12 @@ static int handler_boundbox_test(wmEventHandler *handler, wmEvent *event) { if (handler->bbwin) { if (handler->bblocal) { - rcti rect= *handler->bblocal; + rcti rect = *handler->bblocal; BLI_translate_rcti(&rect, handler->bbwin->xmin, handler->bbwin->ymin); if (BLI_in_rcti(&rect, event->x, event->y)) return 1; - else if (event->type==MOUSEMOVE && BLI_in_rcti(&rect, event->prevx, event->prevy)) + else if (event->type == MOUSEMOVE && BLI_in_rcti(&rect, event->prevx, event->prevy)) return 1; else return 0; @@ -1620,7 +1622,7 @@ static int handler_boundbox_test(wmEventHandler *handler, wmEvent *event) else { if (BLI_in_rcti(handler->bbwin, event->x, event->y)) return 1; - else if (event->type==MOUSEMOVE && BLI_in_rcti(handler->bbwin, event->prevx, event->prevy)) + else if (event->type == MOUSEMOVE && BLI_in_rcti(handler->bbwin, event->prevx, event->prevy)) return 1; else return 0; @@ -1631,36 +1633,36 @@ static int handler_boundbox_test(wmEventHandler *handler, wmEvent *event) static int wm_action_not_handled(int action) { - return action == WM_HANDLER_CONTINUE || action == (WM_HANDLER_BREAK|WM_HANDLER_MODAL); + return action == WM_HANDLER_CONTINUE || action == (WM_HANDLER_BREAK | WM_HANDLER_MODAL); } static int wm_handlers_do(bContext *C, wmEvent *event, ListBase *handlers) { - wmWindowManager *wm= CTX_wm_manager(C); + wmWindowManager *wm = CTX_wm_manager(C); wmEventHandler *handler, *nexthandler; - int action= WM_HANDLER_CONTINUE; + int action = WM_HANDLER_CONTINUE; int always_pass; - if (handlers==NULL) return action; + if (handlers == NULL) return action; /* modal handlers can get removed in this loop, we keep the loop this way */ - for (handler= handlers->first; handler; handler= nexthandler) { + for (handler = handlers->first; handler; handler = nexthandler) { - nexthandler= handler->next; + nexthandler = handler->next; /* during this loop, ui handlers for nested menus can tag multiple handlers free */ - if (handler->flag & WM_HANDLER_DO_FREE); - /* optional boundbox */ + if (handler->flag & WM_HANDLER_DO_FREE) ; + /* optional boundbox */ else if (handler_boundbox_test(handler, event)) { /* in advance to avoid access to freed event on window close */ - always_pass= wm_event_always_pass(event); + always_pass = wm_event_always_pass(event); /* modal+blocking handler */ if (handler->flag & WM_HANDLER_BLOCKING) action |= WM_HANDLER_BREAK; if (handler->keymap) { - wmKeyMap *keymap= WM_keymap_active(wm, handler->keymap); + wmKeyMap *keymap = WM_keymap_active(wm, handler->keymap); wmKeyMapItem *kmi; if (!keymap->poll || keymap->poll(C)) { @@ -1680,34 +1682,34 @@ static int wm_handlers_do(bContext *C, wmEvent *event, ListBase *handlers) else if (handler->ui_handle) { action |= wm_handler_ui_call(C, handler, event, always_pass); } - else if (handler->type==WM_HANDLER_FILESELECT) { + else if (handler->type == WM_HANDLER_FILESELECT) { /* screen context changes here */ action |= wm_handler_fileselect_call(C, handlers, handler, event); } else if (handler->dropboxes) { - if (event->type==EVT_DROP) { - wmDropBox *drop= handler->dropboxes->first; - for (; drop; drop= drop->next) { + if (event->type == EVT_DROP) { + wmDropBox *drop = handler->dropboxes->first; + for (; drop; drop = drop->next) { /* other drop custom types allowed */ - if (event->custom==EVT_DATA_LISTBASE) { - ListBase *lb= (ListBase *)event->customdata; + if (event->custom == EVT_DATA_LISTBASE) { + ListBase *lb = (ListBase *)event->customdata; wmDrag *drag; - for (drag= lb->first; drag; drag= drag->next) { + for (drag = lb->first; drag; drag = drag->next) { if (drop->poll(C, drag, event)) { drop->copy(drag, drop); /* free the drags before calling operator */ BLI_freelistN(event->customdata); - event->customdata= NULL; - event->custom= 0; + event->customdata = NULL; + event->custom = 0; WM_operator_name_call(C, drop->ot->idname, drop->opcontext, drop->ptr); action |= WM_HANDLER_BREAK; /* XXX fileread case */ - if (CTX_wm_window(C)==NULL) + if (CTX_wm_window(C) == NULL) return action; /* escape from drag loop, got freed */ @@ -1733,7 +1735,7 @@ static int wm_handlers_do(bContext *C, wmEvent *event, ListBase *handlers) /* XXX fileread case, if the wm is freed then the handler's * will have been too so the code below need not run. */ - if (CTX_wm_window(C)==NULL) { + if (CTX_wm_window(C) == NULL) { return action; } @@ -1762,10 +1764,10 @@ static int wm_handlers_do(bContext *C, wmEvent *event, ListBase *handlers) * If no double click events are found it will fallback to a single click. * So a double click event can result in 2 successive single click calls * if its not handled by the keymap - campbell */ - if ( (ABS(event->x - win->eventstate->prevclickx)) <= 2 && - (ABS(event->y - win->eventstate->prevclicky)) <= 2 && - ((PIL_check_seconds_timer() - win->eventstate->prevclicktime) * 1000 < U.dbl_click_time) - ) { + if ((ABS(event->x - win->eventstate->prevclickx)) <= 2 && + (ABS(event->y - win->eventstate->prevclicky)) <= 2 && + ((PIL_check_seconds_timer() - win->eventstate->prevclicktime) * 1000 < U.dbl_click_time)) + { event->val = KM_DBL_CLICK; /* removed this because in cases where we're this is used as a single click * event, this will give old coords, @@ -1788,7 +1790,7 @@ static int wm_handlers_do(bContext *C, wmEvent *event, ListBase *handlers) } } - if (action == (WM_HANDLER_BREAK|WM_HANDLER_MODAL)) + if (action == (WM_HANDLER_BREAK | WM_HANDLER_MODAL)) wm_cursor_arrow_move(CTX_wm_window(C), event); return action; @@ -1800,8 +1802,8 @@ static int wm_event_inside_i(wmEvent *event, rcti *rect) return 1; if (BLI_in_rcti(rect, event->x, event->y)) return 1; - if (event->type==MOUSEMOVE) { - if ( BLI_in_rcti(rect, event->prevx, event->prevy)) { + if (event->type == MOUSEMOVE) { + if (BLI_in_rcti(rect, event->prevx, event->prevy)) { return 1; } return 0; @@ -1811,11 +1813,11 @@ static int wm_event_inside_i(wmEvent *event, rcti *rect) static ScrArea *area_event_inside(bContext *C, int x, int y) { - bScreen *screen= CTX_wm_screen(C); + bScreen *screen = CTX_wm_screen(C); ScrArea *sa; if (screen) - for (sa= screen->areabase.first; sa; sa= sa->next) + for (sa = screen->areabase.first; sa; sa = sa->next) if (BLI_in_rcti(&sa->totrct, x, y)) return sa; return NULL; @@ -1823,12 +1825,12 @@ static ScrArea *area_event_inside(bContext *C, int x, int y) static ARegion *region_event_inside(bContext *C, int x, int y) { - bScreen *screen= CTX_wm_screen(C); - ScrArea *area= CTX_wm_area(C); + bScreen *screen = CTX_wm_screen(C); + ScrArea *area = CTX_wm_area(C); ARegion *ar; if (screen && area) - for (ar= area->regionbase.first; ar; ar= ar->next) + for (ar = area->regionbase.first; ar; ar = ar->next) if (BLI_in_rcti(&ar->winrct, x, y)) return ar; return NULL; @@ -1837,10 +1839,10 @@ static ARegion *region_event_inside(bContext *C, int x, int y) static void wm_paintcursor_tag(bContext *C, wmPaintCursor *pc, ARegion *ar) { if (ar) { - for (; pc; pc= pc->next) { + for (; pc; pc = pc->next) { if (pc->poll == NULL || pc->poll(C)) { - wmWindow *win= CTX_wm_window(C); - win->screen->do_draw_paintcursor= 1; + wmWindow *win = CTX_wm_window(C); + win->screen->do_draw_paintcursor = 1; wm_tag_redraw_overlay(win, ar); } } @@ -1851,17 +1853,17 @@ static void wm_paintcursor_tag(bContext *C, wmPaintCursor *pc, ARegion *ar) /* context was set on active area and region */ static void wm_paintcursor_test(bContext *C, wmEvent *event) { - wmWindowManager *wm= CTX_wm_manager(C); + wmWindowManager *wm = CTX_wm_manager(C); if (wm->paintcursors.first) { - ARegion *ar= CTX_wm_region(C); + ARegion *ar = CTX_wm_region(C); if (ar) wm_paintcursor_tag(C, wm->paintcursors.first, ar); /* if previous position was not in current region, we have to set a temp new context */ - if (ar==NULL || !BLI_in_rcti(&ar->winrct, event->prevx, event->prevy)) { - ScrArea *sa= CTX_wm_area(C); + if (ar == NULL || !BLI_in_rcti(&ar->winrct, event->prevx, event->prevy)) { + ScrArea *sa = CTX_wm_area(C); CTX_wm_area_set(C, area_event_inside(C, event->prevx, event->prevy)); CTX_wm_region_set(C, region_event_inside(C, event->prevx, event->prevy)); @@ -1876,16 +1878,16 @@ static void wm_paintcursor_test(bContext *C, wmEvent *event) static void wm_event_drag_test(wmWindowManager *wm, wmWindow *win, wmEvent *event) { - if (wm->drags.first==NULL) return; + if (wm->drags.first == NULL) return; - if (event->type==MOUSEMOVE) - win->screen->do_draw_drag= 1; - else if (event->type==ESCKEY) { + if (event->type == MOUSEMOVE) + win->screen->do_draw_drag = 1; + else if (event->type == ESCKEY) { BLI_freelistN(&wm->drags); - win->screen->do_draw_drag= 1; + win->screen->do_draw_drag = 1; } - else if (event->type==LEFTMOUSE && event->val==KM_RELEASE) { - event->type= EVT_DROP; + else if (event->type == LEFTMOUSE && event->val == KM_RELEASE) { + event->type = EVT_DROP; /* create customdata, first free existing */ if (event->customdata) { @@ -1893,12 +1895,12 @@ static void wm_event_drag_test(wmWindowManager *wm, wmWindow *win, wmEvent *even MEM_freeN(event->customdata); } - event->custom= EVT_DATA_LISTBASE; - event->customdata= &wm->drags; - event->customdatafree= 1; + event->custom = EVT_DATA_LISTBASE; + event->customdata = &wm->drags; + event->customdatafree = 1; /* clear drop icon */ - win->screen->do_draw_drag= 1; + win->screen->do_draw_drag = 1; /* restore cursor (disabled, see wm_dragdrop.c) */ // WM_cursor_restore(win); @@ -1907,7 +1909,7 @@ static void wm_event_drag_test(wmWindowManager *wm, wmWindow *win, wmEvent *even /* overlap fails otherwise */ if (win->screen->do_draw_drag) if (win->drawmethod == USER_DRAW_OVERLAP) - win->screen->do_draw= 1; + win->screen->do_draw = 1; } @@ -1915,19 +1917,19 @@ static void wm_event_drag_test(wmWindowManager *wm, wmWindow *win, wmEvent *even /* goes over entire hierarchy: events -> window -> screen -> area -> region */ void wm_event_do_handlers(bContext *C) { - wmWindowManager *wm= CTX_wm_manager(C); + wmWindowManager *wm = CTX_wm_manager(C); wmWindow *win; /* update key configuration before handling events */ WM_keyconfig_update(wm); - for (win= wm->windows.first; win; win= win->next) { + for (win = wm->windows.first; win; win = win->next) { wmEvent *event; - if ( win->screen==NULL ) + if (win->screen == NULL) wm_event_free_all(win); else { - Scene* scene = win->screen->scene; + Scene *scene = win->screen->scene; if (scene) { int playing = sound_scene_playing(win->screen->scene); @@ -1945,7 +1947,7 @@ void wm_event_do_handlers(bContext *C) float time = sound_sync_scene(scene); if (finite(time)) { int ncfra = sound_sync_scene(scene) * (float)FPS + 0.5f; - if (ncfra != scene->r.cfra) { + if (ncfra != scene->r.cfra) { scene->r.cfra = ncfra; ED_update_for_newframe(CTX_data_main(C), scene, win->screen, 1); WM_event_add_notifier(C, NC_WINDOW, NULL); @@ -1960,7 +1962,7 @@ void wm_event_do_handlers(bContext *C) } } - while ( (event= win->queue.first) ) { + while ( (event = win->queue.first) ) { int action = WM_HANDLER_CONTINUE; if ((G.f & G_DEBUG) && event && !ELEM(event->type, MOUSEMOVE, INBETWEEN_MOUSEMOVE)) @@ -1983,7 +1985,7 @@ void wm_event_do_handlers(bContext *C) action |= wm_handlers_do(C, event, &win->modalhandlers); /* fileread case */ - if (CTX_wm_window(C)==NULL) + if (CTX_wm_window(C) == NULL) return; /* check dragging, creates new event or frees, adds draw tag */ @@ -1995,25 +1997,25 @@ void wm_event_do_handlers(bContext *C) if ((action & WM_HANDLER_BREAK) == 0) { ScrArea *sa; ARegion *ar; - int doit= 0; + int doit = 0; /* Note: setting subwin active should be done here, after modal handlers have been done */ - if (event->type==MOUSEMOVE) { + if (event->type == MOUSEMOVE) { /* state variables in screen, cursors. Also used in wm_draw.c, fails for modal handlers though */ ED_screen_set_subwinactive(C, event); /* for regions having custom cursors */ wm_paintcursor_test(C, event); } - else if (event->type==NDOF_MOTION) { + else if (event->type == NDOF_MOTION) { win->addmousemove = TRUE; } - for (sa= win->screen->areabase.first; sa; sa= sa->next) { + for (sa = win->screen->areabase.first; sa; sa = sa->next) { if (wm_event_inside_i(event, &sa->totrct)) { CTX_wm_area_set(C, sa); if ((action & WM_HANDLER_BREAK) == 0) { - for (ar=sa->regionbase.first; ar; ar= ar->next) { + for (ar = sa->regionbase.first; ar; ar = ar->next) { if (wm_event_inside_i(event, &ar->winrct)) { CTX_wm_region_set(C, ar); @@ -2029,7 +2031,7 @@ void wm_event_do_handlers(bContext *C) action |= wm_handlers_do(C, event, &ar->handlers); /* fileread case (python), [#29489] */ - if (CTX_wm_window(C)==NULL) + if (CTX_wm_window(C) == NULL) return; doit |= (BLI_in_rcti(&ar->winrct, event->x, event->y)); @@ -2062,15 +2064,15 @@ void wm_event_do_handlers(bContext *C) action |= wm_handlers_do(C, event, &win->handlers); /* fileread case */ - if (CTX_wm_window(C)==NULL) + if (CTX_wm_window(C) == NULL) return; } /* XXX hrmf, this gives reliable previous mouse coord for area change, feels bad? * doing it on ghost queue gives errors when mousemoves go over area borders */ if (doit && win->screen && win->screen->subwinactive != win->screen->mainwin) { - win->eventstate->prevx= event->x; - win->eventstate->prevy= event->y; + win->eventstate->prevx = event->x; + win->eventstate->prevy = event->y; //printf("win->eventstate->prev = %d %d\n", event->x, event->y); } else { @@ -2120,13 +2122,13 @@ void wm_event_do_handlers(bContext *C) /* only add mousemove when queue was read entirely */ if (win->addmousemove && win->eventstate) { - wmEvent tevent= *(win->eventstate); + wmEvent tevent = *(win->eventstate); //printf("adding MOUSEMOVE %d %d\n", tevent.x, tevent.y); - tevent.type= MOUSEMOVE; - tevent.prevx= tevent.x; - tevent.prevy= tevent.y; + tevent.type = MOUSEMOVE; + tevent.prevx = tevent.x; + tevent.prevy = tevent.y; wm_event_add(win, &tevent); - win->addmousemove= 0; + win->addmousemove = 0; } CTX_wm_window_set(C, NULL); @@ -2143,12 +2145,12 @@ void WM_event_fileselect_event(bContext *C, void *ophandle, int eventval) /* add to all windows! */ wmWindow *win; - for (win= CTX_wm_manager(C)->windows.first; win; win= win->next) { - wmEvent event= *win->eventstate; + for (win = CTX_wm_manager(C)->windows.first; win; win = win->next) { + wmEvent event = *win->eventstate; - event.type= EVT_FILESELECT; - event.val= eventval; - event.customdata= ophandle; // only as void pointer type check + event.type = EVT_FILESELECT; + event.val = eventval; + event.customdata = ophandle; // only as void pointer type check wm_event_add(win, &event); } @@ -2165,12 +2167,12 @@ void WM_event_fileselect_event(bContext *C, void *ophandle, int eventval) void WM_event_add_fileselect(bContext *C, wmOperator *op) { wmEventHandler *handler, *handlernext; - wmWindow *win= CTX_wm_window(C); - int full= 1; // XXX preset? + wmWindow *win = CTX_wm_window(C); + int full = 1; // XXX preset? /* only allow 1 file selector open per window */ - for (handler= win->modalhandlers.first; handler; handler=handlernext) { - handlernext= handler->next; + for (handler = win->modalhandlers.first; handler; handler = handlernext) { + handlernext = handler->next; if (handler->type == WM_HANDLER_FILESELECT) { if (handler->op) @@ -2182,11 +2184,11 @@ void WM_event_add_fileselect(bContext *C, wmOperator *op) handler = MEM_callocN(sizeof(wmEventHandler), "fileselect handler"); - handler->type= WM_HANDLER_FILESELECT; - handler->op= op; - handler->op_area= CTX_wm_area(C); - handler->op_region= CTX_wm_region(C); - handler->filescreen= CTX_wm_screen(C); + handler->type = WM_HANDLER_FILESELECT; + handler->op = op; + handler->op_area = CTX_wm_area(C); + handler->op_region = CTX_wm_region(C); + handler->filescreen = CTX_wm_screen(C); BLI_addhead(&win->modalhandlers, handler); @@ -2196,34 +2198,34 @@ void WM_event_add_fileselect(bContext *C, wmOperator *op) op->type->check(C, op); /* ignore return value */ } - WM_event_fileselect_event(C, op, full?EVT_FILESELECT_FULL_OPEN:EVT_FILESELECT_OPEN); + WM_event_fileselect_event(C, op, full ? EVT_FILESELECT_FULL_OPEN : EVT_FILESELECT_OPEN); } #if 0 /* lets not expose struct outside wm? */ static void WM_event_set_handler_flag(wmEventHandler *handler, int flag) { - handler->flag= flag; + handler->flag = flag; } #endif wmEventHandler *WM_event_add_modal_handler(bContext *C, wmOperator *op) { - wmEventHandler *handler= MEM_callocN(sizeof(wmEventHandler), "event modal handler"); - wmWindow *win= CTX_wm_window(C); + wmEventHandler *handler = MEM_callocN(sizeof(wmEventHandler), "event modal handler"); + wmWindow *win = CTX_wm_window(C); /* operator was part of macro */ if (op->opm) { /* give the mother macro to the handler */ - handler->op= op->opm; + handler->op = op->opm; /* mother macro opm becomes the macro element */ - handler->op->opm= op; + handler->op->opm = op; } else - handler->op= op; + handler->op = op; - handler->op_area= CTX_wm_area(C); /* means frozen screen context for modal handlers! */ - handler->op_region= CTX_wm_region(C); + handler->op_area = CTX_wm_area(C); /* means frozen screen context for modal handlers! */ + handler->op_region = CTX_wm_region(C); BLI_addhead(&win->modalhandlers, handler); @@ -2240,13 +2242,13 @@ wmEventHandler *WM_event_add_keymap_handler(ListBase *handlers, wmKeyMap *keymap } /* only allow same keymap once */ - for (handler= handlers->first; handler; handler= handler->next) - if (handler->keymap==keymap) + for (handler = handlers->first; handler; handler = handler->next) + if (handler->keymap == keymap) return handler; - handler= MEM_callocN(sizeof(wmEventHandler), "event keymap handler"); + handler = MEM_callocN(sizeof(wmEventHandler), "event keymap handler"); BLI_addtail(handlers, handler); - handler->keymap= keymap; + handler->keymap = keymap; return handler; } @@ -2258,20 +2260,20 @@ wmEventHandler *WM_event_add_keymap_handler_priority(ListBase *handlers, wmKeyMa WM_event_remove_keymap_handler(handlers, keymap); - handler= MEM_callocN(sizeof(wmEventHandler), "event keymap handler"); + handler = MEM_callocN(sizeof(wmEventHandler), "event keymap handler"); BLI_addhead(handlers, handler); - handler->keymap= keymap; + handler->keymap = keymap; return handler; } wmEventHandler *WM_event_add_keymap_handler_bb(ListBase *handlers, wmKeyMap *keymap, rcti *bblocal, rcti *bbwin) { - wmEventHandler *handler= WM_event_add_keymap_handler(handlers, keymap); + wmEventHandler *handler = WM_event_add_keymap_handler(handlers, keymap); if (handler) { - handler->bblocal= bblocal; - handler->bbwin= bbwin; + handler->bblocal = bblocal; + handler->bbwin = bbwin; } return handler; } @@ -2280,8 +2282,8 @@ void WM_event_remove_keymap_handler(ListBase *handlers, wmKeyMap *keymap) { wmEventHandler *handler; - for (handler= handlers->first; handler; handler= handler->next) { - if (handler->keymap==keymap) { + for (handler = handlers->first; handler; handler = handler->next) { + if (handler->keymap == keymap) { BLI_remlink(handlers, handler); wm_event_free_handler(handler); break; @@ -2292,13 +2294,13 @@ void WM_event_remove_keymap_handler(ListBase *handlers, wmKeyMap *keymap) wmEventHandler *WM_event_add_ui_handler(const bContext *C, ListBase *handlers, wmUIHandlerFunc func, wmUIHandlerRemoveFunc remove, void *userdata) { - wmEventHandler *handler= MEM_callocN(sizeof(wmEventHandler), "event ui handler"); - handler->ui_handle= func; - handler->ui_remove= remove; - handler->ui_userdata= userdata; - handler->ui_area= (C)? CTX_wm_area(C): NULL; - handler->ui_region= (C)? CTX_wm_region(C): NULL; - handler->ui_menu= (C)? CTX_wm_menu(C): NULL; + wmEventHandler *handler = MEM_callocN(sizeof(wmEventHandler), "event ui handler"); + handler->ui_handle = func; + handler->ui_remove = remove; + handler->ui_userdata = userdata; + handler->ui_area = (C) ? CTX_wm_area(C) : NULL; + handler->ui_region = (C) ? CTX_wm_region(C) : NULL; + handler->ui_menu = (C) ? CTX_wm_menu(C) : NULL; BLI_addhead(handlers, handler); @@ -2311,7 +2313,7 @@ void WM_event_remove_ui_handler(ListBase *handlers, { wmEventHandler *handler; - for (handler= handlers->first; handler; handler= handler->next) { + for (handler = handlers->first; handler; handler = handler->next) { if (handler->ui_handle == func && handler->ui_remove == remove && handler->ui_userdata == userdata) { /* handlers will be freed in wm_handlers_do() */ if (postpone) { @@ -2331,14 +2333,14 @@ wmEventHandler *WM_event_add_dropbox_handler(ListBase *handlers, ListBase *dropb wmEventHandler *handler; /* only allow same dropbox once */ - for (handler= handlers->first; handler; handler= handler->next) - if (handler->dropboxes==dropboxes) + for (handler = handlers->first; handler; handler = handler->next) + if (handler->dropboxes == dropboxes) return handler; - handler= MEM_callocN(sizeof(wmEventHandler), "dropbox handler"); + handler = MEM_callocN(sizeof(wmEventHandler), "dropbox handler"); /* dropbox stored static, no free or copy */ - handler->dropboxes= dropboxes; + handler->dropboxes = dropboxes; BLI_addhead(handlers, handler); return handler; @@ -2349,7 +2351,7 @@ void WM_event_remove_area_handler(ListBase *handlers, void *area) { wmEventHandler *handler, *nexthandler; - for (handler = handlers->first; handler; handler= nexthandler) { + for (handler = handlers->first; handler; handler = nexthandler) { nexthandler = handler->next; if (handler->type != WM_HANDLER_FILESELECT) { if (handler->ui_area == area) { @@ -2370,9 +2372,9 @@ static void WM_event_remove_handler(ListBase *handlers, wmEventHandler *handler) void WM_event_add_mousemove(bContext *C) { - wmWindow *window= CTX_wm_window(C); + wmWindow *window = CTX_wm_window(C); - window->addmousemove= 1; + window->addmousemove = 1; } /* for modal callbacks, check configuration for how to interpret exit with tweaks */ @@ -2415,85 +2417,85 @@ int WM_modal_tweak_exit(wmEvent *evt, int tweak_event) static int convert_key(GHOST_TKey key) { - if (key>=GHOST_kKeyA && key<=GHOST_kKeyZ) { + if (key >= GHOST_kKeyA && key <= GHOST_kKeyZ) { return (AKEY + ((int) key - GHOST_kKeyA)); } - else if (key>=GHOST_kKey0 && key<=GHOST_kKey9) { + else if (key >= GHOST_kKey0 && key <= GHOST_kKey9) { return (ZEROKEY + ((int) key - GHOST_kKey0)); } - else if (key>=GHOST_kKeyNumpad0 && key<=GHOST_kKeyNumpad9) { + else if (key >= GHOST_kKeyNumpad0 && key <= GHOST_kKeyNumpad9) { return (PAD0 + ((int) key - GHOST_kKeyNumpad0)); } - else if (key>=GHOST_kKeyF1 && key<=GHOST_kKeyF19) { + else if (key >= GHOST_kKeyF1 && key <= GHOST_kKeyF19) { return (F1KEY + ((int) key - GHOST_kKeyF1)); } else { switch (key) { - case GHOST_kKeyBackSpace: return BACKSPACEKEY; - case GHOST_kKeyTab: return TABKEY; - case GHOST_kKeyLinefeed: return LINEFEEDKEY; - case GHOST_kKeyClear: return 0; - case GHOST_kKeyEnter: return RETKEY; - - case GHOST_kKeyEsc: return ESCKEY; - case GHOST_kKeySpace: return SPACEKEY; - case GHOST_kKeyQuote: return QUOTEKEY; - case GHOST_kKeyComma: return COMMAKEY; - case GHOST_kKeyMinus: return MINUSKEY; - case GHOST_kKeyPeriod: return PERIODKEY; - case GHOST_kKeySlash: return SLASHKEY; - - case GHOST_kKeySemicolon: return SEMICOLONKEY; - case GHOST_kKeyEqual: return EQUALKEY; - - case GHOST_kKeyLeftBracket: return LEFTBRACKETKEY; - case GHOST_kKeyRightBracket: return RIGHTBRACKETKEY; - case GHOST_kKeyBackslash: return BACKSLASHKEY; - case GHOST_kKeyAccentGrave: return ACCENTGRAVEKEY; - - case GHOST_kKeyLeftShift: return LEFTSHIFTKEY; - case GHOST_kKeyRightShift: return RIGHTSHIFTKEY; - case GHOST_kKeyLeftControl: return LEFTCTRLKEY; - case GHOST_kKeyRightControl: return RIGHTCTRLKEY; - case GHOST_kKeyOS: return OSKEY; - case GHOST_kKeyLeftAlt: return LEFTALTKEY; - case GHOST_kKeyRightAlt: return RIGHTALTKEY; - - case GHOST_kKeyCapsLock: return CAPSLOCKKEY; - case GHOST_kKeyNumLock: return 0; - case GHOST_kKeyScrollLock: return 0; - - case GHOST_kKeyLeftArrow: return LEFTARROWKEY; - case GHOST_kKeyRightArrow: return RIGHTARROWKEY; - case GHOST_kKeyUpArrow: return UPARROWKEY; - case GHOST_kKeyDownArrow: return DOWNARROWKEY; - - case GHOST_kKeyPrintScreen: return 0; - case GHOST_kKeyPause: return PAUSEKEY; - - case GHOST_kKeyInsert: return INSERTKEY; - case GHOST_kKeyDelete: return DELKEY; - case GHOST_kKeyHome: return HOMEKEY; - case GHOST_kKeyEnd: return ENDKEY; - case GHOST_kKeyUpPage: return PAGEUPKEY; - case GHOST_kKeyDownPage: return PAGEDOWNKEY; - - case GHOST_kKeyNumpadPeriod: return PADPERIOD; - case GHOST_kKeyNumpadEnter: return PADENTER; - case GHOST_kKeyNumpadPlus: return PADPLUSKEY; - case GHOST_kKeyNumpadMinus: return PADMINUS; - case GHOST_kKeyNumpadAsterisk: return PADASTERKEY; - case GHOST_kKeyNumpadSlash: return PADSLASHKEY; - - case GHOST_kKeyGrLess: return GRLESSKEY; - - case GHOST_kKeyMediaPlay: return MEDIAPLAY; - case GHOST_kKeyMediaStop: return MEDIASTOP; - case GHOST_kKeyMediaFirst: return MEDIAFIRST; - case GHOST_kKeyMediaLast: return MEDIALAST; + case GHOST_kKeyBackSpace: return BACKSPACEKEY; + case GHOST_kKeyTab: return TABKEY; + case GHOST_kKeyLinefeed: return LINEFEEDKEY; + case GHOST_kKeyClear: return 0; + case GHOST_kKeyEnter: return RETKEY; + + case GHOST_kKeyEsc: return ESCKEY; + case GHOST_kKeySpace: return SPACEKEY; + case GHOST_kKeyQuote: return QUOTEKEY; + case GHOST_kKeyComma: return COMMAKEY; + case GHOST_kKeyMinus: return MINUSKEY; + case GHOST_kKeyPeriod: return PERIODKEY; + case GHOST_kKeySlash: return SLASHKEY; + + case GHOST_kKeySemicolon: return SEMICOLONKEY; + case GHOST_kKeyEqual: return EQUALKEY; + + case GHOST_kKeyLeftBracket: return LEFTBRACKETKEY; + case GHOST_kKeyRightBracket: return RIGHTBRACKETKEY; + case GHOST_kKeyBackslash: return BACKSLASHKEY; + case GHOST_kKeyAccentGrave: return ACCENTGRAVEKEY; + + case GHOST_kKeyLeftShift: return LEFTSHIFTKEY; + case GHOST_kKeyRightShift: return RIGHTSHIFTKEY; + case GHOST_kKeyLeftControl: return LEFTCTRLKEY; + case GHOST_kKeyRightControl: return RIGHTCTRLKEY; + case GHOST_kKeyOS: return OSKEY; + case GHOST_kKeyLeftAlt: return LEFTALTKEY; + case GHOST_kKeyRightAlt: return RIGHTALTKEY; + + case GHOST_kKeyCapsLock: return CAPSLOCKKEY; + case GHOST_kKeyNumLock: return 0; + case GHOST_kKeyScrollLock: return 0; + + case GHOST_kKeyLeftArrow: return LEFTARROWKEY; + case GHOST_kKeyRightArrow: return RIGHTARROWKEY; + case GHOST_kKeyUpArrow: return UPARROWKEY; + case GHOST_kKeyDownArrow: return DOWNARROWKEY; + + case GHOST_kKeyPrintScreen: return 0; + case GHOST_kKeyPause: return PAUSEKEY; + + case GHOST_kKeyInsert: return INSERTKEY; + case GHOST_kKeyDelete: return DELKEY; + case GHOST_kKeyHome: return HOMEKEY; + case GHOST_kKeyEnd: return ENDKEY; + case GHOST_kKeyUpPage: return PAGEUPKEY; + case GHOST_kKeyDownPage: return PAGEDOWNKEY; + + case GHOST_kKeyNumpadPeriod: return PADPERIOD; + case GHOST_kKeyNumpadEnter: return PADENTER; + case GHOST_kKeyNumpadPlus: return PADPLUSKEY; + case GHOST_kKeyNumpadMinus: return PADMINUS; + case GHOST_kKeyNumpadAsterisk: return PADASTERKEY; + case GHOST_kKeyNumpadSlash: return PADSLASHKEY; + + case GHOST_kKeyGrLess: return GRLESSKEY; + + case GHOST_kKeyMediaPlay: return MEDIAPLAY; + case GHOST_kKeyMediaStop: return MEDIASTOP; + case GHOST_kKeyMediaFirst: return MEDIAFIRST; + case GHOST_kKeyMediaLast: return MEDIALAST; default: - return UNKNOWNKEY; /* GHOST_kKeyUnknown */ + return UNKNOWNKEY; /* GHOST_kKeyUnknown */ } } } @@ -2501,27 +2503,27 @@ static int convert_key(GHOST_TKey key) /* adds customdata to event */ static void update_tablet_data(wmWindow *win, wmEvent *event) { - const GHOST_TabletData *td= GHOST_GetTabletData(win->ghostwin); + const GHOST_TabletData *td = GHOST_GetTabletData(win->ghostwin); /* if there's tablet data from an active tablet device then add it */ if ((td != NULL) && td->Active != GHOST_kTabletModeNone) { - struct wmTabletData *wmtab= MEM_mallocN(sizeof(wmTabletData), "customdata tablet"); + struct wmTabletData *wmtab = MEM_mallocN(sizeof(wmTabletData), "customdata tablet"); wmtab->Active = (int)td->Active; wmtab->Pressure = td->Pressure; wmtab->Xtilt = td->Xtilt; wmtab->Ytilt = td->Ytilt; - event->custom= EVT_DATA_TABLET; - event->customdata= wmtab; - event->customdatafree= 1; + event->custom = EVT_DATA_TABLET; + event->customdata = wmtab; + event->customdatafree = 1; } } /* adds customdata to event */ -static void attach_ndof_data(wmEvent* event, const GHOST_TEventNDOFMotionData* ghost) +static void attach_ndof_data(wmEvent *event, const GHOST_TEventNDOFMotionData *ghost) { - wmNDOFMotionData* data = MEM_mallocN(sizeof(wmNDOFMotionData), "customdata NDOF"); + wmNDOFMotionData *data = MEM_mallocN(sizeof(wmNDOFMotionData), "customdata NDOF"); const float s = U.ndof_sensitivity; @@ -2545,11 +2547,11 @@ static void attach_ndof_data(wmEvent* event, const GHOST_TEventNDOFMotionData* g data->ry = s * ghost->rz; data->rz = s * ghost->ry; #endif - } + } else { data->ty = s * ghost->ty; data->tz = s * ghost->tz; - } + } data->dt = ghost->dt; @@ -2563,19 +2565,19 @@ static void attach_ndof_data(wmEvent* event, const GHOST_TEventNDOFMotionData* g /* imperfect but probably usable... draw/enable drags to other windows */ static wmWindow *wm_event_cursor_other_windows(wmWindowManager *wm, wmWindow *win, wmEvent *evt) { - int mx= evt->x, my= evt->y; + int mx = evt->x, my = evt->y; - if (wm->windows.first== wm->windows.last) + if (wm->windows.first == wm->windows.last) return NULL; /* top window bar... */ - if (mx<0 || my<0 || mx>win->sizex || my>win->sizey+30) { + if (mx < 0 || my < 0 || mx > win->sizex || my > win->sizey + 30) { wmWindow *owin; wmEventHandler *handler; /* let's skip windows having modal handlers now */ /* potential XXX ugly... I wouldn't have added a modalhandlers list (introduced in rev 23331, ton) */ - for (handler= win->modalhandlers.first; handler; handler= handler->next) + for (handler = win->modalhandlers.first; handler; handler = handler->next) if (handler->ui_handle || handler->op) return NULL; @@ -2584,13 +2586,13 @@ static wmWindow *wm_event_cursor_other_windows(wmWindowManager *wm, wmWindow *wi my += (int)win->posy; /* check other windows to see if it has mouse inside */ - for (owin= wm->windows.first; owin; owin= owin->next) { + for (owin = wm->windows.first; owin; owin = owin->next) { - if (owin!=win) { - if (mx-owin->posx >= 0 && my-owin->posy >= 0 && - mx-owin->posx <= owin->sizex && my-owin->posy <= owin->sizey) { - evt->x= mx - (int)owin->posx; - evt->y= my - (int)owin->posy; + if (owin != win) { + if (mx - owin->posx >= 0 && my - owin->posy >= 0 && + mx - owin->posx <= owin->sizex && my - owin->posy <= owin->sizey) { + evt->x = mx - (int)owin->posx; + evt->y = my - (int)owin->posy; return owin; } @@ -2605,27 +2607,27 @@ static wmWindow *wm_event_cursor_other_windows(wmWindowManager *wm, wmWindow *wi void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int UNUSED(time), void *customdata) { wmWindow *owin; - wmEvent event, *evt= win->eventstate; + wmEvent event, *evt = win->eventstate; /* initialize and copy state (only mouse x y and modifiers) */ - event= *evt; + event = *evt; switch (type) { /* mouse move */ case GHOST_kEventCursorMove: { if (win->active) { - GHOST_TEventCursorData *cd= customdata; - wmEvent *lastevent= win->queue.last; + GHOST_TEventCursorData *cd = customdata; + wmEvent *lastevent = win->queue.last; int cx, cy; GHOST_ScreenToClient(win->ghostwin, cd->x, cd->y, &cx, &cy); - evt->x= cx; - evt->y= (win->sizey-1) - cy; + evt->x = cx; + evt->y = (win->sizey - 1) - cy; - event.x= evt->x; - event.y= evt->y; + event.x = evt->x; + event.y = evt->y; - event.type= MOUSEMOVE; + event.type = MOUSEMOVE; /* some painting operators want accurate mouse events, they can * handle in between mouse move moves, others can happily ignore @@ -2640,13 +2642,13 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U /* also add to other window if event is there, this makes overdraws disappear nicely */ /* it remaps mousecoord to other window in event */ - owin= wm_event_cursor_other_windows(wm, win, &event); + owin = wm_event_cursor_other_windows(wm, win, &event); if (owin) { - wmEvent oevent= *(owin->eventstate); + wmEvent oevent = *(owin->eventstate); - oevent.x=owin->eventstate->x= event.x; - oevent.y=owin->eventstate->y= event.y; - oevent.type= MOUSEMOVE; + oevent.x = owin->eventstate->x = event.x; + oevent.y = owin->eventstate->y = event.y; + oevent.type = MOUSEMOVE; update_tablet_data(owin, &oevent); wm_event_add(owin, &oevent); @@ -2656,7 +2658,7 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U break; } case GHOST_kEventTrackpad: { - GHOST_TEventTrackpadData * pd = customdata; + GHOST_TEventTrackpadData *pd = customdata; switch (pd->subtype) { case GHOST_kTrackpadEventMagnify: event.type = MOUSEZOOM; @@ -2666,20 +2668,20 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U break; case GHOST_kTrackpadEventScroll: default: - event.type= MOUSEPAN; + event.type = MOUSEPAN; break; } { int cx, cy; GHOST_ScreenToClient(win->ghostwin, pd->x, pd->y, &cx, &cy); - event.x= evt->x= cx; - event.y= evt->y= (win->sizey-1) - cy; + event.x = evt->x = cx; + event.y = evt->y = (win->sizey - 1) - cy; } // Use prevx/prevy so we can calculate the delta later - event.prevx= event.x - pd->deltaX; - event.prevy= event.y - (-pd->deltaY); + event.prevx = event.x - pd->deltaX; + event.prevy = event.y - (-pd->deltaY); update_tablet_data(win, &event); wm_event_add(win, &event); @@ -2688,41 +2690,41 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U /* mouse button */ case GHOST_kEventButtonDown: case GHOST_kEventButtonUp: { - GHOST_TEventButtonData *bd= customdata; + GHOST_TEventButtonData *bd = customdata; /* Note!, this starts as 0/1 but later is converted to KM_PRESS/KM_RELEASE by tweak */ - event.val= (type==GHOST_kEventButtonDown) ? KM_PRESS:KM_RELEASE; + event.val = (type == GHOST_kEventButtonDown) ? KM_PRESS : KM_RELEASE; if (bd->button == GHOST_kButtonMaskLeft) - event.type= LEFTMOUSE; + event.type = LEFTMOUSE; else if (bd->button == GHOST_kButtonMaskRight) - event.type= RIGHTMOUSE; + event.type = RIGHTMOUSE; else if (bd->button == GHOST_kButtonMaskButton4) - event.type= BUTTON4MOUSE; + event.type = BUTTON4MOUSE; else if (bd->button == GHOST_kButtonMaskButton5) - event.type= BUTTON5MOUSE; + event.type = BUTTON5MOUSE; else - event.type= MIDDLEMOUSE; + event.type = MIDDLEMOUSE; - if (win->active==0) { + if (win->active == 0) { int cx, cy; /* entering window, update mouse pos. (ghost sends win-activate *after* the mouseclick in window!) */ wm_get_cursor_position(win, &cx, &cy); - event.x= evt->x= cx; - event.y= evt->y= cy; + event.x = evt->x = cx; + event.y = evt->y = cy; } /* add to other window if event is there (not to both!) */ - owin= wm_event_cursor_other_windows(wm, win, &event); + owin = wm_event_cursor_other_windows(wm, win, &event); if (owin) { - wmEvent oevent= *(owin->eventstate); + wmEvent oevent = *(owin->eventstate); - oevent.x= event.x; - oevent.y= event.y; - oevent.type= event.type; - oevent.val= event.val; + oevent.x = event.x; + oevent.y = event.y; + oevent.type = event.type; + oevent.val = event.val; update_tablet_data(owin, &oevent); wm_event_add(owin, &oevent); @@ -2737,66 +2739,66 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U /* keyboard */ case GHOST_kEventKeyDown: case GHOST_kEventKeyUp: { - GHOST_TEventKeyData *kd= customdata; - event.type= convert_key(kd->key); - event.ascii= kd->ascii; - memcpy(event.utf8_buf, kd->utf8_buf,sizeof(event.utf8_buf));/* might be not null terminated*/ - event.val= (type==GHOST_kEventKeyDown)?KM_PRESS:KM_RELEASE; + GHOST_TEventKeyData *kd = customdata; + event.type = convert_key(kd->key); + event.ascii = kd->ascii; + memcpy(event.utf8_buf, kd->utf8_buf, sizeof(event.utf8_buf)); /* might be not null terminated*/ + event.val = (type == GHOST_kEventKeyDown) ? KM_PRESS : KM_RELEASE; /* exclude arrow keys, esc, etc from text input */ - if (type==GHOST_kEventKeyUp) { - event.ascii= '\0'; + if (type == GHOST_kEventKeyUp) { + event.ascii = '\0'; /* ghost should do this already for key up */ if (event.utf8_buf[0]) { printf("%s: ghost on your platform is misbehaving, utf8 events on key up!\n", __func__); } - event.utf8_buf[0]= '\0'; + event.utf8_buf[0] = '\0'; } else { - if (event.ascii<32 && event.ascii > 0) - event.ascii= '\0'; - if (event.utf8_buf[0]<32 && event.utf8_buf[0] > 0) - event.utf8_buf[0]= '\0'; + if (event.ascii < 32 && event.ascii > 0) + event.ascii = '\0'; + if (event.utf8_buf[0] < 32 && event.utf8_buf[0] > 0) + event.utf8_buf[0] = '\0'; } if (event.utf8_buf[0]) { if (BLI_str_utf8_size(event.utf8_buf) == -1) { printf("%s: ghost detected an invalid unicode character '%d'!\n", __func__, (int)(unsigned char)event.utf8_buf[0]); - event.utf8_buf[0]= '\0'; + event.utf8_buf[0] = '\0'; } } /* modifiers */ /* assigning both first and second is strange - campbell */ - switch(event.type) { - case LEFTSHIFTKEY: case RIGHTSHIFTKEY: - event.shift = evt->shift = (event.val == KM_PRESS) ? - ((evt->ctrl || evt->alt || evt->oskey) ? (KM_MOD_FIRST | KM_MOD_SECOND) : KM_MOD_FIRST) : - FALSE; - break; - case LEFTCTRLKEY: case RIGHTCTRLKEY: - event.ctrl = evt->ctrl = (event.val == KM_PRESS) ? - ((evt->shift || evt->alt || evt->oskey) ? (KM_MOD_FIRST | KM_MOD_SECOND) : KM_MOD_FIRST) : - FALSE; - break; - case LEFTALTKEY: case RIGHTALTKEY: - event.alt = evt->alt = (event.val == KM_PRESS) ? - ((evt->ctrl || evt->shift || evt->oskey) ? (KM_MOD_FIRST | KM_MOD_SECOND) : KM_MOD_FIRST) : - FALSE; - break; - case OSKEY: - event.oskey = evt->oskey = (event.val == KM_PRESS) ? - ((evt->ctrl || evt->alt || evt->shift) ? (KM_MOD_FIRST | KM_MOD_SECOND) : KM_MOD_FIRST) : - FALSE; - break; - default: - if (event.val == KM_PRESS && event.keymodifier==0) - evt->keymodifier= event.type; /* only set in eventstate, for next event */ - else if (event.val==KM_RELEASE && event.keymodifier==event.type) - event.keymodifier= evt->keymodifier= 0; - break; + switch (event.type) { + case LEFTSHIFTKEY: case RIGHTSHIFTKEY: + event.shift = evt->shift = (event.val == KM_PRESS) ? + ((evt->ctrl || evt->alt || evt->oskey) ? (KM_MOD_FIRST | KM_MOD_SECOND) : KM_MOD_FIRST) : + FALSE; + break; + case LEFTCTRLKEY: case RIGHTCTRLKEY: + event.ctrl = evt->ctrl = (event.val == KM_PRESS) ? + ((evt->shift || evt->alt || evt->oskey) ? (KM_MOD_FIRST | KM_MOD_SECOND) : KM_MOD_FIRST) : + FALSE; + break; + case LEFTALTKEY: case RIGHTALTKEY: + event.alt = evt->alt = (event.val == KM_PRESS) ? + ((evt->ctrl || evt->shift || evt->oskey) ? (KM_MOD_FIRST | KM_MOD_SECOND) : KM_MOD_FIRST) : + FALSE; + break; + case OSKEY: + event.oskey = evt->oskey = (event.val == KM_PRESS) ? + ((evt->ctrl || evt->alt || evt->shift) ? (KM_MOD_FIRST | KM_MOD_SECOND) : KM_MOD_FIRST) : + FALSE; + break; + default: + if (event.val == KM_PRESS && event.keymodifier == 0) + evt->keymodifier = event.type; /* only set in eventstate, for next event */ + else if (event.val == KM_RELEASE && event.keymodifier == event.type) + event.keymodifier = evt->keymodifier = 0; + break; } /* this case happens on some systems that on holding a key pressed, @@ -2804,39 +2806,39 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U * modifier in win->eventstate, but for the press event of the same * key we don't want the key modifier */ if (event.keymodifier == event.type) - event.keymodifier= 0; + event.keymodifier = 0; /* this case happened with an external numpad, it's not really clear * why, but it's also impossible to map a key modifier to an unknwon * key, so it shouldn't harm */ if (event.keymodifier == UNKNOWNKEY) - event.keymodifier= 0; + event.keymodifier = 0; /* if test_break set, it catches this. XXX Keep global for now? */ - if (event.type==ESCKEY) - G.afbreek= 1; + if (event.type == ESCKEY) + G.afbreek = 1; wm_event_add(win, &event); break; } - case GHOST_kEventWheel: { - GHOST_TEventWheelData* wheelData = customdata; + case GHOST_kEventWheel: { + GHOST_TEventWheelData *wheelData = customdata; if (wheelData->z > 0) - event.type= WHEELUPMOUSE; + event.type = WHEELUPMOUSE; else - event.type= WHEELDOWNMOUSE; + event.type = WHEELDOWNMOUSE; - event.val= KM_PRESS; + event.val = KM_PRESS; wm_event_add(win, &event); break; } case GHOST_kEventTimer: { - event.type= TIMER; - event.custom= EVT_DATA_TIMER; - event.customdata= customdata; + event.type = TIMER; + event.custom = EVT_DATA_TIMER; + event.customdata = customdata; wm_event_add(win, &event); break; @@ -2853,7 +2855,7 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U } case GHOST_kEventNDOFButton: { - GHOST_TEventNDOFButtonData* e = customdata; + GHOST_TEventNDOFButtonData *e = customdata; event.type = NDOF_BUTTON_NONE + e->button; @@ -2864,7 +2866,7 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U case GHOST_kRelease: event.val = KM_RELEASE; break; - } + } event.custom = 0; event.customdata = NULL; @@ -2879,7 +2881,7 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U break; case GHOST_kEventWindowDeactivate: { - event.type= WINDEACTIVATE; + event.type = WINDEACTIVATE; wm_event_add(win, &event); break; diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index db75c789b06..763f1e3b11b 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -28,9 +28,9 @@ */ - /* placed up here because of crappy - * winsock stuff. - */ +/* placed up here because of crappy + * winsock stuff. + */ #include #include #include @@ -131,20 +131,20 @@ static void wm_window_match_init(bContext *C, ListBase *wmlist) wmWindowManager *wm; wmWindow *win, *active_win; - *wmlist= G.main->wm; - G.main->wm.first= G.main->wm.last= NULL; + *wmlist = G.main->wm; + G.main->wm.first = G.main->wm.last = NULL; active_win = CTX_wm_window(C); /* first wrap up running stuff */ /* code copied from wm_init_exit.c */ - for (wm= wmlist->first; wm; wm= wm->id.next) { + for (wm = wmlist->first; wm; wm = wm->id.next) { WM_jobs_stop_all(wm); - for (win= wm->windows.first; win; win= win->next) { + for (win = wm->windows.first; win; win = win->next) { - CTX_wm_window_set(C, win); /* needed by operator close callbacks */ + CTX_wm_window_set(C, win); /* needed by operator close callbacks */ WM_event_remove_handlers(C, &win->handlers); WM_event_remove_handlers(C, &win->modalhandlers); ED_screen_exit(C, win, win->screen); @@ -158,13 +158,13 @@ static void wm_window_match_init(bContext *C, ListBase *wmlist) /* just had return; here from r12991, this code could just get removed?*/ #if 0 - if (wm==NULL) return; + if (wm == NULL) return; if (G.fileflags & G_FILE_NO_UI) return; /* we take apart the used screens from non-active window */ - for (win= wm->windows.first; win; win= win->next) { + for (win = wm->windows.first; win; win = win->next) { BLI_strncpy(win->screenname, win->screen->id.name, MAX_ID_NAME); - if (win!=wm->winactive) { + if (win != wm->winactive) { BLI_remlink(&G.main->screen, win->screen); //BLI_addtail(screenbase, win->screen); } @@ -185,8 +185,8 @@ static void wm_window_match_do(bContext *C, ListBase *oldwmlist) wmWindow *oldwin, *win; /* cases 1 and 2 */ - if (oldwmlist->first==NULL) { - if (G.main->wm.first); /* nothing todo */ + if (oldwmlist->first == NULL) { + if (G.main->wm.first) ; /* nothing todo */ else wm_add_default(C); } @@ -194,29 +194,29 @@ static void wm_window_match_do(bContext *C, ListBase *oldwmlist) /* cases 3 and 4 */ /* we've read file without wm..., keep current one entirely alive */ - if (G.main->wm.first==NULL) { - bScreen *screen= NULL; + if (G.main->wm.first == NULL) { + bScreen *screen = NULL; /* when loading without UI, no matching needed */ - if (!(G.fileflags & G_FILE_NO_UI) && (screen= CTX_wm_screen(C))) { + if (!(G.fileflags & G_FILE_NO_UI) && (screen = CTX_wm_screen(C))) { /* match oldwm to new dbase, only old files */ - for (wm= oldwmlist->first; wm; wm= wm->id.next) { + for (wm = oldwmlist->first; wm; wm = wm->id.next) { - for (win= wm->windows.first; win; win= win->next) { + for (win = wm->windows.first; win; win = win->next) { /* all windows get active screen from file */ - if (screen->winid==0) - win->screen= screen; + if (screen->winid == 0) + win->screen = screen; else - win->screen= ED_screen_duplicate(win, screen); + win->screen = ED_screen_duplicate(win, screen); - BLI_strncpy(win->screenname, win->screen->id.name+2, sizeof(win->screenname)); - win->screen->winid= win->winid; + BLI_strncpy(win->screenname, win->screen->id.name + 2, sizeof(win->screenname)); + win->screen->winid = win->winid; } } } - G.main->wm= *oldwmlist; + G.main->wm = *oldwmlist; /* screens were read from file! */ ED_screens_initialize(G.main->wm.first); @@ -224,47 +224,47 @@ static void wm_window_match_do(bContext *C, ListBase *oldwmlist) else { /* what if old was 3, and loaded 1? */ /* this code could move to setup_appdata */ - oldwm= oldwmlist->first; - wm= G.main->wm.first; + oldwm = oldwmlist->first; + wm = G.main->wm.first; /* preserve key configurations in new wm, to preserve their keymaps */ - wm->keyconfigs= oldwm->keyconfigs; - wm->addonconf= oldwm->addonconf; - wm->defaultconf= oldwm->defaultconf; - wm->userconf= oldwm->userconf; + wm->keyconfigs = oldwm->keyconfigs; + wm->addonconf = oldwm->addonconf; + wm->defaultconf = oldwm->defaultconf; + wm->userconf = oldwm->userconf; - oldwm->keyconfigs.first= oldwm->keyconfigs.last= NULL; - oldwm->addonconf= NULL; - oldwm->defaultconf= NULL; - oldwm->userconf= NULL; + oldwm->keyconfigs.first = oldwm->keyconfigs.last = NULL; + oldwm->addonconf = NULL; + oldwm->defaultconf = NULL; + oldwm->userconf = NULL; /* ensure making new keymaps and set space types */ - wm->initialized= 0; - wm->winactive= NULL; + wm->initialized = 0; + wm->winactive = NULL; /* only first wm in list has ghostwins */ - for (win= wm->windows.first; win; win= win->next) { - for (oldwin= oldwm->windows.first; oldwin; oldwin= oldwin->next) { + for (win = wm->windows.first; win; win = win->next) { + for (oldwin = oldwm->windows.first; oldwin; oldwin = oldwin->next) { - if (oldwin->winid == win->winid ) { - win->ghostwin= oldwin->ghostwin; - win->active= oldwin->active; + if (oldwin->winid == win->winid) { + win->ghostwin = oldwin->ghostwin; + win->active = oldwin->active; if (win->active) - wm->winactive= win; + wm->winactive = win; if (!G.background) /* file loading in background mode still calls this */ - GHOST_SetWindowUserData(win->ghostwin, win); /* pointer back */ + GHOST_SetWindowUserData(win->ghostwin, win); /* pointer back */ - oldwin->ghostwin= NULL; + oldwin->ghostwin = NULL; - win->eventstate= oldwin->eventstate; - oldwin->eventstate= NULL; + win->eventstate = oldwin->eventstate; + oldwin->eventstate = NULL; /* ensure proper screen rescaling */ - win->sizex= oldwin->sizex; - win->sizey= oldwin->sizey; - win->posx= oldwin->posx; - win->posy= oldwin->posy; + win->sizex = oldwin->sizex; + win->sizey = oldwin->sizey; + win->posx = oldwin->posx; + win->posy = oldwin->posy; } } } @@ -281,14 +281,14 @@ static void wm_init_userdef(bContext *C) sound_init(CTX_data_main(C)); /* needed so loading a file from the command line respects user-pref [#26156] */ - if (U.flag & USER_FILENOUI) G.fileflags |= G_FILE_NO_UI; - else G.fileflags &= ~G_FILE_NO_UI; + if (U.flag & USER_FILENOUI) G.fileflags |= G_FILE_NO_UI; + else G.fileflags &= ~G_FILE_NO_UI; /* set the python auto-execute setting from user prefs */ /* enabled by default, unless explicitly enabled in the command line which overrides */ if ((G.f & G_SCRIPT_OVERRIDE_PREF) == 0) { if ((U.flag & USER_SCRIPT_AUTOEXEC_DISABLE) == 0) G.f |= G_SCRIPT_AUTOEXEC; - else G.f &= ~G_SCRIPT_AUTOEXEC; + else G.f &= ~G_SCRIPT_AUTOEXEC; } /* update tempdir from user preferences */ @@ -298,11 +298,11 @@ static void wm_init_userdef(bContext *C) /* return codes */ -#define BKE_READ_EXOTIC_FAIL_PATH -3 /* file format is not supported */ -#define BKE_READ_EXOTIC_FAIL_FORMAT -2 /* file format is not supported */ -#define BKE_READ_EXOTIC_FAIL_OPEN -1 /* Can't open the file */ -#define BKE_READ_EXOTIC_OK_BLEND 0 /* .blend file */ -#define BKE_READ_EXOTIC_OK_OTHER 1 /* other supported formats */ +#define BKE_READ_EXOTIC_FAIL_PATH -3 /* file format is not supported */ +#define BKE_READ_EXOTIC_FAIL_FORMAT -2 /* file format is not supported */ +#define BKE_READ_EXOTIC_FAIL_OPEN -1 /* Can't open the file */ +#define BKE_READ_EXOTIC_OK_BLEND 0 /* .blend file */ +#define BKE_READ_EXOTIC_OK_OTHER 1 /* other supported formats */ /* intended to check for non-blender formats but for now it only reads blends */ @@ -315,32 +315,32 @@ static int wm_read_exotic(Scene *UNUSED(scene), const char *name) // make sure we're not trying to read a directory.... - len= strlen(name); - if (ELEM(name[len-1], '/', '\\')) { - retval= BKE_READ_EXOTIC_FAIL_PATH; + len = strlen(name); + if (ELEM(name[len - 1], '/', '\\')) { + retval = BKE_READ_EXOTIC_FAIL_PATH; } else { - gzfile = BLI_gzopen(name,"rb"); + gzfile = BLI_gzopen(name, "rb"); if (gzfile == NULL) { - retval= BKE_READ_EXOTIC_FAIL_OPEN; + retval = BKE_READ_EXOTIC_FAIL_OPEN; } else { - len= gzread(gzfile, header, sizeof(header)); + len = gzread(gzfile, header, sizeof(header)); gzclose(gzfile); if (len == sizeof(header) && strncmp(header, "BLENDER", 7) == 0) { - retval= BKE_READ_EXOTIC_OK_BLEND; + retval = BKE_READ_EXOTIC_OK_BLEND; } else { //XXX waitcursor(1); -#if 0 /* historic stuff - no longer used */ +#if 0 /* historic stuff - no longer used */ if (is_foo_format(name)) { read_foo(name); - retval= BKE_READ_EXOTIC_OK_OTHER; + retval = BKE_READ_EXOTIC_OK_OTHER; } else #endif { - retval= BKE_READ_EXOTIC_FAIL_FORMAT; + retval = BKE_READ_EXOTIC_FAIL_FORMAT; } //XXX waitcursor(0); } @@ -364,25 +364,25 @@ void WM_read_file(bContext *C, const char *filepath, ReportList *reports) /* first try to append data from exotic file formats... */ /* it throws error box when file doesn't exist and returns -1 */ /* note; it should set some error message somewhere... (ton) */ - retval= wm_read_exotic(CTX_data_scene(C), filepath); + retval = wm_read_exotic(CTX_data_scene(C), filepath); /* we didn't succeed, now try to read Blender file */ if (retval == BKE_READ_EXOTIC_OK_BLEND) { - int G_f= G.f; + int G_f = G.f; ListBase wmbase; /* put aside screens to match with persistent windows later */ /* also exit screens and editors */ wm_window_match_init(C, &wmbase); - retval= BKE_read_file(C, filepath, reports); + retval = BKE_read_file(C, filepath, reports); G.save_over = 1; /* this flag is initialized by the operator but overwritten on read. * need to re-enable it here else drivers + registered scripts wont work. */ if (G.f != G_f) { - const int flags_keep= (G_SCRIPT_AUTOEXEC | G_SCRIPT_OVERRIDE_PREF); - G.f= (G.f & ~flags_keep) | (G_f & flags_keep); + const int flags_keep = (G_SCRIPT_AUTOEXEC | G_SCRIPT_OVERRIDE_PREF); + G.f = (G.f & ~flags_keep) | (G_f & flags_keep); } /* match the read WM with current WM */ @@ -403,7 +403,7 @@ void WM_read_file(bContext *C, const char *filepath, ReportList *reports) } - WM_event_add_notifier(C, NC_WM|ND_FILEREAD, NULL); + WM_event_add_notifier(C, NC_WM | ND_FILEREAD, NULL); // refresh_interface_font(); CTX_wm_window_set(C, CTX_wm_manager(C)->windows.first); @@ -434,14 +434,14 @@ void WM_read_file(bContext *C, const char *filepath, ReportList *reports) /* TODO, make this show in header info window */ { Scene *sce; - for (sce= G.main->scene.first; sce; sce= sce->id.next) { + for (sce = G.main->scene.first; sce; sce = sce->id.next) { if (sce->r.engine[0] && BLI_findstring(&R_engines, sce->r.engine, offsetof(RenderEngineType, idname)) == NULL) { BKE_reportf(reports, RPT_WARNING, "Engine not available: '%s' for scene: %s, " "an addon may need to be installed or enabled", - sce->r.engine, sce->id.name+2); + sce->r.engine, sce->id.name + 2); } } } @@ -449,13 +449,13 @@ void WM_read_file(bContext *C, const char *filepath, ReportList *reports) // XXX undo_editmode_clear(); BKE_reset_undo(); - BKE_write_undo(C, "original"); /* save current state */ + BKE_write_undo(C, "original"); /* save current state */ } else if (retval == BKE_READ_EXOTIC_OK_OTHER) BKE_write_undo(C, "Import file"); else if (retval == BKE_READ_EXOTIC_FAIL_OPEN) { BKE_reportf(reports, RPT_ERROR, IFACE_("Can't read file: \"%s\", %s."), filepath, - errno ? strerror(errno) : IFACE_("Unable to open the file")); + errno ? strerror(errno) : IFACE_("Unable to open the file")); } else if (retval == BKE_READ_EXOTIC_FAIL_FORMAT) { BKE_reportf(reports, RPT_ERROR, IFACE_("File format is not supported in file: \"%s\"."), filepath); @@ -480,7 +480,7 @@ int WM_read_homefile(bContext *C, ReportList *UNUSED(reports), short from_memory { ListBase wmbase; char tstr[FILE_MAX]; - int success= 0; + int success = 0; free_ttfont(); /* still weird... what does it here? */ @@ -505,12 +505,12 @@ int WM_read_homefile(bContext *C, ReportList *UNUSED(reports), short from_memory if (!from_memory && BLI_exists(tstr)) { success = (BKE_read_file(C, tstr, NULL) != BKE_READ_FILE_FAIL); - if (U.themes.first==NULL) { - printf("\nError: No valid "STRINGIFY(BLENDER_STARTUP_FILE)", fall back to built-in default.\n\n"); + if (U.themes.first == NULL) { + printf("\nError: No valid "STRINGIFY (BLENDER_STARTUP_FILE)", fall back to built-in default.\n\n"); success = 0; } } - if (success==0) { + if (success == 0) { success = BKE_read_file_from_memory(C, datatoc_startup_blend, datatoc_startup_blend_size, NULL); if (wmbase.first == NULL) wm_clear_default_size(C); @@ -532,21 +532,21 @@ int WM_read_homefile(bContext *C, ReportList *UNUSED(reports), short from_memory wm_window_match_do(C, &wmbase); WM_check(C); /* opens window(s), checks keymaps */ - G.main->name[0]= '\0'; + G.main->name[0] = '\0'; /* When loading factory settings, the reset solid OpenGL lights need to be applied. */ if (!G.background) GPU_default_lights(); /* XXX */ - G.save_over = 0; // start with save preference untitled.blend - G.fileflags &= ~G_FILE_AUTOPLAY; /* disable autoplay in startup.blend... */ + G.save_over = 0; // start with save preference untitled.blend + G.fileflags &= ~G_FILE_AUTOPLAY; /* disable autoplay in startup.blend... */ // mainwindow_set_filename_to_title(""); // empty string re-initializes title to "Blender" // refresh_interface_font(); // undo_editmode_clear(); BKE_reset_undo(); - BKE_write_undo(C, "original"); /* save current state */ + BKE_write_undo(C, "original"); /* save current state */ ED_editors_init(C); DAG_on_visible_update(CTX_data_main(C), TRUE); @@ -562,7 +562,7 @@ int WM_read_homefile(bContext *C, ReportList *UNUSED(reports), short from_memory } #endif - WM_event_add_notifier(C, NC_WM|ND_FILEREAD, NULL); + WM_event_add_notifier(C, NC_WM | ND_FILEREAD, NULL); /* in background mode the scene will stay NULL */ if (!G.background) { @@ -574,7 +574,7 @@ int WM_read_homefile(bContext *C, ReportList *UNUSED(reports), short from_memory int WM_read_homefile_exec(bContext *C, wmOperator *op) { - int from_memory= strcmp(op->type->idname, "WM_OT_read_factory_settings") == 0; + int from_memory = strcmp(op->type->idname, "WM_OT_read_factory_settings") == 0; return WM_read_homefile(C, op->reports, from_memory) ? OPERATOR_FINISHED : OPERATOR_CANCELLED; } @@ -591,15 +591,15 @@ void WM_read_history(void) BLI_make_file_string("/", name, cfgdir, BLENDER_HISTORY_FILE); - lines= BLI_file_read_as_lines(name); + lines = BLI_file_read_as_lines(name); G.recent_files.first = G.recent_files.last = NULL; /* read list of recent opened files from recent-files.txt to memory */ - for (l= lines, num= 0; l && (numnext) { + for (l = lines, num = 0; l && (num < U.recent_files); l = l->next) { line = l->link; if (line[0] && BLI_exists(line)) { - recent = (RecentFile*)MEM_mallocN(sizeof(RecentFile),"RecentFile"); + recent = (RecentFile *)MEM_mallocN(sizeof(RecentFile), "RecentFile"); BLI_addtail(&(G.recent_files), recent); recent->filepath = BLI_strdup(line); num++; @@ -627,21 +627,21 @@ static void write_history(void) recent = G.recent_files.first; /* refresh recent-files.txt of recent opened files, when current file was changed */ - if (!(recent) || (BLI_path_cmp(recent->filepath, G.main->name)!=0)) { - fp= BLI_fopen(name, "w"); + if (!(recent) || (BLI_path_cmp(recent->filepath, G.main->name) != 0)) { + fp = BLI_fopen(name, "w"); if (fp) { /* add current file to the beginning of list */ - recent = (RecentFile*)MEM_mallocN(sizeof(RecentFile),"RecentFile"); + recent = (RecentFile *)MEM_mallocN(sizeof(RecentFile), "RecentFile"); recent->filepath = BLI_strdup(G.main->name); BLI_addhead(&(G.recent_files), recent); /* write current file to recent-files.txt */ fprintf(fp, "%s\n", recent->filepath); recent = recent->next; - i=1; + i = 1; /* write rest of recent opened files to recent-files.txt */ - while ((ifilepath, G.main->name)!=0) { + if (BLI_path_cmp(recent->filepath, G.main->name) != 0) { fprintf(fp, "%s\n", recent->filepath); recent = recent->next; } @@ -666,21 +666,21 @@ static ImBuf *blend_file_thumb(Scene *scene, int **thumb_pt) /* will be scaled down, but gives some nice oversampling */ ImBuf *ibuf; int *thumb; - char err_out[256]= "unknown"; + char err_out[256] = "unknown"; - *thumb_pt= NULL; + *thumb_pt = NULL; /* scene can be NULL if running a script at startup and calling the save operator */ - if (G.background || scene==NULL || scene->camera==NULL) + if (G.background || scene == NULL || scene->camera == NULL) return NULL; /* gets scaled to BLEN_THUMB_SIZE */ - ibuf= ED_view3d_draw_offscreen_imbuf_simple(scene, scene->camera, - BLEN_THUMB_SIZE * 2, BLEN_THUMB_SIZE * 2, - IB_rect, OB_SOLID, FALSE, err_out); + ibuf = ED_view3d_draw_offscreen_imbuf_simple(scene, scene->camera, + BLEN_THUMB_SIZE * 2, BLEN_THUMB_SIZE * 2, + IB_rect, OB_SOLID, FALSE, err_out); if (ibuf) { - float aspect= (scene->r.xsch*scene->r.xasp) / (scene->r.ysch*scene->r.yasp); + float aspect = (scene->r.xsch * scene->r.xasp) / (scene->r.ysch * scene->r.yasp); /* dirty oversampling */ IMB_scaleImBuf(ibuf, BLEN_THUMB_SIZE, BLEN_THUMB_SIZE); @@ -689,7 +689,7 @@ static ImBuf *blend_file_thumb(Scene *scene, int **thumb_pt) IMB_overlayblend_thumb(ibuf->rect, ibuf->x, ibuf->y, aspect); /* first write into thumb buffer */ - thumb= MEM_mallocN(((2 + (BLEN_THUMB_SIZE * BLEN_THUMB_SIZE))) * sizeof(int), "write_file thumb"); + thumb = MEM_mallocN(((2 + (BLEN_THUMB_SIZE * BLEN_THUMB_SIZE))) * sizeof(int), "write_file thumb"); thumb[0] = BLEN_THUMB_SIZE; thumb[1] = BLEN_THUMB_SIZE; @@ -699,11 +699,11 @@ static ImBuf *blend_file_thumb(Scene *scene, int **thumb_pt) else { /* '*thumb_pt' needs to stay NULL to prevent a bad thumbnail from being handled */ fprintf(stderr, "blend_file_thumb failed to create thumbnail: %s\n", err_out); - thumb= NULL; + thumb = NULL; } /* must be freed by caller */ - *thumb_pt= thumb; + *thumb_pt = thumb; return ibuf; } @@ -732,8 +732,8 @@ int WM_write_file(bContext *C, const char *target, int fileflags, ReportList *re int len; char filepath[FILE_MAX]; - int *thumb= NULL; - ImBuf *ibuf_thumb= NULL; + int *thumb = NULL; + ImBuf *ibuf_thumb = NULL; len = strlen(target); @@ -752,7 +752,7 @@ int WM_write_file(bContext *C, const char *target, int fileflags, ReportList *re /* don't use 'target' anymore */ /* send the OnSave event */ - for (li= G.main->library.first; li; li= li->id.next) { + for (li = G.main->library.first; li; li = li->id.next) { if (BLI_path_cmp(li->filepath, filepath) == 0) { BKE_reportf(reports, RPT_ERROR, "Can't overwrite used library '%.240s'", filepath); return -1; @@ -762,7 +762,7 @@ int WM_write_file(bContext *C, const char *target, int fileflags, ReportList *re /* blend file thumbnail */ /* save before exit_editmode, otherwise derivedmeshes for shared data corrupt #27765) */ if (U.flag & USER_SAVE_PREVIEWS) { - ibuf_thumb= blend_file_thumb(CTX_data_scene(C), &thumb); + ibuf_thumb = blend_file_thumb(CTX_data_scene(C), &thumb); } BLI_exec_cb(G.main, NULL, BLI_CB_EVT_SAVE_PRE); @@ -784,7 +784,7 @@ int WM_write_file(bContext *C, const char *target, int fileflags, ReportList *re if (BLO_write_file(CTX_data_main(C), filepath, fileflags, reports, thumb)) { if (!copy) { G.relbase_valid = 1; - BLI_strncpy(G.main->name, filepath, sizeof(G.main->name)); /* is guaranteed current file */ + BLI_strncpy(G.main->name, filepath, sizeof(G.main->name)); /* is guaranteed current file */ G.save_over = 1; /* disable untitled.blend convention */ } @@ -804,7 +804,7 @@ int WM_write_file(bContext *C, const char *target, int fileflags, ReportList *re /* run this function after because the file cant be written before the blend is */ if (ibuf_thumb) { - ibuf_thumb= IMB_thumb_create(filepath, THB_NORMAL, THB_SOURCE_BLEND, ibuf_thumb); + ibuf_thumb = IMB_thumb_create(filepath, THB_NORMAL, THB_SOURCE_BLEND, ibuf_thumb); IMB_freeImBuf(ibuf_thumb); } @@ -826,8 +826,8 @@ int WM_write_file(bContext *C, const char *target, int fileflags, ReportList *re /* operator entry */ int WM_write_homefile(bContext *C, wmOperator *op) { - wmWindowManager *wm= CTX_wm_manager(C); - wmWindow *win= CTX_wm_window(C); + wmWindowManager *wm = CTX_wm_manager(C); + wmWindow *win = CTX_wm_window(C); char filepath[FILE_MAX]; int fileflags; @@ -851,7 +851,7 @@ int WM_write_homefile(bContext *C, wmOperator *op) printf("ok\n"); - G.save_over= 0; + G.save_over = 0; return OPERATOR_FINISHED; } @@ -891,7 +891,7 @@ void WM_autosave_init(wmWindowManager *wm) wm_autosave_timer_ended(wm); if (U.flag & USER_AUTOSAVE) - wm->autosavetimer= WM_event_add_timer(wm, NULL, TIMERAUTOSAVE, U.savetime*60.0); + wm->autosavetimer = WM_event_add_timer(wm, NULL, TIMERAUTOSAVE, U.savetime * 60.0); } void wm_autosave_timer(const bContext *C, wmWindowManager *wm, wmTimer *UNUSED(wt)) @@ -904,10 +904,10 @@ void wm_autosave_timer(const bContext *C, wmWindowManager *wm, wmTimer *UNUSED(w WM_event_remove_timer(wm, NULL, wm->autosavetimer); /* if a modal operator is running, don't autosave, but try again in 10 seconds */ - for (win=wm->windows.first; win; win=win->next) { - for (handler=win->modalhandlers.first; handler; handler=handler->next) { + for (win = wm->windows.first; win; win = win->next) { + for (handler = win->modalhandlers.first; handler; handler = handler->next) { if (handler->op) { - wm->autosavetimer= WM_event_add_timer(wm, NULL, TIMERAUTOSAVE, 10.0); + wm->autosavetimer = WM_event_add_timer(wm, NULL, TIMERAUTOSAVE, 10.0); return; } } @@ -916,20 +916,20 @@ void wm_autosave_timer(const bContext *C, wmWindowManager *wm, wmTimer *UNUSED(w wm_autosave_location(filepath); /* force save as regular blend file */ - fileflags = G.fileflags & ~(G_FILE_COMPRESS|G_FILE_AUTOPLAY |G_FILE_LOCK|G_FILE_SIGN|G_FILE_HISTORY); + fileflags = G.fileflags & ~(G_FILE_COMPRESS | G_FILE_AUTOPLAY | G_FILE_LOCK | G_FILE_SIGN | G_FILE_HISTORY); /* no error reporting to console */ BLO_write_file(CTX_data_main(C), filepath, fileflags, NULL, NULL); /* do timer after file write, just in case file write takes a long time */ - wm->autosavetimer= WM_event_add_timer(wm, NULL, TIMERAUTOSAVE, U.savetime*60.0); + wm->autosavetimer = WM_event_add_timer(wm, NULL, TIMERAUTOSAVE, U.savetime * 60.0); } void wm_autosave_timer_ended(wmWindowManager *wm) { if (wm->autosavetimer) { WM_event_remove_timer(wm, NULL, wm->autosavetimer); - wm->autosavetimer= NULL; + wm->autosavetimer = NULL; } } diff --git a/source/blender/windowmanager/intern/wm_gesture.c b/source/blender/windowmanager/intern/wm_gesture.c index a2630b5c6e1..593d1b35abe 100644 --- a/source/blender/windowmanager/intern/wm_gesture.c +++ b/source/blender/windowmanager/intern/wm_gesture.c @@ -38,7 +38,7 @@ #include "BLI_blenlib.h" #include "BLI_math.h" -#include "BLI_scanfill.h" /* lasso tessellation */ +#include "BLI_scanfill.h" /* lasso tessellation */ #include "BLI_utildefines.h" #include "BKE_context.h" @@ -60,32 +60,32 @@ /* context checked on having screen, window and area */ wmGesture *WM_gesture_new(bContext *C, wmEvent *event, int type) { - wmGesture *gesture= MEM_callocN(sizeof(wmGesture), "new gesture"); - wmWindow *window= CTX_wm_window(C); - ARegion *ar= CTX_wm_region(C); + wmGesture *gesture = MEM_callocN(sizeof(wmGesture), "new gesture"); + wmWindow *window = CTX_wm_window(C); + ARegion *ar = CTX_wm_region(C); int sx, sy; BLI_addtail(&window->gesture, gesture); - gesture->type= type; - gesture->event_type= event->type; - gesture->swinid= ar->swinid; /* means only in area-region context! */ + gesture->type = type; + gesture->event_type = event->type; + gesture->swinid = ar->swinid; /* means only in area-region context! */ wm_subwindow_getorigin(window, gesture->swinid, &sx, &sy); if (ELEM5(type, WM_GESTURE_RECT, WM_GESTURE_CROSS_RECT, WM_GESTURE_TWEAK, - WM_GESTURE_CIRCLE, WM_GESTURE_STRAIGHTLINE)) + WM_GESTURE_CIRCLE, WM_GESTURE_STRAIGHTLINE)) { - rcti *rect= MEM_callocN(sizeof(rcti), "gesture rect new"); + rcti *rect = MEM_callocN(sizeof(rcti), "gesture rect new"); - gesture->customdata= rect; + gesture->customdata = rect; rect->xmin = event->x - sx; rect->ymin = event->y - sy; - if (type==WM_GESTURE_CIRCLE) { + if (type == WM_GESTURE_CIRCLE) { #ifdef GESTURE_MEMORY rect->xmax = circle_select_size; #else - rect->xmax = 25; // XXX temp + rect->xmax = 25; // XXX temp #endif } else { @@ -95,10 +95,10 @@ wmGesture *WM_gesture_new(bContext *C, wmEvent *event, int type) } else if (ELEM(type, WM_GESTURE_LINES, WM_GESTURE_LASSO)) { short *lasso; - gesture->customdata= lasso= MEM_callocN(2*sizeof(short)*WM_LASSO_MIN_POINTS, "lasso points"); + gesture->customdata = lasso = MEM_callocN(2 * sizeof(short) * WM_LASSO_MIN_POINTS, "lasso points"); lasso[0] = event->x - sx; lasso[1] = event->y - sy; - gesture->points= 1; + gesture->points = 1; gesture->size = WM_LASSO_MIN_POINTS; } @@ -107,10 +107,10 @@ wmGesture *WM_gesture_new(bContext *C, wmEvent *event, int type) void WM_gesture_end(bContext *C, wmGesture *gesture) { - wmWindow *win= CTX_wm_window(C); + wmWindow *win = CTX_wm_window(C); - if (win->tweak==gesture) - win->tweak= NULL; + if (win->tweak == gesture) + win->tweak = NULL; BLI_remlink(&win->gesture, gesture); MEM_freeN(gesture->customdata); MEM_freeN(gesture); @@ -118,7 +118,7 @@ void WM_gesture_end(bContext *C, wmGesture *gesture) void WM_gestures_remove(bContext *C) { - wmWindow *win= CTX_wm_window(C); + wmWindow *win = CTX_wm_window(C); while (win->gesture.first) WM_gesture_end(C, win->gesture.first); @@ -128,32 +128,32 @@ void WM_gestures_remove(bContext *C) /* tweak and line gestures */ int wm_gesture_evaluate(wmGesture *gesture) { - if (gesture->type==WM_GESTURE_TWEAK) { - rcti *rect= gesture->customdata; - int dx= rect->xmax - rect->xmin; - int dy= rect->ymax - rect->ymin; - if (ABS(dx)+ABS(dy) > U.tweak_threshold) { - int theta= (int)floor(4.0f*atan2f((float)dy, (float)dx)/(float)M_PI + 0.5f); - int val= EVT_GESTURE_W; - - if (theta==0) val= EVT_GESTURE_E; - else if (theta==1) val= EVT_GESTURE_NE; - else if (theta==2) val= EVT_GESTURE_N; - else if (theta==3) val= EVT_GESTURE_NW; - else if (theta==-1) val= EVT_GESTURE_SE; - else if (theta==-2) val= EVT_GESTURE_S; - else if (theta==-3) val= EVT_GESTURE_SW; + if (gesture->type == WM_GESTURE_TWEAK) { + rcti *rect = gesture->customdata; + int dx = rect->xmax - rect->xmin; + int dy = rect->ymax - rect->ymin; + if (ABS(dx) + ABS(dy) > U.tweak_threshold) { + int theta = (int)floor(4.0f * atan2f((float)dy, (float)dx) / (float)M_PI + 0.5f); + int val = EVT_GESTURE_W; + + if (theta == 0) val = EVT_GESTURE_E; + else if (theta == 1) val = EVT_GESTURE_NE; + else if (theta == 2) val = EVT_GESTURE_N; + else if (theta == 3) val = EVT_GESTURE_NW; + else if (theta == -1) val = EVT_GESTURE_SE; + else if (theta == -2) val = EVT_GESTURE_S; + else if (theta == -3) val = EVT_GESTURE_SW; #if 0 /* debug */ - if (val==1) printf("tweak north\n"); - if (val==2) printf("tweak north-east\n"); - if (val==3) printf("tweak east\n"); - if (val==4) printf("tweak south-east\n"); - if (val==5) printf("tweak south\n"); - if (val==6) printf("tweak south-west\n"); - if (val==7) printf("tweak west\n"); - if (val==8) printf("tweak north-west\n"); + if (val == 1) printf("tweak north\n"); + if (val == 2) printf("tweak north-east\n"); + if (val == 3) printf("tweak east\n"); + if (val == 4) printf("tweak south-east\n"); + if (val == 5) printf("tweak south\n"); + if (val == 6) printf("tweak south-west\n"); + if (val == 7) printf("tweak west\n"); + if (val == 8) printf("tweak north-west\n"); #endif return val; } @@ -166,7 +166,7 @@ int wm_gesture_evaluate(wmGesture *gesture) static void wm_gesture_draw_rect(wmGesture *gt) { - rcti *rect= (rcti *)gt->customdata; + rcti *rect = (rcti *)gt->customdata; glEnable(GL_BLEND); glColor4f(1.0, 1.0, 1.0, 0.05); @@ -190,7 +190,7 @@ static void wm_gesture_draw_rect(wmGesture *gt) static void wm_gesture_draw_line(wmGesture *gt) { - rcti *rect= (rcti *)gt->customdata; + rcti *rect = (rcti *)gt->customdata; glEnable(GL_LINE_STIPPLE); glColor3ub(96, 96, 96); @@ -206,22 +206,22 @@ static void wm_gesture_draw_line(wmGesture *gt) static void wm_gesture_draw_circle(wmGesture *gt) { - rcti *rect= (rcti *)gt->customdata; + rcti *rect = (rcti *)gt->customdata; glTranslatef((float)rect->xmin, (float)rect->ymin, 0.0f); glEnable(GL_BLEND); glColor4f(1.0, 1.0, 1.0, 0.05); - glutil_draw_filled_arc(0.0, M_PI*2.0, rect->xmax, 40); + glutil_draw_filled_arc(0.0, M_PI * 2.0, rect->xmax, 40); glDisable(GL_BLEND); glEnable(GL_LINE_STIPPLE); glColor3ub(96, 96, 96); glLineStipple(1, 0xAAAA); - glutil_draw_lined_arc(0.0, M_PI*2.0, rect->xmax, 40); + glutil_draw_lined_arc(0.0, M_PI * 2.0, rect->xmax, 40); glColor3ub(255, 255, 255); glLineStipple(1, 0x5555); - glutil_draw_lined_arc(0.0, M_PI*2.0, rect->xmax, 40); + glutil_draw_lined_arc(0.0, M_PI * 2.0, rect->xmax, 40); glDisable(GL_LINE_STIPPLE); glTranslatef((float)-rect->xmin, (float)-rect->ymin, 0.0f); @@ -230,24 +230,24 @@ static void wm_gesture_draw_circle(wmGesture *gt) static void draw_filled_lasso(wmGesture *gt) { - ScanFillVert *v=NULL, *lastv=NULL, *firstv=NULL; + ScanFillVert *v = NULL, *lastv = NULL, *firstv = NULL; ScanFillFace *efa; - short *lasso= (short *)gt->customdata; + short *lasso = (short *)gt->customdata; int i; BLI_begin_edgefill(); - for (i=0; ipoints; i++, lasso+=2) { + for (i = 0; i < gt->points; i++, lasso += 2) { float co[3]; - co[0]= (float)lasso[0]; - co[1]= (float)lasso[1]; - co[2]= 0.0f; + co[0] = (float)lasso[0]; + co[1] = (float)lasso[1]; + co[2] = 0.0f; v = BLI_addfillvert(co); if (lastv) /* e = */ /* UNUSED */ BLI_addfilledge(lastv, v); lastv = v; - if (firstv==NULL) firstv = v; + if (firstv == NULL) firstv = v; } /* highly unlikely this will fail, but could crash if (gt->points == 0) */ @@ -258,7 +258,7 @@ static void draw_filled_lasso(wmGesture *gt) glEnable(GL_BLEND); glColor4f(1.0, 1.0, 1.0, 0.05); glBegin(GL_TRIANGLES); - for (efa = fillfacebase.first; efa; efa=efa->next) { + for (efa = fillfacebase.first; efa; efa = efa->next) { glVertex2fv(efa->v1->co); glVertex2fv(efa->v2->co); glVertex2fv(efa->v3->co); @@ -272,7 +272,7 @@ static void draw_filled_lasso(wmGesture *gt) static void wm_gesture_draw_lasso(wmGesture *gt) { - short *lasso= (short *)gt->customdata; + short *lasso = (short *)gt->customdata; int i; draw_filled_lasso(gt); @@ -281,19 +281,19 @@ static void wm_gesture_draw_lasso(wmGesture *gt) glColor3ub(96, 96, 96); glLineStipple(1, 0xAAAA); glBegin(GL_LINE_STRIP); - for (i=0; ipoints; i++, lasso+=2) + for (i = 0; i < gt->points; i++, lasso += 2) glVertex2sv(lasso); - if (gt->type==WM_GESTURE_LASSO) + if (gt->type == WM_GESTURE_LASSO) glVertex2sv((short *)gt->customdata); glEnd(); glColor3ub(255, 255, 255); glLineStipple(1, 0x5555); glBegin(GL_LINE_STRIP); - lasso= (short *)gt->customdata; - for (i=0; ipoints; i++, lasso+=2) + lasso = (short *)gt->customdata; + for (i = 0; i < gt->points; i++, lasso += 2) glVertex2sv(lasso); - if (gt->type==WM_GESTURE_LASSO) + if (gt->type == WM_GESTURE_LASSO) glVertex2sv((short *)gt->customdata); glEnd(); @@ -303,7 +303,7 @@ static void wm_gesture_draw_lasso(wmGesture *gt) static void wm_gesture_draw_cross(wmWindow *win, wmGesture *gt) { - rcti *rect= (rcti *)gt->customdata; + rcti *rect = (rcti *)gt->customdata; glEnable(GL_LINE_STIPPLE); glColor3ub(96, 96, 96); @@ -321,41 +321,41 @@ static void wm_gesture_draw_cross(wmWindow *win, wmGesture *gt) /* called in wm_draw.c */ void wm_gesture_draw(wmWindow *win) { - wmGesture *gt= (wmGesture *)win->gesture.first; + wmGesture *gt = (wmGesture *)win->gesture.first; - for (; gt; gt= gt->next) { + for (; gt; gt = gt->next) { /* all in subwindow space */ wmSubWindowSet(win, gt->swinid); - if (gt->type==WM_GESTURE_RECT) + if (gt->type == WM_GESTURE_RECT) wm_gesture_draw_rect(gt); // else if (gt->type==WM_GESTURE_TWEAK) // wm_gesture_draw_line(gt); - else if (gt->type==WM_GESTURE_CIRCLE) + else if (gt->type == WM_GESTURE_CIRCLE) wm_gesture_draw_circle(gt); - else if (gt->type==WM_GESTURE_CROSS_RECT) { - if (gt->mode==1) + else if (gt->type == WM_GESTURE_CROSS_RECT) { + if (gt->mode == 1) wm_gesture_draw_rect(gt); else wm_gesture_draw_cross(win, gt); } - else if (gt->type==WM_GESTURE_LINES) + else if (gt->type == WM_GESTURE_LINES) wm_gesture_draw_lasso(gt); - else if (gt->type==WM_GESTURE_LASSO) + else if (gt->type == WM_GESTURE_LASSO) wm_gesture_draw_lasso(gt); - else if (gt->type==WM_GESTURE_STRAIGHTLINE) + else if (gt->type == WM_GESTURE_STRAIGHTLINE) wm_gesture_draw_line(gt); } } void wm_gesture_tag_redraw(bContext *C) { - wmWindow *win= CTX_wm_window(C); - bScreen *screen= CTX_wm_screen(C); - ARegion *ar= CTX_wm_region(C); + wmWindow *win = CTX_wm_window(C); + bScreen *screen = CTX_wm_screen(C); + ARegion *ar = CTX_wm_region(C); if (screen) - screen->do_draw_gesture= 1; + screen->do_draw_gesture = 1; wm_tag_redraw_overlay(win, ar); } diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c index 0255a2249f5..a9f17359573 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.c +++ b/source/blender/windowmanager/intern/wm_init_exit.c @@ -68,7 +68,7 @@ #include "BLI_utildefines.h" #include "RE_engine.h" -#include "RE_pipeline.h" /* RE_ free stuff */ +#include "RE_pipeline.h" /* RE_ free stuff */ #ifdef WITH_PYTHON #include "BPY_extern.h" @@ -125,20 +125,20 @@ int wm_start_with_console = 0; /* used in creator.c */ void WM_init(bContext *C, int argc, const char **argv) { if (!G.background) { - wm_ghost_init(C); /* note: it assigns C to ghost! */ + wm_ghost_init(C); /* note: it assigns C to ghost! */ wm_init_cursor_data(); } GHOST_CreateSystemPaths(); wm_operatortype_init(); WM_menutype_init(); - set_free_windowmanager_cb(wm_close_and_free); /* library.c */ + set_free_windowmanager_cb(wm_close_and_free); /* library.c */ set_blender_test_break_cb(wm_window_testbreak); /* blender.c */ DAG_editors_update_cb(ED_render_id_flush_update, ED_render_scene_update); /* depsgraph.c */ - ED_spacetypes_init(); /* editors/space_api/spacetype.c */ + ED_spacetypes_init(); /* editors/space_api/spacetype.c */ - ED_file_init(); /* for fsmenu */ + ED_file_init(); /* for fsmenu */ ED_init_node_butfuncs(); BLF_init(11, U.dpi); /* Please update source/gamengine/GamePlayer/GPG_ghost.cpp if you change this */ @@ -203,8 +203,8 @@ void WM_init(bContext *C, int argc, const char **argv) void WM_init_splash(bContext *C) { if ((U.uiflag & USER_SPLASH_DISABLE) == 0) { - wmWindowManager *wm= CTX_wm_manager(C); - wmWindow *prevwin= CTX_wm_window(C); + wmWindowManager *wm = CTX_wm_manager(C); + wmWindow *prevwin = CTX_wm_window(C); if (wm->windows.first) { CTX_wm_window_set(C, wm->windows.first); @@ -216,18 +216,18 @@ void WM_init_splash(bContext *C) int WM_init_game(bContext *C) { - wmWindowManager *wm= CTX_wm_manager(C); - wmWindow* win; + wmWindowManager *wm = CTX_wm_manager(C); + wmWindow *win; ScrArea *sa; - ARegion *ar= NULL; + ARegion *ar = NULL; - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); if (!scene) { // XXX, this should not be needed. Main *bmain = CTX_data_main(C); - scene= bmain->scene.first; + scene = bmain->scene.first; } win = wm->windows.first; @@ -237,7 +237,7 @@ int WM_init_game(bContext *C) CTX_wm_window_set(C, win); sa = BKE_screen_find_big_area(CTX_wm_screen(C), SPACE_VIEW3D, 0); - ar= BKE_area_find_region_type(sa, RGN_TYPE_WINDOW); + ar = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW); // if we have a valid 3D view if (sa && ar) { @@ -251,7 +251,7 @@ int WM_init_game(bContext *C) WM_operator_name_call(C, "SCREEN_OT_region_quadview", WM_OP_EXEC_DEFAULT, NULL); /* toolbox, properties panel and header are hidden */ - for (arhide=sa->regionbase.first; arhide; arhide=arhide->next) { + for (arhide = sa->regionbase.first; arhide; arhide = arhide->next) { if (arhide->regiontype != RGN_TYPE_WINDOW) { if (!(arhide->flag & RGN_FLAG_HIDDEN)) { ED_region_toggle_hidden(C, arhide); @@ -308,7 +308,7 @@ static void free_openrecent(void) { struct RecentFile *recent; - for (recent = G.recent_files.first; recent; recent=recent->next) + for (recent = G.recent_files.first; recent; recent = recent->next) MEM_freeN(recent->filepath); BLI_freelistN(&(G.recent_files)); @@ -317,7 +317,7 @@ static void free_openrecent(void) /* bad stuff*/ - // XXX copy/paste buffer stuff... +// XXX copy/paste buffer stuff... extern void free_anim_copybuf(void); extern void free_anim_drivers_copybuf(void); extern void free_fmodifiers_copybuf(void); @@ -339,9 +339,9 @@ void WM_exit_ext(bContext *C, const short do_python) WM_jobs_stop_all(CTX_wm_manager(C)); - for (win= CTX_wm_manager(C)->windows.first; win; win= win->next) { + for (win = CTX_wm_manager(C)->windows.first; win; win = win->next) { - CTX_wm_window_set(C, win); /* needed by operator close callbacks */ + CTX_wm_window_set(C, win); /* needed by operator close callbacks */ WM_event_remove_handlers(C, &win->handlers); WM_event_remove_handlers(C, &win->modalhandlers); ED_screen_exit(C, win, win->screen); @@ -366,15 +366,15 @@ void WM_exit_ext(bContext *C, const short do_python) BKE_freecubetable(); - ED_preview_free_dbase(); /* frees a Main dbase, before free_blender! */ + ED_preview_free_dbase(); /* frees a Main dbase, before free_blender! */ if (C && CTX_wm_manager(C)) - wm_free_reports(C); /* before free_blender! - since the ListBases get freed there */ + wm_free_reports(C); /* before free_blender! - since the ListBases get freed there */ seq_free_clipboard(); /* sequencer.c */ BKE_tracking_free_clipboard(); - free_blender(); /* blender.c, does entire library and spacetypes */ + free_blender(); /* blender.c, does entire library and spacetypes */ // free_matcopybuf(); free_anim_copybuf(); free_anim_drivers_copybuf(); @@ -418,7 +418,7 @@ void WM_exit_ext(bContext *C, const short do_python) GPU_extensions_exit(); if (!G.background) { - BKE_undo_save_quit(); // saves quit.blend if global undo is on + BKE_undo_save_quit(); /* saves quit.blend if global undo is on */ } BKE_reset_undo(); @@ -438,7 +438,7 @@ void WM_exit_ext(bContext *C, const short do_python) GHOST_DisposeSystemPaths(); - if (MEM_get_memory_blocks_in_use()!=0) { + if (MEM_get_memory_blocks_in_use() != 0) { printf("Error: Not freed memory blocks: %d\n", MEM_get_memory_blocks_in_use()); MEM_printmemlist(); } @@ -458,5 +458,5 @@ void WM_exit_ext(bContext *C, const short do_python) void WM_exit(bContext *C) { WM_exit_ext(C, 1); - exit(G.afbreek==1); + exit(G.afbreek == 1); } diff --git a/source/blender/windowmanager/intern/wm_jobs.c b/source/blender/windowmanager/intern/wm_jobs.c index 4cef3f18e14..a55a8df3301 100644 --- a/source/blender/windowmanager/intern/wm_jobs.c +++ b/source/blender/windowmanager/intern/wm_jobs.c @@ -72,11 +72,11 @@ * * Stop job * - signal job to end - * on end, job will tag itself as sleeping + * on end, job will tag itself as sleeping * * Remove job * - signal job to end - * on end, job will remove itself + * on end, job will remove itself * * When job is done: * - it puts timer to sleep (or removes?) @@ -134,12 +134,12 @@ struct wmJob { */ static wmJob *wm_job_find(wmWindowManager *wm, void *owner, const char *name) { - wmJob *steve, *found=NULL; + wmJob *steve, *found = NULL; - for (steve= wm->jobs.first; steve; steve= steve->next) - if (steve->owner==owner) { - found= steve; - if (name && strcmp(steve->name, name)==0) + for (steve = wm->jobs.first; steve; steve = steve->next) + if (steve->owner == owner) { + found = steve; + if (name && strcmp(steve->name, name) == 0) return steve; } @@ -153,15 +153,15 @@ static wmJob *wm_job_find(wmWindowManager *wm, void *owner, const char *name) * when stopped it starts the new one */ wmJob *WM_jobs_get(wmWindowManager *wm, wmWindow *win, void *owner, const char *name, int flag) { - wmJob *steve= wm_job_find(wm, owner, name); + wmJob *steve = wm_job_find(wm, owner, name); - if (steve==NULL) { - steve= MEM_callocN(sizeof(wmJob), "new job"); + if (steve == NULL) { + steve = MEM_callocN(sizeof(wmJob), "new job"); BLI_addtail(&wm->jobs, steve); - steve->win= win; - steve->owner= owner; - steve->flag= flag; + steve->win = win; + steve->owner = owner; + steve->flag = flag; BLI_strncpy(steve->name, name, sizeof(steve->name)); } @@ -173,8 +173,8 @@ int WM_jobs_test(wmWindowManager *wm, void *owner) { wmJob *steve; - for (steve= wm->jobs.first; steve; steve= steve->next) - if (steve->owner==owner) + for (steve = wm->jobs.first; steve; steve = steve->next) + if (steve->owner == owner) if (steve->running) return 1; return 0; @@ -182,7 +182,7 @@ int WM_jobs_test(wmWindowManager *wm, void *owner) float WM_jobs_progress(wmWindowManager *wm, void *owner) { - wmJob *steve= wm_job_find(wm, owner, NULL); + wmJob *steve = wm_job_find(wm, owner, NULL); if (steve && steve->flag & WM_JOB_PROGRESS) return steve->progress; @@ -192,7 +192,7 @@ float WM_jobs_progress(wmWindowManager *wm, void *owner) char *WM_jobs_name(wmWindowManager *wm, void *owner) { - wmJob *steve= wm_job_find(wm, owner, NULL); + wmJob *steve = wm_job_find(wm, owner, NULL); if (steve) return steve->name; @@ -205,7 +205,7 @@ int WM_jobs_is_running(wmJob *steve) return steve->running; } -void* WM_jobs_get_customdata(wmJob * steve) +void *WM_jobs_get_customdata(wmJob *steve) { if (!steve->customdata) { return steve->run_customdata; @@ -221,12 +221,12 @@ void WM_jobs_customdata(wmJob *steve, void *customdata, void (*free)(void *)) if (steve->customdata) steve->free(steve->customdata); - steve->customdata= customdata; - steve->free= free; + steve->customdata = customdata; + steve->free = free; if (steve->running) { /* signal job to end */ - steve->stop= 1; + steve->stop = 1; } } @@ -238,23 +238,23 @@ void WM_jobs_timer(wmJob *steve, double timestep, unsigned int note, unsigned in } void WM_jobs_callbacks(wmJob *steve, - void (*startjob)(void *, short *, short *, float *), - void (*initjob)(void *), - void (*update)(void *), - void (*endjob)(void *)) + void (*startjob)(void *, short *, short *, float *), + void (*initjob)(void *), + void (*update)(void *), + void (*endjob)(void *)) { - steve->startjob= startjob; - steve->initjob= initjob; - steve->update= update; - steve->endjob= endjob; + steve->startjob = startjob; + steve->initjob = initjob; + steve->update = update; + steve->endjob = endjob; } static void *do_job_thread(void *job_v) { - wmJob *steve= job_v; + wmJob *steve = job_v; steve->startjob(steve->run_customdata, &steve->stop, &steve->do_update, &steve->progress); - steve->ready= 1; + steve->ready = 1; return NULL; } @@ -263,41 +263,41 @@ static void *do_job_thread(void *job_v) static void wm_jobs_test_suspend_stop(wmWindowManager *wm, wmJob *test) { wmJob *steve; - int suspend= 0; + int suspend = 0; /* job added with suspend flag, we wait 1 timer step before activating it */ if (test->flag & WM_JOB_SUSPEND) { - suspend= 1; + suspend = 1; test->flag &= ~WM_JOB_SUSPEND; } else { /* check other jobs */ - for (steve= wm->jobs.first; steve; steve= steve->next) { + for (steve = wm->jobs.first; steve; steve = steve->next) { /* obvious case, no test needed */ - if (steve==test || !steve->running) continue; + if (steve == test || !steve->running) continue; /* if new job is not render, then check for same startjob */ - if (0==(test->flag & WM_JOB_EXCL_RENDER)) - if (steve->startjob!=test->startjob) + if (0 == (test->flag & WM_JOB_EXCL_RENDER)) + if (steve->startjob != test->startjob) continue; /* if new job is render, any render job should be stopped */ if (test->flag & WM_JOB_EXCL_RENDER) - if (0==(steve->flag & WM_JOB_EXCL_RENDER)) + if (0 == (steve->flag & WM_JOB_EXCL_RENDER)) continue; - suspend= 1; + suspend = 1; /* if this job has higher priority, stop others */ if (test->flag & WM_JOB_PRIORITY) { - steve->stop= 1; + steve->stop = 1; // printf("job stopped: %s\n", steve->name); } } } /* possible suspend ourselfs, waiting for other jobs, or de-suspend */ - test->suspended= suspend; + test->suspended = suspend; // if (suspend) printf("job suspended: %s\n", test->name); } @@ -307,7 +307,7 @@ void WM_jobs_start(wmWindowManager *wm, wmJob *steve) { if (steve->running) { /* signal job to end and restart */ - steve->stop= 1; + steve->stop = 1; // printf("job started a running job, ending... %s\n", steve->name); } else { @@ -316,20 +316,20 @@ void WM_jobs_start(wmWindowManager *wm, wmJob *steve) wm_jobs_test_suspend_stop(wm, steve); - if (steve->suspended==0) { + if (steve->suspended == 0) { /* copy to ensure proper free in end */ - steve->run_customdata= steve->customdata; - steve->run_free= steve->free; - steve->free= NULL; - steve->customdata= NULL; - steve->running= 1; + steve->run_customdata = steve->customdata; + steve->run_free = steve->free; + steve->free = NULL; + steve->customdata = NULL; + steve->running = 1; if (steve->initjob) steve->initjob(steve->run_customdata); - steve->stop= 0; - steve->ready= 0; - steve->progress= 0.0; + steve->stop = 0; + steve->ready = 0; + steve->progress = 0.0; // printf("job started: %s\n", steve->name); @@ -338,8 +338,8 @@ void WM_jobs_start(wmWindowManager *wm, wmJob *steve) } /* restarted job has timer already */ - if (steve->wt==NULL) - steve->wt= WM_event_add_timer(wm, steve->win, TIMERJOBS, steve->timestep); + if (steve->wt == NULL) + steve->wt = WM_event_add_timer(wm, steve->win, TIMERJOBS, steve->timestep); } else printf("job fails, not initialized\n"); } @@ -350,7 +350,7 @@ static void wm_jobs_kill_job(wmWindowManager *wm, wmJob *steve) { if (steve->running) { /* signal job to end */ - steve->stop= 1; + steve->stop = 1; BLI_end_threads(&steve->threads); if (steve->endjob) @@ -374,7 +374,7 @@ void WM_jobs_stop_all(wmWindowManager *wm) { wmJob *steve; - while ((steve= wm->jobs.first)) + while ((steve = wm->jobs.first)) wm_jobs_kill_job(wm, steve); } @@ -384,10 +384,10 @@ void WM_jobs_stop(wmWindowManager *wm, void *owner, void *startjob) { wmJob *steve; - for (steve= wm->jobs.first; steve; steve= steve->next) - if (steve->owner==owner || steve->startjob==startjob) + for (steve = wm->jobs.first; steve; steve = steve->next) + if (steve->owner == owner || steve->startjob == startjob) if (steve->running) - steve->stop= 1; + steve->stop = 1; } /* actually terminate thread and job timer */ @@ -395,15 +395,15 @@ void WM_jobs_kill(wmWindowManager *wm, void *owner, void (*startjob)(void *, sho { wmJob *steve; - steve= wm->jobs.first; + steve = wm->jobs.first; while (steve) { - if (steve->owner==owner || steve->startjob==startjob) { - wmJob* bill = steve; - steve= steve->next; + if (steve->owner == owner || steve->startjob == startjob) { + wmJob *bill = steve; + steve = steve->next; wm_jobs_kill_job(wm, bill); } else { - steve= steve->next; + steve = steve->next; } } } @@ -414,8 +414,8 @@ void wm_jobs_timer_ended(wmWindowManager *wm, wmTimer *wt) { wmJob *steve; - for (steve= wm->jobs.first; steve; steve= steve->next) { - if (steve->wt==wt) { + for (steve = wm->jobs.first; steve; steve = steve->next) { + if (steve->wt == wt) { wm_jobs_kill_job(wm, steve); return; } @@ -425,15 +425,15 @@ void wm_jobs_timer_ended(wmWindowManager *wm, wmTimer *wt) /* hardcoded to event TIMERJOBS */ void wm_jobs_timer(const bContext *C, wmWindowManager *wm, wmTimer *wt) { - wmJob *steve= wm->jobs.first, *stevenext; - float total_progress= 0.f; - float jobs_progress=0; + wmJob *steve = wm->jobs.first, *stevenext; + float total_progress = 0.f; + float jobs_progress = 0; - for (; steve; steve= stevenext) { - stevenext= steve->next; + for (; steve; steve = stevenext) { + stevenext = steve->next; - if (steve->wt==wt) { + if (steve->wt == wt) { /* running threads */ if (steve->threads.first) { @@ -446,8 +446,8 @@ void wm_jobs_timer(const bContext *C, wmWindowManager *wm, wmTimer *wt) WM_event_add_notifier(C, steve->note, NULL); if (steve->flag & WM_JOB_PROGRESS) - WM_event_add_notifier(C, NC_WM|ND_JOB, NULL); - steve->do_update= 0; + WM_event_add_notifier(C, NC_WM | ND_JOB, NULL); + steve->do_update = 0; } if (steve->ready) { @@ -456,19 +456,19 @@ void wm_jobs_timer(const bContext *C, wmWindowManager *wm, wmTimer *wt) /* free own data */ steve->run_free(steve->run_customdata); - steve->run_customdata= NULL; - steve->run_free= NULL; + steve->run_customdata = NULL; + steve->run_free = NULL; // if (steve->stop) printf("job ready but stopped %s\n", steve->name); // else printf("job finished %s\n", steve->name); - steve->running= 0; + steve->running = 0; BLI_end_threads(&steve->threads); if (steve->endnote) WM_event_add_notifier(C, steve->endnote, NULL); - WM_event_add_notifier(C, NC_WM|ND_JOB, NULL); + WM_event_add_notifier(C, NC_WM | ND_JOB, NULL); /* new job added for steve? */ if (steve->customdata) { @@ -477,7 +477,7 @@ void wm_jobs_timer(const bContext *C, wmWindowManager *wm, wmTimer *wt) } else { WM_event_remove_timer(wm, steve->win, steve->wt); - steve->wt= NULL; + steve->wt = NULL; /* remove steve */ BLI_remlink(&wm->jobs, steve); @@ -520,7 +520,7 @@ int WM_jobs_has_running(wmWindowManager *wm) { wmJob *steve; - for (steve= wm->jobs.first; steve; steve= steve->next) + for (steve = wm->jobs.first; steve; steve = steve->next) if (steve->running) return 1; diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c index 8814a044901..ddbacc6b747 100644 --- a/source/blender/windowmanager/intern/wm_keymap.c +++ b/source/blender/windowmanager/intern/wm_keymap.c @@ -61,21 +61,21 @@ #include "wm_event_types.h" /******************************* Keymap Item ********************************** - * Item in a keymap, that maps from an event to an operator or modal map item */ +* Item in a keymap, that maps from an event to an operator or modal map item */ static wmKeyMapItem *wm_keymap_item_copy(wmKeyMapItem *kmi) { wmKeyMapItem *kmin = MEM_dupallocN(kmi); - kmin->prev= kmin->next= NULL; + kmin->prev = kmin->next = NULL; kmin->flag &= ~KMI_UPDATE; if (kmin->properties) { - kmin->ptr= MEM_callocN(sizeof(PointerRNA), "UserKeyMapItemPtr"); + kmin->ptr = MEM_callocN(sizeof(PointerRNA), "UserKeyMapItemPtr"); WM_operator_properties_create(kmin->ptr, kmin->idname); - kmin->properties= IDP_CopyProperty(kmin->properties); - kmin->ptr->data= kmin->properties; + kmin->properties = IDP_CopyProperty(kmin->properties); + kmin->ptr->data = kmin->properties; } return kmin; @@ -101,8 +101,8 @@ static int wm_keymap_item_equals_result(wmKeyMapItem *a, wmKeyMapItem *b) if (strcmp(a->idname, b->idname) != 0) return 0; - if (!((a->ptr==NULL && b->ptr==NULL) || - (a->ptr && b->ptr && IDP_EqualsProperties(a->ptr->data, b->ptr->data)))) + if (!((a->ptr == NULL && b->ptr == NULL) || + (a->ptr && b->ptr && IDP_EqualsProperties(a->ptr->data, b->ptr->data)))) return 0; if ((a->flag & KMI_INACTIVE) != (b->flag & KMI_INACTIVE)) @@ -172,7 +172,7 @@ wmKeyConfig *WM_keyconfig_new(wmWindowManager *wm, const char *idname) { wmKeyConfig *keyconf; - keyconf= MEM_callocN(sizeof(wmKeyConfig), "wmKeyConfig"); + keyconf = MEM_callocN(sizeof(wmKeyConfig), "wmKeyConfig"); BLI_strncpy(keyconf->idname, idname, sizeof(keyconf->idname)); BLI_addtail(&wm->keyconfigs, keyconf); @@ -205,7 +205,7 @@ void WM_keyconfig_free(wmKeyConfig *keyconf) { wmKeyMap *km; - while ((km= keyconf->keymaps.first)) { + while ((km = keyconf->keymaps.first)) { WM_keymap_free(km); BLI_freelinkN(&keyconf->keymaps, km); } @@ -217,8 +217,8 @@ static wmKeyConfig *wm_keyconfig_list_find(ListBase *lb, char *idname) { wmKeyConfig *kc; - for (kc= lb->first; kc; kc= kc->next) - if (0==strncmp(idname, kc->idname, KMAP_MAX_NAME)) + for (kc = lb->first; kc; kc = kc->next) + if (0 == strncmp(idname, kc->idname, KMAP_MAX_NAME)) return kc; return NULL; @@ -229,7 +229,7 @@ static wmKeyConfig *WM_keyconfig_active(wmWindowManager *wm) wmKeyConfig *keyconf; /* first try from preset */ - keyconf= wm_keyconfig_list_find(&wm->keyconfigs, U.keyconfigstr); + keyconf = wm_keyconfig_list_find(&wm->keyconfigs, U.keyconfigstr); if (keyconf) return keyconf; @@ -255,11 +255,11 @@ void WM_keyconfig_set_active(wmWindowManager *wm, const char *idname) static wmKeyMap *wm_keymap_new(const char *idname, int spaceid, int regionid) { - wmKeyMap *km= MEM_callocN(sizeof(struct wmKeyMap), "keymap list"); + wmKeyMap *km = MEM_callocN(sizeof(struct wmKeyMap), "keymap list"); BLI_strncpy(km->idname, idname, KMAP_MAX_NAME); - km->spaceid= spaceid; - km->regionid= regionid; + km->spaceid = spaceid; + km->regionid = regionid; return km; } @@ -270,18 +270,18 @@ static wmKeyMap *wm_keymap_copy(wmKeyMap *keymap) wmKeyMapItem *kmi, *kmin; wmKeyMapDiffItem *kmdi, *kmdin; - keymapn->modal_items= keymap->modal_items; - keymapn->poll= keymap->poll; - keymapn->items.first= keymapn->items.last= NULL; - keymapn->flag &= ~(KEYMAP_UPDATE|KEYMAP_EXPANDED); + keymapn->modal_items = keymap->modal_items; + keymapn->poll = keymap->poll; + keymapn->items.first = keymapn->items.last = NULL; + keymapn->flag &= ~(KEYMAP_UPDATE | KEYMAP_EXPANDED); - for (kmdi=keymap->diff_items.first; kmdi; kmdi=kmdi->next) { - kmdin= wm_keymap_diff_item_copy(kmdi); + for (kmdi = keymap->diff_items.first; kmdi; kmdi = kmdi->next) { + kmdin = wm_keymap_diff_item_copy(kmdi); BLI_addtail(&keymapn->items, kmdin); } - for (kmi=keymap->items.first; kmi; kmi=kmi->next) { - kmin= wm_keymap_item_copy(kmi); + for (kmi = keymap->items.first; kmi; kmi = kmi->next) { + kmin = wm_keymap_item_copy(kmi); BLI_addtail(&keymapn->items, kmin); } @@ -293,10 +293,10 @@ void WM_keymap_free(wmKeyMap *keymap) wmKeyMapItem *kmi; wmKeyMapDiffItem *kmdi; - for (kmdi=keymap->diff_items.first; kmdi; kmdi=kmdi->next) + for (kmdi = keymap->diff_items.first; kmdi; kmdi = kmdi->next) wm_keymap_diff_item_free(kmdi); - for (kmi=keymap->items.first; kmi; kmi=kmi->next) + for (kmi = keymap->items.first; kmi; kmi = kmi->next) wm_keymap_item_free(kmi); BLI_freelistN(&keymap->diff_items); @@ -305,18 +305,18 @@ void WM_keymap_free(wmKeyMap *keymap) static void keymap_event_set(wmKeyMapItem *kmi, short type, short val, int modifier, short keymodifier) { - kmi->type= type; - kmi->val= val; - kmi->keymodifier= keymodifier; + kmi->type = type; + kmi->val = val; + kmi->keymodifier = keymodifier; if (modifier == KM_ANY) { - kmi->shift= kmi->ctrl= kmi->alt= kmi->oskey= KM_ANY; + kmi->shift = kmi->ctrl = kmi->alt = kmi->oskey = KM_ANY; } else { - kmi->shift= (modifier & KM_SHIFT) ? KM_MOD_FIRST : ((modifier & KM_SHIFT2) ? KM_MOD_SECOND : FALSE); - kmi->ctrl= (modifier & KM_CTRL) ? KM_MOD_FIRST : ((modifier & KM_CTRL2) ? KM_MOD_SECOND : FALSE); - kmi->alt= (modifier & KM_ALT) ? KM_MOD_FIRST : ((modifier & KM_ALT2) ? KM_MOD_SECOND : FALSE); - kmi->oskey= (modifier & KM_OSKEY) ? KM_MOD_FIRST : ((modifier & KM_OSKEY2) ? KM_MOD_SECOND : FALSE); + kmi->shift = (modifier & KM_SHIFT) ? KM_MOD_FIRST : ((modifier & KM_SHIFT2) ? KM_MOD_SECOND : FALSE); + kmi->ctrl = (modifier & KM_CTRL) ? KM_MOD_FIRST : ((modifier & KM_CTRL2) ? KM_MOD_SECOND : FALSE); + kmi->alt = (modifier & KM_ALT) ? KM_MOD_FIRST : ((modifier & KM_ALT2) ? KM_MOD_SECOND : FALSE); + kmi->oskey = (modifier & KM_OSKEY) ? KM_MOD_FIRST : ((modifier & KM_OSKEY2) ? KM_MOD_SECOND : FALSE); } } @@ -337,9 +337,9 @@ wmKeyMapItem *WM_keymap_verify_item(wmKeyMap *keymap, const char *idname, int ty wmKeyMapItem *kmi; for (kmi = keymap->items.first; kmi; kmi = kmi->next) - if (strncmp(kmi->idname, idname, OP_MAX_TYPENAME)==0) + if (strncmp(kmi->idname, idname, OP_MAX_TYPENAME) == 0) break; - if (kmi==NULL) { + if (kmi == NULL) { kmi = MEM_callocN(sizeof(wmKeyMapItem), "keymap entry"); BLI_addtail(&keymap->items, kmi); @@ -402,7 +402,7 @@ static void wm_keymap_addon_add(wmKeyMap *keymap, wmKeyMap *addonmap) { wmKeyMapItem *kmi, *kmin; - for (kmi=addonmap->items.first; kmi; kmi=kmi->next) { + for (kmi = addonmap->items.first; kmi; kmi = kmi->next) { kmin = wm_keymap_item_copy(kmi); keymap_item_set_id(keymap, kmin); BLI_addhead(&keymap->items, kmin); @@ -413,7 +413,7 @@ static wmKeyMapItem *wm_keymap_find_item_equals(wmKeyMap *km, wmKeyMapItem *need { wmKeyMapItem *kmi; - for (kmi=km->items.first; kmi; kmi=kmi->next) + for (kmi = km->items.first; kmi; kmi = kmi->next) if (wm_keymap_item_equals(kmi, needle)) return kmi; @@ -424,7 +424,7 @@ static wmKeyMapItem *wm_keymap_find_item_equals_result(wmKeyMap *km, wmKeyMapIte { wmKeyMapItem *kmi; - for (kmi=km->items.first; kmi; kmi=kmi->next) + for (kmi = km->items.first; kmi; kmi = kmi->next) if (wm_keymap_item_equals_result(kmi, needle)) return kmi; @@ -436,7 +436,7 @@ static void wm_keymap_diff(wmKeyMap *diff_km, wmKeyMap *from_km, wmKeyMap *to_km wmKeyMapItem *kmi, *to_kmi, *orig_kmi; wmKeyMapDiffItem *kmdi; - for (kmi=from_km->items.first; kmi; kmi=kmi->next) { + for (kmi = from_km->items.first; kmi; kmi = kmi->next) { to_kmi = WM_keymap_item_find_id(to_km, kmi->id); if (!to_kmi) { @@ -467,7 +467,7 @@ static void wm_keymap_diff(wmKeyMap *diff_km, wmKeyMap *from_km, wmKeyMap *to_km } } - for (kmi=to_km->items.first; kmi; kmi=kmi->next) { + for (kmi = to_km->items.first; kmi; kmi = kmi->next) { if (kmi->id < 0) { /* add item */ kmdi = MEM_callocN(sizeof(wmKeyMapDiffItem), "wmKeyMapDiffItem"); @@ -482,7 +482,7 @@ static void wm_keymap_patch(wmKeyMap *km, wmKeyMap *diff_km) wmKeyMapDiffItem *kmdi; wmKeyMapItem *kmi_remove, *kmi_add; - for (kmdi=diff_km->diff_items.first; kmdi; kmdi=kmdi->next) { + for (kmdi = diff_km->diff_items.first; kmdi; kmdi = kmdi->next) { /* find item to remove */ kmi_remove = NULL; if (kmdi->remove_item) { @@ -527,7 +527,7 @@ static wmKeyMap *wm_keymap_patch_update(ListBase *lb, wmKeyMap *defaultmap, wmKe /* remove previous keymap in list, we will replace it */ km = WM_keymap_list_find(lb, defaultmap->idname, defaultmap->spaceid, defaultmap->regionid); if (km) { - expanded = (km->flag & (KEYMAP_EXPANDED|KEYMAP_CHILDREN_EXPANDED)); + expanded = (km->flag & (KEYMAP_EXPANDED | KEYMAP_CHILDREN_EXPANDED)); WM_keymap_free(km); BLI_freelinkN(lb, km); } @@ -541,7 +541,7 @@ static wmKeyMap *wm_keymap_patch_update(ListBase *lb, wmKeyMap *defaultmap, wmKe km = wm_keymap_copy(usermap); /* try to find corresponding id's for items */ - for (kmi=km->items.first; kmi; kmi=kmi->next) { + for (kmi = km->items.first; kmi; kmi = kmi->next) { orig_kmi = wm_keymap_find_item_equals(defaultmap, kmi); if (!orig_kmi) orig_kmi = wm_keymap_find_item_equals_result(defaultmap, kmi); @@ -564,7 +564,7 @@ static wmKeyMap *wm_keymap_patch_update(ListBase *lb, wmKeyMap *defaultmap, wmKe /* tag as being user edited */ if (usermap) km->flag |= KEYMAP_USER_MODIFIED; - km->flag |= KEYMAP_USER|expanded; + km->flag |= KEYMAP_USER | expanded; /* apply user changes of diff keymap */ if (usermap && (usermap->flag & KEYMAP_DIFF)) @@ -596,7 +596,7 @@ static void wm_keymap_diff_update(ListBase *lb, wmKeyMap *defaultmap, wmKeyMap * } /* create diff keymap */ - diffmap= wm_keymap_new(km->idname, km->spaceid, km->regionid); + diffmap = wm_keymap_new(km->idname, km->spaceid, km->regionid); diffmap->flag |= KEYMAP_DIFF; if (defaultmap->flag & KEYMAP_MODAL) diffmap->flag |= KEYMAP_MODAL; @@ -628,9 +628,9 @@ wmKeyMap *WM_keymap_list_find(ListBase *lb, const char *idname, int spaceid, int { wmKeyMap *km; - for (km= lb->first; km; km= km->next) - if (km->spaceid==spaceid && km->regionid==regionid) - if (0==strncmp(idname, km->idname, KMAP_MAX_NAME)) + for (km = lb->first; km; km = km->next) + if (km->spaceid == spaceid && km->regionid == regionid) + if (0 == strncmp(idname, km->idname, KMAP_MAX_NAME)) return km; return NULL; @@ -638,10 +638,10 @@ wmKeyMap *WM_keymap_list_find(ListBase *lb, const char *idname, int spaceid, int wmKeyMap *WM_keymap_find(wmKeyConfig *keyconf, const char *idname, int spaceid, int regionid) { - wmKeyMap *km= WM_keymap_list_find(&keyconf->keymaps, idname, spaceid, regionid); + wmKeyMap *km = WM_keymap_list_find(&keyconf->keymaps, idname, spaceid, regionid); - if (km==NULL) { - km= wm_keymap_new(idname, spaceid, regionid); + if (km == NULL) { + km = wm_keymap_new(idname, spaceid, regionid); BLI_addtail(&keyconf->keymaps, km); WM_keyconfig_update_tag(km, NULL); @@ -652,7 +652,7 @@ wmKeyMap *WM_keymap_find(wmKeyConfig *keyconf, const char *idname, int spaceid, wmKeyMap *WM_keymap_find_all(const bContext *C, const char *idname, int spaceid, int regionid) { - wmWindowManager *wm= CTX_wm_manager(C); + wmWindowManager *wm = CTX_wm_manager(C); return WM_keymap_list_find(&wm->userconf->keymaps, idname, spaceid, regionid); } @@ -663,14 +663,14 @@ wmKeyMap *WM_keymap_find_all(const bContext *C, const char *idname, int spaceid, wmKeyMap *WM_modalkeymap_add(wmKeyConfig *keyconf, const char *idname, EnumPropertyItem *items) { - wmKeyMap *km= WM_keymap_find(keyconf, idname, 0, 0); + wmKeyMap *km = WM_keymap_find(keyconf, idname, 0, 0); km->flag |= KEYMAP_MODAL; - km->modal_items= items; + km->modal_items = items; if (!items) { /* init modal items from default config */ wmWindowManager *wm = G.main->wm.first; - wmKeyMap *defaultkm= WM_keymap_list_find(&wm->defaultconf->keymaps, km->idname, 0, 0); + wmKeyMap *defaultkm = WM_keymap_list_find(&wm->defaultconf->keymaps, km->idname, 0, 0); if (defaultkm) { km->modal_items = defaultkm->modal_items; @@ -685,9 +685,9 @@ wmKeyMap *WM_modalkeymap_get(wmKeyConfig *keyconf, const char *idname) { wmKeyMap *km; - for (km= keyconf->keymaps.first; km; km= km->next) + for (km = keyconf->keymaps.first; km; km = km->next) if (km->flag & KEYMAP_MODAL) - if (0==strncmp(idname, km->idname, KMAP_MAX_NAME)) + if (0 == strncmp(idname, km->idname, KMAP_MAX_NAME)) break; return km; @@ -699,7 +699,7 @@ wmKeyMapItem *WM_modalkeymap_add_item(wmKeyMap *km, int type, int val, int modif wmKeyMapItem *kmi = MEM_callocN(sizeof(wmKeyMapItem), "keymap entry"); BLI_addtail(&km->items, kmi); - kmi->propvalue= value; + kmi->propvalue = value; keymap_event_set(kmi, type, val, modifier, keymodifier); @@ -712,7 +712,7 @@ wmKeyMapItem *WM_modalkeymap_add_item(wmKeyMap *km, int type, int val, int modif void WM_modalkeymap_assign(wmKeyMap *km, const char *opname) { - wmOperatorType *ot= WM_operatortype_find(opname, 0); + wmOperatorType *ot = WM_operatortype_find(opname, 0); if (ot) ot->modalkeymap = km; @@ -724,7 +724,7 @@ void WM_modalkeymap_assign(wmKeyMap *km, const char *opname) const char *WM_key_event_string(short type) { - const char *name= NULL; + const char *name = NULL; if (RNA_enum_name(event_type_items, (int)type, &name)) return name; @@ -735,12 +735,12 @@ char *WM_keymap_item_to_string(wmKeyMapItem *kmi, char *str, int len) { char buf[128]; - buf[0]= 0; + buf[0] = 0; if (kmi->shift == KM_ANY && - kmi->ctrl == KM_ANY && - kmi->alt == KM_ANY && - kmi->oskey == KM_ANY) { + kmi->ctrl == KM_ANY && + kmi->alt == KM_ANY && + kmi->oskey == KM_ANY) { strcat(buf, "Any "); } @@ -770,20 +770,20 @@ char *WM_keymap_item_to_string(wmKeyMapItem *kmi, char *str, int len) } static wmKeyMapItem *wm_keymap_item_find_handlers( - const bContext *C, ListBase *handlers, const char *opname, int UNUSED(opcontext), - IDProperty *properties, int compare_props, int hotkey, wmKeyMap **keymap_r) + const bContext *C, ListBase *handlers, const char *opname, int UNUSED(opcontext), + IDProperty *properties, int compare_props, int hotkey, wmKeyMap **keymap_r) { - wmWindowManager *wm= CTX_wm_manager(C); + wmWindowManager *wm = CTX_wm_manager(C); wmEventHandler *handler; wmKeyMap *keymap; wmKeyMapItem *kmi; /* find keymap item in handlers */ - for (handler=handlers->first; handler; handler=handler->next) { - keymap= WM_keymap_active(wm, handler->keymap); + for (handler = handlers->first; handler; handler = handler->next) { + keymap = WM_keymap_active(wm, handler->keymap); - if (keymap && (!keymap->poll || keymap->poll((bContext*)C))) { - for (kmi=keymap->items.first; kmi; kmi=kmi->next) { + if (keymap && (!keymap->poll || keymap->poll((bContext *)C))) { + for (kmi = keymap->items.first; kmi; kmi = kmi->next) { if (strcmp(kmi->idname, opname) == 0 && WM_key_event_string(kmi->type)[0]) { if (hotkey) @@ -792,12 +792,12 @@ static wmKeyMapItem *wm_keymap_item_find_handlers( if (compare_props) { if (kmi->ptr && IDP_EqualsProperties(properties, kmi->ptr->data)) { - if (keymap_r) *keymap_r= keymap; + if (keymap_r) *keymap_r = keymap; return kmi; } } else { - if (keymap_r) *keymap_r= keymap; + if (keymap_r) *keymap_r = keymap; return kmi; } } @@ -806,54 +806,54 @@ static wmKeyMapItem *wm_keymap_item_find_handlers( } /* ensure un-initialized keymap is never used */ - if (keymap_r) *keymap_r= NULL; + if (keymap_r) *keymap_r = NULL; return NULL; } static wmKeyMapItem *wm_keymap_item_find_props( - const bContext *C, const char *opname, int opcontext, - IDProperty *properties, int compare_props, int hotkey, wmKeyMap **keymap_r) + const bContext *C, const char *opname, int opcontext, + IDProperty *properties, int compare_props, int hotkey, wmKeyMap **keymap_r) { - wmWindow *win= CTX_wm_window(C); - ScrArea *sa= CTX_wm_area(C); - ARegion *ar= CTX_wm_region(C); - wmKeyMapItem *found= NULL; + wmWindow *win = CTX_wm_window(C); + ScrArea *sa = CTX_wm_area(C); + ARegion *ar = CTX_wm_region(C); + wmKeyMapItem *found = NULL; /* look into multiple handler lists to find the item */ if (win) - found= wm_keymap_item_find_handlers(C, &win->handlers, opname, opcontext, properties, compare_props, hotkey, keymap_r); + found = wm_keymap_item_find_handlers(C, &win->handlers, opname, opcontext, properties, compare_props, hotkey, keymap_r); - if (sa && found==NULL) - found= wm_keymap_item_find_handlers(C, &sa->handlers, opname, opcontext, properties, compare_props, hotkey, keymap_r); + if (sa && found == NULL) + found = wm_keymap_item_find_handlers(C, &sa->handlers, opname, opcontext, properties, compare_props, hotkey, keymap_r); - if (found==NULL) { + if (found == NULL) { if (ELEM(opcontext, WM_OP_EXEC_REGION_WIN, WM_OP_INVOKE_REGION_WIN)) { if (sa) { if (!(ar && ar->regiontype == RGN_TYPE_WINDOW)) - ar= BKE_area_find_region_type(sa, RGN_TYPE_WINDOW); + ar = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW); if (ar) - found= wm_keymap_item_find_handlers(C, &ar->handlers, opname, opcontext, properties, compare_props, hotkey, keymap_r); + found = wm_keymap_item_find_handlers(C, &ar->handlers, opname, opcontext, properties, compare_props, hotkey, keymap_r); } } else if (ELEM(opcontext, WM_OP_EXEC_REGION_CHANNELS, WM_OP_INVOKE_REGION_CHANNELS)) { if (!(ar && ar->regiontype == RGN_TYPE_CHANNELS)) - ar= BKE_area_find_region_type(sa, RGN_TYPE_CHANNELS); + ar = BKE_area_find_region_type(sa, RGN_TYPE_CHANNELS); if (ar) - found= wm_keymap_item_find_handlers(C, &ar->handlers, opname, opcontext, properties, compare_props, hotkey, keymap_r); + found = wm_keymap_item_find_handlers(C, &ar->handlers, opname, opcontext, properties, compare_props, hotkey, keymap_r); } else if (ELEM(opcontext, WM_OP_EXEC_REGION_PREVIEW, WM_OP_INVOKE_REGION_PREVIEW)) { if (!(ar && ar->regiontype == RGN_TYPE_PREVIEW)) - ar= BKE_area_find_region_type(sa, RGN_TYPE_PREVIEW); + ar = BKE_area_find_region_type(sa, RGN_TYPE_PREVIEW); if (ar) - found= wm_keymap_item_find_handlers(C, &ar->handlers, opname, opcontext, properties, compare_props, hotkey, keymap_r); + found = wm_keymap_item_find_handlers(C, &ar->handlers, opname, opcontext, properties, compare_props, hotkey, keymap_r); } else { if (ar) - found= wm_keymap_item_find_handlers(C, &ar->handlers, opname, opcontext, properties, compare_props, hotkey, keymap_r); + found = wm_keymap_item_find_handlers(C, &ar->handlers, opname, opcontext, properties, compare_props, hotkey, keymap_r); } } @@ -861,20 +861,20 @@ static wmKeyMapItem *wm_keymap_item_find_props( } static wmKeyMapItem *wm_keymap_item_find( - const bContext *C, const char *opname, int opcontext, - IDProperty *properties, const short hotkey, const short sloppy, wmKeyMap **keymap_r) + const bContext *C, const char *opname, int opcontext, + IDProperty *properties, const short hotkey, const short sloppy, wmKeyMap **keymap_r) { - wmKeyMapItem *found= wm_keymap_item_find_props(C, opname, opcontext, properties, 1, hotkey, keymap_r); + wmKeyMapItem *found = wm_keymap_item_find_props(C, opname, opcontext, properties, 1, hotkey, keymap_r); if (!found && sloppy) - found= wm_keymap_item_find_props(C, opname, opcontext, NULL, 0, hotkey, keymap_r); + found = wm_keymap_item_find_props(C, opname, opcontext, NULL, 0, hotkey, keymap_r); return found; } char *WM_key_event_operator_string( - const bContext *C, const char *opname, int opcontext, - IDProperty *properties, const short sloppy, char *str, int len) + const bContext *C, const char *opname, int opcontext, + IDProperty *properties, const short sloppy, char *str, int len) { wmKeyMapItem *kmi = wm_keymap_item_find(C, opname, opcontext, properties, 0, sloppy, NULL); @@ -887,8 +887,8 @@ char *WM_key_event_operator_string( } int WM_key_event_operator_id( - const bContext *C, const char *opname, int opcontext, - IDProperty *properties, int hotkey, wmKeyMap **keymap_r) + const bContext *C, const char *opname, int opcontext, + IDProperty *properties, int hotkey, wmKeyMap **keymap_r) { wmKeyMapItem *kmi = wm_keymap_item_find(C, opname, opcontext, properties, hotkey, TRUE, keymap_r); @@ -898,7 +898,7 @@ int WM_key_event_operator_id( return 0; } -int WM_keymap_item_compare(wmKeyMapItem *k1, wmKeyMapItem *k2) +int WM_keymap_item_compare(wmKeyMapItem *k1, wmKeyMapItem *k2) { int k1type, k2type; @@ -950,7 +950,7 @@ static int WM_KEYMAP_UPDATE = 0; void WM_keyconfig_update_tag(wmKeyMap *km, wmKeyMapItem *kmi) { /* quick tag to do delayed keymap updates */ - WM_KEYMAP_UPDATE= 1; + WM_KEYMAP_UPDATE = 1; if (km) km->flag |= KEYMAP_UPDATE; @@ -963,11 +963,11 @@ static int wm_keymap_test_and_clear_update(wmKeyMap *km) wmKeyMapItem *kmi; int update; - update= (km->flag & KEYMAP_UPDATE); + update = (km->flag & KEYMAP_UPDATE); km->flag &= ~KEYMAP_UPDATE; - for (kmi=km->items.first; kmi; kmi=kmi->next) { - update= update || (kmi->flag & KMI_UPDATE); + for (kmi = km->items.first; kmi; kmi = kmi->next) { + update = update || (kmi->flag & KMI_UPDATE); kmi->flag &= ~KMI_UPDATE; } @@ -976,12 +976,12 @@ static int wm_keymap_test_and_clear_update(wmKeyMap *km) static wmKeyMap *wm_keymap_preset(wmWindowManager *wm, wmKeyMap *km) { - wmKeyConfig *keyconf= WM_keyconfig_active(wm); + wmKeyConfig *keyconf = WM_keyconfig_active(wm); wmKeyMap *keymap; - keymap= WM_keymap_list_find(&keyconf->keymaps, km->idname, km->spaceid, km->regionid); + keymap = WM_keymap_list_find(&keyconf->keymaps, km->idname, km->spaceid, km->regionid); if (!keymap) - keymap= WM_keymap_list_find(&wm->defaultconf->keymaps, km->idname, km->spaceid, km->regionid); + keymap = WM_keymap_list_find(&wm->defaultconf->keymaps, km->idname, km->spaceid, km->regionid); return keymap; } @@ -999,27 +999,27 @@ void WM_keyconfig_update(wmWindowManager *wm) return; /* update operator properties for non-modal user keymaps */ - for (km=U.user_keymaps.first; km; km=km->next) { + for (km = U.user_keymaps.first; km; km = km->next) { if ((km->flag & KEYMAP_MODAL) == 0) { - for (kmdi=km->diff_items.first; kmdi; kmdi=kmdi->next) { + for (kmdi = km->diff_items.first; kmdi; kmdi = kmdi->next) { if (kmdi->add_item) wm_keymap_item_properties_set(kmdi->add_item); if (kmdi->remove_item) wm_keymap_item_properties_set(kmdi->remove_item); } - for (kmi=km->items.first; kmi; kmi=kmi->next) + for (kmi = km->items.first; kmi; kmi = kmi->next) wm_keymap_item_properties_set(kmi); } } /* update U.user_keymaps with user key configuration changes */ - for (km=wm->userconf->keymaps.first; km; km=km->next) { + for (km = wm->userconf->keymaps.first; km; km = km->next) { /* only diff if the user keymap was modified */ if (wm_keymap_test_and_clear_update(km)) { /* find keymaps */ - defaultmap= wm_keymap_preset(wm, km); - addonmap= WM_keymap_list_find(&wm->addonconf->keymaps, km->idname, km->spaceid, km->regionid); + defaultmap = wm_keymap_preset(wm, km); + addonmap = WM_keymap_list_find(&wm->addonconf->keymaps, km->idname, km->spaceid, km->regionid); /* diff */ if (defaultmap) @@ -1028,25 +1028,25 @@ void WM_keyconfig_update(wmWindowManager *wm) } /* create user key configuration from preset + addon + user preferences */ - for (km=wm->defaultconf->keymaps.first; km; km=km->next) { + for (km = wm->defaultconf->keymaps.first; km; km = km->next) { /* find keymaps */ - defaultmap= wm_keymap_preset(wm, km); - addonmap= WM_keymap_list_find(&wm->addonconf->keymaps, km->idname, km->spaceid, km->regionid); - usermap= WM_keymap_list_find(&U.user_keymaps, km->idname, km->spaceid, km->regionid); + defaultmap = wm_keymap_preset(wm, km); + addonmap = WM_keymap_list_find(&wm->addonconf->keymaps, km->idname, km->spaceid, km->regionid); + usermap = WM_keymap_list_find(&U.user_keymaps, km->idname, km->spaceid, km->regionid); /* add */ - kmn= wm_keymap_patch_update(&wm->userconf->keymaps, defaultmap, addonmap, usermap); + kmn = wm_keymap_patch_update(&wm->userconf->keymaps, defaultmap, addonmap, usermap); if (kmn) { - kmn->modal_items= km->modal_items; - kmn->poll= km->poll; + kmn->modal_items = km->modal_items; + kmn->poll = km->poll; } /* in case of old non-diff keymaps, force extra update to create diffs */ compat_update = compat_update || (usermap && !(usermap->flag & KEYMAP_DIFF)); } - WM_KEYMAP_UPDATE= 0; + WM_KEYMAP_UPDATE = 0; if (compat_update) { WM_keyconfig_update_tag(NULL, NULL); @@ -1067,7 +1067,7 @@ wmKeyMap *WM_keymap_active(wmWindowManager *wm, wmKeyMap *keymap) return NULL; /* first user defined keymaps */ - km= WM_keymap_list_find(&wm->userconf->keymaps, keymap->idname, keymap->spaceid, keymap->regionid); + km = WM_keymap_list_find(&wm->userconf->keymaps, keymap->idname, keymap->spaceid, keymap->regionid); if (km) return km; @@ -1088,8 +1088,8 @@ void WM_keymap_restore_item_to_default(bContext *C, wmKeyMap *keymap, wmKeyMapIt return; /* construct default keymap from preset + addons */ - defaultmap= wm_keymap_preset(wm, keymap); - addonmap= WM_keymap_list_find(&wm->addonconf->keymaps, keymap->idname, keymap->spaceid, keymap->regionid); + defaultmap = wm_keymap_preset(wm, keymap); + addonmap = WM_keymap_list_find(&wm->addonconf->keymaps, keymap->idname, keymap->spaceid, keymap->regionid); if (addonmap) { defaultmap = wm_keymap_copy(defaultmap); @@ -1110,11 +1110,11 @@ void WM_keymap_restore_item_to_default(bContext *C, wmKeyMap *keymap, wmKeyMapIt if (kmi->properties) { IDP_FreeProperty(kmi->properties); MEM_freeN(kmi->properties); - kmi->properties= NULL; + kmi->properties = NULL; } - kmi->properties= IDP_CopyProperty(orig->properties); - kmi->ptr->data= kmi->properties; + kmi->properties = IDP_CopyProperty(orig->properties); + kmi->ptr->data = kmi->properties; } kmi->propvalue = orig->propvalue; @@ -1143,7 +1143,7 @@ void WM_keymap_restore_to_default(wmKeyMap *keymap, bContext *C) wmKeyMap *usermap; /* remove keymap from U.user_keymaps and update */ - usermap= WM_keymap_list_find(&U.user_keymaps, keymap->idname, keymap->spaceid, keymap->regionid); + usermap = WM_keymap_list_find(&U.user_keymaps, keymap->idname, keymap->spaceid, keymap->regionid); if (usermap) { WM_keymap_free(usermap); @@ -1158,7 +1158,7 @@ wmKeyMapItem *WM_keymap_item_find_id(wmKeyMap *keymap, int id) { wmKeyMapItem *kmi; - for (kmi=keymap->items.first; kmi; kmi=kmi->next) { + for (kmi = keymap->items.first; kmi; kmi = kmi->next) { if (kmi->id == id) { return kmi; } @@ -1171,7 +1171,7 @@ wmKeyMapItem *WM_keymap_item_find_id(wmKeyMap *keymap, int id) /* Needs to be kept up to date with Keymap and Operator naming */ wmKeyMap *WM_keymap_guess_opname(const bContext *C, const char *opname) { - wmKeyMap *km=NULL; + wmKeyMap *km = NULL; SpaceLink *sl = CTX_wm_space_data(C); /* Window */ @@ -1206,7 +1206,7 @@ wmKeyMap *WM_keymap_guess_opname(const bContext *C, const char *opname) km = WM_keymap_find_all(C, "Mesh", 0, 0); /* some mesh operators are active in object mode too, like add-prim */ - if (km && km->poll && km->poll((bContext *)C)==0) { + if (km && km->poll && km->poll((bContext *)C) == 0) { km = WM_keymap_find_all(C, "Object Mode", 0, 0); } } @@ -1214,7 +1214,7 @@ wmKeyMap *WM_keymap_guess_opname(const bContext *C, const char *opname) km = WM_keymap_find_all(C, "Curve", 0, 0); /* some curve operators are active in object mode too, like add-prim */ - if (km && km->poll && km->poll((bContext *)C)==0) { + if (km && km->poll && km->poll((bContext *)C) == 0) { km = WM_keymap_find_all(C, "Object Mode", 0, 0); } } @@ -1225,7 +1225,7 @@ wmKeyMap *WM_keymap_guess_opname(const bContext *C, const char *opname) km = WM_keymap_find_all(C, "Pose", 0, 0); } else if (strstr(opname, "SCULPT_OT")) { - switch(CTX_data_mode_enum(C)) { + switch (CTX_data_mode_enum(C)) { case OB_MODE_SCULPT: km = WM_keymap_find_all(C, "Sculpt", 0, 0); break; @@ -1238,7 +1238,7 @@ wmKeyMap *WM_keymap_guess_opname(const bContext *C, const char *opname) km = WM_keymap_find_all(C, "Metaball", 0, 0); /* some mball operators are active in object mode too, like add-prim */ - if (km && km->poll && km->poll((bContext *)C)==0) { + if (km && km->poll && km->poll((bContext *)C) == 0) { km = WM_keymap_find_all(C, "Object Mode", 0, 0); } } @@ -1254,7 +1254,7 @@ wmKeyMap *WM_keymap_guess_opname(const bContext *C, const char *opname) else if (strstr(opname, "PAINT_OT")) { /* check for relevant mode */ - switch(CTX_data_mode_enum(C)) { + switch (CTX_data_mode_enum(C)) { case OB_MODE_WEIGHT_PAINT: km = WM_keymap_find_all(C, "Weight Paint", 0, 0); break; @@ -1331,7 +1331,7 @@ wmKeyMap *WM_keymap_guess_opname(const bContext *C, const char *opname) else if (strstr(opname, "TRANSFORM_OT")) { /* check for relevant editor */ - switch(sl->spacetype) { + switch (sl->spacetype) { case SPACE_VIEW3D: km = WM_keymap_find_all(C, "3D View", sl->spacetype, 0); break; diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index a973eb4fe2c..94de4293a6e 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -101,7 +101,7 @@ #include "wm_subwindow.h" #include "wm_window.h" -static GHash *global_ops_hash= NULL; +static GHash *global_ops_hash = NULL; /* ************ operator API, exported ********** */ @@ -115,7 +115,7 @@ wmOperatorType *WM_operatortype_find(const char *idname, int quiet) char idname_bl[OP_MAX_TYPENAME]; WM_operator_bl_idname(idname_bl, idname); - ot= BLI_ghash_lookup(global_ops_hash, idname_bl); + ot = BLI_ghash_lookup(global_ops_hash, idname_bl); if (ot) { return ot; } @@ -140,38 +140,38 @@ GHashIterator *WM_operatortype_iter(void) } /* all ops in 1 list (for time being... needs evaluation later) */ -void WM_operatortype_append(void (*opfunc)(wmOperatorType*)) +void WM_operatortype_append(void (*opfunc)(wmOperatorType *)) { wmOperatorType *ot; - ot= MEM_callocN(sizeof(wmOperatorType), "operatortype"); + ot = MEM_callocN(sizeof(wmOperatorType), "operatortype"); ot->srna = RNA_def_struct(&BLENDER_RNA, "", "OperatorProperties"); /* Set the default i18n context now, so that opfunc can redefine it if needed! */ RNA_def_struct_translation_context(ot->srna, WM_OPERATOR_DEFAULT_I18NCONTEXT); opfunc(ot); - if (ot->name==NULL) { + if (ot->name == NULL) { fprintf(stderr, "ERROR: Operator %s has no name property!\n", ot->idname); ot->name = N_("Dummy Name"); } // XXX All ops should have a description but for now allow them not to. - RNA_def_struct_ui_text(ot->srna, ot->name, ot->description ? ot->description:N_("(undocumented operator)")); + RNA_def_struct_ui_text(ot->srna, ot->name, ot->description ? ot->description : N_("(undocumented operator)")); RNA_def_struct_identifier(ot->srna, ot->idname); BLI_ghash_insert(global_ops_hash, (void *)ot->idname, ot); } -void WM_operatortype_append_ptr(void (*opfunc)(wmOperatorType*, void*), void *userdata) +void WM_operatortype_append_ptr(void (*opfunc)(wmOperatorType *, void *), void *userdata) { wmOperatorType *ot; - ot= MEM_callocN(sizeof(wmOperatorType), "operatortype"); + ot = MEM_callocN(sizeof(wmOperatorType), "operatortype"); ot->srna = RNA_def_struct(&BLENDER_RNA, "", "OperatorProperties"); /* Set the default i18n context now, so that opfunc can redefine it if needed! */ RNA_def_struct_translation_context(ot->srna, WM_OPERATOR_DEFAULT_I18NCONTEXT); opfunc(ot, userdata); - RNA_def_struct_ui_text(ot->srna, ot->name, ot->description ? ot->description:N_("(undocumented operator)")); + RNA_def_struct_ui_text(ot->srna, ot->name, ot->description ? ot->description : N_("(undocumented operator)")); RNA_def_struct_identifier(ot->srna, ot->idname); BLI_ghash_insert(global_ops_hash, (void *)ot->idname, ot); @@ -202,7 +202,7 @@ static int wm_macro_end(wmOperator *op, int retval) } /* if modal is ending, free custom data */ - if (retval & (OPERATOR_FINISHED|OPERATOR_CANCELLED)) { + if (retval & (OPERATOR_FINISHED | OPERATOR_CANCELLED)) { if (op->customdata) { MEM_freeN(op->customdata); op->customdata = NULL; @@ -216,14 +216,14 @@ static int wm_macro_end(wmOperator *op, int retval) static int wm_macro_exec(bContext *C, wmOperator *op) { wmOperator *opm; - int retval= OPERATOR_FINISHED; + int retval = OPERATOR_FINISHED; wm_macro_start(op); - for (opm= op->macro.first; opm; opm= opm->next) { + for (opm = op->macro.first; opm; opm = opm->next) { if (opm->type->exec) { - retval= opm->type->exec(C, opm); + retval = opm->type->exec(C, opm); OPERATOR_RETVAL_CHECK(retval); if (retval & OPERATOR_FINISHED) { @@ -241,14 +241,14 @@ static int wm_macro_exec(bContext *C, wmOperator *op) static int wm_macro_invoke_internal(bContext *C, wmOperator *op, wmEvent *event, wmOperator *opm) { - int retval= OPERATOR_FINISHED; + int retval = OPERATOR_FINISHED; /* start from operator received as argument */ - for ( ; opm; opm= opm->next) { + for (; opm; opm = opm->next) { if (opm->type->invoke) - retval= opm->type->invoke(C, opm, event); + retval = opm->type->invoke(C, opm, event); else if (opm->type->exec) - retval= opm->type->exec(C, opm); + retval = opm->type->exec(C, opm); OPERATOR_RETVAL_CHECK(retval); @@ -275,9 +275,9 @@ static int wm_macro_invoke(bContext *C, wmOperator *op, wmEvent *event) static int wm_macro_modal(bContext *C, wmOperator *op, wmEvent *event) { wmOperator *opm = op->opm; - int retval= OPERATOR_FINISHED; + int retval = OPERATOR_FINISHED; - if (opm==NULL) + if (opm == NULL) printf("%s: macro error, calling NULL modal()\n", __func__); else { retval = opm->type->modal(C, opm, event); @@ -311,16 +311,16 @@ static int wm_macro_modal(bContext *C, wmOperator *op, wmEvent *event) * This may end up grabbing twice, but we don't care. * */ if (op->opm->type->flag & OPTYPE_BLOCKING) { - int bounds[4] = {-1,-1,-1,-1}; + int bounds[4] = {-1, -1, -1, -1}; int wrap = (U.uiflag & USER_CONTINUOUS_MOUSE) && ((op->opm->flag & OP_GRAB_POINTER) || (op->opm->type->flag & OPTYPE_GRAB_POINTER)); if (wrap) { - ARegion *ar= CTX_wm_region(C); + ARegion *ar = CTX_wm_region(C); if (ar) { - bounds[0]= ar->winrct.xmin; - bounds[1]= ar->winrct.ymax; - bounds[2]= ar->winrct.xmax; - bounds[3]= ar->winrct.ymin; + bounds[0] = ar->winrct.xmin; + bounds[1] = ar->winrct.ymax; + bounds[2] = ar->winrct.xmax; + bounds[3] = ar->winrct.ymin; } } @@ -353,12 +353,12 @@ wmOperatorType *WM_operatortype_append_macro(const char *idname, const char *nam return NULL; } - ot= MEM_callocN(sizeof(wmOperatorType), "operatortype"); + ot = MEM_callocN(sizeof(wmOperatorType), "operatortype"); ot->srna = RNA_def_struct(&BLENDER_RNA, "", "OperatorProperties"); ot->idname = idname; ot->name = name; - ot->flag = OPTYPE_MACRO|flag; + ot->flag = OPTYPE_MACRO | flag; ot->exec = wm_macro_exec; ot->invoke = wm_macro_invoke; @@ -378,11 +378,11 @@ wmOperatorType *WM_operatortype_append_macro(const char *idname, const char *nam return ot; } -void WM_operatortype_append_macro_ptr(void (*opfunc)(wmOperatorType*, void*), void *userdata) +void WM_operatortype_append_macro_ptr(void (*opfunc)(wmOperatorType *, void *), void *userdata) { wmOperatorType *ot; - ot= MEM_callocN(sizeof(wmOperatorType), "operatortype"); + ot = MEM_callocN(sizeof(wmOperatorType), "operatortype"); ot->srna = RNA_def_struct(&BLENDER_RNA, "", "OperatorProperties"); ot->flag = OPTYPE_MACRO; @@ -407,7 +407,7 @@ void WM_operatortype_append_macro_ptr(void (*opfunc)(wmOperatorType*, void*), vo wmOperatorTypeMacro *WM_operatortype_macro_define(wmOperatorType *ot, const char *idname) { - wmOperatorTypeMacro *otmacro= MEM_callocN(sizeof(wmOperatorTypeMacro), "wmOperatorTypeMacro"); + wmOperatorTypeMacro *otmacro = MEM_callocN(sizeof(wmOperatorTypeMacro), "wmOperatorTypeMacro"); BLI_strncpy(otmacro->idname, idname, OP_MAX_TYPENAME); @@ -422,7 +422,7 @@ wmOperatorTypeMacro *WM_operatortype_macro_define(wmOperatorType *ot, const char wmOperatorType *otsub = WM_operatortype_find(idname, 0); if (otsub) { RNA_def_pointer_runtime(ot->srna, otsub->idname, otsub->srna, - otsub->name, otsub->description); + otsub->name, otsub->description); } } @@ -433,7 +433,7 @@ static void wm_operatortype_free_macro(wmOperatorType *ot) { wmOperatorTypeMacro *otmacro; - for (otmacro= ot->macro.first; otmacro; otmacro= otmacro->next) { + for (otmacro = ot->macro.first; otmacro; otmacro = otmacro->next) { if (otmacro->ptr) { WM_operator_properties_free(otmacro->ptr); MEM_freeN(otmacro->ptr); @@ -447,7 +447,7 @@ int WM_operatortype_remove(const char *idname) { wmOperatorType *ot = WM_operatortype_find(idname, 0); - if (ot==NULL) + if (ot == NULL) return 0; RNA_struct_free(&BLENDER_RNA, ot->srna); @@ -469,17 +469,17 @@ int WM_operatortype_remove(const char *idname) /* SOME_OT_op -> some.op */ void WM_operator_py_idname(char *to, const char *from) { - char *sep= strstr(from, "_OT_"); + char *sep = strstr(from, "_OT_"); if (sep) { - int ofs= (sep-from); + int ofs = (sep - from); /* note, we use ascii tolower instead of system tolower, because the * latter depends on the locale, and can lead to idname mistmatch */ - memcpy(to, from, sizeof(char)*ofs); + memcpy(to, from, sizeof(char) * ofs); BLI_ascii_strtolower(to, ofs); to[ofs] = '.'; - BLI_strncpy(to+(ofs+1), sep+4, OP_MAX_TYPENAME); + BLI_strncpy(to + (ofs + 1), sep + 4, OP_MAX_TYPENAME); } else { /* should not happen but support just in case */ @@ -491,16 +491,16 @@ void WM_operator_py_idname(char *to, const char *from) void WM_operator_bl_idname(char *to, const char *from) { if (from) { - char *sep= strchr(from, '.'); + char *sep = strchr(from, '.'); if (sep) { - int ofs= (sep-from); + int ofs = (sep - from); - memcpy(to, from, sizeof(char)*ofs); + memcpy(to, from, sizeof(char) * ofs); BLI_ascii_strtoupper(to, ofs); - BLI_strncpy(to+ofs, "_OT_", OP_MAX_TYPENAME); - BLI_strncpy(to+(ofs+4), sep+1, OP_MAX_TYPENAME); + BLI_strncpy(to + ofs, "_OT_", OP_MAX_TYPENAME); + BLI_strncpy(to + (ofs + 4), sep + 1, OP_MAX_TYPENAME); } else { /* should not happen but support just in case */ @@ -508,7 +508,7 @@ void WM_operator_bl_idname(char *to, const char *from) } } else - to[0]= 0; + to[0] = 0; } /* print a string representation of the operator, with the args that it runs @@ -522,17 +522,17 @@ char *WM_operator_pystring(bContext *C, wmOperatorType *ot, PointerRNA *opptr, i char idname_py[OP_MAX_TYPENAME]; /* for building the string */ - DynStr *dynstr= BLI_dynstr_new(); + DynStr *dynstr = BLI_dynstr_new(); char *cstring; char *cstring_args; /* only to get the orginal props for comparisons */ PointerRNA opptr_default; - if (all_args==0 || opptr==NULL) { + if (all_args == 0 || opptr == NULL) { WM_operator_properties_create_ptr(&opptr_default, ot); - if (opptr==NULL) + if (opptr == NULL) opptr = &opptr_default; } @@ -543,7 +543,7 @@ char *WM_operator_pystring(bContext *C, wmOperatorType *ot, PointerRNA *opptr, i BLI_dynstr_append(dynstr, cstring_args); MEM_freeN(cstring_args); - if (all_args==0 || opptr==&opptr_default ) + if (all_args == 0 || opptr == &opptr_default) WM_operator_properties_free(&opptr_default); BLI_dynstr_append(dynstr, ")"); @@ -560,7 +560,7 @@ void WM_operator_properties_create_ptr(PointerRNA *ptr, wmOperatorType *ot) void WM_operator_properties_create(PointerRNA *ptr, const char *opstring) { - wmOperatorType *ot= WM_operatortype_find(opstring, 0); + wmOperatorType *ot = WM_operatortype_find(opstring, 0); if (ot) WM_operator_properties_create_ptr(ptr, ot); @@ -572,33 +572,33 @@ void WM_operator_properties_create(PointerRNA *ptr, const char *opstring) * used for keymaps and macros */ void WM_operator_properties_alloc(PointerRNA **ptr, IDProperty **properties, const char *opstring) { - if (*properties==NULL) { + if (*properties == NULL) { IDPropertyTemplate val = {0}; - *properties= IDP_New(IDP_GROUP, &val, "wmOpItemProp"); + *properties = IDP_New(IDP_GROUP, &val, "wmOpItemProp"); } - if (*ptr==NULL) { - *ptr= MEM_callocN(sizeof(PointerRNA), "wmOpItemPtr"); + if (*ptr == NULL) { + *ptr = MEM_callocN(sizeof(PointerRNA), "wmOpItemPtr"); WM_operator_properties_create(*ptr, opstring); } - (*ptr)->data= *properties; + (*ptr)->data = *properties; } void WM_operator_properties_sanitize(PointerRNA *ptr, const short no_context) { RNA_STRUCT_BEGIN(ptr, prop) { - switch(RNA_property_type(prop)) { - case PROP_ENUM: - if (no_context) - RNA_def_property_flag(prop, PROP_ENUM_NO_CONTEXT); - else - RNA_def_property_clear_flag(prop, PROP_ENUM_NO_CONTEXT); - break; - case PROP_POINTER: + switch (RNA_property_type(prop)) { + case PROP_ENUM: + if (no_context) + RNA_def_property_flag(prop, PROP_ENUM_NO_CONTEXT); + else + RNA_def_property_clear_flag(prop, PROP_ENUM_NO_CONTEXT); + break; + case PROP_POINTER: { - StructRNA *ptype= RNA_property_pointer_type(ptr, prop); + StructRNA *ptype = RNA_property_pointer_type(ptr, prop); /* recurse into operator properties */ if (RNA_struct_is_a(ptype, &RNA_OperatorProperties)) { @@ -607,8 +607,8 @@ void WM_operator_properties_sanitize(PointerRNA *ptr, const short no_context) } break; } - default: - break; + default: + break; } } RNA_STRUCT_END; @@ -619,10 +619,10 @@ void WM_operator_properties_reset(wmOperator *op) { if (op->ptr->data) { PropertyRNA *iterprop; - iterprop= RNA_struct_iterator_property(op->type->srna); + iterprop = RNA_struct_iterator_property(op->type->srna); RNA_PROP_BEGIN(op->ptr, itemptr, iterprop) { - PropertyRNA *prop= itemptr.data; + PropertyRNA *prop = itemptr.data; if ((RNA_property_flag(prop) & PROP_SKIP_SAVE) == 0) { const char *identifier = RNA_property_identifier(prop); @@ -635,12 +635,12 @@ void WM_operator_properties_reset(wmOperator *op) void WM_operator_properties_free(PointerRNA *ptr) { - IDProperty *properties= ptr->data; + IDProperty *properties = ptr->data; if (properties) { IDP_FreeProperty(properties); MEM_freeN(properties); - ptr->data= NULL; /* just in case */ + ptr->data = NULL; /* just in case */ } } @@ -649,11 +649,11 @@ void WM_operator_properties_free(PointerRNA *ptr) /* invoke callback, uses enum property named "type" */ int WM_menu_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { - PropertyRNA *prop= op->type->prop; + PropertyRNA *prop = op->type->prop; uiPopupMenu *pup; uiLayout *layout; - if (prop==NULL) { + if (prop == NULL) { printf("%s: %s has no enum property set\n", __func__, op->type->idname); } else if (RNA_property_type(prop) != PROP_ENUM) { @@ -661,13 +661,13 @@ int WM_menu_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) __func__, op->type->idname, RNA_property_identifier(prop)); } else if (RNA_property_is_set(op->ptr, prop)) { - const int retval= op->type->exec(C, op); + const int retval = op->type->exec(C, op); OPERATOR_RETVAL_CHECK(retval); return retval; } else { - pup= uiPupMenuBegin(C, IFACE_(op->type->name), ICON_NONE); - layout= uiPupMenuLayout(pup); + pup = uiPupMenuBegin(C, IFACE_(op->type->name), ICON_NONE); + layout = uiPupMenuLayout(pup); uiItemsFullEnumO(layout, op->type->idname, RNA_property_identifier(prop), op->ptr->data, WM_OP_EXEC_REGION_WIN, 0); uiPupMenuEnd(C, pup); } @@ -680,9 +680,9 @@ int WM_menu_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) static void operator_enum_search_cb(const struct bContext *C, void *arg_ot, const char *str, uiSearchItems *items) { wmOperatorType *ot = (wmOperatorType *)arg_ot; - PropertyRNA *prop= ot->prop; + PropertyRNA *prop = ot->prop; - if (prop==NULL) { + if (prop == NULL) { printf("%s: %s has no enum property set\n", __func__, ot->idname); } @@ -699,10 +699,10 @@ static void operator_enum_search_cb(const struct bContext *C, void *arg_ot, cons RNA_pointer_create(NULL, ot->srna, NULL, &ptr); RNA_property_enum_items((bContext *)C, &ptr, prop, &item_array, NULL, &do_free); - for (item= item_array; item->identifier; item++) { + for (item = item_array; item->identifier; item++) { /* note: need to give the intex rather than the dientifier because the enum can be freed */ if (BLI_strcasestr(item->name, str)) - if (0==uiSearchItemAdd(items, item->name, SET_INT_IN_POINTER(item->value), 0)) + if (0 == uiSearchItemAdd(items, item->name, SET_INT_IN_POINTER(item->value), 0)) break; } @@ -713,7 +713,7 @@ static void operator_enum_search_cb(const struct bContext *C, void *arg_ot, cons static void operator_enum_call_cb(struct bContext *C, void *arg1, void *arg2) { - wmOperatorType *ot= arg1; + wmOperatorType *ot = arg1; if (ot) { if (ot->prop) { @@ -731,31 +731,31 @@ static void operator_enum_call_cb(struct bContext *C, void *arg1, void *arg2) static uiBlock *wm_enum_search_menu(bContext *C, ARegion *ar, void *arg_op) { - static char search[256]= ""; + static char search[256] = ""; wmEvent event; - wmWindow *win= CTX_wm_window(C); + wmWindow *win = CTX_wm_window(C); uiBlock *block; uiBut *but; - wmOperator *op= (wmOperator *)arg_op; + wmOperator *op = (wmOperator *)arg_op; - block= uiBeginBlock(C, ar, "_popup", UI_EMBOSS); - uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_RET_1|UI_BLOCK_MOVEMOUSE_QUIT); + block = uiBeginBlock(C, ar, "_popup", UI_EMBOSS); + uiBlockSetFlag(block, UI_BLOCK_LOOP | UI_BLOCK_RET_1 | UI_BLOCK_MOVEMOUSE_QUIT); //uiDefBut(block, LABEL, 0, op->type->name, 10, 10, 180, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, ""); // ok, this isn't so easy... - but = uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 10, 10, 9*UI_UNIT_X, UI_UNIT_Y, 0, 0, ""); + but = uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 10, 10, 9 * UI_UNIT_X, UI_UNIT_Y, 0, 0, ""); uiButSetSearchFunc(but, operator_enum_search_cb, op->type, operator_enum_call_cb, NULL); /* fake button, it holds space for search items */ - uiDefBut(block, LABEL, 0, "", 10, 10 - uiSearchBoxhHeight(), 9*UI_UNIT_X, uiSearchBoxhHeight(), NULL, 0, 0, 0, 0, NULL); + uiDefBut(block, LABEL, 0, "", 10, 10 - uiSearchBoxhHeight(), 9 * UI_UNIT_X, uiSearchBoxhHeight(), NULL, 0, 0, 0, 0, NULL); uiPopupBoundsBlock(block, 6, 0, -UI_UNIT_Y); /* move it downwards, mouse over button */ uiEndBlock(C, block); - event= *(win->eventstate); /* XXX huh huh? make api call */ - event.type= EVT_BUT_OPEN; - event.val= KM_PRESS; - event.customdata= but; - event.customdatafree= FALSE; + event = *(win->eventstate); /* XXX huh huh? make api call */ + event.type = EVT_BUT_OPEN; + event.val = KM_PRESS; + event.customdata = but; + event.customdatafree = FALSE; wm_event_add(win, &event); return block; @@ -773,15 +773,15 @@ int WM_operator_confirm_message(bContext *C, wmOperator *op, const char *message { uiPopupMenu *pup; uiLayout *layout; - IDProperty *properties= op->ptr->data; + IDProperty *properties = op->ptr->data; if (properties && properties->len) - properties= IDP_CopyProperty(op->ptr->data); + properties = IDP_CopyProperty(op->ptr->data); else - properties= NULL; + properties = NULL; - pup= uiPupMenuBegin(C, IFACE_("OK?"), ICON_QUESTION); - layout= uiPupMenuLayout(pup); + pup = uiPupMenuBegin(C, IFACE_("OK?"), ICON_QUESTION); + layout = uiPupMenuLayout(pup); uiItemFullO_ptr(layout, op->type, message, ICON_NONE, properties, WM_OP_EXEC_REGION_WIN, 0); uiPupMenuEnd(C, pup); @@ -816,7 +816,8 @@ void WM_operator_properties_filesel(wmOperatorType *ot, int filter, short type, {FILE_SHORTDISPLAY, "FILE_SHORTDISPLAY", ICON_SHORTDISPLAY, "Short List", "Display files as short list"}, {FILE_LONGDISPLAY, "FILE_LONGDISPLAY", ICON_LONGDISPLAY, "Long List", "Display files as a detailed list"}, {FILE_IMGDISPLAY, "FILE_IMGDISPLAY", ICON_IMGDISPLAY, "Thumbnails", "Display files as thumbnails"}, - {0, NULL, 0, NULL, NULL}}; + {0, NULL, 0, NULL, NULL} + }; if (flag & WM_FILESEL_FILEPATH) @@ -832,51 +833,51 @@ void WM_operator_properties_filesel(wmOperatorType *ot, int filter, short type, RNA_def_collection_runtime(ot->srna, "files", &RNA_OperatorFileListElement, "Files", ""); if (action == FILE_SAVE) { - prop= RNA_def_boolean(ot->srna, "check_existing", 1, "Check Existing", "Check and warn on overwriting existing files"); + prop = RNA_def_boolean(ot->srna, "check_existing", 1, "Check Existing", "Check and warn on overwriting existing files"); RNA_def_property_flag(prop, PROP_HIDDEN); } - prop= RNA_def_boolean(ot->srna, "filter_blender", (filter & BLENDERFILE), "Filter .blend files", ""); + prop = RNA_def_boolean(ot->srna, "filter_blender", (filter & BLENDERFILE), "Filter .blend files", ""); RNA_def_property_flag(prop, PROP_HIDDEN); - prop= RNA_def_boolean(ot->srna, "filter_image", (filter & IMAGEFILE), "Filter image files", ""); + prop = RNA_def_boolean(ot->srna, "filter_image", (filter & IMAGEFILE), "Filter image files", ""); RNA_def_property_flag(prop, PROP_HIDDEN); - prop= RNA_def_boolean(ot->srna, "filter_movie", (filter & MOVIEFILE), "Filter movie files", ""); + prop = RNA_def_boolean(ot->srna, "filter_movie", (filter & MOVIEFILE), "Filter movie files", ""); RNA_def_property_flag(prop, PROP_HIDDEN); - prop= RNA_def_boolean(ot->srna, "filter_python", (filter & PYSCRIPTFILE), "Filter python files", ""); + prop = RNA_def_boolean(ot->srna, "filter_python", (filter & PYSCRIPTFILE), "Filter python files", ""); RNA_def_property_flag(prop, PROP_HIDDEN); - prop= RNA_def_boolean(ot->srna, "filter_font", (filter & FTFONTFILE), "Filter font files", ""); + prop = RNA_def_boolean(ot->srna, "filter_font", (filter & FTFONTFILE), "Filter font files", ""); RNA_def_property_flag(prop, PROP_HIDDEN); - prop= RNA_def_boolean(ot->srna, "filter_sound", (filter & SOUNDFILE), "Filter sound files", ""); + prop = RNA_def_boolean(ot->srna, "filter_sound", (filter & SOUNDFILE), "Filter sound files", ""); RNA_def_property_flag(prop, PROP_HIDDEN); - prop= RNA_def_boolean(ot->srna, "filter_text", (filter & TEXTFILE), "Filter text files", ""); + prop = RNA_def_boolean(ot->srna, "filter_text", (filter & TEXTFILE), "Filter text files", ""); RNA_def_property_flag(prop, PROP_HIDDEN); - prop= RNA_def_boolean(ot->srna, "filter_btx", (filter & BTXFILE), "Filter btx files", ""); + prop = RNA_def_boolean(ot->srna, "filter_btx", (filter & BTXFILE), "Filter btx files", ""); RNA_def_property_flag(prop, PROP_HIDDEN); - prop= RNA_def_boolean(ot->srna, "filter_collada", (filter & COLLADAFILE), "Filter COLLADA files", ""); + prop = RNA_def_boolean(ot->srna, "filter_collada", (filter & COLLADAFILE), "Filter COLLADA files", ""); RNA_def_property_flag(prop, PROP_HIDDEN); - prop= RNA_def_boolean(ot->srna, "filter_folder", (filter & FOLDERFILE), "Filter folders", ""); + prop = RNA_def_boolean(ot->srna, "filter_folder", (filter & FOLDERFILE), "Filter folders", ""); RNA_def_property_flag(prop, PROP_HIDDEN); - prop= RNA_def_int(ot->srna, "filemode", type, FILE_LOADLIB, FILE_SPECIAL, - "File Browser Mode", "The setting for the file browser mode to load a .blend file, a library or a special file", - FILE_LOADLIB, FILE_SPECIAL); + prop = RNA_def_int(ot->srna, "filemode", type, FILE_LOADLIB, FILE_SPECIAL, + "File Browser Mode", "The setting for the file browser mode to load a .blend file, a library or a special file", + FILE_LOADLIB, FILE_SPECIAL); RNA_def_property_flag(prop, PROP_HIDDEN); if (flag & WM_FILESEL_RELPATH) RNA_def_boolean(ot->srna, "relative_path", TRUE, "Relative Path", "Select the file relative to the blend file"); - prop= RNA_def_enum(ot->srna, "display_type", file_display_items, display, "Display Type", ""); + prop = RNA_def_enum(ot->srna, "display_type", file_display_items, display, "Display Type", ""); RNA_def_property_flag(prop, PROP_HIDDEN); } void WM_operator_properties_select_all(wmOperatorType *ot) { static EnumPropertyItem select_all_actions[] = { - {SEL_TOGGLE, "TOGGLE", 0, "Toggle", "Toggle selection for all elements"}, - {SEL_SELECT, "SELECT", 0, "Select", "Select all elements"}, - {SEL_DESELECT, "DESELECT", 0, "Deselect", "Deselect all elements"}, - {SEL_INVERT, "INVERT", 0, "Invert", "Invert selection of all elements"}, - {0, NULL, 0, NULL, NULL} + {SEL_TOGGLE, "TOGGLE", 0, "Toggle", "Toggle selection for all elements"}, + {SEL_SELECT, "SELECT", 0, "Select", "Select all elements"}, + {SEL_DESELECT, "DESELECT", 0, "Deselect", "Deselect all elements"}, + {SEL_INVERT, "INVERT", 0, "Invert", "Invert selection of all elements"}, + {0, NULL, 0, NULL, NULL} }; RNA_def_enum(ot->srna, "action", select_all_actions, SEL_TOGGLE, "Action", "Selection action to execute"); @@ -909,26 +910,26 @@ void WM_operator_properties_gesture_straightline(wmOperatorType *ot, int cursor) /* op->poll */ int WM_operator_winactive(bContext *C) { - if (CTX_wm_window(C)==NULL) return 0; + if (CTX_wm_window(C) == NULL) return 0; return 1; } /* return FALSE, if the UI should be disabled */ int WM_operator_check_ui_enabled(const bContext *C, const char *idname) { - wmWindowManager *wm= CTX_wm_manager(C); - Scene *scene= CTX_data_scene(C); + wmWindowManager *wm = CTX_wm_manager(C); + Scene *scene = CTX_data_scene(C); - return !(ED_undo_valid(C, idname)==0 || WM_jobs_test(wm, scene)); + return !(ED_undo_valid(C, idname) == 0 || WM_jobs_test(wm, scene)); } wmOperator *WM_operator_last_redo(const bContext *C) { - wmWindowManager *wm= CTX_wm_manager(C); + wmWindowManager *wm = CTX_wm_manager(C); wmOperator *op; /* only for operators that are registered and did an undo push */ - for (op= wm->operators.last; op; op= op->prev) + for (op = wm->operators.last; op; op = op->prev) if ((op->type->flag & OPTYPE_REGISTER) && (op->type->flag & OPTYPE_UNDO)) break; @@ -937,29 +938,29 @@ wmOperator *WM_operator_last_redo(const bContext *C) static uiBlock *wm_block_create_redo(bContext *C, ARegion *ar, void *arg_op) { - wmOperator *op= arg_op; + wmOperator *op = arg_op; uiBlock *block; uiLayout *layout; - uiStyle *style= UI_GetStyle(); - int width= 300; + uiStyle *style = UI_GetStyle(); + int width = 300; - block= uiBeginBlock(C, ar, __func__, UI_EMBOSS); + block = uiBeginBlock(C, ar, __func__, UI_EMBOSS); uiBlockClearFlag(block, UI_BLOCK_LOOP); - uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN|UI_BLOCK_RET_1|UI_BLOCK_MOVEMOUSE_QUIT); + uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN | UI_BLOCK_RET_1 | UI_BLOCK_MOVEMOUSE_QUIT); /* if register is not enabled, the operator gets freed on OPERATOR_FINISHED - * ui_apply_but_funcs_after calls ED_undo_operator_repeate_cb and crashes */ + * ui_apply_but_funcs_after calls ED_undo_operator_repeate_cb and crashes */ assert(op->type->flag & OPTYPE_REGISTER); uiBlockSetHandleFunc(block, ED_undo_operator_repeat_cb_evt, arg_op); - layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, 0, 0, width, UI_UNIT_Y, style); + layout = uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, 0, 0, width, UI_UNIT_Y, style); if (!WM_operator_check_ui_enabled(C, op->type->name)) uiLayoutSetEnabled(layout, 0); if (op->type->flag & OPTYPE_MACRO) { - for (op= op->macro.first; op; op= op->next) { + for (op = op->macro.first; op; op = op->next) { uiItemL(layout, op->type->name, ICON_NONE); uiLayoutOperatorButs(C, layout, op, NULL, 'H', UI_LAYOUT_OP_SHOW_TITLE); } @@ -975,8 +976,7 @@ static uiBlock *wm_block_create_redo(bContext *C, ARegion *ar, void *arg_op) return block; } -typedef struct wmOpPopUp -{ +typedef struct wmOpPopUp { wmOperator *op; int width; int height; @@ -986,8 +986,8 @@ typedef struct wmOpPopUp /* Only invoked by OK button in popups created with wm_block_dialog_create() */ static void dialog_exec_cb(bContext *C, void *arg1, void *arg2) { - wmOpPopUp *data= arg1; - uiBlock *block= arg2; + wmOpPopUp *data = arg1; + uiBlock *block = arg2; WM_operator_call(C, data->op); @@ -1003,7 +1003,7 @@ static void dialog_exec_cb(bContext *C, void *arg1, void *arg2) static void dialog_check_cb(bContext *C, void *op_ptr, void *UNUSED(arg)) { - wmOperator *op= op_ptr; + wmOperator *op = op_ptr; if (op->type->check) { if (op->type->check(C, op)) { /* refresh */ @@ -1014,17 +1014,17 @@ static void dialog_check_cb(bContext *C, void *op_ptr, void *UNUSED(arg)) /* Dialogs are popups that require user verification (click OK) before exec */ static uiBlock *wm_block_dialog_create(bContext *C, ARegion *ar, void *userData) { - wmOpPopUp *data= userData; - wmOperator *op= data->op; + wmOpPopUp *data = userData; + wmOperator *op = data->op; uiBlock *block; uiLayout *layout; - uiStyle *style= UI_GetStyle(); + uiStyle *style = UI_GetStyle(); block = uiBeginBlock(C, ar, __func__, UI_EMBOSS); uiBlockClearFlag(block, UI_BLOCK_LOOP); - uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN|UI_BLOCK_RET_1|UI_BLOCK_MOVEMOUSE_QUIT); + uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN | UI_BLOCK_RET_1 | UI_BLOCK_MOVEMOUSE_QUIT); - layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, 0, 0, data->width, data->height, style); + layout = uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, 0, 0, data->width, data->height, style); uiBlockSetFunc(block, dialog_check_cb, op, NULL); @@ -1039,15 +1039,15 @@ static uiBlock *wm_block_dialog_create(bContext *C, ARegion *ar, void *userData) uiLayout *col; uiBut *btn; - col= uiLayoutColumn(layout, FALSE); - col_block= uiLayoutGetBlock(col); + col = uiLayoutColumn(layout, FALSE); + col_block = uiLayoutGetBlock(col); /* Create OK button, the callback of which will execute op */ - btn= uiDefBut(col_block, BUT, 0, IFACE_("OK"), 0, -30, 0, UI_UNIT_Y, NULL, 0, 0, 0, 0, ""); + btn = uiDefBut(col_block, BUT, 0, IFACE_("OK"), 0, -30, 0, UI_UNIT_Y, NULL, 0, 0, 0, 0, ""); uiButSetFunc(btn, dialog_exec_cb, data, col_block); } /* center around the mouse */ - uiPopupBoundsBlock(block, 4, data->width/-2, data->height/2); + uiPopupBoundsBlock(block, 4, data->width / -2, data->height / 2); uiEndBlock(C, block); return block; @@ -1055,17 +1055,17 @@ static uiBlock *wm_block_dialog_create(bContext *C, ARegion *ar, void *userData) static uiBlock *wm_operator_ui_create(bContext *C, ARegion *ar, void *userData) { - wmOpPopUp *data= userData; - wmOperator *op= data->op; + wmOpPopUp *data = userData; + wmOperator *op = data->op; uiBlock *block; uiLayout *layout; - uiStyle *style= UI_GetStyle(); + uiStyle *style = UI_GetStyle(); - block= uiBeginBlock(C, ar, __func__, UI_EMBOSS); + block = uiBeginBlock(C, ar, __func__, UI_EMBOSS); uiBlockClearFlag(block, UI_BLOCK_LOOP); - uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN|UI_BLOCK_RET_1|UI_BLOCK_MOVEMOUSE_QUIT); + uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN | UI_BLOCK_RET_1 | UI_BLOCK_MOVEMOUSE_QUIT); - layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, 0, 0, data->width, data->height, style); + layout = uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, 0, 0, data->width, data->height, style); /* since ui is defined the auto-layout args are not used */ uiLayoutOperatorButs(C, layout, op, NULL, 'V', 0); @@ -1078,9 +1078,9 @@ static uiBlock *wm_operator_ui_create(bContext *C, ARegion *ar, void *userData) static void wm_operator_ui_popup_cancel(void *userData) { - wmOpPopUp *data= userData; + wmOpPopUp *data = userData; if (data->free_op && data->op) { - wmOperator *op= data->op; + wmOperator *op = data->op; WM_operator_free(op); } @@ -1089,8 +1089,8 @@ static void wm_operator_ui_popup_cancel(void *userData) static void wm_operator_ui_popup_ok(struct bContext *C, void *arg, int retval) { - wmOpPopUp *data= arg; - wmOperator *op= data->op; + wmOpPopUp *data = arg; + wmOperator *op = data->op; if (op && retval > 0) WM_operator_call(C, op); @@ -1098,11 +1098,11 @@ static void wm_operator_ui_popup_ok(struct bContext *C, void *arg, int retval) int WM_operator_ui_popup(bContext *C, wmOperator *op, int width, int height) { - wmOpPopUp *data= MEM_callocN(sizeof(wmOpPopUp), "WM_operator_ui_popup"); - data->op= op; - data->width= width; - data->height= height; - data->free_op= TRUE; /* if this runs and gets registered we may want not to free it */ + wmOpPopUp *data = MEM_callocN(sizeof(wmOpPopUp), "WM_operator_ui_popup"); + data->op = op; + data->width = width; + data->height = height; + data->free_op = TRUE; /* if this runs and gets registered we may want not to free it */ uiPupBlockEx(C, wm_operator_ui_create, NULL, wm_operator_ui_popup_cancel, data); return OPERATOR_RUNNING_MODAL; } @@ -1111,7 +1111,7 @@ int WM_operator_ui_popup(bContext *C, wmOperator *op, int width, int height) int WM_operator_props_popup(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { - if ((op->type->flag & OPTYPE_REGISTER)==0) { + if ((op->type->flag & OPTYPE_REGISTER) == 0) { BKE_reportf(op->reports, RPT_ERROR, "Operator '%s' does not have register enabled, incorrect invoke function.", op->type->idname); return OPERATOR_CANCELLED; @@ -1127,12 +1127,12 @@ int WM_operator_props_popup(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) int WM_operator_props_dialog_popup(bContext *C, wmOperator *op, int width, int height) { - wmOpPopUp *data= MEM_callocN(sizeof(wmOpPopUp), "WM_operator_props_dialog_popup"); + wmOpPopUp *data = MEM_callocN(sizeof(wmOpPopUp), "WM_operator_props_dialog_popup"); - data->op= op; - data->width= width; - data->height= height; - data->free_op= TRUE; /* if this runs and gets registered we may want not to free it */ + data->op = op; + data->width = width; + data->height = height; + data->free_op = TRUE; /* if this runs and gets registered we may want not to free it */ /* op is not executed until popup OK but is clicked */ uiPupBlockEx(C, wm_block_dialog_create, wm_operator_ui_popup_ok, wm_operator_ui_popup_cancel, data); @@ -1143,11 +1143,11 @@ int WM_operator_props_dialog_popup(bContext *C, wmOperator *op, int width, int h int WM_operator_redo_popup(bContext *C, wmOperator *op) { /* CTX_wm_reports(C) because operator is on stack, not active in event system */ - if ((op->type->flag & OPTYPE_REGISTER)==0) { + if ((op->type->flag & OPTYPE_REGISTER) == 0) { BKE_reportf(CTX_wm_reports(C), RPT_ERROR, "Operator redo '%s' does not have register enabled, incorrect invoke function.", op->type->idname); return OPERATOR_CANCELLED; } - if (op->type->poll && op->type->poll(C)==0) { + if (op->type->poll && op->type->poll(C) == 0) { BKE_reportf(CTX_wm_reports(C), RPT_ERROR, "Operator redo '%s': wrong context.", op->type->idname); return OPERATOR_CANCELLED; } @@ -1161,7 +1161,7 @@ int WM_operator_redo_popup(bContext *C, wmOperator *op) static int wm_debug_menu_exec(bContext *C, wmOperator *op) { - G.rt= RNA_int_get(op->ptr, "debug_value"); + G.rt = RNA_int_get(op->ptr, "debug_value"); ED_screen_refresh(CTX_wm_manager(C), CTX_wm_window(C)); WM_event_add_notifier(C, NC_WINDOW, NULL); @@ -1171,7 +1171,7 @@ static int wm_debug_menu_exec(bContext *C, wmOperator *op) static int wm_debug_menu_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { RNA_int_set(op->ptr, "debug_value", G.rt); - return WM_operator_props_dialog_popup(C, op, 9*UI_UNIT_X, UI_UNIT_Y); + return WM_operator_props_dialog_popup(C, op, 9 * UI_UNIT_X, UI_UNIT_Y); } static void WM_OT_debug_menu(wmOperatorType *ot) @@ -1199,7 +1199,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *arg_unuse /* XXX: hack to refresh splash screen with updated prest menu name, * since popup blocks don't get regenerated like panels do */ -static void wm_block_splash_refreshmenu (bContext *UNUSED(C), void *UNUSED(arg_block), void *UNUSED(arg)) +static void wm_block_splash_refreshmenu(bContext *UNUSED(C), void *UNUSED(arg_block), void *UNUSED(arg)) { /* ugh, causes crashes in other buttons, disabling for now until * a better fix */ @@ -1212,14 +1212,14 @@ static void wm_block_splash_refreshmenu (bContext *UNUSED(C), void *UNUSED(arg_b static int wm_resource_check_prev(void) { - char *res= BLI_get_folder_version(BLENDER_RESOURCE_PATH_USER, BLENDER_VERSION, TRUE); + char *res = BLI_get_folder_version(BLENDER_RESOURCE_PATH_USER, BLENDER_VERSION, TRUE); // if (res) printf("USER: %s\n", res); #if 0 /* ignore the local folder */ if (res == NULL) { /* with a local dir, copying old files isn't useful since local dir get priority for config */ - res= BLI_get_folder_version(BLENDER_RESOURCE_PATH_LOCAL, BLENDER_VERSION, TRUE); + res = BLI_get_folder_version(BLENDER_RESOURCE_PATH_LOCAL, BLENDER_VERSION, TRUE); } #endif @@ -1237,7 +1237,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar uiBlock *block; uiBut *but; uiLayout *layout, *split, *col; - uiStyle *style= UI_GetStyle(); + uiStyle *style = UI_GetStyle(); struct RecentFile *recent; int i; MenuType *mt = WM_menutype_find("USERPREF_MT_splash", TRUE); @@ -1247,9 +1247,9 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar extern char datatoc_splash_png[]; extern int datatoc_splash_png_size; - ImBuf *ibuf= IMB_ibImageFromMemory((unsigned char*)datatoc_splash_png, datatoc_splash_png_size, IB_rect, ""); + ImBuf *ibuf = IMB_ibImageFromMemory((unsigned char *)datatoc_splash_png, datatoc_splash_png_size, IB_rect, ""); #else - ImBuf *ibuf= NULL; + ImBuf *ibuf = NULL; #endif @@ -1260,7 +1260,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar extern char build_rev[]; BLI_snprintf(version_buf, sizeof(version_buf), - "%d.%02d.%d", BLENDER_VERSION/100, BLENDER_VERSION%100, BLENDER_SUBVERSION); + "%d.%02d.%d", BLENDER_VERSION / 100, BLENDER_VERSION % 100, BLENDER_SUBVERSION); BLI_snprintf(revision_buf, sizeof(revision_buf), "r%s", build_rev); BLF_size(style->widgetlabel.uifont_id, style->widgetlabel.points, U.dpi); @@ -1268,7 +1268,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar rev_width = (int)BLF_width(style->widgetlabel.uifont_id, revision_buf) + 5; #endif //WITH_BUILDINFO - block= uiBeginBlock(C, ar, "_popup", UI_EMBOSS); + block = uiBeginBlock(C, ar, "_popup", UI_EMBOSS); uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN); but = uiDefBut(block, BUT_IMAGE, 0, "", 0, 10, 501, 282, ibuf, 0.0, 0.0, 0, 0, ""); /* button owns the imbuf now */ @@ -1276,18 +1276,18 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar uiBlockSetFunc(block, wm_block_splash_refreshmenu, block, NULL); #ifdef WITH_BUILDINFO - uiDefBut(block, LABEL, 0, version_buf, 494-ver_width, 282-24, ver_width, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL); - uiDefBut(block, LABEL, 0, revision_buf, 494-rev_width, 282-36, rev_width, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL); + uiDefBut(block, LABEL, 0, version_buf, 494 - ver_width, 282 - 24, ver_width, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL); + uiDefBut(block, LABEL, 0, revision_buf, 494 - rev_width, 282 - 36, rev_width, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL); #endif //WITH_BUILDINFO - layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, 10, 2, 480, 110, style); + layout = uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, 10, 2, 480, 110, style); uiBlockSetEmboss(block, UI_EMBOSS); /* show the splash menu (containing interaction presets), using python */ if (mt) { - Menu menu= {NULL}; - menu.layout= layout; - menu.type= mt; + Menu menu = {NULL}; + menu.layout = layout; + menu.type = mt; mt->draw(C, &menu); // wmWindowManager *wm= CTX_wm_manager(C); @@ -1306,11 +1306,11 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar uiItemStringO(col, IFACE_("Manual"), ICON_URL, "WM_OT_url_open", "url", "http://wiki.blender.org/index.php/Doc:2.5/Manual"); uiItemStringO(col, IFACE_("Blender Website"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org"); uiItemStringO(col, IFACE_("User Community"), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/community/user-community"); - if (strcmp(STRINGIFY(BLENDER_VERSION_CYCLE), "release")==0) { - BLI_snprintf(url, sizeof(url), "http://www.blender.org/documentation/blender_python_api_%d_%d" STRINGIFY(BLENDER_VERSION_CHAR) "_release", BLENDER_VERSION/100, BLENDER_VERSION%100); + if (strcmp(STRINGIFY(BLENDER_VERSION_CYCLE), "release") == 0) { + BLI_snprintf(url, sizeof(url), "http://www.blender.org/documentation/blender_python_api_%d_%d" STRINGIFY(BLENDER_VERSION_CHAR) "_release", BLENDER_VERSION / 100, BLENDER_VERSION % 100); } else { - BLI_snprintf(url, sizeof(url), "http://www.blender.org/documentation/blender_python_api_%d_%d_%d", BLENDER_VERSION/100, BLENDER_VERSION%100, BLENDER_SUBVERSION); + BLI_snprintf(url, sizeof(url), "http://www.blender.org/documentation/blender_python_api_%d_%d_%d", BLENDER_VERSION / 100, BLENDER_VERSION % 100, BLENDER_SUBVERSION); } uiItemStringO(col, IFACE_("Python API Reference"), ICON_URL, "WM_OT_url_open", "url", url); uiItemL(col, "", ICON_NONE); @@ -1323,7 +1323,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar } uiItemL(col, IFACE_("Recent"), ICON_NONE); - for (recent = G.recent_files.first, i=0; (i<5) && (recent); recent = recent->next, i++) { + for (recent = G.recent_files.first, i = 0; (i < 5) && (recent); recent = recent->next, i++) { uiItemStringO(col, BLI_path_basename(recent->filepath), ICON_FILE_BLEND, "WM_OT_open_mainfile", "filepath", recent->filepath); } @@ -1358,7 +1358,7 @@ static void WM_OT_splash(wmOperatorType *ot) /* ***************** Search menu ************************* */ static void operator_call_cb(struct bContext *C, void *UNUSED(arg1), void *arg2) { - wmOperatorType *ot= arg2; + wmOperatorType *ot = arg2; if (ot) WM_operator_name_call(C, ot->idname, WM_OP_INVOKE_DEFAULT, NULL); @@ -1366,18 +1366,18 @@ static void operator_call_cb(struct bContext *C, void *UNUSED(arg1), void *arg2) static void operator_search_cb(const struct bContext *C, void *UNUSED(arg), const char *str, uiSearchItems *items) { - GHashIterator *iter= WM_operatortype_iter(); + GHashIterator *iter = WM_operatortype_iter(); - for ( ; !BLI_ghashIterator_isDone(iter); BLI_ghashIterator_step(iter)) { - wmOperatorType *ot= BLI_ghashIterator_getValue(iter); + for (; !BLI_ghashIterator_isDone(iter); BLI_ghashIterator_step(iter)) { + wmOperatorType *ot = BLI_ghashIterator_getValue(iter); if ((ot->flag & OPTYPE_INTERNAL) && (G.f & G_DEBUG) == 0) continue; if (BLI_strcasestr(ot->name, str)) { - if (WM_operator_poll((bContext*)C, ot)) { + if (WM_operator_poll((bContext *)C, ot)) { char name[256]; - int len= strlen(ot->name); + int len = strlen(ot->name); /* display name for menu, can hold hotkey */ BLI_strncpy(name, ot->name, sizeof(name)); @@ -1385,13 +1385,13 @@ static void operator_search_cb(const struct bContext *C, void *UNUSED(arg), cons /* check for hotkey */ if (len < sizeof(name) - 6) { if (WM_key_event_operator_string(C, ot->idname, WM_OP_EXEC_DEFAULT, NULL, TRUE, - &name[len+1], sizeof(name)-len-1)) + &name[len + 1], sizeof(name) - len - 1)) { - name[len]= '|'; + name[len] = '|'; } } - if (0==uiSearchItemAdd(items, name, ot, 0)) + if (0 == uiSearchItemAdd(items, name, ot, 0)) break; } } @@ -1401,29 +1401,29 @@ static void operator_search_cb(const struct bContext *C, void *UNUSED(arg), cons static uiBlock *wm_block_search_menu(bContext *C, ARegion *ar, void *UNUSED(arg_op)) { - static char search[256]= ""; + static char search[256] = ""; wmEvent event; - wmWindow *win= CTX_wm_window(C); + wmWindow *win = CTX_wm_window(C); uiBlock *block; uiBut *but; - block= uiBeginBlock(C, ar, "_popup", UI_EMBOSS); - uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_RET_1|UI_BLOCK_MOVEMOUSE_QUIT); + block = uiBeginBlock(C, ar, "_popup", UI_EMBOSS); + uiBlockSetFlag(block, UI_BLOCK_LOOP | UI_BLOCK_RET_1 | UI_BLOCK_MOVEMOUSE_QUIT); - but = uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 10, 10, 9*UI_UNIT_X, UI_UNIT_Y, 0, 0, ""); + but = uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 10, 10, 9 * UI_UNIT_X, UI_UNIT_Y, 0, 0, ""); uiButSetSearchFunc(but, operator_search_cb, NULL, operator_call_cb, NULL); /* fake button, it holds space for search items */ - uiDefBut(block, LABEL, 0, "", 10, 10 - uiSearchBoxhHeight(), 9*UI_UNIT_X, uiSearchBoxhHeight(), NULL, 0, 0, 0, 0, NULL); + uiDefBut(block, LABEL, 0, "", 10, 10 - uiSearchBoxhHeight(), 9 * UI_UNIT_X, uiSearchBoxhHeight(), NULL, 0, 0, 0, 0, NULL); uiPopupBoundsBlock(block, 6, 0, -UI_UNIT_Y); /* move it downwards, mouse over button */ uiEndBlock(C, block); - event= *(win->eventstate); /* XXX huh huh? make api call */ - event.type= EVT_BUT_OPEN; - event.val= KM_PRESS; - event.customdata= but; - event.customdatafree= FALSE; + event = *(win->eventstate); /* XXX huh huh? make api call */ + event.type = EVT_BUT_OPEN; + event.val = KM_PRESS; + event.customdata = but; + event.customdatafree = FALSE; wm_event_add(win, &event); return block; @@ -1444,18 +1444,18 @@ static int wm_search_menu_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(ev /* op->poll */ static int wm_search_menu_poll(bContext *C) { - if (CTX_wm_window(C)==NULL) { + if (CTX_wm_window(C) == NULL) { return 0; } else { - ScrArea *sa= CTX_wm_area(C); + ScrArea *sa = CTX_wm_area(C); if (sa) { - if (sa->spacetype==SPACE_CONSOLE) return 0; // XXX - so we can use the shortcut in the console - if (sa->spacetype==SPACE_TEXT) return 0; // XXX - so we can use the spacebar in the text editor + if (sa->spacetype == SPACE_CONSOLE) return 0; // XXX - so we can use the shortcut in the console + if (sa->spacetype == SPACE_TEXT) return 0; // XXX - so we can use the spacebar in the text editor } else { - Object *editob= CTX_data_edit_object(C); - if (editob && editob->type==OB_FONT) return 0; // XXX - so we can use the spacebar for entering text + Object *editob = CTX_data_edit_object(C); + if (editob && editob->type == OB_FONT) return 0; // XXX - so we can use the spacebar for entering text } } return 1; @@ -1500,9 +1500,9 @@ static void WM_OT_call_menu(wmOperatorType *ot) * while it crashes on full screen */ static int wm_operator_winactive_normal(bContext *C) { - wmWindow *win= CTX_wm_window(C); + wmWindow *win = CTX_wm_window(C); - if (win==NULL || win->screen==NULL || win->screen->full != SCREENNORMAL) + if (win == NULL || win->screen == NULL || win->screen->full != SCREENNORMAL) return 0; return 1; @@ -1571,7 +1571,7 @@ static void open_set_use_scripts(wmOperator *op) static int wm_open_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { - const char *openname= G.main->name; + const char *openname = G.main->name; if (CTX_wm_window(C) == NULL) { /* in rare cases this could happen, when trying to invoke in background @@ -1633,7 +1633,7 @@ static void WM_OT_open_mainfile(wmOperatorType *ot) ot->exec = wm_open_mainfile_exec; /* ommit window poll so this can work in background mode */ - WM_operator_properties_filesel(ot, FOLDERFILE|BLENDERFILE, FILE_BLENDER, FILE_OPENFILE, + WM_operator_properties_filesel(ot, FOLDERFILE | BLENDERFILE, FILE_BLENDER, FILE_OPENFILE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY); RNA_def_boolean(ot->srna, "load_ui", 1, "Load UI", "Load user interface setup in the .blend file"); @@ -1682,7 +1682,7 @@ static int wm_link_append_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(ev static short wm_link_append_flag(wmOperator *op) { - short flag= 0; + short flag = 0; if (RNA_boolean_get(op->ptr, "autoselect")) flag |= FILE_AUTOSELECT; if (RNA_boolean_get(op->ptr, "active_layer")) flag |= FILE_ACTIVELAY; @@ -1695,13 +1695,13 @@ static short wm_link_append_flag(wmOperator *op) static int wm_link_append_exec(bContext *C, wmOperator *op) { - Main *bmain= CTX_data_main(C); - Scene *scene= CTX_data_scene(C); - Main *mainl= NULL; + Main *bmain = CTX_data_main(C); + Scene *scene = CTX_data_scene(C); + Main *mainl = NULL; BlendHandle *bh; PropertyRNA *prop; char name[FILE_MAX], dir[FILE_MAX], libname[FILE_MAX], group[GROUP_MAX]; - int idcode, totfiles=0; + int idcode, totfiles = 0; short flag; RNA_string_get(op->ptr, "filename", name); @@ -1724,7 +1724,7 @@ static int wm_link_append_exec(bContext *C, wmOperator *op) /* check if something is indicated for append/link */ prop = RNA_struct_find_property(op->ptr, "files"); if (prop) { - totfiles= RNA_property_collection_length(op->ptr, prop); + totfiles = RNA_property_collection_length(op->ptr, prop); if (totfiles == 0) { if (name[0] == '\0') { BKE_report(op->reports, RPT_ERROR, "Nothing indicated"); @@ -1760,7 +1760,7 @@ static int wm_link_append_exec(bContext *C, wmOperator *op) /* sanity checks for flag */ if (scene->id.lib && (flag & FILE_GROUP_INSTANCE)) { /* TODO, user never gets this message */ - BKE_reportf(op->reports, RPT_WARNING, "Scene '%s' is linked, group instance disabled", scene->id.name+2); + BKE_reportf(op->reports, RPT_WARNING, "Scene '%s' is linked, group instance disabled", scene->id.name + 2); flag &= ~FILE_GROUP_INSTANCE; } @@ -1789,10 +1789,10 @@ static int wm_link_append_exec(bContext *C, wmOperator *op) recalc_all_library_objects(bmain); /* append, rather than linking */ - if ((flag & FILE_LINK)==0) { - Library *lib= BLI_findstring(&bmain->library, libname, offsetof(Library, filepath)); - if (lib) BKE_library_make_local(bmain, lib, 1); - else BLI_assert(!"cant find name of just added library!"); + if ((flag & FILE_LINK) == 0) { + Library *lib = BLI_findstring(&bmain->library, libname, offsetof(Library, filepath)); + if (lib) BKE_library_make_local(bmain, lib, 1); + else BLI_assert(!"cant find name of just added library!"); } /* important we unset, otherwise these object wont @@ -1826,9 +1826,9 @@ static void WM_OT_link_append(wmOperatorType *ot) ot->flag |= OPTYPE_UNDO; WM_operator_properties_filesel( - ot, FOLDERFILE|BLENDERFILE, FILE_LOADLIB, FILE_OPENFILE, - WM_FILESEL_FILEPATH|WM_FILESEL_DIRECTORY|WM_FILESEL_FILENAME|WM_FILESEL_RELPATH|WM_FILESEL_FILES, - FILE_DEFAULTDISPLAY); + ot, FOLDERFILE | BLENDERFILE, FILE_LOADLIB, FILE_OPENFILE, + WM_FILESEL_FILEPATH | WM_FILESEL_DIRECTORY | WM_FILESEL_FILENAME | WM_FILESEL_RELPATH | WM_FILESEL_FILES, + FILE_DEFAULTDISPLAY); RNA_def_boolean(ot->srna, "link", 1, "Link", "Link the objects or datablocks rather than appending"); RNA_def_boolean(ot->srna, "autoselect", 1, "Select", "Select the linked objects"); @@ -1916,8 +1916,8 @@ static void WM_OT_recover_auto_save(wmOperatorType *ot) static void untitled(char *name) { - if (G.save_over == 0 && strlen(name) < FILE_MAX-16) { - char *c= BLI_last_slash(name); + if (G.save_over == 0 && strlen(name) < FILE_MAX - 16) { + char *c = BLI_last_slash(name); if (c) strcpy(&c[1], "untitled.blend"); @@ -1943,7 +1943,7 @@ static int wm_save_as_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *UNUS save_set_compress(op); /* if not saved before, get the name of the most recently used .blend file */ - if (G.main->name[0]==0 && G.recent_files.first) { + if (G.main->name[0] == 0 && G.recent_files.first) { struct RecentFile *recent = G.recent_files.first; BLI_strncpy(name, recent->filepath, FILE_MAX); } @@ -1963,7 +1963,7 @@ static int wm_save_as_mainfile_exec(bContext *C, wmOperator *op) { char path[FILE_MAX]; int fileflags; - int copy=0; + int copy = 0; save_set_compress(op); @@ -1977,28 +1977,28 @@ static int wm_save_as_mainfile_exec(bContext *C, wmOperator *op) if (RNA_struct_property_is_set(op->ptr, "copy")) copy = RNA_boolean_get(op->ptr, "copy"); - fileflags= G.fileflags; + fileflags = G.fileflags; /* set compression flag */ - if (RNA_boolean_get(op->ptr, "compress")) fileflags |= G_FILE_COMPRESS; - else fileflags &= ~G_FILE_COMPRESS; - if (RNA_boolean_get(op->ptr, "relative_remap")) fileflags |= G_FILE_RELATIVE_REMAP; - else fileflags &= ~G_FILE_RELATIVE_REMAP; + if (RNA_boolean_get(op->ptr, "compress")) fileflags |= G_FILE_COMPRESS; + else fileflags &= ~G_FILE_COMPRESS; + if (RNA_boolean_get(op->ptr, "relative_remap")) fileflags |= G_FILE_RELATIVE_REMAP; + else fileflags &= ~G_FILE_RELATIVE_REMAP; #ifdef USE_BMESH_SAVE_AS_COMPAT /* property only exists for 'Save As' */ if (RNA_struct_find_property(op->ptr, "use_mesh_compat")) { - if (RNA_boolean_get(op->ptr, "use_mesh_compat")) fileflags |= G_FILE_MESH_COMPAT; - else fileflags &= ~G_FILE_MESH_COMPAT; + if (RNA_boolean_get(op->ptr, "use_mesh_compat")) fileflags |= G_FILE_MESH_COMPAT; + else fileflags &= ~G_FILE_MESH_COMPAT; } else { fileflags &= ~G_FILE_MESH_COMPAT; } #endif - if ( WM_write_file(C, path, fileflags, op->reports, copy) != 0) + if (WM_write_file(C, path, fileflags, op->reports, copy) != 0) return OPERATOR_CANCELLED; - WM_event_add_notifier(C, NC_WM|ND_FILESAVE, NULL); + WM_event_add_notifier(C, NC_WM | ND_FILESAVE, NULL); return OPERATOR_FINISHED; } @@ -2029,7 +2029,7 @@ static void WM_OT_save_as_mainfile(wmOperatorType *ot) ot->check = blend_save_check; /* ommit window poll so this can work in background mode */ - WM_operator_properties_filesel(ot, FOLDERFILE|BLENDERFILE, FILE_BLENDER, FILE_SAVE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY); + WM_operator_properties_filesel(ot, FOLDERFILE | BLENDERFILE, FILE_BLENDER, FILE_SAVE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY); RNA_def_boolean(ot->srna, "compress", 0, "Compress", "Write compressed .blend file"); RNA_def_boolean(ot->srna, "relative_remap", 1, "Remap Relative", "Remap relative paths when saving in a different directory"); RNA_def_boolean(ot->srna, "copy", 0, "Save Copy", "Save a copy of the actual working state but does not make saved file active"); @@ -2043,7 +2043,7 @@ static void WM_OT_save_as_mainfile(wmOperatorType *ot) static int wm_save_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { char name[FILE_MAX]; - int check_existing=1; + int check_existing = 1; int ret; /* cancel if no active window */ @@ -2053,7 +2053,7 @@ static int wm_save_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED( save_set_compress(op); /* if not saved before, get the name of the most recently used .blend file */ - if (G.main->name[0]==0 && G.recent_files.first) { + if (G.main->name[0] == 0 && G.recent_files.first) { struct RecentFile *recent = G.recent_files.first; BLI_strncpy(name, recent->filepath, FILE_MAX); } @@ -2065,21 +2065,21 @@ static int wm_save_mainfile_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED( RNA_string_set(op->ptr, "filepath", name); if (RNA_struct_find_property(op->ptr, "check_existing")) - if (RNA_boolean_get(op->ptr, "check_existing")==0) + if (RNA_boolean_get(op->ptr, "check_existing") == 0) check_existing = 0; if (G.save_over) { if (check_existing && BLI_exists(name)) { uiPupMenuSaveOver(C, op, name); - ret= OPERATOR_RUNNING_MODAL; + ret = OPERATOR_RUNNING_MODAL; } else { - ret= wm_save_as_mainfile_exec(C, op); + ret = wm_save_as_mainfile_exec(C, op); } } else { WM_event_add_fileselect(C, op); - ret= OPERATOR_RUNNING_MODAL; + ret = OPERATOR_RUNNING_MODAL; } return ret; @@ -2096,7 +2096,7 @@ static void WM_OT_save_mainfile(wmOperatorType *ot) ot->check = blend_save_check; /* ommit window poll so this can work in background mode */ - WM_operator_properties_filesel(ot, FOLDERFILE|BLENDERFILE, FILE_BLENDER, FILE_SAVE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY); + WM_operator_properties_filesel(ot, FOLDERFILE | BLENDERFILE, FILE_BLENDER, FILE_SAVE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY); RNA_def_boolean(ot->srna, "compress", 0, "Compress", "Write compressed .blend file"); RNA_def_boolean(ot->srna, "relative_remap", 0, "Remap Relative", "Remap relative paths when saving in a different directory"); } @@ -2151,11 +2151,11 @@ static void WM_OT_collada_export(wmOperatorType *ot) ot->exec = wm_collada_export_exec; ot->poll = WM_operator_winactive; - WM_operator_properties_filesel(ot, FOLDERFILE|COLLADAFILE, FILE_BLENDER, FILE_SAVE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY); + WM_operator_properties_filesel(ot, FOLDERFILE | COLLADAFILE, FILE_BLENDER, FILE_SAVE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY); RNA_def_boolean(ot->srna, "selected", 0, "Export only selected", - "Export only selected elements"); + "Export only selected elements"); RNA_def_boolean(ot->srna, "second_life", 0, "Export for Second Life", - "Compatibility mode for Second Life"); + "Compatibility mode for Second Life"); } /* function used for WM_OT_save_mainfile too */ @@ -2185,7 +2185,7 @@ static void WM_OT_collada_import(wmOperatorType *ot) ot->exec = wm_collada_import_exec; ot->poll = WM_operator_winactive; - WM_operator_properties_filesel(ot, FOLDERFILE|COLLADAFILE, FILE_BLENDER, FILE_OPENFILE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY); + WM_operator_properties_filesel(ot, FOLDERFILE | COLLADAFILE, FILE_BLENDER, FILE_OPENFILE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY); } #endif @@ -2253,15 +2253,15 @@ static void WM_OT_console_toggle(wmOperatorType *ot) */ void *WM_paint_cursor_activate(wmWindowManager *wm, int (*poll)(bContext *C), - wmPaintCursorDraw draw, void *customdata) + wmPaintCursorDraw draw, void *customdata) { - wmPaintCursor *pc= MEM_callocN(sizeof(wmPaintCursor), "paint cursor"); + wmPaintCursor *pc = MEM_callocN(sizeof(wmPaintCursor), "paint cursor"); BLI_addtail(&wm->paintcursors, pc); pc->customdata = customdata; - pc->poll= poll; - pc->draw= draw; + pc->poll = poll; + pc->draw = draw; return pc; } @@ -2270,7 +2270,7 @@ void WM_paint_cursor_end(wmWindowManager *wm, void *handle) { wmPaintCursor *pc; - for (pc= wm->paintcursors.first; pc; pc= pc->next) { + for (pc = wm->paintcursors.first; pc; pc = pc->next) { if (pc == (wmPaintCursor *)handle) { BLI_remlink(&wm->paintcursors, pc); MEM_freeN(pc); @@ -2295,10 +2295,10 @@ void WM_paint_cursor_end(wmWindowManager *wm, void *handle) static int border_apply_rect(wmOperator *op) { - wmGesture *gesture= op->customdata; - rcti *rect= gesture->customdata; + wmGesture *gesture = op->customdata; + rcti *rect = gesture->customdata; - if (rect->xmin ==rect->xmax || rect->ymin==rect->ymax) + if (rect->xmin == rect->xmax || rect->ymin == rect->ymax) return 0; @@ -2317,7 +2317,7 @@ static int border_apply(bContext *C, wmOperator *op, int gesture_mode) return 0; /* XXX weak; border should be configured for this without reading event types */ - if ( RNA_struct_find_property(op->ptr, "gesture_mode") ) + if (RNA_struct_find_property(op->ptr, "gesture_mode") ) RNA_int_set(op->ptr, "gesture_mode", gesture_mode); op->type->exec(C, op); @@ -2326,23 +2326,23 @@ static int border_apply(bContext *C, wmOperator *op, int gesture_mode) static void wm_gesture_end(bContext *C, wmOperator *op) { - wmGesture *gesture= op->customdata; + wmGesture *gesture = op->customdata; - WM_gesture_end(C, gesture); /* frees gesture itself, and unregisters from window */ - op->customdata= NULL; + WM_gesture_end(C, gesture); /* frees gesture itself, and unregisters from window */ + op->customdata = NULL; ED_area_tag_redraw(CTX_wm_area(C)); - if ( RNA_struct_find_property(op->ptr, "cursor") ) + if (RNA_struct_find_property(op->ptr, "cursor") ) WM_cursor_restore(CTX_wm_window(C)); } int WM_border_select_invoke(bContext *C, wmOperator *op, wmEvent *event) { if (ISTWEAK(event->type)) - op->customdata= WM_gesture_new(C, event, WM_GESTURE_RECT); + op->customdata = WM_gesture_new(C, event, WM_GESTURE_RECT); else - op->customdata= WM_gesture_new(C, event, WM_GESTURE_CROSS_RECT); + op->customdata = WM_gesture_new(C, event, WM_GESTURE_CROSS_RECT); /* add modal handler */ WM_event_add_modal_handler(C, op); @@ -2354,14 +2354,14 @@ int WM_border_select_invoke(bContext *C, wmOperator *op, wmEvent *event) int WM_border_select_modal(bContext *C, wmOperator *op, wmEvent *event) { - wmGesture *gesture= op->customdata; - rcti *rect= gesture->customdata; + wmGesture *gesture = op->customdata; + rcti *rect = gesture->customdata; int sx, sy; - if (event->type== MOUSEMOVE) { + if (event->type == MOUSEMOVE) { wm_subwindow_getorigin(CTX_wm_window(C), gesture->swinid, &sx, &sy); - if (gesture->type==WM_GESTURE_CROSS_RECT && gesture->mode==0) { + if (gesture->type == WM_GESTURE_CROSS_RECT && gesture->mode == 0) { rect->xmin = rect->xmax = event->x - sx; rect->ymin = rect->ymax = event->y - sy; } @@ -2373,29 +2373,29 @@ int WM_border_select_modal(bContext *C, wmOperator *op, wmEvent *event) wm_gesture_tag_redraw(C); } - else if (event->type==EVT_MODAL_MAP) { + else if (event->type == EVT_MODAL_MAP) { switch (event->val) { - case GESTURE_MODAL_BEGIN: - if (gesture->type==WM_GESTURE_CROSS_RECT && gesture->mode==0) { - gesture->mode= 1; - wm_gesture_tag_redraw(C); - } - break; - case GESTURE_MODAL_SELECT: - case GESTURE_MODAL_DESELECT: - case GESTURE_MODAL_IN: - case GESTURE_MODAL_OUT: - if (border_apply(C, op, event->val)) { + case GESTURE_MODAL_BEGIN: + if (gesture->type == WM_GESTURE_CROSS_RECT && gesture->mode == 0) { + gesture->mode = 1; + wm_gesture_tag_redraw(C); + } + break; + case GESTURE_MODAL_SELECT: + case GESTURE_MODAL_DESELECT: + case GESTURE_MODAL_IN: + case GESTURE_MODAL_OUT: + if (border_apply(C, op, event->val)) { + wm_gesture_end(C, op); + return OPERATOR_FINISHED; + } wm_gesture_end(C, op); - return OPERATOR_FINISHED; - } - wm_gesture_end(C, op); - return OPERATOR_CANCELLED; - break; + return OPERATOR_CANCELLED; + break; - case GESTURE_MODAL_CANCEL: - wm_gesture_end(C, op); - return OPERATOR_CANCELLED; + case GESTURE_MODAL_CANCEL: + wm_gesture_end(C, op); + return OPERATOR_CANCELLED; } } @@ -2418,12 +2418,12 @@ int WM_border_select_cancel(bContext *C, wmOperator *op) /* works now only for selection or modal paint stuff, calls exec while hold mouse, exit on release */ #ifdef GESTURE_MEMORY -int circle_select_size= 25; // XXX - need some operator memory thing\! +int circle_select_size = 25; // XXX - need some operator memory thing\! #endif int WM_gesture_circle_invoke(bContext *C, wmOperator *op, wmEvent *event) { - op->customdata= WM_gesture_new(C, event, WM_GESTURE_CIRCLE); + op->customdata = WM_gesture_new(C, event, WM_GESTURE_CIRCLE); /* add modal handler */ WM_event_add_modal_handler(C, op); @@ -2435,10 +2435,10 @@ int WM_gesture_circle_invoke(bContext *C, wmOperator *op, wmEvent *event) static void gesture_circle_apply(bContext *C, wmOperator *op) { - wmGesture *gesture= op->customdata; - rcti *rect= gesture->customdata; + wmGesture *gesture = op->customdata; + rcti *rect = gesture->customdata; - if (RNA_int_get(op->ptr, "gesture_mode")==GESTURE_MODAL_NOP) + if (RNA_int_get(op->ptr, "gesture_mode") == GESTURE_MODAL_NOP) return; /* operator arguments and storage. */ @@ -2449,17 +2449,17 @@ static void gesture_circle_apply(bContext *C, wmOperator *op) if (op->type->exec) op->type->exec(C, op); #ifdef GESTURE_MEMORY - circle_select_size= rect->xmax; + circle_select_size = rect->xmax; #endif } int WM_gesture_circle_modal(bContext *C, wmOperator *op, wmEvent *event) { - wmGesture *gesture= op->customdata; - rcti *rect= gesture->customdata; + wmGesture *gesture = op->customdata; + rcti *rect = gesture->customdata; int sx, sy; - if (event->type== MOUSEMOVE) { + if (event->type == MOUSEMOVE) { wm_subwindow_getorigin(CTX_wm_window(C), gesture->swinid, &sx, &sy); rect->xmin = event->x - sx; @@ -2470,35 +2470,35 @@ int WM_gesture_circle_modal(bContext *C, wmOperator *op, wmEvent *event) if (gesture->mode) gesture_circle_apply(C, op); } - else if (event->type==EVT_MODAL_MAP) { + else if (event->type == EVT_MODAL_MAP) { switch (event->val) { - case GESTURE_MODAL_CIRCLE_ADD: - rect->xmax += 2 + rect->xmax/10; - wm_gesture_tag_redraw(C); - break; - case GESTURE_MODAL_CIRCLE_SUB: - rect->xmax -= 2 + rect->xmax/10; - if (rect->xmax < 1) rect->xmax = 1; - wm_gesture_tag_redraw(C); - break; - case GESTURE_MODAL_SELECT: - case GESTURE_MODAL_DESELECT: - case GESTURE_MODAL_NOP: - if (RNA_struct_find_property(op->ptr, "gesture_mode")) - RNA_int_set(op->ptr, "gesture_mode", event->val); - - if (event->val != GESTURE_MODAL_NOP) { - /* apply first click */ - gesture_circle_apply(C, op); - gesture->mode= 1; + case GESTURE_MODAL_CIRCLE_ADD: + rect->xmax += 2 + rect->xmax / 10; wm_gesture_tag_redraw(C); - } - break; + break; + case GESTURE_MODAL_CIRCLE_SUB: + rect->xmax -= 2 + rect->xmax / 10; + if (rect->xmax < 1) rect->xmax = 1; + wm_gesture_tag_redraw(C); + break; + case GESTURE_MODAL_SELECT: + case GESTURE_MODAL_DESELECT: + case GESTURE_MODAL_NOP: + if (RNA_struct_find_property(op->ptr, "gesture_mode")) + RNA_int_set(op->ptr, "gesture_mode", event->val); + + if (event->val != GESTURE_MODAL_NOP) { + /* apply first click */ + gesture_circle_apply(C, op); + gesture->mode = 1; + wm_gesture_tag_redraw(C); + } + break; - case GESTURE_MODAL_CANCEL: - case GESTURE_MODAL_CONFIRM: - wm_gesture_end(C, op); - return OPERATOR_FINISHED; /* use finish or we don't get an undo */ + case GESTURE_MODAL_CANCEL: + case GESTURE_MODAL_CONFIRM: + wm_gesture_end(C, op); + return OPERATOR_FINISHED; /* use finish or we don't get an undo */ } } // // Allow view navigation??? @@ -2540,12 +2540,12 @@ void WM_OT_circle_gesture(wmOperatorType *ot) static void tweak_gesture_modal(bContext *C, wmEvent *event) { - wmWindow *window= CTX_wm_window(C); - wmGesture *gesture= window->tweak; - rcti *rect= gesture->customdata; + wmWindow *window = CTX_wm_window(C); + wmGesture *gesture = window->tweak; + rcti *rect = gesture->customdata; int sx, sy, val; - switch(event->type) { + switch (event->type) { case MOUSEMOVE: case INBETWEEN_MOUSEMOVE: @@ -2554,21 +2554,21 @@ static void tweak_gesture_modal(bContext *C, wmEvent *event) rect->xmax = event->x - sx; rect->ymax = event->y - sy; - if ((val= wm_gesture_evaluate(gesture))) { + if ((val = wm_gesture_evaluate(gesture))) { wmEvent tevent; - tevent= *(window->eventstate); - if (gesture->event_type==LEFTMOUSE) - tevent.type= EVT_TWEAK_L; - else if (gesture->event_type==RIGHTMOUSE) - tevent.type= EVT_TWEAK_R; + tevent = *(window->eventstate); + if (gesture->event_type == LEFTMOUSE) + tevent.type = EVT_TWEAK_L; + else if (gesture->event_type == RIGHTMOUSE) + tevent.type = EVT_TWEAK_R; else - tevent.type= EVT_TWEAK_M; - tevent.val= val; + tevent.type = EVT_TWEAK_M; + tevent.val = val; /* mouse coords! */ wm_event_add(window, &tevent); - WM_gesture_end(C, gesture); /* frees gesture itself, and unregisters from window */ + WM_gesture_end(C, gesture); /* frees gesture itself, and unregisters from window */ } break; @@ -2576,11 +2576,11 @@ static void tweak_gesture_modal(bContext *C, wmEvent *event) case LEFTMOUSE: case RIGHTMOUSE: case MIDDLEMOUSE: - if (gesture->event_type==event->type) { + if (gesture->event_type == event->type) { WM_gesture_end(C, gesture); /* when tweak fails we should give the other keymap entries a chance */ - event->val= KM_RELEASE; + event->val = KM_RELEASE; } break; default: @@ -2594,13 +2594,13 @@ static void tweak_gesture_modal(bContext *C, wmEvent *event) /* standard tweak, called after window handlers passed on event */ void wm_tweakevent_test(bContext *C, wmEvent *event, int action) { - wmWindow *win= CTX_wm_window(C); + wmWindow *win = CTX_wm_window(C); - if (win->tweak==NULL) { + if (win->tweak == NULL) { if (CTX_wm_region(C)) { - if (event->val==KM_PRESS) { - if ( ELEM3(event->type, LEFTMOUSE, MIDDLEMOUSE, RIGHTMOUSE) ) - win->tweak= WM_gesture_new(C, event, WM_GESTURE_TWEAK); + if (event->val == KM_PRESS) { + if (ELEM3(event->type, LEFTMOUSE, MIDDLEMOUSE, RIGHTMOUSE) ) + win->tweak = WM_gesture_new(C, event, WM_GESTURE_TWEAK); } } } @@ -2618,14 +2618,14 @@ void wm_tweakevent_test(bContext *C, wmEvent *event, int action) int WM_gesture_lasso_invoke(bContext *C, wmOperator *op, wmEvent *event) { - op->customdata= WM_gesture_new(C, event, WM_GESTURE_LASSO); + op->customdata = WM_gesture_new(C, event, WM_GESTURE_LASSO); /* add modal handler */ WM_event_add_modal_handler(C, op); wm_gesture_tag_redraw(C); - if ( RNA_struct_find_property(op->ptr, "cursor") ) + if (RNA_struct_find_property(op->ptr, "cursor") ) WM_cursor_modal(CTX_wm_window(C), RNA_int_get(op->ptr, "cursor")); return OPERATOR_RUNNING_MODAL; @@ -2633,14 +2633,14 @@ int WM_gesture_lasso_invoke(bContext *C, wmOperator *op, wmEvent *event) int WM_gesture_lines_invoke(bContext *C, wmOperator *op, wmEvent *event) { - op->customdata= WM_gesture_new(C, event, WM_GESTURE_LINES); + op->customdata = WM_gesture_new(C, event, WM_GESTURE_LINES); /* add modal handler */ WM_event_add_modal_handler(C, op); wm_gesture_tag_redraw(C); - if ( RNA_struct_find_property(op->ptr, "cursor") ) + if (RNA_struct_find_property(op->ptr, "cursor") ) WM_cursor_modal(CTX_wm_window(C), RNA_int_get(op->ptr, "cursor")); return OPERATOR_RUNNING_MODAL; @@ -2649,18 +2649,18 @@ int WM_gesture_lines_invoke(bContext *C, wmOperator *op, wmEvent *event) static void gesture_lasso_apply(bContext *C, wmOperator *op) { - wmGesture *gesture= op->customdata; + wmGesture *gesture = op->customdata; PointerRNA itemptr; float loc[2]; int i; - short *lasso= gesture->customdata; + short *lasso = gesture->customdata; /* operator storage as path. */ RNA_collection_clear(op->ptr, "path"); - for (i=0; ipoints; i++, lasso+=2) { - loc[0]= lasso[0]; - loc[1]= lasso[1]; + for (i = 0; i < gesture->points; i++, lasso += 2) { + loc[0] = lasso[0]; + loc[1] = lasso[1]; RNA_collection_add(op->ptr, "path", &itemptr); RNA_float_set_array(&itemptr, "loc", loc); } @@ -2673,10 +2673,10 @@ static void gesture_lasso_apply(bContext *C, wmOperator *op) int WM_gesture_lasso_modal(bContext *C, wmOperator *op, wmEvent *event) { - wmGesture *gesture= op->customdata; + wmGesture *gesture = op->customdata; int sx, sy; - switch(event->type) { + switch (event->type) { case MOUSEMOVE: case INBETWEEN_MOUSEMOVE: @@ -2686,8 +2686,8 @@ int WM_gesture_lasso_modal(bContext *C, wmOperator *op, wmEvent *event) if (gesture->points == gesture->size) { short *old_lasso = gesture->customdata; - gesture->customdata= MEM_callocN(2*sizeof(short)*(gesture->size + WM_LASSO_MIN_POINTS), "lasso points"); - memcpy(gesture->customdata, old_lasso, 2*sizeof(short)*gesture->size); + gesture->customdata = MEM_callocN(2 * sizeof(short) * (gesture->size + WM_LASSO_MIN_POINTS), "lasso points"); + memcpy(gesture->customdata, old_lasso, 2 * sizeof(short) * gesture->size); gesture->size = gesture->size + WM_LASSO_MIN_POINTS; MEM_freeN(old_lasso); // printf("realloc\n"); @@ -2695,7 +2695,7 @@ int WM_gesture_lasso_modal(bContext *C, wmOperator *op, wmEvent *event) { int x, y; - short *lasso= gesture->customdata; + short *lasso = gesture->customdata; lasso += (2 * gesture->points - 2); x = (event->x - sx - lasso[0]); @@ -2703,7 +2703,7 @@ int WM_gesture_lasso_modal(bContext *C, wmOperator *op, wmEvent *event) /* make a simple distance check to get a smoother lasso * add only when at least 2 pixels between this and previous location */ - if ((x*x+y*y) > 4) { + if ((x * x + y * y) > 4) { lasso += 2; lasso[0] = event->x - sx; lasso[1] = event->y - sy; @@ -2715,7 +2715,7 @@ int WM_gesture_lasso_modal(bContext *C, wmOperator *op, wmEvent *event) case LEFTMOUSE: case MIDDLEMOUSE: case RIGHTMOUSE: - if (event->val==KM_RELEASE) { /* key release */ + if (event->val == KM_RELEASE) { /* key release */ gesture_lasso_apply(C, op); return OPERATOR_FINISHED; } @@ -2751,7 +2751,8 @@ int WM_gesture_lines_cancel(bContext *C, wmOperator *op) static int gesture_lasso_exec(bContext *C, wmOperator *op) { - RNA_BEGIN(op->ptr, itemptr, "path") { + RNA_BEGIN(op->ptr, itemptr, "path") + { float loc[2]; RNA_float_get_array(&itemptr, "loc", loc); @@ -2776,7 +2777,7 @@ void WM_OT_lasso_gesture(wmOperatorType *ot) ot->poll = WM_operator_winactive; - prop= RNA_def_property(ot->srna, "path", PROP_COLLECTION, PROP_NONE); + prop = RNA_def_property(ot->srna, "path", PROP_COLLECTION, PROP_NONE); RNA_def_property_struct_runtime(prop, &RNA_OperatorMousePath); } #endif @@ -2785,10 +2786,10 @@ void WM_OT_lasso_gesture(wmOperatorType *ot) static int straightline_apply(bContext *C, wmOperator *op) { - wmGesture *gesture= op->customdata; - rcti *rect= gesture->customdata; + wmGesture *gesture = op->customdata; + rcti *rect = gesture->customdata; - if (rect->xmin ==rect->xmax && rect->ymin==rect->ymax) + if (rect->xmin == rect->xmax && rect->ymin == rect->ymax) return 0; /* operator arguments and storage. */ @@ -2806,14 +2807,14 @@ static int straightline_apply(bContext *C, wmOperator *op) int WM_gesture_straightline_invoke(bContext *C, wmOperator *op, wmEvent *event) { - op->customdata= WM_gesture_new(C, event, WM_GESTURE_STRAIGHTLINE); + op->customdata = WM_gesture_new(C, event, WM_GESTURE_STRAIGHTLINE); /* add modal handler */ WM_event_add_modal_handler(C, op); wm_gesture_tag_redraw(C); - if ( RNA_struct_find_property(op->ptr, "cursor") ) + if (RNA_struct_find_property(op->ptr, "cursor") ) WM_cursor_modal(CTX_wm_window(C), RNA_int_get(op->ptr, "cursor")); return OPERATOR_RUNNING_MODAL; @@ -2821,14 +2822,14 @@ int WM_gesture_straightline_invoke(bContext *C, wmOperator *op, wmEvent *event) int WM_gesture_straightline_modal(bContext *C, wmOperator *op, wmEvent *event) { - wmGesture *gesture= op->customdata; - rcti *rect= gesture->customdata; + wmGesture *gesture = op->customdata; + rcti *rect = gesture->customdata; int sx, sy; - if (event->type== MOUSEMOVE) { + if (event->type == MOUSEMOVE) { wm_subwindow_getorigin(CTX_wm_window(C), gesture->swinid, &sx, &sy); - if (gesture->mode==0) { + if (gesture->mode == 0) { rect->xmin = rect->xmax = event->x - sx; rect->ymin = rect->ymax = event->y - sy; } @@ -2840,11 +2841,11 @@ int WM_gesture_straightline_modal(bContext *C, wmOperator *op, wmEvent *event) wm_gesture_tag_redraw(C); } - else if (event->type==EVT_MODAL_MAP) { + else if (event->type == EVT_MODAL_MAP) { switch (event->val) { case GESTURE_MODAL_BEGIN: - if (gesture->mode==0) { - gesture->mode= 1; + if (gesture->mode == 0) { + gesture->mode = 1; wm_gesture_tag_redraw(C); } break; @@ -2916,22 +2917,22 @@ static void radial_control_set_initial_mouse(RadialControl *rc, wmEvent *event) float d[2] = {0, 0}; float zoom[2] = {1, 1}; - rc->initial_mouse[0]= event->x; - rc->initial_mouse[1]= event->y; - - switch(rc->subtype) { - case PROP_DISTANCE: - d[0] = rc->initial_value; - break; - case PROP_FACTOR: - d[0] = WM_RADIAL_CONTROL_DISPLAY_SIZE * (1 - rc->initial_value); - break; - case PROP_ANGLE: - d[0] = WM_RADIAL_CONTROL_DISPLAY_SIZE * cos(rc->initial_value); - d[1] = WM_RADIAL_CONTROL_DISPLAY_SIZE * sin(rc->initial_value); - break; - default: - return; + rc->initial_mouse[0] = event->x; + rc->initial_mouse[1] = event->y; + + switch (rc->subtype) { + case PROP_DISTANCE: + d[0] = rc->initial_value; + break; + case PROP_FACTOR: + d[0] = WM_RADIAL_CONTROL_DISPLAY_SIZE * (1 - rc->initial_value); + break; + case PROP_ANGLE: + d[0] = WM_RADIAL_CONTROL_DISPLAY_SIZE * cos(rc->initial_value); + d[1] = WM_RADIAL_CONTROL_DISPLAY_SIZE * sin(rc->initial_value); + break; + default: + return; } if (rc->zoom_prop) { @@ -2940,27 +2941,27 @@ static void radial_control_set_initial_mouse(RadialControl *rc, wmEvent *event) d[1] *= zoom[1]; } - rc->initial_mouse[0]-= d[0]; - rc->initial_mouse[1]-= d[1]; + rc->initial_mouse[0] -= d[0]; + rc->initial_mouse[1] -= d[1]; } static void radial_control_set_tex(RadialControl *rc) { ImBuf *ibuf; - switch(RNA_type_to_ID_code(rc->image_id_ptr.type)) { - case ID_BR: - if ((ibuf = brush_gen_radial_control_imbuf(rc->image_id_ptr.data))) { - glGenTextures(1, &rc->gltex); - glBindTexture(GL_TEXTURE_2D, rc->gltex); - glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, ibuf->x, ibuf->y, 0, - GL_ALPHA, GL_FLOAT, ibuf->rect_float); - MEM_freeN(ibuf->rect_float); - MEM_freeN(ibuf); - } - break; - default: - break; + switch (RNA_type_to_ID_code(rc->image_id_ptr.type)) { + case ID_BR: + if ((ibuf = brush_gen_radial_control_imbuf(rc->image_id_ptr.data))) { + glGenTextures(1, &rc->gltex); + glBindTexture(GL_TEXTURE_2D, rc->gltex); + glTexImage2D(GL_TEXTURE_2D, 0, GL_ALPHA, ibuf->x, ibuf->y, 0, + GL_ALPHA, GL_FLOAT, ibuf->rect_float); + MEM_freeN(ibuf->rect_float); + MEM_freeN(ibuf); + } + break; + default: + break; } } @@ -2990,13 +2991,13 @@ static void radial_control_paint_tex(RadialControl *rc, float radius, float alph /* draw textured quad */ glEnable(GL_TEXTURE_2D); glBegin(GL_QUADS); - glTexCoord2f(0,0); + glTexCoord2f(0, 0); glVertex2f(-radius, -radius); - glTexCoord2f(1,0); + glTexCoord2f(1, 0); glVertex2f(radius, -radius); - glTexCoord2f(1,1); + glTexCoord2f(1, 1); glVertex2f(radius, radius); - glTexCoord2f(0,1); + glTexCoord2f(0, 1); glVertex2f(-radius, radius); glEnd(); glDisable(GL_TEXTURE_2D); @@ -3015,29 +3016,29 @@ static void radial_control_paint_cursor(bContext *C, int x, int y, void *customd { RadialControl *rc = customdata; ARegion *ar = CTX_wm_region(C); - float r1=0.0f, r2=0.0f, tex_radius, alpha; + float r1 = 0.0f, r2 = 0.0f, tex_radius, alpha; float zoom[2], col[3] = {1, 1, 1}; - switch(rc->subtype) { - case PROP_DISTANCE: - r1= rc->current_value; - r2= rc->initial_value; - tex_radius= r1; - alpha = 0.75; - break; - case PROP_FACTOR: - r1= (1 - rc->current_value) * WM_RADIAL_CONTROL_DISPLAY_SIZE; - r2= tex_radius= WM_RADIAL_CONTROL_DISPLAY_SIZE; - alpha = rc->current_value / 2.0f + 0.5f; - break; - case PROP_ANGLE: - r1= r2= tex_radius= WM_RADIAL_CONTROL_DISPLAY_SIZE; - alpha = 0.75; - break; - default: - tex_radius= WM_RADIAL_CONTROL_DISPLAY_SIZE; /* note, this is a dummy value */ - alpha = 0.75; - break; + switch (rc->subtype) { + case PROP_DISTANCE: + r1 = rc->current_value; + r2 = rc->initial_value; + tex_radius = r1; + alpha = 0.75; + break; + case PROP_FACTOR: + r1 = (1 - rc->current_value) * WM_RADIAL_CONTROL_DISPLAY_SIZE; + r2 = tex_radius = WM_RADIAL_CONTROL_DISPLAY_SIZE; + alpha = rc->current_value / 2.0f + 0.5f; + break; + case PROP_ANGLE: + r1 = r2 = tex_radius = WM_RADIAL_CONTROL_DISPLAY_SIZE; + alpha = 0.75; + break; + default: + tex_radius = WM_RADIAL_CONTROL_DISPLAY_SIZE; /* note, this is a dummy value */ + alpha = 0.75; + break; } /* Keep cursor in the original place */ @@ -3074,8 +3075,8 @@ static void radial_control_paint_cursor(bContext *C, int x, int y, void *customd } /* draw circles on top */ - glutil_draw_lined_arc(0.0, (float)(M_PI*2.0), r1, 40); - glutil_draw_lined_arc(0.0, (float)(M_PI*2.0), r2, 40); + glutil_draw_lined_arc(0.0, (float)(M_PI * 2.0), r1, 40); + glutil_draw_lined_arc(0.0, (float)(M_PI * 2.0), r2, 40); glDisable(GL_BLEND); glDisable(GL_LINE_SMOOTH); @@ -3091,8 +3092,8 @@ typedef enum { * returns 0 for failure, 1 for success, and also 1 if property is not * set */ static int radial_control_get_path(PointerRNA *ctx_ptr, wmOperator *op, - const char *name, PointerRNA *r_ptr, - PropertyRNA **r_prop, int req_length, RCPropFlags flags) + const char *name, PointerRNA *r_ptr, + PropertyRNA **r_prop, int req_length, RCPropFlags flags) { PropertyRNA *unused_prop; int len; @@ -3133,10 +3134,10 @@ static int radial_control_get_path(PointerRNA *ctx_ptr, wmOperator *op, PropertyType prop_type = RNA_property_type(*r_prop); if (((flags & RC_PROP_REQUIRE_BOOL) && (prop_type != PROP_BOOLEAN)) || - ((flags & RC_PROP_REQUIRE_FLOAT) && prop_type != PROP_FLOAT)) { + ((flags & RC_PROP_REQUIRE_FLOAT) && prop_type != PROP_FLOAT)) { MEM_freeN(str); BKE_reportf(op->reports, RPT_ERROR, - "Property from path %s is not a float", name); + "Property from path %s is not a float", name); return 0; } } @@ -3167,14 +3168,15 @@ static int radial_control_get_properties(bContext *C, wmOperator *op) /* check if we use primary or secondary path */ if (!radial_control_get_path(&ctx_ptr, op, "use_secondary", - &use_secondary_ptr, &use_secondary_prop, - 0, (RC_PROP_ALLOW_MISSING| - RC_PROP_REQUIRE_BOOL))) { + &use_secondary_ptr, &use_secondary_prop, + 0, (RC_PROP_ALLOW_MISSING | + RC_PROP_REQUIRE_BOOL))) + { return 0; } else { if (use_secondary_prop && - RNA_property_boolean_get(&use_secondary_ptr, use_secondary_prop)) + RNA_property_boolean_get(&use_secondary_ptr, use_secondary_prop)) data_path = "data_path_secondary"; else data_path = "data_path_primary"; @@ -3198,8 +3200,8 @@ static int radial_control_get_properties(bContext *C, wmOperator *op) * correctly. needed because 3d texture paint shares the same * keymap as 2d image paint */ if (!radial_control_get_path(&ctx_ptr, op, "zoom_path", - &rc->zoom_ptr, &rc->zoom_prop, 2, - RC_PROP_REQUIRE_FLOAT|RC_PROP_ALLOW_MISSING)) + &rc->zoom_ptr, &rc->zoom_prop, 2, + RC_PROP_REQUIRE_FLOAT | RC_PROP_ALLOW_MISSING)) return 0; if (!radial_control_get_path(&ctx_ptr, op, "image_id", &rc->image_id_ptr, NULL, 0, 0)) @@ -3208,7 +3210,7 @@ static int radial_control_get_properties(bContext *C, wmOperator *op) /* extra check, pointer must be to an ID */ if (!RNA_struct_is_ID(rc->image_id_ptr.type)) { BKE_report(op->reports, RPT_ERROR, - "Pointer from path image_id is not an ID"); + "Pointer from path image_id is not an ID"); return 0; } } @@ -3232,23 +3234,23 @@ static int radial_control_invoke(bContext *C, wmOperator *op, wmEvent *event) } /* get type, initial, min, and max values of the property */ - switch((rc->type = RNA_property_type(rc->prop))) { - case PROP_INT: - rc->initial_value = RNA_property_int_get(&rc->ptr, rc->prop); - RNA_property_int_ui_range(&rc->ptr, rc->prop, &min_value_int, - &max_value_int, &step_int); - rc->min_value = min_value_int; - rc->max_value = max_value_int; - break; - case PROP_FLOAT: - rc->initial_value = RNA_property_float_get(&rc->ptr, rc->prop); - RNA_property_float_ui_range(&rc->ptr, rc->prop, &rc->min_value, - &rc->max_value, &step_float, &precision); - break; - default: - BKE_report(op->reports, RPT_ERROR, "Property must be an integer or a float"); - MEM_freeN(rc); - return OPERATOR_CANCELLED; + switch ((rc->type = RNA_property_type(rc->prop))) { + case PROP_INT: + rc->initial_value = RNA_property_int_get(&rc->ptr, rc->prop); + RNA_property_int_ui_range(&rc->ptr, rc->prop, &min_value_int, + &max_value_int, &step_int); + rc->min_value = min_value_int; + rc->max_value = max_value_int; + break; + case PROP_FLOAT: + rc->initial_value = RNA_property_float_get(&rc->ptr, rc->prop); + RNA_property_float_ui_range(&rc->ptr, rc->prop, &rc->min_value, + &rc->max_value, &step_float, &precision); + break; + default: + BKE_report(op->reports, RPT_ERROR, "Property must be an integer or a float"); + MEM_freeN(rc); + return OPERATOR_CANCELLED; } /* get subtype of property */ @@ -3270,7 +3272,7 @@ static int radial_control_invoke(bContext *C, wmOperator *op, wmEvent *event) /* add radial control paint cursor */ rc->cursor = WM_paint_cursor_activate(wm, op->type->poll, - radial_control_paint_cursor, rc); + radial_control_paint_cursor, rc); WM_event_add_modal_handler(C, op); @@ -3279,15 +3281,15 @@ static int radial_control_invoke(bContext *C, wmOperator *op, wmEvent *event) static void radial_control_set_value(RadialControl *rc, float val) { - switch(rc->type) { - case PROP_INT: - RNA_property_int_set(&rc->ptr, rc->prop, val); - break; - case PROP_FLOAT: - RNA_property_float_set(&rc->ptr, rc->prop, val); - break; - default: - break; + switch (rc->type) { + case PROP_INT: + RNA_property_int_set(&rc->ptr, rc->prop, val); + break; + case PROP_FLOAT: + RNA_property_float_set(&rc->ptr, rc->prop, val); + break; + default: + break; } } @@ -3323,56 +3325,56 @@ static int radial_control_modal(bContext *C, wmOperator *op, wmEvent *event) snap = event->ctrl; - switch(event->type) { - case MOUSEMOVE: - delta[0]= rc->initial_mouse[0] - event->x; - delta[1]= rc->initial_mouse[1] - event->y; + switch (event->type) { + case MOUSEMOVE: + delta[0] = rc->initial_mouse[0] - event->x; + delta[1] = rc->initial_mouse[1] - event->y; - if (rc->zoom_prop) { - RNA_property_float_get_array(&rc->zoom_ptr, rc->zoom_prop, zoom); - delta[0] /= zoom[0]; - delta[1] /= zoom[1]; - } + if (rc->zoom_prop) { + RNA_property_float_get_array(&rc->zoom_ptr, rc->zoom_prop, zoom); + delta[0] /= zoom[0]; + delta[1] /= zoom[1]; + } - dist= sqrt(delta[0]*delta[0]+delta[1]*delta[1]); + dist = sqrt(delta[0] * delta[0] + delta[1] * delta[1]); - /* calculate new value and apply snapping */ - switch(rc->subtype) { - case PROP_DISTANCE: - new_value = dist; - if (snap) new_value = ((int)new_value + 5) / 10*10; - break; - case PROP_FACTOR: - new_value = 1 - dist / WM_RADIAL_CONTROL_DISPLAY_SIZE; - if (snap) new_value = ((int)ceil(new_value * 10.f) * 10.0f) / 100.f; - break; - case PROP_ANGLE: - new_value = atan2(delta[1], delta[0]) + M_PI; - if (snap) new_value = DEG2RADF(((int)RAD2DEGF(new_value) + 5) / 10*10); + /* calculate new value and apply snapping */ + switch (rc->subtype) { + case PROP_DISTANCE: + new_value = dist; + if (snap) new_value = ((int)new_value + 5) / 10 * 10; + break; + case PROP_FACTOR: + new_value = 1 - dist / WM_RADIAL_CONTROL_DISPLAY_SIZE; + if (snap) new_value = ((int)ceil(new_value * 10.f) * 10.0f) / 100.f; + break; + case PROP_ANGLE: + new_value = atan2(delta[1], delta[0]) + M_PI; + if (snap) new_value = DEG2RADF(((int)RAD2DEGF(new_value) + 5) / 10 * 10); + break; + default: + new_value = dist; /* dummy value, should this ever happen? - campbell */ + break; + } + + /* clamp and update */ + CLAMP(new_value, rc->min_value, rc->max_value); + radial_control_set_value(rc, new_value); + rc->current_value = new_value; break; - default: - new_value = dist; /* dummy value, should this ever happen? - campbell */ + + case ESCKEY: + case RIGHTMOUSE: + /* canceled; restore original value */ + radial_control_set_value(rc, rc->initial_value); + ret = OPERATOR_CANCELLED; break; - } - /* clamp and update */ - CLAMP(new_value, rc->min_value, rc->max_value); - radial_control_set_value(rc, new_value); - rc->current_value = new_value; - break; - - case ESCKEY: - case RIGHTMOUSE: - /* canceled; restore original value */ - radial_control_set_value(rc, rc->initial_value); - ret = OPERATOR_CANCELLED; - break; - - case LEFTMOUSE: - case PADENTER: - /* done; value already set */ - ret = OPERATOR_FINISHED; - break; + case LEFTMOUSE: + case PADENTER: + /* done; value already set */ + ret = OPERATOR_FINISHED; + break; } ED_region_tag_redraw(CTX_wm_region(C)); @@ -3392,7 +3394,7 @@ static void WM_OT_radial_control(wmOperatorType *ot) ot->modal = radial_control_modal; ot->cancel = radial_control_cancel; - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING; /* all paths relative to the context */ RNA_def_string(ot->srna, "data_path_primary", "", 0, "Primary Data Path", "Primary path of property to be set by the radial control"); @@ -3411,14 +3413,14 @@ static void WM_OT_radial_control(wmOperatorType *ot) static void redraw_timer_window_swap(bContext *C) { - wmWindow *win= CTX_wm_window(C); + wmWindow *win = CTX_wm_window(C); ScrArea *sa; - for (sa= CTX_wm_screen(C)->areabase.first; sa; sa= sa->next) + for (sa = CTX_wm_screen(C)->areabase.first; sa; sa = sa->next) ED_area_tag_redraw(sa); wm_draw_update(C); - CTX_wm_window_set(C, win); /* XXX context manipulation warning! */ + CTX_wm_window_set(C, win); /* XXX context manipulation warning! */ } static EnumPropertyItem redraw_timer_type_items[] = { @@ -3429,45 +3431,46 @@ static EnumPropertyItem redraw_timer_type_items[] = { {4, "ANIM_STEP", 0, "Anim Step", "Animation Steps"}, {5, "ANIM_PLAY", 0, "Anim Play", "Animation Playback"}, {6, "UNDO", 0, "Undo/Redo", "Undo/Redo"}, - {0, NULL, 0, NULL, NULL}}; + {0, NULL, 0, NULL, NULL} +}; static int redraw_timer_exec(bContext *C, wmOperator *op) { - ARegion *ar= CTX_wm_region(C); - double stime= PIL_check_seconds_timer(); + ARegion *ar = CTX_wm_region(C); + double stime = PIL_check_seconds_timer(); int type = RNA_enum_get(op->ptr, "type"); int iter = RNA_int_get(op->ptr, "iterations"); int a; float time; - const char *infostr= ""; + const char *infostr = ""; WM_cursor_wait(1); - for (a=0; aareabase.first; sa; sa= sa->next) { + for (sa = CTX_wm_screen(C)->areabase.first; sa; sa = sa->next) { ARegion *ar_iter; CTX_wm_area_set(C, sa); - for (ar_iter= sa->regionbase.first; ar_iter; ar_iter= ar_iter->next) { + for (ar_iter = sa->regionbase.first; ar_iter; ar_iter = ar_iter->next) { if (ar_iter->swinid) { CTX_wm_region_set(C, ar_iter); ED_region_do_draw(C, ar_iter); @@ -3475,34 +3478,34 @@ static int redraw_timer_exec(bContext *C, wmOperator *op) } } - CTX_wm_window_set(C, win); /* XXX context manipulation warning! */ + CTX_wm_window_set(C, win); /* XXX context manipulation warning! */ CTX_wm_area_set(C, sa_back); CTX_wm_region_set(C, ar_back); } - else if (type==3) { + else if (type == 3) { redraw_timer_window_swap(C); } - else if (type==4) { - Main *bmain= CTX_data_main(C); - Scene *scene= CTX_data_scene(C); + else if (type == 4) { + Main *bmain = CTX_data_main(C); + Scene *scene = CTX_data_scene(C); if (a & 1) scene->r.cfra--; else scene->r.cfra++; scene_update_for_newframe(bmain, scene, scene->lay); } - else if (type==5) { + else if (type == 5) { /* play anim, return on same frame as started with */ - Main *bmain= CTX_data_main(C); - Scene *scene= CTX_data_scene(C); - int tot= (scene->r.efra - scene->r.sfra) + 1; + Main *bmain = CTX_data_main(C); + Scene *scene = CTX_data_scene(C); + int tot = (scene->r.efra - scene->r.sfra) + 1; while (tot--) { /* todo, ability to escape! */ scene->r.cfra++; if (scene->r.cfra > scene->r.efra) - scene->r.cfra= scene->r.sfra; + scene->r.cfra = scene->r.sfra; scene_update_for_newframe(bmain, scene, scene->lay); redraw_timer_window_swap(C); @@ -3514,13 +3517,13 @@ static int redraw_timer_exec(bContext *C, wmOperator *op) } } - time= (float)((PIL_check_seconds_timer()-stime)*1000); + time = (float)((PIL_check_seconds_timer() - stime) * 1000); RNA_enum_description(redraw_timer_type_items, type, &infostr); WM_cursor_wait(0); - BKE_reportf(op->reports, RPT_WARNING, "%d x %s: %.2f ms, average: %.4f", iter, infostr, time, time/iter); + BKE_reportf(op->reports, RPT_WARNING, "%d x %s: %.2f ms, average: %.4f", iter, infostr, time, time / iter); return OPERATOR_FINISHED; } @@ -3536,7 +3539,7 @@ static void WM_OT_redraw_timer(wmOperatorType *ot) ot->poll = WM_operator_winactive; ot->prop = RNA_def_enum(ot->srna, "type", redraw_timer_type_items, 0, "Type", ""); - RNA_def_int(ot->srna, "iterations", 10, 1,INT_MAX, "Iterations", "Number of times to redraw", 1,1000); + RNA_def_int(ot->srna, "iterations", 10, 1, INT_MAX, "Iterations", "Number of times to redraw", 1, 1000); } @@ -3561,9 +3564,9 @@ static void WM_OT_memory_statistics(wmOperatorType *ot) static int dependency_relations_exec(bContext *C, wmOperator *UNUSED(op)) { - Main *bmain= CTX_data_main(C); - Scene *scene= CTX_data_scene(C); - Object *ob= CTX_data_active_object(C); + Main *bmain = CTX_data_main(C); + Scene *scene = CTX_data_scene(C); + Object *ob = CTX_data_active_object(C); DAG_print_dependencies(bmain, scene, ob); @@ -3588,9 +3591,9 @@ static int wm_ndof_sensitivity_exec(bContext *UNUSED(C), wmOperator *op) float sensitivity = U.ndof_sensitivity; if (RNA_boolean_get(op->ptr, "fast")) - change = 0.5f; // 50% change + change = 0.5f; // 50% change else - change = 0.1f; // 10% + change = 0.1f; // 10% if (RNA_boolean_get(op->ptr, "decrease")) { sensitivity -= sensitivity * change; @@ -3644,13 +3647,13 @@ static void operatortype_ghash_free_cb(wmOperatorType *ot) void wm_operatortype_free(void) { BLI_ghash_free(global_ops_hash, NULL, (GHashValFreeFP)operatortype_ghash_free_cb); - global_ops_hash= NULL; + global_ops_hash = NULL; } /* called on initialize WM_init() */ void wm_operatortype_init(void) { - global_ops_hash= BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp, "wm_operatortype_init gh"); + global_ops_hash = BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp, "wm_operatortype_init gh"); WM_operatortype_append(WM_OT_window_duplicate); WM_operatortype_append(WM_OT_read_homefile); @@ -3688,24 +3691,23 @@ void wm_operatortype_init(void) static void gesture_circle_modal_keymap(wmKeyConfig *keyconf) { static EnumPropertyItem modal_items[] = { - {GESTURE_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""}, - {GESTURE_MODAL_CONFIRM, "CONFIRM", 0, "Confirm", ""}, - {GESTURE_MODAL_CIRCLE_ADD, "ADD", 0, "Add", ""}, - {GESTURE_MODAL_CIRCLE_SUB, "SUBTRACT", 0, "Subtract", ""}, - - {GESTURE_MODAL_SELECT, "SELECT", 0, "Select", ""}, - {GESTURE_MODAL_DESELECT,"DESELECT", 0, "DeSelect", ""}, - {GESTURE_MODAL_NOP,"NOP", 0, "No Operation", ""}, + {GESTURE_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""}, + {GESTURE_MODAL_CONFIRM, "CONFIRM", 0, "Confirm", ""}, + {GESTURE_MODAL_CIRCLE_ADD, "ADD", 0, "Add", ""}, + {GESTURE_MODAL_CIRCLE_SUB, "SUBTRACT", 0, "Subtract", ""}, + {GESTURE_MODAL_SELECT, "SELECT", 0, "Select", ""}, + {GESTURE_MODAL_DESELECT, "DESELECT", 0, "DeSelect", ""}, + {GESTURE_MODAL_NOP, "NOP", 0, "No Operation", ""}, - {0, NULL, 0, NULL, NULL}}; + {0, NULL, 0, NULL, NULL}}; - wmKeyMap *keymap= WM_modalkeymap_get(keyconf, "View3D Gesture Circle"); + wmKeyMap *keymap = WM_modalkeymap_get(keyconf, "View3D Gesture Circle"); /* this function is called for each spacetype, only needs to add map once */ if (keymap) return; - keymap= WM_modalkeymap_add(keyconf, "View3D Gesture Circle", modal_items); + keymap = WM_modalkeymap_add(keyconf, "View3D Gesture Circle", modal_items); /* items for modal map */ WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, GESTURE_MODAL_CANCEL); @@ -3742,17 +3744,17 @@ static void gesture_circle_modal_keymap(wmKeyConfig *keyconf) static void gesture_straightline_modal_keymap(wmKeyConfig *keyconf) { static EnumPropertyItem modal_items[] = { - {GESTURE_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""}, - {GESTURE_MODAL_SELECT, "SELECT", 0, "Select", ""}, - {GESTURE_MODAL_BEGIN, "BEGIN", 0, "Begin", ""}, + {GESTURE_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""}, + {GESTURE_MODAL_SELECT, "SELECT", 0, "Select", ""}, + {GESTURE_MODAL_BEGIN, "BEGIN", 0, "Begin", ""}, {0, NULL, 0, NULL, NULL}}; - wmKeyMap *keymap= WM_modalkeymap_get(keyconf, "Gesture Straight Line"); + wmKeyMap *keymap = WM_modalkeymap_get(keyconf, "Gesture Straight Line"); /* this function is called for each spacetype, only needs to add map once */ if (keymap) return; - keymap= WM_modalkeymap_add(keyconf, "Gesture Straight Line", modal_items); + keymap = WM_modalkeymap_add(keyconf, "Gesture Straight Line", modal_items); /* items for modal map */ WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, GESTURE_MODAL_CANCEL); @@ -3770,22 +3772,22 @@ static void gesture_straightline_modal_keymap(wmKeyConfig *keyconf) static void gesture_border_modal_keymap(wmKeyConfig *keyconf) { static EnumPropertyItem modal_items[] = { - {GESTURE_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""}, - {GESTURE_MODAL_SELECT, "SELECT", 0, "Select", ""}, - {GESTURE_MODAL_DESELECT,"DESELECT", 0, "DeSelect", ""}, - {GESTURE_MODAL_BEGIN, "BEGIN", 0, "Begin", ""}, - {0, NULL, 0, NULL, NULL}}; + {GESTURE_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""}, + {GESTURE_MODAL_SELECT, "SELECT", 0, "Select", ""}, + {GESTURE_MODAL_DESELECT, "DESELECT", 0, "DeSelect", ""}, + {GESTURE_MODAL_BEGIN, "BEGIN", 0, "Begin", ""}, + {0, NULL, 0, NULL, NULL}}; - wmKeyMap *keymap= WM_modalkeymap_get(keyconf, "Gesture Border"); + wmKeyMap *keymap = WM_modalkeymap_get(keyconf, "Gesture Border"); /* this function is called for each spacetype, only needs to add map once */ if (keymap) return; - keymap= WM_modalkeymap_add(keyconf, "Gesture Border", modal_items); + keymap = WM_modalkeymap_add(keyconf, "Gesture Border", modal_items); /* items for modal map */ WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, GESTURE_MODAL_CANCEL); - /* Note: cancel only on press otherwise you cannot map this to RMB-gesture */ + /* Note: cancel only on press otherwise you cannot map this to RMB-gesture */ WM_modalkeymap_add_item(keymap, RIGHTMOUSE, KM_PRESS, KM_ANY, 0, GESTURE_MODAL_CANCEL); WM_modalkeymap_add_item(keymap, LEFTMOUSE, KM_PRESS, 0, 0, GESTURE_MODAL_BEGIN); @@ -3829,18 +3831,18 @@ static void gesture_border_modal_keymap(wmKeyConfig *keyconf) static void gesture_zoom_border_modal_keymap(wmKeyConfig *keyconf) { static EnumPropertyItem modal_items[] = { - {GESTURE_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""}, - {GESTURE_MODAL_IN, "IN", 0, "In", ""}, - {GESTURE_MODAL_OUT, "OUT", 0, "Out", ""}, - {GESTURE_MODAL_BEGIN, "BEGIN", 0, "Begin", ""}, - {0, NULL, 0, NULL, NULL}}; + {GESTURE_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""}, + {GESTURE_MODAL_IN, "IN", 0, "In", ""}, + {GESTURE_MODAL_OUT, "OUT", 0, "Out", ""}, + {GESTURE_MODAL_BEGIN, "BEGIN", 0, "Begin", ""}, + {0, NULL, 0, NULL, NULL}}; - wmKeyMap *keymap= WM_modalkeymap_get(keyconf, "Gesture Zoom Border"); + wmKeyMap *keymap = WM_modalkeymap_get(keyconf, "Gesture Zoom Border"); /* this function is called for each spacetype, only needs to add map once */ if (keymap) return; - keymap= WM_modalkeymap_add(keyconf, "Gesture Zoom Border", modal_items); + keymap = WM_modalkeymap_add(keyconf, "Gesture Zoom Border", modal_items); /* items for modal map */ WM_modalkeymap_add_item(keymap, ESCKEY, KM_PRESS, KM_ANY, 0, GESTURE_MODAL_CANCEL); @@ -3864,38 +3866,38 @@ void wm_window_keymap(wmKeyConfig *keyconf) wmKeyMapItem *kmi; /* note, this doesn't replace existing keymap items */ - WM_keymap_verify_item(keymap, "WM_OT_window_duplicate", WKEY, KM_PRESS, KM_CTRL|KM_ALT, 0); + WM_keymap_verify_item(keymap, "WM_OT_window_duplicate", WKEY, KM_PRESS, KM_CTRL | KM_ALT, 0); #ifdef __APPLE__ WM_keymap_add_item(keymap, "WM_OT_read_homefile", NKEY, KM_PRESS, KM_OSKEY, 0); - WM_keymap_add_menu(keymap, "INFO_MT_file_open_recent", OKEY, KM_PRESS, KM_SHIFT|KM_OSKEY, 0); + WM_keymap_add_menu(keymap, "INFO_MT_file_open_recent", OKEY, KM_PRESS, KM_SHIFT | KM_OSKEY, 0); WM_keymap_add_item(keymap, "WM_OT_open_mainfile", OKEY, KM_PRESS, KM_OSKEY, 0); WM_keymap_add_item(keymap, "WM_OT_save_mainfile", SKEY, KM_PRESS, KM_OSKEY, 0); - WM_keymap_add_item(keymap, "WM_OT_save_as_mainfile", SKEY, KM_PRESS, KM_SHIFT|KM_OSKEY, 0); + WM_keymap_add_item(keymap, "WM_OT_save_as_mainfile", SKEY, KM_PRESS, KM_SHIFT | KM_OSKEY, 0); WM_keymap_add_item(keymap, "WM_OT_quit_blender", QKEY, KM_PRESS, KM_OSKEY, 0); #endif WM_keymap_add_item(keymap, "WM_OT_read_homefile", NKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "WM_OT_save_homefile", UKEY, KM_PRESS, KM_CTRL, 0); - WM_keymap_add_menu(keymap, "INFO_MT_file_open_recent", OKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0); + WM_keymap_add_menu(keymap, "INFO_MT_file_open_recent", OKEY, KM_PRESS, KM_SHIFT | KM_CTRL, 0); WM_keymap_add_item(keymap, "WM_OT_open_mainfile", OKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "WM_OT_open_mainfile", F1KEY, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "WM_OT_link_append", OKEY, KM_PRESS, KM_CTRL|KM_ALT, 0); + WM_keymap_add_item(keymap, "WM_OT_link_append", OKEY, KM_PRESS, KM_CTRL | KM_ALT, 0); kmi = WM_keymap_add_item(keymap, "WM_OT_link_append", F1KEY, KM_PRESS, KM_SHIFT, 0); RNA_boolean_set(kmi->ptr, "link", FALSE); RNA_boolean_set(kmi->ptr, "instance_groups", FALSE); WM_keymap_add_item(keymap, "WM_OT_save_mainfile", SKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "WM_OT_save_mainfile", WKEY, KM_PRESS, KM_CTRL, 0); - WM_keymap_add_item(keymap, "WM_OT_save_as_mainfile", SKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0); + WM_keymap_add_item(keymap, "WM_OT_save_as_mainfile", SKEY, KM_PRESS, KM_SHIFT | KM_CTRL, 0); WM_keymap_add_item(keymap, "WM_OT_save_as_mainfile", F2KEY, KM_PRESS, 0, 0); - kmi = WM_keymap_add_item(keymap, "WM_OT_save_as_mainfile", SKEY, KM_PRESS, KM_ALT|KM_CTRL, 0); + kmi = WM_keymap_add_item(keymap, "WM_OT_save_as_mainfile", SKEY, KM_PRESS, KM_ALT | KM_CTRL, 0); RNA_boolean_set(kmi->ptr, "copy", TRUE); WM_keymap_verify_item(keymap, "WM_OT_window_fullscreen_toggle", F11KEY, KM_PRESS, KM_ALT, 0); WM_keymap_add_item(keymap, "WM_OT_quit_blender", QKEY, KM_PRESS, KM_CTRL, 0); /* debug/testing */ - WM_keymap_verify_item(keymap, "WM_OT_redraw_timer", TKEY, KM_PRESS, KM_ALT|KM_CTRL, 0); - WM_keymap_verify_item(keymap, "WM_OT_debug_menu", DKEY, KM_PRESS, KM_ALT|KM_CTRL, 0); + WM_keymap_verify_item(keymap, "WM_OT_redraw_timer", TKEY, KM_PRESS, KM_ALT | KM_CTRL, 0); + WM_keymap_verify_item(keymap, "WM_OT_debug_menu", DKEY, KM_PRESS, KM_ALT | KM_CTRL, 0); /* menus that can be accessed anywhere in blender */ WM_keymap_verify_item(keymap, "WM_OT_search_menu", SPACEKEY, KM_PRESS, 0, 0); @@ -3972,20 +3974,20 @@ void wm_window_keymap(wmKeyConfig *keyconf) /* Generic itemf's for operators that take library args */ static EnumPropertyItem *rna_id_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), int *do_free, ID *id, int local) { - EnumPropertyItem item_tmp= {0}, *item= NULL; - int totitem= 0; - int i= 0; + EnumPropertyItem item_tmp = {0}, *item = NULL; + int totitem = 0; + int i = 0; - for ( ; id; id= id->next) { - if (local==FALSE || id->lib==NULL) { - item_tmp.identifier= item_tmp.name= id->name+2; - item_tmp.value= i++; + for (; id; id = id->next) { + if (local == FALSE || id->lib == NULL) { + item_tmp.identifier = item_tmp.name = id->name + 2; + item_tmp.value = i++; RNA_enum_item_add(&item, &totitem, &item_tmp); } } RNA_enum_item_end(&item, &totitem); - *do_free= 1; + *do_free = 1; return item; } diff --git a/source/blender/windowmanager/intern/wm_subwindow.c b/source/blender/windowmanager/intern/wm_subwindow.c index 149c1355c06..564fa963d6e 100644 --- a/source/blender/windowmanager/intern/wm_subwindow.c +++ b/source/blender/windowmanager/intern/wm_subwindow.c @@ -87,7 +87,7 @@ void wm_subwindows_free(wmWindow *win) { wmSubWindow *swin; - for (swin= win->subwindows.first; swin; swin= swin->next) + for (swin = win->subwindows.first; swin; swin = swin->next) wm_subwindow_free(swin); BLI_freelistN(&win->subwindows); @@ -105,35 +105,35 @@ static wmSubWindow *swin_from_swinid(wmWindow *win, int swinid) { wmSubWindow *swin; - for (swin= win->subwindows.first; swin; swin= swin->next) - if (swin->swinid==swinid) + for (swin = win->subwindows.first; swin; swin = swin->next) + if (swin->swinid == swinid) break; return swin; } void wm_subwindow_getsize(wmWindow *win, int swinid, int *x, int *y) { - wmSubWindow *swin= swin_from_swinid(win, swinid); + wmSubWindow *swin = swin_from_swinid(win, swinid); if (swin) { - *x= swin->winrct.xmax - swin->winrct.xmin + 1; - *y= swin->winrct.ymax - swin->winrct.ymin + 1; + *x = swin->winrct.xmax - swin->winrct.xmin + 1; + *y = swin->winrct.ymax - swin->winrct.ymin + 1; } } void wm_subwindow_getorigin(wmWindow *win, int swinid, int *x, int *y) { - wmSubWindow *swin= swin_from_swinid(win, swinid); + wmSubWindow *swin = swin_from_swinid(win, swinid); if (swin) { - *x= swin->winrct.xmin; - *y= swin->winrct.ymin; + *x = swin->winrct.xmin; + *y = swin->winrct.ymin; } } void wm_subwindow_getmatrix(wmWindow *win, int swinid, float mat[][4]) { - wmSubWindow *swin= swin_from_swinid(win, swinid); + wmSubWindow *swin = swin_from_swinid(win, swinid); if (swin) { /* used by UI, should find a better way to get the matrix there */ @@ -141,10 +141,10 @@ void wm_subwindow_getmatrix(wmWindow *win, int swinid, float mat[][4]) int width, height; wm_subwindow_getsize(win, swin->swinid, &width, &height); - orthographic_m4(mat, -0.375f, (float)width-0.375f, -0.375f, (float)height-0.375f, -100, 100); + orthographic_m4(mat, -0.375f, (float)width - 0.375f, -0.375f, (float)height - 0.375f, -100, 100); } else - glGetFloatv(GL_PROJECTION_MATRIX, (float*)mat); + glGetFloatv(GL_PROJECTION_MATRIX, (float *)mat); } } @@ -154,25 +154,25 @@ int wm_subwindow_open(wmWindow *win, rcti *winrct) { wmSubWindow *swin; int width, height; - int freewinid= 1; + int freewinid = 1; - for (swin= win->subwindows.first; swin; swin= swin->next) + for (swin = win->subwindows.first; swin; swin = swin->next) if (freewinid <= swin->swinid) - freewinid= swin->swinid+1; + freewinid = swin->swinid + 1; - win->curswin= swin= MEM_callocN(sizeof(wmSubWindow), "swinopen"); + win->curswin = swin = MEM_callocN(sizeof(wmSubWindow), "swinopen"); BLI_addtail(&win->subwindows, swin); if (G.f & G_DEBUG) printf("swin %d added\n", freewinid); - swin->swinid= freewinid; - swin->winrct= *winrct; + swin->swinid = freewinid; + swin->winrct = *winrct; /* and we appy it all right away */ wmSubWindowSet(win, swin->swinid); /* extra service */ wm_subwindow_getsize(win, swin->swinid, &width, &height); - wmOrtho2(-0.375f, (float)width-0.375f, -0.375f, (float)height-0.375f); + wmOrtho2(-0.375f, (float)width - 0.375f, -0.375f, (float)height - 0.375f); glLoadIdentity(); return swin->swinid; @@ -181,11 +181,11 @@ int wm_subwindow_open(wmWindow *win, rcti *winrct) void wm_subwindow_close(wmWindow *win, int swinid) { - wmSubWindow *swin= swin_from_swinid(win, swinid); + wmSubWindow *swin = swin_from_swinid(win, swinid); if (swin) { - if (swin==win->curswin) - win->curswin= NULL; + if (swin == win->curswin) + win->curswin = NULL; wm_subwindow_free(swin); BLI_remlink(&win->subwindows, swin); MEM_freeN(swin); @@ -199,12 +199,12 @@ void wm_subwindow_close(wmWindow *win, int swinid) /* pixels go from 0-99 for a 100 pixel window */ void wm_subwindow_position(wmWindow *win, int swinid, rcti *winrct) { - wmSubWindow *swin= swin_from_swinid(win, swinid); + wmSubWindow *swin = swin_from_swinid(win, swinid); if (swin) { int width, height; - swin->winrct= *winrct; + swin->winrct = *winrct; /* CRITICAL, this clamping ensures that * the viewport never goes outside the screen @@ -227,7 +227,7 @@ void wm_subwindow_position(wmWindow *win, int swinid, rcti *winrct) /* extra service */ wmSubWindowSet(win, swinid); wm_subwindow_getsize(win, swinid, &width, &height); - wmOrtho2(-0.375f, (float)width-0.375f, -0.375f, (float)height-0.375f); + wmOrtho2(-0.375f, (float)width - 0.375f, -0.375f, (float)height - 0.375f); } else { printf("wm_subwindow_position: Internal error, bad winid: %d\n", swinid); @@ -238,35 +238,35 @@ void wm_subwindow_position(wmWindow *win, int swinid, rcti *winrct) /* ----------------- exported in WM_api.h ------------------------------------------------------ */ /* internal state, no threaded opengl! XXX */ -static wmWindow *_curwindow= NULL; -static wmSubWindow *_curswin= NULL; +static wmWindow *_curwindow = NULL; +static wmSubWindow *_curswin = NULL; void wmSubWindowScissorSet(wmWindow *win, int swinid, rcti *srct) { int width, height; - _curswin= swin_from_swinid(win, swinid); + _curswin = swin_from_swinid(win, swinid); - if (_curswin==NULL) { + if (_curswin == NULL) { printf("wmSubWindowSet %d: doesn't exist\n", swinid); return; } - win->curswin= _curswin; - _curwindow= win; + win->curswin = _curswin; + _curwindow = win; - width= _curswin->winrct.xmax - _curswin->winrct.xmin + 1; - height= _curswin->winrct.ymax - _curswin->winrct.ymin + 1; + width = _curswin->winrct.xmax - _curswin->winrct.xmin + 1; + height = _curswin->winrct.ymax - _curswin->winrct.ymin + 1; glViewport(_curswin->winrct.xmin, _curswin->winrct.ymin, width, height); if (srct) { - width= srct->xmax - srct->xmin + 1; - height= srct->ymax - srct->ymin + 1; + width = srct->xmax - srct->xmin + 1; + height = srct->ymax - srct->ymin + 1; glScissor(srct->xmin, srct->ymin, width, height); } else glScissor(_curswin->winrct.xmin, _curswin->winrct.ymin, width, height); - wmOrtho2(-0.375f, (float)width-0.375f, -0.375f, (float)height-0.375f); + wmOrtho2(-0.375f, (float)width - 0.375f, -0.375f, (float)height - 0.375f); glLoadIdentity(); glFlush(); @@ -300,8 +300,8 @@ void wmOrtho(float x1, float x2, float y1, float y2, float n, float f) void wmOrtho2(float x1, float x2, float y1, float y2) { /* prevent opengl from generating errors */ - if (x1==x2) x2+=1.0f; - if (y1==y2) y2+=1.0f; + if (x1 == x2) x2 += 1.0f; + if (y1 == y2) y2 += 1.0f; wmOrtho(x1, x2, y1, y2, -100, 100); } @@ -314,25 +314,25 @@ void wmOrtho2(float x1, float x2, float y1, float y2) unsigned int index_to_framebuffer(int index) { - unsigned int i= index; - - switch(GPU_color_depth()) { - case 12: - i= ((i & 0xF00)<<12) + ((i & 0xF0)<<8) + ((i & 0xF)<<4); - /* sometimes dithering subtracts! */ - i |= 0x070707; - break; - case 15: - case 16: - i= ((i & 0x7C00)<<9) + ((i & 0x3E0)<<6) + ((i & 0x1F)<<3); - i |= 0x030303; - break; - case 24: - break; - default: // 18 bits... - i= ((i & 0x3F000)<<6) + ((i & 0xFC0)<<4) + ((i & 0x3F)<<2); - i |= 0x010101; - break; + unsigned int i = index; + + switch (GPU_color_depth()) { + case 12: + i = ((i & 0xF00) << 12) + ((i & 0xF0) << 8) + ((i & 0xF) << 4); + /* sometimes dithering subtracts! */ + i |= 0x070707; + break; + case 15: + case 16: + i = ((i & 0x7C00) << 9) + ((i & 0x3E0) << 6) + ((i & 0x1F) << 3); + i |= 0x030303; + break; + case 24: + break; + default: // 18 bits... + i = ((i & 0x3F000) << 6) + ((i & 0xFC0) << 4) + ((i & 0x3F) << 2); + i |= 0x010101; + break; } return i; @@ -344,27 +344,27 @@ unsigned int index_to_framebuffer(int index) unsigned int index_to_framebuffer(int index) { - unsigned int i= index; + unsigned int i = index; - switch(GPU_color_depth()) { + switch (GPU_color_depth()) { case 8: - i= ((i & 48)<<18) + ((i & 12)<<12) + ((i & 3)<<6); + i = ((i & 48) << 18) + ((i & 12) << 12) + ((i & 3) << 6); i |= 0x3F3F3F; break; case 12: - i= ((i & 0xF00)<<12) + ((i & 0xF0)<<8) + ((i & 0xF)<<4); + i = ((i & 0xF00) << 12) + ((i & 0xF0) << 8) + ((i & 0xF) << 4); /* sometimes dithering subtracts! */ i |= 0x0F0F0F; break; case 15: case 16: - i= ((i & 0x7C00)<<9) + ((i & 0x3E0)<<6) + ((i & 0x1F)<<3); + i = ((i & 0x7C00) << 9) + ((i & 0x3E0) << 6) + ((i & 0x1F) << 3); i |= 0x070707; break; case 24: break; - default: // 18 bits... - i= ((i & 0x3F000)<<6) + ((i & 0xFC0)<<4) + ((i & 0x3F)<<2); + default: // 18 bits... + i = ((i & 0x3F000) << 6) + ((i & 0xFC0) << 4) + ((i & 0x3F) << 2); i |= 0x030303; break; } @@ -376,26 +376,26 @@ unsigned int index_to_framebuffer(int index) void WM_set_framebuffer_index_color(int index) { - const int col= index_to_framebuffer(index); + const int col = index_to_framebuffer(index); cpack(col); } int WM_framebuffer_to_index(unsigned int col) { - if (col==0) return 0; - - switch(GPU_color_depth()) { - case 8: - return ((col & 0xC00000)>>18) + ((col & 0xC000)>>12) + ((col & 0xC0)>>6); - case 12: - return ((col & 0xF00000)>>12) + ((col & 0xF000)>>8) + ((col & 0xF0)>>4); - case 15: - case 16: - return ((col & 0xF80000)>>9) + ((col & 0xF800)>>6) + ((col & 0xF8)>>3); - case 24: - return col & 0xFFFFFF; - default: // 18 bits... - return ((col & 0xFC0000)>>6) + ((col & 0xFC00)>>4) + ((col & 0xFC)>>2); + if (col == 0) return 0; + + switch (GPU_color_depth()) { + case 8: + return ((col & 0xC00000) >> 18) + ((col & 0xC000) >> 12) + ((col & 0xC0) >> 6); + case 12: + return ((col & 0xF00000) >> 12) + ((col & 0xF000) >> 8) + ((col & 0xF0) >> 4); + case 15: + case 16: + return ((col & 0xF80000) >> 9) + ((col & 0xF800) >> 6) + ((col & 0xF8) >> 3); + case 24: + return col & 0xFFFFFF; + default: // 18 bits... + return ((col & 0xFC0000) >> 6) + ((col & 0xFC00) >> 4) + ((col & 0xFC) >> 2); } } diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index b79a89b89bd..fd9d789ffd4 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -76,7 +76,7 @@ #include "UI_interface.h" /* the global to talk to ghost */ -static GHOST_SystemHandle g_system= NULL; +static GHOST_SystemHandle g_system = NULL; typedef enum WinOverrideFlag { WIN_OVERRIDE_GEOM = (1 << 0), @@ -103,8 +103,8 @@ void wm_get_screensize(int *width_r, int *height_r) unsigned int uiheight; GHOST_GetMainDisplayDimensions(g_system, &uiwidth, &uiheight); - *width_r= uiwidth; - *height_r= uiheight; + *width_r = uiwidth; + *height_r = uiheight; } /* keeps offset and size within monitor bounds */ @@ -128,12 +128,12 @@ static void wm_window_check_position(rcti *rect) rect->ymin = 0; } if (rect->xmax > width) { - d= rect->xmax - width; + d = rect->xmax - width; rect->xmax -= d; rect->xmin -= d; } if (rect->ymax > height) { - d= rect->ymax - height; + d = rect->ymax - height; rect->ymax -= d; rect->ymin -= d; } @@ -147,7 +147,7 @@ static void wm_ghostwindow_destroy(wmWindow *win) { if (win->ghostwin) { GHOST_DisposeWindow(g_system, win->ghostwin); - win->ghostwin= NULL; + win->ghostwin = NULL; } } @@ -162,26 +162,26 @@ void wm_window_free(bContext *C, wmWindowManager *wm, wmWindow *win) WM_event_remove_handlers(C, &win->handlers); WM_event_remove_handlers(C, &win->modalhandlers); - if (CTX_wm_window(C)==win) + if (CTX_wm_window(C) == win) CTX_wm_window_set(C, NULL); } /* always set drawable and active to NULL, * prevents non-drawable state of main windows (bugs #22967 and #25071, possibly #22477 too) */ - wm->windrawable= NULL; - wm->winactive= NULL; + wm->windrawable = NULL; + wm->winactive = NULL; /* end running jobs, a job end also removes its timer */ - for (wt= wm->timers.first; wt; wt= wtnext) { - wtnext= wt->next; - if (wt->win==win && wt->event_type==TIMERJOBS) + for (wt = wm->timers.first; wt; wt = wtnext) { + wtnext = wt->next; + if (wt->win == win && wt->event_type == TIMERJOBS) wm_jobs_timer_ended(wm, wt); } /* timer removing, need to call this api function */ - for (wt= wm->timers.first; wt; wt=wtnext) { - wtnext= wt->next; - if (wt->win==win) + for (wt = wm->timers.first; wt; wt = wtnext) { + wtnext = wt->next; + if (wt->win == win) WM_event_remove_timer(wm, win, wt); } @@ -201,11 +201,11 @@ void wm_window_free(bContext *C, wmWindowManager *wm, wmWindow *win) static int find_free_winid(wmWindowManager *wm) { wmWindow *win; - int id= 1; + int id = 1; - for (win= wm->windows.first; win; win= win->next) + for (win = wm->windows.first; win; win = win->next) if (id <= win->winid) - id= win->winid+1; + id = win->winid + 1; return id; } @@ -213,11 +213,11 @@ static int find_free_winid(wmWindowManager *wm) /* don't change context itself */ wmWindow *wm_window_new(bContext *C) { - wmWindowManager *wm= CTX_wm_manager(C); - wmWindow *win= MEM_callocN(sizeof(wmWindow), "window"); + wmWindowManager *wm = CTX_wm_manager(C); + wmWindow *win = MEM_callocN(sizeof(wmWindow), "window"); BLI_addtail(&wm->windows, win); - win->winid= find_free_winid(wm); + win->winid = find_free_winid(wm); return win; } @@ -226,23 +226,23 @@ wmWindow *wm_window_new(bContext *C) /* part of wm_window.c api */ wmWindow *wm_window_copy(bContext *C, wmWindow *winorig) { - wmWindow *win= wm_window_new(C); + wmWindow *win = wm_window_new(C); - win->posx= winorig->posx+10; - win->posy= winorig->posy; - win->sizex= winorig->sizex; - win->sizey= winorig->sizey; + win->posx = winorig->posx + 10; + win->posy = winorig->posy; + win->sizex = winorig->sizex; + win->sizey = winorig->sizey; /* duplicate assigns to window */ - win->screen= ED_screen_duplicate(win, winorig->screen); - BLI_strncpy(win->screenname, win->screen->id.name+2, sizeof(win->screenname)); - win->screen->winid= win->winid; + win->screen = ED_screen_duplicate(win, winorig->screen); + BLI_strncpy(win->screenname, win->screen->id.name + 2, sizeof(win->screenname)); + win->screen->winid = win->winid; - win->screen->do_refresh= 1; - win->screen->do_draw= 1; + win->screen->do_refresh = 1; + win->screen->do_draw = 1; - win->drawmethod= -1; - win->drawdata= NULL; + win->drawmethod = -1; + win->drawdata = NULL; return win; } @@ -251,7 +251,7 @@ wmWindow *wm_window_copy(bContext *C, wmWindow *winorig) void wm_window_close(bContext *C, wmWindowManager *wm, wmWindow *win) { wmWindow *tmpwin; - bScreen *screen= win->screen; + bScreen *screen = win->screen; /* first check if we have any non-temp remaining windows */ if ((U.uiflag & USER_QUIT_PROMPT) && !wm->file_saved) { @@ -272,7 +272,7 @@ void wm_window_close(bContext *C, wmWindowManager *wm, wmWindow *win) BLI_remlink(&wm->windows, win); wm_draw_window_clear(win); - CTX_wm_window_set(C, win); /* needed by handlers */ + CTX_wm_window_set(C, win); /* needed by handlers */ WM_event_remove_handlers(C, &win->handlers); WM_event_remove_handlers(C, &win->modalhandlers); ED_screen_exit(C, win, win->screen); @@ -281,17 +281,17 @@ void wm_window_close(bContext *C, wmWindowManager *wm, wmWindow *win) /* if temp screen, delete it after window free (it stops jobs that can access it) */ if (screen->temp) { - Main *bmain= CTX_data_main(C); + Main *bmain = CTX_data_main(C); free_libblock(&bmain->screen, screen); } /* check remaining windows */ if (wm->windows.first) { - for (win= wm->windows.first; win; win= win->next) + for (win = wm->windows.first; win; win = win->next) if (win->screen->temp == 0) break; /* in this case we close all */ - if (win==NULL) + if (win == NULL) WM_exit(C); } else @@ -302,8 +302,8 @@ void wm_window_title(wmWindowManager *wm, wmWindow *win) { /* handle the 'temp' window, only set title when not set before */ if (win->screen && win->screen->temp) { - char *title= GHOST_GetTitle(win->ghostwin); - if (title==NULL || title[0]==0) + char *title = GHOST_GetTitle(win->ghostwin); + if (title == NULL || title[0] == 0) GHOST_SetTitle(win->ghostwin, "Blender"); } else { @@ -311,7 +311,7 @@ void wm_window_title(wmWindowManager *wm, wmWindow *win) /* this is set to 1 if you don't have startup.blend open */ if (G.save_over && G.main->name[0]) { char str[sizeof(G.main->name) + 12]; - BLI_snprintf(str, sizeof(str), "Blender%s [%s]", wm->file_saved ? "":"*", G.main->name); + BLI_snprintf(str, sizeof(str), "Blender%s [%s]", wm->file_saved ? "" : "*", G.main->name); GHOST_SetTitle(win->ghostwin, str); } else @@ -320,7 +320,7 @@ void wm_window_title(wmWindowManager *wm, wmWindow *win) /* Informs GHOST of unsaved changes, to set window modified visual indicator (MAC OS X) * and to give hint of unsaved changes for a user warning mechanism * in case of OS application terminate request (e.g. OS Shortcut Alt+F4, Cmd+Q, (...), or session end) */ - GHOST_SetWindowModifiedState(win->ghostwin, (GHOST_TUns8)!wm->file_saved); + GHOST_SetWindowModifiedState(win->ghostwin, (GHOST_TUns8) !wm->file_saved); #if defined(__APPLE__) && !defined(GHOST_COCOA) if (wm->file_saved) @@ -338,7 +338,7 @@ static void wm_window_add_ghostwindow(const char *title, wmWindow *win) int scr_w, scr_h, posy; wm_get_screensize(&scr_w, &scr_h); - posy= (scr_h - win->posy - win->sizey); + posy = (scr_h - win->posy - win->sizey); #if defined(__APPLE__) && !defined(GHOST_COCOA) { @@ -348,12 +348,12 @@ static void wm_window_add_ghostwindow(const char *title, wmWindow *win) #endif /* Disable AA for now, as GL_SELECT (used for border, lasso, ... select) * doesn't work well when AA is initialized, even if not used. */ - ghostwin= GHOST_CreateWindow(g_system, title, - win->posx, posy, win->sizex, win->sizey, - (GHOST_TWindowState)win->windowstate, - GHOST_kDrawingContextTypeOpenGL, - 0 /* no stereo */, - 0 /* no AA */); + ghostwin = GHOST_CreateWindow(g_system, title, + win->posx, posy, win->sizex, win->sizey, + (GHOST_TWindowState)win->windowstate, + GHOST_kDrawingContextTypeOpenGL, + 0 /* no stereo */, + 0 /* no AA */); if (ghostwin) { /* needed so we can detect the graphics card below */ @@ -362,11 +362,11 @@ static void wm_window_add_ghostwindow(const char *title, wmWindow *win) /* set the state*/ GHOST_SetWindowState(ghostwin, (GHOST_TWindowState)win->windowstate); - win->ghostwin= ghostwin; - GHOST_SetWindowUserData(ghostwin, win); /* pointer back */ + win->ghostwin = ghostwin; + GHOST_SetWindowUserData(ghostwin, win); /* pointer back */ - if (win->eventstate==NULL) - win->eventstate= MEM_callocN(sizeof(wmEvent), "window event state"); + if (win->eventstate == NULL) + win->eventstate = MEM_callocN(sizeof(wmEvent), "window event state"); /* until screens get drawn, make it nice grey */ glClearColor(.55, .55, .55, 0.0); @@ -404,7 +404,7 @@ void wm_window_add_ghostwindows(wmWindowManager *wm) #if defined(__APPLE__) && !defined(GHOST_COCOA) //Cocoa provides functions to get correct max window size { - extern void wm_set_apple_prefsize(int, int); /* wm_apple.c */ + extern void wm_set_apple_prefsize(int, int); /* wm_apple.c */ wm_set_apple_prefsize(wm_init_state.size_x, wm_init_state.size_y); } @@ -415,8 +415,8 @@ void wm_window_add_ghostwindows(wmWindowManager *wm) #endif } - for (win= wm->windows.first; win; win= win->next) { - if (win->ghostwin==NULL) { + for (win = wm->windows.first; win; win = win->next) { + if (win->ghostwin == NULL) { if ((win->sizex == 0) || (wm_init_state.override_flag & WIN_OVERRIDE_GEOM)) { win->posx = wm_init_state.start_x; win->posy = wm_init_state.start_y; @@ -433,8 +433,8 @@ void wm_window_add_ghostwindows(wmWindowManager *wm) wm_window_add_ghostwindow("Blender", win); } /* happens after fileread */ - if (win->eventstate==NULL) - win->eventstate= MEM_callocN(sizeof(wmEvent), "window event state"); + if (win->eventstate == NULL) + win->eventstate = MEM_callocN(sizeof(wmEvent), "window event state"); /* add keymap handlers (1 handler for all keys in map!) */ keymap = WM_keymap_find(wm->defaultconf, "Window", 0, 0); @@ -448,7 +448,7 @@ void wm_window_add_ghostwindows(wmWindowManager *wm) /* add drop boxes */ { - ListBase *lb= WM_dropboxmap_find("Window", 0, 0); + ListBase *lb = WM_dropboxmap_find("Window", 0, 0); WM_event_add_dropbox_handler(&win->handlers, lb); } wm_window_title(wm, win); @@ -460,15 +460,15 @@ void wm_window_add_ghostwindows(wmWindowManager *wm) /* area-rip calls this */ wmWindow *WM_window_open(bContext *C, rcti *rect) { - wmWindow *win= wm_window_new(C); + wmWindow *win = wm_window_new(C); - win->posx= rect->xmin; - win->posy= rect->ymin; - win->sizex= rect->xmax - rect->xmin; - win->sizey= rect->ymax - rect->ymin; + win->posx = rect->xmin; + win->posy = rect->ymin; + win->sizex = rect->xmax - rect->xmin; + win->sizey = rect->ymax - rect->ymin; - win->drawmethod= -1; - win->drawdata= NULL; + win->drawmethod = -1; + win->drawdata = NULL; WM_check(C); @@ -488,20 +488,20 @@ void WM_window_open_temp(bContext *C, rcti *position, int type) wm_window_check_position(position); /* test if we have a temp screen already */ - for (win= CTX_wm_manager(C)->windows.first; win; win= win->next) + for (win = CTX_wm_manager(C)->windows.first; win; win = win->next) if (win->screen->temp) break; /* add new window? */ - if (win==NULL) { - win= wm_window_new(C); + if (win == NULL) { + win = wm_window_new(C); - win->posx= position->xmin; - win->posy= position->ymin; + win->posx = position->xmin; + win->posy = position->ymin; } - win->sizex= position->xmax - position->xmin; - win->sizey= position->ymax - position->ymin; + win->sizex = position->xmax - position->xmin; + win->sizey = position->ymax - position->ymin; if (win->ghostwin) { wm_window_set_size(win, win->sizex, win->sizey); @@ -509,8 +509,8 @@ void WM_window_open_temp(bContext *C, rcti *position, int type) } /* add new screen? */ - if (win->screen==NULL) - win->screen= ED_screen_add(win, CTX_data_scene(C), "temp"); + if (win->screen == NULL) + win->screen = ED_screen_add(win, CTX_data_scene(C), "temp"); win->screen->temp = 1; /* make window active, and validate/resize */ @@ -518,10 +518,10 @@ void WM_window_open_temp(bContext *C, rcti *position, int type) WM_check(C); /* ensure it shows the right spacetype editor */ - sa= win->screen->areabase.first; + sa = win->screen->areabase.first; CTX_wm_area_set(C, sa); - if (type==WM_WINDOW_RENDER) { + if (type == WM_WINDOW_RENDER) { ED_area_newspace(C, sa, SPACE_IMAGE); } else { @@ -530,11 +530,11 @@ void WM_window_open_temp(bContext *C, rcti *position, int type) ED_screen_set(C, win->screen); - if (sa->spacetype==SPACE_IMAGE) + if (sa->spacetype == SPACE_IMAGE) GHOST_SetTitle(win->ghostwin, IFACE_("Blender Render")); else if (ELEM(sa->spacetype, SPACE_OUTLINER, SPACE_USERPREF)) GHOST_SetTitle(win->ghostwin, IFACE_("Blender User Preferences")); - else if (sa->spacetype==SPACE_FILE) + else if (sa->spacetype == SPACE_FILE) GHOST_SetTitle(win->ghostwin, IFACE_("Blender File View")); else GHOST_SetTitle(win->ghostwin, "Blender"); @@ -549,7 +549,7 @@ int wm_window_duplicate_exec(bContext *C, wmOperator *UNUSED(op)) wm_window_copy(C, CTX_wm_window(C)); WM_check(C); - WM_event_add_notifier(C, NC_WINDOW|NA_ADDED, NULL); + WM_event_add_notifier(C, NC_WINDOW | NA_ADDED, NULL); return OPERATOR_FINISHED; } @@ -558,14 +558,14 @@ int wm_window_duplicate_exec(bContext *C, wmOperator *UNUSED(op)) /* fullscreen operator callback */ int wm_window_fullscreen_toggle_exec(bContext *C, wmOperator *UNUSED(op)) { - wmWindow *window= CTX_wm_window(C); + wmWindow *window = CTX_wm_window(C); GHOST_TWindowState state; if (G.background) return OPERATOR_CANCELLED; - state= GHOST_GetWindowState(window->ghostwin); - if (state!=GHOST_kWindowStateFullScreen) + state = GHOST_GetWindowState(window->ghostwin); + if (state != GHOST_kWindowStateFullScreen) GHOST_SetWindowState(window->ghostwin, GHOST_kWindowStateFullScreen); else GHOST_SetWindowState(window->ghostwin, GHOST_kWindowStateNormal); @@ -589,24 +589,24 @@ typedef enum static int query_qual(modifierKeyType qual) { GHOST_TModifierKeyMask left, right; - int val= 0; + int val = 0; - switch(qual) { + switch (qual) { case SHIFT: - left= GHOST_kModifierKeyLeftShift; - right= GHOST_kModifierKeyRightShift; + left = GHOST_kModifierKeyLeftShift; + right = GHOST_kModifierKeyRightShift; break; case CONTROL: - left= GHOST_kModifierKeyLeftControl; - right= GHOST_kModifierKeyRightControl; + left = GHOST_kModifierKeyLeftControl; + right = GHOST_kModifierKeyRightControl; break; case OS: - left= right= GHOST_kModifierKeyOS; + left = right = GHOST_kModifierKeyOS; break; case ALT: default: - left= GHOST_kModifierKeyLeftAlt; - right= GHOST_kModifierKeyRightAlt; + left = GHOST_kModifierKeyLeftAlt; + right = GHOST_kModifierKeyRightAlt; break; } @@ -619,12 +619,12 @@ static int query_qual(modifierKeyType qual) void wm_window_make_drawable(bContext *C, wmWindow *win) { - wmWindowManager *wm= CTX_wm_manager(C); + wmWindowManager *wm = CTX_wm_manager(C); if (win != wm->windrawable && win->ghostwin) { // win->lmbut= 0; /* keeps hanging when mousepressed while other window opened */ - wm->windrawable= win; + wm->windrawable = win; if (G.f & G_DEBUG) printf("set drawable %d\n", win->winid); GHOST_ActivateWindowDrawingContext(win->ghostwin); } @@ -633,17 +633,17 @@ void wm_window_make_drawable(bContext *C, wmWindow *win) /* called by ghost, here we handle events for windows themselves or send to event system */ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr private) { - bContext *C= private; - wmWindowManager *wm= CTX_wm_manager(C); - GHOST_TEventType type= GHOST_GetEventType(evt); - int time= GHOST_GetEventTime(evt); + bContext *C = private; + wmWindowManager *wm = CTX_wm_manager(C); + GHOST_TEventType type = GHOST_GetEventType(evt); + int time = GHOST_GetEventTime(evt); if (type == GHOST_kEventQuit) { WM_exit(C); } else { - GHOST_WindowHandle ghostwin= GHOST_GetEventWindow(evt); - GHOST_TEventDataPtr data= GHOST_GetEventData(evt); + GHOST_WindowHandle ghostwin = GHOST_GetEventWindow(evt); + GHOST_TEventDataPtr data = GHOST_GetEventData(evt); wmWindow *win; if (!ghostwin) { @@ -659,54 +659,54 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr private) return 1; } else { - win= GHOST_GetWindowUserData(ghostwin); + win = GHOST_GetWindowUserData(ghostwin); } - switch(type) { + switch (type) { case GHOST_kEventWindowDeactivate: wm_event_add_ghostevent(wm, win, type, time, data); - win->active= 0; /* XXX */ + win->active = 0; /* XXX */ break; case GHOST_kEventWindowActivate: { GHOST_TEventKeyData kdata; int cx, cy, wx, wy; - wm->winactive= win; /* no context change! c->wm->windrawable is drawable, or for area queues */ + wm->winactive = win; /* no context change! c->wm->windrawable is drawable, or for area queues */ - win->active= 1; + win->active = 1; // window_handle(win, INPUTCHANGE, win->active); /* bad ghost support for modifier keys... so on activate we set the modifiers again */ - kdata.ascii= '\0'; - kdata.utf8_buf[0]= '\0'; + kdata.ascii = '\0'; + kdata.utf8_buf[0] = '\0'; if (win->eventstate->shift && !query_qual(SHIFT)) { - kdata.key= GHOST_kKeyLeftShift; + kdata.key = GHOST_kKeyLeftShift; wm_event_add_ghostevent(wm, win, GHOST_kEventKeyUp, time, &kdata); } if (win->eventstate->ctrl && !query_qual(CONTROL)) { - kdata.key= GHOST_kKeyLeftControl; + kdata.key = GHOST_kKeyLeftControl; wm_event_add_ghostevent(wm, win, GHOST_kEventKeyUp, time, &kdata); } if (win->eventstate->alt && !query_qual(ALT)) { - kdata.key= GHOST_kKeyLeftAlt; + kdata.key = GHOST_kKeyLeftAlt; wm_event_add_ghostevent(wm, win, GHOST_kEventKeyUp, time, &kdata); } if (win->eventstate->oskey && !query_qual(OS)) { - kdata.key= GHOST_kKeyOS; + kdata.key = GHOST_kKeyOS; wm_event_add_ghostevent(wm, win, GHOST_kEventKeyUp, time, &kdata); } /* keymodifier zero, it hangs on hotkeys that open windows otherwise */ - win->eventstate->keymodifier= 0; + win->eventstate->keymodifier = 0; /* entering window, update mouse pos. but no event */ GHOST_GetCursorPosition(g_system, &wx, &wy); GHOST_ScreenToClient(win->ghostwin, wx, wy, &cx, &cy); - win->eventstate->x= cx; - win->eventstate->y= (win->sizey-1) - cy; + win->eventstate->x = cx; + win->eventstate->y = (win->sizey - 1) - cy; - win->addmousemove= 1; /* enables highlighted buttons */ + win->addmousemove = 1; /* enables highlighted buttons */ wm_window_make_drawable(C, win); break; @@ -729,22 +729,22 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr private) state = GHOST_GetWindowState(win->ghostwin); win->windowstate = state; - /* win32: gives undefined window size when minimized */ - if (state!=GHOST_kWindowStateMinimized) { + /* win32: gives undefined window size when minimized */ + if (state != GHOST_kWindowStateMinimized) { GHOST_RectangleHandle client_rect; int l, t, r, b, scr_w, scr_h; int sizex, sizey, posx, posy; - client_rect= GHOST_GetClientBounds(win->ghostwin); + client_rect = GHOST_GetClientBounds(win->ghostwin); GHOST_GetRectangle(client_rect, &l, &t, &r, &b); GHOST_DisposeRectangle(client_rect); wm_get_screensize(&scr_w, &scr_h); - sizex= r-l; - sizey= b-t; - posx= l; - posy= scr_h - t - win->sizey; + sizex = r - l; + sizey = b - t; + posx = l; + posy = scr_h - t - win->sizey; /* * Ghost sometimes send size or move events when the window hasn't changed. @@ -755,33 +755,33 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr private) * another time. */ if (win->sizex != sizex || - win->sizey != sizey || - win->posx != posx || - win->posy != posy) + win->sizey != sizey || + win->posx != posx || + win->posy != posy) { - win->sizex= sizex; - win->sizey= sizey; - win->posx= posx; - win->posy= posy; + win->sizex = sizex; + win->sizey = sizey; + win->posx = posx; + win->posy = posy; /* debug prints */ if (0) { state = GHOST_GetWindowState(win->ghostwin); - if (state==GHOST_kWindowStateNormal) { + if (state == GHOST_kWindowStateNormal) { if (G.f & G_DEBUG) printf("window state: normal\n"); } - else if (state==GHOST_kWindowStateMinimized) { + else if (state == GHOST_kWindowStateMinimized) { if (G.f & G_DEBUG) printf("window state: minimized\n"); } - else if (state==GHOST_kWindowStateMaximized) { + else if (state == GHOST_kWindowStateMaximized) { if (G.f & G_DEBUG) printf("window state: maximized\n"); } - else if (state==GHOST_kWindowStateFullScreen) { + else if (state == GHOST_kWindowStateFullScreen) { if (G.f & G_DEBUG) printf("window state: fullscreen\n"); } - if (type!=GHOST_kEventWindowSize) { + if (type != GHOST_kEventWindowSize) { if (G.f & G_DEBUG) { printf("win move event pos %d %d size %d %d\n", win->posx, win->posy, win->sizex, win->sizey); @@ -792,8 +792,8 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr private) wm_window_make_drawable(C, win); wm_draw_window_clear(win); - WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL); - WM_event_add_notifier(C, NC_WINDOW|NA_EDITED, NULL); + WM_event_add_notifier(C, NC_SCREEN | NA_EDITED, NULL); + WM_event_add_notifier(C, NC_WINDOW | NA_EDITED, NULL); } } break; @@ -823,35 +823,35 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr private) case GHOST_kEventDraggingDropDone: { wmEvent event; - GHOST_TEventDragnDropData *ddd= GHOST_GetEventData(evt); + GHOST_TEventDragnDropData *ddd = GHOST_GetEventData(evt); int cx, cy, wx, wy; /* entering window, update mouse pos */ GHOST_GetCursorPosition(g_system, &wx, &wy); GHOST_ScreenToClient(win->ghostwin, wx, wy, &cx, &cy); - win->eventstate->x= cx; - win->eventstate->y= (win->sizey-1) - cy; + win->eventstate->x = cx; + win->eventstate->y = (win->sizey - 1) - cy; - event= *(win->eventstate); /* copy last state, like mouse coords */ + event = *(win->eventstate); /* copy last state, like mouse coords */ // activate region - event.type= MOUSEMOVE; - event.prevx= event.x; - event.prevy= event.y; + event.type = MOUSEMOVE; + event.prevx = event.x; + event.prevy = event.y; - wm->winactive= win; /* no context change! c->wm->windrawable is drawable, or for area queues */ - win->active= 1; + wm->winactive = win; /* no context change! c->wm->windrawable is drawable, or for area queues */ + win->active = 1; wm_event_add(win, &event); /* make blender drop event with custom data pointing to wm drags */ - event.type= EVT_DROP; - event.val= KM_RELEASE; - event.custom= EVT_DATA_LISTBASE; - event.customdata= &wm->drags; - event.customdatafree= 1; + event.type = EVT_DROP; + event.val = KM_RELEASE; + event.custom = EVT_DATA_LISTBASE; + event.customdata = &wm->drags; + event.customdatafree = 1; wm_event_add(win, &event); @@ -860,13 +860,13 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr private) /* add drag data to wm for paths: */ if (ddd->dataType == GHOST_kDragnDropTypeFilenames) { - GHOST_TStringArray *stra= ddd->data; + GHOST_TStringArray *stra = ddd->data; int a, icon; - for (a=0; acount; a++) { + for (a = 0; a < stra->count; a++) { printf("drop file %s\n", stra->strings[a]); /* try to get icon type from extension */ - icon= ED_file_extension_icon((char *)stra->strings[a]); + icon = ED_file_extension_icon((char *)stra->strings[a]); WM_event_start_drag(C, icon, WM_DRAG_PATH, stra->strings[a], 0.0); /* void poin should point to string, it makes a copy */ @@ -897,36 +897,36 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr private) */ static int wm_window_timer(const bContext *C) { - wmWindowManager *wm= CTX_wm_manager(C); + wmWindowManager *wm = CTX_wm_manager(C); wmTimer *wt, *wtnext; wmWindow *win; - double time= PIL_check_seconds_timer(); - int retval= 0; + double time = PIL_check_seconds_timer(); + int retval = 0; - for (wt= wm->timers.first; wt; wt= wtnext) { - wtnext= wt->next; /* in case timer gets removed */ - win= wt->win; + for (wt = wm->timers.first; wt; wt = wtnext) { + wtnext = wt->next; /* in case timer gets removed */ + win = wt->win; - if (wt->sleep==0) { + if (wt->sleep== 0) { if (time > wt->ntime) { - wt->delta= time - wt->ltime; + wt->delta = time - wt->ltime; wt->duration += wt->delta; - wt->ltime= time; - wt->ntime= wt->stime + wt->timestep*ceil(wt->duration/wt->timestep); + wt->ltime = time; + wt->ntime = wt->stime + wt->timestep *ceil(wt->duration / wt->timestep); if (wt->event_type == TIMERJOBS) wm_jobs_timer(C, wm, wt); else if (wt->event_type == TIMERAUTOSAVE) wm_autosave_timer(C, wm, wt); else if (win) { - wmEvent event= *(win->eventstate); + wmEvent event = *(win->eventstate); - event.type= wt->event_type; - event.custom= EVT_DATA_TIMER; - event.customdata= wt; + event.type = wt->event_type; + event.custom = EVT_DATA_TIMER; + event.customdata = wt; wm_event_add(win, &event); - retval= 1; + retval = 1; } } } @@ -936,7 +936,7 @@ static int wm_window_timer(const bContext *C) void wm_window_process_events(const bContext *C) { - int hasevent= GHOST_ProcessEvents(g_system, 0); /* 0 is no wait */ + int hasevent = GHOST_ProcessEvents(g_system, 0); /* 0 is no wait */ if (hasevent) GHOST_DispatchEvents(g_system); @@ -944,7 +944,7 @@ void wm_window_process_events(const bContext *C) hasevent |= wm_window_timer(C); /* no event, we sleep 5 milliseconds */ - if (hasevent==0) + if (hasevent == 0) PIL_sleep_ms(5); } @@ -957,19 +957,19 @@ void wm_window_process_events_nosleep(void) /* exported as handle callback to bke blender.c */ void wm_window_testbreak(void) { - static double ltime= 0; - double curtime= PIL_check_seconds_timer(); + static double ltime = 0; + double curtime = PIL_check_seconds_timer(); /* only check for breaks every 50 milliseconds * if we get called more often. */ - if ((curtime-ltime)>.05) { - int hasevent= GHOST_ProcessEvents(g_system, 0); /* 0 is no wait */ + if ((curtime - ltime) > .05) { + int hasevent = GHOST_ProcessEvents(g_system, 0); /* 0 is no wait */ if (hasevent) GHOST_DispatchEvents(g_system); - ltime= curtime; + ltime = curtime; } } @@ -978,9 +978,9 @@ void wm_window_testbreak(void) void wm_ghost_init(bContext *C) { if (!g_system) { - GHOST_EventConsumerHandle consumer= GHOST_CreateEventConsumer(ghost_event_proc, C); + GHOST_EventConsumerHandle consumer = GHOST_CreateEventConsumer(ghost_event_proc, C); - g_system= GHOST_CreateSystem(); + g_system = GHOST_CreateSystem(); GHOST_AddEventConsumer(g_system, consumer); } } @@ -990,7 +990,7 @@ void wm_ghost_exit(void) if (g_system) GHOST_DisposeSystem(g_system); - g_system= NULL; + g_system = NULL; } /* **************** timer ********************** */ @@ -1000,24 +1000,24 @@ void WM_event_timer_sleep(wmWindowManager *wm, wmWindow *UNUSED(win), wmTimer *t { wmTimer *wt; - for (wt= wm->timers.first; wt; wt= wt->next) - if (wt==timer) + for (wt = wm->timers.first; wt; wt = wt->next) + if (wt == timer) break; if (wt) - wt->sleep= dosleep; + wt->sleep = dosleep; } wmTimer *WM_event_add_timer(wmWindowManager *wm, wmWindow *win, int event_type, double timestep) { - wmTimer *wt= MEM_callocN(sizeof(wmTimer), "window timer"); + wmTimer *wt = MEM_callocN(sizeof(wmTimer), "window timer"); - wt->event_type= event_type; - wt->ltime= PIL_check_seconds_timer(); - wt->ntime= wt->ltime + timestep; - wt->stime= wt->ltime; - wt->timestep= timestep; - wt->win= win; + wt->event_type = event_type; + wt->ltime = PIL_check_seconds_timer(); + wt->ntime = wt->ltime + timestep; + wt->stime = wt->ltime; + wt->timestep = timestep; + wt->win = win; BLI_addtail(&wm->timers, wt); @@ -1029,12 +1029,12 @@ void WM_event_remove_timer(wmWindowManager *wm, wmWindow *UNUSED(win), wmTimer * wmTimer *wt; /* extra security check */ - for (wt= wm->timers.first; wt; wt= wt->next) - if (wt==timer) + for (wt = wm->timers.first; wt; wt = wt->next) + if (wt == timer) break; if (wt) { if (wm->reports.reporttimer == wt) - wm->reports.reporttimer= NULL; + wm->reports.reporttimer = NULL; BLI_remlink(&wm->timers, wt); if (wt->customdata) @@ -1052,18 +1052,18 @@ char *WM_clipboard_text_get(int selection) if (G.background) return NULL; - buf= (char*)GHOST_getClipboard(selection); + buf = (char *)GHOST_getClipboard(selection); if (!buf) return NULL; /* always convert from \r\n to \n */ - newbuf= MEM_callocN(strlen(buf)+1, "WM_clipboard_text_get"); + newbuf = MEM_callocN(strlen(buf) + 1, "WM_clipboard_text_get"); - for (p= buf, p2= newbuf; *p; p++) { + for (p = buf, p2 = newbuf; *p; p++) { if (*p != '\r') - *(p2++)= *p; + *(p2++) = *p; } - *p2= '\0'; + *p2 = '\0'; free(buf); /* ghost uses regular malloc */ @@ -1076,29 +1076,29 @@ void WM_clipboard_text_set(char *buf, int selection) #ifdef _WIN32 /* do conversion from \n to \r\n on Windows */ char *p, *p2, *newbuf; - int newlen= 0; + int newlen = 0; - for (p= buf; *p; p++) { + for (p = buf; *p; p++) { if (*p == '\n') newlen += 2; else newlen++; } - newbuf= MEM_callocN(newlen+1, "WM_clipboard_text_set"); + newbuf = MEM_callocN(newlen + 1, "WM_clipboard_text_set"); - for (p= buf, p2= newbuf; *p; p++, p2++) { + for (p = buf, p2 = newbuf; *p; p++, p2++) { if (*p == '\n') { - *(p2++)= '\r'; *p2= '\n'; + *(p2++) = '\r'; *p2 = '\n'; } - else *p2= *p; + else *p2 = *p; } - *p2= '\0'; + *p2 = '\0'; - GHOST_putClipboard((GHOST_TInt8*)newbuf, selection); + GHOST_putClipboard((GHOST_TInt8 *)newbuf, selection); MEM_freeN(newbuf); #else - GHOST_putClipboard((GHOST_TInt8*)buf, selection); + GHOST_putClipboard((GHOST_TInt8 *)buf, selection); #endif } } @@ -1119,23 +1119,23 @@ void WM_progress_clear(wmWindow *win) void wm_window_get_position(wmWindow *win, int *posx_r, int *posy_r) { - *posx_r= win->posx; - *posy_r= win->posy; + *posx_r = win->posx; + *posy_r = win->posy; } void wm_window_get_size(wmWindow *win, int *width_r, int *height_r) { - *width_r= win->sizex; - *height_r= win->sizey; + *width_r = win->sizex; + *height_r = win->sizey; } /* exceptional case: - splash is called before events are processed * this means we don't actually know the window size so get this from GHOST */ void wm_window_get_size_ghost(wmWindow *win, int *width_r, int *height_r) { - GHOST_RectangleHandle bounds= GHOST_GetClientBounds(win->ghostwin); - *width_r= GHOST_GetWidthRectangle(bounds); - *height_r= GHOST_GetHeightRectangle(bounds); + GHOST_RectangleHandle bounds = GHOST_GetClientBounds(win->ghostwin); + *width_r = GHOST_GetWidthRectangle(bounds); + *height_r = GHOST_GetHeightRectangle(bounds); GHOST_DisposeRectangle(bounds); } @@ -1171,7 +1171,7 @@ void wm_get_cursor_position(wmWindow *win, int *x, int *y) { GHOST_GetCursorPosition(g_system, x, y); GHOST_ScreenToClient(win->ghostwin, *x, *y, x, y); - *y = (win->sizey-1) - *y; + *y = (win->sizey - 1) - *y; } /* ******************* exported api ***************** */ @@ -1204,15 +1204,15 @@ void WM_setinitialstate_normal(void) void WM_cursor_warp(wmWindow *win, int x, int y) { if (win && win->ghostwin) { - int oldx=x, oldy=y; + int oldx = x, oldy = y; - y= win->sizey -y - 1; + y = win->sizey - y - 1; GHOST_ClientToScreen(win->ghostwin, x, y, &x, &y); GHOST_SetCursorPosition(g_system, x, y); - win->eventstate->prevx= oldx; - win->eventstate->prevy= oldy; + win->eventstate->prevx = oldx; + win->eventstate->prevy = oldy; } } -- cgit v1.2.3 From f83a93e454e4a92d9619bc5bd16d73525e41ce46 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 27 Mar 2012 01:28:25 +0000 Subject: bmesh todo, unlikly but possible - entering editmode with faces and no polys. rather then printing a warning and failing - convert them to polys. --- source/blender/blenkernel/BKE_mesh.h | 2 +- source/blender/blenkernel/intern/mesh.c | 2 +- source/blender/blenloader/intern/readfile.c | 2 +- source/blender/collada/MeshImporter.cpp | 2 +- source/blender/editors/mesh/editmesh_utils.c | 12 ++++-------- source/blender/editors/mesh/mesh_data.c | 2 +- 6 files changed, 9 insertions(+), 13 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h index 4bccbf9e61e..2d0719a78fa 100644 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@ -145,7 +145,7 @@ void free_dverts(struct MDeformVert *dvert, int totvert); void copy_dverts(struct MDeformVert *dst, struct MDeformVert *src, int totvert); /* __NLA */ void mesh_delete_material_index(struct Mesh *me, short index); void mesh_set_smooth_flag(struct Object *meshOb, int enableSmooth); -void convert_mfaces_to_mpolys(struct Mesh *mesh); +void BKE_mesh_convert_mfaces_to_mpolys(struct Mesh *mesh); void mesh_calc_normals_tessface(struct MVert *mverts, int numVerts,struct MFace *mfaces, int numFaces, float (*faceNors_r)[3]); /* used for unit testing; compares two meshes, checking only diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index ed3cf697a9e..3c4a469a1a6 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -2003,7 +2003,7 @@ static void bm_corners_to_loops(Mesh *me, int findex, int loopstart, int numTex, } } -void convert_mfaces_to_mpolys(Mesh *mesh) +void BKE_mesh_convert_mfaces_to_mpolys(Mesh *mesh) { MFace *mf; MLoop *ml; diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index eb7711de9b1..6b70745d9b2 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -3708,7 +3708,7 @@ static void lib_link_mesh(FileData *fd, Main *main) /*check if we need to convert mfaces to mpolys*/ if (me->totface && !me->totpoly) { - convert_mfaces_to_mpolys(me); + BKE_mesh_convert_mfaces_to_mpolys(me); } /* diff --git a/source/blender/collada/MeshImporter.cpp b/source/blender/collada/MeshImporter.cpp index e50005634ba..dc0892f6bed 100644 --- a/source/blender/collada/MeshImporter.cpp +++ b/source/blender/collada/MeshImporter.cpp @@ -965,6 +965,6 @@ bool MeshImporter::write_geometry(const COLLADAFW::Geometry* geom) mesh_calc_normals_mapping(me->mvert, me->totvert, me->mloop, me->mpoly, me->totloop, me->totpoly, NULL, NULL, 0, NULL, NULL); - convert_mfaces_to_mpolys(me); + BKE_mesh_convert_mfaces_to_mpolys(me); return true; } diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index 1c889a6169e..5d2bb359d3c 100644 --- a/source/blender/editors/mesh/editmesh_utils.c +++ b/source/blender/editors/mesh/editmesh_utils.c @@ -265,16 +265,12 @@ void EDBM_MakeEditBMesh(ToolSettings *ts, Scene *UNUSED(scene), Object *ob) Mesh *me = ob->data; BMesh *bm; - if (!me->mpoly && me->totface) { - fprintf(stderr, "%s: bmesh conversion issue! may lose lots of geometry! (bmesh internal error)\n", __func__); - - /* BMESH_TODO need to write smarter code here */ - bm = BKE_mesh_to_bmesh(me, ob); - } - else { - bm = BKE_mesh_to_bmesh(me, ob); + if (UNLIKELY(!me->mpoly && me->totface)) { + BKE_mesh_convert_mfaces_to_mpolys(me); } + bm = BKE_mesh_to_bmesh(me, ob); + if (me->edit_btmesh) { /* this happens when switching shape keys */ BMEdit_Free(me->edit_btmesh); diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c index 0f2ad28b400..fe3fe698626 100644 --- a/source/blender/editors/mesh/mesh_data.c +++ b/source/blender/editors/mesh/mesh_data.c @@ -811,7 +811,7 @@ void ED_mesh_update(Mesh *mesh, bContext *C, int calc_edges, int calc_tessface) int tessface_input = FALSE; if (mesh->totface > 0 && mesh->totpoly == 0) { - convert_mfaces_to_mpolys(mesh); + BKE_mesh_convert_mfaces_to_mpolys(mesh); /* would only be converting back again, don't bother */ tessface_input = TRUE; -- cgit v1.2.3 From ea270a690387c8c65ca31610a3c8ce5f06328eac Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 27 Mar 2012 01:52:49 +0000 Subject: fix error in last commit --- source/blender/blenkernel/intern/pointcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 3da70fd12d0..f24e2deb650 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -74,7 +74,7 @@ #include "BIK_api.h" /* both in intern */ -#ifdef WITH_MOD_SMOKE +#ifdef WITH_SMOKE #include "smoke_API.h" #endif -- cgit v1.2.3 From 09f29c0b70357684b270745167cc30a3134b8d98 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 27 Mar 2012 04:46:52 +0000 Subject: style/name cleanup: have EDBM_* functions match our style guide and also match BM_ function naming conventions --- source/blender/blenkernel/BKE_customdata.h | 6 +- source/blender/blenkernel/BKE_tessmesh.h | 2 +- source/blender/blenkernel/intern/editderivedmesh.c | 4 +- source/blender/blenkernel/intern/mesh.c | 2 +- source/blender/blenkernel/intern/pointcache.c | 8 +- source/blender/bmesh/intern/bmesh_operator_api.h | 2 +- source/blender/editors/include/ED_mesh.h | 202 +++++++++------------ source/blender/editors/mesh/editface.c | 8 +- source/blender/editors/mesh/editmesh_add.c | 20 +- source/blender/editors/mesh/editmesh_knife.c | 2 +- source/blender/editors/mesh/editmesh_loopcut.c | 8 +- source/blender/editors/mesh/editmesh_select.c | 94 +++++----- source/blender/editors/mesh/editmesh_tools.c | 184 +++++++++---------- source/blender/editors/mesh/editmesh_utils.c | 134 ++++++++------ source/blender/editors/mesh/mesh_data.c | 6 +- source/blender/editors/mesh/mesh_intern.h | 40 ++-- source/blender/editors/mesh/mesh_navmesh.c | 12 +- source/blender/editors/mesh/meshtools.c | 6 +- source/blender/editors/object/object_edit.c | 6 +- source/blender/editors/object/object_hook.c | 4 +- source/blender/editors/object/object_relations.c | 4 +- source/blender/editors/object/object_transform.c | 2 +- source/blender/editors/object/object_vgroup.c | 10 +- source/blender/editors/sculpt_paint/paint_image.c | 2 +- source/blender/editors/sculpt_paint/sculpt_uv.c | 20 +- source/blender/editors/space_image/space_image.c | 8 +- source/blender/editors/space_view3d/drawmesh.c | 4 +- source/blender/editors/space_view3d/drawobject.c | 70 +++---- .../blender/editors/space_view3d/view3d_buttons.c | 4 +- .../blender/editors/space_view3d/view3d_header.c | 4 +- .../blender/editors/space_view3d/view3d_select.c | 74 ++++---- source/blender/editors/space_view3d/view3d_snap.c | 8 +- .../editors/transform/transform_conversions.c | 6 +- .../blender/editors/transform/transform_generics.c | 4 +- .../editors/transform/transform_manipulator.c | 2 +- .../editors/transform/transform_orientations.c | 2 +- source/blender/editors/transform/transform_snap.c | 18 +- source/blender/editors/util/ed_util.c | 2 +- source/blender/editors/uvedit/uvedit_draw.c | 2 +- source/blender/editors/uvedit/uvedit_intern.h | 2 +- source/blender/editors/uvedit/uvedit_ops.c | 60 +++--- .../blender/editors/uvedit/uvedit_smart_stitch.c | 26 +-- source/blender/editors/uvedit/uvedit_unwrap_ops.c | 8 +- source/blender/makesrna/intern/rna_object.c | 4 +- 44 files changed, 548 insertions(+), 548 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/BKE_customdata.h b/source/blender/blenkernel/BKE_customdata.h index a22182a52f5..9797aa1201f 100644 --- a/source/blender/blenkernel/BKE_customdata.h +++ b/source/blender/blenkernel/BKE_customdata.h @@ -125,7 +125,7 @@ void CustomData_free_temporary(struct CustomData *data, int totelem); * backed by an external data array. the different allocation types are * defined above. returns the data of the layer. * - * in editmode, use EM_add_data_layer instead of this function + * in editmode, use EDBM_data_layer_add instead of this function */ void *CustomData_add_layer(struct CustomData *data, int type, int alloctype, void *layer, int totelem); @@ -136,14 +136,14 @@ void *CustomData_add_layer_named(struct CustomData *data, int type, int alloctyp /* frees the active or first data layer with the give type. * returns 1 on succes, 0 if no layer with the given type is found * - * in editmode, use EM_free_data_layer instead of this function + * in editmode, use EDBM_data_layer_free instead of this function */ int CustomData_free_layer(struct CustomData *data, int type, int totelem, int index); /* frees the layer index with the give type. * returns 1 on succes, 0 if no layer with the given type is found * - * in editmode, use EM_free_data_layer instead of this function + * in editmode, use EDBM_data_layer_free instead of this function */ int CustomData_free_layer_active(struct CustomData *data, int type, int totelem); diff --git a/source/blender/blenkernel/BKE_tessmesh.h b/source/blender/blenkernel/BKE_tessmesh.h index 407b96320a4..d9d2c21e2b3 100644 --- a/source/blender/blenkernel/BKE_tessmesh.h +++ b/source/blender/blenkernel/BKE_tessmesh.h @@ -61,7 +61,7 @@ typedef struct BMEditMesh { int lastDataMask; /* index tables, to map indices to elements via - * EDBM_init_index_arrays and associated functions. don't + * EDBM_index_arrays_init and associated functions. don't * touch this or read it directly.*/ struct BMVert **vert_index; struct BMEdge **edge_index; diff --git a/source/blender/blenkernel/intern/editderivedmesh.c b/source/blender/blenkernel/intern/editderivedmesh.c index 693a155c23d..7cc37da4b1d 100644 --- a/source/blender/blenkernel/intern/editderivedmesh.c +++ b/source/blender/blenkernel/intern/editderivedmesh.c @@ -1314,7 +1314,7 @@ static void emDM_getVert(DerivedMesh *dm, int index, MVert *vert_r) return; } - // ev = EDBM_get_vert_for_index(bmdm->tc, index); + // ev = EDBM_vert_at_index(bmdm->tc, index); ev = BM_vert_at_index(bmdm->tc->bm, index); /* warning, does list loop, _not_ ideal */ bmvert_to_mvert(bmdm->tc->bm, ev, vert_r); @@ -1331,7 +1331,7 @@ static void emDM_getEdge(DerivedMesh *dm, int index, MEdge *edge_r) return; } - // e = EDBM_get_edge_for_index(bmdm->tc, index); + // e = EDBM_edge_at_index(bmdm->tc, index); e = BM_edge_at_index(bmdm->tc->bm, index); /* warning, does list loop, _not_ ideal */ if (CustomData_has_layer(&bm->edata, CD_BWEIGHT)) { diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index 3c4a469a1a6..b14805a5e46 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -2097,7 +2097,7 @@ float (*mesh_getVertexCos(Mesh *me, int *numVerts_r))[3] } -/* ngon version wip, based on EDBM_make_uv_vert_map */ +/* ngon version wip, based on EDBM_uv_vert_map_create */ /* this replaces the non bmesh function (in trunk) which takes MTFace's, if we ever need it back we could * but for now this replaces it because its unused. */ diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index f24e2deb650..76195c29fb3 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -92,11 +92,11 @@ /* needed for directory lookup */ /* untitled blend's need getpid for a unique name */ #ifndef WIN32 - #include -#include +# include +# include #else -#include - #include "BLI_winstuff.h" +# include +# include "BLI_winstuff.h" #endif #define PTCACHE_DATA_FROM(data, type, from) if (data[type]) { memcpy(data[type], from, ptcache_data_size[type]); } diff --git a/source/blender/bmesh/intern/bmesh_operator_api.h b/source/blender/bmesh/intern/bmesh_operator_api.h index 1b4e119ad92..e840026b540 100644 --- a/source/blender/bmesh/intern/bmesh_operator_api.h +++ b/source/blender/bmesh/intern/bmesh_operator_api.h @@ -234,7 +234,7 @@ int BMO_op_callf(BMesh *bm, const char *fmt, ...); int BMO_op_initf(BMesh *bm, BMOperator *op, const char *fmt, ...); /* va_list version, used to implement the above two functions, - * plus EDBM_CallOpf in bmeshutils.c. */ + * plus EDBM_op_callf in bmeshutils.c. */ int BMO_op_vinitf(BMesh *bm, BMOperator *op, const char *fmt, va_list vlist); /* test whether a named slot exists */ diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index 69376a9bde3..71bce196ddf 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -71,74 +71,52 @@ struct Material; struct Object; struct rcti; -#define EM_FGON_DRAW 1 // face flag -#define EM_FGON 2 // edge and face flag both +#define EM_FGON_DRAW 1 // face flag +#define EM_FGON 2 // edge and face flag both /* editbutflag */ -#define B_CLOCKWISE 1 -#define B_KEEPORIG 2 -#define B_BEAUTY 4 -#define B_SMOOTH 8 -#define B_BEAUTY_SHORT 0x10 -#define B_AUTOFGON 0x20 -#define B_KNIFE 0x80 -#define B_PERCENTSUBD 0x40 +#define B_CLOCKWISE 1 +#define B_KEEPORIG 2 +#define B_BEAUTY 4 +#define B_SMOOTH 8 +#define B_BEAUTY_SHORT 0x10 +#define B_AUTOFGON 0x20 +#define B_KNIFE 0x80 +#define B_PERCENTSUBD 0x40 //#define B_MESH_X_MIRROR 0x100 // deprecated, use mesh -#define B_JOINTRIA_UV 0x200 -#define B_JOINTRIA_VCOL 0X400 -#define B_JOINTRIA_SHARP 0X800 -#define B_JOINTRIA_MAT 0X1000 -#define B_FRACTAL 0x2000 -#define B_SPHERE 0x4000 +#define B_JOINTRIA_UV 0x200 +#define B_JOINTRIA_VCOL 0X400 +#define B_JOINTRIA_SHARP 0X800 +#define B_JOINTRIA_MAT 0X1000 +#define B_FRACTAL 0x2000 +#define B_SPHERE 0x4000 intptr_t mesh_octree_table(struct Object *ob, struct BMEditMesh *em, float *co, char mode); int mesh_mirrtopo_table(struct Object *ob, char mode); /* bmeshutils.c */ -/** - * [note: I've decided to use ideasman's code for non-editmode stuff, but since - * it has a big "not for editmode!" disclaimer, I'm going to keep what I have here - * - joeedh] - * - * x-mirror editing api. usage: - * - * EDBM_CacheMirrorVerts(em); - * ... - * ... - * BM_ITER(v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) { - * mirrorv = EDBM_GetMirrorVert(em, v); - * } - * ... - * ... - * EDBM_EndMirrorCache(em); - * - * \note why do we only allow x axis mirror editing? - */ -void EDBM_CacheMirrorVerts(struct BMEditMesh *em, const short use_select); /* note, replaces EM_cache_x_mirror_vert in trunk */ /* retrieves mirrored cache vert, or NULL if there isn't one. * note: calling this without ensuring the mirror cache state * is bad.*/ -struct BMVert *EDBM_GetMirrorVert(struct BMEditMesh *em, struct BMVert *v); -void EDBM_ClearMirrorVert(struct BMEditMesh *em, struct BMVert *v); -void EDBM_EndMirrorCache(struct BMEditMesh *em); -void EDBM_ApplyMirrorCache(struct BMEditMesh *em, const int sel_from, const int sel_to); +void EDBM_verts_mirror_cache_begin(struct BMEditMesh *em, const short use_select); /* note, replaces EM_cache_x_mirror_vert in trunk */ +void EDBM_verts_mirror_apply(struct BMEditMesh *em, const int sel_from, const int sel_to); +struct BMVert *EDBM_verts_mirror_get(struct BMEditMesh *em, struct BMVert *v); +void EDBM_verts_mirror_cache_clear(struct BMEditMesh *em, struct BMVert *v); +void EDBM_verts_mirror_cache_end(struct BMEditMesh *em); -void EDBM_RecalcNormals(struct BMEditMesh *em); +void EDBM_mesh_normals_update(struct BMEditMesh *em); -void EDBM_MakeEditBMesh(struct ToolSettings *ts, struct Scene *scene, struct Object *ob); -void EDBM_FreeEditBMesh(struct BMEditMesh *tm); -void EDBM_LoadEditBMesh(struct Scene *scene, struct Object *ob); +void EDBM_mesh_make(struct ToolSettings *ts, struct Scene *scene, struct Object *ob); +void EDBM_mesh_free(struct BMEditMesh *tm); +void EDBM_mesh_load(struct Scene *scene, struct Object *ob); -void EDBM_init_index_arrays(struct BMEditMesh *em, int forvert, int foredge, int forface); -void EDBM_free_index_arrays(struct BMEditMesh *em); -struct BMVert *EDBM_get_vert_for_index(struct BMEditMesh *em, int index); -struct BMEdge *EDBM_get_edge_for_index(struct BMEditMesh *em, int index); -struct BMFace *EDBM_get_face_for_index(struct BMEditMesh *em, int index); - -int EDBM_CallAndSelectOpf(struct BMEditMesh *em, struct wmOperator *op, - const char *selectslot, const char *fmt, ...); +void EDBM_index_arrays_init(struct BMEditMesh *em, int forvert, int foredge, int forface); +void EDBM_index_arrays_free(struct BMEditMesh *em); +struct BMVert *EDBM_vert_at_index(struct BMEditMesh *em, int index); +struct BMEdge *EDBM_edge_at_index(struct BMEditMesh *em, int index); +struct BMFace *EDBM_face_at_index(struct BMEditMesh *em, int index); /* flushes based on the current select mode. if in vertex select mode, * verts select/deselect edges and faces, if in edge select mode, @@ -147,8 +125,6 @@ int EDBM_CallAndSelectOpf(struct BMEditMesh *em, struct wmOperator *op, void EDBM_select_more(struct BMEditMesh *em); void EDBM_select_less(struct BMEditMesh *em); -int EDBM_get_actSelection(struct BMEditMesh *em, struct BMEditSelection *ese); - void EDBM_selectmode_flush_ex(struct BMEditMesh *em, int selectmode); void EDBM_selectmode_flush(struct BMEditMesh *em); @@ -156,45 +132,47 @@ void EDBM_deselect_flush(struct BMEditMesh *em); void EDBM_select_flush(struct BMEditMesh *em); void EDBM_selectmode_set(struct BMEditMesh *em); -void EDBM_convertsel(struct BMEditMesh *em, short oldmode, short selectmode); -void undo_push_mesh(struct bContext *C, const char *name); +void EDBM_selectmode_convert(struct BMEditMesh *em, short oldmode, short selectmode); +void undo_push_mesh(struct bContext *C, const char *name); +int EDBM_editselection_active_get(struct BMEditMesh *em, struct BMEditSelection *ese); void EDBM_editselection_center(struct BMEditMesh *em, float *center, struct BMEditSelection *ese); void EDBM_editselection_plane(struct BMEditMesh *em, float *plane, struct BMEditSelection *ese); void EDBM_editselection_normal(float *normal, struct BMEditSelection *ese); -int EDBM_vertColorCheck(struct BMEditMesh *em); -void EDBM_validate_selections(struct BMEditMesh *em); +int EDBM_vert_color_check(struct BMEditMesh *em); +void EDBM_editselection_validate(struct BMEditMesh *em); -void EDBM_hide_mesh(struct BMEditMesh *em, int swap); -void EDBM_reveal_mesh(struct BMEditMesh *em); +void EDBM_mesh_hide(struct BMEditMesh *em, int swap); +void EDBM_mesh_reveal(struct BMEditMesh *em); void EDBM_update_generic(struct bContext *C, struct BMEditMesh *em, const short do_tessface); -int EDBM_check_backbuf(unsigned int index); -int EDBM_mask_init_backbuf_border(struct ViewContext *vc, int mcords[][2], short tot, short xmin, short ymin, short xmax, short ymax); -void EDBM_free_backbuf(void); -int EDBM_init_backbuf_border(struct ViewContext *vc, short xmin, short ymin, short xmax, short ymax); -int EDBM_init_backbuf_circle(struct ViewContext *vc, short xs, short ys, short rads); +int EDBM_backbuf_check(unsigned int index); +int EDBM_backbuf_border_mask_init(struct ViewContext *vc, int mcords[][2], short tot, + short xmin, short ymin, short xmax, short ymax); +void EDBM_backbuf_free(void); +int EDBM_backbuf_border_init(struct ViewContext *vc, short xmin, short ymin, short xmax, short ymax); +int EDBM_backbuf_circle_init(struct ViewContext *vc, short xs, short ys, short rads); void EDBM_deselect_by_material(struct BMEditMesh *em, const short index, const short select); -int EDBM_select_interior_faces(struct BMEditMesh *em); +struct UvElementMap *EDBM_uv_element_map_create(struct BMEditMesh *em, int selected, int doIslands); +void EDBM_uv_element_map_free(struct UvElementMap *vmap); -struct UvElementMap *EDBM_make_uv_element_map(struct BMEditMesh *em, int selected, int doIslands); -void EDBM_free_uv_element_map(struct UvElementMap *vmap); +int EDBM_mtexpoly_check(struct BMEditMesh *em); +struct MTexPoly *EDBM_mtexpoly_active_get(struct BMEditMesh *em, struct BMFace **r_act_efa, int sloppy); -void EDBM_select_swap(struct BMEditMesh *em); /* exported for UV */ - -int EDBM_texFaceCheck(struct BMEditMesh *em); -struct MTexPoly *EDBM_get_active_mtexpoly(struct BMEditMesh *em, struct BMFace **r_act_efa, int sloppy); +void EDBM_uv_vert_map_free(struct UvVertMap *vmap); +struct UvMapVert *EDBM_uv_vert_map_at_index(struct UvVertMap *vmap, unsigned int v); +struct UvVertMap *EDBM_uv_vert_map_create(struct BMEditMesh *em, int selected, int do_face_idx_array, float *limit); -void EDBM_free_uv_vert_map(struct UvVertMap *vmap); -struct UvMapVert *EDBM_get_uv_map_vert(struct UvVertMap *vmap, unsigned int v); -struct UvVertMap *EDBM_make_uv_vert_map(struct BMEditMesh *em, int selected, int do_face_idx_array, float *limit); -void EM_add_data_layer(struct BMEditMesh *em, struct CustomData *data, int type, const char *name); -void EM_free_data_layer(struct BMEditMesh *em, struct CustomData *data, int type); +void EDBM_data_layer_add(struct BMEditMesh *em, struct CustomData *data, int type, const char *name); +void EDBM_data_layer_free(struct BMEditMesh *em, struct CustomData *data, int type); void EDBM_select_toggle_all(struct BMEditMesh *em); +void EDBM_select_swap(struct BMEditMesh *em); /* exported for UV */ +int EDBM_select_interior_faces(struct BMEditMesh *em); + void EDBM_flag_enable_all(struct BMEditMesh *em, const char hflag); void EDBM_flag_disable_all(struct BMEditMesh *em, const char hflag); void EDBM_select_mirrored(struct Object *obedit, struct BMEditMesh *em, int extend); @@ -203,25 +181,25 @@ void EDBM_automerge(struct Scene *scene, struct Object *ob, int update); /* editmesh_mods.c */ extern unsigned int bm_vertoffs, bm_solidoffs, bm_wireoffs; -int mouse_mesh(struct bContext *C, const int mval[2], short extend); +int mouse_mesh(struct bContext *C, const int mval[2], short extend); -struct BMVert *editbmesh_get_x_mirror_vert(struct Object *ob, struct BMEditMesh *em, struct BMVert *eve, float *co, int index); -int mesh_get_x_mirror_vert(struct Object *ob, int index); -int *mesh_get_x_mirror_faces(struct Object *ob, struct BMEditMesh *em); +struct BMVert *editbmesh_get_x_mirror_vert(struct Object *ob, struct BMEditMesh *em, struct BMVert *eve, float *co, int index); +int mesh_get_x_mirror_vert(struct Object *ob, int index); +int *mesh_get_x_mirror_faces(struct Object *ob, struct BMEditMesh *em); -int join_mesh_exec(struct bContext *C, struct wmOperator *op); -int join_mesh_shapes_exec(struct bContext *C, struct wmOperator *op); +int join_mesh_exec(struct bContext *C, struct wmOperator *op); +int join_mesh_shapes_exec(struct bContext *C, struct wmOperator *op); /* mesh_ops.c */ -void ED_operatortypes_mesh(void); -void ED_operatormacros_mesh(void); -void ED_keymap_mesh(struct wmKeyConfig *keyconf); +void ED_operatortypes_mesh(void); +void ED_operatormacros_mesh(void); +void ED_keymap_mesh(struct wmKeyConfig *keyconf); /* editmesh.c */ -void ED_spacetypes_init(void); -void ED_keymap_mesh(struct wmKeyConfig *keyconf); +void ED_spacetypes_init(void); +void ED_keymap_mesh(struct wmKeyConfig *keyconf); /* bmesh_mods.c */ extern unsigned int bm_vertoffs, bm_solidoffs, bm_wireoffs; @@ -241,7 +219,7 @@ void paintface_hide(struct Object *ob, const int unselected); void paintface_reveal(struct Object *ob); void paintvert_deselect_all_visible(struct Object *ob, int action, short flush_flags); -void paintvert_flush_flags(struct Object *ob); +void paintvert_flush_flags(struct Object *ob); /* object_vgroup.c */ @@ -249,25 +227,25 @@ void paintvert_flush_flags(struct Object *ob); #define WEIGHT_ADD 2 #define WEIGHT_SUBTRACT 3 -struct bDeformGroup *ED_vgroup_add(struct Object *ob); -struct bDeformGroup *ED_vgroup_add_name(struct Object *ob, const char *name); -void ED_vgroup_delete(struct Object *ob, struct bDeformGroup *defgroup); -void ED_vgroup_clear(struct Object *ob); -void ED_vgroup_select_by_name(struct Object *ob, const char *name); -int ED_vgroup_data_create(struct ID *id); -int ED_vgroup_give_array(struct ID *id, struct MDeformVert **dvert_arr, int *dvert_tot); -int ED_vgroup_copy_array(struct Object *ob, struct Object *ob_from); -void ED_vgroup_mirror(struct Object *ob, const short mirror_weights, const short flip_vgroups, const short all_vgroups); +struct bDeformGroup *ED_vgroup_add(struct Object *ob); +struct bDeformGroup *ED_vgroup_add_name(struct Object *ob, const char *name); +void ED_vgroup_delete(struct Object *ob, struct bDeformGroup *defgroup); +void ED_vgroup_clear(struct Object *ob); +void ED_vgroup_select_by_name(struct Object *ob, const char *name); +int ED_vgroup_data_create(struct ID *id); +int ED_vgroup_give_array(struct ID *id, struct MDeformVert **dvert_arr, int *dvert_tot); +int ED_vgroup_copy_array(struct Object *ob, struct Object *ob_from); +void ED_vgroup_mirror(struct Object *ob, const short mirror_weights, const short flip_vgroups, const short all_vgroups); -int ED_vgroup_object_is_edit_mode(struct Object *ob); +int ED_vgroup_object_is_edit_mode(struct Object *ob); -void ED_vgroup_vert_add(struct Object *ob, struct bDeformGroup *dg, int vertnum, float weight, int assignmode); -void ED_vgroup_vert_remove(struct Object *ob, struct bDeformGroup *dg, int vertnum); -float ED_vgroup_vert_weight(struct Object *ob, struct bDeformGroup *dg, int vertnum); +void ED_vgroup_vert_add(struct Object *ob, struct bDeformGroup *dg, int vertnum, float weight, int assignmode); +void ED_vgroup_vert_remove(struct Object *ob, struct bDeformGroup *dg, int vertnum); +float ED_vgroup_vert_weight(struct Object *ob, struct bDeformGroup *dg, int vertnum); -struct BMVert *EDBM_findnearestvert(struct ViewContext *vc, int *dist, short sel, short strict); -struct BMEdge *EDBM_findnearestedge(struct ViewContext *vc, int *dist); -struct BMFace *EDBM_findnearestface(struct ViewContext *vc, int *dist); +struct BMVert *EDBM_vert_find_nearest(struct ViewContext *vc, int *dist, short sel, short strict); +struct BMEdge *EDBM_edge_find_nearest(struct ViewContext *vc, int *dist); +struct BMFace *EDBM_face_find_nearest(struct ViewContext *vc, int *dist); /* mesh_data.c */ // void ED_mesh_geometry_add(struct Mesh *mesh, struct ReportList *reports, int verts, int edges, int faces); @@ -295,7 +273,7 @@ int ED_mesh_color_remove(struct bContext *C, struct Object *ob, struct Mesh *me) int ED_mesh_color_remove_named(struct bContext *C, struct Object *ob, struct Mesh *me, const char *name); void EDBM_selectmode_to_scene(struct bContext *C); -void EDBM_ClearMesh(struct BMEditMesh *em); +void EDBM_mesh_clear(struct BMEditMesh *em); #include "../mesh/editmesh_bvh.h" @@ -303,9 +281,9 @@ void EDBM_ClearMesh(struct BMEditMesh *em); /* mirrtopo */ typedef struct MirrTopoStore_t { intptr_t *index_lookup; - int prev_vert_tot; - int prev_edge_tot; - int prev_ob_mode; + int prev_vert_tot; + int prev_edge_tot; + int prev_ob_mode; } MirrTopoStore_t; int ED_mesh_mirrtopo_recalc_check(struct Mesh *me, const int ob_mode, MirrTopoStore_t *mesh_topo_store); @@ -319,9 +297,9 @@ void ED_mesh_mirrtopo_free(MirrTopoStore_t *mesh_topo_store); #define SUBDIV_SELECT_LOOPCUT 3 /* edge subdivide corner cut types */ -#define SUBDIV_CORNER_PATH 0 -#define SUBDIV_CORNER_INNERVERT 1 -#define SUBDIV_CORNER_FAN 2 +#define SUBDIV_CORNER_PATH 0 +#define SUBDIV_CORNER_INNERVERT 1 +#define SUBDIV_CORNER_FAN 2 #ifdef __cplusplus } diff --git a/source/blender/editors/mesh/editface.c b/source/blender/editors/mesh/editface.c index 3fad6f6a2cb..d2446d1ad0e 100644 --- a/source/blender/editors/mesh/editface.c +++ b/source/blender/editors/mesh/editface.c @@ -879,7 +879,7 @@ void ED_mesh_mirrtopo_init(Mesh *me, const int ob_mode, MirrTopoStore_t *mesh_to if (em) { if (skip_em_vert_array_init == FALSE) { - EDBM_init_index_arrays(em, 1, 0, 0); + EDBM_index_arrays_init(em, 1, 0, 0); } } @@ -904,8 +904,8 @@ void ED_mesh_mirrtopo_init(Mesh *me, const int ob_mode, MirrTopoStore_t *mesh_to if ((a == totvert) || (topo_pairs[a - 1].hash != topo_pairs[a].hash)) { if (a - last == 2) { if (em) { - index_lookup[topo_pairs[a - 1].v_index] = (intptr_t)EDBM_get_vert_for_index(em, topo_pairs[a - 2].v_index); - index_lookup[topo_pairs[a - 2].v_index] = (intptr_t)EDBM_get_vert_for_index(em, topo_pairs[a - 1].v_index); + index_lookup[topo_pairs[a - 1].v_index] = (intptr_t)EDBM_vert_at_index(em, topo_pairs[a - 2].v_index); + index_lookup[topo_pairs[a - 2].v_index] = (intptr_t)EDBM_vert_at_index(em, topo_pairs[a - 1].v_index); } else { index_lookup[topo_pairs[a - 1].v_index] = topo_pairs[a - 2].v_index; @@ -917,7 +917,7 @@ void ED_mesh_mirrtopo_init(Mesh *me, const int ob_mode, MirrTopoStore_t *mesh_to } if (em) { if (skip_em_vert_array_init == FALSE) { - EDBM_free_index_arrays(em); + EDBM_index_arrays_free(em); } } diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c index 0d40e8585c3..a464e40217a 100644 --- a/source/blender/editors/mesh/editmesh_add.c +++ b/source/blender/editors/mesh/editmesh_add.c @@ -51,6 +51,8 @@ #include "ED_screen.h" #include "ED_object.h" +#include "mesh_intern.h" + /* uses context to figure out transform for primitive */ /* returns standard diameter */ static float new_primitive_matrix(bContext *C, float *loc, float *rot, float primmat[][4]) @@ -137,7 +139,7 @@ static int add_primitive_plane_exec(bContext *C, wmOperator *op) me = obedit->data; em = me->edit_btmesh; - if (!EDBM_CallAndSelectOpf(em, op, "vertout", + if (!EDBM_op_call_and_selectf(em, op, "vertout", "create_grid xsegments=%i ysegments=%i size=%f mat=%m4", 1, 1, dia, mat)) { return OPERATOR_CANCELLED; @@ -183,7 +185,7 @@ static int add_primitive_cube_exec(bContext *C, wmOperator *op) me = obedit->data; em = me->edit_btmesh; - if (!EDBM_CallAndSelectOpf(em, op, "vertout", "create_cube mat=%m4 size=%f", mat, 2.0f)) { + if (!EDBM_op_call_and_selectf(em, op, "vertout", "create_cube mat=%m4 size=%f", mat, 2.0f)) { return OPERATOR_CANCELLED; } @@ -237,7 +239,7 @@ static int add_primitive_circle_exec(bContext *C, wmOperator *op) me = obedit->data; em = me->edit_btmesh; - if (!EDBM_CallAndSelectOpf(em, op, "vertout", + if (!EDBM_op_call_and_selectf(em, op, "vertout", "create_circle segments=%i diameter=%f cap_ends=%b cap_tris=%b mat=%m4", RNA_int_get(op->ptr, "vertices"), RNA_float_get(op->ptr, "radius"), cap_end, cap_tri, mat)) @@ -296,7 +298,7 @@ static int add_primitive_cylinder_exec(bContext *C, wmOperator *op) me = obedit->data; em = me->edit_btmesh; - if (!EDBM_CallAndSelectOpf( + if (!EDBM_op_call_and_selectf( em, op, "vertout", "create_cone segments=%i diameter1=%f diameter2=%f cap_ends=%b cap_tris=%b depth=%f mat=%m4", RNA_int_get(op->ptr, "vertices"), @@ -361,7 +363,7 @@ static int add_primitive_cone_exec(bContext *C, wmOperator *op) me = obedit->data; em = me->edit_btmesh; - if (!EDBM_CallAndSelectOpf( + if (!EDBM_op_call_and_selectf( em, op, "vertout", "create_cone segments=%i diameter1=%f diameter2=%f cap_ends=%b cap_tris=%b depth=%f mat=%m4", RNA_int_get(op->ptr, "vertices"), RNA_float_get(op->ptr, "radius1"), @@ -422,7 +424,7 @@ static int add_primitive_grid_exec(bContext *C, wmOperator *op) me = obedit->data; em = me->edit_btmesh; - if (!EDBM_CallAndSelectOpf(em, op, "vertout", + if (!EDBM_op_call_and_selectf(em, op, "vertout", "create_grid xsegments=%i ysegments=%i size=%f mat=%m4", RNA_int_get(op->ptr, "x_subdivisions"), RNA_int_get(op->ptr, "y_subdivisions"), @@ -481,7 +483,7 @@ static int add_primitive_monkey_exec(bContext *C, wmOperator *op) me = obedit->data; em = me->edit_btmesh; - if (!EDBM_CallAndSelectOpf(em, op, "vertout", "create_monkey mat=%m4", mat)) { + if (!EDBM_op_call_and_selectf(em, op, "vertout", "create_monkey mat=%m4", mat)) { return OPERATOR_CANCELLED; } @@ -524,7 +526,7 @@ static int add_primitive_uvsphere_exec(bContext *C, wmOperator *op) me = obedit->data; em = me->edit_btmesh; - if (!EDBM_CallAndSelectOpf(em, op, "vertout", + if (!EDBM_op_call_and_selectf(em, op, "vertout", "create_uvsphere segments=%i revolutions=%i diameter=%f mat=%m4", RNA_int_get(op->ptr, "segments"), RNA_int_get(op->ptr, "ring_count"), RNA_float_get(op->ptr, "size"), mat)) @@ -580,7 +582,7 @@ static int add_primitive_icosphere_exec(bContext *C, wmOperator *op) me = obedit->data; em = me->edit_btmesh; - if (!EDBM_CallAndSelectOpf( + if (!EDBM_op_call_and_selectf( em, op, "vertout", "create_icosphere subdivisions=%i diameter=%f mat=%m4", RNA_int_get(op->ptr, "subdivisions"), diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index d1dc873aa08..0ef6e2b81a8 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -1269,7 +1269,7 @@ static BMFace *knife_find_closest_face(knifetool_opdata *kcd, float co[3], float if (!f) { /* try to use backbuffer selection method if ray casting failed */ - f = EDBM_findnearestface(&kcd->vc, &dist); + f = EDBM_face_find_nearest(&kcd->vc, &dist); /* cheat for now; just put in the origin instead * of a true coordinate on the face. diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c index eb28359c333..b151978c1f1 100644 --- a/source/blender/editors/mesh/editmesh_loopcut.c +++ b/source/blender/editors/mesh/editmesh_loopcut.c @@ -334,9 +334,9 @@ static void ringsel_finish(bContext *C, wmOperator *op) /* sets as active, useful for other tools */ if (em->selectmode & SCE_SELECT_VERTEX) - EDBM_store_selection(em, lcd->eed->v1); /* low priority TODO, get vertrex close to mouse */ + EDBM_editselection_store(em, &lcd->eed->v1->head); /* low priority TODO, get vertrex close to mouse */ if (em->selectmode & SCE_SELECT_EDGE) - EDBM_store_selection(em, lcd->eed); + EDBM_editselection_store(em, &lcd->eed->head); EDBM_selectmode_flush(lcd->em); WM_event_add_notifier(C, NC_GEOM | ND_SELECT, lcd->ob->data); @@ -418,7 +418,7 @@ static int ringcut_invoke(bContext *C, wmOperator *op, wmEvent *evt) lcd->vc.mval[0] = evt->mval[0]; lcd->vc.mval[1] = evt->mval[1]; - edge = EDBM_findnearestedge(&lcd->vc, &dist); + edge = EDBM_edge_find_nearest(&lcd->vc, &dist); if (edge != lcd->eed) { lcd->eed = edge; ringsel_find_edge(lcd, 1); @@ -502,7 +502,7 @@ static int loopcut_modal(bContext *C, wmOperator *op, wmEvent *event) lcd->vc.mval[0] = event->mval[0]; lcd->vc.mval[1] = event->mval[1]; - edge = EDBM_findnearestedge(&lcd->vc, &dist); + edge = EDBM_edge_find_nearest(&lcd->vc, &dist); if (edge != lcd->eed) { lcd->eed = edge; diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index deca9228cdf..af1beba7841 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -83,7 +83,7 @@ void EDBM_select_mirrored(Object *UNUSED(obedit), BMEditMesh *em, int extend) } } - EDBM_CacheMirrorVerts(em, TRUE); + EDBM_verts_mirror_cache_begin(em, TRUE); if (!extend) EDBM_flag_disable_all(em, BM_ELEM_SELECT); @@ -92,13 +92,13 @@ void EDBM_select_mirrored(Object *UNUSED(obedit), BMEditMesh *em, int extend) if (!BM_elem_flag_test(v1, BM_ELEM_TAG) || BM_elem_flag_test(v1, BM_ELEM_HIDDEN)) continue; - v2 = EDBM_GetMirrorVert(em, v1); + v2 = EDBM_verts_mirror_get(em, v1); if (v2 && !BM_elem_flag_test(v2, BM_ELEM_HIDDEN)) { BM_elem_select_set(em->bm, v2, TRUE); } } - EDBM_EndMirrorCache(em); + EDBM_verts_mirror_cache_end(em); } void EDBM_automerge(Scene *scene, Object *obedit, int update) @@ -175,7 +175,7 @@ static void draw_triangulated(int mcords[][2], short tot) /* reads rect, and builds selection array for quick lookup */ /* returns if all is OK */ -int EDBM_init_backbuf_border(ViewContext *vc, short xmin, short ymin, short xmax, short ymax) +int EDBM_backbuf_border_init(ViewContext *vc, short xmin, short ymin, short xmax, short ymax) { struct ImBuf *buf; unsigned int *dr; @@ -204,7 +204,7 @@ int EDBM_init_backbuf_border(ViewContext *vc, short xmin, short ymin, short xmax return 1; } -int EDBM_check_backbuf(unsigned int index) +int EDBM_backbuf_check(unsigned int index) { if (selbuf == NULL) return 1; if (index > 0 && index <= bm_vertoffs) @@ -212,7 +212,7 @@ int EDBM_check_backbuf(unsigned int index) return 0; } -void EDBM_free_backbuf(void) +void EDBM_backbuf_free(void) { if (selbuf) MEM_freeN(selbuf); selbuf = NULL; @@ -224,7 +224,7 @@ void EDBM_free_backbuf(void) * - grab again and compare * returns 'OK' */ -int EDBM_mask_init_backbuf_border(ViewContext *vc, int mcords[][2], short tot, short xmin, short ymin, short xmax, short ymax) +int EDBM_backbuf_border_mask_init(ViewContext *vc, int mcords[][2], short tot, short xmin, short ymin, short xmax, short ymax) { unsigned int *dr, *drm; struct ImBuf *buf, *bufmask; @@ -285,7 +285,7 @@ int EDBM_mask_init_backbuf_border(ViewContext *vc, int mcords[][2], short tot, s } /* circle shaped sample area */ -int EDBM_init_backbuf_circle(ViewContext *vc, short xs, short ys, short rads) +int EDBM_backbuf_circle_init(ViewContext *vc, short xs, short ys, short rads) { struct ImBuf *buf; unsigned int *dr; @@ -376,7 +376,7 @@ static unsigned int findnearestvert__backbufIndextest(void *handle, unsigned int * if 0, unselected vertice are given the bias * strict: if 1, the vertice corresponding to the sel parameter are ignored and not just biased */ -BMVert *EDBM_findnearestvert(ViewContext *vc, int *dist, short sel, short strict) +BMVert *EDBM_vert_find_nearest(ViewContext *vc, int *dist, short sel, short strict) { if (vc->v3d->drawtype > OB_WIRE && (vc->v3d->flag & V3D_ZBUF_SELECT)) { int distance; @@ -494,7 +494,7 @@ static void findnearestedge__doClosest(void *userData, BMEdge *eed, int x0, int } } } -BMEdge *EDBM_findnearestedge(ViewContext *vc, int *dist) +BMEdge *EDBM_edge_find_nearest(ViewContext *vc, int *dist) { if (vc->v3d->drawtype > OB_WIRE && (vc->v3d->flag & V3D_ZBUF_SELECT)) { @@ -567,7 +567,7 @@ static void findnearestface__doClosest(void *userData, BMFace *efa, int x, int y } } -BMFace *EDBM_findnearestface(ViewContext *vc, int *dist) +BMFace *EDBM_face_find_nearest(ViewContext *vc, int *dist) { if (vc->v3d->drawtype > OB_WIRE && (vc->v3d->flag & V3D_ZBUF_SELECT)) { @@ -650,13 +650,13 @@ static int unified_findnearest(ViewContext *vc, BMVert **r_eve, BMEdge **r_eed, view3d_validate_backbuf(vc); if (em->selectmode & SCE_SELECT_VERTEX) - *r_eve = EDBM_findnearestvert(vc, &dist, BM_ELEM_SELECT, 0); + *r_eve = EDBM_vert_find_nearest(vc, &dist, BM_ELEM_SELECT, 0); if (em->selectmode & SCE_SELECT_FACE) - *r_efa = EDBM_findnearestface(vc, &dist); + *r_efa = EDBM_face_find_nearest(vc, &dist); dist -= 20; /* since edges select lines, we give dots advantage of 20 pix */ if (em->selectmode & SCE_SELECT_EDGE) - *r_eed = EDBM_findnearestedge(vc, &dist); + *r_eed = EDBM_edge_find_nearest(vc, &dist); /* return only one of 3 pointers, for frontbuffer redraws */ if (*r_eed) { @@ -707,7 +707,7 @@ static int similar_face_select_exec(bContext *C, wmOperator *op) float thresh = RNA_float_get(op->ptr, "threshold"); /* initialize the bmop using EDBM api, which does various ui error reporting and other stuff */ - EDBM_InitOpf(em, &bmop, op, "similarfaces faces=%hf type=%i thresh=%f", BM_ELEM_SELECT, type, thresh); + EDBM_op_init(em, &bmop, op, "similarfaces faces=%hf type=%i thresh=%f", BM_ELEM_SELECT, type, thresh); /* execute the operator */ BMO_op_exec(em->bm, &bmop); @@ -719,7 +719,7 @@ static int similar_face_select_exec(bContext *C, wmOperator *op) BMO_slot_buffer_hflag_enable(em->bm, &bmop, "faceout", BM_ALL, BM_ELEM_SELECT, TRUE); /* finish the operator */ - if (!EDBM_FinishOp(em, &bmop, op, TRUE)) { + if (!EDBM_op_finish(em, &bmop, op, TRUE)) { return OPERATOR_CANCELLED; } @@ -745,7 +745,7 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op) float thresh = RNA_float_get(op->ptr, "threshold"); /* initialize the bmop using EDBM api, which does various ui error reporting and other stuff */ - EDBM_InitOpf(em, &bmop, op, "similaredges edges=%he type=%i thresh=%f", BM_ELEM_SELECT, type, thresh); + EDBM_op_init(em, &bmop, op, "similaredges edges=%he type=%i thresh=%f", BM_ELEM_SELECT, type, thresh); /* execute the operator */ BMO_op_exec(em->bm, &bmop); @@ -758,7 +758,7 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op) EDBM_selectmode_flush(em); /* finish the operator */ - if (!EDBM_FinishOp(em, &bmop, op, TRUE)) { + if (!EDBM_op_finish(em, &bmop, op, TRUE)) { return OPERATOR_CANCELLED; } @@ -786,7 +786,7 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op) float thresh = RNA_float_get(op->ptr, "threshold"); /* initialize the bmop using EDBM api, which does various ui error reporting and other stuff */ - EDBM_InitOpf(em, &bmop, op, "similarverts verts=%hv type=%i thresh=%f", BM_ELEM_SELECT, type, thresh); + EDBM_op_init(em, &bmop, op, "similarverts verts=%hv type=%i thresh=%f", BM_ELEM_SELECT, type, thresh); /* execute the operator */ BMO_op_exec(em->bm, &bmop); @@ -798,7 +798,7 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op) BMO_slot_buffer_hflag_enable(em->bm, &bmop, "vertout", BM_ALL, BM_ELEM_SELECT, TRUE); /* finish the operator */ - if (!EDBM_FinishOp(em, &bmop, op, TRUE)) { + if (!EDBM_op_finish(em, &bmop, op, TRUE)) { return OPERATOR_CANCELLED; } @@ -1008,7 +1008,7 @@ static void mouse_mesh_loop(bContext *C, int mval[2], short extend, short ring) /* no afterqueue (yet), so we check it now, otherwise the bm_xxxofs indices are bad */ view3d_validate_backbuf(&vc); - eed = EDBM_findnearestedge(&vc, &dist); + eed = EDBM_edge_find_nearest(&vc, &dist); if (eed) { if (extend == 0) { EDBM_flag_disable_all(em, BM_ELEM_SELECT); @@ -1047,10 +1047,10 @@ static void mouse_mesh_loop(bContext *C, int mval[2], short extend, short ring) /* TODO: would be nice if the edge vertex chosen here * was the one closer to the selection pointer, instead * of arbitrarily selecting the first one */ - EDBM_store_selection(em, eed->v1); + EDBM_editselection_store(em, &eed->v1->head); } else if (em->selectmode & SCE_SELECT_EDGE) { - EDBM_store_selection(em, eed); + EDBM_editselection_store(em, &eed->head); } /* TODO: would be nice if the nearest face that * belongs to the selected edge could be set to @@ -1136,13 +1136,13 @@ static float edgetag_cut_cost(BMEditMesh *UNUSED(em), BMEdge *e1, BMEdge *e2, BM static void edgetag_add_adjacent(BMEditMesh *em, SmallHash *visithash, Heap *heap, int mednum, int vertnum, int *nedges, int *edges, int *prevedge, float *cost) { - BMEdge *e1 = EDBM_get_edge_for_index(em, mednum); - BMVert *v = EDBM_get_vert_for_index(em, vertnum); + BMEdge *e1 = EDBM_edge_at_index(em, mednum); + BMVert *v = EDBM_vert_at_index(em, vertnum); int startadj, endadj = nedges[vertnum + 1]; for (startadj = nedges[vertnum]; startadj < endadj; startadj++) { int adjnum = edges[startadj]; - BMEdge *e2 = EDBM_get_edge_for_index(em, adjnum); + BMEdge *e2 = EDBM_edge_at_index(em, adjnum); float newcost; float cutcost; @@ -1280,7 +1280,7 @@ static int edgetag_shortest_path(Scene *scene, BMEditMesh *em, BMEdge *source, B for (i = 0; i < totvert; i++) { int start = nedges[i], end = nedges[i + 1], cur; for (cur = start; cur < end; cur++) { - BMEdge *e = EDBM_get_edge_for_index(em, edges[cur]); + BMEdge *e = EDBM_edge_at_index(em, edges[cur]); } } #endif @@ -1289,12 +1289,12 @@ static int edgetag_shortest_path(Scene *scene, BMEditMesh *em, BMEdge *source, B heap = BLI_heap_new(); BLI_heap_insert(heap, 0.0f, SET_INT_IN_POINTER(BM_elem_index_get(source))); cost[BM_elem_index_get(source)] = 0.0f; - EDBM_init_index_arrays(em, 1, 1, 0); + EDBM_index_arrays_init(em, 1, 1, 0); targetnum = BM_elem_index_get(target); while (!BLI_heap_empty(heap)) { mednum = GET_INT_FROM_POINTER(BLI_heap_popmin(heap)); - e = EDBM_get_edge_for_index(em, mednum); + e = EDBM_edge_at_index(em, mednum); if (mednum == targetnum) break; @@ -1315,7 +1315,7 @@ static int edgetag_shortest_path(Scene *scene, BMEditMesh *em, BMEdge *source, B * if it is, the tags will be cleared instead of set. */ mednum = targetnum; do { - e = EDBM_get_edge_for_index(em, mednum); + e = EDBM_edge_at_index(em, mednum); if (!edgetag_context_check(scene, em, e)) { allseams = 0; break; @@ -1326,7 +1326,7 @@ static int edgetag_shortest_path(Scene *scene, BMEditMesh *em, BMEdge *source, B /* Follow path back and source and add or remove tags */ mednum = targetnum; do { - e = EDBM_get_edge_for_index(em, mednum); + e = EDBM_edge_at_index(em, mednum); if (allseams) edgetag_context_set(em, scene, e, 0); else @@ -1335,7 +1335,7 @@ static int edgetag_shortest_path(Scene *scene, BMEditMesh *em, BMEdge *source, B } while (mednum != -1); } - EDBM_free_index_arrays(em); + EDBM_index_arrays_free(em); MEM_freeN(nedges); MEM_freeN(edges); MEM_freeN(prevedge); @@ -1361,7 +1361,7 @@ static void mouse_mesh_shortest_path(bContext *C, int mval[2]) vc.mval[1] = mval[1]; em = vc.em; - e = EDBM_findnearestedge(&vc, &dist); + e = EDBM_edge_find_nearest(&vc, &dist); if (e) { Mesh *me = vc.obedit->data; int path = 0; @@ -1374,7 +1374,7 @@ static void mouse_mesh_shortest_path(bContext *C, int mval[2]) e_act = (BMEdge *)ese->ele; if (e_act != e) { if (edgetag_shortest_path(vc.scene, em, e_act, e)) { - EDBM_remove_selection(em, e_act); + EDBM_editselection_remove(em, &e_act->head); path = 1; } } @@ -1389,9 +1389,9 @@ static void mouse_mesh_shortest_path(bContext *C, int mval[2]) /* even if this is selected it may not be in the selection list */ if (edgetag_context_check(vc.scene, em, e) == 0) - EDBM_remove_selection(em, e); + EDBM_editselection_remove(em, &e->head); else - EDBM_store_selection(em, e); + EDBM_editselection_store(em, &e->head); /* force drawmode for mesh */ switch (CTX_data_tool_settings(C)->edge_mode) { @@ -1467,31 +1467,31 @@ int mouse_mesh(bContext *C, const int mval[2], short extend) BM_active_face_set(vc.em->bm, efa); if (!BM_elem_flag_test(efa, BM_ELEM_SELECT)) { - EDBM_store_selection(vc.em, efa); + EDBM_editselection_store(vc.em, &efa->head); BM_elem_select_set(vc.em->bm, efa, TRUE); } else if (extend) { - EDBM_remove_selection(vc.em, efa); + EDBM_editselection_remove(vc.em, &efa->head); BM_elem_select_set(vc.em->bm, efa, FALSE); } } else if (eed) { if (!BM_elem_flag_test(eed, BM_ELEM_SELECT)) { - EDBM_store_selection(vc.em, eed); + EDBM_editselection_store(vc.em, &eed->head); BM_elem_select_set(vc.em->bm, eed, TRUE); } else if (extend) { - EDBM_remove_selection(vc.em, eed); + EDBM_editselection_remove(vc.em, &eed->head); BM_elem_select_set(vc.em->bm, eed, FALSE); } } else if (eve) { if (!BM_elem_flag_test(eve, BM_ELEM_SELECT)) { - EDBM_store_selection(vc.em, eve); + EDBM_editselection_store(vc.em, &eve->head); BM_elem_select_set(vc.em->bm, eve, TRUE); } else if (extend) { - EDBM_remove_selection(vc.em, eve); + EDBM_editselection_remove(vc.em, &eve->head); BM_elem_select_set(vc.em->bm, eve, FALSE); } } @@ -1513,7 +1513,7 @@ int mouse_mesh(bContext *C, const int mval[2], short extend) return 0; } -static void EDBM_strip_selections(BMEditMesh *em) +static void edbm_strip_selections(BMEditMesh *em) { BMEditSelection *ese, *nextese; @@ -1554,7 +1554,7 @@ void EDBM_selectmode_set(BMEditMesh *em) em->bm->selectmode = em->selectmode; - EDBM_strip_selections(em); /* strip BMEditSelections from em->selected that are not relevant to new mode */ + edbm_strip_selections(em); /* strip BMEditSelections from em->selected that are not relevant to new mode */ if (em->selectmode & SCE_SELECT_VERTEX) { EDBM_select_flush(em); @@ -1588,7 +1588,7 @@ void EDBM_selectmode_set(BMEditMesh *em) } } -void EDBM_convertsel(BMEditMesh *em, short oldmode, short selectmode) +void EDBM_selectmode_convert(BMEditMesh *em, short oldmode, short selectmode) { BMEdge *eed; BMFace *efa; @@ -2127,7 +2127,7 @@ static void deselect_nth_active(BMEditMesh *em, BMVert **r_eve, BMEdge **r_eed, } } -static int EM_deselect_nth(BMEditMesh *em, int nth, int offset) +static int edbm_deselect_nth(BMEditMesh *em, int nth, int offset) { BMVert *v; BMEdge *e; @@ -2160,7 +2160,7 @@ static int edbm_select_nth_exec(bContext *C, wmOperator *op) offset = MIN2(nth, offset); - if (EM_deselect_nth(em, nth, offset) == 0) { + if (edbm_deselect_nth(em, nth, offset) == 0) { BKE_report(op->reports, RPT_ERROR, "Mesh has no active vert/edge/face"); return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 3e809f1241b..ba1f2924ad9 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -183,7 +183,7 @@ static short edbm_extrude_face_indiv(BMEditMesh *em, wmOperator *op, const char BMLoop *l; BMOperator bmop; - EDBM_InitOpf(em, &bmop, op, "extrude_face_indiv faces=%hf", hflag); + EDBM_op_init(em, &bmop, op, "extrude_face_indiv faces=%hf", hflag); /* deselect original verts */ EDBM_flag_disable_all(em, BM_ELEM_SELECT); @@ -199,7 +199,7 @@ static short edbm_extrude_face_indiv(BMEditMesh *em, wmOperator *op, const char } } - if (!EDBM_FinishOp(em, &bmop, op, TRUE)) { + if (!EDBM_op_finish(em, &bmop, op, TRUE)) { return 0; } @@ -211,7 +211,7 @@ static short edbm_extrude_edges_indiv(BMEditMesh *em, wmOperator *op, const char { BMOperator bmop; - EDBM_InitOpf(em, &bmop, op, "extrude_edge_only edges=%he", hflag); + EDBM_op_init(em, &bmop, op, "extrude_edge_only edges=%he", hflag); /* deselect original verts */ EDBM_flag_disable_all(em, BM_ELEM_SELECT); @@ -219,7 +219,7 @@ static short edbm_extrude_edges_indiv(BMEditMesh *em, wmOperator *op, const char BMO_op_exec(em->bm, &bmop); BMO_slot_buffer_hflag_enable(em->bm, &bmop, "geomout", BM_VERT | BM_EDGE, BM_ELEM_SELECT, TRUE); - if (!EDBM_FinishOp(em, &bmop, op, TRUE)) { + if (!EDBM_op_finish(em, &bmop, op, TRUE)) { return 0; } @@ -231,7 +231,7 @@ static short edbm_extrude_verts_indiv(BMEditMesh *em, wmOperator *op, const char { BMOperator bmop; - EDBM_InitOpf(em, &bmop, op, "extrude_vert_indiv verts=%hv", hflag); + EDBM_op_init(em, &bmop, op, "extrude_vert_indiv verts=%hv", hflag); /* deselect original verts */ BMO_slot_buffer_hflag_disable(em->bm, &bmop, "verts", BM_VERT, BM_ELEM_SELECT, TRUE); @@ -239,7 +239,7 @@ static short edbm_extrude_verts_indiv(BMEditMesh *em, wmOperator *op, const char BMO_op_exec(em->bm, &bmop); BMO_slot_buffer_hflag_enable(em->bm, &bmop, "vertout", BM_VERT, BM_ELEM_SELECT, TRUE); - if (!EDBM_FinishOp(em, &bmop, op, TRUE)) { + if (!EDBM_op_finish(em, &bmop, op, TRUE)) { return 0; } @@ -404,7 +404,7 @@ static int edbm_extrude_repeat_exec(bContext *C, wmOperator *op) //translateflag(em, SELECT, dvec); } - EDBM_RecalcNormals(em); + EDBM_mesh_normals_update(em); EDBM_update_generic(C, em, TRUE); @@ -525,7 +525,7 @@ static int edbm_extrude_region_exec(bContext *C, wmOperator *op) /* This normally happens when pushing undo but modal operators * like this one don't push undo data until after modal mode is * done.*/ - EDBM_RecalcNormals(em); + EDBM_mesh_normals_update(em); EDBM_update_generic(C, em, TRUE); @@ -832,7 +832,7 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, wmEvent } if (rot_src) { - EDBM_CallOpf(vc.em, op, "rotate verts=%hv cent=%v mat=%m3", + EDBM_op_callf(vc.em, op, "rotate verts=%hv cent=%v mat=%m3", BM_ELEM_SELECT, cent, mat); /* also project the source, for retopo workflow */ @@ -841,9 +841,9 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, wmEvent } edbm_extrude_edge(vc.obedit, vc.em, BM_ELEM_SELECT, nor); - EDBM_CallOpf(vc.em, op, "rotate verts=%hv cent=%v mat=%m3", + EDBM_op_callf(vc.em, op, "rotate verts=%hv cent=%v mat=%m3", BM_ELEM_SELECT, cent, mat); - EDBM_CallOpf(vc.em, op, "translate verts=%hv vec=%v", + EDBM_op_callf(vc.em, op, "translate verts=%hv vec=%v", BM_ELEM_SELECT, min); } else { @@ -857,14 +857,14 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, wmEvent invert_m4_m4(vc.obedit->imat, vc.obedit->obmat); mul_m4_v3(vc.obedit->imat, min); // back in object space - EDBM_InitOpf(vc.em, &bmop, op, "makevert co=%v", min); + EDBM_op_init(vc.em, &bmop, op, "makevert co=%v", min); BMO_op_exec(vc.em->bm, &bmop); BMO_ITER(v1, &oiter, vc.em->bm, &bmop, "newvertout", BM_VERT) { BM_elem_select_set(vc.em->bm, v1, TRUE); } - if (!EDBM_FinishOp(vc.em, &bmop, op, TRUE)) { + if (!EDBM_op_finish(vc.em, &bmop, op, TRUE)) { return OPERATOR_CANCELLED; } } @@ -875,7 +875,7 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, wmEvent /* This normally happens when pushing undo but modal operators * like this one don't push undo data until after modal mode is * done. */ - EDBM_RecalcNormals(vc.em); + EDBM_mesh_normals_update(vc.em); EDBM_update_generic(C, vc.em, TRUE); @@ -918,24 +918,24 @@ static int edbm_delete_exec(bContext *C, wmOperator *op) BMEditMesh *bem = BMEdit_FromObject(obedit); if (type == 0) { - if (!EDBM_CallOpf(bem, op, "del geom=%hv context=%i", BM_ELEM_SELECT, DEL_VERTS)) /* Erase Vertices */ + if (!EDBM_op_callf(bem, op, "del geom=%hv context=%i", BM_ELEM_SELECT, DEL_VERTS)) /* Erase Vertices */ return OPERATOR_CANCELLED; } else if (type == 1) { - if (!EDBM_CallOpf(bem, op, "del geom=%he context=%i", BM_ELEM_SELECT, DEL_EDGES)) /* Erase Edges */ + if (!EDBM_op_callf(bem, op, "del geom=%he context=%i", BM_ELEM_SELECT, DEL_EDGES)) /* Erase Edges */ return OPERATOR_CANCELLED; } else if (type == 2) { - if (!EDBM_CallOpf(bem, op, "del geom=%hf context=%i", BM_ELEM_SELECT, DEL_FACES)) /* Erase Faces */ + if (!EDBM_op_callf(bem, op, "del geom=%hf context=%i", BM_ELEM_SELECT, DEL_FACES)) /* Erase Faces */ return OPERATOR_CANCELLED; } else if (type == 3) { - if (!EDBM_CallOpf(bem, op, "del geom=%hef context=%i", BM_ELEM_SELECT, DEL_EDGESFACES)) /* Edges and Faces */ + if (!EDBM_op_callf(bem, op, "del geom=%hef context=%i", BM_ELEM_SELECT, DEL_EDGESFACES)) /* Edges and Faces */ return OPERATOR_CANCELLED; } else if (type == 4) { //"Erase Only Faces"; - if (!EDBM_CallOpf(bem, op, "del geom=%hf context=%i", + if (!EDBM_op_callf(bem, op, "del geom=%hf context=%i", BM_ELEM_SELECT, DEL_ONLYFACES)) return OPERATOR_CANCELLED; } @@ -972,7 +972,7 @@ static int edbm_collapse_edge_exec(bContext *C, wmOperator *op) Object *obedit = CTX_data_edit_object(C); BMEditMesh *em = BMEdit_FromObject(obedit); - if (!EDBM_CallOpf(em, op, "collapse edges=%he", BM_ELEM_SELECT)) + if (!EDBM_op_callf(em, op, "collapse edges=%he", BM_ELEM_SELECT)) return OPERATOR_CANCELLED; EDBM_update_generic(C, em, TRUE); @@ -1000,7 +1000,7 @@ static int edbm_collapse_edge_loop_exec(bContext *C, wmOperator *op) Object *obedit = CTX_data_edit_object(C); BMEditMesh *em = BMEdit_FromObject(obedit); - if (!EDBM_CallOpf(em, op, "dissolve_edge_loop edges=%he", BM_ELEM_SELECT)) + if (!EDBM_op_callf(em, op, "dissolve_edge_loop edges=%he", BM_ELEM_SELECT)) return OPERATOR_CANCELLED; EDBM_update_generic(C, em, TRUE); @@ -1029,13 +1029,13 @@ static int edbm_add_edge_face_exec(bContext *C, wmOperator *op) Object *obedit = CTX_data_edit_object(C); BMEditMesh *em = BMEdit_FromObject(obedit); - if (!EDBM_InitOpf(em, &bmop, op, "contextual_create geom=%hfev", BM_ELEM_SELECT)) + if (!EDBM_op_init(em, &bmop, op, "contextual_create geom=%hfev", BM_ELEM_SELECT)) return OPERATOR_CANCELLED; BMO_op_exec(em->bm, &bmop); BMO_slot_buffer_hflag_enable(em->bm, &bmop, "faceout", BM_FACE, BM_ELEM_SELECT, TRUE); - if (!EDBM_FinishOp(em, &bmop, op, TRUE)) { + if (!EDBM_op_finish(em, &bmop, op, TRUE)) { return OPERATOR_CANCELLED; } @@ -1177,12 +1177,12 @@ static int edbm_vert_connect(bContext *C, wmOperator *op) BMOperator bmop; int len = 0; - if (!EDBM_InitOpf(em, &bmop, op, "connectverts verts=%hv", BM_ELEM_SELECT)) { + if (!EDBM_op_init(em, &bmop, op, "connectverts verts=%hv", BM_ELEM_SELECT)) { return OPERATOR_CANCELLED; } BMO_op_exec(bm, &bmop); len = BMO_slot_get(&bmop, "edgeout")->len; - if (!EDBM_FinishOp(em, &bmop, op, TRUE)) { + if (!EDBM_op_finish(em, &bmop, op, TRUE)) { return OPERATOR_CANCELLED; } @@ -1213,12 +1213,12 @@ static int edbm_edge_split_exec(bContext *C, wmOperator *op) BMOperator bmop; int len = 0; - if (!EDBM_InitOpf(em, &bmop, op, "edgesplit edges=%he", BM_ELEM_SELECT)) { + if (!EDBM_op_init(em, &bmop, op, "edgesplit edges=%he", BM_ELEM_SELECT)) { return OPERATOR_CANCELLED; } BMO_op_exec(bm, &bmop); len = BMO_slot_get(&bmop, "edgeout")->len; - if (!EDBM_FinishOp(em, &bmop, op, TRUE)) { + if (!EDBM_op_finish(em, &bmop, op, TRUE)) { return OPERATOR_CANCELLED; } @@ -1249,14 +1249,14 @@ static int edbm_duplicate_exec(bContext *C, wmOperator *op) BMEditMesh *em = BMEdit_FromObject(ob); BMOperator bmop; - EDBM_InitOpf(em, &bmop, op, "dupe geom=%hvef", BM_ELEM_SELECT); + EDBM_op_init(em, &bmop, op, "dupe geom=%hvef", BM_ELEM_SELECT); BMO_op_exec(em->bm, &bmop); EDBM_flag_disable_all(em, BM_ELEM_SELECT); BMO_slot_buffer_hflag_enable(em->bm, &bmop, "newout", BM_ALL, BM_ELEM_SELECT, TRUE); - if (!EDBM_FinishOp(em, &bmop, op, TRUE)) { + if (!EDBM_op_finish(em, &bmop, op, TRUE)) { return OPERATOR_CANCELLED; } @@ -1296,7 +1296,7 @@ static int edbm_flip_normals_exec(bContext *C, wmOperator *op) Object *obedit = CTX_data_edit_object(C); BMEditMesh *em = BMEdit_FromObject(obedit); - if (!EDBM_CallOpf(em, op, "reversefaces faces=%hf", BM_ELEM_SELECT)) + if (!EDBM_op_callf(em, op, "reversefaces faces=%hf", BM_ELEM_SELECT)) return OPERATOR_CANCELLED; EDBM_update_generic(C, em, TRUE); @@ -1363,7 +1363,7 @@ static int edbm_edge_rotate_selected_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - EDBM_InitOpf(em, &bmop, op, "edgerotate edges=%he ccw=%b", BM_ELEM_TAG, do_ccw); + EDBM_op_init(em, &bmop, op, "edgerotate edges=%he ccw=%b", BM_ELEM_TAG, do_ccw); /* avoids leaving old verts selected which can be a problem running multiple times, * since this means the edges become selected around the face which then attempt to rotate */ @@ -1375,7 +1375,7 @@ static int edbm_edge_rotate_selected_exec(bContext *C, wmOperator *op) BMO_slot_buffer_hflag_enable(em->bm, &bmop, "edgeout", BM_EDGE, BM_ELEM_SELECT, TRUE); EDBM_selectmode_flush(em); - if (!EDBM_FinishOp(em, &bmop, op, TRUE)) { + if (!EDBM_op_finish(em, &bmop, op, TRUE)) { return OPERATOR_CANCELLED; } @@ -1408,7 +1408,7 @@ static int edbm_hide_exec(bContext *C, wmOperator *op) Object *obedit = CTX_data_edit_object(C); BMEditMesh *em = BMEdit_FromObject(obedit); - EDBM_hide_mesh(em, RNA_boolean_get(op->ptr, "unselected")); + EDBM_mesh_hide(em, RNA_boolean_get(op->ptr, "unselected")); EDBM_update_generic(C, em, TRUE); @@ -1438,7 +1438,7 @@ static int edbm_reveal_exec(bContext *C, wmOperator *UNUSED(op)) Object *obedit = CTX_data_edit_object(C); BMEditMesh *em = BMEdit_FromObject(obedit); - EDBM_reveal_mesh(em); + EDBM_mesh_reveal(em); EDBM_update_generic(C, em, TRUE); @@ -1467,11 +1467,11 @@ static int edbm_normals_make_consistent_exec(bContext *C, wmOperator *op) /* doflip has to do with bmesh_rationalize_normals, it's an internal * thing */ - if (!EDBM_CallOpf(em, op, "righthandfaces faces=%hf do_flip=%b", BM_ELEM_SELECT, TRUE)) + if (!EDBM_op_callf(em, op, "righthandfaces faces=%hf do_flip=%b", BM_ELEM_SELECT, TRUE)) return OPERATOR_CANCELLED; if (RNA_boolean_get(op->ptr, "inside")) - EDBM_CallOpf(em, op, "reversefaces faces=%hf", BM_ELEM_SELECT); + EDBM_op_callf(em, op, "reversefaces faces=%hf", BM_ELEM_SELECT); EDBM_update_generic(C, em, TRUE); @@ -1508,7 +1508,7 @@ static int edbm_do_smooth_vertex_exec(bContext *C, wmOperator *op) /* mirror before smooth */ if (((Mesh *)obedit->data)->editflag & ME_EDIT_MIRROR_X) { - EDBM_CacheMirrorVerts(em, TRUE); + EDBM_verts_mirror_cache_begin(em, TRUE); } /* if there is a mirror modifier with clipping, flag the verts that @@ -1536,7 +1536,7 @@ static int edbm_do_smooth_vertex_exec(bContext *C, wmOperator *op) repeat = 1; for (i = 0; i < repeat; i++) { - if (!EDBM_CallOpf(em, op, + if (!EDBM_op_callf(em, op, "vertexsmooth verts=%hv mirror_clip_x=%b mirror_clip_y=%b mirror_clip_z=%b clipdist=%f", BM_ELEM_SELECT, mirrx, mirry, mirrz, clipdist)) { @@ -1546,8 +1546,8 @@ static int edbm_do_smooth_vertex_exec(bContext *C, wmOperator *op) /* apply mirror */ if (((Mesh *)obedit->data)->editflag & ME_EDIT_MIRROR_X) { - EDBM_ApplyMirrorCache(em, BM_ELEM_SELECT, 0); - EDBM_EndMirrorCache(em); + EDBM_verts_mirror_apply(em, BM_ELEM_SELECT, 0); + EDBM_verts_mirror_cache_end(em); } EDBM_update_generic(C, em, TRUE); @@ -1655,13 +1655,13 @@ static int edbm_rotate_uvs_exec(bContext *C, wmOperator *op) int dir = RNA_enum_get(op->ptr, "direction"); /* initialize the bmop using EDBM api, which does various ui error reporting and other stuff */ - EDBM_InitOpf(em, &bmop, op, "face_rotateuvs faces=%hf dir=%i", BM_ELEM_SELECT, dir); + EDBM_op_init(em, &bmop, op, "face_rotateuvs faces=%hf dir=%i", BM_ELEM_SELECT, dir); /* execute the operator */ BMO_op_exec(em->bm, &bmop); /* finish the operator */ - if (!EDBM_FinishOp(em, &bmop, op, TRUE)) { + if (!EDBM_op_finish(em, &bmop, op, TRUE)) { return OPERATOR_CANCELLED; } @@ -1678,13 +1678,13 @@ static int edbm_reverse_uvs_exec(bContext *C, wmOperator *op) BMOperator bmop; /* initialize the bmop using EDBM api, which does various ui error reporting and other stuff */ - EDBM_InitOpf(em, &bmop, op, "face_reverseuvs faces=%hf", BM_ELEM_SELECT); + EDBM_op_init(em, &bmop, op, "face_reverseuvs faces=%hf", BM_ELEM_SELECT); /* execute the operator */ BMO_op_exec(em->bm, &bmop); /* finish the operator */ - if (!EDBM_FinishOp(em, &bmop, op, TRUE)) { + if (!EDBM_op_finish(em, &bmop, op, TRUE)) { return OPERATOR_CANCELLED; } @@ -1704,13 +1704,13 @@ static int edbm_rotate_colors_exec(bContext *C, wmOperator *op) int dir = RNA_enum_get(op->ptr, "direction"); /* initialize the bmop using EDBM api, which does various ui error reporting and other stuff */ - EDBM_InitOpf(em, &bmop, op, "face_rotatecolors faces=%hf dir=%i", BM_ELEM_SELECT, dir); + EDBM_op_init(em, &bmop, op, "face_rotatecolors faces=%hf dir=%i", BM_ELEM_SELECT, dir); /* execute the operator */ BMO_op_exec(em->bm, &bmop); /* finish the operator */ - if (!EDBM_FinishOp(em, &bmop, op, TRUE)) { + if (!EDBM_op_finish(em, &bmop, op, TRUE)) { return OPERATOR_CANCELLED; } @@ -1729,13 +1729,13 @@ static int edbm_reverse_colors_exec(bContext *C, wmOperator *op) BMOperator bmop; /* initialize the bmop using EDBM api, which does various ui error reporting and other stuff */ - EDBM_InitOpf(em, &bmop, op, "face_reversecolors faces=%hf", BM_ELEM_SELECT); + EDBM_op_init(em, &bmop, op, "face_reversecolors faces=%hf", BM_ELEM_SELECT); /* execute the operator */ BMO_op_exec(em->bm, &bmop); /* finish the operator */ - if (!EDBM_FinishOp(em, &bmop, op, TRUE)) { + if (!EDBM_op_finish(em, &bmop, op, TRUE)) { return OPERATOR_CANCELLED; } @@ -1834,11 +1834,11 @@ static int merge_firstlast(BMEditMesh *em, int first, int uvmerge, wmOperator *w return OPERATOR_CANCELLED; if (uvmerge) { - if (!EDBM_CallOpf(em, wmop, "pointmerge_facedata verts=%hv snapv=%e", BM_ELEM_SELECT, mergevert)) + if (!EDBM_op_callf(em, wmop, "pointmerge_facedata verts=%hv snapv=%e", BM_ELEM_SELECT, mergevert)) return OPERATOR_CANCELLED; } - if (!EDBM_CallOpf(em, wmop, "pointmerge verts=%hv mergeco=%v", BM_ELEM_SELECT, mergevert->co)) + if (!EDBM_op_callf(em, wmop, "pointmerge verts=%hv mergeco=%v", BM_ELEM_SELECT, mergevert->co)) return OPERATOR_CANCELLED; return OPERATOR_FINISHED; @@ -1879,11 +1879,11 @@ static int merge_target(BMEditMesh *em, Scene *scene, View3D *v3d, Object *ob, return OPERATOR_CANCELLED; if (uvmerge) { - if (!EDBM_CallOpf(em, wmop, "vert_average_facedata verts=%hv", BM_ELEM_SELECT)) + if (!EDBM_op_callf(em, wmop, "vert_average_facedata verts=%hv", BM_ELEM_SELECT)) return OPERATOR_CANCELLED; } - if (!EDBM_CallOpf(em, wmop, "pointmerge verts=%hv mergeco=%v", BM_ELEM_SELECT, co)) + if (!EDBM_op_callf(em, wmop, "pointmerge verts=%hv mergeco=%v", BM_ELEM_SELECT, co)) return OPERATOR_CANCELLED; return OPERATOR_FINISHED; @@ -1912,7 +1912,7 @@ static int edbm_merge_exec(bContext *C, wmOperator *op) break; case 5: status = 1; - if (!EDBM_CallOpf(em, op, "collapse edges=%he", BM_ELEM_SELECT)) + if (!EDBM_op_callf(em, op, "collapse edges=%he", BM_ELEM_SELECT)) status = 0; break; } @@ -2003,17 +2003,17 @@ static int edbm_remove_doubles_exec(bContext *C, wmOperator *op) BMOperator bmop; int count; - EDBM_InitOpf(em, &bmop, op, "finddoubles verts=%hv dist=%f", BM_ELEM_SELECT, RNA_float_get(op->ptr, "mergedist")); + EDBM_op_init(em, &bmop, op, "finddoubles verts=%hv dist=%f", BM_ELEM_SELECT, RNA_float_get(op->ptr, "mergedist")); BMO_op_exec(em->bm, &bmop); count = BMO_slot_map_count(em->bm, &bmop, "targetmapout"); - if (!EDBM_CallOpf(em, op, "weldverts targetmap=%s", &bmop, "targetmapout")) { + if (!EDBM_op_callf(em, op, "weldverts targetmap=%s", &bmop, "targetmapout")) { BMO_op_finish(em->bm, &bmop); return OPERATOR_CANCELLED; } - if (!EDBM_FinishOp(em, &bmop, op, TRUE)) { + if (!EDBM_op_finish(em, &bmop, op, TRUE)) { return OPERATOR_CANCELLED; } @@ -2079,7 +2079,7 @@ static int edbm_select_vertex_path_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; /* initialize the bmop using EDBM api, which does various ui error reporting and other stuff */ - EDBM_InitOpf(em, &bmop, op, "vertexshortestpath startv=%e endv=%e type=%i", sv->ele, ev->ele, type); + EDBM_op_init(em, &bmop, op, "vertexshortestpath startv=%e endv=%e type=%i", sv->ele, ev->ele, type); /* execute the operator */ BMO_op_exec(em->bm, &bmop); @@ -2091,7 +2091,7 @@ static int edbm_select_vertex_path_exec(bContext *C, wmOperator *op) BMO_slot_buffer_hflag_enable(em->bm, &bmop, "vertout", BM_ALL, BM_ELEM_SELECT, TRUE); /* finish the operator */ - if (!EDBM_FinishOp(em, &bmop, op, TRUE)) { + if (!EDBM_op_finish(em, &bmop, op, TRUE)) { return OPERATOR_CANCELLED; } @@ -2182,7 +2182,7 @@ static int edbm_rip_invoke(bContext *C, wmOperator *op, wmEvent *event) singlesel = TRUE; /* find selected vert - same some time and check history first */ - if (EDBM_get_actSelection(em, &ese) && ese.htype == BM_VERT) { + if (EDBM_editselection_active_get(em, &ese) && ese.htype == BM_VERT) { v = (BMVert *)ese.ele; } else { @@ -2262,7 +2262,7 @@ static int edbm_rip_invoke(bContext *C, wmOperator *op, wmEvent *event) } } - if (!EDBM_InitOpf(em, &bmop, op, "edgesplit edges=%he verts=%hv use_verts=%b", + if (!EDBM_op_init(em, &bmop, op, "edgesplit edges=%he verts=%hv use_verts=%b", BM_ELEM_TAG, BM_ELEM_SELECT, TRUE)) { return OPERATOR_CANCELLED; } @@ -2361,7 +2361,7 @@ static int edbm_rip_invoke(bContext *C, wmOperator *op, wmEvent *event) BLI_assert(singlesel ? (bm->totvertsel > 0) : (bm->totedgesel > 0)); - if (!EDBM_FinishOp(em, &bmop, op, TRUE)) { + if (!EDBM_op_finish(em, &bmop, op, TRUE)) { return OPERATOR_CANCELLED; } @@ -2649,7 +2649,7 @@ static int edbm_solidify_exec(bContext *C, wmOperator *op) float thickness = RNA_float_get(op->ptr, "thickness"); - if (!EDBM_InitOpf(em, &bmop, op, "solidify geom=%hf thickness=%f", BM_ELEM_SELECT, thickness)) { + if (!EDBM_op_init(em, &bmop, op, "solidify geom=%hf thickness=%f", BM_ELEM_SELECT, thickness)) { return OPERATOR_CANCELLED; } @@ -2664,7 +2664,7 @@ static int edbm_solidify_exec(bContext *C, wmOperator *op) /* select the newly generated faces */ BMO_slot_buffer_hflag_enable(bm, &bmop, "geomout", BM_FACE, BM_ELEM_SELECT, TRUE); - if (!EDBM_FinishOp(em, &bmop, op, TRUE)) { + if (!EDBM_op_finish(em, &bmop, op, TRUE)) { return OPERATOR_CANCELLED; } @@ -2946,7 +2946,7 @@ static int edbm_knife_cut_exec(bContext *C, wmOperator *op) BLI_ghash_insert(gh, bv, scr); } - if (!EDBM_InitOpf(em, &bmop, op, "esubd")) { + if (!EDBM_op_init(em, &bmop, op, "esubd")) { return OPERATOR_CANCELLED; } @@ -2986,7 +2986,7 @@ static int edbm_knife_cut_exec(bContext *C, wmOperator *op) BMO_slot_float_set(&bmop, "radius", 0); BMO_op_exec(bm, &bmop); - if (!EDBM_FinishOp(em, &bmop, op, TRUE)) { + if (!EDBM_op_finish(em, &bmop, op, TRUE)) { return OPERATOR_CANCELLED; } @@ -3052,8 +3052,8 @@ static int mesh_separate_selected(Main *bmain, Scene *scene, Base *editbase, wmO ED_base_object_select(basenew, BA_DESELECT); - EDBM_CallOpf(em, wmop, "dupe geom=%hvef dest=%p", BM_ELEM_SELECT, bm_new); - EDBM_CallOpf(em, wmop, "del geom=%hvef context=%i", BM_ELEM_SELECT, DEL_FACES); + EDBM_op_callf(em, wmop, "dupe geom=%hvef dest=%p", BM_ELEM_SELECT, bm_new); + EDBM_op_callf(em, wmop, "del geom=%hvef context=%i", BM_ELEM_SELECT, DEL_FACES); /* clean up any loose edges */ BM_ITER(e, &iter, em->bm, BM_EDGES_OF_MESH, NULL) { @@ -3064,7 +3064,7 @@ static int mesh_separate_selected(Main *bmain, Scene *scene, Base *editbase, wmO BM_elem_select_set(em->bm, e, FALSE); } } - EDBM_CallOpf(em, wmop, "del geom=%hvef context=%i", BM_ELEM_SELECT, DEL_EDGES); + EDBM_op_callf(em, wmop, "del geom=%hvef context=%i", BM_ELEM_SELECT, DEL_EDGES); /* clean up any loose verts */ BM_ITER(v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) { @@ -3076,7 +3076,7 @@ static int mesh_separate_selected(Main *bmain, Scene *scene, Base *editbase, wmO } } - EDBM_CallOpf(em, wmop, "del geom=%hvef context=%i", BM_ELEM_SELECT, DEL_VERTS); + EDBM_op_callf(em, wmop, "del geom=%hvef context=%i", BM_ELEM_SELECT, DEL_VERTS); BM_mesh_normals_update(bm_new, TRUE); BMO_op_callf(bm_new, "bmesh_to_mesh mesh=%p object=%p notessellation=%b", @@ -3226,7 +3226,7 @@ static int edbm_fill_exec(bContext *C, wmOperator *op) BMEditMesh *em = BMEdit_FromObject(obedit); BMOperator bmop; - if (!EDBM_InitOpf(em, &bmop, op, "triangle_fill edges=%he", BM_ELEM_SELECT)) { + if (!EDBM_op_init(em, &bmop, op, "triangle_fill edges=%he", BM_ELEM_SELECT)) { return OPERATOR_CANCELLED; } @@ -3235,7 +3235,7 @@ static int edbm_fill_exec(bContext *C, wmOperator *op) /* select new geometry */ BMO_slot_buffer_hflag_enable(em->bm, &bmop, "geomout", BM_FACE | BM_EDGE, BM_ELEM_SELECT, TRUE); - if (!EDBM_FinishOp(em, &bmop, op, TRUE)) { + if (!EDBM_op_finish(em, &bmop, op, TRUE)) { return OPERATOR_CANCELLED; } @@ -3264,7 +3264,7 @@ static int edbm_beautify_fill_exec(bContext *C, wmOperator *op) Object *obedit = CTX_data_edit_object(C); BMEditMesh *em = BMEdit_FromObject(obedit); - if (!EDBM_CallOpf(em, op, "beautify_fill faces=%hf", BM_ELEM_SELECT)) + if (!EDBM_op_callf(em, op, "beautify_fill faces=%hf", BM_ELEM_SELECT)) return OPERATOR_CANCELLED; EDBM_update_generic(C, em, TRUE); @@ -3294,7 +3294,7 @@ static int edbm_quads_convert_to_tris_exec(bContext *C, wmOperator *op) BMEditMesh *em = BMEdit_FromObject(obedit); int use_beauty = RNA_boolean_get(op->ptr, "use_beauty"); - if (!EDBM_CallOpf(em, op, "triangulate faces=%hf use_beauty=%b", BM_ELEM_SELECT, use_beauty)) + if (!EDBM_op_callf(em, op, "triangulate faces=%hf use_beauty=%b", BM_ELEM_SELECT, use_beauty)) return OPERATOR_CANCELLED; EDBM_update_generic(C, em, TRUE); @@ -3330,7 +3330,7 @@ static int edbm_tris_convert_to_quads_exec(bContext *C, wmOperator *op) dovcols = RNA_boolean_get(op->ptr, "vcols"); domaterials = RNA_boolean_get(op->ptr, "materials"); - if (!EDBM_CallOpf(em, op, + if (!EDBM_op_callf(em, op, "join_triangles faces=%hf limit=%f cmp_sharp=%b cmp_uvs=%b cmp_vcols=%b cmp_materials=%b", BM_ELEM_SELECT, limit, dosharp, douvs, dovcols, domaterials)) { @@ -3375,15 +3375,15 @@ static int edbm_dissolve_exec(bContext *C, wmOperator *op) int use_verts = RNA_boolean_get(op->ptr, "use_verts"); if (em->selectmode & SCE_SELECT_FACE) { - if (!EDBM_CallOpf(em, op, "dissolve_faces faces=%hf use_verts=%b", BM_ELEM_SELECT, use_verts)) + if (!EDBM_op_callf(em, op, "dissolve_faces faces=%hf use_verts=%b", BM_ELEM_SELECT, use_verts)) return OPERATOR_CANCELLED; } else if (em->selectmode & SCE_SELECT_EDGE) { - if (!EDBM_CallOpf(em, op, "dissolve_edges edges=%he use_verts=%b", BM_ELEM_SELECT, use_verts)) + if (!EDBM_op_callf(em, op, "dissolve_edges edges=%he use_verts=%b", BM_ELEM_SELECT, use_verts)) return OPERATOR_CANCELLED; } else if (em->selectmode & SCE_SELECT_VERTEX) { - if (!EDBM_CallOpf(em, op, "dissolve_verts verts=%hv", BM_ELEM_SELECT)) + if (!EDBM_op_callf(em, op, "dissolve_verts verts=%hv", BM_ELEM_SELECT)) return OPERATOR_CANCELLED; } @@ -3417,7 +3417,7 @@ static int edbm_dissolve_limited_exec(bContext *C, wmOperator *op) BMEditMesh *em = BMEdit_FromObject(obedit); float angle_limit = RNA_float_get(op->ptr, "angle_limit"); - if (!EDBM_CallOpf(em, op, + if (!EDBM_op_callf(em, op, "dissolve_limit edges=%he verts=%hv angle_limit=%f", BM_ELEM_SELECT, BM_ELEM_SELECT, angle_limit)) { @@ -3456,16 +3456,16 @@ static int edbm_split_exec(bContext *C, wmOperator *op) BMEditMesh *em = BMEdit_FromObject(ob); BMOperator bmop; - EDBM_InitOpf(em, &bmop, op, "split geom=%hvef use_only_faces=%b", BM_ELEM_SELECT, FALSE); + EDBM_op_init(em, &bmop, op, "split geom=%hvef use_only_faces=%b", BM_ELEM_SELECT, FALSE); BMO_op_exec(em->bm, &bmop); BM_mesh_elem_flag_disable_all(em->bm, BM_VERT | BM_EDGE | BM_FACE, BM_ELEM_SELECT); BMO_slot_buffer_hflag_enable(em->bm, &bmop, "geomout", BM_ALL, BM_ELEM_SELECT, TRUE); - if (!EDBM_FinishOp(em, &bmop, op, TRUE)) { + if (!EDBM_op_finish(em, &bmop, op, TRUE)) { return OPERATOR_CANCELLED; } /* Geometry has changed, need to recalc normals and looptris */ - EDBM_RecalcNormals(em); + EDBM_mesh_normals_update(em); EDBM_update_generic(C, em, TRUE); @@ -3512,7 +3512,7 @@ static int edbm_spin_exec(bContext *C, wmOperator *op) mul_m3_v3(imat, cent); mul_m3_v3(imat, axis); - if (!EDBM_InitOpf(em, &spinop, op, + if (!EDBM_op_init(em, &spinop, op, "spin geom=%hvef cent=%v axis=%v dvec=%v steps=%i ang=%f do_dupli=%b", BM_ELEM_SELECT, cent, axis, d, steps, degr, dupli)) { @@ -3521,7 +3521,7 @@ static int edbm_spin_exec(bContext *C, wmOperator *op) BMO_op_exec(bm, &spinop); EDBM_flag_disable_all(em, BM_ELEM_SELECT); BMO_slot_buffer_hflag_enable(bm, &spinop, "lastout", BM_ALL, BM_ELEM_SELECT, TRUE); - if (!EDBM_FinishOp(em, &spinop, op, TRUE)) { + if (!EDBM_op_finish(em, &spinop, op, TRUE)) { return OPERATOR_CANCELLED; } @@ -3635,7 +3635,7 @@ static int edbm_screw_exec(bContext *C, wmOperator *op) if (dot_v3v3(nor, dvec) > 0.000f) negate_v3(dvec); - if (!EDBM_InitOpf(em, &spinop, op, + if (!EDBM_op_init(em, &spinop, op, "spin geom=%hvef cent=%v axis=%v dvec=%v steps=%i ang=%f do_dupli=%b", BM_ELEM_SELECT, cent, axis, dvec, turns * steps, 360.0f * turns, FALSE)) { @@ -3644,7 +3644,7 @@ static int edbm_screw_exec(bContext *C, wmOperator *op) BMO_op_exec(bm, &spinop); EDBM_flag_disable_all(em, BM_ELEM_SELECT); BMO_slot_buffer_hflag_enable(bm, &spinop, "lastout", BM_ALL, BM_ELEM_SELECT, TRUE); - if (!EDBM_FinishOp(em, &spinop, op, TRUE)) { + if (!EDBM_op_finish(em, &spinop, op, TRUE)) { return OPERATOR_CANCELLED; } @@ -4265,7 +4265,7 @@ static int edbm_noise_exec(bContext *C, wmOperator *op) } } - EDBM_RecalcNormals(em); + EDBM_mesh_normals_update(em); EDBM_update_generic(C, em, TRUE); @@ -4337,7 +4337,7 @@ static int edbm_bevel_exec(bContext *C, wmOperator *op) for (i = 0; i < recursion; i++) { float fac = w[recursion - i - 1] * factor; - if (!EDBM_InitOpf(em, &bmop, op, + if (!EDBM_op_init(em, &bmop, op, "bevel geom=%hev percent=%f lengthlayer=%i use_lengths=%b use_even=%b use_dist=%b", BM_ELEM_SELECT, fac, li, TRUE, use_even, use_dist)) { @@ -4345,7 +4345,7 @@ static int edbm_bevel_exec(bContext *C, wmOperator *op) } BMO_op_exec(em->bm, &bmop); - if (!EDBM_FinishOp(em, &bmop, op, TRUE)) + if (!EDBM_op_finish(em, &bmop, op, TRUE)) return OPERATOR_CANCELLED; } @@ -4353,7 +4353,7 @@ static int edbm_bevel_exec(bContext *C, wmOperator *op) MEM_freeN(w); - EDBM_RecalcNormals(em); + EDBM_mesh_normals_update(em); EDBM_update_generic(C, em, TRUE); @@ -4387,7 +4387,7 @@ static int edbm_bridge_edge_loops_exec(bContext *C, wmOperator *op) Object *obedit = CTX_data_edit_object(C); BMEditMesh *em = BMEdit_FromObject(obedit); - if (!EDBM_CallOpf(em, op, "bridge_loops edges=%he", BM_ELEM_SELECT)) + if (!EDBM_op_callf(em, op, "bridge_loops edges=%he", BM_ELEM_SELECT)) return OPERATOR_CANCELLED; EDBM_update_generic(C, em, TRUE); @@ -4425,7 +4425,7 @@ static int edbm_inset_exec(bContext *C, wmOperator *op) const float thickness = RNA_float_get(op->ptr, "thickness"); const int use_outset = RNA_boolean_get(op->ptr, "use_outset"); - EDBM_InitOpf(em, &bmop, op, + EDBM_op_init(em, &bmop, op, "inset faces=%hf use_boundary=%b use_even_offset=%b use_relative_offset=%b thickness=%f use_outset=%b", BM_ELEM_SELECT, use_boundary, use_even_offset, use_relative_offset, thickness, use_outset); @@ -4436,7 +4436,7 @@ static int edbm_inset_exec(bContext *C, wmOperator *op) BMO_slot_buffer_hflag_enable(em->bm, &bmop, "faceout", BM_FACE, BM_ELEM_SELECT, TRUE); - if (!EDBM_FinishOp(em, &bmop, op, TRUE)) { + if (!EDBM_op_finish(em, &bmop, op, TRUE)) { return OPERATOR_CANCELLED; } else { diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index 5d2bb359d3c..22420c50e2f 100644 --- a/source/blender/editors/mesh/editmesh_utils.c +++ b/source/blender/editors/mesh/editmesh_utils.c @@ -56,12 +56,14 @@ #include "bmesh.h" -void EDBM_RecalcNormals(BMEditMesh *em) +#include "mesh_intern.h" + +void EDBM_mesh_normals_update(BMEditMesh *em) { BM_mesh_normals_update(em->bm, TRUE); } -void EDBM_ClearMesh(BMEditMesh *em) +void EDBM_mesh_clear(BMEditMesh *em) { /* clear bmesh */ BM_mesh_clear(em->bm); @@ -111,7 +113,7 @@ void EDBM_stats_update(BMEditMesh *em) } } -int EDBM_InitOpf(BMEditMesh *em, BMOperator *bmop, wmOperator *op, const char *fmt, ...) +int EDBM_op_init(BMEditMesh *em, BMOperator *bmop, wmOperator *op, const char *fmt, ...) { BMesh *bm = em->bm; va_list list; @@ -135,7 +137,7 @@ int EDBM_InitOpf(BMEditMesh *em, BMOperator *bmop, wmOperator *op, const char *f /* returns 0 on error, 1 on success. executes and finishes a bmesh operator */ -int EDBM_FinishOp(BMEditMesh *em, BMOperator *bmop, wmOperator *op, const int report) +int EDBM_op_finish(BMEditMesh *em, BMOperator *bmop, wmOperator *op, const int report) { const char *errmsg; @@ -170,7 +172,7 @@ int EDBM_FinishOp(BMEditMesh *em, BMOperator *bmop, wmOperator *op, const int re return 1; } -int EDBM_CallOpf(BMEditMesh *em, wmOperator *op, const char *fmt, ...) +int EDBM_op_callf(BMEditMesh *em, wmOperator *op, const char *fmt, ...) { BMesh *bm = em->bm; BMOperator bmop; @@ -191,10 +193,10 @@ int EDBM_CallOpf(BMEditMesh *em, wmOperator *op, const char *fmt, ...) BMO_op_exec(bm, &bmop); va_end(list); - return EDBM_FinishOp(em, &bmop, op, TRUE); + return EDBM_op_finish(em, &bmop, op, TRUE); } -int EDBM_CallAndSelectOpf(BMEditMesh *em, wmOperator *op, const char *selectslot, const char *fmt, ...) +int EDBM_op_call_and_selectf(BMEditMesh *em, wmOperator *op, const char *selectslot, const char *fmt, ...) { BMesh *bm = em->bm; BMOperator bmop; @@ -219,10 +221,10 @@ int EDBM_CallAndSelectOpf(BMEditMesh *em, wmOperator *op, const char *selectslot BMO_slot_buffer_hflag_enable(em->bm, &bmop, selectslot, BM_ALL, BM_ELEM_SELECT, TRUE); va_end(list); - return EDBM_FinishOp(em, &bmop, op, TRUE); + return EDBM_op_finish(em, &bmop, op, TRUE); } -int EDBM_CallOpfSilent(BMEditMesh *em, const char *fmt, ...) +int EDBM_op_call_silentf(BMEditMesh *em, const char *fmt, ...) { BMesh *bm = em->bm; BMOperator bmop; @@ -242,7 +244,7 @@ int EDBM_CallOpfSilent(BMEditMesh *em, const char *fmt, ...) BMO_op_exec(bm, &bmop); va_end(list); - return EDBM_FinishOp(em, &bmop, NULL, FALSE); + return EDBM_op_finish(em, &bmop, NULL, FALSE); } void EDBM_selectmode_to_scene(bContext *C) @@ -260,7 +262,7 @@ void EDBM_selectmode_to_scene(bContext *C) WM_event_add_notifier(C, NC_SCENE | ND_TOOLSETTINGS, scene); } -void EDBM_MakeEditBMesh(ToolSettings *ts, Scene *UNUSED(scene), Object *ob) +void EDBM_mesh_make(ToolSettings *ts, Scene *UNUSED(scene), Object *ob) { Mesh *me = ob->data; BMesh *bm; @@ -290,7 +292,7 @@ void EDBM_MakeEditBMesh(ToolSettings *ts, Scene *UNUSED(scene), Object *ob) me->edit_btmesh->ob = ob; } -void EDBM_LoadEditBMesh(Scene *scene, Object *ob) +void EDBM_mesh_load(Scene *scene, Object *ob) { Mesh *me = ob->data; BMesh *bm = me->edit_btmesh->bm; @@ -303,14 +305,14 @@ void EDBM_LoadEditBMesh(Scene *scene, Object *ob) } -void EDBM_FreeEditBMesh(BMEditMesh *tm) +void EDBM_mesh_free(BMEditMesh *tm) { BMEdit_Free(tm); } -void EDBM_init_index_arrays(BMEditMesh *tm, int forvert, int foredge, int forface) +void EDBM_index_arrays_init(BMEditMesh *tm, int forvert, int foredge, int forface) { - EDBM_free_index_arrays(tm); + EDBM_index_arrays_free(tm); if (forvert) { BMIter iter; @@ -352,7 +354,7 @@ void EDBM_init_index_arrays(BMEditMesh *tm, int forvert, int foredge, int forfac } } -void EDBM_free_index_arrays(BMEditMesh *tm) +void EDBM_index_arrays_free(BMEditMesh *tm) { if (tm->vert_index) { MEM_freeN(tm->vert_index); @@ -370,17 +372,17 @@ void EDBM_free_index_arrays(BMEditMesh *tm) } } -BMVert *EDBM_get_vert_for_index(BMEditMesh *tm, int index) +BMVert *EDBM_vert_at_index(BMEditMesh *tm, int index) { return tm->vert_index && index < tm->bm->totvert ? tm->vert_index[index] : NULL; } -BMEdge *EDBM_get_edge_for_index(BMEditMesh *tm, int index) +BMEdge *EDBM_edge_at_index(BMEditMesh *tm, int index) { return tm->edge_index && index < tm->bm->totedge ? tm->edge_index[index] : NULL; } -BMFace *EDBM_get_face_for_index(BMEditMesh *tm, int index) +BMFace *EDBM_face_at_index(BMEditMesh *tm, int index) { return (tm->face_index && index < tm->bm->totface && index >= 0) ? tm->face_index[index] : NULL; } @@ -444,7 +446,7 @@ void EDBM_select_less(BMEditMesh *em) EDBM_selectmode_flush(em); } -int EDBM_get_actSelection(BMEditMesh *em, BMEditSelection *ese) +int EDBM_editselection_active_get(BMEditMesh *em, BMEditSelection *ese) { BMEditSelection *ese_last = em->bm->selected.last; BMFace *efa = BM_active_face_get(em->bm, FALSE); @@ -577,7 +579,7 @@ void undo_push_mesh(bContext *C, const char *name) } /* write comment here */ -UvVertMap *EDBM_make_uv_vert_map(BMEditMesh *em, int selected, int do_face_idx_array, float *limit) +UvVertMap *EDBM_uv_vert_map_create(BMEditMesh *em, int selected, int do_face_idx_array, float *limit) { BMVert *ev; BMFace *efa; @@ -592,7 +594,7 @@ UvVertMap *EDBM_make_uv_vert_map(BMEditMesh *em, int selected, int do_face_idx_a int totverts, i, totuv; if (do_face_idx_array) - EDBM_init_index_arrays(em, 0, 0, 1); + EDBM_index_arrays_init(em, 0, 0, 1); BM_mesh_elem_index_ensure(em->bm, BM_VERT); @@ -607,13 +609,13 @@ UvVertMap *EDBM_make_uv_vert_map(BMEditMesh *em, int selected, int do_face_idx_a if (totuv == 0) { if (do_face_idx_array) - EDBM_free_index_arrays(em); + EDBM_index_arrays_free(em); return NULL; } vmap = (UvVertMap *)MEM_callocN(sizeof(*vmap), "UvVertMap"); if (!vmap) { if (do_face_idx_array) - EDBM_free_index_arrays(em); + EDBM_index_arrays_free(em); return NULL; } @@ -623,7 +625,7 @@ UvVertMap *EDBM_make_uv_vert_map(BMEditMesh *em, int selected, int do_face_idx_a if (!vmap->vert || !vmap->buf) { free_uv_vert_map(vmap); if (do_face_idx_array) - EDBM_free_index_arrays(em); + EDBM_index_arrays_free(em); return NULL; } @@ -660,7 +662,7 @@ UvVertMap *EDBM_make_uv_vert_map(BMEditMesh *em, int selected, int do_face_idx_a v->next = newvlist; newvlist = v; - efa = EDBM_get_face_for_index(em, v->f); + efa = EDBM_face_at_index(em, v->f); /* tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY); */ /* UNUSED */ l = BM_iter_at_index(em->bm, BM_LOOPS_OF_FACE, efa, v->tfindex); @@ -672,7 +674,7 @@ UvVertMap *EDBM_make_uv_vert_map(BMEditMesh *em, int selected, int do_face_idx_a while (iterv) { next = iterv->next; - efa = EDBM_get_face_for_index(em, iterv->f); + efa = EDBM_face_at_index(em, iterv->f); /* tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY); */ /* UNUSED */ l = BM_iter_at_index(em->bm, BM_LOOPS_OF_FACE, efa, iterv->tfindex); @@ -702,13 +704,13 @@ UvVertMap *EDBM_make_uv_vert_map(BMEditMesh *em, int selected, int do_face_idx_a } if (do_face_idx_array) - EDBM_free_index_arrays(em); + EDBM_index_arrays_free(em); return vmap; } -UvMapVert *EDBM_get_uv_map_vert(UvVertMap *vmap, unsigned int v) +UvMapVert *EDBM_uv_vert_map_at_index(UvVertMap *vmap, unsigned int v) { return vmap->vert[v]; } @@ -717,7 +719,7 @@ UvMapVert *EDBM_get_uv_map_vert(UvVertMap *vmap, unsigned int v) /* A specialized vert map used by stitch operator */ -UvElementMap *EDBM_make_uv_element_map(BMEditMesh *em, int selected, int do_islands) +UvElementMap *EDBM_uv_element_map_create(BMEditMesh *em, int selected, int do_islands) { BMVert *ev; BMFace *efa; @@ -767,7 +769,7 @@ UvElementMap *EDBM_make_uv_element_map(BMEditMesh *em, int selected, int do_isla buf = element_map->buf = (UvElement *)MEM_callocN(sizeof(*element_map->buf) * totuv, "UvElement"); if (!element_map->vert || !element_map->buf) { - EDBM_free_uv_element_map(element_map); + EDBM_uv_element_map_free(element_map); MEM_freeN(island_number); return NULL; } @@ -906,7 +908,7 @@ UvElementMap *EDBM_make_uv_element_map(BMEditMesh *em, int selected, int do_isla MEM_freeN(islandbuf); MEM_freeN(stack); MEM_freeN(map); - EDBM_free_uv_element_map(element_map); + EDBM_uv_element_map_free(element_map); MEM_freeN(island_number); } @@ -936,13 +938,7 @@ UvElementMap *EDBM_make_uv_element_map(BMEditMesh *em, int selected, int do_isla return element_map; } - -UvMapVert *EM_get_uv_map_vert(UvVertMap *vmap, unsigned int v) -{ - return vmap->vert[v]; -} - -void EDBM_free_uv_vert_map(UvVertMap *vmap) +void EDBM_uv_vert_map_free(UvVertMap *vmap) { if (vmap) { if (vmap->vert) MEM_freeN(vmap->vert); @@ -951,7 +947,7 @@ void EDBM_free_uv_vert_map(UvVertMap *vmap) } } -void EDBM_free_uv_element_map(UvElementMap *element_map) +void EDBM_uv_element_map_free(UvElementMap *element_map) { if (element_map) { if (element_map->vert) MEM_freeN(element_map->vert); @@ -963,11 +959,11 @@ void EDBM_free_uv_element_map(UvElementMap *element_map) /* last_sel, use em->act_face otherwise get the last selected face in the editselections * at the moment, last_sel is mainly useful for making sure the space image dosnt flicker */ -MTexPoly *EDBM_get_active_mtexpoly(BMEditMesh *em, BMFace **r_act_efa, int sloppy) +MTexPoly *EDBM_mtexpoly_active_get(BMEditMesh *em, BMFace **r_act_efa, int sloppy) { BMFace *efa = NULL; - if (!EDBM_texFaceCheck(em)) + if (!EDBM_mtexpoly_check(em)) return NULL; efa = BM_active_face_get(em->bm, sloppy); @@ -982,14 +978,14 @@ MTexPoly *EDBM_get_active_mtexpoly(BMEditMesh *em, BMFace **r_act_efa, int slopp } /* can we edit UV's for this mesh?*/ -int EDBM_texFaceCheck(BMEditMesh *em) +int EDBM_mtexpoly_check(BMEditMesh *em) { /* some of these checks could be a touch overkill */ return em && em->bm->totface && CustomData_has_layer(&em->bm->pdata, CD_MTEXPOLY) && CustomData_has_layer(&em->bm->ldata, CD_MLOOPUV); } -int EDBM_vertColorCheck(BMEditMesh *em) +int EDBM_vert_color_check(BMEditMesh *em) { /* some of these checks could be a touch overkill */ return em && em->bm->totface && CustomData_has_layer(&em->bm->ldata, CD_MLOOPCOL); @@ -1001,11 +997,31 @@ static BMVert *cache_mirr_intptr_as_bmvert(intptr_t *index_lookup, int index) return (eve_i == -1) ? NULL : (BMVert *)eve_i; } +/** + * [note: I've decided to use ideasman's code for non-editmode stuff, but since + * it has a big "not for editmode!" disclaimer, I'm going to keep what I have here + * - joeedh] + * + * x-mirror editing api. usage: + * + * EDBM_verts_mirror_cache_begin(em); + * ... + * ... + * BM_ITER(v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) { + * mirrorv = EDBM_verts_mirror_get(em, v); + * } + * ... + * ... + * EDBM_verts_mirror_cache_end(em); + * + * \note why do we only allow x axis mirror editing? + */ + /* BM_SEARCH_MAXDIST is too big, copied from 2.6x MOC_THRESH, should become a * preference */ #define BM_SEARCH_MAXDIST_MIRR 0.00002f #define BM_CD_LAYER_ID "__mirror_index" -void EDBM_CacheMirrorVerts(BMEditMesh *em, const short use_select) +void EDBM_verts_mirror_cache_begin(BMEditMesh *em, const short use_select) { Mesh *me = em->me; BMesh *bm = em->bm; @@ -1022,7 +1038,7 @@ void EDBM_CacheMirrorVerts(BMEditMesh *em, const short use_select) } if (!em->vert_index) { - EDBM_init_index_arrays(em, 1, 0, 0); + EDBM_index_arrays_init(em, 1, 0, 0); em->mirr_free_arrays = 1; } @@ -1084,7 +1100,7 @@ void EDBM_CacheMirrorVerts(BMEditMesh *em, const short use_select) em->mirror_cdlayer = li; } -BMVert *EDBM_GetMirrorVert(BMEditMesh *em, BMVert *v) +BMVert *EDBM_verts_mirror_get(BMEditMesh *em, BMVert *v) { int *mirr = CustomData_bmesh_get_layer_n(&em->bm->vdata, v->head.data, em->mirror_cdlayer); @@ -1093,7 +1109,7 @@ BMVert *EDBM_GetMirrorVert(BMEditMesh *em, BMVert *v) if (mirr && *mirr >= 0 && *mirr < em->bm->totvert) { if (!em->vert_index) { printf("err: should only be called between " - "EDBM_CacheMirrorVerts and EDBM_EndMirrorCache"); + "EDBM_verts_mirror_cache_begin and EDBM_verts_mirror_cache_end"); return NULL; } @@ -1103,7 +1119,7 @@ BMVert *EDBM_GetMirrorVert(BMEditMesh *em, BMVert *v) return NULL; } -void EDBM_ClearMirrorVert(BMEditMesh *em, BMVert *v) +void EDBM_verts_mirror_cache_clear(BMEditMesh *em, BMVert *v) { int *mirr = CustomData_bmesh_get_layer_n(&em->bm->vdata, v->head.data, em->mirror_cdlayer); @@ -1114,7 +1130,7 @@ void EDBM_ClearMirrorVert(BMEditMesh *em, BMVert *v) } } -void EDBM_EndMirrorCache(BMEditMesh *em) +void EDBM_verts_mirror_cache_end(BMEditMesh *em) { if (em->mirr_free_arrays) { MEM_freeN(em->vert_index); @@ -1124,7 +1140,7 @@ void EDBM_EndMirrorCache(BMEditMesh *em) em->mirror_cdlayer = -1; } -void EDBM_ApplyMirrorCache(BMEditMesh *em, const int sel_from, const int sel_to) +void EDBM_verts_mirror_apply(BMEditMesh *em, const int sel_from, const int sel_to) { BMIter iter; BMVert *v; @@ -1133,7 +1149,7 @@ void EDBM_ApplyMirrorCache(BMEditMesh *em, const int sel_from, const int sel_to) BM_ITER(v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) { if (BM_elem_flag_test(v, BM_ELEM_SELECT) == sel_from) { - BMVert *mirr = EDBM_GetMirrorVert(em, v); + BMVert *mirr = EDBM_verts_mirror_get(em, v); if (mirr) { if (BM_elem_flag_test(mirr, BM_ELEM_SELECT) == sel_to) { copy_v3_v3(mirr->co, v->co); @@ -1146,7 +1162,7 @@ void EDBM_ApplyMirrorCache(BMEditMesh *em, const int sel_from, const int sel_to) /* swap is 0 or 1, if 1 it hides not selected */ -void EDBM_hide_mesh(BMEditMesh *em, int swap) +void EDBM_mesh_hide(BMEditMesh *em, int swap) { BMIter iter; BMElem *ele; @@ -1178,7 +1194,7 @@ void EDBM_hide_mesh(BMEditMesh *em, int swap) } -void EDBM_reveal_mesh(BMEditMesh *em) +void EDBM_mesh_reveal(BMEditMesh *em) { const char iter_types[3] = {BM_VERTS_OF_MESH, BM_EDGES_OF_MESH, @@ -1257,17 +1273,17 @@ void EDBM_editselection_plane(BMEditMesh *em, float *plane, BMEditSelection *ese BM_editselection_plane(em->bm, plane, ese); } -void EDBM_remove_selection(BMEditMesh *em, BMElem *ele) +void EDBM_editselection_remove(BMEditMesh *em, BMHeader *ele) { - BM_select_history_remove(em->bm, ele); + BM_select_history_remove(em->bm, (BMElem *)ele); } -void EDBM_store_selection(BMEditMesh *em, BMElem *ele) +void EDBM_editselection_store(BMEditMesh *em, BMHeader *ele) { - BM_select_history_store(em->bm, ele); + BM_select_history_store(em->bm, (BMElem *)ele); } -void EDBM_validate_selections(BMEditMesh *em) +void EDBM_editselection_validate(BMEditMesh *em) { BM_select_history_validate(em->bm); } diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c index fe3fe698626..2ea5ac800ce 100644 --- a/source/blender/editors/mesh/mesh_data.c +++ b/source/blender/editors/mesh/mesh_data.c @@ -604,7 +604,7 @@ static int drop_named_image_invoke(bContext *C, wmOperator *op, wmEvent *event) obedit = base->object; me = obedit->data; if (me->edit_btmesh == NULL) { - EDBM_MakeEditBMesh(scene->toolsettings, scene, obedit); + EDBM_mesh_make(scene->toolsettings, scene, obedit); exitmode = 1; } if (me->edit_btmesh == NULL) @@ -613,8 +613,8 @@ static int drop_named_image_invoke(bContext *C, wmOperator *op, wmEvent *event) ED_uvedit_assign_image(bmain, scene, obedit, ima, NULL); if (exitmode) { - EDBM_LoadEditBMesh(scene, obedit); - EDBM_FreeEditBMesh(me->edit_btmesh); + EDBM_mesh_load(scene, obedit); + EDBM_mesh_free(me->edit_btmesh); MEM_freeN(me->edit_btmesh); me->edit_btmesh = NULL; diff --git a/source/blender/editors/mesh/mesh_intern.h b/source/blender/editors/mesh/mesh_intern.h index 4f94294e6c6..59d7b24f7b8 100644 --- a/source/blender/editors/mesh/mesh_intern.h +++ b/source/blender/editors/mesh/mesh_intern.h @@ -35,18 +35,19 @@ #ifndef __MESH_INTERN_H__ #define __MESH_INTERN_H__ -struct bContext; -struct wmOperatorType; -struct ViewContext; -struct BMEditMesh; -struct BMesh; struct BMEdge; +struct BMEditMesh; struct BMFace; +struct BMHeader; struct BMOperator; -struct wmOperator; -struct wmKeyMap; -struct wmKeyConfig; +struct BMesh; struct EnumPropertyItem; +struct ViewContext; +struct bContext; +struct wmKeyConfig; +struct wmKeyMap; +struct wmOperator; +struct wmOperatorType; /* ******************** bmeshutils.c */ @@ -57,26 +58,29 @@ struct EnumPropertyItem; */ /*calls a bmesh op, reporting errors to the user, etc*/ -int EDBM_CallOpf(struct BMEditMesh *em, struct wmOperator *op, const char *fmt, ...); +int EDBM_op_callf(struct BMEditMesh *em, struct wmOperator *op, const char *fmt, ...); + +int EDBM_op_call_and_selectf(struct BMEditMesh *em, struct wmOperator *op, + const char *selectslot, const char *fmt, ...); /* same as above, but doesn't report errors.*/ -int EDBM_CallOpfSilent(struct BMEditMesh *em, const char *fmt, ...); +int EDBM_op_call_silentf(struct BMEditMesh *em, const char *fmt, ...); -/* these next two functions are the split version of EDBM_CallOpf, so you can +/* these next two functions are the split version of EDBM_op_callf, so you can * do stuff with a bmesh operator, after initializing it but before executing * it. * * execute the operator with BM_Exec_Op */ -int EDBM_InitOpf(struct BMEditMesh *em, struct BMOperator *bmop, - struct wmOperator *op, const char *fmt, ...); +int EDBM_op_init(struct BMEditMesh *em, struct BMOperator *bmop, + struct wmOperator *op, const char *fmt, ...); /*cleans up after a bmesh operator*/ -int EDBM_FinishOp(struct BMEditMesh *em, struct BMOperator *bmop, - struct wmOperator *op, const int report); +int EDBM_op_finish(struct BMEditMesh *em, struct BMOperator *bmop, + struct wmOperator *op, const int report); void EDBM_flag_disable_all(struct BMEditMesh *em, const char hflag); -void EDBM_store_selection(struct BMEditMesh *em, void *data); -void EDBM_validate_selections(struct BMEditMesh *em); -void EDBM_remove_selection(struct BMEditMesh *em, void *data); +void EDBM_editselection_store(struct BMEditMesh *em, struct BMHeader *ele); +void EDBM_editselection_validate(struct BMEditMesh *em); +void EDBM_editselection_remove(struct BMEditMesh *em, struct BMHeader *ele); void EDBM_stats_update(struct BMEditMesh *em); /* TODO, move to math_geometry.c */ diff --git a/source/blender/editors/mesh/mesh_navmesh.c b/source/blender/editors/mesh/mesh_navmesh.c index c95a81d5a37..f1b0a82b654 100644 --- a/source/blender/editors/mesh/mesh_navmesh.c +++ b/source/blender/editors/mesh/mesh_navmesh.c @@ -326,7 +326,7 @@ static Object *createRepresentation(bContext *C, struct recast_polyMesh *pmesh, if (!createob) { /* clear */ - EDBM_ClearMesh(em); + EDBM_mesh_clear(em); } /* create verts for polygon mesh */ @@ -373,7 +373,7 @@ static Object *createRepresentation(bContext *C, struct recast_polyMesh *pmesh, BM_vert_create(em->bm, co, NULL); } - EDBM_init_index_arrays(em, 1, 0, 0); + EDBM_index_arrays_init(em, 1, 0, 0); /* create faces */ for (j = 0; j < trinum; j++) { @@ -388,9 +388,9 @@ static Object *createRepresentation(bContext *C, struct recast_polyMesh *pmesh, face[k] = uniquevbase + tri[k] - nv; /* unique vertex */ } newFace = BM_face_create_quad_tri(em->bm, - EDBM_get_vert_for_index(em, face[0]), - EDBM_get_vert_for_index(em, face[2]), - EDBM_get_vert_for_index(em, face[1]), NULL, + EDBM_vert_at_index(em, face[0]), + EDBM_vert_at_index(em, face[2]), + EDBM_vert_at_index(em, face[1]), NULL, NULL, FALSE); /* set navigation polygon idx to the custom layer */ @@ -398,7 +398,7 @@ static Object *createRepresentation(bContext *C, struct recast_polyMesh *pmesh, *polygonIdx = i + 1; /* add 1 to avoid zero idx */ } - EDBM_free_index_arrays(em); + EDBM_index_arrays_free(em); } recast_destroyPolyMesh(pmesh); diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c index 3dfc66bce25..f6fd4b45288 100644 --- a/source/blender/editors/mesh/meshtools.c +++ b/source/blender/editors/mesh/meshtools.c @@ -542,9 +542,9 @@ int join_mesh_exec(bContext *C, wmOperator *op) ED_object_exit_editmode(C, EM_FREEDATA | EM_WAITCURSOR | EM_DO_UNDO); #else /* toggle editmode using lower level functions so this can be called from python */ - EDBM_MakeEditBMesh(scene->toolsettings, scene, ob); - EDBM_LoadEditBMesh(scene, ob); - EDBM_FreeEditBMesh(me->edit_btmesh); + EDBM_mesh_make(scene->toolsettings, scene, ob); + EDBM_mesh_load(scene, ob); + EDBM_mesh_free(me->edit_btmesh); MEM_freeN(me->edit_btmesh); me->edit_btmesh = NULL; DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA); diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 4d0e67eafee..c40ea73d543 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -327,10 +327,10 @@ void ED_object_exit_editmode(bContext *C, int flag) return; } - EDBM_LoadEditBMesh(scene, obedit); + EDBM_mesh_load(scene, obedit); if (freedata) { - EDBM_FreeEditBMesh(me->edit_btmesh); + EDBM_mesh_free(me->edit_btmesh); MEM_freeN(me->edit_btmesh); me->edit_btmesh= NULL; } @@ -444,7 +444,7 @@ void ED_object_enter_editmode(bContext *C, int flag) ok= 1; scene->obedit = ob; /* context sees this */ - EDBM_MakeEditBMesh(CTX_data_tool_settings(C), scene, ob); + EDBM_mesh_make(CTX_data_tool_settings(C), scene, ob); em = BMEdit_FromObject(ob); if (LIKELY(em)) { diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c index 7bb2be8e248..bdb53e25a07 100644 --- a/source/blender/editors/object/object_hook.c +++ b/source/blender/editors/object/object_hook.c @@ -308,8 +308,8 @@ static int object_hook_index_array(Scene *scene, Object *obedit, int *tot, int * BMEditMesh *em; - EDBM_LoadEditBMesh(scene, obedit); - EDBM_MakeEditBMesh(scene->toolsettings, scene, obedit); + EDBM_mesh_load(scene, obedit); + EDBM_mesh_make(scene->toolsettings, scene, obedit); em = me->edit_btmesh; diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 341ba368729..f9b0cfeedb8 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -128,8 +128,8 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op) Mesh *me= obedit->data; BMEditMesh *em; - EDBM_LoadEditBMesh(scene, obedit); - EDBM_MakeEditBMesh(scene->toolsettings, scene, obedit); + EDBM_mesh_load(scene, obedit); + EDBM_mesh_make(scene->toolsettings, scene, obedit); em= me->edit_btmesh; diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c index 1d502aeb55c..474d10ffbd8 100644 --- a/source/blender/editors/object/object_transform.c +++ b/source/blender/editors/object/object_transform.c @@ -704,7 +704,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) sub_v3_v3(eve->co, cent); } - EDBM_RecalcNormals(em); + EDBM_mesh_normals_update(em); tot_change++; DAG_id_tag_update(&obedit->id, OB_RECALC_DATA); } diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c index cc8f91e4558..e0f808aa1a1 100644 --- a/source/blender/editors/object/object_vgroup.c +++ b/source/blender/editors/object/object_vgroup.c @@ -1527,11 +1527,11 @@ void ED_vgroup_mirror(Object *ob, const short mirror_weights, const short flip_v goto cleanup; } - EDBM_CacheMirrorVerts(em, FALSE); + EDBM_verts_mirror_cache_begin(em, FALSE); /* Go through the list of editverts and assign them */ BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) { - if ((eve_mirr= EDBM_GetMirrorVert(em, eve))) { + if ((eve_mirr= EDBM_verts_mirror_get(em, eve))) { sel= BM_elem_flag_test(eve, BM_ELEM_SELECT); sel_mirr= BM_elem_flag_test(eve_mirr, BM_ELEM_SELECT); @@ -1544,11 +1544,11 @@ void ED_vgroup_mirror(Object *ob, const short mirror_weights, const short flip_v } /* don't use these again */ - EDBM_ClearMirrorVert(em, eve); - EDBM_ClearMirrorVert(em, eve_mirr); + EDBM_verts_mirror_cache_clear(em, eve); + EDBM_verts_mirror_cache_clear(em, eve_mirr); } } - EDBM_EndMirrorCache(em); + EDBM_verts_mirror_cache_end(em); } else { /* object mode / weight paint */ diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 40b04437cdf..d2cf5c3c294 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -4668,7 +4668,7 @@ static int uv_sculpt_brush_poll(bContext *C) return 0; em = BMEdit_FromObject(obedit); - ret = EDBM_texFaceCheck(em); + ret = EDBM_mtexpoly_check(em); if (ret && sima) { ARegion *ar= CTX_wm_region(C); diff --git a/source/blender/editors/sculpt_paint/sculpt_uv.c b/source/blender/editors/sculpt_paint/sculpt_uv.c index 240a8feeb88..4aa56266a21 100644 --- a/source/blender/editors/sculpt_paint/sculpt_uv.c +++ b/source/blender/editors/sculpt_paint/sculpt_uv.c @@ -416,7 +416,7 @@ static void uv_sculpt_stroke_exit(bContext *C, wmOperator *op) WM_event_remove_timer(CTX_wm_manager(C), CTX_wm_window(C), data->timer); } if (data->elementMap) { - EDBM_free_uv_element_map(data->elementMap); + EDBM_uv_element_map_free(data->elementMap); } if (data->uv) { MEM_freeN(data->uv); @@ -435,9 +435,9 @@ static void uv_sculpt_stroke_exit(bContext *C, wmOperator *op) op->customdata = NULL; } -static int get_uv_element_offset_from_face(UvElementMap *map, BMFace *efa, BMLoop *l, int island_index, int doIslands) +static int uv_element_offset_from_face_get(UvElementMap *map, BMFace *efa, BMLoop *l, int island_index, int doIslands) { - UvElement *element = ED_get_uv_element(map, efa, l); + UvElement *element = ED_uv_element_get(map, efa, l); if (!element || (doIslands && element->island != island_index)) { return -1; } @@ -501,18 +501,18 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, wmEvent if (do_island_optimization) { /* We will need island information */ if (ts->uv_flag & UV_SYNC_SELECTION) { - data->elementMap = EDBM_make_uv_element_map(em, 0, 1); + data->elementMap = EDBM_uv_element_map_create(em, 0, 1); } else { - data->elementMap = EDBM_make_uv_element_map(em, 1, 1); + data->elementMap = EDBM_uv_element_map_create(em, 1, 1); } } else { if (ts->uv_flag & UV_SYNC_SELECTION) { - data->elementMap = EDBM_make_uv_element_map(em, 0, 0); + data->elementMap = EDBM_uv_element_map_create(em, 0, 0); } else { - data->elementMap = EDBM_make_uv_element_map(em, 1, 0); + data->elementMap = EDBM_uv_element_map_create(em, 1, 0); } } @@ -531,7 +531,7 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, wmEvent Image *ima= CTX_data_edit_image(C); uv_find_nearest_vert(scene, ima, em, co, NULL, &hit); - element = ED_get_uv_element(data->elementMap, hit.efa, hit.l); + element = ED_uv_element_get(data->elementMap, hit.efa, hit.l); island_index = element->island; } @@ -597,8 +597,8 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, wmEvent counter = 0; BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) { BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) { - int offset1, itmp1 = get_uv_element_offset_from_face(data->elementMap, efa, l, island_index, do_island_optimization); - int offset2, itmp2 = get_uv_element_offset_from_face(data->elementMap, efa, l->next, island_index, do_island_optimization); + int offset1, itmp1 = uv_element_offset_from_face_get(data->elementMap, efa, l, island_index, do_island_optimization); + int offset2, itmp2 = uv_element_offset_from_face_get(data->elementMap, efa, l->next, island_index, do_island_optimization); /* Skip edge if not found(unlikely) or not on valid island */ if (itmp1 == -1 || itmp2 == -1) diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index f1967477d7a..55f767375d2 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -279,7 +279,7 @@ int ED_space_image_show_uvedit(SpaceImage *sima, Object *obedit) struct BMEditMesh *em = BMEdit_FromObject(obedit); int ret; - ret = EDBM_texFaceCheck(em); + ret = EDBM_mtexpoly_check(em); return ret; } @@ -297,7 +297,7 @@ int ED_space_image_show_uvshadow(SpaceImage *sima, Object *obedit) struct BMEditMesh *em = BMEdit_FromObject(obedit); int ret; - ret = EDBM_texFaceCheck(em); + ret = EDBM_mtexpoly_check(em); return ret; } @@ -605,10 +605,10 @@ static void image_refresh(const bContext *C, ScrArea *UNUSED(sa)) /* old shading system, we set texface */ MTexPoly *tf; - if (em && EDBM_texFaceCheck(em)) { + if (em && EDBM_mtexpoly_check(em)) { sima->image= NULL; - tf = EDBM_get_active_mtexpoly(em, NULL, TRUE); /* partially selected face is ok */ + tf = EDBM_mtexpoly_active_get(em, NULL, TRUE); /* partially selected face is ok */ if (tf) { /* don't need to check for pin here, see above */ diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c index 211104e60f0..39f1552c8a6 100644 --- a/source/blender/editors/space_view3d/drawmesh.c +++ b/source/blender/editors/space_view3d/drawmesh.c @@ -564,7 +564,7 @@ static DMDrawOption draw_em_tf_mapped__set_draw(void *userData, int index) { drawEMTFMapped_userData *data = userData; BMEditMesh *em = data->em; - BMFace *efa = EDBM_get_face_for_index(em, index); + BMFace *efa = EDBM_face_at_index(em, index); if (efa == NULL || BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) { return DM_DRAW_OPTION_SKIP; @@ -924,7 +924,7 @@ static int tex_mat_set_face_editmesh_cb(void *userData, int index) /* editmode face hiding */ TexMatCallback *data = (TexMatCallback *)userData; Mesh *me = (Mesh *)data->me; - BMFace *efa = EDBM_get_face_for_index(me->edit_btmesh, index); + BMFace *efa = EDBM_face_at_index(me->edit_btmesh, index); return !BM_elem_flag_test(efa, BM_ELEM_HIDDEN); } diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 0332bd0bdb7..258debc8e60 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -2021,7 +2021,7 @@ static void drawlattice(Scene *scene, View3D *v3d, Object *ob) static void mesh_foreachScreenVert__mapFunc(void *userData, int index, float *co, float *UNUSED(no_f), short *UNUSED(no_s)) { foreachScreenVert_userData *data = userData; - BMVert *eve = EDBM_get_vert_for_index(data->vc.em, index); + BMVert *eve = EDBM_vert_at_index(data->vc.em, index); if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) { short s[2] = {IS_CLIPPED, 0}; @@ -2056,9 +2056,9 @@ void mesh_foreachScreenVert( if (clipVerts != V3D_CLIP_TEST_OFF) ED_view3d_clipping_local(vc->rv3d, vc->obedit->obmat); /* for local clipping lookups */ - EDBM_init_index_arrays(vc->em, 1, 0, 0); + EDBM_index_arrays_init(vc->em, 1, 0, 0); dm->foreachMappedVert(dm, mesh_foreachScreenVert__mapFunc, &data); - EDBM_free_index_arrays(vc->em); + EDBM_index_arrays_free(vc->em); dm->release(dm); } @@ -2100,7 +2100,7 @@ static int is_co_in_region(ARegion *ar, const short co[2]) static void mesh_foreachScreenEdge__mapFunc(void *userData, int index, float *v0co, float *v1co) { foreachScreenEdge_userData *data = userData; - BMEdge *eed = EDBM_get_edge_for_index(data->vc.em, index); + BMEdge *eed = EDBM_edge_at_index(data->vc.em, index); if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN)) { short s[2][2]; @@ -2147,9 +2147,9 @@ void mesh_foreachScreenEdge( if (clipVerts != V3D_CLIP_TEST_OFF) ED_view3d_clipping_local(vc->rv3d, vc->obedit->obmat); /* for local clipping lookups */ - EDBM_init_index_arrays(vc->em, 0, 1, 0); + EDBM_index_arrays_init(vc->em, 0, 1, 0); dm->foreachMappedEdge(dm, mesh_foreachScreenEdge__mapFunc, &data); - EDBM_free_index_arrays(vc->em); + EDBM_index_arrays_free(vc->em); dm->release(dm); } @@ -2157,7 +2157,7 @@ void mesh_foreachScreenEdge( static void mesh_foreachScreenFace__mapFunc(void *userData, int index, float *cent, float *UNUSED(no)) { foreachScreenFace_userData *data = userData; - BMFace *efa = EDBM_get_face_for_index(data->vc.em, index); + BMFace *efa = EDBM_face_at_index(data->vc.em, index); if (efa && !BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) { float cent2[3]; @@ -2187,9 +2187,9 @@ void mesh_foreachScreenFace( //if (clipVerts) ED_view3d_clipping_local(vc->rv3d, vc->obedit->obmat); /* for local clipping lookups */ - EDBM_init_index_arrays(vc->em, 0, 0, 1); + EDBM_index_arrays_init(vc->em, 0, 0, 1); dm->foreachMappedFaceCenter(dm, mesh_foreachScreenFace__mapFunc, &data); - EDBM_free_index_arrays(vc->em); + EDBM_index_arrays_free(vc->em); dm->release(dm); } @@ -2261,7 +2261,7 @@ void nurbs_foreachScreenVert( static void draw_dm_face_normals__mapFunc(void *userData, int index, float *cent, float *no) { drawDMNormal_userData *data = userData; - BMFace *efa = EDBM_get_face_for_index(data->em, index); + BMFace *efa = EDBM_face_at_index(data->em, index); if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) { glVertex3fv(cent); @@ -2284,7 +2284,7 @@ static void draw_dm_face_normals(BMEditMesh *em, Scene *scene, DerivedMesh *dm) static void draw_dm_face_centers__mapFunc(void *userData, int index, float *cent, float *UNUSED(no)) { - BMFace *efa = EDBM_get_face_for_index(((void **)userData)[0], index); + BMFace *efa = EDBM_face_at_index(((void **)userData)[0], index); int sel = *(((int **)userData)[1]); if (efa && !BM_elem_flag_test(efa, BM_ELEM_HIDDEN) && BM_elem_flag_test(efa, BM_ELEM_SELECT) == sel) { @@ -2303,7 +2303,7 @@ static void draw_dm_face_centers(BMEditMesh *em, DerivedMesh *dm, int sel) static void draw_dm_vert_normals__mapFunc(void *userData, int index, float *co, float *no_f, short *no_s) { drawDMNormal_userData *data = userData; - BMVert *eve = EDBM_get_vert_for_index(data->em, index); + BMVert *eve = EDBM_vert_at_index(data->em, index); if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) { glVertex3fv(co); @@ -2336,7 +2336,7 @@ static void draw_dm_vert_normals(BMEditMesh *em, Scene *scene, DerivedMesh *dm) static void draw_dm_verts__mapFunc(void *userData, int index, float *co, float *UNUSED(no_f), short *UNUSED(no_s)) { drawDMVerts_userData *data = userData; - BMVert *eve = EDBM_get_vert_for_index(data->em, index); + BMVert *eve = EDBM_vert_at_index(data->em, index); if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN) && BM_elem_flag_test(eve, BM_ELEM_SELECT) == data->sel) { /* draw active larger - need to stop/start point drawing for this :/ */ @@ -2381,7 +2381,7 @@ static DMDrawOption draw_dm_edges_sel__setDrawOptions(void *userData, int index) drawDMEdgesSel_userData *data = userData; unsigned char *col; - eed = EDBM_get_edge_for_index(data->em, index); + eed = EDBM_edge_at_index(data->em, index); if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN)) { if (eed == data->eed_act) { @@ -2422,7 +2422,7 @@ static void draw_dm_edges_sel(BMEditMesh *em, DerivedMesh *dm, unsigned char *ba /* Draw edges */ static DMDrawOption draw_dm_edges__setDrawOptions(void *userData, int index) { - if (BM_elem_flag_test(EDBM_get_edge_for_index(userData, index), BM_ELEM_HIDDEN)) + if (BM_elem_flag_test(EDBM_edge_at_index(userData, index), BM_ELEM_HIDDEN)) return DM_DRAW_OPTION_SKIP; else return DM_DRAW_OPTION_NORMAL; @@ -2436,14 +2436,14 @@ static void draw_dm_edges(BMEditMesh *em, DerivedMesh *dm) /* Draw edges with color interpolated based on selection */ static DMDrawOption draw_dm_edges_sel_interp__setDrawOptions(void *userData, int index) { - if (BM_elem_flag_test(EDBM_get_edge_for_index(((void **)userData)[0], index), BM_ELEM_HIDDEN)) + if (BM_elem_flag_test(EDBM_edge_at_index(((void **)userData)[0], index), BM_ELEM_HIDDEN)) return DM_DRAW_OPTION_SKIP; else return DM_DRAW_OPTION_NORMAL; } static void draw_dm_edges_sel_interp__setDrawInterpOptions(void *userData, int index, float t) { - BMEdge *eed = EDBM_get_edge_for_index(((void **)userData)[0], index); + BMEdge *eed = EDBM_edge_at_index(((void **)userData)[0], index); unsigned char **cols = userData; unsigned char *col0 = cols[(BM_elem_flag_test(eed->v1, BM_ELEM_SELECT)) ? 2 : 1]; unsigned char *col1 = cols[(BM_elem_flag_test(eed->v2, BM_ELEM_SELECT)) ? 2 : 1]; @@ -2464,7 +2464,7 @@ static void draw_dm_edges_sel_interp(BMEditMesh *em, DerivedMesh *dm, unsigned c /* Draw only seam edges */ static DMDrawOption draw_dm_edges_seams__setDrawOptions(void *userData, int index) { - BMEdge *eed = EDBM_get_edge_for_index(userData, index); + BMEdge *eed = EDBM_edge_at_index(userData, index); if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN) && BM_elem_flag_test(eed, BM_ELEM_SEAM)) return DM_DRAW_OPTION_NORMAL; @@ -2480,7 +2480,7 @@ static void draw_dm_edges_seams(BMEditMesh *em, DerivedMesh *dm) /* Draw only sharp edges */ static DMDrawOption draw_dm_edges_sharp__setDrawOptions(void *userData, int index) { - BMEdge *eed = EDBM_get_edge_for_index(userData, index); + BMEdge *eed = EDBM_edge_at_index(userData, index); if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN) && !BM_elem_flag_test(eed, BM_ELEM_SMOOTH)) return DM_DRAW_OPTION_NORMAL; @@ -2499,7 +2499,7 @@ static void draw_dm_edges_sharp(BMEditMesh *em, DerivedMesh *dm) static DMDrawOption draw_dm_faces_sel__setDrawOptions(void *userData, int index) { drawDMFacesSel_userData *data = userData; - BMFace *efa = EDBM_get_face_for_index(data->em, index); + BMFace *efa = EDBM_face_at_index(data->em, index); unsigned char *col; if (!efa) @@ -2533,8 +2533,8 @@ static int draw_dm_faces_sel__compareDrawOptions(void *userData, int index, int if (!data->orig_index) return 0; - efa = EDBM_get_face_for_index(data->em, data->orig_index[index]); - next_efa = EDBM_get_face_for_index(data->em, data->orig_index[next_index]); + efa = EDBM_face_at_index(data->em, data->orig_index[index]); + next_efa = EDBM_face_at_index(data->em, data->orig_index[next_index]); if (efa == next_efa) return 1; @@ -2570,7 +2570,7 @@ static void draw_dm_faces_sel(BMEditMesh *em, DerivedMesh *dm, unsigned char *ba static DMDrawOption draw_dm_creases__setDrawOptions(void *userData, int index) { BMEditMesh *em = userData; - BMEdge *eed = EDBM_get_edge_for_index(userData, index); + BMEdge *eed = EDBM_edge_at_index(userData, index); float *crease = eed ? (float *)CustomData_bmesh_get(&em->bm->edata, eed->head.data, CD_CREASE) : NULL; if (!crease) @@ -2594,7 +2594,7 @@ static void draw_dm_creases(BMEditMesh *em, DerivedMesh *dm) static DMDrawOption draw_dm_bweights__setDrawOptions(void *userData, int index) { BMEditMesh *em = userData; - BMEdge *eed = EDBM_get_edge_for_index(userData, index); + BMEdge *eed = EDBM_edge_at_index(userData, index); float *bweight = (float *)CustomData_bmesh_get(&em->bm->edata, eed->head.data, CD_BWEIGHT); if (!bweight) @@ -2611,7 +2611,7 @@ static DMDrawOption draw_dm_bweights__setDrawOptions(void *userData, int index) static void draw_dm_bweights__mapFunc(void *userData, int index, float *co, float *UNUSED(no_f), short *UNUSED(no_s)) { BMEditMesh *em = userData; - BMVert *eve = EDBM_get_vert_for_index(userData, index); + BMVert *eve = EDBM_vert_at_index(userData, index); float *bweight = (float *)CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_BWEIGHT); if (!bweight) @@ -2983,7 +2983,7 @@ static void draw_em_indices(BMEditMesh *em) static DMDrawOption draw_em_fancy__setFaceOpts(void *userData, int index) { - BMFace *efa = EDBM_get_face_for_index(userData, index); + BMFace *efa = EDBM_face_at_index(userData, index); if (efa && !BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) { GPU_enable_material(efa->mat_nr + 1, NULL); @@ -2995,7 +2995,7 @@ static DMDrawOption draw_em_fancy__setFaceOpts(void *userData, int index) static DMDrawOption draw_em_fancy__setGLSLFaceOpts(void *userData, int index) { - BMFace *efa = EDBM_get_face_for_index(userData, index); + BMFace *efa = EDBM_face_at_index(userData, index); if (BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) return DM_DRAW_OPTION_SKIP; @@ -3029,7 +3029,7 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d, } } - EDBM_init_index_arrays(em, 1, 1, 1); + EDBM_index_arrays_init(em, 1, 1, 1); if (dt > OB_WIRE) { if (CHECK_OB_DRAWTEXTURE(v3d, dt)) { @@ -3179,7 +3179,7 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d, GPU_disable_material(); } - EDBM_free_index_arrays(em); + EDBM_index_arrays_free(em); } /* Mesh drawing routines */ @@ -7167,7 +7167,7 @@ static void bbs_mesh_verts__mapFunc(void *userData, int index, float *co, float { void **ptrs = userData; int offset = (intptr_t) ptrs[0]; - BMVert *eve = EDBM_get_vert_for_index(ptrs[1], index); + BMVert *eve = EDBM_vert_at_index(ptrs[1], index); if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) { WM_set_framebuffer_index_color(offset + index); @@ -7189,7 +7189,7 @@ static DMDrawOption bbs_mesh_wire__setDrawOptions(void *userData, int index) { void **ptrs = userData; int offset = (intptr_t) ptrs[0]; - BMEdge *eed = EDBM_get_edge_for_index(ptrs[1], index); + BMEdge *eed = EDBM_edge_at_index(ptrs[1], index); if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN)) { WM_set_framebuffer_index_color(offset + index); @@ -7207,7 +7207,7 @@ static void bbs_mesh_wire(BMEditMesh *em, DerivedMesh *dm, int offset) static DMDrawOption bbs_mesh_solid__setSolidDrawOptions(void *userData, int index) { - BMFace *efa = EDBM_get_face_for_index(((void **)userData)[0], index); + BMFace *efa = EDBM_face_at_index(((void **)userData)[0], index); if (efa && !BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) { if (((void **)userData)[1]) { @@ -7222,7 +7222,7 @@ static DMDrawOption bbs_mesh_solid__setSolidDrawOptions(void *userData, int inde static void bbs_mesh_solid__drawCenter(void *userData, int index, float *cent, float *UNUSED(no)) { - BMFace *efa = EDBM_get_face_for_index(((void **)userData)[0], index); + BMFace *efa = EDBM_face_at_index(((void **)userData)[0], index); if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) { WM_set_framebuffer_index_color(index + 1); @@ -7319,7 +7319,7 @@ void draw_object_backbufsel(Scene *scene, View3D *v3d, RegionView3D *rv3d, Objec DerivedMesh *dm = editbmesh_get_derived_cage(scene, ob, em, CD_MASK_BAREMESH); - EDBM_init_index_arrays(em, 1, 1, 1); + EDBM_index_arrays_init(em, 1, 1, 1); bbs_mesh_solid_EM(em, scene, v3d, ob, dm, ts->selectmode & SCE_SELECT_FACE); if (ts->selectmode & SCE_SELECT_FACE) @@ -7346,7 +7346,7 @@ void draw_object_backbufsel(Scene *scene, View3D *v3d, RegionView3D *rv3d, Objec dm->release(dm); - EDBM_free_index_arrays(em); + EDBM_index_arrays_free(em); } else { Mesh *me = ob->data; diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c index f714260ed41..08d0afb1879 100644 --- a/source/blender/editors/space_view3d/view3d_buttons.c +++ b/source/blender/editors/space_view3d/view3d_buttons.c @@ -445,7 +445,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float } } - EDBM_RecalcNormals(em); + EDBM_mesh_normals_update(em); } if (median[3] != 0.0f) { @@ -523,7 +523,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float } } } - EDBM_RecalcNormals(em); + EDBM_mesh_normals_update(em); } else if (ELEM(ob->type, OB_CURVE, OB_SURF)) { Curve *cu = ob->data; diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index aa76d9a94c1..a3031bc3cfa 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -374,7 +374,7 @@ static void do_view3d_header_buttons(bContext *C, void *UNUSED(arg), int event) if (em) { if (shift == 0 || em->selectmode == 0) { if ( (em->selectmode ^ SCE_SELECT_EDGE) == SCE_SELECT_VERTEX) { - if (ctrl) EDBM_convertsel(em, SCE_SELECT_VERTEX, SCE_SELECT_EDGE); + if (ctrl) EDBM_selectmode_convert(em, SCE_SELECT_VERTEX, SCE_SELECT_EDGE); } em->selectmode = SCE_SELECT_EDGE; } @@ -388,7 +388,7 @@ static void do_view3d_header_buttons(bContext *C, void *UNUSED(arg), int event) if (em) { if (shift == 0 || em->selectmode == 0) { if ( ((ts->selectmode ^ SCE_SELECT_FACE) == SCE_SELECT_VERTEX) || ((ts->selectmode ^ SCE_SELECT_FACE) == SCE_SELECT_EDGE)) { - if (ctrl) EDBM_convertsel(em, (ts->selectmode ^ SCE_SELECT_FACE), SCE_SELECT_FACE); + if (ctrl) EDBM_selectmode_convert(em, (ts->selectmode ^ SCE_SELECT_FACE), SCE_SELECT_FACE); } em->selectmode = SCE_SELECT_FACE; } diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index 4251592e986..5646570a623 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -166,7 +166,7 @@ void view3d_get_transformation(const ARegion *ar, RegionView3D *rv3d, Object *ob /* local prototypes */ -static void EDBM_backbuf_checkAndSelectVerts(BMEditMesh *em, int select) +static void edbm_backbuf_check_and_select_verts(BMEditMesh *em, int select) { BMVert *eve; BMIter iter; @@ -175,14 +175,14 @@ static void EDBM_backbuf_checkAndSelectVerts(BMEditMesh *em, int select) eve = BM_iter_new(&iter, em->bm, BM_VERTS_OF_MESH, NULL); for (; eve; eve = BM_iter_step(&iter), index++) { if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) { - if (EDBM_check_backbuf(index)) { + if (EDBM_backbuf_check(index)) { BM_vert_select_set(em->bm, eve, select); } } } } -static void EDBM_backbuf_checkAndSelectEdges(BMEditMesh *em, int select) +static void edbm_backbuf_check_and_select_edges(BMEditMesh *em, int select) { BMEdge *eed; BMIter iter; @@ -191,14 +191,14 @@ static void EDBM_backbuf_checkAndSelectEdges(BMEditMesh *em, int select) eed = BM_iter_new(&iter, em->bm, BM_EDGES_OF_MESH, NULL); for (; eed; eed = BM_iter_step(&iter), index++) { if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN)) { - if (EDBM_check_backbuf(index)) { + if (EDBM_backbuf_check(index)) { BM_edge_select_set(em->bm, eed, select); } } } } -static void EDBM_backbuf_checkAndSelectFaces(BMEditMesh *em, int select) +static void edbm_backbuf_check_and_select_faces(BMEditMesh *em, int select) { BMFace *efa; BMIter iter; @@ -207,7 +207,7 @@ static void EDBM_backbuf_checkAndSelectFaces(BMEditMesh *em, int select) efa = BM_iter_new(&iter, em->bm, BM_FACES_OF_MESH, NULL); for (; efa; efa = BM_iter_step(&iter), index++) { if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) { - if (EDBM_check_backbuf(index)) { + if (EDBM_backbuf_check(index)) { BM_face_select_set(em->bm, efa, select); } } @@ -216,14 +216,14 @@ static void EDBM_backbuf_checkAndSelectFaces(BMEditMesh *em, int select) /* object mode, EM_ prefix is confusing here, rename? */ -static void EDBM_backbuf_checkAndSelectVerts_obmode(Mesh *me, int select) +static void edbm_backbuf_check_and_select_verts_obmode(Mesh *me, int select) { MVert *mv = me->mvert; int a; if (mv) { for (a = 1; a <= me->totvert; a++, mv++) { - if (EDBM_check_backbuf(a)) { + if (EDBM_backbuf_check(a)) { if (!(mv->flag & ME_HIDE)) { mv->flag = select ? (mv->flag | SELECT) : (mv->flag & ~SELECT); } @@ -233,14 +233,14 @@ static void EDBM_backbuf_checkAndSelectVerts_obmode(Mesh *me, int select) } /* object mode, EM_ prefix is confusing here, rename? */ -static void EDBM_backbuf_checkAndSelectTFaces(Mesh *me, int select) +static void edbm_backbuf_check_and_select_tfaces(Mesh *me, int select) { MPoly *mpoly = me->mpoly; int a; if (mpoly) { for (a = 1; a <= me->totpoly; a++, mpoly++) { - if (EDBM_check_backbuf(a)) { + if (EDBM_backbuf_check(a)) { mpoly->flag = select ? (mpoly->flag | ME_FACE_SEL) : (mpoly->flag & ~ME_FACE_SEL); } } @@ -481,7 +481,7 @@ static void do_lasso_select_mesh__doSelectEdge(void *userData, BMEdge *eed, int { LassoSelectUserData *data = userData; - if (EDBM_check_backbuf(bm_solidoffs + index)) { + if (EDBM_backbuf_check(bm_solidoffs + index)) { if (data->pass == 0) { if (edge_fully_inside_rect(data->rect, x0, y0, x1, y1) && lasso_inside(data->mcords, data->moves, x0, y0) && @@ -533,11 +533,11 @@ static void do_lasso_select_mesh(ViewContext *vc, int mcords[][2], short moves, ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d); glLoadMatrixf(vc->rv3d->viewmat); - bbsel = EDBM_mask_init_backbuf_border(vc, mcords, moves, rect.xmin, rect.ymin, rect.xmax, rect.ymax); + bbsel = EDBM_backbuf_border_mask_init(vc, mcords, moves, rect.xmin, rect.ymin, rect.xmax, rect.ymax); if (ts->selectmode & SCE_SELECT_VERTEX) { if (bbsel) { - EDBM_backbuf_checkAndSelectVerts(vc->em, select); + edbm_backbuf_check_and_select_verts(vc->em, select); } else { mesh_foreachScreenVert(vc, do_lasso_select_mesh__doSelectVert, &data, V3D_CLIP_TEST_RV3D_CLIPPING); @@ -556,14 +556,14 @@ static void do_lasso_select_mesh(ViewContext *vc, int mcords[][2], short moves, if (ts->selectmode & SCE_SELECT_FACE) { if (bbsel) { - EDBM_backbuf_checkAndSelectFaces(vc->em, select); + edbm_backbuf_check_and_select_faces(vc->em, select); } else { mesh_foreachScreenFace(vc, do_lasso_select_mesh__doSelectFace, &data); } } - EDBM_free_backbuf(); + EDBM_backbuf_free(); EDBM_selectmode_flush(vc->em); } @@ -851,11 +851,11 @@ static void do_lasso_select_paintvert(ViewContext *vc, int mcords[][2], short mo bm_vertoffs = me->totvert + 1; /* max index array */ lasso_select_boundbox(&rect, mcords, moves); - EDBM_mask_init_backbuf_border(vc, mcords, moves, rect.xmin, rect.ymin, rect.xmax, rect.ymax); + EDBM_backbuf_border_mask_init(vc, mcords, moves, rect.xmin, rect.ymin, rect.xmax, rect.ymax); - EDBM_backbuf_checkAndSelectVerts_obmode(me, select); + edbm_backbuf_check_and_select_verts_obmode(me, select); - EDBM_free_backbuf(); + EDBM_backbuf_free(); paintvert_flush_flags(ob); } @@ -874,11 +874,11 @@ static void do_lasso_select_paintface(ViewContext *vc, int mcords[][2], short mo bm_vertoffs = me->totpoly + 1; /* max index array */ lasso_select_boundbox(&rect, mcords, moves); - EDBM_mask_init_backbuf_border(vc, mcords, moves, rect.xmin, rect.ymin, rect.xmax, rect.ymax); + EDBM_backbuf_border_mask_init(vc, mcords, moves, rect.xmin, rect.ymin, rect.xmax, rect.ymax); - EDBM_backbuf_checkAndSelectTFaces(me, select); + edbm_backbuf_check_and_select_tfaces(me, select); - EDBM_free_backbuf(); + EDBM_backbuf_free(); paintface_flush_flags(ob); } @@ -1763,7 +1763,7 @@ static void do_mesh_box_select__doSelectEdge(void *userData, BMEdge *eed, int x0 { BoxSelectUserData *data = userData; - if (EDBM_check_backbuf(bm_solidoffs + index)) { + if (EDBM_backbuf_check(bm_solidoffs + index)) { if (data->pass == 0) { if (edge_fully_inside_rect(data->rect, x0, y0, x1, y1)) { BM_elem_select_set(data->vc->em->bm, eed, data->select); @@ -1804,11 +1804,11 @@ static int do_mesh_box_select(ViewContext *vc, rcti *rect, int select, int exten ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d); glLoadMatrixf(vc->rv3d->viewmat); - bbsel = EDBM_init_backbuf_border(vc, rect->xmin, rect->ymin, rect->xmax, rect->ymax); + bbsel = EDBM_backbuf_border_init(vc, rect->xmin, rect->ymin, rect->xmax, rect->ymax); if (ts->selectmode & SCE_SELECT_VERTEX) { if (bbsel) { - EDBM_backbuf_checkAndSelectVerts(vc->em, select); + edbm_backbuf_check_and_select_verts(vc->em, select); } else { mesh_foreachScreenVert(vc, do_mesh_box_select__doSelectVert, &data, V3D_CLIP_TEST_RV3D_CLIPPING); @@ -1828,14 +1828,14 @@ static int do_mesh_box_select(ViewContext *vc, rcti *rect, int select, int exten if (ts->selectmode & SCE_SELECT_FACE) { if (bbsel) { - EDBM_backbuf_checkAndSelectFaces(vc->em, select); + edbm_backbuf_check_and_select_faces(vc->em, select); } else { mesh_foreachScreenFace(vc, do_mesh_box_select__doSelectFace, &data); } } - EDBM_free_backbuf(); + EDBM_backbuf_free(); EDBM_selectmode_flush(vc->em); @@ -2332,7 +2332,7 @@ static void mesh_circle_select(ViewContext *vc, int select, const int mval[2], f int bbsel; CircleSelectUserData data; - bbsel = EDBM_init_backbuf_circle(vc, mval[0], mval[1], (short)(rad + 1.0)); + bbsel = EDBM_backbuf_circle_init(vc, mval[0], mval[1], (short)(rad + 1.0)); ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d); /* for foreach's screen/vert projection */ vc->em = BMEdit_FromObject(vc->obedit); @@ -2345,7 +2345,7 @@ static void mesh_circle_select(ViewContext *vc, int select, const int mval[2], f if (ts->selectmode & SCE_SELECT_VERTEX) { if (bbsel) { - EDBM_backbuf_checkAndSelectVerts(vc->em, select == LEFTMOUSE); + edbm_backbuf_check_and_select_verts(vc->em, select == LEFTMOUSE); } else { mesh_foreachScreenVert(vc, mesh_circle_doSelectVert, &data, V3D_CLIP_TEST_RV3D_CLIPPING); @@ -2354,7 +2354,7 @@ static void mesh_circle_select(ViewContext *vc, int select, const int mval[2], f if (ts->selectmode & SCE_SELECT_EDGE) { if (bbsel) { - EDBM_backbuf_checkAndSelectEdges(vc->em, select == LEFTMOUSE); + edbm_backbuf_check_and_select_edges(vc->em, select == LEFTMOUSE); } else { mesh_foreachScreenEdge(vc, mesh_circle_doSelectEdge, &data, V3D_CLIP_TEST_OFF); @@ -2363,14 +2363,14 @@ static void mesh_circle_select(ViewContext *vc, int select, const int mval[2], f if (ts->selectmode & SCE_SELECT_FACE) { if (bbsel) { - EDBM_backbuf_checkAndSelectFaces(vc->em, select == LEFTMOUSE); + edbm_backbuf_check_and_select_faces(vc->em, select == LEFTMOUSE); } else { mesh_foreachScreenFace(vc, mesh_circle_doSelectFace, &data); } } - EDBM_free_backbuf(); + EDBM_backbuf_free(); EDBM_selectmode_flush(vc->em); } @@ -2383,9 +2383,9 @@ static void paint_facesel_circle_select(ViewContext *vc, int select, const int m if (me) { bm_vertoffs = me->totpoly + 1; /* max index array */ - /* bbsel= */ /* UNUSED */ EDBM_init_backbuf_circle(vc, mval[0], mval[1], (short)(rad + 1.0)); - EDBM_backbuf_checkAndSelectTFaces(me, select == LEFTMOUSE); - EDBM_free_backbuf(); + /* bbsel= */ /* UNUSED */ EDBM_backbuf_circle_init(vc, mval[0], mval[1], (short)(rad + 1.0)); + edbm_backbuf_check_and_select_tfaces(me, select == LEFTMOUSE); + EDBM_backbuf_free(); } } @@ -2399,9 +2399,9 @@ static void paint_vertsel_circle_select(ViewContext *vc, int select, const int m if (me) { bm_vertoffs = me->totvert + 1; /* max index array */ - /* bbsel= */ /* UNUSED */ EDBM_init_backbuf_circle(vc, mval[0], mval[1], (short)(rad + 1.0f)); - EDBM_backbuf_checkAndSelectVerts_obmode(me, select == LEFTMOUSE); - EDBM_free_backbuf(); + /* bbsel= */ /* UNUSED */ EDBM_backbuf_circle_init(vc, mval[0], mval[1], (short)(rad + 1.0f)); + edbm_backbuf_check_and_select_verts_obmode(me, select == LEFTMOUSE); + EDBM_backbuf_free(); paintvert_flush_flags(ob); } diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c index 9d160fb361a..ac94accf991 100644 --- a/source/blender/editors/space_view3d/view3d_snap.c +++ b/source/blender/editors/space_view3d/view3d_snap.c @@ -198,7 +198,7 @@ static void set_mapped_co(void *vuserdata, int index, float *co, float *UNUSED(n void **userdata = vuserdata; BMEditMesh *em = userdata[0]; TransVert *tv = userdata[1]; - BMVert *eve = EDBM_get_vert_for_index(em, index); + BMVert *eve = EDBM_vert_at_index(em, index); if (BM_elem_index_get(eve) != -1 && !(tv[BM_elem_index_get(eve)].flag & TX_VERT_USE_MAPLOC)) { copy_v3_v3(tv[BM_elem_index_get(eve)].maploc, co); @@ -317,9 +317,9 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode) } if (transvmain && em->derivedCage) { - EDBM_init_index_arrays(em, 1, 0, 0); + EDBM_index_arrays_init(em, 1, 0, 0); em->derivedCage->foreachMappedVert(em->derivedCage, set_mapped_co, userdata); - EDBM_free_index_arrays(em); + EDBM_index_arrays_free(em); } } else if (obedit->type == OB_ARMATURE) { @@ -991,7 +991,7 @@ static int snap_curs_to_active(bContext *C, wmOperator *UNUSED(op)) Mesh *me = obedit->data; BMEditSelection ese; - if (EDBM_get_actSelection(me->edit_btmesh, &ese)) { + if (EDBM_editselection_active_get(me->edit_btmesh, &ese)) { EDBM_editselection_center(me->edit_btmesh, curs, &ese); } diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 3f15a05d843..4754e1731c8 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -2037,7 +2037,7 @@ static void createTransEditVerts(bContext *C, TransInfo *t) if (t->flag & T_MIRROR) { - EDBM_CacheMirrorVerts(em, TRUE); + EDBM_verts_mirror_cache_begin(em, TRUE); mirror = 1; } @@ -2226,7 +2226,7 @@ static void createTransEditVerts(bContext *C, TransInfo *t) /* Mirror? */ if ( (mirror>0 && tob->iloc[0]>0.0f) || (mirror<0 && tob->iloc[0]<0.0f)) { - BMVert *vmir= EDBM_GetMirrorVert(em, eve); //t->obedit, em, eve, tob->iloc, a); + BMVert *vmir= EDBM_verts_mirror_get(em, eve); //t->obedit, em, eve, tob->iloc, a); if (vmir && vmir != eve) { tob->extra = vmir; } @@ -2260,7 +2260,7 @@ cleanup: MEM_freeN(selstate); if (t->flag & T_MIRROR) { - EDBM_EndMirrorCache(em); + EDBM_verts_mirror_cache_end(em); mirror = 1; } } diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 19dc968a8d2..eb04ad04aa7 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -724,7 +724,7 @@ static void recalcData_view3d(TransInfo *t) DAG_id_tag_update(t->obedit->data, 0); /* sets recalc flags */ - EDBM_RecalcNormals(em); + EDBM_mesh_normals_update(em); BMEdit_RecalcTessellation(em); } else if (t->obedit->type==OB_ARMATURE) { /* no recalc flag, does pose */ @@ -1523,7 +1523,7 @@ void calculateCenter(TransInfo *t) BMEditSelection ese; BMEditMesh *em = BMEdit_FromObject(t->obedit); - if (EDBM_get_actSelection(em, &ese)) { + if (EDBM_editselection_active_get(em, &ese)) { EDBM_editselection_center(em, t->center, &ese); calculateCenter2D(t); break; diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c index ece556f11ae..513f7df1957 100644 --- a/source/blender/editors/transform/transform_manipulator.c +++ b/source/blender/editors/transform/transform_manipulator.c @@ -300,7 +300,7 @@ int calc_manipulator_stats(const bContext *C) float vec[3]= {0,0,0}; /* USE LAST SELECTE WITH ACTIVE */ - if (v3d->around==V3D_ACTIVE && EDBM_get_actSelection(em, &ese)) { + if (v3d->around==V3D_ACTIVE && EDBM_editselection_active_get(em, &ese)) { EDBM_editselection_center(em, vec, &ese); calc_tw_center(scene, vec); totsel= 1; diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c index 2a53a8e4ad2..d2cf74881f2 100644 --- a/source/blender/editors/transform/transform_orientations.c +++ b/source/blender/editors/transform/transform_orientations.c @@ -577,7 +577,7 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3], float vec[3]= {0,0,0}; /* USE LAST SELECTED WITH ACTIVE */ - if (activeOnly && EDBM_get_actSelection(em, &ese)) { + if (activeOnly && EDBM_editselection_active_get(em, &ese)) { EDBM_editselection_normal(normal, &ese); EDBM_editselection_plane(em, plane, &ese); diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index 7ad7b0f5c40..ea21a636300 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -1412,7 +1412,7 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh if (em != NULL) { index_array = dm->getTessFaceDataArray(dm, CD_ORIGINDEX); - EDBM_init_index_arrays(em, 0, 0, 1); + EDBM_index_arrays_init(em, 0, 0, 1); } for ( i = 0; i < totface; i++) { @@ -1434,7 +1434,7 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh test = 0; } else { - efa = EDBM_get_face_for_index(em, index); + efa = EDBM_face_at_index(em, index); if (efa && BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) { @@ -1478,7 +1478,7 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh if (em != NULL) { - EDBM_free_index_arrays(em); + EDBM_index_arrays_free(em); } #endif break; @@ -1493,7 +1493,7 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh if (em != NULL) { index_array = dm->getVertDataArray(dm, CD_ORIGINDEX); - EDBM_init_index_arrays(em, 1, 0, 0); + EDBM_index_arrays_init(em, 1, 0, 0); } for ( i = 0; i < totvert; i++) { @@ -1514,7 +1514,7 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh test = 0; } else { - eve = EDBM_get_vert_for_index(em, index); + eve = EDBM_vert_at_index(em, index); if (eve && (BM_elem_flag_test(eve, BM_ELEM_HIDDEN) || BM_elem_flag_test(eve, BM_ELEM_SELECT))) { @@ -1532,7 +1532,7 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh if (em != NULL) { - EDBM_free_index_arrays(em); + EDBM_index_arrays_free(em); } break; } @@ -1548,7 +1548,7 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh if (em != NULL) { index_array = dm->getEdgeDataArray(dm, CD_ORIGINDEX); - EDBM_init_index_arrays(em, 0, 1, 0); + EDBM_index_arrays_init(em, 0, 1, 0); } for ( i = 0; i < totedge; i++) { @@ -1570,7 +1570,7 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh test = 0; } else { - eed = EDBM_get_edge_for_index(em, index); + eed = EDBM_edge_at_index(em, index); if (eed && (BM_elem_flag_test(eed, BM_ELEM_HIDDEN) || BM_elem_flag_test(eed->v1, BM_ELEM_SELECT) || @@ -1590,7 +1590,7 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh if (em != NULL) { - EDBM_free_index_arrays(em); + EDBM_index_arrays_free(em); } break; } diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c index fcf95047414..78616a2c228 100644 --- a/source/blender/editors/util/ed_util.c +++ b/source/blender/editors/util/ed_util.c @@ -109,7 +109,7 @@ void ED_editors_exit(bContext *C) if (ob->type==OB_MESH) { Mesh *me= ob->data; if (me->edit_btmesh) { - EDBM_FreeEditBMesh(me->edit_btmesh); + EDBM_mesh_free(me->edit_btmesh); MEM_freeN(me->edit_btmesh); me->edit_btmesh= NULL; } diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c index 383f97da6a0..4690f11d9af 100644 --- a/source/blender/editors/uvedit/uvedit_draw.c +++ b/source/blender/editors/uvedit/uvedit_draw.c @@ -455,7 +455,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit) StitchPreviewer *stitch_preview = uv_get_stitch_previewer(); em= me->edit_btmesh; - activetf= EDBM_get_active_mtexpoly(em, &efa_act, FALSE); /* will be set to NULL if hidden */ + activetf= EDBM_mtexpoly_active_get(em, &efa_act, FALSE); /* will be set to NULL if hidden */ activef = BM_active_face_get(em->bm, FALSE); ts= scene->toolsettings; diff --git a/source/blender/editors/uvedit/uvedit_intern.h b/source/blender/editors/uvedit/uvedit_intern.h index 0e2154006c1..fdcb5db1911 100644 --- a/source/blender/editors/uvedit/uvedit_intern.h +++ b/source/blender/editors/uvedit/uvedit_intern.h @@ -79,7 +79,7 @@ void uv_find_nearest_edge(struct Scene *scene, struct Image *ima, struct BMEditM /* utility tool functions */ -struct UvElement *ED_get_uv_element(struct UvElementMap *map, struct BMFace *efa, struct BMLoop *l); +struct UvElement *ED_uv_element_get(struct UvElementMap *map, struct BMFace *efa, struct BMLoop *l); void uvedit_live_unwrap_update(struct SpaceImage *sima, struct Scene *scene, struct Object *obedit); /* smart stitch */ diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index 3e6be67f233..3f4352d8ab3 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -98,7 +98,7 @@ int ED_uvedit_test(Object *obedit) return 0; em = BMEdit_FromObject(obedit); - ret = EDBM_texFaceCheck(em); + ret = EDBM_mtexpoly_check(em); return ret; } @@ -927,7 +927,7 @@ static UvMapVert *uv_vertex_map_get(UvVertMap *vmap, BMFace *efa, int a) BMLoop *l; l = BM_iter_at_index(NULL, BM_LOOPS_OF_FACE, efa, a); - first= EDBM_get_uv_map_vert(vmap, BM_elem_index_get(l->v)); + first= EDBM_uv_vert_map_at_index(vmap, BM_elem_index_get(l->v)); for (iterv=first; iterv; iterv=iterv->next) { if (iterv->separate) @@ -939,7 +939,7 @@ static UvMapVert *uv_vertex_map_get(UvVertMap *vmap, BMFace *efa, int a) return NULL; } -UvElement *ED_get_uv_element(UvElementMap *map, BMFace *efa, BMLoop *l) +UvElement *ED_uv_element_get(UvElementMap *map, BMFace *efa, BMLoop *l) { UvElement *element; @@ -969,7 +969,7 @@ static int uv_edge_tag_faces(BMEditMesh *em, UvMapVert *first1, UvMapVert *first if (iterv1->f == iterv2->f) { /* if face already tagged, don't do this edge */ - efa= EDBM_get_face_for_index(em, iterv1->f); + efa= EDBM_face_at_index(em, iterv1->f); if (BMO_elem_flag_test(em->bm, efa, EFA_F1_FLAG)) return 0; @@ -994,7 +994,7 @@ static int uv_edge_tag_faces(BMEditMesh *em, UvMapVert *first1, UvMapVert *first break; if (iterv1->f == iterv2->f) { - efa= EDBM_get_face_for_index(em, iterv1->f); + efa= EDBM_face_at_index(em, iterv1->f); BMO_elem_flag_enable(em->bm, efa, EFA_F1_FLAG); break; } @@ -1015,8 +1015,8 @@ static int select_edgeloop(Scene *scene, Image *ima, BMEditMesh *em, NearestHit int a, count, looking, nverts, starttotf, select; /* setup */ - EDBM_init_index_arrays(em, 0, 0, 1); - vmap= EDBM_make_uv_vert_map(em, 0, 0, limit); + EDBM_index_arrays_init(em, 0, 0, 1); + vmap= EDBM_uv_vert_map_create(em, 0, 0, limit); BM_mesh_elem_index_ensure(em->bm, BM_VERT); @@ -1114,8 +1114,8 @@ static int select_edgeloop(Scene *scene, Image *ima, BMEditMesh *em, NearestHit } /* cleanup */ - EDBM_free_uv_vert_map(vmap); - EDBM_free_index_arrays(em); + EDBM_uv_vert_map_free(vmap); + EDBM_index_arrays_free(em); return (select)? 1: -1; } @@ -1135,8 +1135,8 @@ static void select_linked(Scene *scene, Image *ima, BMEditMesh *em, float limit[ unsigned int a; char *flag; - EDBM_init_index_arrays(em, 0, 0, 1); /* we can use this too */ - vmap= EDBM_make_uv_vert_map(em, 1, 1, limit); + EDBM_index_arrays_init(em, 0, 0, 1); /* we can use this too */ + vmap= EDBM_uv_vert_map_create(em, 1, 1, limit); if (vmap == NULL) return; @@ -1195,7 +1195,7 @@ static void select_linked(Scene *scene, Image *ima, BMEditMesh *em, float limit[ BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) { /* make_uv_vert_map_EM sets verts tmp.l to the indices */ - vlist= EDBM_get_uv_map_vert(vmap, BM_elem_index_get(l->v)); + vlist= EDBM_uv_vert_map_at_index(vmap, BM_elem_index_get(l->v)); startv= vlist; @@ -1293,8 +1293,8 @@ static void select_linked(Scene *scene, Image *ima, BMEditMesh *em, float limit[ MEM_freeN(stack); MEM_freeN(flag); - EDBM_free_uv_vert_map(vmap); - EDBM_free_index_arrays(em); + EDBM_uv_vert_map_free(vmap); + EDBM_index_arrays_free(em); } /* WATCH IT: this returns first selected UV, @@ -2340,8 +2340,8 @@ static void uv_faces_do_sticky(bContext *C, SpaceImage *sima, Scene *scene, Obje uvedit_pixel_to_float(sima, limit, 0.05); - EDBM_init_index_arrays(em, 0, 0, 1); - vmap= EDBM_make_uv_vert_map(em, 0, 0, limit); + EDBM_index_arrays_init(em, 0, 0, 1); + vmap= EDBM_uv_vert_map_create(em, 0, 0, limit); /* verts are numbered above in make_uv_vert_map_EM, make sure this stays true! */ /* BMESH_TODO - why keep this commented? - campbell */ @@ -2364,7 +2364,7 @@ static void uv_faces_do_sticky(bContext *C, SpaceImage *sima, Scene *scene, Obje else uvedit_uv_deselect(em, scene, l); - vlist_iter= EDBM_get_uv_map_vert(vmap, BM_elem_index_get(l->v)); + vlist_iter= EDBM_uv_vert_map_at_index(vmap, BM_elem_index_get(l->v)); while (vlist_iter) { if (vlist_iter->separate) @@ -2383,7 +2383,7 @@ static void uv_faces_do_sticky(bContext *C, SpaceImage *sima, Scene *scene, Obje break; if (efa_index != vlist_iter->f) { - efa_vlist = EDBM_get_face_for_index(em, vlist_iter->f); + efa_vlist = EDBM_face_at_index(em, vlist_iter->f); /* tf_vlist = CustomData_bmesh_get(&em->bm->pdata, efa_vlist->head.data, CD_MTEXPOLY); */ /* UNUSED */ if (select) @@ -2396,8 +2396,8 @@ static void uv_faces_do_sticky(bContext *C, SpaceImage *sima, Scene *scene, Obje } } } - EDBM_free_index_arrays(em); - EDBM_free_uv_vert_map(vmap); + EDBM_index_arrays_free(em); + EDBM_uv_vert_map_free(vmap); } else { /* SI_STICKY_DISABLE or ts->uv_flag & UV_SYNC_SELECTION */ @@ -3041,7 +3041,7 @@ static int hide_exec(bContext *C, wmOperator *op) int facemode= sima ? sima->flag & SI_SELACTFACE : 0; if (ts->uv_flag & UV_SYNC_SELECTION) { - EDBM_hide_mesh(em, swap); + EDBM_mesh_hide(em, swap); WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data); return OPERATOR_FINISHED; @@ -3100,7 +3100,7 @@ static int hide_exec(bContext *C, wmOperator *op) } - EDBM_validate_selections(em); + EDBM_editselection_validate(em); WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data); return OPERATOR_FINISHED; @@ -3140,7 +3140,7 @@ static int reveal_exec(bContext *C, wmOperator *UNUSED(op)) /* call the mesh function if we are in mesh sync sel */ if (ts->uv_flag & UV_SYNC_SELECTION) { - EDBM_reveal_mesh(em); + EDBM_mesh_reveal(em); WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data); return OPERATOR_FINISHED; @@ -3372,13 +3372,13 @@ static int seams_from_islands_exec(bContext *C, wmOperator *op) em = me->edit_btmesh; bm = em->bm; - if (!EDBM_texFaceCheck(em)) { + if (!EDBM_mtexpoly_check(em)) { return OPERATOR_CANCELLED; } /* This code sets editvert->tmp.l to the index. This will be useful later on. */ - EDBM_init_index_arrays(em, 0, 0, 1); - vmap = EDBM_make_uv_vert_map(em, 0, 0, limit); + EDBM_index_arrays_init(em, 0, 0, 1); + vmap = EDBM_uv_vert_map_create(em, 0, 0, limit); BM_ITER(editedge, &iter, bm, BM_EDGES_OF_MESH, NULL) { /* flags to determine if we uv is separated from first editface match */ @@ -3406,14 +3406,14 @@ static int seams_from_islands_exec(bContext *C, wmOperator *op) v1coincident = 0; separated2 = 0; - efa1 = EDBM_get_face_for_index(em, mv1->f); + efa1 = EDBM_face_at_index(em, mv1->f); mvinit2 = vmap->vert[BM_elem_index_get(editedge->v2)]; for (mv2 = mvinit2; mv2; mv2 = mv2->next) { if (mv2->separate) mv2sep = mv2; - efa2 = EDBM_get_face_for_index(em, mv2->f); + efa2 = EDBM_face_at_index(em, mv2->f); if (efa1 == efa2) { /* if v1 is not coincident no point in comparing */ if (v1coincident) { @@ -3456,8 +3456,8 @@ static int seams_from_islands_exec(bContext *C, wmOperator *op) me->drawflag |= ME_DRAWSEAMS; - EDBM_free_uv_vert_map(vmap); - EDBM_free_index_arrays(em); + EDBM_uv_vert_map_free(vmap); + EDBM_index_arrays_free(em); DAG_id_tag_update(&me->id, 0); WM_event_add_notifier(C, NC_GEOM|ND_DATA, me); diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c index af87f4d4b07..384581247a0 100644 --- a/source/blender/editors/uvedit/uvedit_smart_stitch.c +++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c @@ -453,7 +453,7 @@ static void stitch_state_delete(StitchState *stitch_state) { if (stitch_state) { if (stitch_state->element_map) { - EDBM_free_uv_element_map(stitch_state->element_map); + EDBM_uv_element_map_free(stitch_state->element_map); } if (stitch_state->uvs) { MEM_freeN(stitch_state->uvs); @@ -685,7 +685,7 @@ static int stitch_process_data(StitchState *state, Scene *scene, int final) /* copy data from MTFaces to the preview display buffers */ BM_ITER(efa, &iter, state->em->bm, BM_FACES_OF_MESH, NULL) { /* just to test if face was added for processing. uvs of inselected vertices will return NULL */ - UvElement *element = ED_get_uv_element(state->element_map, efa, BM_FACE_FIRST_LOOP(efa)); + UvElement *element = ED_uv_element_get(state->element_map, efa, BM_FACE_FIRST_LOOP(efa)); if (element) { int numoftris = efa->len - 2; @@ -1001,10 +1001,10 @@ static int stitch_init(bContext *C, wmOperator *op) state->midpoints = RNA_boolean_get(op->ptr, "midpoint_snap"); /* in uv synch selection, all uv's are visible */ if (ts->uv_flag & UV_SYNC_SELECTION) { - state->element_map = EDBM_make_uv_element_map(state->em, 0, 1); + state->element_map = EDBM_uv_element_map_create(state->em, 0, 1); } else { - state->element_map = EDBM_make_uv_element_map(state->em, 1, 1); + state->element_map = EDBM_uv_element_map_create(state->em, 1, 1); } if (!state->element_map) { stitch_state_delete(state); @@ -1063,9 +1063,9 @@ static int stitch_init(bContext *C, wmOperator *op) continue; BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) { - UvElement *element = ED_get_uv_element(state->element_map, efa, l); + UvElement *element = ED_uv_element_get(state->element_map, efa, l); int offset1, itmp1 = element - state->element_map->buf; - int offset2, itmp2 = ED_get_uv_element(state->element_map, efa, l->next) - state->element_map->buf; + int offset2, itmp2 = ED_uv_element_get(state->element_map, efa, l->next) - state->element_map->buf; offset1 = map[itmp1]; offset2 = map[itmp2]; @@ -1157,18 +1157,18 @@ static int stitch_init(bContext *C, wmOperator *op) int faceIndex, elementIndex; UvElement *element; - EDBM_init_index_arrays(em, 0, 0, 1); + EDBM_index_arrays_init(em, 0, 0, 1); RNA_BEGIN(op->ptr, itemptr, "selection") { faceIndex = RNA_int_get(&itemptr, "face_index"); elementIndex = RNA_int_get(&itemptr, "element_index"); - efa = EDBM_get_face_for_index(em, faceIndex); - element = ED_get_uv_element(state->element_map, efa, BM_iter_at_index(NULL, BM_LOOPS_OF_FACE, efa, elementIndex)); + efa = EDBM_face_at_index(em, faceIndex); + element = ED_uv_element_get(state->element_map, efa, BM_iter_at_index(NULL, BM_LOOPS_OF_FACE, efa, elementIndex)); stitch_select_uv(element, state, 1); } RNA_END; - EDBM_free_index_arrays(em); + EDBM_index_arrays_free(em); /* Clear the selection */ RNA_collection_clear(op->ptr, "selection"); @@ -1178,7 +1178,7 @@ static int stitch_init(bContext *C, wmOperator *op) i = 0; BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) { if (uvedit_uv_selected(em, scene, l)) { - UvElement *element = ED_get_uv_element(state->element_map, efa, l); + UvElement *element = ED_uv_element_get(state->element_map, efa, l); stitch_select_uv(element, state, 1); } i++; @@ -1195,7 +1195,7 @@ static int stitch_init(bContext *C, wmOperator *op) } BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) { - UvElement *element = ED_get_uv_element(state->element_map, efa, BM_FACE_FIRST_LOOP(efa)); + UvElement *element = ED_uv_element_get(state->element_map, efa, BM_FACE_FIRST_LOOP(efa)); if (element) { state->tris_per_island[element->island] += (efa->len > 2)? efa->len-2 : 0; @@ -1313,7 +1313,7 @@ static void stitch_select(bContext *C, Scene *scene, wmEvent *event, StitchState * you can do stuff like deselect the opposite stitchable vertex and the initial still gets deselected */ /* This works due to setting of tmp in find nearest uv vert */ - UvElement *element = ED_get_uv_element(stitch_state->element_map, hit.efa, hit.l); + UvElement *element = ED_uv_element_get(stitch_state->element_map, hit.efa, hit.l); stitch_select_uv(element, stitch_state, 0); } diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index 3c150769e50..ac04e25216d 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -417,11 +417,11 @@ static ParamHandle *construct_param_handle_subsurfed(Scene *scene, BMEditMesh *e faceMap = MEM_mallocN(numOfFaces*sizeof(BMFace *), "unwrap_edit_face_map"); BM_mesh_elem_index_ensure(em->bm, BM_VERT); - EDBM_init_index_arrays(em, 0, 1, 1); + EDBM_index_arrays_init(em, 0, 1, 1); /* map subsurfed faces to original editFaces */ for (i = 0; i < numOfFaces; i++) - faceMap[i] = EDBM_get_face_for_index(em, origFaceIndices[i]); + faceMap[i] = EDBM_face_at_index(em, origFaceIndices[i]); edgeMap = MEM_mallocN(numOfEdges*sizeof(BMEdge *), "unwrap_edit_edge_map"); @@ -429,10 +429,10 @@ static ParamHandle *construct_param_handle_subsurfed(Scene *scene, BMEditMesh *e for (i = 0; i < numOfEdges; i++) { /* not all edges correspond to an old edge */ edgeMap[i] = (origEdgeIndices[i] != -1)? - EDBM_get_edge_for_index(em, origEdgeIndices[i]) : NULL; + EDBM_edge_at_index(em, origEdgeIndices[i]) : NULL; } - EDBM_free_index_arrays(em); + EDBM_index_arrays_free(em); /* Prepare and feed faces to the solver */ for (i = 0; i < numOfFaces; i++) { diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index e3cf9af6c39..574d9877cfb 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -228,8 +228,8 @@ void rna_Object_active_shape_update(Main *bmain, Scene *scene, PointerRNA *ptr) /* exit/enter editmode to get new shape */ switch (ob->type) { case OB_MESH: - EDBM_LoadEditBMesh(scene, ob); - EDBM_MakeEditBMesh(scene->toolsettings, scene, ob); + EDBM_mesh_load(scene, ob); + EDBM_mesh_make(scene->toolsettings, scene, ob); BMEdit_RecalcTessellation(((Mesh*)ob->data)->edit_btmesh); break; case OB_CURVE: -- cgit v1.2.3 From fc7624a6bed302f719bc78664f29c011c7fc2bf6 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 27 Mar 2012 04:54:52 +0000 Subject: fix for undoMesh_to_editbtMesh not setting BMEditMesh.ob field. error found by XercesBlue on IRC --- source/blender/editors/mesh/editmesh_utils.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index 22420c50e2f..3958a28f441 100644 --- a/source/blender/editors/mesh/editmesh_utils.c +++ b/source/blender/editors/mesh/editmesh_utils.c @@ -529,9 +529,9 @@ static void *editbtMesh_to_undoMesh(void *emv, void *obdata) return um; } -static void undoMesh_to_editbtMesh(void *umv, void *emv, void *UNUSED(obdata)) +static void undoMesh_to_editbtMesh(void *umv, void *em_v, void *UNUSED(obdata)) { - BMEditMesh *em = emv, *em2; + BMEditMesh *em = em_v, *em_tmp; Object *ob; undomesh *um = umv; BMesh *bm; @@ -545,12 +545,13 @@ static void undoMesh_to_editbtMesh(void *umv, void *emv, void *UNUSED(obdata)) bm = BM_mesh_create(&bm_mesh_allocsize_default); BMO_op_callf(bm, "mesh_to_bmesh mesh=%p object=%p set_shapekey=%b", &um->me, ob, FALSE); - em2 = BMEdit_Create(bm, TRUE); - *em = *em2; + em_tmp = BMEdit_Create(bm, TRUE); + *em = *em_tmp; em->selectmode = um->selectmode; + em->ob = ob; - MEM_freeN(em2); + MEM_freeN(em_tmp); } -- cgit v1.2.3 From 05abdf344bb8366a1a4da145c423688b81a38459 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 27 Mar 2012 05:03:23 +0000 Subject: minor code/style cleanup --- source/blender/editors/mesh/editmesh_add.c | 26 +++++++++++----------- source/blender/editors/mesh/editmesh_tools.c | 32 +++++++++++++--------------- source/blender/editors/mesh/mesh_intern.h | 6 +++--- 3 files changed, 31 insertions(+), 33 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c index a464e40217a..70d06924f30 100644 --- a/source/blender/editors/mesh/editmesh_add.c +++ b/source/blender/editors/mesh/editmesh_add.c @@ -139,15 +139,15 @@ static int add_primitive_plane_exec(bContext *C, wmOperator *op) me = obedit->data; em = me->edit_btmesh; - if (!EDBM_op_call_and_selectf(em, op, "vertout", - "create_grid xsegments=%i ysegments=%i size=%f mat=%m4", 1, 1, dia, mat)) + if (!EDBM_op_call_and_selectf(em, op, "vertout", + "create_grid xsegments=%i ysegments=%i size=%f mat=%m4", 1, 1, dia, mat)) { return OPERATOR_CANCELLED; } make_prim_finish(C, &state, enter_editmode); - return OPERATOR_FINISHED; + return OPERATOR_FINISHED; } void MESH_OT_primitive_plane_add(wmOperatorType *ot) @@ -240,9 +240,9 @@ static int add_primitive_circle_exec(bContext *C, wmOperator *op) em = me->edit_btmesh; if (!EDBM_op_call_and_selectf(em, op, "vertout", - "create_circle segments=%i diameter=%f cap_ends=%b cap_tris=%b mat=%m4", - RNA_int_get(op->ptr, "vertices"), RNA_float_get(op->ptr, "radius"), - cap_end, cap_tri, mat)) + "create_circle segments=%i diameter=%f cap_ends=%b cap_tris=%b mat=%m4", + RNA_int_get(op->ptr, "vertices"), RNA_float_get(op->ptr, "radius"), + cap_end, cap_tri, mat)) { return OPERATOR_CANCELLED; } @@ -425,10 +425,10 @@ static int add_primitive_grid_exec(bContext *C, wmOperator *op) em = me->edit_btmesh; if (!EDBM_op_call_and_selectf(em, op, "vertout", - "create_grid xsegments=%i ysegments=%i size=%f mat=%m4", - RNA_int_get(op->ptr, "x_subdivisions"), - RNA_int_get(op->ptr, "y_subdivisions"), - RNA_float_get(op->ptr, "size") * dia, mat)) + "create_grid xsegments=%i ysegments=%i size=%f mat=%m4", + RNA_int_get(op->ptr, "x_subdivisions"), + RNA_int_get(op->ptr, "y_subdivisions"), + RNA_float_get(op->ptr, "size") * dia, mat)) { return OPERATOR_CANCELLED; } @@ -527,9 +527,9 @@ static int add_primitive_uvsphere_exec(bContext *C, wmOperator *op) em = me->edit_btmesh; if (!EDBM_op_call_and_selectf(em, op, "vertout", - "create_uvsphere segments=%i revolutions=%i diameter=%f mat=%m4", - RNA_int_get(op->ptr, "segments"), RNA_int_get(op->ptr, "ring_count"), - RNA_float_get(op->ptr, "size"), mat)) + "create_uvsphere segments=%i revolutions=%i diameter=%f mat=%m4", + RNA_int_get(op->ptr, "segments"), RNA_int_get(op->ptr, "ring_count"), + RNA_float_get(op->ptr, "size"), mat)) { return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index ba1f2924ad9..ac7589d72f5 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -833,7 +833,7 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, wmEvent if (rot_src) { EDBM_op_callf(vc.em, op, "rotate verts=%hv cent=%v mat=%m3", - BM_ELEM_SELECT, cent, mat); + BM_ELEM_SELECT, cent, mat); /* also project the source, for retopo workflow */ if (use_proj) @@ -842,9 +842,9 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, wmEvent edbm_extrude_edge(vc.obedit, vc.em, BM_ELEM_SELECT, nor); EDBM_op_callf(vc.em, op, "rotate verts=%hv cent=%v mat=%m3", - BM_ELEM_SELECT, cent, mat); + BM_ELEM_SELECT, cent, mat); EDBM_op_callf(vc.em, op, "translate verts=%hv vec=%v", - BM_ELEM_SELECT, min); + BM_ELEM_SELECT, min); } else { float *curs = give_cursor(vc.scene, vc.v3d); @@ -915,28 +915,26 @@ static int edbm_delete_exec(bContext *C, wmOperator *op) BMEditMesh *em = BMEdit_FromObject(obedit); int type = RNA_enum_get(op->ptr, "type"); - BMEditMesh *bem = BMEdit_FromObject(obedit); - if (type == 0) { - if (!EDBM_op_callf(bem, op, "del geom=%hv context=%i", BM_ELEM_SELECT, DEL_VERTS)) /* Erase Vertices */ + if (!EDBM_op_callf(em, op, "del geom=%hv context=%i", BM_ELEM_SELECT, DEL_VERTS)) /* Erase Vertices */ return OPERATOR_CANCELLED; } else if (type == 1) { - if (!EDBM_op_callf(bem, op, "del geom=%he context=%i", BM_ELEM_SELECT, DEL_EDGES)) /* Erase Edges */ + if (!EDBM_op_callf(em, op, "del geom=%he context=%i", BM_ELEM_SELECT, DEL_EDGES)) /* Erase Edges */ return OPERATOR_CANCELLED; } else if (type == 2) { - if (!EDBM_op_callf(bem, op, "del geom=%hf context=%i", BM_ELEM_SELECT, DEL_FACES)) /* Erase Faces */ + if (!EDBM_op_callf(em, op, "del geom=%hf context=%i", BM_ELEM_SELECT, DEL_FACES)) /* Erase Faces */ return OPERATOR_CANCELLED; } else if (type == 3) { - if (!EDBM_op_callf(bem, op, "del geom=%hef context=%i", BM_ELEM_SELECT, DEL_EDGESFACES)) /* Edges and Faces */ + if (!EDBM_op_callf(em, op, "del geom=%hef context=%i", BM_ELEM_SELECT, DEL_EDGESFACES)) /* Edges and Faces */ return OPERATOR_CANCELLED; } else if (type == 4) { //"Erase Only Faces"; - if (!EDBM_op_callf(bem, op, "del geom=%hf context=%i", - BM_ELEM_SELECT, DEL_ONLYFACES)) + if (!EDBM_op_callf(em, op, "del geom=%hf context=%i", + BM_ELEM_SELECT, DEL_ONLYFACES)) return OPERATOR_CANCELLED; } @@ -1537,8 +1535,8 @@ static int edbm_do_smooth_vertex_exec(bContext *C, wmOperator *op) for (i = 0; i < repeat; i++) { if (!EDBM_op_callf(em, op, - "vertexsmooth verts=%hv mirror_clip_x=%b mirror_clip_y=%b mirror_clip_z=%b clipdist=%f", - BM_ELEM_SELECT, mirrx, mirry, mirrz, clipdist)) + "vertexsmooth verts=%hv mirror_clip_x=%b mirror_clip_y=%b mirror_clip_z=%b clipdist=%f", + BM_ELEM_SELECT, mirrx, mirry, mirrz, clipdist)) { return OPERATOR_CANCELLED; } @@ -3331,8 +3329,8 @@ static int edbm_tris_convert_to_quads_exec(bContext *C, wmOperator *op) domaterials = RNA_boolean_get(op->ptr, "materials"); if (!EDBM_op_callf(em, op, - "join_triangles faces=%hf limit=%f cmp_sharp=%b cmp_uvs=%b cmp_vcols=%b cmp_materials=%b", - BM_ELEM_SELECT, limit, dosharp, douvs, dovcols, domaterials)) + "join_triangles faces=%hf limit=%f cmp_sharp=%b cmp_uvs=%b cmp_vcols=%b cmp_materials=%b", + BM_ELEM_SELECT, limit, dosharp, douvs, dovcols, domaterials)) { return OPERATOR_CANCELLED; } @@ -3418,8 +3416,8 @@ static int edbm_dissolve_limited_exec(bContext *C, wmOperator *op) float angle_limit = RNA_float_get(op->ptr, "angle_limit"); if (!EDBM_op_callf(em, op, - "dissolve_limit edges=%he verts=%hv angle_limit=%f", - BM_ELEM_SELECT, BM_ELEM_SELECT, angle_limit)) + "dissolve_limit edges=%he verts=%hv angle_limit=%f", + BM_ELEM_SELECT, BM_ELEM_SELECT, angle_limit)) { return OPERATOR_CANCELLED; } diff --git a/source/blender/editors/mesh/mesh_intern.h b/source/blender/editors/mesh/mesh_intern.h index 59d7b24f7b8..2140bc4308b 100644 --- a/source/blender/editors/mesh/mesh_intern.h +++ b/source/blender/editors/mesh/mesh_intern.h @@ -61,7 +61,7 @@ struct wmOperatorType; int EDBM_op_callf(struct BMEditMesh *em, struct wmOperator *op, const char *fmt, ...); int EDBM_op_call_and_selectf(struct BMEditMesh *em, struct wmOperator *op, - const char *selectslot, const char *fmt, ...); + const char *selectslot, const char *fmt, ...); /* same as above, but doesn't report errors.*/ int EDBM_op_call_silentf(struct BMEditMesh *em, const char *fmt, ...); @@ -72,10 +72,10 @@ int EDBM_op_call_silentf(struct BMEditMesh *em, const char *fmt, ...); * * execute the operator with BM_Exec_Op */ int EDBM_op_init(struct BMEditMesh *em, struct BMOperator *bmop, - struct wmOperator *op, const char *fmt, ...); + struct wmOperator *op, const char *fmt, ...); /*cleans up after a bmesh operator*/ int EDBM_op_finish(struct BMEditMesh *em, struct BMOperator *bmop, - struct wmOperator *op, const int report); + struct wmOperator *op, const int report); void EDBM_flag_disable_all(struct BMEditMesh *em, const char hflag); void EDBM_editselection_store(struct BMEditMesh *em, struct BMHeader *ele); -- cgit v1.2.3 From d334f04ee66c1373eacaf51855454fda6a08bc64 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 27 Mar 2012 08:54:37 +0000 Subject: reload_sequence_new_file now works with movie clip strips as well --- source/blender/blenkernel/intern/sequencer.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 18749d7b5a6..210ee27d914 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -643,7 +643,7 @@ void reload_sequence_new_file(Scene *scene, Sequence * seq, int lock_range) int prev_startdisp=0, prev_enddisp=0; /* note: don't rename the strip, will break animation curves */ - if (ELEM5(seq->type, SEQ_MOVIE, SEQ_IMAGE, SEQ_SOUND, SEQ_SCENE, SEQ_META)==0) { + if (ELEM6(seq->type, SEQ_MOVIE, SEQ_IMAGE, SEQ_SOUND, SEQ_SCENE, SEQ_META, SEQ_MOVIECLIP)==0) { return; } @@ -687,6 +687,15 @@ void reload_sequence_new_file(Scene *scene, Sequence * seq, int lock_range) seq->anim_preseek = IMB_anim_get_preseek(seq->anim); + seq->len -= seq->anim_startofs; + seq->len -= seq->anim_endofs; + if (seq->len < 0) { + seq->len = 0; + } + break; + case SEQ_MOVIECLIP: + seq->len = BKE_movieclip_get_duration(seq->clip); + seq->len -= seq->anim_startofs; seq->len -= seq->anim_endofs; if (seq->len < 0) { -- cgit v1.2.3 From 6420dc23fd208840c99359b095d33eaef6223b82 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Tue, 27 Mar 2012 09:24:00 +0000 Subject: Fix bug 29123, subdivide smooth distorts shape with numcuts > 1. Three fixes: * When smoothing a coord, the original position should be based off the unsmoothed subdivision (i.e. the vertex coord rather than the smoothed position in the shapekey) * The normal of new vertices created by edge split must be updated (used the same interpolation as pre-bmesh here) * The vertices created inside the subdivided face should use the subdivided coords from edges, so copy the shapekey coords back to vertex coords after subdividing edges --- source/blender/bmesh/operators/bmo_subdivide.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source/blender') diff --git a/source/blender/bmesh/operators/bmo_subdivide.c b/source/blender/bmesh/operators/bmo_subdivide.c index f97f5225169..b0dd8778789 100644 --- a/source/blender/bmesh/operators/bmo_subdivide.c +++ b/source/blender/bmesh/operators/bmo_subdivide.c @@ -104,6 +104,7 @@ static void alter_co(BMesh *bm, BMVert *v, BMEdge *UNUSED(origed), const SubDPar BM_vert_normal_update_all(bm, v); co = CustomData_bmesh_get_n(&bm->vdata, v->head.data, CD_SHAPEKEY, params->origkey); + copy_v3_v3(co, v->co); copy_v3_v3(prev_co, co); if (params->beauty & B_SMOOTH) { @@ -205,6 +206,9 @@ static BMVert *bm_subdivide_edge_addvert(BMesh *bm, BMEdge *edge, BMEdge *oedge, } #endif + interp_v3_v3v3(ev->no, vsta->no, vend->no, percent2); + normalize_v3(ev->no); + return ev; } @@ -888,6 +892,12 @@ void bmo_esubd_exec(BMesh *bmesh, BMOperator *op) bm_subdivide_multicut(bmesh, edge, ¶ms, edge->v1, edge->v2); } + /* copy original-geometry displacements to current coordinate */ + BM_ITER(v, &viter, bmesh, BM_VERTS_OF_MESH, NULL) { + float *co = CustomData_bmesh_get_n(&bmesh->vdata, v->head.data, CD_SHAPEKEY, skey); + copy_v3_v3(v->co, co); + } + i = 0; for (i = 0; i < BLI_array_count(facedata); i++) { face = facedata[i].face; -- cgit v1.2.3 From 1e7bcece44a1fc149add915e812cd7f9027832c8 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Tue, 27 Mar 2012 10:28:06 +0000 Subject: Fix bug 30696, circular mesh objects had wrong orientation. Behavior now matches 2.62, circle, cone, and cylinder get first vertex at 0 degrees. Also fixed range for vertex property of add-cone and add-cylinder operators, changed minumum from two to three. --- source/blender/bmesh/operators/bmo_primitive.c | 4 ++-- source/blender/editors/mesh/editmesh_add.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender') diff --git a/source/blender/bmesh/operators/bmo_primitive.c b/source/blender/bmesh/operators/bmo_primitive.c index 837fe46b65b..76d7e08f74a 100644 --- a/source/blender/bmesh/operators/bmo_primitive.c +++ b/source/blender/bmesh/operators/bmo_primitive.c @@ -506,7 +506,7 @@ void bmo_create_circle_exec(BMesh *bm, BMOperator *op) BMO_slot_mat4_get(op, "mat", mat); phid = 2.0f * (float)M_PI / segs; - phi = .25f * (float)M_PI; + phi = 0; if (cap_ends) { vec[0] = vec[1] = 0.0f; @@ -579,7 +579,7 @@ void bmo_create_cone_exec(BMesh *bm, BMOperator *op) BMO_slot_mat4_get(op, "mat", mat); phid = 2.0f * (float)M_PI / segs; - phi = 0.25f * (float)M_PI; + phi = 0; depth *= 0.5f; if (cap_ends) { diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c index 70d06924f30..b4d4a76daed 100644 --- a/source/blender/editors/mesh/editmesh_add.c +++ b/source/blender/editors/mesh/editmesh_add.c @@ -333,7 +333,7 @@ void MESH_OT_primitive_cylinder_add(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ - RNA_def_int(ot->srna, "vertices", 32, 2, INT_MAX, "Vertices", "", 2, 500); + RNA_def_int(ot->srna, "vertices", 32, 3, INT_MAX, "Vertices", "", 3, 500); prop = RNA_def_float(ot->srna, "radius", 1.0f, 0.0, FLT_MAX, "Radius", "", 0.001, 100.00); RNA_def_property_subtype(prop, PROP_DISTANCE); prop = RNA_def_float(ot->srna, "depth", 2.0f, 0.0, FLT_MAX, "Depth", "", 0.001, 100.00); @@ -395,7 +395,7 @@ void MESH_OT_primitive_cone_add(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ - RNA_def_int(ot->srna, "vertices", 32, 2, INT_MAX, "Vertices", "", 2, 500); + RNA_def_int(ot->srna, "vertices", 32, 3, INT_MAX, "Vertices", "", 3, 500); prop = RNA_def_float(ot->srna, "radius1", 1.0f, 0.0, FLT_MAX, "Radius 1", "", 0.001, 100.00); RNA_def_property_subtype(prop, PROP_DISTANCE); prop = RNA_def_float(ot->srna, "radius2", 0.0f, 0.0, FLT_MAX, "Radius 2", "", 0.001, 100.00); -- cgit v1.2.3 From 7f1e9b8c4116915d1a7073f712f62f234454c323 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 27 Mar 2012 10:30:10 +0000 Subject: bmesh py api: added access to deform weights, access to weights acts like a python dict so you can do... print(group in dvert) dvert[group] = 0.5 print(dvert[group]) del dvert[group] print(dvert.items()) --- source/blender/python/bmesh/bmesh_py_types.c | 1 + .../python/bmesh/bmesh_py_types_customdata.c | 14 +- .../blender/python/bmesh/bmesh_py_types_meshdata.c | 330 ++++++++++++++++++++- .../blender/python/bmesh/bmesh_py_types_meshdata.h | 11 +- source/blender/python/mathutils/mathutils_Color.c | 6 +- 5 files changed, 348 insertions(+), 14 deletions(-) (limited to 'source/blender') diff --git a/source/blender/python/bmesh/bmesh_py_types.c b/source/blender/python/bmesh/bmesh_py_types.c index afa628ee2cf..b2eed6d99d8 100644 --- a/source/blender/python/bmesh/bmesh_py_types.c +++ b/source/blender/python/bmesh/bmesh_py_types.c @@ -2836,6 +2836,7 @@ PyObject *BPyInit_bmesh_types(void) mod_type_add(submodule, BPy_BMLayerItem_Type); /* bmesh_py_types_meshdata.c */ mod_type_add(submodule, BPy_BMLoopUV_Type); + mod_type_add(submodule, BPy_BMDeformVert_Type); #undef mod_type_add diff --git a/source/blender/python/bmesh/bmesh_py_types_customdata.c b/source/blender/python/bmesh/bmesh_py_types_customdata.c index 92142c1a036..5d9c07269e8 100644 --- a/source/blender/python/bmesh/bmesh_py_types_customdata.c +++ b/source/blender/python/bmesh/bmesh_py_types_customdata.c @@ -361,10 +361,10 @@ static PyObject *bpy_bmlayercollection_get(BPy_BMLayerCollection *self, PyObject } static struct PyMethodDef bpy_bmelemseq_methods[] = { - {"keys", (PyCFunction)bpy_bmlayercollection_keys, METH_NOARGS, bpy_bmlayercollection_keys_doc}, - {"values", (PyCFunction)bpy_bmlayercollection_values, METH_NOARGS, bpy_bmlayercollection_values_doc}, - {"items", (PyCFunction)bpy_bmlayercollection_items, METH_NOARGS, bpy_bmlayercollection_items_doc}, - {"get", (PyCFunction)bpy_bmlayercollection_get, METH_VARARGS, bpy_bmlayercollection_get_doc}, + {"keys", (PyCFunction)bpy_bmlayercollection_keys, METH_NOARGS, bpy_bmlayercollection_keys_doc}, + {"values", (PyCFunction)bpy_bmlayercollection_values, METH_NOARGS, bpy_bmlayercollection_values_doc}, + {"items", (PyCFunction)bpy_bmlayercollection_items, METH_NOARGS, bpy_bmlayercollection_items_doc}, + {"get", (PyCFunction)bpy_bmlayercollection_get, METH_VARARGS, bpy_bmlayercollection_get_doc}, /* for later! */ #if 0 @@ -774,8 +774,7 @@ PyObject *BPy_BMLayerItem_GetItem(BPy_BMElem *py_ele, BPy_BMLayerItem *py_layer) switch (py_layer->type) { case CD_MDEFORMVERT: { - ret = Py_NotImplemented; /* TODO */ - Py_INCREF(ret); + ret = BPy_BMDeformVert_CreatePyObject(value); break; } case CD_PROP_FLT: @@ -848,8 +847,7 @@ int BPy_BMLayerItem_SetItem(BPy_BMElem *py_ele, BPy_BMLayerItem *py_layer, PyObj switch (py_layer->type) { case CD_MDEFORMVERT: { - PyErr_SetString(PyExc_AttributeError, "readonly"); /* could make this writeable later */ - ret = -1; + ret = BPy_BMDeformVert_AssignPyObject(value, py_value); break; } case CD_PROP_FLT: diff --git a/source/blender/python/bmesh/bmesh_py_types_meshdata.c b/source/blender/python/bmesh/bmesh_py_types_meshdata.c index 56b3d764156..db8cc24ff0c 100644 --- a/source/blender/python/bmesh/bmesh_py_types_meshdata.c +++ b/source/blender/python/bmesh/bmesh_py_types_meshdata.c @@ -39,6 +39,10 @@ #include "BLI_utildefines.h" #include "BLI_math_vector.h" +#include "BKE_deform.h" + +#include "bmesh_py_types_meshdata.h" + /* Mesh Loop UV * ************ */ @@ -138,7 +142,7 @@ int BPy_BMLoopUV_AssignPyObject(struct MLoopUV *mloopuv, PyObject *value) return -1; } else { - *((MLoopUV *)mloopuv) = *((MLoopUV *)((BPy_BMLoopUV *)value)->data); + *((MLoopUV *)mloopuv) = *(((BPy_BMLoopUV *)value)->data); return 0; } } @@ -252,9 +256,333 @@ PyObject *BPy_BMLoopColor_CreatePyObject(struct MLoopCol *data) /* --- End Mesh Loop Color --- */ +/* Mesh Deform Vert + * **************** */ + +/** + * This is python type wraps a deform vert as a python dictionary, + * hiding the #MDeformWeight on access, since the mapping is very close, eg: + * + * C: + * weight = defvert_find_weight(dv, group_nr); + * defvert_remove_group(dv, dw) + * + * Py: + * weight = dv[group_nr] + * del dv[group_nr] + * + * \note: there is nothing BMesh spesific here, + * its only that BMesh is the only part of blender that uses a hand written api like this. + * This type could eventually be used to access lattice weights. + * + * \note: Many of blender-api's dict-like-wrappers act like ordered dicts, + * This is intentional _not_ ordered, the weights can be in any order and it wont matter, + * the order should not be used in the api in any meaningful way (as with a python dict) + * only expose as mapping, not a sequence. + */ + +#define BPy_BMDeformVert_Check(v) (Py_TYPE(v) == &BPy_BMDeformVert_Type) + +typedef struct BPy_BMDeformVert { + PyObject_VAR_HEAD + MDeformVert *data; +} BPy_BMDeformVert; + + +/* Mapping Protocols + * ================= */ + +static int bpy_bmdeformvert_len(BPy_BMDeformVert *self) +{ + return self->data->totweight; +} + +static PyObject *bpy_bmdeformvert_subscript(BPy_BMDeformVert *self, PyObject *key) +{ + if (PyIndex_Check(key)) { + int i; + i = PyNumber_AsSsize_t(key, PyExc_IndexError); + if (i == -1 && PyErr_Occurred()) { + return NULL; + } + else { + MDeformWeight *dw = defvert_find_index(self->data, i); + + if (dw == NULL) { + PyErr_SetString(PyExc_KeyError, "BMDeformVert[key] = x: " + "key not found"); + return NULL; + } + else { + return PyFloat_FromDouble(dw->weight); + } + } + } + else { + PyErr_Format(PyExc_TypeError, + "BMDeformVert keys must be integers, not %.200s", + Py_TYPE(key)->tp_name); + return NULL; + } +} + +static int bpy_bmdeformvert_ass_subscript(BPy_BMDeformVert *self, PyObject *key, PyObject *value) +{ + if (PyIndex_Check(key)) { + int i; + + i = PyNumber_AsSsize_t(key, PyExc_IndexError); + if (i == -1 && PyErr_Occurred()) { + return -1; + } + + if (value) { + /* dvert[group_index] = 0.5 */ + if (i < 0) { + PyErr_SetString(PyExc_KeyError, "BMDeformVert[key] = x: " + "weight keys can't be negative"); + return -1; + } + else { + MDeformWeight *dw = defvert_verify_index(self->data, i); + const float f = PyFloat_AsDouble(value); + if (f == -1 && PyErr_Occurred()) { // parsed key not a number + PyErr_SetString(PyExc_TypeError, + "BMDeformVert[key] = x: " + "argument not a number"); + return -1; + } + + dw->weight = CLAMPIS(f, 0.0f, 1.0f); + } + } + else { + /* del dvert[group_index] */ + MDeformWeight *dw = defvert_find_index(self->data, i); + + if (dw == NULL) { + PyErr_SetString(PyExc_KeyError, "del BMDeformVert[key]: " + "key not found"); + } + defvert_remove_group(self->data, dw); + } + + return 0; + + } + else { + PyErr_Format(PyExc_TypeError, + "BMDeformVert keys must be integers, not %.200s", + Py_TYPE(key)->tp_name); + return -1; + } +} + +static int bpy_bmdeformvert_contains(BPy_BMDeformVert *self, PyObject *value) +{ + const int key = PyLong_AsSsize_t(value); + + if (key == -1 && PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "BMDeformVert.__contains__: expected an int"); + return -1; + } + + return (defvert_find_index(self->data, key) != NULL) ? 1 : 0; +} + +/* only defined for __contains__ */ +static PySequenceMethods bpy_bmdeformvert_as_sequence = { + (lenfunc)bpy_bmdeformvert_len, /* sq_length */ + NULL, /* sq_concat */ + NULL, /* sq_repeat */ + + /* note: if this is set PySequence_Check() returns True, + * but in this case we dont want to be treated as a seq */ + NULL, /* sq_item */ + + NULL, /* sq_slice */ + NULL, /* sq_ass_item */ + NULL, /* *was* sq_ass_slice */ + (objobjproc)bpy_bmdeformvert_contains, /* sq_contains */ + (binaryfunc) NULL, /* sq_inplace_concat */ + (ssizeargfunc) NULL, /* sq_inplace_repeat */ +}; + +static PyMappingMethods bpy_bmdeformvert_as_mapping = { + (lenfunc)bpy_bmdeformvert_len, + (binaryfunc)bpy_bmdeformvert_subscript, + (objobjargproc)bpy_bmdeformvert_ass_subscript +}; + +/* Methods + * ======= */ + +PyDoc_STRVAR(bpy_bmdeformvert_keys_doc, +".. method:: keys()\n" +"\n" +" Return the group indices used by this vertex\n" +" (matching pythons dict.keys() functionality).\n" +"\n" +" :return: the deform group this vertex uses\n" +" :rtype: list of ints\n" +); +static PyObject *bpy_bmdeformvert_keys(BPy_BMDeformVert *self) +{ + PyObject *ret; + int i; + MDeformWeight *dw = self->data->dw; + + ret = PyList_New(self->data->totweight); + for (i = 0; i < self->data->totweight; i++, dw++) { + PyList_SET_ITEM(ret, i, PyLong_FromSsize_t(dw->def_nr)); + } + + return ret; +} + +PyDoc_STRVAR(bpy_bmdeformvert_values_doc, +".. method:: items()\n" +"\n" +" Return (group, weight) pairs for this vertex\n" +" (matching pythons dict.items() functionality).\n" +"\n" +" :return: (key, value) pairs for each deform weight of this vertex.\n" +" :rtype: list of tuples\n" +); +static PyObject *bpy_bmdeformvert_values(BPy_BMDeformVert *self) +{ + PyObject *ret; + int i; + MDeformWeight *dw = self->data->dw; + + ret = PyList_New(self->data->totweight); + for (i = 0; i < self->data->totweight; i++, dw++) { + PyList_SET_ITEM(ret, i, PyFloat_FromDouble(dw->weight)); + } + + return ret; +} + +PyDoc_STRVAR(bpy_bmdeformvert_items_doc, +".. method:: values()\n" +"\n" +" Return the weights of the deform vertex\n" +" (matching pythons dict.values() functionality).\n" +"\n" +" :return: The weights that influence this vertex\n" +" :rtype: list of floats\n" +); +static PyObject *bpy_bmdeformvert_items(BPy_BMDeformVert *self) +{ + PyObject *ret; + PyObject *item; + int i; + MDeformWeight *dw = self->data->dw; + + ret = PyList_New(self->data->totweight); + for (i = 0; i < self->data->totweight; i++, dw++) { + item = PyTuple_New(2); + + PyTuple_SET_ITEM(item, 0, PyLong_FromSsize_t(dw->def_nr)); + PyTuple_SET_ITEM(item, 1, PyFloat_FromDouble(dw->weight)); + + PyList_SET_ITEM(ret, i, item); + } + + return ret; +} + +PyDoc_STRVAR(bpy_bmdeformvert_get_doc, +".. method:: get(key, default=None)\n" +"\n" +" Returns the deform weight matching the key or default\n" +" when not found (matches pythons dictionary function of the same name).\n" +"\n" +" :arg key: The key associated with deform weight.\n" +" :type key: int\n" +" :arg default: Optional argument for the value to return if\n" +" *key* is not found.\n" +" :type default: Undefined\n" +); +static PyObject *bpy_bmdeformvert_get(BPy_BMDeformVert *self, PyObject *args) +{ + int key; + PyObject *def = Py_None; + + if (!PyArg_ParseTuple(args, "i|O:get", &key, &def)) { + return NULL; + } + else { + MDeformWeight *dw = defvert_find_index(self->data, key); + + if (dw) { + return PyFloat_FromDouble(dw->weight); + } + else { + return Py_INCREF(def), def; + } + } +} + +static struct PyMethodDef bpy_bmdeformvert_methods[] = { + {"keys", (PyCFunction)bpy_bmdeformvert_keys, METH_NOARGS, bpy_bmdeformvert_keys_doc}, + {"values", (PyCFunction)bpy_bmdeformvert_values, METH_NOARGS, bpy_bmdeformvert_values_doc}, + {"items", (PyCFunction)bpy_bmdeformvert_items, METH_NOARGS, bpy_bmdeformvert_items_doc}, + {"get", (PyCFunction)bpy_bmdeformvert_get, METH_VARARGS, bpy_bmdeformvert_get_doc}, + /* BMESH_TODO */ + {NULL, NULL, 0, NULL} +}; + +PyTypeObject BPy_BMDeformVert_Type = {{{0}}}; /* bm.loops.layers.uv.active */ + +static void bm_init_types_bmdvert(void) +{ + BPy_BMDeformVert_Type.tp_basicsize = sizeof(BPy_BMDeformVert); + + BPy_BMDeformVert_Type.tp_name = "BMDeformVert"; + + BPy_BMDeformVert_Type.tp_doc = NULL; // todo + + BPy_BMDeformVert_Type.tp_as_sequence = &bpy_bmdeformvert_as_sequence; + BPy_BMDeformVert_Type.tp_as_mapping = &bpy_bmdeformvert_as_mapping; + + BPy_BMDeformVert_Type.tp_methods = bpy_bmdeformvert_methods; + + BPy_BMDeformVert_Type.tp_flags = Py_TPFLAGS_DEFAULT; + + PyType_Ready(&BPy_BMDeformVert_Type); +} + +int BPy_BMDeformVert_AssignPyObject(struct MDeformVert *dvert, PyObject *value) +{ + if (UNLIKELY(!BPy_BMDeformVert_Check(value))) { + PyErr_Format(PyExc_TypeError, "expected BMDeformVert, not a %.200s", Py_TYPE(value)->tp_name); + return -1; + } + else { + MDeformVert *dvert_src = ((BPy_BMDeformVert *)value)->data; + if (LIKELY(dvert != dvert_src)) { + defvert_copy(dvert, dvert_src); + } + return 0; + } +} + +PyObject *BPy_BMDeformVert_CreatePyObject(struct MDeformVert *dvert) +{ + BPy_BMDeformVert *self = PyObject_New(BPy_BMDeformVert, &BPy_BMDeformVert_Type); + self->data = dvert; + return (PyObject *)self; +} + +/* --- End Mesh Deform Vert --- */ + + /* call to init all types */ void BPy_BM_init_types_meshdata(void) { bm_init_types_bmloopuv(); bm_init_types_bmloopcol(); + bm_init_types_bmdvert(); } diff --git a/source/blender/python/bmesh/bmesh_py_types_meshdata.h b/source/blender/python/bmesh/bmesh_py_types_meshdata.h index 75a4778571c..4636f800ed3 100644 --- a/source/blender/python/bmesh/bmesh_py_types_meshdata.h +++ b/source/blender/python/bmesh/bmesh_py_types_meshdata.h @@ -31,6 +31,7 @@ #define __BMESH_PY_TYPES_MESHDATA_H__ extern PyTypeObject BPy_BMLoopUV_Type; +extern PyTypeObject BPy_BMDeformVert_Type; #define BPy_BMLoopUV_Check(v) (Py_TYPE(v) == &BPy_BMLoopUV_Type) @@ -40,12 +41,18 @@ typedef struct BPy_BMGenericMeshData { } BPy_BMGenericMeshData; struct MLoopUV; +struct MLoopCol; +struct MDeformVert; int BPy_BMLoopUV_AssignPyObject(struct MLoopUV *data, PyObject *value); PyObject *BPy_BMLoopUV_CreatePyObject(struct MLoopUV *data); -int BPy_BMLoopColor_AssignPyObject(struct MLoopUV *data, PyObject *value); -PyObject *BPy_BMLoopColor_CreatePyObject(struct MLoopUV *data); +int BPy_BMLoopColor_AssignPyObject(struct MLoopCol *data, PyObject *value); +PyObject *BPy_BMLoopColor_CreatePyObject(struct MLoopCol *data); + +int BPy_BMDeformVert_AssignPyObject(struct MDeformVert *dvert, PyObject *value); +PyObject *BPy_BMDeformVert_CreatePyObject(struct MDeformVert *dvert); + void BPy_BM_init_types_meshdata(void); diff --git a/source/blender/python/mathutils/mathutils_Color.c b/source/blender/python/mathutils/mathutils_Color.c index 5fe3ea4c187..3b60d6655d6 100644 --- a/source/blender/python/mathutils/mathutils_Color.c +++ b/source/blender/python/mathutils/mathutils_Color.c @@ -194,7 +194,7 @@ static PyObject *Color_item(ColorObject *self, int i) if (i < 0 || i >= COLOR_SIZE) { PyErr_SetString(PyExc_IndexError, - "color[attribute]: " + "color[item]: " "array index out of range"); return NULL; } @@ -213,7 +213,7 @@ static int Color_ass_item(ColorObject *self, int i, PyObject *value) if (f == -1 && PyErr_Occurred()) { // parsed item not a number PyErr_SetString(PyExc_TypeError, - "color[attribute] = x: " + "color[item] = x: " "argument not a number"); return -1; } @@ -221,7 +221,7 @@ static int Color_ass_item(ColorObject *self, int i, PyObject *value) if (i < 0) i = COLOR_SIZE - i; if (i < 0 || i >= COLOR_SIZE) { - PyErr_SetString(PyExc_IndexError, "color[attribute] = x: " + PyErr_SetString(PyExc_IndexError, "color[item] = x: " "array assignment index out of range"); return -1; } -- cgit v1.2.3 From cd882a446a0508a15e1afe5a4e7ed3fa806d15c0 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Tue, 27 Mar 2012 10:55:20 +0000 Subject: Spelling fix, sentine -> sentinel. 'sentine' apparently means "A place for dregs and dirt; a sink; a sewer" :) --- source/blender/bmesh/intern/bmesh_opdefines.c | 130 +++++++++++++------------- 1 file changed, 65 insertions(+), 65 deletions(-) (limited to 'source/blender') diff --git a/source/blender/bmesh/intern/bmesh_opdefines.c b/source/blender/bmesh/intern/bmesh_opdefines.c index 7c07b2790c3..086aea63d50 100644 --- a/source/blender/bmesh/intern/bmesh_opdefines.c +++ b/source/blender/bmesh/intern/bmesh_opdefines.c @@ -104,7 +104,7 @@ static BMOpDefine bmo_vertexsmooth_def = { {BMO_OP_SLOT_BOOL, "mirror_clip_y"}, //set vertices close to the y axis before the operation to 0 {BMO_OP_SLOT_BOOL, "mirror_clip_z"}, //set vertices close to the z axis before the operation to 0 {BMO_OP_SLOT_FLT, "clipdist"}, //clipping threshod for the above three slots - {0} /* null-terminating sentine */, + {0} /* null-terminating sentinel */, }, bmo_vertexsmooth_exec, 0 @@ -120,7 +120,7 @@ static BMOpDefine bmo_righthandfaces_def = { "righthandfaces", {{BMO_OP_SLOT_ELEMENT_BUF, "faces"}, {BMO_OP_SLOT_BOOL, "do_flip"}, //internal flag, used by bmesh_rationalize_normals - {0} /* null-terminating sentine */, + {0} /* null-terminating sentinel */, }, bmo_righthandfaces_exec, BMO_OP_FLAG_UNTAN_MULTIRES, @@ -142,7 +142,7 @@ static BMOpDefine bmo_regionextend_def = { {BMO_OP_SLOT_ELEMENT_BUF, "geomout"}, //output slot, computed boundary geometry. {BMO_OP_SLOT_BOOL, "constrict"}, //find boundary inside the regions, not outside. {BMO_OP_SLOT_BOOL, "use_faces"}, //extend from faces instead of edges - {0} /* null-terminating sentine */, + {0} /* null-terminating sentinel */, }, bmo_regionextend_exec, 0 @@ -159,7 +159,7 @@ static BMOpDefine bmo_edgerotate_def = { {{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, //input edges {BMO_OP_SLOT_ELEMENT_BUF, "edgeout"}, //newly spun edges {BMO_OP_SLOT_BOOL, "ccw"}, //rotate edge counter-clockwise if true, othewise clockwise - {0} /* null-terminating sentine */, + {0} /* null-terminating sentinel */, }, bmo_edgerotate_exec, BMO_OP_FLAG_UNTAN_MULTIRES @@ -174,7 +174,7 @@ static BMOpDefine bmo_edgerotate_def = { static BMOpDefine bmo_reversefaces_def = { "reversefaces", {{BMO_OP_SLOT_ELEMENT_BUF, "faces"}, //input faces - {0} /* null-terminating sentine */, + {0} /* null-terminating sentinel */, }, bmo_reversefaces_exec, BMO_OP_FLAG_UNTAN_MULTIRES, @@ -191,7 +191,7 @@ static BMOpDefine bmo_edgebisect_def = { {{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, //input edges {BMO_OP_SLOT_INT, "numcuts"}, //number of cuts {BMO_OP_SLOT_ELEMENT_BUF, "outsplit"}, //newly created vertices and edges - {0} /* null-terminating sentine */, + {0} /* null-terminating sentinel */, }, bmo_edgebisect_exec, BMO_OP_FLAG_UNTAN_MULTIRES @@ -214,7 +214,7 @@ static BMOpDefine bmo_mirror_def = { {BMO_OP_SLOT_INT, "axis"}, //the axis to use, 0, 1, or 2 for x, y, z {BMO_OP_SLOT_BOOL, "mirror_u"}, //mirror UVs across the u axis {BMO_OP_SLOT_BOOL, "mirror_v"}, //mirror UVs across the v axis - {0, /* null-terminating sentine */}}, + {0, /* null-terminating sentinel */}}, bmo_mirror_exec, 0, }; @@ -231,7 +231,7 @@ static BMOpDefine bmo_finddoubles_def = { {BMO_OP_SLOT_ELEMENT_BUF, "keepverts"}, //list of verts to keep {BMO_OP_SLOT_FLT, "dist"}, //minimum distance {BMO_OP_SLOT_MAPPING, "targetmapout"}, - {0, /* null-terminating sentine */}}, + {0, /* null-terminating sentinel */}}, bmo_finddoubles_exec, 0, }; @@ -246,7 +246,7 @@ static BMOpDefine bmo_removedoubles_def = { "removedoubles", {{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, //input verts {BMO_OP_SLOT_FLT, "dist"}, //minimum distance - {0, /* null-terminating sentine */}}, + {0, /* null-terminating sentinel */}}, bmo_removedoubles_exec, BMO_OP_FLAG_UNTAN_MULTIRES, }; @@ -262,7 +262,7 @@ static BMOpDefine bmo_automerge_def = { "automerge", {{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, //input verts {BMO_OP_SLOT_FLT, "dist"}, //minimum distance - {0, /* null-terminating sentine */}}, + {0, /* null-terminating sentinel */}}, bmo_automerge_exec, BMO_OP_FLAG_UNTAN_MULTIRES, }; @@ -275,7 +275,7 @@ static BMOpDefine bmo_automerge_def = { static BMOpDefine bmo_collapse_def = { "collapse", {{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, /* input edge */ - {0, /* null-terminating sentine */}}, + {0, /* null-terminating sentinel */}}, bmo_collapse_exec, BMO_OP_FLAG_UNTAN_MULTIRES, }; @@ -290,7 +290,7 @@ static BMOpDefine bmo_pointmerge_facedata_def = { "pointmerge_facedata", {{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, /* input vertice */ {BMO_OP_SLOT_ELEMENT_BUF, "snapv"}, /* snap verte */ - {0, /* null-terminating sentine */}}, + {0, /* null-terminating sentinel */}}, bmo_pointmerge_facedata_exec, 0, }; @@ -305,7 +305,7 @@ static BMOpDefine bmo_pointmerge_facedata_def = { static BMOpDefine bmo_vert_average_facedata_def = { "vert_average_facedata", {{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, /* input vertice */ - {0, /* null-terminating sentine */}}, + {0, /* null-terminating sentinel */}}, bmo_vert_average_facedata_exec, 0, }; @@ -319,7 +319,7 @@ static BMOpDefine bmo_pointmerge_def = { "pointmerge", {{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, /* input vertice */ {BMO_OP_SLOT_VEC, "mergeco"}, - {0, /* null-terminating sentine */}}, + {0, /* null-terminating sentinel */}}, bmo_pointmerge_exec, BMO_OP_FLAG_UNTAN_MULTIRES, }; @@ -332,7 +332,7 @@ static BMOpDefine bmo_pointmerge_def = { static BMOpDefine bmo_collapse_uvs_def = { "collapse_uvs", {{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, /* input edge */ - {0, /* null-terminating sentine */}}, + {0, /* null-terminating sentinel */}}, bmo_collapse_uvs_exec, 0, }; @@ -347,7 +347,7 @@ static BMOpDefine bmo_collapse_uvs_def = { static BMOpDefine bmo_weldverts_def = { "weldverts", {{BMO_OP_SLOT_MAPPING, "targetmap"}, /* maps welded vertices to verts they should weld to */ - {0, /* null-terminating sentine */}}, + {0, /* null-terminating sentinel */}}, bmo_weldverts_exec, BMO_OP_FLAG_UNTAN_MULTIRES, }; @@ -362,7 +362,7 @@ static BMOpDefine bmo_makevert_def = { "makevert", {{BMO_OP_SLOT_VEC, "co"}, //the coordinate of the new vert {BMO_OP_SLOT_ELEMENT_BUF, "newvertout"}, //the new vert - {0, /* null-terminating sentine */}}, + {0, /* null-terminating sentinel */}}, bmo_makevert_exec, 0, }; @@ -382,7 +382,7 @@ static BMOpDefine bmo_join_triangles_def = { {BMO_OP_SLOT_BOOL, "cmp_vcols"}, {BMO_OP_SLOT_BOOL, "cmp_materials"}, {BMO_OP_SLOT_FLT, "limit"}, - {0, /* null-terminating sentine */}}, + {0, /* null-terminating sentinel */}}, bmo_join_triangles_exec, BMO_OP_FLAG_UNTAN_MULTIRES, }; @@ -402,7 +402,7 @@ static BMOpDefine bmo_contextual_create_def = { "contextual_create", {{BMO_OP_SLOT_ELEMENT_BUF, "geom"}, //input geometry. {BMO_OP_SLOT_ELEMENT_BUF, "faceout"}, //newly-made face(s) - {0, /* null-terminating sentine */}}, + {0, /* null-terminating sentinel */}}, bmo_contextual_create_exec, BMO_OP_FLAG_UNTAN_MULTIRES, }; @@ -414,7 +414,7 @@ static BMOpDefine bmo_bridge_loops_def = { "bridge_loops", {{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, /* input edge */ {BMO_OP_SLOT_ELEMENT_BUF, "faceout"}, /* new face */ - {0, /* null-terminating sentine */}}, + {0, /* null-terminating sentinel */}}, bmo_bridge_loops_exec, 0, }; @@ -428,7 +428,7 @@ static BMOpDefine bmo_edgenet_fill_def = { {BMO_OP_SLOT_ELEMENT_BUF, "excludefaces"}, /* list of faces to ignore for manifold check */ {BMO_OP_SLOT_MAPPING, "faceout_groupmap"}, /* maps new faces to the group numbers they came fro */ {BMO_OP_SLOT_ELEMENT_BUF, "faceout"}, /* new face */ - {0, /* null-terminating sentine */}}, + {0, /* null-terminating sentinel */}}, bmo_edgenet_fill_exec, 0, }; @@ -447,7 +447,7 @@ static BMOpDefine bmo_edgenet_prepare_def = { "edgenet_prepare", {{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, //input edges {BMO_OP_SLOT_ELEMENT_BUF, "edgeout"}, //new edges - {0, /* null-terminating sentine */}}, + {0, /* null-terminating sentinel */}}, bmo_edgenet_prepare, 0, }; @@ -463,7 +463,7 @@ static BMOpDefine bmo_rotate_def = { {{BMO_OP_SLOT_VEC, "cent"}, //center of rotation {BMO_OP_SLOT_MAT, "mat"}, //matrix defining rotation {BMO_OP_SLOT_ELEMENT_BUF, "verts"}, //input vertices - {0, /* null-terminating sentine */}}, + {0, /* null-terminating sentinel */}}, bmo_rotate_exec, 0, }; @@ -478,7 +478,7 @@ static BMOpDefine bmo_translate_def = { "translate", {{BMO_OP_SLOT_VEC, "vec"}, //translation offset {BMO_OP_SLOT_ELEMENT_BUF, "verts"}, //input vertices - {0, /* null-terminating sentine */}}, + {0, /* null-terminating sentinel */}}, bmo_translate_exec, 0, }; @@ -492,7 +492,7 @@ static BMOpDefine bmo_scale_def = { "scale", {{BMO_OP_SLOT_VEC, "vec"}, //scale factor {BMO_OP_SLOT_ELEMENT_BUF, "verts"}, //input vertices - {0, /* null-terminating sentine */}}, + {0, /* null-terminating sentinel */}}, bmo_scale_exec, 0, }; @@ -508,7 +508,7 @@ static BMOpDefine bmo_transform_def = { "transform", {{BMO_OP_SLOT_MAT, "mat"}, //transform matrix {BMO_OP_SLOT_ELEMENT_BUF, "verts"}, //input vertices - {0, /* null-terminating sentine */}}, + {0, /* null-terminating sentinel */}}, bmo_transform_exec, 0, }; @@ -523,7 +523,7 @@ static BMOpDefine bmo_object_load_bmesh_def = { "object_load_bmesh", {{BMO_OP_SLOT_PNT, "scene"}, {BMO_OP_SLOT_PNT, "object"}, - {0, /* null-terminating sentine */}}, + {0, /* null-terminating sentinel */}}, bmo_object_load_bmesh_exec, 0, }; @@ -539,7 +539,7 @@ static BMOpDefine bmo_bmesh_to_mesh_def = { {{BMO_OP_SLOT_PNT, "mesh"}, //pointer to a mesh structure to fill in {BMO_OP_SLOT_PNT, "object"}, //pointer to an object structure {BMO_OP_SLOT_BOOL, "notessellation"}, //don't calculate mfaces - {0, /* null-terminating sentine */}}, + {0, /* null-terminating sentinel */}}, bmo_bmesh_to_mesh_exec, 0, }; @@ -555,7 +555,7 @@ static BMOpDefine bmo_mesh_to_bmesh_def = { {{BMO_OP_SLOT_PNT, "mesh"}, //pointer to a Mesh structure {BMO_OP_SLOT_PNT, "object"}, //pointer to an Object structure {BMO_OP_SLOT_BOOL, "set_shapekey"}, //load active shapekey coordinates into verts - {0, /* null-terminating sentine */}}, + {0, /* null-terminating sentinel */}}, bmo_mesh_to_bmesh_exec, 0 }; @@ -570,7 +570,7 @@ static BMOpDefine bmo_extrude_indivface_def = { {{BMO_OP_SLOT_ELEMENT_BUF, "faces"}, //input faces {BMO_OP_SLOT_ELEMENT_BUF, "faceout"}, //output faces {BMO_OP_SLOT_ELEMENT_BUF, "skirtout"}, //output skirt geometry, faces and edges - {0} /* null-terminating sentine */}, + {0} /* null-terminating sentinel */}, bmo_extrude_face_indiv_exec, 0 }; @@ -585,7 +585,7 @@ static BMOpDefine bmo_extrude_edge_only_def = { "extrude_edge_only", {{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, //input vertices {BMO_OP_SLOT_ELEMENT_BUF, "geomout"}, //output geometry - {0} /* null-terminating sentine */}, + {0} /* null-terminating sentinel */}, bmo_extrude_edge_only_exec, 0 }; @@ -600,7 +600,7 @@ static BMOpDefine bmo_extrude_vert_indiv_def = { {{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, //input vertices {BMO_OP_SLOT_ELEMENT_BUF, "edgeout"}, //output wire edges {BMO_OP_SLOT_ELEMENT_BUF, "vertout"}, //output vertices - {0} /* null-terminating sentine */}, + {0} /* null-terminating sentinel */}, bmo_extrude_vert_indiv_exec, 0 }; @@ -609,7 +609,7 @@ static BMOpDefine bmo_connectverts_def = { "connectverts", {{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, {BMO_OP_SLOT_ELEMENT_BUF, "edgeout"}, - {0} /* null-terminating sentine */}, + {0} /* null-terminating sentinel */}, bmo_connectverts_exec, BMO_OP_FLAG_UNTAN_MULTIRES }; @@ -620,7 +620,7 @@ static BMOpDefine bmo_extrude_face_region_def = { {BMO_OP_SLOT_MAPPING, "exclude"}, {BMO_OP_SLOT_BOOL, "alwayskeeporig"}, {BMO_OP_SLOT_ELEMENT_BUF, "geomout"}, - {0} /* null-terminating sentine */}, + {0} /* null-terminating sentinel */}, bmo_extrude_face_region_exec, 0 }; @@ -628,7 +628,7 @@ static BMOpDefine bmo_extrude_face_region_def = { static BMOpDefine bmo_dissolve_verts_def = { "dissolve_verts", {{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, - {0} /* null-terminating sentine */}, + {0} /* null-terminating sentinel */}, bmo_dissolve_verts_exec, BMO_OP_FLAG_UNTAN_MULTIRES }; @@ -638,7 +638,7 @@ static BMOpDefine bmo_dissolve_edges_def = { {{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, {BMO_OP_SLOT_ELEMENT_BUF, "regionout"}, {BMO_OP_SLOT_BOOL, "use_verts"}, // dissolve verts left between only 2 edges. - {0} /* null-terminating sentine */}, + {0} /* null-terminating sentinel */}, bmo_dissolve_edges_exec, BMO_OP_FLAG_UNTAN_MULTIRES }; @@ -647,7 +647,7 @@ static BMOpDefine bmo_dissolve_edge_loop_def = { "dissolve_edge_loop", {{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, {BMO_OP_SLOT_ELEMENT_BUF, "regionout"}, - {0} /* null-terminating sentine */}, + {0} /* null-terminating sentinel */}, bmo_dissolve_edgeloop_exec, BMO_OP_FLAG_UNTAN_MULTIRES }; @@ -657,7 +657,7 @@ static BMOpDefine bmo_dissolve_faces_def = { {{BMO_OP_SLOT_ELEMENT_BUF, "faces"}, {BMO_OP_SLOT_ELEMENT_BUF, "regionout"}, {BMO_OP_SLOT_BOOL, "use_verts"}, // dissolve verts left between only 2 edges. - {0} /* null-terminating sentine */}, + {0} /* null-terminating sentinel */}, bmo_dissolve_faces_exec, BMO_OP_FLAG_UNTAN_MULTIRES }; @@ -667,7 +667,7 @@ static BMOpDefine bmo_dissolve_limit_def = { {{BMO_OP_SLOT_FLT, "angle_limit"}, /* total rotation angle (degrees) */ {BMO_OP_SLOT_ELEMENT_BUF, "verts"}, {BMO_OP_SLOT_ELEMENT_BUF, "edges"}, - {0} /* null-terminating sentine */}, + {0} /* null-terminating sentinel */}, bmo_dissolve_limit_exec, BMO_OP_FLAG_UNTAN_MULTIRES }; @@ -679,7 +679,7 @@ static BMOpDefine bmo_triangulate_def = { {BMO_OP_SLOT_ELEMENT_BUF, "faceout"}, {BMO_OP_SLOT_MAPPING, "facemap"}, {BMO_OP_SLOT_BOOL, "use_beauty"}, - {0} /* null-terminating sentine */}, + {0} /* null-terminating sentinel */}, bmo_triangulate_exec, BMO_OP_FLAG_UNTAN_MULTIRES }; @@ -704,7 +704,7 @@ static BMOpDefine bmo_esubd_def = { {BMO_OP_SLOT_BOOL, "gridfill"}, //fill in fully-selected faces with a grid {BMO_OP_SLOT_BOOL, "singleedge"}, //tessellate the case of one edge selected in a quad or triangle - {0} /* null-terminating sentine */, + {0} /* null-terminating sentinel */, }, bmo_esubd_exec, BMO_OP_FLAG_UNTAN_MULTIRES @@ -714,7 +714,7 @@ static BMOpDefine bmo_del_def = { "del", {{BMO_OP_SLOT_ELEMENT_BUF, "geom"}, {BMO_OP_SLOT_INT, "context"}, - {0} /* null-terminating sentine */}, + {0} /* null-terminating sentinel */}, bmo_del_exec, 0 }; @@ -730,7 +730,7 @@ static BMOpDefine bmo_dupe_def = { {BMO_OP_SLOT_MAPPING, "boundarymap"}, {BMO_OP_SLOT_MAPPING, "isovertmap"}, {BMO_OP_SLOT_PNT, "dest"}, /* destination bmesh, if NULL will use current on */ - {0} /* null-terminating sentine */}, + {0} /* null-terminating sentinel */}, bmo_dupe_exec, 0 }; @@ -743,7 +743,7 @@ static BMOpDefine bmo_split_def = { {BMO_OP_SLOT_MAPPING, "isovertmap"}, {BMO_OP_SLOT_PNT, "dest"}, /* destination bmesh, if NULL will use current on */ {BMO_OP_SLOT_BOOL, "use_only_faces"}, /* when enabled. don't duplicate loose verts/edges */ - {0} /* null-terminating sentine */}, + {0} /* null-terminating sentinel */}, bmo_split_exec, 0 }; @@ -764,7 +764,7 @@ static BMOpDefine bmo_spin_def = { {BMO_OP_SLOT_FLT, "ang"}, /* total rotation angle (degrees) */ {BMO_OP_SLOT_INT, "steps"}, /* number of steps */ {BMO_OP_SLOT_BOOL, "do_dupli"}, /* duplicate or extrude? */ - {0} /* null-terminating sentine */}, + {0} /* null-terminating sentinel */}, bmo_spin_exec, 0 }; @@ -781,7 +781,7 @@ static BMOpDefine bmo_similarfaces_def = { {BMO_OP_SLOT_ELEMENT_BUF, "faceout"}, /* output faces */ {BMO_OP_SLOT_INT, "type"}, /* type of selection */ {BMO_OP_SLOT_FLT, "thresh"}, /* threshold of selection */ - {0} /* null-terminating sentine */}, + {0} /* null-terminating sentinel */}, bmo_similarfaces_exec, 0 }; @@ -797,7 +797,7 @@ static BMOpDefine bmo_similaredges_def = { {BMO_OP_SLOT_ELEMENT_BUF, "edgeout"}, /* output edges */ {BMO_OP_SLOT_INT, "type"}, /* type of selection */ {BMO_OP_SLOT_FLT, "thresh"}, /* threshold of selection */ - {0} /* null-terminating sentine */}, + {0} /* null-terminating sentinel */}, bmo_similaredges_exec, 0 }; @@ -813,7 +813,7 @@ static BMOpDefine bmo_similarverts_def = { {BMO_OP_SLOT_ELEMENT_BUF, "vertout"}, /* output vertices */ {BMO_OP_SLOT_INT, "type"}, /* type of selection */ {BMO_OP_SLOT_FLT, "thresh"}, /* threshold of selection */ - {0} /* null-terminating sentine */}, + {0} /* null-terminating sentinel */}, bmo_similarverts_exec, 0 }; @@ -826,7 +826,7 @@ static BMOpDefine bmo_face_rotateuvs_def = { "face_rotateuvs", {{BMO_OP_SLOT_ELEMENT_BUF, "faces"}, /* input faces */ {BMO_OP_SLOT_INT, "dir"}, /* direction */ - {0} /* null-terminating sentine */}, + {0} /* null-terminating sentinel */}, bmo_face_rotateuvs_exec, 0 }; @@ -838,7 +838,7 @@ static BMOpDefine bmo_face_rotateuvs_def = { static BMOpDefine bmo_face_reverseuvs_def = { "face_reverseuvs", {{BMO_OP_SLOT_ELEMENT_BUF, "faces"}, /* input faces */ - {0} /* null-terminating sentine */}, + {0} /* null-terminating sentinel */}, bmo_face_reverseuvs_exec, 0 }; @@ -851,7 +851,7 @@ static BMOpDefine bmo_face_rotatecolors_def = { "face_rotatecolors", {{BMO_OP_SLOT_ELEMENT_BUF, "faces"}, /* input faces */ {BMO_OP_SLOT_INT, "dir"}, /* direction */ - {0} /* null-terminating sentine */}, + {0} /* null-terminating sentinel */}, bmo_rotatecolors_exec, 0 }; @@ -863,7 +863,7 @@ static BMOpDefine bmo_face_rotatecolors_def = { static BMOpDefine bmo_face_reversecolors_def = { "face_reversecolors", {{BMO_OP_SLOT_ELEMENT_BUF, "faces"}, /* input faces */ - {0} /* null-terminating sentine */}, + {0} /* null-terminating sentinel */}, bmo_face_reversecolors_exec, 0 }; @@ -879,7 +879,7 @@ static BMOpDefine bmo_vertexshortestpath_def = { {BMO_OP_SLOT_ELEMENT_BUF, "endv"}, /* end vertex */ {BMO_OP_SLOT_ELEMENT_BUF, "vertout"}, /* output vertices */ {BMO_OP_SLOT_INT, "type"}, /* type of selection */ - {0} /* null-terminating sentine */}, + {0} /* null-terminating sentinel */}, bmo_vertexshortestpath_exec, 0 }; @@ -896,7 +896,7 @@ static BMOpDefine bmo_edgesplit_def = { /* needed for vertex rip so we can rip only half an edge at a boundary wich would otherwise split off */ {BMO_OP_SLOT_ELEMENT_BUF, "verts"}, /* optional tag verts, use to have greater control of splits */ {BMO_OP_SLOT_BOOL, "use_verts"}, /* use 'verts' for splitting, else just find verts to split from edges */ - {0} /* null-terminating sentine */}, + {0} /* null-terminating sentinel */}, bmo_edgesplit_exec, BMO_OP_FLAG_UNTAN_MULTIRES }; @@ -913,7 +913,7 @@ static BMOpDefine bmo_create_grid_def = { {BMO_OP_SLOT_INT, "ysegments"}, //number of y segments {BMO_OP_SLOT_FLT, "size"}, //size of the grid {BMO_OP_SLOT_MAT, "mat"}, //matrix to multiply the new geometry with - {0, /* null-terminating sentine */}}, + {0, /* null-terminating sentinel */}}, bmo_create_grid_exec, 0, }; @@ -930,7 +930,7 @@ static BMOpDefine bmo_create_uvsphere_def = { {BMO_OP_SLOT_INT, "revolutions"}, //number of v segment {BMO_OP_SLOT_FLT, "diameter"}, //diameter {BMO_OP_SLOT_MAT, "mat"}, //matrix to multiply the new geometry with-- - {0, /* null-terminating sentine */}}, + {0, /* null-terminating sentinel */}}, bmo_create_uvsphere_exec, 0, }; @@ -946,7 +946,7 @@ static BMOpDefine bmo_create_icosphere_def = { {BMO_OP_SLOT_INT, "subdivisions"}, //how many times to recursively subdivide the sphere {BMO_OP_SLOT_FLT, "diameter"}, //diameter {BMO_OP_SLOT_MAT, "mat"}, //matrix to multiply the new geometry with - {0, /* null-terminating sentine */}}, + {0, /* null-terminating sentinel */}}, bmo_create_icosphere_exec, 0, }; @@ -960,7 +960,7 @@ static BMOpDefine bmo_create_monkey_def = { "create_monkey", {{BMO_OP_SLOT_ELEMENT_BUF, "vertout"}, //output verts {BMO_OP_SLOT_MAT, "mat"}, //matrix to multiply the new geometry with-- - {0, /* null-terminating sentine */}}, + {0, /* null-terminating sentinel */}}, bmo_create_monkey_exec, 0, }; @@ -980,7 +980,7 @@ static BMOpDefine bmo_create_cone_def = { {BMO_OP_SLOT_FLT, "diameter2"}, //diameter of the opposite {BMO_OP_SLOT_FLT, "depth"}, //distance between ends {BMO_OP_SLOT_MAT, "mat"}, //matrix to multiply the new geometry with-- - {0, /* null-terminating sentine */}}, + {0, /* null-terminating sentinel */}}, bmo_create_cone_exec, 0, }; @@ -996,7 +996,7 @@ static BMOpDefine bmo_create_circle_def = { {BMO_OP_SLOT_INT, "segments"}, {BMO_OP_SLOT_FLT, "diameter"}, //diameter of one end {BMO_OP_SLOT_MAT, "mat"}, //matrix to multiply the new geometry with-- - {0, /* null-terminating sentine */}}, + {0, /* null-terminating sentinel */}}, bmo_create_circle_exec, 0, }; @@ -1011,7 +1011,7 @@ static BMOpDefine bmo_create_cube_def = { {{BMO_OP_SLOT_ELEMENT_BUF, "vertout"}, //output verts {BMO_OP_SLOT_FLT, "size"}, //size of the cube {BMO_OP_SLOT_MAT, "mat"}, //matrix to multiply the new geometry with-- - {0, /* null-terminating sentine */}}, + {0, /* null-terminating sentinel */}}, bmo_create_cube_exec, 0, }; @@ -1032,7 +1032,7 @@ static BMOpDefine bmo_bevel_def = { * modifier uses this. We could do this as another float setting */ {BMO_OP_SLOT_INT, "lengthlayer"}, /* which PROP_FLT layer to us */ {BMO_OP_SLOT_FLT, "percent"}, /* percentage to expand bevelled edge */ - {0} /* null-terminating sentine */}, + {0} /* null-terminating sentinel */}, bmo_bevel_exec, BMO_OP_FLAG_UNTAN_MULTIRES }; @@ -1047,7 +1047,7 @@ static BMOpDefine bmo_beautify_fill_def = { {{BMO_OP_SLOT_ELEMENT_BUF, "faces"}, /* input faces */ {BMO_OP_SLOT_ELEMENT_BUF, "constrain_edges"}, /* edges that can't be flipped */ {BMO_OP_SLOT_ELEMENT_BUF, "geomout"}, /* new flipped faces and edges */ - {0} /* null-terminating sentine */}, + {0} /* null-terminating sentinel */}, bmo_beautify_fill_exec, BMO_OP_FLAG_UNTAN_MULTIRES }; @@ -1061,7 +1061,7 @@ static BMOpDefine bmo_triangle_fill_def = { "triangle_fill", {{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, /* input edges */ {BMO_OP_SLOT_ELEMENT_BUF, "geomout"}, /* new faces and edges */ - {0} /* null-terminating sentine */}, + {0} /* null-terminating sentinel */}, bmo_triangle_fill_exec, BMO_OP_FLAG_UNTAN_MULTIRES }; @@ -1095,7 +1095,7 @@ static BMOpDefine bmo_inset_def = { {BMO_OP_SLOT_BOOL, "use_relative_offset"}, {BMO_OP_SLOT_FLT, "thickness"}, {BMO_OP_SLOT_BOOL, "use_outset"}, - {0} /* null-terminating sentine */}, + {0} /* null-terminating sentinel */}, bmo_inset_exec, 0 }; -- cgit v1.2.3 From 9c9745ef304f0a622de35e2446f062dc0e760a14 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Tue, 27 Mar 2012 11:03:10 +0000 Subject: Fix more truncated comments. --- source/blender/bmesh/operators/bmo_dupe.c | 26 +++++++++---------- source/blender/bmesh/operators/bmo_removedoubles.c | 10 ++++---- source/blender/bmesh/operators/bmo_subdivide.c | 30 +++++++++++----------- 3 files changed, 33 insertions(+), 33 deletions(-) (limited to 'source/blender') diff --git a/source/blender/bmesh/operators/bmo_dupe.c b/source/blender/bmesh/operators/bmo_dupe.c index 9a87acbb84f..156725099a8 100644 --- a/source/blender/bmesh/operators/bmo_dupe.c +++ b/source/blender/bmesh/operators/bmo_dupe.c @@ -29,7 +29,7 @@ #include "bmesh.h" /* local flag define */ -#define DUPE_INPUT 1 /* input from operato */ +#define DUPE_INPUT 1 /* input from operator */ #define DUPE_NEW 2 #define DUPE_DONE 4 #define DUPE_MAPPED 8 @@ -44,16 +44,16 @@ static BMVert *copy_vertex(BMesh *source_mesh, BMVert *source_vertex, BMesh *tar { BMVert *target_vertex = NULL; - /* Create a new verte */ + /* Create a new vertex */ target_vertex = BM_vert_create(target_mesh, source_vertex->co, NULL); - /* Insert new vertex into the vert has */ + /* Insert new vertex into the vert hash */ BLI_ghash_insert(vhash, source_vertex, target_vertex); - /* Copy attribute */ + /* Copy attributes */ BM_elem_attrs_copy(source_mesh, target_mesh, source_vertex, target_vertex); - /* Set internal op flag */ + /* Set internal op flags */ BMO_elem_flag_enable(target_mesh, target_vertex, DUPE_NEW); return target_vertex; @@ -92,10 +92,10 @@ static BMEdge *copy_edge(BMOperator *op, BMesh *source_mesh, target_vert1 = BLI_ghash_lookup(vhash, source_edge->v1); target_vert2 = BLI_ghash_lookup(vhash, source_edge->v2); - /* Create a new edg */ + /* Create a new edge */ target_edge = BM_edge_create(target_mesh, target_vert1, target_vert2, NULL, FALSE); - /* add to new/old edge map if necassar */ + /* add to new/old edge map if necassary */ if (rlen < 2) { /* not sure what non-manifold cases of greater then three * radial should do. */ @@ -149,7 +149,7 @@ static BMFace *copy_face(BMOperator *op, BMesh *source_mesh, edar[i] = BLI_ghash_lookup(ehash, source_loop->e); } - /* create new fac */ + /* create new face */ target_face = BM_face_create(target_mesh, vtar, edar, source_face->len, FALSE); BMO_slot_map_ptr_insert(source_mesh, op, "facemap", source_face, target_face); @@ -158,10 +158,10 @@ static BMFace *copy_face(BMOperator *op, BMesh *source_mesh, BM_elem_attrs_copy(source_mesh, target_mesh, source_face, target_face); - /* mark the face for outpu */ + /* mark the face for output */ BMO_elem_flag_enable(target_mesh, target_face, DUPE_NEW); - /* copy per-loop custom dat */ + /* copy per-loop custom data */ BM_ITER(source_loop, &iter, source_mesh, BM_LOOPS_OF_FACE, source_face) { BM_ITER(target_loop, &iter2, target_mesh, BM_LOOPS_OF_FACE, target_face) { if (BLI_ghash_lookup(vhash, source_loop->v) == target_loop->v) { @@ -249,7 +249,7 @@ static void copy_mesh(BMOperator *op, BMesh *source, BMesh *target) copy_vertex(source, e->v2, target, vhash); BMO_elem_flag_enable(source, e->v2, DUPE_DONE); } - /* now copy the actual edge*/ + /* now copy the actual edge */ copy_edge(op, source, e, target, vhash, ehash); BMO_elem_flag_enable(source, e, DUPE_DONE); } @@ -258,7 +258,7 @@ static void copy_mesh(BMOperator *op, BMesh *source, BMesh *target) /* first we dupe all flagged faces and their elements from source */ for (f = BM_iter_new(&faces, source, BM_FACES_OF_MESH, source); f; f = BM_iter_step(&faces)) { if (BMO_elem_flag_test(source, f, DUPE_INPUT)) { - /* vertex pas */ + /* vertex pass */ for (v = BM_iter_new(&verts, source, BM_VERTS_OF_FACE, f); v; v = BM_iter_step(&verts)) { if (!BMO_elem_flag_test(source, v, DUPE_DONE)) { copy_vertex(source, v, target, vhash); @@ -330,7 +330,7 @@ void bmo_dupe_exec(BMesh *bm, BMOperator *op) /* use the internal copy function */ copy_mesh(dupeop, bm, bm2); - /* Outpu */ + /* Output */ /* First copy the input buffers to output buffers - original data */ BMO_slot_copy(dupeop, dupeop, "geom", "origout"); diff --git a/source/blender/bmesh/operators/bmo_removedoubles.c b/source/blender/bmesh/operators/bmo_removedoubles.c index a97ed6d9dfd..a5e4cd31f41 100644 --- a/source/blender/bmesh/operators/bmo_removedoubles.c +++ b/source/blender/bmesh/operators/bmo_removedoubles.c @@ -42,7 +42,7 @@ static void remdoubles_splitface(BMFace *f, BMesh *bm, BMOperator *op) BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, f) { v2 = BMO_slot_map_ptr_get(bm, op, "targetmap", l->v); /* ok: if v2 is NULL (e.g. not in the map) then it's - * a target vert, otherwise it's a doubl */ + * a target vert, otherwise it's a double */ if ((v2 && BM_vert_in_face(f, v2)) && (v2 != l->prev->v) && (v2 != l->next->v)) @@ -412,7 +412,7 @@ void bmo_collapse_exec(BMesh *bm, BMOperator *op) BLI_array_free(edges); } -/* uv collapse functio */ +/* uv collapse function */ static void bmo_collapsecon_do_layer(BMesh *bm, BMOperator *op, int layer) { BMIter iter, liter; @@ -436,7 +436,7 @@ static void bmo_collapsecon_do_layer(BMesh *bm, BMOperator *op, int layer) BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) { BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, f) { if (BMO_elem_flag_test(bm, l->e, EDGE_MARK)) { - /* wal */ + /* walk */ BLI_array_empty(blocks); tot = 0; l2 = BMW_begin(&walker, l); @@ -453,7 +453,7 @@ static void bmo_collapsecon_do_layer(BMesh *bm, BMOperator *op, int layer) CustomData_data_multiply(type, &max, 0.5f); CustomData_data_add(type, &min, &max); - /* snap CD (uv, vcol) points to their centroi */ + /* snap CD (uv, vcol) points to their centroid */ for (i = 0; i < tot; i++) { CustomData_data_copy_value(type, &min, blocks[i]); } @@ -499,7 +499,7 @@ void bmesh_finddoubles_common(BMesh *bm, BMOperator *op, BMOperator *optarget, c keepvert = BMO_iter_new(&oiter, bm, op, "keepverts", BM_VERT) != NULL; } - /* sort by vertex coordinates added togethe */ + /* sort by vertex coordinates added together */ qsort(verts, BLI_array_count(verts), sizeof(void *), vergaverco); /* Flag keepverts */ diff --git a/source/blender/bmesh/operators/bmo_subdivide.c b/source/blender/bmesh/operators/bmo_subdivide.c index b0dd8778789..f0683d8f49d 100644 --- a/source/blender/bmesh/operators/bmo_subdivide.c +++ b/source/blender/bmesh/operators/bmo_subdivide.c @@ -154,7 +154,7 @@ static void alter_co(BMesh *bm, BMVert *v, BMEdge *UNUSED(origed), const SubDPar mul_v3_v3(vec2, tvec); - /* add displacemen */ + /* add displacement */ add_v3_v3v3(co, co, vec2); } @@ -280,7 +280,7 @@ static void quad_1edge_split(BMesh *bm, BMFace *UNUSED(face), BMFace *nf; int i, add, numcuts = params->numcuts; - /* if it's odd, the middle face is a quad, otherwise it's a triangl */ + /* if it's odd, the middle face is a quad, otherwise it's a triangle */ if ((numcuts % 2) == 0) { add = 2; for (i = 0; i < numcuts; i++) { @@ -734,7 +734,7 @@ void bmo_esubd_exec(BMesh *bmesh, BMOperator *op) patterns[5] = NULL; } - /* add a temporary shapekey layer to store displacements on current geometr */ + /* add a temporary shapekey layer to store displacements on current geometry */ BM_data_layer_add(bmesh, &bmesh->vdata, CD_SHAPEKEY); skey = CustomData_number_of_layers(&bmesh->vdata, CD_SHAPEKEY) - 1; @@ -743,7 +743,7 @@ void bmo_esubd_exec(BMesh *bmesh, BMOperator *op) copy_v3_v3(co, v->co); } - /* first go through and tag edge */ + /* first go through and tag edges */ BMO_slot_buffer_from_flag(bmesh, op, "edges", BM_EDGE, SUBD_SPLIT); params.numcuts = numcuts; @@ -770,7 +770,7 @@ void bmo_esubd_exec(BMesh *bmesh, BMOperator *op) BMEdge *e1 = NULL, *e2 = NULL; float vec1[3], vec2[3]; - /* figure out which pattern to us */ + /* figure out which pattern to use */ BLI_array_empty(edges); BLI_array_empty(verts); @@ -794,7 +794,7 @@ void bmo_esubd_exec(BMesh *bmesh, BMOperator *op) i++; } - /* make sure the two edges have a valid angle to each othe */ + /* make sure the two edges have a valid angle to each other */ if (totesel == 2 && BM_edge_share_vert_count(e1, e2)) { float angle; @@ -834,7 +834,7 @@ void bmo_esubd_exec(BMesh *bmesh, BMOperator *op) } } - /* obvously don't test for other patterns matchin */ + /* obvously don't test for other patterns matching */ continue; } @@ -886,13 +886,13 @@ void bmo_esubd_exec(BMesh *bmesh, BMOperator *op) einput = BMO_slot_get(op, "edges"); - /* go through and split edge */ + /* go through and split edges */ for (i = 0; i < einput->len; i++) { edge = ((BMEdge **)einput->data.p)[i]; bm_subdivide_multicut(bmesh, edge, ¶ms, edge->v1, edge->v2); } - /* copy original-geometry displacements to current coordinate */ + /* copy original-geometry displacements to current coordinates */ BM_ITER(v, &viter, bmesh, BM_VERTS_OF_MESH, NULL) { float *co = CustomData_bmesh_get_n(&bmesh->vdata, v->head.data, CD_SHAPEKEY, skey); copy_v3_v3(v->co, co); @@ -902,7 +902,7 @@ void bmo_esubd_exec(BMesh *bmesh, BMOperator *op) for (i = 0; i < BLI_array_count(facedata); i++) { face = facedata[i].face; - /* figure out which pattern to us */ + /* figure out which pattern to use */ BLI_array_empty(verts); pat = facedata[i].pat; @@ -914,7 +914,7 @@ void bmo_esubd_exec(BMesh *bmesh, BMOperator *op) BLI_array_empty(loops); BLI_array_empty(splits); - /* for case of two edges, connecting them shouldn't be too har */ + /* for case of two edges, connecting them shouldn't be too hard */ BM_ITER(l, &liter, bmesh, BM_LOOPS_OF_FACE, face) { BLI_array_growone(loops); loops[BLI_array_count(loops) - 1] = l; @@ -922,7 +922,7 @@ void bmo_esubd_exec(BMesh *bmesh, BMOperator *op) vlen = BLI_array_count(loops); - /* find the boundary of one of the split edge */ + /* find the boundary of one of the split edges */ for (a = 1; a < vlen; a++) { if (!BMO_elem_flag_test(bmesh, loops[a - 1]->v, ELE_INNER) && BMO_elem_flag_test(bmesh, loops[a]->v, ELE_INNER)) @@ -1001,7 +1001,7 @@ void bmo_esubd_exec(BMesh *bmesh, BMOperator *op) pat->connectexec(bmesh, face, verts, ¶ms); } - /* copy original-geometry displacements to current coordinate */ + /* copy original-geometry displacements to current coordinates */ BM_ITER(v, &viter, bmesh, BM_VERTS_OF_MESH, NULL) { float *co = CustomData_bmesh_get_n(&bmesh->vdata, v->head.data, CD_SHAPEKEY, skey); copy_v3_v3(v->co, co); @@ -1021,7 +1021,7 @@ void bmo_esubd_exec(BMesh *bmesh, BMOperator *op) BMO_slot_buffer_from_flag(bmesh, op, "geomout", BM_ALL, ELE_INNER|ELE_SPLIT|SUBD_SPLIT); } -/* editmesh-emulating functio */ +/* editmesh-emulating function */ void BM_mesh_esubdivideflag(Object *UNUSED(obedit), BMesh *bm, int flag, float smooth, float fractal, int beauty, int numcuts, int seltype, int cornertype, int singleedge, @@ -1101,7 +1101,7 @@ void bmo_edgebisect_exec(BMesh *bm, BMOperator *op) params.origkey = skey; - /* go through and split edge */ + /* go through and split edges */ BMO_ITER(e, &siter, bm, op, "edges", BM_EDGE) { bm_subdivide_multicut(bm, e, ¶ms, e->v1, e->v2); } -- cgit v1.2.3 From f71f09d71436c06c8d7cff0c578249a97b0ac03c Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Tue, 27 Mar 2012 12:34:00 +0000 Subject: Partial fix for bug 30695, "Array broke crease, weird visibility and slowdown" * Array modifier creates BMesh from DM; add missing CD_CREASE layer for edge creases. * With a modifier stack like mirror+subsurf+array, face normals were wrong. Fix by removing CD_NORMAL layer from CCGDM output. Previously the elements in this layer were simply copied, so they did not reflect subdivision correctly. * Minor style fixes in bmo_dupe.c. Issues not yet addressed: * Subsurf's optimal draw setting for hiding subdivision edges is not respected by the array output. * Slowdown issue; array modifier is much slower than in 2.62. --- source/blender/blenkernel/intern/modifiers_bmesh.c | 15 +++++++++++++++ source/blender/blenkernel/intern/subsurf_ccg.c | 3 +++ source/blender/bmesh/operators/bmo_dupe.c | 13 +++++++------ 3 files changed, 25 insertions(+), 6 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/modifiers_bmesh.c b/source/blender/blenkernel/intern/modifiers_bmesh.c index 20fdd4b2b48..52b76eabc6c 100644 --- a/source/blender/blenkernel/intern/modifiers_bmesh.c +++ b/source/blender/blenkernel/intern/modifiers_bmesh.c @@ -49,6 +49,7 @@ void DM_to_bmesh_ex(DerivedMesh *dm, BMesh *bm) MLoop *mloop, *ml; BMVert *v, **vtable, **verts = NULL; BMEdge *e, **etable, **edges = NULL; + float has_face_normals; BMFace *f; BMIter liter; BLI_array_declare(verts); @@ -65,6 +66,9 @@ void DM_to_bmesh_ex(DerivedMesh *dm, BMesh *bm) totedge = dm->getNumEdges(dm); /* totface = dm->getNumPolys(dm); */ /* UNUSED */ + /* add crease layer */ + BM_data_layer_add(bm, &bm->edata, CD_CREASE); + vtable = MEM_callocN(sizeof(void**) * totvert, "vert table in BMDM_Copy"); etable = MEM_callocN(sizeof(void**) * totedge, "edge table in BMDM_Copy"); @@ -89,12 +93,16 @@ void DM_to_bmesh_ex(DerivedMesh *dm, BMesh *bm) CustomData_to_bmesh_block(&dm->edgeData, &bm->edata, i, &e->head.data); etable[i] = e; + + /* add crease */ + BM_elem_float_data_set(&bm->edata, e, CD_CREASE, (float)me->crease / 255.0f); } MEM_freeN(medge); /*do faces*/ mp = dm->getPolyArray(dm); mloop = dm->getLoopArray(dm); + has_face_normals = CustomData_has_layer(&dm->polyData, CD_NORMAL); for (i = 0; i < dm->numPolyData; i++, mp++) { BMLoop *l; @@ -126,6 +134,13 @@ void DM_to_bmesh_ex(DerivedMesh *dm, BMesh *bm) } CustomData_to_bmesh_block(&dm->polyData, &bm->pdata, i, &f->head.data); + + if (has_face_normals) { + float *fno; + + fno = CustomData_bmesh_get(&bm->pdata, &f->head.data, CD_NORMAL); + copy_v3_v3(f->no, fno); + } } MEM_freeN(vtable); diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index 214919265e9..6e0149553a2 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -2944,6 +2944,9 @@ static CCGDerivedMesh *getCCGDerivedMesh(CCGSubSurf *ss, ccgSubSurf_getNumFinalFaces(ss), ccgSubSurf_getNumFinalFaces(ss)*4, ccgSubSurf_getNumFinalFaces(ss)); + + CustomData_free_layer_active(&ccgdm->dm.polyData, CD_NORMAL, + ccgdm->dm.numPolyData); numTex = CustomData_number_of_layers(&ccgdm->dm.loopData, CD_MLOOPUV); numCol = CustomData_number_of_layers(&ccgdm->dm.loopData, CD_MLOOPCOL); diff --git a/source/blender/bmesh/operators/bmo_dupe.c b/source/blender/bmesh/operators/bmo_dupe.c index 156725099a8..4c6ad7e268a 100644 --- a/source/blender/bmesh/operators/bmo_dupe.c +++ b/source/blender/bmesh/operators/bmo_dupe.c @@ -201,33 +201,34 @@ static void copy_mesh(BMOperator *op, BMesh *source, BMesh *target) /* initialize pointer hashes */ vhash = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "bmesh dupeops v"); ehash = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "bmesh dupeops e"); - + + /* duplicate flagged vertices */ for (v = BM_iter_new(&verts, source, BM_VERTS_OF_MESH, source); v; v = BM_iter_step(&verts)) { if ( BMO_elem_flag_test(source, v, DUPE_INPUT) && !BMO_elem_flag_test(source, v, DUPE_DONE)) { BMIter iter; - int iso = 1; + int isolated = 1; v2 = copy_vertex(source, v, target, vhash); BM_ITER(f, &iter, source, BM_FACES_OF_VERT, v) { if (BMO_elem_flag_test(source, f, DUPE_INPUT)) { - iso = 0; + isolated = 0; break; } } - if (iso) { + if (isolated) { BM_ITER(e, &iter, source, BM_EDGES_OF_VERT, v) { if (BMO_elem_flag_test(source, e, DUPE_INPUT)) { - iso = 0; + isolated = 0; break; } } } - if (iso) { + if (isolated) { BMO_slot_map_ptr_insert(source, op, "isovertmap", v, v2); } -- cgit v1.2.3 From df5e551535d3954e6e46a9367f8c9b77e29946f4 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Tue, 27 Mar 2012 13:08:40 +0000 Subject: Fix bug 30697, strange shading on array modifier with offset object. * An offset object can rotate output, so need to update normals to reflect that. Fix by adding a normals recalc, but only if there's an offset object. * Added BMESH_TODO comment to check whether there are other cases were normals need to be updated. --- source/blender/modifiers/intern/MOD_array.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/blender') diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c index 4304b617d77..4bfe63dcaac 100644 --- a/source/blender/modifiers/intern/MOD_array.c +++ b/source/blender/modifiers/intern/MOD_array.c @@ -409,6 +409,15 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, BLI_assert(em->looptris == NULL); result = CDDM_from_BMEditMesh(em, NULL, FALSE, FALSE); + if ((amd->offset_type & MOD_ARR_OFF_OBJ) && (amd->offset_ob)) { + /* Update normals in case offset object has rotation. */ + + /* BMESH_TODO: check if normal recalc needed under any other + conditions? */ + + CDDM_calc_normals(result); + } + BMEdit_Free(em); MEM_freeN(em); if (indexMap) -- cgit v1.2.3 From cbf09f7a167ccbe47e07094e0f8c01e6d3d4f88d Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 27 Mar 2012 17:19:13 +0000 Subject: Fix related to #30674: 2D image painting would do unnecessary full GL texture delete at the end of the stroke, even when doing partial updates. --- source/blender/editors/sculpt_paint/paint_image.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index d2cf5c3c294..9139ccb9aa6 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -4726,10 +4726,10 @@ typedef struct PaintOperation { short restore_projection; } PaintOperation; -static void paint_redraw(bContext *C, ImagePaintState *s, int final) +static void paint_redraw(bContext *C, ImagePaintState *s, int texpaint, int final) { if (final) { - if (s->image) + if (s->image && !(texpaint || (s->sima && s->sima->lock))) GPU_free_image(s->image); /* compositor listener deals with updating */ @@ -4938,7 +4938,7 @@ static void paint_apply(bContext *C, wmOperator *op, PointerRNA *itemptr) } if (redraw) - paint_redraw(C, &pop->s, 0); + paint_redraw(C, &pop->s, pop->mode == PAINT_MODE_3D, 0); pop->first= 0; } @@ -4977,7 +4977,7 @@ static void paint_exit(bContext *C, wmOperator *op) project_paint_end(&pop->ps); } - paint_redraw(C, &pop->s, 1); + paint_redraw(C, &pop->s, pop->mode == PAINT_MODE_3D, 1); undo_paint_push_end(UNDO_PAINT_IMAGE); if (pop->s.warnmultifile) -- cgit v1.2.3 From bb8fa67f7e0e1215d5c3c285ec7c8258a51fb239 Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Tue, 27 Mar 2012 17:53:31 +0000 Subject: Patch [#30683] Editmesh_tools without descriptions by Harley Acheson (harley) * Some Edit Mesh operators were missing the description after b-mesh merge. --- source/blender/editors/mesh/editmesh_tools.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender') diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index ac7589d72f5..2906ad179d8 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -1977,6 +1977,7 @@ void MESH_OT_merge(wmOperatorType *ot) { /* identifiers */ ot->name = "Merge"; + ot->description = "Merge selected vertices"; ot->idname = "MESH_OT_merge"; /* api callbacks */ @@ -2026,6 +2027,7 @@ void MESH_OT_remove_doubles(wmOperatorType *ot) { /* identifiers */ ot->name = "Remove Doubles"; + ot->description= "Remove duplicate vertices"; ot->idname = "MESH_OT_remove_doubles"; /* api callbacks */ @@ -3545,6 +3547,7 @@ void MESH_OT_spin(wmOperatorType *ot) { /* identifiers */ ot->name = "Spin"; + ot->description = "Extrude selected vertices in a circle around the cursor in indicated viewport"; ot->idname = "MESH_OT_spin"; /* api callbacks */ @@ -3668,6 +3671,7 @@ void MESH_OT_screw(wmOperatorType *ot) { /* identifiers */ ot->name = "Screw"; + ot->description = "Extrude selected vertices in screw-shaped rotation around the cursor in indicated viewport"; ot->idname = "MESH_OT_screw"; /* api callbacks */ -- cgit v1.2.3 From d421c7de0bae866952d240ec4a9b01f0bd40b59e Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 27 Mar 2012 17:58:50 +0000 Subject: Fix related to #30674: remove unnecessary global undo push during image paint, not needed since it already has local image undo stack. --- source/blender/editors/sculpt_paint/paint_image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender') diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 9139ccb9aa6..b6784e16cc6 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -5129,7 +5129,7 @@ void PAINT_OT_image_paint(wmOperatorType *ot) ot->poll = image_paint_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; + ot->flag = OPTYPE_REGISTER|OPTYPE_BLOCKING; /* properties */ RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, "Stroke", ""); -- cgit v1.2.3 From 606057b3afeea59d7062ce30dd6b9b4679a44de3 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 27 Mar 2012 18:26:41 +0000 Subject: Fix tweak for #30638: use same BMesh Face area computation functions as Mesh, it's a bit fuzzy how to compute area for ngons, but at least should be consistent. --- source/blender/bmesh/intern/bmesh_polygon.c | 85 ++++++----------------------- 1 file changed, 16 insertions(+), 69 deletions(-) (limited to 'source/blender') diff --git a/source/blender/bmesh/intern/bmesh_polygon.c b/source/blender/bmesh/intern/bmesh_polygon.c index 060dd4487c3..a48ec6ab1e6 100644 --- a/source/blender/bmesh/intern/bmesh_polygon.c +++ b/source/blender/bmesh/intern/bmesh_polygon.c @@ -75,7 +75,7 @@ static short testedgesidef(const float v1[2], const float v2[2], const float v3[ * polygon See Graphics Gems for * computing newell normal. */ -static void compute_poly_normal(float normal[3], float const (* verts)[3], int nverts) +static void compute_poly_normal(float normal[3], float verts[][3], int nverts) { float const *v_prev = verts[nverts - 1]; float const *v_curr = verts[0]; @@ -156,68 +156,6 @@ static void bm_face_compute_poly_normal_vertex_cos(BMFace *f, float n[3], } } -/** - * \brief COMPUTE POLY CENTER - * - * Computes the centroid and - * area of a polygon in the normal - * plane. This is not an exact method as we can't access the tesselated data. - */ -static void compute_poly_center(float center[3], float *r_area, float (* const verts)[3], int nverts, float UNUSED(normal[3])) -{ - int i, j; - float area = 0.0; - - zero_v3(center); - - if (nverts < 3) - return; - - i = nverts - 1; - - /* calculate face center */ - for (j = 0; j < nverts; j++){ - add_v3_v3(center, verts[j]); - } - mul_v3_fl(center, 1.0/nverts); - -#if 0 /* we are using an approximation anyway so do not project to normal plane. */ - /* project vertices to the normal plane */ - for (j = 0; j < nverts; j++){ - project_v3_plane(verts[j], normal, center); - } -#endif - - /* add triangle area of triangles formed by polygon edges and center. */ - for (j = 0; j < nverts; j++) { - area += area_tri_v3(verts[j], verts[i], center); - i = j; - } - - if (r_area) - *r_area = area; - - /* - for (j = 0; j < nverts; j++) { - ai = verts[i][0] * verts[j][1] - verts[j][0] * verts[i][1]; - atmp += ai; - xtmp += (verts[j][0] + verts[i][0]) * ai; - ytmp += (verts[j][1] + verts[i][1]) * ai; - i = j; - } - - if (r_area) - *r_area = atmp / 2.0f; - - if (atmp != 0) { - center[0] = xtmp / (3.0f * atmp); - center[1] = xtmp / (3.0f * atmp); - return TRUE; - } - return FALSE; - */ -} - /** * get the area of the face */ @@ -226,8 +164,8 @@ float BM_face_area_calc(BMesh *bm, BMFace *f) BMLoop *l; BMIter iter; float (*verts)[3]; - float center[3]; - float area = 0.0f; + float normal[3]; + float area; int i; BLI_array_fixedstack_declare(verts, BM_NGON_STACK_SIZE, f->len, __func__); @@ -236,7 +174,16 @@ float BM_face_area_calc(BMesh *bm, BMFace *f) copy_v3_v3(verts[i], l->v->co); } - compute_poly_center(center, &area, verts, f->len, f->no); + if(f->len == 3) { + area = area_tri_v3(verts[0], verts[1], verts[2]); + } + else if(f->len == 4) { + area = area_quad_v3(verts[0], verts[1], verts[2], verts[3]); + } + else { + compute_poly_normal(normal, verts, f->len); + area = area_poly_v3(f->len, verts, normal); + } BLI_array_fixedstack_free(verts); @@ -488,7 +435,7 @@ void BM_face_normal_update(BMesh *UNUSED(bm), BMFace *f) } } /* exact same as 'bmesh_face_normal_update' but accepts vertex coords */ -void BM_face_normal_update_vcos(BMesh *bm, BMFace *f, float no[3], +void BM_face_normal_update_vcos(BMesh *UNUSED(bm), BMFace *f, float no[3], float const (*vertexCos)[3]) { BMLoop *l; @@ -795,7 +742,7 @@ void BM_face_triangulate(BMesh *bm, BMFace *f, float (*projectverts)[3], ///bmesh_face_normal_update(bm, f, f->no, projectverts); - compute_poly_normal(f->no, (float const (*)[3])projectverts, f->len); + compute_poly_normal(f->no, projectverts, f->len); poly_rotate_plane(f->no, projectverts, i); nvert = f->len; @@ -909,7 +856,7 @@ void BM_face_legal_splits(BMesh *bm, BMFace *f, BMLoop *(*loops)[2], int len) a++; } - compute_poly_normal(no, (float const (*)[3])projverts, f->len); + compute_poly_normal(no, projverts, f->len); poly_rotate_plane(no, projverts, f->len); poly_rotate_plane(no, edgeverts, len * 2); -- cgit v1.2.3 From e8a226b38ca212158d0fe28017650f9da3de3e27 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 27 Mar 2012 18:35:49 +0000 Subject: Fix #30658: add new uv layer in object mode did not copy coordinates from existing layer as it does in edit mode. --- source/blender/editors/mesh/mesh_data.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender') diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c index 2ea5ac800ce..c58761e9173 100644 --- a/source/blender/editors/mesh/mesh_data.c +++ b/source/blender/editors/mesh/mesh_data.c @@ -386,6 +386,7 @@ int ED_mesh_uv_texture_add(bContext *C, Mesh *me, const char *name, int active_s CustomData_add_layer_named(&me->pdata, CD_MTEXPOLY, CD_DUPLICATE, me->mtpoly, me->totpoly, name); CustomData_add_layer_named(&me->ldata, CD_MLOOPUV, CD_DUPLICATE, me->mloopuv, me->totloop, name); CustomData_add_layer_named(&me->fdata, CD_MTFACE, CD_DUPLICATE, me->mtface, me->totface, name); + is_init = TRUE; } else { CustomData_add_layer_named(&me->pdata, CD_MTEXPOLY, CD_DEFAULT, NULL, me->totpoly, name); -- cgit v1.2.3 From e38bdaa04c0395fb7ba303529e54d04b8d2b9100 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 27 Mar 2012 20:45:06 +0000 Subject: Fix [#30700] Blend from Shape gives only selection for basis shapekey MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit RNA_enum_item_add already sets totitem, so it was increased twice… --- source/blender/editors/mesh/editmesh_tools.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 2906ad179d8..fc4c9c84fdd 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -2521,9 +2521,8 @@ static EnumPropertyItem *shape_itemf(bContext *C, PointerRNA *UNUSED(ptr), Prop tmp.value = totitem; tmp.identifier = em->bm->vdata.layers[a].name; tmp.name = em->bm->vdata.layers[a].name; + /* RNA_enum_item_add sets totitem itself! */ RNA_enum_item_add(&item, &totitem, &tmp); - - totitem++; } } -- cgit v1.2.3 From 046eb6531ce805338474a960a2f4ac8423bdadfc Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 27 Mar 2012 23:23:47 +0000 Subject: fix [#30685] Solidify tool behaves like Shrink/Fatten (editmesh functionality stuff) solidify had a limit imposed on how far vertices could move which didnt work well, removed (the modifier doesnt do this). also missed freeing 2 arrays. --- source/blender/bmesh/operators/bmo_extrude.c | 30 ++++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'source/blender') diff --git a/source/blender/bmesh/operators/bmo_extrude.c b/source/blender/bmesh/operators/bmo_extrude.c index 3048be925d9..bfafd778837 100644 --- a/source/blender/bmesh/operators/bmo_extrude.c +++ b/source/blender/bmesh/operators/bmo_extrude.c @@ -546,7 +546,7 @@ static void calc_solidify_normals(BMesh *bm) } } -static void solidify_add_thickness(BMesh *bm, float dist) +static void solidify_add_thickness(BMesh *bm, const float dist) { BMFace *f; BMVert *v; @@ -554,16 +554,14 @@ static void solidify_add_thickness(BMesh *bm, float dist) BMIter iter, loopIter; float *vert_angles = MEM_callocN(sizeof(float) * bm->totvert * 2, "solidify"); /* 2 in 1 */ float *vert_accum = vert_angles + bm->totvert; - float angle; int i, index; - float maxdist = dist * sqrtf(3.0f); /* array for passing verts to angle_poly_v3 */ float **verts = NULL; BLI_array_staticdeclare(verts, BM_NGON_STACK_SIZE); /* array for receiving angles from angle_poly_v3 */ - float *angles = NULL; - BLI_array_staticdeclare(angles, BM_NGON_STACK_SIZE); + float *face_angles = NULL; + BLI_array_staticdeclare(face_angles, BM_NGON_STACK_SIZE); BM_mesh_elem_index_ensure(bm, BM_VERT); @@ -572,36 +570,38 @@ static void solidify_add_thickness(BMesh *bm, float dist) continue; } - BM_ITER(l, &loopIter, bm, BM_LOOPS_OF_FACE, f) { - BLI_array_append(verts, l->v->co); - BLI_array_growone(angles); + BLI_array_growitems(verts, f->len); + BM_ITER_INDEX(l, &loopIter, bm, BM_LOOPS_OF_FACE, f, i) { + verts[i] = l->v->co; } - angle_poly_v3(angles, (const float **)verts, f->len); + BLI_array_growitems(face_angles, f->len); + angle_poly_v3(face_angles, (const float **)verts, f->len); i = 0; BM_ITER(l, &loopIter, bm, BM_LOOPS_OF_FACE, f) { v = l->v; index = BM_elem_index_get(v); - angle = angles[i]; - vert_accum[index] += angle; - vert_angles[index] += shell_angle_to_dist(angle_normalized_v3v3(v->no, f->no)) * angle; + vert_accum[index] += face_angles[i]; + vert_angles[index] += shell_angle_to_dist(angle_normalized_v3v3(v->no, f->no)) * face_angles[i]; i++; } BLI_array_empty(verts); - BLI_array_empty(angles); + BLI_array_empty(face_angles); } BM_ITER(v, &iter, bm, BM_VERTS_OF_MESH, NULL) { index = BM_elem_index_get(v); if (vert_accum[index]) { /* zero if unselected */ - float vdist = MIN2(maxdist, dist * vert_angles[index] / vert_accum[index]); - madd_v3_v3fl(v->co, v->no, vdist); + madd_v3_v3fl(v->co, v->no, dist * (vert_angles[index] / vert_accum[index])); } } MEM_freeN(vert_angles); + + BLI_array_free(verts); + BLI_array_free(face_angles); } void bmo_solidify_face_region_exec(BMesh *bm, BMOperator *op) -- cgit v1.2.3 From 48afa89dd2a2d9126a1f8d85ca49bee0b1c6c300 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 28 Mar 2012 00:42:38 +0000 Subject: fix [#30666] Texturepaint "Soften" brush gets stuck use derived mesh tessfaces since the mesh doesnt ensure this, also means non-project-painting in the viewport works with modifiers now. --- source/blender/editors/sculpt_paint/paint_intern.h | 2 +- source/blender/editors/sculpt_paint/paint_utils.c | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/sculpt_paint/paint_intern.h b/source/blender/editors/sculpt_paint/paint_intern.h index eb9dbe6eba1..200fd8e65c7 100644 --- a/source/blender/editors/sculpt_paint/paint_intern.h +++ b/source/blender/editors/sculpt_paint/paint_intern.h @@ -132,7 +132,7 @@ void paint_calc_redraw_planes(float planes[4][4], void projectf(struct bglMats *mats, const float v[3], float p[2]); float paint_calc_object_space_radius(struct ViewContext *vc, const float center[3], float pixel_radius); float paint_get_tex_pixel(struct Brush* br, float u, float v); -int imapaint_pick_face(struct ViewContext *vc, struct Mesh *me, const int mval[2], unsigned int *index); +int imapaint_pick_face(struct ViewContext *vc, const int mval[2], unsigned int *index, unsigned int totface); void imapaint_pick_uv(struct Scene *scene, struct Object *ob, unsigned int faceindex, const int xy[2], float uv[2]); void paint_sample_color(struct Scene *scene, struct ARegion *ar, int x, int y); diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c index 8cdacea9bd7..eac0434d255 100644 --- a/source/blender/editors/sculpt_paint/paint_utils.c +++ b/source/blender/editors/sculpt_paint/paint_utils.c @@ -314,17 +314,18 @@ void imapaint_pick_uv(Scene *scene, Object *ob, unsigned int faceindex, const in dm->release(dm); } -///* returns 0 if not found, otherwise 1 */ -int imapaint_pick_face(ViewContext *vc, Mesh *me, const int mval[2], unsigned int *index) +/* returns 0 if not found, otherwise 1 */ +int imapaint_pick_face(ViewContext *vc, const int mval[2], unsigned int *index, unsigned int totface) { - if (!me || me->totface==0) + if (totface == 0) return 0; /* sample only on the exact position */ *index = view3d_sample_backbuf(vc, mval[0], mval[1]); - if ((*index)<=0 || (*index)>(unsigned int)me->totface) + if ((*index) <= 0 || (*index) > (unsigned int)totface) { return 0; + } (*index)--; -- cgit v1.2.3 From c9e1ced4ddc9c801bdd68cc1ac6f5e99768fe108 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 28 Mar 2012 01:06:43 +0000 Subject: code cleanup: (dont include ';' in defines), last commit also missed changes to paint_image.c --- source/blender/avi/intern/avi.c | 2 +- source/blender/blenkernel/intern/implicit.c | 2 +- source/blender/blenloader/intern/readfile.c | 6 +- source/blender/bmesh/intern/bmesh_polygon.c | 44 +++--- source/blender/editors/sculpt_paint/paint_image.c | 62 +++++++-- source/blender/imbuf/intern/tiff.c | 2 +- source/blender/makesdna/DNA_space_types.h | 2 +- source/blender/modifiers/intern/MOD_explode.c | 156 +++++++++++----------- source/blender/nodes/intern/node_socket.c | 2 +- source/blender/python/generic/bgl.h | 2 +- 10 files changed, 166 insertions(+), 114 deletions(-) (limited to 'source/blender') diff --git a/source/blender/avi/intern/avi.c b/source/blender/avi/intern/avi.c index 1fab96b2075..dff22867d81 100644 --- a/source/blender/avi/intern/avi.c +++ b/source/blender/avi/intern/avi.c @@ -53,7 +53,7 @@ static int AVI_DEBUG=0; static char DEBUG_FCC[4]; -#define DEBUG_PRINT(x) if (AVI_DEBUG) printf("AVI DEBUG: " x); +#define DEBUG_PRINT(x) if (AVI_DEBUG) { printf("AVI DEBUG: " x); } (void)0 /* local functions */ char *fcc_to_char (unsigned int fcc); diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index 32bdac9d35e..23aa03b0331 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -1421,7 +1421,7 @@ typedef struct HairGridVert { float velocity[3]; float density; } HairGridVert; -#define HAIR_GRID_INDEX(vec, min, max, axis) (int)( (vec[axis] - min[axis]) / (max[axis] - min[axis]) * 9.99f ); +#define HAIR_GRID_INDEX(vec, min, max, axis) (int)((vec[axis] - min[axis]) / (max[axis] - min[axis]) * 9.99f) /* Smoothing of hair velocities: * adapted from Volumetric Methods for Simulation and Rendering of Hair diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 6b70745d9b2..d8a874872b4 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -1679,7 +1679,7 @@ static void direct_link_brush(FileData *fd, Brush *brush) static void direct_link_script(FileData *UNUSED(fd), Script *script) { script->id.us = 1; - SCRIPT_SET_NULL(script) + SCRIPT_SET_NULL(script); } @@ -5324,7 +5324,7 @@ static void lib_link_screen(FileData *fd, Main *main) if (scpt->script) { scpt->script= newlibadr(fd, sc->id.lib, scpt->script); if (scpt->script) { - SCRIPT_SET_NULL(scpt->script) + SCRIPT_SET_NULL(scpt->script); } } } @@ -5599,7 +5599,7 @@ void lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *curscene) /*sc->script = NULL; - 2.45 set to null, better re-run the script */ if (scpt->script) { - SCRIPT_SET_NULL(scpt->script) + SCRIPT_SET_NULL(scpt->script); } } else if (sl->spacetype==SPACE_OUTLINER) { diff --git a/source/blender/bmesh/intern/bmesh_polygon.c b/source/blender/bmesh/intern/bmesh_polygon.c index a48ec6ab1e6..7677a86e789 100644 --- a/source/blender/bmesh/intern/bmesh_polygon.c +++ b/source/blender/bmesh/intern/bmesh_polygon.c @@ -174,10 +174,10 @@ float BM_face_area_calc(BMesh *bm, BMFace *f) copy_v3_v3(verts[i], l->v->co); } - if(f->len == 3) { + if (f->len == 3) { area = area_tri_v3(verts[0], verts[1], verts[2]); } - else if(f->len == 4) { + else if (f->len == 4) { area = area_quad_v3(verts[0], verts[1], verts[2], verts[3]); } else { @@ -321,7 +321,7 @@ void poly_rotate_plane(const float normal[3], float (*verts)[3], const int nvert axis_angle_to_quat(q, axis, (float)angle); quat_to_mat3(mat, q); - for (i = 0; i < nverts; i++) + for (i = 0; i < nverts; i++) mul_m3_v3(mat, verts[i]); } @@ -334,7 +334,7 @@ void BM_edge_normals_update(BMesh *bm, BMEdge *e) BMFace *f; f = BM_iter_new(&iter, bm, BM_FACES_OF_EDGE, e); - for ( ; f; f = BM_iter_step(&iter)) { + for (; f; f = BM_iter_step(&iter)) { BM_face_normal_update(bm, f); } @@ -435,7 +435,7 @@ void BM_face_normal_update(BMesh *UNUSED(bm), BMFace *f) } } /* exact same as 'bmesh_face_normal_update' but accepts vertex coords */ -void BM_face_normal_update_vcos(BMesh *UNUSED(bm), BMFace *f, float no[3], +void BM_face_normal_update_vcos(BMesh *bm, BMFace *f, float no[3], float const (*vertexCos)[3]) { BMLoop *l; @@ -507,26 +507,36 @@ static int linecrossesf(const float v1[2], const float v2[2], const float v3[2], return TRUE; } -#define GETMIN2_AXIS(a, b, ma, mb, axis) ma[axis] = MIN2(a[axis], b[axis]), mb[axis] = MAX2(a[axis], b[axis]) -#define GETMIN2(a, b, ma, mb) GETMIN2_AXIS(a, b, ma, mb, 0); GETMIN2_AXIS(a, b, ma, mb, 1); - - GETMIN2(v1, v2, mv1, mv2); - GETMIN2(v3, v4, mv3, mv4); +#define GETMIN2_AXIS(a, b, ma, mb, axis) \ + { \ + ma[axis] = MIN2(a[axis], b[axis]); \ + mb[axis] = MAX2(a[axis], b[axis]); \ + } (void) + +#define GETMIN2(a, b, ma, mb) \ + { \ + GETMIN2_AXIS(a, b, ma, mb, 0); \ + GETMIN2_AXIS(a, b, ma, mb, 1); \ + GETMIN2(v1, v2, mv1, mv2); \ + GETMIN2(v3, v4, mv3, mv4); \ + } (void) /* do an interval test on the x and y axe */ /* first do x axi */ + #define T (FLT_EPSILON * 15) - if ( ABS(v1[1] - v2[1]) < T && - ABS(v3[1] - v4[1]) < T && - ABS(v1[1] - v3[1]) < T) + + if (ABS(v1[1] - v2[1]) < T && + ABS(v3[1] - v4[1]) < T && + ABS(v1[1] - v3[1]) < T) { return (mv4[0] >= mv1[0] && mv3[0] <= mv2[0]); } /* now do y axi */ - if ( ABS(v1[0] - v2[0]) < T && - ABS(v3[0] - v4[0]) < T && - ABS(v1[0] - v3[0]) < T) + if (ABS(v1[0] - v2[0]) < T && + ABS(v3[0] - v4[0]) < T && + ABS(v1[0] - v3[0]) < T) { return (mv4[1] >= mv1[1] && mv3[1] <= mv2[1]); } @@ -826,7 +836,7 @@ void BM_face_legal_splits(BMesh *bm, BMFace *f, BMLoop *(*loops)[2], int len) { BMIter iter; BMLoop *l; - float v1[3], v2[3], v3[3]/*, v4[3 */, no[3], mid[3], *p1, *p2, *p3, *p4; + float v1[3], v2[3], v3[3] /*, v4[3 */, no[3], mid[3], *p1, *p2, *p3, *p4; float out[3] = {-234324.0f, -234324.0f, 0.0f}; float (*projverts)[3]; float (*edgeverts)[3]; diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index b6784e16cc6..f761be741e9 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -160,11 +160,18 @@ typedef struct ImagePaintState { char *warnpackedfile; char *warnmultifile; - /* texture paint only */ + /* viewport texture paint only, but _not_ project paint */ Object *ob; - Mesh *me; int faceindex; float uv[2]; + int do_facesel; + + DerivedMesh *dm; + int dm_totface; + int dm_release; + + MFace *dm_mface; + MTFace *dm_mtface; } ImagePaintState; typedef struct ImagePaintPartialRedraw { @@ -525,11 +532,11 @@ static Image *imapaint_face_image(const ImagePaintState *s, int face_index) Image *ima; if (scene_use_new_shading_nodes(s->scene)) { - MFace *mf = s->me->mface+face_index; + MFace *mf = &s->dm_mface[face_index]; ED_object_get_active_image(s->ob, mf->mat_nr, &ima, NULL, NULL); } else { - MTFace *tf = s->me->mtface+face_index; + MTFace *tf = &s->dm_mtface[face_index]; ima = tf->tpage; } @@ -4540,9 +4547,9 @@ static int imapaint_paint_stroke(ViewContext *vc, ImagePaintState *s, BrushPaint if (texpaint) { /* pick new face and image */ - if ( imapaint_pick_face(vc, s->me, mval, &newfaceindex) && - ((s->me->editflag & ME_EDIT_PAINT_MASK)==0 || (s->me->mface+newfaceindex)->flag & ME_FACE_SEL) - ) { + if (imapaint_pick_face(vc, mval, &newfaceindex, s->dm_totface) && + ((s->do_facesel == FALSE) || (s->dm_mface[newfaceindex].flag & ME_FACE_SEL))) + { ImBuf *ibuf; newimage = imapaint_face_image(s, newfaceindex); @@ -4853,9 +4860,39 @@ static int texture_paint_init(bContext *C, wmOperator *op) pop->orig_brush_size= brush_size(scene, brush); if (pop->mode != PAINT_MODE_2D) { - pop->s.ob = OBACT; - pop->s.me = get_mesh(pop->s.ob); - if (!pop->s.me) return 0; + Object *ob = OBACT; + Mesh *me = get_mesh(ob); + + if (!me) { + return 0; + } + + pop->s.ob = ob; + pop->s.do_facesel = (me->editflag & ME_EDIT_PAINT_MASK) != 0; + + /* for non prohect paint we need */ + /* fill in derived mesh */ + if (ob->derivedFinal && CustomData_has_layer( &ob->derivedFinal->faceData, CD_MTFACE)) { + pop->s.dm = ob->derivedFinal; + pop->s.dm_release = FALSE; + } + else { + pop->s.dm = mesh_get_derived_final(pop->s.scene, ob, pop->s.scene->customdata_mask | CD_MASK_MTFACE); + pop->s.dm_release = TRUE; + } + + if (!CustomData_has_layer(&pop->s.dm->faceData, CD_MTFACE)) { + + if (pop->s.dm_release) + pop->s.dm->release(pop->s.dm); + + pop->s.dm = NULL; + return 0; + } + + pop->s.dm_mface = pop->s.dm->getTessFaceArray(pop->s.dm); + pop->s.dm_mtface= pop->s.dm->getTessFaceDataArray(pop->s.dm, CD_MTFACE); + pop->s.dm_totface = pop->s.dm->getNumTessFaces(pop->s.dm); } else { pop->s.image = pop->s.sima->image; @@ -4976,6 +5013,11 @@ static void paint_exit(bContext *C, wmOperator *op) project_paint_end(&pop->ps); } + else { + /* non projection 3d paint, could move into own function of more needs adding */ + if (pop->s.dm_release) + pop->s.dm->release(pop->s.dm); + } paint_redraw(C, &pop->s, pop->mode == PAINT_MODE_3D, 1); undo_paint_push_end(UNDO_PAINT_IMAGE); diff --git a/source/blender/imbuf/intern/tiff.c b/source/blender/imbuf/intern/tiff.c index 5a8caa8769f..3fbeb6a957d 100644 --- a/source/blender/imbuf/intern/tiff.c +++ b/source/blender/imbuf/intern/tiff.c @@ -85,7 +85,7 @@ typedef struct ImbTIFFMemFile { toff_t offset; /* Current offset within the file. */ tsize_t size; /* Size of the TIFF file. */ } ImbTIFFMemFile; -#define IMB_TIFF_GET_MEMFILE(x) ((ImbTIFFMemFile*)(x)); +#define IMB_TIFF_GET_MEMFILE(x) ((ImbTIFFMemFile*)(x)) diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index cd17d464fd5..940a5bbb20e 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -348,7 +348,7 @@ typedef struct Script { char scriptname[1024]; /* 1024 = FILE_MAX */ char scriptarg[256]; /* 1024 = FILE_MAX */ } Script; -#define SCRIPT_SET_NULL(_script) _script->py_draw = _script->py_event = _script->py_button = _script->py_browsercallback = _script->py_globaldict = NULL; _script->flags = 0; +#define SCRIPT_SET_NULL(_script) _script->py_draw = _script->py_event = _script->py_button = _script->py_browsercallback = _script->py_globaldict = NULL; _script->flags = 0 typedef struct SpaceScript { SpaceLink *next, *prev; diff --git a/source/blender/modifiers/intern/MOD_explode.c b/source/blender/modifiers/intern/MOD_explode.c index ddc79c4e4f8..56aa0f3c939 100644 --- a/source/blender/modifiers/intern/MOD_explode.c +++ b/source/blender/modifiers/intern/MOD_explode.c @@ -210,8 +210,8 @@ static MFace *get_dface(DerivedMesh *dm, DerivedMesh *split, int cur, int i, MFa v[2]=mf->v##c; uv[2]=c-1; \ v[3]=mf->v##d; uv[3]=d-1; -#define GET_ES(v1, v2) edgecut_get(eh, v1, v2); -#define INT_UV(uvf, c0, c1) interp_v2_v2v2(uvf, mf->uv[c0], mf->uv[c1], 0.5f); +#define GET_ES(v1, v2) edgecut_get(eh, v1, v2) +#define INT_UV(uvf, c0, c1) interp_v2_v2v2(uvf, mf->uv[c0], mf->uv[c1], 0.5f) static void remap_faces_3_6_9_12(DerivedMesh *dm, DerivedMesh *split, MFace *mf, int *facepa, int *vertpa, int i, EdgeHash *eh, int cur, int v1, int v2, int v3, int v4) { @@ -221,15 +221,15 @@ static void remap_faces_3_6_9_12(DerivedMesh *dm, DerivedMesh *split, MFace *mf, facepa[cur] = vertpa[v1]; df1->v1 = v1; - df1->v2 = GET_ES(v1, v2) - df1->v3 = GET_ES(v2, v3) + df1->v2 = GET_ES(v1, v2); + df1->v3 = GET_ES(v2, v3); df1->v4 = v3; df1->flag |= ME_FACE_SEL; facepa[cur+1] = vertpa[v2]; - df2->v1 = GET_ES(v1, v2) + df2->v1 = GET_ES(v1, v2); df2->v2 = v2; - df2->v3 = GET_ES(v2, v3) + df2->v3 = GET_ES(v2, v3); df2->v4 = 0; df2->flag &= ~ME_FACE_SEL; @@ -255,13 +255,13 @@ static void remap_uvs_3_6_9_12(DerivedMesh *dm, DerivedMesh *split, int numlayer mf += i; copy_v2_v2(df1->uv[0], mf->uv[c0]); - INT_UV(df1->uv[1], c0, c1) - INT_UV(df1->uv[2], c1, c2) + INT_UV(df1->uv[1], c0, c1); + INT_UV(df1->uv[2], c1, c2); copy_v2_v2(df1->uv[3], mf->uv[c2]); - INT_UV(df2->uv[0], c0, c1) + INT_UV(df2->uv[0], c0, c1); copy_v2_v2(df2->uv[1], mf->uv[c1]); - INT_UV(df2->uv[2], c1, c2) + INT_UV(df2->uv[2], c1, c2); copy_v2_v2(df3->uv[0], mf->uv[c0]); copy_v2_v2(df3->uv[1], mf->uv[c2]); @@ -277,13 +277,13 @@ static void remap_faces_5_10(DerivedMesh *dm, DerivedMesh *split, MFace *mf, int facepa[cur] = vertpa[v1]; df1->v1 = v1; df1->v2 = v2; - df1->v3 = GET_ES(v2, v3) - df1->v4 = GET_ES(v1, v4) + df1->v3 = GET_ES(v2, v3); + df1->v4 = GET_ES(v1, v4); df1->flag |= ME_FACE_SEL; facepa[cur+1] = vertpa[v3]; - df2->v1 = GET_ES(v1, v4) - df2->v2 = GET_ES(v2, v3) + df2->v1 = GET_ES(v1, v4); + df2->v2 = GET_ES(v2, v3); df2->v3 = v3; df2->v4 = v4; df2->flag |= ME_FACE_SEL; @@ -303,11 +303,11 @@ static void remap_uvs_5_10(DerivedMesh *dm, DerivedMesh *split, int numlayer, in copy_v2_v2(df1->uv[0], mf->uv[c0]); copy_v2_v2(df1->uv[1], mf->uv[c1]); - INT_UV(df1->uv[2], c1, c2) - INT_UV(df1->uv[3], c0, c3) + INT_UV(df1->uv[2], c1, c2); + INT_UV(df1->uv[3], c0, c3); - INT_UV(df2->uv[0], c0, c3) - INT_UV(df2->uv[1], c1, c2) + INT_UV(df2->uv[0], c0, c3); + INT_UV(df2->uv[1], c1, c2); copy_v2_v2(df2->uv[2], mf->uv[c2]); copy_v2_v2(df2->uv[3], mf->uv[c3]); @@ -323,29 +323,29 @@ static void remap_faces_15(DerivedMesh *dm, DerivedMesh *split, MFace *mf, int * facepa[cur] = vertpa[v1]; df1->v1 = v1; - df1->v2 = GET_ES(v1, v2) - df1->v3 = GET_ES(v1, v3) - df1->v4 = GET_ES(v1, v4) + df1->v2 = GET_ES(v1, v2); + df1->v3 = GET_ES(v1, v3); + df1->v4 = GET_ES(v1, v4); df1->flag |= ME_FACE_SEL; facepa[cur+1] = vertpa[v2]; - df2->v1 = GET_ES(v1, v2) + df2->v1 = GET_ES(v1, v2); df2->v2 = v2; - df2->v3 = GET_ES(v2, v3) - df2->v4 = GET_ES(v1, v3) + df2->v3 = GET_ES(v2, v3); + df2->v4 = GET_ES(v1, v3); df2->flag |= ME_FACE_SEL; facepa[cur+2] = vertpa[v3]; - df3->v1 = GET_ES(v1, v3) - df3->v2 = GET_ES(v2, v3) + df3->v1 = GET_ES(v1, v3); + df3->v2 = GET_ES(v2, v3); df3->v3 = v3; - df3->v4 = GET_ES(v3, v4) + df3->v4 = GET_ES(v3, v4); df3->flag |= ME_FACE_SEL; facepa[cur+3] = vertpa[v4]; - df4->v1 = GET_ES(v1, v4) - df4->v2 = GET_ES(v1, v3) - df4->v3 = GET_ES(v3, v4) + df4->v1 = GET_ES(v1, v4); + df4->v2 = GET_ES(v1, v3); + df4->v3 = GET_ES(v3, v4); df4->v4 = v4; df4->flag |= ME_FACE_SEL; } @@ -365,23 +365,23 @@ static void remap_uvs_15(DerivedMesh *dm, DerivedMesh *split, int numlayer, int mf += i; copy_v2_v2(df1->uv[0], mf->uv[c0]); - INT_UV(df1->uv[1], c0, c1) - INT_UV(df1->uv[2], c0, c2) - INT_UV(df1->uv[3], c0, c3) + INT_UV(df1->uv[1], c0, c1); + INT_UV(df1->uv[2], c0, c2); + INT_UV(df1->uv[3], c0, c3); - INT_UV(df2->uv[0], c0, c1) + INT_UV(df2->uv[0], c0, c1); copy_v2_v2(df2->uv[1], mf->uv[c1]); - INT_UV(df2->uv[2], c1, c2) - INT_UV(df2->uv[3], c0, c2) + INT_UV(df2->uv[2], c1, c2); + INT_UV(df2->uv[3], c0, c2); - INT_UV(df3->uv[0], c0, c2) - INT_UV(df3->uv[1], c1, c2) + INT_UV(df3->uv[0], c0, c2); + INT_UV(df3->uv[1], c1, c2); copy_v2_v2(df3->uv[2], mf->uv[c2]); - INT_UV(df3->uv[3], c2, c3) + INT_UV(df3->uv[3], c2, c3); - INT_UV(df4->uv[0], c0, c3) - INT_UV(df4->uv[1], c0, c2) - INT_UV(df4->uv[2], c2, c3) + INT_UV(df4->uv[0], c0, c3); + INT_UV(df4->uv[1], c0, c2); + INT_UV(df4->uv[2], c2, c3); copy_v2_v2(df4->uv[3], mf->uv[c3]); } } @@ -394,21 +394,21 @@ static void remap_faces_7_11_13_14(DerivedMesh *dm, DerivedMesh *split, MFace *m facepa[cur] = vertpa[v1]; df1->v1 = v1; - df1->v2 = GET_ES(v1, v2) - df1->v3 = GET_ES(v2, v3) - df1->v4 = GET_ES(v1, v4) + df1->v2 = GET_ES(v1, v2); + df1->v3 = GET_ES(v2, v3); + df1->v4 = GET_ES(v1, v4); df1->flag |= ME_FACE_SEL; facepa[cur+1] = vertpa[v2]; - df2->v1 = GET_ES(v1, v2) + df2->v1 = GET_ES(v1, v2); df2->v2 = v2; - df2->v3 = GET_ES(v2, v3) + df2->v3 = GET_ES(v2, v3); df2->v4 = 0; df2->flag &= ~ME_FACE_SEL; facepa[cur+2] = vertpa[v4]; - df3->v1 = GET_ES(v1, v4) - df3->v2 = GET_ES(v2, v3) + df3->v1 = GET_ES(v1, v4); + df3->v2 = GET_ES(v2, v3); df3->v3 = v3; df3->v4 = v4; df3->flag |= ME_FACE_SEL; @@ -428,16 +428,16 @@ static void remap_uvs_7_11_13_14(DerivedMesh *dm, DerivedMesh *split, int numlay mf += i; copy_v2_v2(df1->uv[0], mf->uv[c0]); - INT_UV(df1->uv[1], c0, c1) - INT_UV(df1->uv[2], c1, c2) - INT_UV(df1->uv[3], c0, c3) + INT_UV(df1->uv[1], c0, c1); + INT_UV(df1->uv[2], c1, c2); + INT_UV(df1->uv[3], c0, c3); - INT_UV(df2->uv[0], c0, c1) + INT_UV(df2->uv[0], c0, c1); copy_v2_v2(df2->uv[1], mf->uv[c1]); - INT_UV(df2->uv[2], c1, c2) + INT_UV(df2->uv[2], c1, c2); - INT_UV(df3->uv[0], c0, c3) - INT_UV(df3->uv[1], c1, c2) + INT_UV(df3->uv[0], c0, c3); + INT_UV(df3->uv[1], c1, c2); copy_v2_v2(df3->uv[2], mf->uv[c2]); copy_v2_v2(df3->uv[3], mf->uv[c3]); } @@ -450,16 +450,16 @@ static void remap_faces_19_21_22(DerivedMesh *dm, DerivedMesh *split, MFace *mf, facepa[cur] = vertpa[v1]; df1->v1 = v1; - df1->v2 = GET_ES(v1, v2) - df1->v3 = GET_ES(v1, v3) + df1->v2 = GET_ES(v1, v2); + df1->v3 = GET_ES(v1, v3); df1->v4 = 0; df1->flag &= ~ME_FACE_SEL; facepa[cur+1] = vertpa[v2]; - df2->v1 = GET_ES(v1, v2) + df2->v1 = GET_ES(v1, v2); df2->v2 = v2; df2->v3 = v3; - df2->v4 = GET_ES(v1, v3) + df2->v4 = GET_ES(v1, v3); df2->flag |= ME_FACE_SEL; } @@ -476,13 +476,13 @@ static void remap_uvs_19_21_22(DerivedMesh *dm, DerivedMesh *split, int numlayer mf += i; copy_v2_v2(df1->uv[0], mf->uv[c0]); - INT_UV(df1->uv[1], c0, c1) - INT_UV(df1->uv[2], c0, c2) + INT_UV(df1->uv[1], c0, c1); + INT_UV(df1->uv[2], c0, c2); - INT_UV(df2->uv[0], c0, c1) + INT_UV(df2->uv[0], c0, c1); copy_v2_v2(df2->uv[1], mf->uv[c1]); copy_v2_v2(df2->uv[2], mf->uv[c2]); - INT_UV(df2->uv[3], c0, c2) + INT_UV(df2->uv[3], c0, c2); } } @@ -494,21 +494,21 @@ static void remap_faces_23(DerivedMesh *dm, DerivedMesh *split, MFace *mf, int * facepa[cur] = vertpa[v1]; df1->v1 = v1; - df1->v2 = GET_ES(v1, v2) - df1->v3 = GET_ES(v2, v3) - df1->v4 = GET_ES(v1, v3) + df1->v2 = GET_ES(v1, v2); + df1->v3 = GET_ES(v2, v3); + df1->v4 = GET_ES(v1, v3); df1->flag |= ME_FACE_SEL; facepa[cur+1] = vertpa[v2]; - df2->v1 = GET_ES(v1, v2) + df2->v1 = GET_ES(v1, v2); df2->v2 = v2; - df2->v3 = GET_ES(v2, v3) + df2->v3 = GET_ES(v2, v3); df2->v4 = 0; df2->flag &= ~ME_FACE_SEL; facepa[cur+2] = vertpa[v3]; - df3->v1 = GET_ES(v1, v3) - df3->v2 = GET_ES(v2, v3) + df3->v1 = GET_ES(v1, v3); + df3->v2 = GET_ES(v2, v3); df3->v3 = v3; df3->v4 = 0; df3->flag &= ~ME_FACE_SEL; @@ -527,16 +527,16 @@ static void remap_uvs_23(DerivedMesh *dm, DerivedMesh *split, int numlayer, int mf += i; copy_v2_v2(df1->uv[0], mf->uv[c0]); - INT_UV(df1->uv[1], c0, c1) - INT_UV(df1->uv[2], c1, c2) - INT_UV(df1->uv[3], c0, c2) + INT_UV(df1->uv[1], c0, c1); + INT_UV(df1->uv[2], c1, c2); + INT_UV(df1->uv[3], c0, c2); - INT_UV(df2->uv[0], c0, c1) + INT_UV(df2->uv[0], c0, c1); copy_v2_v2(df2->uv[1], mf->uv[c1]); - INT_UV(df2->uv[2], c1, c2) + INT_UV(df2->uv[2], c1, c2); - INT_UV(df2->uv[0], c0, c2) - INT_UV(df2->uv[1], c1, c2) + INT_UV(df2->uv[0], c0, c2); + INT_UV(df2->uv[1], c1, c2); copy_v2_v2(df2->uv[2], mf->uv[c2]); } } diff --git a/source/blender/nodes/intern/node_socket.c b/source/blender/nodes/intern/node_socket.c index 4e6cf1f9bdd..94b9d364418 100644 --- a/source/blender/nodes/intern/node_socket.c +++ b/source/blender/nodes/intern/node_socket.c @@ -160,7 +160,7 @@ static bNodeSocketType node_socket_type_mesh = { void node_socket_type_init(bNodeSocketType *types[]) { - #define INIT_TYPE(name) types[node_socket_type_##name.type] = &node_socket_type_##name; + #define INIT_TYPE(name) types[node_socket_type_##name.type] = &node_socket_type_##name INIT_TYPE(float); INIT_TYPE(vector); diff --git a/source/blender/python/generic/bgl.h b/source/blender/python/generic/bgl.h index daebd7a5194..1a7036daf45 100644 --- a/source/blender/python/generic/bgl.h +++ b/source/blender/python/generic/bgl.h @@ -327,7 +327,7 @@ extern PyTypeObject BGL_bufferType; #define ret_set_GLboolean ret_bool = #define ret_ret_GLboolean return PyLong_FromLong((long) ret_bool) -#define ret_def_GLstring const unsigned char *ret_str; +#define ret_def_GLstring const unsigned char *ret_str #define ret_set_GLstring ret_str = #define ret_ret_GLstring \ -- cgit v1.2.3 From 274e243a67285ce71ee3b29ce0ea1aeb7bc7429c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 28 Mar 2012 03:17:22 +0000 Subject: own error r45225 - move defines to the top of the func. - rename T -> EPS - undefine at the end. --- source/blender/bmesh/intern/bmesh_polygon.c | 50 ++++++++++++++++------------- 1 file changed, 28 insertions(+), 22 deletions(-) (limited to 'source/blender') diff --git a/source/blender/bmesh/intern/bmesh_polygon.c b/source/blender/bmesh/intern/bmesh_polygon.c index 7677a86e789..df4c3fd5d33 100644 --- a/source/blender/bmesh/intern/bmesh_polygon.c +++ b/source/blender/bmesh/intern/bmesh_polygon.c @@ -493,6 +493,21 @@ void BM_face_normal_flip(BMesh *bm, BMFace *f) * note, there could be more winding cases then there needs to be. */ static int linecrossesf(const float v1[2], const float v2[2], const float v3[2], const float v4[2]) { + +#define GETMIN2_AXIS(a, b, ma, mb, axis) \ + { \ + ma[axis] = MIN2(a[axis], b[axis]); \ + mb[axis] = MAX2(a[axis], b[axis]); \ + } (void)0 + +#define GETMIN2(a, b, ma, mb) \ + { \ + GETMIN2_AXIS(a, b, ma, mb, 0); \ + GETMIN2_AXIS(a, b, ma, mb, 1); \ + } (void)0 + +#define EPS (FLT_EPSILON * 15) + int w1, w2, w3, w4, w5 /*, re */; float mv1[2], mv2[2], mv3[2], mv4[2]; @@ -507,41 +522,32 @@ static int linecrossesf(const float v1[2], const float v2[2], const float v3[2], return TRUE; } -#define GETMIN2_AXIS(a, b, ma, mb, axis) \ - { \ - ma[axis] = MIN2(a[axis], b[axis]); \ - mb[axis] = MAX2(a[axis], b[axis]); \ - } (void) - -#define GETMIN2(a, b, ma, mb) \ - { \ - GETMIN2_AXIS(a, b, ma, mb, 0); \ - GETMIN2_AXIS(a, b, ma, mb, 1); \ - GETMIN2(v1, v2, mv1, mv2); \ - GETMIN2(v3, v4, mv3, mv4); \ - } (void) + GETMIN2(v1, v2, mv1, mv2); + GETMIN2(v3, v4, mv3, mv4); /* do an interval test on the x and y axe */ /* first do x axi */ - -#define T (FLT_EPSILON * 15) - - if (ABS(v1[1] - v2[1]) < T && - ABS(v3[1] - v4[1]) < T && - ABS(v1[1] - v3[1]) < T) + if (ABS(v1[1] - v2[1]) < EPS && + ABS(v3[1] - v4[1]) < EPS && + ABS(v1[1] - v3[1]) < EPS) { return (mv4[0] >= mv1[0] && mv3[0] <= mv2[0]); } /* now do y axi */ - if (ABS(v1[0] - v2[0]) < T && - ABS(v3[0] - v4[0]) < T && - ABS(v1[0] - v3[0]) < T) + if (ABS(v1[0] - v2[0]) < EPS && + ABS(v3[0] - v4[0]) < EPS && + ABS(v1[0] - v3[0]) < EPS) { return (mv4[1] >= mv1[1] && mv3[1] <= mv2[1]); } return FALSE; + +#undef GETMIN2_AXIS +#undef GETMIN2 +#undef EPS + } /** -- cgit v1.2.3 From c9f677d24d9600d9ba07f1b258c49455bc348554 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 28 Mar 2012 03:47:33 +0000 Subject: style cleanup: mainly whitespace around operators and indentation - paint/sculpt tools --- source/blender/editors/sculpt_paint/paint_cursor.c | 152 +- source/blender/editors/sculpt_paint/paint_hide.c | 118 +- source/blender/editors/sculpt_paint/paint_image.c | 1912 ++++++++++---------- source/blender/editors/sculpt_paint/paint_ops.c | 170 +- source/blender/editors/sculpt_paint/paint_stroke.c | 44 +- source/blender/editors/sculpt_paint/paint_undo.c | 62 +- source/blender/editors/sculpt_paint/paint_utils.c | 130 +- source/blender/editors/sculpt_paint/paint_vertex.c | 112 +- source/blender/editors/sculpt_paint/sculpt.c | 951 +++++----- source/blender/editors/sculpt_paint/sculpt_undo.c | 212 +-- source/blender/editors/sculpt_paint/sculpt_uv.c | 105 +- 11 files changed, 1986 insertions(+), 1982 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c index be50b842914..5d4710accad 100644 --- a/source/blender/editors/sculpt_paint/paint_cursor.c +++ b/source/blender/editors/sculpt_paint/paint_cursor.c @@ -76,26 +76,26 @@ typedef struct Snapshot { int curve_changed_timestamp; } Snapshot; -static int same_snap(Snapshot* snap, Brush* brush, ViewContext* vc) +static int same_snap(Snapshot *snap, Brush *brush, ViewContext *vc) { - MTex* mtex = &brush->mtex; + MTex *mtex = &brush->mtex; return (((mtex->tex) && - equals_v3v3(mtex->ofs, snap->ofs) && - equals_v3v3(mtex->size, snap->size) && - mtex->rot == snap->rot) && - - /* make brush smaller shouldn't cause a resample */ - ((mtex->brush_map_mode == MTEX_MAP_MODE_FIXED && - (brush_size(vc->scene, brush) <= snap->brush_size)) || - (brush_size(vc->scene, brush) == snap->brush_size)) && - - (mtex->brush_map_mode == snap->brush_map_mode) && - (vc->ar->winx == snap->winx) && - (vc->ar->winy == snap->winy)); + equals_v3v3(mtex->ofs, snap->ofs) && + equals_v3v3(mtex->size, snap->size) && + mtex->rot == snap->rot) && + + /* make brush smaller shouldn't cause a resample */ + ((mtex->brush_map_mode == MTEX_MAP_MODE_FIXED && + (brush_size(vc->scene, brush) <= snap->brush_size)) || + (brush_size(vc->scene, brush) == snap->brush_size)) && + + (mtex->brush_map_mode == snap->brush_map_mode) && + (vc->ar->winx == snap->winx) && + (vc->ar->winy == snap->winy)); } -static void make_snap(Snapshot* snap, Brush* brush, ViewContext* vc) +static void make_snap(Snapshot *snap, Brush *brush, ViewContext *vc) { if (brush->mtex.tex) { snap->brush_map_mode = brush->mtex.brush_map_mode; @@ -105,8 +105,8 @@ static void make_snap(Snapshot* snap, Brush* brush, ViewContext* vc) } else { snap->brush_map_mode = -1; - snap->ofs[0]= snap->ofs[1]= snap->ofs[2]= -1; - snap->size[0]= snap->size[1]= snap->size[2]= -1; + snap->ofs[0] = snap->ofs[1] = snap->ofs[2] = -1; + snap->size[0] = snap->size[1] = snap->size[2] = -1; snap->rot = -1; } @@ -115,7 +115,7 @@ static void make_snap(Snapshot* snap, Brush* brush, ViewContext* vc) snap->winy = vc->ar->winy; } -static int load_tex(Sculpt *sd, Brush* br, ViewContext* vc) +static int load_tex(Sculpt *sd, Brush *br, ViewContext *vc) { static GLuint overlay_texture = 0; static int init = 0; @@ -124,7 +124,7 @@ static int load_tex(Sculpt *sd, Brush* br, ViewContext* vc) static Snapshot snap; static int old_size = -1; - GLubyte* buffer = NULL; + GLubyte *buffer = NULL; int size; int j; @@ -137,13 +137,13 @@ static int load_tex(Sculpt *sd, Brush* br, ViewContext* vc) if (br->mtex.brush_map_mode == MTEX_MAP_MODE_TILED && !br->mtex.tex) return 0; refresh = - !overlay_texture || - (br->mtex.tex && - (!br->mtex.tex->preview || - br->mtex.tex->preview->changed_timestamp[0] != tex_changed_timestamp)) || - !br->curve || - br->curve->changed_timestamp != curve_changed_timestamp || - !same_snap(&snap, br, vc); + !overlay_texture || + (br->mtex.tex && + (!br->mtex.tex->preview || + br->mtex.tex->preview->changed_timestamp[0] != tex_changed_timestamp)) || + !br->curve || + br->curve->changed_timestamp != curve_changed_timestamp || + !same_snap(&snap, br, vc); if (refresh) { if (br->mtex.tex && br->mtex.tex->preview) @@ -161,7 +161,7 @@ static int load_tex(Sculpt *sd, Brush* br, ViewContext* vc) for (s >>= 1; s > 0; s >>= 1) r++; - size = (1<flags & SCULPT_USE_OPENMP) - for (j= 0; j < size; j++) { + for (j = 0; j < size; j++) { int i; float y; float len; - for (i= 0; i < size; i++) { + for (i = 0; i < size; i++) { // largely duplicated from tex_strength const float rotation = -br->mtex.rot; float radius = brush_size(vc->scene, br); - int index = j*size + i; + int index = j * size + i; float x; float avg; - x = (float)i/size; - y = (float)j/size; + x = (float)i / size; + y = (float)j / size; x -= 0.5f; y -= 0.5f; @@ -216,7 +216,7 @@ static int load_tex(Sculpt *sd, Brush* br, ViewContext* vc) y *= 2; } - len = sqrtf(x*x + y*y); + len = sqrtf(x * x + y * y); if ((br->mtex.brush_map_mode == MTEX_MAP_MODE_TILED) || len <= 1) { /* it is probably worth optimizing for those cases where @@ -240,9 +240,9 @@ static int load_tex(Sculpt *sd, Brush* br, ViewContext* vc) avg += br->texture_sample_bias; if (br->mtex.brush_map_mode == MTEX_MAP_MODE_FIXED) - avg *= brush_curve_strength(br, len, 1); /* Falloff curve */ + avg *= brush_curve_strength(br, len, 1); /* Falloff curve */ - buffer[index] = 255 - (GLubyte)(255*avg); + buffer[index] = 255 - (GLubyte)(255 * avg); } else { buffer[index] = 0; @@ -254,7 +254,7 @@ static int load_tex(Sculpt *sd, Brush* br, ViewContext* vc) glGenTextures(1, &overlay_texture); } else { - size= old_size; + size = old_size; } glBindTexture(GL_TEXTURE_2D, overlay_texture); @@ -287,8 +287,8 @@ static int load_tex(Sculpt *sd, Brush* br, ViewContext* vc) } static int project_brush_radius(ViewContext *vc, - float radius, - const float location[3]) + float radius, + const float location[3]) { float view[3], nonortho[3], ortho[3], offset[3], p1[2], p2[2]; @@ -328,9 +328,9 @@ static int project_brush_radius(ViewContext *vc, return len_v2v2(p1, p2); } -static int sculpt_get_brush_geometry(bContext* C, ViewContext *vc, - int x, int y, int* pixel_radius, - float location[3]) +static int sculpt_get_brush_geometry(bContext *C, ViewContext *vc, + int x, int y, int *pixel_radius, + float location[3]) { Scene *scene = CTX_data_scene(C); Paint *paint = paint_get_active(scene); @@ -342,11 +342,11 @@ static int sculpt_get_brush_geometry(bContext* C, ViewContext *vc, window[1] = y + vc->ar->winrct.ymin; if (vc->obact->sculpt && vc->obact->sculpt->pbvh && - sculpt_stroke_get_location(C, location, window)) { + sculpt_stroke_get_location(C, location, window)) { *pixel_radius = - project_brush_radius(vc, - brush_unprojected_radius(scene, brush), - location); + project_brush_radius(vc, + brush_unprojected_radius(scene, brush), + location); if (*pixel_radius == 0) *pixel_radius = brush_size(scene, brush); @@ -356,8 +356,8 @@ static int sculpt_get_brush_geometry(bContext* C, ViewContext *vc, hit = 1; } else { - Sculpt* sd = CTX_data_tool_settings(C)->sculpt; - Brush* brush = paint_brush(&sd->paint); + Sculpt *sd = CTX_data_tool_settings(C)->sculpt; + Brush *brush = paint_brush(&sd->paint); *pixel_radius = brush_size(scene, brush); hit = 0; @@ -370,26 +370,26 @@ static int sculpt_get_brush_geometry(bContext* C, ViewContext *vc, * have on brush strength */ /* TODO: sculpt only for now */ static void paint_draw_alpha_overlay(Sculpt *sd, Brush *brush, - ViewContext *vc, int x, int y) + ViewContext *vc, int x, int y) { rctf quad; /* check for overlay mode */ if (!(brush->flag & BRUSH_TEXTURE_OVERLAY) || - !(ELEM(brush->mtex.brush_map_mode, MTEX_MAP_MODE_FIXED, MTEX_MAP_MODE_TILED))) + !(ELEM(brush->mtex.brush_map_mode, MTEX_MAP_MODE_FIXED, MTEX_MAP_MODE_TILED))) return; /* save lots of GL state * TODO: check on whether all of these are needed? */ - glPushAttrib(GL_COLOR_BUFFER_BIT| - GL_CURRENT_BIT| - GL_DEPTH_BUFFER_BIT| - GL_ENABLE_BIT| - GL_LINE_BIT| - GL_POLYGON_BIT| - GL_STENCIL_BUFFER_BIT| - GL_TRANSFORM_BIT| - GL_VIEWPORT_BIT| + glPushAttrib(GL_COLOR_BUFFER_BIT | + GL_CURRENT_BIT | + GL_DEPTH_BUFFER_BIT | + GL_ENABLE_BIT | + GL_LINE_BIT | + GL_POLYGON_BIT | + GL_STENCIL_BUFFER_BIT | + GL_TRANSFORM_BIT | + GL_VIEWPORT_BIT | GL_TEXTURE_BIT); if (load_tex(sd, brush, vc)) { @@ -408,26 +408,26 @@ static void paint_draw_alpha_overlay(Sculpt *sd, Brush *brush, glTranslatef(0.5, 0.5, 0); glRotatef((double)RAD2DEGF((brush->flag & BRUSH_RAKE) ? sd->last_angle : sd->special_rotation), - 0.0, 0.0, 1.0); + 0.0, 0.0, 1.0); glTranslatef(-0.5f, -0.5f, 0); /* scale based on tablet pressure */ if (sd->draw_pressure && brush_use_size_pressure(vc->scene, brush)) { glTranslatef(0.5f, 0.5f, 0); - glScalef(1.0f/sd->pressure_value, 1.0f/sd->pressure_value, 1); + glScalef(1.0f / sd->pressure_value, 1.0f / sd->pressure_value, 1); glTranslatef(-0.5f, -0.5f, 0); } if (sd->draw_anchored) { const float *aim = sd->anchored_initial_mouse; const rcti *win = &vc->ar->winrct; - quad.xmin = aim[0]-sd->anchored_size - win->xmin; - quad.ymin = aim[1]-sd->anchored_size - win->ymin; - quad.xmax = aim[0]+sd->anchored_size - win->xmin; - quad.ymax = aim[1]+sd->anchored_size - win->ymin; + quad.xmin = aim[0] - sd->anchored_size - win->xmin; + quad.ymin = aim[1] - sd->anchored_size - win->ymin; + quad.xmax = aim[0] + sd->anchored_size - win->xmin; + quad.ymax = aim[1] + sd->anchored_size - win->ymin; } else { - const int radius= brush_size(vc->scene, brush); + const int radius = brush_size(vc->scene, brush); quad.xmin = x - radius; quad.ymin = y - radius; quad.xmax = x + radius; @@ -468,7 +468,7 @@ static void paint_draw_alpha_overlay(Sculpt *sd, Brush *brush, /* Special actions taken when paint cursor goes over mesh */ /* TODO: sculpt only for now */ static void paint_cursor_on_hit(Sculpt *sd, Brush *brush, ViewContext *vc, - const float location[3]) + const float location[3]) { float unprojected_radius, projected_radius; @@ -486,7 +486,7 @@ static void paint_cursor_on_hit(Sculpt *sd, Brush *brush, ViewContext *vc, /* convert brush radius from 2D to 3D */ unprojected_radius = paint_calc_object_space_radius(vc, location, - projected_radius); + projected_radius); /* scale 3D brush radius by pressure */ if (sd->draw_pressure && brush_use_size_pressure(vc->scene, brush)) @@ -541,11 +541,11 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused)) const float dx = sd->last_x - x; const float dy = sd->last_y - y; - if (dx*dx + dy*dy >= r*r) { + if (dx * dx + dy * dy >= r * r) { sd->last_angle = atan2(dx, dy); - sd->last_x = u*sd->last_x + v*x; - sd->last_y = u*sd->last_y + v*y; + sd->last_x = u * sd->last_x + v * x; + sd->last_y = u * sd->last_y + v * y; } } @@ -562,10 +562,10 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused)) /* TODO: no way currently to know state of pen flip or * invert key modifier without starting a stroke */ if ((!(brush->flag & BRUSH_INVERTED) ^ - !(brush->flag & BRUSH_DIR_IN)) && - ELEM5(brush->sculpt_tool, SCULPT_TOOL_DRAW, - SCULPT_TOOL_INFLATE, SCULPT_TOOL_CLAY, - SCULPT_TOOL_PINCH, SCULPT_TOOL_CREASE)) + !(brush->flag & BRUSH_DIR_IN)) && + ELEM5(brush->sculpt_tool, SCULPT_TOOL_DRAW, + SCULPT_TOOL_INFLATE, SCULPT_TOOL_CLAY, + SCULPT_TOOL_PINCH, SCULPT_TOOL_CREASE)) outline_col = brush->sub_col; /* only do if brush is over the mesh */ @@ -588,7 +588,7 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused)) /* draw brush outline */ glTranslatef(translation[0], translation[1], 0); - glutil_draw_lined_arc(0.0, M_PI*2.0, final_radius, 40); + glutil_draw_lined_arc(0.0, M_PI * 2.0, final_radius, 40); glTranslatef(-translation[0], -translation[1], 0); /* restore GL state */ diff --git a/source/blender/editors/sculpt_paint/paint_hide.c b/source/blender/editors/sculpt_paint/paint_hide.c index fcf7d2eba68..a3acce33683 100644 --- a/source/blender/editors/sculpt_paint/paint_hide.c +++ b/source/blender/editors/sculpt_paint/paint_hide.c @@ -84,24 +84,24 @@ static int planes_contain_v3(float (*planes)[4], int totplane, const float p[3]) /* return true if the element should be hidden/shown */ static int is_effected(PartialVisArea area, - float planes[4][4], - const float co[3]) + float planes[4][4], + const float co[3]) { if (area == PARTIALVIS_ALL) return 1; else { int inside = planes_contain_v3(planes, 4, co); return ((inside && area == PARTIALVIS_INSIDE) || - (!inside && area == PARTIALVIS_OUTSIDE)); + (!inside && area == PARTIALVIS_OUTSIDE)); } } static void partialvis_update_mesh(Object *ob, - PBVH *pbvh, - PBVHNode *node, - PartialVisAction action, - PartialVisArea area, - float planes[4][4]) + PBVH *pbvh, + PBVHNode *node, + PartialVisAction action, + PartialVisArea area, + float planes[4][4]) { MVert *mvert; int *vert_indices; @@ -137,11 +137,11 @@ static void partialvis_update_mesh(Object *ob, /* Hide or show elements in multires grids with a special GridFlags customdata layer. */ static void partialvis_update_grids(Object *ob, - PBVH *pbvh, - PBVHNode *node, - PartialVisAction action, - PartialVisArea area, - float planes[4][4]) + PBVH *pbvh, + PBVHNode *node, + PartialVisAction action, + PartialVisArea area, + float planes[4][4]) { DMGridData **grids; BLI_bitmap *grid_hidden; @@ -150,8 +150,8 @@ static void partialvis_update_grids(Object *ob, /* get PBVH data */ BLI_pbvh_node_get_grids(pbvh, node, - &grid_indices, &totgrid, NULL, &gridsize, - &grids, NULL); + &grid_indices, &totgrid, NULL, &gridsize, + &grids, NULL); grid_hidden = BLI_pbvh_grid_hidden(pbvh); sculpt_undo_push_node(ob, node, SCULPT_UNDO_HIDDEN); @@ -163,15 +163,15 @@ static void partialvis_update_grids(Object *ob, BLI_bitmap gh = grid_hidden[g]; if (!gh) { - switch(action) { - case PARTIALVIS_HIDE: - /* create grid flags data */ - gh = grid_hidden[g] = BLI_BITMAP_NEW(gridsize * gridsize, - "partialvis_update_grids"); - break; - case PARTIALVIS_SHOW: - /* entire grid is visible, nothing to show */ - continue; + switch (action) { + case PARTIALVIS_HIDE: + /* create grid flags data */ + gh = grid_hidden[g] = BLI_BITMAP_NEW(gridsize * gridsize, + "partialvis_update_grids"); + break; + case PARTIALVIS_SHOW: + /* entire grid is visible, nothing to show */ + continue; } } else if (action == PARTIALVIS_SHOW && area == PARTIALVIS_ALL) { @@ -192,7 +192,7 @@ static void partialvis_update_grids(Object *ob, if (is_effected(area, planes, co)) { /* set or clear the hide flag */ BLI_BITMAP_MODIFY(gh, y * gridsize + x, - action == PARTIALVIS_HIDE); + action == PARTIALVIS_HIDE); any_changed = 1; } @@ -230,12 +230,12 @@ static void rect_from_props(rcti *rect, PointerRNA *ptr) } static void clip_planes_from_rect(bContext *C, - float clip_planes[4][4], - const rcti *rect) + float clip_planes[4][4], + const rcti *rect) { ViewContext vc; BoundBox bb; - bglMats mats= {{0}}; + bglMats mats = {{0}}; view3d_operator_needs_opengl(C); view3d_set_viewcontext(C, &vc); @@ -249,23 +249,23 @@ static void clip_planes_from_rect(bContext *C, that lie at least partially outside the volume. If showing all, get all nodes. */ static void get_pbvh_nodes(PBVH *pbvh, - PBVHNode ***nodes, - int *totnode, - float clip_planes[4][4], - PartialVisArea mode) + PBVHNode ***nodes, + int *totnode, + float clip_planes[4][4], + PartialVisArea mode) { BLI_pbvh_SearchCallback cb; /* select search callback */ - switch(mode) { - case PARTIALVIS_INSIDE: - cb = BLI_pbvh_node_planes_contain_AABB; - break; - case PARTIALVIS_OUTSIDE: - cb = BLI_pbvh_node_planes_exclude_AABB; - break; - case PARTIALVIS_ALL: - cb = NULL; + switch (mode) { + case PARTIALVIS_INSIDE: + cb = BLI_pbvh_node_planes_contain_AABB; + break; + case PARTIALVIS_OUTSIDE: + cb = BLI_pbvh_node_planes_exclude_AABB; + break; + case PARTIALVIS_ALL: + cb = NULL; } BLI_pbvh_search_gather(pbvh, cb, clip_planes, nodes, totnode); @@ -301,23 +301,23 @@ static int hide_show_exec(bContext *C, wmOperator *op) pbvh_type = BLI_pbvh_type(pbvh); /* start undo */ - switch(action) { - case PARTIALVIS_HIDE: - sculpt_undo_push_begin("Hide area"); - break; - case PARTIALVIS_SHOW: - sculpt_undo_push_begin("Show area"); - break; + switch (action) { + case PARTIALVIS_HIDE: + sculpt_undo_push_begin("Hide area"); + break; + case PARTIALVIS_SHOW: + sculpt_undo_push_begin("Show area"); + break; } for (i = 0; i < totnode; i++) { - switch(pbvh_type) { - case PBVH_FACES: - partialvis_update_mesh(ob, pbvh, nodes[i], action, area, clip_planes); - break; - case PBVH_GRIDS: - partialvis_update_grids(ob, pbvh, nodes[i], action, area, clip_planes); - break; + switch (pbvh_type) { + case PBVH_FACES: + partialvis_update_mesh(ob, pbvh, nodes[i], action, area, clip_planes); + break; + case PBVH_GRIDS: + partialvis_update_grids(ob, pbvh, nodes[i], action, area, clip_planes); + break; } } @@ -331,8 +331,8 @@ static int hide_show_exec(bContext *C, wmOperator *op) sculpt but it looks wrong when entering editmode otherwise) */ if (pbvh_type == PBVH_FACES) { mesh_flush_hidden_from_verts(me->mvert, me->mloop, - me->medge, me->totedge, - me->mpoly, me->totpoly); + me->medge, me->totedge, + me->mpoly, me->totpoly); } ED_region_tag_redraw(ar); @@ -381,9 +381,9 @@ void PAINT_OT_hide_show(struct wmOperatorType *ot) /* rna */ RNA_def_enum(ot->srna, "action", action_items, PARTIALVIS_HIDE, - "Action", "Whether to hide or show vertices"); + "Action", "Whether to hide or show vertices"); RNA_def_enum(ot->srna, "area", area_items, PARTIALVIS_INSIDE, - "Area", "Which vertices to hide or show"); + "Area", "Which vertices to hide or show"); RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, "X Min", "", INT_MIN, INT_MAX); RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, "X Max", "", INT_MIN, INT_MAX); diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index f761be741e9..f553084cfd9 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -111,7 +111,7 @@ /* Defines and Structs */ -#define IMAPAINT_CHAR_TO_FLOAT(c) ((c)/255.0f) +#define IMAPAINT_CHAR_TO_FLOAT(c) ((c) / 255.0f) #define IMAPAINT_FLOAT_RGB_TO_CHAR(c, f) { \ (c)[0]= FTOCHAR((f)[0]); \ @@ -138,9 +138,9 @@ #define IMAPAINT_FLOAT_RGB_COPY(a, b) copy_v3_v3(a, b) -#define IMAPAINT_TILE_BITS 6 -#define IMAPAINT_TILE_SIZE (1 << IMAPAINT_TILE_BITS) -#define IMAPAINT_TILE_NUMBER(size) (((size)+IMAPAINT_TILE_SIZE-1) >> IMAPAINT_TILE_BITS) +#define IMAPAINT_TILE_BITS 6 +#define IMAPAINT_TILE_SIZE (1 << IMAPAINT_TILE_BITS) +#define IMAPAINT_TILE_NUMBER(size) (((size) + IMAPAINT_TILE_SIZE - 1) >> IMAPAINT_TILE_BITS) static void imapaint_image_update(SpaceImage *sima, Image *image, ImBuf *ibuf, short texpaint); @@ -167,11 +167,11 @@ typedef struct ImagePaintState { int do_facesel; DerivedMesh *dm; - int dm_totface; - int dm_release; + int dm_totface; + int dm_release; - MFace *dm_mface; - MTFace *dm_mtface; + MFace *dm_mface; + MTFace *dm_mtface; } ImagePaintState; typedef struct ImagePaintPartialRedraw { @@ -209,31 +209,31 @@ typedef struct ImagePaintRegion { /* projectFaceSeamFlags options */ //#define PROJ_FACE_IGNORE (1<<0) /* When the face is hidden, backfacing or occluded */ //#define PROJ_FACE_INIT (1<<1) /* When we have initialized the faces data */ -#define PROJ_FACE_SEAM1 (1<<0) /* If this face has a seam on any of its edges */ -#define PROJ_FACE_SEAM2 (1<<1) -#define PROJ_FACE_SEAM3 (1<<2) -#define PROJ_FACE_SEAM4 (1<<3) +#define PROJ_FACE_SEAM1 (1 << 0) /* If this face has a seam on any of its edges */ +#define PROJ_FACE_SEAM2 (1 << 1) +#define PROJ_FACE_SEAM3 (1 << 2) +#define PROJ_FACE_SEAM4 (1 << 3) -#define PROJ_FACE_NOSEAM1 (1<<4) -#define PROJ_FACE_NOSEAM2 (1<<5) -#define PROJ_FACE_NOSEAM3 (1<<6) -#define PROJ_FACE_NOSEAM4 (1<<7) +#define PROJ_FACE_NOSEAM1 (1 << 4) +#define PROJ_FACE_NOSEAM2 (1 << 5) +#define PROJ_FACE_NOSEAM3 (1 << 6) +#define PROJ_FACE_NOSEAM4 (1 << 7) -#define PROJ_SRC_VIEW 1 -#define PROJ_SRC_IMAGE_CAM 2 -#define PROJ_SRC_IMAGE_VIEW 3 +#define PROJ_SRC_VIEW 1 +#define PROJ_SRC_IMAGE_CAM 2 +#define PROJ_SRC_IMAGE_VIEW 3 #define PROJ_VIEW_DATA_ID "view_data" -#define PROJ_VIEW_DATA_SIZE (4*4 + 4*4 + 3) /* viewmat + winmat + clipsta + clipend + is_ortho */ +#define PROJ_VIEW_DATA_SIZE (4 * 4 + 4 * 4 + 3) /* viewmat + winmat + clipsta + clipend + is_ortho */ /* a slightly scaled down face is used to get fake 3D location for edge pixels in the seams * as this number approaches 1.0f the likelihood increases of float precision errors where * it is occluded by an adjacent face */ -#define PROJ_FACE_SCALE_SEAM 0.99f +#define PROJ_FACE_SCALE_SEAM 0.99f -#define PROJ_BUCKET_NULL 0 -#define PROJ_BUCKET_INIT (1<<0) +#define PROJ_BUCKET_NULL 0 +#define PROJ_BUCKET_INIT (1 << 0) // #define PROJ_BUCKET_CLONE_INIT (1<<1) /* used for testing doubles, if a point is on a line etc */ @@ -269,67 +269,67 @@ typedef struct ProjPaintState { /* end similarities with ImagePaintState */ DerivedMesh *dm; - int dm_totface; - int dm_totvert; - int dm_release; - - MVert *dm_mvert; - MFace *dm_mface; - MTFace *dm_mtface; - MTFace *dm_mtface_clone; /* other UV map, use for cloning between layers */ - MTFace *dm_mtface_stencil; + int dm_totface; + int dm_totvert; + int dm_release; + + MVert *dm_mvert; + MFace *dm_mface; + MTFace *dm_mtface; + MTFace *dm_mtface_clone; /* other UV map, use for cloning between layers */ + MTFace *dm_mtface_stencil; /* projection painting only */ - MemArena *arena_mt[BLENDER_MAX_THREADS];/* for multithreading, the first item is sometimes used for non threaded cases too */ - LinkNode **bucketRect; /* screen sized 2D array, each pixel has a linked list of ProjPixel's */ - LinkNode **bucketFaces; /* bucketRect aligned array linkList of faces overlapping each bucket */ - unsigned char *bucketFlags; /* store if the bucks have been initialized */ + MemArena *arena_mt[BLENDER_MAX_THREADS]; /* for multithreading, the first item is sometimes used for non threaded cases too */ + LinkNode **bucketRect; /* screen sized 2D array, each pixel has a linked list of ProjPixel's */ + LinkNode **bucketFaces; /* bucketRect aligned array linkList of faces overlapping each bucket */ + unsigned char *bucketFlags; /* store if the bucks have been initialized */ #ifndef PROJ_DEBUG_NOSEAMBLEED - char *faceSeamFlags; /* store info about faces, if they are initialized etc*/ - float (*faceSeamUVs)[4][2]; /* expanded UVs for faces to use as seams */ - LinkNode **vertFaces; /* Only needed for when seam_bleed_px is enabled, use to find UV seams */ + char *faceSeamFlags; /* store info about faces, if they are initialized etc*/ + float (*faceSeamUVs)[4][2]; /* expanded UVs for faces to use as seams */ + LinkNode **vertFaces; /* Only needed for when seam_bleed_px is enabled, use to find UV seams */ #endif - char *vertFlags; /* store options per vert, now only store if the vert is pointing away from the view */ - int buckets_x; /* The size of the bucket grid, the grid span's screenMin/screenMax so you can paint outsize the screen or with 2 brushes at once */ + char *vertFlags; /* store options per vert, now only store if the vert is pointing away from the view */ + int buckets_x; /* The size of the bucket grid, the grid span's screenMin/screenMax so you can paint outsize the screen or with 2 brushes at once */ int buckets_y; ProjPaintImage *projImages; - int image_tot; /* size of projectImages array */ + int image_tot; /* size of projectImages array */ - float (*screenCoords)[4]; /* verts projected into floating point screen space */ + float (*screenCoords)[4]; /* verts projected into floating point screen space */ - float screenMin[2]; /* 2D bounds for mesh verts on the screen's plane (screenspace) */ + float screenMin[2]; /* 2D bounds for mesh verts on the screen's plane (screenspace) */ float screenMax[2]; - float screen_width; /* Calculated from screenMin & screenMax */ + float screen_width; /* Calculated from screenMin & screenMax */ float screen_height; - int winx, winy; /* from the carea or from the projection render */ + int winx, winy; /* from the carea or from the projection render */ /* options for projection painting */ int do_layer_clone; int do_layer_stencil; int do_layer_stencil_inv; - short do_occlude; /* Use raytraced occlusion? - ortherwise will paint right through to the back*/ - short do_backfacecull; /* ignore faces with normals pointing away, skips a lot of raycasts if your normals are correctly flipped */ - short do_mask_normal; /* mask out pixels based on their normals */ + short do_occlude; /* Use raytraced occlusion? - ortherwise will paint right through to the back*/ + short do_backfacecull; /* ignore faces with normals pointing away, skips a lot of raycasts if your normals are correctly flipped */ + short do_mask_normal; /* mask out pixels based on their normals */ short do_new_shading_nodes; /* cache scene_use_new_shading_nodes value */ - float normal_angle; /* what angle to mask at*/ + float normal_angle; /* what angle to mask at*/ float normal_angle_inner; - float normal_angle_range; /* difference between normal_angle and normal_angle_inner, for easy access */ + float normal_angle_range; /* difference between normal_angle and normal_angle_inner, for easy access */ short is_ortho; - short is_airbrush; /* only to avoid using (ps.brush->flag & BRUSH_AIRBRUSH) */ - short is_texbrush; /* only to avoid running */ + short is_airbrush; /* only to avoid using (ps.brush->flag & BRUSH_AIRBRUSH) */ + short is_texbrush; /* only to avoid running */ #ifndef PROJ_DEBUG_NOSEAMBLEED float seam_bleed_px; #endif /* clone vars */ float cloneOffset[2]; - float projectMat[4][4]; /* Projection matrix, use for getting screen coords */ - float viewDir[3]; /* View vector, use for do_backfacecull and for ray casting with an ortho viewport */ - float viewPos[3]; /* View location in object relative 3D space, so can compare to verts */ + float projectMat[4][4]; /* Projection matrix, use for getting screen coords */ + float viewDir[3]; /* View vector, use for do_backfacecull and for ray casting with an ortho viewport */ + float viewPos[3]; /* View location in object relative 3D space, so can compare to verts */ float clipsta, clipend; /* reproject vars */ @@ -344,15 +344,13 @@ typedef struct ProjPaintState { int context_bucket_x, context_bucket_y; /* must lock threads while accessing these */ } ProjPaintState; -typedef union pixelPointer -{ - float *f_pt; /* float buffer */ +typedef union pixelPointer { + float *f_pt; /* float buffer */ unsigned int *uint_pt; /* 2 ways to access a char buffer */ unsigned char *ch_pt; } PixelPointer; -typedef union pixelStore -{ +typedef union pixelStore { unsigned char ch[4]; unsigned int uint; float f[4]; @@ -390,7 +388,7 @@ typedef struct ProjPixelClone { typedef struct UndoImageTile { struct UndoImageTile *next, *prev; - char idname[MAX_ID_NAME]; /* name instead of pointer*/ + char idname[MAX_ID_NAME]; /* name instead of pointer*/ char ibufname[IB_FILENAME_SIZE]; void *rect; @@ -407,51 +405,51 @@ static ImagePaintPartialRedraw imapaintpartial = {0, 0, 0, 0, 0}; static void undo_copy_tile(UndoImageTile *tile, ImBuf *tmpibuf, ImBuf *ibuf, int restore) { /* copy or swap contents of tile->rect and region in ibuf->rect */ - IMB_rectcpy(tmpibuf, ibuf, 0, 0, tile->x*IMAPAINT_TILE_SIZE, - tile->y*IMAPAINT_TILE_SIZE, IMAPAINT_TILE_SIZE, IMAPAINT_TILE_SIZE); + IMB_rectcpy(tmpibuf, ibuf, 0, 0, tile->x * IMAPAINT_TILE_SIZE, + tile->y * IMAPAINT_TILE_SIZE, IMAPAINT_TILE_SIZE, IMAPAINT_TILE_SIZE); if (ibuf->rect_float) { - SWAP(void*, tmpibuf->rect_float, tile->rect); + SWAP(void *, tmpibuf->rect_float, tile->rect); } else { - SWAP(void*, tmpibuf->rect, tile->rect); + SWAP(void *, tmpibuf->rect, tile->rect); } if (restore) - IMB_rectcpy(ibuf, tmpibuf, tile->x*IMAPAINT_TILE_SIZE, - tile->y*IMAPAINT_TILE_SIZE, 0, 0, IMAPAINT_TILE_SIZE, IMAPAINT_TILE_SIZE); + IMB_rectcpy(ibuf, tmpibuf, tile->x * IMAPAINT_TILE_SIZE, + tile->y * IMAPAINT_TILE_SIZE, 0, 0, IMAPAINT_TILE_SIZE, IMAPAINT_TILE_SIZE); } static void *image_undo_push_tile(Image *ima, ImBuf *ibuf, ImBuf **tmpibuf, int x_tile, int y_tile) { - ListBase *lb= undo_paint_push_get_list(UNDO_PAINT_IMAGE); + ListBase *lb = undo_paint_push_get_list(UNDO_PAINT_IMAGE); UndoImageTile *tile; int allocsize; short use_float = ibuf->rect_float ? 1 : 0; - for (tile=lb->first; tile; tile=tile->next) + for (tile = lb->first; tile; tile = tile->next) if (tile->x == x_tile && tile->y == y_tile && ima->gen_type == tile->gen_type && ima->source == tile->source) if (tile->use_float == use_float) - if (strcmp(tile->idname, ima->id.name)==0 && strcmp(tile->ibufname, ibuf->name)==0) + if (strcmp(tile->idname, ima->id.name) == 0 && strcmp(tile->ibufname, ibuf->name) == 0) return tile->rect; - if (*tmpibuf==NULL) - *tmpibuf = IMB_allocImBuf(IMAPAINT_TILE_SIZE, IMAPAINT_TILE_SIZE, 32, IB_rectfloat|IB_rect); + if (*tmpibuf == NULL) + *tmpibuf = IMB_allocImBuf(IMAPAINT_TILE_SIZE, IMAPAINT_TILE_SIZE, 32, IB_rectfloat | IB_rect); - tile= MEM_callocN(sizeof(UndoImageTile), "UndoImageTile"); + tile = MEM_callocN(sizeof(UndoImageTile), "UndoImageTile"); BLI_strncpy(tile->idname, ima->id.name, sizeof(tile->idname)); - tile->x= x_tile; - tile->y= y_tile; + tile->x = x_tile; + tile->y = y_tile; - allocsize= IMAPAINT_TILE_SIZE*IMAPAINT_TILE_SIZE*4; - allocsize *= (ibuf->rect_float)? sizeof(float): sizeof(char); - tile->rect= MEM_mapallocN(allocsize, "UndeImageTile.rect"); + allocsize = IMAPAINT_TILE_SIZE * IMAPAINT_TILE_SIZE * 4; + allocsize *= (ibuf->rect_float) ? sizeof(float) : sizeof(char); + tile->rect = MEM_mapallocN(allocsize, "UndeImageTile.rect"); BLI_strncpy(tile->ibufname, ibuf->name, sizeof(tile->ibufname)); - tile->gen_type= ima->gen_type; - tile->source= ima->source; - tile->use_float= use_float; + tile->gen_type = ima->gen_type; + tile->source = ima->source; + tile->use_float = use_float; undo_copy_tile(tile, *tmpibuf, ibuf, 0); undo_paint_push_count_alloc(UNDO_PAINT_IMAGE, allocsize); @@ -463,34 +461,34 @@ static void *image_undo_push_tile(Image *ima, ImBuf *ibuf, ImBuf **tmpibuf, int static void image_undo_restore(bContext *C, ListBase *lb) { - Main *bmain= CTX_data_main(C); + Main *bmain = CTX_data_main(C); Image *ima = NULL; ImBuf *ibuf, *tmpibuf; UndoImageTile *tile; - tmpibuf= IMB_allocImBuf(IMAPAINT_TILE_SIZE, IMAPAINT_TILE_SIZE, 32, - IB_rectfloat|IB_rect); + tmpibuf = IMB_allocImBuf(IMAPAINT_TILE_SIZE, IMAPAINT_TILE_SIZE, 32, + IB_rectfloat | IB_rect); - for (tile=lb->first; tile; tile=tile->next) { + for (tile = lb->first; tile; tile = tile->next) { short use_float; /* find image based on name, pointer becomes invalid with global undo */ - if (ima && strcmp(tile->idname, ima->id.name)==0) { + if (ima && strcmp(tile->idname, ima->id.name) == 0) { /* ima is valid */ } else { - ima= BLI_findstring(&bmain->image, tile->idname, offsetof(ID, name)); + ima = BLI_findstring(&bmain->image, tile->idname, offsetof(ID, name)); } - ibuf= BKE_image_get_ibuf(ima, NULL); + ibuf = BKE_image_get_ibuf(ima, NULL); - if (ima && ibuf && strcmp(tile->ibufname, ibuf->name)!=0) { + if (ima && ibuf && strcmp(tile->ibufname, ibuf->name) != 0) { /* current ImBuf filename was changed, probably current frame * was changed when paiting on image sequence, rather than storing * full image user (which isn't so obvious, btw) try to find ImBuf with * matched file name in list of already loaded images */ - ibuf= BLI_findstring(&ima->ibufs, tile->ibufname, offsetof(ImBuf, name)); + ibuf = BLI_findstring(&ima->ibufs, tile->ibufname, offsetof(ImBuf, name)); } if (!ima || !ibuf || !(ibuf->rect || ibuf->rect_float)) @@ -510,7 +508,7 @@ static void image_undo_restore(bContext *C, ListBase *lb) if (ibuf->rect_float) ibuf->userflags |= IB_RECT_INVALID; /* force recreate of char rect */ if (ibuf->mipmap[0]) - ibuf->userflags |= IB_MIPMAP_INVALID; /* force mipmap recreatiom */ + ibuf->userflags |= IB_MIPMAP_INVALID; /* force mipmap recreatiom */ } @@ -521,7 +519,7 @@ static void image_undo_free(ListBase *lb) { UndoImageTile *tile; - for (tile=lb->first; tile; tile=tile->next) + for (tile = lb->first; tile; tile = tile->next) MEM_freeN(tile->rect); } @@ -548,7 +546,7 @@ static Image *project_paint_face_image(const ProjPaintState *ps, MTFace *dm_mtfa Image *ima; if (ps->do_new_shading_nodes) { /* cached scene_use_new_shading_nodes result */ - MFace *mf = ps->dm_mface+face_index; + MFace *mf = ps->dm_mface + face_index; ED_object_get_active_image(ps->ob, mf->mat_nr, &ima, NULL, NULL); } else { @@ -571,15 +569,15 @@ static int project_bucket_offset(const ProjPaintState *ps, const float projCoSS[ * * Second multiplication does similar but for vertical offset */ - return ( (int)(((projCoSS[0] - ps->screenMin[0]) / ps->screen_width) * ps->buckets_x)) + - ( ( (int)(((projCoSS[1] - ps->screenMin[1]) / ps->screen_height) * ps->buckets_y)) * ps->buckets_x); + return ( (int)(((projCoSS[0] - ps->screenMin[0]) / ps->screen_width) * ps->buckets_x)) + + ( ( (int)(((projCoSS[1] - ps->screenMin[1]) / ps->screen_height) * ps->buckets_y)) * ps->buckets_x); } static int project_bucket_offset_safe(const ProjPaintState *ps, const float projCoSS[2]) { int bucket_index = project_bucket_offset(ps, projCoSS); - if (bucket_index < 0 || bucket_index >= ps->buckets_x*ps->buckets_y) { + if (bucket_index < 0 || bucket_index >= ps->buckets_x * ps->buckets_y) { return -1; } else { @@ -595,23 +593,23 @@ static void barycentric_weights_v2_persp(float v1[4], float v2[4], float v3[4], w[0] = area_tri_signed_v2(v2, v3, co) / v1[3]; w[1] = area_tri_signed_v2(v3, v1, co) / v2[3]; w[2] = area_tri_signed_v2(v1, v2, co) / v3[3]; - wtot = w[0]+w[1]+w[2]; + wtot = w[0] + w[1] + w[2]; if (wtot != 0.0f) { - wtot_inv = 1.0f/wtot; + wtot_inv = 1.0f / wtot; - w[0] = w[0]*wtot_inv; - w[1] = w[1]*wtot_inv; - w[2] = w[2]*wtot_inv; + w[0] = w[0] * wtot_inv; + w[1] = w[1] * wtot_inv; + w[2] = w[2] * wtot_inv; } else /* dummy values for zero area face */ - w[0] = w[1] = w[2] = 1.0f/3.0f; + w[0] = w[1] = w[2] = 1.0f / 3.0f; } static float VecZDepthOrtho(float pt[2], float v1[3], float v2[3], float v3[3], float w[3]) { barycentric_weights_v2(v1, v2, v3, pt, w); - return (v1[2]*w[0]) + (v2[2]*w[1]) + (v3[2]*w[2]); + return (v1[2] * w[0]) + (v2[2] * w[1]) + (v3[2] * w[2]); } static float VecZDepthPersp(float pt[2], float v1[4], float v2[4], float v3[4], float w[3]) @@ -626,24 +624,24 @@ static float VecZDepthPersp(float pt[2], float v1[4], float v2[4], float v3[4], * * don't call barycentric_weights_v2() becaue our callers expect 'w' * to be weighted from the perspective */ - w_tmp[0]= w[0] * v1[3]; - w_tmp[1]= w[1] * v2[3]; - w_tmp[2]= w[2] * v3[3]; + w_tmp[0] = w[0] * v1[3]; + w_tmp[1] = w[1] * v2[3]; + w_tmp[2] = w[2] * v3[3]; - wtot = w_tmp[0]+w_tmp[1]+w_tmp[2]; + wtot = w_tmp[0] + w_tmp[1] + w_tmp[2]; if (wtot != 0.0f) { - wtot_inv = 1.0f/wtot; + wtot_inv = 1.0f / wtot; - w_tmp[0] = w_tmp[0]*wtot_inv; - w_tmp[1] = w_tmp[1]*wtot_inv; - w_tmp[2] = w_tmp[2]*wtot_inv; + w_tmp[0] = w_tmp[0] * wtot_inv; + w_tmp[1] = w_tmp[1] * wtot_inv; + w_tmp[2] = w_tmp[2] * wtot_inv; } else /* dummy values for zero area face */ - w_tmp[0] = w_tmp[1] = w_tmp[2] = 1.0f/3.0f; + w_tmp[0] = w_tmp[1] = w_tmp[2] = 1.0f / 3.0f; /* done mimicing barycentric_weights_v2() */ - return (v1[2]*w_tmp[0]) + (v2[2]*w_tmp[1]) + (v3[2]*w_tmp[2]); + return (v1[2] * w_tmp[0]) + (v2[2] * w_tmp[1]) + (v3[2] * w_tmp[2]); } @@ -661,7 +659,7 @@ static int project_paint_PickFace(const ProjPaintState *ps, float pt[2], float w MFace *mf; bucket_index = project_bucket_offset_safe(ps, pt); - if (bucket_index==-1) + if (bucket_index == -1) return -1; @@ -669,17 +667,17 @@ static int project_paint_PickFace(const ProjPaintState *ps, float pt[2], float w /* we could return 0 for 1 face buckets, as long as this function assumes * that the point its testing is only every originated from an existing face */ - for (node= ps->bucketFaces[bucket_index]; node; node= node->next) { + for (node = ps->bucketFaces[bucket_index]; node; node = node->next) { face_index = GET_INT_FROM_POINTER(node->link); - mf= ps->dm_mface + face_index; + mf = ps->dm_mface + face_index; - v1= ps->screenCoords[mf->v1]; - v2= ps->screenCoords[mf->v2]; - v3= ps->screenCoords[mf->v3]; + v1 = ps->screenCoords[mf->v1]; + v2 = ps->screenCoords[mf->v2]; + v3 = ps->screenCoords[mf->v3]; if (isect_point_tri_v2(pt, v1, v2, v3)) { - if (ps->is_ortho) z_depth= VecZDepthOrtho(pt, v1, v2, v3, w_tmp); - else z_depth= VecZDepthPersp(pt, v1, v2, v3, w_tmp); + if (ps->is_ortho) z_depth = VecZDepthOrtho(pt, v1, v2, v3, w_tmp); + else z_depth = VecZDepthPersp(pt, v1, v2, v3, w_tmp); if (z_depth < z_depth_best) { best_face_index = face_index; @@ -689,15 +687,15 @@ static int project_paint_PickFace(const ProjPaintState *ps, float pt[2], float w } } else if (mf->v4) { - v4= ps->screenCoords[mf->v4]; + v4 = ps->screenCoords[mf->v4]; if (isect_point_tri_v2(pt, v1, v3, v4)) { - if (ps->is_ortho) z_depth= VecZDepthOrtho(pt, v1, v3, v4, w_tmp); - else z_depth= VecZDepthPersp(pt, v1, v3, v4, w_tmp); + if (ps->is_ortho) z_depth = VecZDepthOrtho(pt, v1, v3, v4, w_tmp); + else z_depth = VecZDepthPersp(pt, v1, v3, v4, w_tmp); if (z_depth < z_depth_best) { best_face_index = face_index; - best_side= 1; + best_side = 1; z_depth_best = z_depth; copy_v3_v3(w, w_tmp); } @@ -784,10 +782,10 @@ static int project_paint_PickColor(const ProjPaintState *ps, float pt[2], float //if (xi<0 || xi>=ibuf->x || yi<0 || yi>=ibuf->y) return 0; /* wrap */ - xi = ((int)(uv[0]*ibuf->x)) % ibuf->x; - if (xi<0) xi += ibuf->x; - yi = ((int)(uv[1]*ibuf->y)) % ibuf->y; - if (yi<0) yi += ibuf->y; + xi = ((int)(uv[0] * ibuf->x)) % ibuf->x; + if (xi < 0) xi += ibuf->x; + yi = ((int)(uv[1] * ibuf->y)) % ibuf->y; + if (yi < 0) yi += ibuf->y; if (rgba) { @@ -805,7 +803,7 @@ static int project_paint_PickColor(const ProjPaintState *ps, float pt[2], float copy_v4_v4(rgba_fp, ((float *)ibuf->rect_float + ((xi + yi * ibuf->x) * 4))); } else { - char *tmp_ch= ((char *)ibuf->rect) + ((xi + yi * ibuf->x) * 4); + char *tmp_ch = ((char *)ibuf->rect) + ((xi + yi * ibuf->x) * 4); IMAPAINT_CHAR_RGBA_TO_FLOAT(rgba_fp, tmp_ch); } } @@ -828,7 +826,7 @@ static int project_paint_occlude_ptv(float pt[3], float v1[4], float v2[4], floa /* do a 2D point in try intersection */ if (!isect_point_tri_v2(pt, v1, v2, v3)) - return 0; /* we know there is */ + return 0; /* we know there is */ /* From here on we know there IS an intersection */ @@ -850,10 +848,9 @@ static int project_paint_occlude_ptv(float pt[3], float v1[4], float v2[4], floa } -static int project_paint_occlude_ptv_clip( - const ProjPaintState *ps, const MFace *mf, - float pt[3], float v1[4], float v2[4], float v3[4], - const int side ) +static int project_paint_occlude_ptv_clip(const ProjPaintState *ps, const MFace *mf, + float pt[3], float v1[4], float v2[4], float v3[4], + const int side) { float w[3], wco[3]; int ret = project_paint_occlude_ptv(pt, v1, v2, v3, w, ps->is_ortho); @@ -861,14 +858,14 @@ static int project_paint_occlude_ptv_clip( if (ret <= 0) return ret; - if (ret==1) { /* weights not calculated */ - if (ps->is_ortho) barycentric_weights_v2(v1, v2, v3, pt, w); - else barycentric_weights_v2_persp(v1, v2, v3, pt, w); + if (ret == 1) { /* weights not calculated */ + if (ps->is_ortho) barycentric_weights_v2(v1, v2, v3, pt, w); + else barycentric_weights_v2_persp(v1, v2, v3, pt, w); } /* Test if we're in the clipped area, */ - if (side) interp_v3_v3v3v3(wco, ps->dm_mvert[mf->v1].co, ps->dm_mvert[mf->v3].co, ps->dm_mvert[mf->v4].co, w); - else interp_v3_v3v3v3(wco, ps->dm_mvert[mf->v1].co, ps->dm_mvert[mf->v2].co, ps->dm_mvert[mf->v3].co, w); + if (side) interp_v3_v3v3v3(wco, ps->dm_mvert[mf->v1].co, ps->dm_mvert[mf->v3].co, ps->dm_mvert[mf->v4].co, w); + else interp_v3_v3v3v3(wco, ps->dm_mvert[mf->v1].co, ps->dm_mvert[mf->v2].co, ps->dm_mvert[mf->v3].co, w); if (!ED_view3d_clipping_test(ps->rv3d, wco, TRUE)) { return 1; @@ -887,7 +884,7 @@ static int project_bucket_point_occluded(const ProjPaintState *ps, LinkNode *buc int face_index; int isect_ret; float w[3]; /* not needed when clipping */ - const short do_clip= ps->rv3d ? ps->rv3d->rflag & RV3D_CLIPPING : 0; + const short do_clip = ps->rv3d ? ps->rv3d->rflag & RV3D_CLIPPING : 0; /* we could return 0 for 1 face buckets, as long as this function assumes * that the point its testing is only every originated from an existing face */ @@ -903,13 +900,13 @@ static int project_bucket_point_occluded(const ProjPaintState *ps, LinkNode *buc isect_ret = project_paint_occlude_ptv(pixelScreenCo, ps->screenCoords[mf->v1], ps->screenCoords[mf->v2], ps->screenCoords[mf->v3], w, ps->is_ortho); /* Note, if isect_ret==-1 then we don't want to test the other side of the quad */ - if (isect_ret==0 && mf->v4) { + if (isect_ret == 0 && mf->v4) { if (do_clip) isect_ret = project_paint_occlude_ptv_clip(ps, mf, pixelScreenCo, ps->screenCoords[mf->v1], ps->screenCoords[mf->v3], ps->screenCoords[mf->v4], 1); else isect_ret = project_paint_occlude_ptv(pixelScreenCo, ps->screenCoords[mf->v1], ps->screenCoords[mf->v3], ps->screenCoords[mf->v4], w, ps->is_ortho); } - if (isect_ret>=1) { + if (isect_ret >= 1) { /* TODO - we may want to cache the first hit, * it is not possible to swap the face order in the list anymore */ return 1; @@ -928,28 +925,28 @@ static int line_isect_y(const float p1[2], const float p2[2], const float y_leve { float y_diff; - if (y_level==p1[1]) { /* are we touching the first point? - no interpolation needed */ + if (y_level == p1[1]) { /* are we touching the first point? - no interpolation needed */ *x_isect = p1[0]; return ISECT_TRUE_P1; } - if (y_level==p2[1]) { /* are we touching the second point? - no interpolation needed */ + if (y_level == p2[1]) { /* are we touching the second point? - no interpolation needed */ *x_isect = p2[0]; return ISECT_TRUE_P2; } - y_diff= fabsf(p1[1]-p2[1]); /* yuck, horizontal line, we cant do much here */ + y_diff = fabsf(p1[1] - p2[1]); /* yuck, horizontal line, we cant do much here */ if (y_diff < 0.000001f) { - *x_isect = (p1[0]+p2[0]) * 0.5f; + *x_isect = (p1[0] + p2[0]) * 0.5f; return ISECT_TRUE; } if (p1[1] > y_level && p2[1] < y_level) { - *x_isect = (p2[0]*(p1[1]-y_level) + p1[0]*(y_level-p2[1])) / y_diff; /*(p1[1]-p2[1]);*/ + *x_isect = (p2[0] * (p1[1] - y_level) + p1[0] * (y_level - p2[1])) / y_diff; /*(p1[1]-p2[1]);*/ return ISECT_TRUE; } else if (p1[1] < y_level && p2[1] > y_level) { - *x_isect = (p2[0]*(y_level-p1[1]) + p1[0]*(p2[1]-y_level)) / y_diff; /*(p2[1]-p1[1]);*/ + *x_isect = (p2[0] * (y_level - p1[1]) + p1[0] * (p2[1] - y_level)) / y_diff; /*(p2[1]-p1[1]);*/ return ISECT_TRUE; } else { @@ -961,28 +958,28 @@ static int line_isect_x(const float p1[2], const float p2[2], const float x_leve { float x_diff; - if (x_level==p1[0]) { /* are we touching the first point? - no interpolation needed */ + if (x_level == p1[0]) { /* are we touching the first point? - no interpolation needed */ *y_isect = p1[1]; return ISECT_TRUE_P1; } - if (x_level==p2[0]) { /* are we touching the second point? - no interpolation needed */ + if (x_level == p2[0]) { /* are we touching the second point? - no interpolation needed */ *y_isect = p2[1]; return ISECT_TRUE_P2; } - x_diff= fabsf(p1[0]-p2[0]); /* yuck, horizontal line, we cant do much here */ + x_diff = fabsf(p1[0] - p2[0]); /* yuck, horizontal line, we cant do much here */ if (x_diff < 0.000001f) { /* yuck, vertical line, we cant do much here */ - *y_isect = (p1[0]+p2[0]) * 0.5f; + *y_isect = (p1[0] + p2[0]) * 0.5f; return ISECT_TRUE; } if (p1[0] > x_level && p2[0] < x_level) { - *y_isect = (p2[1]*(p1[0]-x_level) + p1[1]*(x_level-p2[0])) / x_diff; /*(p1[0]-p2[0]);*/ + *y_isect = (p2[1] * (p1[0] - x_level) + p1[1] * (x_level - p2[0])) / x_diff; /*(p1[0]-p2[0]);*/ return ISECT_TRUE; } else if (p1[0] < x_level && p2[0] > x_level) { - *y_isect = (p2[1]*(x_level-p1[0]) + p1[1]*(p2[0]-x_level)) / x_diff; /*(p2[0]-p1[0]);*/ + *y_isect = (p2[1] * (x_level - p1[0]) + p1[1] * (p2[0] - x_level)) / x_diff; /*(p2[0]-p1[0]);*/ return ISECT_TRUE; } else { @@ -1010,7 +1007,7 @@ static int cmp_uv(const float vec2a[2], const float vec2b[2]) if (xb < 0.0f) xb += 1.0f; if (yb < 0.0f) yb += 1.0f; - return ((fabsf(xa-xb) < PROJ_GEOM_TOLERANCE) && (fabsf(ya-yb) < PROJ_GEOM_TOLERANCE)) ? 1:0; + return ((fabsf(xa - xb) < PROJ_GEOM_TOLERANCE) && (fabsf(ya - yb) < PROJ_GEOM_TOLERANCE)) ? 1 : 0; } #endif @@ -1018,11 +1015,12 @@ static int cmp_uv(const float vec2a[2], const float vec2b[2]) * return zero if there is no area in the returned rectangle */ #ifndef PROJ_DEBUG_NOSEAMBLEED static int pixel_bounds_uv( - const float uv1[2], const float uv2[2], const float uv3[2], const float uv4[2], - rcti *bounds_px, - const int ibuf_x, const int ibuf_y, - int is_quad -) { + const float uv1[2], const float uv2[2], const float uv3[2], const float uv4[2], + rcti *bounds_px, + const int ibuf_x, const int ibuf_y, + int is_quad + ) +{ float min_uv[2], max_uv[2]; /* UV bounds */ INIT_MINMAX2(min_uv, max_uv); @@ -1036,8 +1034,8 @@ static int pixel_bounds_uv( bounds_px->xmin = (int)(ibuf_x * min_uv[0]); bounds_px->ymin = (int)(ibuf_y * min_uv[1]); - bounds_px->xmax = (int)(ibuf_x * max_uv[0]) +1; - bounds_px->ymax = (int)(ibuf_y * max_uv[1]) +1; + bounds_px->xmax = (int)(ibuf_x * max_uv[0]) + 1; + bounds_px->ymax = (int)(ibuf_y * max_uv[1]) + 1; /*printf("%d %d %d %d \n", min_px[0], min_px[1], max_px[0], max_px[1]);*/ @@ -1046,11 +1044,11 @@ static int pixel_bounds_uv( } #endif -static int pixel_bounds_array(float (* uv)[2], rcti *bounds_px, const int ibuf_x, const int ibuf_y, int tot) +static int pixel_bounds_array(float (*uv)[2], rcti *bounds_px, const int ibuf_x, const int ibuf_y, int tot) { float min_uv[2], max_uv[2]; /* UV bounds */ - if (tot==0) { + if (tot == 0) { return 0; } @@ -1064,8 +1062,8 @@ static int pixel_bounds_array(float (* uv)[2], rcti *bounds_px, const int ibuf_x bounds_px->xmin = (int)(ibuf_x * min_uv[0]); bounds_px->ymin = (int)(ibuf_y * min_uv[1]); - bounds_px->xmax = (int)(ibuf_x * max_uv[0]) +1; - bounds_px->ymax = (int)(ibuf_y * max_uv[1]) +1; + bounds_px->xmax = (int)(ibuf_x * max_uv[0]) + 1; + bounds_px->ymax = (int)(ibuf_y * max_uv[1]) + 1; /*printf("%d %d %d %d \n", min_px[0], min_px[1], max_px[0], max_px[1]);*/ @@ -1103,15 +1101,15 @@ static int check_seam(const ProjPaintState *ps, const int orig_face, const int o /* We need to know the order of the verts in the adjacent face * set the i1_fidx and i2_fidx to (0,1,2,3) */ - if (mf->v1==i1) i1_fidx = 0; - else if (mf->v2==i1) i1_fidx = 1; - else if (mf->v3==i1) i1_fidx = 2; - else if (mf->v4 && mf->v4==i1) i1_fidx = 3; - - if (mf->v1==i2) i2_fidx = 0; - else if (mf->v2==i2) i2_fidx = 1; - else if (mf->v3==i2) i2_fidx = 2; - else if (mf->v4 && mf->v4==i2) i2_fidx = 3; + if (mf->v1 == i1) i1_fidx = 0; + else if (mf->v2 == i1) i1_fidx = 1; + else if (mf->v3 == i1) i1_fidx = 2; + else if (mf->v4 && mf->v4 == i1) i1_fidx = 3; + + if (mf->v1 == i2) i2_fidx = 0; + else if (mf->v2 == i2) i2_fidx = 1; + else if (mf->v3 == i2) i2_fidx = 2; + else if (mf->v4 && mf->v4 == i2) i2_fidx = 3; /* Only need to check if 'i2_fidx' is valid because we know i1_fidx is the same vert on both faces */ if (i2_fidx != -1) { @@ -1126,9 +1124,9 @@ static int check_seam(const ProjPaintState *ps, const int orig_face, const int o *orig_fidx = (i1_fidx < i2_fidx) ? i1_fidx : i2_fidx; /* first test if they have the same image */ - if ( (orig_tpage == tpage) && - cmp_uv(orig_tf->uv[orig_i1_fidx], tf->uv[i1_fidx]) && - cmp_uv(orig_tf->uv[orig_i2_fidx], tf->uv[i2_fidx]) ) + if ((orig_tpage == tpage) && + cmp_uv(orig_tf->uv[orig_i1_fidx], tf->uv[i1_fidx]) && + cmp_uv(orig_tf->uv[orig_i2_fidx], tf->uv[i2_fidx]) ) { // printf("SEAM (NONE)\n"); return 0; @@ -1151,14 +1149,14 @@ static int check_seam(const ProjPaintState *ps, const int orig_face, const int o * note that the image aspect is taken into account */ static void uv_image_outset(float (*orig_uv)[2], float (*outset_uv)[2], const float scaler, const int ibuf_x, const int ibuf_y, const int is_quad) { - float a1, a2, a3, a4=0.0f; + float a1, a2, a3, a4 = 0.0f; float puv[4][2]; /* pixelspace uv's */ float no1[2], no2[2], no3[2], no4[2]; /* normals */ float dir1[2], dir2[2], dir3[2], dir4[2]; float ibuf_inv[2]; - ibuf_inv[0]= 1.0f / (float)ibuf_x; - ibuf_inv[1]= 1.0f / (float)ibuf_y; + ibuf_inv[0] = 1.0f / (float)ibuf_x; + ibuf_inv[1] = 1.0f / (float)ibuf_y; /* make UV's in pixel space so we can */ puv[0][0] = orig_uv[0][0] * ibuf_x; @@ -1196,15 +1194,15 @@ static void uv_image_outset(float (*orig_uv)[2], float (*outset_uv)[2], const fl * This is incorrect. Its already given radians but without it wont work. * need to look into a fix - campbell */ if (is_quad) { - a1 = shell_angle_to_dist(angle_normalized_v2v2(dir4, dir1) * ((float)M_PI/180.0f)); - a2 = shell_angle_to_dist(angle_normalized_v2v2(dir1, dir2) * ((float)M_PI/180.0f)); - a3 = shell_angle_to_dist(angle_normalized_v2v2(dir2, dir3) * ((float)M_PI/180.0f)); - a4 = shell_angle_to_dist(angle_normalized_v2v2(dir3, dir4) * ((float)M_PI/180.0f)); + a1 = shell_angle_to_dist(angle_normalized_v2v2(dir4, dir1) * ((float)M_PI / 180.0f)); + a2 = shell_angle_to_dist(angle_normalized_v2v2(dir1, dir2) * ((float)M_PI / 180.0f)); + a3 = shell_angle_to_dist(angle_normalized_v2v2(dir2, dir3) * ((float)M_PI / 180.0f)); + a4 = shell_angle_to_dist(angle_normalized_v2v2(dir3, dir4) * ((float)M_PI / 180.0f)); } else { - a1 = shell_angle_to_dist(angle_normalized_v2v2(dir3, dir1) * ((float)M_PI/180.0f)); - a2 = shell_angle_to_dist(angle_normalized_v2v2(dir1, dir2) * ((float)M_PI/180.0f)); - a3 = shell_angle_to_dist(angle_normalized_v2v2(dir2, dir3) * ((float)M_PI/180.0f)); + a1 = shell_angle_to_dist(angle_normalized_v2v2(dir3, dir1) * ((float)M_PI / 180.0f)); + a2 = shell_angle_to_dist(angle_normalized_v2v2(dir1, dir2) * ((float)M_PI / 180.0f)); + a3 = shell_angle_to_dist(angle_normalized_v2v2(dir2, dir3) * ((float)M_PI / 180.0f)); } if (is_quad) { @@ -1216,10 +1214,10 @@ static void uv_image_outset(float (*orig_uv)[2], float (*outset_uv)[2], const fl normalize_v2(no2); normalize_v2(no3); normalize_v2(no4); - mul_v2_fl(no1, a1*scaler); - mul_v2_fl(no2, a2*scaler); - mul_v2_fl(no3, a3*scaler); - mul_v2_fl(no4, a4*scaler); + mul_v2_fl(no1, a1 * scaler); + mul_v2_fl(no2, a2 * scaler); + mul_v2_fl(no3, a3 * scaler); + mul_v2_fl(no4, a4 * scaler); add_v2_v2v2(outset_uv[0], puv[0], no1); add_v2_v2v2(outset_uv[1], puv[1], no2); add_v2_v2v2(outset_uv[2], puv[2], no3); @@ -1236,9 +1234,9 @@ static void uv_image_outset(float (*orig_uv)[2], float (*outset_uv)[2], const fl normalize_v2(no1); normalize_v2(no2); normalize_v2(no3); - mul_v2_fl(no1, a1*scaler); - mul_v2_fl(no2, a2*scaler); - mul_v2_fl(no3, a3*scaler); + mul_v2_fl(no1, a1 * scaler); + mul_v2_fl(no2, a2 * scaler); + mul_v2_fl(no3, a3 * scaler); add_v2_v2v2(outset_uv[0], puv[0], no1); add_v2_v2v2(outset_uv[1], puv[1], no2); add_v2_v2v2(outset_uv[2], puv[2], no3); @@ -1262,16 +1260,16 @@ static void project_face_seams_init(const ProjPaintState *ps, const int face_ind int fidx2 = 0; /* next fidx in the face (0,1,2,3) -> (1,2,3,0) or (0,1,2) -> (1,2,0) for a tri */ do { - if ((ps->faceSeamFlags[face_index] & (1<faceSeamFlags[face_index] & (1 << fidx1 | 16 << fidx1)) == 0) { if (check_seam(ps, face_index, fidx1, fidx2, &other_face, &other_fidx)) { - ps->faceSeamFlags[face_index] |= 1<faceSeamFlags[face_index] |= 1 << fidx1; if (other_face != -1) - ps->faceSeamFlags[other_face] |= 1<faceSeamFlags[other_face] |= 1 << other_fidx; } else { - ps->faceSeamFlags[face_index] |= 16<faceSeamFlags[face_index] |= 16 << fidx1; if (other_face != -1) - ps->faceSeamFlags[other_face] |= 16<faceSeamFlags[other_face] |= 16 << other_fidx; /* second 4 bits for disabled */ } } @@ -1286,11 +1284,11 @@ static void project_face_seams_init(const ProjPaintState *ps, const int face_ind * * This is used for finding a pixels location in screenspace for painting */ static void screen_px_from_ortho( - float uv[2], - float v1co[3], float v2co[3], float v3co[3], /* Screenspace coords */ - float uv1co[2], float uv2co[2], float uv3co[2], - float pixelScreenCo[4], - float w[3]) + float uv[2], + float v1co[3], float v2co[3], float v3co[3], /* Screenspace coords */ + float uv1co[2], float uv2co[2], float uv3co[2], + float pixelScreenCo[4], + float w[3]) { barycentric_weights_v2(uv1co, uv2co, uv3co, uv, w); interp_v3_v3v3v3(pixelScreenCo, v1co, v2co, v3co, w); @@ -1299,11 +1297,11 @@ static void screen_px_from_ortho( /* same as screen_px_from_ortho except we need to take into account * the perspective W coord for each vert */ static void screen_px_from_persp( - float uv[2], - float v1co[4], float v2co[4], float v3co[4], /* screenspace coords */ - float uv1co[2], float uv2co[2], float uv3co[2], - float pixelScreenCo[4], - float w[3]) + float uv[2], + float v1co[4], float v2co[4], float v3co[4], /* screenspace coords */ + float uv1co[2], float uv2co[2], float uv3co[2], + float pixelScreenCo[4], + float w[3]) { float wtot_inv, wtot; @@ -1314,7 +1312,7 @@ static void screen_px_from_persp( w[1] *= v2co[3]; w[2] *= v3co[3]; - wtot = w[0]+w[1]+w[2]; + wtot = w[0] + w[1] + w[2]; if (wtot > 0.0f) { wtot_inv = 1.0f / wtot; @@ -1323,7 +1321,7 @@ static void screen_px_from_persp( w[2] *= wtot_inv; } else { - w[0] = w[1] = w[2] = 1.0f/3.0f; /* dummy values for zero area face */ + w[0] = w[1] = w[2] = 1.0f / 3.0f; /* dummy values for zero area face */ } /* done re-weighting */ @@ -1336,7 +1334,7 @@ static void project_face_pixel(const MTFace *tf_other, ImBuf *ibuf_other, const float uv_other[2], x, y; uvCo1 = (float *)tf_other->uv[0]; - if (side==1) { + if (side == 1) { uvCo2 = (float *)tf_other->uv[2]; uvCo3 = (float *)tf_other->uv[3]; } @@ -1345,7 +1343,7 @@ static void project_face_pixel(const MTFace *tf_other, ImBuf *ibuf_other, const uvCo3 = (float *)tf_other->uv[2]; } - interp_v2_v2v2v2(uv_other, uvCo1, uvCo2, uvCo3, (float*)w); + interp_v2_v2v2v2(uv_other, uvCo1, uvCo2, uvCo3, (float *)w); /* use */ uvco_to_wrapped_pxco(uv_other, ibuf_other->x, ibuf_other->y, &x, &y); @@ -1362,10 +1360,10 @@ static void project_face_pixel(const MTFace *tf_other, ImBuf *ibuf_other, const /* run this outside project_paint_uvpixel_init since pixels with mask 0 don't need init */ static float project_paint_uvpixel_mask( - const ProjPaintState *ps, - const int face_index, - const int side, - const float w[3]) + const ProjPaintState *ps, + const int face_index, + const int side, + const float w[3]) { float mask; @@ -1384,10 +1382,10 @@ static float project_paint_uvpixel_mask( project_face_pixel(tf_other, ibuf_other, w, side, rgba_ub, rgba_f); if (ibuf_other->rect_float) { /* from float to float */ - mask = ((rgba_f[0]+rgba_f[1]+rgba_f[2])/3.0f) * rgba_f[3]; + mask = ((rgba_f[0] + rgba_f[1] + rgba_f[2]) / 3.0f) * rgba_f[3]; } else { /* from char to float */ - mask = ((rgba_ub[0]+rgba_ub[1]+rgba_ub[2])/(256*3.0f)) * (rgba_ub[3]/256.0f); + mask = ((rgba_ub[0] + rgba_ub[1] + rgba_ub[2]) / (256 * 3.0f)) * (rgba_ub[3] / 256.0f); } if (!ps->do_layer_stencil_inv) /* matching the gimps layer mask black/white rules, white==full opacity */ @@ -1411,7 +1409,7 @@ static float project_paint_uvpixel_mask( short *no1, *no2, *no3; float no[3], angle; no1 = ps->dm_mvert[mf->v1].no; - if (side==1) { + if (side == 1) { no2 = ps->dm_mvert[mf->v3].no; no3 = ps->dm_mvert[mf->v4].no; } @@ -1420,9 +1418,9 @@ static float project_paint_uvpixel_mask( no3 = ps->dm_mvert[mf->v3].no; } - no[0] = w[0]*no1[0] + w[1]*no2[0] + w[2]*no3[0]; - no[1] = w[0]*no1[1] + w[1]*no2[1] + w[2]*no3[1]; - no[2] = w[0]*no1[2] + w[1]*no2[2] + w[2]*no3[2]; + no[0] = w[0] * no1[0] + w[1] * no2[0] + w[2] * no3[0]; + no[1] = w[0] * no1[1] + w[1] * no2[1] + w[2] * no3[1]; + no[2] = w[0] * no1[2] + w[1] * no2[2] + w[2] * no3[2]; normalize_v3(no); /* now we can use the normal as a mask */ @@ -1434,7 +1432,7 @@ static float project_paint_uvpixel_mask( float viewDirPersp[3]; float *co1, *co2, *co3; co1 = ps->dm_mvert[mf->v1].co; - if (side==1) { + if (side == 1) { co2 = ps->dm_mvert[mf->v3].co; co3 = ps->dm_mvert[mf->v4].co; } @@ -1444,9 +1442,9 @@ static float project_paint_uvpixel_mask( } /* Get the direction from the viewPoint to the pixel and normalize */ - viewDirPersp[0] = (ps->viewPos[0] - (w[0]*co1[0] + w[1]*co2[0] + w[2]*co3[0])); - viewDirPersp[1] = (ps->viewPos[1] - (w[0]*co1[1] + w[1]*co2[1] + w[2]*co3[1])); - viewDirPersp[2] = (ps->viewPos[2] - (w[0]*co1[2] + w[1]*co2[2] + w[2]*co3[2])); + viewDirPersp[0] = (ps->viewPos[0] - (w[0] * co1[0] + w[1] * co2[0] + w[2] * co3[0])); + viewDirPersp[1] = (ps->viewPos[1] - (w[0] * co1[1] + w[1] * co2[1] + w[2] * co3[1])); + viewDirPersp[2] = (ps->viewPos[2] - (w[0] * co1[2] + w[1] * co2[2] + w[2] * co3[2])); normalize_v3(viewDirPersp); angle = angle_normalized_v3v3(viewDirPersp, no); @@ -1470,30 +1468,30 @@ static float project_paint_uvpixel_mask( /* run this function when we know a bucket's, face's pixel can be initialized, * return the ProjPixel which is added to 'ps->bucketRect[bucket_index]' */ static ProjPixel *project_paint_uvpixel_init( - const ProjPaintState *ps, - MemArena *arena, - const ImBuf *ibuf, - short x_px, short y_px, - const float mask, - const int face_index, - const int image_index, - const float pixelScreenCo[4], - const int side, - const float w[3]) + const ProjPaintState *ps, + MemArena *arena, + const ImBuf *ibuf, + short x_px, short y_px, + const float mask, + const int face_index, + const int image_index, + const float pixelScreenCo[4], + const int side, + const float w[3]) { ProjPixel *projPixel; short size; /* wrap pixel location */ x_px = x_px % ibuf->x; - if (x_px<0) x_px += ibuf->x; + if (x_px < 0) x_px += ibuf->x; y_px = y_px % ibuf->y; - if (y_px<0) y_px += ibuf->y; + if (y_px < 0) y_px += ibuf->y; - if (ps->tool==PAINT_TOOL_CLONE) { + if (ps->tool == PAINT_TOOL_CLONE) { size = sizeof(ProjPixelClone); } - else if (ps->tool==PAINT_TOOL_SMEAR) { + else if (ps->tool == PAINT_TOOL_SMEAR) { size = sizeof(ProjPixelClone); } else { @@ -1529,7 +1527,7 @@ static ProjPixel *project_paint_uvpixel_init( ((int)(((float)y_px / (float)ibuf->y) * PROJ_BOUNDBOX_DIV)) * PROJ_BOUNDBOX_DIV; /* done with view3d_project_float inline */ - if (ps->tool==PAINT_TOOL_CLONE) { + if (ps->tool == PAINT_TOOL_CLONE) { if (ps->dm_mtface_clone) { ImBuf *ibuf_other; Image *other_tpage = project_paint_face_image(ps, ps->dm_mtface_clone, face_index); @@ -1589,8 +1587,8 @@ static ProjPixel *project_paint_uvpixel_init( } #ifdef PROJ_DEBUG_PAINT - if (ibuf->rect_float) projPixel->pixel.f_pt[0] = 0; - else projPixel->pixel.ch_pt[0] = 0; + if (ibuf->rect_float) projPixel->pixel.f_pt[0] = 0; + else projPixel->pixel.ch_pt[0] = 0; #endif projPixel->image_index = image_index; @@ -1598,13 +1596,13 @@ static ProjPixel *project_paint_uvpixel_init( } static int line_clip_rect2f( - rctf *rect, - const float l1[2], const float l2[2], - float l1_clip[2], float l2_clip[2]) + rctf *rect, + const float l1[2], const float l2[2], + float l1_clip[2], float l2_clip[2]) { /* first account for horizontal, then vertical lines */ /* horiz */ - if (fabsf(l1[1]-l2[1]) < PROJ_GEOM_TOLERANCE) { + if (fabsf(l1[1] - l2[1]) < PROJ_GEOM_TOLERANCE) { /* is the line out of range on its Y axis? */ if (l1[1] < rect->ymin || l1[1] > rect->ymax) { return 0; @@ -1615,7 +1613,7 @@ static int line_clip_rect2f( } - if (fabsf(l1[0]-l2[0]) < PROJ_GEOM_TOLERANCE) { /* this is a single point (or close to)*/ + if (fabsf(l1[0] - l2[0]) < PROJ_GEOM_TOLERANCE) { /* this is a single point (or close to)*/ if (BLI_in_rctf(rect, l1[0], l1[1])) { copy_v2_v2(l1_clip, l1); copy_v2_v2(l2_clip, l2); @@ -1632,7 +1630,7 @@ static int line_clip_rect2f( CLAMP(l2_clip[0], rect->xmin, rect->xmax); return 1; } - else if (fabsf(l1[0]-l2[0]) < PROJ_GEOM_TOLERANCE) { + else if (fabsf(l1[0] - l2[0]) < PROJ_GEOM_TOLERANCE) { /* is the line out of range on its X axis? */ if (l1[0] < rect->xmin || l1[0] > rect->xmax) { return 0; @@ -1643,7 +1641,7 @@ static int line_clip_rect2f( return 0; } - if (fabsf(l1[1]-l2[1]) < PROJ_GEOM_TOLERANCE) { /* this is a single point (or close to)*/ + if (fabsf(l1[1] - l2[1]) < PROJ_GEOM_TOLERANCE) { /* this is a single point (or close to)*/ if (BLI_in_rctf(rect, l1[0], l1[1])) { copy_v2_v2(l1_clip, l1); copy_v2_v2(l2_clip, l2); @@ -1805,9 +1803,9 @@ static float len_squared_v2v2_alt(const float *v1, const float v2_1, const float { float x, y; - x = v1[0]-v2_1; - y = v1[1]-v2_2; - return x*x+y*y; + x = v1[0] - v2_1; + y = v1[1] - v2_2; + return x * x + y * y; } /* note, use a squared value so we can use len_squared_v2v2 @@ -1825,8 +1823,8 @@ static int project_bucket_isect_circle(const float cent[2], const float radius_s return 1; #endif - if ( (bucket_bounds->xmin <= cent[0] && bucket_bounds->xmax >= cent[0]) || - (bucket_bounds->ymin <= cent[1] && bucket_bounds->ymax >= cent[1]) ) + if ((bucket_bounds->xmin <= cent[0] && bucket_bounds->xmax >= cent[0]) || + (bucket_bounds->ymin <= cent[1] && bucket_bounds->ymax >= cent[1])) { return 1; } @@ -1868,11 +1866,11 @@ static int project_bucket_isect_circle(const float cent[2], const float radius_s * however switching back to this for ortho is always an option */ static void rect_to_uvspace_ortho( - rctf *bucket_bounds, - float *v1coSS, float *v2coSS, float *v3coSS, - float *uv1co, float *uv2co, float *uv3co, - float bucket_bounds_uv[4][2], - const int flip) + rctf *bucket_bounds, + float *v1coSS, float *v2coSS, float *v3coSS, + float *uv1co, float *uv2co, float *uv3co, + float bucket_bounds_uv[4][2], + const int flip) { float uv[2]; float w[3]; @@ -1881,32 +1879,32 @@ static void rect_to_uvspace_ortho( uv[0] = bucket_bounds->xmax; uv[1] = bucket_bounds->ymin; barycentric_weights_v2(v1coSS, v2coSS, v3coSS, uv, w); - interp_v2_v2v2v2(bucket_bounds_uv[flip?3:0], uv1co, uv2co, uv3co, w); + interp_v2_v2v2v2(bucket_bounds_uv[flip ? 3 : 0], uv1co, uv2co, uv3co, w); //uv[0] = bucket_bounds->xmax; // set above uv[1] = bucket_bounds->ymax; barycentric_weights_v2(v1coSS, v2coSS, v3coSS, uv, w); - interp_v2_v2v2v2(bucket_bounds_uv[flip?2:1], uv1co, uv2co, uv3co, w); + interp_v2_v2v2v2(bucket_bounds_uv[flip ? 2 : 1], uv1co, uv2co, uv3co, w); uv[0] = bucket_bounds->xmin; //uv[1] = bucket_bounds->ymax; // set above barycentric_weights_v2(v1coSS, v2coSS, v3coSS, uv, w); - interp_v2_v2v2v2(bucket_bounds_uv[flip?1:2], uv1co, uv2co, uv3co, w); + interp_v2_v2v2v2(bucket_bounds_uv[flip ? 1 : 2], uv1co, uv2co, uv3co, w); //uv[0] = bucket_bounds->xmin; // set above uv[1] = bucket_bounds->ymin; barycentric_weights_v2(v1coSS, v2coSS, v3coSS, uv, w); - interp_v2_v2v2v2(bucket_bounds_uv[flip?0:3], uv1co, uv2co, uv3co, w); + interp_v2_v2v2v2(bucket_bounds_uv[flip ? 0 : 3], uv1co, uv2co, uv3co, w); } /* same as above but use barycentric_weights_v2_persp */ static void rect_to_uvspace_persp( - rctf *bucket_bounds, - float *v1coSS, float *v2coSS, float *v3coSS, - float *uv1co, float *uv2co, float *uv3co, - float bucket_bounds_uv[4][2], - const int flip - ) + rctf *bucket_bounds, + float *v1coSS, float *v2coSS, float *v3coSS, + float *uv1co, float *uv2co, float *uv3co, + float bucket_bounds_uv[4][2], + const int flip + ) { float uv[2]; float w[3]; @@ -1915,22 +1913,22 @@ static void rect_to_uvspace_persp( uv[0] = bucket_bounds->xmax; uv[1] = bucket_bounds->ymin; barycentric_weights_v2_persp(v1coSS, v2coSS, v3coSS, uv, w); - interp_v2_v2v2v2(bucket_bounds_uv[flip?3:0], uv1co, uv2co, uv3co, w); + interp_v2_v2v2v2(bucket_bounds_uv[flip ? 3 : 0], uv1co, uv2co, uv3co, w); //uv[0] = bucket_bounds->xmax; // set above uv[1] = bucket_bounds->ymax; barycentric_weights_v2_persp(v1coSS, v2coSS, v3coSS, uv, w); - interp_v2_v2v2v2(bucket_bounds_uv[flip?2:1], uv1co, uv2co, uv3co, w); + interp_v2_v2v2v2(bucket_bounds_uv[flip ? 2 : 1], uv1co, uv2co, uv3co, w); uv[0] = bucket_bounds->xmin; //uv[1] = bucket_bounds->ymax; // set above barycentric_weights_v2_persp(v1coSS, v2coSS, v3coSS, uv, w); - interp_v2_v2v2v2(bucket_bounds_uv[flip?1:2], uv1co, uv2co, uv3co, w); + interp_v2_v2v2v2(bucket_bounds_uv[flip ? 1 : 2], uv1co, uv2co, uv3co, w); //uv[0] = bucket_bounds->xmin; // set above uv[1] = bucket_bounds->ymin; barycentric_weights_v2_persp(v1coSS, v2coSS, v3coSS, uv, w); - interp_v2_v2v2v2(bucket_bounds_uv[flip?0:3], uv1co, uv2co, uv3co, w); + interp_v2_v2v2v2(bucket_bounds_uv[flip ? 0 : 3], uv1co, uv2co, uv3co, w); } /* This works as we need it to but we can save a few steps and not use it */ @@ -1940,24 +1938,24 @@ static float angle_2d_clockwise(const float p1[2], const float p2[2], const floa { float v1[2], v2[2]; - v1[0] = p1[0]-p2[0]; v1[1] = p1[1]-p2[1]; - v2[0] = p3[0]-p2[0]; v2[1] = p3[1]-p2[1]; + v1[0] = p1[0] - p2[0]; v1[1] = p1[1] - p2[1]; + v2[0] = p3[0] - p2[0]; v2[1] = p3[1] - p2[1]; - return -atan2(v1[0]*v2[1] - v1[1]*v2[0], v1[0]*v2[0]+v1[1]*v2[1]); + return -atan2(v1[0] * v2[1] - v1[1] * v2[0], v1[0] * v2[0] + v1[1] * v2[1]); } #endif #define ISECT_1 (1) -#define ISECT_2 (1<<1) -#define ISECT_3 (1<<2) -#define ISECT_4 (1<<3) -#define ISECT_ALL3 ((1<<3)-1) -#define ISECT_ALL4 ((1<<4)-1) +#define ISECT_2 (1 << 1) +#define ISECT_3 (1 << 2) +#define ISECT_4 (1 << 3) +#define ISECT_ALL3 ((1 << 3) - 1) +#define ISECT_ALL4 ((1 << 4) - 1) /* limit must be a fraction over 1.0f */ static int IsectPT2Df_limit(float pt[2], float v1[2], float v2[2], float v3[2], float limit) { - return ((area_tri_v2(pt,v1,v2) + area_tri_v2(pt,v2,v3) + area_tri_v2(pt,v3,v1)) / (area_tri_v2(v1,v2,v3))) < limit; + return ((area_tri_v2(pt, v1, v2) + area_tri_v2(pt, v2, v3) + area_tri_v2(pt, v3, v1)) / (area_tri_v2(v1, v2, v3))) < limit; } /* Clip the face by a bucket and set the uv-space bucket_bounds_uv @@ -1965,21 +1963,21 @@ static int IsectPT2Df_limit(float pt[2], float v1[2], float v2[2], float v3[2], * */ static int float_z_sort_flip(const void *p1, const void *p2) { - return (((float *)p1)[2] < ((float *)p2)[2] ? 1:-1); + return (((float *)p1)[2] < ((float *)p2)[2] ? 1 : -1); } static int float_z_sort(const void *p1, const void *p2) { - return (((float *)p1)[2] < ((float *)p2)[2] ?-1:1); + return (((float *)p1)[2] < ((float *)p2)[2] ? -1 : 1); } static void project_bucket_clip_face( - const int is_ortho, - rctf *bucket_bounds, - float *v1coSS, float *v2coSS, float *v3coSS, - float *uv1co, float *uv2co, float *uv3co, - float bucket_bounds_uv[8][2], - int *tot) + const int is_ortho, + rctf *bucket_bounds, + float *v1coSS, float *v2coSS, float *v3coSS, + float *uv1co, float *uv2co, float *uv3co, + float bucket_bounds_uv[8][2], + int *tot) { int inside_bucket_flag = 0; int inside_face_flag = 0; @@ -1989,8 +1987,8 @@ static void project_bucket_clip_face( /* get the UV space bounding box */ inside_bucket_flag |= BLI_in_rctf(bucket_bounds, v1coSS[0], v1coSS[1]); - inside_bucket_flag |= BLI_in_rctf(bucket_bounds, v2coSS[0], v2coSS[1]) << 1; - inside_bucket_flag |= BLI_in_rctf(bucket_bounds, v3coSS[0], v3coSS[1]) << 2; + inside_bucket_flag |= BLI_in_rctf(bucket_bounds, v2coSS[0], v2coSS[1]) << 1; + inside_bucket_flag |= BLI_in_rctf(bucket_bounds, v3coSS[0], v3coSS[1]) << 2; if (inside_bucket_flag == ISECT_ALL3) { /* all screenspace points are inside the bucket bounding box, this means we don't need to clip and can simply return the UVs */ @@ -2013,25 +2011,25 @@ static void project_bucket_clip_face( /* use IsectPT2Df_limit here so we catch points are are touching the tri edge (or a small fraction over) */ bucket_bounds_ss[0][0] = bucket_bounds->xmax; bucket_bounds_ss[0][1] = bucket_bounds->ymin; - inside_face_flag |= (IsectPT2Df_limit(bucket_bounds_ss[0], v1coSS, v2coSS, v3coSS, 1+PROJ_GEOM_TOLERANCE) ? ISECT_1 : 0); + inside_face_flag |= (IsectPT2Df_limit(bucket_bounds_ss[0], v1coSS, v2coSS, v3coSS, 1 + PROJ_GEOM_TOLERANCE) ? ISECT_1 : 0); bucket_bounds_ss[1][0] = bucket_bounds->xmax; bucket_bounds_ss[1][1] = bucket_bounds->ymax; - inside_face_flag |= (IsectPT2Df_limit(bucket_bounds_ss[1], v1coSS, v2coSS, v3coSS, 1+PROJ_GEOM_TOLERANCE) ? ISECT_2 : 0); + inside_face_flag |= (IsectPT2Df_limit(bucket_bounds_ss[1], v1coSS, v2coSS, v3coSS, 1 + PROJ_GEOM_TOLERANCE) ? ISECT_2 : 0); bucket_bounds_ss[2][0] = bucket_bounds->xmin; bucket_bounds_ss[2][1] = bucket_bounds->ymax; - inside_face_flag |= (IsectPT2Df_limit(bucket_bounds_ss[2], v1coSS, v2coSS, v3coSS, 1+PROJ_GEOM_TOLERANCE) ? ISECT_3 : 0); + inside_face_flag |= (IsectPT2Df_limit(bucket_bounds_ss[2], v1coSS, v2coSS, v3coSS, 1 + PROJ_GEOM_TOLERANCE) ? ISECT_3 : 0); bucket_bounds_ss[3][0] = bucket_bounds->xmin; bucket_bounds_ss[3][1] = bucket_bounds->ymin; - inside_face_flag |= (IsectPT2Df_limit(bucket_bounds_ss[3], v1coSS, v2coSS, v3coSS, 1+PROJ_GEOM_TOLERANCE) ? ISECT_4 : 0); + inside_face_flag |= (IsectPT2Df_limit(bucket_bounds_ss[3], v1coSS, v2coSS, v3coSS, 1 + PROJ_GEOM_TOLERANCE) ? ISECT_4 : 0); if (inside_face_flag == ISECT_ALL4) { /* bucket is totally inside the screenspace face, we can safely use weights */ - if (is_ortho) rect_to_uvspace_ortho(bucket_bounds, v1coSS, v2coSS, v3coSS, uv1co, uv2co, uv3co, bucket_bounds_uv, flip); - else rect_to_uvspace_persp(bucket_bounds, v1coSS, v2coSS, v3coSS, uv1co, uv2co, uv3co, bucket_bounds_uv, flip); + if (is_ortho) rect_to_uvspace_ortho(bucket_bounds, v1coSS, v2coSS, v3coSS, uv1co, uv2co, uv3co, bucket_bounds_uv, flip); + else rect_to_uvspace_persp(bucket_bounds, v1coSS, v2coSS, v3coSS, uv1co, uv2co, uv3co, bucket_bounds_uv, flip); *tot = 4; return; @@ -2066,33 +2064,33 @@ static void project_bucket_clip_face( (*tot) = 0; - if (inside_face_flag & ISECT_1) { copy_v2_v2(isectVCosSS[*tot], bucket_bounds_ss[0]); (*tot)++; } - if (inside_face_flag & ISECT_2) { copy_v2_v2(isectVCosSS[*tot], bucket_bounds_ss[1]); (*tot)++; } - if (inside_face_flag & ISECT_3) { copy_v2_v2(isectVCosSS[*tot], bucket_bounds_ss[2]); (*tot)++; } - if (inside_face_flag & ISECT_4) { copy_v2_v2(isectVCosSS[*tot], bucket_bounds_ss[3]); (*tot)++; } + if (inside_face_flag & ISECT_1) { copy_v2_v2(isectVCosSS[*tot], bucket_bounds_ss[0]); (*tot)++; } + if (inside_face_flag & ISECT_2) { copy_v2_v2(isectVCosSS[*tot], bucket_bounds_ss[1]); (*tot)++; } + if (inside_face_flag & ISECT_3) { copy_v2_v2(isectVCosSS[*tot], bucket_bounds_ss[2]); (*tot)++; } + if (inside_face_flag & ISECT_4) { copy_v2_v2(isectVCosSS[*tot], bucket_bounds_ss[3]); (*tot)++; } + + if (inside_bucket_flag & ISECT_1) { copy_v2_v2(isectVCosSS[*tot], v1coSS); (*tot)++; } + if (inside_bucket_flag & ISECT_2) { copy_v2_v2(isectVCosSS[*tot], v2coSS); (*tot)++; } + if (inside_bucket_flag & ISECT_3) { copy_v2_v2(isectVCosSS[*tot], v3coSS); (*tot)++; } - if (inside_bucket_flag & ISECT_1) { copy_v2_v2(isectVCosSS[*tot], v1coSS); (*tot)++; } - if (inside_bucket_flag & ISECT_2) { copy_v2_v2(isectVCosSS[*tot], v2coSS); (*tot)++; } - if (inside_bucket_flag & ISECT_3) { copy_v2_v2(isectVCosSS[*tot], v3coSS); (*tot)++; } - - if ((inside_bucket_flag & (ISECT_1|ISECT_2)) != (ISECT_1|ISECT_2)) { + if ((inside_bucket_flag & (ISECT_1 | ISECT_2)) != (ISECT_1 | ISECT_2)) { if (line_clip_rect2f(bucket_bounds, v1coSS, v2coSS, v1_clipSS, v2_clipSS)) { - if ((inside_bucket_flag & ISECT_1)==0) { copy_v2_v2(isectVCosSS[*tot], v1_clipSS); (*tot)++; } - if ((inside_bucket_flag & ISECT_2)==0) { copy_v2_v2(isectVCosSS[*tot], v2_clipSS); (*tot)++; } + if ((inside_bucket_flag & ISECT_1) == 0) { copy_v2_v2(isectVCosSS[*tot], v1_clipSS); (*tot)++; } + if ((inside_bucket_flag & ISECT_2) == 0) { copy_v2_v2(isectVCosSS[*tot], v2_clipSS); (*tot)++; } } } - if ((inside_bucket_flag & (ISECT_2|ISECT_3)) != (ISECT_2|ISECT_3)) { + if ((inside_bucket_flag & (ISECT_2 | ISECT_3)) != (ISECT_2 | ISECT_3)) { if (line_clip_rect2f(bucket_bounds, v2coSS, v3coSS, v1_clipSS, v2_clipSS)) { - if ((inside_bucket_flag & ISECT_2)==0) { copy_v2_v2(isectVCosSS[*tot], v1_clipSS); (*tot)++; } - if ((inside_bucket_flag & ISECT_3)==0) { copy_v2_v2(isectVCosSS[*tot], v2_clipSS); (*tot)++; } + if ((inside_bucket_flag & ISECT_2) == 0) { copy_v2_v2(isectVCosSS[*tot], v1_clipSS); (*tot)++; } + if ((inside_bucket_flag & ISECT_3) == 0) { copy_v2_v2(isectVCosSS[*tot], v2_clipSS); (*tot)++; } } } - if ((inside_bucket_flag & (ISECT_3|ISECT_1)) != (ISECT_3|ISECT_1)) { + if ((inside_bucket_flag & (ISECT_3 | ISECT_1)) != (ISECT_3 | ISECT_1)) { if (line_clip_rect2f(bucket_bounds, v3coSS, v1coSS, v1_clipSS, v2_clipSS)) { - if ((inside_bucket_flag & ISECT_3)==0) { copy_v2_v2(isectVCosSS[*tot], v1_clipSS); (*tot)++; } - if ((inside_bucket_flag & ISECT_1)==0) { copy_v2_v2(isectVCosSS[*tot], v2_clipSS); (*tot)++; } + if ((inside_bucket_flag & ISECT_3) == 0) { copy_v2_v2(isectVCosSS[*tot], v1_clipSS); (*tot)++; } + if ((inside_bucket_flag & ISECT_1) == 0) { copy_v2_v2(isectVCosSS[*tot], v2_clipSS); (*tot)++; } } } @@ -2104,7 +2102,7 @@ static void project_bucket_clip_face( /* now we have all points we need, collect their angles and sort them clockwise */ - for (i=0; i<(*tot); i++) { + for (i = 0; i < (*tot); i++) { cent[0] += isectVCosSS[i][0]; cent[1] += isectVCosSS[i][1]; } @@ -2116,8 +2114,8 @@ static void project_bucket_clip_face( /* Collect angles for every point around the center point */ -#if 0 /* uses a few more cycles then the above loop */ - for (i=0; i<(*tot); i++) { +#if 0 /* uses a few more cycles then the above loop */ + for (i = 0; i < (*tot); i++) { isectVCosSS[i][2] = angle_2d_clockwise(up, cent, isectVCosSS[i]); } #endif @@ -2125,18 +2123,18 @@ static void project_bucket_clip_face( v1_clipSS[0] = cent[0]; /* Abuse this var for the loop below */ v1_clipSS[1] = cent[1] + 1.0f; - for (i=0; i<(*tot); i++) { + for (i = 0; i < (*tot); i++) { v2_clipSS[0] = isectVCosSS[i][0] - cent[0]; v2_clipSS[1] = isectVCosSS[i][1] - cent[1]; - isectVCosSS[i][2] = atan2f(v1_clipSS[0]*v2_clipSS[1] - v1_clipSS[1]*v2_clipSS[0], v1_clipSS[0]*v2_clipSS[0]+v1_clipSS[1]*v2_clipSS[1]); + isectVCosSS[i][2] = atan2f(v1_clipSS[0] * v2_clipSS[1] - v1_clipSS[1] * v2_clipSS[0], v1_clipSS[0] * v2_clipSS[0] + v1_clipSS[1] * v2_clipSS[1]); } - if (flip) qsort(isectVCosSS, *tot, sizeof(float)*3, float_z_sort_flip); - else qsort(isectVCosSS, *tot, sizeof(float)*3, float_z_sort); + if (flip) qsort(isectVCosSS, *tot, sizeof(float) * 3, float_z_sort_flip); + else qsort(isectVCosSS, *tot, sizeof(float) * 3, float_z_sort); /* remove doubles */ /* first/last check */ - if (fabsf(isectVCosSS[0][0]-isectVCosSS[(*tot)-1][0]) < PROJ_GEOM_TOLERANCE && fabsf(isectVCosSS[0][1]-isectVCosSS[(*tot)-1][1]) < PROJ_GEOM_TOLERANCE) { + if (fabsf(isectVCosSS[0][0] - isectVCosSS[(*tot) - 1][0]) < PROJ_GEOM_TOLERANCE && fabsf(isectVCosSS[0][1] - isectVCosSS[(*tot) - 1][1]) < PROJ_GEOM_TOLERANCE) { (*tot)--; } @@ -2148,16 +2146,16 @@ static void project_bucket_clip_face( } doubles = TRUE; - while (doubles==TRUE) { + while (doubles == TRUE) { doubles = FALSE; - for (i=1; i<(*tot); i++) { - if (fabsf(isectVCosSS[i-1][0]-isectVCosSS[i][0]) < PROJ_GEOM_TOLERANCE && - fabsf(isectVCosSS[i-1][1]-isectVCosSS[i][1]) < PROJ_GEOM_TOLERANCE) + for (i = 1; i < (*tot); i++) { + if (fabsf(isectVCosSS[i - 1][0] - isectVCosSS[i][0]) < PROJ_GEOM_TOLERANCE && + fabsf(isectVCosSS[i - 1][1] - isectVCosSS[i][1]) < PROJ_GEOM_TOLERANCE) { int j; - for (j=i+1; j<(*tot); j++) { - isectVCosSS[j-1][0] = isectVCosSS[j][0]; - isectVCosSS[j-1][1] = isectVCosSS[j][1]; + for (j = i + 1; j < (*tot); j++) { + isectVCosSS[j - 1][0] = isectVCosSS[j][0]; + isectVCosSS[j - 1][1] = isectVCosSS[j][1]; } doubles = TRUE; /* keep looking for more doubles */ (*tot)--; @@ -2174,13 +2172,13 @@ static void project_bucket_clip_face( if (is_ortho) { - for (i=0; i<(*tot); i++) { + for (i = 0; i < (*tot); i++) { barycentric_weights_v2(v1coSS, v2coSS, v3coSS, isectVCosSS[i], w); interp_v2_v2v2v2(bucket_bounds_uv[i], uv1co, uv2co, uv3co, w); } } else { - for (i=0; i<(*tot); i++) { + for (i = 0; i < (*tot); i++) { barycentric_weights_v2_persp(v1coSS, v2coSS, v3coSS, isectVCosSS[i], w); interp_v2_v2v2v2(bucket_bounds_uv[i], uv1co, uv2co, uv3co, w); } @@ -2194,14 +2192,14 @@ static void project_bucket_clip_face( /* If there are ever any problems, */ float test_uv[4][2]; int i; - if (is_ortho) rect_to_uvspace_ortho(bucket_bounds, v1coSS, v2coSS, v3coSS, uv1co, uv2co, uv3co, test_uv, flip); - else rect_to_uvspace_persp(bucket_bounds, v1coSS, v2coSS, v3coSS, uv1co, uv2co, uv3co, test_uv, flip); + if (is_ortho) rect_to_uvspace_ortho(bucket_bounds, v1coSS, v2coSS, v3coSS, uv1co, uv2co, uv3co, test_uv, flip); + else rect_to_uvspace_persp(bucket_bounds, v1coSS, v2coSS, v3coSS, uv1co, uv2co, uv3co, test_uv, flip); printf("( [(%f,%f), (%f,%f), (%f,%f), (%f,%f)], ", test_uv[0][0], test_uv[0][1], test_uv[1][0], test_uv[1][1], test_uv[2][0], test_uv[2][1], test_uv[3][0], test_uv[3][1]); printf(" [(%f,%f), (%f,%f), (%f,%f)], ", uv1co[0], uv1co[1], uv2co[0], uv2co[1], uv3co[0], uv3co[1]); printf("["); - for (i=0; i < (*tot); i++) { + for (i = 0; i < (*tot); i++) { printf("(%f, %f),", bucket_bounds_uv[i][0], bucket_bounds_uv[i][1]); } printf("]),\\\n"); @@ -2269,11 +2267,11 @@ static void project_bucket_clip_face( static int IsectPoly2Df(const float pt[2], float uv[][2], const int tot) { int i; - if (line_point_side_v2(uv[tot-1], uv[0], pt) < 0.0f) + if (line_point_side_v2(uv[tot - 1], uv[0], pt) < 0.0f) return 0; - for (i=1; i 0.0f); + int side = (line_point_side_v2(uv[tot - 1], uv[0], pt) > 0.0f); - for (i=1; i 0.0f) != side) + for (i = 1; i < tot; i++) { + if ((line_point_side_v2(uv[i - 1], uv[i], pt) > 0.0f) != side) return 0; } @@ -2308,7 +2306,7 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i /* UV/pixel seeking data */ int x; /* Image X-Pixel */ - int y;/* Image Y-Pixel */ + int y; /* Image Y-Pixel */ float mask; float uv[2]; /* Image floating point UV - same as x, y but from 0.0-1.0 */ @@ -2337,7 +2335,7 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i int uv_clip_tot; const short is_ortho = ps->is_ortho; const short do_backfacecull = ps->do_backfacecull; - const short do_clip= ps->rv3d ? ps->rv3d->rflag & RV3D_CLIPPING : 0; + const short do_clip = ps->rv3d ? ps->rv3d->rflag & RV3D_CLIPPING : 0; vCo[0] = ps->dm_mvert[mf->v1].co; vCo[1] = ps->dm_mvert[mf->v2].co; @@ -2347,8 +2345,8 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i /* Use tf_uv_pxoffset instead of tf->uv so we can offset the UV half a pixel * this is done so we can avoid offseting all the pixels by 0.5 which causes * problems when wrapping negative coords */ - xhalfpx = (0.5f+ (PROJ_GEOM_TOLERANCE/3.0f) ) / ibuf_xf; - yhalfpx = (0.5f+ (PROJ_GEOM_TOLERANCE/4.0f) ) / ibuf_yf; + xhalfpx = (0.5f + (PROJ_GEOM_TOLERANCE / 3.0f) ) / ibuf_xf; + yhalfpx = (0.5f + (PROJ_GEOM_TOLERANCE / 4.0f) ) / ibuf_yf; /* Note about (PROJ_GEOM_TOLERANCE/x) above... * Needed to add this offset since UV coords are often quads aligned to pixels. @@ -2371,7 +2369,7 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i tf_uv_pxoffset[2][1] = tf->uv[2][1] - yhalfpx; if (mf->v4) { - vCo[3] = ps->dm_mvert[ mf->v4 ].co; + vCo[3] = ps->dm_mvert[mf->v4].co; tf_uv_pxoffset[3][0] = tf->uv[3][0] - xhalfpx; tf_uv_pxoffset[3][1] = tf->uv[3][1] - yhalfpx; @@ -2382,32 +2380,32 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i } do { - if (side==1) { - i1=0; i2=2; i3=3; + if (side == 1) { + i1 = 0; i2 = 2; i3 = 3; } else { - i1=0; i2=1; i3=2; + i1 = 0; i2 = 1; i3 = 2; } uv1co = tf_uv_pxoffset[i1]; // was tf->uv[i1]; uv2co = tf_uv_pxoffset[i2]; // was tf->uv[i2]; uv3co = tf_uv_pxoffset[i3]; // was tf->uv[i3]; - v1coSS = ps->screenCoords[ (*(&mf->v1 + i1)) ]; - v2coSS = ps->screenCoords[ (*(&mf->v1 + i2)) ]; - v3coSS = ps->screenCoords[ (*(&mf->v1 + i3)) ]; + v1coSS = ps->screenCoords[(*(&mf->v1 + i1))]; + v2coSS = ps->screenCoords[(*(&mf->v1 + i2))]; + v3coSS = ps->screenCoords[(*(&mf->v1 + i3))]; /* This funtion gives is a concave polyline in UV space from the clipped quad and tri*/ project_bucket_clip_face( - is_ortho, bucket_bounds, - v1coSS, v2coSS, v3coSS, - uv1co, uv2co, uv3co, - uv_clip, &uv_clip_tot - ); + is_ortho, bucket_bounds, + v1coSS, v2coSS, v3coSS, + uv1co, uv2co, uv3co, + uv_clip, &uv_clip_tot + ); /* sometimes this happens, better just allow for 8 intersectiosn even though there should be max 6 */ #if 0 - if (uv_clip_tot>6) { + if (uv_clip_tot > 6) { printf("this should never happen! %d\n", uv_clip_tot); } #endif @@ -2438,17 +2436,18 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i /* Note about IsectPoly2Df_twoside, checking the face or uv flipping doesnt work, * could check the poly direction but better to do this */ - if ( (do_backfacecull && IsectPoly2Df(uv, uv_clip, uv_clip_tot)) || - (do_backfacecull==0 && IsectPoly2Df_twoside(uv, uv_clip, uv_clip_tot))) { + if ((do_backfacecull && IsectPoly2Df(uv, uv_clip, uv_clip_tot)) || + (do_backfacecull == 0 && IsectPoly2Df_twoside(uv, uv_clip, uv_clip_tot))) + { has_x_isect = has_isect = 1; - if (is_ortho) screen_px_from_ortho(uv, v1coSS, v2coSS, v3coSS, uv1co, uv2co, uv3co, pixelScreenCo, w); - else screen_px_from_persp(uv, v1coSS, v2coSS, v3coSS, uv1co, uv2co, uv3co, pixelScreenCo, w); + if (is_ortho) screen_px_from_ortho(uv, v1coSS, v2coSS, v3coSS, uv1co, uv2co, uv3co, pixelScreenCo, w); + else screen_px_from_persp(uv, v1coSS, v2coSS, v3coSS, uv1co, uv2co, uv3co, pixelScreenCo, w); /* a pity we need to get the worldspace pixel location here */ if (do_clip) { - interp_v3_v3v3v3(wco, ps->dm_mvert[ (*(&mf->v1 + i1)) ].co, ps->dm_mvert[ (*(&mf->v1 + i2)) ].co, ps->dm_mvert[ (*(&mf->v1 + i3)) ].co, w); + interp_v3_v3v3v3(wco, ps->dm_mvert[(*(&mf->v1 + i1))].co, ps->dm_mvert[(*(&mf->v1 + i2))].co, ps->dm_mvert[(*(&mf->v1 + i3))].co, w); if (ED_view3d_clipping_test(ps->rv3d, wco, TRUE)) { continue; /* Watch out that no code below this needs to run */ } @@ -2457,16 +2456,16 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i /* Is this UV visible from the view? - raytrace */ /* project_paint_PickFace is less complex, use for testing */ //if (project_paint_PickFace(ps, pixelScreenCo, w, &side) == face_index) { - if (ps->do_occlude==0 || !project_bucket_point_occluded(ps, bucketFaceNodes, face_index, pixelScreenCo)) { + if (ps->do_occlude == 0 || !project_bucket_point_occluded(ps, bucketFaceNodes, face_index, pixelScreenCo)) { mask = project_paint_uvpixel_mask(ps, face_index, side, w); if (mask > 0.0f) { BLI_linklist_prepend_arena( - bucketPixelNodes, - project_paint_uvpixel_init(ps, arena, ibuf, x, y, mask, face_index, image_index, pixelScreenCo, side, w), - arena - ); + bucketPixelNodes, + project_paint_uvpixel_init(ps, arena, ibuf, x, y, mask, face_index, image_index, pixelScreenCo, side, w), + arena + ); } } @@ -2480,9 +2479,9 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i } -#if 0 /* TODO - investigate why this dosnt work sometimes! it should! */ +#if 0 /* TODO - investigate why this dosnt work sometimes! it should! */ /* no intersection for this entire row, after some intersection above means we can quit now */ - if (has_x_isect==0 && has_isect) { + if (has_x_isect == 0 && has_isect) { break; } #endif @@ -2497,25 +2496,25 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i int face_seam_flag; if (ps->thread_tot > 1) - BLI_lock_thread(LOCK_CUSTOM1); /* Other threads could be modifying these vars */ + BLI_lock_thread(LOCK_CUSTOM1); /* Other threads could be modifying these vars */ face_seam_flag = ps->faceSeamFlags[face_index]; /* are any of our edges un-initialized? */ - if ((face_seam_flag & (PROJ_FACE_SEAM1|PROJ_FACE_NOSEAM1))==0 || - (face_seam_flag & (PROJ_FACE_SEAM2|PROJ_FACE_NOSEAM2))==0 || - (face_seam_flag & (PROJ_FACE_SEAM3|PROJ_FACE_NOSEAM3))==0 || - (face_seam_flag & (PROJ_FACE_SEAM4|PROJ_FACE_NOSEAM4))==0 - ) { + if ((face_seam_flag & (PROJ_FACE_SEAM1 | PROJ_FACE_NOSEAM1)) == 0 || + (face_seam_flag & (PROJ_FACE_SEAM2 | PROJ_FACE_NOSEAM2)) == 0 || + (face_seam_flag & (PROJ_FACE_SEAM3 | PROJ_FACE_NOSEAM3)) == 0 || + (face_seam_flag & (PROJ_FACE_SEAM4 | PROJ_FACE_NOSEAM4)) == 0) + { project_face_seams_init(ps, face_index, mf->v4); face_seam_flag = ps->faceSeamFlags[face_index]; //printf("seams - %d %d %d %d\n", flag&PROJ_FACE_SEAM1, flag&PROJ_FACE_SEAM2, flag&PROJ_FACE_SEAM3, flag&PROJ_FACE_SEAM4); } - if ((face_seam_flag & (PROJ_FACE_SEAM1|PROJ_FACE_SEAM2|PROJ_FACE_SEAM3|PROJ_FACE_SEAM4))==0) { + if ((face_seam_flag & (PROJ_FACE_SEAM1 | PROJ_FACE_SEAM2 | PROJ_FACE_SEAM3 | PROJ_FACE_SEAM4)) == 0) { if (ps->thread_tot > 1) - BLI_unlock_thread(LOCK_CUSTOM1); /* Other threads could be modifying these vars */ + BLI_unlock_thread(LOCK_CUSTOM1); /* Other threads could be modifying these vars */ } else { @@ -2536,45 +2535,45 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i float fac1, fac2, ftot; - if (outset_uv[0][0]==FLT_MAX) /* first time initialize */ + if (outset_uv[0][0] == FLT_MAX) /* first time initialize */ uv_image_outset(tf_uv_pxoffset, outset_uv, ps->seam_bleed_px, ibuf->x, ibuf->y, mf->v4); /* ps->faceSeamUVs cant be modified when threading, now this is done we can unlock */ if (ps->thread_tot > 1) - BLI_unlock_thread(LOCK_CUSTOM1); /* Other threads could be modifying these vars */ + BLI_unlock_thread(LOCK_CUSTOM1); /* Other threads could be modifying these vars */ vCoSS[0] = ps->screenCoords[mf->v1]; vCoSS[1] = ps->screenCoords[mf->v2]; vCoSS[2] = ps->screenCoords[mf->v3]; if (mf->v4) - vCoSS[3] = ps->screenCoords[ mf->v4 ]; + vCoSS[3] = ps->screenCoords[mf->v4]; /* PROJ_FACE_SCALE_SEAM must be slightly less then 1.0f */ if (is_ortho) { - if (mf->v4) scale_quad(insetCos, vCoSS, PROJ_FACE_SCALE_SEAM); - else scale_tri(insetCos, vCoSS, PROJ_FACE_SCALE_SEAM); + if (mf->v4) scale_quad(insetCos, vCoSS, PROJ_FACE_SCALE_SEAM); + else scale_tri(insetCos, vCoSS, PROJ_FACE_SCALE_SEAM); } else { - if (mf->v4) scale_quad(insetCos, vCo, PROJ_FACE_SCALE_SEAM); - else scale_tri(insetCos, vCo, PROJ_FACE_SCALE_SEAM); + if (mf->v4) scale_quad(insetCos, vCo, PROJ_FACE_SCALE_SEAM); + else scale_tri(insetCos, vCo, PROJ_FACE_SCALE_SEAM); } side = 0; /* for triangles this wont need to change */ for (fidx1 = 0; fidx1 < (mf->v4 ? 4 : 3); fidx1++) { - if (mf->v4) fidx2 = (fidx1==3) ? 0 : fidx1+1; /* next fidx in the face (0,1,2,3) -> (1,2,3,0) */ - else fidx2 = (fidx1==2) ? 0 : fidx1+1; /* next fidx in the face (0,1,2) -> (1,2,0) */ + if (mf->v4) fidx2 = (fidx1 == 3) ? 0 : fidx1 + 1; /* next fidx in the face (0,1,2,3) -> (1,2,3,0) */ + else fidx2 = (fidx1 == 2) ? 0 : fidx1 + 1; /* next fidx in the face (0,1,2) -> (1,2,0) */ - if ( (face_seam_flag & (1< PROJ_FACE_SEAM# */ - line_clip_rect2f(bucket_bounds, vCoSS[fidx1], vCoSS[fidx2], bucket_clip_edges[0], bucket_clip_edges[1]) - ) { + if ((face_seam_flag & (1 << fidx1)) && /* 1< PROJ_FACE_SEAM# */ + line_clip_rect2f(bucket_bounds, vCoSS[fidx1], vCoSS[fidx2], bucket_clip_edges[0], bucket_clip_edges[1])) + { ftot = len_v2v2(vCoSS[fidx1], vCoSS[fidx2]); /* screenspace edge length */ if (ftot > 0.0f) { /* avoid div by zero */ if (mf->v4) { - if (fidx1==2 || fidx2==2) side= 1; - else side= 0; + if (fidx1 == 2 || fidx2 == 2) side = 1; + else side = 0; } fac1 = len_v2v2(vCoSS[fidx1], bucket_clip_edges[0]) / ftot; @@ -2613,36 +2612,36 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i * is not relevant, since we are outside the face, Use VecLerpf to find * our location on the side of the face's UV */ #if 0 - if (is_ortho) screen_px_from_ortho(ps, uv, v1co, v2co, v3co, uv1co, uv2co, uv3co, pixelScreenCo); - else screen_px_from_persp(ps, uv, v1co, v2co, v3co, uv1co, uv2co, uv3co, pixelScreenCo); + if (is_ortho) screen_px_from_ortho(ps, uv, v1co, v2co, v3co, uv1co, uv2co, uv3co, pixelScreenCo); + else screen_px_from_persp(ps, uv, v1co, v2co, v3co, uv1co, uv2co, uv3co, pixelScreenCo); #endif /* Since this is a seam we need to work out where on the line this pixel is */ //fac = line_point_factor_v2(uv, uv_seam_quad[0], uv_seam_quad[1]); fac = line_point_factor_v2(uv, seam_subsection[0], seam_subsection[1]); - if (fac < 0.0f) { copy_v3_v3(pixelScreenCo, edge_verts_inset_clip[0]); } - else if (fac > 1.0f) { copy_v3_v3(pixelScreenCo, edge_verts_inset_clip[1]); } - else { interp_v3_v3v3(pixelScreenCo, edge_verts_inset_clip[0], edge_verts_inset_clip[1], fac); } + if (fac < 0.0f) { copy_v3_v3(pixelScreenCo, edge_verts_inset_clip[0]); } + else if (fac > 1.0f) { copy_v3_v3(pixelScreenCo, edge_verts_inset_clip[1]); } + else { interp_v3_v3v3(pixelScreenCo, edge_verts_inset_clip[0], edge_verts_inset_clip[1], fac); } if (!is_ortho) { pixelScreenCo[3] = 1.0f; mul_m4_v4((float(*)[4])ps->projectMat, pixelScreenCo); /* cast because of const */ - pixelScreenCo[0] = (float)(ps->winx/2.0f)+(ps->winx/2.0f)*pixelScreenCo[0]/pixelScreenCo[3]; - pixelScreenCo[1] = (float)(ps->winy/2.0f)+(ps->winy/2.0f)*pixelScreenCo[1]/pixelScreenCo[3]; - pixelScreenCo[2] = pixelScreenCo[2]/pixelScreenCo[3]; /* Use the depth for bucket point occlusion */ + pixelScreenCo[0] = (float)(ps->winx / 2.0f) + (ps->winx / 2.0f) * pixelScreenCo[0] / pixelScreenCo[3]; + pixelScreenCo[1] = (float)(ps->winy / 2.0f) + (ps->winy / 2.0f) * pixelScreenCo[1] / pixelScreenCo[3]; + pixelScreenCo[2] = pixelScreenCo[2] / pixelScreenCo[3]; /* Use the depth for bucket point occlusion */ } - if (ps->do_occlude==0 || !project_bucket_point_occluded(ps, bucketFaceNodes, face_index, pixelScreenCo)) { + if (ps->do_occlude == 0 || !project_bucket_point_occluded(ps, bucketFaceNodes, face_index, pixelScreenCo)) { /* Only bother calculating the weights if we intersect */ if (ps->do_mask_normal || ps->dm_mtface_clone) { #if 1 /* get the UV on the line since we want to copy the pixels from there for bleeding */ float uv_close[2]; - float fac= closest_to_line_v2(uv_close, uv, tf_uv_pxoffset[fidx1], tf_uv_pxoffset[fidx2]); - if (fac < 0.0f) copy_v2_v2(uv_close, tf_uv_pxoffset[fidx1]); - else if (fac > 1.0f) copy_v2_v2(uv_close, tf_uv_pxoffset[fidx2]); + float fac = closest_to_line_v2(uv_close, uv, tf_uv_pxoffset[fidx1], tf_uv_pxoffset[fidx2]); + if (fac < 0.0f) copy_v2_v2(uv_close, tf_uv_pxoffset[fidx1]); + else if (fac > 1.0f) copy_v2_v2(uv_close, tf_uv_pxoffset[fidx2]); if (side) { barycentric_weights_v2(tf_uv_pxoffset[0], tf_uv_pxoffset[2], tf_uv_pxoffset[3], uv_close, w); @@ -2653,15 +2652,15 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i #else /* this is buggy with quads, don't use for now */ /* Cheat, we know where we are along the edge so work out the weights from that */ - fac = fac1 + (fac * (fac2-fac1)); + fac = fac1 + (fac * (fac2 - fac1)); - w[0]=w[1]=w[2]= 0.0; + w[0] = w[1] = w[2] = 0.0; if (side) { - w[fidx1?fidx1-1:0] = 1.0f-fac; - w[fidx2?fidx2-1:0] = fac; + w[fidx1 ? fidx1 - 1 : 0] = 1.0f - fac; + w[fidx2 ? fidx2 - 1 : 0] = fac; } else { - w[fidx1] = 1.0f-fac; + w[fidx1] = 1.0f - fac; w[fidx2] = fac; } #endif @@ -2669,8 +2668,8 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i /* a pity we need to get the worldspace pixel location here */ if (do_clip) { - if (side) interp_v3_v3v3v3(wco, ps->dm_mvert[mf->v1].co, ps->dm_mvert[mf->v3].co, ps->dm_mvert[mf->v4].co, w); - else interp_v3_v3v3v3(wco, ps->dm_mvert[mf->v1].co, ps->dm_mvert[mf->v2].co, ps->dm_mvert[mf->v3].co, w); + if (side) interp_v3_v3v3v3(wco, ps->dm_mvert[mf->v1].co, ps->dm_mvert[mf->v3].co, ps->dm_mvert[mf->v4].co, w); + else interp_v3_v3v3v3(wco, ps->dm_mvert[mf->v1].co, ps->dm_mvert[mf->v2].co, ps->dm_mvert[mf->v3].co, w); if (ED_view3d_clipping_test(ps->rv3d, wco, TRUE)) { continue; /* Watch out that no code below this needs to run */ @@ -2681,10 +2680,10 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i if (mask > 0.0f) { BLI_linklist_prepend_arena( - bucketPixelNodes, - project_paint_uvpixel_init(ps, arena, ibuf, x, y, mask, face_index, image_index, pixelScreenCo, side, w), - arena - ); + bucketPixelNodes, + project_paint_uvpixel_init(ps, arena, ibuf, x, y, mask, face_index, image_index, pixelScreenCo, side, w), + arena + ); } } @@ -2695,9 +2694,9 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i } } -#if 0 /* TODO - investigate why this dosnt work sometimes! it should! */ +#if 0 /* TODO - investigate why this dosnt work sometimes! it should! */ /* no intersection for this entire row, after some intersection above means we can quit now */ - if (has_x_isect==0 && has_isect) { + if (has_x_isect == 0 && has_isect) { break; } #endif @@ -2734,11 +2733,11 @@ static void project_paint_bucket_bounds(const ProjPaintState *ps, const float mi /* set bucket_bounds to a screen space-aligned floating point bound-box */ static void project_bucket_bounds(const ProjPaintState *ps, const int bucket_x, const int bucket_y, rctf *bucket_bounds) { - bucket_bounds->xmin = ps->screenMin[0]+((bucket_x)*(ps->screen_width / ps->buckets_x)); /* left */ - bucket_bounds->xmax = ps->screenMin[0]+((bucket_x+1)*(ps->screen_width / ps->buckets_x)); /* right */ + bucket_bounds->xmin = ps->screenMin[0] + ((bucket_x) * (ps->screen_width / ps->buckets_x)); /* left */ + bucket_bounds->xmax = ps->screenMin[0] + ((bucket_x + 1) * (ps->screen_width / ps->buckets_x)); /* right */ - bucket_bounds->ymin = ps->screenMin[1]+((bucket_y)*(ps->screen_height / ps->buckets_y)); /* bottom */ - bucket_bounds->ymax = ps->screenMin[1]+((bucket_y+1)*(ps->screen_height / ps->buckets_y)); /* top */ + bucket_bounds->ymin = ps->screenMin[1] + ((bucket_y) * (ps->screen_height / ps->buckets_y)); /* bottom */ + bucket_bounds->ymax = ps->screenMin[1] + ((bucket_y + 1) * (ps->screen_height / ps->buckets_y)); /* top */ } /* Fill this bucket with pixels from the faces that intersect it. @@ -2747,24 +2746,24 @@ static void project_bucket_bounds(const ProjPaintState *ps, const int bucket_x, static void project_bucket_init(const ProjPaintState *ps, const int thread_index, const int bucket_index, rctf *bucket_bounds) { LinkNode *node; - int face_index, image_index=0; + int face_index, image_index = 0; ImBuf *ibuf = NULL; Image *tpage_last = NULL, *tpage; Image *ima = NULL; - if (ps->image_tot==1) { + if (ps->image_tot == 1) { /* Simple loop, no context switching */ ibuf = ps->projImages[0].ibuf; ima = ps->projImages[0].ima; - for (node = ps->bucketFaces[bucket_index]; node; node= node->next) { + for (node = ps->bucketFaces[bucket_index]; node; node = node->next) { project_paint_face_init(ps, thread_index, bucket_index, GET_INT_FROM_POINTER(node->link), 0, bucket_bounds, ibuf, ima->tpageflag & IMA_CLAMP_U, ima->tpageflag & IMA_CLAMP_V); } } else { /* More complicated loop, switch between images */ - for (node = ps->bucketFaces[bucket_index]; node; node= node->next) { + for (node = ps->bucketFaces[bucket_index]; node; node = node->next) { face_index = GET_INT_FROM_POINTER(node->link); /* Image context switching */ @@ -2772,7 +2771,7 @@ static void project_bucket_init(const ProjPaintState *ps, const int thread_index if (tpage_last != tpage) { tpage_last = tpage; - for (image_index=0; image_index < ps->image_tot; image_index++) { + for (image_index = 0; image_index < ps->image_tot; image_index++) { if (ps->projImages[image_index].ima == tpage_last) { ibuf = ps->projImages[image_index].ibuf; ima = ps->projImages[image_index].ima; @@ -2801,16 +2800,16 @@ static int project_bucket_face_isect(ProjPaintState *ps, int bucket_x, int bucke /* TODO - replace this with a tricker method that uses sideofline for all screenCoords's edges against the closest bucket corner */ rctf bucket_bounds; float p1[2], p2[2], p3[2], p4[2]; - float *v, *v1,*v2,*v3,*v4=NULL; + float *v, *v1, *v2, *v3, *v4 = NULL; int fidx; project_bucket_bounds(ps, bucket_x, bucket_y, &bucket_bounds); /* Is one of the faces verts in the bucket bounds? */ - fidx = mf->v4 ? 3:2; + fidx = mf->v4 ? 3 : 2; do { - v = ps->screenCoords[ (*(&mf->v1 + fidx)) ]; + v = ps->screenCoords[(*(&mf->v1 + fidx))]; if (BLI_in_rctf(&bucket_bounds, v[0], v[1])) { return 1; } @@ -2824,36 +2823,36 @@ static int project_bucket_face_isect(ProjPaintState *ps, int bucket_x, int bucke } p1[0] = bucket_bounds.xmin; p1[1] = bucket_bounds.ymin; - p2[0] = bucket_bounds.xmin; p2[1] = bucket_bounds.ymax; - p3[0] = bucket_bounds.xmax; p3[1] = bucket_bounds.ymax; - p4[0] = bucket_bounds.xmax; p4[1] = bucket_bounds.ymin; + p2[0] = bucket_bounds.xmin; p2[1] = bucket_bounds.ymax; + p3[0] = bucket_bounds.xmax; p3[1] = bucket_bounds.ymax; + p4[0] = bucket_bounds.xmax; p4[1] = bucket_bounds.ymin; if (mf->v4) { - if ( isect_point_quad_v2(p1, v1, v2, v3, v4) || - isect_point_quad_v2(p2, v1, v2, v3, v4) || - isect_point_quad_v2(p3, v1, v2, v3, v4) || - isect_point_quad_v2(p4, v1, v2, v3, v4) || - - /* we can avoid testing v3,v1 because another intersection MUST exist if this intersects */ - (isect_line_line_v2(p1, p2, v1, v2) || isect_line_line_v2(p1, p2, v2, v3) || isect_line_line_v2(p1, p2, v3, v4)) || - (isect_line_line_v2(p2, p3, v1, v2) || isect_line_line_v2(p2, p3, v2, v3) || isect_line_line_v2(p2, p3, v3, v4)) || - (isect_line_line_v2(p3, p4, v1, v2) || isect_line_line_v2(p3, p4, v2, v3) || isect_line_line_v2(p3, p4, v3, v4)) || - (isect_line_line_v2(p4, p1, v1, v2) || isect_line_line_v2(p4, p1, v2, v3) || isect_line_line_v2(p4, p1, v3, v4)) - ) { + if (isect_point_quad_v2(p1, v1, v2, v3, v4) || + isect_point_quad_v2(p2, v1, v2, v3, v4) || + isect_point_quad_v2(p3, v1, v2, v3, v4) || + isect_point_quad_v2(p4, v1, v2, v3, v4) || + + /* we can avoid testing v3,v1 because another intersection MUST exist if this intersects */ + (isect_line_line_v2(p1, p2, v1, v2) || isect_line_line_v2(p1, p2, v2, v3) || isect_line_line_v2(p1, p2, v3, v4)) || + (isect_line_line_v2(p2, p3, v1, v2) || isect_line_line_v2(p2, p3, v2, v3) || isect_line_line_v2(p2, p3, v3, v4)) || + (isect_line_line_v2(p3, p4, v1, v2) || isect_line_line_v2(p3, p4, v2, v3) || isect_line_line_v2(p3, p4, v3, v4)) || + (isect_line_line_v2(p4, p1, v1, v2) || isect_line_line_v2(p4, p1, v2, v3) || isect_line_line_v2(p4, p1, v3, v4))) + { return 1; } } else { - if ( isect_point_tri_v2(p1, v1, v2, v3) || - isect_point_tri_v2(p2, v1, v2, v3) || - isect_point_tri_v2(p3, v1, v2, v3) || - isect_point_tri_v2(p4, v1, v2, v3) || - /* we can avoid testing v3,v1 because another intersection MUST exist if this intersects */ - (isect_line_line_v2(p1, p2, v1, v2) || isect_line_line_v2(p1, p2, v2, v3)) || - (isect_line_line_v2(p2, p3, v1, v2) || isect_line_line_v2(p2, p3, v2, v3)) || - (isect_line_line_v2(p3, p4, v1, v2) || isect_line_line_v2(p3, p4, v2, v3)) || - (isect_line_line_v2(p4, p1, v1, v2) || isect_line_line_v2(p4, p1, v2, v3)) - ) { + if (isect_point_tri_v2(p1, v1, v2, v3) || + isect_point_tri_v2(p2, v1, v2, v3) || + isect_point_tri_v2(p3, v1, v2, v3) || + isect_point_tri_v2(p4, v1, v2, v3) || + /* we can avoid testing v3,v1 because another intersection MUST exist if this intersects */ + (isect_line_line_v2(p1, p2, v1, v2) || isect_line_line_v2(p1, p2, v2, v3)) || + (isect_line_line_v2(p2, p3, v1, v2) || isect_line_line_v2(p2, p3, v2, v3)) || + (isect_line_line_v2(p3, p4, v1, v2) || isect_line_line_v2(p3, p4, v2, v3)) || + (isect_line_line_v2(p4, p1, v1, v2) || isect_line_line_v2(p4, p1, v2, v3))) + { return 1; } } @@ -2873,9 +2872,9 @@ static void project_paint_delayed_face_init(ProjPaintState *ps, const MFace *mf, INIT_MINMAX2(min, max); - fidx = mf->v4 ? 3:2; + fidx = mf->v4 ? 3 : 2; do { - vCoSS = ps->screenCoords[ *(&mf->v1 + fidx) ]; + vCoSS = ps->screenCoords[*(&mf->v1 + fidx)]; DO_MINMAX2(vCoSS, min, max); } while (fidx--); @@ -2885,12 +2884,12 @@ static void project_paint_delayed_face_init(ProjPaintState *ps, const MFace *mf, has_x_isect = 0; for (bucket_x = bucketMin[0]; bucket_x < bucketMax[0]; bucket_x++) { if (project_bucket_face_isect(ps, bucket_x, bucket_y, mf)) { - int bucket_index= bucket_x + (bucket_y * ps->buckets_x); + int bucket_index = bucket_x + (bucket_y * ps->buckets_x); BLI_linklist_prepend_arena( - &ps->bucketFaces[ bucket_index ], - SET_INT_IN_POINTER(face_index), /* cast to a pointer to shut up the compiler */ - arena - ); + &ps->bucketFaces[bucket_index], + SET_INT_IN_POINTER(face_index), /* cast to a pointer to shut up the compiler */ + arena + ); has_x_isect = has_isect = 1; } @@ -2901,7 +2900,7 @@ static void project_paint_delayed_face_init(ProjPaintState *ps, const MFace *mf, } /* no intersection for this entire row, after some intersection above means we can quit now */ - if (has_x_isect==0 && has_isect) { + if (has_x_isect == 0 && has_isect) { break; } } @@ -2918,7 +2917,7 @@ static void project_paint_delayed_face_init(ProjPaintState *ps, const MFace *mf, static int project_paint_view_clip(View3D *v3d, RegionView3D *rv3d, float *clipsta, float *clipend) { - int orth= ED_view3d_clip_range_get(v3d, rv3d, clipsta, clipend); + int orth = ED_view3d_clip_range_get(v3d, rv3d, clipsta, clipend); if (orth) { /* only needed for ortho */ float fac = 2.0f / ((*clipend) - (*clipsta)); @@ -2957,31 +2956,31 @@ static void project_paint_begin(ProjPaintState *ps) MemArena *arena; /* at the moment this is just ps->arena_mt[0], but use this to show were not multithreading */ - const int diameter= 2*brush_size(ps->scene, ps->brush); + const int diameter = 2 * brush_size(ps->scene, ps->brush); /* ---- end defines ---- */ - if (ps->source==PROJ_SRC_VIEW) - ED_view3d_clipping_local(ps->rv3d, ps->ob->obmat); /* faster clipping lookups */ + if (ps->source == PROJ_SRC_VIEW) + ED_view3d_clipping_local(ps->rv3d, ps->ob->obmat); /* faster clipping lookups */ /* paint onto the derived mesh */ /* Workaround for subsurf selection, try the display mesh first */ - if (ps->source==PROJ_SRC_IMAGE_CAM) { + if (ps->source == PROJ_SRC_IMAGE_CAM) { /* using render mesh, assume only camera was rendered from */ ps->dm = mesh_create_derived_render(ps->scene, ps->ob, ps->scene->customdata_mask | CD_MASK_MTFACE); - ps->dm_release= TRUE; + ps->dm_release = TRUE; } - else if (ps->ob->derivedFinal && CustomData_has_layer( &ps->ob->derivedFinal->faceData, CD_MTFACE)) { + else if (ps->ob->derivedFinal && CustomData_has_layer(&ps->ob->derivedFinal->faceData, CD_MTFACE)) { ps->dm = ps->ob->derivedFinal; - ps->dm_release= FALSE; + ps->dm_release = FALSE; } else { ps->dm = mesh_get_derived_final(ps->scene, ps->ob, ps->scene->customdata_mask | CD_MASK_MTFACE); - ps->dm_release= TRUE; + ps->dm_release = TRUE; } - if ( !CustomData_has_layer( &ps->dm->faceData, CD_MTFACE) ) { + if (!CustomData_has_layer(&ps->dm->faceData, CD_MTFACE) ) { if (ps->dm_release) ps->dm->release(ps->dm); @@ -2992,7 +2991,7 @@ static void project_paint_begin(ProjPaintState *ps) ps->dm_mvert = ps->dm->getVertArray(ps->dm); ps->dm_mface = ps->dm->getTessFaceArray(ps->dm); - ps->dm_mtface= ps->dm->getTessFaceDataArray(ps->dm, CD_MTFACE); + ps->dm_mtface = ps->dm->getTessFaceDataArray(ps->dm, CD_MTFACE); ps->dm_totvert = ps->dm->getNumVerts(ps->dm); ps->dm_totface = ps->dm->getNumTessFaces(ps->dm); @@ -3001,16 +3000,16 @@ static void project_paint_begin(ProjPaintState *ps) /* Note, use the original mesh for getting the clone and mask layer index - * this avoids re-generating the derived mesh just to get the new index */ + * this avoids re-generating the derived mesh just to get the new index */ if (ps->do_layer_clone) { //int layer_num = CustomData_get_clone_layer(&ps->dm->faceData, CD_MTFACE); int layer_num = CustomData_get_clone_layer(&((Mesh *)ps->ob->data)->fdata, CD_MTFACE); if (layer_num != -1) ps->dm_mtface_clone = CustomData_get_layer_n(&ps->dm->faceData, CD_MTFACE, layer_num); - if (ps->dm_mtface_clone==NULL || ps->dm_mtface_clone==ps->dm_mtface) { + if (ps->dm_mtface_clone == NULL || ps->dm_mtface_clone == ps->dm_mtface) { ps->do_layer_clone = 0; - ps->dm_mtface_clone= NULL; + ps->dm_mtface_clone = NULL; printf("ACK!\n"); } } @@ -3021,7 +3020,7 @@ static void project_paint_begin(ProjPaintState *ps) if (layer_num != -1) ps->dm_mtface_stencil = CustomData_get_layer_n(&ps->dm->faceData, CD_MTFACE, layer_num); - if (ps->dm_mtface_stencil==NULL || ps->dm_mtface_stencil==ps->dm_mtface) { + if (ps->dm_mtface_stencil == NULL || ps->dm_mtface_stencil == ps->dm_mtface) { ps->do_layer_stencil = 0; ps->dm_mtface_stencil = NULL; } @@ -3029,13 +3028,13 @@ static void project_paint_begin(ProjPaintState *ps) /* when using subsurf or multires, mface arrays are thrown away, we need to keep a copy */ if (ps->dm->type != DM_TYPE_CDDM) { - ps->dm_mvert= MEM_dupallocN(ps->dm_mvert); - ps->dm_mface= MEM_dupallocN(ps->dm_mface); + ps->dm_mvert = MEM_dupallocN(ps->dm_mvert); + ps->dm_mface = MEM_dupallocN(ps->dm_mface); /* looks like these are ok for now.*/ #if 0 - ps->dm_mtface= MEM_dupallocN(ps->dm_mtface); - ps->dm_mtface_clone= MEM_dupallocN(ps->dm_mtface_clone); - ps->dm_mtface_stencil= MEM_dupallocN(ps->dm_mtface_stencil); + ps->dm_mtface = MEM_dupallocN(ps->dm_mtface); + ps->dm_mtface_clone = MEM_dupallocN(ps->dm_mtface_clone); + ps->dm_mtface_stencil = MEM_dupallocN(ps->dm_mtface_stencil); #endif } @@ -3049,44 +3048,44 @@ static void project_paint_begin(ProjPaintState *ps) invert_m4_m4(ps->ob->imat, ps->ob->obmat); - if (ps->source==PROJ_SRC_VIEW) { + if (ps->source == PROJ_SRC_VIEW) { /* normal drawing */ - ps->winx= ps->ar->winx; - ps->winy= ps->ar->winy; + ps->winx = ps->ar->winx; + ps->winy = ps->ar->winy; copy_m4_m4(viewmat, ps->rv3d->viewmat); copy_m4_m4(viewinv, ps->rv3d->viewinv); ED_view3d_ob_project_mat_get(ps->rv3d, ps->ob, ps->projectMat); - ps->is_ortho= project_paint_view_clip(ps->v3d, ps->rv3d, &ps->clipsta, &ps->clipend); + ps->is_ortho = project_paint_view_clip(ps->v3d, ps->rv3d, &ps->clipsta, &ps->clipend); } else { /* re-projection */ float winmat[4][4]; float vmat[4][4]; - ps->winx= ps->reproject_ibuf->x; - ps->winy= ps->reproject_ibuf->y; + ps->winx = ps->reproject_ibuf->x; + ps->winy = ps->reproject_ibuf->y; - if (ps->source==PROJ_SRC_IMAGE_VIEW) { + if (ps->source == PROJ_SRC_IMAGE_VIEW) { /* image stores camera data, tricky */ - IDProperty *idgroup= IDP_GetProperties(&ps->reproject_image->id, 0); - IDProperty *view_data= IDP_GetPropertyFromGroup(idgroup, PROJ_VIEW_DATA_ID); + IDProperty *idgroup = IDP_GetProperties(&ps->reproject_image->id, 0); + IDProperty *view_data = IDP_GetPropertyFromGroup(idgroup, PROJ_VIEW_DATA_ID); - float *array= (float *)IDP_Array(view_data); + float *array = (float *)IDP_Array(view_data); /* use image array, written when creating image */ - memcpy(winmat, array, sizeof(winmat)); array += sizeof(winmat)/sizeof(float); - memcpy(viewmat, array, sizeof(viewmat)); array += sizeof(viewmat)/sizeof(float); - ps->clipsta= array[0]; - ps->clipend= array[1]; - ps->is_ortho= array[2] ? 1:0; + memcpy(winmat, array, sizeof(winmat)); array += sizeof(winmat) / sizeof(float); + memcpy(viewmat, array, sizeof(viewmat)); array += sizeof(viewmat) / sizeof(float); + ps->clipsta = array[0]; + ps->clipend = array[1]; + ps->is_ortho = array[2] ? 1 : 0; invert_m4_m4(viewinv, viewmat); } - else if (ps->source==PROJ_SRC_IMAGE_CAM) { - Object *cam_ob= ps->scene->camera; + else if (ps->source == PROJ_SRC_IMAGE_CAM) { + Object *cam_ob = ps->scene->camera; CameraParams params; /* viewmat & viewinv */ @@ -3101,9 +3100,9 @@ static void project_paint_begin(ProjPaintState *ps) camera_params_compute_matrix(¶ms); copy_m4_m4(winmat, params.winmat); - ps->clipsta= params.clipsta; - ps->clipend= params.clipend; - ps->is_ortho= params.is_ortho; + ps->clipsta = params.clipsta; + ps->clipend = params.clipend; + ps->is_ortho = params.is_ortho; } /* same as view3d_get_object_project_mat */ @@ -3132,20 +3131,20 @@ static void project_paint_begin(ProjPaintState *ps) INIT_MINMAX2(ps->screenMin, ps->screenMax); ps->screenCoords = MEM_mallocN(sizeof(float) * ps->dm_totvert * 4, "ProjectPaint ScreenVerts"); - projScreenCo= *ps->screenCoords; + projScreenCo = *ps->screenCoords; if (ps->is_ortho) { - for (a=0, mv=ps->dm_mvert; a < ps->dm_totvert; a++, mv++, projScreenCo+=4) { + for (a = 0, mv = ps->dm_mvert; a < ps->dm_totvert; a++, mv++, projScreenCo += 4) { mul_v3_m4v3(projScreenCo, ps->projectMat, mv->co); /* screen space, not clamped */ - projScreenCo[0] = (float)(ps->winx/2.0f)+(ps->winx/2.0f)*projScreenCo[0]; - projScreenCo[1] = (float)(ps->winy/2.0f)+(ps->winy/2.0f)*projScreenCo[1]; + projScreenCo[0] = (float)(ps->winx / 2.0f) + (ps->winx / 2.0f) * projScreenCo[0]; + projScreenCo[1] = (float)(ps->winy / 2.0f) + (ps->winy / 2.0f) * projScreenCo[1]; DO_MINMAX2(projScreenCo, ps->screenMin, ps->screenMax); } } else { - for (a=0, mv=ps->dm_mvert; a < ps->dm_totvert; a++, mv++, projScreenCo+=4) { + for (a = 0, mv = ps->dm_mvert; a < ps->dm_totvert; a++, mv++, projScreenCo += 4) { copy_v3_v3(projScreenCo, mv->co); projScreenCo[3] = 1.0f; @@ -3153,9 +3152,9 @@ static void project_paint_begin(ProjPaintState *ps) if (projScreenCo[3] > ps->clipsta) { /* screen space, not clamped */ - projScreenCo[0] = (float)(ps->winx/2.0f)+(ps->winx/2.0f)*projScreenCo[0]/projScreenCo[3]; - projScreenCo[1] = (float)(ps->winy/2.0f)+(ps->winy/2.0f)*projScreenCo[1]/projScreenCo[3]; - projScreenCo[2] = projScreenCo[2]/projScreenCo[3]; /* Use the depth for bucket point occlusion */ + projScreenCo[0] = (float)(ps->winx / 2.0f) + (ps->winx / 2.0f) * projScreenCo[0] / projScreenCo[3]; + projScreenCo[1] = (float)(ps->winy / 2.0f) + (ps->winy / 2.0f) * projScreenCo[1] / projScreenCo[3]; + projScreenCo[2] = projScreenCo[2] / projScreenCo[3]; /* Use the depth for bucket point occlusion */ DO_MINMAX2(projScreenCo, ps->screenMin, ps->screenMax); } else { @@ -3178,7 +3177,7 @@ static void project_paint_begin(ProjPaintState *ps) ps->screenMax[1] += projMargin; ps->screenMin[1] -= projMargin; - if (ps->source==PROJ_SRC_VIEW) { + if (ps->source == PROJ_SRC_VIEW) { #ifdef PROJ_DEBUG_WINCLIP CLAMP(ps->screenMin[0], (float)(-diameter), (float)(ps->winx + diameter)); CLAMP(ps->screenMax[0], (float)(-diameter), (float)(ps->winx + diameter)); @@ -3188,11 +3187,11 @@ static void project_paint_begin(ProjPaintState *ps) #endif } else { /* re-projection, use bounds */ - ps->screenMin[0]= 0; - ps->screenMax[0]= (float)(ps->winx); + ps->screenMin[0] = 0; + ps->screenMax[0] = (float)(ps->winx); - ps->screenMin[1]= 0; - ps->screenMax[1]= (float)(ps->winy); + ps->screenMin[1] = 0; + ps->screenMax[1] = (float)(ps->winy); } /* only for convenience */ @@ -3210,14 +3209,14 @@ static void project_paint_begin(ProjPaintState *ps) CLAMP(ps->buckets_y, PROJ_BUCKET_RECT_MIN, PROJ_BUCKET_RECT_MAX); ps->bucketRect = (LinkNode **)MEM_callocN(sizeof(LinkNode *) * ps->buckets_x * ps->buckets_y, "paint-bucketRect"); - ps->bucketFaces= (LinkNode **)MEM_callocN(sizeof(LinkNode *) * ps->buckets_x * ps->buckets_y, "paint-bucketFaces"); + ps->bucketFaces = (LinkNode **)MEM_callocN(sizeof(LinkNode *) * ps->buckets_x * ps->buckets_y, "paint-bucketFaces"); - ps->bucketFlags= (unsigned char *)MEM_callocN(sizeof(char) * ps->buckets_x * ps->buckets_y, "paint-bucketFaces"); + ps->bucketFlags = (unsigned char *)MEM_callocN(sizeof(char) * ps->buckets_x * ps->buckets_y, "paint-bucketFaces"); #ifndef PROJ_DEBUG_NOSEAMBLEED if (ps->seam_bleed_px > 0.0f) { - ps->vertFaces= (LinkNode **)MEM_callocN(sizeof(LinkNode *) * ps->dm_totvert, "paint-vertFaces"); + ps->vertFaces = (LinkNode **)MEM_callocN(sizeof(LinkNode *) * ps->dm_totvert, "paint-vertFaces"); ps->faceSeamFlags = (char *)MEM_callocN(sizeof(char) * ps->dm_totface, "paint-faceSeamFlags"); - ps->faceSeamUVs= MEM_mallocN(sizeof(float) * ps->dm_totface * 8, "paint-faceSeamUVs"); + ps->faceSeamUVs = MEM_mallocN(sizeof(float) * ps->dm_totface * 8, "paint-faceSeamUVs"); } #endif @@ -3233,8 +3232,8 @@ static void project_paint_begin(ProjPaintState *ps) else { ps->thread_tot = BLI_system_thread_count(); } - for (a=0; athread_tot; a++) { - ps->arena_mt[a] = BLI_memarena_new(1<<16, "project paint arena"); + for (a = 0; a < ps->thread_tot; a++) { + ps->arena_mt[a] = BLI_memarena_new(1 << 16, "project paint arena"); } arena = ps->arena_mt[0]; @@ -3244,7 +3243,7 @@ static void project_paint_begin(ProjPaintState *ps) ps->vertFlags = MEM_callocN(sizeof(char) * ps->dm_totvert, "paint-vertFlags"); - for (a=0, mv=ps->dm_mvert; a < ps->dm_totvert; a++, mv++) { + for (a = 0, mv = ps->dm_mvert; a < ps->dm_totvert; a++, mv++) { normal_short_to_float_v3(no, mv->no); if (ps->is_ortho) { @@ -3280,9 +3279,9 @@ static void project_paint_begin(ProjPaintState *ps) tpage = project_paint_face_image(ps, ps->dm_mtface, face_index); - if (tpage && ((((Mesh *)ps->ob->data)->editflag & ME_EDIT_PAINT_MASK)==0 || mf->flag & ME_FACE_SEL)) { + if (tpage && ((((Mesh *)ps->ob->data)->editflag & ME_EDIT_PAINT_MASK) == 0 || mf->flag & ME_FACE_SEL)) { - float *v1coSS, *v2coSS, *v3coSS, *v4coSS=NULL; + float *v1coSS, *v2coSS, *v3coSS, *v4coSS = NULL; v1coSS = ps->screenCoords[mf->v1]; v2coSS = ps->screenCoords[mf->v2]; @@ -3293,11 +3292,11 @@ static void project_paint_begin(ProjPaintState *ps) if (!ps->is_ortho) { - if ( v1coSS[0]==FLT_MAX || - v2coSS[0]==FLT_MAX || - v3coSS[0]==FLT_MAX || - (mf->v4 && v4coSS[0]==FLT_MAX) - ) { + if (v1coSS[0] == FLT_MAX || + v2coSS[0] == FLT_MAX || + v3coSS[0] == FLT_MAX || + (mf->v4 && v4coSS[0] == FLT_MAX)) + { continue; } } @@ -3305,26 +3304,27 @@ static void project_paint_begin(ProjPaintState *ps) #ifdef PROJ_DEBUG_WINCLIP /* ignore faces outside the view */ if ( - (v1coSS[0] < ps->screenMin[0] && - v2coSS[0] < ps->screenMin[0] && - v3coSS[0] < ps->screenMin[0] && - (mf->v4 && v4coSS[0] < ps->screenMin[0])) || - - (v1coSS[0] > ps->screenMax[0] && - v2coSS[0] > ps->screenMax[0] && - v3coSS[0] > ps->screenMax[0] && - (mf->v4 && v4coSS[0] > ps->screenMax[0])) || - - (v1coSS[1] < ps->screenMin[1] && - v2coSS[1] < ps->screenMin[1] && - v3coSS[1] < ps->screenMin[1] && - (mf->v4 && v4coSS[1] < ps->screenMin[1])) || - - (v1coSS[1] > ps->screenMax[1] && - v2coSS[1] > ps->screenMax[1] && - v3coSS[1] > ps->screenMax[1] && - (mf->v4 && v4coSS[1] > ps->screenMax[1])) - ) { + (v1coSS[0] < ps->screenMin[0] && + v2coSS[0] < ps->screenMin[0] && + v3coSS[0] < ps->screenMin[0] && + (mf->v4 && v4coSS[0] < ps->screenMin[0])) || + + (v1coSS[0] > ps->screenMax[0] && + v2coSS[0] > ps->screenMax[0] && + v3coSS[0] > ps->screenMax[0] && + (mf->v4 && v4coSS[0] > ps->screenMax[0])) || + + (v1coSS[1] < ps->screenMin[1] && + v2coSS[1] < ps->screenMin[1] && + v3coSS[1] < ps->screenMin[1] && + (mf->v4 && v4coSS[1] < ps->screenMin[1])) || + + (v1coSS[1] > ps->screenMax[1] && + v2coSS[1] > ps->screenMax[1] && + v3coSS[1] > ps->screenMax[1] && + (mf->v4 && v4coSS[1] > ps->screenMax[1])) + ) + { continue; } @@ -3336,12 +3336,12 @@ static void project_paint_begin(ProjPaintState *ps) /* Since we are interpolating the normals of faces, we want to make * sure all the verts are pointing away from the view, * not just the face */ - if ( (ps->vertFlags[mf->v1] & PROJ_VERT_CULL) && - (ps->vertFlags[mf->v2] & PROJ_VERT_CULL) && - (ps->vertFlags[mf->v3] & PROJ_VERT_CULL) && - (mf->v4==0 || ps->vertFlags[mf->v4] & PROJ_VERT_CULL) - - ) { + if ((ps->vertFlags[mf->v1] & PROJ_VERT_CULL) && + (ps->vertFlags[mf->v2] & PROJ_VERT_CULL) && + (ps->vertFlags[mf->v3] & PROJ_VERT_CULL) && + (mf->v4 == 0 || ps->vertFlags[mf->v4] & PROJ_VERT_CULL) + ) + { continue; } } @@ -3357,7 +3357,7 @@ static void project_paint_begin(ProjPaintState *ps) image_index = BLI_linklist_index(image_LinkList, tpage); - if (image_index==-1 && BKE_image_get_ibuf(tpage, NULL)) { /* MemArena dosnt have an append func */ + if (image_index == -1 && BKE_image_get_ibuf(tpage, NULL)) { /* MemArena dosnt have an append func */ BLI_linklist_append(&image_LinkList, tpage); image_index = ps->image_tot; ps->image_tot++; @@ -3377,7 +3377,7 @@ static void project_paint_begin(ProjPaintState *ps) /* build an array of images we use*/ projIma = ps->projImages = (ProjPaintImage *)BLI_memarena_alloc(arena, sizeof(ProjPaintImage) * ps->image_tot); - for (node= image_LinkList, i=0; node; node= node->next, i++, projIma++) { + for (node = image_LinkList, i = 0; node; node = node->next, i++, projIma++) { projIma->ima = node->link; projIma->touch = 0; projIma->ibuf = BKE_image_get_ibuf(projIma->ima, NULL); @@ -3399,8 +3399,8 @@ static void project_paint_begin_clone(ProjPaintState *ps, int mouse[2]) projCo[3] = 1.0f; mul_m4_v4(ps->projectMat, projCo); - ps->cloneOffset[0] = mouse[0] - ((float)(ps->winx/2.0f)+(ps->winx/2.0f)*projCo[0]/projCo[3]); - ps->cloneOffset[1] = mouse[1] - ((float)(ps->winy/2.0f)+(ps->winy/2.0f)*projCo[1]/projCo[3]); + ps->cloneOffset[0] = mouse[0] - ((float)(ps->winx / 2.0f) + (ps->winx / 2.0f) * projCo[0] / projCo[3]); + ps->cloneOffset[1] = mouse[1] - ((float)(ps->winy / 2.0f) + (ps->winy / 2.0f) * projCo[1] / projCo[3]); } } @@ -3426,9 +3426,9 @@ static void project_paint_end(ProjPaintState *ps) /* context */ ProjPaintImage *last_projIma; int last_image_index = -1; - int last_tile_width=0; + int last_tile_width = 0; - for (a=0, last_projIma=ps->projImages; a < ps->image_tot; a++, last_projIma++) { + for (a = 0, last_projIma = ps->projImages; a < ps->image_tot; a++, last_projIma++) { int size = sizeof(void **) * IMAPAINT_TILE_NUMBER(last_projIma->ibuf->x) * IMAPAINT_TILE_NUMBER(last_projIma->ibuf->y); last_projIma->undoRect = (void **) BLI_memarena_alloc(arena, size); memset(last_projIma->undoRect, 0, size); @@ -3437,28 +3437,28 @@ static void project_paint_end(ProjPaintState *ps) for (bucket_index = 0; bucket_index < bucket_tot; bucket_index++) { /* loop through all pixels */ - for (pixel_node= ps->bucketRect[bucket_index]; pixel_node; pixel_node= pixel_node->next) { + for (pixel_node = ps->bucketRect[bucket_index]; pixel_node; pixel_node = pixel_node->next) { /* ok we have a pixel, was it modified? */ projPixel = (ProjPixel *)pixel_node->link; if (last_image_index != projPixel->image_index) { /* set the context */ - last_image_index = projPixel->image_index; - last_projIma = ps->projImages + last_image_index; - last_tile_width = IMAPAINT_TILE_NUMBER(last_projIma->ibuf->x); - is_float = last_projIma->ibuf->rect_float ? 1 : 0; + last_image_index = projPixel->image_index; + last_projIma = ps->projImages + last_image_index; + last_tile_width = IMAPAINT_TILE_NUMBER(last_projIma->ibuf->x); + is_float = last_projIma->ibuf->rect_float ? 1 : 0; } - if ( (is_float == 0 && projPixel->origColor.uint != *projPixel->pixel.uint_pt) || - - (is_float == 1 && - ( projPixel->origColor.f[0] != projPixel->pixel.f_pt[0] || - projPixel->origColor.f[1] != projPixel->pixel.f_pt[1] || - projPixel->origColor.f[2] != projPixel->pixel.f_pt[2] || - projPixel->origColor.f[3] != projPixel->pixel.f_pt[3] )) - ) { + if ((is_float == 0 && projPixel->origColor.uint != *projPixel->pixel.uint_pt) || + (is_float == 1 && + (projPixel->origColor.f[0] != projPixel->pixel.f_pt[0] || + projPixel->origColor.f[1] != projPixel->pixel.f_pt[1] || + projPixel->origColor.f[2] != projPixel->pixel.f_pt[2] || + projPixel->origColor.f[3] != projPixel->pixel.f_pt[3])) + ) + { x_tile = projPixel->x_px >> IMAPAINT_TILE_BITS; y_tile = projPixel->y_px >> IMAPAINT_TILE_BITS; @@ -3468,9 +3468,9 @@ static void project_paint_end(ProjPaintState *ps) tile_index = x_tile + y_tile * last_tile_width; - if (last_projIma->undoRect[tile_index]==NULL) { + if (last_projIma->undoRect[tile_index] == NULL) { /* add the undo tile from the modified image, then write the original colors back into it */ - tilerect = last_projIma->undoRect[tile_index] = image_undo_push_tile(last_projIma->ima, last_projIma->ibuf, is_float ? (&tmpibuf_float):(&tmpibuf) , x_tile, y_tile); + tilerect = last_projIma->undoRect[tile_index] = image_undo_push_tile(last_projIma->ima, last_projIma->ibuf, is_float ? (&tmpibuf_float) : (&tmpibuf), x_tile, y_tile); } else { tilerect = last_projIma->undoRect[tile_index]; @@ -3484,14 +3484,14 @@ static void project_paint_end(ProjPaintState *ps) copy_v4_v4(rgba_fp, projPixel->origColor.f); } else { - ((unsigned int *)tilerect)[ (projPixel->x_px - x_round) + (projPixel->y_px - y_round) * IMAPAINT_TILE_SIZE ] = projPixel->origColor.uint; + ((unsigned int *)tilerect)[(projPixel->x_px - x_round) + (projPixel->y_px - y_round) * IMAPAINT_TILE_SIZE] = projPixel->origColor.uint; } } } } - if (tmpibuf) IMB_freeImBuf(tmpibuf); - if (tmpibuf_float) IMB_freeImBuf(tmpibuf_float); + if (tmpibuf) IMB_freeImBuf(tmpibuf); + if (tmpibuf_float) IMB_freeImBuf(tmpibuf_float); } /* done calculating undo data */ @@ -3510,7 +3510,7 @@ static void project_paint_end(ProjPaintState *ps) if (ps->vertFlags) MEM_freeN(ps->vertFlags); - for (a=0; athread_tot; a++) { + for (a = 0; a < ps->thread_tot; a++) { BLI_memarena_free(ps->arena_mt[a]); } @@ -3550,7 +3550,7 @@ static void partial_redraw_array_init(ImagePaintPartialRedraw *pr) static int partial_redraw_array_merge(ImagePaintPartialRedraw *pr, ImagePaintPartialRedraw *pr_other, int tot) { - int touch= 0; + int touch = 0; while (tot--) { pr->x1 = MIN2(pr->x1, pr_other->x1); pr->y1 = MIN2(pr->y1, pr_other->y1); @@ -3572,14 +3572,14 @@ static int project_image_refresh_tagged(ProjPaintState *ps) { ImagePaintPartialRedraw *pr; ProjPaintImage *projIma; - int a,i; + int a, i; int redraw = 0; - for (a=0, projIma=ps->projImages; a < ps->image_tot; a++, projIma++) { + for (a = 0, projIma = ps->projImages; a < ps->image_tot; a++, projIma++) { if (projIma->touch) { /* look over each bound cell */ - for (i=0; ipartRedrawRect[i]); if (pr->x2 != -1) { /* TODO - use 'enabled' ? */ imapaintpartial = *pr; @@ -3598,7 +3598,7 @@ static int project_image_refresh_tagged(ProjPaintState *ps) /* run this per painting onto each mouse location */ static int project_bucket_iter_init(ProjPaintState *ps, const float mval_f[2]) { - if (ps->source==PROJ_SRC_VIEW) { + if (ps->source == PROJ_SRC_VIEW) { float min_brush[2], max_brush[2]; const float radius = (float)brush_size(ps->scene, ps->brush); @@ -3615,7 +3615,7 @@ static int project_bucket_iter_init(ProjPaintState *ps, const float mval_f[2]) project_paint_bucket_bounds(ps, min_brush, max_brush, ps->bucketMin, ps->bucketMax); /* mouse outside the model areas? */ - if (ps->bucketMin[0]==ps->bucketMax[0] || ps->bucketMin[1]==ps->bucketMax[1]) { + if (ps->bucketMin[0] == ps->bucketMax[0] || ps->bucketMin[1] == ps->bucketMax[1]) { return 0; } @@ -3623,11 +3623,11 @@ static int project_bucket_iter_init(ProjPaintState *ps, const float mval_f[2]) ps->context_bucket_y = ps->bucketMin[1]; } else { /* reproject: PROJ_SRC_* */ - ps->bucketMin[0]= 0; - ps->bucketMin[1]= 0; + ps->bucketMin[0] = 0; + ps->bucketMin[1] = 0; - ps->bucketMax[0]= ps->buckets_x; - ps->bucketMax[1]= ps->buckets_y; + ps->bucketMax[0] = ps->buckets_x; + ps->bucketMax[1] = ps->buckets_y; ps->context_bucket_x = 0; ps->context_bucket_y = 0; @@ -3638,22 +3638,22 @@ static int project_bucket_iter_init(ProjPaintState *ps, const float mval_f[2]) static int project_bucket_iter_next(ProjPaintState *ps, int *bucket_index, rctf *bucket_bounds, const float mval[2]) { - const int diameter= 2*brush_size(ps->scene, ps->brush); + const int diameter = 2 * brush_size(ps->scene, ps->brush); if (ps->thread_tot > 1) BLI_lock_thread(LOCK_CUSTOM1); //printf("%d %d \n", ps->context_bucket_x, ps->context_bucket_y); - for ( ; ps->context_bucket_y < ps->bucketMax[1]; ps->context_bucket_y++) { - for ( ; ps->context_bucket_x < ps->bucketMax[0]; ps->context_bucket_x++) { + for (; ps->context_bucket_y < ps->bucketMax[1]; ps->context_bucket_y++) { + for (; ps->context_bucket_x < ps->bucketMax[0]; ps->context_bucket_x++) { /* use bucket_bounds for project_bucket_isect_circle and project_bucket_init*/ project_bucket_bounds(ps, ps->context_bucket_x, ps->context_bucket_y, bucket_bounds); - if ( (ps->source != PROJ_SRC_VIEW) || - project_bucket_isect_circle(mval, (float)(diameter*diameter), bucket_bounds) - ) { + if ((ps->source != PROJ_SRC_VIEW) || + project_bucket_isect_circle(mval, (float)(diameter * diameter), bucket_bounds)) + { *bucket_index = ps->context_bucket_x + (ps->context_bucket_y * ps->buckets_x); ps->context_bucket_x++; @@ -3679,7 +3679,7 @@ typedef struct ProjectHandle { float mval[2]; /* annoying but we need to have image bounds per thread, then merge into ps->projectPartialRedraws */ - ProjPaintImage *projImages; /* array of partial redraws */ + ProjPaintImage *projImages; /* array of partial redraws */ /* thread settings */ int thread_index; @@ -3690,21 +3690,21 @@ static void blend_color_mix(unsigned char *cp, const unsigned char *cp1, const u /* this and other blending modes previously used >>8 instead of /255. both * are not equivalent (>>8 is /256), and the former results in rounding * errors that can turn colors black fast after repeated blending */ - const int mfac= 255-fac; + const int mfac = 255 - fac; - cp[0]= (mfac*cp1[0]+fac*cp2[0])/255; - cp[1]= (mfac*cp1[1]+fac*cp2[1])/255; - cp[2]= (mfac*cp1[2]+fac*cp2[2])/255; - cp[3]= (mfac*cp1[3]+fac*cp2[3])/255; + cp[0] = (mfac * cp1[0] + fac * cp2[0]) / 255; + cp[1] = (mfac * cp1[1] + fac * cp2[1]) / 255; + cp[2] = (mfac * cp1[2] + fac * cp2[2]) / 255; + cp[3] = (mfac * cp1[3] + fac * cp2[3]) / 255; } static void blend_color_mix_float(float *cp, const float *cp1, const float *cp2, const float fac) { - const float mfac= 1.0f-fac; - cp[0]= mfac*cp1[0] + fac*cp2[0]; - cp[1]= mfac*cp1[1] + fac*cp2[1]; - cp[2]= mfac*cp1[2] + fac*cp2[2]; - cp[3]= mfac*cp1[3] + fac*cp2[3]; + const float mfac = 1.0f - fac; + cp[0] = mfac * cp1[0] + fac * cp2[0]; + cp[1] = mfac * cp1[1] + fac * cp2[1]; + cp[2] = mfac * cp1[2] + fac * cp2[2]; + cp[3] = mfac * cp1[3] + fac * cp2[3]; } static void blend_color_mix_accum(unsigned char *cp, const unsigned char *cp1, const unsigned char *cp2, const int fac) @@ -3712,34 +3712,34 @@ static void blend_color_mix_accum(unsigned char *cp, const unsigned char *cp1, c /* this and other blending modes previously used >>8 instead of /255. both * are not equivalent (>>8 is /256), and the former results in rounding * errors that can turn colors black fast after repeated blending */ - const int mfac= 255-fac; - const int alpha= cp1[3] + ((fac * cp2[3]) / 255); + const int mfac = 255 - fac; + const int alpha = cp1[3] + ((fac * cp2[3]) / 255); - cp[0]= (mfac*cp1[0]+fac*cp2[0])/255; - cp[1]= (mfac*cp1[1]+fac*cp2[1])/255; - cp[2]= (mfac*cp1[2]+fac*cp2[2])/255; - cp[3]= alpha > 255 ? 255 : alpha; + cp[0] = (mfac * cp1[0] + fac * cp2[0]) / 255; + cp[1] = (mfac * cp1[1] + fac * cp2[1]) / 255; + cp[2] = (mfac * cp1[2] + fac * cp2[2]) / 255; + cp[3] = alpha > 255 ? 255 : alpha; } static void do_projectpaint_clone(ProjPaintState *ps, ProjPixel *projPixel, float alpha, float mask) { - if (ps->is_airbrush==0 && mask < 1.0f) { - projPixel->newColor.uint = IMB_blend_color(projPixel->newColor.uint, ((ProjPixelClone*)projPixel)->clonepx.uint, (int)(alpha*255), ps->blend); - blend_color_mix(projPixel->pixel.ch_pt, projPixel->origColor.ch, projPixel->newColor.ch, (int)(mask*255)); + if (ps->is_airbrush == 0 && mask < 1.0f) { + projPixel->newColor.uint = IMB_blend_color(projPixel->newColor.uint, ((ProjPixelClone *)projPixel)->clonepx.uint, (int)(alpha * 255), ps->blend); + blend_color_mix(projPixel->pixel.ch_pt, projPixel->origColor.ch, projPixel->newColor.ch, (int)(mask * 255)); } else { - *projPixel->pixel.uint_pt = IMB_blend_color(*projPixel->pixel.uint_pt, ((ProjPixelClone*)projPixel)->clonepx.uint, (int)(alpha*mask*255), ps->blend); + *projPixel->pixel.uint_pt = IMB_blend_color(*projPixel->pixel.uint_pt, ((ProjPixelClone *)projPixel)->clonepx.uint, (int)(alpha * mask * 255), ps->blend); } } static void do_projectpaint_clone_f(ProjPaintState *ps, ProjPixel *projPixel, float alpha, float mask) { - if (ps->is_airbrush==0 && mask < 1.0f) { + if (ps->is_airbrush == 0 && mask < 1.0f) { IMB_blend_color_float(projPixel->newColor.f, projPixel->newColor.f, ((ProjPixelClone *)projPixel)->clonepx.f, alpha, ps->blend); blend_color_mix_float(projPixel->pixel.f_pt, projPixel->origColor.f, projPixel->newColor.f, mask); } else { - IMB_blend_color_float(projPixel->pixel.f_pt, projPixel->pixel.f_pt, ((ProjPixelClone *)projPixel)->clonepx.f, alpha*mask, ps->blend); + IMB_blend_color_float(projPixel->pixel.f_pt, projPixel->pixel.f_pt, ((ProjPixelClone *)projPixel)->clonepx.f, alpha * mask, ps->blend); } } @@ -3753,10 +3753,10 @@ static void do_projectpaint_smear(ProjPaintState *ps, ProjPixel *projPixel, floa { unsigned char rgba_ub[4]; - if (project_paint_PickColor(ps, co, NULL, rgba_ub, 1)==0) + if (project_paint_PickColor(ps, co, NULL, rgba_ub, 1) == 0) return; /* ((ProjPixelClone *)projPixel)->clonepx.uint = IMB_blend_color(*projPixel->pixel.uint_pt, *((unsigned int *)rgba_ub), (int)(alpha*mask*255), ps->blend); */ - blend_color_mix(((ProjPixelClone *)projPixel)->clonepx.ch, projPixel->pixel.ch_pt, rgba_ub, (int)(alpha*mask*255)); + blend_color_mix(((ProjPixelClone *)projPixel)->clonepx.ch, projPixel->pixel.ch_pt, rgba_ub, (int)(alpha * mask * 255)); BLI_linklist_prepend_arena(smearPixels, (void *)projPixel, smearArena); } @@ -3764,11 +3764,11 @@ static void do_projectpaint_smear_f(ProjPaintState *ps, ProjPixel *projPixel, fl { float rgba[4]; - if (project_paint_PickColor(ps, co, rgba, NULL, 1)==0) + if (project_paint_PickColor(ps, co, rgba, NULL, 1) == 0) return; /* (ProjPixelClone *)projPixel)->clonepx.uint = IMB_blend_color(*((unsigned int *)rgba_smear), *((unsigned int *)rgba_ub), (int)(alpha*mask*255), ps->blend); */ - blend_color_mix_float(((ProjPixelClone *)projPixel)->clonepx.f, projPixel->pixel.f_pt, rgba, alpha*mask); + blend_color_mix_float(((ProjPixelClone *)projPixel)->clonepx.f, projPixel->pixel.f_pt, rgba, alpha * mask); BLI_linklist_prepend_arena(smearPixels_f, (void *)projPixel, smearArena); } @@ -3787,12 +3787,12 @@ static void do_projectpaint_draw(ProjPaintState *ps, ProjPixel *projPixel, float rgba_ub[3] = 255; } - if (ps->is_airbrush==0 && mask < 1.0f) { - projPixel->newColor.uint = IMB_blend_color(projPixel->newColor.uint, *((unsigned int *)rgba_ub), (int)(alpha*255), ps->blend); - blend_color_mix(projPixel->pixel.ch_pt, projPixel->origColor.ch, projPixel->newColor.ch, (int)(mask*255)); + if (ps->is_airbrush == 0 && mask < 1.0f) { + projPixel->newColor.uint = IMB_blend_color(projPixel->newColor.uint, *((unsigned int *)rgba_ub), (int)(alpha * 255), ps->blend); + blend_color_mix(projPixel->pixel.ch_pt, projPixel->origColor.ch, projPixel->newColor.ch, (int)(mask * 255)); } else { - *projPixel->pixel.uint_pt = IMB_blend_color(*projPixel->pixel.uint_pt, *((unsigned int *)rgba_ub), (int)(alpha*mask*255), ps->blend); + *projPixel->pixel.uint_pt = IMB_blend_color(*projPixel->pixel.uint_pt, *((unsigned int *)rgba_ub), (int)(alpha * mask * 255), ps->blend); } } @@ -3819,12 +3819,12 @@ static void do_projectpaint_draw_f(ProjPaintState *ps, ProjPixel *projPixel, flo rgba[3] = 1.0; } - if (ps->is_airbrush==0 && mask < 1.0f) { + if (ps->is_airbrush == 0 && mask < 1.0f) { IMB_blend_color_float(projPixel->newColor.f, projPixel->newColor.f, rgba, alpha, ps->blend); blend_color_mix_float(projPixel->pixel.f_pt, projPixel->origColor.f, projPixel->newColor.f, mask); } else { - IMB_blend_color_float(projPixel->pixel.f_pt, projPixel->pixel.f_pt, rgba, alpha*mask, ps->blend); + IMB_blend_color_float(projPixel->pixel.f_pt, projPixel->pixel.f_pt, rgba, alpha * mask, ps->blend); } } @@ -3834,18 +3834,18 @@ static void do_projectpaint_draw_f(ProjPaintState *ps, ProjPixel *projPixel, flo static void *do_projectpaint_thread(void *ph_v) { /* First unpack args from the struct */ - ProjPaintState *ps = ((ProjectHandle *)ph_v)->ps; - ProjPaintImage *projImages = ((ProjectHandle *)ph_v)->projImages; - const float *lastpos = ((ProjectHandle *)ph_v)->prevmval; - const float *pos = ((ProjectHandle *)ph_v)->mval; - const int thread_index = ((ProjectHandle *)ph_v)->thread_index; + ProjPaintState *ps = ((ProjectHandle *)ph_v)->ps; + ProjPaintImage *projImages = ((ProjectHandle *)ph_v)->projImages; + const float *lastpos = ((ProjectHandle *)ph_v)->prevmval; + const float *pos = ((ProjectHandle *)ph_v)->mval; + const int thread_index = ((ProjectHandle *)ph_v)->thread_index; /* Done with args from ProjectHandle */ LinkNode *node; ProjPixel *projPixel; int last_index = -1; - ProjPaintImage *last_projIma= NULL; + ProjPaintImage *last_projIma = NULL; ImagePaintPartialRedraw *last_partial_redraw_cell; float rgba[4], alpha, dist_nosqrt, dist; @@ -3862,20 +3862,20 @@ static void *do_projectpaint_thread(void *ph_v) float co[2]; float mask = 1.0f; /* airbrush wont use mask */ unsigned short mask_short; - const float radius= (float)brush_size(ps->scene, ps->brush); - const float radius_squared= radius*radius; /* avoid a square root with every dist comparison */ + const float radius = (float)brush_size(ps->scene, ps->brush); + const float radius_squared = radius * radius; /* avoid a square root with every dist comparison */ - short lock_alpha= ELEM(ps->brush->blend, IMB_BLEND_ERASE_ALPHA, IMB_BLEND_ADD_ALPHA) ? 0 : ps->brush->flag & BRUSH_LOCK_ALPHA; + short lock_alpha = ELEM(ps->brush->blend, IMB_BLEND_ERASE_ALPHA, IMB_BLEND_ADD_ALPHA) ? 0 : ps->brush->flag & BRUSH_LOCK_ALPHA; LinkNode *smearPixels = NULL; LinkNode *smearPixels_f = NULL; MemArena *smearArena = NULL; /* mem arena for this brush projection only */ - if (tool==PAINT_TOOL_SMEAR) { + if (tool == PAINT_TOOL_SMEAR) { pos_ofs[0] = pos[0] - lastpos[0]; pos_ofs[1] = pos[1] - lastpos[1]; - smearArena = BLI_memarena_new(1<<16, "paint smear arena"); + smearArena = BLI_memarena_new(1 << 16, "paint smear arena"); } /* printf("brush bounds %d %d %d %d\n", bucketMin[0], bucketMin[1], bucketMax[0], bucketMax[1]); */ @@ -3897,8 +3897,8 @@ static void *do_projectpaint_thread(void *ph_v) bicubic_interpolation_color(ps->reproject_ibuf, projPixel->newColor.ch, NULL, projPixel->projCoSS[0], projPixel->projCoSS[1]); if (projPixel->newColor.ch[3]) { - mask = ((float)projPixel->mask)/65535.0f; - blend_color_mix_accum(projPixel->pixel.ch_pt, projPixel->origColor.ch, projPixel->newColor.ch, (int)(mask*projPixel->newColor.ch[3])); + mask = ((float)projPixel->mask) / 65535.0f; + blend_color_mix_accum(projPixel->pixel.ch_pt, projPixel->origColor.ch, projPixel->newColor.ch, (int)(mask * projPixel->newColor.ch[3])); } } @@ -3914,7 +3914,7 @@ static void *do_projectpaint_thread(void *ph_v) /*if (dist < radius) {*/ /* correct but uses a sqrtf */ if (dist_nosqrt <= radius_squared) { - dist=sqrtf(dist_nosqrt); + dist = sqrtf(dist_nosqrt); falloff = brush_curve_strength_clamp(ps->brush, dist, radius); @@ -3931,7 +3931,7 @@ static void *do_projectpaint_thread(void *ph_v) if (ps->is_airbrush) { /* for an aurbrush there is no real mask, so just multiply the alpha by it */ alpha *= falloff * brush_alpha(ps->scene, ps->brush); - mask = ((float)projPixel->mask)/65535.0f; + mask = ((float)projPixel->mask) / 65535.0f; } else { /* This brush dosnt accumulate so add some curve to the brushes falloff */ @@ -3940,7 +3940,7 @@ static void *do_projectpaint_thread(void *ph_v) mask_short = (unsigned short)(projPixel->mask * (brush_alpha(ps->scene, ps->brush) * falloff)); if (mask_short > projPixel->mask_max) { - mask = ((float)mask_short)/65535.0f; + mask = ((float)mask_short) / 65535.0f; projPixel->mask_max = mask_short; } else { @@ -3966,39 +3966,39 @@ static void *do_projectpaint_thread(void *ph_v) last_partial_redraw_cell->x1 = MIN2(last_partial_redraw_cell->x1, projPixel->x_px); last_partial_redraw_cell->y1 = MIN2(last_partial_redraw_cell->y1, projPixel->y_px); - last_partial_redraw_cell->x2 = MAX2(last_partial_redraw_cell->x2, projPixel->x_px+1); - last_partial_redraw_cell->y2 = MAX2(last_partial_redraw_cell->y2, projPixel->y_px+1); + last_partial_redraw_cell->x2 = MAX2(last_partial_redraw_cell->x2, projPixel->x_px + 1); + last_partial_redraw_cell->y2 = MAX2(last_partial_redraw_cell->y2, projPixel->y_px + 1); - switch(tool) { - case PAINT_TOOL_CLONE: - if (is_floatbuf) { - if (((ProjPixelClone *)projPixel)->clonepx.f[3]) { - do_projectpaint_clone_f(ps, projPixel, alpha, mask); /* rgba isn't used for cloning, only alpha */ + switch (tool) { + case PAINT_TOOL_CLONE: + if (is_floatbuf) { + if (((ProjPixelClone *)projPixel)->clonepx.f[3]) { + do_projectpaint_clone_f(ps, projPixel, alpha, mask); /* rgba isn't used for cloning, only alpha */ + } } - } - else { - if (((ProjPixelClone*)projPixel)->clonepx.ch[3]) { - do_projectpaint_clone(ps, projPixel, alpha, mask); /* rgba isn't used for cloning, only alpha */ + else { + if (((ProjPixelClone *)projPixel)->clonepx.ch[3]) { + do_projectpaint_clone(ps, projPixel, alpha, mask); /* rgba isn't used for cloning, only alpha */ + } } - } - break; - case PAINT_TOOL_SMEAR: - sub_v2_v2v2(co, projPixel->projCoSS, pos_ofs); - - if (is_floatbuf) do_projectpaint_smear_f(ps, projPixel, alpha, mask, smearArena, &smearPixels_f, co); - else do_projectpaint_smear(ps, projPixel, alpha, mask, smearArena, &smearPixels, co); - break; - default: - if (is_floatbuf) do_projectpaint_draw_f(ps, projPixel, rgba, alpha, mask, use_color_correction); - else do_projectpaint_draw(ps, projPixel, rgba, alpha, mask); - break; + break; + case PAINT_TOOL_SMEAR: + sub_v2_v2v2(co, projPixel->projCoSS, pos_ofs); + + if (is_floatbuf) do_projectpaint_smear_f(ps, projPixel, alpha, mask, smearArena, &smearPixels_f, co); + else do_projectpaint_smear(ps, projPixel, alpha, mask, smearArena, &smearPixels, co); + break; + default: + if (is_floatbuf) do_projectpaint_draw_f(ps, projPixel, rgba, alpha, mask, use_color_correction); + else do_projectpaint_draw(ps, projPixel, rgba, alpha, mask); + break; } } if (lock_alpha) { - if (is_floatbuf) projPixel->pixel.f_pt[3]= projPixel->origColor.f[3]; - else projPixel->pixel.ch_pt[3]= projPixel->origColor.ch[3]; + if (is_floatbuf) projPixel->pixel.f_pt[3] = projPixel->origColor.f[3]; + else projPixel->pixel.ch_pt[3] = projPixel->origColor.ch[3]; } /* done painting */ @@ -4009,14 +4009,14 @@ static void *do_projectpaint_thread(void *ph_v) } - if (tool==PAINT_TOOL_SMEAR) { + if (tool == PAINT_TOOL_SMEAR) { - for (node= smearPixels; node; node= node->next) { /* this wont run for a float image */ + for (node = smearPixels; node; node = node->next) { /* this wont run for a float image */ projPixel = node->link; *projPixel->pixel.uint_pt = ((ProjPixelClone *)projPixel)->clonepx.uint; } - for (node= smearPixels_f; node; node= node->next) { + for (node = smearPixels_f; node; node = node->next) { projPixel = node->link; copy_v4_v4(projPixel->pixel.f_pt, ((ProjPixelClone *)projPixel)->clonepx.f); } @@ -4035,7 +4035,7 @@ static int project_paint_op(void *state, ImBuf *UNUSED(ibufb), const float lastp ProjectHandle handles[BLENDER_MAX_THREADS]; ListBase threads; - int a,i; + int a, i; if (!project_bucket_iter_init(ps, pos)) { return 0; @@ -4045,7 +4045,7 @@ static int project_paint_op(void *state, ImBuf *UNUSED(ibufb), const float lastp BLI_init_threads(&threads, do_projectpaint_thread, ps->thread_tot); /* get the threads running */ - for (a=0; a < ps->thread_tot; a++) { + for (a = 0; a < ps->thread_tot; a++) { /* set defaults in handles */ //memset(&handles[a], 0, sizeof(BakeShade)); @@ -4062,7 +4062,7 @@ static int project_paint_op(void *state, ImBuf *UNUSED(ibufb), const float lastp memcpy(handles[a].projImages, ps->projImages, ps->image_tot * sizeof(ProjPaintImage)); /* image bounds */ - for (i=0; i< ps->image_tot; i++) { + for (i = 0; i < ps->image_tot; i++) { handles[a].projImages[i].partRedrawRect = (ImagePaintPartialRedraw *)BLI_memarena_alloc(ps->arena_mt[a], sizeof(ImagePaintPartialRedraw) * PROJ_BOUNDBOX_SQUARED); memcpy(handles[a].projImages[i].partRedrawRect, ps->projImages[i].partRedrawRect, sizeof(ImagePaintPartialRedraw) * PROJ_BOUNDBOX_SQUARED); } @@ -4078,9 +4078,9 @@ static int project_paint_op(void *state, ImBuf *UNUSED(ibufb), const float lastp /* move threaded bounds back into ps->projectPartialRedraws */ - for (i=0; i < ps->image_tot; i++) { + for (i = 0; i < ps->image_tot; i++) { int touch = 0; - for (a=0; a < ps->thread_tot; a++) { + for (a = 0; a < ps->thread_tot; a++) { touch |= partial_redraw_array_merge(ps->projImages[i].partRedrawRect, handles[a].projImages[i].partRedrawRect, PROJ_BOUNDBOX_SQUARED); } @@ -4117,10 +4117,10 @@ static int project_paint_stroke(ProjPaintState *ps, BrushPainter *painter, const { int a, redraw; - for (a=0; a < ps->image_tot; a++) + for (a = 0; a < ps->image_tot; a++) partial_redraw_array_init(ps->projImages[a].partRedrawRect); - redraw= project_paint_sub_stroke(ps, painter, prevmval_i, mval_i, time, pressure); + redraw = project_paint_sub_stroke(ps, painter, prevmval_i, mval_i, time, pressure); if (project_image_refresh_tagged(ps)) return redraw; @@ -4138,7 +4138,7 @@ static void imapaint_clear_partial_redraw(void) static void imapaint_dirty_region(Image *ima, ImBuf *ibuf, int x, int y, int w, int h) { ImBuf *tmpibuf = NULL; - int srcx= 0, srcy= 0, origx; + int srcx = 0, srcy = 0, origx; IMB_rectclip(ibuf, NULL, &x, &y, &srcx, &srcy, &w, &h); @@ -4148,15 +4148,15 @@ static void imapaint_dirty_region(Image *ima, ImBuf *ibuf, int x, int y, int w, if (!imapaintpartial.enabled) { imapaintpartial.x1 = x; imapaintpartial.y1 = y; - imapaintpartial.x2 = x+w; - imapaintpartial.y2 = y+h; + imapaintpartial.x2 = x + w; + imapaintpartial.y2 = y + h; imapaintpartial.enabled = 1; } else { imapaintpartial.x1 = MIN2(imapaintpartial.x1, x); imapaintpartial.y1 = MIN2(imapaintpartial.y1, y); - imapaintpartial.x2 = MAX2(imapaintpartial.x2, x+w); - imapaintpartial.y2 = MAX2(imapaintpartial.y2, y+h); + imapaintpartial.x2 = MAX2(imapaintpartial.x2, x + w); + imapaintpartial.y2 = MAX2(imapaintpartial.y2, y + h); } w = ((x + w - 1) >> IMAPAINT_TILE_BITS); @@ -4165,7 +4165,7 @@ static void imapaint_dirty_region(Image *ima, ImBuf *ibuf, int x, int y, int w, y = (y >> IMAPAINT_TILE_BITS); for (; y <= h; y++) - for (x=origx; x <= w; x++) + for (x = origx; x <= w; x++) image_undo_push_tile(ima, ibuf, &tmpibuf, x, y); ibuf->userflags |= IB_BITMAPDIRTY; @@ -4177,7 +4177,7 @@ static void imapaint_dirty_region(Image *ima, ImBuf *ibuf, int x, int y, int w, static void imapaint_image_update(SpaceImage *sima, Image *image, ImBuf *ibuf, short texpaint) { if (ibuf->rect_float) - ibuf->userflags |= IB_RECT_INVALID; /* force recreate of char rect */ + ibuf->userflags |= IB_RECT_INVALID; /* force recreate of char rect */ if (ibuf->mipmap[0]) ibuf->userflags |= IB_MIPMAP_INVALID; @@ -4187,7 +4187,7 @@ static void imapaint_image_update(SpaceImage *sima, Image *image, ImBuf *ibuf, s int w = imapaintpartial.x2 - imapaintpartial.x1; int h = imapaintpartial.y2 - imapaintpartial.y1; /* Testing with partial update in uv editor too */ - GPU_paint_update_image(image, imapaintpartial.x1, imapaintpartial.y1, w, h, 0);//!texpaint); + GPU_paint_update_image(image, imapaintpartial.x1, imapaintpartial.y1, w, h, 0); //!texpaint); } } @@ -4203,7 +4203,7 @@ static void imapaint_ibuf_get_set_rgb(ImBuf *ibuf, int x, int y, short torus, sh } if (ibuf->rect_float) { - float *rrgbf = ibuf->rect_float + (ibuf->x*y + x)*4; + float *rrgbf = ibuf->rect_float + (ibuf->x * y + x) * 4; if (set) { IMAPAINT_FLOAT_RGB_COPY(rrgbf, rgb); @@ -4213,7 +4213,7 @@ static void imapaint_ibuf_get_set_rgb(ImBuf *ibuf, int x, int y, short torus, sh } } else { - char *rrgb = (char*)ibuf->rect + (ibuf->x*y + x)*4; + char *rrgb = (char *)ibuf->rect + (ibuf->x * y + x) * 4; if (set) { IMAPAINT_FLOAT_RGB_TO_CHAR(rrgb, rgb) @@ -4256,14 +4256,14 @@ static void imapaint_lift_soften(ImBuf *ibuf, ImBuf *ibufb, int *pos, short toru if (!torus) { IMB_rectclip(ibuf, ibufb, &in_off[0], &in_off[1], &out_off[0], - &out_off[1], &dim[0], &dim[1]); + &out_off[1], &dim[0], &dim[1]); if ((dim[0] == 0) || (dim[1] == 0)) return; } - for (y=0; y < dim[1]; y++) { - for (x=0; x < dim[0]; x++) { + for (y = 0; y < dim[1]; y++) { + for (x = 0; x < dim[0]; x++) { /* get input pixel */ xi = in_off[0] + x; yi = in_off[1] + y; @@ -4271,16 +4271,16 @@ static void imapaint_lift_soften(ImBuf *ibuf, ImBuf *ibufb, int *pos, short toru count = 1; imapaint_ibuf_get_set_rgb(ibuf, xi, yi, torus, 0, outrgb); - count += imapaint_ibuf_add_if(ibuf, xi-1, yi-1, outrgb, torus); - count += imapaint_ibuf_add_if(ibuf, xi-1, yi , outrgb, torus); - count += imapaint_ibuf_add_if(ibuf, xi-1, yi+1, outrgb, torus); + count += imapaint_ibuf_add_if(ibuf, xi - 1, yi - 1, outrgb, torus); + count += imapaint_ibuf_add_if(ibuf, xi - 1, yi, outrgb, torus); + count += imapaint_ibuf_add_if(ibuf, xi - 1, yi + 1, outrgb, torus); - count += imapaint_ibuf_add_if(ibuf, xi , yi-1, outrgb, torus); - count += imapaint_ibuf_add_if(ibuf, xi , yi+1, outrgb, torus); + count += imapaint_ibuf_add_if(ibuf, xi, yi - 1, outrgb, torus); + count += imapaint_ibuf_add_if(ibuf, xi, yi + 1, outrgb, torus); - count += imapaint_ibuf_add_if(ibuf, xi+1, yi-1, outrgb, torus); - count += imapaint_ibuf_add_if(ibuf, xi+1, yi , outrgb, torus); - count += imapaint_ibuf_add_if(ibuf, xi+1, yi+1, outrgb, torus); + count += imapaint_ibuf_add_if(ibuf, xi + 1, yi - 1, outrgb, torus); + count += imapaint_ibuf_add_if(ibuf, xi + 1, yi, outrgb, torus); + count += imapaint_ibuf_add_if(ibuf, xi + 1, yi + 1, outrgb, torus); outrgb[0] /= count; outrgb[1] /= count; @@ -4296,23 +4296,23 @@ static void imapaint_lift_soften(ImBuf *ibuf, ImBuf *ibufb, int *pos, short toru static void imapaint_set_region(ImagePaintRegion *region, int destx, int desty, int srcx, int srcy, int width, int height) { - region->destx= destx; - region->desty= desty; - region->srcx= srcx; - region->srcy= srcy; - region->width= width; - region->height= height; + region->destx = destx; + region->desty = desty; + region->srcx = srcx; + region->srcy = srcy; + region->width = width; + region->height = height; } static int imapaint_torus_split_region(ImagePaintRegion region[4], ImBuf *dbuf, ImBuf *sbuf) { - int destx= region->destx; - int desty= region->desty; - int srcx= region->srcx; - int srcy= region->srcy; - int width= region->width; - int height= region->height; - int origw, origh, w, h, tot= 0; + int destx = region->destx; + int desty = region->desty; + int srcx = region->srcx; + int srcy = region->srcy; + int width = region->width; + int height = region->height; + int origw, origh, w, h, tot = 0; /* convert destination and source coordinates to be within image */ destx = destx % dbuf->x; @@ -4326,8 +4326,8 @@ static int imapaint_torus_split_region(ImagePaintRegion region[4], ImBuf *dbuf, /* clip width of blending area to destination imbuf, to avoid writing the * same pixel twice */ - origw = w = (width > dbuf->x)? dbuf->x: width; - origh = h = (height > dbuf->y)? dbuf->y: height; + origw = w = (width > dbuf->x) ? dbuf->x : width; + origh = h = (height > dbuf->y) ? dbuf->y : height; /* clip within image */ IMB_rectclip(dbuf, sbuf, &destx, &desty, &srcx, &srcy, &w, &h); @@ -4335,11 +4335,11 @@ static int imapaint_torus_split_region(ImagePaintRegion region[4], ImBuf *dbuf, /* do 3 other rects if needed */ if (w < origw) - imapaint_set_region(®ion[tot++], (destx+w)%dbuf->x, desty, (srcx+w)%sbuf->x, srcy, origw-w, h); + imapaint_set_region(®ion[tot++], (destx + w) % dbuf->x, desty, (srcx + w) % sbuf->x, srcy, origw - w, h); if (h < origh) - imapaint_set_region(®ion[tot++], destx, (desty+h)%dbuf->y, srcx, (srcy+h)%sbuf->y, w, origh-h); + imapaint_set_region(®ion[tot++], destx, (desty + h) % dbuf->y, srcx, (srcy + h) % sbuf->y, w, origh - h); if ((w < origw) && (h < origh)) - imapaint_set_region(®ion[tot++], (destx+w)%dbuf->x, (desty+h)%dbuf->y, (srcx+w)%sbuf->x, (srcy+h)%sbuf->y, origw-w, origh-h); + imapaint_set_region(®ion[tot++], (destx + w) % dbuf->x, (desty + h) % dbuf->y, (srcx + w) % sbuf->x, (srcy + h) % sbuf->y, origw - w, origh - h); return tot; } @@ -4350,46 +4350,46 @@ static void imapaint_lift_smear(ImBuf *ibuf, ImBuf *ibufb, int *pos) int a, tot; imapaint_set_region(region, 0, 0, pos[0], pos[1], ibufb->x, ibufb->y); - tot= imapaint_torus_split_region(region, ibufb, ibuf); + tot = imapaint_torus_split_region(region, ibufb, ibuf); - for (a=0; ax, h=ibufb->y, destx=0, desty=0, srcx=pos[0], srcy=pos[1]; - ImBuf *clonebuf= IMB_allocImBuf(w, h, ibufb->planes, ibufb->flags); + int w = ibufb->x, h = ibufb->y, destx = 0, desty = 0, srcx = pos[0], srcy = pos[1]; + ImBuf *clonebuf = IMB_allocImBuf(w, h, ibufb->planes, ibufb->flags); IMB_rectclip(clonebuf, ibuf, &destx, &desty, &srcx, &srcy, &w, &h); IMB_rectblend(clonebuf, ibuf, destx, desty, srcx, srcy, w, h, - IMB_BLEND_COPY_RGB); + IMB_BLEND_COPY_RGB); IMB_rectblend(clonebuf, ibufb, destx, desty, destx, desty, w, h, - IMB_BLEND_COPY_ALPHA); + IMB_BLEND_COPY_ALPHA); return clonebuf; } static void imapaint_convert_brushco(ImBuf *ibufb, const float pos[2], int ipos[2]) { - ipos[0]= (int)floorf((pos[0] - ibufb->x/2) + 1.0f); - ipos[1]= (int)floorf((pos[1] - ibufb->y/2) + 1.0f); + ipos[0] = (int)floorf((pos[0] - ibufb->x / 2) + 1.0f); + ipos[1] = (int)floorf((pos[1] - ibufb->y / 2) + 1.0f); } /* dosnt run for projection painting * only the old style painting in the 3d view */ static int imapaint_paint_op(void *state, ImBuf *ibufb, const float lastpos[2], const float pos[2]) { - ImagePaintState *s= ((ImagePaintState*)state); - ImBuf *clonebuf= NULL, *frombuf; + ImagePaintState *s = ((ImagePaintState *)state); + ImBuf *clonebuf = NULL, *frombuf; ImagePaintRegion region[4]; - short torus= s->brush->flag & BRUSH_TORUS; - short blend= s->blend; - float *offset= s->brush->clone.offset; + short torus = s->brush->flag & BRUSH_TORUS; + short blend = s->blend; + float *offset = s->brush->clone.offset; float liftpos[2]; int bpos[2], blastpos[2], bliftpos[2]; int a, tot; @@ -4401,41 +4401,41 @@ static int imapaint_paint_op(void *state, ImBuf *ibufb, const float lastpos[2], imapaint_lift_soften(s->canvas, ibufb, bpos, torus); } else if (s->tool == PAINT_TOOL_SMEAR) { - if (lastpos[0]==pos[0] && lastpos[1]==pos[1]) + if (lastpos[0] == pos[0] && lastpos[1] == pos[1]) return 0; imapaint_convert_brushco(ibufb, lastpos, blastpos); imapaint_lift_smear(s->canvas, ibufb, blastpos); } else if (s->tool == PAINT_TOOL_CLONE && s->clonecanvas) { - liftpos[0]= pos[0] - offset[0]*s->canvas->x; - liftpos[1]= pos[1] - offset[1]*s->canvas->y; + liftpos[0] = pos[0] - offset[0] * s->canvas->x; + liftpos[1] = pos[1] - offset[1] * s->canvas->y; imapaint_convert_brushco(ibufb, liftpos, bliftpos); - clonebuf= imapaint_lift_clone(s->clonecanvas, ibufb, bliftpos); + clonebuf = imapaint_lift_clone(s->clonecanvas, ibufb, bliftpos); } - frombuf= (clonebuf)? clonebuf: ibufb; + frombuf = (clonebuf) ? clonebuf : ibufb; if (torus) { imapaint_set_region(region, bpos[0], bpos[1], 0, 0, frombuf->x, frombuf->y); - tot= imapaint_torus_split_region(region, s->canvas, frombuf); + tot = imapaint_torus_split_region(region, s->canvas, frombuf); } else { imapaint_set_region(region, bpos[0], bpos[1], 0, 0, frombuf->x, frombuf->y); - tot= 1; + tot = 1; } /* blend into canvas */ - for (a=0; aimage, s->canvas, - region[a].destx, region[a].desty, - region[a].width, region[a].height); + region[a].destx, region[a].desty, + region[a].width, region[a].height); IMB_rectblend(s->canvas, frombuf, - region[a].destx, region[a].desty, - region[a].srcx, region[a].srcy, - region[a].width, region[a].height, blend); + region[a].destx, region[a].desty, + region[a].srcx, region[a].srcy, + region[a].width, region[a].height, blend); } if (clonebuf) IMB_freeImBuf(clonebuf); @@ -4455,42 +4455,42 @@ static int texpaint_break_stroke(float *prevuv, float *fwuv, float *bkuv, float sub_v2_v2v2(d1, fwuv, prevuv); sub_v2_v2v2(d2, uv, bkuv); - return ((dot_v2v2(d1, d2) < 0.0f) || (mismatch > MAX2(len1, len2)*2)); + return ((dot_v2v2(d1, d2) < 0.0f) || (mismatch > MAX2(len1, len2) * 2)); } /* ImagePaint Common */ static int imapaint_canvas_set(ImagePaintState *s, Image *ima) { - ImBuf *ibuf= BKE_image_get_ibuf(ima, s->sima? &s->sima->iuser: NULL); + ImBuf *ibuf = BKE_image_get_ibuf(ima, s->sima ? &s->sima->iuser : NULL); /* verify that we can paint and set canvas */ - if (ima==NULL) { + if (ima == NULL) { return 0; } else if (ima->packedfile && ima->rr) { s->warnpackedfile = ima->id.name + 2; return 0; } - else if (ibuf && ibuf->channels!=4) { + else if (ibuf && ibuf->channels != 4) { s->warnmultifile = ima->id.name + 2; return 0; } else if (!ibuf || !(ibuf->rect || ibuf->rect_float)) return 0; - s->image= ima; - s->canvas= ibuf; + s->image = ima; + s->canvas = ibuf; /* set clone canvas */ if (s->tool == PAINT_TOOL_CLONE) { - ima= s->brush->clone.image; - ibuf= BKE_image_get_ibuf(ima, s->sima? &s->sima->iuser: NULL); + ima = s->brush->clone.image; + ibuf = BKE_image_get_ibuf(ima, s->sima ? &s->sima->iuser : NULL); if (!ima || !ibuf || !(ibuf->rect || ibuf->rect_float)) return 0; - s->clonecanvas= ibuf; + s->clonecanvas = ibuf; /* temporarily add float rect for cloning */ if (s->canvas->rect_float && !s->clonecanvas->rect_float) { @@ -4500,7 +4500,7 @@ static int imapaint_canvas_set(ImagePaintState *s, Image *ima) SWAP(int, s->clonecanvas->profile, profile); IMB_float_from_rect(s->clonecanvas); - s->clonefreefloat= 1; + s->clonefreefloat = 1; SWAP(int, s->clonecanvas->profile, profile); } @@ -4519,16 +4519,16 @@ static void imapaint_canvas_free(ImagePaintState *s) static int imapaint_paint_sub_stroke(ImagePaintState *s, BrushPainter *painter, Image *image, short texpaint, float *uv, double time, int update, float pressure) { - ImBuf *ibuf= BKE_image_get_ibuf(image, s->sima? &s->sima->iuser: NULL); + ImBuf *ibuf = BKE_image_get_ibuf(image, s->sima ? &s->sima->iuser : NULL); float pos[2]; if (!ibuf) return 0; - pos[0] = uv[0]*ibuf->x; - pos[1] = uv[1]*ibuf->y; + pos[0] = uv[0] * ibuf->x; + pos[1] = uv[1] * ibuf->y; - brush_painter_require_imbuf(painter, ((ibuf->rect_float)? 1: 0), 0, 0); + brush_painter_require_imbuf(painter, ((ibuf->rect_float) ? 1 : 0), 0, 0); if (brush_painter_paint(painter, imapaint_paint_op, pos, time, pressure, s, ibuf->profile == IB_PROFILE_LINEAR_RGB)) { if (update) @@ -4553,7 +4553,7 @@ static int imapaint_paint_stroke(ViewContext *vc, ImagePaintState *s, BrushPaint ImBuf *ibuf; newimage = imapaint_face_image(s, newfaceindex); - ibuf= BKE_image_get_ibuf(newimage, s->sima? &s->sima->iuser: NULL); + ibuf = BKE_image_get_ibuf(newimage, s->sima ? &s->sima->iuser : NULL); if (ibuf && ibuf->rect) imapaint_pick_uv(s->scene, s->ob, newfaceindex, mval, newuv); @@ -4571,17 +4571,17 @@ static int imapaint_paint_stroke(ViewContext *vc, ImagePaintState *s, BrushPaint imapaint_pick_uv(s->scene, s->ob, newfaceindex, prevmval, bkuv); if (newimage == s->image) - breakstroke= texpaint_break_stroke(s->uv, fwuv, bkuv, newuv); + breakstroke = texpaint_break_stroke(s->uv, fwuv, bkuv, newuv); else - breakstroke= 1; + breakstroke = 1; } else - fwuv[0]= fwuv[1]= 0.0f; + fwuv[0] = fwuv[1] = 0.0f; if (breakstroke) { imapaint_pick_uv(s->scene, s->ob, s->faceindex, mval, fwuv); redraw |= imapaint_paint_sub_stroke(s, painter, s->image, texpaint, - fwuv, time, 1, pressure); + fwuv, time, 1, pressure); imapaint_clear_partial_redraw(); brush_painter_break_stroke(painter); } @@ -4594,10 +4594,10 @@ static int imapaint_paint_stroke(ViewContext *vc, ImagePaintState *s, BrushPaint /* paint in new image */ if (newimage) { if (breakstroke) - redraw|= imapaint_paint_sub_stroke(s, painter, newimage, - texpaint, bkuv, time, 0, pressure); - redraw|= imapaint_paint_sub_stroke(s, painter, newimage, texpaint, - newuv, time, 1, pressure); + redraw |= imapaint_paint_sub_stroke(s, painter, newimage, + texpaint, bkuv, time, 0, pressure); + redraw |= imapaint_paint_sub_stroke(s, painter, newimage, texpaint, + newuv, time, 1, pressure); } /* update state */ @@ -4609,7 +4609,7 @@ static int imapaint_paint_stroke(ViewContext *vc, ImagePaintState *s, BrushPaint else { UI_view2d_region_to_view(s->v2d, mval[0], mval[1], &newuv[0], &newuv[1]); redraw |= imapaint_paint_sub_stroke(s, painter, s->image, texpaint, newuv, - time, 1, pressure); + time, 1, pressure); } if (redraw) @@ -4622,16 +4622,16 @@ static int imapaint_paint_stroke(ViewContext *vc, ImagePaintState *s, BrushPaint static Brush *image_paint_brush(bContext *C) { - Scene *scene= CTX_data_scene(C); - ToolSettings *settings= scene->toolsettings; + Scene *scene = CTX_data_scene(C); + ToolSettings *settings = scene->toolsettings; return paint_brush(&settings->imapaint.paint); } static Brush *uv_sculpt_brush(bContext *C) { - Scene *scene= CTX_data_scene(C); - ToolSettings *settings= scene->toolsettings; + Scene *scene = CTX_data_scene(C); + ToolSettings *settings = scene->toolsettings; if (!settings->uvsculpt) return NULL; @@ -4649,12 +4649,12 @@ static int image_paint_poll(bContext *C) return 1; } else { - SpaceImage *sima= CTX_wm_space_image(C); + SpaceImage *sima = CTX_wm_space_image(C); if (sima) { - ARegion *ar= CTX_wm_region(C); + ARegion *ar = CTX_wm_region(C); - if ((sima->flag & SI_DRAWTOOL) && ar->regiontype==RGN_TYPE_WINDOW) + if ((sima->flag & SI_DRAWTOOL) && ar->regiontype == RGN_TYPE_WINDOW) return 1; } } @@ -4667,7 +4667,7 @@ static int uv_sculpt_brush_poll(bContext *C) BMEditMesh *em; int ret; Object *obedit = CTX_data_edit_object(C); - SpaceImage *sima= CTX_wm_space_image(C); + SpaceImage *sima = CTX_wm_space_image(C); Scene *scene = CTX_data_scene(C); ToolSettings *toolsettings = scene->toolsettings; @@ -4678,8 +4678,8 @@ static int uv_sculpt_brush_poll(bContext *C) ret = EDBM_mtexpoly_check(em); if (ret && sima) { - ARegion *ar= CTX_wm_region(C); - if ((toolsettings->use_uv_sculpt) && ar->regiontype==RGN_TYPE_WINDOW) + ARegion *ar = CTX_wm_region(C); + if ((toolsettings->use_uv_sculpt) && ar->regiontype == RGN_TYPE_WINDOW) return 1; } @@ -4696,7 +4696,7 @@ static int image_paint_3d_poll(bContext *C) static int image_paint_2d_clone_poll(bContext *C) { - Brush *brush= image_paint_brush(C); + Brush *brush = image_paint_brush(C); if (!CTX_wm_region_view3d(C) && image_paint_poll(C)) if (brush && (brush->imagepaint_tool == PAINT_TOOL_CLONE)) @@ -4740,22 +4740,22 @@ static void paint_redraw(bContext *C, ImagePaintState *s, int texpaint, int fina GPU_free_image(s->image); /* compositor listener deals with updating */ - WM_event_add_notifier(C, NC_IMAGE|NA_EDITED, s->image); + WM_event_add_notifier(C, NC_IMAGE | NA_EDITED, s->image); } else { if (!s->sima || !s->sima->lock) ED_region_tag_redraw(CTX_wm_region(C)); else - WM_event_add_notifier(C, NC_IMAGE|NA_EDITED, s->image); + WM_event_add_notifier(C, NC_IMAGE | NA_EDITED, s->image); } } /* initialize project paint settings from context */ static void project_state_init(bContext *C, Object *ob, ProjPaintState *ps) { - Scene *scene= CTX_data_scene(C); - ToolSettings *settings= scene->toolsettings; - Brush *brush= paint_brush(&settings->imapaint.paint); + Scene *scene = CTX_data_scene(C); + ToolSettings *settings = scene->toolsettings; + Brush *brush = paint_brush(&settings->imapaint.paint); /* brush */ ps->brush = brush; @@ -4767,12 +4767,12 @@ static void project_state_init(bContext *C, Object *ob, ProjPaintState *ps) /* these can be NULL */ - ps->v3d= CTX_wm_view3d(C); - ps->rv3d= CTX_wm_region_view3d(C); - ps->ar= CTX_wm_region(C); + ps->v3d = CTX_wm_view3d(C); + ps->rv3d = CTX_wm_region_view3d(C); + ps->ar = CTX_wm_region(C); - ps->scene= scene; - ps->ob= ob; /* allow override of active object */ + ps->scene = scene; + ps->ob = ob; /* allow override of active object */ /* setup projection painting data */ ps->do_backfacecull = (settings->imapaint.flag & IMAGEPAINT_PROJECT_BACKFACE) ? 0 : 1; @@ -4796,37 +4796,37 @@ static void project_state_init(bContext *C, Object *ob, ProjPaintState *ps) ps->normal_angle = (ps->normal_angle_inner + 90.0f) * 0.5f; } else { - ps->normal_angle_inner= ps->normal_angle= settings->imapaint.normal_angle; + ps->normal_angle_inner = ps->normal_angle = settings->imapaint.normal_angle; } - ps->normal_angle_inner *= (float)(M_PI_2 / 90); - ps->normal_angle *= (float)(M_PI_2 / 90); + ps->normal_angle_inner *= (float)(M_PI_2 / 90); + ps->normal_angle *= (float)(M_PI_2 / 90); ps->normal_angle_range = ps->normal_angle - ps->normal_angle_inner; if (ps->normal_angle_range <= 0.0f) - ps->do_mask_normal = 0; /* no need to do blending */ + ps->do_mask_normal = 0; /* no need to do blending */ } static void paint_brush_init_tex(Brush *brush) { /* init mtex nodes */ if (brush) { - MTex *mtex= &brush->mtex; + MTex *mtex = &brush->mtex; if (mtex->tex && mtex->tex->nodetree) - ntreeTexBeginExecTree(mtex->tex->nodetree, 1); /* has internal flag to detect it only does it once */ + ntreeTexBeginExecTree(mtex->tex->nodetree, 1); /* has internal flag to detect it only does it once */ } } static int texture_paint_init(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); - ToolSettings *settings= scene->toolsettings; - Brush *brush= paint_brush(&settings->imapaint.paint); - PaintOperation *pop= MEM_callocN(sizeof(PaintOperation), "PaintOperation"); /* caller frees */ + Scene *scene = CTX_data_scene(C); + ToolSettings *settings = scene->toolsettings; + Brush *brush = paint_brush(&settings->imapaint.paint); + PaintOperation *pop = MEM_callocN(sizeof(PaintOperation), "PaintOperation"); /* caller frees */ - pop->first= 1; - op->customdata= pop; + pop->first = 1; + op->customdata = pop; /* XXX: Soften tool does not support projection painting atm, so just disable * projection for this brush */ @@ -4837,27 +4837,27 @@ static int texture_paint_init(bContext *C, wmOperator *op) /* initialize from context */ if (CTX_wm_region_view3d(C)) { - pop->mode= PAINT_MODE_3D; + pop->mode = PAINT_MODE_3D; if (!(settings->imapaint.flag & IMAGEPAINT_PROJECT_DISABLE)) - pop->mode= PAINT_MODE_3D_PROJECT; + pop->mode = PAINT_MODE_3D_PROJECT; else view3d_set_viewcontext(C, &pop->vc); } else { - pop->s.sima= CTX_wm_space_image(C); - pop->s.v2d= &CTX_wm_region(C)->v2d; + pop->s.sima = CTX_wm_space_image(C); + pop->s.v2d = &CTX_wm_region(C)->v2d; } - pop->s.scene= scene; - pop->s.screen= CTX_wm_screen(C); + pop->s.scene = scene; + pop->s.screen = CTX_wm_screen(C); pop->s.brush = brush; pop->s.tool = brush->imagepaint_tool; if (pop->mode == PAINT_MODE_3D && (pop->s.tool == PAINT_TOOL_CLONE)) pop->s.tool = PAINT_TOOL_DRAW; pop->s.blend = brush->blend; - pop->orig_brush_size= brush_size(scene, brush); + pop->orig_brush_size = brush_size(scene, brush); if (pop->mode != PAINT_MODE_2D) { Object *ob = OBACT; @@ -4872,7 +4872,7 @@ static int texture_paint_init(bContext *C, wmOperator *op) /* for non prohect paint we need */ /* fill in derived mesh */ - if (ob->derivedFinal && CustomData_has_layer( &ob->derivedFinal->faceData, CD_MTFACE)) { + if (ob->derivedFinal && CustomData_has_layer(&ob->derivedFinal->faceData, CD_MTFACE)) { pop->s.dm = ob->derivedFinal; pop->s.dm_release = FALSE; } @@ -4891,7 +4891,7 @@ static int texture_paint_init(bContext *C, wmOperator *op) } pop->s.dm_mface = pop->s.dm->getTessFaceArray(pop->s.dm); - pop->s.dm_mtface= pop->s.dm->getTessFaceDataArray(pop->s.dm, CD_MTFACE); + pop->s.dm_mtface = pop->s.dm->getTessFaceDataArray(pop->s.dm, CD_MTFACE); pop->s.dm_totface = pop->s.dm->getNumTessFaces(pop->s.dm); } else { @@ -4917,9 +4917,9 @@ static int texture_paint_init(bContext *C, wmOperator *op) paint_brush_init_tex(pop->ps.brush); - pop->ps.source= PROJ_SRC_VIEW; + pop->ps.source = PROJ_SRC_VIEW; - if (pop->ps.ob==NULL || !(pop->ps.ob->lay & pop->ps.v3d->lay)) + if (pop->ps.ob == NULL || !(pop->ps.ob->lay & pop->ps.v3d->lay)) return 0; /* Don't allow brush size below 2 */ @@ -4929,23 +4929,23 @@ static int texture_paint_init(bContext *C, wmOperator *op) /* allocate and initialize spacial data structures */ project_paint_begin(&pop->ps); - if (pop->ps.dm==NULL) + if (pop->ps.dm == NULL) return 0; } settings->imapaint.flag |= IMAGEPAINT_DRAWING; undo_paint_push_begin(UNDO_PAINT_IMAGE, op->type->name, - image_undo_restore, image_undo_free); + image_undo_restore, image_undo_free); /* create painter */ - pop->painter= brush_painter_new(scene, pop->s.brush); + pop->painter = brush_painter_new(scene, pop->s.brush); return 1; } static void paint_apply(bContext *C, wmOperator *op, PointerRNA *itemptr) { - PaintOperation *pop= op->customdata; + PaintOperation *pop = op->customdata; float time, mousef[2]; float pressure; int mouse[2], redraw; @@ -4953,8 +4953,8 @@ static void paint_apply(bContext *C, wmOperator *op, PointerRNA *itemptr) RNA_float_get_array(itemptr, "mouse", mousef); mouse[0] = (int)(mousef[0]); mouse[1] = (int)(mousef[1]); - time= RNA_float_get(itemptr, "time"); - pressure= RNA_float_get(itemptr, "pressure"); + time = RNA_float_get(itemptr, "time"); + pressure = RNA_float_get(itemptr, "pressure"); if (pop->first) project_paint_begin_clone(&pop->ps, mouse); @@ -4963,27 +4963,27 @@ static void paint_apply(bContext *C, wmOperator *op, PointerRNA *itemptr) view3d_operator_needs_opengl(C); if (pop->mode == PAINT_MODE_3D_PROJECT) { - redraw= project_paint_stroke(&pop->ps, pop->painter, pop->prevmouse, mouse, time, pressure); - pop->prevmouse[0]= mouse[0]; - pop->prevmouse[1]= mouse[1]; + redraw = project_paint_stroke(&pop->ps, pop->painter, pop->prevmouse, mouse, time, pressure); + pop->prevmouse[0] = mouse[0]; + pop->prevmouse[1] = mouse[1]; } else { - redraw= imapaint_paint_stroke(&pop->vc, &pop->s, pop->painter, pop->mode == PAINT_MODE_3D, pop->prevmouse, mouse, time, pressure); - pop->prevmouse[0]= mouse[0]; - pop->prevmouse[1]= mouse[1]; + redraw = imapaint_paint_stroke(&pop->vc, &pop->s, pop->painter, pop->mode == PAINT_MODE_3D, pop->prevmouse, mouse, time, pressure); + pop->prevmouse[0] = mouse[0]; + pop->prevmouse[1] = mouse[1]; } if (redraw) paint_redraw(C, &pop->s, pop->mode == PAINT_MODE_3D, 0); - pop->first= 0; + pop->first = 0; } static void paint_brush_exit_tex(Brush *brush) { if (brush) { - MTex *mtex= &brush->mtex; + MTex *mtex = &brush->mtex; if (mtex->tex && mtex->tex->nodetree) ntreeTexEndExecTree(mtex->tex->nodetree->execdata, 1); } @@ -4991,9 +4991,9 @@ static void paint_brush_exit_tex(Brush *brush) static void paint_exit(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); - ToolSettings *settings= scene->toolsettings; - PaintOperation *pop= op->customdata; + Scene *scene = CTX_data_scene(C); + ToolSettings *settings = scene->toolsettings; + PaintOperation *pop = op->customdata; if (pop->timer) WM_event_remove_timer(CTX_wm_manager(C), CTX_wm_window(C), pop->timer); @@ -5050,34 +5050,34 @@ static int paint_exec(bContext *C, wmOperator *op) static void paint_apply_event(bContext *C, wmOperator *op, wmEvent *event) { const Scene *scene = CTX_data_scene(C); - PaintOperation *pop= op->customdata; + PaintOperation *pop = op->customdata; wmTabletData *wmtab; PointerRNA itemptr; float pressure, mousef[2]; double time; int tablet; - time= PIL_check_seconds_timer(); + time = PIL_check_seconds_timer(); - tablet= 0; - pop->s.blend= pop->s.brush->blend; + tablet = 0; + pop->s.blend = pop->s.brush->blend; if (event->custom == EVT_DATA_TABLET) { - wmtab= event->customdata; + wmtab = event->customdata; - tablet= (wmtab->Active != EVT_TABLET_NONE); - pressure= wmtab->Pressure; + tablet = (wmtab->Active != EVT_TABLET_NONE); + pressure = wmtab->Pressure; if (wmtab->Active == EVT_TABLET_ERASER) - pop->s.blend= IMB_BLEND_ERASE_ALPHA; + pop->s.blend = IMB_BLEND_ERASE_ALPHA; } else { /* otherwise airbrush becomes 1.0 pressure instantly */ - pressure= pop->prev_pressure ? pop->prev_pressure : 1.0f; + pressure = pop->prev_pressure ? pop->prev_pressure : 1.0f; } if (pop->first) { - pop->prevmouse[0]= event->mval[0]; - pop->prevmouse[1]= event->mval[1]; - pop->starttime= time; + pop->prevmouse[0] = event->mval[0]; + pop->prevmouse[1] = event->mval[1]; + pop->starttime = time; /* special exception here for too high pressure values on first touch in * windows for some tablets, then we just skip first touch .. */ @@ -5104,7 +5104,7 @@ static void paint_apply_event(bContext *C, wmOperator *op, wmEvent *event) /* apply */ paint_apply(C, op, &itemptr); - pop->prev_pressure= pressure; + pop->prev_pressure = pressure; } static int paint_invoke(bContext *C, wmOperator *op, wmEvent *event) @@ -5118,20 +5118,20 @@ static int paint_invoke(bContext *C, wmOperator *op, wmEvent *event) paint_apply_event(C, op, event); - pop= op->customdata; + pop = op->customdata; WM_event_add_modal_handler(C, op); if (pop->s.brush->flag & BRUSH_AIRBRUSH) - pop->timer= WM_event_add_timer(CTX_wm_manager(C), CTX_wm_window(C), TIMER, 0.01f); + pop->timer = WM_event_add_timer(CTX_wm_manager(C), CTX_wm_window(C), TIMER, 0.01f); return OPERATOR_RUNNING_MODAL; } static int paint_modal(bContext *C, wmOperator *op, wmEvent *event) { - PaintOperation *pop= op->customdata; + PaintOperation *pop = op->customdata; - switch(event->type) { + switch (event->type) { case LEFTMOUSE: case MIDDLEMOUSE: case RIGHTMOUSE: // XXX hardcoded @@ -5171,7 +5171,7 @@ void PAINT_OT_image_paint(wmOperatorType *ot) ot->poll = image_paint_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_BLOCKING; + ot->flag = OPTYPE_REGISTER | OPTYPE_BLOCKING; /* properties */ RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, "Stroke", ""); @@ -5179,11 +5179,11 @@ void PAINT_OT_image_paint(wmOperatorType *ot) int get_imapaint_zoom(bContext *C, float *zoomx, float *zoomy) { - RegionView3D *rv3d= CTX_wm_region_view3d(C); + RegionView3D *rv3d = CTX_wm_region_view3d(C); if (!rv3d) { - SpaceImage *sima= CTX_wm_space_image(C); - ARegion *ar= CTX_wm_region(C); + SpaceImage *sima = CTX_wm_space_image(C); + ARegion *ar = CTX_wm_region(C); ED_space_image_zoom(sima, ar, zoomx, zoomy); @@ -5202,22 +5202,22 @@ static void brush_drawcursor(bContext *C, int x, int y, void *UNUSED(customdata) #define PX_SIZE_FADE_MAX 12.0f #define PX_SIZE_FADE_MIN 4.0f - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); //Brush *brush= image_paint_brush(C); - Paint *paint= paint_get_active(scene); - Brush *brush= paint_brush(paint); + Paint *paint = paint_get_active(scene); + Brush *brush = paint_brush(paint); if (paint && brush && paint->flags & PAINT_SHOW_BRUSH) { ToolSettings *ts; float zoomx, zoomy; - const float size= (float)brush_size(scene, brush); + const float size = (float)brush_size(scene, brush); short use_zoom; float pixel_size; - float alpha= 0.5f; + float alpha = 0.5f; ts = scene->toolsettings; - use_zoom= get_imapaint_zoom(C, &zoomx, &zoomy) - && !(ts->use_uv_sculpt && (scene->basact->object->mode == OB_MODE_EDIT)); + use_zoom = get_imapaint_zoom(C, &zoomx, &zoomy) + && !(ts->use_uv_sculpt && (scene->basact->object->mode == OB_MODE_EDIT)); if (use_zoom) { pixel_size = MAX2(size * zoomx, size * zoomy); @@ -5243,11 +5243,11 @@ static void brush_drawcursor(bContext *C, int x, int y, void *UNUSED(customdata) glScalef(zoomx, zoomy, 1.0f); glColor4f(brush->add_col[0], brush->add_col[1], brush->add_col[2], alpha); - glEnable( GL_LINE_SMOOTH ); + glEnable(GL_LINE_SMOOTH); glEnable(GL_BLEND); - glutil_draw_lined_arc(0, (float)(M_PI*2.0), size, 40); + glutil_draw_lined_arc(0, (float)(M_PI * 2.0), size, 40); glDisable(GL_BLEND); - glDisable( GL_LINE_SMOOTH ); + glDisable(GL_LINE_SMOOTH); glPopMatrix(); } @@ -5257,16 +5257,16 @@ static void brush_drawcursor(bContext *C, int x, int y, void *UNUSED(customdata) static void toggle_paint_cursor(bContext *C, int enable) { - wmWindowManager *wm= CTX_wm_manager(C); + wmWindowManager *wm = CTX_wm_manager(C); Scene *scene = CTX_data_scene(C); - ToolSettings *settings= scene->toolsettings; + ToolSettings *settings = scene->toolsettings; if (settings->imapaint.paintcursor && !enable) { WM_paint_cursor_end(wm, settings->imapaint.paintcursor); settings->imapaint.paintcursor = NULL; } else if (enable) - settings->imapaint.paintcursor= WM_paint_cursor_activate(wm, image_paint_poll, brush_drawcursor, NULL); + settings->imapaint.paintcursor = WM_paint_cursor_activate(wm, image_paint_poll, brush_drawcursor, NULL); } /* enable the paint cursor if it isn't already. @@ -5280,8 +5280,8 @@ void ED_space_image_paint_update(wmWindowManager *wm, ToolSettings *settings) if (!imapaint->paintcursor) { imapaint->paintcursor = - WM_paint_cursor_activate(wm, image_paint_poll, - brush_drawcursor, NULL); + WM_paint_cursor_activate(wm, image_paint_poll, + brush_drawcursor, NULL); } } @@ -5299,7 +5299,7 @@ void ED_space_image_uv_sculpt_update(wmWindowManager *wm, ToolSettings *settings paint_init(&settings->uvsculpt->paint, PAINT_CURSOR_SCULPT); WM_paint_cursor_activate(wm, uv_sculpt_brush_poll, - brush_drawcursor, NULL); + brush_drawcursor, NULL); } else { if (settings->uvsculpt) @@ -5315,7 +5315,7 @@ typedef struct GrabClone { static void grab_clone_apply(bContext *C, wmOperator *op) { - Brush *brush= image_paint_brush(C); + Brush *brush = image_paint_brush(C); float delta[2]; RNA_float_get_array(op->ptr, "delta", delta); @@ -5332,14 +5332,14 @@ static int grab_clone_exec(bContext *C, wmOperator *op) static int grab_clone_invoke(bContext *C, wmOperator *op, wmEvent *event) { - Brush *brush= image_paint_brush(C); + Brush *brush = image_paint_brush(C); GrabClone *cmv; - cmv= MEM_callocN(sizeof(GrabClone), "GrabClone"); + cmv = MEM_callocN(sizeof(GrabClone), "GrabClone"); copy_v2_v2(cmv->startoffset, brush->clone.offset); - cmv->startx= event->x; - cmv->starty= event->y; - op->customdata= cmv; + cmv->startx = event->x; + cmv->starty = event->y; + op->customdata = cmv; WM_event_add_modal_handler(C, op); @@ -5348,13 +5348,13 @@ static int grab_clone_invoke(bContext *C, wmOperator *op, wmEvent *event) static int grab_clone_modal(bContext *C, wmOperator *op, wmEvent *event) { - Brush *brush= image_paint_brush(C); - ARegion *ar= CTX_wm_region(C); - GrabClone *cmv= op->customdata; + Brush *brush = image_paint_brush(C); + ARegion *ar = CTX_wm_region(C); + GrabClone *cmv = op->customdata; float startfx, startfy, fx, fy, delta[2]; - int xmin= ar->winrct.xmin, ymin= ar->winrct.ymin; + int xmin = ar->winrct.xmin, ymin = ar->winrct.ymin; - switch(event->type) { + switch (event->type) { case LEFTMOUSE: case MIDDLEMOUSE: case RIGHTMOUSE: // XXX hardcoded @@ -5365,8 +5365,8 @@ static int grab_clone_modal(bContext *C, wmOperator *op, wmEvent *event) UI_view2d_region_to_view(&ar->v2d, cmv->startx - xmin, cmv->starty - ymin, &startfx, &startfy); UI_view2d_region_to_view(&ar->v2d, event->x - xmin, event->y - ymin, &fx, &fy); - delta[0]= fx - startfx; - delta[1]= fy - startfy; + delta[0] = fx - startfx; + delta[1] = fy - startfy; RNA_float_set_array(op->ptr, "delta", delta); copy_v2_v2(brush->clone.offset, cmv->startoffset); @@ -5398,7 +5398,7 @@ void PAINT_OT_grab_clone(wmOperatorType *ot) ot->poll = image_paint_2d_clone_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING; /* properties */ RNA_def_float_vector(ot->srna, "delta", 2, NULL, -FLT_MAX, FLT_MAX, "Delta", "Delta offset of clone image in 0.0..1.0 coordinates", -1.0f, 1.0f); @@ -5408,15 +5408,15 @@ void PAINT_OT_grab_clone(wmOperatorType *ot) static int sample_color_exec(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); - Brush *brush= image_paint_brush(C); - ARegion *ar= CTX_wm_region(C); + Scene *scene = CTX_data_scene(C); + Brush *brush = image_paint_brush(C); + ARegion *ar = CTX_wm_region(C); int location[2]; RNA_int_get_array(op->ptr, "location", location); paint_sample_color(scene, ar, location[0], location[1]); - WM_event_add_notifier(C, NC_BRUSH|NA_EDITED, brush); + WM_event_add_notifier(C, NC_BRUSH | NA_EDITED, brush); return OPERATOR_FINISHED; } @@ -5433,7 +5433,7 @@ static int sample_color_invoke(bContext *C, wmOperator *op, wmEvent *event) static int sample_color_modal(bContext *C, wmOperator *op, wmEvent *event) { - switch(event->type) { + switch (event->type) { case LEFTMOUSE: case RIGHTMOUSE: // XXX hardcoded return OPERATOR_FINISHED; @@ -5453,7 +5453,7 @@ static int image_paint_sample_color_poll(bContext *C) if (CTX_wm_view3d(C)) { Object *obact = CTX_data_active_object(C); if (obact && obact->mode & OB_MODE_TEXTURE_PAINT) { - Mesh *me= get_mesh(obact); + Mesh *me = get_mesh(obact); if (me) { return !(me->editflag & ME_EDIT_PAINT_MASK); } @@ -5479,7 +5479,7 @@ void PAINT_OT_sample_color(wmOperatorType *ot) ot->poll = image_paint_sample_color_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ RNA_def_int_vector(ot->srna, "location", 2, NULL, 0, INT_MAX, "Location", "Cursor location in region coordinates", 0, 16384); @@ -5489,9 +5489,9 @@ void PAINT_OT_sample_color(wmOperatorType *ot) static int set_clone_cursor_exec(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); - View3D *v3d= CTX_wm_view3d(C); - float *cursor= give_cursor(scene, v3d); + Scene *scene = CTX_data_scene(C); + View3D *v3d = CTX_wm_view3d(C); + float *cursor = give_cursor(scene, v3d); RNA_float_get_array(op->ptr, "location", cursor); @@ -5502,9 +5502,9 @@ static int set_clone_cursor_exec(bContext *C, wmOperator *op) static int set_clone_cursor_invoke(bContext *C, wmOperator *op, wmEvent *event) { - Scene *scene= CTX_data_scene(C); - View3D *v3d= CTX_wm_view3d(C); - ARegion *ar= CTX_wm_region(C); + Scene *scene = CTX_data_scene(C); + View3D *v3d = CTX_wm_view3d(C); + ARegion *ar = CTX_wm_region(C); float location[3]; view3d_operator_needs_opengl(C); @@ -5529,7 +5529,7 @@ void PAINT_OT_clone_cursor_set(wmOperatorType *ot) ot->poll = image_paint_3d_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ RNA_def_float_vector(ot->srna, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location", "Cursor location in world space coordinates", -10000.0f, 10000.0f); @@ -5541,7 +5541,7 @@ static int texture_paint_toggle_poll(bContext *C) { if (CTX_data_edit_object(C)) return 0; - if (CTX_data_active_object(C)==NULL) + if (CTX_data_active_object(C) == NULL) return 0; return 1; @@ -5549,11 +5549,11 @@ static int texture_paint_toggle_poll(bContext *C) static int texture_paint_toggle_exec(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); - Object *ob= CTX_data_active_object(C); - Mesh *me= NULL; + Scene *scene = CTX_data_scene(C); + Object *ob = CTX_data_active_object(C); + Mesh *me = NULL; - if (ob==NULL) + if (ob == NULL) return OPERATOR_CANCELLED; if (object_data_is_libdata(ob)) { @@ -5561,7 +5561,7 @@ static int texture_paint_toggle_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - me= get_mesh(ob); + me = get_mesh(ob); if (!(ob->mode & OB_MODE_TEXTURE_PAINT) && !me) { BKE_report(op->reports, RPT_ERROR, "Can only enter texture paint mode for mesh objects"); @@ -5580,9 +5580,9 @@ static int texture_paint_toggle_exec(bContext *C, wmOperator *op) else { ob->mode |= OB_MODE_TEXTURE_PAINT; - if (me->mtface==NULL) - me->mtface= CustomData_add_layer(&me->fdata, CD_MTFACE, CD_DEFAULT, - NULL, me->totface); + if (me->mtface == NULL) + me->mtface = CustomData_add_layer(&me->fdata, CD_MTFACE, CD_DEFAULT, + NULL, me->totface); paint_init(&scene->toolsettings->imapaint.paint, PAINT_CURSOR_TEXTURE_PAINT); @@ -5594,7 +5594,7 @@ static int texture_paint_toggle_exec(bContext *C, wmOperator *op) } DAG_id_tag_update(&ob->id, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_SCENE|ND_MODE, scene); + WM_event_add_notifier(C, NC_SCENE | ND_MODE, scene); return OPERATOR_FINISHED; } @@ -5610,7 +5610,7 @@ void PAINT_OT_texture_paint_toggle(wmOperatorType *ot) ot->poll = texture_paint_toggle_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } static int texture_paint_poll(bContext *C) @@ -5649,37 +5649,37 @@ int mask_paint_poll(bContext *C) /* use project paint to re-apply an image */ static int texture_paint_camera_project_exec(bContext *C, wmOperator *op) { - Image *image= BLI_findlink(&CTX_data_main(C)->image, RNA_enum_get(op->ptr, "image")); - Scene *scene= CTX_data_scene(C); - ProjPaintState ps= {NULL}; + Image *image = BLI_findlink(&CTX_data_main(C)->image, RNA_enum_get(op->ptr, "image")); + Scene *scene = CTX_data_scene(C); + ProjPaintState ps = {NULL}; int orig_brush_size; IDProperty *idgroup; - IDProperty *view_data= NULL; + IDProperty *view_data = NULL; project_state_init(C, OBACT, &ps); - if (ps.ob==NULL || ps.ob->type != OB_MESH) { + if (ps.ob == NULL || ps.ob->type != OB_MESH) { BKE_report(op->reports, RPT_ERROR, "No active mesh object"); return OPERATOR_CANCELLED; } - if (image==NULL) { + if (image == NULL) { BKE_report(op->reports, RPT_ERROR, "Image could not be found"); return OPERATOR_CANCELLED; } - ps.reproject_image= image; - ps.reproject_ibuf= BKE_image_get_ibuf(image, NULL); + ps.reproject_image = image; + ps.reproject_ibuf = BKE_image_get_ibuf(image, NULL); - if (ps.reproject_ibuf==NULL || ps.reproject_ibuf->rect==NULL) { + if (ps.reproject_ibuf == NULL || ps.reproject_ibuf->rect == NULL) { BKE_report(op->reports, RPT_ERROR, "Image data could not be found"); return OPERATOR_CANCELLED; } - idgroup= IDP_GetProperties(&image->id, 0); + idgroup = IDP_GetProperties(&image->id, 0); if (idgroup) { - view_data= IDP_GetPropertyTypeFromGroup(idgroup, PROJ_VIEW_DATA_ID, IDP_ARRAY); + view_data = IDP_GetPropertyTypeFromGroup(idgroup, PROJ_VIEW_DATA_ID, IDP_ARRAY); /* type check to make sure its ok */ if (view_data->len != PROJ_VIEW_DATA_SIZE || view_data->subtype != IDP_FLOAT) { @@ -5690,52 +5690,52 @@ static int texture_paint_camera_project_exec(bContext *C, wmOperator *op) if (view_data) { /* image has stored view projection info */ - ps.source= PROJ_SRC_IMAGE_VIEW; + ps.source = PROJ_SRC_IMAGE_VIEW; } else { - ps.source= PROJ_SRC_IMAGE_CAM; + ps.source = PROJ_SRC_IMAGE_CAM; - if (scene->camera==NULL) { + if (scene->camera == NULL) { BKE_report(op->reports, RPT_ERROR, "No active camera set"); return OPERATOR_CANCELLED; } } /* override */ - ps.is_texbrush= 0; - ps.is_airbrush= 1; - orig_brush_size= brush_size(scene, ps.brush); + ps.is_texbrush = 0; + ps.is_airbrush = 1; + orig_brush_size = brush_size(scene, ps.brush); brush_set_size(scene, ps.brush, 32); /* cover the whole image */ - ps.tool= PAINT_TOOL_DRAW; /* so pixels are initialized with minimal info */ + ps.tool = PAINT_TOOL_DRAW; /* so pixels are initialized with minimal info */ scene->toolsettings->imapaint.flag |= IMAGEPAINT_DRAWING; undo_paint_push_begin(UNDO_PAINT_IMAGE, op->type->name, - image_undo_restore, image_undo_free); + image_undo_restore, image_undo_free); /* allocate and initialize spacial data structures */ project_paint_begin(&ps); - if (ps.dm==NULL) { + if (ps.dm == NULL) { brush_set_size(scene, ps.brush, orig_brush_size); return OPERATOR_CANCELLED; } else { - float pos[2]= {0.0, 0.0}; - float lastpos[2]= {0.0, 0.0}; + float pos[2] = {0.0, 0.0}; + float lastpos[2] = {0.0, 0.0}; int a; - for (a=0; a < ps.image_tot; a++) + for (a = 0; a < ps.image_tot; a++) partial_redraw_array_init(ps.projImages[a].partRedrawRect); project_paint_op(&ps, NULL, lastpos, pos); project_image_refresh_tagged(&ps); - for (a=0; a < ps.image_tot; a++) { + for (a = 0; a < ps.image_tot; a++) { GPU_free_image(ps.projImages[a].ima); - WM_event_add_notifier(C, NC_IMAGE|NA_EDITED, ps.projImages[a].ima); + WM_event_add_notifier(C, NC_IMAGE | NA_EDITED, ps.projImages[a].ima); } } @@ -5761,9 +5761,9 @@ void PAINT_OT_project_image(wmOperatorType *ot) ot->exec = texture_paint_camera_project_exec; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - prop= RNA_def_enum(ot->srna, "image", DummyRNA_NULL_items, 0, "Image", ""); + prop = RNA_def_enum(ot->srna, "image", DummyRNA_NULL_items, 0, "Image", ""); RNA_def_enum_funcs(prop, RNA_image_itemf); ot->prop = prop; } @@ -5774,21 +5774,21 @@ static int texture_paint_image_from_view_exec(bContext *C, wmOperator *op) ImBuf *ibuf; char filename[FILE_MAX]; - Scene *scene= CTX_data_scene(C); - ToolSettings *settings= scene->toolsettings; - int w= settings->imapaint.screen_grab_size[0]; - int h= settings->imapaint.screen_grab_size[1]; + Scene *scene = CTX_data_scene(C); + ToolSettings *settings = scene->toolsettings; + int w = settings->imapaint.screen_grab_size[0]; + int h = settings->imapaint.screen_grab_size[1]; int maxsize; - char err_out[256]= "unknown"; + char err_out[256] = "unknown"; RNA_string_get(op->ptr, "filepath", filename); glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxsize); - if (w > maxsize) w= maxsize; - if (h > maxsize) h= maxsize; + if (w > maxsize) w = maxsize; + if (h > maxsize) h = maxsize; - ibuf= ED_view3d_draw_offscreen_imbuf(CTX_data_scene(C), CTX_wm_view3d(C), CTX_wm_region(C), w, h, IB_rect, FALSE, err_out); + ibuf = ED_view3d_draw_offscreen_imbuf(CTX_data_scene(C), CTX_wm_view3d(C), CTX_wm_region(C), w, h, IB_rect, FALSE, err_out); if (!ibuf) { /* Mostly happens when OpenGL offscreen buffer was failed to create, */ /* but could be other reasons. Should be handled in the future. nazgul */ @@ -5796,16 +5796,16 @@ static int texture_paint_image_from_view_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - image= BKE_add_image_imbuf(ibuf); + image = BKE_add_image_imbuf(ibuf); if (image) { /* now for the trickyness. store the view projection here! * re-projection will reuse this */ - View3D *v3d= CTX_wm_view3d(C); - RegionView3D *rv3d= CTX_wm_region_view3d(C); + View3D *v3d = CTX_wm_view3d(C); + RegionView3D *rv3d = CTX_wm_region_view3d(C); IDPropertyTemplate val; - IDProperty *idgroup= IDP_GetProperties(&image->id, 1); + IDProperty *idgroup = IDP_GetProperties(&image->id, 1); IDProperty *view_data; int orth; float *array; @@ -5814,11 +5814,11 @@ static int texture_paint_image_from_view_exec(bContext *C, wmOperator *op) val.array.type = IDP_FLOAT; view_data = IDP_New(IDP_ARRAY, &val, PROJ_VIEW_DATA_ID); - array= (float *)IDP_Array(view_data); - memcpy(array, rv3d->winmat, sizeof(rv3d->winmat)); array += sizeof(rv3d->winmat)/sizeof(float); - memcpy(array, rv3d->viewmat, sizeof(rv3d->viewmat)); array += sizeof(rv3d->viewmat)/sizeof(float); - orth= project_paint_view_clip(v3d, rv3d, &array[0], &array[1]); - array[2]= orth ? 1.0f : 0.0f; /* using float for a bool is dodgy but since its an extra member in the array... easier then adding a single bool prop */ + array = (float *)IDP_Array(view_data); + memcpy(array, rv3d->winmat, sizeof(rv3d->winmat)); array += sizeof(rv3d->winmat) / sizeof(float); + memcpy(array, rv3d->viewmat, sizeof(rv3d->viewmat)); array += sizeof(rv3d->viewmat) / sizeof(float); + orth = project_paint_view_clip(v3d, rv3d, &array[0], &array[1]); + array[2] = orth ? 1.0f : 0.0f; /* using float for a bool is dodgy but since its an extra member in the array... easier then adding a single bool prop */ IDP_AddToGroup(idgroup, view_data); diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c index 046a3b374ba..3bc3c7a9224 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.c +++ b/source/blender/editors/sculpt_paint/paint_ops.c @@ -83,23 +83,23 @@ static void BRUSH_OT_add(wmOperatorType *ot) ot->exec = brush_add_exec; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } static int brush_scale_size_exec(bContext *C, wmOperator *op) { Scene *scene = CTX_data_scene(C); - Paint *paint= paint_get_active(scene); - struct Brush *brush= paint_brush(paint); + Paint *paint = paint_get_active(scene); + struct Brush *brush = paint_brush(paint); // Object *ob= CTX_data_active_object(C); - float scalar= RNA_float_get(op->ptr, "scalar"); + float scalar = RNA_float_get(op->ptr, "scalar"); if (brush) { // pixel radius { - const int old_size= brush_size(scene, brush); - int size= (int)(scalar*old_size); + const int old_size = brush_size(scene, brush); + int size = (int)(scalar * old_size); if (old_size == size) { if (scalar > 1) { @@ -116,10 +116,10 @@ static int brush_scale_size_exec(bContext *C, wmOperator *op) // unprojected radius { - float unprojected_radius= scalar*brush_unprojected_radius(scene, brush); + float unprojected_radius = scalar * brush_unprojected_radius(scene, brush); if (unprojected_radius < 0.001f) // XXX magic number - unprojected_radius= 0.001f; + unprojected_radius = 0.001f; brush_set_unprojected_radius(scene, brush, unprojected_radius); } @@ -139,7 +139,7 @@ static void BRUSH_OT_scale_size(wmOperatorType *ot) ot->exec = brush_scale_size_exec; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; RNA_def_float(ot->srna, "scalar", 1, 0, 2, "Scalar", "Factor to scale brush size by", 0, 2); } @@ -166,7 +166,7 @@ static void PAINT_OT_vertex_color_set(wmOperatorType *ot) ot->poll = vertex_paint_mode_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } static int brush_reset_exec(bContext *C, wmOperator *UNUSED(op)) @@ -195,7 +195,7 @@ static void BRUSH_OT_reset(wmOperatorType *ot) ot->exec = brush_reset_exec; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } static int brush_tool(const Brush *brush, size_t tool_offset) @@ -208,16 +208,17 @@ static Brush *brush_tool_cycle(Main *bmain, Brush *brush_orig, const int tool, c { struct Brush *brush; - if (!brush_orig && !(brush_orig= bmain->brush.first)) { + if (!brush_orig && !(brush_orig = bmain->brush.first)) { return NULL; } /* get the next brush with the active tool */ - for (brush= brush_orig->id.next ? brush_orig->id.next : bmain->brush.first; - brush != brush_orig; - brush= brush->id.next ? brush->id.next : bmain->brush.first) { + for (brush = brush_orig->id.next ? brush_orig->id.next : bmain->brush.first; + brush != brush_orig; + brush = brush->id.next ? brush->id.next : bmain->brush.first) + { if ((brush->ob_mode & ob_mode) && - (brush_tool(brush, tool_offset) == tool)) { + (brush_tool(brush, tool_offset) == tool)) { return brush; } } @@ -227,13 +228,13 @@ static Brush *brush_tool_cycle(Main *bmain, Brush *brush_orig, const int tool, c static int brush_generic_tool_set(Main *bmain, Paint *paint, const int tool, const size_t tool_offset, const int ob_mode) { - struct Brush *brush, *brush_orig= paint_brush(paint); + struct Brush *brush, *brush_orig = paint_brush(paint); - brush= brush_tool_cycle(bmain, brush_orig, tool, tool_offset, ob_mode); + brush = brush_tool_cycle(bmain, brush_orig, tool, tool_offset, ob_mode); if (brush) { paint_brush_set(paint, brush); - WM_main_add_notifier(NC_BRUSH|NA_EDITED, brush); + WM_main_add_notifier(NC_BRUSH | NA_EDITED, brush); return OPERATOR_FINISHED; } else { @@ -246,46 +247,46 @@ static int brush_generic_tool_set(Main *bmain, Paint *paint, const int tool, con static int brush_select_exec(bContext *C, wmOperator *op) { - Main *bmain= CTX_data_main(C); - ToolSettings *toolsettings= CTX_data_tool_settings(C); - Paint *paint= NULL; - int tool, paint_mode= RNA_enum_get(op->ptr, "paint_mode"); + Main *bmain = CTX_data_main(C); + ToolSettings *toolsettings = CTX_data_tool_settings(C); + Paint *paint = NULL; + int tool, paint_mode = RNA_enum_get(op->ptr, "paint_mode"); size_t tool_offset; if (paint_mode == OB_MODE_ACTIVE) { /* select current paint mode */ paint_mode = CTX_data_active_object(C)->mode & - (OB_MODE_SCULPT| - OB_MODE_VERTEX_PAINT| - OB_MODE_WEIGHT_PAINT| - OB_MODE_TEXTURE_PAINT); + (OB_MODE_SCULPT | + OB_MODE_VERTEX_PAINT | + OB_MODE_WEIGHT_PAINT | + OB_MODE_TEXTURE_PAINT); } - switch(paint_mode) { - case OB_MODE_SCULPT: - paint= &toolsettings->sculpt->paint; - tool_offset= offsetof(Brush, sculpt_tool); - tool= RNA_enum_get(op->ptr, "sculpt_tool"); - break; - case OB_MODE_VERTEX_PAINT: - paint= &toolsettings->vpaint->paint; - tool_offset= offsetof(Brush, vertexpaint_tool); - tool= RNA_enum_get(op->ptr, "vertex_paint_tool"); - break; - case OB_MODE_WEIGHT_PAINT: - paint= &toolsettings->wpaint->paint; - /* vertexpaint_tool is used for weight paint mode */ - tool_offset= offsetof(Brush, vertexpaint_tool); - tool= RNA_enum_get(op->ptr, "weight_paint_tool"); - break; - case OB_MODE_TEXTURE_PAINT: - paint= &toolsettings->imapaint.paint; - tool_offset= offsetof(Brush, imagepaint_tool); - tool= RNA_enum_get(op->ptr, "texture_paint_tool"); - break; - default: - /* invalid paint mode */ - return OPERATOR_CANCELLED; + switch (paint_mode) { + case OB_MODE_SCULPT: + paint = &toolsettings->sculpt->paint; + tool_offset = offsetof(Brush, sculpt_tool); + tool = RNA_enum_get(op->ptr, "sculpt_tool"); + break; + case OB_MODE_VERTEX_PAINT: + paint = &toolsettings->vpaint->paint; + tool_offset = offsetof(Brush, vertexpaint_tool); + tool = RNA_enum_get(op->ptr, "vertex_paint_tool"); + break; + case OB_MODE_WEIGHT_PAINT: + paint = &toolsettings->wpaint->paint; + /* vertexpaint_tool is used for weight paint mode */ + tool_offset = offsetof(Brush, vertexpaint_tool); + tool = RNA_enum_get(op->ptr, "weight_paint_tool"); + break; + case OB_MODE_TEXTURE_PAINT: + paint = &toolsettings->imapaint.paint; + tool_offset = offsetof(Brush, imagepaint_tool); + tool = RNA_enum_get(op->ptr, "texture_paint_tool"); + break; + default: + /* invalid paint mode */ + return OPERATOR_CANCELLED; } return brush_generic_tool_set(bmain, paint, tool, tool_offset, paint_mode); @@ -299,7 +300,8 @@ static void PAINT_OT_brush_select(wmOperatorType *ot) {OB_MODE_VERTEX_PAINT, "VERTEX_PAINT", ICON_VPAINT_HLT, "Vertex Paint", ""}, {OB_MODE_WEIGHT_PAINT, "WEIGHT_PAINT", ICON_WPAINT_HLT, "Weight Paint", ""}, {OB_MODE_TEXTURE_PAINT, "TEXTURE_PAINT", ICON_TPAINT_HLT, "Texture Paint", ""}, - {0, NULL, 0, NULL, NULL}}; + {0, NULL, 0, NULL, NULL} + }; /* identifiers */ ot->name = "Brush Select"; @@ -310,7 +312,7 @@ static void PAINT_OT_brush_select(wmOperatorType *ot) ot->exec = brush_select_exec; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ RNA_def_enum(ot->srna, "paint_mode", paint_mode_items, OB_MODE_ACTIVE, "Paint Mode", ""); @@ -321,28 +323,28 @@ static void PAINT_OT_brush_select(wmOperatorType *ot) } static wmKeyMapItem *keymap_brush_select(wmKeyMap *keymap, int paint_mode, - int tool, int keymap_type, - int keymap_modifier) + int tool, int keymap_type, + int keymap_modifier) { wmKeyMapItem *kmi; kmi = WM_keymap_add_item(keymap, "PAINT_OT_brush_select", - keymap_type, KM_PRESS, keymap_modifier, 0); + keymap_type, KM_PRESS, keymap_modifier, 0); RNA_enum_set(kmi->ptr, "paint_mode", paint_mode); - switch(paint_mode) { - case OB_MODE_SCULPT: - RNA_enum_set(kmi->ptr, "sculpt_tool", tool); - break; - case OB_MODE_VERTEX_PAINT: - RNA_enum_set(kmi->ptr, "vertex_paint_tool", tool); - break; - case OB_MODE_WEIGHT_PAINT: - RNA_enum_set(kmi->ptr, "weight_paint_tool", tool); - break; - case OB_MODE_TEXTURE_PAINT: - RNA_enum_set(kmi->ptr, "texture_paint_tool", tool); - break; + switch (paint_mode) { + case OB_MODE_SCULPT: + RNA_enum_set(kmi->ptr, "sculpt_tool", tool); + break; + case OB_MODE_VERTEX_PAINT: + RNA_enum_set(kmi->ptr, "vertex_paint_tool", tool); + break; + case OB_MODE_WEIGHT_PAINT: + RNA_enum_set(kmi->ptr, "weight_paint_tool", tool); + break; + case OB_MODE_TEXTURE_PAINT: + RNA_enum_set(kmi->ptr, "texture_paint_tool", tool); + break; } return kmi; @@ -351,12 +353,12 @@ static wmKeyMapItem *keymap_brush_select(wmKeyMap *keymap, int paint_mode, static int brush_uv_sculpt_tool_set_exec(bContext *C, wmOperator *op) { Brush *brush; - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); ToolSettings *ts = scene->toolsettings; ts->uv_sculpt_tool = RNA_enum_get(op->ptr, "tool"); brush = ts->uvsculpt->paint.brush; /* To update toolshelf */ - WM_event_add_notifier(C, NC_BRUSH|NA_EDITED, brush); + WM_event_add_notifier(C, NC_BRUSH | NA_EDITED, brush); return OPERATOR_FINISHED; } @@ -444,7 +446,7 @@ static void ed_keymap_paint_brush_switch(wmKeyMap *keymap, const char *mode) /* index 0-9 (zero key is tenth), shift key for index 10-19 */ for (i = 0; i < 20; i++) { kmi = WM_keymap_add_item(keymap, "BRUSH_OT_active_index_set", - ZEROKEY + ((i + 1) % 10), KM_PRESS, i < 10 ? 0 : KM_SHIFT, 0); + ZEROKEY + ((i + 1) % 10), KM_PRESS, i < 10 ? 0 : KM_SHIFT, 0); RNA_string_set(kmi->ptr, "mode", mode); RNA_int_set(kmi->ptr, "index", i); } @@ -458,7 +460,7 @@ static void ed_keymap_paint_brush_size(wmKeyMap *keymap, const char *UNUSED(path RNA_float_set(kmi->ptr, "scalar", 0.9); kmi = WM_keymap_add_item(keymap, "BRUSH_OT_scale_size", RIGHTBRACKETKEY, KM_PRESS, 0, 0); - RNA_float_set(kmi->ptr, "scalar", 10.0/9.0); // 1.1111.... + RNA_float_set(kmi->ptr, "scalar", 10.0 / 9.0); // 1.1111.... } typedef enum { @@ -468,7 +470,7 @@ typedef enum { } RCFlags; static void set_brush_rc_path(PointerRNA *ptr, const char *brush_path, - const char *output_name, const char *input_name) + const char *output_name, const char *input_name) { char *path; @@ -478,8 +480,8 @@ static void set_brush_rc_path(PointerRNA *ptr, const char *brush_path, } static void set_brush_rc_props(PointerRNA *ptr, const char *paint, - const char *prop, const char *secondary_prop, - RCFlags flags) + const char *prop, const char *secondary_prop, + RCFlags flags) { const char *ups_path = "tool_settings.unified_paint_settings"; char *brush_path; @@ -512,7 +514,7 @@ static void set_brush_rc_props(PointerRNA *ptr, const char *paint, } static void ed_keymap_paint_brush_radial_control(wmKeyMap *keymap, const char *paint, - RCFlags flags) + RCFlags flags) { wmKeyMapItem *kmi; @@ -561,8 +563,8 @@ void ED_keymap_paint(wmKeyConfig *keyconf) /* Partial visibility, sculpt-only for now */ paint_partial_visibility_keys(keymap); - for (i=0; i<=5; i++) - RNA_int_set(WM_keymap_add_item(keymap, "OBJECT_OT_subdivision_set", ZEROKEY+i, KM_PRESS, KM_CTRL, 0)->ptr, "level", i); + for (i = 0; i <= 5; i++) + RNA_int_set(WM_keymap_add_item(keymap, "OBJECT_OT_subdivision_set", ZEROKEY + i, KM_PRESS, KM_CTRL, 0)->ptr, "level", i); /* multires switch */ kmi = WM_keymap_add_item(keymap, "OBJECT_OT_subdivision_set", PAGEUPKEY, KM_PRESS, 0, 0); @@ -605,7 +607,7 @@ void ED_keymap_paint(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "PAINT_OT_sample_color", RIGHTMOUSE, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, - "PAINT_OT_vertex_color_set",KKEY, KM_PRESS, KM_SHIFT, 0); + "PAINT_OT_vertex_color_set", KKEY, KM_PRESS, KM_SHIFT, 0); ed_keymap_paint_brush_switch(keymap, "vertex_paint"); ed_keymap_paint_brush_size(keymap, "tool_settings.vertex_paint.brush.size"); @@ -625,7 +627,7 @@ void ED_keymap_paint(wmKeyConfig *keyconf) WM_keymap_verify_item(keymap, "PAINT_OT_weight_sample_group", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_item(keymap, - "PAINT_OT_weight_set", KKEY, KM_PRESS, KM_SHIFT, 0); + "PAINT_OT_weight_set", KKEY, KM_PRESS, KM_SHIFT, 0); ed_keymap_paint_brush_switch(keymap, "weight_paint"); ed_keymap_paint_brush_size(keymap, "tool_settings.weight_paint.brush.size"); @@ -649,7 +651,7 @@ void ED_keymap_paint(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "VIEW3D_OT_select_border", BKEY, KM_PRESS, 0, 0); kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL, 0); RNA_boolean_set(kmi->ptr, "deselect", FALSE); - kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_SHIFT|KM_CTRL, 0); + kmi = WM_keymap_add_item(keymap, "VIEW3D_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_SHIFT | KM_CTRL, 0); RNA_boolean_set(kmi->ptr, "deselect", TRUE); WM_keymap_add_item(keymap, "VIEW3D_OT_select_circle", CKEY, KM_PRESS, 0, 0); @@ -664,7 +666,7 @@ void ED_keymap_paint(wmKeyConfig *keyconf) ed_keymap_paint_brush_switch(keymap, "image_paint"); ed_keymap_paint_brush_size(keymap, "tool_settings.image_paint.brush.size"); - ed_keymap_paint_brush_radial_control(keymap, "image_paint", RC_COLOR|RC_ZOOM); + ed_keymap_paint_brush_radial_control(keymap, "image_paint", RC_COLOR | RC_ZOOM); kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", MKEY, KM_PRESS, 0, 0); /* mask toggle */ RNA_string_set(kmi->ptr, "data_path", "image_paint_object.data.use_paint_mask"); diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c index 28fee887cd8..fb640346a99 100644 --- a/source/blender/editors/sculpt_paint/paint_stroke.c +++ b/source/blender/editors/sculpt_paint/paint_stroke.c @@ -98,7 +98,7 @@ static void paint_draw_smooth_stroke(bContext *C, int x, int y, void *customdata if (stroke && brush && (brush->flag & BRUSH_SMOOTH_STROKE)) { ARegion *ar = CTX_wm_region(C); sdrawline(x, y, (int)stroke->last_mouse_position[0] - ar->winrct.xmin, - (int)stroke->last_mouse_position[1] - ar->winrct.ymin); + (int)stroke->last_mouse_position[1] - ar->winrct.ymin); } glDisable(GL_BLEND); @@ -113,7 +113,7 @@ static float event_tablet_data(wmEvent *event, int *pen_flip) float pressure = 1; if (event->custom == EVT_DATA_TABLET) { - wmTabletData *wmtab= event->customdata; + wmTabletData *wmtab = event->customdata; erasor = (wmtab->Active == EVT_TABLET_ERASER); pressure = (wmtab->Active != EVT_TABLET_NONE) ? wmtab->Pressure : 1; @@ -197,7 +197,7 @@ static int paint_smooth_stroke(PaintStroke *stroke, float output[2], wmEvent *ev /* If the mouse is moving within the radius of the last move, * don't update the mouse position. This allows sharp turns. */ - if (dx*dx + dy*dy < stroke->brush->smooth_stroke_radius * stroke->brush->smooth_stroke_radius) + if (dx * dx + dy * dy < stroke->brush->smooth_stroke_radius * stroke->brush->smooth_stroke_radius) return 0; output[0] = event->x * v + stroke->last_mouse_position[0] * u; @@ -228,14 +228,14 @@ static int paint_space_stroke(bContext *C, wmOperator *op, wmEvent *event, const const Scene *scene = CTX_data_scene(C); int steps; int i; - float pressure= 1.0f; + float pressure = 1.0f; /* XXX mysterious :) what has 'use size' do with this here... if you don't check for it, pressure fails */ if (brush_use_size_pressure(scene, stroke->brush)) pressure = event_tablet_data(event, NULL); if (pressure > FLT_EPSILON) { - scale = (brush_size(scene, stroke->brush)*pressure*stroke->brush->spacing/50.0f) / length; + scale = (brush_size(scene, stroke->brush) * pressure * stroke->brush->spacing / 50.0f) / length; if (scale > FLT_EPSILON) { mul_v2_fl(vec, scale); @@ -256,10 +256,10 @@ static int paint_space_stroke(bContext *C, wmOperator *op, wmEvent *event, const /**** Public API ****/ PaintStroke *paint_stroke_new(bContext *C, - StrokeGetLocation get_location, - StrokeTestStart test_start, - StrokeUpdateStep update_step, - StrokeDone done, int event_type) + StrokeGetLocation get_location, + StrokeTestStart test_start, + StrokeUpdateStep update_step, + StrokeDone done, int event_type) { PaintStroke *stroke = MEM_callocN(sizeof(PaintStroke), "PaintStroke"); @@ -271,7 +271,7 @@ PaintStroke *paint_stroke_new(bContext *C, stroke->test_start = test_start; stroke->update_step = update_step; stroke->done = done; - stroke->event_type= event_type; /* for modal, return event */ + stroke->event_type = event_type; /* for modal, return event */ return stroke; } @@ -293,7 +293,7 @@ int paint_stroke_modal(bContext *C, wmOperator *op, wmEvent *event) { PaintStroke *stroke = op->customdata; float mouse[2]; - int first= 0; + int first = 0; // let NDOF motion pass through to the 3D view so we can paint and rotate simultaneously! // this isn't perfect... even when an extra MOUSEMOVE is spoofed, the stroke discards it @@ -309,13 +309,13 @@ int paint_stroke_modal(bContext *C, wmOperator *op, wmEvent *event) if (stroke->stroke_started) { stroke->smooth_stroke_cursor = - WM_paint_cursor_activate(CTX_wm_manager(C), paint_poll, paint_draw_smooth_stroke, stroke); + WM_paint_cursor_activate(CTX_wm_manager(C), paint_poll, paint_draw_smooth_stroke, stroke); if (stroke->brush->flag & BRUSH_AIRBRUSH) stroke->timer = WM_event_add_timer(CTX_wm_manager(C), CTX_wm_window(C), TIMER, stroke->brush->rate); } - first= 1; + first = 1; //ED_region_tag_redraw(ar); } @@ -331,7 +331,7 @@ int paint_stroke_modal(bContext *C, wmOperator *op, wmEvent *event) MEM_freeN(stroke); return OPERATOR_FINISHED; } - else if ( (first) || + else if ((first) || (ELEM(event->type, MOUSEMOVE, INBETWEEN_MOUSEMOVE)) || (event->type == TIMER && (event->customdata == stroke->timer)) ) { @@ -347,7 +347,7 @@ int paint_stroke_modal(bContext *C, wmOperator *op, wmEvent *event) } } else { - ;//ED_region_tag_redraw(ar); + ; //ED_region_tag_redraw(ar); } } } @@ -355,10 +355,10 @@ int paint_stroke_modal(bContext *C, wmOperator *op, wmEvent *event) /* we want the stroke to have the first daub at the start location * instead of waiting till we have moved the space distance */ if (first && - stroke->stroke_started && - paint_space_stroke_enabled(stroke->brush) && - !(stroke->brush->flag & BRUSH_ANCHORED) && - !(stroke->brush->flag & BRUSH_SMOOTH_STROKE)) + stroke->stroke_started && + paint_space_stroke_enabled(stroke->brush) && + !(stroke->brush->flag & BRUSH_ANCHORED) && + !(stroke->brush->flag & BRUSH_SMOOTH_STROKE)) { paint_brush_stroke_add_step(C, op, event, mouse); } @@ -374,7 +374,7 @@ int paint_stroke_exec(bContext *C, wmOperator *op) if (stroke->stroke_started == 0) { /* XXX stroke->last_mouse_position is unset, this may cause problems */ stroke->test_start(C, op, NULL); - stroke->stroke_started= 1; + stroke->stroke_started = 1; } RNA_BEGIN(op->ptr, itemptr, "stroke") { @@ -424,6 +424,6 @@ int paint_poll(bContext *C) Object *ob = CTX_data_active_object(C); return p && ob && paint_brush(p) && - CTX_wm_area(C)->spacetype == SPACE_VIEW3D && - CTX_wm_region(C)->regiontype == RGN_TYPE_WINDOW; + CTX_wm_area(C)->spacetype == SPACE_VIEW3D && + CTX_wm_region(C)->regiontype == RGN_TYPE_WINDOW; } diff --git a/source/blender/editors/sculpt_paint/paint_undo.c b/source/blender/editors/sculpt_paint/paint_undo.c index 8406c8b20af..fbf83dd8df5 100644 --- a/source/blender/editors/sculpt_paint/paint_undo.c +++ b/source/blender/editors/sculpt_paint/paint_undo.c @@ -45,7 +45,7 @@ #include "paint_intern.h" -#define MAXUNDONAME 64 +#define MAXUNDONAME 64 typedef struct UndoElem { struct UndoElem *next, *prev; @@ -94,31 +94,31 @@ static void undo_stack_push_begin(UndoStack *stack, const char *name, UndoRestor /* remove all undos after (also when stack->current==NULL) */ while (stack->elems.last != stack->current) { - uel= stack->elems.last; + uel = stack->elems.last; undo_elem_free(stack, uel); BLI_freelinkN(&stack->elems, uel); } /* make new */ - stack->current= uel= MEM_callocN(sizeof(UndoElem), "undo file"); - uel->restore= restore; - uel->free= free; + stack->current = uel = MEM_callocN(sizeof(UndoElem), "undo file"); + uel->restore = restore; + uel->free = free; BLI_addtail(&stack->elems, uel); /* name can be a dynamic string */ BLI_strncpy(uel->name, name, sizeof(uel->name)); /* limit amount to the maximum amount*/ - nr= 0; - uel= stack->elems.last; + nr = 0; + uel = stack->elems.last; while (uel) { nr++; - if (nr==U.undosteps) break; - uel= uel->prev; + if (nr == U.undosteps) break; + uel = uel->prev; } if (uel) { - while (stack->elems.first!=uel) { - UndoElem *first= stack->elems.first; + while (stack->elems.first != uel) { + UndoElem *first = stack->elems.first; undo_elem_free(stack, first); BLI_freelinkN(&stack->elems, first); } @@ -132,19 +132,19 @@ static void undo_stack_push_end(UndoStack *stack) if (U.undomemory != 0) { /* limit to maximum memory (afterwards, we can't know in advance) */ - totmem= 0; - maxmem= ((uintptr_t)U.undomemory)*1024*1024; + totmem = 0; + maxmem = ((uintptr_t)U.undomemory) * 1024 * 1024; - uel= stack->elems.last; + uel = stack->elems.last; while (uel) { - totmem+= uel->undosize; - if (totmem>maxmem) break; - uel= uel->prev; + totmem += uel->undosize; + if (totmem > maxmem) break; + uel = uel->prev; } if (uel) { - while (stack->elems.first!=uel) { - UndoElem *first= stack->elems.first; + while (stack->elems.first != uel) { + UndoElem *first = stack->elems.first; undo_elem_free(stack, first); BLI_freelinkN(&stack->elems, first); } @@ -156,24 +156,24 @@ static int undo_stack_step(bContext *C, UndoStack *stack, int step, const char * { UndoElem *undo; - if (step==1) { - if (stack->current==NULL); + if (step == 1) { + if (stack->current == NULL) ; else { if (!name || strcmp(stack->current->name, name) == 0) { if (G.f & G_DEBUG) printf("undo %s\n", stack->current->name); undo_restore(C, stack, stack->current); - stack->current= stack->current->prev; + stack->current = stack->current->prev; return 1; } } } - else if (step==-1) { - if ((stack->current!=NULL && stack->current->next==NULL) || stack->elems.first==NULL); + else if (step == -1) { + if ((stack->current != NULL && stack->current->next == NULL) || stack->elems.first == NULL) ; else { if (!name || strcmp(stack->current->name, name) == 0) { - undo= (stack->current && stack->current->next)? stack->current->next: stack->elems.first; + undo = (stack->current && stack->current->next) ? stack->current->next : stack->elems.first; undo_restore(C, stack, undo); - stack->current= undo; + stack->current = undo; if (G.f & G_DEBUG) printf("redo %s\n", undo->name); return 1; } @@ -187,11 +187,11 @@ static void undo_stack_free(UndoStack *stack) { UndoElem *uel; - for (uel=stack->elems.first; uel; uel=uel->next) + for (uel = stack->elems.first; uel; uel = uel->next) undo_elem_free(stack, uel); BLI_freelistN(&stack->elems); - stack->current= NULL; + stack->current = NULL; } /* Exported Functions */ @@ -249,13 +249,13 @@ int ED_undo_paint_valid(int type, const char *name) UndoStack *stack; if (type == UNDO_PAINT_IMAGE) - stack= &ImageUndoStack; + stack = &ImageUndoStack; else if (type == UNDO_PAINT_MESH) - stack= &MeshUndoStack; + stack = &MeshUndoStack; else return 0; - if (stack->current==NULL); + if (stack->current == NULL) ; else { if (name && strcmp(stack->current->name, name) == 0) return 1; diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c index eac0434d255..6a31e96b51b 100644 --- a/source/blender/editors/sculpt_paint/paint_utils.c +++ b/source/blender/editors/sculpt_paint/paint_utils.c @@ -71,11 +71,11 @@ * its minimum and maximum corners) into a screen-space rectangle, * returns zero if the result is empty */ int paint_convert_bb_to_rect(rcti *rect, - const float bb_min[3], - const float bb_max[3], - const ARegion *ar, - RegionView3D *rv3d, - Object *ob) + const float bb_min[3], + const float bb_max[3], + const ARegion *ar, + RegionView3D *rv3d, + Object *ob) { float projection_mat[4][4]; int i, j, k; @@ -115,10 +115,10 @@ int paint_convert_bb_to_rect(rcti *rect, * screen_rect from screen into object-space (essentially converting a * 2D screens-space bounding box into four 3D planes) */ void paint_calc_redraw_planes(float planes[4][4], - const ARegion *ar, - RegionView3D *rv3d, - Object *ob, - const rcti *screen_rect) + const ARegion *ar, + RegionView3D *rv3d, + Object *ob, + const rcti *screen_rect) { BoundBox bb; bglMats mats; @@ -145,14 +145,14 @@ void projectf(bglMats *mats, const float v[3], float p[2]) { double ux, uy, uz; - gluProject(v[0],v[1],v[2], mats->modelview, mats->projection, - (GLint *)mats->viewport, &ux, &uy, &uz); - p[0]= ux; - p[1]= uy; + gluProject(v[0], v[1], v[2], mats->modelview, mats->projection, + (GLint *)mats->viewport, &ux, &uy, &uz); + p[0] = ux; + p[1] = uy; } float paint_calc_object_space_radius(ViewContext *vc, const float center[3], - float pixel_radius) + float pixel_radius) { Object *ob = vc->obact; float delta[3], scale, loc[3]; @@ -162,17 +162,17 @@ float paint_calc_object_space_radius(ViewContext *vc, const float center[3], initgrabz(vc->rv3d, loc[0], loc[1], loc[2]); - mval_f[0]= pixel_radius; - mval_f[1]= 0.0f; + mval_f[0] = pixel_radius; + mval_f[1] = 0.0f; ED_view3d_win_to_delta(vc->ar, mval_f, delta); - scale= fabsf(mat4_to_scale(ob->obmat)); - scale= (scale == 0.0f)? 1.0f: scale; + scale = fabsf(mat4_to_scale(ob->obmat)); + scale = (scale == 0.0f) ? 1.0f : scale; - return len_v3(delta)/scale; + return len_v3(delta) / scale; } -float paint_get_tex_pixel(Brush* br, float u, float v) +float paint_get_tex_pixel(Brush *br, float u, float v) { TexResult texres; float co[3]; @@ -186,7 +186,7 @@ float paint_get_tex_pixel(Brush* br, float u, float v) hasrgb = multitex_ext(br->mtex.tex, co, NULL, NULL, 0, &texres); if (hasrgb & TEX_RGB) - texres.tin = (0.35f*texres.tr + 0.45f*texres.tg + 0.2f*texres.tb)*texres.ta; + texres.tin = (0.35f * texres.tr + 0.45f * texres.tg + 0.2f * texres.tb) * texres.ta; return texres.tin; } @@ -196,7 +196,7 @@ float paint_get_tex_pixel(Brush* br, float u, float v) static void imapaint_project(Object *ob, float model[][4], float proj[][4], const float co[3], float pco[4]) { copy_v3_v3(pco, co); - pco[3]= 1.0f; + pco[3] = 1.0f; mul_m4_v3(ob->obmat, pco); mul_m4_v3(model, pco); @@ -225,16 +225,16 @@ static void imapaint_tri_weights(Object *ob, imapaint_project(ob, model, proj, v3, pv3); /* do inverse view mapping, see gluProject man page */ - h[0]= (co[0] - view[0])*2.0f/view[2] - 1; - h[1]= (co[1] - view[1])*2.0f/view[3] - 1; - h[2]= 1.0f; + h[0] = (co[0] - view[0]) * 2.0f / view[2] - 1; + h[1] = (co[1] - view[1]) * 2.0f / view[3] - 1; + h[2] = 1.0f; /* solve for (w1,w2,w3)/perspdiv in: * h * perspdiv = Project * Model * (w1 * v1 + w2 * v2 + w3 * v3) */ - wmat[0][0]= pv1[0]; wmat[1][0]= pv2[0]; wmat[2][0]= pv3[0]; - wmat[0][1]= pv1[1]; wmat[1][1]= pv2[1]; wmat[2][1]= pv3[1]; - wmat[0][2]= pv1[3]; wmat[1][2]= pv2[3]; wmat[2][2]= pv3[3]; + wmat[0][0] = pv1[0]; wmat[1][0] = pv2[0]; wmat[2][0] = pv3[0]; + wmat[0][1] = pv1[1]; wmat[1][1] = pv2[1]; wmat[2][1] = pv3[1]; + wmat[0][2] = pv1[3]; wmat[1][2] = pv2[3]; wmat[2][2] = pv3[3]; invert_m3_m3(invwmat, wmat); mul_m3_v3(invwmat, h); @@ -242,9 +242,9 @@ static void imapaint_tri_weights(Object *ob, copy_v3_v3(w, h); /* w is still divided by perspdiv, make it sum to one */ - divw= w[0] + w[1] + w[2]; + divw = w[0] + w[1] + w[2]; if (divw != 0.0f) { - mul_v3_fl(w, 1.0f/divw); + mul_v3_fl(w, 1.0f / divw); } } @@ -264,7 +264,7 @@ void imapaint_pick_uv(Scene *scene, Object *ob, unsigned int faceindex, const in /* test all faces in the derivedmesh with the original index of the picked face */ for (a = 0; a < numfaces; a++) { - findex= index ? index[a]: a; + findex = index ? index[a] : a; if (findex == faceindex) { dm->getTessFace(dm, a, &mf); @@ -275,36 +275,36 @@ void imapaint_pick_uv(Scene *scene, Object *ob, unsigned int faceindex, const in if (mf.v4) dm->getVert(dm, mf.v4, &mv[3]); - tf= &tface[a]; + tf = &tface[a]; - p[0]= xy[0]; - p[1]= xy[1]; + p[0] = xy[0]; + p[1] = xy[1]; if (mf.v4) { /* the triangle with the largest absolute values is the one * with the most negative weights */ imapaint_tri_weights(ob, mv[0].co, mv[1].co, mv[3].co, p, w); - absw= fabs(w[0]) + fabs(w[1]) + fabs(w[2]); + absw = fabs(w[0]) + fabs(w[1]) + fabs(w[2]); if (absw < minabsw) { - uv[0]= tf->uv[0][0]*w[0] + tf->uv[1][0]*w[1] + tf->uv[3][0]*w[2]; - uv[1]= tf->uv[0][1]*w[0] + tf->uv[1][1]*w[1] + tf->uv[3][1]*w[2]; + uv[0] = tf->uv[0][0] * w[0] + tf->uv[1][0] * w[1] + tf->uv[3][0] * w[2]; + uv[1] = tf->uv[0][1] * w[0] + tf->uv[1][1] * w[1] + tf->uv[3][1] * w[2]; minabsw = absw; } imapaint_tri_weights(ob, mv[1].co, mv[2].co, mv[3].co, p, w); - absw= fabs(w[0]) + fabs(w[1]) + fabs(w[2]); + absw = fabs(w[0]) + fabs(w[1]) + fabs(w[2]); if (absw < minabsw) { - uv[0]= tf->uv[1][0]*w[0] + tf->uv[2][0]*w[1] + tf->uv[3][0]*w[2]; - uv[1]= tf->uv[1][1]*w[0] + tf->uv[2][1]*w[1] + tf->uv[3][1]*w[2]; + uv[0] = tf->uv[1][0] * w[0] + tf->uv[2][0] * w[1] + tf->uv[3][0] * w[2]; + uv[1] = tf->uv[1][1] * w[0] + tf->uv[2][1] * w[1] + tf->uv[3][1] * w[2]; minabsw = absw; } } else { imapaint_tri_weights(ob, mv[0].co, mv[1].co, mv[2].co, p, w); - absw= fabs(w[0]) + fabs(w[1]) + fabs(w[2]); + absw = fabs(w[0]) + fabs(w[1]) + fabs(w[2]); if (absw < minabsw) { - uv[0]= tf->uv[0][0]*w[0] + tf->uv[1][0]*w[1] + tf->uv[2][0]*w[2]; - uv[1]= tf->uv[0][1]*w[0] + tf->uv[1][1]*w[1] + tf->uv[2][1]*w[2]; + uv[0] = tf->uv[0][0] * w[0] + tf->uv[1][0] * w[1] + tf->uv[2][0] * w[2]; + uv[1] = tf->uv[0][1] * w[0] + tf->uv[1][1] * w[1] + tf->uv[2][1] * w[2]; minabsw = absw; } } @@ -333,7 +333,7 @@ int imapaint_pick_face(ViewContext *vc, const int mval[2], unsigned int *index, } /* used for both 3d view and image window */ -void paint_sample_color(Scene *scene, ARegion *ar, int x, int y) /* frontbuf */ +void paint_sample_color(Scene *scene, ARegion *ar, int x, int y) /* frontbuf */ { Brush *br = paint_brush(paint_get_active(scene)); unsigned int col; @@ -343,15 +343,15 @@ void paint_sample_color(Scene *scene, ARegion *ar, int x, int y) /* frontbuf */ CLAMP(y, 0, ar->winy); glReadBuffer(GL_FRONT); - glReadPixels(x+ar->winrct.xmin, y+ar->winrct.ymin, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &col); + glReadPixels(x + ar->winrct.xmin, y + ar->winrct.ymin, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &col); glReadBuffer(GL_BACK); cp = (char *)&col; if (br) { - br->rgb[0]= cp[0]/255.0f; - br->rgb[1]= cp[1]/255.0f; - br->rgb[2]= cp[2]/255.0f; + br->rgb[0] = cp[0] / 255.0f; + br->rgb[1] = cp[1] / 255.0f; + br->rgb[2] = cp[2] / 255.0f; } } @@ -388,7 +388,7 @@ void BRUSH_OT_curve_preset(wmOperatorType *ot) ot->exec = brush_curve_preset_exec; ot->poll = brush_curve_preset_poll; - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; RNA_def_enum(ot->srna, "shape", prop_shape_items, CURVE_PRESET_SMOOTH, "Mode", ""); } @@ -411,12 +411,12 @@ void PAINT_OT_face_select_linked(wmOperatorType *ot) ot->exec = paint_select_linked_exec; ot->poll = facemask_paint_poll; - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } static int paint_select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent *event) { - int mode= RNA_boolean_get(op->ptr, "extend") ? 1:0; + int mode = RNA_boolean_get(op->ptr, "extend") ? 1 : 0; paintface_select_linked(C, CTX_data_active_object(C), event->mval, mode); ED_region_tag_redraw(CTX_wm_region(C)); return OPERATOR_FINISHED; @@ -431,7 +431,7 @@ void PAINT_OT_face_select_linked_pick(wmOperatorType *ot) ot->invoke = paint_select_linked_pick_invoke; ot->poll = facemask_paint_poll; - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend the existing selection"); } @@ -439,7 +439,7 @@ void PAINT_OT_face_select_linked_pick(wmOperatorType *ot) static int face_select_all_exec(bContext *C, wmOperator *op) { - Object *ob= CTX_data_active_object(C); + Object *ob = CTX_data_active_object(C); paintface_deselect_all_visible(ob, RNA_enum_get(op->ptr, "action"), TRUE); ED_region_tag_redraw(CTX_wm_region(C)); return OPERATOR_FINISHED; @@ -455,7 +455,7 @@ void PAINT_OT_face_select_all(wmOperatorType *ot) ot->exec = face_select_all_exec; ot->poll = facemask_paint_poll; - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; WM_operator_properties_select_all(ot); } @@ -463,7 +463,7 @@ void PAINT_OT_face_select_all(wmOperatorType *ot) static int vert_select_all_exec(bContext *C, wmOperator *op) { - Object *ob= CTX_data_active_object(C); + Object *ob = CTX_data_active_object(C); paintvert_deselect_all_visible(ob, RNA_enum_get(op->ptr, "action"), TRUE); ED_region_tag_redraw(CTX_wm_region(C)); return OPERATOR_FINISHED; @@ -479,14 +479,14 @@ void PAINT_OT_vert_select_all(wmOperatorType *ot) ot->exec = vert_select_all_exec; ot->poll = vert_paint_poll; - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; WM_operator_properties_select_all(ot); } static int vert_select_inverse_exec(bContext *C, wmOperator *UNUSED(op)) { - Object *ob= CTX_data_active_object(C); + Object *ob = CTX_data_active_object(C); paintvert_deselect_all_visible(ob, SEL_INVERT, TRUE); ED_region_tag_redraw(CTX_wm_region(C)); return OPERATOR_FINISHED; @@ -501,11 +501,11 @@ void PAINT_OT_vert_select_inverse(wmOperatorType *ot) ot->exec = vert_select_inverse_exec; ot->poll = vert_paint_poll; - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } static int face_select_inverse_exec(bContext *C, wmOperator *UNUSED(op)) { - Object *ob= CTX_data_active_object(C); + Object *ob = CTX_data_active_object(C); paintface_deselect_all_visible(ob, SEL_INVERT, TRUE); ED_region_tag_redraw(CTX_wm_region(C)); return OPERATOR_FINISHED; @@ -521,13 +521,13 @@ void PAINT_OT_face_select_inverse(wmOperatorType *ot) ot->exec = face_select_inverse_exec; ot->poll = facemask_paint_poll; - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } static int face_select_hide_exec(bContext *C, wmOperator *op) { - const int unselected= RNA_boolean_get(op->ptr, "unselected"); - Object *ob= CTX_data_active_object(C); + const int unselected = RNA_boolean_get(op->ptr, "unselected"); + Object *ob = CTX_data_active_object(C); paintface_hide(ob, unselected); ED_region_tag_redraw(CTX_wm_region(C)); return OPERATOR_FINISHED; @@ -542,14 +542,14 @@ void PAINT_OT_face_select_hide(wmOperatorType *ot) ot->exec = face_select_hide_exec; ot->poll = facemask_paint_poll; - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected objects"); } static int face_select_reveal_exec(bContext *C, wmOperator *UNUSED(op)) { - Object *ob= CTX_data_active_object(C); + Object *ob = CTX_data_active_object(C); paintface_reveal(ob); ED_region_tag_redraw(CTX_wm_region(C)); return OPERATOR_FINISHED; @@ -564,7 +564,7 @@ void PAINT_OT_face_select_reveal(wmOperatorType *ot) ot->exec = face_select_reveal_exec; ot->poll = facemask_paint_poll; - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected objects"); } diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 54f4d0c1a26..ae0c19d7245 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -130,14 +130,15 @@ int vertex_paint_mode_poll(bContext *C) int vertex_paint_poll(bContext *C) { if (vertex_paint_mode_poll(C) && - paint_brush(&CTX_data_tool_settings(C)->vpaint->paint)) { + paint_brush(&CTX_data_tool_settings(C)->vpaint->paint)) + { ScrArea *sa = CTX_wm_area(C); if (sa->spacetype == SPACE_VIEW3D) { ARegion *ar = CTX_wm_region(C); if (ar->regiontype == RGN_TYPE_WINDOW) return 1; - } } + } return 0; } @@ -321,7 +322,7 @@ void do_shared_vertexcol(Mesh *me, int do_tessface) } } -static void make_vertexcol(Object *ob) /* single ob */ +static void make_vertexcol(Object *ob) /* single ob */ { Mesh *me; if (!ob || ob->id.lib) return; @@ -387,7 +388,7 @@ static int wpaint_mirror_vgroup_ensure(Object *ob, const int vgroup_active) } if (curdef == NULL) { - int olddef = ob->actdef; /* tsk, ED_vgroup_add sets the active defgroup */ + int olddef = ob->actdef; /* tsk, ED_vgroup_add sets the active defgroup */ curdef = ED_vgroup_add_name(ob, name); ob->actdef = olddef; } @@ -418,7 +419,7 @@ static void copy_vpaint_prev(VPaint *vp, unsigned int *lcol, int tot) } -static void copy_wpaint_prev (VPaint *wp, MDeformVert *dverts, int dcount) +static void copy_wpaint_prev(VPaint *wp, MDeformVert *dverts, int dcount) { if (wp->wpaint_prev) { free_dverts(wp->wpaint_prev, wp->tot); @@ -427,9 +428,9 @@ static void copy_wpaint_prev (VPaint *wp, MDeformVert *dverts, int dcount) if (dverts && dcount) { - wp->wpaint_prev = MEM_mallocN (sizeof(MDeformVert) * dcount, "wpaint prev"); + wp->wpaint_prev = MEM_mallocN(sizeof(MDeformVert) * dcount, "wpaint prev"); wp->tot = dcount; - copy_dverts (wp->wpaint_prev, dverts, dcount); + copy_dverts(wp->wpaint_prev, dverts, dcount); } } @@ -445,7 +446,7 @@ void vpaint_fill(Object *ob, unsigned int paintcol) if (me == NULL || me->totpoly == 0) return; if (!me->mloopcol) make_vertexcol(ob); - if (!me->mloopcol) return; /* possible we can't make mcol's */ + if (!me->mloopcol) return; /* possible we can't make mcol's */ selected = (me->editflag & ME_EDIT_PAINT_MASK); @@ -512,7 +513,7 @@ void wpaint_fill(VPaint *wp, Object *ob, float paintweight) dw_prev->weight = dw->weight; /* set the undo weight */ dw->weight = paintweight; - if (me->editflag & ME_EDIT_MIRROR_X) { /* x mirror painting */ + if (me->editflag & ME_EDIT_MIRROR_X) { /* x mirror painting */ int j = mesh_get_x_mirror_vert(ob, vidx); if (j >= 0) { /* copy, not paint again */ @@ -568,7 +569,7 @@ void vpaint_dogamma(Scene *scene) for (a = 0; a < 256; a++) { fac = ((float)a) / 255.0; - fac = vp->mul * pow( fac, igam); + fac = vp->mul * pow(fac, igam); temp = 255.9 * fac; @@ -581,9 +582,9 @@ void vpaint_dogamma(Scene *scene) cp = (unsigned char *)me->mcol; while (a--) { - cp[1] = gamtab[ cp[1] ]; - cp[2] = gamtab[ cp[2] ]; - cp[3] = gamtab[ cp[3] ]; + cp[1] = gamtab[cp[1]]; + cp[2] = gamtab[cp[2]]; + cp[3] = gamtab[cp[3]]; cp += 4; } @@ -799,13 +800,13 @@ static unsigned int vpaint_blend(VPaint *vp, unsigned int col, unsigned int colo co = (char *)&colorig; for (a = 0; a < 4; a++) { - if ( ct[a] < co[a] ) { - if ( cp[a] < ct[a] ) cp[a] = ct[a]; - else if ( cp[a] > co[a] ) cp[a] = co[a]; + if (ct[a] < co[a]) { + if (cp[a] < ct[a]) cp[a] = ct[a]; + else if (cp[a] > co[a]) cp[a] = co[a]; } else { - if ( cp[a] < co[a] ) cp[a] = co[a]; - else if ( cp[a] > ct[a] ) cp[a] = ct[a]; + if (cp[a] < co[a]) cp[a] = co[a]; + else if (cp[a] > ct[a]) cp[a] = ct[a]; } } } @@ -853,7 +854,7 @@ static int sample_backbuf_area(ViewContext *vc, int *indexar, int totface, int x /* whats _dl mean? */ static float calc_vp_strength_dl(VPaint *vp, ViewContext *vc, const float *vert_nor, - const float mval[2], const float brush_size_pressure) + const float mval[2], const float brush_size_pressure) { Brush *brush = paint_brush(&vp->paint); float dist_squared; @@ -918,7 +919,7 @@ BLI_INLINE float wval_sub(const float weight, const float paintval, const float return weight - (paintval * alpha); } BLI_INLINE float wval_mul(const float weight, const float paintval, const float alpha) -{ /* first mul, then blend the fac */ +{ /* first mul, then blend the fac */ return ((1.0f - alpha) + (alpha * paintval)) * weight; } BLI_INLINE float wval_lighten(const float weight, const float paintval, const float alpha) @@ -962,7 +963,7 @@ static float wpaint_blend(VPaint *wp, float weight, float weight_prev, int tool = brush->vertexpaint_tool; if (do_flip) { - switch(tool) { + switch (tool) { case PAINT_BLEND_MIX: paintval = 1.f - paintval; break; case PAINT_BLEND_ADD: @@ -1066,7 +1067,7 @@ static int weight_sample_invoke(bContext *C, wmOperator *op, wmEvent *event) if (change) { /* not really correct since the brush didnt change, but redraws the toolbar */ - WM_main_add_notifier(NC_BRUSH|NA_EDITED, NULL); /* ts->wpaint->paint.brush */ + WM_main_add_notifier(NC_BRUSH | NA_EDITED, NULL); /* ts->wpaint->paint.brush */ return OPERATOR_FINISHED; } @@ -1169,7 +1170,7 @@ static int weight_sample_group_exec(bContext *C, wmOperator *op) vc.obact->actdef = type + 1; DAG_id_tag_update(&vc.obact->id, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, vc.obact); + WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, vc.obact); return OPERATOR_FINISHED; } @@ -1218,7 +1219,7 @@ static void do_weight_paint_normalize_all(MDeformVert *dvert, const int defbase_ for (i = dvert->totweight, dw = dvert->dw; i != 0; i--, dw++) { if (dw->def_nr < defbase_tot && vgroup_validmap[dw->def_nr]) { - dw->weight *= fac; + dw->weight *= fac; } } } @@ -1315,7 +1316,7 @@ static char has_locked_group(MDeformVert *dvert, const int defbase_tot, } /* * gen_lck_flags gets the status of "flag" for each bDeformGroup - *in ob->defbase and returns an array containing them + * in ob->defbase and returns an array containing them */ static char *gen_lock_flags(Object *ob, int defbase_tot) { @@ -1443,7 +1444,7 @@ static float redistribute_change(MDeformVert *ndv, const int defbase_tot, change_status[ndw->def_nr] = changeto; total_valid--; } - else {/* a perfectly valid change occurred to ndw->weight */ + else { /* a perfectly valid change occurred to ndw->weight */ totchange -= change; ndw->weight += change; } @@ -1731,11 +1732,12 @@ static int get_first_selected_nonzero_weight(MDeformVert *dvert, const int defba static char *wpaint_make_validmap(Object *ob); -static void do_weight_paint_vertex(/* vars which remain the same for every vert */ - VPaint *wp, Object *ob, const WeightPaintInfo *wpi, - /* vars which change on each stroke */ - const unsigned int index, float alpha, float paintweight - ) +static void do_weight_paint_vertex( + /* vars which remain the same for every vert */ + VPaint *wp, Object *ob, const WeightPaintInfo *wpi, + /* vars which change on each stroke */ + const unsigned int index, float alpha, float paintweight + ) { Mesh *me = ob->data; MDeformVert *dv = &me->dvert[index]; @@ -1915,7 +1917,7 @@ static void do_weight_paint_vertex(/* vars which remain the same for every vert if (tdw->weight != tdw_prev->weight) { oldChange = tdw->weight / tdw_prev->weight; testw = tdw_prev->weight * change; - if ( testw > tdw_prev->weight ) { + if (testw > tdw_prev->weight) { if (change > oldChange) { /* reset the weights and use the new change */ defvert_reset_to_prev(wp->wpaint_prev + index, dv); @@ -1955,7 +1957,7 @@ static void do_weight_paint_vertex(/* vars which remain the same for every vert dw = defvert_find_index(dv, vgroup); #else dw = NULL; /* UNUSED after assignment, set to NULL to ensuyre we don't - * use again, we thats needed un-ifdef the line above */ + * use again, we thats needed un-ifdef the line above */ (void)dw; /* quiet warnigns */ #endif @@ -1972,7 +1974,7 @@ static void do_weight_paint_vertex(/* vars which remain the same for every vert /* *************** set wpaint operator ****************** */ -static int set_wpaint(bContext *C, wmOperator *UNUSED(op)) /* toggle */ +static int set_wpaint(bContext *C, wmOperator *UNUSED(op)) /* toggle */ { Object *ob = CTX_data_active_object(C); Scene *scene = CTX_data_scene(C); @@ -2018,7 +2020,7 @@ static int set_wpaint(bContext *C, wmOperator *UNUSED(op)) /* toggle */ mesh_mirrtopo_table(NULL, 'e'); } - WM_event_add_notifier(C, NC_SCENE|ND_MODE, scene); + WM_event_add_notifier(C, NC_SCENE | ND_MODE, scene); return OPERATOR_FINISHED; } @@ -2048,7 +2050,7 @@ void PAINT_OT_weight_paint_toggle(wmOperatorType *ot) ot->poll = paint_poll_test; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } @@ -2089,7 +2091,7 @@ static char *wpaint_make_validmap(Object *ob) /* now loop through the armature modifiers and identify deform bones */ for (md = ob->modifiers.first; md; md = !md->next && step1 ? (step1 = 0), modifiers_getVirtualModifierList(ob) : md->next) { - if (!(md->mode & (eModifierMode_Realtime|eModifierMode_Virtual))) + if (!(md->mode & (eModifierMode_Realtime | eModifierMode_Virtual))) continue; if (md->type == eModifierType_Armature) { @@ -2149,7 +2151,7 @@ static int wpaint_stroke_test_start(bContext *C, wmOperator *op, wmEvent *UNUSED /* if nothing was added yet, we make dverts and a vertex deform group */ if (!me->dvert) { ED_vgroup_data_create(&me->id); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, me); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, me); } /* this happens on a Bone select, when no vgroup existed yet */ @@ -2163,7 +2165,7 @@ static int wpaint_stroke_test_start(bContext *C, wmOperator *op, wmEvent *UNUSED if (pchan) { bDeformGroup *dg = defgroup_find_name(ob, pchan->name); if (dg == NULL) { - dg = ED_vgroup_add_name(ob, pchan->name); /* sets actdef */ + dg = ED_vgroup_add_name(ob, pchan->name); /* sets actdef */ } else { int actdef = 1 + BLI_findindex(&ob->defbase, dg); @@ -2403,7 +2405,7 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P if (me->dvert[vidx].flag) { alpha = calc_vp_alpha_dl(wp, vc, wpd->wpimat, wpd->vertexcosnos + 6 * vidx, - mval, brush_size_pressure, brush_alpha_pressure); + mval, brush_size_pressure, brush_alpha_pressure); if (alpha) { do_weight_paint_vertex(wp, ob, &wpi, vidx, alpha, paintweight); } @@ -2503,7 +2505,7 @@ void PAINT_OT_weight_paint(wmOperatorType *ot) ot->cancel = wpaint_cancel; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING; RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, "Stroke", ""); } @@ -2529,13 +2531,13 @@ void PAINT_OT_weight_set(wmOperatorType *ot) ot->poll = mask_paint_poll; /* it was facemask_paint_poll */ /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /* ************ set / clear vertex paint mode ********** */ -static int set_vpaint(bContext *C, wmOperator *op) /* toggle */ +static int set_vpaint(bContext *C, wmOperator *op) /* toggle */ { Object *ob = CTX_data_active_object(C); Scene *scene = CTX_data_scene(C); @@ -2576,7 +2578,7 @@ static int set_vpaint(bContext *C, wmOperator *op) /* toggle */ /* update modifier stack for mapping requirements */ DAG_id_tag_update(&me->id, 0); - WM_event_add_notifier(C, NC_SCENE|ND_MODE, scene); + WM_event_add_notifier(C, NC_SCENE | ND_MODE, scene); return OPERATOR_FINISHED; } @@ -2593,7 +2595,7 @@ void PAINT_OT_vertex_paint_toggle(wmOperatorType *ot) ot->poll = paint_poll_test; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } @@ -2737,17 +2739,17 @@ static void vpaint_paint_face(VPaint *vp, VPaintData *vpd, Object *ob, int brush_alpha_pressure_i; if ((vp->flag & VP_COLINDEX && mface->mat_nr != ob->actcol - 1) || - ((me->editflag & ME_EDIT_PAINT_MASK) && !(mface->flag & ME_FACE_SEL))) + ((me->editflag & ME_EDIT_PAINT_MASK) && !(mface->flag & ME_FACE_SEL))) return; if (brush->vertexpaint_tool == PAINT_BLEND_BLUR) { - unsigned int fcol1 = mcol_blend( mcol[0], mcol[1], 128); + unsigned int fcol1 = mcol_blend(mcol[0], mcol[1], 128); if (mface->v4) { - unsigned int fcol2 = mcol_blend( mcol[2], mcol[3], 128); - vpd->paintcol = mcol_blend( fcol1, fcol2, 128); + unsigned int fcol2 = mcol_blend(mcol[2], mcol[3], 128); + vpd->paintcol = mcol_blend(fcol1, fcol2, 128); } else { - vpd->paintcol = mcol_blend( mcol[2], fcol1, 170); + vpd->paintcol = mcol_blend(mcol[2], fcol1, 170); } } @@ -2974,8 +2976,8 @@ static int vpaint_invoke(bContext *C, wmOperator *op, wmEvent *event) { op->customdata = paint_stroke_new(C, NULL, vpaint_stroke_test_start, - vpaint_stroke_update_step, - vpaint_stroke_done, event->type); + vpaint_stroke_update_step, + vpaint_stroke_done, event->type); /* add modal handler */ WM_event_add_modal_handler(C, op); @@ -3006,7 +3008,7 @@ void PAINT_OT_vertex_paint(wmOperatorType *ot) ot->cancel = vpaint_cancel; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING; RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, "Stroke", ""); } @@ -3031,7 +3033,7 @@ static int weight_from_bones_exec(bContext *C, wmOperator *op) create_vgroups_from_armature(op->reports, scene, ob, armob, type, (me->editflag & ME_EDIT_MIRROR_X)); DAG_id_tag_update(&me->id, 0); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, me); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, me); return OPERATOR_FINISHED; } @@ -3053,7 +3055,7 @@ void PAINT_OT_weight_from_bones(wmOperatorType *ot) ot->poll = weight_from_bones_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ ot->prop = RNA_def_enum(ot->srna, "type", type_items, 0, "Type", "Method to use for assigning weights"); diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index e91f26fc9ba..506716543ea 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -95,7 +95,7 @@ void ED_sculpt_force_update(bContext *C) { - Object *ob= CTX_data_active_object(C); + Object *ob = CTX_data_active_object(C); if (ob && (ob->mode & OB_MODE_SCULPT)) multires_force_update(ob); @@ -103,9 +103,8 @@ void ED_sculpt_force_update(bContext *C) /* Sculpt mode handles multires differently from regular meshes, but only if * it's the last modifier on the stack and it is not on the first level */ -struct MultiresModifierData *sculpt_multires_active(Scene *scene, Object *ob) -{ - Mesh *me= (Mesh*)ob->data; +struct MultiresModifierData *sculpt_multires_active(Scene *scene, Object *ob){ + Mesh *me = (Mesh *)ob->data; ModifierData *md; if (!CustomData_get_layer(&me->ldata, CD_MDISPS)) { @@ -113,9 +112,9 @@ struct MultiresModifierData *sculpt_multires_active(Scene *scene, Object *ob) return NULL; } - for (md= modifiers_getVirtualModifierList(ob); md; md= md->next) { + for (md = modifiers_getVirtualModifierList(ob); md; md = md->next) { if (md->type == eModifierType_Multires) { - MultiresModifierData *mmd= (MultiresModifierData*)md; + MultiresModifierData *mmd = (MultiresModifierData *)md; if (!modifier_isEnabled(scene, md, eModifierMode_Realtime)) continue; @@ -133,10 +132,10 @@ static int sculpt_has_active_modifiers(Scene *scene, Object *ob) { ModifierData *md; - md= modifiers_getVirtualModifierList(ob); + md = modifiers_getVirtualModifierList(ob); /* exception for shape keys because we can edit those */ - for (; md; md= md->next) { + for (; md; md = md->next) { if (modifier_isEnabled(scene, md, eModifierMode_Realtime)) return 1; } @@ -148,25 +147,25 @@ static int sculpt_has_active_modifiers(Scene *scene, Object *ob) static int sculpt_modifiers_active(Scene *scene, Sculpt *sd, Object *ob) { ModifierData *md; - Mesh *me= (Mesh*)ob->data; - MultiresModifierData *mmd= sculpt_multires_active(scene, ob); + Mesh *me = (Mesh *)ob->data; + MultiresModifierData *mmd = sculpt_multires_active(scene, ob); if (mmd) return 0; /* non-locked shape keys could be handled in the same way as deformed mesh */ - if ((ob->shapeflag&OB_SHAPE_LOCK)==0 && me->key && ob->shapenr) + if ((ob->shapeflag & OB_SHAPE_LOCK) == 0 && me->key && ob->shapenr) return 1; - md= modifiers_getVirtualModifierList(ob); + md = modifiers_getVirtualModifierList(ob); /* exception for shape keys because we can edit those */ - for (; md; md= md->next) { + for (; md; md = md->next) { ModifierTypeInfo *mti = modifierType_getInfo(md->type); if (!modifier_isEnabled(scene, md, eModifierMode_Realtime)) continue; - if (md->type==eModifierType_ShapeKey) continue; + if (md->type == eModifierType_ShapeKey) continue; - if (mti->type==eModifierTypeType_OnlyDeform) return 1; - else if ((sd->flags & SCULPT_ONLY_DEFORM)==0) return 1; + if (mti->type == eModifierTypeType_OnlyDeform) return 1; + else if ((sd->flags & SCULPT_ONLY_DEFORM) == 0) return 1; } return 0; @@ -248,10 +247,10 @@ typedef struct StrokeCache { /* Get a screen-space rectangle of the modified area */ static int sculpt_get_redraw_rect(ARegion *ar, RegionView3D *rv3d, - Object *ob, rcti *rect) + Object *ob, rcti *rect) { SculptSession *ss; - PBVH *pbvh= ob->sculpt->pbvh; + PBVH *pbvh = ob->sculpt->pbvh; float bb_min[3], bb_max[3]; if (!pbvh) @@ -261,11 +260,11 @@ static int sculpt_get_redraw_rect(ARegion *ar, RegionView3D *rv3d, /* convert 3D bounding box to screen space */ if (!paint_convert_bb_to_rect(rect, - bb_min, - bb_max, - ar, - rv3d, - ob)) { + bb_min, + bb_max, + ar, + rv3d, + ob)) { return 0; } @@ -285,9 +284,9 @@ static int sculpt_get_redraw_rect(ARegion *ar, RegionView3D *rv3d, } void sculpt_get_redraw_planes(float planes[4][4], ARegion *ar, - RegionView3D *rv3d, Object *ob) + RegionView3D *rv3d, Object *ob) { - PBVH *pbvh= ob->sculpt->pbvh; + PBVH *pbvh = ob->sculpt->pbvh; rcti rect; sculpt_get_redraw_rect(ar, rv3d, ob, &rect); @@ -309,9 +308,9 @@ typedef struct SculptBrushTest { static void sculpt_brush_test_init(SculptSession *ss, SculptBrushTest *test) { - test->radius_squared= ss->cache->radius_squared; + test->radius_squared = ss->cache->radius_squared; copy_v3_v3(test->location, ss->cache->location); - test->dist= 0.0f; /* just for initialize */ + test->dist = 0.0f; /* just for initialize */ } static int sculpt_brush_test(SculptBrushTest *test, float co[3]) @@ -360,8 +359,8 @@ static int sculpt_brush_test_cube(SculptBrushTest *test, float co[3], float loca float p = 4; test->dist = ((powf(local_co[0], p) + - powf(local_co[1], p) + - powf(local_co[2], p)) / pow(side, p)); + powf(local_co[1], p) + + powf(local_co[2], p)) / pow(side, p)); return 1; } @@ -371,7 +370,7 @@ static int sculpt_brush_test_cube(SculptBrushTest *test, float co[3], float loca } static float frontface(Brush *brush, const float sculpt_normal[3], - const short no[3], const float fno[3]) + const short no[3], const float fno[3]) { if (brush->flag & BRUSH_FRONTFACE) { float dot; @@ -380,10 +379,10 @@ static float frontface(Brush *brush, const float sculpt_normal[3], float tmp[3]; normal_short_to_float_v3(tmp, no); - dot= dot_v3v3(tmp, sculpt_normal); + dot = dot_v3v3(tmp, sculpt_normal); } else { - dot= dot_v3v3(fno, sculpt_normal); + dot = dot_v3v3(fno, sculpt_normal); } return dot > 0 ? dot : 0; } @@ -404,7 +403,7 @@ static int sculpt_brush_test_cyl(SculptBrushTest *test, float co[3], float locat cross_v3_v3v3(t3, an, t1); - dist = len_v3(t3)/len_v3(t2); + dist = len_v3(t3) / len_v3(t2); test->dist = dist; @@ -421,20 +420,20 @@ static int sculpt_brush_test_cyl(SculptBrushTest *test, float co[3], float locat */ -static float overlapped_curve(Brush* br, float x) +static float overlapped_curve(Brush *br, float x) { int i; const int n = 100 / br->spacing; const float h = br->spacing / 50.0f; - const float x0 = x-1; + const float x0 = x - 1; float sum; sum = 0; - for (i= 0; i < n; i++) { + for (i = 0; i < n; i++) { float xx; - xx = fabs(x0 + i*h); + xx = fabs(x0 + i * h); if (xx < 1.0f) sum += brush_curve_strength(br, xx, 1); @@ -443,16 +442,16 @@ static float overlapped_curve(Brush* br, float x) return sum; } -static float integrate_overlap(Brush* br) +static float integrate_overlap(Brush *br) { int i; - int m= 10; - float g = 1.0f/m; + int m = 10; + float g = 1.0f / m; float max; - max= 0; - for (i= 0; i < m; i++) { - float overlap= overlapped_curve(br, i*g); + max = 0; + for (i = 0; i < m; i++) { + float overlap = overlapped_curve(br, i * g); if (overlap > max) max = overlap; @@ -465,17 +464,17 @@ static float integrate_overlap(Brush* br) static void flip_coord(float out[3], float in[3], const char symm) { if (symm & SCULPT_SYMM_X) - out[0]= -in[0]; + out[0] = -in[0]; else - out[0]= in[0]; + out[0] = in[0]; if (symm & SCULPT_SYMM_Y) - out[1]= -in[1]; + out[1] = -in[1]; else - out[1]= in[1]; + out[1] = in[1]; if (symm & SCULPT_SYMM_Z) - out[2]= -in[2]; + out[2] = -in[2]; else - out[2]= in[2]; + out[2] = in[2]; } static float calc_overlap(StrokeCache *cache, const char symm, const char axis, const float angle) @@ -487,7 +486,7 @@ static float calc_overlap(StrokeCache *cache, const char symm, const char axis, flip_coord(mirror, cache->true_location, symm); if (axis != 0) { - float mat[4][4]= MAT4_UNITY; + float mat[4][4] = MAT4_UNITY; rotate_m4(mat, axis, angle); mul_m4_v3(mat, mirror); } @@ -495,8 +494,8 @@ static float calc_overlap(StrokeCache *cache, const char symm, const char axis, /* distsq = len_squared_v3v3(mirror, cache->traced_location); */ distsq = len_squared_v3v3(mirror, cache->true_location); - if (distsq <= 4.0f*(cache->radius_squared)) - return (2.0f*(cache->radius) - sqrtf(distsq)) / (2.0f*(cache->radius)); + if (distsq <= 4.0f * (cache->radius_squared)) + return (2.0f * (cache->radius) - sqrtf(distsq)) / (2.0f * (cache->radius)); else return 0; } @@ -507,15 +506,15 @@ static float calc_radial_symmetry_feather(Sculpt *sd, StrokeCache *cache, const float overlap; overlap = 0; - for (i = 1; i < sd->radial_symm[axis-'X']; ++i) { - const float angle = 2*M_PI*i/sd->radial_symm[axis-'X']; + for (i = 1; i < sd->radial_symm[axis - 'X']; ++i) { + const float angle = 2 * M_PI * i / sd->radial_symm[axis - 'X']; overlap += calc_overlap(cache, symm, axis, angle); } return overlap; } -static float calc_symmetry_feather(Sculpt *sd, StrokeCache* cache) +static float calc_symmetry_feather(Sculpt *sd, StrokeCache *cache) { if (sd->flags & SCULPT_SYMMETRY_FEATHER) { float overlap; @@ -534,7 +533,7 @@ static float calc_symmetry_feather(Sculpt *sd, StrokeCache* cache) } } - return 1/overlap; + return 1 / overlap; } else { return 1; @@ -551,7 +550,7 @@ static float brush_strength(Sculpt *sd, StrokeCache *cache, float feather) /* Primary strength input; square it to make lower values more sensitive */ const float root_alpha = brush_alpha(scene, brush); - float alpha = root_alpha*root_alpha; + float alpha = root_alpha * root_alpha; float dir = brush->flag & BRUSH_DIR_IN ? -1 : 1; float pressure = brush_use_alpha_pressure(scene, brush) ? cache->pressure : 1; float pen_flip = cache->pen_flip ? -1 : 1; @@ -560,12 +559,12 @@ static float brush_strength(Sculpt *sd, StrokeCache *cache, float feather) /* spacing is integer percentage of radius, divide by 50 to get * normalized diameter */ float overlap = (brush->flag & BRUSH_SPACE_ATTEN && - brush->flag & BRUSH_SPACE && - !(brush->flag & BRUSH_ANCHORED) && - (brush->spacing < 100)) ? 1.0f/accum : 1; + brush->flag & BRUSH_SPACE && + !(brush->flag & BRUSH_ANCHORED) && + (brush->spacing < 100)) ? 1.0f / accum : 1; float flip = dir * invert * pen_flip; - switch(brush->sculpt_tool) { + switch (brush->sculpt_tool) { case SCULPT_TOOL_CLAY: case SCULPT_TOOL_CLAY_STRIPS: case SCULPT_TOOL_DRAW: @@ -588,7 +587,7 @@ static float brush_strength(Sculpt *sd, StrokeCache *cache, float feather) case SCULPT_TOOL_SCRAPE: case SCULPT_TOOL_FLATTEN: if (flip > 0) { - overlap = (1+overlap) / 2; + overlap = (1 + overlap) / 2; return alpha * flip * pressure * overlap * feather; } else { @@ -608,11 +607,11 @@ static float brush_strength(Sculpt *sd, StrokeCache *cache, float feather) } case SCULPT_TOOL_NUDGE: - overlap = (1+overlap) / 2; + overlap = (1 + overlap) / 2; return alpha * pressure * overlap * feather; case SCULPT_TOOL_THUMB: - return alpha*pressure*feather; + return alpha * pressure * feather; case SCULPT_TOOL_SNAKE_HOOK: return feather; @@ -621,7 +620,7 @@ static float brush_strength(Sculpt *sd, StrokeCache *cache, float feather) return feather; case SCULPT_TOOL_ROTATE: - return alpha*pressure*feather; + return alpha * pressure * feather; default: return 0; @@ -630,24 +629,24 @@ static float brush_strength(Sculpt *sd, StrokeCache *cache, float feather) /* Return a multiplier for brush strength on a particular vertex. */ static float tex_strength(SculptSession *ss, Brush *br, float point[3], - const float len, - const float sculpt_normal[3], - const short vno[3], - const float fno[3]) + const float len, + const float sculpt_normal[3], + const short vno[3], + const float fno[3]) { MTex *mtex = &br->mtex; - float avg= 1; + float avg = 1; if (!mtex->tex) { - avg= 1; + avg = 1; } else if (mtex->brush_map_mode == MTEX_MAP_MODE_3D) { float jnk; /* Get strength by feeding the vertex - * location directly into a texture */ + * location directly into a texture */ externtex(mtex, point, &avg, - &jnk, &jnk, &jnk, &jnk, 0); + &jnk, &jnk, &jnk, &jnk, 0); } else if (ss->texcache) { float rotation = -mtex->rot; @@ -680,9 +679,9 @@ static float tex_strength(SculptSession *ss, Brush *br, float point[3], x = point_2d[0] + ss->cache->vc->ar->winrct.xmin; y = point_2d[1] + ss->cache->vc->ar->winrct.ymin; } - else /* else (mtex->brush_map_mode == MTEX_MAP_MODE_TILED) */ - /* leave the coordinates relative to the screen */ - { + else { /* else (mtex->brush_map_mode == MTEX_MAP_MODE_TILED) */ + /* leave the coordinates relative to the screen */ + /* use unadjusted size for tiled mode */ radius = brush_size(ss->cache->vc->scene, br); @@ -706,7 +705,7 @@ static float tex_strength(SculptSession *ss, Brush *br, float point[3], * atan2, sqrtf, sin, and cos. */ if (rotation > 0.001f || rotation < -0.001f) { const float angle = atan2f(y, x) + rotation; - const float flen = sqrtf(x*x + y*y); + const float flen = sqrtf(x * x + y * y); x = flen * cosf(angle); y = flen * sinf(angle); @@ -770,14 +769,14 @@ static void sculpt_clip(Sculpt *sd, SculptSession *ss, float *co, const float va { int i; - for (i=0; i<3; ++i) { + for (i = 0; i < 3; ++i) { if (sd->flags & (SCULPT_LOCK_X << i)) continue; if ((ss->cache->flag & (CLIP_X << i)) && (fabsf(co[i]) <= ss->cache->clip_tolerance[i])) - co[i]= 0.0f; + co[i] = 0.0f; else - co[i]= val[i]; + co[i] = val[i]; } } @@ -803,7 +802,7 @@ static void calc_area_normal(Sculpt *sd, Object *ob, float an[3], PBVHNode **nod zero_v3(an); #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) - for (n=0; ncache->mirror_symmetry_pass == 0 && ss->cache->radial_symmetry_pass == 0 && - (ss->cache->first_time || !(brush->flag & BRUSH_ORIGINAL_NORMAL))) + (ss->cache->first_time || !(brush->flag & BRUSH_ORIGINAL_NORMAL))) { switch (brush->sculpt_plane) { case SCULPT_DISP_DIR_VIEW: @@ -920,7 +919,7 @@ static void neighbor_average(SculptSession *ss, float avg[3], unsigned vert) int i, total = 0; for (i = 0; i < vert_map->count; i++) { - const MPoly *p= &ss->mpoly[vert_map->indices[i]]; + const MPoly *p = &ss->mpoly[vert_map->indices[i]]; unsigned f_adj_v[3]; if (poly_get_adj_loops_from_vert(f_adj_v, p, ss->mloop, vert) != -1) { @@ -929,7 +928,7 @@ static void neighbor_average(SculptSession *ss, float avg[3], unsigned vert) for (j = 0; j < 3; j++) { if (vert_map->count != 2 || ss->pmap[f_adj_v[j]].count <= 2) { add_v3_v3(avg, deform_co ? deform_co[f_adj_v[j]] : - mvert[f_adj_v[j]].co); + mvert[f_adj_v[j]].co); total++; } @@ -958,8 +957,8 @@ static void do_mesh_smooth_brush(Sculpt *sd, SculptSession *ss, PBVHNode *node, BLI_pbvh_vertex_iter_begin(ss->pbvh, node, vd, PBVH_ITER_UNIQUE) { if (sculpt_brush_test(&test, vd.co)) { - const float fade = bstrength*tex_strength(ss, brush, vd.co, test.dist, - ss->cache->view_normal, vd.no, vd.fno); + const float fade = bstrength * tex_strength(ss, brush, vd.co, test.dist, + ss->cache->view_normal, vd.no, vd.fno); float avg[3], val[3]; neighbor_average(ss, avg, vd.vert_indices[vd.i]); @@ -971,7 +970,7 @@ static void do_mesh_smooth_brush(Sculpt *sd, SculptSession *ss, PBVHNode *node, sculpt_clip(sd, ss, vd.co, val); if (vd.mvert) - vd.mvert->flag |= ME_VERT_PBVH_UPDATE; + vd.mvert->flag |= ME_VERT_PBVH_UPDATE; } } BLI_pbvh_vertex_iter_end; @@ -992,34 +991,34 @@ static void do_multires_smooth_brush(Sculpt *sd, SculptSession *ss, PBVHNode *no CLAMP(bstrength, 0.0f, 1.0f); BLI_pbvh_node_get_grids(ss->pbvh, node, &grid_indices, &totgrid, - NULL, &gridsize, &griddata, &gridadj); + NULL, &gridsize, &griddata, &gridadj); #pragma omp critical { - tmpgrid= MEM_mallocN(sizeof(float)*3*gridsize*gridsize, "tmpgrid"); - tmprow= MEM_mallocN(sizeof(float)*3*gridsize, "tmprow"); + tmpgrid = MEM_mallocN(sizeof(float) * 3 * gridsize * gridsize, "tmpgrid"); + tmprow = MEM_mallocN(sizeof(float) * 3 * gridsize, "tmprow"); } for (i = 0; i < totgrid; ++i) { data = griddata[grid_indices[i]]; adj = &gridadj[grid_indices[i]]; - memset(tmpgrid, 0, sizeof(float)*3*gridsize*gridsize); + memset(tmpgrid, 0, sizeof(float) * 3 * gridsize * gridsize); - for (y= 0; y < gridsize-1; y++) { + for (y = 0; y < gridsize - 1; y++) { float tmp[3]; - v1 = y*gridsize; - add_v3_v3v3(tmprow[0], data[v1].co, data[v1+gridsize].co); + v1 = y * gridsize; + add_v3_v3v3(tmprow[0], data[v1].co, data[v1 + gridsize].co); - for (x= 0; x < gridsize-1; x++) { - v1 = x + y*gridsize; + for (x = 0; x < gridsize - 1; x++) { + v1 = x + y * gridsize; v2 = v1 + 1; v3 = v1 + gridsize; v4 = v3 + 1; - add_v3_v3v3(tmprow[x+1], data[v2].co, data[v4].co); - add_v3_v3v3(tmp, tmprow[x+1], tmprow[x]); + add_v3_v3v3(tmprow[x + 1], data[v2].co, data[v4].co); + add_v3_v3v3(tmp, tmprow[x + 1], tmprow[x]); add_v3_v3(tmpgrid[v1], tmp); add_v3_v3(tmpgrid[v2], tmp); @@ -1047,19 +1046,19 @@ static void do_multires_smooth_brush(Sculpt *sd, SculptSession *ss, PBVHNode *no if (y == gridsize - 1 && adj->index[1] == -1) continue; - index = x + y*gridsize; - co= data[index].co; - fno= data[index].no; + index = x + y * gridsize; + co = data[index].co; + fno = data[index].no; if (sculpt_brush_test(&test, co)) { - const float fade = bstrength*tex_strength(ss, brush, co, test.dist, - ss->cache->view_normal, NULL, fno); + const float fade = bstrength * tex_strength(ss, brush, co, test.dist, + ss->cache->view_normal, NULL, fno); float *avg, val[3]; float n; - avg = tmpgrid[x + y*gridsize]; + avg = tmpgrid[x + y * gridsize]; - n = 1/16.0f; + n = 1 / 16.0f; if (x == 0 || x == gridsize - 1) n *= 2; @@ -1091,18 +1090,18 @@ static void smooth(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode, float { SculptSession *ss = ob->sculpt; const int max_iterations = 4; - const float fract = 1.0f/max_iterations; + const float fract = 1.0f / max_iterations; int iteration, n, count; float last; CLAMP(bstrength, 0, 1); - count = (int)(bstrength*max_iterations); - last = max_iterations*(bstrength - count*fract); + count = (int)(bstrength * max_iterations); + last = max_iterations * (bstrength - count * fract); for (iteration = 0; iteration <= count; ++iteration) { #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) - for (n=0; nmultires) { do_multires_smooth_brush(sd, ss, nodes[n], iteration != count ? 1.0f : last); } @@ -1126,7 +1125,7 @@ static void do_draw_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) SculptSession *ss = ob->sculpt; Brush *brush = paint_brush(&sd->paint); float offset[3], area_normal[3]; - float bstrength= ss->cache->bstrength; + float bstrength = ss->cache->bstrength; int n; calc_sculpt_normal(sd, ob, area_normal, nodes, totnode); @@ -1138,12 +1137,12 @@ static void do_draw_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) /* threaded loop over nodes */ #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) - for (n=0; npbvh, nodes[n])->co; + proxy = BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; sculpt_brush_test_init(ss, &test); @@ -1151,7 +1150,7 @@ static void do_draw_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) if (sculpt_brush_test(&test, vd.co)) { /* offset vertex */ float fade = tex_strength(ss, brush, vd.co, test.dist, - area_normal, vd.no, vd.fno); + area_normal, vd.no, vd.fno); mul_v3_v3fl(proxy[vd.i], offset, fade); @@ -1169,7 +1168,7 @@ static void do_crease_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod const Scene *scene = ss->cache->vc->scene; Brush *brush = paint_brush(&sd->paint); float offset[3], area_normal[3]; - float bstrength= ss->cache->bstrength; + float bstrength = ss->cache->bstrength; float flippedbstrength, crease_correction; int n; @@ -1183,23 +1182,23 @@ static void do_crease_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod /* we divide out the squared alpha and multiply by the squared crease to give us the pinch strength */ if (brush_alpha(scene, brush) > 0.0f) - crease_correction = brush->crease_pinch_factor*brush->crease_pinch_factor/(brush_alpha(scene, brush)*brush_alpha(scene, brush)); + crease_correction = brush->crease_pinch_factor * brush->crease_pinch_factor / (brush_alpha(scene, brush) * brush_alpha(scene, brush)); else - crease_correction = brush->crease_pinch_factor*brush->crease_pinch_factor; + crease_correction = brush->crease_pinch_factor * brush->crease_pinch_factor; /* we always want crease to pinch or blob to relax even when draw is negative */ - flippedbstrength = (bstrength < 0) ? -crease_correction*bstrength : crease_correction*bstrength; + flippedbstrength = (bstrength < 0) ? -crease_correction * bstrength : crease_correction * bstrength; if (brush->sculpt_tool == SCULPT_TOOL_BLOB) flippedbstrength *= -1.0f; /* threaded loop over nodes */ #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) - for (n=0; npbvh, nodes[n])->co; + proxy = BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; sculpt_brush_test_init(ss, &test); @@ -1213,7 +1212,7 @@ static void do_crease_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod /* first we pinch */ sub_v3_v3v3(val1, test.location, vd.co); - mul_v3_fl(val1, fade*flippedbstrength); + mul_v3_fl(val1, fade * flippedbstrength); /* then we draw */ mul_v3_v3fl(val2, offset, fade); @@ -1232,23 +1231,23 @@ static void do_pinch_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode { SculptSession *ss = ob->sculpt; Brush *brush = paint_brush(&sd->paint); - float bstrength= ss->cache->bstrength; + float bstrength = ss->cache->bstrength; int n; #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) - for (n=0; npbvh, nodes[n])->co; + proxy = BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; sculpt_brush_test_init(ss, &test); BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) { if (sculpt_brush_test(&test, vd.co)) { - float fade = bstrength*tex_strength(ss, brush, vd.co, test.dist, - ss->cache->view_normal, vd.no, vd.fno); + float fade = bstrength * tex_strength(ss, brush, vd.co, test.dist, + ss->cache->view_normal, vd.no, vd.fno); float val[3]; sub_v3_v3v3(val, test.location, vd.co); @@ -1265,14 +1264,14 @@ static void do_pinch_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode static void do_grab_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) { SculptSession *ss = ob->sculpt; - Brush *brush= paint_brush(&sd->paint); - float bstrength= ss->cache->bstrength; + Brush *brush = paint_brush(&sd->paint); + float bstrength = ss->cache->bstrength; float grab_delta[3], an[3]; int n; float len; if (brush->normal_weight > 0 || brush->flag & BRUSH_FRONTFACE) { - int cache= 1; + int cache = 1; /* grab brush requires to test on original data */ SWAP(int, ss->cache->original, cache); calc_sculpt_normal(sd, ob, an, nodes, totnode); @@ -1284,32 +1283,33 @@ static void do_grab_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) len = len_v3(grab_delta); if (brush->normal_weight > 0) { - mul_v3_fl(an, len*brush->normal_weight); + mul_v3_fl(an, len * brush->normal_weight); mul_v3_fl(grab_delta, 1.0f - brush->normal_weight); add_v3_v3(grab_delta, an); } #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) - for (n=0; nco; - origno= unode->no; + unode = sculpt_undo_push_node(ob, nodes[n], SCULPT_UNDO_COORDS); + origco = unode->co; + origno = unode->no; - proxy= BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; + proxy = BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; sculpt_brush_test_init(ss, &test); - BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) { + BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) + { if (sculpt_brush_test(&test, origco[vd.i])) { - const float fade = bstrength*tex_strength(ss, brush, origco[vd.i], test.dist, - an, origno[vd.i], NULL); + const float fade = bstrength * tex_strength(ss, brush, origco[vd.i], test.dist, + an, origno[vd.i], NULL); mul_v3_v3fl(proxy[vd.i], grab_delta, fade); @@ -1344,14 +1344,14 @@ static void do_nudge_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode SculptBrushTest test; float (*proxy)[3]; - proxy= BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; + proxy = BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; sculpt_brush_test_init(ss, &test); BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) { if (sculpt_brush_test(&test, vd.co)) { - const float fade = bstrength*tex_strength(ss, brush, vd.co, test.dist, - an, vd.no, vd.fno); + const float fade = bstrength * tex_strength(ss, brush, vd.co, test.dist, + an, vd.no, vd.fno); mul_v3_v3fl(proxy[vd.i], cono, fade); @@ -1383,7 +1383,7 @@ static void do_snake_hook_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int to negate_v3(grab_delta); if (brush->normal_weight > 0) { - mul_v3_fl(an, len*brush->normal_weight); + mul_v3_fl(an, len * brush->normal_weight); mul_v3_fl(grab_delta, 1.0f - brush->normal_weight); add_v3_v3(grab_delta, an); } @@ -1394,14 +1394,14 @@ static void do_snake_hook_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int to SculptBrushTest test; float (*proxy)[3]; - proxy= BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; + proxy = BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; sculpt_brush_test_init(ss, &test); BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) { if (sculpt_brush_test(&test, vd.co)) { - const float fade = bstrength*tex_strength(ss, brush, vd.co, test.dist, - an, vd.no, vd.fno); + const float fade = bstrength * tex_strength(ss, brush, vd.co, test.dist, + an, vd.no, vd.fno); mul_v3_v3fl(proxy[vd.i], grab_delta, fade); @@ -1433,24 +1433,24 @@ static void do_thumb_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) for (n = 0; n < totnode; n++) { PBVHVertexIter vd; - SculptUndoNode* unode; + SculptUndoNode *unode; SculptBrushTest test; float (*origco)[3]; short (*origno)[3]; float (*proxy)[3]; - unode= sculpt_undo_push_node(ob, nodes[n], SCULPT_UNDO_COORDS); - origco= unode->co; - origno= unode->no; + unode = sculpt_undo_push_node(ob, nodes[n], SCULPT_UNDO_COORDS); + origco = unode->co; + origno = unode->no; - proxy= BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; + proxy = BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; sculpt_brush_test_init(ss, &test); BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) { if (sculpt_brush_test(&test, origco[vd.i])) { - const float fade = bstrength*tex_strength(ss, brush, origco[vd.i], test.dist, - an, origno[vd.i], NULL); + const float fade = bstrength * tex_strength(ss, brush, origco[vd.i], test.dist, + an, origno[vd.i], NULL); mul_v3_v3fl(proxy[vd.i], cono, fade); @@ -1465,8 +1465,8 @@ static void do_thumb_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode static void do_rotate_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) { SculptSession *ss = ob->sculpt; - Brush *brush= paint_brush(&sd->paint); - float bstrength= ss->cache->bstrength; + Brush *brush = paint_brush(&sd->paint); + float bstrength = ss->cache->bstrength; float an[3]; int n; float m[4][4], rot[4][4], lmat[4][4], ilmat[4][4]; @@ -1485,26 +1485,26 @@ static void do_rotate_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod mul_serie_m4(m, lmat, rot, ilmat, NULL, NULL, NULL, NULL, NULL); #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) - for (n=0; nco; - origno= unode->no; + unode = sculpt_undo_push_node(ob, nodes[n], SCULPT_UNDO_COORDS); + origco = unode->co; + origno = unode->no; - proxy= BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; + proxy = BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; sculpt_brush_test_init(ss, &test); BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) { if (sculpt_brush_test(&test, origco[vd.i])) { - const float fade = bstrength*tex_strength(ss, brush, origco[vd.i], test.dist, - an, origno[vd.i], NULL); + const float fade = bstrength * tex_strength(ss, brush, origco[vd.i], test.dist, + an, origno[vd.i], NULL); mul_v3_m4v3(proxy[vd.i], m, origco[vd.i]); sub_v3_v3(proxy[vd.i], origco[vd.i]); @@ -1522,9 +1522,9 @@ static void do_layer_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode { SculptSession *ss = ob->sculpt; Brush *brush = paint_brush(&sd->paint); - float bstrength= ss->cache->bstrength; + float bstrength = ss->cache->bstrength; float area_normal[3], offset[3]; - float lim= brush->height; + float lim = brush->height; int n; if (bstrength < 0) @@ -1535,7 +1535,7 @@ static void do_layer_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode mul_v3_v3v3(offset, ss->cache->scale, area_normal); #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) - for (n=0; npbvh, nodes[n])->co; */ - unode= sculpt_undo_push_node(ob, nodes[n], SCULPT_UNDO_COORDS); - origco=unode->co; + unode = sculpt_undo_push_node(ob, nodes[n], SCULPT_UNDO_COORDS); + origco = unode->co; if (!unode->layer_disp) { #pragma omp critical - unode->layer_disp= MEM_callocN(sizeof(float)*unode->totvert, "layer disp"); + unode->layer_disp = MEM_callocN(sizeof(float) * unode->totvert, "layer disp"); } - layer_disp= unode->layer_disp; + layer_disp = unode->layer_disp; sculpt_brush_test_init(ss, &test); BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) { if (sculpt_brush_test(&test, origco[vd.i])) { - const float fade = bstrength*tex_strength(ss, brush, vd.co, test.dist, - area_normal, vd.no, vd.fno); - float *disp= &layer_disp[vd.i]; + const float fade = bstrength * tex_strength(ss, brush, vd.co, test.dist, + area_normal, vd.no, vd.fno); + float *disp = &layer_disp[vd.i]; float val[3]; - *disp+= fade; + *disp += fade; /* Don't let the displacement go past the limit */ if ((lim < 0 && *disp < lim) || (lim >= 0 && *disp > lim)) @@ -1570,7 +1570,7 @@ static void do_layer_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode mul_v3_v3fl(val, offset, *disp); if (ss->layer_co && (brush->flag & BRUSH_PERSISTENT)) { - int index= vd.vert_indices[vd.i]; + int index = vd.vert_indices[vd.i]; /* persistent base */ add_v3_v3(val, ss->layer_co[index]); @@ -1593,23 +1593,23 @@ static void do_inflate_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totno { SculptSession *ss = ob->sculpt; Brush *brush = paint_brush(&sd->paint); - float bstrength= ss->cache->bstrength; + float bstrength = ss->cache->bstrength; int n; #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) - for (n=0; npbvh, nodes[n])->co; + proxy = BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; sculpt_brush_test_init(ss, &test); BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) { if (sculpt_brush_test(&test, vd.co)) { - const float fade = bstrength*tex_strength(ss, brush, vd.co, test.dist, - ss->cache->view_normal, vd.no, vd.fno); + const float fade = bstrength * tex_strength(ss, brush, vd.co, test.dist, + ss->cache->view_normal, vd.no, vd.fno); float val[3]; if (vd.fno) copy_v3_v3(val, vd.fno); @@ -1638,7 +1638,7 @@ static void calc_flatten_center(Sculpt *sd, Object *ob, PBVHNode **nodes, int to zero_v3(fc); #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) - for (n=0; nsculpt; int n; @@ -1701,7 +1701,7 @@ static void calc_area_normal_and_flatten_center(Sculpt *sd, Object *ob, zero_v3(fc); #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) - for (n=0; ncache->mirror_symmetry_pass == 0 && ss->cache->radial_symmetry_pass == 0 && - (ss->cache->first_time || !(brush->flag & BRUSH_ORIGINAL_NORMAL))) + (ss->cache->first_time || !(brush->flag & BRUSH_ORIGINAL_NORMAL))) { switch (brush->sculpt_plane) { case SCULPT_DISP_DIR_VIEW: @@ -1859,7 +1859,7 @@ static void point_plane_project(float intr[3], float co[3], float plane_normal[3 static int plane_trim(StrokeCache *cache, Brush *brush, float val[3]) { - return !(brush->flag & BRUSH_PLANE_TRIM) || (dot_v3v3(val, val) <= cache->radius_squared*cache->plane_trim_squared); + return !(brush->flag & BRUSH_PLANE_TRIM) || (dot_v3v3(val, val) <= cache->radius_squared * cache->plane_trim_squared); } static int plane_point_side_flip(float co[3], float plane_normal[3], float plane_center[3], int flip) @@ -1880,12 +1880,12 @@ static int plane_point_side(float co[3], float plane_normal[3], float plane_cent float delta[3]; sub_v3_v3v3(delta, co, plane_center); - return dot_v3v3(plane_normal, delta) <= 0.0f; + return dot_v3v3(plane_normal, delta) <= 0.0f; } static float get_offset(Sculpt *sd, SculptSession *ss) { - Brush* brush = paint_brush(&sd->paint); + Brush *brush = paint_brush(&sd->paint); float rv = brush->plane_offset; @@ -1917,7 +1917,7 @@ static void do_flatten_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totno calc_sculpt_plane(sd, ob, nodes, totnode, an, fc); - displace = radius*offset; + displace = radius * offset; mul_v3_v3v3(temp, an, ss->cache->scale); mul_v3_fl(temp, displace); @@ -1925,11 +1925,11 @@ static void do_flatten_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totno #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) for (n = 0; n < totnode; n++) { - PBVHVertexIter vd; + PBVHVertexIter vd; SculptBrushTest test; float (*proxy)[3]; - proxy= BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; + proxy = BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; sculpt_brush_test_init(ss, &test); @@ -1943,8 +1943,8 @@ static void do_flatten_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totno sub_v3_v3v3(val, intr, vd.co); if (plane_trim(ss->cache, brush, val)) { - const float fade = bstrength*tex_strength(ss, brush, vd.co, sqrt(test.dist), - an, vd.no, vd.fno); + const float fade = bstrength * tex_strength(ss, brush, vd.co, sqrt(test.dist), + an, vd.no, vd.fno); mul_v3_v3fl(proxy[vd.i], val, fade); @@ -1986,7 +1986,7 @@ static void do_clay_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) radius = -radius; } - displace = radius * (0.25f+offset); + displace = radius * (0.25f + offset); mul_v3_v3v3(temp, an, ss->cache->scale); mul_v3_fl(temp, displace); @@ -2000,7 +2000,7 @@ static void do_clay_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) SculptBrushTest test; float (*proxy)[3]; - proxy= BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; + proxy = BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; sculpt_brush_test_init(ss, &test); @@ -2015,9 +2015,9 @@ static void do_clay_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) sub_v3_v3v3(val, intr, vd.co); if (plane_trim(ss->cache, brush, val)) { - const float fade = bstrength*tex_strength(ss, brush, vd.co, - sqrt(test.dist), - an, vd.no, vd.fno); + const float fade = bstrength * tex_strength(ss, brush, vd.co, + sqrt(test.dist), + an, vd.no, vd.fno); mul_v3_v3fl(proxy[vd.i], val, fade); @@ -2073,7 +2073,7 @@ static void do_clay_strips_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int t radius = -radius; } - displace = radius * (0.25f+offset); + displace = radius * (0.25f + offset); mul_v3_v3v3(temp, sn, ss->cache->scale); mul_v3_fl(temp, displace); @@ -2101,7 +2101,7 @@ static void do_clay_strips_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int t SculptBrushTest test; float (*proxy)[3]; - proxy= BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; + proxy = BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; sculpt_brush_test_init(ss, &test); @@ -2116,9 +2116,9 @@ static void do_clay_strips_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int t sub_v3_v3v3(val, intr, vd.co); if (plane_trim(ss->cache, brush, val)) { - const float fade = bstrength*tex_strength(ss, brush, vd.co, - ss->cache->radius*test.dist, - an, vd.no, vd.fno); + const float fade = bstrength * tex_strength(ss, brush, vd.co, + ss->cache->radius * test.dist, + an, vd.no, vd.fno); mul_v3_v3fl(proxy[vd.i], val, fade); @@ -2152,7 +2152,7 @@ static void do_fill_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) calc_sculpt_plane(sd, ob, nodes, totnode, an, fc); - displace = radius*offset; + displace = radius * offset; mul_v3_v3v3(temp, an, ss->cache->scale); mul_v3_fl(temp, displace); @@ -2164,7 +2164,7 @@ static void do_fill_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) SculptBrushTest test; float (*proxy)[3]; - proxy= BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; + proxy = BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; sculpt_brush_test_init(ss, &test); @@ -2179,9 +2179,9 @@ static void do_fill_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) sub_v3_v3v3(val, intr, vd.co); if (plane_trim(ss->cache, brush, val)) { - const float fade = bstrength*tex_strength(ss, brush, vd.co, - sqrt(test.dist), - an, vd.no, vd.fno); + const float fade = bstrength * tex_strength(ss, brush, vd.co, + sqrt(test.dist), + an, vd.no, vd.fno); mul_v3_v3fl(proxy[vd.i], val, fade); @@ -2215,7 +2215,7 @@ static void do_scrape_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod calc_sculpt_plane(sd, ob, nodes, totnode, an, fc); - displace = -radius*offset; + displace = -radius * offset; mul_v3_v3v3(temp, an, ss->cache->scale); mul_v3_fl(temp, displace); @@ -2227,7 +2227,7 @@ static void do_scrape_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod SculptBrushTest test; float (*proxy)[3]; - proxy= BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; + proxy = BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co; sculpt_brush_test_init(ss, &test); @@ -2242,9 +2242,9 @@ static void do_scrape_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod sub_v3_v3v3(val, intr, vd.co); if (plane_trim(ss->cache, brush, val)) { - const float fade = bstrength*tex_strength(ss, brush, vd.co, - sqrt(test.dist), - an, vd.no, vd.fno); + const float fade = bstrength * tex_strength(ss, brush, vd.co, + sqrt(test.dist), + an, vd.no, vd.fno); mul_v3_v3fl(proxy[vd.i], val, fade); @@ -2260,36 +2260,36 @@ static void do_scrape_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnod void sculpt_vertcos_to_key(Object *ob, KeyBlock *kb, float (*vertCos)[3]) { - Mesh *me= (Mesh*)ob->data; - float (*ofs)[3]= NULL; - int a, is_basis= 0; + Mesh *me = (Mesh *)ob->data; + float (*ofs)[3] = NULL; + int a, is_basis = 0; KeyBlock *currkey; /* for relative keys editing of base should update other keys */ if (me->key->type == KEY_RELATIVE) - for (currkey = me->key->block.first; currkey; currkey= currkey->next) - if (ob->shapenr-1 == currkey->relative) { - is_basis= 1; + for (currkey = me->key->block.first; currkey; currkey = currkey->next) + if (ob->shapenr - 1 == currkey->relative) { + is_basis = 1; break; } if (is_basis) { - ofs= key_to_vertcos(ob, kb); + ofs = key_to_vertcos(ob, kb); /* calculate key coord offsets (from previous location) */ - for (a= 0; a < me->totvert; a++) { + for (a = 0; a < me->totvert; a++) { sub_v3_v3v3(ofs[a], vertCos[a], ofs[a]); } /* apply offsets on other keys */ currkey = me->key->block.first; while (currkey) { - int apply_offset = ((currkey != kb) && (ob->shapenr-1 == currkey->relative)); + int apply_offset = ((currkey != kb) && (ob->shapenr - 1 == currkey->relative)); if (apply_offset) offset_to_key(ob, currkey, ofs); - currkey= currkey->next; + currkey = currkey->next; } MEM_freeN(ofs); @@ -2297,9 +2297,9 @@ void sculpt_vertcos_to_key(Object *ob, KeyBlock *kb, float (*vertCos)[3]) /* modifying of basis key should update mesh */ if (kb == me->key->refkey) { - MVert *mvert= me->mvert; + MVert *mvert = me->mvert; - for (a= 0; a < me->totvert; a++, mvert++) + for (a = 0; a < me->totvert; a++, mvert++) copy_v3_v3(mvert->co, vertCos[a]); mesh_calc_normals_mapping(me->mvert, me->totvert, me->mloop, me->mpoly, me->totloop, me->totpoly, NULL, NULL, 0, NULL, NULL); @@ -2326,69 +2326,69 @@ static void do_brush_action(Sculpt *sd, Object *ob, Brush *brush) /* Only act if some verts are inside the brush area */ if (totnode) { #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) - for (n= 0; n < totnode; n++) { + for (n = 0; n < totnode; n++) { sculpt_undo_push_node(ob, nodes[n], SCULPT_UNDO_COORDS); BLI_pbvh_node_mark_update(nodes[n]); } /* Apply one type of brush action */ - switch(brush->sculpt_tool) { - case SCULPT_TOOL_DRAW: - do_draw_brush(sd, ob, nodes, totnode); - break; - case SCULPT_TOOL_SMOOTH: - do_smooth_brush(sd, ob, nodes, totnode); - break; - case SCULPT_TOOL_CREASE: - do_crease_brush(sd, ob, nodes, totnode); - break; - case SCULPT_TOOL_BLOB: - do_crease_brush(sd, ob, nodes, totnode); - break; - case SCULPT_TOOL_PINCH: - do_pinch_brush(sd, ob, nodes, totnode); - break; - case SCULPT_TOOL_INFLATE: - do_inflate_brush(sd, ob, nodes, totnode); - break; - case SCULPT_TOOL_GRAB: - do_grab_brush(sd, ob, nodes, totnode); - break; - case SCULPT_TOOL_ROTATE: - do_rotate_brush(sd, ob, nodes, totnode); - break; - case SCULPT_TOOL_SNAKE_HOOK: - do_snake_hook_brush(sd, ob, nodes, totnode); - break; - case SCULPT_TOOL_NUDGE: - do_nudge_brush(sd, ob, nodes, totnode); - break; - case SCULPT_TOOL_THUMB: - do_thumb_brush(sd, ob, nodes, totnode); - break; - case SCULPT_TOOL_LAYER: - do_layer_brush(sd, ob, nodes, totnode); - break; - case SCULPT_TOOL_FLATTEN: - do_flatten_brush(sd, ob, nodes, totnode); - break; - case SCULPT_TOOL_CLAY: - do_clay_brush(sd, ob, nodes, totnode); - break; - case SCULPT_TOOL_CLAY_STRIPS: - do_clay_strips_brush(sd, ob, nodes, totnode); - break; - case SCULPT_TOOL_FILL: - do_fill_brush(sd, ob, nodes, totnode); - break; - case SCULPT_TOOL_SCRAPE: - do_scrape_brush(sd, ob, nodes, totnode); - break; + switch (brush->sculpt_tool) { + case SCULPT_TOOL_DRAW: + do_draw_brush(sd, ob, nodes, totnode); + break; + case SCULPT_TOOL_SMOOTH: + do_smooth_brush(sd, ob, nodes, totnode); + break; + case SCULPT_TOOL_CREASE: + do_crease_brush(sd, ob, nodes, totnode); + break; + case SCULPT_TOOL_BLOB: + do_crease_brush(sd, ob, nodes, totnode); + break; + case SCULPT_TOOL_PINCH: + do_pinch_brush(sd, ob, nodes, totnode); + break; + case SCULPT_TOOL_INFLATE: + do_inflate_brush(sd, ob, nodes, totnode); + break; + case SCULPT_TOOL_GRAB: + do_grab_brush(sd, ob, nodes, totnode); + break; + case SCULPT_TOOL_ROTATE: + do_rotate_brush(sd, ob, nodes, totnode); + break; + case SCULPT_TOOL_SNAKE_HOOK: + do_snake_hook_brush(sd, ob, nodes, totnode); + break; + case SCULPT_TOOL_NUDGE: + do_nudge_brush(sd, ob, nodes, totnode); + break; + case SCULPT_TOOL_THUMB: + do_thumb_brush(sd, ob, nodes, totnode); + break; + case SCULPT_TOOL_LAYER: + do_layer_brush(sd, ob, nodes, totnode); + break; + case SCULPT_TOOL_FLATTEN: + do_flatten_brush(sd, ob, nodes, totnode); + break; + case SCULPT_TOOL_CLAY: + do_clay_brush(sd, ob, nodes, totnode); + break; + case SCULPT_TOOL_CLAY_STRIPS: + do_clay_strips_brush(sd, ob, nodes, totnode); + break; + case SCULPT_TOOL_FILL: + do_fill_brush(sd, ob, nodes, totnode); + break; + case SCULPT_TOOL_SCRAPE: + do_scrape_brush(sd, ob, nodes, totnode); + break; } if (brush->sculpt_tool != SCULPT_TOOL_SMOOTH && brush->autosmooth_factor > 0) { if (brush->flag & BRUSH_INVERSE_SMOOTH_PRESSURE) { - smooth(sd, ob, nodes, totnode, brush->autosmooth_factor*(1-ss->cache->pressure)); + smooth(sd, ob, nodes, totnode, brush->autosmooth_factor * (1 - ss->cache->pressure)); } else { smooth(sd, ob, nodes, totnode, brush->autosmooth_factor); @@ -2403,9 +2403,9 @@ static void do_brush_action(Sculpt *sd, Object *ob, Brush *brush) static void sculpt_flush_pbvhvert_deform(Object *ob, PBVHVertexIter *vd) { SculptSession *ss = ob->sculpt; - Mesh *me= ob->data; + Mesh *me = ob->data; float disp[3], newco[3]; - int index= vd->vert_indices[vd->i]; + int index = vd->vert_indices[vd->i]; sub_v3_v3v3(disp, vd->co, ss->deform_cos[index]); mul_m3_v3(ss->deform_imats[index], disp); @@ -2421,8 +2421,8 @@ static void sculpt_flush_pbvhvert_deform(Object *ob, PBVHVertexIter *vd) static void sculpt_combine_proxies(Sculpt *sd, Object *ob) { SculptSession *ss = ob->sculpt; - Brush *brush= paint_brush(&sd->paint); - PBVHNode** nodes; + Brush *brush = paint_brush(&sd->paint); + PBVHNode **nodes; int totnode, n; BLI_pbvh_gather_proxies(ss->pbvh, &nodes, &totnode); @@ -2433,14 +2433,14 @@ static void sculpt_combine_proxies(Sculpt *sd, Object *ob) SCULPT_TOOL_ROTATE, SCULPT_TOOL_THUMB)); #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) - for (n= 0; n < totnode; n++) { + for (n = 0; n < totnode; n++) { PBVHVertexIter vd; - PBVHProxyNode* proxies; + PBVHProxyNode *proxies; int proxy_count; float (*orco)[3]; if (use_orco) - orco= sculpt_undo_push_node(ob, nodes[n], SCULPT_UNDO_COORDS)->co; + orco = sculpt_undo_push_node(ob, nodes[n], SCULPT_UNDO_COORDS)->co; BLI_pbvh_node_get_proxies(nodes[n], &proxies, &proxy_count); @@ -2453,7 +2453,7 @@ static void sculpt_combine_proxies(Sculpt *sd, Object *ob) else copy_v3_v3(val, vd.co); - for (p= 0; p < proxy_count; p++) + for (p = 0; p < proxy_count; p++) add_v3_v3(val, proxies[p].co[vd.i]); sculpt_clip(sd, ss, vd.co, val); @@ -2494,31 +2494,31 @@ static void sculpt_update_keyblock(Object *ob) static void sculpt_flush_stroke_deform(Sculpt *sd, Object *ob) { SculptSession *ss = ob->sculpt; - Brush *brush= paint_brush(&sd->paint); + Brush *brush = paint_brush(&sd->paint); if (ELEM(brush->sculpt_tool, SCULPT_TOOL_SMOOTH, SCULPT_TOOL_LAYER)) { /* this brushes aren't using proxies, so sculpt_combine_proxies() wouldn't * propagate needed deformation to original base */ int n, totnode; - Mesh *me= (Mesh*)ob->data; - PBVHNode** nodes; - float (*vertCos)[3]= NULL; + Mesh *me = (Mesh *)ob->data; + PBVHNode **nodes; + float (*vertCos)[3] = NULL; if (ss->kb) - vertCos= MEM_callocN(sizeof(*vertCos)*me->totvert, "flushStrokeDeofrm keyVerts"); + vertCos = MEM_callocN(sizeof(*vertCos) * me->totvert, "flushStrokeDeofrm keyVerts"); BLI_pbvh_search_gather(ss->pbvh, NULL, NULL, &nodes, &totnode); #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) - for (n= 0; n < totnode; n++) { + for (n = 0; n < totnode; n++) { PBVHVertexIter vd; BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) { sculpt_flush_pbvhvert_deform(ob, &vd); if (vertCos) { - int index= vd.vert_indices[vd.i]; + int index = vd.vert_indices[vd.i]; copy_v3_v3(vertCos[index], ss->orig_cos[index]); } } @@ -2545,8 +2545,8 @@ static void sculpt_flush_stroke_deform(Sculpt *sd, Object *ob) /* Flip all the editdata across the axis/axes specified by symm. Used to * calculate multiple modifications to the mesh when symmetry is enabled. */ static void calc_brushdata_symm(Sculpt *sd, StrokeCache *cache, const char symm, - const char axis, const float angle, - const float UNUSED(feather)) + const char axis, const float angle, + const float UNUSED(feather)) { (void)sd; /* unused */ @@ -2557,14 +2557,14 @@ static void calc_brushdata_symm(Sculpt *sd, StrokeCache *cache, const char symm, /* XXX This reduces the length of the grab delta if it approaches the line of symmetry XXX However, a different approach appears to be needed if (sd->flags & SCULPT_SYMMETRY_FEATHER) { - float frac = 1.0f/max_overlap_count(sd); - float reduce = (feather-frac)/(1-frac); + float frac = 1.0f/max_overlap_count(sd); + float reduce = (feather-frac)/(1-frac); - printf("feather: %f frac: %f reduce: %f\n", feather, frac, reduce); + printf("feather: %f frac: %f reduce: %f\n", feather, frac, reduce); - if (frac < 1) - mul_v3_fl(cache->grab_delta_symmetry, reduce); - } */ + if (frac < 1) + mul_v3_fl(cache->grab_delta_symmetry, reduce); + } */ unit_m4(cache->symm_rot_mat); unit_m4(cache->symm_rot_mat_inv); @@ -2579,15 +2579,15 @@ static void calc_brushdata_symm(Sculpt *sd, StrokeCache *cache, const char symm, } static void do_radial_symmetry(Sculpt *sd, Object *ob, Brush *brush, - const char symm, const int axis, - const float feather) + const char symm, const int axis, + const float feather) { SculptSession *ss = ob->sculpt; int i; - for (i = 1; i < sd->radial_symm[axis-'X']; ++i) { - const float angle = 2*M_PI*i/sd->radial_symm[axis-'X']; - ss->cache->radial_symmetry_pass= i; + for (i = 1; i < sd->radial_symm[axis - 'X']; ++i) { + const float angle = 2 * M_PI * i / sd->radial_symm[axis - 'X']; + ss->cache->radial_symmetry_pass = i; calc_brushdata_symm(sd, ss->cache, symm, axis, angle, feather); do_brush_action(sd, ob, brush); } @@ -2616,15 +2616,15 @@ static void do_symmetrical_brush_actions(Sculpt *sd, Object *ob) float feather = calc_symmetry_feather(sd, ss->cache); - cache->bstrength= brush_strength(sd, cache, feather); + cache->bstrength = brush_strength(sd, cache, feather); - cache->symmetry= symm; + cache->symmetry = symm; /* symm is a bit combination of XYZ - 1 is mirror X; 2 is Y; 3 is XY; 4 is Z; 5 is XZ; 6 is YZ; 7 is XYZ */ for (i = 0; i <= symm; ++i) { if (i == 0 || (symm & i && (symm != 5 || i != 3) && (symm != 6 || (i != 3 && i != 5)))) { - cache->mirror_symmetry_pass= i; - cache->radial_symmetry_pass= 0; + cache->mirror_symmetry_pass = i; + cache->radial_symmetry_pass = 0; calc_brushdata_symm(sd, cache, i, 0, 0, feather); do_brush_action(sd, ob, brush); @@ -2643,21 +2643,21 @@ static void do_symmetrical_brush_actions(Sculpt *sd, Object *ob) if (ss->modifiers_active) sculpt_flush_stroke_deform(sd, ob); - cache->first_time= 0; + cache->first_time = 0; } static void sculpt_update_tex(const Scene *scene, Sculpt *sd, SculptSession *ss) { Brush *brush = paint_brush(&sd->paint); - const int radius= brush_size(scene, brush); + const int radius = brush_size(scene, brush); if (ss->texcache) { MEM_freeN(ss->texcache); - ss->texcache= NULL; + ss->texcache = NULL; } /* Need to allocate a bigger buffer for bigger brush size */ - ss->texcache_side = 2*radius; + ss->texcache_side = 2 * radius; if (!ss->texcache || ss->texcache_side > ss->texcache_actual) { ss->texcache = brush_gen_texture_cache(brush, radius); ss->texcache_actual = ss->texcache_side; @@ -2668,21 +2668,21 @@ void sculpt_update_mesh_elements(Scene *scene, Sculpt *sd, Object *ob, int need_ { DerivedMesh *dm = mesh_get_derived_final(scene, ob, CD_MASK_BAREMESH); SculptSession *ss = ob->sculpt; - MultiresModifierData *mmd= sculpt_multires_active(scene, ob); + MultiresModifierData *mmd = sculpt_multires_active(scene, ob); - ss->modifiers_active= sculpt_modifiers_active(scene, sd, ob); + ss->modifiers_active = sculpt_modifiers_active(scene, sd, ob); - if (!mmd) ss->kb= ob_get_keyblock(ob); - else ss->kb= NULL; + if (!mmd) ss->kb = ob_get_keyblock(ob); + else ss->kb = NULL; if (mmd) { ss->multires = mmd; ss->totvert = dm->getNumVerts(dm); ss->totpoly = dm->getNumPolys(dm); - ss->mvert= NULL; - ss->mpoly= NULL; - ss->mloop= NULL; - ss->face_normals= NULL; + ss->mvert = NULL; + ss->mpoly = NULL; + ss->mloop = NULL; + ss->face_normals = NULL; } else { Mesh *me = get_mesh(ob); @@ -2699,7 +2699,7 @@ void sculpt_update_mesh_elements(Scene *scene, Sculpt *sd, Object *ob, int need_ BKE_mesh_tessface_ensure(ob->data); ss->pbvh = dm->getPBVH(ob, dm); - ss->pmap = (need_pmap && dm->getPolyMap)? dm->getPolyMap(ob, dm): NULL; + ss->pmap = (need_pmap && dm->getPolyMap) ? dm->getPolyMap(ob, dm) : NULL; if (ss->modifiers_active) { if (!ss->orig_cos) { @@ -2713,7 +2713,7 @@ void sculpt_update_mesh_elements(Scene *scene, Sculpt *sd, Object *ob, int need_ crazyspace_build_sculpt(scene, ob, &ss->deform_imats, &ss->deform_cos); BLI_pbvh_apply_vertCos(ss->pbvh, ss->deform_cos); - for (a = 0; a < ((Mesh*)ob->data)->totvert; ++a) + for (a = 0; a < ((Mesh *)ob->data)->totvert; ++a) invert_m3(ss->deform_imats[a]); } } @@ -2721,7 +2721,7 @@ void sculpt_update_mesh_elements(Scene *scene, Sculpt *sd, Object *ob, int need_ /* if pbvh is deformed, key block is already applied to it */ if (ss->kb && !BLI_pbvh_isDeformed(ss->pbvh)) { - float (*vertCos)[3]= key_to_vertcos(ob, ss->kb); + float (*vertCos)[3] = key_to_vertcos(ob, ss->kb); if (vertCos) { /* apply shape keys coordinates to PBVH */ @@ -2746,39 +2746,39 @@ static const char *sculpt_tool_name(Sculpt *sd) { Brush *brush = paint_brush(&sd->paint); - switch(brush->sculpt_tool) { - case SCULPT_TOOL_DRAW: - return "Draw Brush"; break; - case SCULPT_TOOL_SMOOTH: - return "Smooth Brush"; break; - case SCULPT_TOOL_CREASE: - return "Crease Brush"; break; - case SCULPT_TOOL_BLOB: - return "Blob Brush"; break; - case SCULPT_TOOL_PINCH: - return "Pinch Brush"; break; - case SCULPT_TOOL_INFLATE: - return "Inflate Brush"; break; - case SCULPT_TOOL_GRAB: - return "Grab Brush"; break; - case SCULPT_TOOL_NUDGE: - return "Nudge Brush"; break; - case SCULPT_TOOL_THUMB: - return "Thumb Brush"; break; - case SCULPT_TOOL_LAYER: - return "Layer Brush"; break; - case SCULPT_TOOL_FLATTEN: - return "Flatten Brush"; break; - case SCULPT_TOOL_CLAY: - return "Clay Brush"; break; - case SCULPT_TOOL_CLAY_STRIPS: - return "Clay Strips Brush"; break; - case SCULPT_TOOL_FILL: - return "Fill Brush"; break; - case SCULPT_TOOL_SCRAPE: - return "Scrape Brush"; break; - default: - return "Sculpting"; break; + switch (brush->sculpt_tool) { + case SCULPT_TOOL_DRAW: + return "Draw Brush"; break; + case SCULPT_TOOL_SMOOTH: + return "Smooth Brush"; break; + case SCULPT_TOOL_CREASE: + return "Crease Brush"; break; + case SCULPT_TOOL_BLOB: + return "Blob Brush"; break; + case SCULPT_TOOL_PINCH: + return "Pinch Brush"; break; + case SCULPT_TOOL_INFLATE: + return "Inflate Brush"; break; + case SCULPT_TOOL_GRAB: + return "Grab Brush"; break; + case SCULPT_TOOL_NUDGE: + return "Nudge Brush"; break; + case SCULPT_TOOL_THUMB: + return "Thumb Brush"; break; + case SCULPT_TOOL_LAYER: + return "Layer Brush"; break; + case SCULPT_TOOL_FLATTEN: + return "Flatten Brush"; break; + case SCULPT_TOOL_CLAY: + return "Clay Brush"; break; + case SCULPT_TOOL_CLAY_STRIPS: + return "Clay Strips Brush"; break; + case SCULPT_TOOL_FILL: + return "Fill Brush"; break; + case SCULPT_TOOL_SCRAPE: + return "Scrape Brush"; break; + default: + return "Sculpting"; break; } } @@ -2799,10 +2799,10 @@ static void sculpt_init_mirror_clipping(Object *ob, SculptSession *ss) ModifierData *md; int i; - for (md= ob->modifiers.first; md; md= md->next) { - if (md->type==eModifierType_Mirror && - (md->mode & eModifierMode_Realtime)) { - MirrorModifierData *mmd = (MirrorModifierData*)md; + for (md = ob->modifiers.first; md; md = md->next) { + if (md->type == eModifierType_Mirror && + (md->mode & eModifierMode_Realtime)) { + MirrorModifierData *mmd = (MirrorModifierData *)md; if (mmd->flag & MOD_MIR_CLIPPING) { /* check each axis for mirroring */ @@ -2813,9 +2813,9 @@ static void sculpt_init_mirror_clipping(Object *ob, SculptSession *ss) /* update the clip tolerance */ if (mmd->tolerance > - ss->cache->clip_tolerance[i]) + ss->cache->clip_tolerance[i]) ss->cache->clip_tolerance[i] = - mmd->tolerance; + mmd->tolerance; } } } @@ -2824,12 +2824,12 @@ static void sculpt_init_mirror_clipping(Object *ob, SculptSession *ss) } /* Initialize the stroke cache invariants from operator properties */ -static void sculpt_update_cache_invariants(bContext* C, Sculpt *sd, SculptSession *ss, wmOperator *op, wmEvent *event) +static void sculpt_update_cache_invariants(bContext *C, Sculpt *sd, SculptSession *ss, wmOperator *op, wmEvent *event) { StrokeCache *cache = MEM_callocN(sizeof(StrokeCache), "stroke cache"); Brush *brush = paint_brush(&sd->paint); ViewContext *vc = paint_stroke_view_context(op->customdata); - Object *ob= CTX_data_active_object(C); + Object *ob = CTX_data_active_object(C); int i; int mode; @@ -2867,12 +2867,12 @@ static void sculpt_update_cache_invariants(bContext* C, Sculpt *sd, SculptSessio /* Alt-Smooth */ if (ss->cache->alt_smooth) { - Paint *p= &sd->paint; + Paint *p = &sd->paint; Brush *br; - BLI_strncpy(cache->saved_active_brush_name, brush->id.name+2, sizeof(cache->saved_active_brush_name)); + BLI_strncpy(cache->saved_active_brush_name, brush->id.name + 2, sizeof(cache->saved_active_brush_name)); - br= (Brush *)find_id("BR", "Smooth"); + br = (Brush *)find_id("BR", "Smooth"); if (br) { paint_brush_set(p, br); brush = br; @@ -2897,8 +2897,8 @@ static void sculpt_update_cache_invariants(bContext* C, Sculpt *sd, SculptSessio /* not supported yet for multires */ if (!ss->multires && !ss->layer_co && (brush->flag & BRUSH_PERSISTENT)) { if (!ss->layer_co) - ss->layer_co= MEM_mallocN(sizeof(float) * 3 * ss->totvert, - "sculpt mesh vertices copy"); + ss->layer_co = MEM_mallocN(sizeof(float) * 3 * ss->totvert, + "sculpt mesh vertices copy"); if (ss->deform_cos) memcpy(ss->layer_co, ss->deform_cos, ss->totvert); else { @@ -2913,7 +2913,7 @@ static void sculpt_update_cache_invariants(bContext* C, Sculpt *sd, SculptSessio if (brush->flag & BRUSH_ANCHORED) { if (ss->face_normals) { float *fn = ss->face_normals; - cache->face_norms= MEM_mallocN(sizeof(float) * 3 * ss->totpoly, "Sculpt face norms"); + cache->face_norms = MEM_mallocN(sizeof(float) * 3 * ss->totpoly, "Sculpt face norms"); for (i = 0; i < ss->totpoly; ++i, fn += 3) copy_v3_v3(cache->face_norms[i], fn); } @@ -2922,17 +2922,17 @@ static void sculpt_update_cache_invariants(bContext* C, Sculpt *sd, SculptSessio } if (ELEM8(brush->sculpt_tool, - SCULPT_TOOL_DRAW, SCULPT_TOOL_CREASE, SCULPT_TOOL_BLOB, - SCULPT_TOOL_LAYER, SCULPT_TOOL_INFLATE, SCULPT_TOOL_CLAY, - SCULPT_TOOL_CLAY_STRIPS, SCULPT_TOOL_ROTATE)) + SCULPT_TOOL_DRAW, SCULPT_TOOL_CREASE, SCULPT_TOOL_BLOB, + SCULPT_TOOL_LAYER, SCULPT_TOOL_INFLATE, SCULPT_TOOL_CLAY, + SCULPT_TOOL_CLAY_STRIPS, SCULPT_TOOL_ROTATE)) if (!(brush->flag & BRUSH_ACCUMULATE)) cache->original = 1; cache->special_rotation = (brush->flag & BRUSH_RAKE) ? sd->last_angle : 0; - cache->first_time= 1; + cache->first_time = 1; - cache->vertex_rotation= 0; + cache->vertex_rotation = 0; } static void sculpt_update_brush_delta(Sculpt *sd, Object *ob, Brush *brush) @@ -2946,9 +2946,9 @@ static void sculpt_update_brush_delta(Sculpt *sd, Object *ob, Brush *brush) int tool = brush->sculpt_tool; if (ELEM5(tool, - SCULPT_TOOL_GRAB, SCULPT_TOOL_NUDGE, - SCULPT_TOOL_CLAY_STRIPS, SCULPT_TOOL_SNAKE_HOOK, - SCULPT_TOOL_THUMB)) { + SCULPT_TOOL_GRAB, SCULPT_TOOL_NUDGE, + SCULPT_TOOL_CLAY_STRIPS, SCULPT_TOOL_SNAKE_HOOK, + SCULPT_TOOL_THUMB)) { float grab_location[3], imat[4][4], delta[3], loc[3]; if (cache->first_time) { @@ -2966,30 +2966,30 @@ static void sculpt_update_brush_delta(Sculpt *sd, Object *ob, Brush *brush) /* compute delta to move verts by */ if (!cache->first_time) { - switch(tool) { - case SCULPT_TOOL_GRAB: - case SCULPT_TOOL_THUMB: - sub_v3_v3v3(delta, grab_location, cache->old_grab_location); - invert_m4_m4(imat, ob->obmat); - mul_mat3_m4_v3(imat, delta); - add_v3_v3(cache->grab_delta, delta); - break; - case SCULPT_TOOL_CLAY_STRIPS: - case SCULPT_TOOL_NUDGE: - case SCULPT_TOOL_SNAKE_HOOK: - if (brush->flag & BRUSH_ANCHORED) { - float orig[3]; - mul_v3_m4v3(orig, ob->obmat, cache->orig_grab_location); - sub_v3_v3v3(cache->grab_delta, grab_location, orig); - } - else { - sub_v3_v3v3(cache->grab_delta, grab_location, - cache->old_grab_location); - } + switch (tool) { + case SCULPT_TOOL_GRAB: + case SCULPT_TOOL_THUMB: + sub_v3_v3v3(delta, grab_location, cache->old_grab_location); + invert_m4_m4(imat, ob->obmat); + mul_mat3_m4_v3(imat, delta); + add_v3_v3(cache->grab_delta, delta); + break; + case SCULPT_TOOL_CLAY_STRIPS: + case SCULPT_TOOL_NUDGE: + case SCULPT_TOOL_SNAKE_HOOK: + if (brush->flag & BRUSH_ANCHORED) { + float orig[3]; + mul_v3_m4v3(orig, ob->obmat, cache->orig_grab_location); + sub_v3_v3v3(cache->grab_delta, grab_location, orig); + } + else { + sub_v3_v3v3(cache->grab_delta, grab_location, + cache->old_grab_location); + } - invert_m4_m4(imat, ob->obmat); - mul_mat3_m4_v3(imat, cache->grab_delta); - break; + invert_m4_m4(imat, ob->obmat); + mul_mat3_m4_v3(imat, cache->grab_delta); + break; } } else { @@ -3016,8 +3016,8 @@ static void sculpt_update_brush_delta(Sculpt *sd, Object *ob, Brush *brush) /* Initialize the stroke cache variants from operator properties */ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob, - struct PaintStroke *stroke, - PointerRNA *ptr) + struct PaintStroke *stroke, + PointerRNA *ptr) { Scene *scene = CTX_data_scene(C); SculptSession *ss = ob->sculpt; @@ -3029,10 +3029,10 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob, /* RNA_float_get_array(ptr, "location", cache->traced_location); */ if (cache->first_time || - !((brush->flag & BRUSH_ANCHORED)|| - (brush->sculpt_tool == SCULPT_TOOL_SNAKE_HOOK)|| + !((brush->flag & BRUSH_ANCHORED) || + (brush->sculpt_tool == SCULPT_TOOL_SNAKE_HOOK) || (brush->sculpt_tool == SCULPT_TOOL_ROTATE)) - ) + ) { RNA_float_get_array(ptr, "location", cache->true_location); } @@ -3050,41 +3050,42 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob, /* Truly temporary data that isn't stored in properties */ - sd->draw_pressure= 1; - sd->pressure_value= cache->pressure; + sd->draw_pressure = 1; + sd->pressure_value = cache->pressure; cache->previous_pixel_radius = cache->pixel_radius; cache->pixel_radius = brush_size(scene, brush); if (cache->first_time) { if (!brush_use_locked_size(scene, brush)) { - cache->initial_radius= paint_calc_object_space_radius(cache->vc, cache->true_location, brush_size(scene, brush)); + cache->initial_radius = paint_calc_object_space_radius(cache->vc, cache->true_location, brush_size(scene, brush)); brush_set_unprojected_radius(scene, brush, cache->initial_radius); } else { - cache->initial_radius= brush_unprojected_radius(scene, brush); + cache->initial_radius = brush_unprojected_radius(scene, brush); } } if (brush_use_size_pressure(scene, brush)) { cache->pixel_radius *= cache->pressure; - cache->radius= cache->initial_radius * cache->pressure; + cache->radius = cache->initial_radius * cache->pressure; } else - cache->radius= cache->initial_radius; + cache->radius = cache->initial_radius; - cache->radius_squared = cache->radius*cache->radius; + cache->radius_squared = cache->radius * cache->radius; if (!(brush->flag & BRUSH_ANCHORED || - ELEM4(brush->sculpt_tool, SCULPT_TOOL_GRAB, SCULPT_TOOL_SNAKE_HOOK, - SCULPT_TOOL_THUMB, SCULPT_TOOL_ROTATE))) { + ELEM4(brush->sculpt_tool, SCULPT_TOOL_GRAB, SCULPT_TOOL_SNAKE_HOOK, + SCULPT_TOOL_THUMB, SCULPT_TOOL_ROTATE))) + { copy_v2_v2(cache->tex_mouse, cache->mouse); if ( (brush->mtex.brush_map_mode == MTEX_MAP_MODE_FIXED) && - (brush->flag & BRUSH_RANDOM_ROTATION) && - !(brush->flag & BRUSH_RAKE)) + (brush->flag & BRUSH_RANDOM_ROTATION) && + !(brush->flag & BRUSH_RAKE)) { - cache->special_rotation = 2.0f*(float)M_PI*BLI_frand(); + cache->special_rotation = 2.0f * (float)M_PI * BLI_frand(); } } @@ -3094,7 +3095,7 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob, dx = cache->mouse[0] - cache->initial_mouse[0]; dy = cache->mouse[1] - cache->initial_mouse[1]; - sd->anchored_size = cache->pixel_radius = sqrt(dx*dx + dy*dy); + sd->anchored_size = cache->pixel_radius = sqrt(dx * dx + dy * dy); cache->special_rotation = atan2(dx, dy) + M_PI; @@ -3119,10 +3120,10 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob, if (!hit) copy_v2_v2(sd->anchored_initial_mouse, cache->initial_mouse); - cache->radius= paint_calc_object_space_radius(paint_stroke_view_context(stroke), - cache->true_location, - cache->pixel_radius); - cache->radius_squared = cache->radius*cache->radius; + cache->radius = paint_calc_object_space_radius(paint_stroke_view_context(stroke), + cache->true_location, + cache->pixel_radius); + cache->radius_squared = cache->radius * cache->radius; copy_v3_v3(sd->anchored_location, cache->true_location); @@ -3139,11 +3140,11 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob, if (cache->first_time) { copy_v2_v2(cache->last_rake, cache->mouse); } - else if (dx*dx + dy*dy >= r*r) { + else if (dx * dx + dy * dy >= r * r) { cache->special_rotation = atan2(dx, dy); - cache->last_rake[0] = u*cache->last_rake[0] + v*cache->mouse[0]; - cache->last_rake[1] = u*cache->last_rake[1] + v*cache->mouse[1]; + cache->last_rake[0] = u * cache->last_rake[0] + v * cache->mouse[0]; + cache->last_rake[1] = u * cache->last_rake[1] + v * cache->mouse[1]; } } @@ -3184,16 +3185,16 @@ typedef struct { int original; } SculptRaycastData; -static void sculpt_raycast_cb(PBVHNode *node, void *data_v, float* tmin) +static void sculpt_raycast_cb(PBVHNode *node, void *data_v, float *tmin) { if (BLI_pbvh_node_get_tmin(node) < *tmin) { SculptRaycastData *srd = data_v; - float (*origco)[3]= NULL; + float (*origco)[3] = NULL; if (srd->original && srd->ss->cache) { /* intersect with coordinates from before we started stroke */ - SculptUndoNode *unode= sculpt_undo_get_node(node); - origco= (unode)? unode->co: NULL; + SculptUndoNode *unode = sculpt_undo_get_node(node); + origco = (unode) ? unode->co : NULL; } if (BLI_pbvh_node_raycast(srd->ss->pbvh, node, origco, srd->ray_start, srd->ray_normal, &srd->dist)) { @@ -3236,14 +3237,14 @@ int sculpt_stroke_get_location(bContext *C, float out[3], float mouse[2]) mul_m4_v3(obimat, ray_end); sub_v3_v3v3(ray_normal, ray_end, ray_start); - dist= normalize_v3(ray_normal); + dist = normalize_v3(ray_normal); srd.ss = vc.obact->sculpt; srd.ray_start = ray_start; srd.ray_normal = ray_normal; srd.dist = dist; srd.hit = 0; - srd.original = (cache)? cache->original: 0; + srd.original = (cache) ? cache->original : 0; BLI_pbvh_raycast(ss->pbvh, sculpt_raycast_cb, &srd, ray_start, ray_normal, srd.original); @@ -3257,11 +3258,11 @@ int sculpt_stroke_get_location(bContext *C, float out[3], float mouse[2]) static void sculpt_brush_init_tex(const Scene *scene, Sculpt *sd, SculptSession *ss) { Brush *brush = paint_brush(&sd->paint); - MTex *mtex= &brush->mtex; + MTex *mtex = &brush->mtex; /* init mtex nodes */ if (mtex->tex && mtex->tex->nodetree) - ntreeTexBeginExecTree(mtex->tex->nodetree, 1); /* has internal flag to detect it only does it once */ + ntreeTexBeginExecTree(mtex->tex->nodetree, 1); /* has internal flag to detect it only does it once */ /* TODO: Shouldn't really have to do this at the start of every * stroke, but sculpt would need some sort of notification when @@ -3271,19 +3272,19 @@ static void sculpt_brush_init_tex(const Scene *scene, Sculpt *sd, SculptSession static int sculpt_brush_stroke_init(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); - Object *ob= CTX_data_active_object(C); + Scene *scene = CTX_data_scene(C); + Object *ob = CTX_data_active_object(C); Sculpt *sd = CTX_data_tool_settings(C)->sculpt; SculptSession *ss = CTX_data_active_object(C)->sculpt; Brush *brush = paint_brush(&sd->paint); - int mode= RNA_enum_get(op->ptr, "mode"); - int is_smooth= 0; + int mode = RNA_enum_get(op->ptr, "mode"); + int is_smooth = 0; view3d_operator_needs_opengl(C); sculpt_brush_init_tex(scene, sd, ss); - is_smooth|= mode == BRUSH_STROKE_SMOOTH; - is_smooth|= brush->sculpt_tool == SCULPT_TOOL_SMOOTH; + is_smooth |= mode == BRUSH_STROKE_SMOOTH; + is_smooth |= brush->sculpt_tool == SCULPT_TOOL_SMOOTH; sculpt_update_mesh_elements(scene, sd, ob, is_smooth); @@ -3296,9 +3297,9 @@ static void sculpt_restore_mesh(Sculpt *sd, SculptSession *ss) /* Restore the mesh before continuing with anchored stroke */ if ((brush->flag & BRUSH_ANCHORED) || - (brush->sculpt_tool == SCULPT_TOOL_GRAB && - brush_use_size_pressure(ss->cache->vc->scene, brush)) || - (brush->flag & BRUSH_RESTORE_MESH)) + (brush->sculpt_tool == SCULPT_TOOL_GRAB && + brush_use_size_pressure(ss->cache->vc->scene, brush)) || + (brush->flag & BRUSH_RESTORE_MESH)) { StrokeCache *cache = ss->cache; int i; @@ -3309,10 +3310,10 @@ static void sculpt_restore_mesh(Sculpt *sd, SculptSession *ss) BLI_pbvh_search_gather(ss->pbvh, NULL, NULL, &nodes, &totnode); #pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP) - for (n=0; npbvh, PBVH_UpdateBB, NULL); if (sculpt_get_redraw_rect(ar, CTX_wm_region_view3d(C), ob, &r)) { if (ss->cache) - ss->cache->previous_r= r; + ss->cache->previous_r = r; r.xmin += ar->winrct.xmin + 1; r.xmax += ar->winrct.xmin - 1; @@ -3388,11 +3389,11 @@ static int over_mesh(bContext *C, struct wmOperator *UNUSED(op), float x, float } static int sculpt_stroke_test_start(bContext *C, struct wmOperator *op, - wmEvent *event) + wmEvent *event) { /* Don't start the stroke until mouse goes over the mesh. * note: event will only be null when re-executing the saved stroke. */ - if (event==NULL || over_mesh(C, op, event->x, event->y)) { + if (event == NULL || over_mesh(C, op, event->x, event->y)) { Object *ob = CTX_data_active_object(C); SculptSession *ss = ob->sculpt; Sculpt *sd = CTX_data_tool_settings(C)->sculpt; @@ -3412,7 +3413,7 @@ static int sculpt_stroke_test_start(bContext *C, struct wmOperator *op, int num_procs; num_procs = omp_get_num_procs(); - omp_set_num_threads(2*num_procs); + omp_set_num_threads(2 * num_procs); } #endif @@ -3439,8 +3440,8 @@ static void sculpt_stroke_update_step(bContext *C, struct PaintStroke *stroke, P static void sculpt_brush_exit_tex(Sculpt *sd) { - Brush *brush= paint_brush(&sd->paint); - MTex *mtex= &brush->mtex; + Brush *brush = paint_brush(&sd->paint); + MTex *mtex = &brush->mtex; if (mtex->tex && mtex->tex->nodetree) ntreeTexEndExecTree(mtex->tex->nodetree->execdata, 1); @@ -3448,26 +3449,26 @@ static void sculpt_brush_exit_tex(Sculpt *sd) static void sculpt_stroke_done(bContext *C, struct PaintStroke *UNUSED(stroke)) { - Object *ob= CTX_data_active_object(C); + Object *ob = CTX_data_active_object(C); SculptSession *ss = ob->sculpt; Sculpt *sd = CTX_data_tool_settings(C)->sculpt; /* reset values used to draw brush after completing the stroke */ - sd->draw_anchored= 0; - sd->draw_pressure= 0; - sd->special_rotation= 0; + sd->draw_anchored = 0; + sd->draw_pressure = 0; + sd->special_rotation = 0; /* Finished */ if (ss->cache) { - Brush *brush= paint_brush(&sd->paint); + Brush *brush = paint_brush(&sd->paint); brush->flag &= ~BRUSH_INVERTED; sculpt_stroke_modifiers_check(C, ob); /* Alt-Smooth */ if (ss->cache->alt_smooth) { - Paint *p= &sd->paint; - brush= (Brush *)find_id("BR", ss->cache->saved_active_brush_name); + Paint *p = &sd->paint; + brush = (Brush *)find_id("BR", ss->cache->saved_active_brush_name); if (brush) { paint_brush_set(p, brush); } @@ -3488,10 +3489,10 @@ static void sculpt_stroke_done(bContext *C, struct PaintStroke *UNUSED(stroke)) ss->partial_redraw = 0; /* try to avoid calling this, only for e.g. linked duplicates now */ - if (((Mesh*)ob->data)->id.us > 1) + if (((Mesh *)ob->data)->id.us > 1) DAG_id_tag_update(&ob->id, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); + WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); } sculpt_brush_exit_tex(sd); @@ -3514,7 +3515,7 @@ static int sculpt_brush_stroke_invoke(bContext *C, wmOperator *op, wmEvent *even /* For tablet rotation */ ignore_background_click = RNA_boolean_get(op->ptr, - "ignore_background_click"); + "ignore_background_click"); if (ignore_background_click && !over_mesh(C, op, event->x, event->y)) { paint_stroke_free(stroke); @@ -3535,7 +3536,7 @@ static int sculpt_brush_stroke_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; op->customdata = paint_stroke_new(C, sculpt_stroke_get_location, sculpt_stroke_test_start, - sculpt_stroke_update_step, sculpt_stroke_done, 0); + sculpt_stroke_update_step, sculpt_stroke_done, 0); /* frees op->customdata */ paint_stroke_exec(C, op); @@ -3545,7 +3546,7 @@ static int sculpt_brush_stroke_exec(bContext *C, wmOperator *op) static int sculpt_brush_stroke_cancel(bContext *C, wmOperator *op) { - Object *ob= CTX_data_active_object(C); + Object *ob = CTX_data_active_object(C); SculptSession *ss = ob->sculpt; Sculpt *sd = CTX_data_tool_settings(C)->sculpt; @@ -3587,15 +3588,15 @@ static void SCULPT_OT_brush_stroke(wmOperatorType *ot) /* properties */ RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, - "Stroke", ""); + "Stroke", ""); RNA_def_enum(ot->srna, "mode", stroke_mode_items, BRUSH_STROKE_NORMAL, - "Sculpt Stroke Mode", - "Action taken when a sculpt stroke is made"); + "Sculpt Stroke Mode", + "Action taken when a sculpt stroke is made"); RNA_def_boolean(ot->srna, "ignore_background_click", 0, - "Ignore Background Click", - "Clicks on the background do not start the stroke"); + "Ignore Background Click", + "Clicks on the background do not start the stroke"); } /**** Reset the copy of the mesh that is being sculpted on (currently just for the layer brush) ****/ @@ -3623,7 +3624,7 @@ static void SCULPT_OT_set_persistent_base(wmOperatorType *ot) ot->exec = sculpt_set_persistent_base; ot->poll = sculpt_mode_poll; - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /**** Toggle operator for turning sculpt mode on or off ****/ @@ -3640,8 +3641,8 @@ static int sculpt_toggle_mode(bContext *C, wmOperator *UNUSED(op)) Scene *scene = CTX_data_scene(C); ToolSettings *ts = CTX_data_tool_settings(C); Object *ob = CTX_data_active_object(C); - MultiresModifierData *mmd= sculpt_multires_active(scene, ob); - int flush_recalc= 0; + MultiresModifierData *mmd = sculpt_multires_active(scene, ob); + int flush_recalc = 0; /* multires in sculpt mode could have different from object mode subdivision level */ flush_recalc |= mmd && mmd->sculptlvl != mmd->lvl; @@ -3686,7 +3687,7 @@ static int sculpt_toggle_mode(bContext *C, wmOperator *UNUSED(op)) paint_cursor_start(C, sculpt_poll); } - WM_event_add_notifier(C, NC_SCENE|ND_MODE, CTX_data_scene(C)); + WM_event_add_notifier(C, NC_SCENE | ND_MODE, CTX_data_scene(C)); return OPERATOR_FINISHED; } @@ -3701,7 +3702,7 @@ static void SCULPT_OT_sculptmode_toggle(wmOperatorType *ot) ot->exec = sculpt_toggle_mode; ot->poll = ED_operator_object_active_editable_mesh; - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } void ED_operatortypes_sculpt(void) diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c index 73fa546b357..5378ce7872a 100644 --- a/source/blender/editors/sculpt_paint/sculpt_undo.c +++ b/source/blender/editors/sculpt_paint/sculpt_undo.c @@ -71,7 +71,7 @@ static void update_cb(PBVHNode *node, void *rebuild) { BLI_pbvh_node_mark_update(node); - if (*((int*)rebuild)) + if (*((int *)rebuild)) BLI_pbvh_node_mark_rebuild_draw(node); BLI_pbvh_node_fully_hidden_set(node, 0); } @@ -89,10 +89,10 @@ static void sculpt_undo_restore_deformed(SculptSession *ss, SculptUndoNode *unod static int sculpt_undo_restore_coords(bContext *C, DerivedMesh *dm, SculptUndoNode *unode) { - Scene *scene= CTX_data_scene(C); - Sculpt *sd= CTX_data_tool_settings(C)->sculpt; - Object *ob= CTX_data_active_object(C); - SculptSession *ss= ob->sculpt; + Scene *scene = CTX_data_scene(C); + Sculpt *sd = CTX_data_tool_settings(C)->sculpt; + Object *ob = CTX_data_active_object(C); + SculptSession *ss = ob->sculpt; MVert *mvert; int *index, i, j; @@ -102,14 +102,14 @@ static int sculpt_undo_restore_coords(bContext *C, DerivedMesh *dm, SculptUndoNo if (ss->kb && strcmp(ss->kb->name, unode->shapeName)) { /* shape key has been changed before calling undo operator */ - Key *key= ob_get_key(ob); - KeyBlock *kb= key_get_named_keyblock(key, unode->shapeName); + Key *key = ob_get_key(ob); + KeyBlock *kb = key_get_named_keyblock(key, unode->shapeName); if (kb) { - ob->shapenr= BLI_findindex(&key->block, kb) + 1; + ob->shapenr = BLI_findindex(&key->block, kb) + 1; sculpt_update_mesh_elements(scene, sd, ob, 0); - WM_event_add_notifier(C, NC_OBJECT|ND_DATA, ob); + WM_event_add_notifier(C, NC_OBJECT | ND_DATA, ob); } else { /* key has been removed -- skip this undo node */ @@ -117,14 +117,14 @@ static int sculpt_undo_restore_coords(bContext *C, DerivedMesh *dm, SculptUndoNo } } - index= unode->index; - mvert= ss->mvert; + index = unode->index; + mvert = ss->mvert; if (ss->kb) { float (*vertCos)[3]; - vertCos= key_to_vertcos(ob, ss->kb); + vertCos = key_to_vertcos(ob, ss->kb); - for (i=0; itotvert; i++) { + for (i = 0; i < unode->totvert; i++) { if (ss->modifiers_active) sculpt_undo_restore_deformed(ss, unode, i, index[i], vertCos[index[i]]); else { if (unode->orig_co) swap_v3_v3(vertCos[index[i]], unode->orig_co[i]); @@ -142,7 +142,7 @@ static int sculpt_undo_restore_coords(bContext *C, DerivedMesh *dm, SculptUndoNo MEM_freeN(vertCos); } else { - for (i=0; itotvert; i++) { + for (i = 0; i < unode->totvert; i++) { if (ss->modifiers_active) sculpt_undo_restore_deformed(ss, unode, i, index[i], mvert[index[i]].co); else { if (unode->orig_co) swap_v3_v3(mvert[index[i]].co, unode->orig_co[i]); @@ -158,14 +158,14 @@ static int sculpt_undo_restore_coords(bContext *C, DerivedMesh *dm, SculptUndoNo float (*co)[3]; int gridsize; - grids= dm->getGridData(dm); - gridsize= dm->getGridSize(dm); + grids = dm->getGridData(dm); + gridsize = dm->getGridSize(dm); co = unode->co; - for (j=0; jtotgrid; j++) { - grid= grids[unode->grids[j]]; + for (j = 0; j < unode->totgrid; j++) { + grid = grids[unode->grids[j]]; - for (i=0; isculpt; int i; if (unode->maxvert) { - MVert *mvert= ss->mvert; + MVert *mvert = ss->mvert; - for (i=0; itotvert; i++) { + for (i = 0; i < unode->totvert; i++) { MVert *v = &mvert[unode->index[i]]; - int uval= BLI_BITMAP_GET(unode->vert_hidden, i); + int uval = BLI_BITMAP_GET(unode->vert_hidden, i); BLI_BITMAP_MODIFY(unode->vert_hidden, i, - v->flag & ME_HIDE); + v->flag & ME_HIDE); if (uval) v->flag |= ME_HIDE; else @@ -200,10 +200,10 @@ static int sculpt_undo_restore_hidden(bContext *C, DerivedMesh *dm, else if (unode->maxgrid && dm->getGridData) { BLI_bitmap *grid_hidden = dm->getGridHidden(dm); - for (i=0; itotgrid; i++) { + for (i = 0; i < unode->totgrid; i++) { SWAP(BLI_bitmap, - unode->grid_hidden[i], - grid_hidden[unode->grids[i]]); + unode->grid_hidden[i], + grid_hidden[unode->grids[i]]); } } @@ -220,12 +220,12 @@ static void sculpt_undo_restore(bContext *C, ListBase *lb) SculptSession *ss = ob->sculpt; SculptUndoNode *unode; MultiresModifierData *mmd; - int update= 0, rebuild= 1; + int update = 0, rebuild = 1; sculpt_update_mesh_elements(scene, sd, ob, 0); - for (unode=lb->first; unode; unode=unode->next) { - if (!(strcmp(unode->idname, ob->id.name)==0)) + for (unode = lb->first; unode; unode = unode->next) { + if (!(strcmp(unode->idname, ob->id.name) == 0)) continue; /* check if undo data matches current data well enough to @@ -236,48 +236,48 @@ static void sculpt_undo_restore(bContext *C, ListBase *lb) } else if (unode->maxgrid && dm->getGridData) { if ((dm->getNumGrids(dm) != unode->maxgrid) || - (dm->getGridSize(dm) != unode->gridsize)) + (dm->getGridSize(dm) != unode->gridsize)) continue; } else { continue; } - switch(unode->type) { - case SCULPT_UNDO_COORDS: - if (sculpt_undo_restore_coords(C, dm, unode)) - update= 1; - break; - case SCULPT_UNDO_HIDDEN: - if (sculpt_undo_restore_hidden(C, dm, unode)) - rebuild= 1; - break; + switch (unode->type) { + case SCULPT_UNDO_COORDS: + if (sculpt_undo_restore_coords(C, dm, unode)) + update = 1; + break; + case SCULPT_UNDO_HIDDEN: + if (sculpt_undo_restore_hidden(C, dm, unode)) + rebuild = 1; + break; } } if (update || rebuild) { - int tag_update= 0; + int tag_update = 0; /* we update all nodes still, should be more clever, but also * needs to work correct when exiting/entering sculpt mode and * the nodes get recreated, though in that case it could do all */ BLI_pbvh_search_callback(ss->pbvh, NULL, NULL, update_cb, &rebuild); - BLI_pbvh_update(ss->pbvh, PBVH_UpdateBB|PBVH_UpdateOriginalBB|PBVH_UpdateRedraw, NULL); + BLI_pbvh_update(ss->pbvh, PBVH_UpdateBB | PBVH_UpdateOriginalBB | PBVH_UpdateRedraw, NULL); - if ((mmd=sculpt_multires_active(scene, ob))) { + if ((mmd = sculpt_multires_active(scene, ob))) { if (rebuild) multires_mark_as_modified(ob, MULTIRES_HIDDEN_MODIFIED); else multires_mark_as_modified(ob, MULTIRES_COORDS_MODIFIED); } - tag_update= ((Mesh*)ob->data)->id.us > 1; + tag_update = ((Mesh *)ob->data)->id.us > 1; if (ss->modifiers_active) { - Mesh *mesh= ob->data; + Mesh *mesh = ob->data; mesh_calc_normals_mapping(mesh->mvert, mesh->totvert, mesh->mloop, mesh->mpoly, mesh->totloop, mesh->totpoly, NULL, NULL, 0, NULL, NULL); free_sculptsession_deformMats(ss); - tag_update|= 1; + tag_update |= 1; } if (tag_update) @@ -293,7 +293,7 @@ static void sculpt_undo_free(ListBase *lb) SculptUndoNode *unode; int i; - for (unode=lb->first; unode; unode=unode->next) { + for (unode = lb->first; unode; unode = unode->next) { if (unode->co) MEM_freeN(unode->co); if (unode->no) @@ -309,7 +309,7 @@ static void sculpt_undo_free(ListBase *lb) if (unode->vert_hidden) MEM_freeN(unode->vert_hidden); if (unode->grid_hidden) { - for (i=0; itotgrid; i++) { + for (i = 0; i < unode->totgrid; i++) { if (unode->grid_hidden[i]) MEM_freeN(unode->grid_hidden[i]); } @@ -320,13 +320,13 @@ static void sculpt_undo_free(ListBase *lb) SculptUndoNode *sculpt_undo_get_node(PBVHNode *node) { - ListBase *lb= undo_paint_push_get_list(UNDO_PAINT_MESH); + ListBase *lb = undo_paint_push_get_list(UNDO_PAINT_MESH); SculptUndoNode *unode; if (!lb) return NULL; - for (unode=lb->first; unode; unode=unode->next) + for (unode = lb->first; unode; unode = unode->next) if (unode->node == node) return unode; @@ -334,19 +334,19 @@ SculptUndoNode *sculpt_undo_get_node(PBVHNode *node) } static void sculpt_undo_alloc_and_store_hidden(PBVH *pbvh, - SculptUndoNode *unode) + SculptUndoNode *unode) { - PBVHNode *node= unode->node; + PBVHNode *node = unode->node; BLI_bitmap *grid_hidden; int i, *grid_indices, totgrid; - grid_hidden= BLI_pbvh_grid_hidden(pbvh); + grid_hidden = BLI_pbvh_grid_hidden(pbvh); BLI_pbvh_node_get_grids(pbvh, node, &grid_indices, &totgrid, - NULL, NULL, NULL, NULL); + NULL, NULL, NULL, NULL); - unode->grid_hidden= MEM_mapallocN(sizeof(BLI_bitmap) * totgrid, - "unode->grid_hidden"); + unode->grid_hidden = MEM_mapallocN(sizeof(BLI_bitmap) * totgrid, + "unode->grid_hidden"); for (i = 0; i < totgrid; i++) { if (grid_hidden[grid_indices[i]]) @@ -357,59 +357,59 @@ static void sculpt_undo_alloc_and_store_hidden(PBVH *pbvh, } static SculptUndoNode *sculpt_undo_alloc_node(Object *ob, PBVHNode *node, - SculptUndoType type) + SculptUndoType type) { - ListBase *lb= undo_paint_push_get_list(UNDO_PAINT_MESH); + ListBase *lb = undo_paint_push_get_list(UNDO_PAINT_MESH); SculptUndoNode *unode; - SculptSession *ss= ob->sculpt; + SculptSession *ss = ob->sculpt; int totvert, allvert, totgrid, maxgrid, gridsize, *grids; - unode= MEM_callocN(sizeof(SculptUndoNode), "SculptUndoNode"); + unode = MEM_callocN(sizeof(SculptUndoNode), "SculptUndoNode"); BLI_strncpy(unode->idname, ob->id.name, sizeof(unode->idname)); - unode->type= type; - unode->node= node; + unode->type = type; + unode->node = node; BLI_pbvh_node_num_verts(ss->pbvh, node, &totvert, &allvert); BLI_pbvh_node_get_grids(ss->pbvh, node, &grids, &totgrid, - &maxgrid, &gridsize, NULL, NULL); + &maxgrid, &gridsize, NULL, NULL); - unode->totvert= totvert; + unode->totvert = totvert; /* we will use this while sculpting, is mapalloc slow to access then? */ /* general TODO, fix count_alloc */ - switch(type) { - case SCULPT_UNDO_COORDS: - unode->co= MEM_mapallocN(sizeof(float)*3*allvert, "SculptUndoNode.co"); - unode->no= MEM_mapallocN(sizeof(short)*3*allvert, "SculptUndoNode.no"); - undo_paint_push_count_alloc(UNDO_PAINT_MESH, (sizeof(float)*3 + sizeof(short)*3 + sizeof(int))*allvert); - break; - case SCULPT_UNDO_HIDDEN: - if (maxgrid) - sculpt_undo_alloc_and_store_hidden(ss->pbvh, unode); - else - unode->vert_hidden= BLI_BITMAP_NEW(allvert, "SculptUndoNode.vert_hidden"); + switch (type) { + case SCULPT_UNDO_COORDS: + unode->co = MEM_mapallocN(sizeof(float) * 3 * allvert, "SculptUndoNode.co"); + unode->no = MEM_mapallocN(sizeof(short) * 3 * allvert, "SculptUndoNode.no"); + undo_paint_push_count_alloc(UNDO_PAINT_MESH, (sizeof(float) * 3 + sizeof(short) * 3 + sizeof(int)) * allvert); + break; + case SCULPT_UNDO_HIDDEN: + if (maxgrid) + sculpt_undo_alloc_and_store_hidden(ss->pbvh, unode); + else + unode->vert_hidden = BLI_BITMAP_NEW(allvert, "SculptUndoNode.vert_hidden"); - break; + break; } BLI_addtail(lb, unode); if (maxgrid) { /* multires */ - unode->maxgrid= maxgrid; - unode->totgrid= totgrid; - unode->gridsize= gridsize; - unode->grids= MEM_mapallocN(sizeof(int)*totgrid, "SculptUndoNode.grids"); + unode->maxgrid = maxgrid; + unode->totgrid = totgrid; + unode->gridsize = gridsize; + unode->grids = MEM_mapallocN(sizeof(int) * totgrid, "SculptUndoNode.grids"); } else { /* regular mesh */ - unode->maxvert= ss->totvert; - unode->index= MEM_mapallocN(sizeof(int)*allvert, "SculptUndoNode.index"); + unode->maxvert = ss->totvert; + unode->index = MEM_mapallocN(sizeof(int) * allvert, "SculptUndoNode.index"); } if (ss->modifiers_active) - unode->orig_co= MEM_callocN(allvert*sizeof(*unode->orig_co), "undoSculpt orig_cos"); + unode->orig_co = MEM_callocN(allvert * sizeof(*unode->orig_co), "undoSculpt orig_cos"); return unode; } @@ -432,12 +432,12 @@ static void sculpt_undo_store_coords(Object *ob, SculptUndoNode *unode) static void sculpt_undo_store_hidden(Object *ob, SculptUndoNode *unode) { - PBVH *pbvh= ob->sculpt->pbvh; - PBVHNode *node= unode->node; + PBVH *pbvh = ob->sculpt->pbvh; + PBVHNode *node = unode->node; if (unode->grids) { /* already stored during allocation */ - } + } else { MVert *mvert; int *vert_indices, allvert; @@ -447,13 +447,13 @@ static void sculpt_undo_store_hidden(Object *ob, SculptUndoNode *unode) BLI_pbvh_node_get_verts(pbvh, node, &vert_indices, &mvert); for (i = 0; i < allvert; i++) { BLI_BITMAP_MODIFY(unode->vert_hidden, i, - mvert[vert_indices[i]].flag & ME_HIDE); + mvert[vert_indices[i]].flag & ME_HIDE); } } } SculptUndoNode *sculpt_undo_push_node(Object *ob, PBVHNode *node, - SculptUndoType type) + SculptUndoType type) { SculptSession *ss = ob->sculpt; SculptUndoNode *unode; @@ -461,41 +461,41 @@ SculptUndoNode *sculpt_undo_push_node(Object *ob, PBVHNode *node, /* list is manipulated by multiple threads, so we lock */ BLI_lock_thread(LOCK_CUSTOM1); - if ((unode= sculpt_undo_get_node(node))) { + if ((unode = sculpt_undo_get_node(node))) { BLI_unlock_thread(LOCK_CUSTOM1); return unode; } - unode= sculpt_undo_alloc_node(ob, node, type); + unode = sculpt_undo_alloc_node(ob, node, type); BLI_unlock_thread(LOCK_CUSTOM1); /* copy threaded, hopefully this is the performance critical part */ - switch(type) { - case SCULPT_UNDO_COORDS: - sculpt_undo_store_coords(ob, unode); - break; - case SCULPT_UNDO_HIDDEN: - sculpt_undo_store_hidden(ob, unode); - break; + switch (type) { + case SCULPT_UNDO_COORDS: + sculpt_undo_store_coords(ob, unode); + break; + case SCULPT_UNDO_HIDDEN: + sculpt_undo_store_hidden(ob, unode); + break; } if (unode->grids) { int totgrid, *grids; BLI_pbvh_node_get_grids(ss->pbvh, node, &grids, &totgrid, - NULL, NULL, NULL, NULL); - memcpy(unode->grids, grids, sizeof(int)*totgrid); + NULL, NULL, NULL, NULL); + memcpy(unode->grids, grids, sizeof(int) * totgrid); } else { int *vert_indices, allvert; BLI_pbvh_node_num_verts(ss->pbvh, node, NULL, &allvert); BLI_pbvh_node_get_verts(ss->pbvh, node, &vert_indices, NULL); - memcpy(unode->index, vert_indices, sizeof(int)*unode->totvert); + memcpy(unode->index, vert_indices, sizeof(int) * unode->totvert); } /* store active shape key */ if (ss->kb) BLI_strncpy(unode->shapeName, ss->kb->name, sizeof(ss->kb->name)); - else unode->shapeName[0]= '\0'; + else unode->shapeName[0] = '\0'; return unode; } @@ -503,24 +503,24 @@ SculptUndoNode *sculpt_undo_push_node(Object *ob, PBVHNode *node, void sculpt_undo_push_begin(const char *name) { undo_paint_push_begin(UNDO_PAINT_MESH, name, - sculpt_undo_restore, sculpt_undo_free); + sculpt_undo_restore, sculpt_undo_free); } void sculpt_undo_push_end(void) { - ListBase *lb= undo_paint_push_get_list(UNDO_PAINT_MESH); + ListBase *lb = undo_paint_push_get_list(UNDO_PAINT_MESH); SculptUndoNode *unode; /* we don't need normals in the undo stack */ - for (unode=lb->first; unode; unode=unode->next) { + for (unode = lb->first; unode; unode = unode->next) { if (unode->no) { MEM_freeN(unode->no); - unode->no= NULL; + unode->no = NULL; } if (unode->layer_disp) { MEM_freeN(unode->layer_disp); - unode->layer_disp= NULL; + unode->layer_disp = NULL; } } diff --git a/source/blender/editors/sculpt_paint/sculpt_uv.c b/source/blender/editors/sculpt_paint/sculpt_uv.c index 4aa56266a21..2a0118f9c24 100644 --- a/source/blender/editors/sculpt_paint/sculpt_uv.c +++ b/source/blender/editors/sculpt_paint/sculpt_uv.c @@ -68,7 +68,7 @@ #include "UI_view2d.h" -#define MARK_BOUNDARY 1 +#define MARK_BOUNDARY 1 typedef struct UvAdjacencyElement { /* pointer to original uvelement */ @@ -86,7 +86,7 @@ typedef struct UvEdge { char flag; }UvEdge; -typedef struct UVInitialStrokeElement{ +typedef struct UVInitialStrokeElement { /* index to unique uv */ int uv; @@ -97,7 +97,7 @@ typedef struct UVInitialStrokeElement{ float initial_uv[2]; }UVInitialStrokeElement; -typedef struct UVInitialStroke{ +typedef struct UVInitialStroke { /* Initial Selection,for grab brushes for instance */ UVInitialStrokeElement *initialSelection; @@ -110,7 +110,7 @@ typedef struct UVInitialStroke{ /* custom data for uv smoothing brush */ -typedef struct UvSculptData{ +typedef struct UvSculptData { /* Contains the first of each set of coincident uvs. * These will be used to perform smoothing on and propagate the changes * to their coincident uvs */ @@ -146,10 +146,10 @@ typedef struct UvSculptData{ /*********** Improved Laplacian Relaxation Operator ************************/ /* original code by Raul Fernandez Hernandez "farsthary" * - * adapted to uv smoothing by Antony Riakiatakis * - ***************************************************************************/ +* adapted to uv smoothing by Antony Riakiatakis * +***************************************************************************/ -typedef struct Temp_UvData{ +typedef struct Temp_UvData { float sum_co[2], p[2], b[2], sum_b[2]; int ncounter; }Temp_UVData; @@ -169,7 +169,7 @@ void HC_relaxation_iteration_uv(BMEditMesh *em, UvSculptData *sculptdata, float /* counting neighbors */ for (i = 0; i < sculptdata->totalUvEdges; i++) { - UvEdge *tmpedge = sculptdata->uvedges+i; + UvEdge *tmpedge = sculptdata->uvedges + i; tmp_uvdata[tmpedge->uv1].ncounter++; tmp_uvdata[tmpedge->uv2].ncounter++; @@ -178,16 +178,16 @@ void HC_relaxation_iteration_uv(BMEditMesh *em, UvSculptData *sculptdata, float } for (i = 0; i < sculptdata->totalUniqueUvs; i++) { - copy_v2_v2(diff,tmp_uvdata[i].sum_co); - mul_v2_fl(diff,1.f/tmp_uvdata[i].ncounter); - copy_v2_v2(tmp_uvdata[i].p,diff); + copy_v2_v2(diff, tmp_uvdata[i].sum_co); + mul_v2_fl(diff, 1.f / tmp_uvdata[i].ncounter); + copy_v2_v2(tmp_uvdata[i].p, diff); tmp_uvdata[i].b[0] = diff[0] - sculptdata->uv[i].uv[0]; tmp_uvdata[i].b[1] = diff[1] - sculptdata->uv[i].uv[1]; } for (i = 0; i < sculptdata->totalUvEdges; i++) { - UvEdge *tmpedge = sculptdata->uvedges+i; + UvEdge *tmpedge = sculptdata->uvedges + i; add_v2_v2(tmp_uvdata[tmpedge->uv1].sum_b, tmp_uvdata[tmpedge->uv2].b); add_v2_v2(tmp_uvdata[tmpedge->uv2].sum_b, tmp_uvdata[tmpedge->uv1].b); } @@ -205,10 +205,10 @@ void HC_relaxation_iteration_uv(BMEditMesh *em, UvSculptData *sculptdata, float if ((dist = dot_v2v2(diff, diff)) <= radius) { UvElement *element; float strength; - strength = alpha*brush_curve_strength(brush, sqrt(dist), radius_root); + strength = alpha * brush_curve_strength(brush, sqrt(dist), radius_root); - sculptdata->uv[i].uv[0] = (1.0-strength)*sculptdata->uv[i].uv[0] + strength*(tmp_uvdata[i].p[0] - 0.5f*(tmp_uvdata[i].b[0] + tmp_uvdata[i].sum_b[0]/tmp_uvdata[i].ncounter)); - sculptdata->uv[i].uv[1] = (1.0-strength)*sculptdata->uv[i].uv[1] + strength*(tmp_uvdata[i].p[1] - 0.5f*(tmp_uvdata[i].b[1] + tmp_uvdata[i].sum_b[1]/tmp_uvdata[i].ncounter)); + sculptdata->uv[i].uv[0] = (1.0 - strength) * sculptdata->uv[i].uv[0] + strength * (tmp_uvdata[i].p[0] - 0.5f * (tmp_uvdata[i].b[0] + tmp_uvdata[i].sum_b[0] / tmp_uvdata[i].ncounter)); + sculptdata->uv[i].uv[1] = (1.0 - strength) * sculptdata->uv[i].uv[1] + strength * (tmp_uvdata[i].p[1] - 0.5f * (tmp_uvdata[i].b[1] + tmp_uvdata[i].sum_b[1] / tmp_uvdata[i].ncounter)); for (element = sculptdata->uv[i].element; element; element = element->next) { MLoopUV *luv; @@ -241,7 +241,7 @@ static void laplacian_relaxation_iteration_uv(BMEditMesh *em, UvSculptData *scul /* counting neighbors */ for (i = 0; i < sculptdata->totalUvEdges; i++) { - UvEdge *tmpedge = sculptdata->uvedges+i; + UvEdge *tmpedge = sculptdata->uvedges + i; tmp_uvdata[tmpedge->uv1].ncounter++; tmp_uvdata[tmpedge->uv2].ncounter++; @@ -253,7 +253,7 @@ static void laplacian_relaxation_iteration_uv(BMEditMesh *em, UvSculptData *scul * needed since we translate along the UV plane always.*/ for (i = 0; i < sculptdata->totalUniqueUvs; i++) { copy_v2_v2(tmp_uvdata[i].p, tmp_uvdata[i].sum_co); - mul_v2_fl(tmp_uvdata[i].p, 1.f/tmp_uvdata[i].ncounter); + mul_v2_fl(tmp_uvdata[i].p, 1.f / tmp_uvdata[i].ncounter); } for (i = 0; i < sculptdata->totalUniqueUvs; i++) { @@ -269,10 +269,10 @@ static void laplacian_relaxation_iteration_uv(BMEditMesh *em, UvSculptData *scul if ((dist = dot_v2v2(diff, diff)) <= radius) { UvElement *element; float strength; - strength = alpha*brush_curve_strength(brush, sqrt(dist), radius_root); + strength = alpha * brush_curve_strength(brush, sqrt(dist), radius_root); - sculptdata->uv[i].uv[0] = (1.0-strength)*sculptdata->uv[i].uv[0] + strength*tmp_uvdata[i].p[0]; - sculptdata->uv[i].uv[1] = (1.0-strength)*sculptdata->uv[i].uv[1] + strength*tmp_uvdata[i].p[1]; + sculptdata->uv[i].uv[0] = (1.0 - strength) * sculptdata->uv[i].uv[0] + strength * tmp_uvdata[i].p[0]; + sculptdata->uv[i].uv[1] = (1.0 - strength) * sculptdata->uv[i].uv[1] + strength * tmp_uvdata[i].p[1]; for (element = sculptdata->uv[i].element; element; element = element->next) { MLoopUV *luv; @@ -310,7 +310,7 @@ static void uv_sculpt_stroke_apply(bContext *C, wmOperator *op, wmEvent *event, Brush *brush = paint_brush(sculptdata->uvsculpt); ToolSettings *toolsettings = CTX_data_tool_settings(C); tool = sculptdata->tool; - invert = sculptdata->invert? -1 : 1; + invert = sculptdata->invert ? -1 : 1; alpha = brush_alpha(scene, brush); UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &co[0], &co[1]); @@ -318,11 +318,11 @@ static void uv_sculpt_stroke_apply(bContext *C, wmOperator *op, wmEvent *event, ED_space_image_size(sima, &width, &height); ED_space_image_zoom(sima, ar, &zoomx, &zoomy); - radius = brush_size(scene, brush)/(width*zoomx); - aspectRatio = width/(float)height; + radius = brush_size(scene, brush) / (width * zoomx); + aspectRatio = width / (float)height; /* We will compare squares to save some computation */ - radius = radius*radius; + radius = radius * radius; radius_root = sqrt(radius); /* @@ -344,11 +344,11 @@ static void uv_sculpt_stroke_apply(bContext *C, wmOperator *op, wmEvent *event, if ((dist = dot_v2v2(diff, diff)) <= radius) { UvElement *element; float strength; - strength = alpha*brush_curve_strength(brush, sqrt(dist), radius_root); + strength = alpha * brush_curve_strength(brush, sqrt(dist), radius_root); normalize_v2(diff); - sculptdata->uv[i].uv[0] -= strength*diff[0]*0.001; - sculptdata->uv[i].uv[1] -= strength*diff[1]*0.001; + sculptdata->uv[i].uv[0] -= strength * diff[0] * 0.001; + sculptdata->uv[i].uv[1] -= strength * diff[1] * 0.001; for (element = sculptdata->uv[i].element; element; element = element->next) { MLoopUV *luv; @@ -386,12 +386,12 @@ static void uv_sculpt_stroke_apply(bContext *C, wmOperator *op, wmEvent *event, float diff[2]; sub_v2_v2v2(diff, co, sculptdata->initial_stroke->init_coord); - for (i = 0; i < sculptdata->initial_stroke->totalInitialSelected; i++ ) { + for (i = 0; i < sculptdata->initial_stroke->totalInitialSelected; i++) { UvElement *element; int uvindex = sculptdata->initial_stroke->initialSelection[i].uv; float strength = sculptdata->initial_stroke->initialSelection[i].strength; - sculptdata->uv[uvindex].uv[0] = sculptdata->initial_stroke->initialSelection[i].initial_uv[0] + strength*diff[0]; - sculptdata->uv[uvindex].uv[1] = sculptdata->initial_stroke->initialSelection[i].initial_uv[1] + strength*diff[1]; + sculptdata->uv[uvindex].uv[0] = sculptdata->initial_stroke->initialSelection[i].initial_uv[0] + strength * diff[0]; + sculptdata->uv[uvindex].uv[1] = sculptdata->initial_stroke->initialSelection[i].initial_uv[1] + strength * diff[1]; for (element = sculptdata->uv[uvindex].element; element; element = element->next) { MLoopUV *luv; @@ -445,12 +445,11 @@ static int uv_element_offset_from_face_get(UvElementMap *map, BMFace *efa, BMLoo } -static unsigned int uv_edge_hash(const void *key) +static unsigned int uv_edge_hash(const void *key) { UvEdge *edge = (UvEdge *)key; - return - BLI_ghashutil_inthash(SET_INT_IN_POINTER(edge->uv2)) + - BLI_ghashutil_inthash(SET_INT_IN_POINTER(edge->uv1)); + return (BLI_ghashutil_inthash(SET_INT_IN_POINTER(edge->uv2)) + + BLI_ghashutil_inthash(SET_INT_IN_POINTER(edge->uv1))); } static int uv_edge_compare(const void *a, const void *b) @@ -478,7 +477,7 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, wmEvent if (data) { int counter = 0, i; - ARegion *ar= CTX_wm_region(C); + ARegion *ar = CTX_wm_region(C); float co[2]; BMFace *efa; MLoopUV *luv; @@ -487,14 +486,14 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, wmEvent UvEdge *edges; GHash *edgeHash; - GHashIterator* ghi; + GHashIterator *ghi; int do_island_optimization = !(ts->uv_sculpt_settings & UV_SCULPT_ALL_ISLANDS); int island_index = 0; /* Holds, for each UvElement in elementMap, a pointer to its unique uv.*/ int *uniqueUv; - data->tool = (RNA_enum_get(op->ptr, "mode") == BRUSH_STROKE_SMOOTH)? UV_SCULPT_TOOL_RELAX : ts->uv_sculpt_tool; - data->invert = (RNA_enum_get(op->ptr, "mode") == BRUSH_STROKE_INVERT)? 1 : 0; + data->tool = (RNA_enum_get(op->ptr, "mode") == BRUSH_STROKE_SMOOTH) ? UV_SCULPT_TOOL_RELAX : ts->uv_sculpt_tool; + data->invert = (RNA_enum_get(op->ptr, "mode") == BRUSH_STROKE_INVERT) ? 1 : 0; data->uvsculpt = &ts->uvsculpt->paint; @@ -528,7 +527,7 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, wmEvent if (do_island_optimization) { UvElement *element; NearestHit hit; - Image *ima= CTX_data_edit_image(C); + Image *ima = CTX_data_edit_image(C); uv_find_nearest_vert(scene, ima, em, co, NULL, &hit); element = ED_uv_element_get(data->elementMap, hit.efa, hit.l); @@ -539,17 +538,17 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, wmEvent /* Count 'unique' uvs */ for (i = 0; i < data->elementMap->totalUVs; i++) { if (data->elementMap->buf[i].separate - && (!do_island_optimization || data->elementMap->buf[i].island == island_index)) { + && (!do_island_optimization || data->elementMap->buf[i].island == island_index)) { counter++; } } /* Allocate the unique uv buffers */ - data->uv = MEM_mallocN(sizeof(*data->uv)*counter, "uv_brush_unique_uvs"); - uniqueUv = MEM_mallocN(sizeof(*uniqueUv)*data->elementMap->totalUVs, "uv_brush_unique_uv_map"); + data->uv = MEM_mallocN(sizeof(*data->uv) * counter, "uv_brush_unique_uvs"); + uniqueUv = MEM_mallocN(sizeof(*uniqueUv) * data->elementMap->totalUVs, "uv_brush_unique_uv_map"); edgeHash = BLI_ghash_new(uv_edge_hash, uv_edge_compare, "uv_brush_edge_hash"); /* we have at most totalUVs edges */ - edges = MEM_mallocN(sizeof(*edges)*data->elementMap->totalUVs, "uv_brush_all_edges"); + edges = MEM_mallocN(sizeof(*edges) * data->elementMap->totalUVs, "uv_brush_all_edges"); if (!data->uv || !uniqueUv || !edgeHash || !edges) { if (edges) { MEM_freeN(edges); @@ -634,7 +633,7 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, wmEvent MEM_freeN(uniqueUv); /* Allocate connectivity data, we allocate edges once */ - data->uvedges = MEM_mallocN(sizeof(*data->uvedges)*BLI_ghash_size(edgeHash), "uv_brush_edge_connectivity_data"); + data->uvedges = MEM_mallocN(sizeof(*data->uvedges) * BLI_ghash_size(edgeHash), "uv_brush_edge_connectivity_data"); if (!data->uvedges) { BLI_ghash_free(edgeHash, NULL, NULL); MEM_freeN(edges); @@ -686,9 +685,9 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, wmEvent ED_space_image_size(sima, &width, &height); ED_space_image_zoom(sima, ar, &zoomx, &zoomy); - aspectRatio = width/(float)height; - radius /= (width*zoomx); - radius = radius*radius; + aspectRatio = width / (float)height; + radius /= (width * zoomx); + radius = radius * radius; radius_root = sqrt(radius); /* Allocate selection stack */ @@ -696,7 +695,7 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, wmEvent if (!data->initial_stroke) { uv_sculpt_stroke_exit(C, op); } - data->initial_stroke->initialSelection = MEM_mallocN(sizeof(*data->initial_stroke->initialSelection)*data->totalUniqueUvs, "uv_sculpt_initial_selection"); + data->initial_stroke->initialSelection = MEM_mallocN(sizeof(*data->initial_stroke->initialSelection) * data->totalUniqueUvs, "uv_sculpt_initial_selection"); if (!data->initial_stroke->initialSelection) { uv_sculpt_stroke_exit(C, op); } @@ -715,7 +714,7 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, wmEvent diff[1] /= aspectRatio; if ((dist = dot_v2v2(diff, diff)) <= radius) { float strength; - strength = alpha*brush_curve_strength(brush, sqrt(dist), radius_root); + strength = alpha * brush_curve_strength(brush, sqrt(dist), radius_root); data->initial_stroke->initialSelection[counter].uv = i; data->initial_stroke->initialSelection[counter].strength = strength; @@ -742,7 +741,7 @@ static int uv_sculpt_stroke_invoke(bContext *C, wmOperator *op, wmEvent *event) uv_sculpt_stroke_apply(C, op, event, obedit); - data->timer= WM_event_add_timer(CTX_wm_manager(C), CTX_wm_window(C), TIMER, 0.001f); + data->timer = WM_event_add_timer(CTX_wm_manager(C), CTX_wm_window(C), TIMER, 0.001f); if (!data->timer) { uv_sculpt_stroke_exit(C, op); @@ -759,7 +758,7 @@ static int uv_sculpt_stroke_modal(bContext *C, wmOperator *op, wmEvent *event) UvSculptData *data = (UvSculptData *)op->customdata; Object *obedit = CTX_data_edit_object(C); - switch(event->type) { + switch (event->type) { case LEFTMOUSE: case MIDDLEMOUSE: case RIGHTMOUSE: @@ -779,7 +778,7 @@ static int uv_sculpt_stroke_modal(bContext *C, wmOperator *op, wmEvent *event) } ED_region_tag_redraw(CTX_wm_region(C)); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); DAG_id_tag_update(obedit->data, 0); return OPERATOR_RUNNING_MODAL; } @@ -804,7 +803,7 @@ void SCULPT_OT_uv_sculpt_stroke(wmOperatorType *ot) ot->poll = uv_sculpt_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* props */ RNA_def_enum(ot->srna, "mode", stroke_mode_items, BRUSH_STROKE_NORMAL, "Mode", "Stroke Mode"); -- cgit v1.2.3 From 07065b27b8b37316004f40896f436d26e066f25f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 28 Mar 2012 05:03:24 +0000 Subject: style cleanup --- source/blender/collada/AnimationExporter.cpp | 9 ++++----- source/blender/collada/AnimationImporter.cpp | 10 +++++----- source/blender/collada/ArmatureImporter.cpp | 6 +++--- source/blender/collada/DocumentImporter.cpp | 2 +- source/blender/collada/EffectExporter.cpp | 7 ++++--- source/blender/collada/MeshImporter.cpp | 8 ++++---- source/blender/ikplugin/intern/itasc_plugin.cpp | 6 +++--- 7 files changed, 24 insertions(+), 24 deletions(-) (limited to 'source/blender') diff --git a/source/blender/collada/AnimationExporter.cpp b/source/blender/collada/AnimationExporter.cpp index 5f8ceeeebb3..778e3029266 100644 --- a/source/blender/collada/AnimationExporter.cpp +++ b/source/blender/collada/AnimationExporter.cpp @@ -153,14 +153,14 @@ float * AnimationExporter::get_eul_source_for_quat(Object *ob ) char * transformName = extract_transform_name( fcu->rna_path ); if ( !strcmp(transformName, "rotation_quaternion") ) { - for ( int i = 0 ; i < fcu->totvert ; i++){ + for ( int i = 0 ; i < fcu->totvert ; i++) { *(quat + ( i * 4 ) + fcu->array_index) = fcu->bezt[i].vec[1][1]; } } fcu = fcu->next; } - for ( int i = 0 ; i < keys ; i++){ + for ( int i = 0 ; i < keys ; i++) { for ( int j = 0;j<4;j++) temp_quat[j] = quat[(i*4)+j]; @@ -335,8 +335,7 @@ void AnimationExporter::write_bone_animation_matrix(Object *ob_arm, Bone *bone) return; //This will only export animations of bones in deform group. - /*if(!is_bone_deform_group(bone)) - return;*/ + /* if (!is_bone_deform_group(bone)) return; */ sample_and_write_bone_animation_matrix(ob_arm, bone); @@ -352,7 +351,7 @@ bool AnimationExporter::is_bone_deform_group(Bone * bone) //Check child bones else { - for (Bone *child = (Bone*)bone->childbase.first; child; child = child->next){ + for (Bone *child = (Bone*)bone->childbase.first; child; child = child->next) { //loop through all the children until deform bone is found, and then return is_def = is_bone_deform_group(child); if (is_def) return true; diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp index 0e66a292e94..3f132eb4212 100644 --- a/source/blender/collada/AnimationImporter.cpp +++ b/source/blender/collada/AnimationImporter.cpp @@ -948,7 +948,7 @@ void AnimationImporter::translate_Animations ( COLLADAFW::Node * node , } } - if ( animType->material != 0){ + if ( animType->material != 0) { Material *ma = give_current_material(ob, 1); if (!ma->adt || !ma->adt->action) act = verify_adt_action((ID*)&ma->id, 1); else act = ma->adt->action; @@ -964,25 +964,25 @@ void AnimationImporter::translate_Animations ( COLLADAFW::Node * node , if (ef != NULL) { /* can be NULL [#28909] */ const COLLADAFW::CommonEffectPointerArray& commonEffects = ef->getCommonEffects(); COLLADAFW::EffectCommon *efc = commonEffects[0]; - if ((animType->material & MATERIAL_SHININESS) != 0){ + if ((animType->material & MATERIAL_SHININESS) != 0) { const COLLADAFW::FloatOrParam *shin = &(efc->getShininess()); const COLLADAFW::UniqueId& listid = shin->getAnimationList(); Assign_float_animations( listid, AnimCurves , "specular_hardness" ); } - if ((animType->material & MATERIAL_IOR) != 0){ + if ((animType->material & MATERIAL_IOR) != 0) { const COLLADAFW::FloatOrParam *ior = &(efc->getIndexOfRefraction()); const COLLADAFW::UniqueId& listid = ior->getAnimationList(); Assign_float_animations( listid, AnimCurves , "raytrace_transparency.ior" ); } - if ((animType->material & MATERIAL_SPEC_COLOR) != 0){ + if ((animType->material & MATERIAL_SPEC_COLOR) != 0) { const COLLADAFW::ColorOrTexture *cot = &(efc->getSpecular()); const COLLADAFW::UniqueId& listid = cot->getColor().getAnimationList(); Assign_color_animations( listid, AnimCurves , "specular_color" ); } - if ((animType->material & MATERIAL_DIFF_COLOR) != 0){ + if ((animType->material & MATERIAL_DIFF_COLOR) != 0) { const COLLADAFW::ColorOrTexture *cot = &(efc->getDiffuse()); const COLLADAFW::UniqueId& listid = cot->getColor().getAnimationList(); Assign_color_animations( listid, AnimCurves , "diffuse_color" ); diff --git a/source/blender/collada/ArmatureImporter.cpp b/source/blender/collada/ArmatureImporter.cpp index 50ec2985552..a978a4757a7 100644 --- a/source/blender/collada/ArmatureImporter.cpp +++ b/source/blender/collada/ArmatureImporter.cpp @@ -98,7 +98,7 @@ void ArmatureImporter::create_unskinned_bone( COLLADAFW::Node *node, EditBone *p float angle = 0; // get world-space - if (parent){ + if (parent) { mult_m4_m4m4(mat, parent_mat, obmat); } @@ -582,12 +582,12 @@ void ArmatureImporter::set_pose ( Object * ob_arm , COLLADAFW::Node * root_node // object-space get_node_mat(obmat, root_node, NULL, NULL); - //if(*edbone) + //if (*edbone) bPoseChannel * pchan = get_pose_channel(ob_arm -> pose , bone_name); //else fprintf ( "", // get world-space - if (parentname){ + if (parentname) { mult_m4_m4m4(mat, parent_mat, obmat); bPoseChannel *parchan = get_pose_channel(ob_arm->pose, parentname); diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp index 9e604978f64..18e421779cc 100644 --- a/source/blender/collada/DocumentImporter.cpp +++ b/source/blender/collada/DocumentImporter.cpp @@ -157,7 +157,7 @@ void DocumentImporter::cancel(const COLLADAFW::String& errorMessage) // The latter sounds better. } -void DocumentImporter::start(){} +void DocumentImporter::start() {} void DocumentImporter::finish() { diff --git a/source/blender/collada/EffectExporter.cpp b/source/blender/collada/EffectExporter.cpp index dd20e7b85b0..9720b92ffae 100644 --- a/source/blender/collada/EffectExporter.cpp +++ b/source/blender/collada/EffectExporter.cpp @@ -364,9 +364,10 @@ void EffectsExporter::createTextureIndices(Material *ma, std::vector &indic for (int a = 0; a < MAX_MTEX; a++) { if (ma->mtex[a] && - ma->mtex[a]->tex && - ma->mtex[a]->tex->type == TEX_IMAGE && - ma->mtex[a]->texco == TEXCO_UV){ + ma->mtex[a]->tex && + ma->mtex[a]->tex->type == TEX_IMAGE && + ma->mtex[a]->texco == TEXCO_UV) + { indices.push_back(a); } } diff --git a/source/blender/collada/MeshImporter.cpp b/source/blender/collada/MeshImporter.cpp index dc0892f6bed..1c83f0c4081 100644 --- a/source/blender/collada/MeshImporter.cpp +++ b/source/blender/collada/MeshImporter.cpp @@ -281,7 +281,7 @@ bool MeshImporter::is_nice_mesh(COLLADAFW::Mesh *mesh) // checks if mesh has sup COLLADAFW::Polygons *mpvc = (COLLADAFW::Polygons*)mp; COLLADAFW::Polygons::VertexCountArray& vca = mpvc->getGroupedVerticesVertexCountArray(); - for (unsigned int j = 0; j < vca.getCount(); j++){ + for (unsigned int j = 0; j < vca.getCount(); j++) { int count = vca[j]; if (count < 3) { fprintf(stderr, "Primitive %s in %s has at least one face with vertex count < 3\n", @@ -486,7 +486,7 @@ void MeshImporter::read_faces(COLLADAFW::Mesh *mesh, Mesh *me, int new_tris) //T #endif if (type == COLLADAFW::MeshPrimitive::TRIANGLES) { - for (j = 0; j < prim_totface; j++){ + for (j = 0; j < prim_totface; j++) { set_face_indices(mface, indices, false); indices += 3; @@ -527,12 +527,12 @@ void MeshImporter::read_faces(COLLADAFW::Mesh *mesh, Mesh *me, int new_tris) //T // The first trifan vertex will be the first vertex in every triangle if (type == COLLADAFW::MeshPrimitive::TRIANGLE_FANS) { unsigned grouped_vertex_count = mp->getGroupedVertexElementsCount(); - for (unsigned int group_index = 0; group_index < grouped_vertex_count; group_index++){ + for (unsigned int group_index = 0; group_index < grouped_vertex_count; group_index++) { unsigned int first_vertex = indices[0]; // Store first trifan vertex unsigned int first_normal = nind[0]; // Store first trifan vertex normal unsigned int vertex_count = mp->getGroupedVerticesVertexCount(group_index); - for (unsigned int vertex_index = 0; vertex_index < vertex_count - 2; vertex_index++){ + for (unsigned int vertex_index = 0; vertex_index < vertex_count - 2; vertex_index++) { // For each triangle store indeces of its 3 vertices unsigned int triangle_vertex_indices[3]={first_vertex, indices[1], indices[2]}; set_face_indices(mface, triangle_vertex_indices, false); diff --git a/source/blender/ikplugin/intern/itasc_plugin.cpp b/source/blender/ikplugin/intern/itasc_plugin.cpp index a5e7150328b..ccfe2eaa862 100644 --- a/source/blender/ikplugin/intern/itasc_plugin.cpp +++ b/source/blender/ikplugin/intern/itasc_plugin.cpp @@ -250,16 +250,16 @@ static int initialize_chain(Object *ob, bPoseChannel *pchan_tip, bConstraint *co rootbone = data->rootbone; /* Find the chain's root & count the segments needed */ - for (curchan = pchan_tip; curchan; curchan=curchan->parent){ + for (curchan = pchan_tip; curchan; curchan=curchan->parent) { pchan_root = curchan; if (++segcount > 255) // 255 is weak break; - if (segcount==rootbone){ + if (segcount==rootbone) { // reached this end of the chain but if the chain is overlapping with a // previous one, we must go back up to the root of the other chain - if ((curchan->flag & POSE_CHAIN) && curchan->iktree.first == NULL){ + if ((curchan->flag & POSE_CHAIN) && curchan->iktree.first == NULL) { rootbone++; continue; } -- cgit v1.2.3 From 711d7539e01be7c56d5ae96d9f5491528d38b5b9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 28 Mar 2012 05:09:50 +0000 Subject: style cleanup: for creator.c & more useful assert message (file:line) --- source/blender/blenlib/BLI_utildefines.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h index 4fa0438a9ea..3a533f73d9d 100644 --- a/source/blender/blenlib/BLI_utildefines.h +++ b/source/blender/blenlib/BLI_utildefines.h @@ -293,8 +293,8 @@ (void)((!(a)) ? ( \ ( \ fprintf(stderr, \ - "BLI_assert failed: %s, %s(), %d at \'%s\'\n", \ - __FILE__, __func__, __LINE__, STRINGIFY(a)), \ + "BLI_assert failed: %s:%d, %s(), at \'%s\'\n", \ + __FILE__, __LINE__, __func__, STRINGIFY(a)), \ _BLI_DUMMY_ABORT(), \ NULL)) : NULL) # else @@ -302,7 +302,7 @@ (void)((!(a)) ? ( \ ( \ fprintf(stderr, \ - "BLI_assert failed: %s, %d at \'%s\'\n", \ + "BLI_assert failed: %s:%d, at \'%s\'\n", \ __FILE__, __LINE__, STRINGIFY(a)), \ _BLI_DUMMY_ABORT(), \ NULL)) : NULL) -- cgit v1.2.3 From 52984c2772a779b1054a9034a33f2d2a59aa5d61 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 28 Mar 2012 05:20:48 +0000 Subject: fix [#30701] bmesh: segfault when ripping partially connected vertices --- source/blender/bmesh/operators/bmo_edgesplit.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source/blender') diff --git a/source/blender/bmesh/operators/bmo_edgesplit.c b/source/blender/bmesh/operators/bmo_edgesplit.c index cf051006145..549f773a250 100644 --- a/source/blender/bmesh/operators/bmo_edgesplit.c +++ b/source/blender/bmesh/operators/bmo_edgesplit.c @@ -62,7 +62,10 @@ static void bm_edgesplit_validate_seams(BMesh *bm, BMOperator *op) * only place we loop over all edges, disable tag */ BM_elem_flag_disable(e, BM_ELEM_INTERNAL_TAG); - if (BM_edge_is_boundary(e)) { + if (e->l == NULL) { + BMO_elem_flag_disable(bm, e, EDGE_SEAM); + } + else if (BM_edge_is_boundary(e)) { vt = &vtouch[BM_elem_index_get(e->v1)]; if (*vt < 2) (*vt)++; vt = &vtouch[BM_elem_index_get(e->v2)]; if (*vt < 2) (*vt)++; -- cgit v1.2.3 From 534f4ddb4d80d606245b77bcd41700313bce23a5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 28 Mar 2012 05:44:38 +0000 Subject: fix for vertex rip wire edges connected to the vertex would confuse vertex rip. - was only checking verts first edge had a face, this is incorrect since other vert-edges may have a face. - wasn't checking of edges connected to the vertex were hidden. --- source/blender/editors/mesh/editmesh_tools.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index fc4c9c84fdd..70779ce37da 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -2196,23 +2196,26 @@ static int edbm_rip_invoke(bContext *C, wmOperator *op, wmEvent *event) if (!v) return OPERATOR_CANCELLED; - if (!v->e || !v->e->l) { - BKE_report(op->reports, RPT_ERROR, "Selected vertex has no faces"); - return OPERATOR_CANCELLED; - } - - /* find closest edge to mouse cursor */ e2 = NULL; - BM_ITER(e, &iter, bm, BM_EDGES_OF_VERT, v) { - d = mesh_rip_edgedist(ar, projectMat, e->v1->co, e->v2->co, fmval); - if (d < dist) { - dist = d; - e2 = e; + + if (v->e) { + /* find closest edge to mouse cursor */ + BM_ITER(e, &iter, bm, BM_EDGES_OF_VERT, v) { + if (e->l && !BM_elem_flag_test(e, BM_ELEM_HIDDEN)) { + d = mesh_rip_edgedist(ar, projectMat, e->v1->co, e->v2->co, fmval); + if (d < dist) { + dist = d; + e2 = e; + } + } } + } - if (!e2) + if (!e2) { + BKE_report(op->reports, RPT_ERROR, "Selected vertex has no faces attached"); return OPERATOR_CANCELLED; + } /* rip two adjacent edges */ if (BM_edge_face_count(e2) == 1 || BM_vert_face_count(v) == 2) { -- cgit v1.2.3 From f9fd5439ebbe43fc83d16ab72fabd522bef8cddb Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 28 Mar 2012 06:34:18 +0000 Subject: code cleanup: Ctrl+Click extrude - replace inline axis/angle to matrix conversion with a call to axis_angle_to_mat3() --- source/blender/editors/mesh/editmesh_tools.c | 30 +++++++++++----------------- source/blender/editors/sculpt_paint/sculpt.c | 3 ++- 2 files changed, 14 insertions(+), 19 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 70779ce37da..1679166a366 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -805,29 +805,23 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, wmEvent /* calculate rotation */ unit_m3(mat); if (done) { - float dot; + float angle; - copy_v3_v3(vec, min); - normalize_v3(vec); - dot = dot_v3v3(vec, nor); + normalize_v3_v3(vec, min); - if (fabsf(dot) < 0.999f) { - float cross[3], si, q1[4]; + angle = angle_normalized_v3v3(vec, nor); - cross_v3_v3v3(cross, nor, vec); - normalize_v3(cross); - dot = 0.5f * saacos(dot); + if (angle != 0.0f) { + float axis[3]; + + cross_v3_v3v3(axis, nor, vec); /* halve the rotation if its applied twice */ - if (rot_src) dot *= 0.5f; - - si = sinf(dot); - q1[0] = cosf(dot); - q1[1] = cross[0] * si; - q1[2] = cross[1] * si; - q1[3] = cross[2] * si; - normalize_qt(q1); - quat_to_mat3(mat, q1); + if (rot_src) { + angle *= 0.5f; + } + + axis_angle_to_mat3(mat, axis, angle); } } diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 506716543ea..baf4e17b584 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -103,7 +103,8 @@ void ED_sculpt_force_update(bContext *C) /* Sculpt mode handles multires differently from regular meshes, but only if * it's the last modifier on the stack and it is not on the first level */ -struct MultiresModifierData *sculpt_multires_active(Scene *scene, Object *ob){ +struct MultiresModifierData *sculpt_multires_active(Scene *scene, Object *ob) +{ Mesh *me = (Mesh *)ob->data; ModifierData *md; -- cgit v1.2.3 From 5f0ef4435cef5b1709eae4acde7fc30d8c9d5e95 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 28 Mar 2012 06:44:19 +0000 Subject: fix [#30699] blender crashes when dissolving faces thanks to Francisco De La Cruz for investigating and providing fix. --- source/blender/editors/mesh/editmesh_utils.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index 3958a28f441..e5a9cb98377 100644 --- a/source/blender/editors/mesh/editmesh_utils.c +++ b/source/blender/editors/mesh/editmesh_utils.c @@ -146,7 +146,9 @@ int EDBM_op_finish(BMEditMesh *em, BMOperator *bmop, wmOperator *op, const int r if (BMO_error_get(em->bm, &errmsg, NULL)) { BMEditMesh *emcopy = em->emcopy; - if (report) BKE_report(op->reports, RPT_ERROR, errmsg); + if (report) { + BKE_report(op->reports, RPT_ERROR, errmsg); + } BMEdit_Free(em); *em = *emcopy; @@ -154,7 +156,14 @@ int EDBM_op_finish(BMEditMesh *em, BMOperator *bmop, wmOperator *op, const int r MEM_freeN(emcopy); em->emcopyusers = 0; em->emcopy = NULL; - return 0; + + /* when copying, tessellation isn't to for faster copying, + * but means we need to re-tessellate here */ + if (em->looptris == NULL) { + BMEdit_RecalcTessellation(em); + } + + return FALSE; } else { em->emcopyusers--; @@ -167,9 +176,9 @@ int EDBM_op_finish(BMEditMesh *em, BMOperator *bmop, wmOperator *op, const int r MEM_freeN(em->emcopy); em->emcopy = NULL; } - } - return 1; + return TRUE; + } } int EDBM_op_callf(BMEditMesh *em, wmOperator *op, const char *fmt, ...) -- cgit v1.2.3 From 12655edc8444b5a09949e7e321869c63b1446389 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 28 Mar 2012 07:44:20 +0000 Subject: remove dissolve keybinding, conflicts with draw, add back to delete menu. dissolve is now 'X -> D' --- source/blender/editors/mesh/mesh_ops.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c index 0eaba0cd67b..f44d287e9f3 100644 --- a/source/blender/editors/mesh/mesh_ops.c +++ b/source/blender/editors/mesh/mesh_ops.c @@ -341,8 +341,6 @@ void ED_keymap_mesh(wmKeyConfig *keyconf) kmi = WM_keymap_add_item(keymap, "MESH_OT_dupli_extrude_cursor", ACTIONMOUSE, KM_CLICK, KM_SHIFT | KM_CTRL, 0); RNA_boolean_set(kmi->ptr, "rotate_source", FALSE); - WM_keymap_add_menu(keymap, "VIEW3D_MT_edit_mesh_dissolve", DKEY, KM_PRESS, 0, 0); - WM_keymap_add_menu(keymap, "VIEW3D_MT_edit_mesh_delete", XKEY, KM_PRESS, 0, 0); WM_keymap_add_menu(keymap, "VIEW3D_MT_edit_mesh_delete", DELKEY, KM_PRESS, 0, 0); -- cgit v1.2.3 From f342c7de452dad23a918a79fe034d06fa3c93a80 Mon Sep 17 00:00:00 2001 From: Lukas Toenne Date: Wed, 28 Mar 2012 07:48:08 +0000 Subject: Fix for the node tree nodes.new API function, this wasn't setting the scene and main context pointers in the node template, used by file output node. Also the file output node itself now works in case of scene==NULL (might happen in some contexts). --- source/blender/editors/space_node/node_templates.c | 2 ++ source/blender/makesrna/intern/rna_nodetree.c | 4 +++- .../nodes/composite/nodes/node_composite_outputFile.c | 13 +++++++++---- 3 files changed, 14 insertions(+), 5 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/space_node/node_templates.c b/source/blender/editors/space_node/node_templates.c index 3d841b05632..049886b1d66 100644 --- a/source/blender/editors/space_node/node_templates.c +++ b/source/blender/editors/space_node/node_templates.c @@ -266,6 +266,8 @@ static void ui_node_link(bContext *C, void *arg_p, void *event_p) ntemp.type = arg->type; ntemp.ngroup = arg->ngroup; + ntemp.scene = CTX_data_scene(C); + ntemp.main = CTX_data_main(C); if (event == UI_NODE_LINK_DISCONNECT) node_socket_disconnect(bmain, ntree, node_to, sock_to); diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index bad993c9c72..a583b1e5959 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -578,7 +578,7 @@ static EnumPropertyItem *rna_Node_channel_itemf(bContext *UNUSED(C), PointerRNA return item; } -static bNode *rna_NodeTree_node_new(bNodeTree *ntree, bContext *UNUSED(C), ReportList *reports, +static bNode *rna_NodeTree_node_new(bNodeTree *ntree, bContext *C, ReportList *reports, int type, bNodeTree *group) { bNode *node; @@ -591,6 +591,8 @@ static bNode *rna_NodeTree_node_new(bNodeTree *ntree, bContext *UNUSED(C), Repor ntemp.type = type; ntemp.ngroup = group; + ntemp.scene = CTX_data_scene(C); + ntemp.main = CTX_data_main(C); node = nodeAddNode(ntree, &ntemp); if (node == NULL) { diff --git a/source/blender/nodes/composite/nodes/node_composite_outputFile.c b/source/blender/nodes/composite/nodes/node_composite_outputFile.c index e93c250e756..2eb68c787fb 100644 --- a/source/blender/nodes/composite/nodes/node_composite_outputFile.c +++ b/source/blender/nodes/composite/nodes/node_composite_outputFile.c @@ -90,15 +90,20 @@ int ntreeCompositOutputFileRemoveActiveSocket(bNodeTree *ntree, bNode *node) static void init_output_file(bNodeTree *ntree, bNode* node, bNodeTemplate *ntemp) { - RenderData *rd = &ntemp->scene->r; NodeImageMultiFile *nimf= MEM_callocN(sizeof(NodeImageMultiFile), "node image multi file"); + ImageFormatData *format = NULL; node->storage= nimf; - BLI_strncpy(nimf->base_path, rd->pic, sizeof(nimf->base_path)); - nimf->format = rd->im_format; + if (ntemp->scene) { + RenderData *rd = &ntemp->scene->r; + BLI_strncpy(nimf->base_path, rd->pic, sizeof(nimf->base_path)); + nimf->format = rd->im_format; + + format = &rd->im_format; + } /* add one socket by default */ - ntreeCompositOutputFileAddSocket(ntree, node, "Image", &rd->im_format); + ntreeCompositOutputFileAddSocket(ntree, node, "Image", format); } static void free_output_file(bNode *node) -- cgit v1.2.3 From 8aa42f309c2c205035b34c874de6e7b5170b22b5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 28 Mar 2012 08:00:58 +0000 Subject: print error if rip does nothing (rather then grabbing the unripped verts as it did before) --- source/blender/bmesh/operators/bmo_dissolve.c | 4 ++-- source/blender/editors/mesh/editmesh_tools.c | 12 ++++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'source/blender') diff --git a/source/blender/bmesh/operators/bmo_dissolve.c b/source/blender/bmesh/operators/bmo_dissolve.c index 76180355304..20bc01dfa22 100644 --- a/source/blender/bmesh/operators/bmo_dissolve.c +++ b/source/blender/bmesh/operators/bmo_dissolve.c @@ -512,7 +512,7 @@ void bmo_dissolve_limit_exec(BMesh *bm, BMOperator *op) for (i = 0; i < tot_found; i++) { BMEdge *e = (BMEdge *)weight_elems[i].ele; - /* check twice because cumulative effect could disolve over angle limit */ + /* check twice because cumulative effect could dissolve over angle limit */ if (BM_edge_face_angle(e) < angle_limit) { BMFace *nf = BM_faces_join_pair(bm, e->l->f, e->l->radial_next->f, @@ -547,7 +547,7 @@ void bmo_dissolve_limit_exec(BMesh *bm, BMOperator *op) for (i = 0; i < tot_found; i++) { BMVert *v = (BMVert *)weight_elems[i].ele; - /* check twice because cumulative effect could disolve over angle limit */ + /* check twice because cumulative effect could dissolve over angle limit */ if (BM_vert_edge_angle(v) < angle_limit) { BM_vert_collapse_edge(bm, v->e, v, TRUE); /* join edges */ } diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 1679166a366..26bfcfbf0ac 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -2150,6 +2150,7 @@ static int edbm_rip_invoke(bContext *C, wmOperator *op, wmEvent *event) float projectMat[4][4], fmval[3] = {event->mval[0], event->mval[1]}; float dist = FLT_MAX; float d; + const int totedge_orig = bm->totedge; /* note on selection: * When calling edge split we operate on tagged edges rather then selected @@ -2195,7 +2196,7 @@ static int edbm_rip_invoke(bContext *C, wmOperator *op, wmEvent *event) if (v->e) { /* find closest edge to mouse cursor */ BM_ITER(e, &iter, bm, BM_EDGES_OF_VERT, v) { - if (e->l && !BM_elem_flag_test(e, BM_ELEM_HIDDEN)) { + if (!BM_elem_flag_test(e, BM_ELEM_HIDDEN) && BM_edge_face_count(e) == 2) { d = mesh_rip_edgedist(ar, projectMat, e->v1->co, e->v2->co, fmval); if (d < dist) { dist = d; @@ -2207,7 +2208,7 @@ static int edbm_rip_invoke(bContext *C, wmOperator *op, wmEvent *event) } if (!e2) { - BKE_report(op->reports, RPT_ERROR, "Selected vertex has no faces attached"); + BKE_report(op->reports, RPT_ERROR, "Selected vertex has no edge/face pairs attached"); return OPERATOR_CANCELLED; } @@ -2266,6 +2267,13 @@ static int edbm_rip_invoke(bContext *C, wmOperator *op, wmEvent *event) BMO_op_exec(bm, &bmop); + if (totedge_orig == bm->totedge) { + EDBM_op_finish(em, &bmop, op, TRUE); + + BKE_report(op->reports, RPT_ERROR, "No edges could be ripped"); + return OPERATOR_CANCELLED; + } + BMO_ITER(e, &siter, bm, &bmop, "edgeout", BM_EDGE) { float cent[3] = {0, 0, 0}, mid[3]; -- cgit v1.2.3 From 30d128c7a723bb6ed68c763d175c845e1cfa3c4f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 28 Mar 2012 08:42:19 +0000 Subject: bmesh: be more strict with operator string formatting, no tabs and only accept slot=%x style. --- source/blender/bmesh/intern/bmesh_operators.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'source/blender') diff --git a/source/blender/bmesh/intern/bmesh_operators.c b/source/blender/bmesh/intern/bmesh_operators.c index 4c38ccacb31..d658b9a5bf2 100644 --- a/source/blender/bmesh/intern/bmesh_operators.c +++ b/source/blender/bmesh/intern/bmesh_operators.c @@ -1264,8 +1264,8 @@ int BMO_op_vinitf(BMesh *bm, BMOperator *op, const char *_fmt, va_list vlist) /* we muck around in here, so dup i */ fmt = ofmt = BLI_strdup(_fmt); - /* find operator nam */ - i = strcspn(fmt, " \t"); + /* find operator name */ + i = strcspn(fmt, " "); opname = fmt; if (!opname[i]) noslot = 1; @@ -1289,17 +1289,15 @@ int BMO_op_vinitf(BMesh *bm, BMOperator *op, const char *_fmt, va_list vlist) while (*fmt) { if (state) { /* jump past leading whitespac */ - i = strspn(fmt, " \t"); + i = strspn(fmt, " "); fmt += i; /* ignore trailing whitespac */ if (!fmt[i]) break; - /* find end of slot name. currently this is - * a little flexible, allowing "slot=%f", - * "slot %f", "slot%f", and "slot\t%f". */ - i = strcspn(fmt, "= \t%"); + /* find end of slot name, only "slot=%f", can be used */ + i = strcspn(fmt, "="); if (!fmt[i]) { GOTO_ERROR("could not match end of slot name"); } @@ -1318,7 +1316,6 @@ int BMO_op_vinitf(BMesh *bm, BMOperator *op, const char *_fmt, va_list vlist) else { switch (*fmt) { case ' ': - case '\t': case '=': case '%': break; @@ -1377,7 +1374,7 @@ int BMO_op_vinitf(BMesh *bm, BMOperator *op, const char *_fmt, va_list vlist) case 'a': type = *fmt; - if (NEXT_CHAR(fmt) == ' ' || NEXT_CHAR(fmt) == '\t' || NEXT_CHAR(fmt) == '\0') { + if (NEXT_CHAR(fmt) == ' ' || NEXT_CHAR(fmt) == '\0') { BMO_slot_float_set(op, slotname, va_arg(vlist, double)); } else { -- cgit v1.2.3 From 33740c5eb56884929b70a394e5b3dc7ceb0cfc91 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 28 Mar 2012 09:07:10 +0000 Subject: Cycles: viewport rendered draw mode now shows background images, also changed the image editor checkerboard pattern to be the same as cycles viewport. --- source/blender/editors/include/BIF_glutil.h | 2 ++ source/blender/editors/screen/glutil.c | 25 +++++++++++++++++++++++ source/blender/editors/space_image/image_draw.c | 25 ++--------------------- source/blender/editors/space_view3d/view3d_draw.c | 9 ++++++++ 4 files changed, 38 insertions(+), 23 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/include/BIF_glutil.h b/source/blender/editors/include/BIF_glutil.h index d75fac18c8c..ade34c43eec 100644 --- a/source/blender/editors/include/BIF_glutil.h +++ b/source/blender/editors/include/BIF_glutil.h @@ -47,6 +47,8 @@ void sdrawXORline4(int nr, int x0, int y0, int x1, int y1); void fdrawXORellipse(float xofs, float yofs, float hw, float hh); void fdrawXORcirc(float xofs, float yofs, float rad); +void fdrawcheckerboard(float x1, float y1, float x2, float y2); + /* glStipple defines */ extern unsigned char stipple_halftone[128]; extern unsigned char stipple_quarttone[128]; diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c index 28fe8caf34b..66abbaecbe7 100644 --- a/source/blender/editors/screen/glutil.c +++ b/source/blender/editors/screen/glutil.c @@ -191,6 +191,31 @@ void fdrawbox(float x1, float y1, float x2, float y2) glEnd(); } +void fdrawcheckerboard(float x1, float y1, float x2, float y2) +{ + unsigned char col1[4]= {40, 40, 40}, col2[4]= {50, 50, 50}; + + GLubyte checker_stipple[32*32/8] = { + 255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, + 255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, + 0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255, + 0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255, + 255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, + 255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, + 0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255, + 0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255, + }; + + glColor3ubv(col1); + glRectf(x1, y1, x2, y2); + glColor3ubv(col2); + + glEnable(GL_POLYGON_STIPPLE); + glPolygonStipple(checker_stipple); + glRectf(x1, y1, x2, y2); + glDisable(GL_POLYGON_STIPPLE); +} + void sdrawline(short x1, short y1, short x2, short y2) { short v[2]; diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c index 59ca1925abf..684e541043a 100644 --- a/source/blender/editors/space_image/image_draw.c +++ b/source/blender/editors/space_image/image_draw.c @@ -393,28 +393,8 @@ static void draw_image_grid(ARegion *ar, float zoomx, float zoomy) glEnd(); } -static void sima_draw_alpha_backdrop(float x1, float y1, float xsize, float ysize, float zoomx, float zoomy, unsigned char col1[3], unsigned char col2[3]) +static void sima_draw_alpha_backdrop(float x1, float y1, float xsize, float ysize, float zoomx, float zoomy) { - GLubyte checker_stipple[32*32/8] = - { - 255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0, - 255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0, - 255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0, - 255,255,0,0,255,255,0,0,255,255,0,0,255,255,0,0, - 0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255, - 0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255, - 0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255, - 0,0,255,255,0,0,255,255,0,0,255,255,0,0,255,255, - }; - - glColor3ubv(col1); - glRectf(x1, y1, x1 + zoomx*xsize, y1 + zoomy*ysize); - glColor3ubv(col2); - - glEnable(GL_POLYGON_STIPPLE); - glPolygonStipple(checker_stipple); - glRectf(x1, y1, x1 + zoomx*xsize, y1 + zoomy*ysize); - glDisable(GL_POLYGON_STIPPLE); } static void sima_draw_alpha_pixels(float x1, float y1, int rectx, int recty, unsigned int *recti) @@ -528,8 +508,7 @@ static void draw_image_buffer(SpaceImage *sima, ARegion *ar, Scene *scene, Image } else { if (sima->flag & SI_USE_ALPHA) { - unsigned char col1[3]= {100, 100, 100}, col2[3]= {160, 160, 160}; - sima_draw_alpha_backdrop(x, y, ibuf->x, ibuf->y, zoomx, zoomy, col1, col2); + fdrawcheckerboard(x, y, x + ibuf->x*zoomx, y + ibuf->y*zoomy); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index b6ed8f65c68..59a19782f1d 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -2728,6 +2728,7 @@ static int view3d_main_area_draw_engine(const bContext *C, ARegion *ar) RegionView3D *rv3d = CTX_wm_region_view3d(C); RenderEngineType *type; + /* create render engine */ if (!rv3d->render_engine) { type = RE_engines_find(scene->r.engine); @@ -2738,13 +2739,21 @@ static int view3d_main_area_draw_engine(const bContext *C, ARegion *ar) type->view_update(rv3d->render_engine, C); } + /* setup view matrices */ view3d_main_area_setup_view(scene, v3d, ar, NULL, NULL); + /* background draw */ glClearColor(0.0f, 0.0f, 0.0f, 0.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); ED_region_pixelspace(ar); + /* render result draw */ + if (v3d->flag & V3D_DISPBGPICS) + draw_bgpic(scene, ar, v3d); + else + fdrawcheckerboard(0, 0, ar->winx, ar->winy); + type = rv3d->render_engine->type; type->view_draw(rv3d->render_engine, C); -- cgit v1.2.3 From d87995a6b1d03aaa647c9233ca2e6469f2ef7805 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 28 Mar 2012 09:07:35 +0000 Subject: Cycles: add rendered draw mode option in 3d view header to show the active render layer rather than the viewport layers. --- source/blender/makesrna/intern/rna_scene.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'source/blender') diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index a8c0bb97137..67710817de3 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -1140,12 +1140,14 @@ static void rna_SceneRenderLayer_layer_set(PointerRNA *ptr, const int *values) rl->lay = ED_view3d_scene_layer_set(rl->lay, values, NULL); } -static void rna_SceneRenderLayer_pass_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) +static void rna_SceneRenderLayer_pass_update(Main *bmain, Scene *activescene, PointerRNA *ptr) { Scene *scene = (Scene*)ptr->id.data; if (scene->nodetree) ntreeCompositForceHidden(scene->nodetree, scene); + + rna_Scene_glsl_update(bmain, activescene, ptr); } static void rna_Scene_use_nodes_set(PointerRNA *ptr, int value) @@ -1884,14 +1886,14 @@ void rna_def_render_layer_common(StructRNA *srna, int scene) RNA_def_property_ui_text(prop, "Visible Layers", "Scene layers included in this render layer"); if (scene) RNA_def_property_boolean_funcs(prop, NULL, "rna_SceneRenderLayer_layer_set"); else RNA_def_property_boolean_funcs(prop, NULL, "rna_RenderLayer_layer_set"); - if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_Scene_glsl_update"); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "layers_zmask", PROP_BOOLEAN, PROP_LAYER); RNA_def_property_boolean_sdna(prop, NULL, "lay_zmask", 1); RNA_def_property_array(prop, 20); RNA_def_property_ui_text(prop, "Zmask Layers", "Zmask scene layers for solid faces"); - if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_Scene_glsl_update"); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* layer options */ @@ -1904,14 +1906,14 @@ void rna_def_render_layer_common(StructRNA *srna, int scene) prop = RNA_def_property(srna, "use_zmask", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ZMASK); RNA_def_property_ui_text(prop, "Zmask", "Only render what's in front of the solid z values"); - if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_Scene_glsl_update"); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "invert_zmask", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_NEG_ZMASK); RNA_def_property_ui_text(prop, "Zmask Negate", "For Zmask, only render what is behind solid z values instead of in front"); - if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + if (scene) RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_Scene_glsl_update"); else RNA_def_property_clear_flag(prop, PROP_EDITABLE); prop = RNA_def_property(srna, "use_all_z", PROP_BOOLEAN, PROP_NONE); @@ -2685,7 +2687,7 @@ static void rna_def_render_layers(BlenderRNA *brna, PropertyRNA *cprop) "rna_RenderSettings_active_layer_index_set", "rna_RenderSettings_active_layer_index_range"); RNA_def_property_ui_text(prop, "Active Layer Index", "Active index in render layer array"); - RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_Scene_glsl_update"); prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_UNSIGNED); RNA_def_property_struct_type(prop, "SceneRenderLayer"); @@ -2693,7 +2695,7 @@ static void rna_def_render_layers(BlenderRNA *brna, PropertyRNA *cprop) "rna_RenderSettings_active_layer_set", NULL, NULL); RNA_def_property_flag(prop, PROP_EDITABLE|PROP_NEVER_NULL); RNA_def_property_ui_text(prop, "Active Render Layer", "Active Render Layer"); - RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_Scene_glsl_update"); func = RNA_def_function(srna, "new", "rna_RenderLayer_new"); RNA_def_function_ui_description(func, "Add a render layer to scene"); -- cgit v1.2.3 From 0dd34081231ee816275d0f2c41cfdbb725b5825f Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 28 Mar 2012 09:07:43 +0000 Subject: Cycles: add alpha output to image node. --- source/blender/nodes/shader/nodes/node_shader_tex_image.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender') diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_image.c b/source/blender/nodes/shader/nodes/node_shader_tex_image.c index 69e45469174..28dcada3d33 100644 --- a/source/blender/nodes/shader/nodes/node_shader_tex_image.c +++ b/source/blender/nodes/shader/nodes/node_shader_tex_image.c @@ -36,6 +36,7 @@ static bNodeSocketTemplate sh_node_tex_image_in[]= { static bNodeSocketTemplate sh_node_tex_image_out[]= { { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, + { SOCK_FLOAT, 0, "Alpha", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f}, { -1, 0, "" } }; -- cgit v1.2.3 From 1e5424564c0c01d0772641f3896ffaa1a2616e2b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 28 Mar 2012 09:10:19 +0000 Subject: expose image render_slot so keybindings can be configured to change --- source/blender/makesrna/intern/rna_image.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender') diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c index e5a0f43baf3..792635ba5ae 100644 --- a/source/blender/makesrna/intern/rna_image.c +++ b/source/blender/makesrna/intern/rna_image.c @@ -597,6 +597,11 @@ static void rna_def_image(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Bindcode", "OpenGL bindcode"); RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL); + prop = RNA_def_property(srna, "render_slot", PROP_INT, PROP_UNSIGNED); + RNA_def_property_range(prop, 0, IMA_MAX_RENDER_SLOT - 1); + RNA_def_property_ui_text(prop, "Render Slot", "The current render slot displayed, only for viewer type images"); + RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL); + /* Image.has_data and Image.depth are temporary, Update import_obj.py when they are replaced (Arystan) -- cgit v1.2.3 From ca8d262e89c25d15368ec4eb2fe80111e732e1f7 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Wed, 28 Mar 2012 11:48:16 +0000 Subject: Small cleanup for r45238, remove empty/unused function. --- source/blender/editors/space_image/image_draw.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c index 684e541043a..b4cb4f5f210 100644 --- a/source/blender/editors/space_image/image_draw.c +++ b/source/blender/editors/space_image/image_draw.c @@ -393,10 +393,6 @@ static void draw_image_grid(ARegion *ar, float zoomx, float zoomy) glEnd(); } -static void sima_draw_alpha_backdrop(float x1, float y1, float xsize, float ysize, float zoomx, float zoomy) -{ -} - static void sima_draw_alpha_pixels(float x1, float y1, int rectx, int recty, unsigned int *recti) { -- cgit v1.2.3 From ed61bfc9a6580360805a3daae1003df43a7f2c11 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 28 Mar 2012 11:53:18 +0000 Subject: style cleanup --- .../blender/editors/space_console/console_draw.c | 126 ++-- source/blender/editors/space_console/console_ops.c | 374 +++++----- .../blender/editors/space_console/space_console.c | 100 +-- source/blender/editors/space_image/image_buttons.c | 471 ++++++------ source/blender/editors/space_image/image_draw.c | 252 +++---- source/blender/editors/space_image/image_ops.c | 831 +++++++++++---------- source/blender/editors/space_image/space_image.c | 336 ++++----- source/blender/editors/space_info/info_draw.c | 134 ++-- source/blender/editors/space_info/info_ops.c | 93 +-- source/blender/editors/space_info/info_report.c | 116 +-- source/blender/editors/space_info/info_stats.c | 240 +++--- source/blender/editors/space_info/space_info.c | 90 +-- source/blender/editors/space_info/textview.c | 84 +-- 13 files changed, 1625 insertions(+), 1622 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/space_console/console_draw.c b/source/blender/editors/space_console/console_draw.c index 1bfdcee1aae..2897c5d7d67 100644 --- a/source/blender/editors/space_console/console_draw.c +++ b/source/blender/editors/space_console/console_draw.c @@ -59,19 +59,19 @@ static void console_line_color(unsigned char fg[3], int type) { - switch(type) { - case CONSOLE_LINE_OUTPUT: - UI_GetThemeColor3ubv(TH_CONSOLE_OUTPUT, fg); - break; - case CONSOLE_LINE_INPUT: - UI_GetThemeColor3ubv(TH_CONSOLE_INPUT, fg); - break; - case CONSOLE_LINE_INFO: - UI_GetThemeColor3ubv(TH_CONSOLE_INFO, fg); - break; - case CONSOLE_LINE_ERROR: - UI_GetThemeColor3ubv(TH_CONSOLE_ERROR, fg); - break; + switch (type) { + case CONSOLE_LINE_OUTPUT: + UI_GetThemeColor3ubv(TH_CONSOLE_OUTPUT, fg); + break; + case CONSOLE_LINE_INPUT: + UI_GetThemeColor3ubv(TH_CONSOLE_INPUT, fg); + break; + case CONSOLE_LINE_INFO: + UI_GetThemeColor3ubv(TH_CONSOLE_INFO, fg); + break; + case CONSOLE_LINE_ERROR: + UI_GetThemeColor3ubv(TH_CONSOLE_ERROR, fg); + break; } } @@ -93,11 +93,11 @@ typedef struct ConsoleDrawContext { void console_scrollback_prompt_begin(struct SpaceConsole *sc, ConsoleLine *cl_dummy) { /* fake the edit line being in the scroll buffer */ - ConsoleLine *cl= sc->history.last; - cl_dummy->type= CONSOLE_LINE_INPUT; - cl_dummy->len= cl_dummy->len_alloc= strlen(sc->prompt) + cl->len; - cl_dummy->len_alloc= cl_dummy->len + 1; - cl_dummy->line= MEM_mallocN(cl_dummy->len_alloc, "cl_dummy"); + ConsoleLine *cl = sc->history.last; + cl_dummy->type = CONSOLE_LINE_INPUT; + cl_dummy->len = cl_dummy->len_alloc = strlen(sc->prompt) + cl->len; + cl_dummy->len_alloc = cl_dummy->len + 1; + cl_dummy->line = MEM_mallocN(cl_dummy->len_alloc, "cl_dummy"); memcpy(cl_dummy->line, sc->prompt, (cl_dummy->len_alloc - cl->len)); memcpy(cl_dummy->line + ((cl_dummy->len_alloc - cl->len)) - 1, cl->line, cl->len + 1); BLI_addtail(&sc->scrollback, cl_dummy); @@ -116,73 +116,73 @@ void console_scrollback_prompt_end(struct SpaceConsole *sc, ConsoleLine *cl_dumm /* console textview callbacks */ static int console_textview_begin(TextViewContext *tvc) { - SpaceConsole *sc= (SpaceConsole *)tvc->arg1; - tvc->lheight= sc->lheight; - tvc->sel_start= sc->sel_start; - tvc->sel_end= sc->sel_end; + SpaceConsole *sc = (SpaceConsole *)tvc->arg1; + tvc->lheight = sc->lheight; + tvc->sel_start = sc->sel_start; + tvc->sel_end = sc->sel_end; /* iterator */ - tvc->iter= sc->scrollback.last; + tvc->iter = sc->scrollback.last; return (tvc->iter != NULL); } static void console_textview_end(TextViewContext *tvc) { - SpaceConsole *sc= (SpaceConsole *)tvc->arg1; + SpaceConsole *sc = (SpaceConsole *)tvc->arg1; (void)sc; } static int console_textview_step(TextViewContext *tvc) { - return ((tvc->iter= (void *)((Link *)tvc->iter)->prev) != NULL); + return ((tvc->iter = (void *)((Link *)tvc->iter)->prev) != NULL); } static int console_textview_line_get(struct TextViewContext *tvc, const char **line, int *len) { - ConsoleLine *cl= (ConsoleLine *)tvc->iter; - *line= cl->line; - *len= cl->len; + ConsoleLine *cl = (ConsoleLine *)tvc->iter; + *line = cl->line; + *len = cl->len; return 1; } static int console_textview_line_color(struct TextViewContext *tvc, unsigned char fg[3], unsigned char UNUSED(bg[3])) { - ConsoleLine *cl_iter= (ConsoleLine *)tvc->iter; + ConsoleLine *cl_iter = (ConsoleLine *)tvc->iter; /* annoying hack, to draw the prompt */ if (tvc->iter_index == 0) { - const SpaceConsole *sc= (SpaceConsole *)tvc->arg1; - const ConsoleLine *cl= (ConsoleLine *)sc->history.last; - const int prompt_len= strlen(sc->prompt); - const int cursor_loc= cl->cursor + prompt_len; + const SpaceConsole *sc = (SpaceConsole *)tvc->arg1; + const ConsoleLine *cl = (ConsoleLine *)sc->history.last; + const int prompt_len = strlen(sc->prompt); + const int cursor_loc = cl->cursor + prompt_len; int xy[2] = {CONSOLE_DRAW_MARGIN, CONSOLE_DRAW_MARGIN}; int pen[2]; - xy[1] += tvc->lheight/6; + xy[1] += tvc->lheight / 6; /* account for wrapping */ if (cl->len < tvc->console_width) { /* simple case, no wrapping */ - pen[0]= tvc->cwidth * cursor_loc; - pen[1]= -2; + pen[0] = tvc->cwidth * cursor_loc; + pen[1] = -2; } else { /* wrap */ - pen[0]= tvc->cwidth * (cursor_loc % tvc->console_width); - pen[1]= -2 + (((cl->len / tvc->console_width) - (cursor_loc / tvc->console_width)) * tvc->lheight); + pen[0] = tvc->cwidth * (cursor_loc % tvc->console_width); + pen[1] = -2 + (((cl->len / tvc->console_width) - (cursor_loc / tvc->console_width)) * tvc->lheight); } /* cursor */ UI_GetThemeColor3ubv(TH_CONSOLE_CURSOR, fg); glColor3ubv(fg); - glRecti( (xy[0] + pen[0]) - 1, - (xy[1] + pen[1]), - (xy[0] + pen[0]) + 1, - (xy[1] + pen[1] + tvc->lheight) - ); + glRecti((xy[0] + pen[0]) - 1, + (xy[1] + pen[1]), + (xy[0] + pen[0]) + 1, + (xy[1] + pen[1] + tvc->lheight) + ); } console_line_color(fg, cl_iter->type); @@ -193,33 +193,33 @@ static int console_textview_line_color(struct TextViewContext *tvc, unsigned cha static int console_textview_main__internal(struct SpaceConsole *sc, struct ARegion *ar, int draw, int mval[2], void **mouse_pick, int *pos_pick) { - ConsoleLine cl_dummy= {NULL}; - int ret= 0; + ConsoleLine cl_dummy = {NULL}; + int ret = 0; - View2D *v2d= &ar->v2d; + View2D *v2d = &ar->v2d; - TextViewContext tvc= {0}; + TextViewContext tvc = {0}; - tvc.begin= console_textview_begin; - tvc.end= console_textview_end; + tvc.begin = console_textview_begin; + tvc.end = console_textview_end; - tvc.step= console_textview_step; - tvc.line_get= console_textview_line_get; - tvc.line_color= console_textview_line_color; + tvc.step = console_textview_step; + tvc.line_get = console_textview_line_get; + tvc.line_color = console_textview_line_color; - tvc.arg1= sc; - tvc.arg2= NULL; + tvc.arg1 = sc; + tvc.arg2 = NULL; /* view */ - tvc.sel_start= sc->sel_start; - tvc.sel_end= sc->sel_end; - tvc.lheight= sc->lheight; + tvc.sel_start = sc->sel_start; + tvc.sel_end = sc->sel_end; + tvc.lheight = sc->lheight; tvc.ymin = v2d->cur.ymin; tvc.ymax = v2d->cur.ymax; - tvc.winx= ar->winx; + tvc.winx = ar->winx; console_scrollback_prompt_begin(sc, &cl_dummy); - ret= textview_draw(&tvc, draw, mval, mouse_pick, pos_pick); + ret = textview_draw(&tvc, draw, mval, mouse_pick, pos_pick); console_scrollback_prompt_end(sc, &cl_dummy); return ret; @@ -240,12 +240,12 @@ int console_textview_height(struct SpaceConsole *sc, struct ARegion *ar) int console_char_pick(struct SpaceConsole *sc, struct ARegion *ar, int mval[2]) { - int pos_pick= 0; - void *mouse_pick= NULL; + int pos_pick = 0; + void *mouse_pick = NULL; int mval_clamp[2]; - mval_clamp[0]= CLAMPIS(mval[0], CONSOLE_DRAW_MARGIN, ar->winx-(CONSOLE_DRAW_SCROLL + CONSOLE_DRAW_MARGIN)); - mval_clamp[1]= CLAMPIS(mval[1], CONSOLE_DRAW_MARGIN, ar->winy-CONSOLE_DRAW_MARGIN); + mval_clamp[0] = CLAMPIS(mval[0], CONSOLE_DRAW_MARGIN, ar->winx - (CONSOLE_DRAW_SCROLL + CONSOLE_DRAW_MARGIN)); + mval_clamp[1] = CLAMPIS(mval[1], CONSOLE_DRAW_MARGIN, ar->winy - CONSOLE_DRAW_MARGIN); console_textview_main__internal(sc, ar, 0, mval_clamp, &mouse_pick, &pos_pick); return pos_pick; diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c index 425cee38af0..d80b9e2ffb9 100644 --- a/source/blender/editors/space_console/console_ops.c +++ b/source/blender/editors/space_console/console_ops.c @@ -57,16 +57,16 @@ /* so when we type - the view scrolls to the bottom */ static void console_scroll_bottom(ARegion *ar) { - View2D *v2d= &ar->v2d; + View2D *v2d = &ar->v2d; v2d->cur.ymin = 0.0; - v2d->cur.ymax =(float)v2d->winy; + v2d->cur.ymax = (float)v2d->winy; } static void console_textview_update_rect(SpaceConsole *sc, ARegion *ar) { - View2D *v2d= &ar->v2d; + View2D *v2d = &ar->v2d; - UI_view2d_totRect_set(v2d, ar->winx-1, console_textview_height(sc, ar)); + UI_view2d_totRect_set(v2d, ar->winx - 1, console_textview_height(sc, ar)); } static void console_select_offset(SpaceConsole *sc, const int offset) @@ -92,21 +92,21 @@ static void console_scrollback_limit(SpaceConsole *sc) { int tot; - if (U.scrollback < 32) U.scrollback= 256; // XXX - save in user defaults + if (U.scrollback < 32) U.scrollback = 256; // XXX - save in user defaults - for (tot= BLI_countlist(&sc->scrollback); tot > U.scrollback; tot--) + for (tot = BLI_countlist(&sc->scrollback); tot > U.scrollback; tot--) console_scrollback_free(sc, sc->scrollback.first); } -static ConsoleLine * console_history_find(SpaceConsole *sc, const char *str, ConsoleLine *cl_ignore) +static ConsoleLine *console_history_find(SpaceConsole *sc, const char *str, ConsoleLine *cl_ignore) { ConsoleLine *cl; - for (cl= sc->history.last; cl; cl= cl->prev) { - if (cl==cl_ignore) + for (cl = sc->history.last; cl; cl = cl->prev) { + if (cl == cl_ignore) continue; - if (strcmp(str, cl->line)==0) + if (strcmp(str, cl->line) == 0) return cl; } @@ -118,9 +118,9 @@ static int console_line_cursor_set(ConsoleLine *cl, int cursor) { int cursor_new; - if (cursor < 0) cursor_new = 0; - else if (cursor > cl->len) cursor_new = cl->len; - else cursor_new = cursor; + if (cursor < 0) cursor_new = 0; + else if (cursor > cl->len) cursor_new = cl->len; + else cursor_new = cursor; if (cursor_new == cl->cursor) { return FALSE; @@ -136,7 +136,7 @@ static void console_lb_debug__internal(ListBase *lb) ConsoleLine *cl; printf("%d: ", BLI_countlist(lb)); - for (cl= lb->first; cl; cl= cl->next) + for (cl = lb->first; cl; cl = cl->next) printf("<%s> ", cl->line); printf("\n"); @@ -144,7 +144,7 @@ static void console_lb_debug__internal(ListBase *lb) static void console_history_debug(const bContext *C) { - SpaceConsole *sc= CTX_wm_space_console(C); + SpaceConsole *sc = CTX_wm_space_console(C); console_lb_debug__internal(&sc->history); @@ -153,20 +153,20 @@ static void console_history_debug(const bContext *C) static ConsoleLine *console_lb_add__internal(ListBase *lb, ConsoleLine *from) { - ConsoleLine *ci= MEM_callocN(sizeof(ConsoleLine), "ConsoleLine Add"); + ConsoleLine *ci = MEM_callocN(sizeof(ConsoleLine), "ConsoleLine Add"); if (from) { - ci->line= BLI_strdup(from->line); - ci->len= strlen(ci->line); - ci->len_alloc= ci->len; + ci->line = BLI_strdup(from->line); + ci->len = strlen(ci->line); + ci->len_alloc = ci->len; - ci->cursor= from->cursor; - ci->type= from->type; + ci->cursor = from->cursor; + ci->type = from->type; } else { - ci->line= MEM_callocN(64, "console-in-line"); - ci->len_alloc= 64; - ci->len= 0; + ci->line = MEM_callocN(64, "console-in-line"); + ci->len_alloc = 64; + ci->len = 0; } BLI_addtail(lb, ci); @@ -175,7 +175,7 @@ static ConsoleLine *console_lb_add__internal(ListBase *lb, ConsoleLine *from) static ConsoleLine *console_history_add(const bContext *C, ConsoleLine *from) { - SpaceConsole *sc= CTX_wm_space_console(C); + SpaceConsole *sc = CTX_wm_space_console(C); return console_lb_add__internal(&sc->history, from); } @@ -183,7 +183,7 @@ static ConsoleLine *console_history_add(const bContext *C, ConsoleLine *from) #if 0 /* may use later ? */ static ConsoleLine *console_scrollback_add(const bContext *C, ConsoleLine *from) { - SpaceConsole *sc= CTX_wm_space_console(C); + SpaceConsole *sc = CTX_wm_space_console(C); return console_lb_add__internal(&sc->scrollback, from); } @@ -191,9 +191,9 @@ static ConsoleLine *console_scrollback_add(const bContext *C, ConsoleLine *from) static ConsoleLine *console_lb_add_str__internal(ListBase *lb, char *str, int own) { - ConsoleLine *ci= MEM_callocN(sizeof(ConsoleLine), "ConsoleLine Add"); - if (own) ci->line= str; - else ci->line= BLI_strdup(str); + ConsoleLine *ci = MEM_callocN(sizeof(ConsoleLine), "ConsoleLine Add"); + if (own) ci->line = str; + else ci->line = BLI_strdup(str); ci->len = ci->len_alloc = strlen(str); @@ -206,17 +206,17 @@ ConsoleLine *console_history_add_str(SpaceConsole *sc, char *str, int own) } ConsoleLine *console_scrollback_add_str(SpaceConsole *sc, char *str, int own) { - ConsoleLine *ci= console_lb_add_str__internal(&sc->scrollback, str, own); + ConsoleLine *ci = console_lb_add_str__internal(&sc->scrollback, str, own); console_select_offset(sc, ci->len + 1); return ci; } ConsoleLine *console_history_verify(const bContext *C) { - SpaceConsole *sc= CTX_wm_space_console(C); - ConsoleLine *ci= sc->history.last; - if (ci==NULL) - ci= console_history_add(C, NULL); + SpaceConsole *sc = CTX_wm_space_console(C); + ConsoleLine *ci = sc->history.last; + if (ci == NULL) + ci = console_history_add(C, NULL); return ci; } @@ -226,13 +226,13 @@ static void console_line_verify_length(ConsoleLine *ci, int len) { /* resize the buffer if needed */ if (len >= ci->len_alloc) { - int new_len= len * 2; /* new length */ - char *new_line= MEM_callocN(new_len, "console line"); + int new_len = len * 2; /* new length */ + char *new_line = MEM_callocN(new_len, "console line"); memcpy(new_line, ci->line, ci->len); MEM_freeN(ci->line); - ci->line= new_line; - ci->len_alloc= new_len; + ci->line = new_line; + ci->len_alloc = new_len; } } @@ -240,18 +240,18 @@ static int console_line_insert(ConsoleLine *ci, char *str) { int len = strlen(str); - if (len>0 && str[len-1]=='\n') {/* stop new lines being pasted at the end of lines */ - str[len-1]= '\0'; + if (len > 0 && str[len - 1] == '\n') { /* stop new lines being pasted at the end of lines */ + str[len - 1] = '\0'; len--; } - if (len==0) + if (len == 0) return 0; console_line_verify_length(ci, len + ci->len); - memmove(ci->line+ci->cursor+len, ci->line+ci->cursor, (ci->len - ci->cursor)+1); - memcpy(ci->line+ci->cursor, str, len); + memmove(ci->line + ci->cursor + len, ci->line + ci->cursor, (ci->len - ci->cursor) + 1); + memcpy(ci->line + ci->cursor, str, len); ci->len += len; ci->cursor += len; @@ -262,74 +262,75 @@ static int console_line_insert(ConsoleLine *ci, char *str) /* static funcs for text editing */ /* similar to the text editor, with some not used. keep compatible */ -static EnumPropertyItem console_move_type_items[]= { +static EnumPropertyItem console_move_type_items[] = { {LINE_BEGIN, "LINE_BEGIN", 0, "Line Begin", ""}, {LINE_END, "LINE_END", 0, "Line End", ""}, {PREV_CHAR, "PREVIOUS_CHARACTER", 0, "Previous Character", ""}, {NEXT_CHAR, "NEXT_CHARACTER", 0, "Next Character", ""}, {PREV_WORD, "PREVIOUS_WORD", 0, "Previous Word", ""}, {NEXT_WORD, "NEXT_WORD", 0, "Next Word", ""}, - {0, NULL, 0, NULL, NULL}}; + {0, NULL, 0, NULL, NULL} +}; static int console_move_exec(bContext *C, wmOperator *op) { - ConsoleLine *ci= console_history_verify(C); + ConsoleLine *ci = console_history_verify(C); - int type= RNA_enum_get(op->ptr, "type"); - int done= 0; + int type = RNA_enum_get(op->ptr, "type"); + int done = 0; int pos; switch (type) { - case LINE_BEGIN: + case LINE_BEGIN: pos = ci->cursor; BLI_str_cursor_step_utf8(ci->line, ci->len, &pos, STRCUR_DIR_PREV, STRCUR_JUMP_ALL); done = console_line_cursor_set(ci, pos); - break; - case LINE_END: + break; + case LINE_END: pos = ci->cursor; BLI_str_cursor_step_utf8(ci->line, ci->len, &pos, STRCUR_DIR_NEXT, STRCUR_JUMP_ALL); done = console_line_cursor_set(ci, pos); - break; - case PREV_CHAR: + break; + case PREV_CHAR: pos = ci->cursor; BLI_str_cursor_step_utf8(ci->line, ci->len, &pos, STRCUR_DIR_PREV, STRCUR_JUMP_NONE); done = console_line_cursor_set(ci, pos); - break; - case NEXT_CHAR: + break; + case NEXT_CHAR: pos = ci->cursor; BLI_str_cursor_step_utf8(ci->line, ci->len, &pos, STRCUR_DIR_NEXT, STRCUR_JUMP_NONE); done = console_line_cursor_set(ci, pos); - break; - - /* - if the character is a delimiter then skip delimiters (including white space) - * - when jump over the word */ - case PREV_WORD: - pos = ci->cursor; - BLI_str_cursor_step_utf8(ci->line, ci->len, - &pos, STRCUR_DIR_PREV, - STRCUR_JUMP_DELIM); - done = console_line_cursor_set(ci, pos); - break; - case NEXT_WORD: - pos = ci->cursor; - BLI_str_cursor_step_utf8(ci->line, ci->len, - &pos, STRCUR_DIR_NEXT, - STRCUR_JUMP_DELIM); - done = console_line_cursor_set(ci, pos); - break; + break; + + /* - if the character is a delimiter then skip delimiters (including white space) + * - when jump over the word */ + case PREV_WORD: + pos = ci->cursor; + BLI_str_cursor_step_utf8(ci->line, ci->len, + &pos, STRCUR_DIR_PREV, + STRCUR_JUMP_DELIM); + done = console_line_cursor_set(ci, pos); + break; + case NEXT_WORD: + pos = ci->cursor; + BLI_str_cursor_step_utf8(ci->line, ci->len, + &pos, STRCUR_DIR_NEXT, + STRCUR_JUMP_DELIM); + done = console_line_cursor_set(ci, pos); + break; } if (done) { - ScrArea *sa= CTX_wm_area(C); - ARegion *ar= CTX_wm_region(C); + ScrArea *sa = CTX_wm_area(C); + ARegion *ar = CTX_wm_region(C); ED_area_tag_redraw(sa); console_scroll_bottom(ar); @@ -357,26 +358,26 @@ void CONSOLE_OT_move(wmOperatorType *ot) #define TAB_LENGTH 4 static int console_insert_exec(bContext *C, wmOperator *op) { - SpaceConsole *sc= CTX_wm_space_console(C); - ARegion *ar= CTX_wm_region(C); - ConsoleLine *ci= console_history_verify(C); - char *str= RNA_string_get_alloc(op->ptr, "text", NULL, 0); + SpaceConsole *sc = CTX_wm_space_console(C); + ARegion *ar = CTX_wm_region(C); + ConsoleLine *ci = console_history_verify(C); + char *str = RNA_string_get_alloc(op->ptr, "text", NULL, 0); int len; // XXX, alligned tab key hack - if (str[0]=='\t' && str[1]=='\0') { - len= TAB_LENGTH - (ci->cursor % TAB_LENGTH); + if (str[0] == '\t' && str[1] == '\0') { + len = TAB_LENGTH - (ci->cursor % TAB_LENGTH); MEM_freeN(str); - str= MEM_mallocN(len + 1, "insert_exec"); + str = MEM_mallocN(len + 1, "insert_exec"); memset(str, ' ', len); - str[len]= '\0'; + str[len] = '\0'; } - len= console_line_insert(ci, str); + len = console_line_insert(ci, str); MEM_freeN(str); - if (len==0) { + if (len == 0) { return OPERATOR_CANCELLED; } else { @@ -401,8 +402,8 @@ static int console_insert_invoke(bContext *C, wmOperator *op, wmEvent *event) } else { char str[2]; - str[0]= event->ascii; - str[1]= '\0'; + str[0] = event->ascii; + str[1] = '\0'; RNA_string_set(op->ptr, "text", str); } @@ -430,42 +431,43 @@ void CONSOLE_OT_insert(wmOperatorType *ot) } -static EnumPropertyItem console_delete_type_items[]= { +static EnumPropertyItem console_delete_type_items[] = { {DEL_NEXT_CHAR, "NEXT_CHARACTER", 0, "Next Character", ""}, {DEL_PREV_CHAR, "PREVIOUS_CHARACTER", 0, "Previous Character", ""}, // {DEL_NEXT_WORD, "NEXT_WORD", 0, "Next Word", ""}, // {DEL_PREV_WORD, "PREVIOUS_WORD", 0, "Previous Word", ""}, - {0, NULL, 0, NULL, NULL}}; + {0, NULL, 0, NULL, NULL} +}; static int console_delete_exec(bContext *C, wmOperator *op) { - SpaceConsole *sc= CTX_wm_space_console(C); - ARegion *ar= CTX_wm_region(C); - ConsoleLine *ci= console_history_verify(C); + SpaceConsole *sc = CTX_wm_space_console(C); + ARegion *ar = CTX_wm_region(C); + ConsoleLine *ci = console_history_verify(C); - const short type= RNA_enum_get(op->ptr, "type"); + const short type = RNA_enum_get(op->ptr, "type"); int done = 0; - if (ci->len==0) { + if (ci->len == 0) { return OPERATOR_CANCELLED; } - switch(type) { - case DEL_NEXT_CHAR: - if (ci->cursor < ci->len) { - memmove(ci->line + ci->cursor, ci->line + ci->cursor+1, (ci->len - ci->cursor)+1); - ci->len--; - done= 1; - } - break; - case DEL_PREV_CHAR: - if (ci->cursor > 0) { - ci->cursor--; /* same as above */ - memmove(ci->line + ci->cursor, ci->line + ci->cursor+1, (ci->len - ci->cursor)+1); - ci->len--; - done= 1; - } - break; + switch (type) { + case DEL_NEXT_CHAR: + if (ci->cursor < ci->len) { + memmove(ci->line + ci->cursor, ci->line + ci->cursor + 1, (ci->len - ci->cursor) + 1); + ci->len--; + done = 1; + } + break; + case DEL_PREV_CHAR: + if (ci->cursor > 0) { + ci->cursor--; /* same as above */ + memmove(ci->line + ci->cursor, ci->line + ci->cursor + 1, (ci->len - ci->cursor) + 1); + ci->len--; + done = 1; + } + break; } if (!done) { @@ -503,11 +505,11 @@ void CONSOLE_OT_delete(wmOperatorType *ot) /* the python exec operator uses this */ static int console_clear_exec(bContext *C, wmOperator *op) { - SpaceConsole *sc= CTX_wm_space_console(C); - ARegion *ar= CTX_wm_region(C); + SpaceConsole *sc = CTX_wm_space_console(C); + ARegion *ar = CTX_wm_region(C); - short scrollback= RNA_boolean_get(op->ptr, "scrollback"); - short history= RNA_boolean_get(op->ptr, "history"); + short scrollback = RNA_boolean_get(op->ptr, "scrollback"); + short history = RNA_boolean_get(op->ptr, "history"); /*ConsoleLine *ci= */ console_history_verify(C); @@ -548,42 +550,42 @@ void CONSOLE_OT_clear(wmOperatorType *ot) /* the python exec operator uses this */ static int console_history_cycle_exec(bContext *C, wmOperator *op) { - SpaceConsole *sc= CTX_wm_space_console(C); - ARegion *ar= CTX_wm_region(C); + SpaceConsole *sc = CTX_wm_space_console(C); + ARegion *ar = CTX_wm_region(C); - ConsoleLine *ci= console_history_verify(C); /* TODO - stupid, just prevernts crashes when no command line */ - short reverse= RNA_boolean_get(op->ptr, "reverse"); /* assumes down, reverse is up */ - int prev_len= ci->len; + ConsoleLine *ci = console_history_verify(C); /* TODO - stupid, just prevernts crashes when no command line */ + short reverse = RNA_boolean_get(op->ptr, "reverse"); /* assumes down, reverse is up */ + int prev_len = ci->len; /* keep a copy of the line above so when history is cycled * this is the only function that needs to know about the double-up */ if (ci->prev) { - ConsoleLine *ci_prev= (ConsoleLine *)ci->prev; + ConsoleLine *ci_prev = (ConsoleLine *)ci->prev; - if (strcmp(ci->line, ci_prev->line)==0) + if (strcmp(ci->line, ci_prev->line) == 0) console_history_free(sc, ci_prev); } if (reverse) { /* last item in mistory */ - ci= sc->history.last; + ci = sc->history.last; BLI_remlink(&sc->history, ci); BLI_addhead(&sc->history, ci); } else { - ci= sc->history.first; + ci = sc->history.first; BLI_remlink(&sc->history, ci); BLI_addtail(&sc->history, ci); } - { /* add a duplicate of the new arg and remove all other instances */ + { /* add a duplicate of the new arg and remove all other instances */ ConsoleLine *cl; - while ((cl= console_history_find(sc, ci->line, ci))) + while ((cl = console_history_find(sc, ci->line, ci))) console_history_free(sc, cl); console_history_add(C, (ConsoleLine *)sc->history.last); } - ci= sc->history.last; + ci = sc->history.last; console_select_offset(sc, ci->len - prev_len); /* could be wrapped so update scroll rect */ @@ -614,28 +616,28 @@ void CONSOLE_OT_history_cycle(wmOperatorType *ot) /* the python exec operator uses this */ static int console_history_append_exec(bContext *C, wmOperator *op) { - SpaceConsole *sc= CTX_wm_space_console(C); - ARegion *ar= CTX_wm_region(C); - ScrArea *sa= CTX_wm_area(C); - ConsoleLine *ci= console_history_verify(C); - char *str= RNA_string_get_alloc(op->ptr, "text", NULL, 0); /* own this text in the new line, don't free */ - int cursor= RNA_int_get(op->ptr, "current_character"); - short rem_dupes= RNA_boolean_get(op->ptr, "remove_duplicates"); - int prev_len= ci->len; + SpaceConsole *sc = CTX_wm_space_console(C); + ARegion *ar = CTX_wm_region(C); + ScrArea *sa = CTX_wm_area(C); + ConsoleLine *ci = console_history_verify(C); + char *str = RNA_string_get_alloc(op->ptr, "text", NULL, 0); /* own this text in the new line, don't free */ + int cursor = RNA_int_get(op->ptr, "current_character"); + short rem_dupes = RNA_boolean_get(op->ptr, "remove_duplicates"); + int prev_len = ci->len; if (rem_dupes) { ConsoleLine *cl; - while ((cl= console_history_find(sc, ci->line, ci))) + while ((cl = console_history_find(sc, ci->line, ci))) console_history_free(sc, cl); - if (strcmp(str, ci->line)==0) { + if (strcmp(str, ci->line) == 0) { MEM_freeN(str); return OPERATOR_FINISHED; } } - ci= console_history_add_str(sc, str, 1); /* own the string */ + ci = console_history_add_str(sc, str, 1); /* own the string */ console_select_offset(sc, ci->len - prev_len); console_line_cursor_set(ci, cursor); @@ -671,17 +673,17 @@ void CONSOLE_OT_history_append(wmOperatorType *ot) /* the python exec operator uses this */ static int console_scrollback_append_exec(bContext *C, wmOperator *op) { - SpaceConsole *sc= CTX_wm_space_console(C); - ARegion *ar= CTX_wm_region(C); + SpaceConsole *sc = CTX_wm_space_console(C); + ARegion *ar = CTX_wm_region(C); ConsoleLine *ci; - char *str= RNA_string_get_alloc(op->ptr, "text", NULL, 0); /* own this text in the new line, don't free */ - int type= RNA_enum_get(op->ptr, "type"); + char *str = RNA_string_get_alloc(op->ptr, "text", NULL, 0); /* own this text in the new line, don't free */ + int type = RNA_enum_get(op->ptr, "type"); console_history_verify(C); - ci= console_scrollback_add_str(sc, str, 1); /* own the string */ - ci->type= type; + ci = console_scrollback_add_str(sc, str, 1); /* own the string */ + ci->type = type; console_scrollback_limit(sc); @@ -700,10 +702,10 @@ void CONSOLE_OT_scrollback_append(wmOperatorType *ot) { /* defined in DNA_space_types.h */ static EnumPropertyItem console_line_type_items[] = { - {CONSOLE_LINE_OUTPUT, "OUTPUT", 0, "Output", ""}, - {CONSOLE_LINE_INPUT, "INPUT", 0, "Input", ""}, - {CONSOLE_LINE_INFO, "INFO", 0, "Information", ""}, - {CONSOLE_LINE_ERROR, "ERROR", 0, "Error", ""}, + {CONSOLE_LINE_OUTPUT, "OUTPUT", 0, "Output", ""}, + {CONSOLE_LINE_INPUT, "INPUT", 0, "Input", ""}, + {CONSOLE_LINE_INFO, "INFO", 0, "Information", ""}, + {CONSOLE_LINE_ERROR, "ERROR", 0, "Error", ""}, {0, NULL, 0, NULL, NULL}}; /* identifiers */ @@ -723,20 +725,20 @@ void CONSOLE_OT_scrollback_append(wmOperatorType *ot) static int console_copy_exec(bContext *C, wmOperator *UNUSED(op)) { - SpaceConsole *sc= CTX_wm_space_console(C); + SpaceConsole *sc = CTX_wm_space_console(C); - DynStr *buf_dyn= BLI_dynstr_new(); + DynStr *buf_dyn = BLI_dynstr_new(); char *buf_str; ConsoleLine *cl; int sel[2]; - int offset= 0; + int offset = 0; - ConsoleLine cl_dummy= {NULL}; + ConsoleLine cl_dummy = {NULL}; #if 0 /* copy whole file */ - for (cl= sc->scrollback.first; cl; cl= cl->next) { + for (cl = sc->scrollback.first; cl; cl = cl->next) { BLI_dynstr_append(buf_dyn, cl->line); BLI_dynstr_append(buf_dyn, "\n"); } @@ -747,23 +749,23 @@ static int console_copy_exec(bContext *C, wmOperator *UNUSED(op)) console_scrollback_prompt_begin(sc, &cl_dummy); - for (cl= sc->scrollback.first; cl; cl= cl->next) { + for (cl = sc->scrollback.first; cl; cl = cl->next) { offset += cl->len + 1; } - if (offset==0) { + if (offset == 0) { console_scrollback_prompt_end(sc, &cl_dummy); return OPERATOR_CANCELLED; } offset -= 1; - sel[0]= offset - sc->sel_end; - sel[1]= offset - sc->sel_start; + sel[0] = offset - sc->sel_end; + sel[1] = offset - sc->sel_start; - for (cl= sc->scrollback.first; cl; cl= cl->next) { + for (cl = sc->scrollback.first; cl; cl = cl->next) { if (sel[0] <= cl->len && sel[1] >= 0) { - int sta= MAX2(sel[0], 0); - int end= MIN2(sel[1], cl->len); + int sta = MAX2(sel[0], 0); + int end = MIN2(sel[1], cl->len); if (BLI_dynstr_get_len(buf_dyn)) BLI_dynstr_append(buf_dyn, "\n"); @@ -775,7 +777,7 @@ static int console_copy_exec(bContext *C, wmOperator *UNUSED(op)) sel[1] -= cl->len + 1; } - buf_str= BLI_dynstr_get_cstring(buf_dyn); + buf_str = BLI_dynstr_get_cstring(buf_dyn); BLI_dynstr_free(buf_dyn); WM_clipboard_text_set(buf_str, 0); @@ -803,28 +805,28 @@ void CONSOLE_OT_copy(wmOperatorType *ot) static int console_paste_exec(bContext *C, wmOperator *UNUSED(op)) { - SpaceConsole *sc= CTX_wm_space_console(C); - ARegion *ar= CTX_wm_region(C); - ConsoleLine *ci= console_history_verify(C); + SpaceConsole *sc = CTX_wm_space_console(C); + ARegion *ar = CTX_wm_region(C); + ConsoleLine *ci = console_history_verify(C); - char *buf_str= WM_clipboard_text_get(0); + char *buf_str = WM_clipboard_text_get(0); char *buf_step, *buf_next; - if (buf_str==NULL) + if (buf_str == NULL) return OPERATOR_CANCELLED; - buf_step= buf_str; + buf_step = buf_str; - while ((buf_next=buf_step) && buf_next[0] != '\0') { - buf_step= strchr(buf_next, '\n'); + while ((buf_next = buf_step) && buf_next[0] != '\0') { + buf_step = strchr(buf_next, '\n'); if (buf_step) { - *buf_step= '\0'; + *buf_step = '\0'; buf_step++; } if (buf_next != buf_str) { WM_operator_name_call(C, "CONSOLE_OT_execute", WM_OP_EXEC_DEFAULT, NULL); - ci= console_history_verify(C); + ci = console_history_verify(C); } console_select_offset(sc, console_line_insert(ci, buf_next)); @@ -863,10 +865,10 @@ typedef struct SetConsoleCursor { static void console_cursor_set_to_pos(SpaceConsole *sc, ARegion *ar, SetConsoleCursor *scu, int mval[2], int UNUSED(sel)) { int pos; - pos= console_char_pick(sc, ar, mval); + pos = console_char_pick(sc, ar, mval); if (scu->sel_init == INT_MAX) { - scu->sel_init= pos; + scu->sel_init = pos; sc->sel_start = sc->sel_end = pos; return; } @@ -886,17 +888,17 @@ static void console_cursor_set_to_pos(SpaceConsole *sc, ARegion *ar, SetConsoleC static void console_modal_select_apply(bContext *C, wmOperator *op, wmEvent *event) { - SpaceConsole *sc= CTX_wm_space_console(C); - ARegion *ar= CTX_wm_region(C); - SetConsoleCursor *scu= op->customdata; + SpaceConsole *sc = CTX_wm_space_console(C); + ARegion *ar = CTX_wm_region(C); + SetConsoleCursor *scu = op->customdata; int mval[2]; int sel_prev[2]; - mval[0]= event->mval[0]; - mval[1]= event->mval[1]; + mval[0] = event->mval[0]; + mval[1] = event->mval[1]; - sel_prev[0]= sc->sel_start; - sel_prev[1]= sc->sel_end; + sel_prev[0] = sc->sel_start; + sel_prev[1] = sc->sel_end; console_cursor_set_to_pos(sc, ar, scu, mval, TRUE); @@ -909,7 +911,7 @@ static void console_modal_select_apply(bContext *C, wmOperator *op, wmEvent *eve static void console_cursor_set_exit(bContext *UNUSED(C), wmOperator *op) { // SpaceConsole *sc= CTX_wm_space_console(C); - SetConsoleCursor *scu= op->customdata; + SetConsoleCursor *scu = op->customdata; #if 0 if (txt_has_sel(text)) { @@ -924,15 +926,15 @@ static void console_cursor_set_exit(bContext *UNUSED(C), wmOperator *op) static int console_modal_select_invoke(bContext *C, wmOperator *op, wmEvent *event) { - SpaceConsole *sc= CTX_wm_space_console(C); + SpaceConsole *sc = CTX_wm_space_console(C); // ARegion *ar= CTX_wm_region(C); SetConsoleCursor *scu; - op->customdata= MEM_callocN(sizeof(SetConsoleCursor), "SetConsoleCursor"); - scu= op->customdata; + op->customdata = MEM_callocN(sizeof(SetConsoleCursor), "SetConsoleCursor"); + scu = op->customdata; - scu->sel_old[0]= sc->sel_start; - scu->sel_old[1]= sc->sel_end; + scu->sel_old[0] = sc->sel_start; + scu->sel_old[1] = sc->sel_end; scu->sel_init = INT_MAX; @@ -945,7 +947,7 @@ static int console_modal_select_invoke(bContext *C, wmOperator *op, wmEvent *eve static int console_modal_select(bContext *C, wmOperator *op, wmEvent *event) { - switch(event->type) { + switch (event->type) { case LEFTMOUSE: case MIDDLEMOUSE: case RIGHTMOUSE: diff --git a/source/blender/editors/space_console/space_console.c b/source/blender/editors/space_console/space_console.c index 1867f93b1ef..0dbd4876a65 100644 --- a/source/blender/editors/space_console/space_console.c +++ b/source/blender/editors/space_console/space_console.c @@ -54,7 +54,7 @@ #include "UI_resources.h" #include "UI_view2d.h" -#include "console_intern.h" // own include +#include "console_intern.h" // own include /* ******************** default callbacks for console space ***************** */ @@ -63,32 +63,32 @@ static SpaceLink *console_new(const bContext *UNUSED(C)) ARegion *ar; SpaceConsole *sconsole; - sconsole= MEM_callocN(sizeof(SpaceConsole), "initconsole"); - sconsole->spacetype= SPACE_CONSOLE; + sconsole = MEM_callocN(sizeof(SpaceConsole), "initconsole"); + sconsole->spacetype = SPACE_CONSOLE; - sconsole->lheight= 14; + sconsole->lheight = 14; /* header */ - ar= MEM_callocN(sizeof(ARegion), "header for console"); + ar = MEM_callocN(sizeof(ARegion), "header for console"); BLI_addtail(&sconsole->regionbase, ar); - ar->regiontype= RGN_TYPE_HEADER; - ar->alignment= RGN_ALIGN_BOTTOM; + ar->regiontype = RGN_TYPE_HEADER; + ar->alignment = RGN_ALIGN_BOTTOM; /* main area */ - ar= MEM_callocN(sizeof(ARegion), "main area for text"); + ar = MEM_callocN(sizeof(ARegion), "main area for text"); BLI_addtail(&sconsole->regionbase, ar); - ar->regiontype= RGN_TYPE_WINDOW; + ar->regiontype = RGN_TYPE_WINDOW; /* keep in sync with info */ ar->v2d.scroll |= (V2D_SCROLL_RIGHT); - ar->v2d.align |= V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_NEG_Y; /* align bottom left */ + ar->v2d.align |= V2D_ALIGN_NO_NEG_X | V2D_ALIGN_NO_NEG_Y; /* align bottom left */ ar->v2d.keepofs |= V2D_LOCKOFS_X; - ar->v2d.keepzoom = (V2D_LOCKZOOM_X|V2D_LOCKZOOM_Y|V2D_LIMITZOOM|V2D_KEEPASPECT); - ar->v2d.keeptot= V2D_KEEPTOT_BOUNDS; - ar->v2d.minzoom= ar->v2d.maxzoom= 1.0f; + ar->v2d.keepzoom = (V2D_LOCKZOOM_X | V2D_LOCKZOOM_Y | V2D_LIMITZOOM | V2D_KEEPASPECT); + ar->v2d.keeptot = V2D_KEEPTOT_BOUNDS; + ar->v2d.minzoom = ar->v2d.maxzoom = 1.0f; /* for now, aspect ratio should be maintained, and zoom is clamped within sane default limits */ //ar->v2d.keepzoom= (V2D_KEEPASPECT|V2D_LIMITZOOM); @@ -99,7 +99,7 @@ static SpaceLink *console_new(const bContext *UNUSED(C)) /* not spacelink itself */ static void console_free(SpaceLink *sl) { - SpaceConsole *sc= (SpaceConsole*) sl; + SpaceConsole *sc = (SpaceConsole *) sl; while (sc->scrollback.first) console_scrollback_free(sc, sc->scrollback.first); @@ -117,13 +117,13 @@ static void console_init(struct wmWindowManager *UNUSED(wm), ScrArea *UNUSED(sa) static SpaceLink *console_duplicate(SpaceLink *sl) { - SpaceConsole *sconsolen= MEM_dupallocN(sl); + SpaceConsole *sconsolen = MEM_dupallocN(sl); /* clear or remove stuff from old */ /* TODO - duplicate?, then we also need to duplicate the py namespace */ - sconsolen->scrollback.first= sconsolen->scrollback.last= NULL; - sconsolen->history.first= sconsolen->history.last= NULL; + sconsolen->scrollback.first = sconsolen->scrollback.last = NULL; + sconsolen->history.first = sconsolen->history.last = NULL; return (SpaceLink *)sconsolen; } @@ -136,13 +136,13 @@ static void console_main_area_init(wmWindowManager *wm, ARegion *ar) wmKeyMap *keymap; ListBase *lb; - const float prev_y_min= ar->v2d.cur.ymin; /* so re-sizing keeps the cursor visible */ + const float prev_y_min = ar->v2d.cur.ymin; /* so re-sizing keeps the cursor visible */ UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy); /* always keep the bottom part of the view aligned, less annoying */ if (prev_y_min != ar->v2d.cur.ymin) { - const float cur_y_range= ar->v2d.cur.ymax - ar->v2d.cur.ymin; + const float cur_y_range = ar->v2d.cur.ymax - ar->v2d.cur.ymin; ar->v2d.cur.ymin = prev_y_min; ar->v2d.cur.ymax = prev_y_min + cur_y_range; } @@ -152,7 +152,7 @@ static void console_main_area_init(wmWindowManager *wm, ARegion *ar) WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); /* add drop boxes */ - lb= WM_dropboxmap_find("Console", SPACE_CONSOLE, RGN_TYPE_WINDOW); + lb = WM_dropboxmap_find("Console", SPACE_CONSOLE, RGN_TYPE_WINDOW); WM_event_add_dropbox_handler(&ar->handlers, lb); } @@ -163,7 +163,7 @@ static void console_main_area_init(wmWindowManager *wm, ARegion *ar) static int id_drop_poll(bContext *UNUSED(C), wmDrag *drag, wmEvent *UNUSED(event)) { // SpaceConsole *sc= CTX_wm_space_console(C); - if (drag->type==WM_DRAG_ID) + if (drag->type == WM_DRAG_ID) return 1; return 0; } @@ -171,10 +171,10 @@ static int id_drop_poll(bContext *UNUSED(C), wmDrag *drag, wmEvent *UNUSED(event static void id_drop_copy(wmDrag *drag, wmDropBox *drop) { char text[64]; - ID *id= drag->poin; + ID *id = drag->poin; char id_esc[(sizeof(id->name) - 2) * 2]; - BLI_strescape(id_esc, id->name+2, sizeof(id_esc)); + BLI_strescape(id_esc, id->name + 2, sizeof(id_esc)); BLI_snprintf(text, sizeof(text), "bpy.data.%s[\"%s\"]", BKE_idcode_to_name_plural(GS(id->name)), id_esc); @@ -185,14 +185,14 @@ static void id_drop_copy(wmDrag *drag, wmDropBox *drop) static int path_drop_poll(bContext *UNUSED(C), wmDrag *drag, wmEvent *UNUSED(event)) { // SpaceConsole *sc= CTX_wm_space_console(C); - if (drag->type==WM_DRAG_PATH) + if (drag->type == WM_DRAG_PATH) return 1; return 0; } static void path_drop_copy(wmDrag *drag, wmDropBox *drop) { - char pathname[FILE_MAX+2]; + char pathname[FILE_MAX + 2]; BLI_snprintf(pathname, sizeof(pathname), "\"%s\"", drag->path); RNA_string_set(drop->ptr, "text", pathname); } @@ -201,7 +201,7 @@ static void path_drop_copy(wmDrag *drag, wmDropBox *drop) /* this region dropbox definition */ static void console_dropboxes(void) { - ListBase *lb= WM_dropboxmap_find("Console", SPACE_CONSOLE, RGN_TYPE_WINDOW); + ListBase *lb = WM_dropboxmap_find("Console", SPACE_CONSOLE, RGN_TYPE_WINDOW); WM_dropbox_add(lb, "CONSOLE_OT_insert", id_drop_poll, id_drop_copy); WM_dropbox_add(lb, "CONSOLE_OT_insert", path_drop_poll, path_drop_copy); @@ -212,11 +212,11 @@ static void console_dropboxes(void) static void console_main_area_draw(const bContext *C, ARegion *ar) { /* draw entirely, view changes should be handled here */ - SpaceConsole *sc= CTX_wm_space_console(C); - View2D *v2d= &ar->v2d; + SpaceConsole *sc = CTX_wm_space_console(C); + View2D *v2d = &ar->v2d; View2DScrollers *scrollers; - if (sc->scrollback.first==NULL) + if (sc->scrollback.first == NULL) WM_operator_name_call((bContext *)C, "CONSOLE_OT_banner", WM_OP_EXEC_DEFAULT, NULL); /* clear and setup matrix */ @@ -235,7 +235,7 @@ static void console_main_area_draw(const bContext *C, ARegion *ar) UI_view2d_view_restore(C); /* scrollers */ - scrollers= UI_view2d_scrollers_calc(C, v2d, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_GRID_CLAMP); + scrollers = UI_view2d_scrollers_calc(C, v2d, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_GRID_CLAMP); UI_view2d_scrollers_draw(C, v2d, scrollers); UI_view2d_scrollers_free(scrollers); } @@ -355,7 +355,7 @@ static void console_main_area_listener(ARegion *ar, wmNotifier *wmn) // SpaceInfo *sinfo= sa->spacedata.first; /* context changes */ - switch(wmn->category) { + switch (wmn->category) { case NC_SPACE: if (wmn->data == ND_SPACE_CONSOLE) { /* generic redraw request */ ED_region_tag_redraw(ar); @@ -367,41 +367,41 @@ static void console_main_area_listener(ARegion *ar, wmNotifier *wmn) /* only called once, from space/spacetypes.c */ void ED_spacetype_console(void) { - SpaceType *st= MEM_callocN(sizeof(SpaceType), "spacetype console"); + SpaceType *st = MEM_callocN(sizeof(SpaceType), "spacetype console"); ARegionType *art; - st->spaceid= SPACE_CONSOLE; + st->spaceid = SPACE_CONSOLE; strncpy(st->name, "Console", BKE_ST_MAXNAME); - st->new= console_new; - st->free= console_free; - st->init= console_init; - st->duplicate= console_duplicate; - st->operatortypes= console_operatortypes; - st->keymap= console_keymap; - st->dropboxes= console_dropboxes; + st->new = console_new; + st->free = console_free; + st->init = console_init; + st->duplicate = console_duplicate; + st->operatortypes = console_operatortypes; + st->keymap = console_keymap; + st->dropboxes = console_dropboxes; /* regions: main window */ - art= MEM_callocN(sizeof(ARegionType), "spacetype console region"); + art = MEM_callocN(sizeof(ARegionType), "spacetype console region"); art->regionid = RGN_TYPE_WINDOW; - art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D; + art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D; - art->init= console_main_area_init; - art->draw= console_main_area_draw; - art->listener= console_main_area_listener; + art->init = console_main_area_init; + art->draw = console_main_area_draw; + art->listener = console_main_area_listener; BLI_addhead(&st->regiontypes, art); /* regions: header */ - art= MEM_callocN(sizeof(ARegionType), "spacetype console region"); + art = MEM_callocN(sizeof(ARegionType), "spacetype console region"); art->regionid = RGN_TYPE_HEADER; - art->prefsizey= HEADERY; - art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D|ED_KEYMAP_HEADER; + art->prefsizey = HEADERY; + art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_HEADER; - art->init= console_header_area_init; - art->draw= console_header_area_draw; + art->init = console_header_area_init; + art->draw = console_header_area_draw; BLI_addhead(&st->regiontypes, art); diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c index 8e39f745497..f116a246d72 100644 --- a/source/blender/editors/space_image/image_buttons.c +++ b/source/blender/editors/space_image/image_buttons.c @@ -71,96 +71,95 @@ #include "image_intern.h" -#define B_REDR 1 -#define B_IMAGECHANGED 2 -#define B_NOP 0 -#define B_TWINANIM 5 -#define B_SIMAGETILE 6 -#define B_IDNAME 10 -#define B_FACESEL_PAINT_TEST 11 -#define B_SIMA_RECORD 12 -#define B_SIMA_PLAY 13 - -#define B_SIMANOTHING 16 -#define B_SIMABRUSHCHANGE 17 -#define B_SIMABRUSHBROWSE 18 -#define B_SIMABRUSHLOCAL 19 -#define B_SIMABRUSHDELETE 20 -#define B_KEEPDATA 21 -#define B_SIMABTEXBROWSE 22 -#define B_SIMABTEXDELETE 23 -#define B_VPCOLSLI 24 -#define B_SIMACLONEBROWSE 25 -#define B_SIMACLONEDELETE 26 +#define B_REDR 1 +#define B_IMAGECHANGED 2 +#define B_NOP 0 +#define B_TWINANIM 5 +#define B_SIMAGETILE 6 +#define B_IDNAME 10 +#define B_FACESEL_PAINT_TEST 11 +#define B_SIMA_RECORD 12 +#define B_SIMA_PLAY 13 + +#define B_SIMANOTHING 16 +#define B_SIMABRUSHCHANGE 17 +#define B_SIMABRUSHBROWSE 18 +#define B_SIMABRUSHLOCAL 19 +#define B_SIMABRUSHDELETE 20 +#define B_KEEPDATA 21 +#define B_SIMABTEXBROWSE 22 +#define B_SIMABTEXDELETE 23 +#define B_VPCOLSLI 24 +#define B_SIMACLONEBROWSE 25 +#define B_SIMACLONEDELETE 26 /* proto */ static void image_info(Scene *scene, ImageUser *iuser, Image *ima, ImBuf *ibuf, char *str) { - int ofs= 0; + int ofs = 0; - str[0]= 0; + str[0] = 0; - if (ima==NULL) return; + if (ima == NULL) return; - if (ibuf==NULL) { - ofs+= sprintf(str, "Can't Load Image"); + if (ibuf == NULL) { + ofs += sprintf(str, "Can't Load Image"); } else { - if (ima->source==IMA_SRC_MOVIE) { - ofs+= sprintf(str, "Movie"); + if (ima->source == IMA_SRC_MOVIE) { + ofs += sprintf(str, "Movie"); if (ima->anim) - ofs+= sprintf(str+ofs, "%d frs", IMB_anim_get_duration(ima->anim, IMB_TC_RECORD_RUN)); + ofs += sprintf(str + ofs, "%d frs", IMB_anim_get_duration(ima->anim, IMB_TC_RECORD_RUN)); } else - ofs+= sprintf(str, "Image"); + ofs += sprintf(str, "Image"); - ofs+= sprintf(str+ofs, ": size %d x %d,", ibuf->x, ibuf->y); + ofs += sprintf(str + ofs, ": size %d x %d,", ibuf->x, ibuf->y); if (ibuf->rect_float) { - if (ibuf->channels!=4) { - ofs+= sprintf(str+ofs, "%d float channel(s)", ibuf->channels); + if (ibuf->channels != 4) { + ofs += sprintf(str + ofs, "%d float channel(s)", ibuf->channels); } else if (ibuf->planes == R_IMF_PLANES_RGBA) - ofs+= sprintf(str+ofs, " RGBA float"); + ofs += sprintf(str + ofs, " RGBA float"); else - ofs+= sprintf(str+ofs, " RGB float"); + ofs += sprintf(str + ofs, " RGB float"); } else { if (ibuf->planes == R_IMF_PLANES_RGBA) - ofs+= sprintf(str+ofs, " RGBA byte"); + ofs += sprintf(str + ofs, " RGBA byte"); else - ofs+= sprintf(str+ofs, " RGB byte"); + ofs += sprintf(str + ofs, " RGB byte"); } if (ibuf->zbuf || ibuf->zbuf_float) - ofs+= sprintf(str+ofs, " + Z"); + ofs += sprintf(str + ofs, " + Z"); - if (ima->source==IMA_SRC_SEQUENCE) { - char *file= BLI_last_slash(ibuf->name); - if (file==NULL) file= ibuf->name; - else file++; - ofs+= sprintf(str+ofs, ", %s", file); + if (ima->source == IMA_SRC_SEQUENCE) { + char *file = BLI_last_slash(ibuf->name); + if (file == NULL) file = ibuf->name; + else file++; + ofs += sprintf(str + ofs, ", %s", file); } } /* the frame number, even if we cant */ - if (ima->source==IMA_SRC_SEQUENCE) { + if (ima->source == IMA_SRC_SEQUENCE) { /* don't use iuser->framenr directly because it may not be updated if auto-refresh is off */ - const int framenr= BKE_image_user_get_frame(iuser, CFRA, 0); - ofs+= sprintf(str+ofs, ", Frame: %d", framenr); + const int framenr = BKE_image_user_get_frame(iuser, CFRA, 0); + ofs += sprintf(str + ofs, ", Frame: %d", framenr); } (void)ofs; } /* gets active viewer user */ -struct ImageUser *ntree_get_active_iuser(bNodeTree *ntree) -{ +struct ImageUser *ntree_get_active_iuser(bNodeTree *ntree){ bNode *node; if (ntree) - for (node= ntree->nodes.first; node; node= node->next) - if ( ELEM(node->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER)) + for (node = ntree->nodes.first; node; node = node->next) + if (ELEM(node->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER)) if (node->flag & NODE_DO_OUTPUT) return node->storage; return NULL; @@ -173,13 +172,13 @@ struct ImageUser *ntree_get_active_iuser(bNodeTree *ntree) static int image_panel_poll(const bContext *C, PanelType *UNUSED(pt)) { - SpaceImage *sima= CTX_wm_space_image(C); + SpaceImage *sima = CTX_wm_space_image(C); ImBuf *ibuf; void *lock; int result; - ibuf= ED_space_image_acquire_buffer(sima, &lock); - result= ibuf && ibuf->rect_float; + ibuf = ED_space_image_acquire_buffer(sima, &lock); + result = ibuf && ibuf->rect_float; ED_space_image_release_buffer(sima, lock); return result; @@ -187,21 +186,21 @@ static int image_panel_poll(const bContext *C, PanelType *UNUSED(pt)) static void image_panel_curves(const bContext *C, Panel *pa) { - bScreen *sc= CTX_wm_screen(C); - SpaceImage *sima= CTX_wm_space_image(C); + bScreen *sc = CTX_wm_screen(C); + SpaceImage *sima = CTX_wm_space_image(C); ImBuf *ibuf; PointerRNA simaptr; int levels; void *lock; - ibuf= ED_space_image_acquire_buffer(sima, &lock); + ibuf = ED_space_image_acquire_buffer(sima, &lock); if (ibuf) { - if (sima->cumap==NULL) - sima->cumap= curvemapping_add(4, 0.0f, 0.0f, 1.0f, 1.0f); + if (sima->cumap == NULL) + sima->cumap = curvemapping_add(4, 0.0f, 0.0f, 1.0f, 1.0f); /* curvemap black/white levels only works for RGBA */ - levels= (ibuf->channels==4); + levels = (ibuf->channels == 4); RNA_pointer_create(&sc->id, &RNA_SpaceImageEditor, sima, &simaptr); uiTemplateCurveMapping(pa->layout, &simaptr, "curve", 'c', levels, 0); @@ -215,19 +214,19 @@ static void image_panel_curves(const bContext *C, Panel *pa) * otherwise refresh preview * * XXX if you put this back, also check XXX in image_main_area_draw() */ - */ + * / void image_preview_event(int event) { - int exec= 0; + int exec = 0; - if (event==0) { + if (event == 0) { G.scene->r.scemode &= ~R_COMP_CROP; - exec= 1; + exec = 1; } else { if (image_preview_active(curarea, NULL, NULL)) { G.scene->r.scemode |= R_COMP_CROP; - exec= 1; + exec = 1; } else G.scene->r.scemode &= ~R_COMP_CROP; @@ -238,16 +237,16 @@ void image_preview_event(int event) ntreeCompositTagGenerators(G.scene->nodetree); - G.afbreek= 0; - G.scene->nodetree->timecursor= set_timecursor; - G.scene->nodetree->test_break= blender_test_break; + G.afbreek = 0; + G.scene->nodetree->timecursor = set_timecursor; + G.scene->nodetree->test_break = blender_test_break; BIF_store_spare(); - ntreeCompositExecTree(G.scene->nodetree, &G.scene->r, 1); /* 1 is do_previews */ + ntreeCompositExecTree(G.scene->nodetree, &G.scene->r, 1); /* 1 is do_previews */ - G.scene->nodetree->timecursor= NULL; - G.scene->nodetree->test_break= NULL; + G.scene->nodetree->timecursor = NULL; + G.scene->nodetree->test_break = NULL; scrarea_do_windraw(curarea); waitcursor(0); @@ -260,21 +259,21 @@ void image_preview_event(int event) /* nothing drawn here, we use it to store values */ static void preview_cb(struct ScrArea *sa, struct uiBlock *block) { - SpaceImage *sima= sa->spacedata.first; + SpaceImage *sima = sa->spacedata.first; rctf dispf; - rcti *disprect= &G.scene->r.disprect; - int winx= (G.scene->r.size*G.scene->r.xsch)/100; - int winy= (G.scene->r.size*G.scene->r.ysch)/100; + rcti *disprect = &G.scene->r.disprect; + int winx = (G.scene->r.size * G.scene->r.xsch) / 100; + int winy = (G.scene->r.size * G.scene->r.ysch) / 100; int mval[2]; if (G.scene->r.mode & R_BORDER) { - winx*= (G.scene->r.border.xmax - G.scene->r.border.xmin); - winy*= (G.scene->r.border.ymax - G.scene->r.border.ymin); + winx *= (G.scene->r.border.xmax - G.scene->r.border.xmin); + winy *= (G.scene->r.border.ymax - G.scene->r.border.ymin); } /* while dragging we need to update the rects, otherwise it doesn't end with correct one */ - BLI_init_rctf(&dispf, 15.0f, (block->maxx - block->minx)-15.0f, 15.0f, (block->maxy - block->miny)-15.0f); + BLI_init_rctf(&dispf, 15.0f, (block->maxx - block->minx) - 15.0f, 15.0f, (block->maxy - block->miny) - 15.0f); ui_graphics_to_window_rct(sa->win, &dispf, disprect); /* correction for gla draw */ @@ -283,9 +282,9 @@ static void preview_cb(struct ScrArea *sa, struct uiBlock *block) calc_image_view(sima, 'p'); // printf("winrct %d %d %d %d\n", disprect->xmin, disprect->ymin,disprect->xmax, disprect->ymax); /* map to image space coordinates */ - mval[0]= disprect->xmin; mval[1]= disprect->ymin; + mval[0] = disprect->xmin; mval[1] = disprect->ymin; areamouseco_to_ipoco(v2d, mval, &dispf.xmin, &dispf.ymin); - mval[0]= disprect->xmax; mval[1]= disprect->ymax; + mval[0] = disprect->xmax; mval[1] = disprect->ymax; areamouseco_to_ipoco(v2d, mval, &dispf.xmax, &dispf.ymax); /* map to render coordinates */ @@ -304,43 +303,43 @@ static void preview_cb(struct ScrArea *sa, struct uiBlock *block) static int is_preview_allowed(ScrArea *cur) { - SpaceImage *sima= cur->spacedata.first; + SpaceImage *sima = cur->spacedata.first; ScrArea *sa; /* check if another areawindow has preview set */ - for (sa=G.curscreen->areabase.first; sa; sa= sa->next) { - if (sa!=cur && sa->spacetype==SPACE_IMAGE) { + for (sa = G.curscreen->areabase.first; sa; sa = sa->next) { + if (sa != cur && sa->spacetype == SPACE_IMAGE) { if (image_preview_active(sa, NULL, NULL)) return 0; } } /* check image type */ - if (sima->image==NULL || sima->image->type!=IMA_TYPE_COMPOSITE) + if (sima->image == NULL || sima->image->type != IMA_TYPE_COMPOSITE) return 0; return 1; } -static void image_panel_preview(ScrArea *sa, short cntrl) // IMAGE_HANDLER_PREVIEW +static void image_panel_preview(ScrArea *sa, short cntrl) // IMAGE_HANDLER_PREVIEW { uiBlock *block; - SpaceImage *sima= sa->spacedata.first; + SpaceImage *sima = sa->spacedata.first; int ofsx, ofsy; - if (is_preview_allowed(sa)==0) { + if (is_preview_allowed(sa) == 0) { rem_blockhandler(sa, IMAGE_HANDLER_PREVIEW); - G.scene->r.scemode &= ~R_COMP_CROP; /* quite weak */ + G.scene->r.scemode &= ~R_COMP_CROP; /* quite weak */ return; } - block= uiBeginBlock(C, ar, __func__, UI_EMBOSS); + block = uiBeginBlock(C, ar, __func__, UI_EMBOSS); uiPanelControl(UI_PNL_SOLID | UI_PNL_CLOSE | UI_PNL_SCALE | cntrl); uiSetPanelHandler(IMAGE_HANDLER_PREVIEW); // for close and esc - ofsx= -150+(sa->winx/2)/sima->blockscale; - ofsy= -100+(sa->winy/2)/sima->blockscale; - if (uiNewPanel(C, ar, block, "Preview", "Image", ofsx, ofsy, 300, 200)==0) return; + ofsx = -150 + (sa->winx / 2) / sima->blockscale; + ofsy = -100 + (sa->winy / 2) / sima->blockscale; + if (uiNewPanel(C, ar, block, "Preview", "Image", ofsx, ofsy, 300, 200) == 0) return; uiBlockSetDrawExtraFunc(block, preview_cb); @@ -355,13 +354,13 @@ static char *slot_menu(void) char *str; int a, slot; - str= MEM_callocN(IMA_MAX_RENDER_SLOT*32, "menu slots"); + str = MEM_callocN(IMA_MAX_RENDER_SLOT * 32, "menu slots"); strcpy(str, "Slot %t"); - a= strlen(str); + a = strlen(str); - for (slot=0; slotlayers); - short a, nr= 0; - char *str= MEM_callocN(len, "menu layers"); + int len = 64 + 32 * BLI_countlist(&rr->layers); + short a, nr = 0; + char *str = MEM_callocN(len, "menu layers"); strcpy(str, "Layer %t"); - a= strlen(str); + a = strlen(str); /* compo result */ if (rr->rectf) { - a+= sprintf(str+a, "|Composite %%x0"); - nr= 1; + a += sprintf(str + a, "|Composite %%x0"); + nr = 1; } else if (rr->rect32) { - a+= sprintf(str+a, "|Sequence %%x0"); - nr= 1; + a += sprintf(str + a, "|Sequence %%x0"); + nr = 1; } - for (rl= rr->layers.first; rl; rl= rl->next, nr++) { - a+= sprintf(str+a, "|%s %%x%d", rl->name, nr); + for (rl = rr->layers.first; rl; rl = rl->next, nr++) { + a += sprintf(str + a, "|%s %%x%d", rl->name, nr); } /* no curlay clip here, on render (redraws) the amount of layers can be 1 fir single-layer render */ @@ -399,34 +398,34 @@ static char *layer_menu(RenderResult *rr, short *UNUSED(curlay)) static char *pass_menu(RenderLayer *rl, short *curpass) { RenderPass *rpass; - int len= 64 + 32*(rl?BLI_countlist(&rl->passes):1); - short a, nr= 0; - char *str= MEM_callocN(len, "menu layers"); + int len = 64 + 32 * (rl ? BLI_countlist(&rl->passes) : 1); + short a, nr = 0; + char *str = MEM_callocN(len, "menu layers"); strcpy(str, "Pass %t"); - a= strlen(str); + a = strlen(str); /* rendered results don't have a Combined pass */ - if (rl==NULL || rl->rectf) { - a+= sprintf(str+a, "|Combined %%x0"); - nr= 1; + if (rl == NULL || rl->rectf) { + a += sprintf(str + a, "|Combined %%x0"); + nr = 1; } if (rl) - for (rpass= rl->passes.first; rpass; rpass= rpass->next, nr++) - a+= sprintf(str+a, "|%s %%x%d", rpass->name, nr); + for (rpass = rl->passes.first; rpass; rpass = rpass->next, nr++) + a += sprintf(str + a, "|%s %%x%d", rpass->name, nr); if (*curpass >= nr) - *curpass= 0; + *curpass = 0; return str; } static void set_frames_cb(bContext *C, void *ima_v, void *iuser_v) { - Scene *scene= CTX_data_scene(C); - Image *ima= ima_v; - ImageUser *iuser= iuser_v; + Scene *scene = CTX_data_scene(C); + Image *ima = ima_v; + ImageUser *iuser = iuser_v; if (ima->anim) { iuser->frames = IMB_anim_get_duration(ima->anim, IMB_TC_RECORD_RUN); @@ -437,70 +436,70 @@ static void set_frames_cb(bContext *C, void *ima_v, void *iuser_v) /* 5 layer button callbacks... */ static void image_multi_cb(bContext *C, void *rr_v, void *iuser_v) { - ImageUser *iuser= iuser_v; + ImageUser *iuser = iuser_v; BKE_image_multilayer_index(rr_v, iuser); - WM_event_add_notifier(C, NC_IMAGE|ND_DRAW, NULL); + WM_event_add_notifier(C, NC_IMAGE | ND_DRAW, NULL); } static void image_multi_inclay_cb(bContext *C, void *rr_v, void *iuser_v) { - RenderResult *rr= rr_v; - ImageUser *iuser= iuser_v; - int tot= BLI_countlist(&rr->layers); + RenderResult *rr = rr_v; + ImageUser *iuser = iuser_v; + int tot = BLI_countlist(&rr->layers); if (rr->rectf || rr->rect32) - tot++; /* fake compo/sequencer layer */ + tot++; /* fake compo/sequencer layer */ - if (iuser->layerlayer < tot - 1) { iuser->layer++; BKE_image_multilayer_index(rr, iuser); - WM_event_add_notifier(C, NC_IMAGE|ND_DRAW, NULL); + WM_event_add_notifier(C, NC_IMAGE | ND_DRAW, NULL); } } static void image_multi_declay_cb(bContext *C, void *rr_v, void *iuser_v) { - ImageUser *iuser= iuser_v; + ImageUser *iuser = iuser_v; - if (iuser->layer>0) { + if (iuser->layer > 0) { iuser->layer--; BKE_image_multilayer_index(rr_v, iuser); - WM_event_add_notifier(C, NC_IMAGE|ND_DRAW, NULL); + WM_event_add_notifier(C, NC_IMAGE | ND_DRAW, NULL); } } static void image_multi_incpass_cb(bContext *C, void *rr_v, void *iuser_v) { - RenderResult *rr= rr_v; - ImageUser *iuser= iuser_v; - RenderLayer *rl= BLI_findlink(&rr->layers, iuser->layer); + RenderResult *rr = rr_v; + ImageUser *iuser = iuser_v; + RenderLayer *rl = BLI_findlink(&rr->layers, iuser->layer); if (rl) { - int tot= BLI_countlist(&rl->passes); + int tot = BLI_countlist(&rl->passes); if (rr->rectf || rr->rect32) - tot++; /* fake compo/sequencer layer */ + tot++; /* fake compo/sequencer layer */ - if (iuser->passpass < tot - 1) { iuser->pass++; BKE_image_multilayer_index(rr, iuser); - WM_event_add_notifier(C, NC_IMAGE|ND_DRAW, NULL); + WM_event_add_notifier(C, NC_IMAGE | ND_DRAW, NULL); } } } static void image_multi_decpass_cb(bContext *C, void *rr_v, void *iuser_v) { - ImageUser *iuser= iuser_v; + ImageUser *iuser = iuser_v; - if (iuser->pass>0) { + if (iuser->pass > 0) { iuser->pass--; BKE_image_multilayer_index(rr_v, iuser); - WM_event_add_notifier(C, NC_IMAGE|ND_DRAW, NULL); + WM_event_add_notifier(C, NC_IMAGE | ND_DRAW, NULL); } } #if 0 static void image_freecache_cb(bContext *C, void *ima_v, void *unused) { - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); BKE_image_free_anim_ibufs(ima_v, scene->r.cfra); WM_event_add_notifier(C, NC_IMAGE, ima_v); } @@ -509,47 +508,47 @@ static void image_freecache_cb(bContext *C, void *ima_v, void *unused) #if 0 static void image_user_change(bContext *C, void *iuser_v, void *unused) { - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); BKE_image_user_calc_imanr(iuser_v, scene->r.cfra, 0); } #endif static void uiblock_layer_pass_buttons(uiLayout *layout, RenderResult *rr, ImageUser *iuser, int w, short *render_slot) { - uiBlock *block= uiLayoutGetBlock(layout); + uiBlock *block = uiLayoutGetBlock(layout); uiBut *but; - RenderLayer *rl= NULL; + RenderLayer *rl = NULL; int wmenu1, wmenu2, wmenu3, layer; char *strp; uiLayoutRow(layout, 1); /* layer menu is 1/3 larger than pass */ - wmenu1= (2*w)/5; - wmenu2= (3*w)/5; - wmenu3= (3*w)/6; + wmenu1 = (2 * w) / 5; + wmenu2 = (3 * w) / 5; + wmenu3 = (3 * w) / 6; /* menu buts */ if (render_slot) { - strp= slot_menu(); - but = uiDefButS(block, MENU, 0, strp, 0, 0, wmenu1, UI_UNIT_Y, render_slot, 0,0,0,0, "Select Slot"); + strp = slot_menu(); + but = uiDefButS(block, MENU, 0, strp, 0, 0, wmenu1, UI_UNIT_Y, render_slot, 0, 0, 0, 0, "Select Slot"); uiButSetFunc(but, image_multi_cb, rr, iuser); MEM_freeN(strp); } if (rr) { - strp= layer_menu(rr, &iuser->layer); - but = uiDefButS(block, MENU, 0, strp, 0, 0, wmenu2, UI_UNIT_Y, &iuser->layer, 0,0,0,0, "Select Layer"); + strp = layer_menu(rr, &iuser->layer); + but = uiDefButS(block, MENU, 0, strp, 0, 0, wmenu2, UI_UNIT_Y, &iuser->layer, 0, 0, 0, 0, "Select Layer"); uiButSetFunc(but, image_multi_cb, rr, iuser); MEM_freeN(strp); layer = iuser->layer; if (rr->rectf || rr->rect32) - layer--; /* fake compo/sequencer layer */ + layer--; /* fake compo/sequencer layer */ - rl= BLI_findlink(&rr->layers, layer); /* return NULL is meant to be */ - strp= pass_menu(rl, &iuser->pass); - but = uiDefButS(block, MENU, 0, strp, 0, 0, wmenu3, UI_UNIT_Y, &iuser->pass, 0,0,0,0, "Select Pass"); + rl = BLI_findlink(&rr->layers, layer); /* return NULL is meant to be */ + strp = pass_menu(rl, &iuser->pass); + but = uiDefButS(block, MENU, 0, strp, 0, 0, wmenu3, UI_UNIT_Y, &iuser->pass, 0, 0, 0, 0, "Select Pass"); uiButSetFunc(but, image_multi_cb, rr, iuser); MEM_freeN(strp); } @@ -557,32 +556,32 @@ static void uiblock_layer_pass_buttons(uiLayout *layout, RenderResult *rr, Image static void uiblock_layer_pass_arrow_buttons(uiLayout *layout, RenderResult *rr, ImageUser *iuser, short *render_slot) { - uiBlock *block= uiLayoutGetBlock(layout); + uiBlock *block = uiLayoutGetBlock(layout); uiLayout *row; uiBut *but; - const float dpi_fac= UI_DPI_FAC; + const float dpi_fac = UI_DPI_FAC; - row= uiLayoutRow(layout, 1); + row = uiLayoutRow(layout, 1); - if (rr==NULL || iuser==NULL) + if (rr == NULL || iuser == NULL) return; - if (rr->layers.first==NULL) { + if (rr->layers.first == NULL) { uiItemL(row, "No Layers in Render Result", ICON_NONE); return; } /* decrease, increase arrows */ - but = uiDefIconBut(block, BUT, 0, ICON_TRIA_LEFT, 0,0,17,20, NULL, 0, 0, 0, 0, "Previous Layer"); + but = uiDefIconBut(block, BUT, 0, ICON_TRIA_LEFT, 0, 0, 17, 20, NULL, 0, 0, 0, 0, "Previous Layer"); uiButSetFunc(but, image_multi_declay_cb, rr, iuser); - but = uiDefIconBut(block, BUT, 0, ICON_TRIA_RIGHT, 0,0,18,20, NULL, 0, 0, 0, 0, "Next Layer"); + but = uiDefIconBut(block, BUT, 0, ICON_TRIA_RIGHT, 0, 0, 18, 20, NULL, 0, 0, 0, 0, "Next Layer"); uiButSetFunc(but, image_multi_inclay_cb, rr, iuser); uiblock_layer_pass_buttons(row, rr, iuser, 230 * dpi_fac, render_slot); /* decrease, increase arrows */ - but = uiDefIconBut(block, BUT, 0, ICON_TRIA_LEFT, 0,0,17,20, NULL, 0, 0, 0, 0, "Previous Pass"); + but = uiDefIconBut(block, BUT, 0, ICON_TRIA_LEFT, 0, 0, 17, 20, NULL, 0, 0, 0, 0, "Previous Pass"); uiButSetFunc(but, image_multi_decpass_cb, rr, iuser); - but = uiDefIconBut(block, BUT, 0, ICON_TRIA_RIGHT, 0,0,18,20, NULL, 0, 0, 0, 0, "Next Pass"); + but = uiDefIconBut(block, BUT, 0, ICON_TRIA_RIGHT, 0, 0, 18, 20, NULL, 0, 0, 0, 0, "Next Pass"); uiButSetFunc(but, image_multi_incpass_cb, rr, iuser); uiBlockEndAlign(block); @@ -599,11 +598,11 @@ typedef struct RNAUpdateCb { static void rna_update_cb(bContext *C, void *arg_cb, void *UNUSED(arg)) { - RNAUpdateCb *cb= (RNAUpdateCb*)arg_cb; + RNAUpdateCb *cb = (RNAUpdateCb *)arg_cb; /* ideally this would be done by RNA itself, but there we have - * no image user available, so we just update this flag here */ - cb->iuser->ok= 1; + * no image user available, so we just update this flag here */ + cb->iuser->ok = 1; /* we call update here on the pointer property, this way the * owner of the image pointer can still define it's own update @@ -619,7 +618,7 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char Image *ima; ImageUser *iuser; ImBuf *ibuf; - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); uiLayout *row, *split, *col; uiBlock *block; uiBut *but; @@ -629,7 +628,7 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char if (!ptr->data) return; - prop= RNA_struct_find_property(ptr, propname); + prop = RNA_struct_find_property(ptr, propname); if (!prop) { printf("%s: property not found: %s.%s\n", __func__, RNA_struct_identifier(ptr->type), propname); @@ -642,16 +641,16 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char return; } - block= uiLayoutGetBlock(layout); + block = uiLayoutGetBlock(layout); - imaptr= RNA_property_pointer_get(ptr, prop); - ima= imaptr.data; - iuser= userptr->data; + imaptr = RNA_property_pointer_get(ptr, prop); + ima = imaptr.data; + iuser = userptr->data; - cb= MEM_callocN(sizeof(RNAUpdateCb), "RNAUpdateCb"); - cb->ptr= *ptr; - cb->prop= prop; - cb->iuser= iuser; + cb = MEM_callocN(sizeof(RNAUpdateCb), "RNAUpdateCb"); + cb->ptr = *ptr; + cb->prop = prop; + cb->iuser = iuser; uiLayoutSetContextPointer(layout, "edit_image", &imaptr); @@ -662,37 +661,37 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char uiBlockSetNFunc(block, rna_update_cb, MEM_dupallocN(cb), NULL); if (ima->source == IMA_SRC_VIEWER) { - ibuf= BKE_image_acquire_ibuf(ima, iuser, &lock); + ibuf = BKE_image_acquire_ibuf(ima, iuser, &lock); image_info(scene, iuser, ima, ibuf, str); BKE_image_release_ibuf(ima, lock); - uiItemL(layout, ima->id.name+2, ICON_NONE); + uiItemL(layout, ima->id.name + 2, ICON_NONE); uiItemL(layout, str, ICON_NONE); - if (ima->type==IMA_TYPE_COMPOSITE) { + if (ima->type == IMA_TYPE_COMPOSITE) { // XXX not working yet #if 0 - iuser= ntree_get_active_iuser(scene->nodetree); + iuser = ntree_get_active_iuser(scene->nodetree); if (iuser) { uiBlockBeginAlign(block); - uiDefIconTextBut(block, BUT, B_SIMA_RECORD, ICON_REC, "Record", 10,120,100,20, 0, 0, 0, 0, 0, ""); - uiDefIconTextBut(block, BUT, B_SIMA_PLAY, ICON_PLAY, "Play", 110,120,100,20, 0, 0, 0, 0, 0, ""); - but = uiDefBut(block, BUT, B_NOP, "Free Cache", 210,120,100,20, 0, 0, 0, 0, 0, ""); + uiDefIconTextBut(block, BUT, B_SIMA_RECORD, ICON_REC, "Record", 10, 120, 100, 20, 0, 0, 0, 0, 0, ""); + uiDefIconTextBut(block, BUT, B_SIMA_PLAY, ICON_PLAY, "Play", 110, 120, 100, 20, 0, 0, 0, 0, 0, ""); + but = uiDefBut(block, BUT, B_NOP, "Free Cache", 210, 120, 100, 20, 0, 0, 0, 0, 0, ""); uiButSetFunc(but, image_freecache_cb, ima, NULL); if (iuser->frames) BLI_snprintf(str, sizeof(str), "(%d) Frames:", iuser->framenr); else strcpy(str, "Frames:"); uiBlockBeginAlign(block); - uiDefButI(block, NUM, imagechanged, str, 10, 90,150, 20, &iuser->frames, 0.0, MAXFRAMEF, 0, 0, "Number of images of a movie to use"); - uiDefButI(block, NUM, imagechanged, "StartFr:", 160,90,150,20, &iuser->sfra, 1.0, MAXFRAMEF, 0, 0, "Global starting frame of the movie"); + uiDefButI(block, NUM, imagechanged, str, 10, 90, 150, 20, &iuser->frames, 0.0, MAXFRAMEF, 0, 0, "Number of images of a movie to use"); + uiDefButI(block, NUM, imagechanged, "StartFr:", 160, 90, 150, 20, &iuser->sfra, 1.0, MAXFRAMEF, 0, 0, "Global starting frame of the movie"); } #endif } - else if (ima->type==IMA_TYPE_R_RESULT) { + else if (ima->type == IMA_TYPE_R_RESULT) { /* browse layer/passes */ - Render *re= RE_GetRender(scene->id.name); - RenderResult *rr= RE_AcquireResultRead(re); + Render *re = RE_GetRender(scene->id.name); + RenderResult *rr = RE_AcquireResultRead(re); uiblock_layer_pass_arrow_buttons(layout, rr, iuser, &ima->render_slot); RE_ReleaseResult(re); } @@ -701,22 +700,22 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char uiItemR(layout, &imaptr, "source", 0, NULL, ICON_NONE); if (ima->source != IMA_SRC_GENERATED) { - row= uiLayoutRow(layout, 1); + row = uiLayoutRow(layout, 1); if (ima->packedfile) uiItemO(row, "", ICON_PACKAGE, "image.unpack"); else uiItemO(row, "", ICON_UGLYPACKAGE, "image.pack"); - row= uiLayoutRow(row, 0); - uiLayoutSetEnabled(row, ima->packedfile==NULL); + row = uiLayoutRow(row, 0); + uiLayoutSetEnabled(row, ima->packedfile == NULL); uiItemR(row, &imaptr, "filepath", 0, "", ICON_NONE); uiItemO(row, "", ICON_FILE_REFRESH, "image.reload"); } // XXX what was this for? #if 0 - /* check for re-render, only buttons */ - if (imagechanged==B_IMAGECHANGED) { + /* check for re-render, only buttons */ + if (imagechanged == B_IMAGECHANGED) { if (iuser->flag & IMA_ANIM_REFRESHED) { iuser->flag &= ~IMA_ANIM_REFRESHED; WM_event_add_notifier(C, NC_IMAGE, ima); @@ -725,12 +724,12 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char #endif /* multilayer? */ - if (ima->type==IMA_TYPE_MULTILAYER && ima->rr) { + if (ima->type == IMA_TYPE_MULTILAYER && ima->rr) { uiblock_layer_pass_arrow_buttons(layout, ima->rr, iuser, NULL); } else if (ima->source != IMA_SRC_GENERATED) { if (compact == 0) { - ibuf= BKE_image_acquire_ibuf(ima, iuser, &lock); + ibuf = BKE_image_acquire_ibuf(ima, iuser, &lock); image_info(scene, iuser, ima, ibuf, str); BKE_image_release_ibuf(ima, lock); uiItemL(layout, str, ICON_NONE); @@ -741,15 +740,15 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char if (compact == 0) { /* background image view doesnt need these */ uiItemS(layout); - split= uiLayoutSplit(layout, 0, 0); + split = uiLayoutSplit(layout, 0, 0); - col= uiLayoutColumn(split, 0); + col = uiLayoutColumn(split, 0); uiItemR(col, &imaptr, "use_fields", 0, NULL, ICON_NONE); - row= uiLayoutRow(col, 0); + row = uiLayoutRow(col, 0); uiLayoutSetActive(row, RNA_boolean_get(&imaptr, "use_fields")); uiItemR(row, &imaptr, "field_order", UI_ITEM_R_EXPAND, NULL, ICON_NONE); - row= uiLayoutRow(layout, 0); + row = uiLayoutRow(layout, 0); uiItemR(row, &imaptr, "use_premultiply", 0, NULL, ICON_NONE); uiItemR(row, &imaptr, "use_color_unpremultiply", 0, NULL, ICON_NONE); } @@ -758,32 +757,32 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char if (ELEM(ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE)) { uiItemS(layout); - split= uiLayoutSplit(layout, 0, 0); + split = uiLayoutSplit(layout, 0, 0); - col= uiLayoutColumn(split, 0); + col = uiLayoutColumn(split, 0); BLI_snprintf(str, sizeof(str), "(%d) Frames", iuser->framenr); uiItemR(col, userptr, "frame_duration", 0, str, ICON_NONE); if (ima->anim) { - block= uiLayoutGetBlock(col); - but = uiDefBut(block, BUT, 0, "Match Movie Length", 0, 0, UI_UNIT_X*2, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Set the number of frames to match the movie or sequence"); + block = uiLayoutGetBlock(col); + but = uiDefBut(block, BUT, 0, "Match Movie Length", 0, 0, UI_UNIT_X * 2, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Set the number of frames to match the movie or sequence"); uiButSetFunc(but, set_frames_cb, ima, iuser); } uiItemR(col, userptr, "frame_start", 0, "Start", ICON_NONE); uiItemR(col, userptr, "frame_offset", 0, NULL, ICON_NONE); - col= uiLayoutColumn(split, 0); - row= uiLayoutRow(col, 0); + col = uiLayoutColumn(split, 0); + row = uiLayoutRow(col, 0); uiLayoutSetActive(row, RNA_boolean_get(&imaptr, "use_fields")); uiItemR(row, userptr, "fields_per_frame", 0, "Fields", ICON_NONE); uiItemR(col, userptr, "use_auto_refresh", 0, NULL, ICON_NONE); uiItemR(col, userptr, "use_cyclic", 0, NULL, ICON_NONE); } - else if (ima->source==IMA_SRC_GENERATED) { - split= uiLayoutSplit(layout, 0, 0); + else if (ima->source == IMA_SRC_GENERATED) { + split = uiLayoutSplit(layout, 0, 0); - col= uiLayoutColumn(split, 1); + col = uiLayoutColumn(split, 1); uiItemR(col, &imaptr, "generated_width", 0, "X", ICON_NONE); uiItemR(col, &imaptr, "generated_height", 0, "Y", ICON_NONE); uiItemR(col, &imaptr, "use_generated_float", 0, NULL, ICON_NONE); @@ -791,7 +790,7 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char uiItemR(split, &imaptr, "generated_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE); } - } + } uiBlockSetNFunc(block, NULL, NULL, NULL); } @@ -801,32 +800,32 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char void uiTemplateImageSettings(uiLayout *layout, PointerRNA *imfptr) { - ImageFormatData *imf= imfptr->data; - ID *id= imfptr->id.data; - const int depth_ok= BKE_imtype_valid_depths(imf->imtype); + ImageFormatData *imf = imfptr->data; + ID *id = imfptr->id.data; + const int depth_ok = BKE_imtype_valid_depths(imf->imtype); /* some settings depend on this being a scene thats rendered */ - const short is_render_out= (id && GS(id->name) == ID_SCE); + const short is_render_out = (id && GS(id->name) == ID_SCE); uiLayout *col, *row, *split, *sub; - col= uiLayoutColumn(layout, 0); + col = uiLayoutColumn(layout, 0); - split= uiLayoutSplit(col, 0.5f, 0); + split = uiLayoutSplit(col, 0.5f, 0); uiItemR(split, imfptr, "file_format", 0, "", ICON_NONE); - sub= uiLayoutRow(split, 0); + sub = uiLayoutRow(split, 0); uiItemR(sub, imfptr, "color_mode", UI_ITEM_R_EXPAND, "Color", ICON_NONE); /* only display depth setting if multiple depths can be used */ if ((ELEM6(depth_ok, - R_IMF_CHAN_DEPTH_1, - R_IMF_CHAN_DEPTH_8, - R_IMF_CHAN_DEPTH_12, - R_IMF_CHAN_DEPTH_16, - R_IMF_CHAN_DEPTH_24, - R_IMF_CHAN_DEPTH_32)) == 0) + R_IMF_CHAN_DEPTH_1, + R_IMF_CHAN_DEPTH_8, + R_IMF_CHAN_DEPTH_12, + R_IMF_CHAN_DEPTH_16, + R_IMF_CHAN_DEPTH_24, + R_IMF_CHAN_DEPTH_32)) == 0) { - row= uiLayoutRow(col, 0); + row = uiLayoutRow(col, 0); uiItemR(row, imfptr, "color_depth", UI_ITEM_R_EXPAND, NULL, ICON_NONE); } @@ -842,7 +841,7 @@ void uiTemplateImageSettings(uiLayout *layout, PointerRNA *imfptr) uiItemR(col, imfptr, "exr_codec", 0, NULL, ICON_NONE); } - row= uiLayoutRow(col, 0); + row = uiLayoutRow(col, 0); if (BKE_imtype_supports_zbuf(imf->imtype)) { uiItemR(row, imfptr, "use_zbuffer", 0, NULL, ICON_NONE); } @@ -852,7 +851,7 @@ void uiTemplateImageSettings(uiLayout *layout, PointerRNA *imfptr) } if (imf->imtype == R_IMF_IMTYPE_JP2) { - row= uiLayoutRow(col, 0); + row = uiLayoutRow(col, 0); uiItemR(row, imfptr, "use_jpeg2k_cinema_preset", 0, NULL, ICON_NONE); uiItemR(row, imfptr, "use_jpeg2k_cinema_48", 0, NULL, ICON_NONE); @@ -873,7 +872,7 @@ void uiTemplateImageSettings(uiLayout *layout, PointerRNA *imfptr) void uiTemplateImageLayers(uiLayout *layout, bContext *C, Image *ima, ImageUser *iuser) { - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); Render *re; RenderResult *rr; @@ -882,7 +881,7 @@ void uiTemplateImageLayers(uiLayout *layout, bContext *C, Image *ima, ImageUser const float dpi_fac = UI_DPI_FAC; re = RE_GetRender(scene->id.name); rr = RE_AcquireResultRead(re); - uiblock_layer_pass_buttons(layout, rr, iuser, 160 * dpi_fac, (ima->type==IMA_TYPE_R_RESULT)? &ima->render_slot: NULL); + uiblock_layer_pass_buttons(layout, rr, iuser, 160 * dpi_fac, (ima->type == IMA_TYPE_R_RESULT) ? &ima->render_slot : NULL); RE_ReleaseResult(re); } } @@ -891,25 +890,25 @@ void image_buttons_register(ARegionType *art) { PanelType *pt; - pt= MEM_callocN(sizeof(PanelType), "spacetype image panel curves"); + pt = MEM_callocN(sizeof(PanelType), "spacetype image panel curves"); strcpy(pt->idname, "IMAGE_PT_curves"); strcpy(pt->label, "Curves"); - pt->draw= image_panel_curves; - pt->poll= image_panel_poll; + pt->draw = image_panel_curves; + pt->poll = image_panel_poll; pt->flag |= PNL_DEFAULT_CLOSED; BLI_addtail(&art->paneltypes, pt); - pt= MEM_callocN(sizeof(PanelType), "spacetype image panel gpencil"); + pt = MEM_callocN(sizeof(PanelType), "spacetype image panel gpencil"); strcpy(pt->idname, "IMAGE_PT_gpencil"); strcpy(pt->label, "Grease Pencil"); - pt->draw= gpencil_panel_standard; + pt->draw = gpencil_panel_standard; BLI_addtail(&art->paneltypes, pt); } static int image_properties(bContext *C, wmOperator *UNUSED(op)) { - ScrArea *sa= CTX_wm_area(C); - ARegion *ar= image_has_buttons_region(sa); + ScrArea *sa = CTX_wm_area(C); + ARegion *ar = image_has_buttons_region(sa); if (ar) ED_region_toggle_hidden(C, ar); @@ -932,8 +931,8 @@ void IMAGE_OT_properties(wmOperatorType *ot) static int image_scopes(bContext *C, wmOperator *UNUSED(op)) { - ScrArea *sa= CTX_wm_area(C); - ARegion *ar= image_has_scope_region(sa); + ScrArea *sa = CTX_wm_area(C); + ARegion *ar = image_has_scope_region(sa); if (ar) ED_region_toggle_hidden(C, ar); diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c index b4cb4f5f210..29bd5f5117d 100644 --- a/source/blender/editors/space_image/image_draw.c +++ b/source/blender/editors/space_image/image_draw.c @@ -85,7 +85,7 @@ static void image_verify_buffer_float(Image *ima, ImBuf *ibuf, int color_manage) * NOTE: if float buffer changes, we have to manually remove the rect */ - if (ibuf->rect_float && (ibuf->rect==NULL || (ibuf->userflags & IB_RECT_INVALID)) ) { + if (ibuf->rect_float && (ibuf->rect == NULL || (ibuf->userflags & IB_RECT_INVALID)) ) { if (color_manage) { if (ima && ima->source == IMA_SRC_VIEWER) ibuf->profile = IB_PROFILE_LINEAR_RGB; @@ -101,7 +101,7 @@ static void draw_render_info(Scene *scene, Image *ima, ARegion *ar) { RenderResult *rr; - rr= BKE_image_acquire_renderresult(scene, ima); + rr = BKE_image_acquire_renderresult(scene, ima); if (rr && rr->text) { ED_region_info_draw(ar, rr->text, 1, 0.25); @@ -115,7 +115,7 @@ void ED_image_draw_info(ARegion *ar, int color_manage, int channels, int x, int const unsigned char cp[4], const float fp[4], int *zp, float *zpf) { char str[256]; - float dx= 6; + float dx = 6; /* text colors */ /* XXX colored text not allowed in Blender UI */ #if 0 @@ -127,10 +127,10 @@ void ED_image_draw_info(ARegion *ar, int color_manage, int channels, int x, int unsigned char green[3] = {255, 255, 255}; unsigned char blue[3] = {255, 255, 255}; #endif - float hue=0, sat=0, val=0, lum=0, u=0, v=0; + float hue = 0, sat = 0, val = 0, lum = 0, u = 0, v = 0; float col[4], finalcol[4]; - glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_BLEND); /* noisy, high contrast make impossible to read if lower alpha is used. */ @@ -149,7 +149,7 @@ void ED_image_draw_info(ARegion *ar, int color_manage, int channels, int x, int if (zp) { glColor3ub(255, 255, 255); - BLI_snprintf(str, sizeof(str), " Z:%-.4f |", 0.5f+0.5f*(((float)*zp)/(float)0x7fffffff)); + BLI_snprintf(str, sizeof(str), " Z:%-.4f |", 0.5f + 0.5f * (((float)*zp) / (float)0x7fffffff)); BLF_position(blf_mono_font, dx, 6, 0); BLF_draw_ascii(blf_mono_font, str, sizeof(str)); dx += BLF_width(blf_mono_font, str); @@ -211,19 +211,19 @@ void ED_image_draw_info(ARegion *ar, int color_manage, int channels, int x, int } /* color rectangle */ - if (channels==1) { + if (channels == 1) { if (fp) { col[0] = col[1] = col[2] = fp[0]; } else if (cp) { - col[0] = col[1] = col[2] = (float)cp[0]/255.0f; + col[0] = col[1] = col[2] = (float)cp[0] / 255.0f; } else { col[0] = col[1] = col[2] = 0.0f; } col[3] = 1.0f; } - else if (channels==3) { + else if (channels == 3) { if (fp) { copy_v3_v3(col, fp); } @@ -235,7 +235,7 @@ void ED_image_draw_info(ARegion *ar, int color_manage, int channels, int x, int } col[3] = 1.0f; } - else if (channels==4) { + else if (channels == 4) { if (fp) copy_v4_v4(col, fp); else if (cp) { @@ -262,8 +262,8 @@ void ED_image_draw_info(ARegion *ar, int color_manage, int channels, int x, int glBegin(GL_QUADS); glVertex2f(dx, 3); glVertex2f(dx, 17); - glVertex2f(dx+30, 17); - glVertex2f(dx+30, 3); + glVertex2f(dx + 30, 17); + glVertex2f(dx + 30, 3); glEnd(); /* draw outline */ @@ -271,8 +271,8 @@ void ED_image_draw_info(ARegion *ar, int color_manage, int channels, int x, int glBegin(GL_LINE_LOOP); glVertex2f(dx, 3); glVertex2f(dx, 17); - glVertex2f(dx+30, 17); - glVertex2f(dx+30, 3); + glVertex2f(dx + 30, 17); + glVertex2f(dx + 30, 3); glEnd(); dx += 35; @@ -284,8 +284,8 @@ void ED_image_draw_info(ARegion *ar, int color_manage, int channels, int x, int rgb_to_yuv(fp[0], fp[0], fp[0], &lum, &u, &v); } else if (cp) { - rgb_to_hsv((float)cp[0]/255.0f, (float)cp[0]/255.0f, (float)cp[0]/255.0f, &hue, &sat, &val); - rgb_to_yuv((float)cp[0]/255.0f, (float)cp[0]/255.0f, (float)cp[0]/255.0f, &lum, &u, &v); + rgb_to_hsv((float)cp[0] / 255.0f, (float)cp[0] / 255.0f, (float)cp[0] / 255.0f, &hue, &sat, &val); + rgb_to_yuv((float)cp[0] / 255.0f, (float)cp[0] / 255.0f, (float)cp[0] / 255.0f, &lum, &u, &v); } BLI_snprintf(str, sizeof(str), "V:%-.4f", val); @@ -304,8 +304,8 @@ void ED_image_draw_info(ARegion *ar, int color_manage, int channels, int x, int rgb_to_yuv(fp[0], fp[1], fp[2], &lum, &u, &v); } else if (cp) { - rgb_to_hsv((float)cp[0]/255.0f, (float)cp[1]/255.0f, (float)cp[2]/255.0f, &hue, &sat, &val); - rgb_to_yuv((float)cp[0]/255.0f, (float)cp[1]/255.0f, (float)cp[2]/255.0f, &lum, &u, &v); + rgb_to_hsv((float)cp[0] / 255.0f, (float)cp[1] / 255.0f, (float)cp[2] / 255.0f, &hue, &sat, &val); + rgb_to_yuv((float)cp[0] / 255.0f, (float)cp[1] / 255.0f, (float)cp[2] / 255.0f, &lum, &u, &v); } BLI_snprintf(str, sizeof(str), "H:%-.4f", hue); @@ -336,7 +336,7 @@ void ED_image_draw_info(ARegion *ar, int color_manage, int channels, int x, int static void draw_image_grid(ARegion *ar, float zoomx, float zoomy) { - float gridsize, gridstep= 1.0f/32.0f; + float gridsize, gridstep = 1.0f / 32.0f; float fac, blendfac; int x1, y1, x2, y2; @@ -348,47 +348,47 @@ static void draw_image_grid(ARegion *ar, float zoomx, float zoomy) glRectf(x1, y1, x2, y2); /* gridsize adapted to zoom level */ - gridsize= 0.5f*(zoomx+zoomy); - if (gridsize<=0.0f) return; + gridsize = 0.5f * (zoomx + zoomy); + if (gridsize <= 0.0f) return; - if (gridsize<1.0f) { - while (gridsize<1.0f) { - gridsize*= 4.0f; - gridstep*= 4.0f; + if (gridsize < 1.0f) { + while (gridsize < 1.0f) { + gridsize *= 4.0f; + gridstep *= 4.0f; } } else { - while (gridsize>=4.0f) { - gridsize/= 4.0f; - gridstep/= 4.0f; + while (gridsize >= 4.0f) { + gridsize /= 4.0f; + gridstep /= 4.0f; } } /* the fine resolution level */ - blendfac= 0.25f*gridsize - floorf(0.25f*gridsize); + blendfac = 0.25f * gridsize - floorf(0.25f * gridsize); CLAMP(blendfac, 0.0f, 1.0f); - UI_ThemeColorShade(TH_BACK, (int)(20.0f*(1.0f-blendfac))); + UI_ThemeColorShade(TH_BACK, (int)(20.0f * (1.0f - blendfac))); - fac= 0.0f; + fac = 0.0f; glBegin(GL_LINES); - while (fac<1.0f) { - glVertex2f(x1, y1*(1.0f-fac) + y2*fac); - glVertex2f(x2, y1*(1.0f-fac) + y2*fac); - glVertex2f(x1*(1.0f-fac) + x2*fac, y1); - glVertex2f(x1*(1.0f-fac) + x2*fac, y2); - fac+= gridstep; + while (fac < 1.0f) { + glVertex2f(x1, y1 * (1.0f - fac) + y2 * fac); + glVertex2f(x2, y1 * (1.0f - fac) + y2 * fac); + glVertex2f(x1 * (1.0f - fac) + x2 * fac, y1); + glVertex2f(x1 * (1.0f - fac) + x2 * fac, y2); + fac += gridstep; } /* the large resolution level */ UI_ThemeColor(TH_BACK); - fac= 0.0f; - while (fac<1.0f) { - glVertex2f(x1, y1*(1.0f-fac) + y2*fac); - glVertex2f(x2, y1*(1.0f-fac) + y2*fac); - glVertex2f(x1*(1.0f-fac) + x2*fac, y1); - glVertex2f(x1*(1.0f-fac) + x2*fac, y2); - fac+= 4.0f*gridstep; + fac = 0.0f; + while (fac < 1.0f) { + glVertex2f(x1, y1 * (1.0f - fac) + y2 * fac); + glVertex2f(x2, y1 * (1.0f - fac) + y2 * fac); + glVertex2f(x1 * (1.0f - fac) + x2 * fac, y1); + glVertex2f(x1 * (1.0f - fac) + x2 * fac, y2); + fac += 4.0f * gridstep; } glEnd(); } @@ -406,11 +406,11 @@ static void sima_draw_alpha_pixels(float x1, float y1, int rectx, int recty, uns static void sima_draw_alpha_pixelsf(float x1, float y1, int rectx, int recty, float *rectf) { - float *trectf= MEM_mallocN(rectx*recty*4, "temp"); + float *trectf = MEM_mallocN(rectx * recty * 4, "temp"); int a, b; - for (a= rectx*recty -1, b= 4*a+3; a>=0; a--, b-=4) - trectf[a]= rectf[b]; + for (a = rectx * recty - 1, b = 4 * a + 3; a >= 0; a--, b -= 4) + trectf[a] = rectf[b]; glaDrawPixelsSafe(x1, y1, rectx, recty, rectx, GL_LUMINANCE, GL_FLOAT, trectf); MEM_freeN(trectf); @@ -449,26 +449,26 @@ static void sima_draw_zbuffloat_pixels(Scene *scene, float x1, float y1, int rec float bias, scale, *rectf, clipend; int a; - if (scene->camera && scene->camera->type==OB_CAMERA) { - bias= ((Camera *)scene->camera->data)->clipsta; - clipend= ((Camera *)scene->camera->data)->clipend; - scale= 1.0f/(clipend-bias); + if (scene->camera && scene->camera->type == OB_CAMERA) { + bias = ((Camera *)scene->camera->data)->clipsta; + clipend = ((Camera *)scene->camera->data)->clipend; + scale = 1.0f / (clipend - bias); } else { - bias= 0.1f; - scale= 0.01f; - clipend= 100.0f; + bias = 0.1f; + scale = 0.01f; + clipend = 100.0f; } - rectf= MEM_mallocN(rectx*recty*4, "temp"); - for (a= rectx*recty -1; a>=0; a--) { - if (rect_float[a]>clipend) - rectf[a]= 0.0f; - else if (rect_float[a]= 0; a--) { + if (rect_float[a] > clipend) + rectf[a] = 0.0f; + else if (rect_float[a] < bias) + rectf[a] = 1.0f; else { - rectf[a]= 1.0f - (rect_float[a]-bias)*scale; - rectf[a]*= rectf[a]; + rectf[a] = 1.0f - (rect_float[a] - bias) * scale; + rectf[a] *= rectf[a]; } } glaDrawPixelsSafe(x1, y1, rectx, recty, rectx, GL_LUMINANCE, GL_FLOAT, rectf); @@ -491,20 +491,20 @@ static void draw_image_buffer(SpaceImage *sima, ARegion *ar, Scene *scene, Image if (sima->flag & SI_SHOW_ALPHA) { if (ibuf->rect) sima_draw_alpha_pixels(x, y, ibuf->x, ibuf->y, ibuf->rect); - else if (ibuf->rect_float && ibuf->channels==4) + else if (ibuf->rect_float && ibuf->channels == 4) sima_draw_alpha_pixelsf(x, y, ibuf->x, ibuf->y, ibuf->rect_float); } - else if (sima->flag & SI_SHOW_ZBUF && (ibuf->zbuf || ibuf->zbuf_float || (ibuf->channels==1))) { + else if (sima->flag & SI_SHOW_ZBUF && (ibuf->zbuf || ibuf->zbuf_float || (ibuf->channels == 1))) { if (ibuf->zbuf) sima_draw_zbuf_pixels(x, y, ibuf->x, ibuf->y, ibuf->zbuf); else if (ibuf->zbuf_float) sima_draw_zbuffloat_pixels(scene, x, y, ibuf->x, ibuf->y, ibuf->zbuf_float); - else if (ibuf->channels==1) + else if (ibuf->channels == 1) sima_draw_zbuffloat_pixels(scene, x, y, ibuf->x, ibuf->y, ibuf->rect_float); } else { if (sima->flag & SI_USE_ALPHA) { - fdrawcheckerboard(x, y, x + ibuf->x*zoomx, y + ibuf->y*zoomy); + fdrawcheckerboard(x, y, x + ibuf->x * zoomx, y + ibuf->y * zoomy); glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); @@ -536,17 +536,17 @@ static unsigned int *get_part_from_ibuf(ImBuf *ibuf, short startx, short starty, /* the right offset in rectot */ - rt= ibuf->rect+ (starty*ibuf->x+ startx); + rt = ibuf->rect + (starty * ibuf->x + startx); - len= (endx-startx); - heigth= (endy-starty); + len = (endx - startx); + heigth = (endy - starty); - rp=rectmain= MEM_mallocN(heigth*len*sizeof(int), "rect"); + rp = rectmain = MEM_mallocN(heigth * len * sizeof(int), "rect"); - for (y=0; yx; - rp+= len; + for (y = 0; y < heigth; y++) { + memcpy(rp, rt, len * 4); + rt += ibuf->x; + rp += len; } return rectmain; } @@ -558,28 +558,28 @@ static void draw_image_buffer_tiled(SpaceImage *sima, ARegion *ar, Scene *scene, int color_manage = scene->r.color_mgt_flag & R_COLOR_MANAGEMENT; /* verify valid values, just leave this a while */ - if (ima->xrep<1) return; - if (ima->yrep<1) return; + if (ima->xrep < 1) return; + if (ima->yrep < 1) return; glPixelZoom(zoomx, zoomy); - if (sima->curtile >= ima->xrep*ima->yrep) - sima->curtile = ima->xrep*ima->yrep - 1; + if (sima->curtile >= ima->xrep * ima->yrep) + sima->curtile = ima->xrep * ima->yrep - 1; /* create char buffer from float if needed */ image_verify_buffer_float(ima, ibuf, color_manage); /* retrieve part of image buffer */ - dx= ibuf->x/ima->xrep; - dy= ibuf->y/ima->yrep; - sx= (sima->curtile % ima->xrep)*dx; - sy= (sima->curtile / ima->xrep)*dy; - rect= get_part_from_ibuf(ibuf, sx, sy, sx+dx, sy+dy); + dx = ibuf->x / ima->xrep; + dy = ibuf->y / ima->yrep; + sx = (sima->curtile % ima->xrep) * dx; + sy = (sima->curtile / ima->xrep) * dy; + rect = get_part_from_ibuf(ibuf, sx, sy, sx + dx, sy + dy); /* draw repeated */ - for (sy=0; sy+dy<=ibuf->y; sy+= dy) { - for (sx=0; sx+dx<=ibuf->x; sx+= dx) { - UI_view2d_to_region_no_clip(&ar->v2d, fx + (float)sx/(float)ibuf->x, fy + (float)sy/(float)ibuf->y, &x, &y); + for (sy = 0; sy + dy <= ibuf->y; sy += dy) { + for (sx = 0; sx + dx <= ibuf->x; sx += dx) { + UI_view2d_to_region_no_clip(&ar->v2d, fx + (float)sx / (float)ibuf->x, fy + (float)sy / (float)ibuf->y, &x, &y); glaDrawPixelsSafe(x, y, dx, dy, dx, GL_RGBA, GL_UNSIGNED_BYTE, rect); } @@ -592,18 +592,18 @@ static void draw_image_buffer_tiled(SpaceImage *sima, ARegion *ar, Scene *scene, static void draw_image_buffer_repeated(SpaceImage *sima, ARegion *ar, Scene *scene, Image *ima, ImBuf *ibuf, float zoomx, float zoomy) { - const double time_current= PIL_check_seconds_timer(); + const double time_current = PIL_check_seconds_timer(); - const int xmax= ceil(ar->v2d.cur.xmax); - const int ymax= ceil(ar->v2d.cur.ymax); - const int xmin= floor(ar->v2d.cur.xmin); - const int ymin= floor(ar->v2d.cur.ymin); + const int xmax = ceil(ar->v2d.cur.xmax); + const int ymax = ceil(ar->v2d.cur.ymax); + const int xmin = floor(ar->v2d.cur.xmin); + const int ymin = floor(ar->v2d.cur.ymin); int x; - for (x=xmin; xtpageflag & IMA_TILES)) draw_image_buffer_tiled(sima, ar, scene, ima, ibuf, x, y, zoomx, zoomy); else @@ -624,13 +624,13 @@ void draw_image_grease_pencil(bContext *C, short onlyv2d) /* draw in View2D space? */ if (onlyv2d) { /* assume that UI_view2d_ortho(C) has been called... */ - SpaceImage *sima= (SpaceImage *)CTX_wm_space_data(C); + SpaceImage *sima = (SpaceImage *)CTX_wm_space_data(C); void *lock; - ImBuf *ibuf= ED_space_image_acquire_buffer(sima, &lock); + ImBuf *ibuf = ED_space_image_acquire_buffer(sima, &lock); /* draw grease-pencil ('image' strokes) */ //if (sima->flag & SI_DISPGP) - draw_gpencil_2dimage(C, ibuf); + draw_gpencil_2dimage(C, ibuf); ED_space_image_release_buffer(sima, lock); } @@ -640,7 +640,7 @@ void draw_image_grease_pencil(bContext *C, short onlyv2d) /* draw grease-pencil ('screen' strokes) */ //if (sima->flag & SI_DISPGP) - draw_gpencil_view2d(C, 0); + draw_gpencil_view2d(C, 0); } } @@ -648,24 +648,24 @@ void draw_image_grease_pencil(bContext *C, short onlyv2d) #if 0 static void draw_image_view_tool(Scene *scene) { - ToolSettings *settings= scene->toolsettings; - Brush *brush= settings->imapaint.brush; + ToolSettings *settings = scene->toolsettings; + Brush *brush = settings->imapaint.brush; int mval[2]; float radius; - int draw= 0; + int draw = 0; if (brush) { if (settings->imapaint.flag & IMAGEPAINT_DRAWING) { if (settings->imapaint.flag & IMAGEPAINT_DRAW_TOOL_DRAWING) - draw= 1; + draw = 1; } else if (settings->imapaint.flag & IMAGEPAINT_DRAW_TOOL) - draw= 1; + draw = 1; if (draw) { getmouseco_areawin(mval); - radius= brush_size(brush)*G.sima->zoom; + radius = brush_size(brush) * G.sima->zoom; fdrawXORcirc(mval[0], mval[1], radius); if (brush->innerradius != 1.0) { @@ -687,24 +687,24 @@ static unsigned char *get_alpha_clone_image(Scene *scene, int *width, int *heigh if (!brush || !brush->clone.image) return NULL; - ibuf= BKE_image_get_ibuf(brush->clone.image, NULL); + ibuf = BKE_image_get_ibuf(brush->clone.image, NULL); if (!ibuf || !ibuf->rect) return NULL; - rect= MEM_dupallocN(ibuf->rect); + rect = MEM_dupallocN(ibuf->rect); if (!rect) return NULL; - *width= ibuf->x; - *height= ibuf->y; + *width = ibuf->x; + *height = ibuf->y; - size= (*width)*(*height); - alpha= (unsigned char)255*brush->clone.alpha; - cp= rect; + size = (*width) * (*height); + alpha = (unsigned char)255 * brush->clone.alpha; + cp = rect; while (size-- > 0) { - cp[3]= alpha; + cp[3] = alpha; cp += 4; } @@ -717,12 +717,12 @@ static void draw_image_paint_helpers(ARegion *ar, Scene *scene, float zoomx, flo int x, y, w, h; unsigned char *clonerect; - brush= paint_brush(&scene->toolsettings->imapaint.paint); + brush = paint_brush(&scene->toolsettings->imapaint.paint); if (brush && (brush->imagepaint_tool == PAINT_TOOL_CLONE)) { /* this is not very efficient, but glDrawPixels doesn't allow * drawing with alpha */ - clonerect= get_alpha_clone_image(scene, &w, &h); + clonerect = get_alpha_clone_image(scene, &w, &h); if (clonerect) { UI_view2d_to_region_no_clip(&ar->v2d, brush->clone.offset[0], brush->clone.offset[1], &x, &y); @@ -759,28 +759,28 @@ void draw_image_main(SpaceImage *sima, ARegion *ar, Scene *scene) ED_image_aspect(sima->image, &xuser_asp, &yuser_asp); /* UGLY hack? until now iusers worked fine... but for flipbook viewer we need this */ - if (sima->image->type==IMA_TYPE_COMPOSITE) { - ImageUser *iuser= ntree_get_active_iuser(scene->nodetree); + if (sima->image->type == IMA_TYPE_COMPOSITE) { + ImageUser *iuser = ntree_get_active_iuser(scene->nodetree); if (iuser) { BKE_image_user_calc_imanr(iuser, scene->r.cfra, 0); - sima->iuser= *iuser; + sima->iuser = *iuser; } } /* and we check for spare */ - ibuf= ED_space_image_buffer(sima); + ibuf = ED_space_image_buffer(sima); } #endif /* retrieve the image and information about it */ - ima= ED_space_image(sima); + ima = ED_space_image(sima); ED_space_image_zoom(sima, ar, &zoomx, &zoomy); - ibuf= ED_space_image_acquire_buffer(sima, &lock); + ibuf = ED_space_image_acquire_buffer(sima, &lock); - show_viewer= (ima && ima->source == IMA_SRC_VIEWER); - show_render= (show_viewer && ima->type == IMA_TYPE_R_RESULT); + show_viewer = (ima && ima->source == IMA_SRC_VIEWER); + show_render = (show_viewer && ima->type == IMA_TYPE_R_RESULT); /* draw the image or grid */ - if (ibuf==NULL) + if (ibuf == NULL) draw_image_grid(ar, zoomx, zoomy); else if (sima->flag & SI_DRAW_TILE) draw_image_buffer_repeated(sima, ar, scene, ima, ibuf, zoomx, zoomy); @@ -797,12 +797,12 @@ void draw_image_main(SpaceImage *sima, ARegion *ar, Scene *scene) /* XXX integrate this code */ #if 0 if (ibuf) { - float xoffs=0.0f, yoffs= 0.0f; + float xoffs = 0.0f, yoffs = 0.0f; if (image_preview_active(sa, &xim, &yim)) { - xoffs= scene->r.disprect.xmin; - yoffs= scene->r.disprect.ymin; - glColor3ub(0,0,0); + xoffs = scene->r.disprect.xmin; + yoffs = scene->r.disprect.ymin; + glColor3ub(0, 0, 0); calc_image_view(sima, 'f'); myortho2(G.v2d->cur.xmin, G.v2d->cur.xmax, G.v2d->cur.ymin, G.v2d->cur.ymax); glRectf(0.0f, 0.0f, 1.0f, 1.0f); diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index be53b03bec6..3ed115be345 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -84,10 +84,10 @@ static void sima_zoom_set(SpaceImage *sima, ARegion *ar, float zoom, float location[2]) { - float oldzoom= sima->zoom; + float oldzoom = sima->zoom; int width, height; - sima->zoom= zoom; + sima->zoom = zoom; if (sima->zoom < 0.1f || sima->zoom > 4.0f) { /* check zoom limits */ @@ -97,11 +97,11 @@ static void sima_zoom_set(SpaceImage *sima, ARegion *ar, float zoom, float locat height *= sima->zoom; if ((width < 4) && (height < 4)) - sima->zoom= oldzoom; + sima->zoom = oldzoom; else if ((ar->winrct.xmax - ar->winrct.xmin) <= sima->zoom) - sima->zoom= oldzoom; + sima->zoom = oldzoom; else if ((ar->winrct.ymax - ar->winrct.ymin) <= sima->zoom) - sima->zoom= oldzoom; + sima->zoom = oldzoom; } if ((U.uiflag & USER_ZOOM_TO_MOUSEPOS) && location) { @@ -110,17 +110,17 @@ static void sima_zoom_set(SpaceImage *sima, ARegion *ar, float zoom, float locat ED_space_image_size(sima, &width, &height); ED_space_image_aspect(sima, &aspx, &aspy); - w= width*aspx; - h= height*aspy; + w = width * aspx; + h = height * aspy; - sima->xof+= ((location[0]-0.5f)*w-sima->xof)*(sima->zoom-oldzoom)/sima->zoom; - sima->yof+= ((location[1]-0.5f)*h-sima->yof)*(sima->zoom-oldzoom)/sima->zoom; + sima->xof += ((location[0] - 0.5f) * w - sima->xof) * (sima->zoom - oldzoom) / sima->zoom; + sima->yof += ((location[1] - 0.5f) * h - sima->yof) * (sima->zoom - oldzoom) / sima->zoom; } } static void sima_zoom_set_factor(SpaceImage *sima, ARegion *ar, float zoomfac, float location[2]) { - sima_zoom_set(sima, ar, sima->zoom*zoomfac, location); + sima_zoom_set(sima, ar, sima->zoom * zoomfac, location); } #if 0 // currently unused @@ -132,8 +132,8 @@ static int image_poll(bContext *C) static int space_image_buffer_exists_poll(bContext *C) { - SpaceImage *sima= CTX_wm_space_image(C); - if (sima && sima->spacetype==SPACE_IMAGE) + SpaceImage *sima = CTX_wm_space_image(C); + if (sima && sima->spacetype == SPACE_IMAGE) if (ED_space_image_has_buffer(sima)) return 1; return 0; @@ -142,14 +142,14 @@ static int space_image_buffer_exists_poll(bContext *C) static int space_image_file_exists_poll(bContext *C) { if (space_image_buffer_exists_poll(C)) { - Main *bmain= CTX_data_main(C); - SpaceImage *sima= CTX_wm_space_image(C); + Main *bmain = CTX_data_main(C); + SpaceImage *sima = CTX_wm_space_image(C); ImBuf *ibuf; void *lock; - int ret= FALSE; + int ret = FALSE; char name[FILE_MAX]; - ibuf= ED_space_image_acquire_buffer(sima, &lock); + ibuf = ED_space_image_acquire_buffer(sima, &lock); if (ibuf) { BLI_strncpy(name, ibuf->name, FILE_MAX); BLI_path_abs(name, bmain->name); @@ -161,7 +161,7 @@ static int space_image_file_exists_poll(bContext *C) CTX_wm_operator_poll_msg_set(C, "image path can't be written to"); } else { - ret= TRUE; + ret = TRUE; } } ED_space_image_release_buffer(sima, lock); @@ -173,19 +173,19 @@ static int space_image_file_exists_poll(bContext *C) static int space_image_poll(bContext *C) { - SpaceImage *sima= CTX_wm_space_image(C); - if (sima && sima->spacetype==SPACE_IMAGE && sima->image) + SpaceImage *sima = CTX_wm_space_image(C); + if (sima && sima->spacetype == SPACE_IMAGE && sima->image) return 1; return 0; } int space_image_main_area_poll(bContext *C) { - SpaceImage *sima= CTX_wm_space_image(C); + SpaceImage *sima = CTX_wm_space_image(C); // XXX ARegion *ar= CTX_wm_region(C); if (sima) - return 1; // XXX (ar && ar->type->regionid == RGN_TYPE_WINDOW); + return 1; // XXX (ar && ar->type->regionid == RGN_TYPE_WINDOW); return 0; } @@ -193,7 +193,7 @@ int space_image_main_area_poll(bContext *C) /* For IMAGE_OT_curves_point_set to avoid sampling when in uv smooth mode */ int space_image_main_area_not_uv_brush_poll(bContext *C) { - SpaceImage *sima= CTX_wm_space_image(C); + SpaceImage *sima = CTX_wm_space_image(C); ToolSettings *toolsettings = CTX_data_scene(C)->toolsettings; if (sima && !toolsettings->uvsculpt) @@ -204,8 +204,8 @@ int space_image_main_area_not_uv_brush_poll(bContext *C) static int space_image_image_sample_poll(bContext *C) { - SpaceImage *sima= CTX_wm_space_image(C); - Object *obedit= CTX_data_edit_object(C); + SpaceImage *sima = CTX_wm_space_image(C); + Object *obedit = CTX_data_edit_object(C); ToolSettings *toolsettings = CTX_data_scene(C)->toolsettings; if (obedit) { @@ -224,29 +224,29 @@ typedef struct ViewPanData { static void image_view_pan_init(bContext *C, wmOperator *op, wmEvent *event) { - SpaceImage *sima= CTX_wm_space_image(C); + SpaceImage *sima = CTX_wm_space_image(C); ViewPanData *vpd; - op->customdata= vpd= MEM_callocN(sizeof(ViewPanData), "ImageViewPanData"); + op->customdata = vpd = MEM_callocN(sizeof(ViewPanData), "ImageViewPanData"); WM_cursor_modal(CTX_wm_window(C), BC_NSEW_SCROLLCURSOR); - vpd->x= event->x; - vpd->y= event->y; - vpd->xof= sima->xof; - vpd->yof= sima->yof; - vpd->event_type= event->type; + vpd->x = event->x; + vpd->y = event->y; + vpd->xof = sima->xof; + vpd->yof = sima->yof; + vpd->event_type = event->type; WM_event_add_modal_handler(C, op); } static void image_view_pan_exit(bContext *C, wmOperator *op, int cancel) { - SpaceImage *sima= CTX_wm_space_image(C); - ViewPanData *vpd= op->customdata; + SpaceImage *sima = CTX_wm_space_image(C); + ViewPanData *vpd = op->customdata; if (cancel) { - sima->xof= vpd->xof; - sima->yof= vpd->yof; + sima->xof = vpd->xof; + sima->yof = vpd->yof; ED_region_tag_redraw(CTX_wm_region(C)); } @@ -256,7 +256,7 @@ static void image_view_pan_exit(bContext *C, wmOperator *op, int cancel) static int image_view_pan_exec(bContext *C, wmOperator *op) { - SpaceImage *sima= CTX_wm_space_image(C); + SpaceImage *sima = CTX_wm_space_image(C); float offset[2]; RNA_float_get_array(op->ptr, "offset", offset); @@ -280,11 +280,11 @@ static int image_view_pan_exec(bContext *C, wmOperator *op) static int image_view_pan_invoke(bContext *C, wmOperator *op, wmEvent *event) { if (event->type == MOUSEPAN) { - SpaceImage *sima= CTX_wm_space_image(C); + SpaceImage *sima = CTX_wm_space_image(C); float offset[2]; - offset[0]= (event->x - event->prevx)/sima->zoom; - offset[1]= (event->y - event->prevy)/sima->zoom; + offset[0] = (event->x - event->prevx) / sima->zoom; + offset[1] = (event->y - event->prevy) / sima->zoom; RNA_float_set_array(op->ptr, "offset", offset); image_view_pan_exec(C, op); @@ -298,21 +298,21 @@ static int image_view_pan_invoke(bContext *C, wmOperator *op, wmEvent *event) static int image_view_pan_modal(bContext *C, wmOperator *op, wmEvent *event) { - SpaceImage *sima= CTX_wm_space_image(C); - ViewPanData *vpd= op->customdata; + SpaceImage *sima = CTX_wm_space_image(C); + ViewPanData *vpd = op->customdata; float offset[2]; - switch(event->type) { + switch (event->type) { case MOUSEMOVE: - sima->xof= vpd->xof; - sima->yof= vpd->yof; - offset[0]= (vpd->x - event->x)/sima->zoom; - offset[1]= (vpd->y - event->y)/sima->zoom; + sima->xof = vpd->xof; + sima->yof = vpd->yof; + offset[0] = (vpd->x - event->x) / sima->zoom; + offset[1] = (vpd->y - event->y) / sima->zoom; RNA_float_set_array(op->ptr, "offset", offset); image_view_pan_exec(C, op); break; default: - if (event->type==vpd->event_type && event->val==KM_RELEASE) { + if (event->type == vpd->event_type && event->val == KM_RELEASE) { image_view_pan_exit(C, op, 0); return OPERATOR_FINISHED; } @@ -346,7 +346,7 @@ void IMAGE_OT_view_pan(wmOperatorType *ot) /* properties */ RNA_def_float_vector(ot->srna, "offset", 2, NULL, -FLT_MAX, FLT_MAX, - "Offset", "Offset in floating point units, 1.0 is the width and height of the image", -FLT_MAX, FLT_MAX); + "Offset", "Offset in floating point units, 1.0 is the width and height of the image", -FLT_MAX, FLT_MAX); } /********************** view zoom operator *********************/ @@ -360,17 +360,17 @@ typedef struct ViewZoomData { static void image_view_zoom_init(bContext *C, wmOperator *op, wmEvent *event) { - SpaceImage *sima= CTX_wm_space_image(C); - ARegion *ar= CTX_wm_region(C); + SpaceImage *sima = CTX_wm_space_image(C); + ARegion *ar = CTX_wm_region(C); ViewZoomData *vpd; - op->customdata= vpd= MEM_callocN(sizeof(ViewZoomData), "ImageViewZoomData"); + op->customdata = vpd = MEM_callocN(sizeof(ViewZoomData), "ImageViewZoomData"); WM_cursor_modal(CTX_wm_window(C), BC_NSEW_SCROLLCURSOR); - vpd->x= event->x; - vpd->y= event->y; - vpd->zoom= sima->zoom; - vpd->event_type= event->type; + vpd->x = event->x; + vpd->y = event->y; + vpd->zoom = sima->zoom; + vpd->event_type = event->type; UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &vpd->location[0], &vpd->location[1]); @@ -379,11 +379,11 @@ static void image_view_zoom_init(bContext *C, wmOperator *op, wmEvent *event) static void image_view_zoom_exit(bContext *C, wmOperator *op, int cancel) { - SpaceImage *sima= CTX_wm_space_image(C); - ViewZoomData *vpd= op->customdata; + SpaceImage *sima = CTX_wm_space_image(C); + ViewZoomData *vpd = op->customdata; if (cancel) { - sima->zoom= vpd->zoom; + sima->zoom = vpd->zoom; ED_region_tag_redraw(CTX_wm_region(C)); } @@ -393,8 +393,8 @@ static void image_view_zoom_exit(bContext *C, wmOperator *op, int cancel) static int image_view_zoom_exec(bContext *C, wmOperator *op) { - SpaceImage *sima= CTX_wm_space_image(C); - ARegion *ar= CTX_wm_region(C); + SpaceImage *sima = CTX_wm_space_image(C); + ARegion *ar = CTX_wm_region(C); sima_zoom_set_factor(sima, ar, RNA_float_get(op->ptr, "factor"), NULL); @@ -415,15 +415,15 @@ static int image_view_zoom_exec(bContext *C, wmOperator *op) static int image_view_zoom_invoke(bContext *C, wmOperator *op, wmEvent *event) { if (event->type == MOUSEZOOM) { - SpaceImage *sima= CTX_wm_space_image(C); - ARegion *ar= CTX_wm_region(C); + SpaceImage *sima = CTX_wm_space_image(C); + ARegion *ar = CTX_wm_region(C); float factor, location[2]; UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &location[0], &location[1]); - factor= 1.0f + (event->x-event->prevx+event->y-event->prevy)/300.0f; + factor = 1.0f + (event->x - event->prevx + event->y - event->prevy) / 300.0f; RNA_float_set(op->ptr, "factor", factor); - sima_zoom_set(sima, ar, sima->zoom*factor, location); + sima_zoom_set(sima, ar, sima->zoom * factor, location); ED_region_tag_redraw(CTX_wm_region(C)); return OPERATOR_FINISHED; @@ -436,20 +436,20 @@ static int image_view_zoom_invoke(bContext *C, wmOperator *op, wmEvent *event) static int image_view_zoom_modal(bContext *C, wmOperator *op, wmEvent *event) { - SpaceImage *sima= CTX_wm_space_image(C); - ARegion *ar= CTX_wm_region(C); - ViewZoomData *vpd= op->customdata; + SpaceImage *sima = CTX_wm_space_image(C); + ARegion *ar = CTX_wm_region(C); + ViewZoomData *vpd = op->customdata; float factor; - switch(event->type) { + switch (event->type) { case MOUSEMOVE: - factor= 1.0f + (vpd->x-event->x+vpd->y-event->y)/300.0f; + factor = 1.0f + (vpd->x - event->x + vpd->y - event->y) / 300.0f; RNA_float_set(op->ptr, "factor", factor); - sima_zoom_set(sima, ar, vpd->zoom*factor, vpd->location); + sima_zoom_set(sima, ar, vpd->zoom * factor, vpd->location); ED_region_tag_redraw(CTX_wm_region(C)); break; default: - if (event->type==vpd->event_type && event->val==KM_RELEASE) { + if (event->type == vpd->event_type && event->val == KM_RELEASE) { image_view_zoom_exit(C, op, 0); return OPERATOR_FINISHED; } @@ -483,7 +483,7 @@ void IMAGE_OT_view_zoom(wmOperatorType *ot) /* properties */ RNA_def_float(ot->srna, "factor", 0.0f, 0.0f, FLT_MAX, - "Factor", "Zoom factor, values higher than 1.0 zoom in, lower values zoom out", -FLT_MAX, FLT_MAX); + "Factor", "Zoom factor, values higher than 1.0 zoom in, lower values zoom out", -FLT_MAX, FLT_MAX); } /********************** NDOF operator *********************/ @@ -499,10 +499,10 @@ static int image_view_ndof_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent * if (event->type != NDOF_MOTION) return OPERATOR_CANCELLED; else { - SpaceImage *sima= CTX_wm_space_image(C); - ARegion *ar= CTX_wm_region(C); + SpaceImage *sima = CTX_wm_space_image(C); + ARegion *ar = CTX_wm_region(C); - wmNDOFMotionData* ndof = (wmNDOFMotionData*) event->customdata; + wmNDOFMotionData *ndof = (wmNDOFMotionData *) event->customdata; float dt = ndof->dt; /* tune these until it feels right */ @@ -557,14 +557,14 @@ static int image_view_all_exec(bContext *C, wmOperator *UNUSED(op)) int width, height; /* retrieve state */ - sima= CTX_wm_space_image(C); - ar= CTX_wm_region(C); + sima = CTX_wm_space_image(C); + ar = CTX_wm_region(C); ED_space_image_size(sima, &width, &height); ED_space_image_aspect(sima, &aspx, &aspy); - w= width*aspx; - h= height*aspy; + w = width * aspx; + h = height * aspy; /* check if the image will fit in the image with zoom==1 */ width = ar->winrct.xmax - ar->winrct.xmin + 1; @@ -572,14 +572,14 @@ static int image_view_all_exec(bContext *C, wmOperator *UNUSED(op)) if ((w >= width || h >= height) && (width > 0 && height > 0)) { /* find the zoom value that will fit the image in the image space */ - zoomx= width/w; - zoomy= height/h; - sima_zoom_set(sima, ar, 1.0f/power_of_2(1/MIN2(zoomx, zoomy)), NULL); + zoomx = width / w; + zoomy = height / h; + sima_zoom_set(sima, ar, 1.0f / power_of_2(1 / MIN2(zoomx, zoomy)), NULL); } else sima_zoom_set(sima, ar, 1.0f, NULL); - sima->xof= sima->yof= 0.0f; + sima->xof = sima->yof = 0.0f; ED_region_tag_redraw(CTX_wm_region(C)); @@ -610,32 +610,32 @@ static int image_view_selected_exec(bContext *C, wmOperator *UNUSED(op)) int width, height; /* retrieve state */ - sima= CTX_wm_space_image(C); - ar= CTX_wm_region(C); - scene= CTX_data_scene(C); - obedit= CTX_data_edit_object(C); + sima = CTX_wm_space_image(C); + ar = CTX_wm_region(C); + scene = CTX_data_scene(C); + obedit = CTX_data_edit_object(C); - ima= ED_space_image(sima); + ima = ED_space_image(sima); ED_space_image_size(sima, &width, &height); ED_image_aspect(ima, &aspx, &aspy); - width= width*aspx; - height= height*aspy; + width = width * aspx; + height = height * aspy; /* get bounds */ if (!ED_uvedit_minmax(scene, ima, obedit, min, max)) return OPERATOR_CANCELLED; /* adjust offset and zoom */ - sima->xof= (int)(((min[0] + max[0])*0.5f - 0.5f)*width); - sima->yof= (int)(((min[1] + max[1])*0.5f - 0.5f)*height); + sima->xof = (int)(((min[0] + max[0]) * 0.5f - 0.5f) * width); + sima->yof = (int)(((min[1] + max[1]) * 0.5f - 0.5f) * height); - d[0]= max[0] - min[0]; - d[1]= max[1] - min[1]; - size= 0.5f*MAX2(d[0], d[1])*MAX2(width, height)/256.0f; + d[0] = max[0] - min[0]; + d[1] = max[1] - min[1]; + size = 0.5f * MAX2(d[0], d[1]) * MAX2(width, height) / 256.0f; - if (size<=0.01f) size= 0.01f; - sima_zoom_set(sima, ar, 0.7f/size, NULL); + if (size <= 0.01f) size = 0.01f; + sima_zoom_set(sima, ar, 0.7f / size, NULL); ED_region_tag_redraw(CTX_wm_region(C)); @@ -662,8 +662,8 @@ void IMAGE_OT_view_selected(wmOperatorType *ot) static int image_view_zoom_in_exec(bContext *C, wmOperator *op) { - SpaceImage *sima= CTX_wm_space_image(C); - ARegion *ar= CTX_wm_region(C); + SpaceImage *sima = CTX_wm_space_image(C); + ARegion *ar = CTX_wm_region(C); float location[2]; RNA_float_get_array(op->ptr, "location", location); @@ -677,7 +677,7 @@ static int image_view_zoom_in_exec(bContext *C, wmOperator *op) static int image_view_zoom_in_invoke(bContext *C, wmOperator *op, wmEvent *event) { - ARegion *ar= CTX_wm_region(C); + ARegion *ar = CTX_wm_region(C); float location[2]; UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &location[0], &location[1]); @@ -703,8 +703,8 @@ void IMAGE_OT_view_zoom_in(wmOperatorType *ot) static int image_view_zoom_out_exec(bContext *C, wmOperator *op) { - SpaceImage *sima= CTX_wm_space_image(C); - ARegion *ar= CTX_wm_region(C); + SpaceImage *sima = CTX_wm_space_image(C); + ARegion *ar = CTX_wm_region(C); float location[2]; RNA_float_get_array(op->ptr, "location", location); @@ -718,7 +718,7 @@ static int image_view_zoom_out_exec(bContext *C, wmOperator *op) static int image_view_zoom_out_invoke(bContext *C, wmOperator *op, wmEvent *event) { - ARegion *ar= CTX_wm_region(C); + ARegion *ar = CTX_wm_region(C); float location[2]; UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &location[0], &location[1]); @@ -746,14 +746,14 @@ void IMAGE_OT_view_zoom_out(wmOperatorType *ot) static int image_view_zoom_ratio_exec(bContext *C, wmOperator *op) { - SpaceImage *sima= CTX_wm_space_image(C); - ARegion *ar= CTX_wm_region(C); + SpaceImage *sima = CTX_wm_space_image(C); + ARegion *ar = CTX_wm_region(C); sima_zoom_set(sima, ar, RNA_float_get(op->ptr, "ratio"), NULL); /* ensure pixel exact locations for draw */ - sima->xof= (int)sima->xof; - sima->yof= (int)sima->yof; + sima->xof = (int)sima->xof; + sima->yof = (int)sima->yof; /* XXX notifier? */ #if 0 @@ -781,7 +781,7 @@ void IMAGE_OT_view_zoom_ratio(wmOperatorType *ot) /* properties */ RNA_def_float(ot->srna, "ratio", 0.0f, 0.0f, FLT_MAX, - "Ratio", "Zoom ratio, 1.0 is 1:1, higher is zoomed in, lower is zoomed out", -FLT_MAX, FLT_MAX); + "Ratio", "Zoom ratio, 1.0 is 1:1, higher is zoomed in, lower is zoomed out", -FLT_MAX, FLT_MAX); } /**************** load/replace/save callbacks ******************/ @@ -797,34 +797,34 @@ static void image_open_init(bContext *C, wmOperator *op) { PropertyPointerRNA *pprop; - op->customdata= pprop= MEM_callocN(sizeof(PropertyPointerRNA), "OpenPropertyPointerRNA"); + op->customdata = pprop = MEM_callocN(sizeof(PropertyPointerRNA), "OpenPropertyPointerRNA"); uiIDContextProperty(C, &pprop->ptr, &pprop->prop); } static int image_open_cancel(bContext *UNUSED(C), wmOperator *op) { MEM_freeN(op->customdata); - op->customdata= NULL; + op->customdata = NULL; return OPERATOR_CANCELLED; } static int image_open_exec(bContext *C, wmOperator *op) { - SpaceImage *sima= CTX_wm_space_image(C); /* XXX other space types can call */ - Scene *scene= CTX_data_scene(C); - Object *obedit= CTX_data_edit_object(C); - ImageUser *iuser= NULL; + SpaceImage *sima = CTX_wm_space_image(C); /* XXX other space types can call */ + Scene *scene = CTX_data_scene(C); + Object *obedit = CTX_data_edit_object(C); + ImageUser *iuser = NULL; PropertyPointerRNA *pprop; PointerRNA idptr; - Image *ima= NULL; + Image *ima = NULL; char str[FILE_MAX]; RNA_string_get(op->ptr, "filepath", str); /* default to frame 1 if there's no scene in context */ - errno= 0; + errno = 0; - ima= BKE_add_image_file(str); + ima = BKE_add_image_file(str); if (!ima) { if (op->customdata) MEM_freeN(op->customdata); @@ -836,7 +836,7 @@ static int image_open_exec(bContext *C, wmOperator *op) image_open_init(C, op); /* hook into UI */ - pprop= op->customdata; + pprop = op->customdata; if (pprop->prop) { /* when creating new ID blocks, use is already 1, but RNA @@ -849,27 +849,27 @@ static int image_open_exec(bContext *C, wmOperator *op) } else if (sima) { ED_space_image_set(sima, scene, obedit, ima); - iuser= &sima->iuser; + iuser = &sima->iuser; } else { - Tex *tex= CTX_data_pointer_get_type(C, "texture", &RNA_Texture).data; - if (tex && tex->type==TEX_IMAGE) - iuser= &tex->iuser; + Tex *tex = CTX_data_pointer_get_type(C, "texture", &RNA_Texture).data; + if (tex && tex->type == TEX_IMAGE) + iuser = &tex->iuser; } /* initialize because of new image */ if (iuser) { - iuser->sfra= 1; - iuser->offset= 0; - iuser->fie_ima= 2; + iuser->sfra = 1; + iuser->offset = 0; + iuser->fie_ima = 2; } /* XXX unpackImage frees image buffers */ ED_preview_kill_jobs(C); BKE_image_signal(ima, iuser, IMA_SIGNAL_RELOAD); - WM_event_add_notifier(C, NC_IMAGE|NA_EDITED, ima); + WM_event_add_notifier(C, NC_IMAGE | NA_EDITED, ima); MEM_freeN(op->customdata); @@ -878,22 +878,22 @@ static int image_open_exec(bContext *C, wmOperator *op) static int image_open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { - SpaceImage *sima= CTX_wm_space_image(C); /* XXX other space types can call */ - char *path=U.textudir; - Image *ima= NULL; + SpaceImage *sima = CTX_wm_space_image(C); /* XXX other space types can call */ + char *path = U.textudir; + Image *ima = NULL; if (sima) { - ima= sima->image; + ima = sima->image; } - if (ima==NULL) { - Tex *tex= CTX_data_pointer_get_type(C, "texture", &RNA_Texture).data; - if (tex && tex->type==TEX_IMAGE) - ima= tex->ima; + if (ima == NULL) { + Tex *tex = CTX_data_pointer_get_type(C, "texture", &RNA_Texture).data; + if (tex && tex->type == TEX_IMAGE) + ima = tex->ima; } if (ima) - path= ima->name; + path = ima->name; if (RNA_struct_property_is_set(op->ptr, "filepath")) return image_open_exec(C, op); @@ -919,17 +919,17 @@ void IMAGE_OT_open(wmOperatorType *ot) ot->cancel = image_open_cancel; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ - WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH|WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY); + WM_operator_properties_filesel(ot, FOLDERFILE | IMAGEFILE | MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY); } /******************** replace image operator ********************/ static int image_replace_exec(bContext *C, wmOperator *op) { - SpaceImage *sima= CTX_wm_space_image(C); + SpaceImage *sima = CTX_wm_space_image(C); char str[FILE_MAX]; if (!sima->image) @@ -941,22 +941,22 @@ static int image_replace_exec(bContext *C, wmOperator *op) BLI_strncpy(sima->image->name, str, sizeof(sima->image->name)); if (BLI_testextensie_array(str, imb_ext_movie)) - sima->image->source= IMA_SRC_MOVIE; + sima->image->source = IMA_SRC_MOVIE; else - sima->image->source= IMA_SRC_FILE; + sima->image->source = IMA_SRC_FILE; /* XXX unpackImage frees image buffers */ ED_preview_kill_jobs(C); BKE_image_signal(sima->image, &sima->iuser, IMA_SIGNAL_RELOAD); - WM_event_add_notifier(C, NC_IMAGE|NA_EDITED, sima->image); + WM_event_add_notifier(C, NC_IMAGE | NA_EDITED, sima->image); return OPERATOR_FINISHED; } static int image_replace_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { - SpaceImage *sima= CTX_wm_space_image(C); + SpaceImage *sima = CTX_wm_space_image(C); if (!sima->image) return OPERATOR_CANCELLED; @@ -965,7 +965,7 @@ static int image_replace_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve return image_replace_exec(C, op); if (!RNA_struct_property_is_set(op->ptr, "relative_path")) - RNA_boolean_set(op->ptr, "relative_path", (strncmp(sima->image->name, "//", 2))==0); + RNA_boolean_set(op->ptr, "relative_path", (strncmp(sima->image->name, "//", 2)) == 0); image_filesel(C, op, sima->image->name); @@ -984,10 +984,10 @@ void IMAGE_OT_replace(wmOperatorType *ot) ot->poll = space_image_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ - WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH|WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY); + WM_operator_properties_filesel(ot, FOLDERFILE | IMAGEFILE | MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY); } /******************** save image as operator ********************/ @@ -1002,16 +1002,16 @@ typedef struct { static void save_image_options_defaults(SaveImageOptions *simopts) { memset(&simopts->im_format, 0, sizeof(simopts->im_format)); - simopts->im_format.planes= R_IMF_PLANES_RGB; - simopts->im_format.imtype= R_IMF_IMTYPE_PNG; - simopts->im_format.quality= 90; - simopts->im_format.compress= 90; - simopts->filepath[0]= '\0'; + simopts->im_format.planes = R_IMF_PLANES_RGB; + simopts->im_format.imtype = R_IMF_IMTYPE_PNG; + simopts->im_format.quality = 90; + simopts->im_format.compress = 90; + simopts->filepath[0] = '\0'; } static char imtype_best_depth(ImBuf *ibuf, const char imtype) { - const char depth_ok= BKE_imtype_valid_depths(imtype); + const char depth_ok = BKE_imtype_valid_depths(imtype); if (ibuf->rect_float) { if (depth_ok & R_IMF_CHAN_DEPTH_32) return R_IMF_CHAN_DEPTH_32; @@ -1033,27 +1033,27 @@ static char imtype_best_depth(ImBuf *ibuf, const char imtype) static int save_image_options_init(SaveImageOptions *simopts, SpaceImage *sima, Scene *scene, const short guess_path) { void *lock; - ImBuf *ibuf= ED_space_image_acquire_buffer(sima, &lock); + ImBuf *ibuf = ED_space_image_acquire_buffer(sima, &lock); if (ibuf) { - Image *ima= sima->image; - short is_depth_set= FALSE; + Image *ima = sima->image; + short is_depth_set = FALSE; - simopts->im_format.planes= ibuf->planes; + simopts->im_format.planes = ibuf->planes; if (ELEM(ima->type, IMA_TYPE_R_RESULT, IMA_TYPE_COMPOSITE)) { /* imtype */ - simopts->im_format= scene->r.im_format; - is_depth_set= TRUE; + simopts->im_format = scene->r.im_format; + is_depth_set = TRUE; } else if (ima->source == IMA_SRC_GENERATED) { - simopts->im_format.imtype= R_IMF_IMTYPE_PNG; + simopts->im_format.imtype = R_IMF_IMTYPE_PNG; } else { - simopts->im_format.imtype= BKE_ftype_to_imtype(ibuf->ftype); + simopts->im_format.imtype = BKE_ftype_to_imtype(ibuf->ftype); } //simopts->subimtype= scene->r.subimtype; /* XXX - this is lame, we need to make these available too! */ - simopts->im_format.quality= ibuf->ftype & 0xff; + simopts->im_format.quality = ibuf->ftype & 0xff; BLI_strncpy(simopts->filepath, ibuf->name, sizeof(simopts->filepath)); @@ -1061,21 +1061,21 @@ static int save_image_options_init(SaveImageOptions *simopts, SpaceImage *sima, /* unlikely but just in case */ if (ELEM3(simopts->im_format.planes, R_IMF_PLANES_BW, R_IMF_PLANES_RGB, R_IMF_PLANES_RGBA) == 0) { - simopts->im_format.planes= R_IMF_PLANES_RGBA; + simopts->im_format.planes = R_IMF_PLANES_RGBA; } /* depth, account for float buffer and format support */ if (is_depth_set == FALSE) { - simopts->im_format.depth= imtype_best_depth(ibuf, simopts->im_format.imtype); + simopts->im_format.depth = imtype_best_depth(ibuf, simopts->im_format.imtype); } /* some formats don't use quality so fallback to scenes quality */ if (simopts->im_format.quality == 0) { - simopts->im_format.quality= scene->r.im_format.quality; + simopts->im_format.quality = scene->r.im_format.quality; } /* check for empty path */ - if (guess_path && simopts->filepath[0]==0) { + if (guess_path && simopts->filepath[0] == 0) { if ( (G.ima[0] == '/') && (G.ima[1] == '/') && (G.ima[2] == '\0') ) { BLI_strncpy(simopts->filepath, "//untitled", FILE_MAX); } @@ -1094,7 +1094,7 @@ static int save_image_options_init(SaveImageOptions *simopts, SpaceImage *sima, static void save_image_options_from_op(SaveImageOptions *simopts, wmOperator *op) { if (op->customdata) { - simopts->im_format= *(ImageFormatData *)op->customdata; + simopts->im_format = *(ImageFormatData *)op->customdata; } if (RNA_struct_property_is_set(op->ptr, "filepath")) { @@ -1106,7 +1106,7 @@ static void save_image_options_from_op(SaveImageOptions *simopts, wmOperator *op static void save_image_options_to_op(SaveImageOptions *simopts, wmOperator *op) { if (op->customdata) { - *(ImageFormatData *)op->customdata= simopts->im_format; + *(ImageFormatData *)op->customdata = simopts->im_format; } RNA_string_set(op->ptr, "filepath", simopts->filepath); @@ -1116,15 +1116,15 @@ static void save_image_options_to_op(SaveImageOptions *simopts, wmOperator *op) /* ima->name and ibuf->name should end up the same */ static void save_image_doit(bContext *C, SpaceImage *sima, wmOperator *op, SaveImageOptions *simopts, int do_newpath) { - Image *ima= ED_space_image(sima); + Image *ima = ED_space_image(sima); void *lock; - ImBuf *ibuf= ED_space_image_acquire_buffer(sima, &lock); + ImBuf *ibuf = ED_space_image_acquire_buffer(sima, &lock); if (ibuf) { - const char *relbase= ID_BLEND_PATH(CTX_data_main(C), &ima->id); - const short relative= (RNA_struct_find_property(op->ptr, "relative_path") && RNA_boolean_get(op->ptr, "relative_path")); - const short save_copy= (RNA_struct_find_property(op->ptr, "copy") && RNA_boolean_get(op->ptr, "copy")); - short ok= FALSE; + const char *relbase = ID_BLEND_PATH(CTX_data_main(C), &ima->id); + const short relative = (RNA_struct_find_property(op->ptr, "relative_path") && RNA_boolean_get(op->ptr, "relative_path")); + const short save_copy = (RNA_struct_find_property(op->ptr, "copy") && RNA_boolean_get(op->ptr, "copy")); + short ok = FALSE; /* old global to ensure a 2nd save goes to same dir */ BLI_strncpy(G.ima, simopts->filepath, sizeof(G.ima)); @@ -1133,27 +1133,27 @@ static void save_image_doit(bContext *C, SpaceImage *sima, wmOperator *op, SaveI if (ima->type == IMA_TYPE_R_RESULT) { /* enforce user setting for RGB or RGBA, but skip BW */ - if (simopts->im_format.planes==R_IMF_PLANES_RGBA) { - ibuf->planes= R_IMF_PLANES_RGBA; + if (simopts->im_format.planes == R_IMF_PLANES_RGBA) { + ibuf->planes = R_IMF_PLANES_RGBA; } - else if (simopts->im_format.planes==R_IMF_PLANES_RGB) { - ibuf->planes= R_IMF_PLANES_RGB; + else if (simopts->im_format.planes == R_IMF_PLANES_RGB) { + ibuf->planes = R_IMF_PLANES_RGB; } } else { /* TODO, better solution, if a 24bit image is painted onto it may contain alpha */ if (ibuf->userflags & IB_BITMAPDIRTY) { /* it has been painted onto */ /* checks each pixel, not ideal */ - ibuf->planes= BKE_alphatest_ibuf(ibuf) ? 32 : 24; + ibuf->planes = BKE_alphatest_ibuf(ibuf) ? 32 : 24; } } - if (simopts->im_format.imtype==R_IMF_IMTYPE_MULTILAYER) { - Scene *scene= CTX_data_scene(C); - RenderResult *rr= BKE_image_acquire_renderresult(scene, ima); + if (simopts->im_format.imtype == R_IMF_IMTYPE_MULTILAYER) { + Scene *scene = CTX_data_scene(C); + RenderResult *rr = BKE_image_acquire_renderresult(scene, ima); if (rr) { RE_WriteRenderResult(op->reports, rr, simopts->filepath, simopts->im_format.quality); - ok= TRUE; + ok = TRUE; } else { BKE_report(op->reports, RPT_ERROR, "Did not write, no Multilayer Image"); @@ -1162,11 +1162,11 @@ static void save_image_doit(bContext *C, SpaceImage *sima, wmOperator *op, SaveI } else { if (BKE_write_ibuf_as(ibuf, simopts->filepath, &simopts->im_format, save_copy)) { - ok= TRUE; + ok = TRUE; } } - if (ok) { + if (ok) { if (!save_copy) { if (do_newpath) { BLI_strncpy(ibuf->name, simopts->filepath, sizeof(ibuf->name)); @@ -1176,8 +1176,8 @@ static void save_image_doit(bContext *C, SpaceImage *sima, wmOperator *op, SaveI ibuf->userflags &= ~IB_BITMAPDIRTY; /* change type? */ - if (ima->type==IMA_TYPE_R_RESULT) { - ima->type= IMA_TYPE_IMAGE; + if (ima->type == IMA_TYPE_R_RESULT) { + ima->type = IMA_TYPE_IMAGE; /* workaround to ensure the render result buffer is no longer used * by this image, otherwise can crash when a new render result is @@ -1191,9 +1191,9 @@ static void save_image_doit(bContext *C, SpaceImage *sima, wmOperator *op, SaveI if (ibuf->zbuf_float && !(ibuf->mall & IB_zbuffloat)) IMB_freezbuffloatImBuf(ibuf); } - if ( ELEM(ima->source, IMA_SRC_GENERATED, IMA_SRC_VIEWER)) { - ima->source= IMA_SRC_FILE; - ima->type= IMA_TYPE_IMAGE; + if (ELEM(ima->source, IMA_SRC_GENERATED, IMA_SRC_VIEWER)) { + ima->source = IMA_SRC_FILE; + ima->type = IMA_TYPE_IMAGE; } /* only image path, never ibuf */ @@ -1207,7 +1207,7 @@ static void save_image_doit(bContext *C, SpaceImage *sima, wmOperator *op, SaveI } - WM_event_add_notifier(C, NC_IMAGE|NA_EDITED, sima->image); + WM_event_add_notifier(C, NC_IMAGE | NA_EDITED, sima->image); WM_cursor_wait(0); } @@ -1219,13 +1219,13 @@ static void image_save_as_free(wmOperator *op) { if (op->customdata) { MEM_freeN(op->customdata); - op->customdata= NULL; + op->customdata = NULL; } } static int image_save_as_exec(bContext *C, wmOperator *op) { - SpaceImage *sima= CTX_wm_space_image(C); + SpaceImage *sima = CTX_wm_space_image(C); SaveImageOptions simopts; save_image_options_defaults(&simopts); @@ -1245,7 +1245,7 @@ static int image_save_as_exec(bContext *C, wmOperator *op) static int image_save_as_check(bContext *UNUSED(C), wmOperator *op) { - ImageFormatData *imf= op->customdata; + ImageFormatData *imf = op->customdata; char filepath[FILE_MAX]; RNA_string_get(op->ptr, "filepath", filepath); if (BKE_add_image_extension(filepath, imf->imtype)) { @@ -1257,9 +1257,9 @@ static int image_save_as_check(bContext *UNUSED(C), wmOperator *op) static int image_save_as_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { - SpaceImage *sima= CTX_wm_space_image(C); + SpaceImage *sima = CTX_wm_space_image(C); Image *ima = ED_space_image(sima); - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); SaveImageOptions simopts; if (RNA_struct_property_is_set(op->ptr, "filepath")) @@ -1274,7 +1274,7 @@ static int image_save_as_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve RNA_boolean_set(op->ptr, "copy", TRUE); } - op->customdata= MEM_mallocN(sizeof(simopts.im_format), __func__); + op->customdata = MEM_mallocN(sizeof(simopts.im_format), __func__); memcpy(op->customdata, &simopts.im_format, sizeof(simopts.im_format)); image_filesel(C, op, simopts.filepath); @@ -1291,7 +1291,7 @@ static int image_save_as_cancel(bContext *UNUSED(C), wmOperator *op) static int image_save_as_draw_check_prop(PointerRNA *ptr, PropertyRNA *prop) { - const char *prop_id= RNA_property_identifier(prop); + const char *prop_id = RNA_property_identifier(prop); return !(strcmp(prop_id, "filepath") == 0 || strcmp(prop_id, "directory") == 0 || @@ -1303,8 +1303,8 @@ static int image_save_as_draw_check_prop(PointerRNA *ptr, PropertyRNA *prop) static void image_save_as_draw(bContext *UNUSED(C), wmOperator *op) { - uiLayout *layout= op->layout; - ImageFormatData *imf= op->customdata; + uiLayout *layout = op->layout; + ImageFormatData *imf = op->customdata; PointerRNA ptr; /* image template */ @@ -1333,20 +1333,20 @@ void IMAGE_OT_save_as(wmOperatorType *ot) ot->poll = space_image_buffer_exists_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ RNA_def_boolean(ot->srna, "copy", 0, "Copy", "Create a new image file without modifying the current image in blender"); - WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE, FILE_SPECIAL, FILE_SAVE, WM_FILESEL_FILEPATH|WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY); + WM_operator_properties_filesel(ot, FOLDERFILE | IMAGEFILE | MOVIEFILE, FILE_SPECIAL, FILE_SAVE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY); } /******************** save image operator ********************/ static int image_save_exec(bContext *C, wmOperator *op) { - SpaceImage *sima= CTX_wm_space_image(C); - Scene *scene= CTX_data_scene(C); + SpaceImage *sima = CTX_wm_space_image(C); + Scene *scene = CTX_data_scene(C); SaveImageOptions simopts; if (save_image_options_init(&simopts, sima, scene, FALSE) == 0) @@ -1375,44 +1375,44 @@ void IMAGE_OT_save(wmOperatorType *ot) ot->poll = space_image_file_exists_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /******************* save sequence operator ********************/ static int image_save_sequence_exec(bContext *C, wmOperator *op) { - Main *bmain= CTX_data_main(C); - SpaceImage *sima= CTX_wm_space_image(C); + Main *bmain = CTX_data_main(C); + SpaceImage *sima = CTX_wm_space_image(C); ImBuf *ibuf; - int tot= 0; + int tot = 0; char di[FILE_MAX], fi[FILE_MAX]; - if (sima->image==NULL) + if (sima->image == NULL) return OPERATOR_CANCELLED; - if (sima->image->source!=IMA_SRC_SEQUENCE) { + if (sima->image->source != IMA_SRC_SEQUENCE) { BKE_report(op->reports, RPT_ERROR, "Can only save sequence on image sequences"); return OPERATOR_CANCELLED; } - if (sima->image->type==IMA_TYPE_MULTILAYER) { + if (sima->image->type == IMA_TYPE_MULTILAYER) { BKE_report(op->reports, RPT_ERROR, "Can't save multilayer sequences"); return OPERATOR_CANCELLED; } /* get total */ - for (ibuf= sima->image->ibufs.first; ibuf; ibuf= ibuf->next) + for (ibuf = sima->image->ibufs.first; ibuf; ibuf = ibuf->next) if (ibuf->userflags & IB_BITMAPDIRTY) tot++; - if (tot==0) { + if (tot == 0) { BKE_report(op->reports, RPT_WARNING, "No images have been changed"); return OPERATOR_CANCELLED; } /* get a filename for menu */ - for (ibuf= sima->image->ibufs.first; ibuf; ibuf= ibuf->next) + for (ibuf = sima->image->ibufs.first; ibuf; ibuf = ibuf->next) if (ibuf->userflags & IB_BITMAPDIRTY) break; @@ -1421,7 +1421,7 @@ static int image_save_sequence_exec(bContext *C, wmOperator *op) BKE_reportf(op->reports, RPT_INFO, "%d Image(s) will be saved in %s", tot, di); - for (ibuf= sima->image->ibufs.first; ibuf; ibuf= ibuf->next) { + for (ibuf = sima->image->ibufs.first; ibuf; ibuf = ibuf->next) { if (ibuf->userflags & IB_BITMAPDIRTY) { char name[FILE_MAX]; BLI_strncpy(name, ibuf->name, sizeof(name)); @@ -1452,15 +1452,15 @@ void IMAGE_OT_save_sequence(wmOperatorType *ot) ot->poll = space_image_buffer_exists_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /******************** reload image operator ********************/ static int image_reload_exec(bContext *C, wmOperator *UNUSED(op)) { - Image *ima= CTX_data_edit_image(C); - SpaceImage *sima= CTX_wm_space_image(C); + Image *ima = CTX_data_edit_image(C); + SpaceImage *sima = CTX_wm_space_image(C); if (!ima) return OPERATOR_CANCELLED; @@ -1469,9 +1469,9 @@ static int image_reload_exec(bContext *C, wmOperator *UNUSED(op)) ED_preview_kill_jobs(C); // XXX other users? - BKE_image_signal(ima, (sima)? &sima->iuser: NULL, IMA_SIGNAL_RELOAD); + BKE_image_signal(ima, (sima) ? &sima->iuser : NULL, IMA_SIGNAL_RELOAD); - WM_event_add_notifier(C, NC_IMAGE|NA_EDITED, ima); + WM_event_add_notifier(C, NC_IMAGE | NA_EDITED, ima); return OPERATOR_FINISHED; } @@ -1499,28 +1499,28 @@ static int image_new_exec(bContext *C, wmOperator *op) Image *ima; PointerRNA ptr, idptr; PropertyRNA *prop; - char name[MAX_ID_NAME-2]; + char name[MAX_ID_NAME - 2]; float color[4]; int width, height, floatbuf, uvtestgrid, alpha; /* retrieve state */ - sima= CTX_wm_space_image(C); - scene= CTX_data_scene(C); - obedit= CTX_data_edit_object(C); + sima = CTX_wm_space_image(C); + scene = CTX_data_scene(C); + obedit = CTX_data_edit_object(C); RNA_string_get(op->ptr, "name", name); - width= RNA_int_get(op->ptr, "width"); - height= RNA_int_get(op->ptr, "height"); - floatbuf= RNA_boolean_get(op->ptr, "float"); - uvtestgrid= RNA_boolean_get(op->ptr, "uv_test_grid"); + width = RNA_int_get(op->ptr, "width"); + height = RNA_int_get(op->ptr, "height"); + floatbuf = RNA_boolean_get(op->ptr, "float"); + uvtestgrid = RNA_boolean_get(op->ptr, "uv_test_grid"); RNA_float_get_array(op->ptr, "color", color); - alpha= RNA_boolean_get(op->ptr, "alpha"); + alpha = RNA_boolean_get(op->ptr, "alpha"); if (!floatbuf && scene->r.color_mgt_flag & R_COLOR_MANAGEMENT) linearrgb_to_srgb_v3_v3(color, color); if (!alpha) - color[3]= 1.0f; + color[3] = 1.0f; ima = BKE_add_image_size(width, height, name, alpha ? 32 : 24, floatbuf, uvtestgrid, color); @@ -1543,7 +1543,7 @@ static int image_new_exec(bContext *C, wmOperator *op) ED_space_image_set(sima, scene, obedit, ima); // XXX other users? - BKE_image_signal(ima, (sima)? &sima->iuser: NULL, IMA_SIGNAL_USER_NEW_IMAGE); + BKE_image_signal(ima, (sima) ? &sima->iuser : NULL, IMA_SIGNAL_USER_NEW_IMAGE); return OPERATOR_FINISHED; } @@ -1558,7 +1558,7 @@ static int image_new_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) void IMAGE_OT_new(wmOperatorType *ot) { PropertyRNA *prop; - static float default_color[4]= {0.0f, 0.0f, 0.0f, 1.0f}; + static float default_color[4] = {0.0f, 0.0f, 0.0f, 1.0f}; /* identifiers */ ot->name = "New Image"; @@ -1573,10 +1573,10 @@ void IMAGE_OT_new(wmOperatorType *ot) ot->flag = OPTYPE_UNDO; /* properties */ - RNA_def_string(ot->srna, "name", "untitled", MAX_ID_NAME-2, "Name", "Image datablock name"); + RNA_def_string(ot->srna, "name", "untitled", MAX_ID_NAME - 2, "Name", "Image datablock name"); RNA_def_int(ot->srna, "width", 1024, 1, INT_MAX, "Width", "Image width", 1, 16384); RNA_def_int(ot->srna, "height", 1024, 1, INT_MAX, "Height", "Image height", 1, 16384); - prop= RNA_def_float_color(ot->srna, "color", 4, NULL, 0.0f, FLT_MAX, "Color", "Default fill color", 0.0f, 1.0f); + prop = RNA_def_float_color(ot->srna, "color", 4, NULL, 0.0f, FLT_MAX, "Color", "Default fill color", 0.0f, 1.0f); RNA_def_property_float_array_default(prop, default_color); RNA_def_boolean(ot->srna, "alpha", 1, "Alpha", "Create an image with an alpha channel"); RNA_def_boolean(ot->srna, "uv_test_grid", 0, "UV Test Grid", "Fill the image with a grid for UV map testing"); @@ -1587,39 +1587,39 @@ void IMAGE_OT_new(wmOperatorType *ot) static int image_invert_poll(bContext *C) { - Image *ima= CTX_data_edit_image(C); - ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL); + Image *ima = CTX_data_edit_image(C); + ImBuf *ibuf = BKE_image_get_ibuf(ima, NULL); - if ( ibuf != NULL ) + if (ibuf != NULL) return 1; return 0; } static int image_invert_exec(bContext *C, wmOperator *op) { - Image *ima= CTX_data_edit_image(C); - ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL); + Image *ima = CTX_data_edit_image(C); + ImBuf *ibuf = BKE_image_get_ibuf(ima, NULL); // flags indicate if this channel should be inverted - const short r= RNA_boolean_get(op->ptr, "invert_r"); - const short g= RNA_boolean_get(op->ptr, "invert_g"); - const short b= RNA_boolean_get(op->ptr, "invert_b"); - const short a= RNA_boolean_get(op->ptr, "invert_a"); + const short r = RNA_boolean_get(op->ptr, "invert_r"); + const short g = RNA_boolean_get(op->ptr, "invert_g"); + const short b = RNA_boolean_get(op->ptr, "invert_b"); + const short a = RNA_boolean_get(op->ptr, "invert_a"); int i; - if ( ibuf == NULL) // TODO: this should actually never happen, but does for render-results -> cleanup + if (ibuf == NULL) // TODO: this should actually never happen, but does for render-results -> cleanup return OPERATOR_CANCELLED; /* TODO: make this into an IMB_invert_channels(ibuf,r,g,b,a) method!? */ if (ibuf->rect_float) { float *fp = (float *) ibuf->rect_float; - for ( i = ibuf->x * ibuf->y; i > 0; i--, fp+=4 ) { - if ( r ) fp[0] = 1.0f - fp[0]; - if ( g ) fp[1] = 1.0f - fp[1]; - if ( b ) fp[2] = 1.0f - fp[2]; - if ( a ) fp[3] = 1.0f - fp[3]; + for (i = ibuf->x * ibuf->y; i > 0; i--, fp += 4) { + if (r) fp[0] = 1.0f - fp[0]; + if (g) fp[1] = 1.0f - fp[1]; + if (b) fp[2] = 1.0f - fp[2]; + if (a) fp[3] = 1.0f - fp[3]; } if (ibuf->rect) { @@ -1629,11 +1629,11 @@ static int image_invert_exec(bContext *C, wmOperator *op) else if (ibuf->rect) { char *cp = (char *) ibuf->rect; - for ( i = ibuf->x * ibuf->y; i > 0; i--, cp+=4 ) { - if ( r ) cp[0] = 255 - cp[0]; - if ( g ) cp[1] = 255 - cp[1]; - if ( b ) cp[2] = 255 - cp[2]; - if ( a ) cp[3] = 255 - cp[3]; + for (i = ibuf->x * ibuf->y; i > 0; i--, cp += 4) { + if (r) cp[0] = 255 - cp[0]; + if (g) cp[1] = 255 - cp[1]; + if (b) cp[2] = 255 - cp[2]; + if (a) cp[3] = 255 - cp[3]; } } else { @@ -1644,7 +1644,7 @@ static int image_invert_exec(bContext *C, wmOperator *op) if (ibuf->mipmap[0]) ibuf->userflags |= IB_MIPMAP_INVALID; - WM_event_add_notifier(C, NC_IMAGE|NA_EDITED, ima); + WM_event_add_notifier(C, NC_IMAGE | NA_EDITED, ima); return OPERATOR_FINISHED; } @@ -1665,22 +1665,22 @@ void IMAGE_OT_invert(wmOperatorType *ot) RNA_def_boolean(ot->srna, "invert_a", 0, "Alpha", "Invert Alpha Channel"); /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /********************* pack operator *********************/ static int image_pack_test(bContext *C, wmOperator *op) { - Image *ima= CTX_data_edit_image(C); - int as_png= RNA_boolean_get(op->ptr, "as_png"); + Image *ima = CTX_data_edit_image(C); + int as_png = RNA_boolean_get(op->ptr, "as_png"); if (!ima) return 0; if (!as_png && ima->packedfile) return 0; - if (ima->source==IMA_SRC_SEQUENCE || ima->source==IMA_SRC_MOVIE) { + if (ima->source == IMA_SRC_SEQUENCE || ima->source == IMA_SRC_MOVIE) { BKE_report(op->reports, RPT_ERROR, "Packing movies or image sequences not supported"); return 0; } @@ -1690,10 +1690,10 @@ static int image_pack_test(bContext *C, wmOperator *op) static int image_pack_exec(bContext *C, wmOperator *op) { - struct Main *bmain= CTX_data_main(C); - Image *ima= CTX_data_edit_image(C); - ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL); - int as_png= RNA_boolean_get(op->ptr, "as_png"); + struct Main *bmain = CTX_data_main(C); + Image *ima = CTX_data_edit_image(C); + ImBuf *ibuf = BKE_image_get_ibuf(ima, NULL); + int as_png = RNA_boolean_get(op->ptr, "as_png"); if (!image_pack_test(C, op)) return OPERATOR_CANCELLED; @@ -1706,27 +1706,27 @@ static int image_pack_exec(bContext *C, wmOperator *op) if (as_png) BKE_image_memorypack(ima); else - ima->packedfile= newPackedFile(op->reports, ima->name, ID_BLEND_PATH(bmain, &ima->id)); + ima->packedfile = newPackedFile(op->reports, ima->name, ID_BLEND_PATH(bmain, &ima->id)); - WM_event_add_notifier(C, NC_IMAGE|NA_EDITED, ima); + WM_event_add_notifier(C, NC_IMAGE | NA_EDITED, ima); return OPERATOR_FINISHED; } static int image_pack_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { - Image *ima= CTX_data_edit_image(C); - ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL); + Image *ima = CTX_data_edit_image(C); + ImBuf *ibuf = BKE_image_get_ibuf(ima, NULL); uiPopupMenu *pup; uiLayout *layout; - int as_png= RNA_boolean_get(op->ptr, "as_png"); + int as_png = RNA_boolean_get(op->ptr, "as_png"); if (!image_pack_test(C, op)) return OPERATOR_CANCELLED; if (!as_png && (ibuf && (ibuf->userflags & IB_BITMAPDIRTY))) { - pup= uiPupMenuBegin(C, "OK", ICON_QUESTION); - layout= uiPupMenuLayout(pup); + pup = uiPupMenuBegin(C, "OK", ICON_QUESTION); + layout = uiPupMenuLayout(pup); uiItemBooleanO(layout, "Can't pack edited image from disk. Pack as internal PNG?", ICON_NONE, op->idname, "as_png", 1); uiPupMenuEnd(C, pup); @@ -1748,7 +1748,7 @@ void IMAGE_OT_pack(wmOperatorType *ot) ot->invoke = image_pack_invoke; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ RNA_def_boolean(ot->srna, "as_png", 0, "Pack As PNG", "Pack image as lossless PNG"); @@ -1758,12 +1758,12 @@ void IMAGE_OT_pack(wmOperatorType *ot) static int image_unpack_exec(bContext *C, wmOperator *op) { - Image *ima= CTX_data_edit_image(C); - int method= RNA_enum_get(op->ptr, "method"); + Image *ima = CTX_data_edit_image(C); + int method = RNA_enum_get(op->ptr, "method"); /* find the suppplied image by name */ if (RNA_struct_property_is_set(op->ptr, "id")) { - char imaname[MAX_ID_NAME-2]; + char imaname[MAX_ID_NAME - 2]; RNA_string_get(op->ptr, "id", imaname); ima = BLI_findstring(&CTX_data_main(C)->image, imaname, offsetof(ID, name) + 2); if (!ima) ima = CTX_data_edit_image(C); @@ -1772,7 +1772,7 @@ static int image_unpack_exec(bContext *C, wmOperator *op) if (!ima || !ima->packedfile) return OPERATOR_CANCELLED; - if (ima->source==IMA_SRC_SEQUENCE || ima->source==IMA_SRC_MOVIE) { + if (ima->source == IMA_SRC_SEQUENCE || ima->source == IMA_SRC_MOVIE) { BKE_report(op->reports, RPT_ERROR, "Unpacking movies or image sequences not supported"); return OPERATOR_CANCELLED; } @@ -1785,14 +1785,14 @@ static int image_unpack_exec(bContext *C, wmOperator *op) unpackImage(op->reports, ima, method); - WM_event_add_notifier(C, NC_IMAGE|NA_EDITED, ima); + WM_event_add_notifier(C, NC_IMAGE | NA_EDITED, ima); return OPERATOR_FINISHED; } static int image_unpack_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { - Image *ima= CTX_data_edit_image(C); + Image *ima = CTX_data_edit_image(C); if (RNA_struct_property_is_set(op->ptr, "id")) return image_unpack_exec(C, op); @@ -1800,7 +1800,7 @@ static int image_unpack_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even if (!ima || !ima->packedfile) return OPERATOR_CANCELLED; - if (ima->source==IMA_SRC_SEQUENCE || ima->source==IMA_SRC_MOVIE) { + if (ima->source == IMA_SRC_SEQUENCE || ima->source == IMA_SRC_MOVIE) { BKE_report(op->reports, RPT_ERROR, "Unpacking movies or image sequences not supported"); return OPERATOR_CANCELLED; } @@ -1808,7 +1808,7 @@ static int image_unpack_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even if (G.fileflags & G_AUTOPACK) BKE_report(op->reports, RPT_WARNING, "AutoPack is enabled, so image will be packed again on file save"); - unpack_menu(C, "IMAGE_OT_unpack", ima->id.name+2, ima->name, "textures", ima->packedfile); + unpack_menu(C, "IMAGE_OT_unpack", ima->id.name + 2, ima->name, "textures", ima->packedfile); return OPERATOR_FINISHED; } @@ -1825,11 +1825,11 @@ void IMAGE_OT_unpack(wmOperatorType *ot) ot->invoke = image_unpack_invoke; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ RNA_def_enum(ot->srna, "method", unpack_method_items, PF_USE_LOCAL, "Method", "How to unpack"); - RNA_def_string(ot->srna, "id", "", MAX_ID_NAME-2, "Image Name", "Image datablock name to unpack"); /* XXX, weark!, will fail with library, name collisions */ + RNA_def_string(ot->srna, "id", "", MAX_ID_NAME - 2, "Image Name", "Image datablock name to unpack"); /* XXX, weark!, will fail with library, name collisions */ } /******************** sample image operator ********************/ @@ -1855,7 +1855,7 @@ typedef struct ImageSampleInfo { static void image_sample_draw(const bContext *UNUSED(C), ARegion *ar, void *arg_info) { - ImageSampleInfo *info= arg_info; + ImageSampleInfo *info = arg_info; if (info->draw) { /* no color management needed for images (color_manage=0) */ ED_image_draw_info(ar, 0, info->channels, info->x, info->y, info->colp, info->colfp, info->zp, info->zfp); @@ -1864,11 +1864,11 @@ static void image_sample_draw(const bContext *UNUSED(C), ARegion *ar, void *arg_ static void image_sample_apply(bContext *C, wmOperator *op, wmEvent *event) { - SpaceImage *sima= CTX_wm_space_image(C); - ARegion *ar= CTX_wm_region(C); + SpaceImage *sima = CTX_wm_space_image(C); + ARegion *ar = CTX_wm_region(C); void *lock; - ImBuf *ibuf= ED_space_image_acquire_buffer(sima, &lock); - ImageSampleInfo *info= op->customdata; + ImBuf *ibuf = ED_space_image_acquire_buffer(sima, &lock); + ImageSampleInfo *info = op->customdata; float fx, fy; if (ibuf == NULL) { @@ -1878,62 +1878,62 @@ static void image_sample_apply(bContext *C, wmOperator *op, wmEvent *event) UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &fx, &fy); - if (fx>=0.0f && fy>=0.0f && fx<1.0f && fy<1.0f) { + if (fx >= 0.0f && fy >= 0.0f && fx < 1.0f && fy < 1.0f) { float *fp; unsigned char *cp; - int x= (int)(fx*ibuf->x), y= (int)(fy*ibuf->y); + int x = (int)(fx * ibuf->x), y = (int)(fy * ibuf->y); - CLAMP(x, 0, ibuf->x-1); - CLAMP(y, 0, ibuf->y-1); + CLAMP(x, 0, ibuf->x - 1); + CLAMP(y, 0, ibuf->y - 1); - info->x= x; - info->y= y; - info->draw= 1; - info->channels= ibuf->channels; + info->x = x; + info->y = y; + info->draw = 1; + info->channels = ibuf->channels; - info->colp= NULL; - info->colfp= NULL; - info->zp= NULL; - info->zfp= NULL; + info->colp = NULL; + info->colfp = NULL; + info->zp = NULL; + info->zfp = NULL; if (ibuf->rect) { - cp= (unsigned char *)(ibuf->rect + y*ibuf->x + x); - - info->col[0]= cp[0]; - info->col[1]= cp[1]; - info->col[2]= cp[2]; - info->col[3]= cp[3]; - info->colp= info->col; - - info->colf[0]= (float)cp[0]/255.0f; - info->colf[1]= (float)cp[1]/255.0f; - info->colf[2]= (float)cp[2]/255.0f; - info->colf[3]= (float)cp[3]/255.0f; - info->colfp= info->colf; + cp = (unsigned char *)(ibuf->rect + y * ibuf->x + x); + + info->col[0] = cp[0]; + info->col[1] = cp[1]; + info->col[2] = cp[2]; + info->col[3] = cp[3]; + info->colp = info->col; + + info->colf[0] = (float)cp[0] / 255.0f; + info->colf[1] = (float)cp[1] / 255.0f; + info->colf[2] = (float)cp[2] / 255.0f; + info->colf[3] = (float)cp[3] / 255.0f; + info->colfp = info->colf; } if (ibuf->rect_float) { - fp= (ibuf->rect_float + (ibuf->channels)*(y*ibuf->x + x)); + fp = (ibuf->rect_float + (ibuf->channels) * (y * ibuf->x + x)); - info->colf[0]= fp[0]; - info->colf[1]= fp[1]; - info->colf[2]= fp[2]; - info->colf[3]= fp[3]; - info->colfp= info->colf; + info->colf[0] = fp[0]; + info->colf[1] = fp[1]; + info->colf[2] = fp[2]; + info->colf[3] = fp[3]; + info->colfp = info->colf; } if (ibuf->zbuf) { - info->z= ibuf->zbuf[y*ibuf->x + x]; - info->zp= &info->z; + info->z = ibuf->zbuf[y * ibuf->x + x]; + info->zp = &info->z; } if (ibuf->zbuf_float) { - info->zf= ibuf->zbuf_float[y*ibuf->x + x]; - info->zfp= &info->zf; + info->zf = ibuf->zbuf_float[y * ibuf->x + x]; + info->zfp = &info->zf; } - if (sima->cumap && ibuf->channels==4) { + if (sima->cumap && ibuf->channels == 4) { /* we reuse this callback for set curves point operators */ if (RNA_struct_find_property(op->ptr, "point")) { - int point= RNA_enum_get(op->ptr, "point"); + int point = RNA_enum_get(op->ptr, "point"); if (point == 1) { curvemapping_set_black_white(sima->cumap, NULL, info->colfp); @@ -1951,22 +1951,22 @@ static void image_sample_apply(bContext *C, wmOperator *op, wmEvent *event) // XXX node curve integration .. #if 0 { - ScrArea *sa, *cur= curarea; + ScrArea *sa, *cur = curarea; - node_curvemap_sample(fp); /* sends global to node editor */ - for (sa= G.curscreen->areabase.first; sa; sa= sa->next) { - if (sa->spacetype==SPACE_NODE) { + node_curvemap_sample(fp); /* sends global to node editor */ + for (sa = G.curscreen->areabase.first; sa; sa = sa->next) { + if (sa->spacetype == SPACE_NODE) { areawinset(sa->win); scrarea_do_windraw(sa); } } - node_curvemap_sample(NULL); /* clears global in node editor */ - curarea= cur; + node_curvemap_sample(NULL); /* clears global in node editor */ + curarea = cur; } #endif } else - info->draw= 0; + info->draw = 0; ED_space_image_release_buffer(sima, lock); ED_area_tag_redraw(CTX_wm_area(C)); @@ -1974,7 +1974,7 @@ static void image_sample_apply(bContext *C, wmOperator *op, wmEvent *event) static void image_sample_exit(bContext *C, wmOperator *op) { - ImageSampleInfo *info= op->customdata; + ImageSampleInfo *info = op->customdata; ED_region_draw_cb_exit(info->art, info->draw_handle); ED_area_tag_redraw(CTX_wm_area(C)); @@ -1983,17 +1983,17 @@ static void image_sample_exit(bContext *C, wmOperator *op) static int image_sample_invoke(bContext *C, wmOperator *op, wmEvent *event) { - SpaceImage *sima= CTX_wm_space_image(C); - ARegion *ar= CTX_wm_region(C); + SpaceImage *sima = CTX_wm_space_image(C); + ARegion *ar = CTX_wm_region(C); ImageSampleInfo *info; if (!ED_space_image_has_buffer(sima)) return OPERATOR_CANCELLED; - info= MEM_callocN(sizeof(ImageSampleInfo), "ImageSampleInfo"); - info->art= ar->type; + info = MEM_callocN(sizeof(ImageSampleInfo), "ImageSampleInfo"); + info->art = ar->type; info->draw_handle = ED_region_draw_cb_activate(ar->type, image_sample_draw, info, REGION_DRAW_POST_PIXEL); - op->customdata= info; + op->customdata = info; image_sample_apply(C, op, event); @@ -2004,7 +2004,7 @@ static int image_sample_invoke(bContext *C, wmOperator *op, wmEvent *event) static int image_sample_modal(bContext *C, wmOperator *op, wmEvent *event) { - switch(event->type) { + switch (event->type) { case LEFTMOUSE: case RIGHTMOUSE: // XXX hardcoded image_sample_exit(C, op); @@ -2042,18 +2042,18 @@ void IMAGE_OT_sample(wmOperatorType *ot) /******************** sample line operator ********************/ static int image_sample_line_exec(bContext *C, wmOperator *op) { - SpaceImage *sima= CTX_wm_space_image(C); - ARegion *ar= CTX_wm_region(C); - Scene *scene= CTX_data_scene(C); - - int x_start= RNA_int_get(op->ptr, "xstart"); - int y_start= RNA_int_get(op->ptr, "ystart"); - int x_end= RNA_int_get(op->ptr, "xend"); - int y_end= RNA_int_get(op->ptr, "yend"); + SpaceImage *sima = CTX_wm_space_image(C); + ARegion *ar = CTX_wm_region(C); + Scene *scene = CTX_data_scene(C); + + int x_start = RNA_int_get(op->ptr, "xstart"); + int y_start = RNA_int_get(op->ptr, "ystart"); + int x_end = RNA_int_get(op->ptr, "xend"); + int y_end = RNA_int_get(op->ptr, "yend"); void *lock; - ImBuf *ibuf= ED_space_image_acquire_buffer(sima, &lock); - Histogram *hist= &sima->sample_line_hist; + ImBuf *ibuf = ED_space_image_acquire_buffer(sima, &lock); + Histogram *hist = &sima->sample_line_hist; float x1f, y1f, x2f, y2f; int x1, y1, x2, y2; @@ -2074,26 +2074,26 @@ static int image_sample_line_exec(bContext *C, wmOperator *op) UI_view2d_region_to_view(&ar->v2d, x_start, y_start, &x1f, &y1f); UI_view2d_region_to_view(&ar->v2d, x_end, y_end, &x2f, &y2f); - x1= 0.5f+ x1f*ibuf->x; - x2= 0.5f+ x2f*ibuf->x; - y1= 0.5f+ y1f*ibuf->y; - y2= 0.5f+ y2f*ibuf->y; + x1 = 0.5f + x1f * ibuf->x; + x2 = 0.5f + x2f * ibuf->x; + y1 = 0.5f + y1f * ibuf->y; + y2 = 0.5f + y2f * ibuf->y; hist->channels = 3; hist->x_resolution = 256; hist->xmax = 1.0f; hist->ymax = 1.0f; - for (i=0; i<256; i++) { - x= (int)(0.5f + x1 + (float)i*(x2-x1)/255.0f); - y= (int)(0.5f + y1 + (float)i*(y2-y1)/255.0f); + for (i = 0; i < 256; i++) { + x = (int)(0.5f + x1 + (float)i * (x2 - x1) / 255.0f); + y = (int)(0.5f + y1 + (float)i * (y2 - y1) / 255.0f); - if (x<0 || y<0 || x>=ibuf->x || y>=ibuf->y) { - hist->data_luma[i] = hist->data_r[i] = hist->data_g[i]= hist->data_b[i] = 0.0f; + if (x < 0 || y < 0 || x >= ibuf->x || y >= ibuf->y) { + hist->data_luma[i] = hist->data_r[i] = hist->data_g[i] = hist->data_b[i] = 0.0f; } else { if (ibuf->rect_float) { - fp= (ibuf->rect_float + (ibuf->channels)*(y*ibuf->x + x)); + fp = (ibuf->rect_float + (ibuf->channels) * (y * ibuf->x + x)); if (scene->r.color_mgt_flag & R_COLOR_MANAGEMENT) linearrgb_to_srgb_v3_v3(rgb, fp); @@ -2106,11 +2106,11 @@ static int image_sample_line_exec(bContext *C, wmOperator *op) hist->data_luma[i] = rgb_to_luma(rgb); } else if (ibuf->rect) { - cp= (unsigned char *)(ibuf->rect + y*ibuf->x + x); - hist->data_r[i] = (float)cp[0]/255.0f; - hist->data_g[i] = (float)cp[1]/255.0f; - hist->data_b[i] = (float)cp[2]/255.0f; - hist->data_luma[i] = (float)rgb_to_luma_byte(cp)/255.0f; + cp = (unsigned char *)(ibuf->rect + y * ibuf->x + x); + hist->data_r[i] = (float)cp[0] / 255.0f; + hist->data_g[i] = (float)cp[1] / 255.0f; + hist->data_b[i] = (float)cp[2] / 255.0f; + hist->data_luma[i] = (float)rgb_to_luma_byte(cp) / 255.0f; } } } @@ -2124,7 +2124,7 @@ static int image_sample_line_exec(bContext *C, wmOperator *op) static int image_sample_line_invoke(bContext *C, wmOperator *op, wmEvent *event) { - SpaceImage *sima= CTX_wm_space_image(C); + SpaceImage *sima = CTX_wm_space_image(C); if (!ED_space_image_has_buffer(sima)) return OPERATOR_CANCELLED; @@ -2155,17 +2155,18 @@ void IMAGE_OT_sample_line(wmOperatorType *ot) void IMAGE_OT_curves_point_set(wmOperatorType *ot) { - static EnumPropertyItem point_items[]= { + static EnumPropertyItem point_items[] = { {0, "BLACK_POINT", 0, "Black Point", ""}, {1, "WHITE_POINT", 0, "White Point", ""}, - {0, NULL, 0, NULL, NULL}}; + {0, NULL, 0, NULL, NULL} + }; /* identifiers */ ot->name = "Set Curves Point"; ot->idname = "IMAGE_OT_curves_point_set"; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* api callbacks */ ot->invoke = image_sample_invoke; @@ -2187,9 +2188,9 @@ typedef struct RecordCompositeData { static int image_record_composite_apply(bContext *C, wmOperator *op) { - SpaceImage *sima= CTX_wm_space_image(C); - RecordCompositeData *rcd= op->customdata; - Scene *scene= CTX_data_scene(C); + SpaceImage *sima = CTX_wm_space_image(C); + RecordCompositeData *rcd = op->customdata; + Scene *scene = CTX_data_scene(C); ImBuf *ibuf; WM_timecursor(CTX_wm_window(C), scene->r.cfra); @@ -2199,11 +2200,11 @@ static int image_record_composite_apply(bContext *C, wmOperator *op) BKE_image_all_free_anim_ibufs(scene->r.cfra); ntreeCompositTagAnimated(scene->nodetree); - ntreeCompositExecTree(scene->nodetree, &scene->r, scene->r.cfra != rcd->old_cfra); /* 1 is no previews */ + ntreeCompositExecTree(scene->nodetree, &scene->r, scene->r.cfra != rcd->old_cfra); /* 1 is no previews */ ED_area_tag_redraw(CTX_wm_area(C)); - ibuf= BKE_image_get_ibuf(sima->image, &sima->iuser); + ibuf = BKE_image_get_ibuf(sima->image, &sima->iuser); /* save memory in flipbooks */ if (ibuf) imb_freerectfloatImBuf(ibuf); @@ -2215,8 +2216,8 @@ static int image_record_composite_apply(bContext *C, wmOperator *op) static int image_record_composite_init(bContext *C, wmOperator *op) { - SpaceImage *sima= CTX_wm_space_image(C); - Scene *scene= CTX_data_scene(C); + SpaceImage *sima = CTX_wm_space_image(C); + Scene *scene = CTX_data_scene(C); RecordCompositeData *rcd; if (sima->iuser.frames < 2) @@ -2224,30 +2225,30 @@ static int image_record_composite_init(bContext *C, wmOperator *op) if (scene->nodetree == NULL) return 0; - op->customdata= rcd= MEM_callocN(sizeof(RecordCompositeData), "ImageRecordCompositeData"); + op->customdata = rcd = MEM_callocN(sizeof(RecordCompositeData), "ImageRecordCompositeData"); - rcd->old_cfra= scene->r.cfra; - rcd->sfra= sima->iuser.sfra; - rcd->efra= sima->iuser.sfra + sima->iuser.frames-1; - scene->r.cfra= rcd->sfra; + rcd->old_cfra = scene->r.cfra; + rcd->sfra = sima->iuser.sfra; + rcd->efra = sima->iuser.sfra + sima->iuser.frames - 1; + scene->r.cfra = rcd->sfra; return 1; } static void image_record_composite_exit(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); - SpaceImage *sima= CTX_wm_space_image(C); - RecordCompositeData *rcd= op->customdata; + Scene *scene = CTX_data_scene(C); + SpaceImage *sima = CTX_wm_space_image(C); + RecordCompositeData *rcd = op->customdata; - scene->r.cfra= rcd->old_cfra; + scene->r.cfra = rcd->old_cfra; WM_cursor_restore(CTX_wm_window(C)); if (rcd->timer) WM_event_remove_timer(CTX_wm_manager(C), CTX_wm_window(C), rcd->timer); - WM_event_add_notifier(C, NC_IMAGE|NA_EDITED, sima->image); + WM_event_add_notifier(C, NC_IMAGE | NA_EDITED, sima->image); // XXX play_anim(0); // XXX allqueue(REDRAWNODE, 1); @@ -2275,8 +2276,8 @@ static int image_record_composite_invoke(bContext *C, wmOperator *op, wmEvent *U if (!image_record_composite_init(C, op)) return OPERATOR_CANCELLED; - rcd= op->customdata; - rcd->timer= WM_event_add_timer(CTX_wm_manager(C), CTX_wm_window(C), TIMER, 0.0f); + rcd = op->customdata; + rcd->timer = WM_event_add_timer(CTX_wm_manager(C), CTX_wm_window(C), TIMER, 0.0f); WM_event_add_modal_handler(C, op); if (!image_record_composite_apply(C, op)) @@ -2287,9 +2288,9 @@ static int image_record_composite_invoke(bContext *C, wmOperator *op, wmEvent *U static int image_record_composite_modal(bContext *C, wmOperator *op, wmEvent *event) { - RecordCompositeData *rcd= op->customdata; + RecordCompositeData *rcd = op->customdata; - switch(event->type) { + switch (event->type) { case TIMER: if (rcd->timer == event->customdata) { if (!image_record_composite_apply(C, op)) { @@ -2330,38 +2331,38 @@ void IMAGE_OT_record_composite(wmOperatorType *ot) static int image_cycle_render_slot_poll(bContext *C) { - Image *ima= CTX_data_edit_image(C); + Image *ima = CTX_data_edit_image(C); return (ima && ima->type == IMA_TYPE_R_RESULT); } static int image_cycle_render_slot_exec(bContext *C, wmOperator *op) { - Image *ima= CTX_data_edit_image(C); - int a, slot, cur= ima->render_slot; - const short use_reverse= RNA_boolean_get(op->ptr, "reverse"); + Image *ima = CTX_data_edit_image(C); + int a, slot, cur = ima->render_slot; + const short use_reverse = RNA_boolean_get(op->ptr, "reverse"); - for (a=1; arenders[slot] || slot == ima->last_render_slot) { - ima->render_slot= slot; + ima->render_slot = slot; break; } else if ((slot - 1) == ima->last_render_slot && slot < IMA_MAX_RENDER_SLOT) { - ima->render_slot= slot; + ima->render_slot = slot; break; } } if (a == IMA_MAX_RENDER_SLOT) - ima->render_slot= ((cur == 1)? 0: 1); + ima->render_slot = ((cur == 1) ? 0 : 1); - WM_event_add_notifier(C, NC_IMAGE|ND_DRAW, NULL); + WM_event_add_notifier(C, NC_IMAGE | ND_DRAW, NULL); /* no undo push for browsing existing */ - if (ima->renders[ima->render_slot] || ima->render_slot==ima->last_render_slot) + if (ima->renders[ima->render_slot] || ima->render_slot == ima->last_render_slot) return OPERATOR_CANCELLED; return OPERATOR_FINISHED; @@ -2378,7 +2379,7 @@ void IMAGE_OT_cycle_render_slot(wmOperatorType *ot) ot->poll = image_cycle_render_slot_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; RNA_def_boolean(ot->srna, "reverse", 0, "Cycle in Reverse", ""); } @@ -2396,8 +2397,8 @@ void ED_image_update_frame(const Main *mainp, int cfra) Tex *tex; /* texture users */ - for (tex= mainp->tex.first; tex; tex= tex->id.next) { - if (tex->type==TEX_IMAGE && tex->ima) { + for (tex = mainp->tex.first; tex; tex = tex->id.next) { + if (tex->type == TEX_IMAGE && tex->ima) { if (ELEM(tex->ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE)) { if (tex->iuser.flag & IMA_ANIM_ALWAYS) BKE_image_user_calc_frame(&tex->iuser, cfra, 0); @@ -2406,30 +2407,30 @@ void ED_image_update_frame(const Main *mainp, int cfra) } /* image window, compo node users */ - for (wm=mainp->wm.first; wm; wm= wm->id.next) { /* only 1 wm */ - for (win= wm->windows.first; win; win= win->next) { + for (wm = mainp->wm.first; wm; wm = wm->id.next) { /* only 1 wm */ + for (win = wm->windows.first; win; win = win->next) { ScrArea *sa; - for (sa= win->screen->areabase.first; sa; sa= sa->next) { - if (sa->spacetype==SPACE_VIEW3D) { - View3D *v3d= sa->spacedata.first; + for (sa = win->screen->areabase.first; sa; sa = sa->next) { + if (sa->spacetype == SPACE_VIEW3D) { + View3D *v3d = sa->spacedata.first; BGpic *bgpic; - for (bgpic= v3d->bgpicbase.first; bgpic; bgpic= bgpic->next) + for (bgpic = v3d->bgpicbase.first; bgpic; bgpic = bgpic->next) if (bgpic->iuser.flag & IMA_ANIM_ALWAYS) BKE_image_user_calc_frame(&bgpic->iuser, cfra, 0); } - else if (sa->spacetype==SPACE_IMAGE) { - SpaceImage *sima= sa->spacedata.first; + else if (sa->spacetype == SPACE_IMAGE) { + SpaceImage *sima = sa->spacedata.first; if (sima->iuser.flag & IMA_ANIM_ALWAYS) BKE_image_user_calc_frame(&sima->iuser, cfra, 0); } - else if (sa->spacetype==SPACE_NODE) { - SpaceNode *snode= sa->spacedata.first; - if ((snode->treetype==NTREE_COMPOSIT) && (snode->nodetree)) { + else if (sa->spacetype == SPACE_NODE) { + SpaceNode *snode = sa->spacedata.first; + if ((snode->treetype == NTREE_COMPOSIT) && (snode->nodetree)) { bNode *node; - for (node= snode->nodetree->nodes.first; node; node= node->next) { - if (node->id && node->type==CMP_NODE_IMAGE) { - Image *ima= (Image *)node->id; - ImageUser *iuser= node->storage; + for (node = snode->nodetree->nodes.first; node; node = node->next) { + if (node->id && node->type == CMP_NODE_IMAGE) { + Image *ima = (Image *)node->id; + ImageUser *iuser = node->storage; if (ELEM(ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE)) if (iuser->flag & IMA_ANIM_ALWAYS) BKE_image_user_calc_frame(iuser, cfra, 0); diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index 55f767375d2..b743038f74f 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -90,21 +90,21 @@ void ED_space_image_set(SpaceImage *sima, Scene *scene, Object *obedit, Image *i /* change the space ima after because uvedit_face_visible uses the space ima * to check if the face is displayed in UV-localview */ - sima->image= ima; + sima->image = ima; - if (ima == NULL || ima->type==IMA_TYPE_R_RESULT || ima->type==IMA_TYPE_COMPOSITE) + if (ima == NULL || ima->type == IMA_TYPE_R_RESULT || ima->type == IMA_TYPE_COMPOSITE) sima->flag &= ~SI_DRAWTOOL; if (sima->image) BKE_image_signal(sima->image, &sima->iuser, IMA_SIGNAL_USER_NEW_IMAGE); - if (sima->image && sima->image->id.us==0) - sima->image->id.us= 1; + if (sima->image && sima->image->id.us == 0) + sima->image->id.us = 1; if (obedit) - WM_main_add_notifier(NC_GEOM|ND_DATA, obedit->data); + WM_main_add_notifier(NC_GEOM | ND_DATA, obedit->data); - WM_main_add_notifier(NC_SPACE|ND_SPACE_IMAGE, NULL); + WM_main_add_notifier(NC_SPACE | ND_SPACE_IMAGE, NULL); } ImBuf *ED_space_image_acquire_buffer(SpaceImage *sima, void **lock_r) @@ -113,11 +113,11 @@ ImBuf *ED_space_image_acquire_buffer(SpaceImage *sima, void **lock_r) if (sima && sima->image) { #if 0 - if (sima->image->type==IMA_TYPE_R_RESULT && BIF_show_render_spare()) + if (sima->image->type == IMA_TYPE_R_RESULT && BIF_show_render_spare()) return BIF_render_spare_imbuf(); else #endif - ibuf= BKE_image_acquire_ibuf(sima->image, &sima->iuser, lock_r); + ibuf = BKE_image_acquire_ibuf(sima->image, &sima->iuser, lock_r); if (ibuf && (ibuf->rect || ibuf->rect_float)) return ibuf; @@ -138,8 +138,8 @@ int ED_space_image_has_buffer(SpaceImage *sima) void *lock; int has_buffer; - ibuf= ED_space_image_acquire_buffer(sima, &lock); - has_buffer= (ibuf != NULL); + ibuf = ED_space_image_acquire_buffer(sima, &lock); + has_buffer = (ibuf != NULL); ED_space_image_release_buffer(sima, lock); return has_buffer; @@ -147,19 +147,19 @@ int ED_space_image_has_buffer(SpaceImage *sima) void ED_image_size(Image *ima, int *width, int *height) { - ImBuf *ibuf= NULL; + ImBuf *ibuf = NULL; void *lock; if (ima) - ibuf= BKE_image_acquire_ibuf(ima, NULL, &lock); + ibuf = BKE_image_acquire_ibuf(ima, NULL, &lock); if (ibuf && ibuf->x > 0 && ibuf->y > 0) { - *width= ibuf->x; - *height= ibuf->y; + *width = ibuf->x; + *height = ibuf->y; } else { - *width= 256; - *height= 256; + *width = 256; + *height = 256; } if (ima) @@ -168,20 +168,20 @@ void ED_image_size(Image *ima, int *width, int *height) void ED_space_image_size(SpaceImage *sima, int *width, int *height) { - Scene *scene= sima->iuser.scene; + Scene *scene = sima->iuser.scene; ImBuf *ibuf; void *lock; - ibuf= ED_space_image_acquire_buffer(sima, &lock); + ibuf = ED_space_image_acquire_buffer(sima, &lock); if (ibuf && ibuf->x > 0 && ibuf->y > 0) { - *width= ibuf->x; - *height= ibuf->y; + *width = ibuf->x; + *height = ibuf->y; } - else if (sima->image && sima->image->type==IMA_TYPE_R_RESULT && scene) { + else if (sima->image && sima->image->type == IMA_TYPE_R_RESULT && scene) { /* not very important, just nice */ - *width= (scene->r.xsch*scene->r.size)/100; - *height= (scene->r.ysch*scene->r.size)/100; + *width = (scene->r.xsch * scene->r.size) / 100; + *height = (scene->r.ysch * scene->r.size) / 100; if ((scene->r.mode & R_BORDER) && (scene->r.mode & R_CROP)) { *width *= (scene->r.border.xmax - scene->r.border.xmin); @@ -192,8 +192,8 @@ void ED_space_image_size(SpaceImage *sima, int *width, int *height) /* I know a bit weak... but preview uses not actual image size */ // XXX else if (image_preview_active(sima, width, height)); else { - *width= 256; - *height= 256; + *width = 256; + *height = 256; } ED_space_image_release_buffer(sima, lock); @@ -201,14 +201,14 @@ void ED_space_image_size(SpaceImage *sima, int *width, int *height) void ED_image_aspect(Image *ima, float *aspx, float *aspy) { - *aspx= *aspy= 1.0; + *aspx = *aspy = 1.0; if ((ima == NULL) || (ima->type == IMA_TYPE_R_RESULT) || (ima->type == IMA_TYPE_COMPOSITE) || - (ima->aspx==0.0f || ima->aspy==0.0f)) + (ima->aspx == 0.0f || ima->aspy == 0.0f)) return; /* x is always 1 */ - *aspy = ima->aspy/ima->aspx; + *aspy = ima->aspy / ima->aspx; } void ED_space_image_aspect(SpaceImage *sima, float *aspx, float *aspy) @@ -222,8 +222,8 @@ void ED_space_image_zoom(SpaceImage *sima, ARegion *ar, float *zoomx, float *zoo ED_space_image_size(sima, &width, &height); - *zoomx= (float)(ar->winrct.xmax - ar->winrct.xmin + 1)/(float)((ar->v2d.cur.xmax - ar->v2d.cur.xmin)*width); - *zoomy= (float)(ar->winrct.ymax - ar->winrct.ymin + 1)/(float)((ar->v2d.cur.ymax - ar->v2d.cur.ymin)*height); + *zoomx = (float)(ar->winrct.xmax - ar->winrct.xmin + 1) / (float)((ar->v2d.cur.xmax - ar->v2d.cur.xmin) * width); + *zoomy = (float)(ar->winrct.ymax - ar->winrct.ymin + 1) / (float)((ar->v2d.cur.ymax - ar->v2d.cur.ymin) * height); } void ED_space_image_uv_aspect(SpaceImage *sima, float *aspx, float *aspy) @@ -237,12 +237,12 @@ void ED_space_image_uv_aspect(SpaceImage *sima, float *aspx, float *aspy) *aspy *= (float)h; if (*aspx < *aspy) { - *aspy= *aspy / *aspx; - *aspx= 1.0f; + *aspy = *aspy / *aspx; + *aspx = 1.0f; } else { - *aspx= *aspx / *aspy; - *aspy= 1.0f; + *aspx = *aspx / *aspy; + *aspy = 1.0f; } } @@ -308,16 +308,16 @@ int ED_space_image_show_uvshadow(SpaceImage *sima, Object *obedit) static void image_scopes_tag_refresh(ScrArea *sa) { - SpaceImage *sima= (SpaceImage *)sa->spacedata.first; + SpaceImage *sima = (SpaceImage *)sa->spacedata.first; ARegion *ar; /* only while histogram is visible */ - for (ar=sa->regionbase.first; ar; ar=ar->next) { + for (ar = sa->regionbase.first; ar; ar = ar->next) { if (ar->regiontype == RGN_TYPE_PREVIEW && ar->flag & RGN_FLAG_HIDDEN) return; } - sima->scopes.ok=0; + sima->scopes.ok = 0; } @@ -327,20 +327,20 @@ ARegion *image_has_buttons_region(ScrArea *sa) { ARegion *ar, *arnew; - ar= BKE_area_find_region_type(sa, RGN_TYPE_UI); + ar = BKE_area_find_region_type(sa, RGN_TYPE_UI); if (ar) return ar; /* add subdiv level; after header */ - ar= BKE_area_find_region_type(sa, RGN_TYPE_HEADER); + ar = BKE_area_find_region_type(sa, RGN_TYPE_HEADER); /* is error! */ - if (ar==NULL) return NULL; + if (ar == NULL) return NULL; - arnew= MEM_callocN(sizeof(ARegion), "buttons for image"); + arnew = MEM_callocN(sizeof(ARegion), "buttons for image"); BLI_insertlinkafter(&sa->regionbase, ar, arnew); - arnew->regiontype= RGN_TYPE_UI; - arnew->alignment= RGN_ALIGN_LEFT; + arnew->regiontype = RGN_TYPE_UI; + arnew->alignment = RGN_ALIGN_LEFT; arnew->flag = RGN_FLAG_HIDDEN; @@ -351,20 +351,20 @@ ARegion *image_has_scope_region(ScrArea *sa) { ARegion *ar, *arnew; - ar= BKE_area_find_region_type(sa, RGN_TYPE_PREVIEW); + ar = BKE_area_find_region_type(sa, RGN_TYPE_PREVIEW); if (ar) return ar; /* add subdiv level; after buttons */ - ar= BKE_area_find_region_type(sa, RGN_TYPE_UI); + ar = BKE_area_find_region_type(sa, RGN_TYPE_UI); /* is error! */ - if (ar==NULL) return NULL; + if (ar == NULL) return NULL; - arnew= MEM_callocN(sizeof(ARegion), "scopes for image"); + arnew = MEM_callocN(sizeof(ARegion), "scopes for image"); BLI_insertlinkafter(&sa->regionbase, ar, arnew); - arnew->regiontype= RGN_TYPE_PREVIEW; - arnew->alignment= RGN_ALIGN_RIGHT; + arnew->regiontype = RGN_TYPE_PREVIEW; + arnew->alignment = RGN_ALIGN_RIGHT; arnew->flag = RGN_FLAG_HIDDEN; @@ -380,46 +380,46 @@ static SpaceLink *image_new(const bContext *UNUSED(C)) ARegion *ar; SpaceImage *simage; - simage= MEM_callocN(sizeof(SpaceImage), "initimage"); - simage->spacetype= SPACE_IMAGE; - simage->zoom= 1; - simage->lock= 1; - - simage->iuser.ok= 1; - simage->iuser.fie_ima= 2; - simage->iuser.frames= 100; + simage = MEM_callocN(sizeof(SpaceImage), "initimage"); + simage->spacetype = SPACE_IMAGE; + simage->zoom = 1; + simage->lock = 1; + + simage->iuser.ok = 1; + simage->iuser.fie_ima = 2; + simage->iuser.frames = 100; scopes_new(&simage->scopes); - simage->sample_line_hist.height= 100; + simage->sample_line_hist.height = 100; /* header */ - ar= MEM_callocN(sizeof(ARegion), "header for image"); + ar = MEM_callocN(sizeof(ARegion), "header for image"); BLI_addtail(&simage->regionbase, ar); - ar->regiontype= RGN_TYPE_HEADER; - ar->alignment= RGN_ALIGN_BOTTOM; + ar->regiontype = RGN_TYPE_HEADER; + ar->alignment = RGN_ALIGN_BOTTOM; /* buttons/list view */ - ar= MEM_callocN(sizeof(ARegion), "buttons for image"); + ar = MEM_callocN(sizeof(ARegion), "buttons for image"); BLI_addtail(&simage->regionbase, ar); - ar->regiontype= RGN_TYPE_UI; - ar->alignment= RGN_ALIGN_LEFT; + ar->regiontype = RGN_TYPE_UI; + ar->alignment = RGN_ALIGN_LEFT; ar->flag = RGN_FLAG_HIDDEN; /* scopes */ - ar= MEM_callocN(sizeof(ARegion), "buttons for image"); + ar = MEM_callocN(sizeof(ARegion), "buttons for image"); BLI_addtail(&simage->regionbase, ar); - ar->regiontype= RGN_TYPE_PREVIEW; - ar->alignment= RGN_ALIGN_RIGHT; + ar->regiontype = RGN_TYPE_PREVIEW; + ar->alignment = RGN_ALIGN_RIGHT; ar->flag = RGN_FLAG_HIDDEN; /* main area */ - ar= MEM_callocN(sizeof(ARegion), "main area for image"); + ar = MEM_callocN(sizeof(ARegion), "main area for image"); BLI_addtail(&simage->regionbase, ar); - ar->regiontype= RGN_TYPE_WINDOW; + ar->regiontype = RGN_TYPE_WINDOW; return (SpaceLink *)simage; } @@ -427,7 +427,7 @@ static SpaceLink *image_new(const bContext *UNUSED(C)) /* not spacelink itself */ static void image_free(SpaceLink *sl) { - SpaceImage *simage= (SpaceImage*) sl; + SpaceImage *simage = (SpaceImage *) sl; if (simage->cumap) curvemapping_free(simage->cumap); @@ -438,7 +438,7 @@ static void image_free(SpaceLink *sl) /* spacetype; init callback, add handlers */ static void image_init(struct wmWindowManager *UNUSED(wm), ScrArea *sa) { - ListBase *lb= WM_dropboxmap_find("Image", SPACE_IMAGE, 0); + ListBase *lb = WM_dropboxmap_find("Image", SPACE_IMAGE, 0); /* add drop boxes */ WM_event_add_dropbox_handler(&sa->handlers, lb); @@ -447,11 +447,11 @@ static void image_init(struct wmWindowManager *UNUSED(wm), ScrArea *sa) static SpaceLink *image_duplicate(SpaceLink *sl) { - SpaceImage *simagen= MEM_dupallocN(sl); + SpaceImage *simagen = MEM_dupallocN(sl); /* clear or remove stuff from old */ if (simagen->cumap) - simagen->cumap= curvemapping_copy(simagen->cumap); + simagen->cumap = curvemapping_copy(simagen->cumap); scopes_new(&simagen->scopes); @@ -548,8 +548,8 @@ static void image_keymap(struct wmKeyConfig *keyconf) /* dropboxes */ static int image_drop_poll(bContext *UNUSED(C), wmDrag *drag, wmEvent *UNUSED(event)) { - if (drag->type==WM_DRAG_PATH) - if (ELEM3(drag->icon, 0, ICON_FILE_IMAGE, ICON_FILE_BLANK)) /* rule might not work? */ + if (drag->type == WM_DRAG_PATH) + if (ELEM3(drag->icon, 0, ICON_FILE_IMAGE, ICON_FILE_BLANK)) /* rule might not work? */ return 1; return 0; } @@ -563,7 +563,7 @@ static void image_drop_copy(wmDrag *drag, wmDropBox *drop) /* area+region dropbox definition */ static void image_dropboxes(void) { - ListBase *lb= WM_dropboxmap_find("Image", SPACE_IMAGE, 0); + ListBase *lb = WM_dropboxmap_find("Image", SPACE_IMAGE, 0); WM_dropbox_add(lb, "IMAGE_OT_open", image_drop_poll, image_drop_copy); } @@ -573,21 +573,21 @@ static void image_dropboxes(void) static void image_refresh(const bContext *C, ScrArea *UNUSED(sa)) { Scene *scene = CTX_data_scene(C); - SpaceImage *sima= CTX_wm_space_image(C); - Object *obedit= CTX_data_edit_object(C); + SpaceImage *sima = CTX_wm_space_image(C); + Object *obedit = CTX_data_edit_object(C); Image *ima; - ima= ED_space_image(sima); + ima = ED_space_image(sima); if (sima->iuser.flag & IMA_ANIM_ALWAYS) BKE_image_user_calc_frame(&sima->iuser, scene->r.cfra, 0); /* check if we have to set the image from the editmesh */ - if (ima && (ima->source==IMA_SRC_VIEWER || sima->pin)); + if (ima && (ima->source == IMA_SRC_VIEWER || sima->pin)) ; else if (obedit && obedit->type == OB_MESH) { - Mesh *me= (Mesh*)obedit->data; - struct BMEditMesh *em= me->edit_btmesh; - int sloppy= 1; /* partially selected face is ok */ + Mesh *me = (Mesh *)obedit->data; + struct BMEditMesh *em = me->edit_btmesh; + int sloppy = 1; /* partially selected face is ok */ if (scene_use_new_shading_nodes(scene)) { /* new shading system, get image from material */ @@ -598,7 +598,7 @@ static void image_refresh(const bContext *C, ScrArea *UNUSED(sa)) ED_object_get_active_image(obedit, efa->mat_nr, &node_ima, NULL, NULL); if (node_ima) - sima->image= node_ima; + sima->image = node_ima; } } else { @@ -606,16 +606,16 @@ static void image_refresh(const bContext *C, ScrArea *UNUSED(sa)) MTexPoly *tf; if (em && EDBM_mtexpoly_check(em)) { - sima->image= NULL; + sima->image = NULL; tf = EDBM_mtexpoly_active_get(em, NULL, TRUE); /* partially selected face is ok */ if (tf) { /* don't need to check for pin here, see above */ - sima->image= tf->tpage; + sima->image = tf->tpage; - if (sima->flag & SI_EDITTILE); - else sima->curtile= tf->tile; + if (sima->flag & SI_EDITTILE) ; + else sima->curtile = tf->tile; } } } @@ -624,12 +624,12 @@ static void image_refresh(const bContext *C, ScrArea *UNUSED(sa)) static void image_listener(ScrArea *sa, wmNotifier *wmn) { - SpaceImage *sima= (SpaceImage *)sa->spacedata.first; + SpaceImage *sima = (SpaceImage *)sa->spacedata.first; /* context changes */ - switch(wmn->category) { + switch (wmn->category) { case NC_SCENE: - switch(wmn->data) { + switch (wmn->data) { case ND_FRAME: image_scopes_tag_refresh(sa); ED_area_tag_refresh(sa); @@ -659,7 +659,7 @@ static void image_listener(ScrArea *sa, wmNotifier *wmn) } break; case NC_GEOM: - switch(wmn->data) { + switch (wmn->data) { case ND_DATA: case ND_SELECT: image_scopes_tag_refresh(sa); @@ -669,8 +669,8 @@ static void image_listener(ScrArea *sa, wmNotifier *wmn) } case NC_OBJECT: { - Object *ob= (Object *)wmn->reference; - switch(wmn->data) { + Object *ob = (Object *)wmn->reference; + switch (wmn->data) { case ND_TRANSFORM: case ND_MODIFIER: if (ob && (ob->mode & OB_MODE_EDIT) && sima->lock && (sima->flag & SI_DRAWSHADOW)) { @@ -687,13 +687,13 @@ const char *image_context_dir[] = {"edit_image", NULL}; static int image_context(const bContext *C, const char *member, bContextDataResult *result) { - SpaceImage *sima= CTX_wm_space_image(C); + SpaceImage *sima = CTX_wm_space_image(C); if (CTX_data_dir(member)) { CTX_data_dir_set(result, image_context_dir); } else if (CTX_data_equals(member, "edit_image")) { - CTX_data_id_pointer_set(result, (ID*)ED_space_image(sima)); + CTX_data_id_pointer_set(result, (ID *)ED_space_image(sima)); return 1; } @@ -705,24 +705,24 @@ static int image_context(const bContext *C, const char *member, bContextDataResu /* sets up the fields of the View2D from zoom and offset */ static void image_main_area_set_view2d(SpaceImage *sima, ARegion *ar) { - Image *ima= ED_space_image(sima); + Image *ima = ED_space_image(sima); float x1, y1, w, h; int width, height, winx, winy; #if 0 - if (image_preview_active(curarea, &width, &height)); + if (image_preview_active(curarea, &width, &height)) ; else #endif ED_space_image_size(sima, &width, &height); - w= width; - h= height; + w = width; + h = height; if (ima) - h *= ima->aspy/ima->aspx; + h *= ima->aspy / ima->aspx; - winx= ar->winrct.xmax - ar->winrct.xmin + 1; - winy= ar->winrct.ymax - ar->winrct.ymin + 1; + winx = ar->winrct.xmax - ar->winrct.xmin + 1; + winy = ar->winrct.ymax - ar->winrct.ymin + 1; ar->v2d.tot.xmin = 0; ar->v2d.tot.ymin = 0; @@ -734,19 +734,19 @@ static void image_main_area_set_view2d(SpaceImage *sima, ARegion *ar) ar->v2d.mask.ymax = winy; /* which part of the image space do we see? */ - x1= ar->winrct.xmin+(winx-sima->zoom*w)/2.0f; - y1= ar->winrct.ymin+(winy-sima->zoom*h)/2.0f; + x1 = ar->winrct.xmin + (winx - sima->zoom * w) / 2.0f; + y1 = ar->winrct.ymin + (winy - sima->zoom * h) / 2.0f; - x1-= sima->zoom*sima->xof; - y1-= sima->zoom*sima->yof; + x1 -= sima->zoom * sima->xof; + y1 -= sima->zoom * sima->yof; /* relative display right */ - ar->v2d.cur.xmin = ((ar->winrct.xmin - (float)x1)/sima->zoom); - ar->v2d.cur.xmax = ar->v2d.cur.xmin + ((float)winx/sima->zoom); + ar->v2d.cur.xmin = ((ar->winrct.xmin - (float)x1) / sima->zoom); + ar->v2d.cur.xmax = ar->v2d.cur.xmin + ((float)winx / sima->zoom); /* relative display left */ - ar->v2d.cur.ymin = ((ar->winrct.ymin-(float)y1)/sima->zoom); - ar->v2d.cur.ymax = ar->v2d.cur.ymin + ((float)winy/sima->zoom); + ar->v2d.cur.ymin = ((ar->winrct.ymin - (float)y1) / sima->zoom); + ar->v2d.cur.ymax = ar->v2d.cur.ymin + ((float)winy / sima->zoom); /* normalize 0.0..1.0 */ ar->v2d.cur.xmin /= w; @@ -784,11 +784,11 @@ static void image_main_area_init(wmWindowManager *wm, ARegion *ar) static void image_main_area_draw(const bContext *C, ARegion *ar) { /* draw entirely, view changes should be handled here */ - SpaceImage *sima= CTX_wm_space_image(C); - Object *obact= CTX_data_active_object(C); - Object *obedit= CTX_data_edit_object(C); - Scene *scene= CTX_data_scene(C); - View2D *v2d= &ar->v2d; + SpaceImage *sima = CTX_wm_space_image(C); + Object *obact = CTX_data_active_object(C); + Object *obedit = CTX_data_edit_object(C); + Scene *scene = CTX_data_scene(C); + View2D *v2d = &ar->v2d; //View2DScrollers *scrollers; float col[3]; @@ -801,7 +801,7 @@ static void image_main_area_draw(const bContext *C, ARegion *ar) glClear(GL_COLOR_BUFFER_BIT); /* put scene context variable in iuser */ - sima->iuser.scene= scene; + sima->iuser.scene = scene; /* we set view2d from own zoom and offset each time */ image_main_area_set_view2d(sima, ar); @@ -825,7 +825,7 @@ static void image_main_area_draw(const bContext *C, ARegion *ar) /* scrollers? */ #if 0 - scrollers= UI_view2d_scrollers_calc(C, v2d, V2D_UNIT_VALUES, V2D_GRID_CLAMP, V2D_ARG_DUMMY, V2D_ARG_DUMMY); + scrollers = UI_view2d_scrollers_calc(C, v2d, V2D_UNIT_VALUES, V2D_GRID_CLAMP, V2D_ARG_DUMMY, V2D_ARG_DUMMY); UI_view2d_scrollers_draw(C, v2d, scrollers); UI_view2d_scrollers_free(scrollers); #endif @@ -834,11 +834,11 @@ static void image_main_area_draw(const bContext *C, ARegion *ar) static void image_main_area_listener(ARegion *ar, wmNotifier *wmn) { /* context changes */ - switch(wmn->category) { + switch (wmn->category) { case NC_SCREEN: - if (wmn->data==ND_GPENCIL) + if (wmn->data == ND_GPENCIL) ED_region_tag_redraw(ar); - break; + break; } } @@ -863,13 +863,13 @@ static void image_buttons_area_draw(const bContext *C, ARegion *ar) static void image_buttons_area_listener(ARegion *ar, wmNotifier *wmn) { /* context changes */ - switch(wmn->category) { + switch (wmn->category) { case NC_SCREEN: - if (wmn->data==ND_GPENCIL) + if (wmn->data == ND_GPENCIL) ED_region_tag_redraw(ar); break; case NC_BRUSH: - if (wmn->action==NA_EDITED) + if (wmn->action == NA_EDITED) ED_region_tag_redraw(ar); break; case NC_TEXTURE: @@ -896,12 +896,12 @@ static void image_scope_area_init(wmWindowManager *wm, ARegion *ar) static void image_scope_area_draw(const bContext *C, ARegion *ar) { - SpaceImage *sima= CTX_wm_space_image(C); - Scene *scene= CTX_data_scene(C); + SpaceImage *sima = CTX_wm_space_image(C); + Scene *scene = CTX_data_scene(C); void *lock; - ImBuf *ibuf= ED_space_image_acquire_buffer(sima, &lock); + ImBuf *ibuf = ED_space_image_acquire_buffer(sima, &lock); if (ibuf) { - scopes_update(&sima->scopes, ibuf, scene->r.color_mgt_flag & R_COLOR_MANAGEMENT ); + scopes_update(&sima->scopes, ibuf, scene->r.color_mgt_flag & R_COLOR_MANAGEMENT); } ED_space_image_release_buffer(sima, lock); @@ -911,9 +911,9 @@ static void image_scope_area_draw(const bContext *C, ARegion *ar) static void image_scope_area_listener(ARegion *ar, wmNotifier *wmn) { /* context changes */ - switch(wmn->category) { + switch (wmn->category) { case NC_SCENE: - switch(wmn->data) { + switch (wmn->data) { case ND_MODE: case ND_RENDER_RESULT: case ND_COMPO_RESULT: @@ -947,9 +947,9 @@ static void image_header_area_draw(const bContext *C, ARegion *ar) static void image_header_area_listener(ARegion *ar, wmNotifier *wmn) { /* context changes */ - switch(wmn->category) { + switch (wmn->category) { case NC_SCENE: - switch(wmn->data) { + switch (wmn->data) { case ND_MODE: case ND_TOOLSETTINGS: ED_region_tag_redraw(ar); @@ -957,7 +957,7 @@ static void image_header_area_listener(ARegion *ar, wmNotifier *wmn) } break; case NC_GEOM: - switch(wmn->data) { + switch (wmn->data) { case ND_DATA: case ND_SELECT: ED_region_tag_redraw(ar); @@ -972,64 +972,64 @@ static void image_header_area_listener(ARegion *ar, wmNotifier *wmn) /* only called once, from space/spacetypes.c */ void ED_spacetype_image(void) { - SpaceType *st= MEM_callocN(sizeof(SpaceType), "spacetype image"); + SpaceType *st = MEM_callocN(sizeof(SpaceType), "spacetype image"); ARegionType *art; - st->spaceid= SPACE_IMAGE; + st->spaceid = SPACE_IMAGE; strncpy(st->name, "Image", BKE_ST_MAXNAME); - st->new= image_new; - st->free= image_free; - st->init= image_init; - st->duplicate= image_duplicate; - st->operatortypes= image_operatortypes; - st->keymap= image_keymap; - st->dropboxes= image_dropboxes; - st->refresh= image_refresh; - st->listener= image_listener; - st->context= image_context; + st->new = image_new; + st->free = image_free; + st->init = image_init; + st->duplicate = image_duplicate; + st->operatortypes = image_operatortypes; + st->keymap = image_keymap; + st->dropboxes = image_dropboxes; + st->refresh = image_refresh; + st->listener = image_listener; + st->context = image_context; /* regions: main window */ - art= MEM_callocN(sizeof(ARegionType), "spacetype image region"); + art = MEM_callocN(sizeof(ARegionType), "spacetype image region"); art->regionid = RGN_TYPE_WINDOW; - art->keymapflag= ED_KEYMAP_FRAMES|ED_KEYMAP_GPENCIL; - art->init= image_main_area_init; - art->draw= image_main_area_draw; - art->listener= image_main_area_listener; + art->keymapflag = ED_KEYMAP_FRAMES | ED_KEYMAP_GPENCIL; + art->init = image_main_area_init; + art->draw = image_main_area_draw; + art->listener = image_main_area_listener; BLI_addhead(&st->regiontypes, art); /* regions: listview/buttons */ - art= MEM_callocN(sizeof(ARegionType), "spacetype image region"); + art = MEM_callocN(sizeof(ARegionType), "spacetype image region"); art->regionid = RGN_TYPE_UI; - art->prefsizex= 220; // XXX - art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_FRAMES; - art->listener= image_buttons_area_listener; - art->init= image_buttons_area_init; - art->draw= image_buttons_area_draw; + art->prefsizex = 220; // XXX + art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_FRAMES; + art->listener = image_buttons_area_listener; + art->init = image_buttons_area_init; + art->draw = image_buttons_area_draw; BLI_addhead(&st->regiontypes, art); image_buttons_register(art); ED_uvedit_buttons_register(art); /* regions: statistics/scope buttons */ - art= MEM_callocN(sizeof(ARegionType), "spacetype image region"); + art = MEM_callocN(sizeof(ARegionType), "spacetype image region"); art->regionid = RGN_TYPE_PREVIEW; - art->prefsizex= 220; // XXX - art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_FRAMES; - art->listener= image_scope_area_listener; - art->init= image_scope_area_init; - art->draw= image_scope_area_draw; + art->prefsizex = 220; // XXX + art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_FRAMES; + art->listener = image_scope_area_listener; + art->init = image_scope_area_init; + art->draw = image_scope_area_draw; BLI_addhead(&st->regiontypes, art); /* regions: header */ - art= MEM_callocN(sizeof(ARegionType), "spacetype image region"); + art = MEM_callocN(sizeof(ARegionType), "spacetype image region"); art->regionid = RGN_TYPE_HEADER; - art->prefsizey= HEADERY; - art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D|ED_KEYMAP_FRAMES|ED_KEYMAP_HEADER; - art->listener= image_header_area_listener; - art->init= image_header_area_init; - art->draw= image_header_area_draw; + art->prefsizey = HEADERY; + art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES | ED_KEYMAP_HEADER; + art->listener = image_header_area_listener; + art->init = image_header_area_init; + art->draw = image_header_area_draw; BLI_addhead(&st->regiontypes, art); diff --git a/source/blender/editors/space_info/info_draw.c b/source/blender/editors/space_info/info_draw.c index c06a778951d..2409ab8c4e0 100644 --- a/source/blender/editors/space_info/info_draw.c +++ b/source/blender/editors/space_info/info_draw.c @@ -66,42 +66,42 @@ static void info_report_color(unsigned char *fg, unsigned char *bg, Report *report, int bool) { if (report->flag & SELECT) { - fg[0]=255; fg[1]=255; fg[2]=255; + fg[0] = 255; fg[1] = 255; fg[2] = 255; if (bool) { - bg[0]=96; bg[1]=128; bg[2]=255; + bg[0] = 96; bg[1] = 128; bg[2] = 255; } else { - bg[0]=90; bg[1]=122; bg[2]=249; + bg[0] = 90; bg[1] = 122; bg[2] = 249; } } else { - fg[0]=0; fg[1]=0; fg[2]=0; + fg[0] = 0; fg[1] = 0; fg[2] = 0; if (report->type & RPT_ERROR_ALL) { - if (bool) { bg[0]=220; bg[1]=0; bg[2]=0; } - else { bg[0]=214; bg[1]=0; bg[2]=0; } + if (bool) { bg[0] = 220; bg[1] = 0; bg[2] = 0; } + else { bg[0] = 214; bg[1] = 0; bg[2] = 0; } } else if (report->type & RPT_WARNING_ALL) { - if (bool) { bg[0]=220; bg[1]=128; bg[2]=96; } - else { bg[0]=214; bg[1]=122; bg[2]=90; } + if (bool) { bg[0] = 220; bg[1] = 128; bg[2] = 96; } + else { bg[0] = 214; bg[1] = 122; bg[2] = 90; } } #if 0 // XXX: this looks like the selected color, so don't use this else if (report->type & RPT_OPERATOR_ALL) { - if (bool) { bg[0]=96; bg[1]=128; bg[2]=255; } - else { bg[0]=90; bg[1]=122; bg[2]=249; } + if (bool) { bg[0] = 96; bg[1] = 128; bg[2] = 255; } + else { bg[0] = 90; bg[1] = 122; bg[2] = 249; } } #endif else if (report->type & RPT_INFO_ALL) { - if (bool) { bg[0]=0; bg[1]=170; bg[2]=0; } - else { bg[0]=0; bg[1]=164; bg[2]=0; } + if (bool) { bg[0] = 0; bg[1] = 170; bg[2] = 0; } + else { bg[0] = 0; bg[1] = 164; bg[2] = 0; } } else if (report->type & RPT_DEBUG_ALL) { - if (bool) { bg[0]=196; bg[1]=196; bg[2]=196; } - else { bg[0]=190; bg[1]=190; bg[2]=190; } + if (bool) { bg[0] = 196; bg[1] = 196; bg[2] = 196; } + else { bg[0] = 190; bg[1] = 190; bg[2] = 190; } } else { - if (bool) { bg[0]=120; bg[1]=120; bg[2]=120; } - else { bg[0]=114; bg[1]=114; bg[2]=114; } + if (bool) { bg[0] = 120; bg[1] = 120; bg[2] = 120; } + else { bg[0] = 114; bg[1] = 114; bg[2] = 114; } } } } @@ -110,24 +110,24 @@ static void info_report_color(unsigned char *fg, unsigned char *bg, Report *repo #ifdef USE_INFO_NEWLINE static void report_textview_init__internal(TextViewContext *tvc) { - Report *report= (Report *)tvc->iter; - const char *str= report->message; - const char *next_str= strchr(str + tvc->iter_char, '\n'); + Report *report = (Report *)tvc->iter; + const char *str = report->message; + const char *next_str = strchr(str + tvc->iter_char, '\n'); if (next_str) { - tvc->iter_char_next= (int)(next_str - str); + tvc->iter_char_next = (int)(next_str - str); } else { - tvc->iter_char_next= report->len; + tvc->iter_char_next = report->len; } } static int report_textview_skip__internal(TextViewContext *tvc) { - SpaceInfo *sinfo= (SpaceInfo *)tvc->arg1; - const int report_mask= info_report_mask(sinfo); - while (tvc->iter && (((Report *)tvc->iter)->type & report_mask)==0) { - tvc->iter= (void *)((Link *)tvc->iter)->prev; + SpaceInfo *sinfo = (SpaceInfo *)tvc->arg1; + const int report_mask = info_report_mask(sinfo); + while (tvc->iter && (((Report *)tvc->iter)->type & report_mask) == 0) { + tvc->iter = (void *)((Link *)tvc->iter)->prev; } return (tvc->iter != NULL); } @@ -137,23 +137,23 @@ static int report_textview_skip__internal(TextViewContext *tvc) static int report_textview_begin(TextViewContext *tvc) { // SpaceConsole *sc= (SpaceConsole *)tvc->arg1; - ReportList *reports= (ReportList *)tvc->arg2; + ReportList *reports = (ReportList *)tvc->arg2; - tvc->lheight= 14; //sc->lheight; - tvc->sel_start= 0; - tvc->sel_end= 0; + tvc->lheight = 14; //sc->lheight; + tvc->sel_start = 0; + tvc->sel_end = 0; /* iterator */ - tvc->iter= reports->list.last; + tvc->iter = reports->list.last; - glClearColor(120.0/255.0, 120.0/255.0, 120.0/255.0, 1.0); + glClearColor(120.0 / 255.0, 120.0 / 255.0, 120.0 / 255.0, 1.0); glClear(GL_COLOR_BUFFER_BIT); #ifdef USE_INFO_NEWLINE - tvc->iter_tmp= 0; + tvc->iter_tmp = 0; if (tvc->iter && report_textview_skip__internal(tvc)) { /* init the newline iterator */ - tvc->iter_char= 0; + tvc->iter_char = 0; report_textview_init__internal(tvc); return TRUE; @@ -175,14 +175,14 @@ static void report_textview_end(TextViewContext *UNUSED(tvc)) static int report_textview_step(TextViewContext *tvc) { /* simple case, but no newline support */ - Report *report= (Report *)tvc->iter; + Report *report = (Report *)tvc->iter; if (report->len <= tvc->iter_char_next) { - tvc->iter= (void *)((Link *)tvc->iter)->prev; + tvc->iter = (void *)((Link *)tvc->iter)->prev; if (tvc->iter && report_textview_skip__internal(tvc)) { tvc->iter_tmp++; - tvc->iter_char= 0; /* reset start */ + tvc->iter_char = 0; /* reset start */ report_textview_init__internal(tvc); return TRUE; @@ -193,7 +193,7 @@ static int report_textview_step(TextViewContext *tvc) } else { /* step to the next newline */ - tvc->iter_char= tvc->iter_char_next + 1; + tvc->iter_char = tvc->iter_char_next + 1; report_textview_init__internal(tvc); return TRUE; @@ -202,15 +202,15 @@ static int report_textview_step(TextViewContext *tvc) static int report_textview_line_get(struct TextViewContext *tvc, const char **line, int *len) { - Report *report= (Report *)tvc->iter; - *line= report->message + tvc->iter_char; - *len= tvc->iter_char_next - tvc->iter_char; + Report *report = (Report *)tvc->iter; + *line = report->message + tvc->iter_char; + *len = tvc->iter_char_next - tvc->iter_char; return 1; } static int report_textview_line_color(struct TextViewContext *tvc, unsigned char fg[3], unsigned char bg[3]) { - Report *report= (Report *)tvc->iter; + Report *report = (Report *)tvc->iter; info_report_color(fg, bg, report, tvc->iter_tmp % 2); return TVC_LINE_FG | TVC_LINE_BG; } @@ -220,27 +220,27 @@ static int report_textview_line_color(struct TextViewContext *tvc, unsigned char static int report_textview_step(TextViewContext *tvc) { - SpaceInfo *sinfo= (SpaceInfo *)tvc->arg1; - const int report_mask= info_report_mask(sinfo); + SpaceInfo *sinfo = (SpaceInfo *)tvc->arg1; + const int report_mask = info_report_mask(sinfo); do { - tvc->iter= (void *)((Link *)tvc->iter)->prev; - } while (tvc->iter && (((Report *)tvc->iter)->type & report_mask)==0); + tvc->iter = (void *)((Link *)tvc->iter)->prev; + } while (tvc->iter && (((Report *)tvc->iter)->type & report_mask) == 0); return (tvc->iter != NULL); } static int report_textview_line_get(struct TextViewContext *tvc, const char **line, int *len) { - Report *report= (Report *)tvc->iter; - *line= report->message; - *len= report->len; + Report *report = (Report *)tvc->iter; + *line = report->message; + *len = report->len; return 1; } static int report_textview_line_color(struct TextViewContext *tvc, unsigned char fg[3], unsigned char bg[3]) { - Report *report= (Report *)tvc->iter; + Report *report = (Report *)tvc->iter; info_report_color(fg, bg, report, tvc->iter_tmp % 2); return TVC_LINE_FG | TVC_LINE_BG; } @@ -251,41 +251,41 @@ static int report_textview_line_color(struct TextViewContext *tvc, unsigned char static int info_textview_main__internal(struct SpaceInfo *sinfo, struct ARegion *ar, ReportList *reports, int draw, int mval[2], void **mouse_pick, int *pos_pick) { - int ret= 0; + int ret = 0; - View2D *v2d= &ar->v2d; + View2D *v2d = &ar->v2d; - TextViewContext tvc= {0}; - tvc.begin= report_textview_begin; - tvc.end= report_textview_end; + TextViewContext tvc = {0}; + tvc.begin = report_textview_begin; + tvc.end = report_textview_end; - tvc.step= report_textview_step; - tvc.line_get= report_textview_line_get; - tvc.line_color= report_textview_line_color; + tvc.step = report_textview_step; + tvc.line_get = report_textview_line_get; + tvc.line_color = report_textview_line_color; - tvc.arg1= sinfo; - tvc.arg2= reports; + tvc.arg1 = sinfo; + tvc.arg2 = reports; /* view */ - tvc.sel_start= 0; - tvc.sel_end= 0; - tvc.lheight= 14; //sc->lheight; + tvc.sel_start = 0; + tvc.sel_end = 0; + tvc.lheight = 14; //sc->lheight; tvc.ymin = v2d->cur.ymin; tvc.ymax = v2d->cur.ymax; - tvc.winx= ar->winx; + tvc.winx = ar->winx; - ret= textview_draw(&tvc, draw, mval, mouse_pick, pos_pick); + ret = textview_draw(&tvc, draw, mval, mouse_pick, pos_pick); return ret; } void *info_text_pick(struct SpaceInfo *sinfo, struct ARegion *ar, ReportList *reports, int mouse_y) { - void *mouse_pick= NULL; + void *mouse_pick = NULL; int mval[2]; - mval[0]= 0; - mval[1]= mouse_y; + mval[0] = 0; + mval[1] = mouse_y; info_textview_main__internal(sinfo, ar, reports, 0, mval, &mouse_pick, NULL); return (void *)mouse_pick; diff --git a/source/blender/editors/space_info/info_ops.c b/source/blender/editors/space_info/info_ops.c index 3157b920ff0..5256fc8f044 100644 --- a/source/blender/editors/space_info/info_ops.c +++ b/source/blender/editors/space_info/info_ops.c @@ -70,7 +70,7 @@ static int pack_all_exec(bContext *C, wmOperator *op) { - Main *bmain= CTX_data_main(C); + Main *bmain = CTX_data_main(C); packAll(bmain, op->reports); G.fileflags |= G_AUTOPACK; @@ -80,14 +80,14 @@ static int pack_all_exec(bContext *C, wmOperator *op) static int pack_all_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { - Main *bmain= CTX_data_main(C); + Main *bmain = CTX_data_main(C); Image *ima; ImBuf *ibuf; // first check for dirty images - for (ima=bmain->image.first; ima; ima=ima->id.next) { + for (ima = bmain->image.first; ima; ima = ima->id.next) { if (ima->ibufs.first) { /* XXX FIX */ - ibuf= BKE_image_get_ibuf(ima, NULL); + ibuf = BKE_image_get_ibuf(ima, NULL); if (ibuf && (ibuf->userflags & IB_BITMAPDIRTY)) break; @@ -113,7 +113,7 @@ void FILE_OT_pack_all(wmOperatorType *ot) ot->invoke = pack_all_invoke; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /********************* unpack all operator *********************/ @@ -129,10 +129,10 @@ static const EnumPropertyItem unpack_all_method_items[] = { static int unpack_all_exec(bContext *C, wmOperator *op) { - Main *bmain= CTX_data_main(C); - int method= RNA_enum_get(op->ptr, "method"); + Main *bmain = CTX_data_main(C); + int method = RNA_enum_get(op->ptr, "method"); - if (method != PF_KEEP) unpackAll(bmain, op->reports, method); /* XXX PF_ASK can't work here */ + if (method != PF_KEEP) unpackAll(bmain, op->reports, method); /* XXX PF_ASK can't work here */ G.fileflags &= ~G_AUTOPACK; return OPERATOR_FINISHED; @@ -140,7 +140,7 @@ static int unpack_all_exec(bContext *C, wmOperator *op) static int unpack_all_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { - Main *bmain= CTX_data_main(C); + Main *bmain = CTX_data_main(C); uiPopupMenu *pup; uiLayout *layout; char title[64]; @@ -159,8 +159,8 @@ static int unpack_all_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event) else BLI_snprintf(title, sizeof(title), "Unpack %d files", count); - pup= uiPupMenuBegin(C, title, ICON_NONE); - layout= uiPupMenuLayout(pup); + pup = uiPupMenuBegin(C, title, ICON_NONE); + layout = uiPupMenuLayout(pup); uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT); uiItemsEnumO(layout, "FILE_OT_unpack_all", "method"); @@ -181,7 +181,7 @@ void FILE_OT_unpack_all(wmOperatorType *ot) ot->invoke = unpack_all_invoke; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ RNA_def_enum(ot->srna, "method", unpack_all_method_items, PF_USE_LOCAL, "Method", "How to unpack"); @@ -191,7 +191,7 @@ void FILE_OT_unpack_all(wmOperatorType *ot) static int make_paths_relative_exec(bContext *C, wmOperator *op) { - Main *bmain= CTX_data_main(C); + Main *bmain = CTX_data_main(C); if (!G.relbase_valid) { BKE_report(op->reports, RPT_WARNING, "Can't set relative paths with an unsaved blend file"); @@ -216,14 +216,14 @@ void FILE_OT_make_paths_relative(wmOperatorType *ot) ot->exec = make_paths_relative_exec; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /********************* make paths absolute operator *********************/ static int make_paths_absolute_exec(bContext *C, wmOperator *op) { - Main *bmain= CTX_data_main(C); + Main *bmain = CTX_data_main(C); if (!G.relbase_valid) { BKE_report(op->reports, RPT_WARNING, "Can't set absolute paths with an unsaved blend file"); @@ -248,14 +248,14 @@ void FILE_OT_make_paths_absolute(wmOperatorType *ot) ot->exec = make_paths_absolute_exec; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /********************* report missing files operator *********************/ static int report_missing_files_exec(bContext *C, wmOperator *op) { - Main *bmain= CTX_data_main(C); + Main *bmain = CTX_data_main(C); /* run the missing file check */ checkMissingFiles(bmain, op->reports); @@ -280,8 +280,8 @@ void FILE_OT_report_missing_files(wmOperatorType *ot) static int find_missing_files_exec(bContext *C, wmOperator *op) { - Main *bmain= CTX_data_main(C); - const char *searchpath= RNA_string_get_alloc(op->ptr, "filepath", NULL, 0); + Main *bmain = CTX_data_main(C); + const char *searchpath = RNA_string_get_alloc(op->ptr, "filepath", NULL, 0); findMissingFiles(bmain, searchpath, op->reports); MEM_freeN((void *)searchpath); @@ -306,7 +306,7 @@ void FILE_OT_find_missing_files(wmOperatorType *ot) ot->invoke = find_missing_files_invoke; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ WM_operator_properties_filesel(ot, 0, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY); @@ -321,44 +321,45 @@ void FILE_OT_find_missing_files(wmOperatorType *ot) * inactive regions, so use this for now. --matt */ -#define INFO_TIMEOUT 5.0f -#define INFO_COLOR_TIMEOUT 3.0f -#define ERROR_TIMEOUT 10.0f -#define ERROR_COLOR_TIMEOUT 6.0f -#define COLLAPSE_TIMEOUT 0.25f +#define INFO_TIMEOUT 5.0f +#define INFO_COLOR_TIMEOUT 3.0f +#define ERROR_TIMEOUT 10.0f +#define ERROR_COLOR_TIMEOUT 6.0f +#define COLLAPSE_TIMEOUT 0.25f static int update_reports_display_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event) { - wmWindowManager *wm= CTX_wm_manager(C); - ReportList *reports= CTX_wm_reports(C); + wmWindowManager *wm = CTX_wm_manager(C); + ReportList *reports = CTX_wm_reports(C); Report *report; ReportTimerInfo *rti; - float progress=0.0, color_progress=0.0; + float progress = 0.0, color_progress = 0.0; float neutral_col[3] = {0.35, 0.35, 0.35}; - float neutral_grey= 0.6; - float timeout=0.0, color_timeout=0.0; - int send_note= 0; + float neutral_grey = 0.6; + float timeout = 0.0, color_timeout = 0.0; + int send_note = 0; /* escape if not our timer */ - if ( (reports->reporttimer==NULL) || - (reports->reporttimer != event->customdata) || - ((report= BKE_reports_last_displayable(reports))==NULL) /* may have been deleted */ - ) { + if ((reports->reporttimer == NULL) || + (reports->reporttimer != event->customdata) || + ((report = BKE_reports_last_displayable(reports)) == NULL) /* may have been deleted */ + ) + { return OPERATOR_PASS_THROUGH; } rti = (ReportTimerInfo *)reports->reporttimer->customdata; - timeout = (report->type & RPT_ERROR_ALL)?ERROR_TIMEOUT:INFO_TIMEOUT; - color_timeout = (report->type & RPT_ERROR_ALL)?ERROR_COLOR_TIMEOUT:INFO_COLOR_TIMEOUT; + timeout = (report->type & RPT_ERROR_ALL) ? ERROR_TIMEOUT : INFO_TIMEOUT; + color_timeout = (report->type & RPT_ERROR_ALL) ? ERROR_COLOR_TIMEOUT : INFO_COLOR_TIMEOUT; /* clear the report display after timeout */ if ((float)reports->reporttimer->duration > timeout) { WM_event_remove_timer(wm, NULL, reports->reporttimer); reports->reporttimer = NULL; - WM_event_add_notifier(C, NC_SPACE|ND_SPACE_INFO, NULL); + WM_event_add_notifier(C, NC_SPACE | ND_SPACE_INFO, NULL); - return (OPERATOR_FINISHED|OPERATOR_PASS_THROUGH); + return (OPERATOR_FINISHED | OPERATOR_PASS_THROUGH); } if (rti->widthfac == 0.0f) { @@ -379,7 +380,7 @@ static int update_reports_display_invoke(bContext *C, wmOperator *UNUSED(op), wm rti->col[2] = 0.7; } rti->greyscale = 0.75; - rti->widthfac=1.0; + rti->widthfac = 1.0; } progress = (float)reports->reporttimer->duration / timeout; @@ -387,7 +388,7 @@ static int update_reports_display_invoke(bContext *C, wmOperator *UNUSED(op), wm /* save us from too many draws */ if (color_progress <= 1.0f) { - send_note= 1; + send_note = 1; /* fade colors out sharply according to progress through fade-out duration */ interp_v3_v3v3(rti->col, rti->col, neutral_col, color_progress); @@ -395,17 +396,17 @@ static int update_reports_display_invoke(bContext *C, wmOperator *UNUSED(op), wm } /* collapse report at end of timeout */ - if (progress*timeout > timeout - COLLAPSE_TIMEOUT) { - rti->widthfac = (progress*timeout - (timeout - COLLAPSE_TIMEOUT)) / COLLAPSE_TIMEOUT; + if (progress * timeout > timeout - COLLAPSE_TIMEOUT) { + rti->widthfac = (progress * timeout - (timeout - COLLAPSE_TIMEOUT)) / COLLAPSE_TIMEOUT; rti->widthfac = 1.0f - rti->widthfac; - send_note= 1; + send_note = 1; } if (send_note) { - WM_event_add_notifier(C, NC_SPACE|ND_SPACE_INFO, NULL); + WM_event_add_notifier(C, NC_SPACE | ND_SPACE_INFO, NULL); } - return (OPERATOR_FINISHED|OPERATOR_PASS_THROUGH); + return (OPERATOR_FINISHED | OPERATOR_PASS_THROUGH); } void INFO_OT_reports_display_update(wmOperatorType *ot) diff --git a/source/blender/editors/space_info/info_report.c b/source/blender/editors/space_info/info_report.c index 4e6ccf2f2b1..46cd2530063 100644 --- a/source/blender/editors/space_info/info_report.c +++ b/source/blender/editors/space_info/info_report.c @@ -53,16 +53,16 @@ int info_report_mask(SpaceInfo *UNUSED(sinfo)) #if 0 int report_mask = 0; - if (sinfo->rpt_mask & INFO_RPT_DEBUG) report_mask |= RPT_DEBUG_ALL; - if (sinfo->rpt_mask & INFO_RPT_INFO) report_mask |= RPT_INFO_ALL; - if (sinfo->rpt_mask & INFO_RPT_OP) report_mask |= RPT_OPERATOR_ALL; - if (sinfo->rpt_mask & INFO_RPT_WARN) report_mask |= RPT_WARNING_ALL; - if (sinfo->rpt_mask & INFO_RPT_ERR) report_mask |= RPT_ERROR_ALL; + if (sinfo->rpt_mask & INFO_RPT_DEBUG) report_mask |= RPT_DEBUG_ALL; + if (sinfo->rpt_mask & INFO_RPT_INFO) report_mask |= RPT_INFO_ALL; + if (sinfo->rpt_mask & INFO_RPT_OP) report_mask |= RPT_OPERATOR_ALL; + if (sinfo->rpt_mask & INFO_RPT_WARN) report_mask |= RPT_WARNING_ALL; + if (sinfo->rpt_mask & INFO_RPT_ERR) report_mask |= RPT_ERROR_ALL; return report_mask; #endif - return RPT_DEBUG_ALL|RPT_INFO_ALL|RPT_OPERATOR_ALL|RPT_WARNING_ALL|RPT_ERROR_ALL; + return RPT_DEBUG_ALL | RPT_INFO_ALL | RPT_OPERATOR_ALL | RPT_WARNING_ALL | RPT_ERROR_ALL; } // TODO, get this working again! @@ -74,9 +74,9 @@ static int report_replay_exec(bContext *C, wmOperator *UNUSED(op)) // Report *report; #if 0 - sc->type= CONSOLE_TYPE_PYTHON; + sc->type = CONSOLE_TYPE_PYTHON; - for (report=reports->list.last; report; report=report->prev) { + for (report = reports->list.last; report; report = report->prev) { if ((report->type & report_mask) && (report->type & RPT_OPERATOR_ALL) && (report->flag & SELECT)) { console_history_add_str(sc, report->message, 0); WM_operator_name_call(C, "CONSOLE_OT_execute", WM_OP_EXEC_DEFAULT, NULL); @@ -85,7 +85,7 @@ static int report_replay_exec(bContext *C, wmOperator *UNUSED(op)) } } - sc->type= CONSOLE_TYPE_REPORT; + sc->type = CONSOLE_TYPE_REPORT; #endif ED_area_tag_redraw(CTX_wm_area(C)); @@ -111,8 +111,8 @@ void INFO_OT_report_replay(wmOperatorType *ot) static int select_report_pick_exec(bContext *C, wmOperator *op) { - int report_index= RNA_int_get(op->ptr, "report_index"); - Report *report= BLI_findlink(&CTX_wm_reports(C)->list, report_index); + int report_index = RNA_int_get(op->ptr, "report_index"); + Report *report = BLI_findlink(&CTX_wm_reports(C)->list, report_index); if (!report) return OPERATOR_CANCELLED; @@ -126,15 +126,15 @@ static int select_report_pick_exec(bContext *C, wmOperator *op) static int select_report_pick_invoke(bContext *C, wmOperator *op, wmEvent *event) { - SpaceInfo *sinfo= CTX_wm_space_info(C); - ARegion *ar= CTX_wm_region(C); - ReportList *reports= CTX_wm_reports(C); + SpaceInfo *sinfo = CTX_wm_space_info(C); + ARegion *ar = CTX_wm_region(C); + ReportList *reports = CTX_wm_reports(C); Report *report; /* uses opengl */ wmSubWindowSet(CTX_wm_window(C), ar->swinid); - report= info_text_pick(sinfo, ar, reports, event->mval[1]); + report = info_text_pick(sinfo, ar, reports, event->mval[1]); RNA_int_set(op->ptr, "report_index", BLI_findindex(&reports->list, report)); @@ -165,28 +165,28 @@ void INFO_OT_select_pick(wmOperatorType *ot) static int report_select_all_toggle_exec(bContext *C, wmOperator *UNUSED(op)) { - SpaceInfo *sinfo= CTX_wm_space_info(C); - ReportList *reports= CTX_wm_reports(C); - int report_mask= info_report_mask(sinfo); - int deselect= 0; + SpaceInfo *sinfo = CTX_wm_space_info(C); + ReportList *reports = CTX_wm_reports(C); + int report_mask = info_report_mask(sinfo); + int deselect = 0; Report *report; - for (report=reports->list.last; report; report=report->prev) { + for (report = reports->list.last; report; report = report->prev) { if ((report->type & report_mask) && (report->flag & SELECT)) { - deselect= 1; + deselect = 1; break; } } if (deselect) { - for (report=reports->list.last; report; report=report->prev) + for (report = reports->list.last; report; report = report->prev) if (report->type & report_mask) report->flag &= ~SELECT; } else { - for (report=reports->list.last; report; report=report->prev) + for (report = reports->list.last; report; report = report->prev) if (report->type & report_mask) report->flag |= SELECT; } @@ -216,11 +216,11 @@ void INFO_OT_select_all_toggle(wmOperatorType *ot) /* borderselect operator */ static int borderselect_exec(bContext *C, wmOperator *op) { - SpaceInfo *sinfo= CTX_wm_space_info(C); - ARegion *ar= CTX_wm_region(C); - ReportList *reports= CTX_wm_reports(C); - int report_mask= info_report_mask(sinfo); - int extend= RNA_boolean_get(op->ptr, "extend"); + SpaceInfo *sinfo = CTX_wm_space_info(C); + ARegion *ar = CTX_wm_region(C); + ReportList *reports = CTX_wm_reports(C); + int report_mask = info_report_mask(sinfo); + int extend = RNA_boolean_get(op->ptr, "extend"); Report *report_min, *report_max, *report; //View2D *v2d= UI_view2d_fromcontext(C); @@ -228,7 +228,7 @@ static int borderselect_exec(bContext *C, wmOperator *op) rcti rect; //rctf rectf, rq; - short selecting= (RNA_int_get(op->ptr, "gesture_mode")==GESTURE_MODAL_SELECT); + short selecting = (RNA_int_get(op->ptr, "gesture_mode") == GESTURE_MODAL_SELECT); //int mval[2]; rect.xmin = RNA_int_get(op->ptr, "xmin"); @@ -237,54 +237,54 @@ static int borderselect_exec(bContext *C, wmOperator *op) rect.ymax = RNA_int_get(op->ptr, "ymax"); #if 0 - mval[0]= rect.xmin; - mval[1]= rect.ymin; + mval[0] = rect.xmin; + mval[1] = rect.ymin; UI_view2d_region_to_view(v2d, mval[0], mval[1], &rectf.xmin, &rectf.ymin); - mval[0]= rect.xmax; - mval[1]= rect.ymax; + mval[0] = rect.xmax; + mval[1] = rect.ymax; UI_view2d_region_to_view(v2d, mval[0], mval[1], &rectf.xmax, &rectf.ymax); #endif if (!extend) { - for (report= reports->list.first; report; report= report->next) { + for (report = reports->list.first; report; report = report->next) { - if ((report->type & report_mask)==0) + if ((report->type & report_mask) == 0) continue; report->flag &= ~SELECT; } } - report_min= info_text_pick(sinfo, ar, reports, rect.ymax); - report_max= info_text_pick(sinfo, ar, reports, rect.ymin); + report_min = info_text_pick(sinfo, ar, reports, rect.ymax); + report_max = info_text_pick(sinfo, ar, reports, rect.ymin); /* get the first report if none found */ - if (report_min==NULL) { + if (report_min == NULL) { // printf("find_min\n"); - for (report=reports->list.first; report; report=report->next) { + for (report = reports->list.first; report; report = report->next) { if (report->type & report_mask) { - report_min= report; + report_min = report; break; } } } - if (report_max==NULL) { + if (report_max == NULL) { // printf("find_max\n"); - for (report=reports->list.last; report; report=report->prev) { + for (report = reports->list.last; report; report = report->prev) { if (report->type & report_mask) { - report_max= report; + report_max = report; break; } } } - if (report_min==NULL || report_max==NULL) + if (report_min == NULL || report_max == NULL) return OPERATOR_CANCELLED; - for (report= report_min; (report != report_max->next); report= report->next) { + for (report = report_min; (report != report_max->next); report = report->next) { - if ((report->type & report_mask)==0) + if ((report->type & report_mask) == 0) continue; if (selecting) @@ -326,16 +326,16 @@ void INFO_OT_select_border(wmOperatorType *ot) static int report_delete_exec(bContext *C, wmOperator *UNUSED(op)) { - SpaceInfo *sinfo= CTX_wm_space_info(C); - ReportList *reports= CTX_wm_reports(C); - int report_mask= info_report_mask(sinfo); + SpaceInfo *sinfo = CTX_wm_space_info(C); + ReportList *reports = CTX_wm_reports(C); + int report_mask = info_report_mask(sinfo); Report *report, *report_next; - for (report=reports->list.first; report; ) { + for (report = reports->list.first; report; ) { - report_next=report->next; + report_next = report->next; if ((report->type & report_mask) && (report->flag & SELECT)) { BLI_remlink(&reports->list, report); @@ -343,7 +343,7 @@ static int report_delete_exec(bContext *C, wmOperator *UNUSED(op)) MEM_freeN(report); } - report= report_next; + report = report_next; } ED_area_tag_redraw(CTX_wm_area(C)); @@ -371,23 +371,23 @@ void INFO_OT_report_delete(wmOperatorType *ot) static int report_copy_exec(bContext *C, wmOperator *UNUSED(op)) { - SpaceInfo *sinfo= CTX_wm_space_info(C); - ReportList *reports= CTX_wm_reports(C); - int report_mask= info_report_mask(sinfo); + SpaceInfo *sinfo = CTX_wm_space_info(C); + ReportList *reports = CTX_wm_reports(C); + int report_mask = info_report_mask(sinfo); Report *report; - DynStr *buf_dyn= BLI_dynstr_new(); + DynStr *buf_dyn = BLI_dynstr_new(); char *buf_str; - for (report=reports->list.first; report; report= report->next) { + for (report = reports->list.first; report; report = report->next) { if ((report->type & report_mask) && (report->flag & SELECT)) { BLI_dynstr_append(buf_dyn, report->message); BLI_dynstr_append(buf_dyn, "\n"); } } - buf_str= BLI_dynstr_get_cstring(buf_dyn); + buf_str = BLI_dynstr_get_cstring(buf_dyn); BLI_dynstr_free(buf_dyn); WM_clipboard_text_set(buf_str, 0); diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c index a736fd01b2c..1c2f43f67a4 100644 --- a/source/blender/editors/space_info/info_stats.c +++ b/source/blender/editors/space_info/info_stats.c @@ -68,78 +68,78 @@ typedef struct SceneStats { static void stats_object(Object *ob, int sel, int totob, SceneStats *stats) { - switch(ob->type) { - case OB_MESH: { - /* we assume derivedmesh is already built, this strictly does stats now. */ - DerivedMesh *dm= ob->derivedFinal; - int totvert, totedge, totface; - - stats->totmesh +=totob; - - if (dm) { - totvert = dm->getNumVerts(dm); - totedge = dm->getNumEdges(dm); - totface = dm->getNumPolys(dm); - - stats->totvert += totvert*totob; - stats->totedge += totedge*totob; - stats->totface += totface*totob; - - if (sel) { - stats->totvertsel += totvert; - stats->totfacesel += totface; + switch (ob->type) { + case OB_MESH: { + /* we assume derivedmesh is already built, this strictly does stats now. */ + DerivedMesh *dm = ob->derivedFinal; + int totvert, totedge, totface; + + stats->totmesh += totob; + + if (dm) { + totvert = dm->getNumVerts(dm); + totedge = dm->getNumEdges(dm); + totface = dm->getNumPolys(dm); + + stats->totvert += totvert * totob; + stats->totedge += totedge * totob; + stats->totface += totface * totob; + + if (sel) { + stats->totvertsel += totvert; + stats->totfacesel += totface; + } } + break; } - break; - } - case OB_LAMP: - stats->totlamp += totob; - break; - case OB_SURF: - case OB_CURVE: - case OB_FONT: { - int tot= 0, totf= 0; + case OB_LAMP: + stats->totlamp += totob; + break; + case OB_SURF: + case OB_CURVE: + case OB_FONT: { + int tot = 0, totf = 0; - stats->totcurve += totob; + stats->totcurve += totob; - if (ob->disp.first) - count_displist(&ob->disp, &tot, &totf); + if (ob->disp.first) + count_displist(&ob->disp, &tot, &totf); - tot *= totob; - totf *= totob; + tot *= totob; + totf *= totob; - stats->totvert+= tot; - stats->totface+= totf; + stats->totvert += tot; + stats->totface += totf; - if (sel) { - stats->totvertsel += tot; - stats->totfacesel += totf; + if (sel) { + stats->totvertsel += tot; + stats->totfacesel += totf; + } + break; } - break; - } - case OB_MBALL: { - int tot= 0, totf= 0; + case OB_MBALL: { + int tot = 0, totf = 0; - count_displist(&ob->disp, &tot, &totf); + count_displist(&ob->disp, &tot, &totf); - tot *= totob; - totf *= totob; + tot *= totob; + totf *= totob; - stats->totvert += tot; - stats->totface += totf; + stats->totvert += tot; + stats->totface += totf; - if (sel) { - stats->totvertsel += tot; - stats->totfacesel += totf; + if (sel) { + stats->totvertsel += tot; + stats->totfacesel += totf; + } + break; } - break; - } } } static void stats_object_edit(Object *obedit, SceneStats *stats) { - if (obedit->type==OB_MESH) { + if (obedit->type == OB_MESH) { BMEditMesh *em = BMEdit_FromObject(obedit); stats->totvert = em->bm->totvert; @@ -151,12 +151,12 @@ static void stats_object_edit(Object *obedit, SceneStats *stats) stats->totface = em->bm->totface; stats->totfacesel = em->bm->totfacesel; } - else if (obedit->type==OB_ARMATURE) { + else if (obedit->type == OB_ARMATURE) { /* Armature Edit */ - bArmature *arm= obedit->data; + bArmature *arm = obedit->data; EditBone *ebo; - for (ebo=arm->edbo->first; ebo; ebo=ebo->next) { + for (ebo = arm->edbo->first; ebo; ebo = ebo->next) { stats->totbone++; if ((ebo->flag & BONE_CONNECTED) && ebo->parent) @@ -170,27 +170,27 @@ static void stats_object_edit(Object *obedit, SceneStats *stats) if (ebo->flag & BONE_SELECTED) stats->totbonesel++; /* if this is a connected child and it's parent is being moved, remove our root */ - if ((ebo->flag & BONE_CONNECTED)&& (ebo->flag & BONE_ROOTSEL) && ebo->parent && (ebo->parent->flag & BONE_TIPSEL)) + if ((ebo->flag & BONE_CONNECTED) && (ebo->flag & BONE_ROOTSEL) && ebo->parent && (ebo->parent->flag & BONE_TIPSEL)) stats->totvertsel--; - stats->totvert+=2; + stats->totvert += 2; } } else if (ELEM(obedit->type, OB_CURVE, OB_SURF)) { /* OB_FONT has no cu->editnurb */ /* Curve Edit */ - Curve *cu= obedit->data; + Curve *cu = obedit->data; Nurb *nu; BezTriple *bezt; BPoint *bp; int a; - ListBase *nurbs= curve_editnurbs(cu); + ListBase *nurbs = curve_editnurbs(cu); - for (nu=nurbs->first; nu; nu=nu->next) { + for (nu = nurbs->first; nu; nu = nu->next) { if (nu->type == CU_BEZIER) { - bezt= nu->bezt; - a= nu->pntsu; + bezt = nu->bezt; + a = nu->pntsu; while (a--) { - stats->totvert+=3; + stats->totvert += 3; if (bezt->f1) stats->totvertsel++; if (bezt->f2) stats->totvertsel++; if (bezt->f3) stats->totvertsel++; @@ -198,8 +198,8 @@ static void stats_object_edit(Object *obedit, SceneStats *stats) } } else { - bp= nu->bp; - a= nu->pntsu*nu->pntsv; + bp = nu->bp; + a = nu->pntsu * nu->pntsv; while (a--) { stats->totvert++; if (bp->f1 & SELECT) stats->totvertsel++; @@ -208,26 +208,26 @@ static void stats_object_edit(Object *obedit, SceneStats *stats) } } } - else if (obedit->type==OB_MBALL) { + else if (obedit->type == OB_MBALL) { /* MetaBall Edit */ - MetaBall *mball= obedit->data; + MetaBall *mball = obedit->data; MetaElem *ml; - for (ml= mball->editelems->first; ml; ml=ml->next) { + for (ml = mball->editelems->first; ml; ml = ml->next) { stats->totvert++; if (ml->flag & SELECT) stats->totvertsel++; } } - else if (obedit->type==OB_LATTICE) { + else if (obedit->type == OB_LATTICE) { /* Lattice Edit */ - Lattice *lt= obedit->data; - Lattice *editlatt= lt->editlatt->latt; + Lattice *lt = obedit->data; + Lattice *editlatt = lt->editlatt->latt; BPoint *bp; int a; - bp= editlatt->def; + bp = editlatt->def; - a= editlatt->pntsu*editlatt->pntsv*editlatt->pntsw; + a = editlatt->pntsu * editlatt->pntsv * editlatt->pntsw; while (a--) { stats->totvert++; if (bp->f1 & SELECT) stats->totvertsel++; @@ -239,10 +239,10 @@ static void stats_object_edit(Object *obedit, SceneStats *stats) static void stats_object_pose(Object *ob, SceneStats *stats) { if (ob->pose) { - bArmature *arm= ob->data; + bArmature *arm = ob->data; bPoseChannel *pchan; - for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) { + for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { stats->totbone++; if (pchan->bone && (pchan->bone->flag & BONE_SELECTED)) if (pchan->bone->layer & arm->layer) @@ -260,22 +260,22 @@ static void stats_dupli_object(Base *base, Object *ob, SceneStats *stats) ParticleSystem *psys; ParticleSettings *part; - for (psys=ob->particlesystem.first; psys; psys=psys->next) { - part=psys->part; + for (psys = ob->particlesystem.first; psys; psys = psys->next) { + part = psys->part; - if (part->draw_as==PART_DRAW_OB && part->dup_ob) { - int tot=count_particles(psys); + if (part->draw_as == PART_DRAW_OB && part->dup_ob) { + int tot = count_particles(psys); stats_object(part->dup_ob, 0, tot, stats); } - else if (part->draw_as==PART_DRAW_GR && part->dup_group) { + else if (part->draw_as == PART_DRAW_GR && part->dup_group) { GroupObject *go; - int tot, totgroup=0, cur=0; + int tot, totgroup = 0, cur = 0; - for (go= part->dup_group->gobject.first; go; go=go->next) + for (go = part->dup_group->gobject.first; go; go = go->next) totgroup++; - for (go= part->dup_group->gobject.first; go; go=go->next) { - tot=count_particles_mod(psys,totgroup,cur); + for (go = part->dup_group->gobject.first; go; go = go->next) { + tot = count_particles_mod(psys, totgroup, cur); stats_object(go->ob, 0, tot, stats); cur++; } @@ -285,22 +285,22 @@ static void stats_dupli_object(Base *base, Object *ob, SceneStats *stats) stats_object(ob, base->flag & SELECT, 1, stats); stats->totobj++; } - else if (ob->parent && (ob->parent->transflag & (OB_DUPLIVERTS|OB_DUPLIFACES))) { + else if (ob->parent && (ob->parent->transflag & (OB_DUPLIVERTS | OB_DUPLIFACES))) { /* Dupli Verts/Faces */ - int tot= count_duplilist(ob->parent); - stats->totobj+=tot; + int tot = count_duplilist(ob->parent); + stats->totobj += tot; stats_object(ob, base->flag & SELECT, tot, stats); } else if (ob->transflag & OB_DUPLIFRAMES) { /* Dupli Frames */ - int tot= count_duplilist(ob); - stats->totobj+=tot; + int tot = count_duplilist(ob); + stats->totobj += tot; stats_object(ob, base->flag & SELECT, tot, stats); } else if ((ob->transflag & OB_DUPLIGROUP) && ob->dup_group) { /* Dupli Group */ - int tot= count_duplilist(ob); - stats->totobj+=tot; + int tot = count_duplilist(ob); + stats->totobj += tot; stats_object(ob, base->flag & SELECT, tot, stats); } else { @@ -313,8 +313,8 @@ static void stats_dupli_object(Base *base, Object *ob, SceneStats *stats) /* Statistics displayed in info header. Called regularly on scene changes. */ static void stats_update(Scene *scene) { - SceneStats stats= {0}; - Object *ob= (scene->basact)? scene->basact->object: NULL; + SceneStats stats = {0}; + Object *ob = (scene->basact) ? scene->basact->object : NULL; Base *base; if (scene->obedit) { @@ -327,78 +327,78 @@ static void stats_update(Scene *scene) } else { /* Objects */ - for (base= scene->base.first; base; base=base->next) + for (base = scene->base.first; base; base = base->next) if (scene->lay & base->lay) stats_dupli_object(base, base->object, &stats); } if (!scene->stats) - scene->stats= MEM_callocN(sizeof(SceneStats), "SceneStats"); + scene->stats = MEM_callocN(sizeof(SceneStats), "SceneStats"); - *(scene->stats)= stats; + *(scene->stats) = stats; } static void stats_string(Scene *scene) { - SceneStats *stats= scene->stats; - Object *ob= (scene->basact)? scene->basact->object: NULL; + SceneStats *stats = scene->stats; + Object *ob = (scene->basact) ? scene->basact->object : NULL; uintptr_t mem_in_use, mmap_in_use; char memstr[64]; char *s; - mem_in_use= MEM_get_memory_in_use(); - mmap_in_use= MEM_get_mapped_memory_in_use(); + mem_in_use = MEM_get_memory_in_use(); + mmap_in_use = MEM_get_mapped_memory_in_use(); /* get memory statistics */ - s= memstr + sprintf(memstr, " | Mem:%.2fM", (double)((mem_in_use-mmap_in_use)>>10)/1024.0); + s = memstr + sprintf(memstr, " | Mem:%.2fM", (double)((mem_in_use - mmap_in_use) >> 10) / 1024.0); if (mmap_in_use) - sprintf(s, " (%.2fM)", (double)((mmap_in_use)>>10)/1024.0); + sprintf(s, " (%.2fM)", (double)((mmap_in_use) >> 10) / 1024.0); - s= stats->infostr; + s = stats->infostr; - s+= sprintf(s, "%s | ", versionstr); + s += sprintf(s, "%s | ", versionstr); if (scene->obedit) { if (ob_get_keyblock(scene->obedit)) - s+= sprintf(s, "(Key) "); + s += sprintf(s, "(Key) "); - if (scene->obedit->type==OB_MESH) { + if (scene->obedit->type == OB_MESH) { if (scene->toolsettings->selectmode & SCE_SELECT_VERTEX) - s+= sprintf(s, "Ve:%d-%d | Ed:%d-%d | Fa:%d-%d", - stats->totvertsel, stats->totvert, stats->totedgesel, stats->totedge, stats->totfacesel, stats->totface); + s += sprintf(s, "Ve:%d-%d | Ed:%d-%d | Fa:%d-%d", + stats->totvertsel, stats->totvert, stats->totedgesel, stats->totedge, stats->totfacesel, stats->totface); else if (scene->toolsettings->selectmode & SCE_SELECT_EDGE) - s+= sprintf(s, "Ed:%d-%d | Fa:%d-%d", - stats->totedgesel, stats->totedge, stats->totfacesel, stats->totface); + s += sprintf(s, "Ed:%d-%d | Fa:%d-%d", + stats->totedgesel, stats->totedge, stats->totfacesel, stats->totface); else - s+= sprintf(s, "Fa:%d-%d", stats->totfacesel, stats->totface); + s += sprintf(s, "Fa:%d-%d", stats->totfacesel, stats->totface); } - else if (scene->obedit->type==OB_ARMATURE) { - s+= sprintf(s, "Ve:%d-%d | Bo:%d-%d", stats->totvertsel, stats->totvert, stats->totbonesel, stats->totbone); + else if (scene->obedit->type == OB_ARMATURE) { + s += sprintf(s, "Ve:%d-%d | Bo:%d-%d", stats->totvertsel, stats->totvert, stats->totbonesel, stats->totbone); } else { - s+= sprintf(s, "Ve:%d-%d", stats->totvertsel, stats->totvert); + s += sprintf(s, "Ve:%d-%d", stats->totvertsel, stats->totvert); } strcat(s, memstr); } else if (ob && (ob->mode & OB_MODE_POSE)) { s += sprintf(s, "Bo:%d-%d %s", - stats->totbonesel, stats->totbone, memstr); + stats->totbonesel, stats->totbone, memstr); } else { s += sprintf(s, "Ve:%d | Fa:%d | Ob:%d-%d | La:%d%s", - stats->totvert, stats->totface, stats->totobjsel, stats->totobj, stats->totlamp, memstr); + stats->totvert, stats->totface, stats->totobjsel, stats->totobj, stats->totlamp, memstr); } if (ob) - sprintf(s, " | %s", ob->id.name+2); + sprintf(s, " | %s", ob->id.name + 2); } void ED_info_stats_clear(Scene *scene) { if (scene->stats) { MEM_freeN(scene->stats); - scene->stats= NULL; + scene->stats = NULL; } } diff --git a/source/blender/editors/space_info/space_info.c b/source/blender/editors/space_info/space_info.c index 9dc58537145..7cb89b6bc6b 100644 --- a/source/blender/editors/space_info/space_info.c +++ b/source/blender/editors/space_info/space_info.c @@ -57,7 +57,7 @@ #include "UI_interface.h" #include "UI_view2d.h" -#include "info_intern.h" // own include +#include "info_intern.h" /* own include */ /* ******************** default callbacks for info space ***************** */ @@ -66,31 +66,31 @@ static SpaceLink *info_new(const bContext *UNUSED(C)) ARegion *ar; SpaceInfo *sinfo; - sinfo= MEM_callocN(sizeof(SpaceInfo), "initinfo"); - sinfo->spacetype= SPACE_INFO; + sinfo = MEM_callocN(sizeof(SpaceInfo), "initinfo"); + sinfo->spacetype = SPACE_INFO; - sinfo->rpt_mask= INFO_RPT_OP; + sinfo->rpt_mask = INFO_RPT_OP; /* header */ - ar= MEM_callocN(sizeof(ARegion), "header for info"); + ar = MEM_callocN(sizeof(ARegion), "header for info"); BLI_addtail(&sinfo->regionbase, ar); - ar->regiontype= RGN_TYPE_HEADER; - ar->alignment= RGN_ALIGN_BOTTOM; + ar->regiontype = RGN_TYPE_HEADER; + ar->alignment = RGN_ALIGN_BOTTOM; /* main area */ - ar= MEM_callocN(sizeof(ARegion), "main area for info"); + ar = MEM_callocN(sizeof(ARegion), "main area for info"); BLI_addtail(&sinfo->regionbase, ar); - ar->regiontype= RGN_TYPE_WINDOW; + ar->regiontype = RGN_TYPE_WINDOW; /* keep in sync with console */ ar->v2d.scroll |= (V2D_SCROLL_RIGHT); - ar->v2d.align |= V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_NEG_Y; /* align bottom left */ + ar->v2d.align |= V2D_ALIGN_NO_NEG_X | V2D_ALIGN_NO_NEG_Y; /* align bottom left */ ar->v2d.keepofs |= V2D_LOCKOFS_X; - ar->v2d.keepzoom = (V2D_LOCKZOOM_X|V2D_LOCKZOOM_Y|V2D_LIMITZOOM|V2D_KEEPASPECT); - ar->v2d.keeptot= V2D_KEEPTOT_BOUNDS; - ar->v2d.minzoom= ar->v2d.maxzoom= 1.0f; + ar->v2d.keepzoom = (V2D_LOCKZOOM_X | V2D_LOCKZOOM_Y | V2D_LIMITZOOM | V2D_KEEPASPECT); + ar->v2d.keeptot = V2D_KEEPTOT_BOUNDS; + ar->v2d.minzoom = ar->v2d.maxzoom = 1.0f; /* for now, aspect ratio should be maintained, and zoom is clamped within sane default limits */ //ar->v2d.keepzoom= (V2D_KEEPASPECT|V2D_LIMITZOOM); @@ -114,7 +114,7 @@ static void info_init(struct wmWindowManager *UNUSED(wm), ScrArea *UNUSED(sa)) static SpaceLink *info_duplicate(SpaceLink *sl) { - SpaceInfo *sinfon= MEM_dupallocN(sl); + SpaceInfo *sinfon = MEM_dupallocN(sl); /* clear or remove stuff from old */ @@ -137,17 +137,17 @@ static void info_main_area_init(wmWindowManager *wm, ARegion *ar) static void info_textview_update_rect(const bContext *C, ARegion *ar) { - SpaceInfo *sinfo= CTX_wm_space_info(C); - View2D *v2d= &ar->v2d; + SpaceInfo *sinfo = CTX_wm_space_info(C); + View2D *v2d = &ar->v2d; - UI_view2d_totRect_set(v2d, ar->winx-1, info_textview_height(sinfo, ar, CTX_wm_reports(C))); + UI_view2d_totRect_set(v2d, ar->winx - 1, info_textview_height(sinfo, ar, CTX_wm_reports(C))); } static void info_main_area_draw(const bContext *C, ARegion *ar) { /* draw entirely, view changes should be handled here */ - SpaceInfo *sinfo= CTX_wm_space_info(C); - View2D *v2d= &ar->v2d; + SpaceInfo *sinfo = CTX_wm_space_info(C); + View2D *v2d = &ar->v2d; View2DScrollers *scrollers; /* clear and setup matrix */ @@ -169,7 +169,7 @@ static void info_main_area_draw(const bContext *C, ARegion *ar) UI_view2d_view_restore(C); /* scrollers */ - scrollers= UI_view2d_scrollers_calc(C, v2d, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_GRID_CLAMP); + scrollers = UI_view2d_scrollers_calc(C, v2d, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_GRID_CLAMP); UI_view2d_scrollers_draw(C, v2d, scrollers); UI_view2d_scrollers_free(scrollers); } @@ -231,7 +231,7 @@ static void info_main_area_listener(ARegion *ar, wmNotifier *wmn) // SpaceInfo *sinfo= sa->spacedata.first; /* context changes */ - switch(wmn->category) { + switch (wmn->category) { case NC_SPACE: if (wmn->data == ND_SPACE_INFO_REPORT) { /* redraw also but only for report view, could do less redraws by checking the type */ @@ -244,7 +244,7 @@ static void info_main_area_listener(ARegion *ar, wmNotifier *wmn) static void info_header_listener(ARegion *ar, wmNotifier *wmn) { /* context changes */ - switch(wmn->category) { + switch (wmn->category) { case NC_SCREEN: if (ELEM(wmn->data, ND_SCREENCAST, ND_ANIMPLAY)) ED_region_tag_redraw(ar); @@ -254,7 +254,7 @@ static void info_header_listener(ARegion *ar, wmNotifier *wmn) ED_region_tag_redraw(ar); break; case NC_SCENE: - if (wmn->data==ND_RENDER_RESULT) + if (wmn->data == ND_RENDER_RESULT) ED_region_tag_redraw(ar); break; case NC_SPACE: @@ -271,7 +271,7 @@ static void info_header_listener(ARegion *ar, wmNotifier *wmn) static void recent_files_menu_draw(const bContext *UNUSED(C), Menu *menu) { struct RecentFile *recent; - uiLayout *layout= menu->layout; + uiLayout *layout = menu->layout; uiLayoutSetOperatorContext(layout, WM_OP_EXEC_REGION_WIN); if (G.recent_files.first) { for (recent = G.recent_files.first; (recent); recent = recent->next) { @@ -287,49 +287,49 @@ static void recent_files_menu_register(void) { MenuType *mt; - mt= MEM_callocN(sizeof(MenuType), "spacetype info menu recent files"); + mt = MEM_callocN(sizeof(MenuType), "spacetype info menu recent files"); strcpy(mt->idname, "INFO_MT_file_open_recent"); strcpy(mt->label, N_("Open Recent...")); - mt->draw= recent_files_menu_draw; + mt->draw = recent_files_menu_draw; WM_menutype_add(mt); } /* only called once, from space/spacetypes.c */ void ED_spacetype_info(void) { - SpaceType *st= MEM_callocN(sizeof(SpaceType), "spacetype info"); + SpaceType *st = MEM_callocN(sizeof(SpaceType), "spacetype info"); ARegionType *art; - st->spaceid= SPACE_INFO; + st->spaceid = SPACE_INFO; strncpy(st->name, "Info", BKE_ST_MAXNAME); - st->new= info_new; - st->free= info_free; - st->init= info_init; - st->duplicate= info_duplicate; - st->operatortypes= info_operatortypes; - st->keymap= info_keymap; + st->new = info_new; + st->free = info_free; + st->init = info_init; + st->duplicate = info_duplicate; + st->operatortypes = info_operatortypes; + st->keymap = info_keymap; /* regions: main window */ - art= MEM_callocN(sizeof(ARegionType), "spacetype info region"); + art = MEM_callocN(sizeof(ARegionType), "spacetype info region"); art->regionid = RGN_TYPE_WINDOW; - art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D; + art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D; - art->init= info_main_area_init; - art->draw= info_main_area_draw; - art->listener= info_main_area_listener; + art->init = info_main_area_init; + art->draw = info_main_area_draw; + art->listener = info_main_area_listener; BLI_addhead(&st->regiontypes, art); /* regions: header */ - art= MEM_callocN(sizeof(ARegionType), "spacetype info region"); + art = MEM_callocN(sizeof(ARegionType), "spacetype info region"); art->regionid = RGN_TYPE_HEADER; - art->prefsizey= HEADERY; + art->prefsizey = HEADERY; - art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D|ED_KEYMAP_FRAMES|ED_KEYMAP_HEADER; - art->listener= info_header_listener; - art->init= info_header_area_init; - art->draw= info_header_area_draw; + art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES | ED_KEYMAP_HEADER; + art->listener = info_header_listener; + art->init = info_header_area_init; + art->draw = info_header_area_draw; BLI_addhead(&st->regiontypes, art); diff --git a/source/blender/editors/space_info/textview.c b/source/blender/editors/space_info/textview.c index c55ba069e11..4ba196276da 100644 --- a/source/blender/editors/space_info/textview.c +++ b/source/blender/editors/space_info/textview.c @@ -47,7 +47,7 @@ static void console_font_begin(TextViewContext *sc) { - BLF_size(blf_mono_font, sc->lheight-2, 72); + BLF_size(blf_mono_font, sc->lheight - 2, 72); } typedef struct ConsoleDrawContext { @@ -71,14 +71,14 @@ static void console_draw_sel(int sel[2], int xy[2], int str_len_draw, int cwidth glEnable(GL_POLYGON_STIPPLE); glPolygonStipple(stipple_halftone); - glEnable( GL_BLEND ); + glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glColor4ub(255, 255, 255, 96); - glRecti(xy[0]+(cwidth*sta), xy[1]-2 + lheight, xy[0]+(cwidth*end), xy[1]-2); + glRecti(xy[0] + (cwidth * sta), xy[1] - 2 + lheight, xy[0] + (cwidth * end), xy[1] - 2); glDisable(GL_POLYGON_STIPPLE); - glDisable( GL_BLEND ); + glDisable(GL_BLEND); } } @@ -89,13 +89,13 @@ static void console_draw_sel(int sel[2], int xy[2], int str_len_draw, int cwidth static int console_draw_string(ConsoleDrawContext *cdc, const char *str, int str_len, unsigned char *fg, unsigned char *bg) { #define STEP_SEL(value) cdc->sel[0] += (value); cdc->sel[1] += (value) - int rct_ofs= cdc->lheight/4; - int tot_lines = (str_len/cdc->console_width)+1; /* total number of lines for wrapping */ - int y_next = (str_len > cdc->console_width) ? cdc->xy[1]+cdc->lheight*tot_lines : cdc->xy[1]+cdc->lheight; - const int mono= blf_mono_font; + int rct_ofs = cdc->lheight / 4; + int tot_lines = (str_len / cdc->console_width) + 1; /* total number of lines for wrapping */ + int y_next = (str_len > cdc->console_width) ? cdc->xy[1] + cdc->lheight * tot_lines : cdc->xy[1] + cdc->lheight; + const int mono = blf_mono_font; /* just advance the height */ - if (cdc->draw==0) { + if (cdc->draw == 0) { if (cdc->pos_pick && (cdc->mval[1] != INT_MAX)) { if (cdc->xy[1] <= cdc->mval[1]) { if ((y_next >= cdc->mval[1])) { @@ -103,7 +103,7 @@ static int console_draw_string(ConsoleDrawContext *cdc, const char *str, int str /* wrap */ if (str_len > cdc->console_width) - ofs += (cdc->console_width * ((int)((((float)(y_next - cdc->mval[1]) / (float)(y_next-cdc->xy[1])) * tot_lines)))); + ofs += (cdc->console_width * ((int)((((float)(y_next - cdc->mval[1]) / (float)(y_next - cdc->xy[1])) * tot_lines)))); CLAMP(ofs, 0, str_len); *cdc->pos_pick += str_len - ofs; @@ -113,12 +113,12 @@ static int console_draw_string(ConsoleDrawContext *cdc, const char *str, int str } } - cdc->xy[1]= y_next; + cdc->xy[1] = y_next; return 1; } - else if (y_next-cdc->lheight < cdc->ymin) { + else if (y_next - cdc->lheight < cdc->ymin) { /* have not reached the drawable area so don't break */ - cdc->xy[1]= y_next; + cdc->xy[1] = y_next; /* adjust selection even if not drawing */ if (cdc->sel[0] != cdc->sel[1]) { @@ -129,8 +129,8 @@ static int console_draw_string(ConsoleDrawContext *cdc, const char *str, int str } if (str_len > cdc->console_width) { /* wrap? */ - const int initial_offset= ((tot_lines-1) * cdc->console_width); - const char *line_stride= str + initial_offset; /* advance to the last line and draw it first */ + const int initial_offset = ((tot_lines - 1) * cdc->console_width); + const char *line_stride = str + initial_offset; /* advance to the last line and draw it first */ int sel_orig[2]; copy_v2_v2_int(sel_orig, cdc->sel); @@ -141,7 +141,7 @@ static int console_draw_string(ConsoleDrawContext *cdc, const char *str, int str if (bg) { glColor3ubv(bg); - glRecti(0, cdc->xy[1]-rct_ofs, cdc->winx, (cdc->xy[1]+(cdc->lheight*tot_lines))+rct_ofs); + glRecti(0, cdc->xy[1] - rct_ofs, cdc->winx, (cdc->xy[1] + (cdc->lheight * tot_lines)) + rct_ofs); } glColor3ubv(fg); @@ -187,7 +187,7 @@ static int console_draw_string(ConsoleDrawContext *cdc, const char *str, int str if (bg) { glColor3ubv(bg); - glRecti(0, cdc->xy[1]-rct_ofs, cdc->winx, cdc->xy[1]+cdc->lheight-rct_ofs); + glRecti(0, cdc->xy[1] - rct_ofs, cdc->winx, cdc->xy[1] + cdc->lheight - rct_ofs); } glColor3ubv(fg); @@ -198,8 +198,8 @@ static int console_draw_string(ConsoleDrawContext *cdc, const char *str, int str if (cdc->sel[0] != cdc->sel[1]) { int isel[2]; - isel[0]= str_len - cdc->sel[1]; - isel[1]= str_len - cdc->sel[0]; + isel[0] = str_len - cdc->sel[1]; + isel[1] = str_len - cdc->sel[0]; // glColor4ub(255, 255, 0, 96); // debug console_draw_sel(isel, cdc->xy, str_len, cdc->cwidth, cdc->lheight); @@ -221,17 +221,17 @@ static int console_draw_string(ConsoleDrawContext *cdc, const char *str, int str int textview_draw(TextViewContext *tvc, int draw, int mval[2], void **mouse_pick, int *pos_pick) { - ConsoleDrawContext cdc= {0}; + ConsoleDrawContext cdc = {0}; - int x_orig=CONSOLE_DRAW_MARGIN, y_orig=CONSOLE_DRAW_MARGIN + tvc->lheight/6; + int x_orig = CONSOLE_DRAW_MARGIN, y_orig = CONSOLE_DRAW_MARGIN + tvc->lheight / 6; int xy[2], y_prev; - int sel[2]= {-1, -1}; /* defaults disabled */ + int sel[2] = {-1, -1}; /* defaults disabled */ unsigned char fg[3], bg[3]; - const int mono= blf_mono_font; + const int mono = blf_mono_font; console_font_begin(tvc); - xy[0]= x_orig; xy[1]= y_orig; + xy[0] = x_orig; xy[1] = y_orig; if (mval[1] != INT_MAX) mval[1] += (tvc->ymin + CONSOLE_DRAW_MARGIN); @@ -240,28 +240,28 @@ int textview_draw(TextViewContext *tvc, int draw, int mval[2], void **mouse_pick *pos_pick = 0; /* constants for the sequencer context */ - cdc.cwidth= (int)BLF_fixed_width(mono); + cdc.cwidth = (int)BLF_fixed_width(mono); assert(cdc.cwidth > 0); - cdc.lheight= tvc->lheight; - cdc.console_width= (tvc->winx - (CONSOLE_DRAW_SCROLL + CONSOLE_DRAW_MARGIN*2) ) / cdc.cwidth; + cdc.lheight = tvc->lheight; + cdc.console_width = (tvc->winx - (CONSOLE_DRAW_SCROLL + CONSOLE_DRAW_MARGIN * 2) ) / cdc.cwidth; CLAMP(cdc.console_width, 1, INT_MAX); /* avoid divide by zero on small windows */ - cdc.winx= tvc->winx-(CONSOLE_DRAW_MARGIN+CONSOLE_DRAW_SCROLL); + cdc.winx = tvc->winx - (CONSOLE_DRAW_MARGIN + CONSOLE_DRAW_SCROLL); cdc.ymin = tvc->ymin; cdc.ymax = tvc->ymax; - cdc.xy= xy; - cdc.sel= sel; - cdc.pos_pick= pos_pick; - cdc.mval= mval; - cdc.draw= draw; + cdc.xy = xy; + cdc.sel = sel; + cdc.pos_pick = pos_pick; + cdc.mval = mval; + cdc.draw = draw; /* shouldnt be needed */ - tvc->cwidth= cdc.cwidth; - tvc->console_width= cdc.console_width; - tvc->iter_index= 0; + tvc->cwidth = cdc.cwidth; + tvc->console_width = cdc.console_width; + tvc->iter_index = 0; if (tvc->sel_start != tvc->sel_end) { - sel[0]= tvc->sel_start; - sel[1]= tvc->sel_end; + sel[0] = tvc->sel_start; + sel[1] = tvc->sel_end; } if (tvc->begin(tvc)) { @@ -269,12 +269,12 @@ int textview_draw(TextViewContext *tvc, int draw, int mval[2], void **mouse_pick do { const char *ext_line; int ext_len; - int color_flag= 0; + int color_flag = 0; - y_prev= xy[1]; + y_prev = xy[1]; if (draw) - color_flag= tvc->line_color(tvc, fg, bg); + color_flag = tvc->line_color(tvc, fg, bg); tvc->line_get(tvc, &ext_line, &ext_len); @@ -286,7 +286,7 @@ int textview_draw(TextViewContext *tvc, int draw, int mval[2], void **mouse_pick } if ((mval[1] != INT_MAX) && (mval[1] >= y_prev && mval[1] <= xy[1])) { - *mouse_pick= (void *)tvc->iter; + *mouse_pick = (void *)tvc->iter; break; } -- cgit v1.2.3 From b8bb3f2e3c52186b388dedba7cc0a950adf2d0a2 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Wed, 28 Mar 2012 22:03:46 +0000 Subject: Partial fix for array modifier vertex merge (bug 30195). Two fixes: * The find-doubles operator was overriding the "dirty" element indices, so vertices were not being mapped correctly. * In some cases a vertex can be set to merge with a vertex that is also set to be merged, so added a loop to find the first unmerged vert in this case. Not yet working is the "First Last" merge option. Also made some cleanups and added comments in the array/remove doubles code. --- source/blender/bmesh/operators/bmo_removedoubles.c | 7 +- source/blender/modifiers/intern/MOD_array.c | 126 ++++++++++++--------- 2 files changed, 77 insertions(+), 56 deletions(-) (limited to 'source/blender') diff --git a/source/blender/bmesh/operators/bmo_removedoubles.c b/source/blender/bmesh/operators/bmo_removedoubles.c index a5e4cd31f41..5bf40e6fd38 100644 --- a/source/blender/bmesh/operators/bmo_removedoubles.c +++ b/source/blender/bmesh/operators/bmo_removedoubles.c @@ -103,6 +103,7 @@ void bmo_weldverts_exec(BMesh *bm, BMOperator *op) BMFace *f, *f2; int a, b; + /* mark merge verts for deletion */ BM_ITER(v, &iter, bm, BM_VERTS_OF_MESH, NULL) { if ((v2 = BMO_slot_map_ptr_get(bm, op, "targetmap", v))) { BMO_elem_flag_enable(bm, v, ELE_DEL); @@ -112,10 +113,12 @@ void bmo_weldverts_exec(BMesh *bm, BMOperator *op) } } + /* check if any faces are getting their own corners merged + together, split face if so */ BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) { remdoubles_splitface(f, bm, op); } - + BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) { if (BMO_elem_flag_test(bm, e->v1, ELE_DEL) || BMO_elem_flag_test(bm, e->v2, ELE_DEL)) { v = BMO_slot_map_ptr_get(bm, op, "targetmap", e->v1); @@ -149,6 +152,8 @@ void bmo_weldverts_exec(BMesh *bm, BMOperator *op) } bm->elem_index_dirty |= BM_FACE; + /* faces get "modified" by creating new faces here, then at the + end the old faces are deleted */ BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) { if (!BMO_elem_flag_test(bm, f, FACE_MARK)) continue; diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c index 4bfe63dcaac..bf46c10b720 100644 --- a/source/blender/modifiers/intern/MOD_array.c +++ b/source/blender/modifiers/intern/MOD_array.c @@ -185,13 +185,60 @@ static void bm_merge_dm_transform(BMesh* bm, DerivedMesh *dm, float mat[4][4]) } } + +static int *find_doubles_index_map(BMesh *bm, BMOperator *dupe_op, + const ArrayModifierData *amd, + int *index_map_length) +{ + BMOperator find_op; + BMOIter oiter; + BMVert *v, *v2; + BMElem *ele; + int *index_map, i; + + BMO_op_initf(bm, &find_op, + "finddoubles verts=%av dist=%f keepverts=%s", + amd->merge_dist, dupe_op, "geom"); + + BMO_op_exec(bm, &find_op); + + i = 0; + BMO_ITER(ele, &oiter, bm, dupe_op, "geom", BM_ALL) { + BM_elem_index_set(ele, i); /* set_dirty */ + i++; + } + + BMO_ITER(ele, &oiter, bm, dupe_op, "newout", BM_ALL) { + BM_elem_index_set(ele, i); /* set_dirty */ + i++; + } + /* above loops over all, so set all to dirty, if this is somehow + * setting valid values, this line can be remvoed - campbell */ + bm->elem_index_dirty |= BM_VERT | BM_EDGE | BM_FACE; + + (*index_map_length) = i; + index_map = MEM_callocN(sizeof(int) * (*index_map_length), "index_map"); + + /*element type argument doesn't do anything here*/ + BMO_ITER(v, &oiter, bm, &find_op, "targetmapout", 0) { + v2 = BMO_iter_map_value_p(&oiter); + + index_map[BM_elem_index_get(v)] = BM_elem_index_get(v2) + 1; + } + + BMO_op_finish(bm, &find_op); + + return index_map; +} + + static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, Scene *scene, Object *ob, DerivedMesh *dm, int UNUSED(initFlags)) { DerivedMesh *result; BMEditMesh *em = DM_to_editbmesh(dm, NULL, FALSE); - BMOperator op, oldop, weldop; + BMOperator dupe_op, old_dupe_op, weld_op; int i, j, indexLen; /* offset matrix */ float offset[4][4]; @@ -290,65 +337,29 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, BMO_push(em->bm, NULL); bmesh_edit_begin(em->bm, 0); - BMO_op_init(em->bm, &weldop, "weldverts"); - BMO_op_initf(em->bm, &op, "dupe geom=%avef"); - oldop = op; + BMO_op_init(em->bm, &weld_op, "weldverts"); + BMO_op_initf(em->bm, &dupe_op, "dupe geom=%avef"); + old_dupe_op = dupe_op; for (j=0; j < count - 1; j++) { - BMVert *v, *v2; + BMVert *v, *v2, *v3; BMOpSlot *s1; BMOpSlot *s2; - BMO_op_initf(em->bm, &op, "dupe geom=%s", &oldop, j==0 ? "geom" : "newout"); - BMO_op_exec(em->bm, &op); - - s1 = BMO_slot_get(&op, "geom"); - s2 = BMO_slot_get(&op, "newout"); + BMO_op_initf(em->bm, &dupe_op, "dupe geom=%s", &old_dupe_op, j==0 ? "geom" : "newout"); + BMO_op_exec(em->bm, &dupe_op); - BMO_op_callf(em->bm, "transform mat=%m4 verts=%s", offset, &op, "newout"); + s1 = BMO_slot_get(&dupe_op, "geom"); + s2 = BMO_slot_get(&dupe_op, "newout"); - #define _E(s, i) ((BMVert **)(s)->data.buf)[i] + BMO_op_callf(em->bm, "transform mat=%m4 verts=%s", offset, &dupe_op, "newout"); /*calculate merge mapping*/ if (j == 0) { - BMOperator findop; - BMOIter oiter; - BMVert *v, *v2; - BMElem *ele; - - BMO_op_initf(em->bm, &findop, - "finddoubles verts=%av dist=%f keepverts=%s", - amd->merge_dist, &op, "geom"); - - i = 0; - BMO_ITER(ele, &oiter, em->bm, &op, "geom", BM_ALL) { - BM_elem_index_set(ele, i); /* set_dirty */ - i++; - } - - BMO_ITER(ele, &oiter, em->bm, &op, "newout", BM_ALL) { - BM_elem_index_set(ele, i); /* set_dirty */ - i++; - } - /* above loops over all, so set all to dirty, if this is somehow - * setting valid values, this line can be remvoed - campbell */ - em->bm->elem_index_dirty |= BM_VERT | BM_EDGE | BM_FACE; - - - BMO_op_exec(em->bm, &findop); - - indexLen = i; - indexMap = MEM_callocN(sizeof(int)*indexLen, "indexMap"); - - /*element type argument doesn't do anything here*/ - BMO_ITER(v, &oiter, em->bm, &findop, "targetmapout", 0) { - v2 = BMO_iter_map_value_p(&oiter); - - indexMap[BM_elem_index_get(v)] = BM_elem_index_get(v2)+1; - } - - BMO_op_finish(em->bm, &findop); + indexMap = find_doubles_index_map(em->bm, &dupe_op, + amd, &indexLen); } + #define _E(s, i) ((BMVert **)(s)->data.buf)[i] /* generate merge mapping using index map. we do this by using the * operator slots as lookup arrays.*/ #define E(i) (i) < s1->len ? _E(s1, i) : _E(s2, (i)-s1->len) @@ -359,17 +370,22 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, v = E(i); v2 = E(indexMap[i]-1); - BMO_slot_map_ptr_insert(em->bm, &weldop, "targetmap", v, v2); + /* check in case the target vertex (v2) is already marked + for merging */ + while((v3 = BMO_slot_map_ptr_get(em->bm, &weld_op, "targetmap", v2))) + v2 = v3; + + BMO_slot_map_ptr_insert(em->bm, &weld_op, "targetmap", v, v2); } #undef E #undef _E - BMO_op_finish(em->bm, &oldop); - oldop = op; + BMO_op_finish(em->bm, &old_dupe_op); + old_dupe_op = dupe_op; } - if (j > 0) BMO_op_finish(em->bm, &op); + if (j > 0) BMO_op_finish(em->bm, &dupe_op); /* BMESH_TODO - cap ends are not welded, even though weld is called after */ @@ -399,9 +415,9 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, /* done capping */ if (amd->flags & MOD_ARR_MERGE) - BMO_op_exec(em->bm, &weldop); + BMO_op_exec(em->bm, &weld_op); - BMO_op_finish(em->bm, &weldop); + BMO_op_finish(em->bm, &weld_op); /* Bump the stack level back down to match the adjustment up above */ BMO_pop(em->bm); -- cgit v1.2.3 From 5591d03f2189f416adb0f9b48dc71474884471c1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 28 Mar 2012 22:11:19 +0000 Subject: fix invalid *= on an un-initialized value when adding primitives. --- source/blender/editors/mesh/editmesh_add.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c index b4d4a76daed..c2a97b3ea70 100644 --- a/source/blender/editors/mesh/editmesh_add.c +++ b/source/blender/editors/mesh/editmesh_add.c @@ -101,7 +101,7 @@ static void make_prim_init(bContext *C, const char *idname, *state = 1; } - *dia *= new_primitive_matrix(C, loc, rot, mat); + *dia = new_primitive_matrix(C, loc, rot, mat); } static void make_prim_finish(bContext *C, int *state, int enter_editmode) @@ -127,7 +127,7 @@ static int add_primitive_plane_exec(bContext *C, wmOperator *op) Object *obedit; Mesh *me; BMEditMesh *em; - float loc[3], rot[3], mat[4][4], dia = 1.0f; + float loc[3], rot[3], mat[4][4], dia; int enter_editmode; int state; unsigned int layer; @@ -185,7 +185,7 @@ static int add_primitive_cube_exec(bContext *C, wmOperator *op) me = obedit->data; em = me->edit_btmesh; - if (!EDBM_op_call_and_selectf(em, op, "vertout", "create_cube mat=%m4 size=%f", mat, 2.0f)) { + if (!EDBM_op_call_and_selectf(em, op, "vertout", "create_cube mat=%m4 size=%f", mat, dia * 2.0f)) { return OPERATOR_CANCELLED; } @@ -412,7 +412,7 @@ static int add_primitive_grid_exec(bContext *C, wmOperator *op) Object *obedit; Mesh *me; BMEditMesh *em; - float loc[3], rot[3], mat[4][4], dia = 1.0f; + float loc[3], rot[3], mat[4][4], dia; int enter_editmode; int state; unsigned int layer; -- cgit v1.2.3 From 24b4d5569ab74a60ca5b9ca94c70df3fac249e05 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 28 Mar 2012 22:43:26 +0000 Subject: fix [#30705] Playing animation in reverse prevents further forward playback --- source/blender/editors/screen/screen_ops.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index d6a74cc19ce..f0dbdf18826 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -3072,6 +3072,8 @@ static int screen_animation_play_exec(bContext *C, wmOperator *op) static void SCREEN_OT_animation_play(wmOperatorType *ot) { + PropertyRNA *prop; + /* identifiers */ ot->name = "Play Animation"; ot->description = "Play animation"; @@ -3082,8 +3084,10 @@ static void SCREEN_OT_animation_play(wmOperatorType *ot) ot->poll = ED_operator_screenactive_norender; - RNA_def_boolean(ot->srna, "reverse", 0, "Play in Reverse", "Animation is played backwards"); - RNA_def_boolean(ot->srna, "sync", 0, "Sync", "Drop frames to maintain framerate"); + prop = RNA_def_boolean(ot->srna, "reverse", 0, "Play in Reverse", "Animation is played backwards"); + RNA_def_property_flag(prop, PROP_SKIP_SAVE); + prop = RNA_def_boolean(ot->srna, "sync", 0, "Sync", "Drop frames to maintain framerate"); + RNA_def_property_flag(prop, PROP_SKIP_SAVE); } static int screen_animation_cancel_exec(bContext *C, wmOperator *op) -- cgit v1.2.3 From 42076f0a1f46d165cf0eae364a3e3ebb3f870edc Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 29 Mar 2012 01:41:56 +0000 Subject: skip using bmesh operators for converting to/from undo meshes (gives some speedup) --- source/blender/blenkernel/intern/mesh.c | 2 +- source/blender/editors/include/ED_mesh.h | 2 +- source/blender/editors/mesh/editmesh_utils.c | 26 ++++++++++++++---------- source/blender/editors/mesh/mesh_data.c | 2 +- source/blender/editors/mesh/meshtools.c | 2 +- source/blender/editors/object/object_edit.c | 2 +- source/blender/editors/object/object_hook.c | 2 +- source/blender/editors/object/object_relations.c | 2 +- source/blender/makesrna/intern/rna_object.c | 2 +- 9 files changed, 23 insertions(+), 19 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index b14805a5e46..ed2b71cdb52 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -556,7 +556,7 @@ BMesh *BKE_mesh_to_bmesh(Mesh *me, Object *ob) bm = BM_mesh_create(&bm_mesh_allocsize_default); - BMO_op_callf(bm, "mesh_to_bmesh mesh=%p object=%p set_shapekey=%b", me, ob, TRUE); + BM_mesh_bm_from_me(bm, me, TRUE, ob->shapenr); return bm; } diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index 71bce196ddf..5b61fc01645 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -110,7 +110,7 @@ void EDBM_mesh_normals_update(struct BMEditMesh *em); void EDBM_mesh_make(struct ToolSettings *ts, struct Scene *scene, struct Object *ob); void EDBM_mesh_free(struct BMEditMesh *tm); -void EDBM_mesh_load(struct Scene *scene, struct Object *ob); +void EDBM_mesh_load(struct Object *ob); void EDBM_index_arrays_init(struct BMEditMesh *em, int forvert, int foredge, int forface); void EDBM_index_arrays_free(struct BMEditMesh *em); diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index e5a9cb98377..b9a75729a8a 100644 --- a/source/blender/editors/mesh/editmesh_utils.c +++ b/source/blender/editors/mesh/editmesh_utils.c @@ -301,12 +301,12 @@ void EDBM_mesh_make(ToolSettings *ts, Scene *UNUSED(scene), Object *ob) me->edit_btmesh->ob = ob; } -void EDBM_mesh_load(Scene *scene, Object *ob) +void EDBM_mesh_load(Object *ob) { Mesh *me = ob->data; BMesh *bm = me->edit_btmesh->bm; - BMO_op_callf(bm, "object_load_bmesh scene=%p object=%p", scene, ob); + BM_mesh_bm_to_me(bm, me, FALSE); #ifdef USE_TESSFACE_DEFAULT BKE_mesh_tessface_calc(me); @@ -552,7 +552,11 @@ static void undoMesh_to_editbtMesh(void *umv, void *em_v, void *UNUSED(obdata)) BMEdit_Free(em); bm = BM_mesh_create(&bm_mesh_allocsize_default); - BMO_op_callf(bm, "mesh_to_bmesh mesh=%p object=%p set_shapekey=%b", &um->me, ob, FALSE); + + BM_mesh_bm_from_me(bm, &um->me, FALSE, ob->shapenr); + + /* face normals need recalculation since we are not calling through an operator */ + BM_mesh_normals_update(bm, TRUE); em_tmp = BMEdit_Create(bm, TRUE); *em = *em_tmp; @@ -563,16 +567,16 @@ static void undoMesh_to_editbtMesh(void *umv, void *em_v, void *UNUSED(obdata)) MEM_freeN(em_tmp); } - -static void free_undo(void *umv) +static void free_undo(void *me_v) { - if (((Mesh *)umv)->key) { - free_key(((Mesh *)umv)->key); - MEM_freeN(((Mesh *)umv)->key); + Mesh *me = me_v; + if (me->key) { + free_key(me->key); + MEM_freeN(me->key); } - - free_mesh(umv, 0); - MEM_freeN(umv); + + free_mesh(me, FALSE); + MEM_freeN(me); } /* and this is all the undo system needs to know */ diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c index c58761e9173..0ede2baf9f6 100644 --- a/source/blender/editors/mesh/mesh_data.c +++ b/source/blender/editors/mesh/mesh_data.c @@ -614,7 +614,7 @@ static int drop_named_image_invoke(bContext *C, wmOperator *op, wmEvent *event) ED_uvedit_assign_image(bmain, scene, obedit, ima, NULL); if (exitmode) { - EDBM_mesh_load(scene, obedit); + EDBM_mesh_load(obedit); EDBM_mesh_free(me->edit_btmesh); MEM_freeN(me->edit_btmesh); me->edit_btmesh = NULL; diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c index f6fd4b45288..37922b6e693 100644 --- a/source/blender/editors/mesh/meshtools.c +++ b/source/blender/editors/mesh/meshtools.c @@ -543,7 +543,7 @@ int join_mesh_exec(bContext *C, wmOperator *op) #else /* toggle editmode using lower level functions so this can be called from python */ EDBM_mesh_make(scene->toolsettings, scene, ob); - EDBM_mesh_load(scene, ob); + EDBM_mesh_load(ob); EDBM_mesh_free(me->edit_btmesh); MEM_freeN(me->edit_btmesh); me->edit_btmesh = NULL; diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index c40ea73d543..54207e0a598 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -327,7 +327,7 @@ void ED_object_exit_editmode(bContext *C, int flag) return; } - EDBM_mesh_load(scene, obedit); + EDBM_mesh_load(obedit); if (freedata) { EDBM_mesh_free(me->edit_btmesh); diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c index bdb53e25a07..4e967b6791b 100644 --- a/source/blender/editors/object/object_hook.c +++ b/source/blender/editors/object/object_hook.c @@ -308,7 +308,7 @@ static int object_hook_index_array(Scene *scene, Object *obedit, int *tot, int * BMEditMesh *em; - EDBM_mesh_load(scene, obedit); + EDBM_mesh_load(obedit); EDBM_mesh_make(scene->toolsettings, scene, obedit); em = me->edit_btmesh; diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index f9b0cfeedb8..a6fb946c83f 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -128,7 +128,7 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op) Mesh *me= obedit->data; BMEditMesh *em; - EDBM_mesh_load(scene, obedit); + EDBM_mesh_load(obedit); EDBM_mesh_make(scene->toolsettings, scene, obedit); em= me->edit_btmesh; diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 574d9877cfb..71a826f1351 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -228,7 +228,7 @@ void rna_Object_active_shape_update(Main *bmain, Scene *scene, PointerRNA *ptr) /* exit/enter editmode to get new shape */ switch (ob->type) { case OB_MESH: - EDBM_mesh_load(scene, ob); + EDBM_mesh_load(ob); EDBM_mesh_make(scene->toolsettings, scene, ob); BMEdit_RecalcTessellation(((Mesh*)ob->data)->edit_btmesh); break; -- cgit v1.2.3 From a173508f493e27c6b746b00435f631a31d8419d8 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 29 Mar 2012 03:06:42 +0000 Subject: converting a mesh to an undo mesh now skips using bmesh operator. --- source/blender/blenkernel/intern/editderivedmesh.c | 2 +- source/blender/editors/mesh/editmesh_tools.c | 4 ++-- source/blender/editors/mesh/editmesh_utils.c | 3 ++- source/blender/editors/object/object_edit.c | 2 ++ 4 files changed, 7 insertions(+), 4 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/editderivedmesh.c b/source/blender/blenkernel/intern/editderivedmesh.c index 7cc37da4b1d..04ad8276365 100644 --- a/source/blender/blenkernel/intern/editderivedmesh.c +++ b/source/blender/blenkernel/intern/editderivedmesh.c @@ -136,7 +136,7 @@ static void BMEdit_RecalcTessellation_intern(BMEditMesh *tm) if ( (tm->looptris != NULL) && (tm->tottri != 0) && /* (totrti <= bm->totface * 2) would be fine for all quads, - * but in case there are some ngons, still re-use the array */ + * but in case there are some ngons, still re-use the array */ (tm->tottri <= bm->totface * 3)) { looptris = tm->looptris; diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 26bfcfbf0ac..29c1496b042 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -3083,8 +3083,8 @@ static int mesh_separate_selected(Main *bmain, Scene *scene, Base *editbase, wmO EDBM_op_callf(em, wmop, "del geom=%hvef context=%i", BM_ELEM_SELECT, DEL_VERTS); BM_mesh_normals_update(bm_new, TRUE); - BMO_op_callf(bm_new, "bmesh_to_mesh mesh=%p object=%p notessellation=%b", - basenew->object->data, basenew->object, TRUE); + + BM_mesh_bm_to_me(bm_new, basenew->object->data, FALSE); BM_mesh_free(bm_new); ((Mesh *)basenew->object->data)->edit_btmesh = NULL; diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index b9a75729a8a..ff3415545eb 100644 --- a/source/blender/editors/mesh/editmesh_utils.c +++ b/source/blender/editors/mesh/editmesh_utils.c @@ -532,7 +532,8 @@ static void *editbtMesh_to_undoMesh(void *emv, void *obdata) /* BM_mesh_validate(em->bm); */ /* for troubleshooting */ - BMO_op_callf(em->bm, "bmesh_to_mesh mesh=%p notessellation=%b", &um->me, TRUE); + BM_mesh_bm_to_me(em->bm, &um->me, FALSE); + um->selectmode = em->selectmode; return um; diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 54207e0a598..b92f641584b 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -448,6 +448,8 @@ void ED_object_enter_editmode(bContext *C, int flag) em = BMEdit_FromObject(ob); if (LIKELY(em)) { + /* order doesn't matter */ + EDBM_mesh_normals_update(em); BMEdit_RecalcTessellation(em); } -- cgit v1.2.3 From 7661f429c6bc0b146187cb8a7522460577f334d8 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Thu, 29 Mar 2012 10:49:17 +0000 Subject: Fix uninitialized variable in CustomData_bmesh_merge. Caused a crash in array modifier with caps. --- source/blender/blenkernel/intern/customdata.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c index 301ba282cbd..17a29d89d19 100644 --- a/source/blender/blenkernel/intern/customdata.c +++ b/source/blender/blenkernel/intern/customdata.c @@ -2184,6 +2184,7 @@ void CustomData_bmesh_merge(CustomData *source, CustomData *dest, if (t != BM_LOOPS_OF_FACE) { /*ensure all current elements follow new customdata layout*/ BM_ITER(h, &iter, bm, t, NULL) { + tmp = NULL; CustomData_bmesh_copy_data(&destold, dest, h->data, &tmp); CustomData_bmesh_free_block(&destold, &h->data); h->data = tmp; -- cgit v1.2.3 From 7474397f854cbe23bd7e55dc46469c722d8eda9c Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Thu, 29 Mar 2012 11:31:44 +0000 Subject: More array modifier fixes. * Skip calculation of merge indices if merging isn't enabled * Clean up usage of BMesh operators to fix small memory leak * Fix harmless BLI_assert in CustomData_bmesh_merge * Another null-initialization fix in CustomData_bmesh_merge --- source/blender/blenkernel/intern/customdata.c | 2 + source/blender/modifiers/intern/MOD_array.c | 64 +++++++++++++++------------ 2 files changed, 37 insertions(+), 29 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c index 17a29d89d19..638ba2ddc4d 100644 --- a/source/blender/blenkernel/intern/customdata.c +++ b/source/blender/blenkernel/intern/customdata.c @@ -2165,6 +2165,7 @@ void CustomData_bmesh_merge(CustomData *source, CustomData *dest, int t; CustomData_merge(source, dest, mask, alloctype, 0); + dest->pool = NULL; CustomData_bmesh_init_pool(dest, 512, htype); switch (htype) { @@ -2198,6 +2199,7 @@ void CustomData_bmesh_merge(CustomData *source, CustomData *dest, /*ensure all current elements follow new customdata layout*/ BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) { BM_ITER(l, &liter, bm, BM_LOOPS_OF_FACE, f) { + tmp = NULL; CustomData_bmesh_copy_data(&destold, dest, l->head.data, &tmp); CustomData_bmesh_free_block(&destold, &l->head.data); l->head.data = tmp; diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c index bf46c10b720..41b1d18fc5f 100644 --- a/source/blender/modifiers/intern/MOD_array.c +++ b/source/blender/modifiers/intern/MOD_array.c @@ -337,15 +337,18 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, BMO_push(em->bm, NULL); bmesh_edit_begin(em->bm, 0); - BMO_op_init(em->bm, &weld_op, "weldverts"); - BMO_op_initf(em->bm, &dupe_op, "dupe geom=%avef"); - old_dupe_op = dupe_op; + if (amd->flags & MOD_ARR_MERGE) + BMO_op_init(em->bm, &weld_op, "weldverts"); + for (j=0; j < count - 1; j++) { BMVert *v, *v2, *v3; BMOpSlot *s1; BMOpSlot *s2; - BMO_op_initf(em->bm, &dupe_op, "dupe geom=%s", &old_dupe_op, j==0 ? "geom" : "newout"); + if (j == 0) + BMO_op_initf(em->bm, &dupe_op, "dupe geom=%avef"); + else + BMO_op_initf(em->bm, &dupe_op, "dupe geom=%s", &old_dupe_op, "newout"); BMO_op_exec(em->bm, &dupe_op); s1 = BMO_slot_get(&dupe_op, "geom"); @@ -353,35 +356,38 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, BMO_op_callf(em->bm, "transform mat=%m4 verts=%s", offset, &dupe_op, "newout"); - /*calculate merge mapping*/ - if (j == 0) { - indexMap = find_doubles_index_map(em->bm, &dupe_op, - amd, &indexLen); - } + if (amd->flags & MOD_ARR_MERGE) { + /*calculate merge mapping*/ + if (j == 0) { + indexMap = find_doubles_index_map(em->bm, &dupe_op, + amd, &indexLen); + } - #define _E(s, i) ((BMVert **)(s)->data.buf)[i] - /* generate merge mapping using index map. we do this by using the - * operator slots as lookup arrays.*/ - #define E(i) (i) < s1->len ? _E(s1, i) : _E(s2, (i)-s1->len) + #define _E(s, i) ((BMVert **)(s)->data.buf)[i] + /* generate merge mapping using index map. we do this by using the + * operator slots as lookup arrays.*/ + #define E(i) (i) < s1->len ? _E(s1, i) : _E(s2, (i)-s1->len) - for (i=0; ibm, &weld_op, "targetmap", v2))) - v2 = v3; + /* check in case the target vertex (v2) is already marked + for merging */ + while((v3 = BMO_slot_map_ptr_get(em->bm, &weld_op, "targetmap", v2))) + v2 = v3; - BMO_slot_map_ptr_insert(em->bm, &weld_op, "targetmap", v, v2); - } + BMO_slot_map_ptr_insert(em->bm, &weld_op, "targetmap", v, v2); + } - #undef E - #undef _E + #undef E + #undef _E + } - BMO_op_finish(em->bm, &old_dupe_op); + if (j != 0) + BMO_op_finish(em->bm, &old_dupe_op); old_dupe_op = dupe_op; } @@ -414,10 +420,10 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, } /* done capping */ - if (amd->flags & MOD_ARR_MERGE) + if (amd->flags & MOD_ARR_MERGE) { BMO_op_exec(em->bm, &weld_op); - - BMO_op_finish(em->bm, &weld_op); + BMO_op_finish(em->bm, &weld_op); + } /* Bump the stack level back down to match the adjustment up above */ BMO_pop(em->bm); -- cgit v1.2.3 From f87c5b3453a779ebe96afff734c0ca6da1a03f8d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 29 Mar 2012 13:09:07 +0000 Subject: fix [#30715] bmesh: select linked not ignoring hidden verts/edges/faces add optional flag to ignore hidden elements. also remove loop mask flag - since it wasnt used and vert/edge/face is enough. --- source/blender/blenkernel/BKE_deform.h | 1 + source/blender/blenkernel/intern/deform.c | 10 ++++ source/blender/bmesh/intern/bmesh_walkers.c | 10 ++-- source/blender/bmesh/intern/bmesh_walkers.h | 14 ++++- source/blender/bmesh/intern/bmesh_walkers_impl.c | 70 ++++++++++++++++++---- source/blender/bmesh/operators/bmo_dissolve.c | 7 ++- source/blender/bmesh/operators/bmo_removedoubles.c | 6 +- source/blender/editors/mesh/editmesh_loopcut.c | 6 +- source/blender/editors/mesh/editmesh_select.c | 21 ++++--- source/blender/editors/mesh/editmesh_tools.c | 3 +- 10 files changed, 114 insertions(+), 34 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/BKE_deform.h b/source/blender/blenkernel/BKE_deform.h index 96bad493a3e..17275b6ea7d 100644 --- a/source/blender/blenkernel/BKE_deform.h +++ b/source/blender/blenkernel/BKE_deform.h @@ -53,6 +53,7 @@ struct MDeformWeight *defvert_find_index(const struct MDeformVert *dv, const int struct MDeformWeight *defvert_verify_index(struct MDeformVert *dv, const int defgroup); void defvert_add_index_notest(struct MDeformVert *dv, int defgroup, const float weight); void defvert_remove_group(struct MDeformVert *dvert, struct MDeformWeight *dw); +void defvert_clear(struct MDeformVert *dvert); float defvert_find_weight(const struct MDeformVert *dvert, const int defgroup); float defvert_array_find_weight_safe(const struct MDeformVert *dvert, const int index, const int defgroup); diff --git a/source/blender/blenkernel/intern/deform.c b/source/blender/blenkernel/intern/deform.c index 186a4d41403..c41f5b6f86f 100644 --- a/source/blender/blenkernel/intern/deform.c +++ b/source/blender/blenkernel/intern/deform.c @@ -690,3 +690,13 @@ void defvert_remove_group(MDeformVert *dvert, MDeformWeight *dw) } } } + +void defvert_clear(MDeformVert *dvert) +{ + if (dvert->dw) { + MEM_freeN(dvert->dw); + dvert->dw = NULL; + } + + dvert->totweight = 0; +} diff --git a/source/blender/bmesh/intern/bmesh_walkers.c b/source/blender/bmesh/intern/bmesh_walkers.c index 69ab7a91232..a3b5d94ba8e 100644 --- a/source/blender/bmesh/intern/bmesh_walkers.c +++ b/source/blender/bmesh/intern/bmesh_walkers.c @@ -73,17 +73,18 @@ void *BMW_begin(BMWalker *walker, void *start) * by the bitmask 'searchmask'. */ void BMW_init(BMWalker *walker, BMesh *bm, int type, - short mask_vert, short mask_edge, short mask_loop, short mask_face, + short mask_vert, short mask_edge, short mask_face, + BMWFlag flag, int layer) { memset(walker, 0, sizeof(BMWalker)); walker->layer = layer; + walker->flag = flag; walker->bm = bm; walker->mask_vert = mask_vert; walker->mask_edge = mask_edge; - walker->mask_loop = mask_loop; walker->mask_face = mask_face; walker->visithash = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "bmesh walkers 1"); @@ -92,8 +93,8 @@ void BMW_init(BMWalker *walker, BMesh *bm, int type, if (UNLIKELY(type >= BMW_MAXWALKERS || type < 0)) { fprintf(stderr, "Invalid walker type in BMW_init; type: %d, " - "searchmask: (v:%d, e:%d, l:%d, f:%d), flag: %d\n", - type, mask_vert, mask_edge, mask_loop, mask_face, layer); + "searchmask: (v:%d, e:%d, f:%d), flag: %d, layer: %d\n", + type, mask_vert, mask_edge, mask_face, flag, layer); BMESH_ASSERT(0); } @@ -110,7 +111,6 @@ void BMW_init(BMWalker *walker, BMesh *bm, int type, * 'bm_walker_types' needs updating */ BLI_assert(mask_vert == 0 || (walker->valid_mask & BM_VERT)); BLI_assert(mask_edge == 0 || (walker->valid_mask & BM_EDGE)); - BLI_assert(mask_loop == 0 || (walker->valid_mask & BM_LOOP)); BLI_assert(mask_face == 0 || (walker->valid_mask & BM_FACE)); } diff --git a/source/blender/bmesh/intern/bmesh_walkers.h b/source/blender/bmesh/intern/bmesh_walkers.h index 1d548a0d4c7..4f81f38aeb3 100644 --- a/source/blender/bmesh/intern/bmesh_walkers.h +++ b/source/blender/bmesh/intern/bmesh_walkers.h @@ -38,6 +38,11 @@ typedef enum { BMW_BREADTH_FIRST } BMWOrder; +typedef enum { + BMW_FLAG_NOP = 0, + BMW_FLAG_TEST_HIDDEN = (1 << 0) +} BMWFlag; + /*Walkers*/ typedef struct BMWalker { void (*begin) (struct BMWalker *walker, void *start); @@ -54,12 +59,14 @@ typedef struct BMWalker { BLI_mempool *worklist; ListBase states; - /* these masks are to be tested against elements BMO_elem_flag_test() */ + /* these masks are to be tested against elements BMO_elem_flag_test(), + * should never be accessed directly only through BMW_init() and bmw_mask_check_*() functions */ short mask_vert; short mask_edge; - short mask_loop; short mask_face; + BMWFlag flag; + GHash *visithash; GHash *secvisithash; int depth; @@ -71,7 +78,8 @@ typedef struct BMWalker { /* initialize a walker. searchmask restricts some (not all) walkers to * elements with a specific tool flag set. flags is specific to each walker.*/ void BMW_init(struct BMWalker *walker, BMesh *bm, int type, - short mask_vert, short mask_edge, short mask_loop, short mask_face, + short mask_vert, short mask_edge, short mask_face, + BMWFlag flag, int layer); void *BMW_begin(BMWalker *walker, void *start); void *BMW_step(struct BMWalker *walker); diff --git a/source/blender/bmesh/intern/bmesh_walkers_impl.c b/source/blender/bmesh/intern/bmesh_walkers_impl.c index 493be46c976..009b5e786c4 100644 --- a/source/blender/bmesh/intern/bmesh_walkers_impl.c +++ b/source/blender/bmesh/intern/bmesh_walkers_impl.c @@ -34,6 +34,45 @@ #include "intern/bmesh_private.h" #include "intern/bmesh_walkers_private.h" +static int bmw_mask_check_vert(BMWalker *walker, BMVert *v) +{ + if ((walker->flag & BMW_FLAG_TEST_HIDDEN) && BM_elem_flag_test(v, BM_ELEM_HIDDEN)) { + return FALSE; + } + else if (walker->mask_vert && !BMO_elem_flag_test(walker->bm, v, walker->mask_vert)) { + return FALSE; + } + else { + return TRUE; + } +} + +static int bmw_mask_check_edge(BMWalker *walker, BMEdge *e) +{ + if ((walker->flag & BMW_FLAG_TEST_HIDDEN) && BM_elem_flag_test(e, BM_ELEM_HIDDEN)) { + return FALSE; + } + else if (walker->mask_edge && !BMO_elem_flag_test(walker->bm, e, walker->mask_edge)) { + return FALSE; + } + else { + return TRUE; + } +} + +static int bmw_mask_check_face(BMWalker *walker, BMFace *f) +{ + if ((walker->flag & BMW_FLAG_TEST_HIDDEN) && BM_elem_flag_test(f, BM_ELEM_HIDDEN)) { + return FALSE; + } + else if (walker->mask_face && !BMO_elem_flag_test(walker->bm, f, walker->mask_face)) { + return FALSE; + } + else { + return TRUE; + } +} + /** * Shell Walker: * @@ -50,7 +89,7 @@ static void bmw_ShellWalker_visitEdge(BMWalker *walker, BMEdge *e) return; } - if (walker->mask_edge && !BMO_elem_flag_test(walker->bm, e, walker->mask_edge)) { + if (!bmw_mask_check_edge(walker, e)) { return; } @@ -176,7 +215,8 @@ static void bmw_ConnectedVertexWalker_visitVertex(BMWalker *walker, BMVert *v) /* already visited */ return; } - if (walker->mask_vert && !BMO_elem_flag_test(walker->bm, v, walker->mask_vert)) { + + if (!bmw_mask_check_vert(walker, v)) { /* not flagged for walk */ return; } @@ -279,7 +319,8 @@ static void *bmw_IslandboundWalker_step(BMWalker *walker) l = l->radial_next; f = l->f; e = l->e; - if (walker->mask_face && !BMO_elem_flag_test(walker->bm, f, walker->mask_face)) { + + if (!bmw_mask_check_face(walker, f)) { l = l->radial_next; break; } @@ -322,7 +363,7 @@ static void bmw_IslandWalker_begin(BMWalker *walker, void *data) { BMwIslandWalker *iwalk = NULL; - if (walker->mask_face && !BMO_elem_flag_test(walker->bm, (BMElemF *)data, walker->mask_face)) { + if (!bmw_mask_check_face(walker, data)) { return; } @@ -352,13 +393,14 @@ static void *bmw_IslandWalker_step(BMWalker *walker) l = BM_iter_new(&liter, walker->bm, BM_LOOPS_OF_FACE, iwalk->cur); for ( ; l; l = BM_iter_step(&liter)) { /* could skip loop here too, but don't add unless we need it */ - if (walker->mask_edge && !BMO_elem_flag_test(walker->bm, l->e, walker->mask_edge)) { + if (!bmw_mask_check_edge(walker, l->e)) { continue; } f = BM_iter_new(&iter, walker->bm, BM_FACES_OF_EDGE, l->e); for ( ; f; f = BM_iter_step(&iter)) { - if (walker->mask_face && !BMO_elem_flag_test(walker->bm, f, walker->mask_face)) { + + if (!bmw_mask_check_face(walker, f)) { continue; } @@ -884,9 +926,10 @@ static void *bmw_UVEdgeWalker_step(BMWalker *walker) type = walker->bm->ldata.layers[walker->layer].type; BMW_state_remove(walker); - - if (walker->mask_edge && !BMO_elem_flag_test(walker->bm, l->e, walker->mask_edge)) + + if (!bmw_mask_check_edge(walker, l->e)) { return l; + } /* go over loops around l->v and nl->v and see which ones share l and nl's * mloopuv's coordinates. in addition, push on l->next if necessary */ @@ -898,13 +941,16 @@ static void *bmw_UVEdgeWalker_step(BMWalker *walker) rlen = BM_edge_face_count(l2->e); for (j = 0; j < rlen; j++) { - if (BLI_ghash_haskey(walker->visithash, l2)) + if (BLI_ghash_haskey(walker->visithash, l2)) { continue; - if (walker->mask_edge && !(BMO_elem_flag_test(walker->bm, l2->e, walker->mask_edge))) { - if (l2->v != cl->v) + } + + if (!bmw_mask_check_edge(walker, l2->e)) { + if (l2->v != cl->v) { continue; + } } - + l3 = l2->v != cl->v ? l2->next : l2; d2 = CustomData_bmesh_get_layer_n(&walker->bm->ldata, l3->head.data, walker->layer); diff --git a/source/blender/bmesh/operators/bmo_dissolve.c b/source/blender/bmesh/operators/bmo_dissolve.c index 20bc01dfa22..fe5c8cd048e 100644 --- a/source/blender/bmesh/operators/bmo_dissolve.c +++ b/source/blender/bmesh/operators/bmo_dissolve.c @@ -47,8 +47,10 @@ static int UNUSED_FUNCTION(check_hole_in_region)(BMesh *bm, BMFace *f) /* checks if there are any unmarked boundary edges in the face regio */ BMW_init(®walker, bm, BMW_ISLAND, - BMW_MASK_NOP, BMW_MASK_NOP, BMW_MASK_NOP, FACE_MARK, + BMW_MASK_NOP, BMW_MASK_NOP, FACE_MARK, + BMW_FLAG_NOP, /* BMESH_TODO - should be BMW_FLAG_TEST_HIDDEN ? */ BMW_NIL_LAY); + f2 = BMW_begin(®walker, f); for ( ; f2; f2 = BMW_step(®walker)) { l2 = BM_iter_new(&liter2, bm, BM_LOOPS_OF_FACE, f2); @@ -106,7 +108,8 @@ void bmo_dissolve_faces_exec(BMesh *bm, BMOperator *op) /* yay, walk */ BMW_init(®walker, bm, BMW_ISLAND, - BMW_MASK_NOP, BMW_MASK_NOP, BMW_MASK_NOP, FACE_MARK, + BMW_MASK_NOP, BMW_MASK_NOP, FACE_MARK, + BMW_FLAG_NOP, /* BMESH_TODO - should be BMW_FLAG_TEST_HIDDEN ? */ BMW_NIL_LAY); f2 = BMW_begin(®walker, f); diff --git a/source/blender/bmesh/operators/bmo_removedoubles.c b/source/blender/bmesh/operators/bmo_removedoubles.c index 5bf40e6fd38..79b2e0773d4 100644 --- a/source/blender/bmesh/operators/bmo_removedoubles.c +++ b/source/blender/bmesh/operators/bmo_removedoubles.c @@ -376,7 +376,8 @@ void bmo_collapse_exec(BMesh *bm, BMOperator *op) BMO_slot_buffer_flag_enable(bm, op, "edges", BM_EDGE, EDGE_MARK); BMW_init(&walker, bm, BMW_SHELL, - BMW_MASK_NOP, EDGE_MARK, BMW_MASK_NOP, BMW_MASK_NOP, + BMW_MASK_NOP, EDGE_MARK, BMW_MASK_NOP, + BMW_FLAG_NOP, /* BMESH_TODO - should be BMW_FLAG_TEST_HIDDEN ? */ BMW_NIL_LAY); BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) { @@ -435,7 +436,8 @@ static void bmo_collapsecon_do_layer(BMesh *bm, BMOperator *op, int layer) BMO_slot_buffer_flag_enable(bm, op, "edges", BM_EDGE, EDGE_MARK); BMW_init(&walker, bm, BMW_LOOPDATA_ISLAND, - BMW_MASK_NOP, EDGE_MARK, BMW_MASK_NOP, BMW_MASK_NOP, + BMW_MASK_NOP, EDGE_MARK, BMW_MASK_NOP, + BMW_FLAG_NOP, /* BMESH_TODO - should be BMW_FLAG_TEST_HIDDEN ? */ layer); BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) { diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c index b151978c1f1..638eaabbfd3 100644 --- a/source/blender/editors/mesh/editmesh_loopcut.c +++ b/source/blender/editors/mesh/editmesh_loopcut.c @@ -205,7 +205,8 @@ static void edgering_sel(tringselOpData *lcd, int previewlines, int select) if (select) { BMW_init(&walker, em->bm, BMW_EDGERING, - BMW_MASK_NOP, BMW_MASK_NOP, BMW_MASK_NOP, BMW_MASK_NOP, + BMW_MASK_NOP, BMW_MASK_NOP, BMW_MASK_NOP, + BMW_FLAG_NOP, /* BMESH_TODO - should be BMW_FLAG_TEST_HIDDEN ? */ BMW_NIL_LAY); eed = BMW_begin(&walker, startedge); @@ -218,7 +219,8 @@ static void edgering_sel(tringselOpData *lcd, int previewlines, int select) } BMW_init(&walker, em->bm, BMW_EDGERING, - BMW_MASK_NOP, BMW_MASK_NOP, BMW_MASK_NOP, BMW_MASK_NOP, + BMW_MASK_NOP, BMW_MASK_NOP, BMW_MASK_NOP, + BMW_FLAG_NOP, /* BMESH_TODO - should be BMW_FLAG_TEST_HIDDEN ? */ BMW_NIL_LAY); eed = startedge = BMW_begin(&walker, startedge); diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index af1beba7841..c2e47ef0a09 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -899,7 +899,8 @@ static void walker_select(BMEditMesh *em, int walkercode, void *start, int selec BMWalker walker; BMW_init(&walker, bm, walkercode, - BMW_MASK_NOP, BMW_MASK_NOP, BMW_MASK_NOP, BMW_MASK_NOP, + BMW_MASK_NOP, BMW_MASK_NOP, BMW_MASK_NOP, + BMW_FLAG_NOP, /* BMESH_TODO - should be BMW_FLAG_TEST_HIDDEN ? */ BMW_NIL_LAY); ele = BMW_begin(&walker, start); for (; ele; ele = BMW_step(&walker)) { @@ -1801,7 +1802,8 @@ static int edbm_select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent * /* walk */ BMW_init(&walker, bm, BMW_ISLAND, - BMW_MASK_NOP, limit ? BM_ELEM_SELECT : BMW_MASK_NOP, BMW_MASK_NOP, BMW_MASK_NOP, + BMW_MASK_NOP, limit ? BM_ELEM_SELECT : BMW_MASK_NOP, BMW_MASK_NOP, + BMW_FLAG_TEST_HIDDEN, BMW_NIL_LAY); e = BMW_begin(&walker, efa); @@ -1822,7 +1824,8 @@ static int edbm_select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent * } BMW_init(&walker, bm, BMW_SHELL, - BMW_MASK_NOP, BMW_MASK_NOP, BMW_MASK_NOP, BMW_MASK_NOP, + BMW_MASK_NOP, BMW_MASK_NOP, BMW_MASK_NOP, + BMW_FLAG_TEST_HIDDEN, BMW_NIL_LAY); e = BMW_begin(&walker, eed->v1); @@ -1887,7 +1890,8 @@ static int edbm_select_linked_exec(bContext *C, wmOperator *op) } BMW_init(&walker, bm, BMW_ISLAND, - BMW_MASK_NOP, limit ? BM_ELEM_SELECT : BMW_MASK_NOP, BMW_MASK_NOP, BMW_MASK_NOP, + BMW_MASK_NOP, limit ? BM_ELEM_SELECT : BMW_MASK_NOP, BMW_MASK_NOP, + BMW_FLAG_NOP, /* BMESH_TODO - should be BMW_FLAG_TEST_HIDDEN ? */ BMW_NIL_LAY); BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) { @@ -1911,8 +1915,10 @@ static int edbm_select_linked_exec(bContext *C, wmOperator *op) } BMW_init(&walker, em->bm, BMW_SHELL, - BMW_MASK_NOP, BMW_MASK_NOP, BMW_MASK_NOP, BMW_MASK_NOP, + BMW_MASK_NOP, BMW_MASK_NOP, BMW_MASK_NOP, + BMW_FLAG_NOP, /* BMESH_TODO - should be BMW_FLAG_TEST_HIDDEN ? */ BMW_NIL_LAY); + BM_ITER(v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) { if (BM_elem_flag_test(v, BM_ELEM_TAG)) { e = BMW_begin(&walker, v); @@ -2012,7 +2018,7 @@ static void walker_deselect_nth(BMEditMesh *em, int nth, int offset, BMHeader *h BMWalker walker; BMIter iter; int walktype = 0, itertype = 0, flushtype = 0; - short mask_vert = 0, mask_edge = 0, mask_loop = 0, mask_face = 0; + short mask_vert = 0, mask_edge = 0, mask_face = 0; /* No active element from which to start - nothing to do */ if (h_act == NULL) { @@ -2055,7 +2061,8 @@ static void walker_deselect_nth(BMEditMesh *em, int nth, int offset, BMHeader *h /* Walk over selected elements starting at active */ BMW_init(&walker, bm, walktype, - mask_vert, mask_edge, mask_loop, mask_face, + mask_vert, mask_edge, mask_face, + BMW_FLAG_NOP, /* BMESH_TODO - should be BMW_FLAG_TEST_HIDDEN ? */ BMW_NIL_LAY); BLI_assert(walker.order == BMW_BREADTH_FIRST); diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 29c1496b042..824166798e9 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -3146,7 +3146,8 @@ static int mesh_separate_loose(Main *bmain, Scene *scene, Base *editbase, wmOper /* Walk from the single vertex, selecting everything connected * to it */ BMW_init(&walker, bm, BMW_SHELL, - BMW_MASK_NOP, BMW_MASK_NOP, BMW_MASK_NOP, BMW_MASK_NOP, + BMW_MASK_NOP, BMW_MASK_NOP, BMW_MASK_NOP, + BMW_FLAG_NOP, /* BMESH_TODO - should be BMW_FLAG_TEST_HIDDEN ? */ BMW_NIL_LAY); e = BMW_begin(&walker, v_seed); -- cgit v1.2.3 From 20e233043470c05fce0e1b78fbce141a8275133c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 29 Mar 2012 13:44:30 +0000 Subject: added Mesh.calc_tessface(), needed to update mesh tessface after bmesh edits. also add py api BMDeformVert.clear() --- source/blender/editors/include/ED_mesh.h | 1 + source/blender/editors/mesh/mesh_data.c | 10 ++++++++++ source/blender/makesrna/intern/rna_mesh_api.c | 3 +++ source/blender/python/bmesh/bmesh_py_types_meshdata.c | 17 ++++++++++++++++- 4 files changed, 30 insertions(+), 1 deletion(-) (limited to 'source/blender') diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index 5b61fc01645..0ab9c5dd977 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -261,6 +261,7 @@ void ED_mesh_vertices_remove(struct Mesh *mesh, struct ReportList *reports, int void ED_mesh_transform(struct Mesh *me, float *mat); void ED_mesh_calc_normals(struct Mesh *me); +void ED_mesh_calc_tessface(struct Mesh *mesh); void ED_mesh_material_link(struct Mesh *me, struct Material *ma); void ED_mesh_update(struct Mesh *mesh, struct bContext *C, int calc_edges, int calc_tessface); diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c index 0ede2baf9f6..69aeee48a4b 100644 --- a/source/blender/editors/mesh/mesh_data.c +++ b/source/blender/editors/mesh/mesh_data.c @@ -1182,3 +1182,13 @@ void ED_mesh_calc_normals(Mesh *mesh) NULL); #endif } + +void ED_mesh_calc_tessface(Mesh *mesh) +{ + if (mesh->edit_btmesh) { + BMEdit_RecalcTessellation(mesh->edit_btmesh); + } + else { + BKE_mesh_tessface_calc(mesh); + } +} diff --git a/source/blender/makesrna/intern/rna_mesh_api.c b/source/blender/makesrna/intern/rna_mesh_api.c index c6aea38b55c..41b232fdf8b 100644 --- a/source/blender/makesrna/intern/rna_mesh_api.c +++ b/source/blender/makesrna/intern/rna_mesh_api.c @@ -65,6 +65,9 @@ void RNA_api_mesh(StructRNA *srna) func = RNA_def_function(srna, "calc_normals", "ED_mesh_calc_normals"); RNA_def_function_ui_description(func, "Calculate vertex normals"); + func = RNA_def_function(srna, "calc_tessface", "ED_mesh_calc_tessface"); + RNA_def_function_ui_description(func, "Calculate face tessellation (supports editmode too)"); + func = RNA_def_function(srna, "update", "ED_mesh_update"); RNA_def_boolean(func, "calc_edges", 0, "Calculate Edges", "Force recalculation of edges"); RNA_def_boolean(func, "calc_tessface", 0, "Calculate Tessellation", "Force recalculation of tessellation faces"); diff --git a/source/blender/python/bmesh/bmesh_py_types_meshdata.c b/source/blender/python/bmesh/bmesh_py_types_meshdata.c index db8cc24ff0c..9972ff288b2 100644 --- a/source/blender/python/bmesh/bmesh_py_types_meshdata.c +++ b/source/blender/python/bmesh/bmesh_py_types_meshdata.c @@ -525,12 +525,26 @@ static PyObject *bpy_bmdeformvert_get(BPy_BMDeformVert *self, PyObject *args) } } + +PyDoc_STRVAR(bpy_bmdeformvert_clear_doc, +".. method:: clear()\n" +"\n" +" Clears all weights.\n" +); +static PyObject *bpy_bmdeformvert_clear(BPy_BMDeformVert *self) +{ + defvert_clear(self->data); + + Py_RETURN_NONE; +} + static struct PyMethodDef bpy_bmdeformvert_methods[] = { {"keys", (PyCFunction)bpy_bmdeformvert_keys, METH_NOARGS, bpy_bmdeformvert_keys_doc}, {"values", (PyCFunction)bpy_bmdeformvert_values, METH_NOARGS, bpy_bmdeformvert_values_doc}, {"items", (PyCFunction)bpy_bmdeformvert_items, METH_NOARGS, bpy_bmdeformvert_items_doc}, {"get", (PyCFunction)bpy_bmdeformvert_get, METH_VARARGS, bpy_bmdeformvert_get_doc}, - /* BMESH_TODO */ + /* BMESH_TODO pop, popitem, update */ + {"clear", (PyCFunction)bpy_bmdeformvert_clear, METH_NOARGS, bpy_bmdeformvert_clear_doc}, {NULL, NULL, 0, NULL} }; @@ -586,3 +600,4 @@ void BPy_BM_init_types_meshdata(void) bm_init_types_bmloopcol(); bm_init_types_bmdvert(); } + -- cgit v1.2.3 From 81efab83f05034fe67bc1154292f986e8b5cd421 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 29 Mar 2012 15:04:54 +0000 Subject: Fix #30719: Align View to Selected has unexpected results on further view change --- source/blender/editors/space_view3d/view3d_edit.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 94853927d4e..ef838700f49 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -2859,6 +2859,8 @@ static int viewnumpad_exec(bContext *C, wmOperator *op) void VIEW3D_OT_viewnumpad(wmOperatorType *ot) { + PropertyRNA *prop; + /* identifiers */ ot->name = "View numpad"; ot->description = "Set the view"; @@ -2871,8 +2873,10 @@ void VIEW3D_OT_viewnumpad(wmOperatorType *ot) /* flags */ ot->flag = 0; - RNA_def_enum(ot->srna, "type", prop_view_items, 0, "View", "The Type of view"); - RNA_def_boolean(ot->srna, "align_active", 0, "Align Active", "Align to the active object's axis"); + prop = RNA_def_enum(ot->srna, "type", prop_view_items, 0, "View", "The Type of view"); + RNA_def_property_flag(prop, PROP_SKIP_SAVE); + prop = RNA_def_boolean(ot->srna, "align_active", 0, "Align Active", "Align to the active object's axis"); + RNA_def_property_flag(prop, PROP_SKIP_SAVE); } static EnumPropertyItem prop_view_orbit_items[] = { -- cgit v1.2.3 From ae33503d0304e8efcde9532f7acc23773fc810a6 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 29 Mar 2012 15:41:58 +0000 Subject: Fix #30716: Clamp To Constraint Locks up Blender after a while. Issue was caused by object moved really far away (not just actually issue, it's just about long mouse gesture and X-axis orientation which projects position to quite large X-axis value) and for this location start offset from curve length was calculating iteratively which takes plenty of time for short curves. Replace iterative search of offset with formula which seems to be working in the same way and should be a bit more accurate. --- source/blender/blenkernel/intern/constraint.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index 0126f1dc416..8177d09c7e3 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -3188,25 +3188,15 @@ static void clampto_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *ta /* find bounding-box range where target is located */ if (ownLoc[clamp_axis] < curveMin[clamp_axis]) { /* bounding-box range is before */ - offset= curveMin[clamp_axis]; - - while (ownLoc[clamp_axis] < offset) - offset -= len; - + offset = curveMin[clamp_axis] - ceil((curveMin[clamp_axis] - ownLoc[clamp_axis]) / len) * len; + /* now, we calculate as per normal, except using offset instead of curveMin[clamp_axis] */ curvetime = (ownLoc[clamp_axis] - offset) / (len); } else if (ownLoc[clamp_axis] > curveMax[clamp_axis]) { /* bounding-box range is after */ - offset= curveMax[clamp_axis]; - - while (ownLoc[clamp_axis] > offset) { - if ((offset + len) > ownLoc[clamp_axis]) - break; - else - offset += len; - } - + offset= curveMax[clamp_axis] + (int)((ownLoc[clamp_axis] - curveMax[clamp_axis]) / len) * len; + /* now, we calculate as per normal, except using offset instead of curveMax[clamp_axis] */ curvetime = (ownLoc[clamp_axis] - offset) / (len); } -- cgit v1.2.3 From 3f8cf2cbdcef13e10e01406a8544d5885cf7f8a3 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 29 Mar 2012 15:50:51 +0000 Subject: Fix #30717: Bmesh Branch manipulator bug (Maya Keymaps) Issue was caused by storing operator properties for VIEW3D_OT_enable_manipulator --- source/blender/editors/space_view3d/view3d_edit.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index ef838700f49..4fdae8f8b24 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -3399,6 +3399,8 @@ static int enable_manipulator_invoke(bContext *C, wmOperator *op, wmEvent *UNUSE void VIEW3D_OT_enable_manipulator(wmOperatorType *ot) { + PropertyRNA *prop; + /* identifiers */ ot->name = "Enable 3D Manipulator"; ot->description = "Enable the transform manipulator for use"; @@ -3409,9 +3411,12 @@ void VIEW3D_OT_enable_manipulator(wmOperatorType *ot) ot->poll = ED_operator_view3d_active; /* rna later */ - RNA_def_boolean(ot->srna, "translate", 0, "Translate", "Enable the translate manipulator"); - RNA_def_boolean(ot->srna, "rotate", 0, "Rotate", "Enable the rotate manipulator"); - RNA_def_boolean(ot->srna, "scale", 0, "Scale", "Enable the scale manipulator"); + prop = RNA_def_boolean(ot->srna, "translate", 0, "Translate", "Enable the translate manipulator"); + RNA_def_property_flag(prop, PROP_SKIP_SAVE); + prop = RNA_def_boolean(ot->srna, "rotate", 0, "Rotate", "Enable the rotate manipulator"); + RNA_def_property_flag(prop, PROP_SKIP_SAVE); + prop = RNA_def_boolean(ot->srna, "scale", 0, "Scale", "Enable the scale manipulator"); + RNA_def_property_flag(prop, PROP_SKIP_SAVE); } /* ************************* below the line! *********************** */ -- cgit v1.2.3 From 7816eb7bd88e93e7b3b714fa36af6cb533df8098 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Thu, 29 Mar 2012 20:58:25 +0000 Subject: Fix "First Last" merge option in array modifier (partial fix for bug 30195) --- source/blender/modifiers/intern/MOD_array.c | 48 ++++++++++++++++++++++++----- 1 file changed, 41 insertions(+), 7 deletions(-) (limited to 'source/blender') diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c index 41b1d18fc5f..4f102e8ad67 100644 --- a/source/blender/modifiers/intern/MOD_array.c +++ b/source/blender/modifiers/intern/MOD_array.c @@ -239,6 +239,7 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, DerivedMesh *result; BMEditMesh *em = DM_to_editbmesh(dm, NULL, FALSE); BMOperator dupe_op, old_dupe_op, weld_op; + BMVert **first_geom = NULL; int i, j, indexLen; /* offset matrix */ float offset[4][4]; @@ -342,8 +343,8 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, for (j=0; j < count - 1; j++) { BMVert *v, *v2, *v3; - BMOpSlot *s1; - BMOpSlot *s2; + BMOpSlot *geom_slot; + BMOpSlot *newout_slot; if (j == 0) BMO_op_initf(em->bm, &dupe_op, "dupe geom=%avef"); @@ -351,8 +352,17 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, BMO_op_initf(em->bm, &dupe_op, "dupe geom=%s", &old_dupe_op, "newout"); BMO_op_exec(em->bm, &dupe_op); - s1 = BMO_slot_get(&dupe_op, "geom"); - s2 = BMO_slot_get(&dupe_op, "newout"); + geom_slot = BMO_slot_get(&dupe_op, "geom"); + newout_slot = BMO_slot_get(&dupe_op, "newout"); + + if ((amd->flags & MOD_ARR_MERGEFINAL) && j == 0) { + int first_geom_bytes = sizeof(BMVert*) * geom_slot->len; + + /* make a copy of the initial geometry ordering so the + last duplicate can be merged into it */ + first_geom = MEM_mallocN(first_geom_bytes, "first_geom"); + memcpy(first_geom, geom_slot->data.buf, first_geom_bytes); + } BMO_op_callf(em->bm, "transform mat=%m4 verts=%s", offset, &dupe_op, "newout"); @@ -366,13 +376,17 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, #define _E(s, i) ((BMVert **)(s)->data.buf)[i] /* generate merge mapping using index map. we do this by using the * operator slots as lookup arrays.*/ - #define E(i) (i) < s1->len ? _E(s1, i) : _E(s2, (i)-s1->len) + #define E(i) \ + ((i) < geom_slot->len ? \ + _E(geom_slot, i) : \ + _E(newout_slot, (i)-geom_slot->len)) for (i=0; ilen); + v2 = _E(geom_slot, indexMap[i]-1); /* check in case the target vertex (v2) is already marked for merging */ @@ -382,6 +396,24 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, BMO_slot_map_ptr_insert(em->bm, &weld_op, "targetmap", v, v2); } + if ((amd->flags & MOD_ARR_MERGEFINAL) && j == count - 2) { + /* special case for merging first and last */ + for (i=0; i < indexLen; i++) { + if (!indexMap[i]) continue; + + /* merge v (from 'newout') into v2 (from XXX) */ + v = _E(newout_slot, indexMap[i]-1); + v2 = first_geom[i - geom_slot->len]; + + /* check in case the target vertex (v2) is already marked + for merging */ + while((v3 = BMO_slot_map_ptr_get(em->bm, &weld_op, "targetmap", v2))) + v2 = v3; + + BMO_slot_map_ptr_insert(em->bm, &weld_op, "targetmap", v, v2); + } + } + #undef E #undef _E } @@ -444,6 +476,8 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, MEM_freeN(em); if (indexMap) MEM_freeN(indexMap); + if (first_geom) + MEM_freeN(first_geom); return result; } -- cgit v1.2.3 From 863f7edad6f41e24f20ee9c471fd6db32f4f684b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 29 Mar 2012 22:26:11 +0000 Subject: style cleanup: sequencer --- source/blender/blenkernel/intern/sequencer.c | 1624 ++++++++++---------- .../editors/space_sequencer/sequencer_add.c | 225 +-- .../editors/space_sequencer/sequencer_buttons.c | 16 +- .../editors/space_sequencer/sequencer_draw.c | 657 ++++---- .../editors/space_sequencer/sequencer_edit.c | 1143 +++++++------- .../editors/space_sequencer/sequencer_ops.c | 88 +- .../editors/space_sequencer/sequencer_scopes.c | 291 ++-- .../editors/space_sequencer/sequencer_select.c | 444 +++--- .../editors/space_sequencer/space_sequencer.c | 266 ++-- 9 files changed, 2393 insertions(+), 2361 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 210ee27d914..980352953b7 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -79,11 +79,11 @@ # include "AUD_C-API.h" #endif -static ImBuf* seq_render_strip_stack( - SeqRenderData context, ListBase *seqbasep, float cfra, int chanshown); +static ImBuf *seq_render_strip_stack( + SeqRenderData context, ListBase *seqbasep, float cfra, int chanshown); -static ImBuf * seq_render_strip( - SeqRenderData context, Sequence * seq, float cfra); +static ImBuf *seq_render_strip( + SeqRenderData context, Sequence *seq, float cfra); static void seq_free_animdata(Scene *scene, Sequence *seq); @@ -92,29 +92,29 @@ static void seq_free_animdata(Scene *scene, Sequence *seq); #define SELECT 1 ListBase seqbase_clipboard; int seqbase_clipboard_frame; -SequencerDrawView sequencer_view3d_cb= NULL; /* NULL in background mode */ +SequencerDrawView sequencer_view3d_cb = NULL; /* NULL in background mode */ void printf_strip(Sequence *seq) { fprintf(stderr, "name: '%s', len:%d, start:%d, (startofs:%d, endofs:%d), (startstill:%d, endstill:%d), machine:%d, (startdisp:%d, enddisp:%d)\n", - seq->name, seq->len, seq->start, seq->startofs, seq->endofs, seq->startstill, seq->endstill, seq->machine, seq->startdisp, seq->enddisp); + seq->name, seq->len, seq->start, seq->startofs, seq->endofs, seq->startstill, seq->endstill, seq->machine, seq->startdisp, seq->enddisp); fprintf(stderr, "\tseq_tx_set_final_left: %d %d\n\n", seq_tx_get_final_left(seq, 0), seq_tx_get_final_right(seq, 0)); } int seqbase_recursive_apply(ListBase *seqbase, int (*apply_func)(Sequence *seq, void *), void *arg) { Sequence *iseq; - for (iseq= seqbase->first; iseq; iseq= iseq->next) { + for (iseq = seqbase->first; iseq; iseq = iseq->next) { if (seq_recursive_apply(iseq, apply_func, arg) == -1) - return -1; /* bail out */ + return -1; /* bail out */ } return 1; } int seq_recursive_apply(Sequence *seq, int (*apply_func)(Sequence *, void *), void *arg) { - int ret= apply_func(seq, arg); + int ret = apply_func(seq, arg); if (ret == -1) return -1; /* bail out */ @@ -142,8 +142,8 @@ static void free_proxy_seq(Sequence *seq) void seq_free_strip(Strip *strip) { strip->us--; - if (strip->us>0) return; - if (strip->us<0) { + if (strip->us > 0) return; + if (strip->us < 0) { printf("error: negative users in strip\n"); return; } @@ -192,8 +192,8 @@ void seq_free_sequence(Scene *scene, Sequence *seq) if (scene) { Editing *ed = scene->ed; - if (ed->act_seq==seq) - ed->act_seq= NULL; + if (ed->act_seq == seq) + ed->act_seq = NULL; if (seq->scene_sound && ELEM(seq->type, SEQ_SOUND, SEQ_SCENE)) sound_remove_scene_sound(scene, seq->scene_sound); @@ -208,7 +208,7 @@ void seq_free_sequence_recurse(Scene *scene, Sequence *seq) { Sequence *iseq; - for (iseq= seq->seqbase.first; iseq; iseq= iseq->next) { + for (iseq = seq->seqbase.first; iseq; iseq = iseq->next) { seq_free_sequence_recurse(scene, iseq); } @@ -221,8 +221,8 @@ Editing *seq_give_editing(Scene *scene, int alloc) if (scene->ed == NULL && alloc) { Editing *ed; - ed= scene->ed= MEM_callocN( sizeof(Editing), "addseq"); - ed->seqbasep= &ed->seqbase; + ed = scene->ed = MEM_callocN(sizeof(Editing), "addseq"); + ed->seqbasep = &ed->seqbase; } return scene->ed; } @@ -231,8 +231,8 @@ static void seq_free_clipboard_recursive(Sequence *seq_parent) { Sequence *seq, *nseq; - for (seq= seq_parent->seqbase.first; seq; seq= nseq) { - nseq= seq->next; + for (seq = seq_parent->seqbase.first; seq; seq = nseq) { + nseq = seq->next; seq_free_clipboard_recursive(seq); } @@ -243,11 +243,11 @@ void seq_free_clipboard(void) { Sequence *seq, *nseq; - for (seq= seqbase_clipboard.first; seq; seq= nseq) { - nseq= seq->next; + for (seq = seqbase_clipboard.first; seq; seq = nseq) { + nseq = seq->next; seq_free_clipboard_recursive(seq); } - seqbase_clipboard.first= seqbase_clipboard.last= NULL; + seqbase_clipboard.first = seqbase_clipboard.last = NULL; } void seq_free_editing(Scene *scene) @@ -256,15 +256,16 @@ void seq_free_editing(Scene *scene) MetaStack *ms; Sequence *seq; - if (ed==NULL) + if (ed == NULL) return; - SEQ_BEGIN(ed, seq) { + SEQ_BEGIN(ed, seq) + { seq_free_sequence(scene, seq); } SEQ_END - while ((ms= ed->metastack.first)) { + while ((ms = ed->metastack.first)) { BLI_remlink(&ed->metastack, ms); MEM_freeN(ms); } @@ -277,8 +278,8 @@ void seq_free_editing(Scene *scene) * ********************************************************************** */ SeqRenderData seq_new_render_data( - struct Main * bmain, struct Scene * scene, - int rectx, int recty, int preview_render_size) + struct Main *bmain, struct Scene *scene, + int rectx, int recty, int preview_render_size) { SeqRenderData rval; @@ -293,7 +294,7 @@ SeqRenderData seq_new_render_data( return rval; } -int seq_cmp_render_data(const SeqRenderData * a, const SeqRenderData * b) +int seq_cmp_render_data(const SeqRenderData *a, const SeqRenderData *b) { if (a->preview_render_size < b->preview_render_size) { return -1; @@ -347,7 +348,7 @@ int seq_cmp_render_data(const SeqRenderData * a, const SeqRenderData * b) return 0; } -unsigned int seq_hash_render_data(const SeqRenderData * a) +unsigned int seq_hash_render_data(const SeqRenderData *a) { unsigned int rval = a->rectx + a->recty; @@ -371,7 +372,7 @@ static void seq_count(ListBase *seqbase, int *tot) { Sequence *seq; - for (seq=seqbase->first; seq; seq=seq->next) { + for (seq = seqbase->first; seq; seq = seq->next) { (*tot)++; if (seq->seqbase.first) @@ -383,13 +384,13 @@ static void seq_build_array(ListBase *seqbase, Sequence ***array, int depth) { Sequence *seq; - for (seq=seqbase->first; seq; seq=seq->next) { - seq->depth= depth; + for (seq = seqbase->first; seq; seq = seq->next) { + seq->depth = depth; if (seq->seqbase.first) - seq_build_array(&seq->seqbase, array, depth+1); + seq_build_array(&seq->seqbase, array, depth + 1); - **array= seq; + **array = seq; (*array)++; } } @@ -398,8 +399,8 @@ void seq_array(Editing *ed, Sequence ***seqarray, int *tot, int use_pointer) { Sequence **array; - *seqarray= NULL; - *tot= 0; + *seqarray = NULL; + *tot = 0; if (ed == NULL) return; @@ -412,7 +413,7 @@ void seq_array(Editing *ed, Sequence ***seqarray, int *tot, int use_pointer) if (*tot == 0) return; - *seqarray= array= MEM_mallocN(sizeof(Sequence *)*(*tot), "SeqArray"); + *seqarray = array = MEM_mallocN(sizeof(Sequence *) * (*tot), "SeqArray"); if (use_pointer) seq_build_array(ed->seqbasep, &array, 0); else @@ -425,18 +426,18 @@ void seq_begin(Editing *ed, SeqIterator *iter, int use_pointer) seq_array(ed, &iter->array, &iter->tot, use_pointer); if (iter->tot) { - iter->cur= 0; - iter->seq= iter->array[iter->cur]; - iter->valid= 1; + iter->cur = 0; + iter->seq = iter->array[iter->cur]; + iter->valid = 1; } } void seq_next(SeqIterator *iter) { if (++iter->cur < iter->tot) - iter->seq= iter->array[iter->cur]; + iter->seq = iter->array[iter->cur]; else - iter->valid= 0; + iter->valid = 0; } void seq_end(SeqIterator *iter) @@ -444,7 +445,7 @@ void seq_end(SeqIterator *iter) if (iter->array) MEM_freeN(iter->array); - iter->valid= 0; + iter->valid = 0; } /* @@ -457,11 +458,11 @@ void seq_end(SeqIterator *iter) */ static void do_seq_count_cb(ListBase *seqbase, int *totseq, - int (*test_func)(Sequence * seq)) + int (*test_func)(Sequence *seq)) { Sequence *seq; - seq= seqbase->first; + seq = seqbase->first; while (seq) { int test = test_func(seq); if (test & BUILD_SEQAR_COUNT_CURRENT) { @@ -470,48 +471,48 @@ static void do_seq_count_cb(ListBase *seqbase, int *totseq, if (seq->seqbase.first && (test & BUILD_SEQAR_COUNT_CHILDREN)) { do_seq_count_cb(&seq->seqbase, totseq, test_func); } - seq= seq->next; + seq = seq->next; } } static void do_build_seqar_cb(ListBase *seqbase, Sequence ***seqar, int depth, - int (*test_func)(Sequence * seq)) + int (*test_func)(Sequence *seq)) { Sequence *seq; - seq= seqbase->first; + seq = seqbase->first; while (seq) { int test = test_func(seq); - seq->depth= depth; + seq->depth = depth; if (seq->seqbase.first && (test & BUILD_SEQAR_COUNT_CHILDREN)) { - do_build_seqar_cb(&seq->seqbase, seqar, depth+1, test_func); + do_build_seqar_cb(&seq->seqbase, seqar, depth + 1, test_func); } if (test & BUILD_SEQAR_COUNT_CURRENT) { - **seqar= seq; + **seqar = seq; (*seqar)++; } - seq= seq->next; + seq = seq->next; } } void build_seqar_cb(ListBase *seqbase, Sequence ***seqar, int *totseq, - int (*test_func)(Sequence * seq)) + int (*test_func)(Sequence *seq)) { Sequence **tseqar; - *totseq= 0; + *totseq = 0; do_seq_count_cb(seqbase, totseq, test_func); - if (*totseq==0) { - *seqar= NULL; + if (*totseq == 0) { + *seqar = NULL; return; } - *seqar= MEM_mallocN(sizeof(void *)* *totseq, "seqar"); - tseqar= *seqar; + *seqar = MEM_mallocN(sizeof(void *) * *totseq, "seqar"); + tseqar = *seqar; do_build_seqar_cb(seqbase, seqar, 0, test_func); - *seqar= tseqar; + *seqar = tseqar; } @@ -521,7 +522,7 @@ static void seq_update_sound_bounds_recursive(Scene *scene, Sequence *metaseq) /* for sound we go over full meta tree to update bounds of the sound strips, * since sound is played outside of evaluating the imbufs, */ - for (seq=metaseq->seqbase.first; seq; seq=seq->next) { + for (seq = metaseq->seqbase.first; seq; seq = seq->next) { if (seq->type == SEQ_META) { seq_update_sound_bounds_recursive(scene, seq); } @@ -534,7 +535,7 @@ static void seq_update_sound_bounds_recursive(Scene *scene, Sequence *metaseq) if (seq->start + seq->len - seq->endofs > metaseq->start + metaseq->len - metaseq->endofs) endofs = seq->start + seq->len - metaseq->start - metaseq->len + metaseq->endofs; - sound_move_scene_sound(scene, seq->scene_sound, seq->start + startofs, seq->start+seq->len - endofs, startofs); + sound_move_scene_sound(scene, seq->scene_sound, seq->start + startofs, seq->start + seq->len - endofs, startofs); } } } @@ -542,18 +543,18 @@ static void seq_update_sound_bounds_recursive(Scene *scene, Sequence *metaseq) void calc_sequence_disp(Scene *scene, Sequence *seq) { - if (seq->startofs && seq->startstill) seq->startstill= 0; - if (seq->endofs && seq->endstill) seq->endstill= 0; + if (seq->startofs && seq->startstill) seq->startstill = 0; + if (seq->endofs && seq->endstill) seq->endstill = 0; - seq->startdisp= seq->start + seq->startofs - seq->startstill; - seq->enddisp= seq->start+seq->len - seq->endofs + seq->endstill; + seq->startdisp = seq->start + seq->startofs - seq->startstill; + seq->enddisp = seq->start + seq->len - seq->endofs + seq->endstill; - seq->handsize= 10.0; /* 10 frames */ - if ( seq->enddisp-seq->startdisp < 10 ) { - seq->handsize= (float)(0.5*(seq->enddisp-seq->startdisp)); + seq->handsize = 10.0; /* 10 frames */ + if (seq->enddisp - seq->startdisp < 10) { + seq->handsize = (float)(0.5 * (seq->enddisp - seq->startdisp)); } - else if (seq->enddisp-seq->startdisp > 250) { - seq->handsize= (float)((seq->enddisp-seq->startdisp)/25); + else if (seq->enddisp - seq->startdisp > 250) { + seq->handsize = (float)((seq->enddisp - seq->startdisp) / 25); } if (ELEM(seq->type, SEQ_SOUND, SEQ_SCENE)) { @@ -569,18 +570,18 @@ void calc_sequence(Scene *scene, Sequence *seq) int min, max; /* check all metas recursively */ - seqm= seq->seqbase.first; + seqm = seq->seqbase.first; while (seqm) { if (seqm->seqbase.first) calc_sequence(scene, seqm); - seqm= seqm->next; + seqm = seqm->next; } /* effects and meta: automatic start and end */ if (seq->type & SEQ_EFFECT) { /* pointers */ - if (seq->seq2==NULL) seq->seq2= seq->seq1; - if (seq->seq3==NULL) seq->seq3= seq->seq1; + if (seq->seq2 == NULL) seq->seq2 = seq->seq1; + if (seq->seq3 == NULL) seq->seq3 = seq->seq1; /* effecten go from seq1 -> seq2: test */ @@ -593,40 +594,40 @@ void calc_sequence(Scene *scene, Sequence *seq) /* XXX These resets should not be necessary, but users used to be able to * edit effect's length, leading to strange results. See #29190. */ seq->startofs = seq->endofs = seq->startstill = seq->endstill = 0; - seq->start= seq->startdisp= MAX3(seq->seq1->startdisp, seq->seq2->startdisp, seq->seq3->startdisp); - seq->enddisp= MIN3(seq->seq1->enddisp, seq->seq2->enddisp, seq->seq3->enddisp); + seq->start = seq->startdisp = MAX3(seq->seq1->startdisp, seq->seq2->startdisp, seq->seq3->startdisp); + seq->enddisp = MIN3(seq->seq1->enddisp, seq->seq2->enddisp, seq->seq3->enddisp); /* we cant help if strips don't overlap, it wont give useful results. * but at least ensure 'len' is never negative which causes bad bugs elsewhere. */ if (seq->enddisp < seq->startdisp) { /* simple start/end swap */ - seq->start= seq->enddisp; + seq->start = seq->enddisp; seq->enddisp = seq->startdisp; - seq->startdisp= seq->start; + seq->startdisp = seq->start; seq->flag |= SEQ_INVALID_EFFECT; } else { seq->flag &= ~SEQ_INVALID_EFFECT; } - seq->len= seq->enddisp - seq->startdisp; + seq->len = seq->enddisp - seq->startdisp; } else { calc_sequence_disp(scene, seq); } } else { - if (seq->type==SEQ_META) { - seqm= seq->seqbase.first; + if (seq->type == SEQ_META) { + seqm = seq->seqbase.first; if (seqm) { - min= MAXFRAME * 2; - max= -MAXFRAME * 2; + min = MAXFRAME * 2; + max = -MAXFRAME * 2; while (seqm) { - if (seqm->startdisp < min) min= seqm->startdisp; - if (seqm->enddisp > max) max= seqm->enddisp; - seqm= seqm->next; + if (seqm->startdisp < min) min = seqm->startdisp; + if (seqm->enddisp > max) max = seqm->enddisp; + seqm = seqm->next; } - seq->start= min + seq->anim_startofs; - seq->len = max-min; + seq->start = min + seq->anim_startofs; + seq->len = max - min; seq->len -= seq->anim_startofs; seq->len -= seq->anim_endofs; } @@ -637,95 +638,95 @@ void calc_sequence(Scene *scene, Sequence *seq) } /* note: caller should run calc_sequence(scene, seq) after */ -void reload_sequence_new_file(Scene *scene, Sequence * seq, int lock_range) +void reload_sequence_new_file(Scene *scene, Sequence *seq, int lock_range) { char str[FILE_MAX]; - int prev_startdisp=0, prev_enddisp=0; + int prev_startdisp = 0, prev_enddisp = 0; /* note: don't rename the strip, will break animation curves */ - if (ELEM6(seq->type, SEQ_MOVIE, SEQ_IMAGE, SEQ_SOUND, SEQ_SCENE, SEQ_META, SEQ_MOVIECLIP)==0) { + if (ELEM6(seq->type, SEQ_MOVIE, SEQ_IMAGE, SEQ_SOUND, SEQ_SCENE, SEQ_META, SEQ_MOVIECLIP) == 0) { return; } if (lock_range) { /* keep so we don't have to move the actual start and end points (only the data) */ calc_sequence_disp(scene, seq); - prev_startdisp= seq->startdisp; - prev_enddisp= seq->enddisp; + prev_startdisp = seq->startdisp; + prev_enddisp = seq->enddisp; } - switch(seq->type) { - case SEQ_IMAGE: - { - /* Hack? */ - size_t olen = MEM_allocN_len(seq->strip->stripdata)/sizeof(struct StripElem); - - seq->len = olen; - seq->len -= seq->anim_startofs; - seq->len -= seq->anim_endofs; - if (seq->len < 0) { - seq->len = 0; + switch (seq->type) { + case SEQ_IMAGE: + { + /* Hack? */ + size_t olen = MEM_allocN_len(seq->strip->stripdata) / sizeof(struct StripElem); + + seq->len = olen; + seq->len -= seq->anim_startofs; + seq->len -= seq->anim_endofs; + if (seq->len < 0) { + seq->len = 0; + } + break; } - break; - } - case SEQ_MOVIE: - BLI_join_dirfile(str, sizeof(str), seq->strip->dir, - seq->strip->stripdata->name); - BLI_path_abs(str, G.main->name); + case SEQ_MOVIE: + BLI_join_dirfile(str, sizeof(str), seq->strip->dir, + seq->strip->stripdata->name); + BLI_path_abs(str, G.main->name); - if (seq->anim) IMB_free_anim(seq->anim); - seq->anim = openanim(str, IB_rect | ((seq->flag & SEQ_FILTERY) ? IB_animdeinterlace : 0), seq->streamindex); + if (seq->anim) IMB_free_anim(seq->anim); + seq->anim = openanim(str, IB_rect | ((seq->flag & SEQ_FILTERY) ? IB_animdeinterlace : 0), seq->streamindex); - if (!seq->anim) { - return; - } + if (!seq->anim) { + return; + } + + seq->len = IMB_anim_get_duration(seq->anim, + seq->strip->proxy ? + seq->strip->proxy->tc : + IMB_TC_RECORD_RUN); - seq->len = IMB_anim_get_duration(seq->anim, - seq->strip->proxy ? - seq->strip->proxy->tc : - IMB_TC_RECORD_RUN); - - seq->anim_preseek = IMB_anim_get_preseek(seq->anim); + seq->anim_preseek = IMB_anim_get_preseek(seq->anim); - seq->len -= seq->anim_startofs; - seq->len -= seq->anim_endofs; - if (seq->len < 0) { - seq->len = 0; - } - break; - case SEQ_MOVIECLIP: - seq->len = BKE_movieclip_get_duration(seq->clip); + seq->len -= seq->anim_startofs; + seq->len -= seq->anim_endofs; + if (seq->len < 0) { + seq->len = 0; + } + break; + case SEQ_MOVIECLIP: + seq->len = BKE_movieclip_get_duration(seq->clip); - seq->len -= seq->anim_startofs; - seq->len -= seq->anim_endofs; - if (seq->len < 0) { - seq->len = 0; - } - break; - case SEQ_SOUND: + seq->len -= seq->anim_startofs; + seq->len -= seq->anim_endofs; + if (seq->len < 0) { + seq->len = 0; + } + break; + case SEQ_SOUND: #ifdef WITH_AUDASPACE - if (!seq->sound) - return; - seq->len = ceil(AUD_getInfo(seq->sound->playback_handle).length * FPS); - seq->len -= seq->anim_startofs; - seq->len -= seq->anim_endofs; - if (seq->len < 0) { - seq->len = 0; - } + if (!seq->sound) + return; + seq->len = ceil(AUD_getInfo(seq->sound->playback_handle).length * FPS); + seq->len -= seq->anim_startofs; + seq->len -= seq->anim_endofs; + if (seq->len < 0) { + seq->len = 0; + } #else - return; + return; #endif - break; - case SEQ_SCENE: - { - seq->len= (seq->scene)? seq->scene->r.efra - seq->scene->r.sfra + 1: 0; - seq->len -= seq->anim_startofs; - seq->len -= seq->anim_endofs; - if (seq->len < 0) { - seq->len = 0; + break; + case SEQ_SCENE: + { + seq->len = (seq->scene) ? seq->scene->r.efra - seq->scene->r.sfra + 1 : 0; + seq->len -= seq->anim_startofs; + seq->len -= seq->anim_endofs; + if (seq->len < 0) { + seq->len = 0; + } + break; } - break; - } } free_proxy_seq(seq); @@ -743,51 +744,51 @@ void sort_seq(Scene *scene) { /* all strips together per kind, and in order of y location ("machine") */ ListBase seqbase, effbase; - Editing *ed= seq_give_editing(scene, FALSE); + Editing *ed = seq_give_editing(scene, FALSE); Sequence *seq, *seqt; - if (ed==NULL) return; + if (ed == NULL) return; - seqbase.first= seqbase.last= NULL; - effbase.first= effbase.last= NULL; + seqbase.first = seqbase.last = NULL; + effbase.first = effbase.last = NULL; - while ( (seq= ed->seqbasep->first) ) { + while ( (seq = ed->seqbasep->first) ) { BLI_remlink(ed->seqbasep, seq); if (seq->type & SEQ_EFFECT) { - seqt= effbase.first; + seqt = effbase.first; while (seqt) { - if (seqt->machine>=seq->machine) { + if (seqt->machine >= seq->machine) { BLI_insertlinkbefore(&effbase, seqt, seq); break; } - seqt= seqt->next; + seqt = seqt->next; } - if (seqt==NULL) BLI_addtail(&effbase, seq); + if (seqt == NULL) BLI_addtail(&effbase, seq); } else { - seqt= seqbase.first; + seqt = seqbase.first; while (seqt) { - if (seqt->machine>=seq->machine) { + if (seqt->machine >= seq->machine) { BLI_insertlinkbefore(&seqbase, seqt, seq); break; } - seqt= seqt->next; + seqt = seqt->next; } - if (seqt==NULL) BLI_addtail(&seqbase, seq); + if (seqt == NULL) BLI_addtail(&seqbase, seq); } } BLI_movelisttolist(&seqbase, &effbase); - *(ed->seqbasep)= seqbase; + *(ed->seqbasep) = seqbase; } static int clear_scene_in_allseqs_cb(Sequence *seq, void *arg_pt) { - if (seq->scene==(Scene *)arg_pt) - seq->scene= NULL; + if (seq->scene == (Scene *)arg_pt) + seq->scene = NULL; return 1; } @@ -796,7 +797,7 @@ void clear_scene_in_allseqs(Main *bmain, Scene *scene) Scene *scene_iter; /* when a scene is deleted: test all seqs */ - for (scene_iter= bmain->scene.first; scene_iter; scene_iter= scene_iter->id.next) { + for (scene_iter = bmain->scene.first; scene_iter; scene_iter = scene_iter->id.next) { if (scene_iter != scene && scene_iter->ed) { seqbase_recursive_apply(&scene_iter->ed->seqbase, clear_scene_in_allseqs_cb, scene); } @@ -811,20 +812,21 @@ typedef struct SeqUniqueInfo { int match; } SeqUniqueInfo; -/* +#if 0 static void seqbase_unique_name(ListBase *seqbasep, Sequence *seq) { BLI_uniquename(seqbasep, seq, "Sequence", '.', offsetof(Sequence, name), SEQ_NAME_MAXSTR); -}*/ +} +#endif static void seqbase_unique_name(ListBase *seqbasep, SeqUniqueInfo *sui) { Sequence *seq; - for (seq=seqbasep->first; seq; seq= seq->next) { - if (sui->seq != seq && strcmp(sui->name_dest, seq->name+2)==0) { + for (seq = seqbasep->first; seq; seq = seq->next) { + if (sui->seq != seq && strcmp(sui->name_dest, seq->name + 2) == 0) { /* SEQ_NAME_MAXSTR - 2 for prefix, -1 for \0, -4 for the number */ BLI_snprintf(sui->name_dest, sizeof(sui->name_dest), "%.59s.%03d", sui->name_src, sui->count++); - sui->match= 1; /* be sure to re-scan */ + sui->match = 1; /* be sure to re-scan */ } } } @@ -840,57 +842,57 @@ void seqbase_unique_name_recursive(ListBase *seqbasep, struct Sequence *seq) { SeqUniqueInfo sui; char *dot; - sui.seq= seq; - BLI_strncpy(sui.name_src, seq->name+2, sizeof(sui.name_src)); - BLI_strncpy(sui.name_dest, seq->name+2, sizeof(sui.name_dest)); + sui.seq = seq; + BLI_strncpy(sui.name_src, seq->name + 2, sizeof(sui.name_src)); + BLI_strncpy(sui.name_dest, seq->name + 2, sizeof(sui.name_dest)); - sui.count= 1; - sui.match= 1; /* assume the worst to start the loop */ + sui.count = 1; + sui.match = 1; /* assume the worst to start the loop */ /* Strip off the suffix */ - if ((dot=strrchr(sui.name_src, '.'))) { - *dot= '\0'; + if ((dot = strrchr(sui.name_src, '.'))) { + *dot = '\0'; dot++; if (*dot) - sui.count= atoi(dot) + 1; + sui.count = atoi(dot) + 1; } while (sui.match) { - sui.match= 0; + sui.match = 0; seqbase_unique_name(seqbasep, &sui); seqbase_recursive_apply(seqbasep, seqbase_unique_name_recursive_cb, &sui); } - BLI_strncpy(seq->name+2, sui.name_dest, sizeof(seq->name)-2); + BLI_strncpy(seq->name + 2, sui.name_dest, sizeof(seq->name) - 2); } static const char *give_seqname_by_type(int type) { - switch(type) { - case SEQ_META: return "Meta"; - case SEQ_IMAGE: return "Image"; - case SEQ_SCENE: return "Scene"; - case SEQ_MOVIE: return "Movie"; - case SEQ_MOVIECLIP: return "Clip"; - case SEQ_SOUND: return "Audio"; - case SEQ_CROSS: return "Cross"; - case SEQ_GAMCROSS: return "Gamma Cross"; - case SEQ_ADD: return "Add"; - case SEQ_SUB: return "Sub"; - case SEQ_MUL: return "Mul"; - case SEQ_ALPHAOVER: return "Alpha Over"; - case SEQ_ALPHAUNDER: return "Alpha Under"; - case SEQ_OVERDROP: return "Over Drop"; - case SEQ_WIPE: return "Wipe"; - case SEQ_GLOW: return "Glow"; - case SEQ_TRANSFORM: return "Transform"; - case SEQ_COLOR: return "Color"; - case SEQ_MULTICAM: return "Multicam"; - case SEQ_ADJUSTMENT: return "Adjustment"; - case SEQ_SPEED: return "Speed"; - default: - return NULL; + switch (type) { + case SEQ_META: return "Meta"; + case SEQ_IMAGE: return "Image"; + case SEQ_SCENE: return "Scene"; + case SEQ_MOVIE: return "Movie"; + case SEQ_MOVIECLIP: return "Clip"; + case SEQ_SOUND: return "Audio"; + case SEQ_CROSS: return "Cross"; + case SEQ_GAMCROSS: return "Gamma Cross"; + case SEQ_ADD: return "Add"; + case SEQ_SUB: return "Sub"; + case SEQ_MUL: return "Mul"; + case SEQ_ALPHAOVER: return "Alpha Over"; + case SEQ_ALPHAUNDER: return "Alpha Under"; + case SEQ_OVERDROP: return "Over Drop"; + case SEQ_WIPE: return "Wipe"; + case SEQ_GLOW: return "Glow"; + case SEQ_TRANSFORM: return "Transform"; + case SEQ_COLOR: return "Color"; + case SEQ_MULTICAM: return "Multicam"; + case SEQ_ADJUSTMENT: return "Adjustment"; + case SEQ_SPEED: return "Speed"; + default: + return NULL; } } @@ -899,12 +901,13 @@ const char *give_seqname(Sequence *seq) const char *name = give_seqname_by_type(seq->type); if (!name) { - if (seq->typetype < SEQ_EFFECT) { return seq->strip->dir; } - else if (seq->type==SEQ_PLUGIN) { + else if (seq->type == SEQ_PLUGIN) { if (!(seq->flag & SEQ_EFFECT_NOT_LOADED) && - seq->plugin && seq->plugin->doit) { + seq->plugin && seq->plugin->doit) + { return seq->plugin->pname; } else { @@ -926,11 +929,11 @@ static void make_black_ibuf(ImBuf *ibuf) float *rect_float; int tot; - if (ibuf==NULL || (ibuf->rect==NULL && ibuf->rect_float==NULL)) return; + if (ibuf == NULL || (ibuf->rect == NULL && ibuf->rect_float == NULL)) return; - tot= ibuf->x*ibuf->y; + tot = ibuf->x * ibuf->y; - rect= ibuf->rect; + rect = ibuf->rect; rect_float = ibuf->rect_float; if (rect) { @@ -949,28 +952,28 @@ static void multibuf(ImBuf *ibuf, float fmul) int a, mul, icol; - mul= (int)(256.0f * fmul); - rt= (char *)ibuf->rect; + mul = (int)(256.0f * fmul); + rt = (char *)ibuf->rect; rt_float = ibuf->rect_float; if (rt) { - a= ibuf->x*ibuf->y; + a = ibuf->x * ibuf->y; while (a--) { - icol= (mul*rt[0])>>8; - if (icol>254) rt[0]= 255; else rt[0]= icol; - icol= (mul*rt[1])>>8; - if (icol>254) rt[1]= 255; else rt[1]= icol; - icol= (mul*rt[2])>>8; - if (icol>254) rt[2]= 255; else rt[2]= icol; - icol= (mul*rt[3])>>8; - if (icol>254) rt[3]= 255; else rt[3]= icol; + icol = (mul * rt[0]) >> 8; + if (icol > 254) rt[0] = 255; else rt[0] = icol; + icol = (mul * rt[1]) >> 8; + if (icol > 254) rt[1] = 255; else rt[1] = icol; + icol = (mul * rt[2]) >> 8; + if (icol > 254) rt[2] = 255; else rt[2] = icol; + icol = (mul * rt[3]) >> 8; + if (icol > 254) rt[3] = 255; else rt[3] = icol; - rt+= 4; + rt += 4; } } if (rt_float) { - a= ibuf->x*ibuf->y; + a = ibuf->x * ibuf->y; while (a--) { rt_float[0] *= fmul; rt_float[1] *= fmul; @@ -986,7 +989,7 @@ static float give_stripelem_index(Sequence *seq, float cfra) { float nr; int sta = seq->start; - int end = seq->start+seq->len-1; + int end = seq->start + seq->len - 1; if (seq->type & SEQ_EFFECT) { end = seq->enddisp; @@ -996,16 +999,16 @@ static float give_stripelem_index(Sequence *seq, float cfra) return -1; } - if (seq->flag&SEQ_REVERSE_FRAMES) { + if (seq->flag & SEQ_REVERSE_FRAMES) { /*reverse frame in this sequence */ - if (cfra <= sta) nr= end - sta; - else if (cfra >= end) nr= 0; - else nr= end - cfra; + if (cfra <= sta) nr = end - sta; + else if (cfra >= end) nr = 0; + else nr = end - cfra; } else { - if (cfra <= sta) nr= 0; - else if (cfra >= end) nr= end - sta; - else nr= cfra - sta; + if (cfra <= sta) nr = 0; + else if (cfra >= end) nr = end - sta; + else nr = cfra - sta; } if (seq->strobe < 1.0f) seq->strobe = 1.0f; @@ -1019,13 +1022,13 @@ static float give_stripelem_index(Sequence *seq, float cfra) StripElem *give_stripelem(Sequence *seq, int cfra) { - StripElem *se= seq->strip->stripdata; + StripElem *se = seq->strip->stripdata; if (seq->type == SEQ_IMAGE) { /* only - * IMAGE strips use the whole array, - * MOVIE strips use only - * the first element, all other strips - * don't use this... */ + * IMAGE strips use the whole array, + * MOVIE strips use only + * the first element, all other strips + * don't use this... */ int nr = (int) give_stripelem_index(seq, cfra); if (nr == -1 || se == NULL) return NULL; @@ -1035,20 +1038,20 @@ StripElem *give_stripelem(Sequence *seq, int cfra) return se; } -static int evaluate_seq_frame_gen(Sequence ** seq_arr, ListBase *seqbase, int cfra) +static int evaluate_seq_frame_gen(Sequence **seq_arr, ListBase *seqbase, int cfra) { Sequence *seq; - int totseq=0; + int totseq = 0; - memset(seq_arr, 0, sizeof(Sequence*) * (MAXSEQ+1)); + memset(seq_arr, 0, sizeof(Sequence *) * (MAXSEQ + 1)); - seq= seqbase->first; + seq = seqbase->first; while (seq) { - if (seq->startdisp <=cfra && seq->enddisp > cfra) { - seq_arr[seq->machine]= seq; + if (seq->startdisp <= cfra && seq->enddisp > cfra) { + seq_arr[seq->machine] = seq; totseq++; } - seq= seq->next; + seq = seq->next; } return totseq; @@ -1056,21 +1059,21 @@ static int evaluate_seq_frame_gen(Sequence ** seq_arr, ListBase *seqbase, int cf int evaluate_seq_frame(Scene *scene, int cfra) { - Editing *ed= seq_give_editing(scene, FALSE); - Sequence *seq_arr[MAXSEQ+1]; + Editing *ed = seq_give_editing(scene, FALSE); + Sequence *seq_arr[MAXSEQ + 1]; - if (ed==NULL) return 0; + if (ed == NULL) return 0; return evaluate_seq_frame_gen(seq_arr, ed->seqbasep, cfra); } -static int video_seq_is_rendered(Sequence * seq) +static int video_seq_is_rendered(Sequence *seq) { return (seq && !(seq->flag & SEQ_MUTE) && seq->type != SEQ_SOUND); } -static int get_shown_sequences( ListBase * seqbasep, int cfra, int chanshown, Sequence ** seq_arr_out) +static int get_shown_sequences(ListBase *seqbasep, int cfra, int chanshown, Sequence **seq_arr_out) { - Sequence *seq_arr[MAXSEQ+1]; + Sequence *seq_arr[MAXSEQ + 1]; int b = chanshown; int cnt = 0; @@ -1091,7 +1094,7 @@ static int get_shown_sequences( ListBase * seqbasep, int cfra, int chanshown, Se chanshown = b; - for (;b > 0; b--) { + for (; b > 0; b--) { if (video_seq_is_rendered(seq_arr[b])) { if (seq_arr[b]->blend_mode == SEQ_BLEND_REPLACE) { break; @@ -1099,7 +1102,7 @@ static int get_shown_sequences( ListBase * seqbasep, int cfra, int chanshown, Se } } - for (;b <= chanshown && b >= 0; b++) { + for (; b <= chanshown && b >= 0; b++) { if (video_seq_is_rendered(seq_arr[b])) { seq_arr_out[cnt++] = seq_arr[b]; } @@ -1125,7 +1128,7 @@ typedef struct SeqIndexBuildContext { Sequence *seq, *orig_seq; } SeqIndexBuildContext; -#define PROXY_MAXFILE (2*FILE_MAXDIR+FILE_MAXFILE) +#define PROXY_MAXFILE (2 * FILE_MAXDIR + FILE_MAXFILE) static IMB_Proxy_Size seq_rendersize_to_proxysize(int size) { @@ -1158,10 +1161,10 @@ static double seq_rendersize_to_scale_factor(int size) return 0.25; } -static void seq_open_anim_file(Sequence * seq) +static void seq_open_anim_file(Sequence *seq) { char name[FILE_MAX]; - StripProxy * proxy; + StripProxy *proxy; if (seq->anim != NULL) { return; @@ -1173,7 +1176,7 @@ static void seq_open_anim_file(Sequence * seq) seq->anim = openanim(name, IB_rect | ((seq->flag & SEQ_FILTERY) ? - IB_animdeinterlace : 0), seq->streamindex); + IB_animdeinterlace : 0), seq->streamindex); if (seq->anim == NULL) { return; @@ -1191,7 +1194,7 @@ static void seq_open_anim_file(Sequence * seq) } -static int seq_proxy_get_fname(Sequence * seq, int cfra, int render_size, char * name) +static int seq_proxy_get_fname(Sequence *seq, int cfra, int render_size, char *name) { int frameno; char dir[PROXY_MAXFILE]; @@ -1208,7 +1211,7 @@ static int seq_proxy_get_fname(Sequence * seq, int cfra, int render_size, char * * have both, a directory full of jpeg files and proxy avis, so * sorry folks, please rebuild your proxies... */ - if (seq->flag & (SEQ_USE_PROXY_CUSTOM_DIR|SEQ_USE_PROXY_CUSTOM_FILE)) { + if (seq->flag & (SEQ_USE_PROXY_CUSTOM_DIR | SEQ_USE_PROXY_CUSTOM_FILE)) { BLI_strncpy(dir, seq->strip->proxy->dir, sizeof(dir)); } else if (seq->type == SEQ_IMAGE) { @@ -1248,11 +1251,10 @@ static int seq_proxy_get_fname(Sequence * seq, int cfra, int render_size, char * return TRUE; } -static struct ImBuf * seq_proxy_fetch(SeqRenderData context, Sequence * seq, int cfra) +static ImBuf *seq_proxy_fetch(SeqRenderData context, Sequence *seq, int cfra) { char name[PROXY_MAXFILE]; - IMB_Proxy_Size psize = seq_rendersize_to_proxysize( - context.preview_render_size); + IMB_Proxy_Size psize = seq_rendersize_to_proxysize(context.preview_render_size); int size_flags; int render_size = context.preview_render_size; @@ -1275,23 +1277,23 @@ static struct ImBuf * seq_proxy_fetch(SeqRenderData context, Sequence * seq, int if (seq->flag & SEQ_USE_PROXY_CUSTOM_FILE) { int frameno = (int) give_stripelem_index(seq, cfra) + seq->anim_startofs; if (seq->strip->proxy->anim == NULL) { - if (seq_proxy_get_fname(seq, cfra, render_size, name)==0) { + if (seq_proxy_get_fname(seq, cfra, render_size, name) == 0) { return NULL; } seq->strip->proxy->anim = openanim(name, IB_rect, 0); } - if (seq->strip->proxy->anim==NULL) { + if (seq->strip->proxy->anim == NULL) { return NULL; } seq_open_anim_file(seq); - frameno = IMB_anim_index_get_frame_index( - seq->anim, seq->strip->proxy->tc, frameno); + frameno = IMB_anim_index_get_frame_index(seq->anim, seq->strip->proxy->tc, + frameno); return IMB_anim_absolute(seq->strip->proxy->anim, frameno, - IMB_TC_NONE, IMB_PROXY_NONE); + IMB_TC_NONE, IMB_PROXY_NONE); } if (seq_proxy_get_fname(seq, cfra, render_size, name) == 0) { @@ -1307,14 +1309,14 @@ static struct ImBuf * seq_proxy_fetch(SeqRenderData context, Sequence * seq, int } static void seq_proxy_build_frame(SeqRenderData context, - Sequence* seq, int cfra, - int proxy_render_size) + Sequence *seq, int cfra, + int proxy_render_size) { char name[PROXY_MAXFILE]; int quality; int rectx, recty; int ok; - struct ImBuf * ibuf; + ImBuf *ibuf; if (!seq_proxy_get_fname(seq, cfra, proxy_render_size, name)) { return; @@ -1332,11 +1334,11 @@ static void seq_proxy_build_frame(SeqRenderData context, /* depth = 32 is intentionally left in, otherwise ALPHA channels * won't work... */ quality = seq->strip->proxy->quality; - ibuf->ftype= JPG | quality; + ibuf->ftype = JPG | quality; /* unsupported feature only confuses other s/w */ - if (ibuf->planes==32) - ibuf->planes= 24; + if (ibuf->planes == 32) + ibuf->planes = 24; BLI_make_existing_file(name); @@ -1348,8 +1350,7 @@ static void seq_proxy_build_frame(SeqRenderData context, IMB_freeImBuf(ibuf); } -struct SeqIndexBuildContext *seq_proxy_rebuild_context(Main *bmain, Scene *scene, Sequence *seq) -{ +struct SeqIndexBuildContext *seq_proxy_rebuild_context(Main *bmain, Scene *scene, Sequence *seq){ SeqIndexBuildContext *context; Sequence *nseq; @@ -1379,7 +1380,7 @@ struct SeqIndexBuildContext *seq_proxy_rebuild_context(Main *bmain, Scene *scene if (nseq->anim) { context->index_context = IMB_anim_index_rebuild_context(nseq->anim, - context->tc_flags, context->size_flags, context->quality); + context->tc_flags, context->size_flags, context->quality); } } @@ -1413,10 +1414,10 @@ void seq_proxy_rebuild(SeqIndexBuildContext *context, short *stop, short *do_upd /* fail safe code */ render_context = seq_new_render_data( - context->bmain, context->scene, - (scene->r.size * (float) scene->r.xsch) / 100.0f + 0.5f, - (scene->r.size * (float) scene->r.ysch) / 100.0f + 0.5f, - 100); + context->bmain, context->scene, + (scene->r.size * (float) scene->r.xsch) / 100.0f + 0.5f, + (scene->r.size * (float) scene->r.ysch) / 100.0f + 0.5f, + 100); for (cfra = seq->startdisp + seq->startstill; cfra < seq->enddisp - seq->endstill; cfra++) { @@ -1433,9 +1434,9 @@ void seq_proxy_rebuild(SeqIndexBuildContext *context, short *stop, short *do_upd seq_proxy_build_frame(render_context, seq, cfra, 100); } - *progress= (float)cfra/(seq->enddisp - seq->endstill - - seq->startdisp + seq->startstill); - *do_update= 1; + *progress = (float)cfra / (seq->enddisp - seq->endstill - + seq->startdisp + seq->startstill); + *do_update = 1; if (*stop || G.afbreek) break; @@ -1459,7 +1460,7 @@ void seq_proxy_rebuild_finish(SeqIndexBuildContext *context, short stop) * color balance * ********************************************************************** */ -static StripColorBalance calc_cb(StripColorBalance * cb_) +static StripColorBalance calc_cb(StripColorBalance *cb_) { StripColorBalance cb = *cb_; int c; @@ -1493,7 +1494,7 @@ static StripColorBalance calc_cb(StripColorBalance * cb_) if (!(cb.flag & SEQ_COLOR_BALANCE_INVERSE_GAMMA)) { for (c = 0; c < 3; c++) { if (cb.gamma[c] != 0.0f) { - cb.gamma[c] = 1.0f/cb.gamma[c]; + cb.gamma[c] = 1.0f / cb.gamma[c]; } else { cb.gamma[c] = 1000000; /* should be enough :) */ @@ -1507,7 +1508,7 @@ static StripColorBalance calc_cb(StripColorBalance * cb_) /* note: lift is actually 2-lift */ MINLINE float color_balance_fl(float in, const float lift, const float gain, const float gamma, const float mul) { - float x= (((in - 1.0f) * lift) + 1.0f) * gain; + float x = (((in - 1.0f) * lift) + 1.0f) * gain; /* prevent NaN */ if (x < 0.f) x = 0.f; @@ -1516,34 +1517,34 @@ MINLINE float color_balance_fl(float in, const float lift, const float gain, con } static void make_cb_table_byte(float lift, float gain, float gamma, - unsigned char * table, float mul) + unsigned char *table, float mul) { int y; for (y = 0; y < 256; y++) { - float v= color_balance_fl((float)y * (1.0f / 255.0f), lift, gain, gamma, mul); + float v = color_balance_fl((float)y * (1.0f / 255.0f), lift, gain, gamma, mul); CLAMP(v, 0.0f, 1.0f); table[y] = v * 255; } } static void make_cb_table_float(float lift, float gain, float gamma, - float * table, float mul) + float *table, float mul) { int y; for (y = 0; y < 256; y++) { - float v= color_balance_fl((float)y * (1.0f / 255.0f), lift, gain, gamma, mul); + float v = color_balance_fl((float)y * (1.0f / 255.0f), lift, gain, gamma, mul); table[y] = v; } } -static void color_balance_byte_byte(Sequence * seq, ImBuf* ibuf, float mul) +static void color_balance_byte_byte(Sequence *seq, ImBuf *ibuf, float mul) { unsigned char cb_tab[3][256]; int c; - unsigned char * p = (unsigned char*) ibuf->rect; - unsigned char * e = p + ibuf->x * 4 * ibuf->y; + unsigned char *p = (unsigned char *) ibuf->rect; + unsigned char *e = p + ibuf->x * 4 * ibuf->y; StripColorBalance cb = calc_cb(seq->strip->color_balance); @@ -1561,13 +1562,13 @@ static void color_balance_byte_byte(Sequence * seq, ImBuf* ibuf, float mul) } } -static void color_balance_byte_float(Sequence * seq, ImBuf* ibuf, float mul) +static void color_balance_byte_float(Sequence *seq, ImBuf *ibuf, float mul) { float cb_tab[4][256]; - int c,i; - unsigned char * p = (unsigned char*) ibuf->rect; - unsigned char * e = p + ibuf->x * 4 * ibuf->y; - float * o; + int c, i; + unsigned char *p = (unsigned char *) ibuf->rect; + unsigned char *e = p + ibuf->x * 4 * ibuf->y; + float *o; StripColorBalance cb; imb_addrectfloatImBuf(ibuf); @@ -1581,7 +1582,7 @@ static void color_balance_byte_float(Sequence * seq, ImBuf* ibuf, float mul) } for (i = 0; i < 256; i++) { - cb_tab[3][i] = ((float)i)*(1.0f/255.0f); + cb_tab[3][i] = ((float)i) * (1.0f / 255.0f); } while (p < e) { @@ -1594,22 +1595,22 @@ static void color_balance_byte_float(Sequence * seq, ImBuf* ibuf, float mul) } } -static void color_balance_float_float(Sequence * seq, ImBuf* ibuf, float mul) +static void color_balance_float_float(Sequence *seq, ImBuf *ibuf, float mul) { - float * p = ibuf->rect_float; - float * e = ibuf->rect_float + ibuf->x * 4* ibuf->y; + float *p = ibuf->rect_float; + float *e = ibuf->rect_float + ibuf->x * 4 * ibuf->y; StripColorBalance cb = calc_cb(seq->strip->color_balance); while (p < e) { int c; for (c = 0; c < 3; c++) { - p[c]= color_balance_fl(p[c], cb.lift[c], cb.gain[c], cb.gamma[c], mul); + p[c] = color_balance_fl(p[c], cb.lift[c], cb.gain[c], cb.gamma[c], mul); } p += 4; } } -static void color_balance(Sequence * seq, ImBuf* ibuf, float mul) +static void color_balance(Sequence *seq, ImBuf *ibuf, float mul) { if (ibuf->rect_float) { color_balance_float_float(seq, ibuf, mul); @@ -1641,12 +1642,12 @@ static void color_balance(Sequence * seq, ImBuf* ibuf, float mul) */ int input_have_to_preprocess( - SeqRenderData UNUSED(context), Sequence * seq, float UNUSED(cfra)) + SeqRenderData UNUSED(context), Sequence *seq, float UNUSED(cfra)) { float mul; - if (seq->flag & (SEQ_FILTERY|SEQ_USE_CROP|SEQ_USE_TRANSFORM|SEQ_FLIPX| - SEQ_FLIPY|SEQ_USE_COLOR_BALANCE|SEQ_MAKE_PREMUL)) { + if (seq->flag & (SEQ_FILTERY | SEQ_USE_CROP | SEQ_USE_TRANSFORM | SEQ_FLIPX | + SEQ_FLIPY | SEQ_USE_COLOR_BALANCE | SEQ_MAKE_PREMUL)) { return TRUE; } @@ -1667,33 +1668,34 @@ int input_have_to_preprocess( return FALSE; } -static ImBuf * input_preprocess( - SeqRenderData context, Sequence *seq, float UNUSED(cfra), ImBuf * ibuf, - int is_proxy_image, int is_preprocessed) +static ImBuf *input_preprocess( + SeqRenderData context, Sequence *seq, float UNUSED(cfra), ImBuf *ibuf, + int is_proxy_image, int is_preprocessed) { float mul; ibuf = IMB_makeSingleUser(ibuf); - if ((seq->flag & SEQ_FILTERY) - && !ELEM(seq->type, SEQ_MOVIE, SEQ_MOVIECLIP)) { + if ((seq->flag & SEQ_FILTERY) && + !ELEM(seq->type, SEQ_MOVIE, SEQ_MOVIECLIP)) + { IMB_filtery(ibuf); } - if (seq->flag & (SEQ_USE_CROP|SEQ_USE_TRANSFORM)) { - StripCrop c= {0}; - StripTransform t= {0}; - int sx,sy,dx,dy; + if (seq->flag & (SEQ_USE_CROP | SEQ_USE_TRANSFORM)) { + StripCrop c = {0}; + StripTransform t = {0}; + int sx, sy, dx, dy; double xscale = 1.0; double yscale = 1.0; if (is_proxy_image) { double f = seq_rendersize_to_scale_factor( - context.preview_render_size); + context.preview_render_size); if (f != 1.0) { IMB_scalefastImBuf( - ibuf, ibuf->x / f, ibuf->y / f); + ibuf, ibuf->x / f, ibuf->y / f); } } @@ -1705,11 +1707,11 @@ static ImBuf * input_preprocess( } xscale = context.scene->r.xsch ? - ((double) context.rectx / - (double) context.scene->r.xsch) : 1.0; + ((double) context.rectx / + (double) context.scene->r.xsch) : 1.0; yscale = context.scene->r.ysch ? - ((double) context.recty / - (double) context.scene->r.ysch) : 1.0; + ((double) context.recty / + (double) context.scene->r.ysch) : 1.0; c.left *= xscale; c.right *= xscale; c.top *= yscale; c.bottom *= yscale; @@ -1732,17 +1734,17 @@ static ImBuf * input_preprocess( } } - if (c.top+c.bottom >= ibuf->y || c.left+c.right >= ibuf->x || + if (c.top + c.bottom >= ibuf->y || c.left + c.right >= ibuf->x || t.xofs >= dx || t.yofs >= dy) { make_black_ibuf(ibuf); } else { - ImBuf * i = IMB_allocImBuf( - dx, dy, 32, - ibuf->rect_float ? IB_rectfloat : IB_rect); + ImBuf *i = IMB_allocImBuf( + dx, dy, 32, + ibuf->rect_float ? IB_rectfloat : IB_rect); IMB_rectcpy(i, ibuf, - t.xofs, t.yofs, c.left, c.bottom, sx, sy); + t.xofs, t.yofs, c.left, c.bottom, sx, sy); IMB_freeImBuf(ibuf); @@ -1793,7 +1795,7 @@ static ImBuf * input_preprocess( } - if (ibuf->x != context.rectx || ibuf->y != context.recty ) { + if (ibuf->x != context.rectx || ibuf->y != context.recty) { if (context.scene->r.mode & R_OSA) { IMB_scaleImBuf(ibuf, (short)context.rectx, (short)context.recty); } @@ -1804,21 +1806,21 @@ static ImBuf * input_preprocess( return ibuf; } -static ImBuf * copy_from_ibuf_still(SeqRenderData context, Sequence * seq, - float nr) +static ImBuf *copy_from_ibuf_still(SeqRenderData context, Sequence *seq, + float nr) { - ImBuf * rval = NULL; - ImBuf * ibuf = NULL; + ImBuf *rval = NULL; + ImBuf *ibuf = NULL; if (nr == 0) { ibuf = seq_stripelem_cache_get( - context, seq, seq->start, - SEQ_STRIPELEM_IBUF_STARTSTILL); + context, seq, seq->start, + SEQ_STRIPELEM_IBUF_STARTSTILL); } else if (nr == seq->len - 1) { ibuf = seq_stripelem_cache_get( - context, seq, seq->start, - SEQ_STRIPELEM_IBUF_ENDSTILL); + context, seq, seq->start, + SEQ_STRIPELEM_IBUF_ENDSTILL); } if (ibuf) { @@ -1829,8 +1831,8 @@ static ImBuf * copy_from_ibuf_still(SeqRenderData context, Sequence * seq, return rval; } -static void copy_to_ibuf_still(SeqRenderData context, Sequence * seq, float nr, - ImBuf * ibuf) +static void copy_to_ibuf_still(SeqRenderData context, Sequence *seq, float nr, + ImBuf *ibuf) { if (nr == 0 || nr == seq->len - 1) { /* we have to store a copy, since the passed ibuf @@ -1840,14 +1842,14 @@ static void copy_to_ibuf_still(SeqRenderData context, Sequence * seq, float nr, if (nr == 0) { seq_stripelem_cache_put( - context, seq, seq->start, - SEQ_STRIPELEM_IBUF_STARTSTILL, ibuf); + context, seq, seq->start, + SEQ_STRIPELEM_IBUF_STARTSTILL, ibuf); } if (nr == seq->len - 1) { seq_stripelem_cache_put( - context, seq, seq->start, - SEQ_STRIPELEM_IBUF_ENDSTILL, ibuf); + context, seq, seq->start, + SEQ_STRIPELEM_IBUF_ENDSTILL, ibuf); } IMB_freeImBuf(ibuf); @@ -1858,24 +1860,24 @@ static void copy_to_ibuf_still(SeqRenderData context, Sequence * seq, float nr, * strip rendering functions * ********************************************************************** */ -static ImBuf* seq_render_strip_stack( - SeqRenderData context, ListBase *seqbasep, float cfra, int chanshown); +static ImBuf *seq_render_strip_stack( + SeqRenderData context, ListBase *seqbasep, float cfra, int chanshown); -static ImBuf * seq_render_strip( - SeqRenderData context, Sequence * seq, float cfra); +static ImBuf *seq_render_strip( + SeqRenderData context, Sequence *seq, float cfra); -static ImBuf* seq_render_effect_strip_impl( - SeqRenderData context, Sequence *seq, float cfra) +static ImBuf *seq_render_effect_strip_impl( + SeqRenderData context, Sequence *seq, float cfra) { float fac, facf; int early_out; int i; struct SeqEffectHandle sh = get_sequence_effect(seq); - FCurve *fcu= NULL; - ImBuf * ibuf[3]; + FCurve *fcu = NULL; + ImBuf *ibuf[3]; Sequence *input[3]; - ImBuf * out = NULL; + ImBuf *out = NULL; ibuf[0] = ibuf[1] = ibuf[2] = NULL; @@ -1883,21 +1885,21 @@ static ImBuf* seq_render_effect_strip_impl( if (!sh.execute) { /* effect not supported in this version... */ out = IMB_allocImBuf((short)context.rectx, - (short)context.recty, 32, IB_rect); + (short)context.recty, 32, IB_rect); return out; } if (seq->flag & SEQ_USE_EFFECT_DEFAULT_FADE) { sh.get_default_fac(seq, cfra, &fac, &facf); - if ((context.scene->r.mode & R_FIELDS)==0) - facf= fac; + if ((context.scene->r.mode & R_FIELDS) == 0) + facf = fac; } else { fcu = id_data_find_fcurve(&context.scene->id, seq, &RNA_Sequence, "effect_fader", 0, NULL); if (fcu) { fac = facf = evaluate_fcurve(fcu, cfra); - if ( context.scene->r.mode & R_FIELDS ) { + if (context.scene->r.mode & R_FIELDS) { facf = evaluate_fcurve(fcu, cfra + 0.5f); } } @@ -1909,50 +1911,50 @@ static ImBuf* seq_render_effect_strip_impl( early_out = sh.early_out(seq, fac, facf); switch (early_out) { - case EARLY_NO_INPUT: - out = sh.execute(context, seq, cfra, fac, facf, - NULL, NULL, NULL); - break; - case EARLY_DO_EFFECT: - for (i=0; i<3; i++) { - if (input[i]) - ibuf[i] = seq_render_strip( - context, input[i], cfra); - } - - if (ibuf[0] && ibuf[1]) { + case EARLY_NO_INPUT: out = sh.execute(context, seq, cfra, fac, facf, - ibuf[0], ibuf[1], ibuf[2]); - } - break; - case EARLY_USE_INPUT_1: - if (input[0]) { - ibuf[0] = seq_render_strip(context, input[0], cfra); - } - if (ibuf[0]) { - if (input_have_to_preprocess(context, seq, cfra)) { - out = IMB_dupImBuf(ibuf[0]); + NULL, NULL, NULL); + break; + case EARLY_DO_EFFECT: + for (i = 0; i < 3; i++) { + if (input[i]) + ibuf[i] = seq_render_strip( + context, input[i], cfra); } - else { - out = ibuf[0]; - IMB_refImBuf(out); + + if (ibuf[0] && ibuf[1]) { + out = sh.execute(context, seq, cfra, fac, facf, + ibuf[0], ibuf[1], ibuf[2]); } - } - break; - case EARLY_USE_INPUT_2: - if (input[1]) { - ibuf[1] = seq_render_strip(context, input[1], cfra); - } - if (ibuf[1]) { - if (input_have_to_preprocess(context, seq, cfra)) { - out = IMB_dupImBuf(ibuf[1]); + break; + case EARLY_USE_INPUT_1: + if (input[0]) { + ibuf[0] = seq_render_strip(context, input[0], cfra); } - else { - out = ibuf[1]; - IMB_refImBuf(out); + if (ibuf[0]) { + if (input_have_to_preprocess(context, seq, cfra)) { + out = IMB_dupImBuf(ibuf[0]); + } + else { + out = ibuf[0]; + IMB_refImBuf(out); + } } - } - break; + break; + case EARLY_USE_INPUT_2: + if (input[1]) { + ibuf[1] = seq_render_strip(context, input[1], cfra); + } + if (ibuf[1]) { + if (input_have_to_preprocess(context, seq, cfra)) { + out = IMB_dupImBuf(ibuf[1]); + } + else { + out = ibuf[1]; + IMB_refImBuf(out); + } + } + break; } for (i = 0; i < 3; i++) { @@ -1966,10 +1968,10 @@ static ImBuf* seq_render_effect_strip_impl( return out; } -static ImBuf * seq_render_movieclip_strip( - SeqRenderData context, Sequence * seq, float nr) +static ImBuf *seq_render_movieclip_strip( + SeqRenderData context, Sequence *seq, float nr) { - ImBuf * ibuf = NULL; + ImBuf *ibuf = NULL; MovieClipUser user; float tloc[2], tscale, tangle; @@ -1984,21 +1986,21 @@ static ImBuf * seq_render_movieclip_strip( user.render_size = MCLIP_PROXY_RENDER_SIZE_FULL; switch (seq_rendersize_to_proxysize(context.preview_render_size)) { - case IMB_PROXY_NONE: - user.render_size = MCLIP_PROXY_RENDER_SIZE_FULL; - break; - case IMB_PROXY_100: - user.render_size = MCLIP_PROXY_RENDER_SIZE_100; - break; - case IMB_PROXY_75: - user.render_size = MCLIP_PROXY_RENDER_SIZE_75; - break; - case IMB_PROXY_50: - user.render_size = MCLIP_PROXY_RENDER_SIZE_50; - break; - case IMB_PROXY_25: - user.render_size = MCLIP_PROXY_RENDER_SIZE_25; - break; + case IMB_PROXY_NONE: + user.render_size = MCLIP_PROXY_RENDER_SIZE_FULL; + break; + case IMB_PROXY_100: + user.render_size = MCLIP_PROXY_RENDER_SIZE_100; + break; + case IMB_PROXY_75: + user.render_size = MCLIP_PROXY_RENDER_SIZE_75; + break; + case IMB_PROXY_50: + user.render_size = MCLIP_PROXY_RENDER_SIZE_50; + break; + case IMB_PROXY_25: + user.render_size = MCLIP_PROXY_RENDER_SIZE_25; + break; } if (seq->clip_flag & SEQ_MOVIECLIP_RENDER_UNDISTORTED) { @@ -2007,21 +2009,21 @@ static ImBuf * seq_render_movieclip_strip( if (seq->clip_flag & SEQ_MOVIECLIP_RENDER_STABILIZED) { ibuf = BKE_movieclip_get_stable_ibuf( - seq->clip, &user, tloc, &tscale, &tangle, - 0); + seq->clip, &user, tloc, &tscale, &tangle, + 0); } else { ibuf = BKE_movieclip_get_ibuf_flag( - seq->clip, &user, 0, MOVIECLIP_CACHE_SKIP); + seq->clip, &user, 0, MOVIECLIP_CACHE_SKIP); } return ibuf; } -static ImBuf * seq_render_scene_strip( - SeqRenderData context, Sequence * seq, float nr) +static ImBuf *seq_render_scene_strip( + SeqRenderData context, Sequence *seq, float nr) { - ImBuf * ibuf = NULL; + ImBuf *ibuf = NULL; float frame; float oldcfra; Object *camera; @@ -2060,8 +2062,8 @@ static ImBuf * seq_render_scene_strip( int rendering = G.rendering; int doseq; - int doseq_gl= G.rendering ? /*(scene->r.seq_flag & R_SEQ_GL_REND)*/ 0 : /*(scene->r.seq_flag & R_SEQ_GL_PREV)*/ 1; - int have_seq= FALSE; + int doseq_gl = G.rendering ? /*(scene->r.seq_flag & R_SEQ_GL_REND)*/ 0 : /*(scene->r.seq_flag & R_SEQ_GL_PREV)*/ 1; + int have_seq = FALSE; Scene *scene; /* don't refer to seq->scene above this point!, it can be NULL */ @@ -2069,42 +2071,42 @@ static ImBuf * seq_render_scene_strip( return NULL; } - scene= seq->scene; - frame= scene->r.sfra + nr + seq->anim_startofs; + scene = seq->scene; + frame = scene->r.sfra + nr + seq->anim_startofs; - have_seq= (scene->r.scemode & R_DOSEQ) && scene->ed && scene->ed->seqbase.first; + have_seq = (scene->r.scemode & R_DOSEQ) && scene->ed && scene->ed->seqbase.first; - oldcfra= scene->r.cfra; - scene->r.cfra= frame; + oldcfra = scene->r.cfra; + scene->r.cfra = frame; if (seq->scene_camera) - camera= seq->scene_camera; + camera = seq->scene_camera; else { scene_camera_switch_update(scene); - camera= scene->camera; + camera = scene->camera; } - if (have_seq==FALSE && camera==NULL) { - scene->r.cfra= oldcfra; + if (have_seq == FALSE && camera == NULL) { + scene->r.cfra = oldcfra; return NULL; } /* prevent eternal loop */ - doseq= context.scene->r.scemode & R_DOSEQ; + doseq = context.scene->r.scemode & R_DOSEQ; context.scene->r.scemode &= ~R_DOSEQ; #ifdef DURIAN_CAMERA_SWITCH /* stooping to new low's in hackyness :( */ - oldmarkers= scene->markers; - scene->markers.first= scene->markers.last= NULL; + oldmarkers = scene->markers; + scene->markers.first = scene->markers.last = NULL; #else (void)oldmarkers; #endif - if (sequencer_view3d_cb && BLI_thread_is_main() && doseq_gl && (scene == context.scene || have_seq==0) && camera) { - char err_out[256]= "unknown"; + if (sequencer_view3d_cb && BLI_thread_is_main() && doseq_gl && (scene == context.scene || have_seq == 0) && camera) { + char err_out[256] = "unknown"; /* for old scened this can be uninitialized, should probably be added to do_versions at some point if the functionality stays */ - if (context.scene->r.seq_prev_type==0) + if (context.scene->r.seq_prev_type == 0) context.scene->r.seq_prev_type = 3 /* ==OB_SOLID */; /* opengl offscreen render */ @@ -2121,8 +2123,8 @@ static ImBuf * seq_render_scene_strip( /* XXX: this if can be removed when sequence preview rendering uses the job system */ if (rendering || context.scene != scene) { - if (re==NULL) - re= RE_NewRender(scene->id.name); + if (re == NULL) + re = RE_NewRender(scene->id.name); RE_BlenderFrame(re, context.bmain, scene, NULL, camera, scene->lay, frame, FALSE); @@ -2133,23 +2135,23 @@ static ImBuf * seq_render_scene_strip( RE_AcquireResultImage(re, &rres); if (rres.rectf) { - ibuf= IMB_allocImBuf(rres.rectx, rres.recty, 32, IB_rectfloat); - memcpy(ibuf->rect_float, rres.rectf, 4*sizeof(float)*rres.rectx*rres.recty); + ibuf = IMB_allocImBuf(rres.rectx, rres.recty, 32, IB_rectfloat); + memcpy(ibuf->rect_float, rres.rectf, 4 * sizeof(float) * rres.rectx * rres.recty); if (rres.rectz) { addzbuffloatImBuf(ibuf); - memcpy(ibuf->zbuf_float, rres.rectz, sizeof(float)*rres.rectx*rres.recty); + memcpy(ibuf->zbuf_float, rres.rectz, sizeof(float) * rres.rectx * rres.recty); } /* float buffers in the sequencer are not linear */ if (scene->r.color_mgt_flag & R_COLOR_MANAGEMENT) - ibuf->profile= IB_PROFILE_LINEAR_RGB; + ibuf->profile = IB_PROFILE_LINEAR_RGB; else - ibuf->profile= IB_PROFILE_NONE; + ibuf->profile = IB_PROFILE_NONE; IMB_convert_profile(ibuf, IB_PROFILE_SRGB); } else if (rres.rect32) { - ibuf= IMB_allocImBuf(rres.rectx, rres.recty, 32, IB_rect); - memcpy(ibuf->rect, rres.rect32, 4*rres.rectx*rres.recty); + ibuf = IMB_allocImBuf(rres.rectx, rres.recty, 32, IB_rect); + memcpy(ibuf->rect, rres.rect32, 4 * rres.rectx * rres.recty); } RE_ReleaseResultImage(re); @@ -2167,15 +2169,15 @@ static ImBuf * seq_render_scene_strip( #ifdef DURIAN_CAMERA_SWITCH /* stooping to new low's in hackyness :( */ - scene->markers= oldmarkers; + scene->markers = oldmarkers; #endif return ibuf; } -static ImBuf * seq_render_strip(SeqRenderData context, Sequence * seq, float cfra) +static ImBuf *seq_render_strip(SeqRenderData context, Sequence *seq, float cfra) { - ImBuf * ibuf = NULL; + ImBuf *ibuf = NULL; char name[FILE_MAX]; int use_preprocess = input_have_to_preprocess(context, seq, cfra); int is_proxy_image = FALSE; @@ -2187,7 +2189,7 @@ static ImBuf * seq_render_strip(SeqRenderData context, Sequence * seq, float cfr ibuf = seq_stripelem_cache_get(context, seq, cfra, SEQ_STRIPELEM_IBUF); /* currently, we cache preprocessed images in SEQ_STRIPELEM_IBUF, - * but not(!) on SEQ_STRIPELEM_IBUF_ENDSTILL and ..._STARTSTILL */ + * but not(!) on SEQ_STRIPELEM_IBUF_ENDSTILL and ..._STARTSTILL */ if (ibuf) use_preprocess = FALSE; @@ -2200,139 +2202,139 @@ static ImBuf * seq_render_strip(SeqRenderData context, Sequence * seq, float cfr is_proxy_image = (ibuf != NULL); } - if (ibuf == NULL) switch(type) { - case SEQ_META: - { - ImBuf * meta_ibuf = NULL; + if (ibuf == NULL) switch (type) { + case SEQ_META: + { + ImBuf *meta_ibuf = NULL; - if (seq->seqbase.first) - meta_ibuf = seq_render_strip_stack( - context, &seq->seqbase, - seq->start + nr, 0); + if (seq->seqbase.first) + meta_ibuf = seq_render_strip_stack( + context, &seq->seqbase, + seq->start + nr, 0); - if (meta_ibuf) { - ibuf = meta_ibuf; - if (ibuf && use_preprocess) { - struct ImBuf * i = IMB_dupImBuf(ibuf); + if (meta_ibuf) { + ibuf = meta_ibuf; + if (ibuf && use_preprocess) { + ImBuf *i = IMB_dupImBuf(ibuf); - IMB_freeImBuf(ibuf); + IMB_freeImBuf(ibuf); - ibuf = i; + ibuf = i; + } } - } - break; - } - case SEQ_SPEED: - { - ImBuf * child_ibuf = NULL; + break; + } + case SEQ_SPEED: + { + ImBuf *child_ibuf = NULL; - float f_cfra; - SpeedControlVars * s = (SpeedControlVars *)seq->effectdata; + float f_cfra; + SpeedControlVars *s = (SpeedControlVars *)seq->effectdata; - sequence_effect_speed_rebuild_map(context.scene,seq, 0); + sequence_effect_speed_rebuild_map(context.scene, seq, 0); - /* weeek! */ - f_cfra = seq->start + s->frameMap[(int) nr]; + /* weeek! */ + f_cfra = seq->start + s->frameMap[(int) nr]; - child_ibuf = seq_render_strip(context,seq->seq1,f_cfra); + child_ibuf = seq_render_strip(context, seq->seq1, f_cfra); - if (child_ibuf) { - ibuf = child_ibuf; - if (ibuf && use_preprocess) { - struct ImBuf * i = IMB_dupImBuf(ibuf); + if (child_ibuf) { + ibuf = child_ibuf; + if (ibuf && use_preprocess) { + ImBuf *i = IMB_dupImBuf(ibuf); - IMB_freeImBuf(ibuf); + IMB_freeImBuf(ibuf); - ibuf = i; + ibuf = i; + } } + break; } - break; - } - case SEQ_EFFECT: - { - ibuf = seq_render_effect_strip_impl( - context, seq, seq->start + nr); - break; - } - case SEQ_IMAGE: - { - StripElem * s_elem = give_stripelem(seq, cfra); - - if (s_elem) { - BLI_join_dirfile(name, sizeof(name), seq->strip->dir, s_elem->name); - BLI_path_abs(name, G.main->name); + case SEQ_EFFECT: + { + ibuf = seq_render_effect_strip_impl( + context, seq, seq->start + nr); + break; } + case SEQ_IMAGE: + { + StripElem *s_elem = give_stripelem(seq, cfra); + + if (s_elem) { + BLI_join_dirfile(name, sizeof(name), seq->strip->dir, s_elem->name); + BLI_path_abs(name, G.main->name); + } - if (s_elem && (ibuf = IMB_loadiffname(name, IB_rect))) { - /* we don't need both (speed reasons)! */ - if (ibuf->rect_float && ibuf->rect) - imb_freerectImBuf(ibuf); + if (s_elem && (ibuf = IMB_loadiffname(name, IB_rect))) { + /* we don't need both (speed reasons)! */ + if (ibuf->rect_float && ibuf->rect) + imb_freerectImBuf(ibuf); - /* all sequencer color is done in SRGB space, linear gives odd crossfades */ - if (ibuf->profile == IB_PROFILE_LINEAR_RGB) - IMB_convert_profile(ibuf, IB_PROFILE_NONE); + /* all sequencer color is done in SRGB space, linear gives odd crossfades */ + if (ibuf->profile == IB_PROFILE_LINEAR_RGB) + IMB_convert_profile(ibuf, IB_PROFILE_NONE); - copy_to_ibuf_still(context, seq, nr, ibuf); + copy_to_ibuf_still(context, seq, nr, ibuf); - s_elem->orig_width = ibuf->x; - s_elem->orig_height = ibuf->y; + s_elem->orig_width = ibuf->x; + s_elem->orig_height = ibuf->y; + } + break; } - break; - } - case SEQ_MOVIE: - { - seq_open_anim_file(seq); - - if (seq->anim) { - IMB_anim_set_preseek(seq->anim, - seq->anim_preseek); - - ibuf = IMB_anim_absolute( - seq->anim, nr + seq->anim_startofs, - seq->strip->proxy ? - seq->strip->proxy->tc - : IMB_TC_RECORD_RUN, - seq_rendersize_to_proxysize( - context.preview_render_size)); - - /* we don't need both (speed reasons)! */ - if (ibuf && ibuf->rect_float && ibuf->rect) - imb_freerectImBuf(ibuf); - if (ibuf) { - seq->strip->stripdata->orig_width = ibuf->x; - seq->strip->stripdata->orig_height = ibuf->y; + case SEQ_MOVIE: + { + seq_open_anim_file(seq); + + if (seq->anim) { + IMB_anim_set_preseek(seq->anim, + seq->anim_preseek); + + ibuf = IMB_anim_absolute( + seq->anim, nr + seq->anim_startofs, + seq->strip->proxy ? + seq->strip->proxy->tc : + IMB_TC_RECORD_RUN, + seq_rendersize_to_proxysize( + context.preview_render_size)); + + /* we don't need both (speed reasons)! */ + if (ibuf && ibuf->rect_float && ibuf->rect) + imb_freerectImBuf(ibuf); + if (ibuf) { + seq->strip->stripdata->orig_width = ibuf->x; + seq->strip->stripdata->orig_height = ibuf->y; + } } + copy_to_ibuf_still(context, seq, nr, ibuf); + break; } - copy_to_ibuf_still(context, seq, nr, ibuf); - break; - } - case SEQ_SCENE: - { // scene can be NULL after deletions - ibuf = seq_render_scene_strip(context, seq, nr); + case SEQ_SCENE: + { // scene can be NULL after deletions + ibuf = seq_render_scene_strip(context, seq, nr); - /* Scene strips update all animation, so we need to restore original state.*/ - BKE_animsys_evaluate_all_animation(context.bmain, context.scene, cfra); + /* Scene strips update all animation, so we need to restore original state.*/ + BKE_animsys_evaluate_all_animation(context.bmain, context.scene, cfra); - copy_to_ibuf_still(context, seq, nr, ibuf); - break; - } - case SEQ_MOVIECLIP: - { - ibuf = seq_render_movieclip_strip(context, seq, nr); + copy_to_ibuf_still(context, seq, nr, ibuf); + break; + } + case SEQ_MOVIECLIP: + { + ibuf = seq_render_movieclip_strip(context, seq, nr); - if (ibuf && use_preprocess) { - struct ImBuf * i = IMB_dupImBuf(ibuf); + if (ibuf && use_preprocess) { + ImBuf *i = IMB_dupImBuf(ibuf); - IMB_freeImBuf(ibuf); + IMB_freeImBuf(ibuf); - ibuf = i; - } + ibuf = i; + } - copy_to_ibuf_still(context, seq, nr, ibuf); - break; + copy_to_ibuf_still(context, seq, nr, ibuf); + break; + } } - } if (ibuf == NULL) ibuf = IMB_allocImBuf((short)context.rectx, (short)context.recty, 32, IB_rect); @@ -2342,7 +2344,7 @@ static ImBuf * seq_render_strip(SeqRenderData context, Sequence * seq, float cfr if (use_preprocess) ibuf = input_preprocess(context, seq, cfra, ibuf, - is_proxy_image, is_preprocessed); + is_proxy_image, is_preprocessed); seq_stripelem_cache_put(context, seq, cfra, SEQ_STRIPELEM_IBUF, ibuf); @@ -2353,7 +2355,7 @@ static ImBuf * seq_render_strip(SeqRenderData context, Sequence * seq, float cfr * strip stack rendering functions * ********************************************************************** */ -static int seq_must_swap_input_in_blend_mode(Sequence * seq) +static int seq_must_swap_input_in_blend_mode(Sequence *seq) { int swap_input = FALSE; @@ -2367,7 +2369,7 @@ static int seq_must_swap_input_in_blend_mode(Sequence * seq) return swap_input; } -static int seq_get_early_out_for_blend_mode(Sequence * seq) +static int seq_get_early_out_for_blend_mode(Sequence *seq) { struct SeqEffectHandle sh = get_sequence_blend(seq); float facf = seq->blend_opacity / 100.0f; @@ -2388,13 +2390,13 @@ static int seq_get_early_out_for_blend_mode(Sequence * seq) return early_out; } -static ImBuf* seq_render_strip_stack( - SeqRenderData context, ListBase *seqbasep, float cfra, int chanshown) +static ImBuf *seq_render_strip_stack( + SeqRenderData context, ListBase *seqbasep, float cfra, int chanshown) { - Sequence* seq_arr[MAXSEQ+1]; + Sequence *seq_arr[MAXSEQ + 1]; int count; int i; - ImBuf* out = NULL; + ImBuf *out = NULL; count = get_shown_sequences(seqbasep, cfra, chanshown, (Sequence **)&seq_arr); @@ -2405,13 +2407,13 @@ static ImBuf* seq_render_strip_stack( #if 0 /* commentind since this breaks keyframing, since it resets the value on draw */ if (scene->r.cfra != cfra) { // XXX for prefetch and overlay offset!..., very bad!!! - AnimData *adt= BKE_animdata_from_id(&scene->id); + AnimData *adt = BKE_animdata_from_id(&scene->id); BKE_animsys_evaluate_animdata(scene, &scene->id, adt, cfra, ADT_RECALC_ANIM); } #endif out = seq_stripelem_cache_get(context, seq_arr[count - 1], - cfra, SEQ_STRIPELEM_IBUF_COMP); + cfra, SEQ_STRIPELEM_IBUF_COMP); if (out) { return out; @@ -2420,7 +2422,7 @@ static ImBuf* seq_render_strip_stack( if (count == 1) { out = seq_render_strip(context, seq_arr[0], cfra); seq_stripelem_cache_put(context, seq_arr[0], cfra, - SEQ_STRIPELEM_IBUF_COMP, out); + SEQ_STRIPELEM_IBUF_COMP, out); return out; } @@ -2431,7 +2433,7 @@ static ImBuf* seq_render_strip_stack( Sequence *seq = seq_arr[i]; out = seq_stripelem_cache_get( - context, seq, cfra, SEQ_STRIPELEM_IBUF_COMP); + context, seq, cfra, SEQ_STRIPELEM_IBUF_COMP); if (out) { break; @@ -2444,21 +2446,21 @@ static ImBuf* seq_render_strip_stack( early_out = seq_get_early_out_for_blend_mode(seq); switch (early_out) { - case EARLY_NO_INPUT: - case EARLY_USE_INPUT_2: - out = seq_render_strip(context, seq, cfra); - break; - case EARLY_USE_INPUT_1: - if (i == 0) { - out = IMB_allocImBuf((short)context.rectx, (short)context.recty, 32, IB_rect); - } - break; - case EARLY_DO_EFFECT: - if (i == 0) { + case EARLY_NO_INPUT: + case EARLY_USE_INPUT_2: out = seq_render_strip(context, seq, cfra); - } + break; + case EARLY_USE_INPUT_1: + if (i == 0) { + out = IMB_allocImBuf((short)context.rectx, (short)context.recty, 32, IB_rect); + } + break; + case EARLY_DO_EFFECT: + if (i == 0) { + out = seq_render_strip(context, seq, cfra); + } - break; + break; } if (out) { break; @@ -2466,31 +2468,31 @@ static ImBuf* seq_render_strip_stack( } seq_stripelem_cache_put(context, seq_arr[i], cfra, - SEQ_STRIPELEM_IBUF_COMP, out); + SEQ_STRIPELEM_IBUF_COMP, out); i++; for (; i < count; i++) { - Sequence * seq = seq_arr[i]; + Sequence *seq = seq_arr[i]; if (seq_get_early_out_for_blend_mode(seq) == EARLY_DO_EFFECT) { struct SeqEffectHandle sh = get_sequence_blend(seq); - ImBuf * ibuf1 = out; - ImBuf * ibuf2 = seq_render_strip(context, seq, cfra); + ImBuf *ibuf1 = out; + ImBuf *ibuf2 = seq_render_strip(context, seq, cfra); float facf = seq->blend_opacity / 100.0f; int swap_input = seq_must_swap_input_in_blend_mode(seq); if (swap_input) { out = sh.execute(context, seq, cfra, - facf, facf, - ibuf2, ibuf1, NULL); + facf, facf, + ibuf2, ibuf1, NULL); } else { out = sh.execute(context, seq, cfra, - facf, facf, - ibuf1, ibuf2, NULL); + facf, facf, + ibuf1, ibuf2, NULL); } IMB_freeImBuf(ibuf1); @@ -2498,7 +2500,7 @@ static ImBuf* seq_render_strip_stack( } seq_stripelem_cache_put(context, seq_arr[i], cfra, - SEQ_STRIPELEM_IBUF_COMP, out); + SEQ_STRIPELEM_IBUF_COMP, out); } return out; @@ -2511,19 +2513,19 @@ static ImBuf* seq_render_strip_stack( ImBuf *give_ibuf_seq(SeqRenderData context, float cfra, int chanshown) { - Editing *ed= seq_give_editing(context.scene, FALSE); + Editing *ed = seq_give_editing(context.scene, FALSE); int count; ListBase *seqbasep; - if (ed==NULL) return NULL; + if (ed == NULL) return NULL; count = BLI_countlist(&ed->metastack); if ((chanshown < 0) && (count > 0)) { count = MAX2(count + chanshown, 0); - seqbasep= ((MetaStack*)BLI_findlink(&ed->metastack, count))->oldbasep; + seqbasep = ((MetaStack *)BLI_findlink(&ed->metastack, count))->oldbasep; } else { - seqbasep= ed->seqbasep; + seqbasep = ed->seqbasep; } return seq_render_strip_stack(context, seqbasep, cfra, chanshown); @@ -2561,13 +2563,13 @@ static ListBase prefetch_done; static pthread_mutex_t queue_lock = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t wakeup_lock = PTHREAD_MUTEX_INITIALIZER; -static pthread_cond_t wakeup_cond = PTHREAD_COND_INITIALIZER; +static pthread_cond_t wakeup_cond = PTHREAD_COND_INITIALIZER; //static pthread_mutex_t prefetch_ready_lock = PTHREAD_MUTEX_INITIALIZER; //static pthread_cond_t prefetch_ready_cond = PTHREAD_COND_INITIALIZER; static pthread_mutex_t frame_done_lock = PTHREAD_MUTEX_INITIALIZER; -static pthread_cond_t frame_done_cond = PTHREAD_COND_INITIALIZER; +static pthread_cond_t frame_done_cond = PTHREAD_COND_INITIALIZER; static volatile int seq_thread_shutdown = TRUE; static volatile int seq_last_given_monoton_cfra = 0; @@ -2594,13 +2596,13 @@ typedef struct PrefetchQueueElem { int monoton_cfra; - struct ImBuf * ibuf; + ImBuf *ibuf; } PrefetchQueueElem; #if 0 -static void *seq_prefetch_thread(void * This_) +static void *seq_prefetch_thread(void *This_) { - PrefetchThread * This = This_; + PrefetchThread *This = This_; while (!seq_thread_shutdown) { PrefetchQueueElem *e; @@ -2637,8 +2639,8 @@ static void *seq_prefetch_thread(void * This_) if (e->cfra >= s_last) { e->ibuf = give_ibuf_seq_impl(This->scene, - e->rectx, e->recty, e->cfra, e->chanshown, - e->preview_render_size); + e->rectx, e->recty, e->cfra, e->chanshown, + e->preview_render_size); } pthread_mutex_lock(&queue_lock); @@ -2684,13 +2686,13 @@ static void seq_start_threads(Scene *scene) (but we code, in the hope, that we can remove this restriction soon...) - */ + */ fprintf(stderr, "SEQ-THREAD: seq_start_threads\n"); for (i = 0; i < 1; i++) { PrefetchThread *t = MEM_callocN(sizeof(PrefetchThread), "prefetch_thread"); - t->scene= scene; + t->scene = scene; t->running = TRUE; BLI_addtail(&running_threads, t); @@ -2720,7 +2722,7 @@ static void seq_stop_threads() pthread_cond_broadcast(&wakeup_cond); pthread_mutex_unlock(&wakeup_lock); - for (tslot = running_threads.first; tslot; tslot= tslot->next) { + for (tslot = running_threads.first; tslot; tslot = tslot->next) { pthread_join(tslot->pthread, NULL); } @@ -2779,8 +2781,8 @@ static void seq_wait_for_prefetch_ready() pthread_mutex_lock(&prefetch_ready_lock); - for (;;) { - for (tslot = running_threads.first; tslot; tslot= tslot->next) { + for (;; ) { + for (tslot = running_threads.first; tslot; tslot = tslot->next) { if (tslot->running) { break; } @@ -2812,10 +2814,11 @@ ImBuf *give_ibuf_seq_threaded(SeqRenderData context, float cfra, int chanshown) for (e = prefetch_done.first; e; e = e->next) { if (cfra == e->cfra && - chanshown == e->chanshown && - context.rectx == e->rectx && - context.recty == e->recty && - context.preview_render_size == e->preview_render_size) { + chanshown == e->chanshown && + context.rectx == e->rectx && + context.recty == e->recty && + context.preview_render_size == e->preview_render_size) + { success = TRUE; found_something = TRUE; break; @@ -2825,10 +2828,11 @@ ImBuf *give_ibuf_seq_threaded(SeqRenderData context, float cfra, int chanshown) if (!e) { for (e = prefetch_wait.first; e; e = e->next) { if (cfra == e->cfra && - chanshown == e->chanshown && - context.rectx == e->rectx && - context.recty == e->recty && - context.preview_render_size == e->preview_render_size) { + chanshown == e->chanshown && + context.rectx == e->rectx && + context.recty == e->recty && + context.preview_render_size == e->preview_render_size) + { found_something = TRUE; break; } @@ -2840,14 +2844,14 @@ ImBuf *give_ibuf_seq_threaded(SeqRenderData context, float cfra, int chanshown) for (tslot = running_threads.first; tslot; - tslot= tslot->next) + tslot = tslot->next) { if (tslot->current && cfra == tslot->current->cfra && chanshown == tslot->current->chanshown && context.rectx == tslot->current->rectx && context.recty == tslot->current->recty && - context.preview_render_size== tslot->current->preview_render_size) + context.preview_render_size == tslot->current->preview_render_size) { found_something = TRUE; break; @@ -2868,8 +2872,8 @@ ImBuf *give_ibuf_seq_threaded(SeqRenderData context, float cfra, int chanshown) if (!found_something) { fprintf(stderr, - "SEQ-THREAD: Requested frame " - "not in queue ???\n"); + "SEQ-THREAD: Requested frame " + "not in queue ???\n"); break; } pthread_mutex_lock(&frame_done_lock); @@ -2891,8 +2895,8 @@ static void free_anim_seq(Sequence *seq) } } -void free_imbuf_seq(Scene *scene, ListBase * seqbase, int check_mem_usage, - int keep_file_handles) +void free_imbuf_seq(Scene *scene, ListBase *seqbase, int check_mem_usage, + int keep_file_handles) { Sequence *seq; @@ -2911,8 +2915,8 @@ void free_imbuf_seq(Scene *scene, ListBase * seqbase, int check_mem_usage, uintptr_t mmap_in_use; uintptr_t max; - mem_in_use= MEM_get_memory_in_use(); - mmap_in_use= MEM_get_mapped_memory_in_use(); + mem_in_use = MEM_get_memory_in_use(); + mmap_in_use = MEM_get_mapped_memory_in_use(); max = MEM_CacheLimiter_get_maximum(); if (max == 0 || mem_in_use + mmap_in_use <= max) { @@ -2922,18 +2926,18 @@ void free_imbuf_seq(Scene *scene, ListBase * seqbase, int check_mem_usage, seq_stripelem_cache_cleanup(); - for (seq= seqbase->first; seq; seq= seq->next) { + for (seq = seqbase->first; seq; seq = seq->next) { if (seq->strip) { - if (seq->type==SEQ_MOVIE && !keep_file_handles) + if (seq->type == SEQ_MOVIE && !keep_file_handles) free_anim_seq(seq); - if (seq->type==SEQ_SPEED) { + if (seq->type == SEQ_SPEED) { sequence_effect_speed_rebuild_map(scene, seq, 1); } } - if (seq->type==SEQ_META) { + if (seq->type == SEQ_META) { free_imbuf_seq(scene, &seq->seqbase, FALSE, keep_file_handles); } - if (seq->type==SEQ_SCENE) { + if (seq->type == SEQ_SCENE) { /* FIXME: recurs downwards, but do recurs protection somehow! */ } @@ -2954,7 +2958,7 @@ static int update_changed_seq_recurs(Scene *scene, Sequence *seq, Sequence *chan if (seq == changed_seq) free_imbuf = 1; - for (subseq=seq->seqbase.first; subseq; subseq=subseq->next) + for (subseq = seq->seqbase.first; subseq; subseq = subseq->next) if (update_changed_seq_recurs(scene, subseq, changed_seq, len_change, ibuf_change)) free_imbuf = TRUE; @@ -2986,12 +2990,12 @@ static int update_changed_seq_recurs(Scene *scene, Sequence *seq, Sequence *chan void update_changed_seq_and_deps(Scene *scene, Sequence *changed_seq, int len_change, int ibuf_change) { - Editing *ed= seq_give_editing(scene, FALSE); + Editing *ed = seq_give_editing(scene, FALSE); Sequence *seq; - if (ed==NULL) return; + if (ed == NULL) return; - for (seq=ed->seqbase.first; seq; seq=seq->next) + for (seq = ed->seqbase.first; seq; seq = seq->next) update_changed_seq_recurs(scene, seq, changed_seq, len_change, ibuf_change); } @@ -3007,14 +3011,14 @@ int seq_tx_get_start(Sequence *seq) } int seq_tx_get_end(Sequence *seq) { - return seq->start+seq->len; + return seq->start + seq->len; } int seq_tx_get_final_left(Sequence *seq, int metaclip) { if (metaclip && seq->tmp) { /* return the range clipped by the parents range */ - return MAX2( seq_tx_get_final_left(seq, 0), seq_tx_get_final_left((Sequence *)seq->tmp, 1) ); + return MAX2(seq_tx_get_final_left(seq, 0), seq_tx_get_final_left((Sequence *)seq->tmp, 1) ); } else { return (seq->start - seq->startstill) + seq->startofs; @@ -3025,10 +3029,10 @@ int seq_tx_get_final_right(Sequence *seq, int metaclip) { if (metaclip && seq->tmp) { /* return the range clipped by the parents range */ - return MIN2( seq_tx_get_final_right(seq, 0), seq_tx_get_final_right((Sequence *)seq->tmp, 1) ); + return MIN2(seq_tx_get_final_right(seq, 0), seq_tx_get_final_right((Sequence *)seq->tmp, 1) ); } else { - return ((seq->start+seq->len) + seq->endstill) - seq->endofs; + return ((seq->start + seq->len) + seq->endstill) - seq->endofs; } } @@ -3060,10 +3064,10 @@ void seq_tx_set_final_right(Sequence *seq, int val) * since they work a bit differently to normal image seq's (during transform) */ int seq_single_check(Sequence *seq) { - return (seq->len==1 && ( - seq->type == SEQ_IMAGE - || ((seq->type & SEQ_EFFECT) && - get_sequence_effect_num_inputs(seq->type) == 0))); + return (seq->len == 1 && ( + seq->type == SEQ_IMAGE + || ((seq->type & SEQ_EFFECT) && + get_sequence_effect_num_inputs(seq->type) == 0))); } /* check if the selected seq's reference unselected seq's */ @@ -3071,11 +3075,11 @@ int seqbase_isolated_sel_check(ListBase *seqbase) { Sequence *seq; /* is there more than 1 select */ - int ok= FALSE; + int ok = FALSE; - for (seq= seqbase->first; seq; seq= seq->next) { + for (seq = seqbase->first; seq; seq = seq->next) { if (seq->flag & SELECT) { - ok= TRUE; + ok = TRUE; break; } } @@ -3084,20 +3088,20 @@ int seqbase_isolated_sel_check(ListBase *seqbase) return FALSE; /* test relationships */ - for (seq= seqbase->first; seq; seq= seq->next) { - if ((seq->type & SEQ_EFFECT)==0) + for (seq = seqbase->first; seq; seq = seq->next) { + if ((seq->type & SEQ_EFFECT) == 0) continue; if (seq->flag & SELECT) { - if ( (seq->seq1 && (seq->seq1->flag & SELECT)==0) || - (seq->seq2 && (seq->seq2->flag & SELECT)==0) || - (seq->seq3 && (seq->seq3->flag & SELECT)==0) ) + if ( (seq->seq1 && (seq->seq1->flag & SELECT) == 0) || + (seq->seq2 && (seq->seq2->flag & SELECT) == 0) || + (seq->seq3 && (seq->seq3->flag & SELECT) == 0) ) return FALSE; } else { if ( (seq->seq1 && (seq->seq1->flag & SELECT)) || - (seq->seq2 && (seq->seq2->flag & SELECT)) || - (seq->seq3 && (seq->seq3->flag & SELECT)) ) + (seq->seq2 && (seq->seq2->flag & SELECT)) || + (seq->seq3 && (seq->seq3->flag & SELECT)) ) return FALSE; } } @@ -3111,12 +3115,12 @@ void seq_tx_handle_xlimits(Sequence *seq, int leftflag, int rightflag) { if (leftflag) { if (seq_tx_get_final_left(seq, 0) >= seq_tx_get_final_right(seq, 0)) { - seq_tx_set_final_left(seq, seq_tx_get_final_right(seq, 0)-1); + seq_tx_set_final_left(seq, seq_tx_get_final_right(seq, 0) - 1); } - if (seq_single_check(seq)==0) { + if (seq_single_check(seq) == 0) { if (seq_tx_get_final_left(seq, 0) >= seq_tx_get_end(seq)) { - seq_tx_set_final_left(seq, seq_tx_get_end(seq)-1); + seq_tx_set_final_left(seq, seq_tx_get_end(seq) - 1); } /* dosnt work now - TODO */ @@ -3125,7 +3129,7 @@ void seq_tx_handle_xlimits(Sequence *seq, int leftflag, int rightflag) int ofs; ofs = seq_tx_get_start(seq) - seq_tx_get_final_right(seq, 0); seq->start -= ofs; - seq_tx_set_final_left(seq, seq_tx_get_final_left(seq, 0) + ofs ); + seq_tx_set_final_left(seq, seq_tx_get_final_left(seq, 0) + ofs); } #endif } @@ -3133,20 +3137,20 @@ void seq_tx_handle_xlimits(Sequence *seq, int leftflag, int rightflag) if (rightflag) { if (seq_tx_get_final_right(seq, 0) <= seq_tx_get_final_left(seq, 0)) { - seq_tx_set_final_right(seq, seq_tx_get_final_left(seq, 0)+1); + seq_tx_set_final_right(seq, seq_tx_get_final_left(seq, 0) + 1); } - if (seq_single_check(seq)==0) { + if (seq_single_check(seq) == 0) { if (seq_tx_get_final_right(seq, 0) <= seq_tx_get_start(seq)) { - seq_tx_set_final_right(seq, seq_tx_get_start(seq)+1); + seq_tx_set_final_right(seq, seq_tx_get_start(seq) + 1); } } } /* sounds cannot be extended past their endpoints */ if (seq->type == SEQ_SOUND) { - seq->startstill= 0; - seq->endstill= 0; + seq->startstill = 0; + seq->endstill = 0; } } @@ -3162,13 +3166,13 @@ void seq_single_fix(Sequence *seq) start = seq->start; if (start != left) { offset = left - start; - seq_tx_set_final_left( seq, seq_tx_get_final_left(seq, 0) - offset ); - seq_tx_set_final_right( seq, seq_tx_get_final_right(seq, 0) - offset ); + seq_tx_set_final_left(seq, seq_tx_get_final_left(seq, 0) - offset); + seq_tx_set_final_right(seq, seq_tx_get_final_right(seq, 0) - offset); seq->start += offset; } } -int seq_tx_test(Sequence * seq) +int seq_tx_test(Sequence *seq) { return (seq->type < SEQ_EFFECT) || (get_sequence_effect_num_inputs(seq->type) == 0); } @@ -3176,19 +3180,19 @@ int seq_tx_test(Sequence * seq) static int seq_overlap(Sequence *seq1, Sequence *seq2) { return (seq1 != seq2 && seq1->machine == seq2->machine && - ((seq1->enddisp <= seq2->startdisp) || (seq1->startdisp >= seq2->enddisp))==0); + ((seq1->enddisp <= seq2->startdisp) || (seq1->startdisp >= seq2->enddisp)) == 0); } -int seq_test_overlap(ListBase * seqbasep, Sequence *test) +int seq_test_overlap(ListBase *seqbasep, Sequence *test) { Sequence *seq; - seq= seqbasep->first; + seq = seqbasep->first; while (seq) { if (seq_overlap(test, seq)) return 1; - seq= seq->next; + seq = seq->next; } return 0; } @@ -3199,9 +3203,9 @@ void seq_translate(Scene *evil_scene, Sequence *seq, int delta) seq_offset_animdata(evil_scene, seq, delta); seq->start += delta; - if (seq->type==SEQ_META) { + if (seq->type == SEQ_META) { Sequence *seq_child; - for (seq_child= seq->seqbase.first; seq_child; seq_child= seq_child->next) { + for (seq_child = seq->seqbase.first; seq_child; seq_child = seq_child->next) { seq_translate(evil_scene, seq_child, delta); } } @@ -3211,9 +3215,9 @@ void seq_translate(Scene *evil_scene, Sequence *seq, int delta) void seq_sound_init(Scene *scene, Sequence *seq) { - if (seq->type==SEQ_META) { + if (seq->type == SEQ_META) { Sequence *seq_child; - for (seq_child= seq->seqbase.first; seq_child; seq_child= seq_child->next) { + for (seq_child = seq->seqbase.first; seq_child; seq_child = seq_child->next) { seq_sound_init(scene, seq_child); } } @@ -3229,13 +3233,13 @@ void seq_sound_init(Scene *scene, Sequence *seq) Sequence *seq_foreground_frame_get(Scene *scene, int frame) { - Editing *ed= seq_give_editing(scene, FALSE); - Sequence *seq, *best_seq=NULL; + Editing *ed = seq_give_editing(scene, FALSE); + Sequence *seq, *best_seq = NULL; int best_machine = -1; if (!ed) return NULL; - for (seq=ed->seqbasep->first; seq; seq= seq->next) { + for (seq = ed->seqbasep->first; seq; seq = seq->next) { if (seq->flag & SEQ_MUTE || seq->startdisp > frame || seq->enddisp <= frame) continue; /* only use elements you can see - not */ @@ -3250,12 +3254,12 @@ Sequence *seq_foreground_frame_get(Scene *scene, int frame) } /* return 0 if there werent enough space */ -int shuffle_seq(ListBase * seqbasep, Sequence *test, Scene *evil_scene) +int shuffle_seq(ListBase *seqbasep, Sequence *test, Scene *evil_scene) { - int orig_machine= test->machine; + int orig_machine = test->machine; test->machine++; calc_sequence(evil_scene, test); - while ( seq_test_overlap(seqbasep, test) ) { + while (seq_test_overlap(seqbasep, test) ) { if (test->machine >= MAXSEQ) { break; } @@ -3269,15 +3273,15 @@ int shuffle_seq(ListBase * seqbasep, Sequence *test, Scene *evil_scene) * nicer to move it to the end */ Sequence *seq; - int new_frame= test->enddisp; + int new_frame = test->enddisp; - for (seq= seqbasep->first; seq; seq= seq->next) { + for (seq = seqbasep->first; seq; seq = seq->next) { if (seq->machine == orig_machine) new_frame = MAX2(new_frame, seq->enddisp); } - test->machine= orig_machine; - new_frame = new_frame + (test->start-test->startdisp); /* adjust by the startdisp */ + test->machine = orig_machine; + new_frame = new_frame + (test->start - test->startdisp); /* adjust by the startdisp */ seq_translate(evil_scene, test, new_frame - test->start); calc_sequence(evil_scene, test); @@ -3288,20 +3292,20 @@ int shuffle_seq(ListBase * seqbasep, Sequence *test, Scene *evil_scene) } } -static int shuffle_seq_time_offset_test(ListBase * seqbasep, char dir) +static int shuffle_seq_time_offset_test(ListBase *seqbasep, char dir) { - int offset= 0; + int offset = 0; Sequence *seq, *seq_other; - for (seq= seqbasep->first; seq; seq= seq->next) { + for (seq = seqbasep->first; seq; seq = seq->next) { if (seq->tmp) { - for (seq_other= seqbasep->first; seq_other; seq_other= seq_other->next) { + for (seq_other = seqbasep->first; seq_other; seq_other = seq_other->next) { if (!seq_other->tmp && seq_overlap(seq, seq_other)) { - if (dir=='L') { - offset= MIN2(offset, seq_other->startdisp - seq->enddisp); + if (dir == 'L') { + offset = MIN2(offset, seq_other->startdisp - seq->enddisp); } else { - offset= MAX2(offset, seq_other->enddisp - seq->startdisp); + offset = MAX2(offset, seq_other->enddisp - seq->startdisp); } } } @@ -3310,32 +3314,32 @@ static int shuffle_seq_time_offset_test(ListBase * seqbasep, char dir) return offset; } -static int shuffle_seq_time_offset(Scene* scene, ListBase * seqbasep, char dir) +static int shuffle_seq_time_offset(Scene *scene, ListBase *seqbasep, char dir) { - int ofs= 0; - int tot_ofs= 0; + int ofs = 0; + int tot_ofs = 0; Sequence *seq; - while ( (ofs= shuffle_seq_time_offset_test(seqbasep, dir)) ) { - for (seq= seqbasep->first; seq; seq= seq->next) { + while ( (ofs = shuffle_seq_time_offset_test(seqbasep, dir)) ) { + for (seq = seqbasep->first; seq; seq = seq->next) { if (seq->tmp) { /* seq_test_overlap only tests display values */ - seq->startdisp += ofs; - seq->enddisp += ofs; + seq->startdisp += ofs; + seq->enddisp += ofs; } } - tot_ofs+= ofs; + tot_ofs += ofs; } - for (seq= seqbasep->first; seq; seq= seq->next) { + for (seq = seqbasep->first; seq; seq = seq->next) { if (seq->tmp) - calc_sequence_disp(scene, seq); /* corrects dummy startdisp/enddisp values */ + calc_sequence_disp(scene, seq); /* corrects dummy startdisp/enddisp values */ } return tot_ofs; } -int shuffle_seq_time(ListBase * seqbasep, Scene *evil_scene) +int shuffle_seq_time(ListBase *seqbasep, Scene *evil_scene) { /* note: seq->tmp is used to tag strips to move */ @@ -3343,10 +3347,10 @@ int shuffle_seq_time(ListBase * seqbasep, Scene *evil_scene) int offset_l = shuffle_seq_time_offset(evil_scene, seqbasep, 'L'); int offset_r = shuffle_seq_time_offset(evil_scene, seqbasep, 'R'); - int offset = (-offset_l < offset_r) ? offset_l:offset_r; + int offset = (-offset_l < offset_r) ? offset_l : offset_r; if (offset) { - for (seq= seqbasep->first; seq; seq= seq->next) { + for (seq = seqbasep->first; seq; seq = seq->next) { if (seq->tmp) { seq_translate(evil_scene, seq, offset); seq->flag &= ~SEQ_OVERLAP; @@ -3354,7 +3358,7 @@ int shuffle_seq_time(ListBase * seqbasep, Scene *evil_scene) } } - return offset? 0:1; + return offset ? 0 : 1; } void seq_update_sound_bounds_all(Scene *scene) @@ -3375,7 +3379,7 @@ void seq_update_sound_bounds_all(Scene *scene) } } -void seq_update_sound_bounds(Scene* scene, Sequence *seq) +void seq_update_sound_bounds(Scene *scene, Sequence *seq) { sound_move_scene_sound_defaults(scene, seq); /* mute is set in seq_update_muting_recursive */ @@ -3387,15 +3391,15 @@ static void seq_update_muting_recursive(ListBase *seqbasep, Sequence *metaseq, i int seqmute; /* for sound we go over full meta tree to update muted state, - * since sound is played outside of evaluating the imbufs, */ - for (seq=seqbasep->first; seq; seq=seq->next) { - seqmute= (mute || (seq->flag & SEQ_MUTE)); + * since sound is played outside of evaluating the imbufs, */ + for (seq = seqbasep->first; seq; seq = seq->next) { + seqmute = (mute || (seq->flag & SEQ_MUTE)); if (seq->type == SEQ_META) { /* if this is the current meta sequence, unmute because * all sequences above this were set to mute */ if (seq == metaseq) - seqmute= 0; + seqmute = 0; seq_update_muting_recursive(&seq->seqbase, metaseq, seqmute); } @@ -3411,7 +3415,7 @@ void seq_update_muting(Editing *ed) { if (ed) { /* mute all sounds up to current metastack list */ - MetaStack *ms= ed->metastack.last; + MetaStack *ms = ed->metastack.last; if (ms) seq_update_muting_recursive(&ed->seqbase, ms->parseq, 1); @@ -3424,7 +3428,7 @@ static void seq_update_sound_recursive(Scene *scene, ListBase *seqbasep, bSound { Sequence *seq; - for (seq=seqbasep->first; seq; seq=seq->next) { + for (seq = seqbasep->first; seq; seq = seq->next) { if (seq->type == SEQ_META) { seq_update_sound_recursive(scene, &seq->seqbase, sound); } @@ -3447,13 +3451,13 @@ void seq_update_sound(struct Scene *scene, struct bSound *sound) ListBase *seq_seqbase(ListBase *seqbase, Sequence *seq) { Sequence *iseq; - ListBase *lb= NULL; + ListBase *lb = NULL; - for (iseq= seqbase->first; iseq; iseq= iseq->next) { - if (seq==iseq) { + for (iseq = seqbase->first; iseq; iseq = iseq->next) { + if (seq == iseq) { return seqbase; } - else if (iseq->seqbase.first && (lb= seq_seqbase(&iseq->seqbase, seq))) { + else if (iseq->seqbase.first && (lb = seq_seqbase(&iseq->seqbase, seq))) { return lb; } } @@ -3461,18 +3465,18 @@ ListBase *seq_seqbase(ListBase *seqbase, Sequence *seq) return NULL; } -Sequence *seq_metastrip(ListBase * seqbase, Sequence * meta, Sequence *seq) +Sequence *seq_metastrip(ListBase *seqbase, Sequence *meta, Sequence *seq) { - Sequence * iseq; + Sequence *iseq; for (iseq = seqbase->first; iseq; iseq = iseq->next) { - Sequence * rval; + Sequence *rval; if (seq == iseq) { return meta; } else if (iseq->seqbase.first && - (rval = seq_metastrip(&iseq->seqbase, iseq, seq))) { + (rval = seq_metastrip(&iseq->seqbase, iseq, seq))) { return rval; } } @@ -3485,26 +3489,26 @@ int seq_swap(Sequence *seq_a, Sequence *seq_b, const char **error_str) char name[sizeof(seq_a->name)]; if (seq_a->len != seq_b->len) { - *error_str= "Strips must be the same length"; + *error_str = "Strips must be the same length"; return 0; } /* type checking, could be more advanced but disalow sound vs non-sound copy */ if (seq_a->type != seq_b->type) { if (seq_a->type == SEQ_SOUND || seq_b->type == SEQ_SOUND) { - *error_str= "Strips were not compatible"; + *error_str = "Strips were not compatible"; return 0; } /* disallow effects to swap with non-effects strips */ if ((seq_a->type & SEQ_EFFECT) != (seq_b->type & SEQ_EFFECT)) { - *error_str= "Strips were not compatible"; + *error_str = "Strips were not compatible"; return 0; } if ((seq_a->type & SEQ_EFFECT) && (seq_b->type & SEQ_EFFECT)) { if (get_sequence_effect_num_inputs(seq_a->type) != get_sequence_effect_num_inputs(seq_b->type)) { - *error_str= "Strips must have the same number of inputs"; + *error_str = "Strips must have the same number of inputs"; return 0; } } @@ -3513,9 +3517,9 @@ int seq_swap(Sequence *seq_a, Sequence *seq_b, const char **error_str) SWAP(Sequence, *seq_a, *seq_b); /* swap back names so animation fcurves don't get swapped */ - BLI_strncpy(name, seq_a->name+2, sizeof(name)); - BLI_strncpy(seq_a->name+2, seq_b->name+2, sizeof(seq_b->name)-2); - BLI_strncpy(seq_b->name+2, name, sizeof(seq_b->name)-2); + BLI_strncpy(name, seq_a->name + 2, sizeof(name)); + BLI_strncpy(seq_a->name + 2, seq_b->name + 2, sizeof(seq_b->name) - 2); + BLI_strncpy(seq_b->name + 2, name, sizeof(seq_b->name) - 2); /* swap back opacity, and overlay mode */ SWAP(int, seq_a->blend_mode, seq_b->blend_mode); @@ -3539,19 +3543,19 @@ int seq_swap(Sequence *seq_a, Sequence *seq_b, const char **error_str) /* XXX - hackish function needed for transforming strips! TODO - have some better solution */ void seq_offset_animdata(Scene *scene, Sequence *seq, int ofs) { - char str[SEQ_NAME_MAXSTR+3]; + char str[SEQ_NAME_MAXSTR + 3]; FCurve *fcu; - if (scene->adt==NULL || ofs==0 || scene->adt->action==NULL) + if (scene->adt == NULL || ofs == 0 || scene->adt->action == NULL) return; - BLI_snprintf(str, sizeof(str), "[\"%s\"]", seq->name+2); + BLI_snprintf(str, sizeof(str), "[\"%s\"]", seq->name + 2); - for (fcu= scene->adt->action->curves.first; fcu; fcu= fcu->next) { + for (fcu = scene->adt->action->curves.first; fcu; fcu = fcu->next) { if (strstr(fcu->rna_path, "sequence_editor.sequences_all[") && strstr(fcu->rna_path, str)) { unsigned int i; for (i = 0; i < fcu->totvert; i++) { - BezTriple *bezt= &fcu->bezt[i]; + BezTriple *bezt = &fcu->bezt[i]; bezt->vec[0][0] += ofs; bezt->vec[1][0] += ofs; bezt->vec[2][0] += ofs; @@ -3562,22 +3566,22 @@ void seq_offset_animdata(Scene *scene, Sequence *seq, int ofs) void seq_dupe_animdata(Scene *scene, const char *name_src, const char *name_dst) { - char str_from[SEQ_NAME_MAXSTR+3]; + char str_from[SEQ_NAME_MAXSTR + 3]; FCurve *fcu; FCurve *fcu_last; FCurve *fcu_cpy; - ListBase lb= {NULL, NULL}; + ListBase lb = {NULL, NULL}; - if (scene->adt==NULL || scene->adt->action==NULL) + if (scene->adt == NULL || scene->adt->action == NULL) return; BLI_snprintf(str_from, sizeof(str_from), "[\"%s\"]", name_src); - fcu_last= scene->adt->action->curves.last; + fcu_last = scene->adt->action->curves.last; - for (fcu= scene->adt->action->curves.first; fcu && fcu->prev != fcu_last; fcu= fcu->next) { + for (fcu = scene->adt->action->curves.first; fcu && fcu->prev != fcu_last; fcu = fcu->next) { if (strstr(fcu->rna_path, "sequence_editor.sequences_all[") && strstr(fcu->rna_path, str_from)) { - fcu_cpy= copy_fcurve(fcu); + fcu_cpy = copy_fcurve(fcu); BLI_addtail(&lb, fcu_cpy); } } @@ -3592,15 +3596,15 @@ void seq_dupe_animdata(Scene *scene, const char *name_src, const char *name_dst) /* XXX - hackish function needed to remove all fcurves belonging to a sequencer strip */ static void seq_free_animdata(Scene *scene, Sequence *seq) { - char str[SEQ_NAME_MAXSTR+3]; + char str[SEQ_NAME_MAXSTR + 3]; FCurve *fcu; - if (scene->adt==NULL || scene->adt->action==NULL) + if (scene->adt == NULL || scene->adt->action == NULL) return; - BLI_snprintf(str, sizeof(str), "[\"%s\"]", seq->name+2); + BLI_snprintf(str, sizeof(str), "[\"%s\"]", seq->name + 2); - fcu= scene->adt->action->curves.first; + fcu = scene->adt->action->curves.first; while (fcu) { if (strstr(fcu->rna_path, "sequence_editor.sequences_all[") && strstr(fcu->rna_path, str)) { @@ -3620,13 +3624,13 @@ static void seq_free_animdata(Scene *scene, Sequence *seq) Sequence *get_seq_by_name(ListBase *seqbase, const char *name, int recursive) { - Sequence *iseq=NULL; - Sequence *rseq=NULL; + Sequence *iseq = NULL; + Sequence *rseq = NULL; - for (iseq=seqbase->first; iseq; iseq=iseq->next) { - if (strcmp(name, iseq->name+2) == 0) + for (iseq = seqbase->first; iseq; iseq = iseq->next) { + if (strcmp(name, iseq->name + 2) == 0) return iseq; - else if (recursive && (iseq->seqbase.first) && (rseq=get_seq_by_name(&iseq->seqbase, name, 1))) { + else if (recursive && (iseq->seqbase.first) && (rseq = get_seq_by_name(&iseq->seqbase, name, 1))) { return rseq; } } @@ -3637,24 +3641,24 @@ Sequence *get_seq_by_name(ListBase *seqbase, const char *name, int recursive) Sequence *seq_active_get(Scene *scene) { - Editing *ed= seq_give_editing(scene, FALSE); - if (ed==NULL) return NULL; + Editing *ed = seq_give_editing(scene, FALSE); + if (ed == NULL) return NULL; return ed->act_seq; } void seq_active_set(Scene *scene, Sequence *seq) { - Editing *ed= seq_give_editing(scene, FALSE); - if (ed==NULL) return; + Editing *ed = seq_give_editing(scene, FALSE); + if (ed == NULL) return; - ed->act_seq= seq; + ed->act_seq = seq; } int seq_active_pair_get(Scene *scene, Sequence **seq_act, Sequence **seq_other) { - Editing *ed= seq_give_editing(scene, FALSE); + Editing *ed = seq_give_editing(scene, FALSE); - *seq_act= seq_active_get(scene); + *seq_act = seq_active_get(scene); if (*seq_act == NULL) { return 0; @@ -3662,15 +3666,15 @@ int seq_active_pair_get(Scene *scene, Sequence **seq_act, Sequence **seq_other) else { Sequence *seq; - *seq_other= NULL; + *seq_other = NULL; - for (seq= ed->seqbasep->first; seq; seq= seq->next) { + for (seq = ed->seqbasep->first; seq; seq = seq->next) { if (seq->flag & SELECT && (seq != (*seq_act))) { if (*seq_other) { return 0; } else { - *seq_other= seq; + *seq_other = seq; } } } @@ -3684,7 +3688,7 @@ int seq_active_pair_get(Scene *scene, Sequence **seq_act, Sequence **seq_other) void seq_load_apply(Scene *scene, Sequence *seq, SeqLoadInfo *seq_load) { if (seq) { - BLI_strncpy(seq->name+2, seq_load->name, sizeof(seq->name)-2); + BLI_strncpy(seq->name + 2, seq_load->name, sizeof(seq->name) - 2); seqbase_unique_name_recursive(&scene->ed->seqbase, seq); if (seq_load->flag & SEQ_LOAD_FRAME_ADVANCE) { @@ -3712,17 +3716,17 @@ Sequence *alloc_sequence(ListBase *lb, int cfra, int machine) { Sequence *seq; - seq= MEM_callocN( sizeof(Sequence), "addseq"); + seq = MEM_callocN(sizeof(Sequence), "addseq"); BLI_addtail(lb, seq); - *( (short *)seq->name )= ID_SEQ; - seq->name[2]= 0; + *( (short *)seq->name) = ID_SEQ; + seq->name[2] = 0; - seq->flag= SELECT; - seq->start= cfra; - seq->machine= machine; - seq->sat= 1.0; - seq->mul= 1.0; + seq->flag = SELECT; + seq->start = cfra; + seq->machine = machine; + seq->sat = 1.0; + seq->mul = 1.0; seq->blend_opacity = 100.0; seq->volume = 1.0f; seq->pitch = 1.0f; @@ -3734,20 +3738,20 @@ Sequence *alloc_sequence(ListBase *lb, int cfra, int machine) /* NOTE: this function doesn't fill in image names */ Sequence *sequencer_add_image_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo *seq_load) { - Scene *scene= CTX_data_scene(C); /* only for active seq */ + Scene *scene = CTX_data_scene(C); /* only for active seq */ Sequence *seq; Strip *strip; seq = alloc_sequence(seqbasep, seq_load->start_frame, seq_load->channel); - seq->type= SEQ_IMAGE; - seq->blend_mode= SEQ_CROSS; /* so alpha adjustment fade to the strip below */ + seq->type = SEQ_IMAGE; + seq->blend_mode = SEQ_CROSS; /* so alpha adjustment fade to the strip below */ /* basic defaults */ - seq->strip= strip= MEM_callocN(sizeof(Strip), "strip"); + seq->strip = strip = MEM_callocN(sizeof(Strip), "strip"); seq->len = seq_load->len ? seq_load->len : 1; - strip->us= 1; - strip->stripdata= MEM_callocN(seq->len*sizeof(StripElem), "stripelem"); + strip->us = 1; + strip->stripdata = MEM_callocN(seq->len * sizeof(StripElem), "stripelem"); BLI_strncpy(strip->dir, seq_load->path, sizeof(strip->dir)); seq_load_apply(scene, seq, seq_load); @@ -3758,12 +3762,12 @@ Sequence *sequencer_add_image_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo #ifdef WITH_AUDASPACE Sequence *sequencer_add_sound_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo *seq_load) { - Main *bmain= CTX_data_main(C); - Scene *scene= CTX_data_scene(C); /* only for sound */ - Editing *ed= seq_give_editing(scene, TRUE); + Main *bmain = CTX_data_main(C); + Scene *scene = CTX_data_scene(C); /* only for sound */ + Editing *ed = seq_give_editing(scene, TRUE); bSound *sound; - Sequence *seq; /* generic strip vars */ + Sequence *seq; /* generic strip vars */ Strip *strip; StripElem *se; @@ -3771,7 +3775,7 @@ Sequence *sequencer_add_sound_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo sound = sound_new_file(CTX_data_main(C), seq_load->path); /* handles relative paths */ - if (sound==NULL || sound->playback_handle == NULL) { + if (sound == NULL || sound->playback_handle == NULL) { //if(op) // BKE_report(op->reports, RPT_ERROR, "Unsupported audio format"); return NULL; @@ -3788,18 +3792,18 @@ Sequence *sequencer_add_sound_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo seq = alloc_sequence(seqbasep, seq_load->start_frame, seq_load->channel); - seq->type= SEQ_SOUND; - seq->sound= sound; - BLI_strncpy(seq->name+2, "Sound", SEQ_NAME_MAXSTR-2); + seq->type = SEQ_SOUND; + seq->sound = sound; + BLI_strncpy(seq->name + 2, "Sound", SEQ_NAME_MAXSTR - 2); seqbase_unique_name_recursive(&scene->ed->seqbase, seq); /* basic defaults */ - seq->strip= strip= MEM_callocN(sizeof(Strip), "strip"); + seq->strip = strip = MEM_callocN(sizeof(Strip), "strip"); seq->len = ceil(info.length * FPS); - strip->us= 1; + strip->us = 1; /* we only need 1 element to store the filename */ - strip->stripdata= se= MEM_callocN(sizeof(StripElem), "stripelem"); + strip->stripdata = se = MEM_callocN(sizeof(StripElem), "stripelem"); BLI_split_dirfile(seq_load->path, strip->dir, se->name, sizeof(strip->dir), sizeof(se->name)); @@ -3826,10 +3830,10 @@ Sequence *sequencer_add_sound_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo Sequence *sequencer_add_movie_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo *seq_load) { - Scene *scene= CTX_data_scene(C); /* only for sound */ + Scene *scene = CTX_data_scene(C); /* only for sound */ char path[sizeof(seq_load->path)]; - Sequence *seq; /* generic strip vars */ + Sequence *seq; /* generic strip vars */ Strip *strip; StripElem *se; @@ -3840,25 +3844,25 @@ Sequence *sequencer_add_movie_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo an = openanim(path, IB_rect, 0); - if (an==NULL) + if (an == NULL) return NULL; seq = alloc_sequence(seqbasep, seq_load->start_frame, seq_load->channel); - seq->type= SEQ_MOVIE; - seq->blend_mode= SEQ_CROSS; /* so alpha adjustment fade to the strip below */ + seq->type = SEQ_MOVIE; + seq->blend_mode = SEQ_CROSS; /* so alpha adjustment fade to the strip below */ - seq->anim= an; + seq->anim = an; seq->anim_preseek = IMB_anim_get_preseek(an); - BLI_strncpy(seq->name+2, "Movie", SEQ_NAME_MAXSTR-2); + BLI_strncpy(seq->name + 2, "Movie", SEQ_NAME_MAXSTR - 2); seqbase_unique_name_recursive(&scene->ed->seqbase, seq); /* basic defaults */ - seq->strip= strip= MEM_callocN(sizeof(Strip), "strip"); + seq->strip = strip = MEM_callocN(sizeof(Strip), "strip"); seq->len = IMB_anim_get_duration(an, IMB_TC_RECORD_RUN); - strip->us= 1; + strip->us = 1; /* we only need 1 element for MOVIE strips */ - strip->stripdata= se= MEM_callocN(sizeof(StripElem), "stripelem"); + strip->stripdata = se = MEM_callocN(sizeof(StripElem), "stripelem"); BLI_split_dirfile(seq_load->path, strip->dir, se->name, sizeof(strip->dir), sizeof(se->name)); @@ -3866,12 +3870,12 @@ Sequence *sequencer_add_movie_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo if (seq_load->flag & SEQ_LOAD_MOVIE_SOUND) { - int start_frame_back= seq_load->start_frame; + int start_frame_back = seq_load->start_frame; seq_load->channel++; sequencer_add_sound_strip(C, seqbasep, seq_load); - seq_load->start_frame= start_frame_back; + seq_load->start_frame = start_frame_back; seq_load->channel--; } @@ -3887,11 +3891,11 @@ Sequence *sequencer_add_movie_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo static Sequence *seq_dupli(struct Scene *scene, struct Scene *scene_to, Sequence *seq, int dupe_flag) { - Scene *sce_audio= scene_to ? scene_to : scene; + Scene *sce_audio = scene_to ? scene_to : scene; Sequence *seqn = MEM_dupallocN(seq); seq->tmp = seqn; - seqn->strip= MEM_dupallocN(seq->strip); + seqn->strip = MEM_dupallocN(seq->strip); // XXX: add F-Curve duplication stuff? @@ -3910,13 +3914,13 @@ static Sequence *seq_dupli(struct Scene *scene, struct Scene *scene_to, Sequence if (seq->strip->color_balance) { seqn->strip->color_balance - = MEM_dupallocN(seq->strip->color_balance); + = MEM_dupallocN(seq->strip->color_balance); } - if (seq->type==SEQ_META) { + if (seq->type == SEQ_META) { seqn->strip->stripdata = NULL; - seqn->seqbase.first= seqn->seqbase.last= NULL; + seqn->seqbase.first = seqn->seqbase.last = NULL; /* WATCH OUT!!! - This metastrip is not recursively duplicated here - do this after!!! */ /* - seq_dupli_recursive(&seq->seqbase,&seqn->seqbase);*/ } @@ -3927,12 +3931,12 @@ static Sequence *seq_dupli(struct Scene *scene, struct Scene *scene_to, Sequence } else if (seq->type == SEQ_MOVIE) { seqn->strip->stripdata = - MEM_dupallocN(seq->strip->stripdata); - seqn->anim= NULL; + MEM_dupallocN(seq->strip->stripdata); + seqn->anim = NULL; } else if (seq->type == SEQ_SOUND) { seqn->strip->stripdata = - MEM_dupallocN(seq->strip->stripdata); + MEM_dupallocN(seq->strip->stripdata); if (seq->scene_sound) seqn->scene_sound = sound_add_scene_sound_defaults(sce_audio, seqn); @@ -3940,12 +3944,12 @@ static Sequence *seq_dupli(struct Scene *scene, struct Scene *scene_to, Sequence } else if (seq->type == SEQ_IMAGE) { seqn->strip->stripdata = - MEM_dupallocN(seq->strip->stripdata); + MEM_dupallocN(seq->strip->stripdata); } else if (seq->type >= SEQ_EFFECT) { - if (seq->seq1 && seq->seq1->tmp) seqn->seq1= seq->seq1->tmp; - if (seq->seq2 && seq->seq2->tmp) seqn->seq2= seq->seq2->tmp; - if (seq->seq3 && seq->seq3->tmp) seqn->seq3= seq->seq3->tmp; + if (seq->seq1 && seq->seq1->tmp) seqn->seq1 = seq->seq1->tmp; + if (seq->seq2 && seq->seq2->tmp) seqn->seq2 = seq->seq2->tmp; + if (seq->seq3 && seq->seq3->tmp) seqn->seq3 = seq->seq3->tmp; if (seq->type & SEQ_EFFECT) { struct SeqEffectHandle sh; @@ -3959,25 +3963,25 @@ static Sequence *seq_dupli(struct Scene *scene, struct Scene *scene_to, Sequence } else { fprintf(stderr, "Aiiiiekkk! sequence type not " - "handled in duplicate!\nExpect a crash" - " now...\n"); + "handled in duplicate!\nExpect a crash" + " now...\n"); } if (dupe_flag & SEQ_DUPE_UNIQUE_NAME) seqbase_unique_name_recursive(&scene->ed->seqbase, seqn); if (dupe_flag & SEQ_DUPE_ANIM) - seq_dupe_animdata(scene, seq->name+2, seqn->name+2); + seq_dupe_animdata(scene, seq->name + 2, seqn->name + 2); return seqn; } -Sequence * seq_dupli_recursive(struct Scene *scene, struct Scene *scene_to, Sequence * seq, int dupe_flag) +Sequence *seq_dupli_recursive(struct Scene *scene, struct Scene *scene_to, Sequence *seq, int dupe_flag) { - Sequence * seqn = seq_dupli(scene, scene_to, seq, dupe_flag); + Sequence *seqn = seq_dupli(scene, scene_to, seq, dupe_flag); if (seq->type == SEQ_META) { Sequence *s; - for (s= seq->seqbase.first; s; s = s->next) { + for (s = seq->seqbase.first; s; s = s->next) { Sequence *n = seq_dupli_recursive(scene, scene_to, s, dupe_flag); if (n) { BLI_addtail(&seqn->seqbase, n); @@ -3993,18 +3997,18 @@ void seqbase_dupli_recursive(Scene *scene, Scene *scene_to, ListBase *nseqbase, Sequence *seqn = NULL; Sequence *last_seq = seq_active_get(scene); - for (seq= seqbase->first; seq; seq= seq->next) { - seq->tmp= NULL; + for (seq = seqbase->first; seq; seq = seq->next) { + seq->tmp = NULL; if ((seq->flag & SELECT) || (dupe_flag & SEQ_DUPE_ALL)) { seqn = seq_dupli(scene, scene_to, seq, dupe_flag); if (seqn) { /*should never fail */ if (dupe_flag & SEQ_DUPE_CONTEXT) { seq->flag &= ~SEQ_ALLSEL; - seqn->flag &= ~(SEQ_LEFTSEL+SEQ_RIGHTSEL+SEQ_LOCK); + seqn->flag &= ~(SEQ_LEFTSEL + SEQ_RIGHTSEL + SEQ_LOCK); } BLI_addtail(nseqbase, seqn); - if (seq->type==SEQ_META) + if (seq->type == SEQ_META) seqbase_dupli_recursive(scene, scene_to, &seqn->seqbase, &seq->seqbase, dupe_flag); if (dupe_flag & SEQ_DUPE_CONTEXT) { diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c index 7c5f1a1543f..b611037061f 100644 --- a/source/blender/editors/space_sequencer/sequencer_add.c +++ b/source/blender/editors/space_sequencer/sequencer_add.c @@ -79,10 +79,10 @@ /* Generic functions, reused by add strip operators */ /* avoid passing multiple args and be more verbose */ -#define SEQPROP_STARTFRAME (1<<0) -#define SEQPROP_ENDFRAME (1<<1) -#define SEQPROP_NOPATHS (1<<2) -#define SEQPROP_NOCHAN (1<<3) +#define SEQPROP_STARTFRAME (1 << 0) +#define SEQPROP_ENDFRAME (1 << 1) +#define SEQPROP_NOPATHS (1 << 2) +#define SEQPROP_NOCHAN (1 << 3) #define SELECT 1 @@ -92,7 +92,7 @@ static void sequencer_generic_props__internal(wmOperatorType *ot, int flag) RNA_def_int(ot->srna, "frame_start", 0, INT_MIN, INT_MAX, "Start Frame", "Start frame of the sequence strip", INT_MIN, INT_MAX); if (flag & SEQPROP_ENDFRAME) - RNA_def_int(ot->srna, "frame_end", 0, INT_MIN, INT_MAX, "End Frame", "End frame for the color strip", INT_MIN, INT_MAX); /* not usual since most strips have a fixed length */ + RNA_def_int(ot->srna, "frame_end", 0, INT_MIN, INT_MAX, "End Frame", "End frame for the color strip", INT_MIN, INT_MAX); /* not usual since most strips have a fixed length */ RNA_def_int(ot->srna, "channel", 1, 1, MAXSEQ, "Channel", "Channel to place this strip into", 1, MAXSEQ); @@ -104,8 +104,8 @@ static void sequencer_generic_props__internal(wmOperatorType *ot, int flag) static void sequencer_generic_invoke_path__internal(bContext *C, wmOperator *op, const char *identifier) { if (RNA_struct_find_property(op->ptr, identifier)) { - Scene *scene= CTX_data_scene(C); - Sequence *last_seq= seq_active_get(scene); + Scene *scene = CTX_data_scene(C); + Sequence *last_seq = seq_active_get(scene); if (last_seq && last_seq->strip && SEQ_HAS_PATH(last_seq)) { char path[sizeof(last_seq->strip->dir)]; BLI_strncpy(path, last_seq->strip->dir, sizeof(path)); @@ -117,7 +117,7 @@ static void sequencer_generic_invoke_path__internal(bContext *C, wmOperator *op, static void sequencer_generic_invoke_xy__internal(bContext *C, wmOperator *op, wmEvent *event, int flag) { - View2D *v2d= UI_view2d_fromcontext(C); + View2D *v2d = UI_view2d_fromcontext(C); float mval_v2d[2]; @@ -125,13 +125,13 @@ static void sequencer_generic_invoke_xy__internal(bContext *C, wmOperator *op, w /* effect strips don't need a channel initialized from the mouse */ if (!(flag & SEQPROP_NOCHAN)) { - RNA_int_set(op->ptr, "channel", (int)mval_v2d[1]+0.5f); + RNA_int_set(op->ptr, "channel", (int)mval_v2d[1] + 0.5f); } RNA_int_set(op->ptr, "frame_start", (int)mval_v2d[0]); - if ((flag & SEQPROP_ENDFRAME) && RNA_struct_property_is_set(op->ptr, "frame_end")==0) - RNA_int_set(op->ptr, "frame_end", (int)mval_v2d[0] + 25); // XXX arbitary but ok for now. + if ((flag & SEQPROP_ENDFRAME) && RNA_struct_property_is_set(op->ptr, "frame_end") == 0) + RNA_int_set(op->ptr, "frame_end", (int)mval_v2d[0] + 25); // XXX arbitary but ok for now. if (!(flag & SEQPROP_NOPATHS)) { sequencer_generic_invoke_path__internal(C, op, "filepath"); @@ -141,23 +141,23 @@ static void sequencer_generic_invoke_xy__internal(bContext *C, wmOperator *op, w static void seq_load_operator_info(SeqLoadInfo *seq_load, wmOperator *op) { - int relative= RNA_struct_find_property(op->ptr, "relative_path") && RNA_boolean_get(op->ptr, "relative_path"); - int is_file= -1; + int relative = RNA_struct_find_property(op->ptr, "relative_path") && RNA_boolean_get(op->ptr, "relative_path"); + int is_file = -1; memset(seq_load, 0, sizeof(SeqLoadInfo)); - seq_load->start_frame= RNA_int_get(op->ptr, "frame_start"); - seq_load->end_frame= seq_load->start_frame; /* un-set */ + seq_load->start_frame = RNA_int_get(op->ptr, "frame_start"); + seq_load->end_frame = seq_load->start_frame; /* un-set */ - seq_load->channel= RNA_int_get(op->ptr, "channel"); - seq_load->len= 1; // images only, if endframe isn't set! + seq_load->channel = RNA_int_get(op->ptr, "channel"); + seq_load->len = 1; // images only, if endframe isn't set! if (RNA_struct_find_property(op->ptr, "filepath")) { RNA_string_get(op->ptr, "filepath", seq_load->path); /* full path, file is set by the caller */ - is_file= 1; + is_file = 1; } else if (RNA_struct_find_property(op->ptr, "directory")) { RNA_string_get(op->ptr, "directory", seq_load->path); /* full path, file is set by the caller */ - is_file= 0; + is_file = 0; } if ((is_file != -1) && relative) @@ -181,14 +181,14 @@ static void seq_load_operator_info(SeqLoadInfo *seq_load, wmOperator *op) seq_load->flag |= SEQ_LOAD_FRAME_ADVANCE; - if (is_file==1) { + if (is_file == 1) { BLI_strncpy(seq_load->name, BLI_path_basename(seq_load->path), sizeof(seq_load->name)); } else if (RNA_struct_find_property(op->ptr, "files")) { /* used for image strip */ /* best guess, first images name */ RNA_BEGIN(op->ptr, itemptr, "files") { - char *name= RNA_string_get_alloc(&itemptr, "name", NULL, 0); + char *name = RNA_string_get_alloc(&itemptr, "name", NULL, 0); BLI_strncpy(seq_load->name, name, sizeof(seq_load->name)); MEM_freeN(name); break; @@ -200,38 +200,38 @@ static void seq_load_operator_info(SeqLoadInfo *seq_load, wmOperator *op) /* add scene operator */ static int sequencer_add_scene_strip_exec(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); - Editing *ed= seq_give_editing(scene, TRUE); + Scene *scene = CTX_data_scene(C); + Editing *ed = seq_give_editing(scene, TRUE); Scene *sce_seq; - Sequence *seq; /* generic strip vars */ + Sequence *seq; /* generic strip vars */ Strip *strip; int start_frame, channel; /* operator props */ - start_frame= RNA_int_get(op->ptr, "frame_start"); - channel= RNA_int_get(op->ptr, "channel"); + start_frame = RNA_int_get(op->ptr, "frame_start"); + channel = RNA_int_get(op->ptr, "channel"); - sce_seq= BLI_findlink(&CTX_data_main(C)->scene, RNA_enum_get(op->ptr, "scene")); + sce_seq = BLI_findlink(&CTX_data_main(C)->scene, RNA_enum_get(op->ptr, "scene")); - if (sce_seq==NULL) { + if (sce_seq == NULL) { BKE_report(op->reports, RPT_ERROR, "Scene not found"); return OPERATOR_CANCELLED; } seq = alloc_sequence(ed->seqbasep, start_frame, channel); - seq->type= SEQ_SCENE; - seq->blend_mode= SEQ_CROSS; /* so alpha adjustment fade to the strip below */ + seq->type = SEQ_SCENE; + seq->blend_mode = SEQ_CROSS; /* so alpha adjustment fade to the strip below */ - seq->scene= sce_seq; + seq->scene = sce_seq; /* basic defaults */ - seq->strip= strip= MEM_callocN(sizeof(Strip), "strip"); + seq->strip = strip = MEM_callocN(sizeof(Strip), "strip"); seq->len = sce_seq->r.efra - sce_seq->r.sfra + 1; - strip->us= 1; + strip->us = 1; - BLI_strncpy(seq->name+2, sce_seq->id.name+2, sizeof(seq->name)-2); + BLI_strncpy(seq->name + 2, sce_seq->id.name + 2, sizeof(seq->name) - 2); seqbase_unique_name_recursive(&ed->seqbase, seq); seq->scene_sound = sound_scene_add_scene_sound(scene, seq, start_frame, start_frame + seq->len, 0); @@ -249,7 +249,7 @@ static int sequencer_add_scene_strip_exec(bContext *C, wmOperator *op) if (seq_test_overlap(ed->seqbasep, seq)) shuffle_seq(ed->seqbasep, seq, scene); } - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; } @@ -288,10 +288,10 @@ void SEQUENCER_OT_scene_strip_add(struct wmOperatorType *ot) ot->poll = ED_operator_scene_editable; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME); - prop= RNA_def_enum(ot->srna, "scene", DummyRNA_NULL_items, 0, "Scene", ""); + prop = RNA_def_enum(ot->srna, "scene", DummyRNA_NULL_items, 0, "Scene", ""); RNA_def_enum_funcs(prop, RNA_scene_itemf); ot->prop = prop; } @@ -299,20 +299,20 @@ void SEQUENCER_OT_scene_strip_add(struct wmOperatorType *ot) /* add movieclip operator */ static int sequencer_add_movieclip_strip_exec(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); - Editing *ed= seq_give_editing(scene, TRUE); + Scene *scene = CTX_data_scene(C); + Editing *ed = seq_give_editing(scene, TRUE); MovieClip *clip; - Sequence *seq; /* generic strip vars */ + Sequence *seq; /* generic strip vars */ Strip *strip; int start_frame, channel; /* operator props */ - start_frame= RNA_int_get(op->ptr, "frame_start"); - channel= RNA_int_get(op->ptr, "channel"); + start_frame = RNA_int_get(op->ptr, "frame_start"); + channel = RNA_int_get(op->ptr, "channel"); - clip= BLI_findlink(&CTX_data_main(C)->movieclip, RNA_enum_get(op->ptr, "clip")); + clip = BLI_findlink(&CTX_data_main(C)->movieclip, RNA_enum_get(op->ptr, "clip")); if (clip == NULL) { BKE_report(op->reports, RPT_ERROR, "MovieClip not found"); @@ -320,16 +320,16 @@ static int sequencer_add_movieclip_strip_exec(bContext *C, wmOperator *op) } seq = alloc_sequence(ed->seqbasep, start_frame, channel); - seq->type= SEQ_MOVIECLIP; - seq->blend_mode= SEQ_CROSS; + seq->type = SEQ_MOVIECLIP; + seq->blend_mode = SEQ_CROSS; seq->clip = clip; /* basic defaults */ - seq->strip= strip= MEM_callocN(sizeof(Strip), "strip"); + seq->strip = strip = MEM_callocN(sizeof(Strip), "strip"); seq->len = BKE_movieclip_get_duration(clip); - strip->us= 1; + strip->us = 1; - BLI_strncpy(seq->name+2, clip->id.name+2, sizeof(seq->name)-2); + BLI_strncpy(seq->name + 2, clip->id.name + 2, sizeof(seq->name) - 2); seqbase_unique_name_recursive(&ed->seqbase, seq); calc_sequence_disp(scene, seq); @@ -345,7 +345,7 @@ static int sequencer_add_movieclip_strip_exec(bContext *C, wmOperator *op) if (seq_test_overlap(ed->seqbasep, seq)) shuffle_seq(ed->seqbasep, seq, scene); } - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; } @@ -384,10 +384,10 @@ void SEQUENCER_OT_movieclip_strip_add(struct wmOperatorType *ot) ot->poll = ED_operator_scene_editable; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME); - prop= RNA_def_enum(ot->srna, "clip", DummyRNA_NULL_items, 0, "Clip", ""); + prop = RNA_def_enum(ot->srna, "clip", DummyRNA_NULL_items, 0, "Clip", ""); RNA_def_enum_funcs(prop, RNA_movieclip_itemf); ot->prop = prop; } @@ -395,19 +395,19 @@ void SEQUENCER_OT_movieclip_strip_add(struct wmOperatorType *ot) static int sequencer_add_generic_strip_exec(bContext *C, wmOperator *op, SeqLoadFunc seq_load_func) { - Scene *scene= CTX_data_scene(C); /* only for sound */ - Editing *ed= seq_give_editing(scene, TRUE); + Scene *scene = CTX_data_scene(C); /* only for sound */ + Editing *ed = seq_give_editing(scene, TRUE); SeqLoadInfo seq_load; Sequence *seq; int tot_files; - const short overlap= RNA_boolean_get(op->ptr, "overlap"); + const short overlap = RNA_boolean_get(op->ptr, "overlap"); seq_load_operator_info(&seq_load, op); if (seq_load.flag & SEQ_LOAD_REPLACE_SEL) deselect_all_seq(scene); - tot_files= RNA_property_collection_length(op->ptr, RNA_struct_find_property(op->ptr, "files")); + tot_files = RNA_property_collection_length(op->ptr, RNA_struct_find_property(op->ptr, "files")); if (tot_files) { /* multiple files */ @@ -416,7 +416,8 @@ static int sequencer_add_generic_strip_exec(bContext *C, wmOperator *op, SeqLoad BLI_split_dir_part(seq_load.path, dir_only, sizeof(dir_only)); - RNA_BEGIN(op->ptr, itemptr, "files") { + RNA_BEGIN(op->ptr, itemptr, "files") + { RNA_string_get(&itemptr, "name", file_only); BLI_join_dirfile(seq_load.path, sizeof(seq_load.path), dir_only, file_only); @@ -439,7 +440,7 @@ static int sequencer_add_generic_strip_exec(bContext *C, wmOperator *op, SeqLoad } } - if (seq_load.tot_success==0) { + if (seq_load.tot_success == 0) { BKE_reportf(op->reports, RPT_ERROR, "File \"%s\" could not be loaded", seq_load.path); return OPERATOR_CANCELLED; } @@ -447,7 +448,7 @@ static int sequencer_add_generic_strip_exec(bContext *C, wmOperator *op, SeqLoad sort_seq(scene); seq_update_muting(ed); - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; } @@ -499,9 +500,9 @@ void SEQUENCER_OT_movie_strip_add(struct wmOperatorType *ot) ot->poll = ED_operator_scene_editable; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - WM_operator_properties_filesel(ot, FOLDERFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH|WM_FILESEL_RELPATH|WM_FILESEL_FILES, FILE_DEFAULTDISPLAY); + WM_operator_properties_filesel(ot, FOLDERFILE | MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH | WM_FILESEL_FILES, FILE_DEFAULTDISPLAY); sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME); RNA_def_boolean(ot->srna, "sound", TRUE, "Sound", "Load sound with the movie"); } @@ -523,7 +524,7 @@ static int sequencer_add_sound_strip_invoke(bContext *C, wmOperator *op, wmEvent /* This is for drag and drop */ if ((RNA_struct_property_is_set(op->ptr, "files") && RNA_collection_length(op->ptr, "files")) || - RNA_struct_property_is_set(op->ptr, "filepath")) + RNA_struct_property_is_set(op->ptr, "filepath")) { sequencer_generic_invoke_xy__internal(C, op, event, SEQPROP_NOPATHS); return sequencer_add_sound_strip_exec(C, op); @@ -553,9 +554,9 @@ void SEQUENCER_OT_sound_strip_add(struct wmOperatorType *ot) ot->poll = ED_operator_scene_editable; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - WM_operator_properties_filesel(ot, FOLDERFILE|SOUNDFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH|WM_FILESEL_RELPATH|WM_FILESEL_FILES, FILE_DEFAULTDISPLAY); + WM_operator_properties_filesel(ot, FOLDERFILE | SOUNDFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH | WM_FILESEL_FILES, FILE_DEFAULTDISPLAY); sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME); RNA_def_boolean(ot->srna, "cache", FALSE, "Cache", "Cache the sound in memory"); } @@ -565,8 +566,8 @@ static int sequencer_add_image_strip_exec(bContext *C, wmOperator *op) { /* cant use the generic function for this */ - Scene *scene= CTX_data_scene(C); /* only for sound */ - Editing *ed= seq_give_editing(scene, TRUE); + Scene *scene = CTX_data_scene(C); /* only for sound */ + Editing *ed = seq_give_editing(scene, TRUE); SeqLoadInfo seq_load; Sequence *seq; @@ -576,9 +577,9 @@ static int sequencer_add_image_strip_exec(bContext *C, wmOperator *op) seq_load_operator_info(&seq_load, op); /* images are unique in how they handle this - 1 per strip elem */ - seq_load.len= RNA_property_collection_length(op->ptr, RNA_struct_find_property(op->ptr, "files")); + seq_load.len = RNA_property_collection_length(op->ptr, RNA_struct_find_property(op->ptr, "files")); - if (seq_load.len==0) + if (seq_load.len == 0) return OPERATOR_CANCELLED; if (seq_load.flag & SEQ_LOAD_REPLACE_SEL) @@ -586,12 +587,12 @@ static int sequencer_add_image_strip_exec(bContext *C, wmOperator *op) /* main adding function */ - seq= sequencer_add_image_strip(C, ed->seqbasep, &seq_load); - strip= seq->strip; - se= strip->stripdata; + seq = sequencer_add_image_strip(C, ed->seqbasep, &seq_load); + strip = seq->strip; + se = strip->stripdata; RNA_BEGIN(op->ptr, itemptr, "files") { - char *filename= RNA_string_get_alloc(&itemptr, "name", NULL, 0); + char *filename = RNA_string_get_alloc(&itemptr, "name", NULL, 0); BLI_strncpy(se->name, filename, sizeof(se->name)); MEM_freeN(filename); se++; @@ -600,7 +601,7 @@ static int sequencer_add_image_strip_exec(bContext *C, wmOperator *op) if (seq_load.len == 1) { if (seq_load.start_frame < seq_load.end_frame) { - seq->endstill= seq_load.end_frame - seq_load.start_frame; + seq->endstill = seq_load.end_frame - seq_load.start_frame; } } @@ -609,13 +610,13 @@ static int sequencer_add_image_strip_exec(bContext *C, wmOperator *op) sort_seq(scene); /* last active name */ - strncpy(ed->act_imagedir, strip->dir, FILE_MAXDIR-1); + strncpy(ed->act_imagedir, strip->dir, FILE_MAXDIR - 1); if (RNA_boolean_get(op->ptr, "overlap") == FALSE) { if (seq_test_overlap(ed->seqbasep, seq)) shuffle_seq(ed->seqbasep, seq, scene); } - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; } @@ -631,7 +632,7 @@ static int sequencer_add_image_strip_invoke(bContext *C, wmOperator *op, wmEvent /* drag drop has set the names */ if (RNA_struct_property_is_set(op->ptr, "files") && RNA_collection_length(op->ptr, "files")) { - sequencer_generic_invoke_xy__internal(C, op, event, SEQPROP_ENDFRAME|SEQPROP_NOPATHS); + sequencer_generic_invoke_xy__internal(C, op, event, SEQPROP_ENDFRAME | SEQPROP_NOPATHS); return sequencer_add_image_strip_exec(C, op); } @@ -657,20 +658,20 @@ void SEQUENCER_OT_image_strip_add(struct wmOperatorType *ot) ot->poll = ED_operator_scene_editable; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_DIRECTORY|WM_FILESEL_RELPATH|WM_FILESEL_FILES, FILE_DEFAULTDISPLAY); - sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME|SEQPROP_ENDFRAME); + WM_operator_properties_filesel(ot, FOLDERFILE | IMAGEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_DIRECTORY | WM_FILESEL_RELPATH | WM_FILESEL_FILES, FILE_DEFAULTDISPLAY); + sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME | SEQPROP_ENDFRAME); } /* add_effect_strip operator */ static int sequencer_add_effect_strip_exec(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); - Editing *ed= seq_give_editing(scene, TRUE); + Scene *scene = CTX_data_scene(C); + Editing *ed = seq_give_editing(scene, TRUE); - Sequence *seq; /* generic strip vars */ + Sequence *seq; /* generic strip vars */ Strip *strip; struct SeqEffectHandle sh; @@ -679,11 +680,11 @@ static int sequencer_add_effect_strip_exec(bContext *C, wmOperator *op) Sequence *seq1, *seq2, *seq3; const char *error_msg; - start_frame= RNA_int_get(op->ptr, "frame_start"); - end_frame= RNA_int_get(op->ptr, "frame_end"); - channel= RNA_int_get(op->ptr, "channel"); + start_frame = RNA_int_get(op->ptr, "frame_start"); + end_frame = RNA_int_get(op->ptr, "frame_end"); + channel = RNA_int_get(op->ptr, "channel"); - type= RNA_enum_get(op->ptr, "type"); + type = RNA_enum_get(op->ptr, "type"); // XXX move to invoke if (!seq_effect_find_selected(scene, NULL, type, &seq1, &seq2, &seq3, &error_msg)) { @@ -693,27 +694,27 @@ static int sequencer_add_effect_strip_exec(bContext *C, wmOperator *op) /* If seq1 is NULL and no error was raised it means the seq is standalone * (like color strips) and we need to check its start and end frames are valid */ - if (seq1==NULL && end_frame <= start_frame) { + if (seq1 == NULL && end_frame <= start_frame) { BKE_report(op->reports, RPT_ERROR, "Start and end frame are not set"); return OPERATOR_CANCELLED; } seq = alloc_sequence(ed->seqbasep, start_frame, channel); - seq->type= type; + seq->type = type; - BLI_strncpy(seq->name+2, give_seqname(seq), sizeof(seq->name)-2); + BLI_strncpy(seq->name + 2, give_seqname(seq), sizeof(seq->name) - 2); seqbase_unique_name_recursive(&ed->seqbase, seq); sh = get_sequence_effect(seq); - seq->seq1= seq1; - seq->seq2= seq2; - seq->seq3= seq3; + seq->seq1 = seq1; + seq->seq2 = seq2; + seq->seq3 = seq3; sh.init(seq); if (!seq1) { /* effect has no deps */ - seq->len= 1; + seq->len = 1; seq_tx_set_final_right(seq, end_frame); } @@ -722,16 +723,16 @@ static int sequencer_add_effect_strip_exec(bContext *C, wmOperator *op) calc_sequence(scene, seq); /* basic defaults */ - seq->strip= strip= MEM_callocN(sizeof(Strip), "strip"); - strip->us= 1; + seq->strip = strip = MEM_callocN(sizeof(Strip), "strip"); + strip->us = 1; - if (seq->type==SEQ_PLUGIN) { + if (seq->type == SEQ_PLUGIN) { char path[FILE_MAX]; RNA_string_get(op->ptr, "filepath", path); sh.init_plugin(seq, path); - if (seq->plugin==NULL) { + if (seq->plugin == NULL) { BLI_remlink(ed->seqbasep, seq); seq_free_sequence(scene, seq); BKE_reportf(op->reports, RPT_ERROR, "Sequencer plugin \"%s\" could not load", path); @@ -739,24 +740,24 @@ static int sequencer_add_effect_strip_exec(bContext *C, wmOperator *op) } } else if (seq->type == SEQ_COLOR) { - SolidColorVars *colvars= (SolidColorVars *)seq->effectdata; + SolidColorVars *colvars = (SolidColorVars *)seq->effectdata; RNA_float_get_array(op->ptr, "color", colvars->col); - seq->blend_mode= SEQ_CROSS; /* so alpha adjustment fade to the strip below */ + seq->blend_mode = SEQ_CROSS; /* so alpha adjustment fade to the strip below */ } else if (seq->type == SEQ_ADJUSTMENT) { - seq->blend_mode= SEQ_CROSS; + seq->blend_mode = SEQ_CROSS; } /* an unset channel is a special case where we automatically go above * the other strips. */ if (!RNA_struct_property_is_set(op->ptr, "channel")) { if (seq->seq1) { - int chan= MAX3( seq->seq1 ? seq->seq1->machine : 0, - seq->seq2 ? seq->seq2->machine : 0, - seq->seq3 ? seq->seq3->machine : 0); + int chan = MAX3(seq->seq1 ? seq->seq1->machine : 0, + seq->seq2 ? seq->seq2->machine : 0, + seq->seq3 ? seq->seq3->machine : 0); if (chan < MAXSEQ) - seq->machine= chan; + seq->machine = chan; } } @@ -777,7 +778,7 @@ static int sequencer_add_effect_strip_exec(bContext *C, wmOperator *op) seq->flag |= SELECT; } - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; } @@ -786,9 +787,9 @@ static int sequencer_add_effect_strip_exec(bContext *C, wmOperator *op) /* add color */ static int sequencer_add_effect_strip_invoke(bContext *C, wmOperator *op, wmEvent *event) { - short is_type_set= RNA_struct_property_is_set(op->ptr, "type"); - int type= -1; - int prop_flag= SEQPROP_ENDFRAME; + short is_type_set = RNA_struct_property_is_set(op->ptr, "type"); + int type = -1; + int prop_flag = SEQPROP_ENDFRAME; if (!ED_operator_sequencer_active(C)) { BKE_report(op->reports, RPT_ERROR, "Sequencer area not active"); @@ -796,7 +797,7 @@ static int sequencer_add_effect_strip_invoke(bContext *C, wmOperator *op, wmEven } if (is_type_set) { - type= RNA_enum_get(op->ptr, "type"); + type = RNA_enum_get(op->ptr, "type"); /* when invoking an effect strip which uses inputs, * skip initializing the channel from the mouse. @@ -809,7 +810,7 @@ static int sequencer_add_effect_strip_invoke(bContext *C, wmOperator *op, wmEven sequencer_generic_invoke_xy__internal(C, op, event, prop_flag); - if (is_type_set && type==SEQ_PLUGIN) { + if (is_type_set && type == SEQ_PLUGIN) { /* only plugins need the file selector */ WM_event_add_fileselect(C, op); return OPERATOR_RUNNING_MODAL; @@ -833,10 +834,10 @@ void SEQUENCER_OT_effect_strip_add(struct wmOperatorType *ot) ot->poll = ED_operator_scene_editable; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - WM_operator_properties_filesel(ot, 0, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH|WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY); - sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME|SEQPROP_ENDFRAME); + WM_operator_properties_filesel(ot, 0, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY); + sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME | SEQPROP_ENDFRAME); RNA_def_enum(ot->srna, "type", sequencer_prop_effect_types, SEQ_CROSS, "Type", "Sequencer effect type"); RNA_def_float_vector(ot->srna, "color", 3, NULL, 0.0f, 1.0f, "Color", "Initialize the strip with this color (only used when type='COLOR')", 0.0f, 1.0f); } diff --git a/source/blender/editors/space_sequencer/sequencer_buttons.c b/source/blender/editors/space_sequencer/sequencer_buttons.c index ee1a0a7ef6d..81712ec10c4 100644 --- a/source/blender/editors/space_sequencer/sequencer_buttons.c +++ b/source/blender/editors/space_sequencer/sequencer_buttons.c @@ -59,7 +59,7 @@ static void sequencer_panel_view_properties(const bContext *UNUSED(C), Panel *pa { uiBlock *block; - block= uiLayoutAbsoluteBlock(pa->layout); + block = uiLayoutAbsoluteBlock(pa->layout); uiBlockSetHandleFunc(block, do_sequencer_panel_events, NULL); } @@ -69,7 +69,7 @@ static void sequencer_panel_properties(const bContext *UNUSED(C), Panel *pa) { uiBlock *block; - block= uiLayoutAbsoluteBlock(pa->layout); + block = uiLayoutAbsoluteBlock(pa->layout); uiBlockSetHandleFunc(block, do_sequencer_panel_events, NULL); } @@ -78,16 +78,16 @@ void sequencer_buttons_register(ARegionType *art) { PanelType *pt; - pt= MEM_callocN(sizeof(PanelType), "spacetype sequencer strip properties"); + pt = MEM_callocN(sizeof(PanelType), "spacetype sequencer strip properties"); strcpy(pt->idname, "SEQUENCER_PT_properties"); strcpy(pt->label, "Strip Properties"); - pt->draw= sequencer_panel_properties; + pt->draw = sequencer_panel_properties; BLI_addtail(&art->paneltypes, pt); - pt= MEM_callocN(sizeof(PanelType), "spacetype sequencer view properties"); + pt = MEM_callocN(sizeof(PanelType), "spacetype sequencer view properties"); strcpy(pt->idname, "SEQUENCER_PT_view_properties"); strcpy(pt->label, "View Properties"); - pt->draw= sequencer_panel_view_properties; + pt->draw = sequencer_panel_view_properties; BLI_addtail(&art->paneltypes, pt); } @@ -96,8 +96,8 @@ void sequencer_buttons_register(ARegionType *art) static int sequencer_properties(bContext *C, wmOperator *UNUSED(op)) { - ScrArea *sa= CTX_wm_area(C); - ARegion *ar= sequencer_has_buttons_region(sa); + ScrArea *sa = CTX_wm_area(C); + ARegion *ar = sequencer_has_buttons_region(sa); if (ar) ED_region_toggle_hidden(C, ar); diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index d29af06bbcd..a0bc54fec85 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -68,8 +68,8 @@ #include "sequencer_intern.h" -#define SEQ_LEFTHANDLE 1 -#define SEQ_RIGHTHANDLE 2 +#define SEQ_LEFTHANDLE 1 +#define SEQ_RIGHTHANDLE 2 /* Note, Don't use SEQ_BEGIN/SEQ_END while drawing! @@ -81,91 +81,91 @@ static void get_seq_color3ubv(Scene *curscene, Sequence *seq, unsigned char col[ unsigned char blendcol[3]; SolidColorVars *colvars = (SolidColorVars *)seq->effectdata; - switch(seq->type) { - case SEQ_IMAGE: - UI_GetThemeColor3ubv(TH_SEQ_IMAGE, col); - break; - - case SEQ_META: - UI_GetThemeColor3ubv(TH_SEQ_META, col); - break; - - case SEQ_MOVIE: - UI_GetThemeColor3ubv(TH_SEQ_MOVIE, col); - break; + switch (seq->type) { + case SEQ_IMAGE: + UI_GetThemeColor3ubv(TH_SEQ_IMAGE, col); + break; - case SEQ_MOVIECLIP: - UI_GetThemeColor3ubv(TH_SEQ_MOVIECLIP, col); - break; - - case SEQ_SCENE: - UI_GetThemeColor3ubv(TH_SEQ_SCENE, col); - - if (seq->scene==curscene) { - UI_GetColorPtrShade3ubv(col, col, 20); - } - break; - - /* transitions */ - case SEQ_CROSS: - case SEQ_GAMCROSS: - case SEQ_WIPE: - UI_GetThemeColor3ubv(TH_SEQ_TRANSITION, col); - - /* slightly offset hue to distinguish different effects */ - if (seq->type == SEQ_CROSS) rgb_byte_set_hue_float_offset(col,0.04); - if (seq->type == SEQ_GAMCROSS) rgb_byte_set_hue_float_offset(col,0.08); - if (seq->type == SEQ_WIPE) rgb_byte_set_hue_float_offset(col,0.12); - break; - - /* effects */ - case SEQ_TRANSFORM: - case SEQ_SPEED: - case SEQ_ADD: - case SEQ_SUB: - case SEQ_MUL: - case SEQ_ALPHAOVER: - case SEQ_ALPHAUNDER: - case SEQ_OVERDROP: - case SEQ_GLOW: - case SEQ_MULTICAM: - case SEQ_ADJUSTMENT: - UI_GetThemeColor3ubv(TH_SEQ_EFFECT, col); + case SEQ_META: + UI_GetThemeColor3ubv(TH_SEQ_META, col); + break; + + case SEQ_MOVIE: + UI_GetThemeColor3ubv(TH_SEQ_MOVIE, col); + break; + + case SEQ_MOVIECLIP: + UI_GetThemeColor3ubv(TH_SEQ_MOVIECLIP, col); + break; - /* slightly offset hue to distinguish different effects */ - if (seq->type == SEQ_ADD) rgb_byte_set_hue_float_offset(col,0.04); - if (seq->type == SEQ_SUB) rgb_byte_set_hue_float_offset(col,0.08); - if (seq->type == SEQ_MUL) rgb_byte_set_hue_float_offset(col,0.12); - if (seq->type == SEQ_ALPHAOVER) rgb_byte_set_hue_float_offset(col,0.16); - if (seq->type == SEQ_ALPHAUNDER) rgb_byte_set_hue_float_offset(col,0.20); - if (seq->type == SEQ_OVERDROP) rgb_byte_set_hue_float_offset(col,0.24); - if (seq->type == SEQ_GLOW) rgb_byte_set_hue_float_offset(col,0.28); - if (seq->type == SEQ_TRANSFORM) rgb_byte_set_hue_float_offset(col,0.36); - if (seq->type == SEQ_MULTICAM) rgb_byte_set_hue_float_offset(col,0.32); - if (seq->type == SEQ_ADJUSTMENT) rgb_byte_set_hue_float_offset(col,0.40); - break; + case SEQ_SCENE: + UI_GetThemeColor3ubv(TH_SEQ_SCENE, col); - case SEQ_COLOR: - if (colvars->col) { - rgb_float_to_uchar(col, colvars->col); - } - else { - col[0] = col[1] = col[2] = 128; - } - break; + if (seq->scene == curscene) { + UI_GetColorPtrShade3ubv(col, col, 20); + } + break; - case SEQ_PLUGIN: - UI_GetThemeColor3ubv(TH_SEQ_PLUGIN, col); - break; + /* transitions */ + case SEQ_CROSS: + case SEQ_GAMCROSS: + case SEQ_WIPE: + UI_GetThemeColor3ubv(TH_SEQ_TRANSITION, col); + + /* slightly offset hue to distinguish different effects */ + if (seq->type == SEQ_CROSS) rgb_byte_set_hue_float_offset(col, 0.04); + if (seq->type == SEQ_GAMCROSS) rgb_byte_set_hue_float_offset(col, 0.08); + if (seq->type == SEQ_WIPE) rgb_byte_set_hue_float_offset(col, 0.12); + break; + + /* effects */ + case SEQ_TRANSFORM: + case SEQ_SPEED: + case SEQ_ADD: + case SEQ_SUB: + case SEQ_MUL: + case SEQ_ALPHAOVER: + case SEQ_ALPHAUNDER: + case SEQ_OVERDROP: + case SEQ_GLOW: + case SEQ_MULTICAM: + case SEQ_ADJUSTMENT: + UI_GetThemeColor3ubv(TH_SEQ_EFFECT, col); + + /* slightly offset hue to distinguish different effects */ + if (seq->type == SEQ_ADD) rgb_byte_set_hue_float_offset(col, 0.04); + else if (seq->type == SEQ_SUB) rgb_byte_set_hue_float_offset(col, 0.08); + else if (seq->type == SEQ_MUL) rgb_byte_set_hue_float_offset(col, 0.12); + else if (seq->type == SEQ_ALPHAOVER) rgb_byte_set_hue_float_offset(col, 0.16); + else if (seq->type == SEQ_ALPHAUNDER) rgb_byte_set_hue_float_offset(col, 0.20); + else if (seq->type == SEQ_OVERDROP) rgb_byte_set_hue_float_offset(col, 0.24); + else if (seq->type == SEQ_GLOW) rgb_byte_set_hue_float_offset(col, 0.28); + else if (seq->type == SEQ_TRANSFORM) rgb_byte_set_hue_float_offset(col, 0.36); + else if (seq->type == SEQ_MULTICAM) rgb_byte_set_hue_float_offset(col, 0.32); + else if (seq->type == SEQ_ADJUSTMENT) rgb_byte_set_hue_float_offset(col, 0.40); + break; + + case SEQ_COLOR: + if (colvars->col) { + rgb_float_to_uchar(col, colvars->col); + } + else { + col[0] = col[1] = col[2] = 128; + } + break; - case SEQ_SOUND: - UI_GetThemeColor3ubv(TH_SEQ_AUDIO, col); - blendcol[0] = blendcol[1] = blendcol[2] = 128; - if (seq->flag & SEQ_MUTE) UI_GetColorPtrBlendShade3ubv(col, blendcol, col, 0.5, 20); - break; + case SEQ_PLUGIN: + UI_GetThemeColor3ubv(TH_SEQ_PLUGIN, col); + break; + + case SEQ_SOUND: + UI_GetThemeColor3ubv(TH_SEQ_AUDIO, col); + blendcol[0] = blendcol[1] = blendcol[2] = 128; + if (seq->flag & SEQ_MUTE) UI_GetColorPtrBlendShade3ubv(col, blendcol, col, 0.5, 20); + break; - default: - col[0] = 10; col[1] = 255; col[2] = 40; + default: + col[0] = 10; col[1] = 255; col[2] = 40; } } @@ -178,29 +178,29 @@ static void drawseqwave(Scene *scene, Sequence *seq, float x1, float y1, float x */ if (seq->flag & SEQ_AUDIO_DRAW_WAVEFORM) { int i, j, pos; - int length = floor((x2-x1)/stepsize)+1; - float ymid = (y1+y2)/2; - float yscale = (y2-y1)/2; + int length = floor((x2 - x1) / stepsize) + 1; + float ymid = (y1 + y2) / 2; + float yscale = (y2 - y1) / 2; float samplestep; float startsample, endsample; float value; - SoundWaveform* waveform; + SoundWaveform *waveform; if (!seq->sound->waveform) sound_read_waveform(seq->sound); if (!seq->sound->waveform) - return; /* zero length sound */ + return; /* zero length sound */ waveform = seq->sound->waveform; if (!waveform) return; - startsample = floor((seq->startofs + seq->anim_startofs)/FPS * SOUND_WAVE_SAMPLES_PER_SECOND); - endsample = ceil((seq->startofs + seq->anim_startofs + seq->enddisp - seq->startdisp)/FPS * SOUND_WAVE_SAMPLES_PER_SECOND); - samplestep = (endsample-startsample) * stepsize / (x2-x1); + startsample = floor((seq->startofs + seq->anim_startofs) / FPS * SOUND_WAVE_SAMPLES_PER_SECOND); + endsample = ceil((seq->startofs + seq->anim_startofs + seq->enddisp - seq->startdisp) / FPS * SOUND_WAVE_SAMPLES_PER_SECOND); + samplestep = (endsample - startsample) * stepsize / (x2 - x1); if (length > floor((waveform->length - startsample) / samplestep)) length = floor((waveform->length - startsample) / samplestep); @@ -212,13 +212,13 @@ static void drawseqwave(Scene *scene, Sequence *seq, float x1, float y1, float x value = waveform->data[pos * 3]; - for (j = pos+1; (j < waveform->length) && (j < pos + samplestep); j++) + for (j = pos + 1; (j < waveform->length) && (j < pos + samplestep); j++) { if (value > waveform->data[j * 3]) value = waveform->data[j * 3]; } - glVertex2f(x1+i*stepsize, ymid + value * yscale); + glVertex2f(x1 + i * stepsize, ymid + value * yscale); } glEnd(); @@ -229,13 +229,13 @@ static void drawseqwave(Scene *scene, Sequence *seq, float x1, float y1, float x value = waveform->data[pos * 3 + 1]; - for (j = pos+1; (j < waveform->length) && (j < pos + samplestep); j++) + for (j = pos + 1; (j < waveform->length) && (j < pos + samplestep); j++) { if (value < waveform->data[j * 3 + 1]) value = waveform->data[j * 3 + 1]; } - glVertex2f(x1+i*stepsize, ymid + value * yscale); + glVertex2f(x1 + i * stepsize, ymid + value * yscale); } glEnd(); } @@ -265,10 +265,10 @@ static void drawmeta_contents(Scene *scene, Sequence *seqm, float x1, float y1, Sequence *seq; unsigned char col[4]; - int chan_min= MAXSEQ; - int chan_max= 0; - int chan_range= 0; - float draw_range= y2 - y1; + int chan_min = MAXSEQ; + int chan_max = 0; + int chan_range = 0; + float draw_range = y2 - y1; float draw_height; glEnable(GL_BLEND); @@ -277,21 +277,21 @@ static void drawmeta_contents(Scene *scene, Sequence *seqm, float x1, float y1, if (seqm->flag & SEQ_MUTE) drawmeta_stipple(1); - for (seq= seqm->seqbase.first; seq; seq= seq->next) { - chan_min= MIN2(chan_min, seq->machine); - chan_max= MAX2(chan_max, seq->machine); + for (seq = seqm->seqbase.first; seq; seq = seq->next) { + chan_min = MIN2(chan_min, seq->machine); + chan_max = MAX2(chan_max, seq->machine); } - chan_range= (chan_max - chan_min) + 1; - draw_height= draw_range / chan_range; + chan_range = (chan_max - chan_min) + 1; + draw_height = draw_range / chan_range; - col[3]= 196; /* alpha, used for all meta children */ + col[3] = 196; /* alpha, used for all meta children */ - for (seq= seqm->seqbase.first; seq; seq= seq->next) { + for (seq = seqm->seqbase.first; seq; seq = seq->next) { if ((seq->startdisp > x2 || seq->enddisp < x1) == 0) { - float y_chan= (seq->machine - chan_min) / (float)(chan_range) * draw_range; - float x1_chan= seq->startdisp; - float x2_chan= seq->enddisp; + float y_chan = (seq->machine - chan_min) / (float)(chan_range) * draw_range; + float x1_chan = seq->startdisp; + float x2_chan = seq->enddisp; float y1_chan, y2_chan; if ((seqm->flag & SEQ_MUTE) == 0 && (seq->flag & SEQ_MUTE)) @@ -302,11 +302,11 @@ static void drawmeta_contents(Scene *scene, Sequence *seqm, float x1, float y1, glColor4ubv(col); /* clamp within parent sequence strip bounds */ - if (x1_chan < x1) x1_chan= x1; - if (x2_chan > x2) x2_chan= x2; + if (x1_chan < x1) x1_chan = x1; + if (x2_chan > x2) x2_chan = x2; - y1_chan= y1 + y_chan + (draw_height * SEQ_STRIP_OFSBOTTOM); - y2_chan= y1 + y_chan + (draw_height * SEQ_STRIP_OFSTOP); + y1_chan = y1 + y_chan + (draw_height * SEQ_STRIP_OFSBOTTOM); + y2_chan = y1 + y_chan + (draw_height * SEQ_STRIP_OFSTOP); glRectf(x1_chan, y1_chan, x2_chan, y2_chan); @@ -328,51 +328,51 @@ static void drawmeta_contents(Scene *scene, Sequence *seqm, float x1, float y1, /* draw a handle, for each end of a sequence strip */ static void draw_seq_handle(View2D *v2d, Sequence *seq, float pixelx, short direction) { - float v1[2], v2[2], v3[2], rx1=0, rx2=0; //for triangles and rect + float v1[2], v2[2], v3[2], rx1 = 0, rx2 = 0; //for triangles and rect float x1, x2, y1, y2; float handsize; float minhandle, maxhandle; char numstr[32]; - unsigned int whichsel=0; + unsigned int whichsel = 0; - x1= seq->startdisp; - x2= seq->enddisp; + x1 = seq->startdisp; + x2 = seq->enddisp; - y1= seq->machine+SEQ_STRIP_OFSBOTTOM; - y2= seq->machine+SEQ_STRIP_OFSTOP; + y1 = seq->machine + SEQ_STRIP_OFSBOTTOM; + y2 = seq->machine + SEQ_STRIP_OFSTOP; /* clamp handles to defined size in pixel space */ handsize = seq->handsize; minhandle = 7; maxhandle = 40; - CLAMP(handsize, minhandle*pixelx, maxhandle*pixelx); + CLAMP(handsize, minhandle * pixelx, maxhandle * pixelx); /* set up co-ordinates/dimensions for either left or right handle */ if (direction == SEQ_LEFTHANDLE) { rx1 = x1; - rx2 = x1+handsize * 0.75f; + rx2 = x1 + handsize * 0.75f; - v1[0]= x1+handsize/4; v1[1]= y1+( ((y1+y2)/2.0f - y1)/2); - v2[0]= x1+handsize/4; v2[1]= y2-( ((y1+y2)/2.0f - y1)/2); - v3[0]= v2[0] + handsize/4; v3[1]= (y1+y2)/2.0f; + v1[0] = x1 + handsize / 4; v1[1] = y1 + ( ((y1 + y2) / 2.0f - y1) / 2); + v2[0] = x1 + handsize / 4; v2[1] = y2 - ( ((y1 + y2) / 2.0f - y1) / 2); + v3[0] = v2[0] + handsize / 4; v3[1] = (y1 + y2) / 2.0f; whichsel = SEQ_LEFTSEL; } else if (direction == SEQ_RIGHTHANDLE) { - rx1 = x2-handsize*0.75f; + rx1 = x2 - handsize * 0.75f; rx2 = x2; - v1[0]= x2-handsize/4; v1[1]= y1+( ((y1+y2)/2.0f - y1)/2); - v2[0]= x2-handsize/4; v2[1]= y2-( ((y1+y2)/2.0f - y1)/2); - v3[0]= v2[0] - handsize/4; v3[1]= (y1+y2)/2.0f; + v1[0] = x2 - handsize / 4; v1[1] = y1 + ( ((y1 + y2) / 2.0f - y1) / 2); + v2[0] = x2 - handsize / 4; v2[1] = y2 - ( ((y1 + y2) / 2.0f - y1) / 2); + v3[0] = v2[0] - handsize / 4; v3[1] = (y1 + y2) / 2.0f; whichsel = SEQ_RIGHTSEL; } /* draw! */ if (seq->type < SEQ_EFFECT || - get_sequence_effect_num_inputs(seq->type) == 0) { - glEnable( GL_BLEND ); + get_sequence_effect_num_inputs(seq->type) == 0) { + glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); @@ -385,26 +385,26 @@ static void draw_seq_handle(View2D *v2d, Sequence *seq, float pixelx, short dire if (seq->flag & whichsel) glColor4ub(255, 255, 255, 200); else glColor4ub(0, 0, 0, 50); - glEnable( GL_POLYGON_SMOOTH ); + glEnable(GL_POLYGON_SMOOTH); glBegin(GL_TRIANGLES); glVertex2fv(v1); glVertex2fv(v2); glVertex2fv(v3); glEnd(); - glDisable( GL_POLYGON_SMOOTH ); - glDisable( GL_BLEND ); + glDisable(GL_POLYGON_SMOOTH); + glDisable(GL_BLEND); } if (G.moving || (seq->flag & whichsel)) { - const char col[4]= {255, 255, 255, 255}; + const char col[4] = {255, 255, 255, 255}; if (direction == SEQ_LEFTHANDLE) { - BLI_snprintf(numstr, sizeof(numstr),"%d", seq->startdisp); - x1= rx1; + BLI_snprintf(numstr, sizeof(numstr), "%d", seq->startdisp); + x1 = rx1; y1 -= 0.45f; } else { BLI_snprintf(numstr, sizeof(numstr), "%d", seq->enddisp - 1); - x1= x2 - handsize*0.75f; - y1= y2 + 0.05f; + x1 = x2 - handsize * 0.75f; + y1 = y2 + 0.05f; } UI_view2d_text_cache_add(v2d, x1, y1, numstr, col); } @@ -414,24 +414,24 @@ static void draw_seq_extensions(Scene *scene, ARegion *ar, Sequence *seq) { float x1, x2, y1, y2, pixely, a; unsigned char col[3], blendcol[3]; - View2D *v2d= &ar->v2d; + View2D *v2d = &ar->v2d; if (seq->type >= SEQ_EFFECT) return; - x1= seq->startdisp; - x2= seq->enddisp; + x1 = seq->startdisp; + x2 = seq->enddisp; - y1= seq->machine+SEQ_STRIP_OFSBOTTOM; - y2= seq->machine+SEQ_STRIP_OFSTOP; + y1 = seq->machine + SEQ_STRIP_OFSBOTTOM; + y2 = seq->machine + SEQ_STRIP_OFSTOP; - pixely = (v2d->cur.ymax - v2d->cur.ymin)/(v2d->mask.ymax - v2d->mask.ymin); + pixely = (v2d->cur.ymax - v2d->cur.ymin) / (v2d->mask.ymax - v2d->mask.ymin); - if (pixely <= 0) return; /* can happen when the view is split/resized */ + if (pixely <= 0) return; /* can happen when the view is split/resized */ blendcol[0] = blendcol[1] = blendcol[2] = 120; if (seq->startofs) { - glEnable( GL_BLEND ); + glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); get_seq_color3ubv(scene, seq, col); @@ -445,17 +445,17 @@ static void draw_seq_extensions(Scene *scene, ARegion *ar, Sequence *seq) glColor4ub(col[0], col[1], col[2], 110); } - glRectf((float)(seq->start), y1-SEQ_STRIP_OFSBOTTOM, x1, y1); + glRectf((float)(seq->start), y1 - SEQ_STRIP_OFSBOTTOM, x1, y1); if (seq->flag & SELECT) glColor4ub(col[0], col[1], col[2], 255); else glColor4ub(col[0], col[1], col[2], 160); - fdrawbox((float)(seq->start), y1-SEQ_STRIP_OFSBOTTOM, x1, y1); //outline + fdrawbox((float)(seq->start), y1 - SEQ_STRIP_OFSBOTTOM, x1, y1); //outline - glDisable( GL_BLEND ); + glDisable(GL_BLEND); } if (seq->endofs) { - glEnable( GL_BLEND ); + glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); get_seq_color3ubv(scene, seq, col); @@ -469,14 +469,14 @@ static void draw_seq_extensions(Scene *scene, ARegion *ar, Sequence *seq) glColor4ub(col[0], col[1], col[2], 110); } - glRectf(x2, y2, (float)(seq->start+seq->len), y2+SEQ_STRIP_OFSBOTTOM); + glRectf(x2, y2, (float)(seq->start + seq->len), y2 + SEQ_STRIP_OFSBOTTOM); if (seq->flag & SELECT) glColor4ub(col[0], col[1], col[2], 255); else glColor4ub(col[0], col[1], col[2], 160); - fdrawbox(x2, y2, (float)(seq->start+seq->len), y2+SEQ_STRIP_OFSBOTTOM); //outline + fdrawbox(x2, y2, (float)(seq->start + seq->len), y2 + SEQ_STRIP_OFSBOTTOM); //outline - glDisable( GL_BLEND ); + glDisable(GL_BLEND); } if (seq->startstill) { get_seq_color3ubv(scene, seq, col); @@ -492,7 +492,7 @@ static void draw_seq_extensions(Scene *scene, ARegion *ar, Sequence *seq) glColor3ubv((GLubyte *)col); - for (a=y1; a< y2; a+= pixely * 2.0f) { + for (a = y1; a < y2; a += pixely * 2.0f) { fdrawline(x1, a, (float)(seq->start), a); } } @@ -501,7 +501,7 @@ static void draw_seq_extensions(Scene *scene, ARegion *ar, Sequence *seq) UI_GetColorPtrBlendShade3ubv(col, blendcol, col, 0.75, 40); glColor3ubv((GLubyte *)col); - draw_shadedstrip(seq, col, (float)(seq->start+seq->len), y1, x2, y2); + draw_shadedstrip(seq, col, (float)(seq->start + seq->len), y1, x2, y2); /* feint pinstripes, helps see exactly which is extended and which isn't, * especially when the extension is very small */ @@ -510,8 +510,8 @@ static void draw_seq_extensions(Scene *scene, ARegion *ar, Sequence *seq) glColor3ubv((GLubyte *)col); - for (a=y1; a< y2; a+= pixely * 2.0f) { - fdrawline((float)(seq->start+seq->len), a, x2, a); + for (a = y1; a < y2; a += pixely * 2.0f) { + fdrawline((float)(seq->start + seq->len), a, x2, a); } } } @@ -521,12 +521,12 @@ static void draw_seq_text(View2D *v2d, Sequence *seq, float x1, float x2, float { rctf rect; char str[32 + FILE_MAX]; - const char *name= seq->name+2; + const char *name = seq->name + 2; char col[4]; /* note, all strings should include 'name' */ - if (name[0]=='\0') - name= give_seqname(seq); + if (name[0] == '\0') + name = give_seqname(seq); if (seq->type == SEQ_META || seq->type == SEQ_ADJUSTMENT) { BLI_snprintf(str, sizeof(str), "%d | %s", seq->len, name); @@ -534,61 +534,78 @@ static void draw_seq_text(View2D *v2d, Sequence *seq, float x1, float x2, float else if (seq->type == SEQ_SCENE) { if (seq->scene) { if (seq->scene_camera) { - BLI_snprintf(str, sizeof(str), "%d | %s: %s (%s)", seq->len, name, seq->scene->id.name+2, ((ID *)seq->scene_camera)->name+2); + BLI_snprintf(str, sizeof(str), "%d | %s: %s (%s)", + seq->len, name, seq->scene->id.name + 2, ((ID *)seq->scene_camera)->name + 2); } else { - BLI_snprintf(str, sizeof(str), "%d | %s: %s", seq->len, name, seq->scene->id.name+2); + BLI_snprintf(str, sizeof(str), "%d | %s: %s", + seq->len, name, seq->scene->id.name + 2); } } else { - BLI_snprintf(str, sizeof(str), "%d | %s", seq->len, name); + BLI_snprintf(str, sizeof(str), "%d | %s", + seq->len, name); } } else if (seq->type == SEQ_MOVIECLIP) { - if (seq->clip && strcmp(name, seq->clip->id.name+2) != 0) { - BLI_snprintf(str, sizeof(str), "%d | %s: %s", seq->len, name, seq->clip->id.name+2); + if (seq->clip && strcmp(name, seq->clip->id.name + 2) != 0) { + BLI_snprintf(str, sizeof(str), "%d | %s: %s", + seq->len, name, seq->clip->id.name + 2); } else { - BLI_snprintf(str, sizeof(str), "%d | %s", seq->len, name); + BLI_snprintf(str, sizeof(str), "%d | %s", + seq->len, name); } } else if (seq->type == SEQ_MULTICAM) { - BLI_snprintf(str, sizeof(str), "Cam | %s: %d", name, seq->multicam_source); + BLI_snprintf(str, sizeof(str), "Cam | %s: %d", + name, seq->multicam_source); } else if (seq->type == SEQ_IMAGE) { - BLI_snprintf(str, sizeof(str), "%d | %s: %s%s", seq->len, name, seq->strip->dir, seq->strip->stripdata->name); + BLI_snprintf(str, sizeof(str), "%d | %s: %s%s", + seq->len, name, seq->strip->dir, seq->strip->stripdata->name); } else if (seq->type & SEQ_EFFECT) { - int can_float = (seq->type != SEQ_PLUGIN) - || (seq->plugin && seq->plugin->version >= 4); + int can_float = (seq->type != SEQ_PLUGIN) || (seq->plugin && seq->plugin->version >= 4); - if (seq->seq3!=seq->seq2 && seq->seq1!=seq->seq3) - BLI_snprintf(str, sizeof(str), "%d | %s: %d>%d (use %d)%s", seq->len, name, seq->seq1->machine, seq->seq2->machine, seq->seq3->machine, can_float ? "" : " No float, upgrade plugin!"); - else if (seq->seq1 && seq->seq2) - BLI_snprintf(str, sizeof(str), "%d | %s: %d>%d%s", seq->len, name, seq->seq1->machine, seq->seq2->machine, can_float ? "" : " No float, upgrade plugin!"); - else - BLI_snprintf(str, sizeof(str), "%d | %s", seq->len, name); + if (seq->seq3 != seq->seq2 && seq->seq1 != seq->seq3) { + BLI_snprintf(str, sizeof(str), "%d | %s: %d>%d (use %d)%s", + seq->len, name, seq->seq1->machine, seq->seq2->machine, seq->seq3->machine, + can_float ? "" : " No float, upgrade plugin!"); + } + else if (seq->seq1 && seq->seq2) { + BLI_snprintf(str, sizeof(str), "%d | %s: %d>%d%s", + seq->len, name, seq->seq1->machine, seq->seq2->machine, + can_float ? "" : " No float, upgrade plugin!"); + } + else { + BLI_snprintf(str, sizeof(str), "%d | %s", + seq->len, name); + } } else if (seq->type == SEQ_SOUND) { if (seq->sound) - BLI_snprintf(str, sizeof(str), "%d | %s: %s", seq->len, name, seq->sound->name); + BLI_snprintf(str, sizeof(str), "%d | %s: %s", + seq->len, name, seq->sound->name); else - BLI_snprintf(str, sizeof(str), "%d | %s", seq->len, name); + BLI_snprintf(str, sizeof(str), "%d | %s", + seq->len, name); } else if (seq->type == SEQ_MOVIE) { - BLI_snprintf(str, sizeof(str), "%d | %s: %s%s", seq->len, name, seq->strip->dir, seq->strip->stripdata->name); + BLI_snprintf(str, sizeof(str), "%d | %s: %s%s", + seq->len, name, seq->strip->dir, seq->strip->stripdata->name); } if (seq->flag & SELECT) { - col[0]= col[1]= col[2]= 255; + col[0] = col[1] = col[2] = 255; } else if ((((int)background_col[0] + (int)background_col[1] + (int)background_col[2]) / 3) < 50) { - col[0]= col[1]= col[2]= 80; /* use lighter text color for dark background */ + col[0] = col[1] = col[2] = 80; /* use lighter text color for dark background */ } else { - col[0]= col[1]= col[2]= 0; + col[0] = col[1] = col[2] = 0; } - col[3]= 255; + col[3] = 255; rect.xmin = x1; rect.ymin = y1; @@ -607,29 +624,29 @@ static void draw_shadedstrip(Sequence *seq, unsigned char col[3], float x1, floa glPolygonStipple(stipple_halftone); } - ymid1 = (y2-y1)*0.25f + y1; - ymid2 = (y2-y1)*0.65f + y1; + ymid1 = (y2 - y1) * 0.25f + y1; + ymid2 = (y2 - y1) * 0.65f + y1; glShadeModel(GL_SMOOTH); glBegin(GL_QUADS); - if (seq->flag & SEQ_INVALID_EFFECT) { col[0]= 255; col[1]= 0; col[2]= 255; } + if (seq->flag & SEQ_INVALID_EFFECT) { col[0] = 255; col[1] = 0; col[2] = 255; } else if (seq->flag & SELECT) UI_GetColorPtrShade3ubv(col, col, -50); /* else UI_GetColorPtrShade3ubv(col, col, 0); */ /* DO NOTHING */ glColor3ubv(col); - glVertex2f(x1,y1); - glVertex2f(x2,y1); + glVertex2f(x1, y1); + glVertex2f(x2, y1); - if (seq->flag & SEQ_INVALID_EFFECT) { col[0]= 255; col[1]= 0; col[2]= 255; } + if (seq->flag & SEQ_INVALID_EFFECT) { col[0] = 255; col[1] = 0; col[2] = 255; } else if (seq->flag & SELECT) UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, 5); else UI_GetColorPtrShade3ubv(col, col, -5); glColor3ubv((GLubyte *)col); - glVertex2f(x2,ymid1); - glVertex2f(x1,ymid1); + glVertex2f(x2, ymid1); + glVertex2f(x1, ymid1); glEnd(); @@ -637,16 +654,16 @@ static void draw_shadedstrip(Sequence *seq, unsigned char col[3], float x1, floa glBegin(GL_QUADS); - glVertex2f(x1,ymid2); - glVertex2f(x2,ymid2); + glVertex2f(x1, ymid2); + glVertex2f(x2, ymid2); if (seq->flag & SELECT) UI_GetColorPtrShade3ubv(col, col, -15); else UI_GetColorPtrShade3ubv(col, col, 25); glColor3ubv((GLubyte *)col); - glVertex2f(x2,y2); - glVertex2f(x1,y2); + glVertex2f(x2, y2); + glVertex2f(x1, y2); glEnd(); @@ -662,7 +679,7 @@ static void draw_shadedstrip(Sequence *seq, unsigned char col[3], float x1, floa */ static void draw_seq_strip(Scene *scene, ARegion *ar, Sequence *seq, int outline_tint, float pixelx) { - View2D *v2d= &ar->v2d; + View2D *v2d = &ar->v2d; float x1, x2, y1, y2; unsigned char col[3], background_col[3], is_single_image; @@ -670,23 +687,23 @@ static void draw_seq_strip(Scene *scene, ARegion *ar, Sequence *seq, int outline is_single_image = (char)seq_single_check(seq); /* body */ - if (seq->startstill) x1= seq->start; - else x1= seq->startdisp; - y1= seq->machine+SEQ_STRIP_OFSBOTTOM; - if (seq->endstill) x2= seq->start+seq->len; - else x2= seq->enddisp; - y2= seq->machine+SEQ_STRIP_OFSTOP; - - + x1 = (seq->startstill) ? seq->start : seq->startdisp; + y1 = seq->machine + SEQ_STRIP_OFSBOTTOM; + x2 = (seq->endstill) ? (seq->start + seq->len) : seq->enddisp; + y2 = seq->machine + SEQ_STRIP_OFSTOP; + + /* get the correct color per strip type*/ //get_seq_color3ubv(scene, seq, col); get_seq_color3ubv(scene, seq, background_col); /* draw the main strip body */ - if (is_single_image) /* single image */ + if (is_single_image) { /* single image */ draw_shadedstrip(seq, background_col, seq_tx_get_final_left(seq, 0), y1, seq_tx_get_final_right(seq, 0), y2); - else /* normal operation */ + } + else { /* normal operation */ draw_shadedstrip(seq, background_col, x1, y1, x2, y2); + } /* draw additional info and controls */ if (!is_single_image) @@ -696,11 +713,13 @@ static void draw_seq_strip(Scene *scene, ARegion *ar, Sequence *seq, int outline draw_seq_handle(v2d, seq, pixelx, SEQ_RIGHTHANDLE); /* draw the strip outline */ - x1= seq->startdisp; - x2= seq->enddisp; + x1 = seq->startdisp; + x2 = seq->enddisp; /* draw sound wave */ - if (seq->type == SEQ_SOUND) drawseqwave(scene, seq, x1, y1, x2, y2, (ar->v2d.cur.xmax - ar->v2d.cur.xmin)/ar->winx); + if (seq->type == SEQ_SOUND) { + drawseqwave(scene, seq, x1, y1, x2, y2, (ar->v2d.cur.xmax - ar->v2d.cur.xmin) / ar->winx); + } /* draw lock */ if (seq->flag & SEQ_LOCK) { @@ -724,10 +743,10 @@ static void draw_seq_strip(Scene *scene, ARegion *ar, Sequence *seq, int outline get_seq_color3ubv(scene, seq, col); if (G.moving && (seq->flag & SELECT)) { if (seq->flag & SEQ_OVERLAP) { - col[0]= 255; col[1]= col[2]= 40; + col[0] = 255; col[1] = col[2] = 40; } else - UI_GetColorPtrShade3ubv(col, col, 120+outline_tint); + UI_GetColorPtrShade3ubv(col, col, 120 + outline_tint); } else UI_GetColorPtrShade3ubv(col, col, outline_tint); @@ -745,27 +764,29 @@ static void draw_seq_strip(Scene *scene, ARegion *ar, Sequence *seq, int outline glDisable(GL_LINE_STIPPLE); } - if (seq->type==SEQ_META) drawmeta_contents(scene, seq, x1, y1, x2, y2); + if (seq->type == SEQ_META) { + drawmeta_contents(scene, seq, x1, y1, x2, y2); + } /* calculate if seq is long enough to print a name */ - x1= seq->startdisp+seq->handsize; - x2= seq->enddisp-seq->handsize; + x1 = seq->startdisp + seq->handsize; + x2 = seq->enddisp - seq->handsize; /* info text on the strip */ - if (x1cur.xmin) x1= v2d->cur.xmin; - else if (x1>v2d->cur.xmax) x1= v2d->cur.xmax; - if (x2cur.xmin) x2= v2d->cur.xmin; - else if (x2>v2d->cur.xmax) x2= v2d->cur.xmax; + if (x1 < v2d->cur.xmin) x1 = v2d->cur.xmin; + else if (x1 > v2d->cur.xmax) x1 = v2d->cur.xmax; + if (x2 < v2d->cur.xmin) x2 = v2d->cur.xmin; + else if (x2 > v2d->cur.xmax) x2 = v2d->cur.xmax; /* nice text here would require changing the view matrix for texture text */ - if ( (x2-x1) / pixelx > 32) { + if ((x2 - x1) / pixelx > 32) { draw_seq_text(v2d, seq, x1, x2, y1, y2, background_col); } } -static Sequence *special_seq_update= NULL; +static Sequence *special_seq_update = NULL; -static void UNUSED_FUNCTION(set_special_seq_update)(int val) +static void UNUSED_FUNCTION(set_special_seq_update) (int val) { // int x; @@ -773,14 +794,14 @@ static void UNUSED_FUNCTION(set_special_seq_update)(int val) if (val) { // XXX special_seq_update= find_nearest_seq(&x); } - else special_seq_update= NULL; + else special_seq_update = NULL; } -void draw_image_seq(const bContext* C, Scene *scene, ARegion *ar, SpaceSeq *sseq, int cfra, int frame_ofs) +void draw_image_seq(const bContext *C, Scene *scene, ARegion *ar, SpaceSeq *sseq, int cfra, int frame_ofs) { - struct Main *bmain= CTX_data_main(C); - struct ImBuf *ibuf= NULL; - struct ImBuf *scope= NULL; + struct Main *bmain = CTX_data_main(C); + struct ImBuf *ibuf = NULL; + struct ImBuf *scope = NULL; struct View2D *v2d = &ar->v2d; int rectx, recty; float viewrectx, viewrecty; @@ -802,8 +823,8 @@ void draw_image_seq(const bContext* C, Scene *scene, ARegion *ar, SpaceSeq *sseq return; } - viewrectx = (render_size*(float)scene->r.xsch)/100.0f; - viewrecty = (render_size*(float)scene->r.ysch)/100.0f; + viewrectx = (render_size * (float)scene->r.xsch) / 100.0f; + viewrecty = (render_size * (float)scene->r.ysch) / 100.0f; rectx = viewrectx + 0.5f; recty = viewrecty + 0.5f; @@ -833,38 +854,38 @@ void draw_image_seq(const bContext* C, Scene *scene, ARegion *ar, SpaceSeq *sseq context = seq_new_render_data(bmain, scene, rectx, recty, proxy_size); if (special_seq_update) - ibuf= give_ibuf_seq_direct(context, cfra + frame_ofs, special_seq_update); + ibuf = give_ibuf_seq_direct(context, cfra + frame_ofs, special_seq_update); else if (!U.prefetchframes) // XXX || (G.f & G_PLAYANIM) == 0) { - ibuf= (ImBuf *)give_ibuf_seq(context, cfra + frame_ofs, sseq->chanshown); + ibuf = (ImBuf *)give_ibuf_seq(context, cfra + frame_ofs, sseq->chanshown); else - ibuf= (ImBuf *)give_ibuf_seq_threaded(context, cfra + frame_ofs, sseq->chanshown); + ibuf = (ImBuf *)give_ibuf_seq_threaded(context, cfra + frame_ofs, sseq->chanshown); - if (ibuf==NULL) + if (ibuf == NULL) return; - if (ibuf->rect==NULL && ibuf->rect_float == NULL) + if (ibuf->rect == NULL && ibuf->rect_float == NULL) return; - switch(sseq->mainb) { - case SEQ_DRAW_IMG_IMBUF: - if (sseq->zebra != 0) { - scope = make_zebra_view_from_ibuf(ibuf, sseq->zebra); - } - break; - case SEQ_DRAW_IMG_WAVEFORM: - if ((sseq->flag & SEQ_DRAW_COLOR_SEPARATED) != 0) { - scope = make_sep_waveform_view_from_ibuf(ibuf); - } - else { - scope = make_waveform_view_from_ibuf(ibuf); - } - break; - case SEQ_DRAW_IMG_VECTORSCOPE: - scope = make_vectorscope_view_from_ibuf(ibuf); - break; - case SEQ_DRAW_IMG_HISTOGRAM: - scope = make_histogram_view_from_ibuf(ibuf); - break; + switch (sseq->mainb) { + case SEQ_DRAW_IMG_IMBUF: + if (sseq->zebra != 0) { + scope = make_zebra_view_from_ibuf(ibuf, sseq->zebra); + } + break; + case SEQ_DRAW_IMG_WAVEFORM: + if ((sseq->flag & SEQ_DRAW_COLOR_SEPARATED) != 0) { + scope = make_sep_waveform_view_from_ibuf(ibuf); + } + else { + scope = make_waveform_view_from_ibuf(ibuf); + } + break; + case SEQ_DRAW_IMG_VECTORSCOPE: + scope = make_vectorscope_view_from_ibuf(ibuf); + break; + case SEQ_DRAW_IMG_HISTOGRAM: + scope = make_histogram_view_from_ibuf(ibuf); + break; } if (scope) { @@ -872,14 +893,14 @@ void draw_image_seq(const bContext* C, Scene *scene, ARegion *ar, SpaceSeq *sseq ibuf = scope; } - if (ibuf->rect_float && ibuf->rect==NULL) { + if (ibuf->rect_float && ibuf->rect == NULL) { IMB_rect_from_float(ibuf); } /* setting up the view - actual drawing starts here */ UI_view2d_view_ortho(v2d); - last_texid= glaGetOneInteger(GL_TEXTURE_2D); + last_texid = glaGetOneInteger(GL_TEXTURE_2D); glEnable(GL_TEXTURE_2D); glGenTextures(1, (GLuint *)&texid); @@ -898,16 +919,16 @@ void draw_image_seq(const bContext* C, Scene *scene, ARegion *ar, SpaceSeq *sseq tot_clip.xmax = v2d->tot.xmin + (ABS(v2d->tot.xmax - v2d->tot.xmin) * scene->ed->over_border.xmax); tot_clip.ymax = v2d->tot.ymin + (ABS(v2d->tot.ymax - v2d->tot.ymin) * scene->ed->over_border.ymax); - glTexCoord2f(scene->ed->over_border.xmin, scene->ed->over_border.ymin);glVertex2f(tot_clip.xmin, tot_clip.ymin); - glTexCoord2f(scene->ed->over_border.xmin, scene->ed->over_border.ymax);glVertex2f(tot_clip.xmin, tot_clip.ymax); - glTexCoord2f(scene->ed->over_border.xmax, scene->ed->over_border.ymax);glVertex2f(tot_clip.xmax, tot_clip.ymax); - glTexCoord2f(scene->ed->over_border.xmax, scene->ed->over_border.ymin);glVertex2f(tot_clip.xmax, tot_clip.ymin); + glTexCoord2f(scene->ed->over_border.xmin, scene->ed->over_border.ymin); glVertex2f(tot_clip.xmin, tot_clip.ymin); + glTexCoord2f(scene->ed->over_border.xmin, scene->ed->over_border.ymax); glVertex2f(tot_clip.xmin, tot_clip.ymax); + glTexCoord2f(scene->ed->over_border.xmax, scene->ed->over_border.ymax); glVertex2f(tot_clip.xmax, tot_clip.ymax); + glTexCoord2f(scene->ed->over_border.xmax, scene->ed->over_border.ymin); glVertex2f(tot_clip.xmax, tot_clip.ymin); } else { - glTexCoord2f(0.0f, 0.0f);glVertex2f(v2d->tot.xmin, v2d->tot.ymin); - glTexCoord2f(0.0f, 1.0f);glVertex2f(v2d->tot.xmin, v2d->tot.ymax); - glTexCoord2f(1.0f, 1.0f);glVertex2f(v2d->tot.xmax, v2d->tot.ymax); - glTexCoord2f(1.0f, 0.0f);glVertex2f(v2d->tot.xmax, v2d->tot.ymin); + glTexCoord2f(0.0f, 0.0f); glVertex2f(v2d->tot.xmin, v2d->tot.ymin); + glTexCoord2f(0.0f, 1.0f); glVertex2f(v2d->tot.xmin, v2d->tot.ymax); + glTexCoord2f(1.0f, 1.0f); glVertex2f(v2d->tot.xmax, v2d->tot.ymax); + glTexCoord2f(1.0f, 0.0f); glVertex2f(v2d->tot.xmax, v2d->tot.ymin); } glEnd( ); glBindTexture(GL_TEXTURE_2D, last_texid); @@ -927,23 +948,23 @@ void draw_image_seq(const bContext* C, Scene *scene, ARegion *ar, SpaceSeq *sseq UI_ThemeColorBlendShade(TH_WIRE, TH_BACK, 1.0, 0); glBegin(GL_LINE_LOOP); - glVertex2f(x1-0.5f, y1-0.5f); - glVertex2f(x1-0.5f, y2+0.5f); - glVertex2f(x2+0.5f, y2+0.5f); - glVertex2f(x2+0.5f, y1-0.5f); + glVertex2f(x1 - 0.5f, y1 - 0.5f); + glVertex2f(x1 - 0.5f, y2 + 0.5f); + glVertex2f(x2 + 0.5f, y2 + 0.5f); + glVertex2f(x2 + 0.5f, y1 - 0.5f); glEnd(); /* safety border */ if ((sseq->flag & SEQ_DRAW_SAFE_MARGINS) != 0) { - float fac= 0.1; + float fac = 0.1; - float a= fac*(x2-x1); - x1+= a; - x2-= a; + float a = fac * (x2 - x1); + x1 += a; + x2 -= a; - a= fac*(y2-y1); - y1+= a; - y2-= a; + a = fac * (y2 - y1); + y1 += a; + y2 -= a; glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); @@ -987,13 +1008,13 @@ void drawprefetchseqspace(Scene *scene, ARegion *UNUSED(ar), SpaceSeq *sseq) return; } - rectx= (render_size*scene->r.xsch)/100; - recty= (render_size*scene->r.ysch)/100; + rectx = (render_size * scene->r.xsch) / 100; + recty = (render_size * scene->r.ysch) / 100; if (sseq->mainb != SEQ_DRAW_SEQUENCE) { give_ibuf_prefetch_request( - rectx, recty, (scene->r.cfra), sseq->chanshown, - proxy_size); + rectx, recty, (scene->r.cfra), sseq->chanshown, + proxy_size); } } #endif @@ -1008,60 +1029,60 @@ static void draw_seq_backdrop(View2D *v2d) glRectf(v2d->cur.xmin, -1.0, v2d->cur.xmax, 1.0); /* Alternating horizontal stripes */ - i= MAX2(1, ((int)v2d->cur.ymin)-1); + i = MAX2(1, ((int)v2d->cur.ymin) - 1); glBegin(GL_QUADS); - while (icur.ymax) { - if (((int)i) & 1) - UI_ThemeColorShade(TH_BACK, -15); - else - UI_ThemeColorShade(TH_BACK, -25); - - glVertex2f(v2d->cur.xmax, i); - glVertex2f(v2d->cur.xmin, i); - glVertex2f(v2d->cur.xmin, i+1); - glVertex2f(v2d->cur.xmax, i+1); + while (i < v2d->cur.ymax) { + if (((int)i) & 1) + UI_ThemeColorShade(TH_BACK, -15); + else + UI_ThemeColorShade(TH_BACK, -25); - i+=1.0; - } + glVertex2f(v2d->cur.xmax, i); + glVertex2f(v2d->cur.xmin, i); + glVertex2f(v2d->cur.xmin, i + 1); + glVertex2f(v2d->cur.xmax, i + 1); + + i += 1.0; + } glEnd(); /* Darker lines separating the horizontal bands */ - i= MAX2(1, ((int)v2d->cur.ymin)-1); + i = MAX2(1, ((int)v2d->cur.ymin) - 1); UI_ThemeColor(TH_GRID); glBegin(GL_LINES); - while (i < v2d->cur.ymax) { - glVertex2f(v2d->cur.xmax, i); - glVertex2f(v2d->cur.xmin, i); + while (i < v2d->cur.ymax) { + glVertex2f(v2d->cur.xmax, i); + glVertex2f(v2d->cur.xmin, i); - i+=1.0; - } + i += 1.0; + } glEnd(); } /* draw the contents of the sequencer strips view */ static void draw_seq_strips(const bContext *C, Editing *ed, ARegion *ar) { - Scene *scene= CTX_data_scene(C); - View2D *v2d= &ar->v2d; + Scene *scene = CTX_data_scene(C); + View2D *v2d = &ar->v2d; Sequence *last_seq = seq_active_get(scene); int sel = 0, j; - float pixelx = (v2d->cur.xmax - v2d->cur.xmin)/(v2d->mask.xmax - v2d->mask.xmin); + float pixelx = (v2d->cur.xmax - v2d->cur.xmin) / (v2d->mask.xmax - v2d->mask.xmin); /* loop through twice, first unselected, then selected */ - for (j=0; j<2; j++) { + for (j = 0; j < 2; j++) { Sequence *seq; - int outline_tint= (j) ? -60 : -150; /* highlighting around strip edges indicating selection */ + int outline_tint = (j) ? -60 : -150; /* highlighting around strip edges indicating selection */ /* loop through strips, checking for those that are visible */ - for (seq= ed->seqbasep->first; seq; seq= seq->next) { + for (seq = ed->seqbasep->first; seq; seq = seq->next) { /* boundbox and selection tests for NOT drawing the strip... */ if ((seq->flag & SELECT) != sel) continue; else if (seq == last_seq) continue; else if (MIN2(seq->startdisp, seq->start) > v2d->cur.xmax) continue; - else if (MAX2(seq->enddisp, seq->start+seq->len) < v2d->cur.xmin) continue; - else if (seq->machine+1.0f < v2d->cur.ymin) continue; + else if (MAX2(seq->enddisp, seq->start + seq->len) < v2d->cur.xmin) continue; + else if (seq->machine + 1.0f < v2d->cur.ymin) continue; else if (seq->machine > v2d->cur.ymax) continue; /* strip passed all tests unscathed... so draw it now */ @@ -1069,7 +1090,7 @@ static void draw_seq_strips(const bContext *C, Editing *ed, ARegion *ar) } /* draw selected next time round */ - sel= SELECT; + sel = SELECT; } /* draw the last selected last (i.e. 'active' in other parts of Blender), removes some overlapping error */ @@ -1104,18 +1125,18 @@ static void seq_draw_sfra_efra(Scene *scene, View2D *v2d) /* Draw Timeline/Strip Editor Mode for Sequencer */ void draw_timeline_seq(const bContext *C, ARegion *ar) { - Scene *scene= CTX_data_scene(C); - Editing *ed= seq_give_editing(scene, FALSE); - SpaceSeq *sseq= CTX_wm_space_seq(C); - View2D *v2d= &ar->v2d; + Scene *scene = CTX_data_scene(C); + Editing *ed = seq_give_editing(scene, FALSE); + SpaceSeq *sseq = CTX_wm_space_seq(C); + View2D *v2d = &ar->v2d; View2DScrollers *scrollers; - short unit=0, flag=0; + short unit = 0, flag = 0; float col[3]; /* clear and setup matrix */ UI_GetThemeColor3fv(TH_BACK, col); if (ed && ed->metastack.first) - glClearColor(col[0], col[1], col[2]-0.1f, 0.0f); + glClearColor(col[0], col[1], col[2] - 0.1f, 0.0f); else glClearColor(col[0], col[1], col[2], 0.0f); glClear(GL_COLOR_BUFFER_BIT); @@ -1136,7 +1157,7 @@ void draw_timeline_seq(const bContext *C, ARegion *ar) // NOTE: the gridlines are currently spaced every 25 frames, which is only fine for 25 fps, but maybe not for 30... UI_view2d_constant_grid_draw(v2d); - seq_draw_sfra_efra(scene, v2d); + seq_draw_sfra_efra(scene, v2d); /* sequence strips (if there is data available to be drawn) */ if (ed) { @@ -1149,8 +1170,8 @@ void draw_timeline_seq(const bContext *C, ARegion *ar) /* current frame */ UI_view2d_view_ortho(v2d); - if ((sseq->flag & SEQ_DRAWFRAMES)==0) flag |= DRAWCFRA_UNIT_SECONDS; - if ((sseq->flag & SEQ_NO_DRAW_CFRANUM)==0) flag |= DRAWCFRA_SHOW_NUMBOX; + if ((sseq->flag & SEQ_DRAWFRAMES) == 0) flag |= DRAWCFRA_UNIT_SECONDS; + if ((sseq->flag & SEQ_NO_DRAW_CFRANUM) == 0) flag |= DRAWCFRA_SHOW_NUMBOX; ANIM_draw_cfra(C, v2d, flag); /* markers */ @@ -1163,13 +1184,13 @@ void draw_timeline_seq(const bContext *C, ARegion *ar) /* overlap playhead */ if (scene->ed && scene->ed->over_flag & SEQ_EDIT_OVERLAY_SHOW) { - int cfra_over= (scene->ed->over_flag & SEQ_EDIT_OVERLAY_ABS) ? scene->ed->over_cfra : scene->r.cfra + scene->ed->over_ofs; + int cfra_over = (scene->ed->over_flag & SEQ_EDIT_OVERLAY_ABS) ? scene->ed->over_cfra : scene->r.cfra + scene->ed->over_ofs; glColor3f(0.2, 0.2, 0.2); // glRectf(cfra_over, v2d->cur.ymin, scene->ed->over_ofs + scene->r.cfra + 1, v2d->cur.ymax); glBegin(GL_LINES); - glVertex2f(cfra_over, v2d->cur.ymin); - glVertex2f(cfra_over, v2d->cur.ymax); + glVertex2f(cfra_over, v2d->cur.ymin); + glVertex2f(cfra_over, v2d->cur.ymax); glEnd(); } @@ -1178,8 +1199,8 @@ void draw_timeline_seq(const bContext *C, ARegion *ar) UI_view2d_view_restore(C); /* scrollers */ - unit= (sseq->flag & SEQ_DRAWFRAMES)? V2D_UNIT_FRAMES : V2D_UNIT_SECONDSSEQ; - scrollers= UI_view2d_scrollers_calc(C, v2d, unit, V2D_GRID_CLAMP, V2D_UNIT_VALUES, V2D_GRID_CLAMP); + unit = (sseq->flag & SEQ_DRAWFRAMES) ? V2D_UNIT_FRAMES : V2D_UNIT_SECONDSSEQ; + scrollers = UI_view2d_scrollers_calc(C, v2d, unit, V2D_GRID_CLAMP, V2D_UNIT_VALUES, V2D_GRID_CLAMP); UI_view2d_scrollers_draw(C, v2d, scrollers); UI_view2d_scrollers_free(scrollers); } diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index a2c74d067f9..29fdf80f667 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -129,14 +129,14 @@ typedef struct TransSeq { typedef struct ProxyBuildJob { Scene *scene; - struct Main * main; + struct Main *main; ListBase queue; int stop; } ProxyJob; static void proxy_freejob(void *pjv) { - ProxyJob *pj= pjv; + ProxyJob *pj = pjv; BLI_freelistN(&pj->queue); @@ -173,19 +173,19 @@ static void proxy_endjob(void *pjv) free_imbuf_seq(pj->scene, &ed->seqbase, FALSE, FALSE); - WM_main_add_notifier(NC_SCENE|ND_SEQUENCER, pj->scene); + WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, pj->scene); } static void seq_proxy_build_job(const bContext *C) { - wmJob * steve; + wmJob *steve; ProxyJob *pj; - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); Editing *ed = seq_give_editing(scene, FALSE); - ScrArea * sa= CTX_wm_area(C); + ScrArea *sa = CTX_wm_area(C); struct SeqIndexBuildContext *context; LinkData *link; - Sequence * seq; + Sequence *seq; steve = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), sa, "Building Proxies", WM_JOB_PROGRESS); @@ -194,11 +194,11 @@ static void seq_proxy_build_job(const bContext *C) if (!pj) { pj = MEM_callocN(sizeof(ProxyJob), "proxy rebuild job"); - pj->scene= scene; + pj->scene = scene; pj->main = CTX_data_main(C); WM_jobs_customdata(steve, pj, proxy_freejob); - WM_jobs_timer(steve, 0.1, NC_SCENE|ND_SEQUENCER, NC_SCENE|ND_SEQUENCER); + WM_jobs_timer(steve, 0.1, NC_SCENE | ND_SEQUENCER, NC_SCENE | ND_SEQUENCER); WM_jobs_callbacks(steve, proxy_startjob, NULL, NULL, proxy_endjob); } @@ -225,19 +225,19 @@ void seq_rectf(Sequence *seq, rctf *rectf) { if (seq->startstill) rectf->xmin = seq->start; else rectf->xmin = seq->startdisp; - rectf->ymin = seq->machine+SEQ_STRIP_OFSBOTTOM; - if (seq->endstill) rectf->xmax = seq->start+seq->len; + rectf->ymin = seq->machine + SEQ_STRIP_OFSBOTTOM; + if (seq->endstill) rectf->xmax = seq->start + seq->len; else rectf->xmax = seq->enddisp; - rectf->ymax = seq->machine+SEQ_STRIP_OFSTOP; + rectf->ymax = seq->machine + SEQ_STRIP_OFSTOP; } -static void UNUSED_FUNCTION(change_plugin_seq)(Scene *scene, char *str) /* called from fileselect */ +static void UNUSED_FUNCTION(change_plugin_seq) (Scene * scene, char *str) /* called from fileselect */ { - Editing *ed= seq_give_editing(scene, FALSE); + Editing *ed = seq_give_editing(scene, FALSE); struct SeqEffectHandle sh; - Sequence *last_seq= seq_active_get(scene); + Sequence *last_seq = seq_active_get(scene); - if (last_seq==NULL || last_seq->type != SEQ_PLUGIN) return; + if (last_seq == NULL || last_seq->type != SEQ_PLUGIN) return; sh = get_sequence_effect(last_seq); sh.free(last_seq); @@ -247,7 +247,7 @@ static void UNUSED_FUNCTION(change_plugin_seq)(Scene *scene, char *str) /* calle last_seq->seq2->machine, last_seq->seq3->machine); - if ( seq_test_overlap(ed->seqbasep, last_seq) ) shuffle_seq(ed->seqbasep, last_seq, scene); + if (seq_test_overlap(ed->seqbasep, last_seq) ) shuffle_seq(ed->seqbasep, last_seq, scene); } @@ -255,25 +255,25 @@ static void UNUSED_FUNCTION(change_plugin_seq)(Scene *scene, char *str) /* calle void boundbox_seq(Scene *scene, rctf *rect) { Sequence *seq; - Editing *ed= seq_give_editing(scene, FALSE); + Editing *ed = seq_give_editing(scene, FALSE); float min[2], max[2]; - if (ed==NULL) return; + if (ed == NULL) return; - min[0]= 0.0; - max[0]= EFRA+1; - min[1]= 0.0; - max[1]= 8.0; + min[0] = 0.0; + max[0] = EFRA + 1; + min[1] = 0.0; + max[1] = 8.0; - seq= ed->seqbasep->first; + seq = ed->seqbasep->first; while (seq) { - if ( min[0] > seq->startdisp-1) min[0]= seq->startdisp-1; - if ( max[0] < seq->enddisp+1) max[0]= seq->enddisp+1; - if ( max[1] < seq->machine+2) max[1]= seq->machine+2; + if (min[0] > seq->startdisp - 1) min[0] = seq->startdisp - 1; + if (max[0] < seq->enddisp + 1) max[0] = seq->enddisp + 1; + if (max[1] < seq->machine + 2) max[1] = seq->machine + 2; - seq= seq->next; + seq = seq->next; } rect->xmin = min[0]; @@ -283,13 +283,13 @@ void boundbox_seq(Scene *scene, rctf *rect) } -static int mouse_frame_side(View2D *v2d, short mouse_x, int frame ) +static int mouse_frame_side(View2D *v2d, short mouse_x, int frame) { int mval[2]; float mouseloc[2]; - mval[0]= mouse_x; - mval[1]= 0; + mval[0] = mouse_x; + mval[1] = 0; /* choose the side based on which side of the playhead the mouse is on */ UI_view2d_region_to_view(v2d, mval[0], mval[1], &mouseloc[0], &mouseloc[1]); @@ -302,28 +302,28 @@ Sequence *find_neighboring_sequence(Scene *scene, Sequence *test, int lr, int se { /* sel - 0==unselected, 1==selected, -1==done care*/ Sequence *seq; - Editing *ed= seq_give_editing(scene, FALSE); + Editing *ed = seq_give_editing(scene, FALSE); - if (ed==NULL) return NULL; + if (ed == NULL) return NULL; - if (sel>0) sel = SELECT; + if (sel > 0) sel = SELECT; - for (seq= ed->seqbasep->first; seq; seq= seq->next) { - if ( (seq!=test) && - (test->machine==seq->machine) && - ((sel == -1) || (sel && (seq->flag & SELECT)) || (sel==0 && (seq->flag & SELECT)==0) )) + for (seq = ed->seqbasep->first; seq; seq = seq->next) { + if ((seq != test) && + (test->machine == seq->machine) && + ((sel == -1) || (sel && (seq->flag & SELECT)) || (sel == 0 && (seq->flag & SELECT) == 0) )) { switch (lr) { - case SEQ_SIDE_LEFT: - if (test->startdisp == (seq->enddisp)) { - return seq; - } - break; - case SEQ_SIDE_RIGHT: - if (test->enddisp == (seq->startdisp)) { - return seq; - } - break; + case SEQ_SIDE_LEFT: + if (test->startdisp == (seq->enddisp)) { + return seq; + } + break; + case SEQ_SIDE_RIGHT: + if (test->enddisp == (seq->startdisp)) { + return seq; + } + break; } } } @@ -333,38 +333,38 @@ Sequence *find_neighboring_sequence(Scene *scene, Sequence *test, int lr, int se static Sequence *find_next_prev_sequence(Scene *scene, Sequence *test, int lr, int sel) { /* sel - 0==unselected, 1==selected, -1==done care*/ - Sequence *seq,*best_seq = NULL; - Editing *ed= seq_give_editing(scene, FALSE); + Sequence *seq, *best_seq = NULL; + Editing *ed = seq_give_editing(scene, FALSE); int dist, best_dist; - best_dist = MAXFRAME*2; + best_dist = MAXFRAME * 2; - if (ed==NULL) return NULL; + if (ed == NULL) return NULL; - seq= ed->seqbasep->first; + seq = ed->seqbasep->first; while (seq) { - if ( (seq!=test) && - (test->machine==seq->machine) && - (test->depth==seq->depth) && - ((sel == -1) || (sel==(seq->flag & SELECT)))) + if ((seq != test) && + (test->machine == seq->machine) && + (test->depth == seq->depth) && + ((sel == -1) || (sel == (seq->flag & SELECT)))) { - dist = MAXFRAME*2; + dist = MAXFRAME * 2; switch (lr) { - case SEQ_SIDE_LEFT: - if (seq->enddisp <= test->startdisp) { - dist = test->enddisp - seq->startdisp; - } - break; - case SEQ_SIDE_RIGHT: - if (seq->startdisp >= test->enddisp) { - dist = seq->startdisp - test->enddisp; - } - break; + case SEQ_SIDE_LEFT: + if (seq->enddisp <= test->startdisp) { + dist = test->enddisp - seq->startdisp; + } + break; + case SEQ_SIDE_RIGHT: + if (seq->startdisp >= test->enddisp) { + dist = seq->startdisp - test->enddisp; + } + break; } - if (dist==0) { + if (dist == 0) { best_seq = seq; break; } @@ -373,7 +373,7 @@ static Sequence *find_next_prev_sequence(Scene *scene, Sequence *test, int lr, i best_seq = seq; } } - seq= seq->next; + seq = seq->next; } return best_seq; /* can be null */ } @@ -382,27 +382,27 @@ static Sequence *find_next_prev_sequence(Scene *scene, Sequence *test, int lr, i Sequence *find_nearest_seq(Scene *scene, View2D *v2d, int *hand, const int mval[2]) { Sequence *seq; - Editing *ed= seq_give_editing(scene, FALSE); + Editing *ed = seq_give_editing(scene, FALSE); float x, y; float pixelx; float handsize; float displen; - *hand= SEQ_SIDE_NONE; + *hand = SEQ_SIDE_NONE; - if (ed==NULL) return NULL; + if (ed == NULL) return NULL; - pixelx = (v2d->cur.xmax - v2d->cur.xmin)/(v2d->mask.xmax - v2d->mask.xmin); + pixelx = (v2d->cur.xmax - v2d->cur.xmin) / (v2d->mask.xmax - v2d->mask.xmin); UI_view2d_region_to_view(v2d, mval[0], mval[1], &x, &y); - seq= ed->seqbasep->first; + seq = ed->seqbasep->first; while (seq) { if (seq->machine == (int)y) { /* check for both normal strips, and strips that have been flipped horizontally */ - if ( ((seq->startdisp < seq->enddisp) && (seq->startdisp<=x && seq->enddisp>=x)) || - ((seq->startdisp > seq->enddisp) && (seq->startdisp>=x && seq->enddisp<=x)) ) + if ( ((seq->startdisp < seq->enddisp) && (seq->startdisp <= x && seq->enddisp >= x)) || + ((seq->startdisp > seq->enddisp) && (seq->startdisp >= x && seq->enddisp <= x)) ) { if (seq_tx_test(seq)) { @@ -415,23 +415,23 @@ Sequence *find_nearest_seq(Scene *scene, View2D *v2d, int *hand, const int mval[ /* Set the max value to handle to 1/3 of the total len when its less then 28. * This is important because otherwise selecting handles happens even when you click in the middle */ - if ((displen/3) < 30*pixelx) { - handsize = displen/3; + if ((displen / 3) < 30 * pixelx) { + handsize = displen / 3; } else { - CLAMP(handsize, 7*pixelx, 30*pixelx); + CLAMP(handsize, 7 * pixelx, 30 * pixelx); } - if ( handsize+seq->startdisp >=x ) - *hand= SEQ_SIDE_LEFT; - else if ( -handsize+seq->enddisp <=x ) - *hand= SEQ_SIDE_RIGHT; + if (handsize + seq->startdisp >= x) + *hand = SEQ_SIDE_LEFT; + else if (-handsize + seq->enddisp <= x) + *hand = SEQ_SIDE_RIGHT; } } return seq; } } - seq= seq->next; + seq = seq->next; } return NULL; } @@ -457,12 +457,13 @@ static int seq_is_predecessor(Sequence *pred, Sequence *seq) void deselect_all_seq(Scene *scene) { Sequence *seq; - Editing *ed= seq_give_editing(scene, FALSE); + Editing *ed = seq_give_editing(scene, FALSE); - if (ed==NULL) return; + if (ed == NULL) return; - SEQP_BEGIN(ed, seq) { + SEQP_BEGIN(ed, seq) + { seq->flag &= ~SEQ_ALLSEL; } SEQ_END @@ -473,43 +474,43 @@ void recurs_sel_seq(Sequence *seqm) { Sequence *seq; - seq= seqm->seqbase.first; + seq = seqm->seqbase.first; while (seq) { - if (seqm->flag & (SEQ_LEFTSEL+SEQ_RIGHTSEL)) seq->flag &= ~SEQ_ALLSEL; + if (seqm->flag & (SEQ_LEFTSEL + SEQ_RIGHTSEL)) seq->flag &= ~SEQ_ALLSEL; else if (seqm->flag & SELECT) seq->flag |= SELECT; else seq->flag &= ~SEQ_ALLSEL; if (seq->seqbase.first) recurs_sel_seq(seq); - seq= seq->next; + seq = seq->next; } } int seq_effect_find_selected(Scene *scene, Sequence *activeseq, int type, Sequence **selseq1, Sequence **selseq2, Sequence **selseq3, const char **error_str) { Editing *ed = seq_give_editing(scene, FALSE); - Sequence *seq1= NULL, *seq2= NULL, *seq3= NULL, *seq; + Sequence *seq1 = NULL, *seq2 = NULL, *seq3 = NULL, *seq; - *error_str= NULL; + *error_str = NULL; if (!activeseq) - seq2= seq_active_get(scene); + seq2 = seq_active_get(scene); - for (seq=ed->seqbasep->first; seq; seq=seq->next) { + for (seq = ed->seqbasep->first; seq; seq = seq->next) { if (seq->flag & SELECT) { if (seq->type == SEQ_SOUND && get_sequence_effect_num_inputs(type) != 0) { - *error_str= "Can't apply effects to audio sequence strips"; + *error_str = "Can't apply effects to audio sequence strips"; return 0; } if ((seq != activeseq) && (seq != seq2)) { - if (seq2 == NULL) seq2= seq; - else if (seq1 == NULL) seq1= seq; - else if (seq3 == NULL) seq3= seq; - else { - *error_str= "Can't apply effect to more than 3 sequence strips"; - return 0; - } + if (seq2 == NULL) seq2 = seq; + else if (seq1 == NULL) seq1 = seq; + else if (seq3 == NULL) seq3 = seq; + else { + *error_str = "Can't apply effect to more than 3 sequence strips"; + return 0; + } } } } @@ -523,33 +524,33 @@ int seq_effect_find_selected(Scene *scene, Sequence *activeseq, int type, Sequen } - switch(get_sequence_effect_num_inputs(type)) { - case 0: - *selseq1 = *selseq2 = *selseq3 = NULL; - return 1; /* succsess */ - case 1: - if (seq2==NULL) { - *error_str= "Need at least one selected sequence strip"; - return 0; - } - if (seq1==NULL) seq1= seq2; - if (seq3==NULL) seq3= seq2; - case 2: - if (seq1==NULL || seq2==NULL) { - *error_str= "Need 2 selected sequence strips"; - return 0; - } - if (seq3 == NULL) seq3= seq2; + switch (get_sequence_effect_num_inputs(type)) { + case 0: + *selseq1 = *selseq2 = *selseq3 = NULL; + return 1; /* succsess */ + case 1: + if (seq2 == NULL) { + *error_str = "Need at least one selected sequence strip"; + return 0; + } + if (seq1 == NULL) seq1 = seq2; + if (seq3 == NULL) seq3 = seq2; + case 2: + if (seq1 == NULL || seq2 == NULL) { + *error_str = "Need 2 selected sequence strips"; + return 0; + } + if (seq3 == NULL) seq3 = seq2; } - if (seq1==NULL && seq2==NULL && seq3==NULL) { - *error_str= "TODO: in what cases does this happen?"; + if (seq1 == NULL && seq2 == NULL && seq3 == NULL) { + *error_str = "TODO: in what cases does this happen?"; return 0; } - *selseq1= seq1; - *selseq2= seq2; - *selseq3= seq3; + *selseq1 = seq1; + *selseq2 = seq2; + *selseq3 = seq3; return 1; } @@ -564,23 +565,23 @@ static Sequence *del_seq_find_replace_recurs(Scene *scene, Sequence *seq) if (!seq) return NULL; else if (!(seq->type & SEQ_EFFECT)) - return ((seq->flag & SELECT)? NULL: seq); + return ((seq->flag & SELECT) ? NULL : seq); else if (!(seq->flag & SELECT)) { /* try to find replacement for effect inputs */ - seq1= del_seq_find_replace_recurs(scene, seq->seq1); - seq2= del_seq_find_replace_recurs(scene, seq->seq2); - seq3= del_seq_find_replace_recurs(scene, seq->seq3); + seq1 = del_seq_find_replace_recurs(scene, seq->seq1); + seq2 = del_seq_find_replace_recurs(scene, seq->seq2); + seq3 = del_seq_find_replace_recurs(scene, seq->seq3); - if (seq1==seq->seq1 && seq2==seq->seq2 && seq3==seq->seq3); + if (seq1 == seq->seq1 && seq2 == seq->seq2 && seq3 == seq->seq3) ; else if (seq1 || seq2 || seq3) { - seq->seq1= (seq1)? seq1: (seq2)? seq2: seq3; - seq->seq2= (seq2)? seq2: (seq1)? seq1: seq3; - seq->seq3= (seq3)? seq3: (seq1)? seq1: seq2; + seq->seq1 = (seq1) ? seq1 : (seq2) ? seq2 : seq3; + seq->seq2 = (seq2) ? seq2 : (seq1) ? seq1 : seq3; + seq->seq3 = (seq3) ? seq3 : (seq1) ? seq1 : seq2; update_changed_seq_and_deps(scene, seq, 1, 1); } else - seq->flag |= SELECT; /* mark for delete */ + seq->flag |= SELECT; /* mark for delete */ } if (seq->flag & SELECT) { @@ -598,63 +599,63 @@ static void recurs_del_seq_flag(Scene *scene, ListBase *lb, short flag, short de Sequence *seq, *seqn; Sequence *last_seq = seq_active_get(scene); - seq= lb->first; + seq = lb->first; while (seq) { - seqn= seq->next; + seqn = seq->next; if ((seq->flag & flag) || deleteall) { BLI_remlink(lb, seq); - if (seq==last_seq) seq_active_set(scene, NULL); - if (seq->type==SEQ_META) recurs_del_seq_flag(scene, &seq->seqbase, flag, 1); + if (seq == last_seq) seq_active_set(scene, NULL); + if (seq->type == SEQ_META) recurs_del_seq_flag(scene, &seq->seqbase, flag, 1); seq_free_sequence(scene, seq); } - seq= seqn; + seq = seqn; } } -static Sequence *cut_seq_hard(Scene *scene, Sequence * seq, int cutframe) +static Sequence *cut_seq_hard(Scene *scene, Sequence *seq, int cutframe) { TransSeq ts; Sequence *seqn = NULL; int skip_dup = FALSE; /* backup values */ - ts.start= seq->start; - ts.machine= seq->machine; - ts.startstill= seq->startstill; - ts.endstill= seq->endstill; - ts.startdisp= seq->startdisp; - ts.enddisp= seq->enddisp; - ts.startofs= seq->startofs; - ts.endofs= seq->endofs; - ts.anim_startofs= seq->anim_startofs; - ts.anim_endofs= seq->anim_endofs; - ts.len= seq->len; + ts.start = seq->start; + ts.machine = seq->machine; + ts.startstill = seq->startstill; + ts.endstill = seq->endstill; + ts.startdisp = seq->startdisp; + ts.enddisp = seq->enddisp; + ts.startofs = seq->startofs; + ts.endofs = seq->endofs; + ts.anim_startofs = seq->anim_startofs; + ts.anim_endofs = seq->anim_endofs; + ts.len = seq->len; /* First Strip! */ /* strips with extended stillfames before */ - if ((seq->startstill) && (cutframe start)) { + if ((seq->startstill) && (cutframe < seq->start)) { /* don't do funny things with METAs ... */ if (seq->type == SEQ_META) { skip_dup = TRUE; seq->startstill = seq->start - cutframe; } else { - seq->start= cutframe -1; - seq->startstill= cutframe -seq->startdisp -1; + seq->start = cutframe - 1; + seq->startstill = cutframe - seq->startdisp - 1; seq->anim_endofs += seq->len - 1; - seq->endstill= 0; + seq->endstill = 0; } } /* normal strip */ - else if ((cutframe >=seq->start)&&(cutframe <=(seq->start+seq->len))) { + else if ((cutframe >= seq->start) && (cutframe <= (seq->start + seq->len))) { seq->endofs = 0; seq->endstill = 0; - seq->anim_endofs += (seq->start+seq->len) - cutframe; + seq->anim_endofs += (seq->start + seq->len) - cutframe; } /* strips with extended stillframes after */ - else if (((seq->start+seq->len) < cutframe) && (seq->endstill)) { + else if (((seq->start + seq->len) < cutframe) && (seq->endstill)) { seq->endstill -= seq->enddisp - cutframe; /* don't do funny things with METAs ... */ if (seq->type == SEQ_META) { @@ -677,13 +678,13 @@ static Sequence *cut_seq_hard(Scene *scene, Sequence * seq, int cutframe) /* strips with extended stillframes before */ if ((seqn->startstill) && (cutframe == seqn->start + 1)) { seqn->start = ts.start; - seqn->startstill= ts.start- cutframe; + seqn->startstill = ts.start - cutframe; seqn->anim_endofs = ts.anim_endofs; seqn->endstill = ts.endstill; } /* normal strip */ - else if ((cutframe>=seqn->start)&&(cutframe<=(seqn->start+seqn->len))) { + else if ((cutframe >= seqn->start) && (cutframe <= (seqn->start + seqn->len))) { seqn->start = cutframe; seqn->startstill = 0; seqn->startofs = 0; @@ -694,11 +695,11 @@ static Sequence *cut_seq_hard(Scene *scene, Sequence * seq, int cutframe) } /* strips with extended stillframes after */ - else if (((seqn->start+seqn->len) < cutframe) && (seqn->endstill)) { + else if (((seqn->start + seqn->len) < cutframe) && (seqn->endstill)) { seqn->start = cutframe; seqn->startofs = 0; - seqn->anim_startofs += ts.len-1; - seqn->endstill = ts.enddisp - cutframe -1; + seqn->anim_startofs += ts.len - 1; + seqn->endstill = ts.enddisp - cutframe - 1; seqn->startstill = 0; } @@ -708,47 +709,47 @@ static Sequence *cut_seq_hard(Scene *scene, Sequence * seq, int cutframe) return seqn; } -static Sequence *cut_seq_soft(Scene *scene, Sequence * seq, int cutframe) +static Sequence *cut_seq_soft(Scene *scene, Sequence *seq, int cutframe) { TransSeq ts; Sequence *seqn = NULL; int skip_dup = FALSE; /* backup values */ - ts.start= seq->start; - ts.machine= seq->machine; - ts.startstill= seq->startstill; - ts.endstill= seq->endstill; - ts.startdisp= seq->startdisp; - ts.enddisp= seq->enddisp; - ts.startofs= seq->startofs; - ts.endofs= seq->endofs; - ts.anim_startofs= seq->anim_startofs; - ts.anim_endofs= seq->anim_endofs; - ts.len= seq->len; + ts.start = seq->start; + ts.machine = seq->machine; + ts.startstill = seq->startstill; + ts.endstill = seq->endstill; + ts.startdisp = seq->startdisp; + ts.enddisp = seq->enddisp; + ts.startofs = seq->startofs; + ts.endofs = seq->endofs; + ts.anim_startofs = seq->anim_startofs; + ts.anim_endofs = seq->anim_endofs; + ts.len = seq->len; /* First Strip! */ /* strips with extended stillfames before */ - if ((seq->startstill) && (cutframe start)) { + if ((seq->startstill) && (cutframe < seq->start)) { /* don't do funny things with METAs ... */ if (seq->type == SEQ_META) { skip_dup = TRUE; seq->startstill = seq->start - cutframe; } else { - seq->start= cutframe -1; - seq->startstill= cutframe -seq->startdisp -1; + seq->start = cutframe - 1; + seq->startstill = cutframe - seq->startdisp - 1; seq->endofs = seq->len - 1; - seq->endstill= 0; + seq->endstill = 0; } } /* normal strip */ - else if ((cutframe >=seq->start)&&(cutframe <=(seq->start+seq->len))) { - seq->endofs = (seq->start+seq->len) - cutframe; + else if ((cutframe >= seq->start) && (cutframe <= (seq->start + seq->len))) { + seq->endofs = (seq->start + seq->len) - cutframe; } /* strips with extended stillframes after */ - else if (((seq->start+seq->len) < cutframe) && (seq->endstill)) { + else if (((seq->start + seq->len) < cutframe) && (seq->endstill)) { seq->endstill -= seq->enddisp - cutframe; /* don't do funny things with METAs ... */ if (seq->type == SEQ_META) { @@ -770,13 +771,13 @@ static Sequence *cut_seq_soft(Scene *scene, Sequence * seq, int cutframe) /* strips with extended stillframes before */ if ((seqn->startstill) && (cutframe == seqn->start + 1)) { seqn->start = ts.start; - seqn->startstill= ts.start- cutframe; + seqn->startstill = ts.start - cutframe; seqn->endofs = ts.endofs; seqn->endstill = ts.endstill; } /* normal strip */ - else if ((cutframe>=seqn->start)&&(cutframe<=(seqn->start+seqn->len))) { + else if ((cutframe >= seqn->start) && (cutframe <= (seqn->start + seqn->len))) { seqn->startstill = 0; seqn->startofs = cutframe - ts.start; seqn->endofs = ts.endofs; @@ -784,10 +785,10 @@ static Sequence *cut_seq_soft(Scene *scene, Sequence * seq, int cutframe) } /* strips with extended stillframes after */ - else if (((seqn->start+seqn->len) < cutframe) && (seqn->endstill)) { - seqn->start = cutframe - ts.len +1; - seqn->startofs = ts.len-1; - seqn->endstill = ts.enddisp - cutframe -1; + else if (((seqn->start + seqn->len) < cutframe) && (seqn->endstill)) { + seqn->start = cutframe - ts.len + 1; + seqn->startofs = ts.len - 1; + seqn->endstill = ts.enddisp - cutframe - 1; seqn->startstill = 0; } @@ -800,21 +801,22 @@ static Sequence *cut_seq_soft(Scene *scene, Sequence * seq, int cutframe) /* like duplicate, but only duplicate and cut overlapping strips, * strips to the left of the cutframe are ignored and strips to the right are moved into the new list */ static int cut_seq_list(Scene *scene, ListBase *old, ListBase *new, int cutframe, - Sequence * (*cut_seq)(Scene *, Sequence *, int)) + Sequence * (*cut_seq)(Scene *, Sequence *, int)) { int did_something = FALSE; Sequence *seq, *seq_next_iter; - seq= old->first; + seq = old->first; while (seq) { seq_next_iter = seq->next; /* we need this because we may remove seq */ - seq->tmp= NULL; + seq->tmp = NULL; if (seq->flag & SELECT) { if (cutframe > seq->startdisp && - cutframe < seq->enddisp) { - Sequence * seqn = cut_seq(scene, seq, cutframe); + cutframe < seq->enddisp) + { + Sequence *seqn = cut_seq(scene, seq, cutframe); if (seqn) { BLI_addtail(new, seqn); } @@ -837,18 +839,18 @@ static int cut_seq_list(Scene *scene, ListBase *old, ListBase *new, int cutframe static int insert_gap(Scene *scene, int gap, int cfra) { Sequence *seq; - Editing *ed= seq_give_editing(scene, FALSE); - int done=0; + Editing *ed = seq_give_editing(scene, FALSE); + int done = 0; /* all strips >= cfra are shifted */ - if (ed==NULL) return 0; + if (ed == NULL) return 0; SEQP_BEGIN(ed, seq) { if (seq->startdisp >= cfra) { - seq->start+= gap; + seq->start += gap; calc_sequence(scene, seq); - done= 1; + done = 1; } } SEQ_END @@ -856,23 +858,24 @@ static int insert_gap(Scene *scene, int gap, int cfra) return done; } -static void UNUSED_FUNCTION(touch_seq_files)(Scene *scene) +static void UNUSED_FUNCTION(touch_seq_files) (Scene * scene) { Sequence *seq; - Editing *ed= seq_give_editing(scene, FALSE); + Editing *ed = seq_give_editing(scene, FALSE); char str[256]; /* touch all strips with movies */ - if (ed==NULL) return; + if (ed == NULL) return; // XXX25 if (okee("Touch and print selected movies")==0) return; WM_cursor_wait(1); - SEQP_BEGIN(ed, seq) { + SEQP_BEGIN(ed, seq) + { if (seq->flag & SELECT) { - if (seq->type==SEQ_MOVIE) { + if (seq->type == SEQ_MOVIE) { if (seq->strip && seq->strip->stripdata) { BLI_make_file_string(G.main->name, str, seq->strip->dir, seq->strip->stripdata->name); BLI_file_touch(seq->name); @@ -890,16 +893,17 @@ static void UNUSED_FUNCTION(touch_seq_files)(Scene *scene) static void set_filter_seq(Scene *scene) { Sequence *seq; - Editing *ed= seq_give_editing(scene, FALSE); + Editing *ed = seq_give_editing(scene, FALSE); - if (ed==NULL) return; + if (ed == NULL) return; - if (okee("Set Deinterlace")==0) return; + if (okee("Set Deinterlace") == 0) return; - SEQP_BEGIN(ed, seq) { + SEQP_BEGIN(ed, seq) + { if (seq->flag & SELECT) { - if (seq->type==SEQ_MOVIE) { + if (seq->type == SEQ_MOVIE) { seq->flag |= SEQ_FILTERY; reload_sequence_new_file(scene, seq, FALSE); calc_sequence(scene, seq); @@ -911,14 +915,14 @@ static void set_filter_seq(Scene *scene) } #endif -static void UNUSED_FUNCTION(seq_remap_paths)(Scene *scene) +static void UNUSED_FUNCTION(seq_remap_paths) (Scene * scene) { Sequence *seq, *last_seq = seq_active_get(scene); - Editing *ed= seq_give_editing(scene, FALSE); + Editing *ed = seq_give_editing(scene, FALSE); char from[FILE_MAX], to[FILE_MAX], stripped[FILE_MAX]; - if (last_seq==NULL) + if (last_seq == NULL) return; BLI_strncpy(from, last_seq->strip->dir, sizeof(from)); @@ -929,16 +933,17 @@ static void UNUSED_FUNCTION(seq_remap_paths)(Scene *scene) // XXX if (0==sbutton(to, 0, sizeof(to)-1, "To: ")) // return; - if (strcmp(to, from)==0) + if (strcmp(to, from) == 0) return; - SEQP_BEGIN(ed, seq) { + SEQP_BEGIN(ed, seq) + { if (seq->flag & SELECT) { - if (strncmp(seq->strip->dir, from, strlen(from))==0) { + if (strncmp(seq->strip->dir, from, strlen(from)) == 0) { printf("found %s\n", seq->strip->dir); /* strip off the beginning */ - stripped[0]= 0; + stripped[0] = 0; BLI_strncpy(stripped, seq->strip->dir + strlen(from), FILE_MAX); /* new path */ @@ -952,25 +957,25 @@ static void UNUSED_FUNCTION(seq_remap_paths)(Scene *scene) } -static void UNUSED_FUNCTION(no_gaps)(Scene *scene) +static void UNUSED_FUNCTION(no_gaps) (Scene * scene) { - Editing *ed= seq_give_editing(scene, FALSE); - int cfra, first= 0, done; + Editing *ed = seq_give_editing(scene, FALSE); + int cfra, first = 0, done; - if (ed==NULL) return; + if (ed == NULL) return; - for (cfra= CFRA; cfra<=EFRA; cfra++) { - if (first==0) { - if ( evaluate_seq_frame(scene, cfra) ) first= 1; + for (cfra = CFRA; cfra <= EFRA; cfra++) { + if (first == 0) { + if (evaluate_seq_frame(scene, cfra) ) first = 1; } else { - done= 1; - while ( evaluate_seq_frame(scene, cfra) == 0) { - done= insert_gap(scene, -1, cfra); - if (done==0) break; + done = 1; + while (evaluate_seq_frame(scene, cfra) == 0) { + done = insert_gap(scene, -1, cfra); + if (done == 0) break; } - if (done==0) break; + if (done == 0) break; } } @@ -1001,20 +1006,20 @@ int sequencer_edit_poll(bContext *C) int sequencer_strip_poll(bContext *C) { Editing *ed; - return (((ed= seq_give_editing(CTX_data_scene(C), FALSE)) != NULL) && (ed->act_seq != NULL)); + return (((ed = seq_give_editing(CTX_data_scene(C), FALSE)) != NULL) && (ed->act_seq != NULL)); } int sequencer_strip_has_path_poll(bContext *C) { Editing *ed; Sequence *seq; - return (((ed= seq_give_editing(CTX_data_scene(C), FALSE)) != NULL) && ((seq= ed->act_seq) != NULL) && (SEQ_HAS_PATH(seq))); + return (((ed = seq_give_editing(CTX_data_scene(C), FALSE)) != NULL) && ((seq = ed->act_seq) != NULL) && (SEQ_HAS_PATH(seq))); } int sequencer_view_poll(bContext *C) { - SpaceSeq *sseq= CTX_wm_space_seq(C); - Editing *ed= seq_give_editing(CTX_data_scene(C), FALSE); + SpaceSeq *sseq = CTX_wm_space_seq(C); + Editing *ed = seq_give_editing(CTX_data_scene(C), FALSE); if (ed && sseq && (sseq->mainb == SEQ_DRAW_IMG_IMBUF)) return 1; @@ -1024,23 +1029,24 @@ int sequencer_view_poll(bContext *C) /* snap operator*/ static int sequencer_snap_exec(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); - Editing *ed= seq_give_editing(scene, FALSE); + Editing *ed = seq_give_editing(scene, FALSE); Sequence *seq; int snap_frame; - snap_frame= RNA_int_get(op->ptr, "frame"); + snap_frame = RNA_int_get(op->ptr, "frame"); /* also check metas */ - for (seq= ed->seqbasep->first; seq; seq= seq->next) { - if (seq->flag & SELECT && !(seq->depth==0 && seq->flag & SEQ_LOCK) && - seq_tx_test(seq)) { - if ((seq->flag & (SEQ_LEFTSEL+SEQ_RIGHTSEL))==0) { + for (seq = ed->seqbasep->first; seq; seq = seq->next) { + if (seq->flag & SELECT && !(seq->depth == 0 && seq->flag & SEQ_LOCK) && + seq_tx_test(seq)) + { + if ((seq->flag & (SEQ_LEFTSEL + SEQ_RIGHTSEL)) == 0) { /* simple but no anim update */ /* seq->start= snap_frame-seq->startofs+seq->startstill; */ - seq_translate(scene, seq, (snap_frame-seq->startofs+seq->startstill) - seq->start); + seq_translate(scene, seq, (snap_frame - seq->startofs + seq->startstill) - seq->start); } else { if (seq->flag & SEQ_LEFTSEL) { @@ -1057,10 +1063,10 @@ static int sequencer_snap_exec(bContext *C, wmOperator *op) /* test for effects and overlap * don't use SEQP_BEGIN since that would be recursive */ - for (seq= ed->seqbasep->first; seq; seq= seq->next) { - if (seq->flag & SELECT && !(seq->depth==0 && seq->flag & SEQ_LOCK)) { + for (seq = ed->seqbasep->first; seq; seq = seq->next) { + if (seq->flag & SELECT && !(seq->depth == 0 && seq->flag & SEQ_LOCK)) { seq->flag &= ~SEQ_OVERLAP; - if ( seq_test_overlap(ed->seqbasep, seq) ) { + if (seq_test_overlap(ed->seqbasep, seq) ) { shuffle_seq(ed->seqbasep, seq, scene); } } @@ -1077,7 +1083,7 @@ static int sequencer_snap_exec(bContext *C, wmOperator *op) /* as last: */ sort_seq(scene); - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; } @@ -1088,7 +1094,7 @@ static int sequencer_snap_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(ev int snap_frame; - snap_frame= CFRA; + snap_frame = CFRA; RNA_int_set(op->ptr, "frame", snap_frame); return sequencer_snap_exec(C, op); @@ -1107,7 +1113,7 @@ void SEQUENCER_OT_snap(struct wmOperatorType *ot) ot->poll = sequencer_edit_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; RNA_def_int(ot->srna, "frame", 0, INT_MIN, INT_MAX, "Frame", "Frame where selected strips will be snapped", INT_MIN, INT_MAX); } @@ -1115,28 +1121,28 @@ void SEQUENCER_OT_snap(struct wmOperatorType *ot) /* mute operator */ static int sequencer_mute_exec(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); - Editing *ed= seq_give_editing(scene, FALSE); + Scene *scene = CTX_data_scene(C); + Editing *ed = seq_give_editing(scene, FALSE); Sequence *seq; int selected; - selected= !RNA_boolean_get(op->ptr, "unselected"); + selected = !RNA_boolean_get(op->ptr, "unselected"); - for (seq= ed->seqbasep->first; seq; seq= seq->next) { - if ((seq->flag & SEQ_LOCK)==0) { + for (seq = ed->seqbasep->first; seq; seq = seq->next) { + if ((seq->flag & SEQ_LOCK) == 0) { if (selected) { /* mute unselected */ if (seq->flag & SELECT) seq->flag |= SEQ_MUTE; } else { - if ((seq->flag & SELECT)==0) + if ((seq->flag & SELECT) == 0) seq->flag |= SEQ_MUTE; } } } seq_update_muting(ed); - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; } @@ -1153,7 +1159,7 @@ void SEQUENCER_OT_mute(struct wmOperatorType *ot) ot->poll = sequencer_edit_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Mute unselected rather than selected strips"); } @@ -1162,28 +1168,28 @@ void SEQUENCER_OT_mute(struct wmOperatorType *ot) /* unmute operator */ static int sequencer_unmute_exec(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); - Editing *ed= seq_give_editing(scene, FALSE); + Scene *scene = CTX_data_scene(C); + Editing *ed = seq_give_editing(scene, FALSE); Sequence *seq; int selected; - selected= !RNA_boolean_get(op->ptr, "unselected"); + selected = !RNA_boolean_get(op->ptr, "unselected"); - for (seq= ed->seqbasep->first; seq; seq= seq->next) { - if ((seq->flag & SEQ_LOCK)==0) { + for (seq = ed->seqbasep->first; seq; seq = seq->next) { + if ((seq->flag & SEQ_LOCK) == 0) { if (selected) { /* unmute unselected */ if (seq->flag & SELECT) seq->flag &= ~SEQ_MUTE; } else { - if ((seq->flag & SELECT)==0) + if ((seq->flag & SELECT) == 0) seq->flag &= ~SEQ_MUTE; } } } seq_update_muting(ed); - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; } @@ -1200,7 +1206,7 @@ void SEQUENCER_OT_unmute(struct wmOperatorType *ot) ot->poll = sequencer_edit_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "UnMute unselected rather than selected strips"); } @@ -1209,17 +1215,17 @@ void SEQUENCER_OT_unmute(struct wmOperatorType *ot) /* lock operator */ static int sequencer_lock_exec(bContext *C, wmOperator *UNUSED(op)) { - Scene *scene= CTX_data_scene(C); - Editing *ed= seq_give_editing(scene, FALSE); + Scene *scene = CTX_data_scene(C); + Editing *ed = seq_give_editing(scene, FALSE); Sequence *seq; - for (seq= ed->seqbasep->first; seq; seq= seq->next) { + for (seq = ed->seqbasep->first; seq; seq = seq->next) { if (seq->flag & SELECT) { seq->flag |= SEQ_LOCK; } } - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; } @@ -1236,23 +1242,23 @@ void SEQUENCER_OT_lock(struct wmOperatorType *ot) ot->poll = sequencer_edit_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /* unlock operator */ static int sequencer_unlock_exec(bContext *C, wmOperator *UNUSED(op)) { - Scene *scene= CTX_data_scene(C); - Editing *ed= seq_give_editing(scene, FALSE); + Scene *scene = CTX_data_scene(C); + Editing *ed = seq_give_editing(scene, FALSE); Sequence *seq; - for (seq= ed->seqbasep->first; seq; seq= seq->next) { + for (seq = ed->seqbasep->first; seq; seq = seq->next) { if (seq->flag & SELECT) { seq->flag &= ~SEQ_LOCK; } } - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; } @@ -1269,18 +1275,18 @@ void SEQUENCER_OT_unlock(struct wmOperatorType *ot) ot->poll = sequencer_edit_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /* reload operator */ static int sequencer_reload_exec(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); - Editing *ed= seq_give_editing(scene, FALSE); + Scene *scene = CTX_data_scene(C); + Editing *ed = seq_give_editing(scene, FALSE); Sequence *seq; - int adjust_length= RNA_boolean_get(op->ptr, "adjust_length"); + int adjust_length = RNA_boolean_get(op->ptr, "adjust_length"); - for (seq= ed->seqbasep->first; seq; seq= seq->next) { + for (seq = ed->seqbasep->first; seq; seq = seq->next) { if (seq->flag & SELECT) { update_changed_seq_and_deps(scene, seq, 0, 1); reload_sequence_new_file(scene, seq, !adjust_length); @@ -1292,7 +1298,7 @@ static int sequencer_reload_exec(bContext *C, wmOperator *op) } } - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; } @@ -1320,12 +1326,12 @@ void SEQUENCER_OT_reload(struct wmOperatorType *ot) /* reload operator */ static int sequencer_refresh_all_exec(bContext *C, wmOperator *UNUSED(op)) { - Scene *scene= CTX_data_scene(C); - Editing *ed= seq_give_editing(scene, FALSE); + Scene *scene = CTX_data_scene(C); + Editing *ed = seq_give_editing(scene, FALSE); free_imbuf_seq(scene, &ed->seqbase, FALSE, FALSE); - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; } @@ -1344,7 +1350,7 @@ void SEQUENCER_OT_refresh_all(struct wmOperatorType *ot) static int sequencer_reassign_inputs_exec(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); Sequence *seq1, *seq2, *seq3, *last_seq = seq_active_get(scene); const char *error_msg; @@ -1353,10 +1359,10 @@ static int sequencer_reassign_inputs_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } /* see reassigning would create a cycle */ - if ( seq_is_predecessor(seq1, last_seq) || - seq_is_predecessor(seq2, last_seq) || - seq_is_predecessor(seq3, last_seq) - ) { + if (seq_is_predecessor(seq1, last_seq) || + seq_is_predecessor(seq2, last_seq) || + seq_is_predecessor(seq3, last_seq) + ) { BKE_report(op->reports, RPT_ERROR, "Can't reassign inputs: no cycles allowed"); return OPERATOR_CANCELLED; } @@ -1367,18 +1373,18 @@ static int sequencer_reassign_inputs_exec(bContext *C, wmOperator *op) update_changed_seq_and_deps(scene, last_seq, 1, 1); - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; } static int sequencer_effect_poll(bContext *C) { - Scene *scene= CTX_data_scene(C); - Editing *ed= seq_give_editing(scene, FALSE); + Scene *scene = CTX_data_scene(C); + Editing *ed = seq_give_editing(scene, FALSE); if (ed) { - Sequence *last_seq= seq_active_get(scene); + Sequence *last_seq = seq_active_get(scene); if (last_seq && (last_seq->type & SEQ_EFFECT)) { return 1; } @@ -1399,16 +1405,16 @@ void SEQUENCER_OT_reassign_inputs(struct wmOperatorType *ot) ot->poll = sequencer_effect_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } static int sequencer_swap_inputs_exec(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); Sequence *seq, *last_seq = seq_active_get(scene); - if (last_seq->seq1==NULL || last_seq->seq2 == NULL) { + if (last_seq->seq1 == NULL || last_seq->seq2 == NULL) { BKE_report(op->reports, RPT_ERROR, "No valid inputs to swap"); return OPERATOR_CANCELLED; } @@ -1419,7 +1425,7 @@ static int sequencer_swap_inputs_exec(bContext *C, wmOperator *op) update_changed_seq_and_deps(scene, last_seq, 1, 1); - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; } @@ -1435,7 +1441,7 @@ void SEQUENCER_OT_swap_inputs(struct wmOperatorType *ot) ot->poll = sequencer_effect_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } @@ -1448,20 +1454,20 @@ static EnumPropertyItem prop_cut_types[] = { static int sequencer_cut_exec(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); - Editing *ed= seq_give_editing(scene, FALSE); + Scene *scene = CTX_data_scene(C); + Editing *ed = seq_give_editing(scene, FALSE); int cut_side, cut_hard, cut_frame; ListBase newlist; int changed; - cut_frame= RNA_int_get(op->ptr, "frame"); - cut_hard= RNA_enum_get(op->ptr, "type"); - cut_side= RNA_enum_get(op->ptr, "side"); + cut_frame = RNA_int_get(op->ptr, "frame"); + cut_hard = RNA_enum_get(op->ptr, "type"); + cut_side = RNA_enum_get(op->ptr, "side"); - newlist.first= newlist.last= NULL; + newlist.first = newlist.last = NULL; - if (cut_hard==SEQ_CUT_HARD) { + if (cut_hard == SEQ_CUT_HARD) { changed = cut_seq_list(scene, ed->seqbasep, &newlist, cut_frame, cut_seq_hard); } else { @@ -1474,13 +1480,13 @@ static int sequencer_cut_exec(bContext *C, wmOperator *op) if (cut_side != SEQ_SIDE_BOTH) { SEQP_BEGIN(ed, seq) { - if (cut_side==SEQ_SIDE_LEFT) { - if ( seq->startdisp >= cut_frame ) { + if (cut_side == SEQ_SIDE_LEFT) { + if (seq->startdisp >= cut_frame) { seq->flag &= ~SEQ_ALLSEL; } } else { - if ( seq->enddisp <= cut_frame ) { + if (seq->enddisp <= cut_frame) { seq->flag &= ~SEQ_ALLSEL; } } @@ -1492,7 +1498,7 @@ static int sequencer_cut_exec(bContext *C, wmOperator *op) } if (changed) { - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; } else { @@ -1504,13 +1510,13 @@ static int sequencer_cut_exec(bContext *C, wmOperator *op) static int sequencer_cut_invoke(bContext *C, wmOperator *op, wmEvent *event) { Scene *scene = CTX_data_scene(C); - View2D *v2d= UI_view2d_fromcontext(C); + View2D *v2d = UI_view2d_fromcontext(C); - int cut_side= SEQ_SIDE_BOTH; - int cut_frame= CFRA; + int cut_side = SEQ_SIDE_BOTH; + int cut_frame = CFRA; if (ED_operator_sequencer_active(C) && v2d) - cut_side= mouse_frame_side(v2d, event->mval[0], cut_frame); + cut_side = mouse_frame_side(v2d, event->mval[0], cut_frame); RNA_int_set(op->ptr, "frame", cut_frame); RNA_enum_set(op->ptr, "side", cut_side); @@ -1533,7 +1539,7 @@ void SEQUENCER_OT_cut(struct wmOperatorType *ot) ot->poll = sequencer_edit_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; RNA_def_int(ot->srna, "frame", 0, INT_MIN, INT_MAX, "Frame", "Frame where selected strips will be cut", INT_MIN, INT_MAX); RNA_def_enum(ot->srna, "type", prop_cut_types, SEQ_CUT_SOFT, "Type", "The type of cut operation to perform on strips"); @@ -1543,37 +1549,37 @@ void SEQUENCER_OT_cut(struct wmOperatorType *ot) /* duplicate operator */ static int apply_unique_name_cb(Sequence *seq, void *arg_pt) { - Scene *scene= (Scene *)arg_pt; - char name[sizeof(seq->name)-2]; + Scene *scene = (Scene *)arg_pt; + char name[sizeof(seq->name) - 2]; - strcpy(name, seq->name+2); + strcpy(name, seq->name + 2); seqbase_unique_name_recursive(&scene->ed->seqbase, seq); - seq_dupe_animdata(scene, name, seq->name+2); + seq_dupe_animdata(scene, name, seq->name + 2); return 1; } static int sequencer_add_duplicate_exec(bContext *C, wmOperator *UNUSED(op)) { - Scene *scene= CTX_data_scene(C); - Editing *ed= seq_give_editing(scene, FALSE); + Scene *scene = CTX_data_scene(C); + Editing *ed = seq_give_editing(scene, FALSE); - ListBase nseqbase= {NULL, NULL}; + ListBase nseqbase = {NULL, NULL}; - if (ed==NULL) + if (ed == NULL) return OPERATOR_CANCELLED; seqbase_dupli_recursive(scene, NULL, &nseqbase, ed->seqbasep, SEQ_DUPE_CONTEXT); if (nseqbase.first) { - Sequence * seq= nseqbase.first; + Sequence *seq = nseqbase.first; /* rely on the nseqbase list being added at the end */ BLI_movelisttolist(ed->seqbasep, &nseqbase); - for ( ; seq; seq= seq->next) + for (; seq; seq = seq->next) seq_recursive_apply(seq, apply_unique_name_cb, scene); - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; } @@ -1603,7 +1609,7 @@ void SEQUENCER_OT_duplicate(wmOperatorType *ot) ot->poll = ED_operator_sequencer_active; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* to give to transform */ RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, "Mode", ""); @@ -1612,13 +1618,13 @@ void SEQUENCER_OT_duplicate(wmOperatorType *ot) /* delete operator */ static int sequencer_delete_exec(bContext *C, wmOperator *UNUSED(op)) { - Scene *scene= CTX_data_scene(C); - Editing *ed= seq_give_editing(scene, FALSE); + Scene *scene = CTX_data_scene(C); + Editing *ed = seq_give_editing(scene, FALSE); Sequence *seq; MetaStack *ms; int nothingSelected = TRUE; - seq=seq_active_get(scene); + seq = seq_active_get(scene); if (seq && seq->flag & SELECT) { /* avoid a loop since this is likely to be selected */ nothingSelected = FALSE; } @@ -1635,7 +1641,7 @@ static int sequencer_delete_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; /* for effects, try to find a replacement input */ - for (seq=ed->seqbasep->first; seq; seq=seq->next) + for (seq = ed->seqbasep->first; seq; seq = seq->next) if ((seq->type & SEQ_EFFECT) && !(seq->flag & SELECT)) del_seq_find_replace_recurs(scene, seq); @@ -1643,20 +1649,20 @@ static int sequencer_delete_exec(bContext *C, wmOperator *UNUSED(op)) recurs_del_seq_flag(scene, ed->seqbasep, SELECT, 0); /* updates lengths etc */ - seq= ed->seqbasep->first; + seq = ed->seqbasep->first; while (seq) { calc_sequence(scene, seq); - seq= seq->next; + seq = seq->next; } /* free parent metas */ - ms= ed->metastack.last; + ms = ed->metastack.last; while (ms) { calc_sequence(scene, ms->parseq); - ms= ms->prev; + ms = ms->prev; } - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; } @@ -1676,40 +1682,40 @@ void SEQUENCER_OT_delete(wmOperatorType *ot) ot->poll = sequencer_edit_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /* offset clear operator */ static int sequencer_offset_clear_exec(bContext *C, wmOperator *UNUSED(op)) { - Scene *scene= CTX_data_scene(C); - Editing *ed= seq_give_editing(scene, FALSE); + Scene *scene = CTX_data_scene(C); + Editing *ed = seq_give_editing(scene, FALSE); Sequence *seq; /* for effects, try to find a replacement input */ - for (seq=ed->seqbasep->first; seq; seq=seq->next) { - if ((seq->type & SEQ_EFFECT)==0 && (seq->flag & SELECT)) { - seq->startofs= seq->endofs= seq->startstill= seq->endstill= 0; + for (seq = ed->seqbasep->first; seq; seq = seq->next) { + if ((seq->type & SEQ_EFFECT) == 0 && (seq->flag & SELECT)) { + seq->startofs = seq->endofs = seq->startstill = seq->endstill = 0; } } /* updates lengths etc */ - seq= ed->seqbasep->first; + seq = ed->seqbasep->first; while (seq) { calc_sequence(scene, seq); - seq= seq->next; + seq = seq->next; } - for (seq=ed->seqbasep->first; seq; seq=seq->next) { - if ((seq->type & SEQ_EFFECT)==0 && (seq->flag & SELECT)) { + for (seq = ed->seqbasep->first; seq; seq = seq->next) { + if ((seq->type & SEQ_EFFECT) == 0 && (seq->flag & SELECT)) { if (seq_test_overlap(ed->seqbasep, seq)) { shuffle_seq(ed->seqbasep, seq, scene); } } } - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; } @@ -1728,23 +1734,23 @@ void SEQUENCER_OT_offset_clear(wmOperatorType *ot) ot->poll = sequencer_edit_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /* separate_images operator */ static int sequencer_separate_images_exec(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); - Editing *ed= seq_give_editing(scene, FALSE); + Scene *scene = CTX_data_scene(C); + Editing *ed = seq_give_editing(scene, FALSE); Sequence *seq, *seq_new; Strip *strip_new; StripElem *se, *se_new; int start_ofs, cfra, frame_end; - int step= RNA_int_get(op->ptr, "length"); + int step = RNA_int_get(op->ptr, "length"); - seq= ed->seqbasep->first; /* poll checks this is valid */ + seq = ed->seqbasep->first; /* poll checks this is valid */ while (seq) { if ((seq->flag & SELECT) && (seq->type == SEQ_IMAGE) && (seq->len > 1)) { @@ -1761,20 +1767,20 @@ static int sequencer_separate_images_exec(bContext *C, wmOperator *op) /* new seq */ se = give_stripelem(seq, cfra); - seq_new= seq_dupli_recursive(scene, scene, seq, SEQ_DUPE_UNIQUE_NAME); + seq_new = seq_dupli_recursive(scene, scene, seq, SEQ_DUPE_UNIQUE_NAME); BLI_addtail(ed->seqbasep, seq_new); - seq_new->start= start_ofs; - seq_new->type= SEQ_IMAGE; + seq_new->start = start_ofs; + seq_new->type = SEQ_IMAGE; seq_new->len = 1; - seq_new->endstill = step-1; + seq_new->endstill = step - 1; /* new strip */ - strip_new= seq_new->strip; - strip_new->us= 1; + strip_new = seq_new->strip; + strip_new->us = 1; /* new stripdata */ - se_new= strip_new->stripdata; + se_new = strip_new->stripdata; BLI_strncpy(se_new->name, se->name, sizeof(se_new->name)); calc_sequence(scene, seq_new); @@ -1802,7 +1808,7 @@ static int sequencer_separate_images_exec(bContext *C, wmOperator *op) /* as last: */ sort_seq(scene); - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; } @@ -1820,7 +1826,7 @@ void SEQUENCER_OT_images_separate(wmOperatorType *ot) ot->poll = sequencer_edit_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; RNA_def_int(ot->srna, "length", 1, 1, 1000, "Length", "Length of each frame", 1, INT_MAX); } @@ -1831,19 +1837,19 @@ void SEQUENCER_OT_images_separate(wmOperatorType *ot) /* separate_meta_toggle operator */ static int sequencer_meta_toggle_exec(bContext *C, wmOperator *UNUSED(op)) { - Scene *scene= CTX_data_scene(C); - Editing *ed= seq_give_editing(scene, FALSE); - Sequence *last_seq= seq_active_get(scene); + Scene *scene = CTX_data_scene(C); + Editing *ed = seq_give_editing(scene, FALSE); + Sequence *last_seq = seq_active_get(scene); MetaStack *ms; - if (last_seq && last_seq->type==SEQ_META && last_seq->flag & SELECT) { + if (last_seq && last_seq->type == SEQ_META && last_seq->flag & SELECT) { /* Enter Metastrip */ - ms= MEM_mallocN(sizeof(MetaStack), "metastack"); + ms = MEM_mallocN(sizeof(MetaStack), "metastack"); BLI_addtail(&ed->metastack, ms); - ms->parseq= last_seq; - ms->oldbasep= ed->seqbasep; + ms->parseq = last_seq; + ms->oldbasep = ed->seqbasep; - ed->seqbasep= &last_seq->seqbase; + ed->seqbasep = &last_seq->seqbase; seq_active_set(scene, NULL); @@ -1853,16 +1859,16 @@ static int sequencer_meta_toggle_exec(bContext *C, wmOperator *UNUSED(op)) Sequence *seq; - if (ed->metastack.first==NULL) + if (ed->metastack.first == NULL) return OPERATOR_CANCELLED; - ms= ed->metastack.last; + ms = ed->metastack.last; BLI_remlink(&ed->metastack, ms); - ed->seqbasep= ms->oldbasep; + ed->seqbasep = ms->oldbasep; /* recalc all: the meta can have effects connected to it */ - for (seq= ed->seqbasep->first; seq; seq= seq->next) + for (seq = ed->seqbasep->first; seq; seq = seq->next) calc_sequence(scene, seq); seq_active_set(scene, ms->parseq); @@ -1875,7 +1881,7 @@ static int sequencer_meta_toggle_exec(bContext *C, wmOperator *UNUSED(op)) } seq_update_muting(ed); - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; } @@ -1892,56 +1898,56 @@ void SEQUENCER_OT_meta_toggle(wmOperatorType *ot) ot->poll = sequencer_edit_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /* separate_meta_make operator */ static int sequencer_meta_make_exec(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); - Editing *ed= seq_give_editing(scene, FALSE); + Scene *scene = CTX_data_scene(C); + Editing *ed = seq_give_editing(scene, FALSE); Sequence *seq, *seqm, *next, *last_seq = seq_active_get(scene); - int channel_max= 1; + int channel_max = 1; - if (seqbase_isolated_sel_check(ed->seqbasep)==FALSE) { + if (seqbase_isolated_sel_check(ed->seqbasep) == FALSE) { BKE_report(op->reports, RPT_ERROR, "Please select all related strips"); return OPERATOR_CANCELLED; } /* remove all selected from main list, and put in meta */ - seqm= alloc_sequence(ed->seqbasep, 1, 1); /* channel number set later */ - strcpy(seqm->name+2, "MetaStrip"); - seqm->type= SEQ_META; - seqm->flag= SELECT; + seqm = alloc_sequence(ed->seqbasep, 1, 1); /* channel number set later */ + strcpy(seqm->name + 2, "MetaStrip"); + seqm->type = SEQ_META; + seqm->flag = SELECT; - seq= ed->seqbasep->first; + seq = ed->seqbasep->first; while (seq) { - next= seq->next; - if (seq!=seqm && (seq->flag & SELECT)) { - channel_max= MAX2(seq->machine, channel_max); + next = seq->next; + if (seq != seqm && (seq->flag & SELECT)) { + channel_max = MAX2(seq->machine, channel_max); BLI_remlink(ed->seqbasep, seq); BLI_addtail(&seqm->seqbase, seq); } - seq= next; + seq = next; } - seqm->machine= last_seq ? last_seq->machine : channel_max; + seqm->machine = last_seq ? last_seq->machine : channel_max; calc_sequence(scene, seqm); - seqm->strip= MEM_callocN(sizeof(Strip), "metastrip"); - seqm->strip->us= 1; + seqm->strip = MEM_callocN(sizeof(Strip), "metastrip"); + seqm->strip->us = 1; seq_active_set(scene, seqm); - if ( seq_test_overlap(ed->seqbasep, seqm) ) shuffle_seq(ed->seqbasep, seqm, scene); + if (seq_test_overlap(ed->seqbasep, seqm) ) shuffle_seq(ed->seqbasep, seqm, scene); seq_update_muting(ed); seqbase_unique_name_recursive(&scene->ed->seqbase, seqm); - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; } @@ -1959,7 +1965,7 @@ void SEQUENCER_OT_meta_make(wmOperatorType *ot) ot->poll = sequencer_edit_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } @@ -1975,24 +1981,24 @@ static int seq_depends_on_meta(Sequence *seq, Sequence *seqm) /* separate_meta_make operator */ static int sequencer_meta_separate_exec(bContext *C, wmOperator *UNUSED(op)) { - Scene *scene= CTX_data_scene(C); - Editing *ed= seq_give_editing(scene, FALSE); + Scene *scene = CTX_data_scene(C); + Editing *ed = seq_give_editing(scene, FALSE); Sequence *seq, *last_seq = seq_active_get(scene); /* last_seq checks ed==NULL */ - if (last_seq==NULL || last_seq->type!=SEQ_META) + if (last_seq == NULL || last_seq->type != SEQ_META) return OPERATOR_CANCELLED; BLI_movelisttolist(ed->seqbasep, &last_seq->seqbase); - last_seq->seqbase.first= NULL; - last_seq->seqbase.last= NULL; + last_seq->seqbase.first = NULL; + last_seq->seqbase.last = NULL; BLI_remlink(ed->seqbasep, last_seq); seq_free_sequence(scene, last_seq); /* emtpy meta strip, delete all effects depending on it */ - for (seq=ed->seqbasep->first; seq; seq=seq->next) + for (seq = ed->seqbasep->first; seq; seq = seq->next) if ((seq->type & SEQ_EFFECT) && seq_depends_on_meta(seq, last_seq)) seq->flag |= SEQ_FLAG_DELETE; @@ -2000,7 +2006,7 @@ static int sequencer_meta_separate_exec(bContext *C, wmOperator *UNUSED(op)) /* test for effects and overlap * don't use SEQP_BEGIN since that would be recursive */ - for (seq= ed->seqbasep->first; seq; seq= seq->next) { + for (seq = ed->seqbasep->first; seq; seq = seq->next) { if (seq->flag & SELECT) { seq->flag &= ~SEQ_OVERLAP; if (seq_test_overlap(ed->seqbasep, seq)) { @@ -2012,7 +2018,7 @@ static int sequencer_meta_separate_exec(bContext *C, wmOperator *UNUSED(op)) sort_seq(scene); seq_update_muting(ed); - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; } @@ -2030,19 +2036,19 @@ void SEQUENCER_OT_meta_separate(wmOperatorType *ot) ot->poll = sequencer_edit_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /* view_all operator */ static int sequencer_view_all_exec(bContext *C, wmOperator *UNUSED(op)) { //Scene *scene= CTX_data_scene(C); - bScreen *sc= CTX_wm_screen(C); - ScrArea *area= CTX_wm_area(C); + bScreen *sc = CTX_wm_screen(C); + ScrArea *area = CTX_wm_area(C); //ARegion *ar= CTX_wm_region(C); - View2D *v2d= UI_view2d_fromcontext(C); + View2D *v2d = UI_view2d_fromcontext(C); - v2d->cur= v2d->tot; + v2d->cur = v2d->tot; UI_view2d_curRect_validate(v2d); UI_view2d_sync(sc, area, v2d, V2D_LOCK_COPY); @@ -2068,16 +2074,16 @@ void SEQUENCER_OT_view_all(wmOperatorType *ot) /* view_all operator */ static int sequencer_view_all_preview_exec(bContext *C, wmOperator *UNUSED(op)) { - bScreen *sc= CTX_wm_screen(C); - ScrArea *area= CTX_wm_area(C); + bScreen *sc = CTX_wm_screen(C); + ScrArea *area = CTX_wm_area(C); #if 0 - ARegion *ar= CTX_wm_region(C); - SpaceSeq *sseq= area->spacedata.first; - Scene *scene= CTX_data_scene(C); + ARegion *ar = CTX_wm_region(C); + SpaceSeq *sseq = area->spacedata.first; + Scene *scene = CTX_data_scene(C); #endif - View2D *v2d= UI_view2d_fromcontext(C); + View2D *v2d = UI_view2d_fromcontext(C); - v2d->cur= v2d->tot; + v2d->cur = v2d->tot; UI_view2d_curRect_validate(v2d); UI_view2d_sync(sc, area, v2d, V2D_LOCK_COPY); @@ -2091,24 +2097,24 @@ static int sequencer_view_all_preview_exec(bContext *C, wmOperator *UNUSED(op)) seq_reset_imageofs(sseq); - imgwidth= (scene->r.size*scene->r.xsch)/100; - imgheight= (scene->r.size*scene->r.ysch)/100; + imgwidth = (scene->r.size * scene->r.xsch) / 100; + imgheight = (scene->r.size * scene->r.ysch) / 100; /* Apply aspect, dosnt need to be that accurate */ - imgwidth= (int)(imgwidth * (scene->r.xasp / scene->r.yasp)); + imgwidth = (int)(imgwidth * (scene->r.xasp / scene->r.yasp)); if (((imgwidth >= width) || (imgheight >= height)) && - ((width > 0) && (height > 0))) { + ((width > 0) && (height > 0))) { /* Find the zoom value that will fit the image in the image space */ zoomX = ((float)width) / ((float)imgwidth); zoomY = ((float)height) / ((float)imgheight); - sseq->zoom= (zoomX < zoomY) ? zoomX : zoomY; + sseq->zoom = (zoomX < zoomY) ? zoomX : zoomY; - sseq->zoom = 1.0f / power_of_2(1/ MIN2(zoomX, zoomY) ); + sseq->zoom = 1.0f / power_of_2(1 / MIN2(zoomX, zoomY) ); } else { - sseq->zoom= 1.0f; + sseq->zoom = 1.0f; } #endif @@ -2134,18 +2140,18 @@ void SEQUENCER_OT_view_all_preview(wmOperatorType *ot) static int sequencer_view_zoom_ratio_exec(bContext *C, wmOperator *op) { - RenderData *r= &CTX_data_scene(C)->r; - View2D *v2d= UI_view2d_fromcontext(C); + RenderData *r = &CTX_data_scene(C)->r; + View2D *v2d = UI_view2d_fromcontext(C); - float ratio= RNA_float_get(op->ptr, "ratio"); + float ratio = RNA_float_get(op->ptr, "ratio"); - float winx= (int)(r->size * r->xsch)/100; - float winy= (int)(r->size * r->ysch)/100; + float winx = (int)(r->size * r->xsch) / 100; + float winy = (int)(r->size * r->ysch) / 100; - float facx= (v2d->mask.xmax - v2d->mask.xmin) / winx; - float facy= (v2d->mask.ymax - v2d->mask.ymin) / winy; + float facx = (v2d->mask.xmax - v2d->mask.xmin) / winx; + float facy = (v2d->mask.ymax - v2d->mask.ymin) / winy; - BLI_resize_rctf(&v2d->cur, (int)(winx*facx*ratio) + 1, (int)(winy*facy*ratio) + 1); + BLI_resize_rctf(&v2d->cur, (int)(winx * facx * ratio) + 1, (int)(winy * facy * ratio) + 1); ED_region_tag_redraw(CTX_wm_region(C)); @@ -2165,22 +2171,23 @@ void SEQUENCER_OT_view_zoom_ratio(wmOperatorType *ot) /* properties */ RNA_def_float(ot->srna, "ratio", 1.0f, 0.0f, FLT_MAX, - "Ratio", "Zoom ratio, 1.0 is 1:1, higher is zoomed in, lower is zoomed out", -FLT_MAX, FLT_MAX); + "Ratio", "Zoom ratio, 1.0 is 1:1, higher is zoomed in, lower is zoomed out", -FLT_MAX, FLT_MAX); } #if 0 static EnumPropertyItem view_type_items[] = { - {SEQ_VIEW_SEQUENCE, "SEQUENCER", ICON_SEQ_SEQUENCER, "Sequencer", ""}, - {SEQ_VIEW_PREVIEW, "PREVIEW", ICON_SEQ_PREVIEW, "Image Preview", ""}, - {SEQ_VIEW_SEQUENCE_PREVIEW, "SEQUENCER_PREVIEW", ICON_SEQ_SEQUENCER, "Sequencer and Image Preview", ""}, - {0, NULL, 0, NULL, NULL}}; + {SEQ_VIEW_SEQUENCE, "SEQUENCER", ICON_SEQ_SEQUENCER, "Sequencer", ""}, + {SEQ_VIEW_PREVIEW, "PREVIEW", ICON_SEQ_PREVIEW, "Image Preview", ""}, + {SEQ_VIEW_SEQUENCE_PREVIEW, "SEQUENCER_PREVIEW", ICON_SEQ_SEQUENCER, "Sequencer and Image Preview", ""}, + {0, NULL, 0, NULL, NULL} +}; #endif /* view_all operator */ static int sequencer_view_toggle_exec(bContext *C, wmOperator *UNUSED(op)) { - SpaceSeq *sseq= (SpaceSeq *)CTX_wm_space_data(C); + SpaceSeq *sseq = (SpaceSeq *)CTX_wm_space_data(C); sseq->view++; if (sseq->view > SEQ_VIEW_SEQUENCE_PREVIEW) sseq->view = SEQ_VIEW_SEQUENCE; @@ -2209,32 +2216,32 @@ void SEQUENCER_OT_view_toggle(wmOperatorType *ot) /* view_selected operator */ static int sequencer_view_selected_exec(bContext *C, wmOperator *UNUSED(op)) { - Scene *scene= CTX_data_scene(C); - View2D *v2d= UI_view2d_fromcontext(C); - ScrArea *area= CTX_wm_area(C); - bScreen *sc= CTX_wm_screen(C); - Editing *ed= seq_give_editing(scene, FALSE); + Scene *scene = CTX_data_scene(C); + View2D *v2d = UI_view2d_fromcontext(C); + ScrArea *area = CTX_wm_area(C); + bScreen *sc = CTX_wm_screen(C); + Editing *ed = seq_give_editing(scene, FALSE); Sequence *seq; - int xmin= MAXFRAME*2; - int xmax= -MAXFRAME*2; - int ymin= MAXSEQ+1; - int ymax= 0; + int xmin = MAXFRAME * 2; + int xmax = -MAXFRAME * 2; + int ymin = MAXSEQ + 1; + int ymax = 0; int orig_height; int ymid; - int ymargin= 1; - int xmargin= FPS; + int ymargin = 1; + int xmargin = FPS; - if (ed==NULL) + if (ed == NULL) return OPERATOR_CANCELLED; - for (seq=ed->seqbasep->first; seq; seq=seq->next) { + for (seq = ed->seqbasep->first; seq; seq = seq->next) { if (seq->flag & SELECT) { - xmin= MIN2(xmin, seq->startdisp); - xmax= MAX2(xmax, seq->enddisp); + xmin = MIN2(xmin, seq->startdisp); + xmax = MAX2(xmax, seq->enddisp); - ymin= MIN2(ymin, seq->machine); - ymax= MAX2(ymax, seq->machine); + ymin = MIN2(ymin, seq->machine); + ymax = MAX2(ymax, seq->machine); } } @@ -2245,7 +2252,7 @@ static int sequencer_view_selected_exec(bContext *C, wmOperator *UNUSED(op)) ymax += ymargin; ymin -= ymargin; - orig_height= v2d->cur.ymax - v2d->cur.ymin; + orig_height = v2d->cur.ymax - v2d->cur.ymin; v2d->cur.xmin = xmin; v2d->cur.xmax = xmax; @@ -2255,10 +2262,10 @@ static int sequencer_view_selected_exec(bContext *C, wmOperator *UNUSED(op)) /* only zoom out vertically */ if (orig_height > v2d->cur.ymax - v2d->cur.ymin) { - ymid= (v2d->cur.ymax + v2d->cur.ymin) / 2; + ymid = (v2d->cur.ymax + v2d->cur.ymin) / 2; - v2d->cur.ymin = ymid - (orig_height/2); - v2d->cur.ymax = ymid + (orig_height/2); + v2d->cur.ymin = ymid - (orig_height / 2); + v2d->cur.ymax = ymid + (orig_height / 2); } UI_view2d_curRect_validate(v2d); @@ -2288,16 +2295,16 @@ void SEQUENCER_OT_view_selected(wmOperatorType *ot) static int find_next_prev_edit(Scene *scene, int cfra, int side) { - Editing *ed= seq_give_editing(scene, FALSE); - Sequence *seq,*best_seq = NULL,*frame_seq = NULL; + Editing *ed = seq_give_editing(scene, FALSE); + Sequence *seq, *best_seq = NULL, *frame_seq = NULL; int dist, best_dist; - best_dist = MAXFRAME*2; + best_dist = MAXFRAME * 2; - if (ed==NULL) return cfra; + if (ed == NULL) return cfra; - for (seq= ed->seqbasep->first; seq; seq= seq->next) { - dist = MAXFRAME*2; + for (seq = ed->seqbasep->first; seq; seq = seq->next) { + dist = MAXFRAME * 2; switch (side) { case SEQ_SIDE_LEFT: @@ -2310,7 +2317,7 @@ static int find_next_prev_edit(Scene *scene, int cfra, int side) dist = seq->startdisp - cfra; } else if (seq->startdisp == cfra) { - frame_seq=seq; + frame_seq = seq; } break; } @@ -2331,13 +2338,13 @@ static int find_next_prev_edit(Scene *scene, int cfra, int side) static int next_prev_edit_internal(Scene *scene, int side) { - int change=0; + int change = 0; int cfra = CFRA; - int nfra= find_next_prev_edit(scene, cfra, side); + int nfra = find_next_prev_edit(scene, cfra, side); if (nfra != cfra) { CFRA = nfra; - change= 1; + change = 1; } return change; @@ -2346,12 +2353,12 @@ static int next_prev_edit_internal(Scene *scene, int side) /* move frame to next edit point operator */ static int sequencer_next_edit_exec(bContext *C, wmOperator *UNUSED(op)) { - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); if (!next_prev_edit_internal(scene, SEQ_SIDE_RIGHT)) return OPERATOR_CANCELLED; - WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene); + WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene); return OPERATOR_FINISHED; } @@ -2368,7 +2375,7 @@ void SEQUENCER_OT_next_edit(wmOperatorType *ot) ot->poll = sequencer_edit_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ } @@ -2376,12 +2383,12 @@ void SEQUENCER_OT_next_edit(wmOperatorType *ot) /* move frame to previous edit point operator */ static int sequencer_previous_edit_exec(bContext *C, wmOperator *UNUSED(op)) { - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); if (!next_prev_edit_internal(scene, SEQ_SIDE_LEFT)) return OPERATOR_CANCELLED; - WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene); + WM_event_add_notifier(C, NC_SCENE | ND_FRAME, scene); return OPERATOR_FINISHED; } @@ -2398,12 +2405,12 @@ void SEQUENCER_OT_previous_edit(wmOperatorType *ot) ot->poll = sequencer_edit_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ } -static void swap_sequence(Scene* scene, Sequence* seqa, Sequence* seqb) +static void swap_sequence(Scene *scene, Sequence *seqa, Sequence *seqb) { int gap = seqb->startdisp - seqa->enddisp; seqb->start = (seqb->start - seqb->startdisp) + seqa->startdisp; @@ -2413,15 +2420,15 @@ static void swap_sequence(Scene* scene, Sequence* seqa, Sequence* seqb) } #if 0 -static Sequence* sequence_find_parent(Scene* scene, Sequence* child) +static Sequence *sequence_find_parent(Scene *scene, Sequence *child) { - Editing *ed= seq_give_editing(scene, FALSE); - Sequence *parent= NULL; + Editing *ed = seq_give_editing(scene, FALSE); + Sequence *parent = NULL; Sequence *seq; - if (ed==NULL) return NULL; + if (ed == NULL) return NULL; - for (seq= ed->seqbasep->first; seq; seq= seq->next) { + for (seq = ed->seqbasep->first; seq; seq = seq->next) { if ( (seq != child) && seq_is_parent(seq, child) ) { parent = seq; break; @@ -2434,13 +2441,13 @@ static Sequence* sequence_find_parent(Scene* scene, Sequence* child) static int sequencer_swap_exec(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); - Editing *ed= seq_give_editing(scene, FALSE); + Scene *scene = CTX_data_scene(C); + Editing *ed = seq_give_editing(scene, FALSE); Sequence *active_seq = seq_active_get(scene); Sequence *seq, *iseq; - int side= RNA_enum_get(op->ptr, "side"); + int side = RNA_enum_get(op->ptr, "side"); - if (active_seq==NULL) return OPERATOR_CANCELLED; + if (active_seq == NULL) return OPERATOR_CANCELLED; seq = find_next_prev_sequence(scene, active_seq, side, -1); @@ -2462,17 +2469,17 @@ static int sequencer_swap_exec(bContext *C, wmOperator *op) } // XXX - should be a generic function - for (iseq= scene->ed->seqbasep->first; iseq; iseq= iseq->next) { + for (iseq = scene->ed->seqbasep->first; iseq; iseq = iseq->next) { if ((iseq->type & SEQ_EFFECT) && (seq_is_parent(iseq, active_seq) || seq_is_parent(iseq, seq))) { calc_sequence(scene, iseq); } } /* do this in a new loop since both effects need to be calculated first */ - for (iseq= scene->ed->seqbasep->first; iseq; iseq= iseq->next) { + for (iseq = scene->ed->seqbasep->first; iseq; iseq = iseq->next) { if ((iseq->type & SEQ_EFFECT) && (seq_is_parent(iseq, active_seq) || seq_is_parent(iseq, seq))) { /* this may now overlap */ - if ( seq_test_overlap(ed->seqbasep, iseq) ) { + if (seq_test_overlap(ed->seqbasep, iseq) ) { shuffle_seq(ed->seqbasep, iseq, scene); } } @@ -2482,7 +2489,7 @@ static int sequencer_swap_exec(bContext *C, wmOperator *op) sort_seq(scene); - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; } @@ -2502,7 +2509,7 @@ void SEQUENCER_OT_swap(wmOperatorType *ot) ot->poll = sequencer_edit_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ RNA_def_enum(ot->srna, "side", prop_side_lr_types, SEQ_SIDE_RIGHT, "Side", "Side of the strip to swap"); @@ -2511,37 +2518,37 @@ void SEQUENCER_OT_swap(wmOperatorType *ot) static int sequencer_rendersize_exec(bContext *C, wmOperator *UNUSED(op)) { int retval = OPERATOR_CANCELLED; - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); Sequence *active_seq = seq_active_get(scene); StripElem *se = NULL; - if (active_seq==NULL) + if (active_seq == NULL) return OPERATOR_CANCELLED; if (active_seq->strip) { switch (active_seq->type) { - case SEQ_IMAGE: - se = give_stripelem(active_seq, scene->r.cfra); - break; - case SEQ_MOVIE: - se = active_seq->strip->stripdata; - break; - case SEQ_SCENE: - case SEQ_META: - case SEQ_RAM_SOUND: - case SEQ_HD_SOUND: - default: - break; + case SEQ_IMAGE: + se = give_stripelem(active_seq, scene->r.cfra); + break; + case SEQ_MOVIE: + se = active_seq->strip->stripdata; + break; + case SEQ_SCENE: + case SEQ_META: + case SEQ_RAM_SOUND: + case SEQ_HD_SOUND: + default: + break; } } if (se) { // prevent setting the render size if sequence values aren't initialized if ( (se->orig_width > 0) && (se->orig_height > 0) ) { - scene->r.xsch= se->orig_width; - scene->r.ysch= se->orig_height; - WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene); + scene->r.xsch = se->orig_width; + scene->r.ysch = se->orig_height; + WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene); retval = OPERATOR_FINISHED; } } @@ -2561,7 +2568,7 @@ void SEQUENCER_OT_rendersize(wmOperatorType *ot) ot->poll = sequencer_edit_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ } @@ -2570,7 +2577,7 @@ static void seq_copy_del_sound(Scene *scene, Sequence *seq) { if (seq->type == SEQ_META) { Sequence *iseq; - for (iseq= seq->seqbase.first; iseq; iseq= iseq->next) { + for (iseq = seq->seqbase.first; iseq; iseq = iseq->next) { seq_copy_del_sound(scene, iseq); } } @@ -2583,15 +2590,15 @@ static void seq_copy_del_sound(Scene *scene, Sequence *seq) /* TODO, validate scenes */ static int sequencer_copy_exec(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); - Editing *ed= seq_give_editing(scene, FALSE); + Scene *scene = CTX_data_scene(C); + Editing *ed = seq_give_editing(scene, FALSE); Sequence *seq; - ListBase nseqbase= {NULL, NULL}; + ListBase nseqbase = {NULL, NULL}; seq_free_clipboard(); - if (seqbase_isolated_sel_check(ed->seqbasep)==FALSE) { + if (seqbase_isolated_sel_check(ed->seqbasep) == FALSE) { BKE_report(op->reports, RPT_ERROR, "Please select all related strips"); return OPERATOR_CANCELLED; } @@ -2605,7 +2612,7 @@ static int sequencer_copy_exec(bContext *C, wmOperator *op) Sequence *seq, *first_seq = nseqbase.first; BLI_movelisttolist(ed->seqbasep, &nseqbase); - for (seq=first_seq; seq; seq=seq->next) + for (seq = first_seq; seq; seq = seq->next) seq_recursive_apply(seq, apply_unique_name_cb, scene); seqbase_clipboard.first = first_seq; @@ -2618,10 +2625,10 @@ static int sequencer_copy_exec(bContext *C, wmOperator *op) } } - seqbase_clipboard_frame= scene->r.cfra; + seqbase_clipboard_frame = scene->r.cfra; /* Need to remove anything that references the current scene */ - for (seq= seqbase_clipboard.first; seq; seq= seq->next) { + for (seq = seqbase_clipboard.first; seq; seq = seq->next) { seq_copy_del_sound(scene, seq); } @@ -2649,7 +2656,7 @@ static void seq_paste_add_sound(Scene *scene, Sequence *seq) { if (seq->type == SEQ_META) { Sequence *iseq; - for (iseq= seq->seqbase.first; iseq; iseq= iseq->next) { + for (iseq = seq->seqbase.first; iseq; iseq = iseq->next) { seq_paste_add_sound(scene, iseq); } } @@ -2660,8 +2667,8 @@ static void seq_paste_add_sound(Scene *scene, Sequence *seq) static int sequencer_paste_exec(bContext *C, wmOperator *UNUSED(op)) { - Scene *scene= CTX_data_scene(C); - Editing *ed= seq_give_editing(scene, TRUE); /* create if needed */ + Scene *scene = CTX_data_scene(C); + Editing *ed = seq_give_editing(scene, TRUE); /* create if needed */ ListBase nseqbase = {NULL, NULL}; int ofs; Sequence *iseq; @@ -2673,7 +2680,7 @@ static int sequencer_paste_exec(bContext *C, wmOperator *UNUSED(op)) /* transform pasted strips before adding */ if (ofs) { - for (iseq= nseqbase.first; iseq; iseq= iseq->next) { + for (iseq = nseqbase.first; iseq; iseq = iseq->next) { seq_translate(scene, iseq, ofs); seq_sound_init(scene, iseq); } @@ -2684,14 +2691,14 @@ static int sequencer_paste_exec(bContext *C, wmOperator *UNUSED(op)) BLI_movelisttolist(ed->seqbasep, &nseqbase); /* make sure the pasted strips have unique names between them */ - for (; iseq; iseq=iseq->next) { + for (; iseq; iseq = iseq->next) { seq_recursive_apply(iseq, apply_unique_name_cb, scene); /* restore valid sound_scene for newly added strips */ seq_paste_add_sound(scene, iseq); } - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; } @@ -2708,14 +2715,14 @@ void SEQUENCER_OT_paste(wmOperatorType *ot) ot->poll = ED_operator_sequencer_active; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ } static int sequencer_swap_data_exec(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); Sequence *seq_act; Sequence *seq_other; const char *error_msg; @@ -2733,16 +2740,16 @@ static int sequencer_swap_data_exec(bContext *C, wmOperator *op) sound_remove_scene_sound(scene, seq_act->scene_sound); sound_remove_scene_sound(scene, seq_other->scene_sound); - seq_act->scene_sound= NULL; - seq_other->scene_sound= NULL; + seq_act->scene_sound = NULL; + seq_other->scene_sound = NULL; calc_sequence(scene, seq_act); calc_sequence(scene, seq_other); - if (seq_act->sound) sound_add_scene_sound_defaults(scene, seq_act); - if (seq_other->sound) sound_add_scene_sound_defaults(scene, seq_other); + if (seq_act->sound) sound_add_scene_sound_defaults(scene, seq_act); + if (seq_other->sound) sound_add_scene_sound_defaults(scene, seq_other); - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; } @@ -2759,7 +2766,7 @@ void SEQUENCER_OT_swap_data(wmOperatorType *ot) ot->poll = ED_operator_sequencer_active; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ } @@ -2767,9 +2774,9 @@ void SEQUENCER_OT_swap_data(wmOperatorType *ot) /* borderselect operator */ static int view_ghost_border_exec(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); - Editing *ed= seq_give_editing(scene, FALSE); - View2D *v2d= UI_view2d_fromcontext(C); + Scene *scene = CTX_data_scene(C); + Editing *ed = seq_give_editing(scene, FALSE); + View2D *v2d = UI_view2d_fromcontext(C); rctf rect; @@ -2777,7 +2784,7 @@ static int view_ghost_border_exec(bContext *C, wmOperator *op) UI_view2d_region_to_view(v2d, RNA_int_get(op->ptr, "xmin"), RNA_int_get(op->ptr, "ymin"), &rect.xmin, &rect.ymin); UI_view2d_region_to_view(v2d, RNA_int_get(op->ptr, "xmax"), RNA_int_get(op->ptr, "ymax"), &rect.xmax, &rect.ymax); - if (ed==NULL) + if (ed == NULL) return OPERATOR_CANCELLED; rect.xmin /= (float)(ABS(v2d->tot.xmax - v2d->tot.xmin)); @@ -2786,19 +2793,19 @@ static int view_ghost_border_exec(bContext *C, wmOperator *op) rect.xmax /= (float)(ABS(v2d->tot.xmax - v2d->tot.xmin)); rect.ymax /= (float)(ABS(v2d->tot.ymax - v2d->tot.ymin)); - rect.xmin+=0.5f; - rect.xmax+=0.5f; - rect.ymin+=0.5f; - rect.ymax+=0.5f; + rect.xmin += 0.5f; + rect.xmax += 0.5f; + rect.ymin += 0.5f; + rect.ymax += 0.5f; CLAMP(rect.xmin, 0.0f, 1.0f); CLAMP(rect.ymin, 0.0f, 1.0f); CLAMP(rect.xmax, 0.0f, 1.0f); CLAMP(rect.ymax, 0.0f, 1.0f); - scene->ed->over_border= rect; + scene->ed->over_border = rect; - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; } @@ -2859,24 +2866,24 @@ static EnumPropertyItem prop_change_effect_input_types[] = { static int sequencer_change_effect_input_exec(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); - Editing *ed= seq_give_editing(scene, FALSE); - Sequence *seq= seq_active_get(scene); + Scene *scene = CTX_data_scene(C); + Editing *ed = seq_give_editing(scene, FALSE); + Sequence *seq = seq_active_get(scene); Sequence **seq_1, **seq_2; - switch(RNA_enum_get(op->ptr, "swap")) { + switch (RNA_enum_get(op->ptr, "swap")) { case 0: - seq_1= &seq->seq1; - seq_2= &seq->seq2; + seq_1 = &seq->seq1; + seq_2 = &seq->seq2; break; case 1: - seq_1= &seq->seq2; - seq_2= &seq->seq3; + seq_1 = &seq->seq2; + seq_2 = &seq->seq3; break; default: /* 2 */ - seq_1= &seq->seq1; - seq_2= &seq->seq3; + seq_1 = &seq->seq1; + seq_2 = &seq->seq3; break; } @@ -2893,7 +2900,7 @@ static int sequencer_change_effect_input_exec(bContext *C, wmOperator *op) /* important else we don't get the imbuf cache flushed */ free_imbuf_seq(scene, &ed->seqbase, FALSE, FALSE); - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; } @@ -2910,17 +2917,17 @@ void SEQUENCER_OT_change_effect_input(struct wmOperatorType *ot) ot->poll = sequencer_effect_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; ot->prop = RNA_def_enum(ot->srna, "swap", prop_change_effect_input_types, 0, "Swap", "The effect inputs to swap"); } static int sequencer_change_effect_type_exec(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); - Editing *ed= seq_give_editing(scene, FALSE); - Sequence *seq= seq_active_get(scene); - const int new_type= RNA_enum_get(op->ptr, "type"); + Scene *scene = CTX_data_scene(C); + Editing *ed = seq_give_editing(scene, FALSE); + Sequence *seq = seq_active_get(scene); + const int new_type = RNA_enum_get(op->ptr, "type"); /* free previous effect and init new effect */ struct SeqEffectHandle sh; @@ -2932,8 +2939,8 @@ static int sequencer_change_effect_type_exec(bContext *C, wmOperator *op) /* can someone explain the logic behind only allowing to increase this, * copied from 2.4x - campbell */ if (get_sequence_effect_num_inputs(seq->type) < - get_sequence_effect_num_inputs(new_type) - ) { + get_sequence_effect_num_inputs(new_type)) + { BKE_report(op->reports, RPT_ERROR, "New effect needs more input strips"); return OPERATOR_CANCELLED; } @@ -2941,7 +2948,7 @@ static int sequencer_change_effect_type_exec(bContext *C, wmOperator *op) sh = get_sequence_effect(seq); sh.free(seq); - seq->type= new_type; + seq->type = new_type; sh = get_sequence_effect(seq); sh.init(seq); @@ -2953,7 +2960,7 @@ static int sequencer_change_effect_type_exec(bContext *C, wmOperator *op) /* important else we don't get the imbuf cache flushed */ free_imbuf_seq(scene, &ed->seqbase, FALSE, FALSE); - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; } @@ -2970,25 +2977,25 @@ void SEQUENCER_OT_change_effect_type(struct wmOperatorType *ot) ot->poll = sequencer_effect_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; ot->prop = RNA_def_enum(ot->srna, "type", sequencer_prop_effect_types, SEQ_CROSS, "Type", "Sequencer effect type"); } static int sequencer_change_path_exec(bContext *C, wmOperator *op) { - Main *bmain= CTX_data_main(C); - Scene *scene= CTX_data_scene(C); - Editing *ed= seq_give_editing(scene, FALSE); - Sequence *seq= seq_active_get(scene); - const int is_relative_path= RNA_boolean_get(op->ptr, "relative_path"); + Main *bmain = CTX_data_main(C); + Scene *scene = CTX_data_scene(C); + Editing *ed = seq_give_editing(scene, FALSE); + Sequence *seq = seq_active_get(scene); + const int is_relative_path = RNA_boolean_get(op->ptr, "relative_path"); if (seq->type == SEQ_IMAGE) { char directory[FILE_MAX]; - const int len= RNA_property_collection_length(op->ptr, RNA_struct_find_property(op->ptr, "files")); + const int len = RNA_property_collection_length(op->ptr, RNA_struct_find_property(op->ptr, "files")); StripElem *se; - if (len==0) + if (len == 0) return OPERATOR_CANCELLED; RNA_string_get(op->ptr, "directory", directory); @@ -3003,10 +3010,10 @@ static int sequencer_change_path_exec(bContext *C, wmOperator *op) if (seq->strip->stripdata) { MEM_freeN(seq->strip->stripdata); } - seq->strip->stripdata= se= MEM_callocN(len*sizeof(StripElem), "stripelem"); + seq->strip->stripdata = se = MEM_callocN(len * sizeof(StripElem), "stripelem"); RNA_BEGIN(op->ptr, itemptr, "files") { - char *filename= RNA_string_get_alloc(&itemptr, "name", NULL, 0); + char *filename = RNA_string_get_alloc(&itemptr, "name", NULL, 0); BLI_strncpy(se->name, filename, sizeof(se->name)); MEM_freeN(filename); se++; @@ -3014,7 +3021,7 @@ static int sequencer_change_path_exec(bContext *C, wmOperator *op) RNA_END; /* reset these else we wont see all the images */ - seq->anim_startofs= seq->anim_endofs= 0; + seq->anim_startofs = seq->anim_endofs = 0; /* correct start/end frames so we don't move * important not to set seq->len= len; allow the function to handle it */ @@ -3034,20 +3041,20 @@ static int sequencer_change_path_exec(bContext *C, wmOperator *op) RNA_pointer_create(&scene->id, &RNA_Sequence, seq, &seq_ptr); RNA_string_get(op->ptr, "filepath", filepath); - prop= RNA_struct_find_property(&seq_ptr, "filepath"); + prop = RNA_struct_find_property(&seq_ptr, "filepath"); RNA_property_string_set(&seq_ptr, prop, filepath); RNA_property_update(C, &seq_ptr, prop); } - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene); return OPERATOR_FINISHED; } static int sequencer_change_path_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { - Scene *scene= CTX_data_scene(C); - Sequence *seq= seq_active_get(scene); + Scene *scene = CTX_data_scene(C); + Sequence *seq = seq_active_get(scene); RNA_string_set(op->ptr, "directory", seq->strip->dir); @@ -3077,8 +3084,8 @@ void SEQUENCER_OT_change_path(struct wmOperatorType *ot) ot->poll = sequencer_strip_has_path_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_DIRECTORY|WM_FILESEL_RELPATH|WM_FILESEL_FILEPATH|WM_FILESEL_FILES, FILE_DEFAULTDISPLAY); + WM_operator_properties_filesel(ot, FOLDERFILE | IMAGEFILE | MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_DIRECTORY | WM_FILESEL_RELPATH | WM_FILESEL_FILEPATH | WM_FILESEL_FILES, FILE_DEFAULTDISPLAY); } diff --git a/source/blender/editors/space_sequencer/sequencer_ops.c b/source/blender/editors/space_sequencer/sequencer_ops.c index 797d6fa36b8..3a02c90f99a 100644 --- a/source/blender/editors/space_sequencer/sequencer_ops.c +++ b/source/blender/editors/space_sequencer/sequencer_ops.c @@ -136,33 +136,33 @@ void sequencer_keymap(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "SEQUENCER_OT_properties", NKEY, KM_PRESS, 0, 0); kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select_all", AKEY, KM_PRESS, 0, 0); - RNA_enum_set(kmi->ptr, "action", SEL_TOGGLE); + RNA_enum_set(kmi->ptr, "action", SEL_TOGGLE); kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select_all", IKEY, KM_PRESS, KM_CTRL, 0); - RNA_enum_set(kmi->ptr, "action", SEL_INVERT); + RNA_enum_set(kmi->ptr, "action", SEL_INVERT); kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_cut", KKEY, KM_PRESS, 0, 0); - RNA_enum_set(kmi->ptr, "type", SEQ_CUT_SOFT); + RNA_enum_set(kmi->ptr, "type", SEQ_CUT_SOFT); kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_cut", KKEY, KM_PRESS, KM_SHIFT, 0); - RNA_enum_set(kmi->ptr, "type", SEQ_CUT_HARD); + RNA_enum_set(kmi->ptr, "type", SEQ_CUT_HARD); kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_mute", HKEY, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "unselected", FALSE); + RNA_boolean_set(kmi->ptr, "unselected", FALSE); kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_mute", HKEY, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "unselected", TRUE); + RNA_boolean_set(kmi->ptr, "unselected", TRUE); kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_unmute", HKEY, KM_PRESS, KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "unselected", FALSE); - kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_unmute", HKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "unselected", TRUE); + RNA_boolean_set(kmi->ptr, "unselected", FALSE); + kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_unmute", HKEY, KM_PRESS, KM_ALT | KM_SHIFT, 0); + RNA_boolean_set(kmi->ptr, "unselected", TRUE); WM_keymap_add_item(keymap, "SEQUENCER_OT_lock", LKEY, KM_PRESS, KM_SHIFT, 0); - WM_keymap_add_item(keymap, "SEQUENCER_OT_unlock", LKEY, KM_PRESS, KM_SHIFT|KM_ALT, 0); + WM_keymap_add_item(keymap, "SEQUENCER_OT_unlock", LKEY, KM_PRESS, KM_SHIFT | KM_ALT, 0); WM_keymap_add_item(keymap, "SEQUENCER_OT_reassign_inputs", RKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "SEQUENCER_OT_reload", RKEY, KM_PRESS, KM_ALT, 0); - kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_reload", RKEY, KM_PRESS, KM_SHIFT|KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "adjust_length", TRUE); + kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_reload", RKEY, KM_PRESS, KM_SHIFT | KM_ALT, 0); + RNA_boolean_set(kmi->ptr, "adjust_length", TRUE); WM_keymap_add_item(keymap, "SEQUENCER_OT_offset_clear", OKEY, KM_PRESS, KM_ALT, 0); @@ -197,25 +197,25 @@ void sequencer_keymap(wmKeyConfig *keyconf) * regular number keys */ { int keys[] = { ONEKEY, TWOKEY, THREEKEY, FOURKEY, FIVEKEY, - SIXKEY, SEVENKEY, EIGHTKEY, NINEKEY, ZEROKEY }; + SIXKEY, SEVENKEY, EIGHTKEY, NINEKEY, ZEROKEY }; int i; for (i = 1; i <= 10; i++) { - RNA_int_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_cut_multicam", keys[i-1], KM_PRESS, 0, 0)->ptr, "camera", i); + RNA_int_set(WM_keymap_add_item(keymap, "SEQUENCER_OT_cut_multicam", keys[i - 1], KM_PRESS, 0, 0)->ptr, "camera", i); } } /* Mouse selection, a bit verbose :/ */ kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, 0, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); - RNA_boolean_set(kmi->ptr, "linked_handle", FALSE); - RNA_boolean_set(kmi->ptr, "left_right", FALSE); - RNA_boolean_set(kmi->ptr, "linked_time", FALSE); + RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "linked_handle", FALSE); + RNA_boolean_set(kmi->ptr, "left_right", FALSE); + RNA_boolean_set(kmi->ptr, "linked_time", FALSE); kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT, 0); - RNA_boolean_set(kmi->ptr, "extend", TRUE); - RNA_boolean_set(kmi->ptr, "linked_handle", FALSE); - RNA_boolean_set(kmi->ptr, "left_right", FALSE); - RNA_boolean_set(kmi->ptr, "linked_time", FALSE); + RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "linked_handle", FALSE); + RNA_boolean_set(kmi->ptr, "left_right", FALSE); + RNA_boolean_set(kmi->ptr, "linked_time", FALSE); /* 2.4x method, now use Alt for handles and select the side based on which handle was selected */ @@ -225,50 +225,50 @@ void sequencer_keymap(wmKeyConfig *keyconf) kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_ALT, 0); RNA_boolean_set(kmi->ptr, "linked_right", TRUE); - kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL|KM_ALT, 0); + kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL | KM_ALT, 0); RNA_boolean_set(kmi->ptr, "linked_left", TRUE); RNA_boolean_set(kmi->ptr, "linked_right", TRUE); - kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_CTRL|KM_ALT, 0); + kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_CTRL | KM_ALT, 0); RNA_boolean_set(kmi->ptr, "extend", TRUE); RNA_boolean_set(kmi->ptr, "linked_left", TRUE); RNA_boolean_set(kmi->ptr, "linked_right", TRUE); - kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_CTRL, 0); + kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_CTRL, 0); RNA_boolean_set(kmi->ptr, "extend", TRUE); RNA_boolean_set(kmi->ptr, "linked_left", TRUE); - kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_ALT, 0); + kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_ALT, 0); RNA_boolean_set(kmi->ptr, "extend", TRUE); RNA_boolean_set(kmi->ptr, "linked_right", TRUE); #endif /* 2.5 method, Alt and use selected handle */ kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); - RNA_boolean_set(kmi->ptr, "linked_handle", TRUE); - RNA_boolean_set(kmi->ptr, "left_right", FALSE); - RNA_boolean_set(kmi->ptr, "linked_time", FALSE); + RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "linked_handle", TRUE); + RNA_boolean_set(kmi->ptr, "left_right", FALSE); + RNA_boolean_set(kmi->ptr, "linked_time", FALSE); - kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_ALT, 0); - RNA_boolean_set(kmi->ptr, "extend", TRUE); - RNA_boolean_set(kmi->ptr, "linked_handle", TRUE); - RNA_boolean_set(kmi->ptr, "left_right", FALSE); - RNA_boolean_set(kmi->ptr, "linked_time", FALSE); + kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_ALT, 0); + RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "linked_handle", TRUE); + RNA_boolean_set(kmi->ptr, "left_right", FALSE); + RNA_boolean_set(kmi->ptr, "linked_time", FALSE); /* match action editor */ kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "extend", FALSE); - RNA_boolean_set(kmi->ptr, "linked_handle", FALSE); - RNA_boolean_set(kmi->ptr, "left_right", TRUE); /* grr, these conflict - only use left_right if not over an active seq */ - RNA_boolean_set(kmi->ptr, "linked_time", TRUE); + RNA_boolean_set(kmi->ptr, "extend", FALSE); + RNA_boolean_set(kmi->ptr, "linked_handle", FALSE); + RNA_boolean_set(kmi->ptr, "left_right", TRUE); /* grr, these conflict - only use left_right if not over an active seq */ + RNA_boolean_set(kmi->ptr, "linked_time", TRUE); /* adjusted since 2.4 */ - kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT|KM_CTRL, 0); - RNA_boolean_set(kmi->ptr, "extend", TRUE); - RNA_boolean_set(kmi->ptr, "linked_handle", FALSE); - RNA_boolean_set(kmi->ptr, "left_right", FALSE); - RNA_boolean_set(kmi->ptr, "linked_time", TRUE); + kmi = WM_keymap_add_item(keymap, "SEQUENCER_OT_select", SELECTMOUSE, KM_PRESS, KM_SHIFT | KM_CTRL, 0); + RNA_boolean_set(kmi->ptr, "extend", TRUE); + RNA_boolean_set(kmi->ptr, "linked_handle", FALSE); + RNA_boolean_set(kmi->ptr, "left_right", FALSE); + RNA_boolean_set(kmi->ptr, "linked_time", TRUE); WM_keymap_add_item(keymap, "SEQUENCER_OT_select_more", PADPLUSKEY, KM_PRESS, KM_CTRL, 0); WM_keymap_add_item(keymap, "SEQUENCER_OT_select_less", PADMINUS, KM_PRESS, KM_CTRL, 0); diff --git a/source/blender/editors/space_sequencer/sequencer_scopes.c b/source/blender/editors/space_sequencer/sequencer_scopes.c index 2e36c233f8e..1d81d4bb68b 100644 --- a/source/blender/editors/space_sequencer/sequencer_scopes.c +++ b/source/blender/editors/space_sequencer/sequencer_scopes.c @@ -41,27 +41,27 @@ * only difference is it does some normalize after, need to double check on this - campbell */ static void rgb_to_yuv_normalized(const float rgb[3], float yuv[3]) { - yuv[0]= 0.299f*rgb[0] + 0.587f*rgb[1] + 0.114f*rgb[2]; - yuv[1]= 0.492f*(rgb[2] - yuv[0]); - yuv[2]= 0.877f*(rgb[0] - yuv[0]); + yuv[0] = 0.299f * rgb[0] + 0.587f * rgb[1] + 0.114f * rgb[2]; + yuv[1] = 0.492f * (rgb[2] - yuv[0]); + yuv[2] = 0.877f * (rgb[0] - yuv[0]); - /* Normalize */ - yuv[1]*= 255.0f/(122*2.0f); - yuv[1]+= 0.5f; + /* Normalize */ + yuv[1] *= 255.0f / (122 * 2.0f); + yuv[1] += 0.5f; - yuv[2]*= 255.0f/(157*2.0f); - yuv[2]+= 0.5f; + yuv[2] *= 255.0f / (157 * 2.0f); + yuv[2] += 0.5f; } -static void scope_put_pixel(unsigned char* table, unsigned char * pos) +static void scope_put_pixel(unsigned char *table, unsigned char *pos) { char newval = table[*pos]; pos[0] = pos[1] = pos[2] = newval; pos[3] = 255; } -static void scope_put_pixel_single(unsigned char* table, unsigned char * pos, - int col) +static void scope_put_pixel_single(unsigned char *table, unsigned char *pos, + int col) { char newval = table[pos[col]]; pos[col] = newval; @@ -69,10 +69,10 @@ static void scope_put_pixel_single(unsigned char* table, unsigned char * pos, } static void wform_put_line(int w, - unsigned char * last_pos, unsigned char * new_pos) + unsigned char *last_pos, unsigned char *new_pos) { if (last_pos > new_pos) { - unsigned char* temp = new_pos; + unsigned char *temp = new_pos; new_pos = last_pos; last_pos = temp; } @@ -82,15 +82,15 @@ static void wform_put_line(int w, last_pos[0] = last_pos[1] = last_pos[2] = 32; last_pos[3] = 255; } - last_pos += 4*w; + last_pos += 4 * w; } } static void wform_put_line_single( - int w, unsigned char * last_pos, unsigned char * new_pos, int col) + int w, unsigned char *last_pos, unsigned char *new_pos, int col) { if (last_pos > new_pos) { - unsigned char* temp = new_pos; + unsigned char *temp = new_pos; new_pos = last_pos; last_pos = temp; } @@ -100,16 +100,16 @@ static void wform_put_line_single( last_pos[col] = 32; last_pos[3] = 255; } - last_pos += 4*w; + last_pos += 4 * w; } } -static void wform_put_border(unsigned char * tgt, int w, int h) +static void wform_put_border(unsigned char *tgt, int w, int h) { int x, y; for (x = 0; x < w; x++) { - unsigned char * p = tgt + 4 * x; + unsigned char *p = tgt + 4 * x; p[1] = p[3] = 255.0; p[4 * w + 1] = p[4 * w + 3] = 255.0; p = tgt + 4 * (w * (h - 1) + x); @@ -118,7 +118,7 @@ static void wform_put_border(unsigned char * tgt, int w, int h) } for (y = 0; y < h; y++) { - unsigned char * p = tgt + 4 * w * y; + unsigned char *p = tgt + 4 * w * y; p[1] = p[3] = 255.0; p[4 + 1] = p[4 + 3] = 255.0; p = tgt + 4 * (w * y + w - 1); @@ -127,32 +127,32 @@ static void wform_put_border(unsigned char * tgt, int w, int h) } } -static void wform_put_gridrow(unsigned char * tgt, float perc, int w, int h) +static void wform_put_gridrow(unsigned char *tgt, float perc, int w, int h) { int i; - tgt += (int) (perc/100.0f * h) * w * 4; + tgt += (int) (perc / 100.0f * h) * w * 4; - for (i = 0; i < w*2; i++) { + for (i = 0; i < w * 2; i++) { tgt[0] = 255; tgt += 4; } } -static void wform_put_grid(unsigned char * tgt, int w, int h) +static void wform_put_grid(unsigned char *tgt, int w, int h) { wform_put_gridrow(tgt, 90.0, w, h); wform_put_gridrow(tgt, 70.0, w, h); wform_put_gridrow(tgt, 10.0, w, h); } -static struct ImBuf *make_waveform_view_from_ibuf_byte(struct ImBuf * ibuf) +static ImBuf *make_waveform_view_from_ibuf_byte(ImBuf *ibuf) { - struct ImBuf * rval = IMB_allocImBuf(ibuf->x + 3, 515, 32, IB_rect); - int x,y; - unsigned char* src = (unsigned char*) ibuf->rect; - unsigned char* tgt = (unsigned char*) rval->rect; + ImBuf *rval = IMB_allocImBuf(ibuf->x + 3, 515, 32, IB_rect); + int x, y; + unsigned char *src = (unsigned char *) ibuf->rect; + unsigned char *tgt = (unsigned char *) rval->rect; int w = ibuf->x + 3; int h = 515; float waveform_gamma = 0.2; @@ -161,17 +161,17 @@ static struct ImBuf *make_waveform_view_from_ibuf_byte(struct ImBuf * ibuf) wform_put_grid(tgt, w, h); for (x = 0; x < 256; x++) { - wtable[x] = (unsigned char) (pow(((float) x + 1)/256, - waveform_gamma)*255); + wtable[x] = (unsigned char) (pow(((float) x + 1) / 256, + waveform_gamma) * 255); } for (y = 0; y < ibuf->y; y++) { - unsigned char * last_p = NULL; + unsigned char *last_p = NULL; for (x = 0; x < ibuf->x; x++) { - unsigned char * rgb = src + 4 * (ibuf->x * y + x); + unsigned char *rgb = src + 4 * (ibuf->x * y + x); float v = (float)rgb_to_luma_byte(rgb) / 255.0f; - unsigned char * p = tgt; + unsigned char *p = tgt; p += 4 * (w * ((int) (v * (h - 3)) + 1) + x + 1); scope_put_pixel(wtable, p); @@ -190,12 +190,12 @@ static struct ImBuf *make_waveform_view_from_ibuf_byte(struct ImBuf * ibuf) return rval; } -static struct ImBuf *make_waveform_view_from_ibuf_float(struct ImBuf * ibuf) +static ImBuf *make_waveform_view_from_ibuf_float(ImBuf *ibuf) { - struct ImBuf * rval = IMB_allocImBuf(ibuf->x + 3, 515, 32, IB_rect); - int x,y; - float* src = ibuf->rect_float; - unsigned char* tgt = (unsigned char*) rval->rect; + ImBuf *rval = IMB_allocImBuf(ibuf->x + 3, 515, 32, IB_rect); + int x, y; + float *src = ibuf->rect_float; + unsigned char *tgt = (unsigned char *) rval->rect; int w = ibuf->x + 3; int h = 515; float waveform_gamma = 0.2; @@ -204,17 +204,17 @@ static struct ImBuf *make_waveform_view_from_ibuf_float(struct ImBuf * ibuf) wform_put_grid(tgt, w, h); for (x = 0; x < 256; x++) { - wtable[x] = (unsigned char) (pow(((float) x + 1)/256, - waveform_gamma)*255); + wtable[x] = (unsigned char) (pow(((float) x + 1) / 256, + waveform_gamma) * 255); } for (y = 0; y < ibuf->y; y++) { - unsigned char * last_p = NULL; + unsigned char *last_p = NULL; for (x = 0; x < ibuf->x; x++) { - float * rgb = src + 4 * (ibuf->x * y + x); + float *rgb = src + 4 * (ibuf->x * y + x); float v = rgb_to_luma(rgb); - unsigned char * p = tgt; + unsigned char *p = tgt; CLAMP(v, 0.0f, 1.0f); @@ -236,7 +236,7 @@ static struct ImBuf *make_waveform_view_from_ibuf_float(struct ImBuf * ibuf) return rval; } -struct ImBuf *make_waveform_view_from_ibuf(struct ImBuf * ibuf) +ImBuf *make_waveform_view_from_ibuf(ImBuf *ibuf) { if (ibuf->rect_float) { return make_waveform_view_from_ibuf_float(ibuf); @@ -247,15 +247,14 @@ struct ImBuf *make_waveform_view_from_ibuf(struct ImBuf * ibuf) } -static struct ImBuf *make_sep_waveform_view_from_ibuf_byte(struct ImBuf * ibuf) -{ - struct ImBuf * rval = IMB_allocImBuf( - ibuf->x + 3, 515, 32, IB_rect); - int x,y; - unsigned char* src = (unsigned char*) ibuf->rect; - unsigned char* tgt = (unsigned char*) rval->rect; +static ImBuf *make_sep_waveform_view_from_ibuf_byte(ImBuf *ibuf){ + ImBuf *rval = IMB_allocImBuf( + ibuf->x + 3, 515, 32, IB_rect); + int x, y; + unsigned char *src = (unsigned char *) ibuf->rect; + unsigned char *tgt = (unsigned char *) rval->rect; int w = ibuf->x + 3; - int sw = ibuf->x/3; + int sw = ibuf->x / 3; int h = 515; float waveform_gamma = 0.2; unsigned char wtable[256]; @@ -263,8 +262,8 @@ static struct ImBuf *make_sep_waveform_view_from_ibuf_byte(struct ImBuf * ibuf) wform_put_grid(tgt, w, h); for (x = 0; x < 256; x++) { - wtable[x] = (unsigned char) (pow(((float) x + 1)/256, - waveform_gamma)*255); + wtable[x] = (unsigned char) (pow(((float) x + 1) / 256, + waveform_gamma) * 255); } for (y = 0; y < ibuf->y; y++) { @@ -272,11 +271,11 @@ static struct ImBuf *make_sep_waveform_view_from_ibuf_byte(struct ImBuf * ibuf) for (x = 0; x < ibuf->x; x++) { int c; - unsigned char * rgb = src + 4 * (ibuf->x * y + x); + unsigned char *rgb = src + 4 * (ibuf->x * y + x); for (c = 0; c < 3; c++) { - unsigned char * p = tgt; - p += 4 * (w * ((rgb[c] * (h - 3))/255 + 1) - + c * sw + x/3 + 1); + unsigned char *p = tgt; + p += 4 * (w * ((rgb[c] * (h - 3)) / 255 + 1) + + c * sw + x / 3 + 1); scope_put_pixel_single(wtable, p, c); p += 4 * w; @@ -284,7 +283,7 @@ static struct ImBuf *make_sep_waveform_view_from_ibuf_byte(struct ImBuf * ibuf) if (last_p[c] != NULL) { wform_put_line_single( - w, last_p[c], p, c); + w, last_p[c], p, c); } last_p[c] = p; } @@ -296,16 +295,14 @@ static struct ImBuf *make_sep_waveform_view_from_ibuf_byte(struct ImBuf * ibuf) return rval; } -static struct ImBuf *make_sep_waveform_view_from_ibuf_float( - struct ImBuf * ibuf) +static ImBuf *make_sep_waveform_view_from_ibuf_float(ImBuf *ibuf) { - struct ImBuf * rval = IMB_allocImBuf( - ibuf->x + 3, 515, 32, IB_rect); - int x,y; - float* src = ibuf->rect_float; - unsigned char* tgt = (unsigned char*) rval->rect; + ImBuf *rval = IMB_allocImBuf(ibuf->x + 3, 515, 32, IB_rect); + int x, y; + float *src = ibuf->rect_float; + unsigned char *tgt = (unsigned char *) rval->rect; int w = ibuf->x + 3; - int sw = ibuf->x/3; + int sw = ibuf->x / 3; int h = 515; float waveform_gamma = 0.2; unsigned char wtable[256]; @@ -313,8 +310,8 @@ static struct ImBuf *make_sep_waveform_view_from_ibuf_float( wform_put_grid(tgt, w, h); for (x = 0; x < 256; x++) { - wtable[x] = (unsigned char) (pow(((float) x + 1)/256, - waveform_gamma)*255); + wtable[x] = (unsigned char) (pow(((float) x + 1) / 256, + waveform_gamma) * 255); } for (y = 0; y < ibuf->y; y++) { @@ -322,15 +319,15 @@ static struct ImBuf *make_sep_waveform_view_from_ibuf_float( for (x = 0; x < ibuf->x; x++) { int c; - float * rgb = src + 4 * (ibuf->x * y + x); + float *rgb = src + 4 * (ibuf->x * y + x); for (c = 0; c < 3; c++) { - unsigned char * p = tgt; + unsigned char *p = tgt; float v = rgb[c]; CLAMP(v, 0.0f, 1.0f); p += 4 * (w * ((int) (v * (h - 3)) + 1) - + c * sw + x/3 + 1); + + c * sw + x / 3 + 1); scope_put_pixel_single(wtable, p, c); p += 4 * w; @@ -338,7 +335,7 @@ static struct ImBuf *make_sep_waveform_view_from_ibuf_float( if (last_p[c] != NULL) { wform_put_line_single( - w, last_p[c], p, c); + w, last_p[c], p, c); } last_p[c] = p; } @@ -350,7 +347,7 @@ static struct ImBuf *make_sep_waveform_view_from_ibuf_float( return rval; } -struct ImBuf *make_sep_waveform_view_from_ibuf(struct ImBuf * ibuf) +ImBuf *make_sep_waveform_view_from_ibuf(ImBuf *ibuf) { if (ibuf->rect_float) { return make_sep_waveform_view_from_ibuf_float(ibuf); @@ -360,11 +357,11 @@ struct ImBuf *make_sep_waveform_view_from_ibuf(struct ImBuf * ibuf) } } -static void draw_zebra_byte(struct ImBuf * src,struct ImBuf * ibuf, float perc) +static void draw_zebra_byte(ImBuf *src, ImBuf *ibuf, float perc) { unsigned int limit = 255.0f * perc / 100.0f; - unsigned char * p = (unsigned char*) src->rect; - unsigned char * o = (unsigned char*) ibuf->rect; + unsigned char *p = (unsigned char *) src->rect; + unsigned char *o = (unsigned char *) ibuf->rect; int x; int y; @@ -391,11 +388,11 @@ static void draw_zebra_byte(struct ImBuf * src,struct ImBuf * ibuf, float perc) } -static void draw_zebra_float(struct ImBuf * src,struct ImBuf * ibuf,float perc) +static void draw_zebra_float(ImBuf *src, ImBuf *ibuf, float perc) { float limit = perc / 100.0f; - float * p = src->rect_float; - unsigned char * o = (unsigned char*) ibuf->rect; + float *p = src->rect_float; + unsigned char *o = (unsigned char *) ibuf->rect; int x; int y; @@ -422,9 +419,9 @@ static void draw_zebra_float(struct ImBuf * src,struct ImBuf * ibuf,float perc) } } -struct ImBuf * make_zebra_view_from_ibuf(struct ImBuf * src, float perc) +ImBuf *make_zebra_view_from_ibuf(ImBuf *src, float perc) { - struct ImBuf * ibuf = IMB_allocImBuf(src->x, src->y, 32, IB_rect); + ImBuf *ibuf = IMB_allocImBuf(src->x, src->y, 32, IB_rect); if (src->rect_float) { draw_zebra_float(src, ibuf, perc); @@ -435,23 +432,23 @@ struct ImBuf * make_zebra_view_from_ibuf(struct ImBuf * src, float perc) return ibuf; } -static void draw_histogram_marker(struct ImBuf * ibuf, int x) +static void draw_histogram_marker(ImBuf *ibuf, int x) { - unsigned char * p = (unsigned char*) ibuf->rect; + unsigned char *p = (unsigned char *) ibuf->rect; int barh = ibuf->y * 0.1; int i; p += 4 * (x + ibuf->x * (ibuf->y - barh + 1)); - for (i = 0; i < barh-1; i++) { + for (i = 0; i < barh - 1; i++) { p[0] = p[1] = p[2] = 255; p += ibuf->x * 4; } } -static void draw_histogram_bar(struct ImBuf * ibuf, int x,float val, int col) +static void draw_histogram_bar(ImBuf *ibuf, int x, float val, int col) { - unsigned char * p = (unsigned char*) ibuf->rect; + unsigned char *p = (unsigned char *) ibuf->rect; int barh = ibuf->y * val * 0.9f; int i; @@ -463,17 +460,16 @@ static void draw_histogram_bar(struct ImBuf * ibuf, int x,float val, int col) } } -static struct ImBuf *make_histogram_view_from_ibuf_byte( - struct ImBuf * ibuf) +static ImBuf *make_histogram_view_from_ibuf_byte(ImBuf *ibuf) { - struct ImBuf * rval = IMB_allocImBuf(515, 128, 32, IB_rect); - int c,x,y; + ImBuf *rval = IMB_allocImBuf(515, 128, 32, IB_rect); + int c, x, y; unsigned int n; - unsigned char* src = (unsigned char*) ibuf->rect; + unsigned char *src = (unsigned char *) ibuf->rect; unsigned int bins[3][256]; - memset(bins, 0, 3 * 256* sizeof(unsigned int)); + memset(bins, 0, 3 * 256 * sizeof(unsigned int)); for (y = 0; y < ibuf->y; y++) { for (x = 0; x < ibuf->x; x++) { @@ -495,14 +491,14 @@ static struct ImBuf *make_histogram_view_from_ibuf_byte( for (c = 0; c < 3; c++) { for (x = 0; x < 256; x++) { - draw_histogram_bar(rval, x*2+1, - ((float) bins[c][x])/n, c); - draw_histogram_bar(rval, x*2+2, - ((float) bins[c][x])/n, c); + draw_histogram_bar(rval, x * 2 + 1, + ((float) bins[c][x]) / n, c); + draw_histogram_bar(rval, x * 2 + 2, + ((float) bins[c][x]) / n, c); } } - wform_put_border((unsigned char*) rval->rect, rval->x, rval->y); + wform_put_border((unsigned char *) rval->rect, rval->x, rval->y); return rval; } @@ -519,16 +515,15 @@ static int get_bin_float(float f) return (int) (((f + 0.25f) / 1.5f) * 512); } -static struct ImBuf *make_histogram_view_from_ibuf_float( - struct ImBuf * ibuf) +static ImBuf *make_histogram_view_from_ibuf_float(ImBuf *ibuf) { - struct ImBuf * rval = IMB_allocImBuf(515, 128, 32, IB_rect); - int n,c,x,y; - float* src = ibuf->rect_float; + ImBuf *rval = IMB_allocImBuf(515, 128, 32, IB_rect); + int n, c, x, y; + float *src = ibuf->rect_float; unsigned int bins[3][512]; - memset(bins, 0, 3 * 256* sizeof(unsigned int)); + memset(bins, 0, 3 * 256 * sizeof(unsigned int)); for (y = 0; y < ibuf->y; y++) { for (x = 0; x < ibuf->x; x++) { @@ -552,16 +547,16 @@ static struct ImBuf *make_histogram_view_from_ibuf_float( } for (c = 0; c < 3; c++) { for (x = 0; x < 512; x++) { - draw_histogram_bar(rval, x+1, (float) bins[c][x]/n, c); + draw_histogram_bar(rval, x + 1, (float) bins[c][x] / n, c); } } - wform_put_border((unsigned char*) rval->rect, rval->x, rval->y); + wform_put_border((unsigned char *) rval->rect, rval->x, rval->y); return rval; } -struct ImBuf *make_histogram_view_from_ibuf(struct ImBuf * ibuf) +ImBuf *make_histogram_view_from_ibuf(ImBuf *ibuf) { if (ibuf->rect_float) { return make_histogram_view_from_ibuf_float(ibuf); @@ -572,21 +567,21 @@ struct ImBuf *make_histogram_view_from_ibuf(struct ImBuf * ibuf) } static void vectorscope_put_cross(unsigned char r, unsigned char g, - unsigned char b, - char * tgt, int w, int h, int size) + unsigned char b, + char *tgt, int w, int h, int size) { float rgb[3], yuv[3]; - char * p; + char *p; int x = 0; int y = 0; - rgb[0]= (float)r/255.0f; - rgb[1]= (float)g/255.0f; - rgb[2]= (float)b/255.0f; + rgb[0] = (float)r / 255.0f; + rgb[1] = (float)g / 255.0f; + rgb[2] = (float)b / 255.0f; rgb_to_yuv_normalized(rgb, yuv); p = tgt + 4 * (w * (int) ((yuv[2] * (h - 3) + 1)) - + (int) ((yuv[1] * (w - 3) + 1))); + + (int) ((yuv[1] * (w - 3) + 1))); if (r == 0 && g == 0 && b == 0) { r = 255; @@ -594,18 +589,18 @@ static void vectorscope_put_cross(unsigned char r, unsigned char g, for (y = -size; y <= size; y++) { for (x = -size; x <= size; x++) { - char * q = p + 4 * (y * w + x); + char *q = p + 4 * (y * w + x); q[0] = r; q[1] = g; q[2] = b; q[3] = 255; } } } -static struct ImBuf *make_vectorscope_view_from_ibuf_byte(struct ImBuf * ibuf) +static ImBuf *make_vectorscope_view_from_ibuf_byte(ImBuf *ibuf) { - struct ImBuf * rval = IMB_allocImBuf(515, 515, 32, IB_rect); - int x,y; - char* src = (char*) ibuf->rect; - char* tgt = (char*) rval->rect; + ImBuf *rval = IMB_allocImBuf(515, 515, 32, IB_rect); + int x, y; + char *src = (char *) ibuf->rect; + char *tgt = (char *) rval->rect; float rgb[3], yuv[3]; int w = 515; int h = 515; @@ -613,14 +608,14 @@ static struct ImBuf *make_vectorscope_view_from_ibuf_byte(struct ImBuf * ibuf) unsigned char wtable[256]; for (x = 0; x < 256; x++) { - wtable[x] = (unsigned char) (pow(((float) x + 1)/256, - scope_gamma)*255); + wtable[x] = (unsigned char) (pow(((float) x + 1) / 256, + scope_gamma) * 255); } for (x = 0; x <= 255; x++) { - vectorscope_put_cross(255 , 0,255 - x, tgt, w, h, 1); - vectorscope_put_cross(255 , x, 0, tgt, w, h, 1); - vectorscope_put_cross(255- x, 255, 0, tgt, w, h, 1); + vectorscope_put_cross(255, 0, 255 - x, tgt, w, h, 1); + vectorscope_put_cross(255, x, 0, tgt, w, h, 1); + vectorscope_put_cross(255 - x, 255, 0, tgt, w, h, 1); vectorscope_put_cross(0, 255, x, tgt, w, h, 1); vectorscope_put_cross(0, 255 - x, 255, tgt, w, h, 1); vectorscope_put_cross(x, 0, 255, tgt, w, h, 1); @@ -628,17 +623,17 @@ static struct ImBuf *make_vectorscope_view_from_ibuf_byte(struct ImBuf * ibuf) for (y = 0; y < ibuf->y; y++) { for (x = 0; x < ibuf->x; x++) { - char * src1 = src + 4 * (ibuf->x * y + x); - char * p; + char *src1 = src + 4 * (ibuf->x * y + x); + char *p; - rgb[0]= (float)src1[0]/255.0f; - rgb[1]= (float)src1[1]/255.0f; - rgb[2]= (float)src1[2]/255.0f; + rgb[0] = (float)src1[0] / 255.0f; + rgb[1] = (float)src1[1] / 255.0f; + rgb[2] = (float)src1[2] / 255.0f; rgb_to_yuv_normalized(rgb, yuv); p = tgt + 4 * (w * (int) ((yuv[2] * (h - 3) + 1)) - + (int) ((yuv[1] * (w - 3) + 1))); - scope_put_pixel(wtable, (unsigned char*)p); + + (int) ((yuv[1] * (w - 3) + 1))); + scope_put_pixel(wtable, (unsigned char *)p); } } @@ -647,12 +642,12 @@ static struct ImBuf *make_vectorscope_view_from_ibuf_byte(struct ImBuf * ibuf) return rval; } -static struct ImBuf *make_vectorscope_view_from_ibuf_float(struct ImBuf * ibuf) +static ImBuf *make_vectorscope_view_from_ibuf_float(ImBuf *ibuf) { - struct ImBuf * rval = IMB_allocImBuf(515, 515, 32, IB_rect); - int x,y; - float* src = ibuf->rect_float; - char* tgt = (char*) rval->rect; + ImBuf *rval = IMB_allocImBuf(515, 515, 32, IB_rect); + int x, y; + float *src = ibuf->rect_float; + char *tgt = (char *) rval->rect; float rgb[3], yuv[3]; int w = 515; int h = 515; @@ -660,14 +655,14 @@ static struct ImBuf *make_vectorscope_view_from_ibuf_float(struct ImBuf * ibuf) unsigned char wtable[256]; for (x = 0; x < 256; x++) { - wtable[x] = (unsigned char) (pow(((float) x + 1)/256, - scope_gamma)*255); + wtable[x] = (unsigned char) (pow(((float) x + 1) / 256, + scope_gamma) * 255); } for (x = 0; x <= 255; x++) { - vectorscope_put_cross(255 , 0,255 - x, tgt, w, h, 1); - vectorscope_put_cross(255 , x, 0, tgt, w, h, 1); - vectorscope_put_cross(255- x, 255, 0, tgt, w, h, 1); + vectorscope_put_cross(255, 0, 255 - x, tgt, w, h, 1); + vectorscope_put_cross(255, x, 0, tgt, w, h, 1); + vectorscope_put_cross(255 - x, 255, 0, tgt, w, h, 1); vectorscope_put_cross(0, 255, x, tgt, w, h, 1); vectorscope_put_cross(0, 255 - x, 255, tgt, w, h, 1); vectorscope_put_cross(x, 0, 255, tgt, w, h, 1); @@ -675,8 +670,8 @@ static struct ImBuf *make_vectorscope_view_from_ibuf_float(struct ImBuf * ibuf) for (y = 0; y < ibuf->y; y++) { for (x = 0; x < ibuf->x; x++) { - float * src1 = src + 4 * (ibuf->x * y + x); - char * p; + float *src1 = src + 4 * (ibuf->x * y + x); + char *p; memcpy(rgb, src1, 3 * sizeof(float)); @@ -687,8 +682,8 @@ static struct ImBuf *make_vectorscope_view_from_ibuf_float(struct ImBuf * ibuf) rgb_to_yuv_normalized(rgb, yuv); p = tgt + 4 * (w * (int) ((yuv[2] * (h - 3) + 1)) - + (int) ((yuv[1] * (w - 3) + 1))); - scope_put_pixel(wtable, (unsigned char*)p); + + (int) ((yuv[1] * (w - 3) + 1))); + scope_put_pixel(wtable, (unsigned char *)p); } } @@ -697,7 +692,7 @@ static struct ImBuf *make_vectorscope_view_from_ibuf_float(struct ImBuf * ibuf) return rval; } -struct ImBuf *make_vectorscope_view_from_ibuf(struct ImBuf * ibuf) +ImBuf *make_vectorscope_view_from_ibuf(ImBuf *ibuf) { if (ibuf->rect_float) { return make_vectorscope_view_from_ibuf_float(ibuf); diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c index 3bef389f2de..b8fc66cd3c3 100644 --- a/source/blender/editors/space_sequencer/sequencer_select.c +++ b/source/blender/editors/space_sequencer/sequencer_select.c @@ -63,19 +63,22 @@ /* own include */ #include "sequencer_intern.h" -static void *find_nearest_marker(int UNUSED(d1), int UNUSED(d2)) {return NULL;} +static void *find_nearest_marker(int UNUSED(d1), int UNUSED(d2)) +{ + return NULL; +} static void select_surrounding_handles(Scene *scene, Sequence *test) /* XXX BRING BACK */ { Sequence *neighbor; - neighbor=find_neighboring_sequence(scene, test, SEQ_SIDE_LEFT, -1); + neighbor = find_neighboring_sequence(scene, test, SEQ_SIDE_LEFT, -1); if (neighbor) { neighbor->flag |= SELECT; recurs_sel_seq(neighbor); neighbor->flag |= SEQ_RIGHTSEL; } - neighbor=find_neighboring_sequence(scene, test, SEQ_SIDE_RIGHT, -1); + neighbor = find_neighboring_sequence(scene, test, SEQ_SIDE_RIGHT, -1); if (neighbor) { neighbor->flag |= SELECT; recurs_sel_seq(neighbor); @@ -89,24 +92,24 @@ static void select_active_side(ListBase *seqbase, int sel_side, int channel, int { Sequence *seq; - for (seq= seqbase->first; seq; seq=seq->next) { - if (channel==seq->machine) { - switch(sel_side) { - case SEQ_SIDE_LEFT: - if (frame > (seq->startdisp)) { - seq->flag &= ~(SEQ_RIGHTSEL|SEQ_LEFTSEL); - seq->flag |= SELECT; - } - break; - case SEQ_SIDE_RIGHT: - if (frame < (seq->startdisp)) { - seq->flag &= ~(SEQ_RIGHTSEL|SEQ_LEFTSEL); - seq->flag |= SELECT; - } - break; - case SEQ_SIDE_BOTH: - seq->flag &= ~(SEQ_RIGHTSEL|SEQ_LEFTSEL); - break; + for (seq = seqbase->first; seq; seq = seq->next) { + if (channel == seq->machine) { + switch (sel_side) { + case SEQ_SIDE_LEFT: + if (frame > (seq->startdisp)) { + seq->flag &= ~(SEQ_RIGHTSEL | SEQ_LEFTSEL); + seq->flag |= SELECT; + } + break; + case SEQ_SIDE_RIGHT: + if (frame < (seq->startdisp)) { + seq->flag &= ~(SEQ_RIGHTSEL | SEQ_LEFTSEL); + seq->flag |= SELECT; + } + break; + case SEQ_SIDE_BOTH: + seq->flag &= ~(SEQ_RIGHTSEL | SEQ_LEFTSEL); + break; } } } @@ -117,28 +120,28 @@ static void select_linked_time(ListBase *seqbase, Sequence *seq_link) { Sequence *seq; - for (seq= seqbase->first; seq; seq=seq->next) { + for (seq = seqbase->first; seq; seq = seq->next) { if (seq_link->machine != seq->machine) { - int left_match = (seq->startdisp == seq_link->startdisp) ? 1:0; - int right_match = (seq->enddisp == seq_link->enddisp) ? 1:0; + int left_match = (seq->startdisp == seq_link->startdisp) ? 1 : 0; + int right_match = (seq->enddisp == seq_link->enddisp) ? 1 : 0; if (left_match && right_match) { /* a direct match, copy the selection settinhs */ - seq->flag &= ~(SELECT|SEQ_LEFTSEL|SEQ_RIGHTSEL); - seq->flag |= seq_link->flag & (SELECT|SEQ_LEFTSEL|SEQ_RIGHTSEL); + seq->flag &= ~(SELECT | SEQ_LEFTSEL | SEQ_RIGHTSEL); + seq->flag |= seq_link->flag & (SELECT | SEQ_LEFTSEL | SEQ_RIGHTSEL); recurs_sel_seq(seq); } else if (seq_link->flag & SELECT && (left_match || right_match)) { /* clear for reselection */ - seq->flag &= ~(SEQ_LEFTSEL|SEQ_RIGHTSEL); + seq->flag &= ~(SEQ_LEFTSEL | SEQ_RIGHTSEL); if (left_match && seq_link->flag & SEQ_LEFTSEL) - seq->flag |= SELECT|SEQ_LEFTSEL; + seq->flag |= SELECT | SEQ_LEFTSEL; if (right_match && seq_link->flag & SEQ_RIGHTSEL) - seq->flag |= SELECT|SEQ_RIGHTSEL; + seq->flag |= SELECT | SEQ_RIGHTSEL; recurs_sel_seq(seq); } @@ -149,9 +152,9 @@ static void select_linked_time(ListBase *seqbase, Sequence *seq_link) #if 0 // BRING BACK void select_surround_from_last(Scene *scene) { - Sequence *seq=get_last_seq(scene); + Sequence *seq = get_last_seq(scene); - if (seq==NULL) + if (seq == NULL) return; select_surrounding_handles(scene, seq); @@ -159,51 +162,51 @@ void select_surround_from_last(Scene *scene) #endif -static void UNUSED_FUNCTION(select_single_seq)(Scene *scene, Sequence *seq, int deselect_all) /* BRING BACK */ +static void UNUSED_FUNCTION(select_single_seq) (Scene * scene, Sequence * seq, int deselect_all) /* BRING BACK */ { - Editing *ed= seq_give_editing(scene, FALSE); + Editing *ed = seq_give_editing(scene, FALSE); if (deselect_all) deselect_all_seq(scene); seq_active_set(scene, seq); - if ((seq->type==SEQ_IMAGE) || (seq->type==SEQ_MOVIE)) { + if ((seq->type == SEQ_IMAGE) || (seq->type == SEQ_MOVIE)) { if (seq->strip) BLI_strncpy(ed->act_imagedir, seq->strip->dir, FILE_MAXDIR); } - else if (seq->type==SEQ_SOUND) { + else if (seq->type == SEQ_SOUND) { if (seq->strip) BLI_strncpy(ed->act_sounddir, seq->strip->dir, FILE_MAXDIR); } - seq->flag|= SELECT; + seq->flag |= SELECT; recurs_sel_seq(seq); } #if 0 static void select_neighbor_from_last(Scene *scene, int lr) { - Sequence *seq= seq_active_get(scene); + Sequence *seq = seq_active_get(scene); Sequence *neighbor; int change = 0; if (seq) { - neighbor=find_neighboring_sequence(scene, seq, lr, -1); + neighbor = find_neighboring_sequence(scene, seq, lr, -1); if (neighbor) { switch (lr) { - case SEQ_SIDE_LEFT: - neighbor->flag |= SELECT; - recurs_sel_seq(neighbor); - neighbor->flag |= SEQ_RIGHTSEL; - seq->flag |= SEQ_LEFTSEL; - break; - case SEQ_SIDE_RIGHT: - neighbor->flag |= SELECT; - recurs_sel_seq(neighbor); - neighbor->flag |= SEQ_LEFTSEL; - seq->flag |= SEQ_RIGHTSEL; - break; + case SEQ_SIDE_LEFT: + neighbor->flag |= SELECT; + recurs_sel_seq(neighbor); + neighbor->flag |= SEQ_RIGHTSEL; + seq->flag |= SEQ_LEFTSEL; + break; + case SEQ_SIDE_RIGHT: + neighbor->flag |= SELECT; + recurs_sel_seq(neighbor); + neighbor->flag |= SEQ_LEFTSEL; + seq->flag |= SEQ_RIGHTSEL; + break; } - seq->flag |= SELECT; - change = 1; + seq->flag |= SELECT; + change = 1; } } if (change) { @@ -268,7 +271,7 @@ void SEQUENCER_OT_select_all(struct wmOperatorType *ot) ot->poll = sequencer_edit_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; WM_operator_properties_select_all(ot); } @@ -277,21 +280,21 @@ void SEQUENCER_OT_select_all(struct wmOperatorType *ot) /* (de)select operator */ static int sequencer_select_inverse_exec(bContext *C, wmOperator *UNUSED(op)) { - Scene *scene= CTX_data_scene(C); - Editing *ed= seq_give_editing(scene, FALSE); + Scene *scene = CTX_data_scene(C); + Editing *ed = seq_give_editing(scene, FALSE); Sequence *seq; - for (seq= ed->seqbasep->first; seq; seq=seq->next) { + for (seq = ed->seqbasep->first; seq; seq = seq->next) { if (seq->flag & SELECT) { seq->flag &= ~SEQ_ALLSEL; } else { - seq->flag &= ~(SEQ_LEFTSEL+SEQ_RIGHTSEL); + seq->flag &= ~(SEQ_LEFTSEL + SEQ_RIGHTSEL); seq->flag |= SELECT; } } - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER|NA_SELECTED, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER | NA_SELECTED, scene); return OPERATOR_FINISHED; } @@ -308,40 +311,40 @@ void SEQUENCER_OT_select_inverse(struct wmOperatorType *ot) ot->poll = sequencer_edit_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event) { - View2D *v2d= UI_view2d_fromcontext(C); - Scene *scene= CTX_data_scene(C); - Editing *ed= seq_give_editing(scene, FALSE); - short extend= RNA_boolean_get(op->ptr, "extend"); - short linked_handle= RNA_boolean_get(op->ptr, "linked_handle"); - short left_right= RNA_boolean_get(op->ptr, "left_right"); - short linked_time= RNA_boolean_get(op->ptr, "linked_time"); + View2D *v2d = UI_view2d_fromcontext(C); + Scene *scene = CTX_data_scene(C); + Editing *ed = seq_give_editing(scene, FALSE); + short extend = RNA_boolean_get(op->ptr, "extend"); + short linked_handle = RNA_boolean_get(op->ptr, "linked_handle"); + short left_right = RNA_boolean_get(op->ptr, "left_right"); + short linked_time = RNA_boolean_get(op->ptr, "linked_time"); - Sequence *seq,*neighbor, *act_orig; - int hand,sel_side; + Sequence *seq, *neighbor, *act_orig; + int hand, sel_side; TimeMarker *marker; - if (ed==NULL) + if (ed == NULL) return OPERATOR_CANCELLED; - marker=find_nearest_marker(SCE_MARKERS, 1); //XXX - dummy function for now + marker = find_nearest_marker(SCE_MARKERS, 1); //XXX - dummy function for now - seq= find_nearest_seq(scene, v2d, &hand, event->mval); + seq = find_nearest_seq(scene, v2d, &hand, event->mval); // XXX - not nice, Ctrl+RMB needs to do left_right only when not over a strip if (seq && linked_time && left_right) - left_right= FALSE; + left_right = FALSE; if (marker) { int oldflag; /* select timeline marker */ if (extend) { - oldflag= marker->flag; + oldflag = marker->flag; if (oldflag & SELECT) marker->flag &= ~SELECT; else @@ -359,7 +362,8 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event) deselect_all_seq(scene); UI_view2d_region_to_view(v2d, event->mval[0], event->mval[1], &x, NULL); - SEQP_BEGIN(ed, seq) { + SEQP_BEGIN(ed, seq) + { if (x < CFRA) { if (seq->enddisp < CFRA) { seq->flag |= SELECT; @@ -376,14 +380,14 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event) SEQ_END { - SpaceSeq *sseq= CTX_wm_space_seq(C); + SpaceSeq *sseq = CTX_wm_space_seq(C); if (sseq && sseq->flag & SEQ_MARKER_TRANS) { TimeMarker *tmarker; - for (tmarker= scene->markers.first; tmarker; tmarker= tmarker->next) { - if ( ((x < CFRA) && tmarker->frame < CFRA) || - ((x >= CFRA) && tmarker->frame >= CFRA) - ) { + for (tmarker = scene->markers.first; tmarker; tmarker = tmarker->next) { + if (((x < CFRA) && tmarker->frame < CFRA) || + ((x >= CFRA) && tmarker->frame >= CFRA)) + { tmarker->flag |= SELECT; } else { @@ -396,9 +400,9 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event) else { // seq= find_nearest_seq(scene, v2d, &hand, mval); - act_orig= ed->act_seq; + act_orig = ed->act_seq; - if (extend == 0 && linked_handle==0) + if (extend == 0 && linked_handle == 0) deselect_all_seq(scene); if (seq) { @@ -416,29 +420,29 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event) } } - if (extend && (seq->flag & SELECT) && ed->act_seq == act_orig ) { - switch(hand) { - case SEQ_SIDE_NONE: - if (linked_handle==0) - seq->flag &= ~SEQ_ALLSEL; - break; - case SEQ_SIDE_LEFT: - seq->flag ^= SEQ_LEFTSEL; - break; - case SEQ_SIDE_RIGHT: - seq->flag ^= SEQ_RIGHTSEL; - break; + if (extend && (seq->flag & SELECT) && ed->act_seq == act_orig) { + switch (hand) { + case SEQ_SIDE_NONE: + if (linked_handle == 0) + seq->flag &= ~SEQ_ALLSEL; + break; + case SEQ_SIDE_LEFT: + seq->flag ^= SEQ_LEFTSEL; + break; + case SEQ_SIDE_RIGHT: + seq->flag ^= SEQ_RIGHTSEL; + break; } } else { seq->flag |= SELECT; - if (hand==SEQ_SIDE_LEFT) seq->flag |= SEQ_LEFTSEL; - if (hand==SEQ_SIDE_RIGHT) seq->flag |= SEQ_RIGHTSEL; + if (hand == SEQ_SIDE_LEFT) seq->flag |= SEQ_LEFTSEL; + if (hand == SEQ_SIDE_RIGHT) seq->flag |= SEQ_RIGHTSEL; } /* On Alt selection, select the strip and bordering handles */ if (linked_handle && !ELEM(hand, SEQ_SIDE_LEFT, SEQ_SIDE_RIGHT)) { - if (extend==0) deselect_all_seq(scene); + if (extend == 0) deselect_all_seq(scene); seq->flag |= SELECT; select_surrounding_handles(scene, seq); } @@ -448,48 +452,48 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event) * Second click selects all strips in that direction. * If there are no adjacent strips, it just selects all in that direction. */ - sel_side= hand; - neighbor=find_neighboring_sequence(scene, seq, sel_side, -1); + sel_side = hand; + neighbor = find_neighboring_sequence(scene, seq, sel_side, -1); if (neighbor) { switch (sel_side) { - case SEQ_SIDE_LEFT: - if ((seq->flag & SEQ_LEFTSEL) && (neighbor->flag & SEQ_RIGHTSEL)) { - if (extend==0) deselect_all_seq(scene); - seq->flag |= SELECT; - - select_active_side(ed->seqbasep, SEQ_SIDE_LEFT, seq->machine, seq->startdisp); - } - else { - if (extend==0) deselect_all_seq(scene); - seq->flag |= SELECT; - - neighbor->flag |= SELECT; - recurs_sel_seq(neighbor); - neighbor->flag |= SEQ_RIGHTSEL; - seq->flag |= SEQ_LEFTSEL; - } - break; - case SEQ_SIDE_RIGHT: - if ((seq->flag & SEQ_RIGHTSEL) && (neighbor->flag & SEQ_LEFTSEL)) { - if (extend==0) deselect_all_seq(scene); - seq->flag |= SELECT; - - select_active_side(ed->seqbasep, SEQ_SIDE_RIGHT, seq->machine, seq->startdisp); - } - else { - if (extend==0) deselect_all_seq(scene); - seq->flag |= SELECT; - - neighbor->flag |= SELECT; - recurs_sel_seq(neighbor); - neighbor->flag |= SEQ_LEFTSEL; - seq->flag |= SEQ_RIGHTSEL; - } - break; + case SEQ_SIDE_LEFT: + if ((seq->flag & SEQ_LEFTSEL) && (neighbor->flag & SEQ_RIGHTSEL)) { + if (extend == 0) deselect_all_seq(scene); + seq->flag |= SELECT; + + select_active_side(ed->seqbasep, SEQ_SIDE_LEFT, seq->machine, seq->startdisp); + } + else { + if (extend == 0) deselect_all_seq(scene); + seq->flag |= SELECT; + + neighbor->flag |= SELECT; + recurs_sel_seq(neighbor); + neighbor->flag |= SEQ_RIGHTSEL; + seq->flag |= SEQ_LEFTSEL; + } + break; + case SEQ_SIDE_RIGHT: + if ((seq->flag & SEQ_RIGHTSEL) && (neighbor->flag & SEQ_LEFTSEL)) { + if (extend == 0) deselect_all_seq(scene); + seq->flag |= SELECT; + + select_active_side(ed->seqbasep, SEQ_SIDE_RIGHT, seq->machine, seq->startdisp); + } + else { + if (extend == 0) deselect_all_seq(scene); + seq->flag |= SELECT; + + neighbor->flag |= SELECT; + recurs_sel_seq(neighbor); + neighbor->flag |= SEQ_LEFTSEL; + seq->flag |= SEQ_RIGHTSEL; + } + break; } } else { - if (extend==0) deselect_all_seq(scene); + if (extend == 0) deselect_all_seq(scene); select_active_side(ed->seqbasep, sel_side, seq->machine, seq->startdisp); } } @@ -506,12 +510,12 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event) if (marker) { int mval[2], xo, yo; // getmouseco_areawin(mval); - xo= mval[0]; - yo= mval[1]; + xo = mval[0]; + yo = mval[1]; while (get_mbut()) { // getmouseco_areawin(mval); - if (abs(mval[0]-xo)+abs(mval[1]-yo) > 4) { + if (abs(mval[0] - xo) + abs(mval[1] - yo) > 4) { transform_markers('g', 0); return; } @@ -519,10 +523,10 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event) } #endif - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER|NA_SELECTED, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER | NA_SELECTED, scene); /* allowing tweaks */ - return OPERATOR_FINISHED|OPERATOR_PASS_THROUGH; + return OPERATOR_FINISHED | OPERATOR_PASS_THROUGH; } void SEQUENCER_OT_select(wmOperatorType *ot) @@ -537,7 +541,7 @@ void SEQUENCER_OT_select(wmOperatorType *ot) ot->poll = ED_operator_sequencer_active; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend the selection"); @@ -553,12 +557,12 @@ void SEQUENCER_OT_select(wmOperatorType *ot) /* run recursively to select linked */ static int select_more_less_seq__internal(Scene *scene, int sel, int linked) { - Editing *ed= seq_give_editing(scene, FALSE); + Editing *ed = seq_give_editing(scene, FALSE); Sequence *seq, *neighbor; - int change=0; + int change = 0; int isel; - if (ed==NULL) return 0; + if (ed == NULL) return 0; if (sel) { sel = SELECT; @@ -571,27 +575,27 @@ static int select_more_less_seq__internal(Scene *scene, int sel, int linked) if (!linked) { /* if not linked we only want to touch each seq once, newseq */ - for (seq= ed->seqbasep->first; seq; seq= seq->next) { + for (seq = ed->seqbasep->first; seq; seq = seq->next) { seq->tmp = NULL; } } - for (seq= ed->seqbasep->first; seq; seq= seq->next) { + for (seq = ed->seqbasep->first; seq; seq = seq->next) { if ((int)(seq->flag & SELECT) == sel) { - if ((linked==0 && seq->tmp)==0) { + if ((linked == 0 && seq->tmp) == 0) { /* only get unselected nabours */ neighbor = find_neighboring_sequence(scene, seq, SEQ_SIDE_LEFT, isel); if (neighbor) { - if (sel) {neighbor->flag |= SELECT; recurs_sel_seq(neighbor);} - else neighbor->flag &= ~SELECT; - if (linked==0) neighbor->tmp = (Sequence *)1; + if (sel) {neighbor->flag |= SELECT; recurs_sel_seq(neighbor); } + else neighbor->flag &= ~SELECT; + if (linked == 0) neighbor->tmp = (Sequence *)1; change = 1; } neighbor = find_neighboring_sequence(scene, seq, SEQ_SIDE_RIGHT, isel); if (neighbor) { - if (sel) {neighbor->flag |= SELECT; recurs_sel_seq(neighbor);} - else neighbor->flag &= ~SELECT; - if (linked==0) neighbor->tmp = (void *)1; + if (sel) {neighbor->flag |= SELECT; recurs_sel_seq(neighbor); } + else neighbor->flag &= ~SELECT; + if (linked == 0) neighbor->tmp = (void *)1; change = 1; } } @@ -606,12 +610,12 @@ static int select_more_less_seq__internal(Scene *scene, int sel, int linked) /* select more operator */ static int sequencer_select_more_exec(bContext *C, wmOperator *UNUSED(op)) { - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); if (!select_more_less_seq__internal(scene, 0, 0)) return OPERATOR_CANCELLED; - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER|NA_SELECTED, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER | NA_SELECTED, scene); return OPERATOR_FINISHED; } @@ -628,7 +632,7 @@ void SEQUENCER_OT_select_more(wmOperatorType *ot) ot->poll = sequencer_edit_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ } @@ -637,12 +641,12 @@ void SEQUENCER_OT_select_more(wmOperatorType *ot) /* select less operator */ static int sequencer_select_less_exec(bContext *C, wmOperator *UNUSED(op)) { - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); if (!select_more_less_seq__internal(scene, 1, 0)) return OPERATOR_CANCELLED; - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER|NA_SELECTED, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER | NA_SELECTED, scene); return OPERATOR_FINISHED; } @@ -659,7 +663,7 @@ void SEQUENCER_OT_select_less(wmOperatorType *ot) ot->poll = sequencer_edit_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ } @@ -668,20 +672,20 @@ void SEQUENCER_OT_select_less(wmOperatorType *ot) /* select pick linked operator (uses the mouse) */ static int sequencer_select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent *event) { - Scene *scene= CTX_data_scene(C); - View2D *v2d= UI_view2d_fromcontext(C); + Scene *scene = CTX_data_scene(C); + View2D *v2d = UI_view2d_fromcontext(C); - short extend= RNA_boolean_get(op->ptr, "extend"); + short extend = RNA_boolean_get(op->ptr, "extend"); Sequence *mouse_seq; int selected, hand; /* this works like UV, not mesh */ - mouse_seq= find_nearest_seq(scene, v2d, &hand, event->mval); + mouse_seq = find_nearest_seq(scene, v2d, &hand, event->mval); if (!mouse_seq) - return OPERATOR_FINISHED; /* user error as with mesh?? */ + return OPERATOR_FINISHED; /* user error as with mesh?? */ - if (extend==0) + if (extend == 0) deselect_all_seq(scene); mouse_seq->flag |= SELECT; @@ -692,7 +696,7 @@ static int sequencer_select_linked_pick_invoke(bContext *C, wmOperator *op, wmEv selected = select_more_less_seq__internal(scene, 1, 1); } - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER|NA_SELECTED, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER | NA_SELECTED, scene); return OPERATOR_FINISHED; } @@ -709,7 +713,7 @@ void SEQUENCER_OT_select_linked_pick(wmOperatorType *ot) ot->poll = ED_operator_sequencer_active; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend the selection"); @@ -719,7 +723,7 @@ void SEQUENCER_OT_select_linked_pick(wmOperatorType *ot) /* select linked operator */ static int sequencer_select_linked_exec(bContext *C, wmOperator *UNUSED(op)) { - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); int selected; selected = 1; @@ -727,7 +731,7 @@ static int sequencer_select_linked_exec(bContext *C, wmOperator *UNUSED(op)) selected = select_more_less_seq__internal(scene, 1, 1); } - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER|NA_SELECTED, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER | NA_SELECTED, scene); return OPERATOR_FINISHED; } @@ -744,7 +748,7 @@ void SEQUENCER_OT_select_linked(wmOperatorType *ot) ot->poll = sequencer_edit_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ } @@ -753,31 +757,31 @@ void SEQUENCER_OT_select_linked(wmOperatorType *ot) /* select handles operator */ static int sequencer_select_handles_exec(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); - Editing *ed= seq_give_editing(scene, 0); + Scene *scene = CTX_data_scene(C); + Editing *ed = seq_give_editing(scene, 0); Sequence *seq; - int sel_side= RNA_enum_get(op->ptr, "side"); + int sel_side = RNA_enum_get(op->ptr, "side"); - for (seq= ed->seqbasep->first; seq; seq=seq->next) { + for (seq = ed->seqbasep->first; seq; seq = seq->next) { if (seq->flag & SELECT) { - switch(sel_side) { - case SEQ_SIDE_LEFT: - seq->flag &= ~SEQ_RIGHTSEL; - seq->flag |= SEQ_LEFTSEL; - break; - case SEQ_SIDE_RIGHT: - seq->flag &= ~SEQ_LEFTSEL; - seq->flag |= SEQ_RIGHTSEL; - break; - case SEQ_SIDE_BOTH: - seq->flag |= SEQ_LEFTSEL+SEQ_RIGHTSEL; - break; + switch (sel_side) { + case SEQ_SIDE_LEFT: + seq->flag &= ~SEQ_RIGHTSEL; + seq->flag |= SEQ_LEFTSEL; + break; + case SEQ_SIDE_RIGHT: + seq->flag &= ~SEQ_LEFTSEL; + seq->flag |= SEQ_RIGHTSEL; + break; + case SEQ_SIDE_BOTH: + seq->flag |= SEQ_LEFTSEL + SEQ_RIGHTSEL; + break; } } } - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER|NA_SELECTED, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER | NA_SELECTED, scene); return OPERATOR_FINISHED; } @@ -794,7 +798,7 @@ void SEQUENCER_OT_select_handles(wmOperatorType *ot) ot->poll = sequencer_edit_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ RNA_def_enum(ot->srna, "side", prop_side_types, SEQ_SIDE_BOTH, "Side", "The side of the handle that is selected"); @@ -803,18 +807,18 @@ void SEQUENCER_OT_select_handles(wmOperatorType *ot) /* select side operator */ static int sequencer_select_active_side_exec(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); - Editing *ed= seq_give_editing(scene, 0); - Sequence *seq_act= seq_active_get(scene); + Scene *scene = CTX_data_scene(C); + Editing *ed = seq_give_editing(scene, 0); + Sequence *seq_act = seq_active_get(scene); - if (ed==NULL || seq_act==NULL) + if (ed == NULL || seq_act == NULL) return OPERATOR_CANCELLED; seq_act->flag |= SELECT; select_active_side(ed->seqbasep, RNA_enum_get(op->ptr, "side"), seq_act->machine, seq_act->startdisp); - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER|NA_SELECTED, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER | NA_SELECTED, scene); return OPERATOR_FINISHED; } @@ -831,7 +835,7 @@ void SEQUENCER_OT_select_active_side(wmOperatorType *ot) ot->poll = sequencer_edit_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ RNA_def_enum(ot->srna, "side", prop_side_types, SEQ_SIDE_BOTH, "Side", "The side of the handle that is selected"); @@ -841,18 +845,18 @@ void SEQUENCER_OT_select_active_side(wmOperatorType *ot) /* borderselect operator */ static int sequencer_borderselect_exec(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); - Editing *ed= seq_give_editing(scene, FALSE); - View2D *v2d= UI_view2d_fromcontext(C); + Scene *scene = CTX_data_scene(C); + Editing *ed = seq_give_editing(scene, FALSE); + View2D *v2d = UI_view2d_fromcontext(C); Sequence *seq; rcti rect; rctf rectf, rq; - short selecting = (RNA_int_get(op->ptr, "gesture_mode")==GESTURE_MODAL_SELECT); + short selecting = (RNA_int_get(op->ptr, "gesture_mode") == GESTURE_MODAL_SELECT); int extend = RNA_boolean_get(op->ptr, "extend"); int mval[2]; - if (ed==NULL) + if (ed == NULL) return OPERATOR_CANCELLED; rect.xmin = RNA_int_get(op->ptr, "xmin"); @@ -860,19 +864,19 @@ static int sequencer_borderselect_exec(bContext *C, wmOperator *op) rect.xmax = RNA_int_get(op->ptr, "xmax"); rect.ymax = RNA_int_get(op->ptr, "ymax"); - mval[0]= rect.xmin; - mval[1]= rect.ymin; + mval[0] = rect.xmin; + mval[1] = rect.ymin; UI_view2d_region_to_view(v2d, mval[0], mval[1], &rectf.xmin, &rectf.ymin); - mval[0]= rect.xmax; - mval[1]= rect.ymax; + mval[0] = rect.xmax; + mval[1] = rect.ymax; UI_view2d_region_to_view(v2d, mval[0], mval[1], &rectf.xmax, &rectf.ymax); - for (seq= ed->seqbasep->first; seq; seq= seq->next) { + for (seq = ed->seqbasep->first; seq; seq = seq->next) { seq_rectf(seq, &rq); if (BLI_isect_rctf(&rq, &rectf, NULL)) { - if (selecting) seq->flag |= SELECT; - else seq->flag &= ~SEQ_ALLSEL; + if (selecting) seq->flag |= SELECT; + else seq->flag &= ~SEQ_ALLSEL; recurs_sel_seq(seq); } else if (!extend) { @@ -881,7 +885,7 @@ static int sequencer_borderselect_exec(bContext *C, wmOperator *op) } } - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER|NA_SELECTED, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER | NA_SELECTED, scene); return OPERATOR_FINISHED; } @@ -904,7 +908,7 @@ void SEQUENCER_OT_select_border(wmOperatorType *ot) ot->poll = ED_operator_sequencer_active; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* rna */ WM_operator_properties_gesture_border(ot, TRUE); @@ -916,11 +920,11 @@ static EnumPropertyItem sequencer_prop_select_grouped_types[] = { {1, "TYPE", 0, "Type", "Shared strip type"}, {2, "TYPE_BASIC", 0, "Global Type", "All strips of same basic type (Graphical or Sound)"}, {3, "TYPE_EFFECT", 0, "Effect Type", - "Shared strip effect type (if active strip is not an effect one, select all non-effect strips)"}, + "Shared strip effect type (if active strip is not an effect one, select all non-effect strips)"}, {4, "DATA", 0, "Data", "Shared data (scene, image, sound, etc.)"}, {5, "EFFECT", 0, "Effect", "Shared effects"}, {6, "EFFECT_LINK", 0, "Effect/Linked", - "Other strips affected by the active one (sharing some time, and below or effect-assigned)"}, + "Other strips affected by the active one (sharing some time, and below or effect-assigned)"}, {7, "OVERLAP", 0, "Overlap", "Overlapping time"}, {0, NULL, 0, NULL, NULL} }; @@ -1027,7 +1031,7 @@ static short select_grouped_effect(Editing *ed, Sequence *actseq) { Sequence *seq; short changed = FALSE; - short effects[SEQ_EFFECT_MAX+1]; + short effects[SEQ_EFFECT_MAX + 1]; int i; for (i = 0; i <= SEQ_EFFECT_MAX; i++) @@ -1084,7 +1088,7 @@ static short select_grouped_effect_link(Editing *ed, Sequence *actseq) } SEQ_END; - actseq->tmp= SET_INT_IN_POINTER(TRUE); + actseq->tmp = SET_INT_IN_POINTER(TRUE); for (seq_begin(ed, &iter, 1); iter.valid; seq_next(&iter)) { seq = iter.seq; @@ -1106,7 +1110,7 @@ static short select_grouped_effect_link(Editing *ed, Sequence *actseq) if (enddisp < seq->enddisp) enddisp = seq->enddisp; if (machine < seq->machine) machine = seq->machine; - seq->tmp= SET_INT_IN_POINTER(TRUE); + seq->tmp = SET_INT_IN_POINTER(TRUE); seq->flag |= SELECT; changed = TRUE; @@ -1154,16 +1158,16 @@ static int sequencer_select_grouped_exec(bContext *C, wmOperator *op) SEQ_END; } - if (type==1) changed |= select_grouped_type(ed, actseq); - else if (type==2) changed |= select_grouped_type_basic(ed, actseq); - else if (type==3) changed |= select_grouped_type_effect(ed, actseq); - else if (type==4) changed |= select_grouped_data(ed, actseq); - else if (type==5) changed |= select_grouped_effect(ed, actseq); - else if (type==6) changed |= select_grouped_effect_link(ed, actseq); - else if (type==7) changed |= select_grouped_time_overlap(ed, actseq); + if (type == 1) changed |= select_grouped_type(ed, actseq); + else if (type == 2) changed |= select_grouped_type_basic(ed, actseq); + else if (type == 3) changed |= select_grouped_type_effect(ed, actseq); + else if (type == 4) changed |= select_grouped_data(ed, actseq); + else if (type == 5) changed |= select_grouped_effect(ed, actseq); + else if (type == 6) changed |= select_grouped_effect_link(ed, actseq); + else if (type == 7) changed |= select_grouped_time_overlap(ed, actseq); if (changed) { - WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER|NA_SELECTED, scene); + WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER | NA_SELECTED, scene); return OPERATOR_FINISHED; } @@ -1183,7 +1187,7 @@ void SEQUENCER_OT_select_grouped(wmOperatorType *ot) ot->poll = sequencer_edit_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first"); diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c index fe6ff40922e..82965426b6d 100644 --- a/source/blender/editors/space_sequencer/space_sequencer.c +++ b/source/blender/editors/space_sequencer/space_sequencer.c @@ -56,7 +56,7 @@ #include "UI_resources.h" #include "UI_view2d.h" -#include "sequencer_intern.h" // own include +#include "sequencer_intern.h" // own include /* ******************** manage regions ********************* */ @@ -64,20 +64,20 @@ ARegion *sequencer_has_buttons_region(ScrArea *sa) { ARegion *ar, *arnew; - ar= BKE_area_find_region_type(sa, RGN_TYPE_UI); + ar = BKE_area_find_region_type(sa, RGN_TYPE_UI); if (ar) return ar; /* add subdiv level; after header */ - ar= BKE_area_find_region_type(sa, RGN_TYPE_HEADER); + ar = BKE_area_find_region_type(sa, RGN_TYPE_HEADER); /* is error! */ - if (ar==NULL) return NULL; + if (ar == NULL) return NULL; - arnew= MEM_callocN(sizeof(ARegion), "buttons for sequencer"); + arnew = MEM_callocN(sizeof(ARegion), "buttons for sequencer"); BLI_insertlinkafter(&sa->regionbase, ar, arnew); - arnew->regiontype= RGN_TYPE_UI; - arnew->alignment= RGN_ALIGN_RIGHT; + arnew->regiontype = RGN_TYPE_UI; + arnew->alignment = RGN_ALIGN_RIGHT; arnew->flag = RGN_FLAG_HIDDEN; @@ -86,10 +86,10 @@ ARegion *sequencer_has_buttons_region(ScrArea *sa) static ARegion *sequencer_find_region(ScrArea *sa, short type) { - ARegion *ar=NULL; + ARegion *ar = NULL; - for (ar= sa->regionbase.first; ar; ar= ar->next) - if (ar->regiontype==type) + for (ar = sa->regionbase.first; ar; ar = ar->next) + if (ar->regiontype == type) return ar; return ar; @@ -99,59 +99,59 @@ static ARegion *sequencer_find_region(ScrArea *sa, short type) static SpaceLink *sequencer_new(const bContext *C) { - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); ARegion *ar; SpaceSeq *sseq; - sseq= MEM_callocN(sizeof(SpaceSeq), "initsequencer"); - sseq->spacetype= SPACE_SEQ; + sseq = MEM_callocN(sizeof(SpaceSeq), "initsequencer"); + sseq->spacetype = SPACE_SEQ; sseq->chanshown = 0; sseq->view = SEQ_VIEW_SEQUENCE; sseq->mainb = SEQ_DRAW_IMG_IMBUF; /* header */ - ar= MEM_callocN(sizeof(ARegion), "header for sequencer"); + ar = MEM_callocN(sizeof(ARegion), "header for sequencer"); BLI_addtail(&sseq->regionbase, ar); - ar->regiontype= RGN_TYPE_HEADER; - ar->alignment= RGN_ALIGN_BOTTOM; + ar->regiontype = RGN_TYPE_HEADER; + ar->alignment = RGN_ALIGN_BOTTOM; /* buttons/list view */ - ar= MEM_callocN(sizeof(ARegion), "buttons for sequencer"); + ar = MEM_callocN(sizeof(ARegion), "buttons for sequencer"); BLI_addtail(&sseq->regionbase, ar); - ar->regiontype= RGN_TYPE_UI; - ar->alignment= RGN_ALIGN_RIGHT; + ar->regiontype = RGN_TYPE_UI; + ar->alignment = RGN_ALIGN_RIGHT; ar->flag = RGN_FLAG_HIDDEN; /* preview area */ /* NOTE: if you change values here, also change them in sequencer_init_preview_region */ - ar= MEM_callocN(sizeof(ARegion), "preview area for sequencer"); + ar = MEM_callocN(sizeof(ARegion), "preview area for sequencer"); BLI_addtail(&sseq->regionbase, ar); - ar->regiontype= RGN_TYPE_PREVIEW; - ar->alignment= RGN_ALIGN_TOP; + ar->regiontype = RGN_TYPE_PREVIEW; + ar->alignment = RGN_ALIGN_TOP; ar->flag |= RGN_FLAG_HIDDEN; /* for now, aspect ratio should be maintained, and zoom is clamped within sane default limits */ - ar->v2d.keepzoom= V2D_KEEPASPECT | V2D_KEEPZOOM; - ar->v2d.minzoom= 0.00001f; - ar->v2d.maxzoom= 100000.0f; + ar->v2d.keepzoom = V2D_KEEPASPECT | V2D_KEEPZOOM; + ar->v2d.minzoom = 0.00001f; + ar->v2d.maxzoom = 100000.0f; ar->v2d.tot.xmin = -960.0f; /* 1920 width centered */ ar->v2d.tot.ymin = -540.0f; /* 1080 height centered */ ar->v2d.tot.xmax = 960.0f; ar->v2d.tot.ymax = 540.0f; - ar->v2d.min[0]= 0.0f; - ar->v2d.min[1]= 0.0f; - ar->v2d.max[0]= 12000.0f; - ar->v2d.max[1]= 12000.0f; - ar->v2d.cur= ar->v2d.tot; - ar->v2d.align= V2D_ALIGN_FREE; - ar->v2d.keeptot= V2D_KEEPTOT_FREE; + ar->v2d.min[0] = 0.0f; + ar->v2d.min[1] = 0.0f; + ar->v2d.max[0] = 12000.0f; + ar->v2d.max[1] = 12000.0f; + ar->v2d.cur = ar->v2d.tot; + ar->v2d.align = V2D_ALIGN_FREE; + ar->v2d.keeptot = V2D_KEEPTOT_FREE; /* main area */ - ar= MEM_callocN(sizeof(ARegion), "main area for sequencer"); + ar = MEM_callocN(sizeof(ARegion), "main area for sequencer"); BLI_addtail(&sseq->regionbase, ar); - ar->regiontype= RGN_TYPE_WINDOW; + ar->regiontype = RGN_TYPE_WINDOW; /* seq space goes from (0,8) to (0, efra) */ @@ -161,22 +161,22 @@ static SpaceLink *sequencer_new(const bContext *C) ar->v2d.tot.xmax = scene->r.efra; ar->v2d.tot.ymax = 8.0f; - ar->v2d.cur= ar->v2d.tot; + ar->v2d.cur = ar->v2d.tot; - ar->v2d.min[0]= 10.0f; - ar->v2d.min[1]= 0.5f; + ar->v2d.min[0] = 10.0f; + ar->v2d.min[1] = 0.5f; - ar->v2d.max[0]= MAXFRAMEF; - ar->v2d.max[1]= MAXSEQ; + ar->v2d.max[0] = MAXFRAMEF; + ar->v2d.max[1] = MAXSEQ; - ar->v2d.minzoom= 0.01f; - ar->v2d.maxzoom= 100.0f; - - ar->v2d.scroll |= (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL); - ar->v2d.scroll |= (V2D_SCROLL_LEFT|V2D_SCROLL_SCALE_VERTICAL); - ar->v2d.keepzoom= 0; - ar->v2d.keeptot= 0; - ar->v2d.align= V2D_ALIGN_NO_NEG_Y; + ar->v2d.minzoom = 0.01f; + ar->v2d.maxzoom = 100.0f; + + ar->v2d.scroll |= (V2D_SCROLL_BOTTOM | V2D_SCROLL_SCALE_HORIZONTAL); + ar->v2d.scroll |= (V2D_SCROLL_LEFT | V2D_SCROLL_SCALE_VERTICAL); + ar->v2d.keepzoom = 0; + ar->v2d.keeptot = 0; + ar->v2d.align = V2D_ALIGN_NO_NEG_Y; return (SpaceLink *)sseq; } @@ -199,76 +199,76 @@ static void sequencer_init(struct wmWindowManager *UNUSED(wm), ScrArea *UNUSED(s static void sequencer_refresh(const bContext *C, ScrArea *sa) { - wmWindowManager *wm= CTX_wm_manager(C); - wmWindow *window= CTX_wm_window(C); - SpaceSeq *sseq= (SpaceSeq *)sa->spacedata.first; - ARegion *ar_main= sequencer_find_region(sa, RGN_TYPE_WINDOW); - ARegion *ar_preview= sequencer_find_region(sa, RGN_TYPE_PREVIEW); - int view_changed= 0; + wmWindowManager *wm = CTX_wm_manager(C); + wmWindow *window = CTX_wm_window(C); + SpaceSeq *sseq = (SpaceSeq *)sa->spacedata.first; + ARegion *ar_main = sequencer_find_region(sa, RGN_TYPE_WINDOW); + ARegion *ar_preview = sequencer_find_region(sa, RGN_TYPE_PREVIEW); + int view_changed = 0; switch (sseq->view) { case SEQ_VIEW_SEQUENCE: if (ar_main && (ar_main->flag & RGN_FLAG_HIDDEN)) { ar_main->flag &= ~RGN_FLAG_HIDDEN; ar_main->v2d.flag &= ~V2D_IS_INITIALISED; - view_changed= 1; + view_changed = 1; } if (ar_preview && !(ar_preview->flag & RGN_FLAG_HIDDEN)) { ar_preview->flag |= RGN_FLAG_HIDDEN; ar_preview->v2d.flag &= ~V2D_IS_INITIALISED; - WM_event_remove_handlers((bContext*)C, &ar_preview->handlers); - view_changed= 1; + WM_event_remove_handlers((bContext *)C, &ar_preview->handlers); + view_changed = 1; } if (ar_main && ar_main->alignment != RGN_ALIGN_NONE) { - ar_main->alignment= RGN_ALIGN_NONE; - view_changed= 1; + ar_main->alignment = RGN_ALIGN_NONE; + view_changed = 1; } if (ar_preview && ar_preview->alignment != RGN_ALIGN_NONE) { - ar_preview->alignment= RGN_ALIGN_NONE; - view_changed= 1; + ar_preview->alignment = RGN_ALIGN_NONE; + view_changed = 1; } break; case SEQ_VIEW_PREVIEW: if (ar_main && !(ar_main->flag & RGN_FLAG_HIDDEN)) { ar_main->flag |= RGN_FLAG_HIDDEN; ar_main->v2d.flag &= ~V2D_IS_INITIALISED; - WM_event_remove_handlers((bContext*)C, &ar_main->handlers); - view_changed= 1; + WM_event_remove_handlers((bContext *)C, &ar_main->handlers); + view_changed = 1; } if (ar_preview && (ar_preview->flag & RGN_FLAG_HIDDEN)) { ar_preview->flag &= ~RGN_FLAG_HIDDEN; ar_preview->v2d.flag &= ~V2D_IS_INITIALISED; ar_preview->v2d.cur = ar_preview->v2d.tot; - view_changed= 1; + view_changed = 1; } if (ar_main && ar_main->alignment != RGN_ALIGN_NONE) { - ar_main->alignment= RGN_ALIGN_NONE; - view_changed= 1; + ar_main->alignment = RGN_ALIGN_NONE; + view_changed = 1; } if (ar_preview && ar_preview->alignment != RGN_ALIGN_NONE) { - ar_preview->alignment= RGN_ALIGN_NONE; - view_changed= 1; + ar_preview->alignment = RGN_ALIGN_NONE; + view_changed = 1; } break; case SEQ_VIEW_SEQUENCE_PREVIEW: if (ar_main && (ar_main->flag & RGN_FLAG_HIDDEN)) { ar_main->flag &= ~RGN_FLAG_HIDDEN; ar_main->v2d.flag &= ~V2D_IS_INITIALISED; - view_changed= 1; + view_changed = 1; } if (ar_preview && (ar_preview->flag & RGN_FLAG_HIDDEN)) { ar_preview->flag &= ~RGN_FLAG_HIDDEN; ar_preview->v2d.flag &= ~V2D_IS_INITIALISED; ar_preview->v2d.cur = ar_preview->v2d.tot; - view_changed= 1; + view_changed = 1; } if (ar_main && ar_main->alignment != RGN_ALIGN_NONE) { - ar_main->alignment= RGN_ALIGN_NONE; - view_changed= 1; + ar_main->alignment = RGN_ALIGN_NONE; + view_changed = 1; } if (ar_preview && ar_preview->alignment != RGN_ALIGN_TOP) { - ar_preview->alignment= RGN_ALIGN_TOP; - view_changed= 1; + ar_preview->alignment = RGN_ALIGN_TOP; + view_changed = 1; } break; } @@ -281,7 +281,7 @@ static void sequencer_refresh(const bContext *C, ScrArea *sa) static SpaceLink *sequencer_duplicate(SpaceLink *sl) { - SpaceSeq *sseqn= MEM_dupallocN(sl); + SpaceSeq *sseqn = MEM_dupallocN(sl); /* clear or remove stuff from old */ // XXX sseq->gpd= gpencil_data_duplicate(sseq->gpd); @@ -308,7 +308,7 @@ static void sequencer_main_area_init(wmWindowManager *wm, ARegion *ar) WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); /* add drop boxes */ - lb= WM_dropboxmap_find("Sequencer", SPACE_SEQ, RGN_TYPE_WINDOW); + lb = WM_dropboxmap_find("Sequencer", SPACE_SEQ, RGN_TYPE_WINDOW); WM_event_add_dropbox_handler(&ar->handlers, lb); @@ -326,24 +326,24 @@ static void sequencer_main_area_draw(const bContext *C, ARegion *ar) static int image_drop_poll(bContext *UNUSED(C), wmDrag *drag, wmEvent *UNUSED(event)) { - if (drag->type==WM_DRAG_PATH) - if (ELEM(drag->icon, ICON_FILE_IMAGE, ICON_FILE_BLANK)) /* rule might not work? */ + if (drag->type == WM_DRAG_PATH) + if (ELEM(drag->icon, ICON_FILE_IMAGE, ICON_FILE_BLANK)) /* rule might not work? */ return 1; return 0; } static int movie_drop_poll(bContext *UNUSED(C), wmDrag *drag, wmEvent *UNUSED(event)) { - if (drag->type==WM_DRAG_PATH) - if (ELEM3(drag->icon, 0, ICON_FILE_MOVIE, ICON_FILE_BLANK)) /* rule might not work? */ + if (drag->type == WM_DRAG_PATH) + if (ELEM3(drag->icon, 0, ICON_FILE_MOVIE, ICON_FILE_BLANK)) /* rule might not work? */ return 1; return 0; } static int sound_drop_poll(bContext *UNUSED(C), wmDrag *drag, wmEvent *UNUSED(event)) { - if (drag->type==WM_DRAG_PATH) - if (ELEM(drag->icon, ICON_FILE_SOUND, ICON_FILE_BLANK)) /* rule might not work? */ + if (drag->type == WM_DRAG_PATH) + if (ELEM(drag->icon, ICON_FILE_SOUND, ICON_FILE_BLANK)) /* rule might not work? */ return 1; return 0; } @@ -371,7 +371,7 @@ static void sequencer_drop_copy(wmDrag *drag, wmDropBox *drop) /* this region dropbox definition */ static void sequencer_dropboxes(void) { - ListBase *lb= WM_dropboxmap_find("Sequencer", SPACE_SEQ, RGN_TYPE_WINDOW); + ListBase *lb = WM_dropboxmap_find("Sequencer", SPACE_SEQ, RGN_TYPE_WINDOW); WM_dropbox_add(lb, "SEQUENCER_OT_image_strip_add", image_drop_poll, sequencer_drop_copy); WM_dropbox_add(lb, "SEQUENCER_OT_movie_strip_add", movie_drop_poll, sequencer_drop_copy); @@ -394,9 +394,9 @@ static void sequencer_header_area_draw(const bContext *C, ARegion *ar) static void sequencer_main_area_listener(ARegion *ar, wmNotifier *wmn) { /* context changes */ - switch(wmn->category) { + switch (wmn->category) { case NC_SCENE: - switch(wmn->data) { + switch (wmn->data) { case ND_FRAME: case ND_FRAME_RANGE: case ND_MARKERS: @@ -434,9 +434,9 @@ static void sequencer_preview_area_init(wmWindowManager *wm, ARegion *ar) static void sequencer_preview_area_draw(const bContext *C, ARegion *ar) { - ScrArea *sa= CTX_wm_area(C); - SpaceSeq *sseq= sa->spacedata.first; - Scene *scene= CTX_data_scene(C); + ScrArea *sa = CTX_wm_area(C); + SpaceSeq *sseq = sa->spacedata.first; + Scene *scene = CTX_data_scene(C); /* XXX temp fix for wrong setting in sseq->mainb */ if (sseq->mainb == SEQ_DRAW_SEQUENCE) sseq->mainb = SEQ_DRAW_IMG_IMBUF; @@ -447,9 +447,9 @@ static void sequencer_preview_area_draw(const bContext *C, ARegion *ar) int over_cfra; if (scene->ed->over_flag & SEQ_EDIT_OVERLAY_ABS) - over_cfra= scene->ed->over_cfra; + over_cfra = scene->ed->over_cfra; else - over_cfra= scene->r.cfra + scene->ed->over_ofs; + over_cfra = scene->r.cfra + scene->ed->over_ofs; if (over_cfra != scene->r.cfra) draw_image_seq(C, scene, ar, sseq, scene->r.cfra, over_cfra - scene->r.cfra); @@ -460,9 +460,9 @@ static void sequencer_preview_area_draw(const bContext *C, ARegion *ar) static void sequencer_preview_area_listener(ARegion *ar, wmNotifier *wmn) { /* context changes */ - switch(wmn->category) { + switch (wmn->category) { case NC_SCENE: - switch(wmn->data) { + switch (wmn->data) { case ND_FRAME: case ND_MARKERS: case ND_SEQUENCER: @@ -475,7 +475,7 @@ static void sequencer_preview_area_listener(ARegion *ar, wmNotifier *wmn) ED_region_tag_redraw(ar); break; case NC_ID: - switch(wmn->data) { + switch (wmn->data) { case NA_RENAME: ED_region_tag_redraw(ar); break; @@ -502,15 +502,15 @@ static void sequencer_buttons_area_draw(const bContext *C, ARegion *ar) static void sequencer_buttons_area_listener(ARegion *ar, wmNotifier *wmn) { /* context changes */ - switch(wmn->category) { + switch (wmn->category) { case NC_SCENE: - switch(wmn->data) { - case ND_FRAME: - case ND_SEQUENCER: - ED_region_tag_redraw(ar); - break; - } - break; + switch (wmn->data) { + case ND_FRAME: + case ND_SEQUENCER: + ED_region_tag_redraw(ar); + break; + } + break; case NC_SPACE: if (wmn->data == ND_SPACE_SEQUENCER) ED_region_tag_redraw(ar); @@ -526,49 +526,49 @@ static void sequencer_buttons_area_listener(ARegion *ar, wmNotifier *wmn) /* only called once, from space/spacetypes.c */ void ED_spacetype_sequencer(void) { - SpaceType *st= MEM_callocN(sizeof(SpaceType), "spacetype sequencer"); + SpaceType *st = MEM_callocN(sizeof(SpaceType), "spacetype sequencer"); ARegionType *art; - st->spaceid= SPACE_SEQ; + st->spaceid = SPACE_SEQ; strncpy(st->name, "Sequencer", BKE_ST_MAXNAME); - st->new= sequencer_new; - st->free= sequencer_free; - st->init= sequencer_init; - st->duplicate= sequencer_duplicate; - st->operatortypes= sequencer_operatortypes; - st->keymap= sequencer_keymap; - st->dropboxes= sequencer_dropboxes; - st->refresh= sequencer_refresh; + st->new = sequencer_new; + st->free = sequencer_free; + st->init = sequencer_init; + st->duplicate = sequencer_duplicate; + st->operatortypes = sequencer_operatortypes; + st->keymap = sequencer_keymap; + st->dropboxes = sequencer_dropboxes; + st->refresh = sequencer_refresh; /* regions: main window */ - art= MEM_callocN(sizeof(ARegionType), "spacetype sequencer region"); + art = MEM_callocN(sizeof(ARegionType), "spacetype sequencer region"); art->regionid = RGN_TYPE_WINDOW; - art->init= sequencer_main_area_init; - art->draw= sequencer_main_area_draw; - art->listener= sequencer_main_area_listener; - art->keymapflag= ED_KEYMAP_VIEW2D|ED_KEYMAP_MARKERS|ED_KEYMAP_FRAMES|ED_KEYMAP_ANIMATION; + art->init = sequencer_main_area_init; + art->draw = sequencer_main_area_draw; + art->listener = sequencer_main_area_listener; + art->keymapflag = ED_KEYMAP_VIEW2D | ED_KEYMAP_MARKERS | ED_KEYMAP_FRAMES | ED_KEYMAP_ANIMATION; BLI_addhead(&st->regiontypes, art); /* preview */ - art= MEM_callocN(sizeof(ARegionType), "spacetype sequencer region"); + art = MEM_callocN(sizeof(ARegionType), "spacetype sequencer region"); art->regionid = RGN_TYPE_PREVIEW; art->prefsizey = 240; // XXX - art->init= sequencer_preview_area_init; - art->draw= sequencer_preview_area_draw; - art->listener= sequencer_preview_area_listener; - art->keymapflag= ED_KEYMAP_VIEW2D|ED_KEYMAP_FRAMES|ED_KEYMAP_ANIMATION; + art->init = sequencer_preview_area_init; + art->draw = sequencer_preview_area_draw; + art->listener = sequencer_preview_area_listener; + art->keymapflag = ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES | ED_KEYMAP_ANIMATION; BLI_addhead(&st->regiontypes, art); /* regions: listview/buttons */ - art= MEM_callocN(sizeof(ARegionType), "spacetype sequencer region"); + art = MEM_callocN(sizeof(ARegionType), "spacetype sequencer region"); art->regionid = RGN_TYPE_UI; - art->prefsizex= 220; // XXX - art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_FRAMES; - art->listener= sequencer_buttons_area_listener; - art->init= sequencer_buttons_area_init; - art->draw= sequencer_buttons_area_draw; + art->prefsizex = 220; // XXX + art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_FRAMES; + art->listener = sequencer_buttons_area_listener; + art->init = sequencer_buttons_area_init; + art->draw = sequencer_buttons_area_draw; BLI_addhead(&st->regiontypes, art); /* Keep as python only for now @@ -576,21 +576,21 @@ void ED_spacetype_sequencer(void) */ /* regions: header */ - art= MEM_callocN(sizeof(ARegionType), "spacetype sequencer region"); + art = MEM_callocN(sizeof(ARegionType), "spacetype sequencer region"); art->regionid = RGN_TYPE_HEADER; - art->prefsizey= HEADERY; - art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D|ED_KEYMAP_FRAMES|ED_KEYMAP_HEADER; + art->prefsizey = HEADERY; + art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES | ED_KEYMAP_HEADER; - art->init= sequencer_header_area_init; - art->draw= sequencer_header_area_draw; - art->listener= sequencer_main_area_listener; + art->init = sequencer_header_area_init; + art->draw = sequencer_header_area_draw; + art->listener = sequencer_main_area_listener; BLI_addhead(&st->regiontypes, art); BKE_spacetype_register(st); /* set the sequencer callback when not in background mode */ - if (G.background==0) { + if (G.background == 0) { sequencer_view3d_cb = ED_view3d_draw_offscreen_imbuf_simple; } } -- cgit v1.2.3 From 2722320ca6aaa468917f5dbcf6faf621bf28c763 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 29 Mar 2012 22:35:12 +0000 Subject: style cleanup: minor change and remove redundant casts --- source/blender/blenkernel/intern/sequencer.c | 34 ++++++++++++---------- .../editors/space_sequencer/sequencer_draw.c | 4 +-- 2 files changed, 20 insertions(+), 18 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 980352953b7..9cd50e18233 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -83,7 +83,7 @@ static ImBuf *seq_render_strip_stack( SeqRenderData context, ListBase *seqbasep, float cfra, int chanshown); static ImBuf *seq_render_strip( - SeqRenderData context, Sequence *seq, float cfra); + SeqRenderData context, Sequence *seq, float cfra); static void seq_free_animdata(Scene *scene, Sequence *seq); @@ -355,7 +355,7 @@ unsigned int seq_hash_render_data(const SeqRenderData *a) rval ^= a->preview_render_size; rval ^= ((intptr_t) a->bmain) << 6; rval ^= ((intptr_t) a->scene) << 6; - rval ^= (int) (a->motion_blur_shutter * 100.0f) << 10; + rval ^= (int)(a->motion_blur_shutter * 100.0f) << 10; rval ^= a->motion_blur_samples << 24; return rval; @@ -929,7 +929,9 @@ static void make_black_ibuf(ImBuf *ibuf) float *rect_float; int tot; - if (ibuf == NULL || (ibuf->rect == NULL && ibuf->rect_float == NULL)) return; + if (ibuf == NULL || (ibuf->rect == NULL && ibuf->rect_float == NULL)) { + return; + } tot = ibuf->x * ibuf->y; @@ -1029,7 +1031,7 @@ StripElem *give_stripelem(Sequence *seq, int cfra) * MOVIE strips use only * the first element, all other strips * don't use this... */ - int nr = (int) give_stripelem_index(seq, cfra); + int nr = (int)give_stripelem_index(seq, cfra); if (nr == -1 || se == NULL) return NULL; @@ -1238,7 +1240,7 @@ static int seq_proxy_get_fname(Sequence *seq, int cfra, int render_size, char *n frameno = 1; } else { - frameno = (int) give_stripelem_index(seq, cfra) + seq->anim_startofs; + frameno = (int)give_stripelem_index(seq, cfra) + seq->anim_startofs; BLI_snprintf(name, PROXY_MAXFILE, "%s/proxy_misc/%d/####", dir, render_size); } @@ -1275,7 +1277,7 @@ static ImBuf *seq_proxy_fetch(SeqRenderData context, Sequence *seq, int cfra) } if (seq->flag & SEQ_USE_PROXY_CUSTOM_FILE) { - int frameno = (int) give_stripelem_index(seq, cfra) + seq->anim_startofs; + int frameno = (int)give_stripelem_index(seq, cfra) + seq->anim_startofs; if (seq->strip->proxy->anim == NULL) { if (seq_proxy_get_fname(seq, cfra, render_size, name) == 0) { return NULL; @@ -1415,8 +1417,8 @@ void seq_proxy_rebuild(SeqIndexBuildContext *context, short *stop, short *do_upd render_context = seq_new_render_data( context->bmain, context->scene, - (scene->r.size * (float) scene->r.xsch) / 100.0f + 0.5f, - (scene->r.size * (float) scene->r.ysch) / 100.0f + 0.5f, + (scene->r.size * (float)scene->r.xsch) / 100.0f + 0.5f, + (scene->r.size * (float)scene->r.ysch) / 100.0f + 0.5f, 100); for (cfra = seq->startdisp + seq->startstill; @@ -1642,7 +1644,7 @@ static void color_balance(Sequence *seq, ImBuf *ibuf, float mul) */ int input_have_to_preprocess( - SeqRenderData UNUSED(context), Sequence *seq, float UNUSED(cfra)) + SeqRenderData UNUSED(context), Sequence *seq, float UNUSED(cfra)) { float mul; @@ -1861,14 +1863,14 @@ static void copy_to_ibuf_still(SeqRenderData context, Sequence *seq, float nr, * ********************************************************************** */ static ImBuf *seq_render_strip_stack( - SeqRenderData context, ListBase *seqbasep, float cfra, int chanshown); + SeqRenderData context, ListBase *seqbasep, float cfra, int chanshown); static ImBuf *seq_render_strip( - SeqRenderData context, Sequence *seq, float cfra); + SeqRenderData context, Sequence *seq, float cfra); static ImBuf *seq_render_effect_strip_impl( - SeqRenderData context, Sequence *seq, float cfra) + SeqRenderData context, Sequence *seq, float cfra) { float fac, facf; int early_out; @@ -1919,7 +1921,7 @@ static ImBuf *seq_render_effect_strip_impl( for (i = 0; i < 3; i++) { if (input[i]) ibuf[i] = seq_render_strip( - context, input[i], cfra); + context, input[i], cfra); } if (ibuf[0] && ibuf[1]) { @@ -2021,7 +2023,7 @@ static ImBuf *seq_render_movieclip_strip( } static ImBuf *seq_render_scene_strip( - SeqRenderData context, Sequence *seq, float nr) + SeqRenderData context, Sequence *seq, float nr) { ImBuf *ibuf = NULL; float frame; @@ -2235,7 +2237,7 @@ static ImBuf *seq_render_strip(SeqRenderData context, Sequence *seq, float cfra) sequence_effect_speed_rebuild_map(context.scene, seq, 0); /* weeek! */ - f_cfra = seq->start + s->frameMap[(int) nr]; + f_cfra = seq->start + s->frameMap[(int)nr]; child_ibuf = seq_render_strip(context, seq->seq1, f_cfra); @@ -2391,7 +2393,7 @@ static int seq_get_early_out_for_blend_mode(Sequence *seq) } static ImBuf *seq_render_strip_stack( - SeqRenderData context, ListBase *seqbasep, float cfra, int chanshown) + SeqRenderData context, ListBase *seqbasep, float cfra, int chanshown) { Sequence *seq_arr[MAXSEQ + 1]; int count; diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index a0bc54fec85..cd0c8779c39 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -856,9 +856,9 @@ void draw_image_seq(const bContext *C, Scene *scene, ARegion *ar, SpaceSeq *sseq if (special_seq_update) ibuf = give_ibuf_seq_direct(context, cfra + frame_ofs, special_seq_update); else if (!U.prefetchframes) // XXX || (G.f & G_PLAYANIM) == 0) { - ibuf = (ImBuf *)give_ibuf_seq(context, cfra + frame_ofs, sseq->chanshown); + ibuf = give_ibuf_seq(context, cfra + frame_ofs, sseq->chanshown); else - ibuf = (ImBuf *)give_ibuf_seq_threaded(context, cfra + frame_ofs, sseq->chanshown); + ibuf = give_ibuf_seq_threaded(context, cfra + frame_ofs, sseq->chanshown); if (ibuf == NULL) return; -- cgit v1.2.3 From 8ec4371ff1d2e36970b0823e4b6f4a7edc25d89e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 29 Mar 2012 22:42:32 +0000 Subject: style cleanup: render --- source/blender/editors/render/render_internal.c | 244 +++++++------- source/blender/editors/render/render_opengl.c | 212 ++++++------ source/blender/editors/render/render_preview.c | 420 ++++++++++++------------ source/blender/editors/render/render_shading.c | 291 ++++++++-------- source/blender/editors/render/render_update.c | 98 +++--- source/blender/editors/render/render_view.c | 110 +++---- 6 files changed, 688 insertions(+), 687 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c index 465a2e37269..97fd80fc946 100644 --- a/source/blender/editors/render/render_internal.c +++ b/source/blender/editors/render/render_internal.c @@ -76,7 +76,7 @@ /* called inside thread! */ void image_buffer_rect_update(Scene *scene, RenderResult *rr, ImBuf *ibuf, volatile rcti *renrect) { - float *rectf= NULL; + float *rectf = NULL; int ymin, ymax, xmin, xmax; int rymin, rxmin, predivide, profile_from; unsigned char *rectc; @@ -84,72 +84,72 @@ void image_buffer_rect_update(Scene *scene, RenderResult *rr, ImBuf *ibuf, volat /* if renrect argument, we only refresh scanlines */ if (renrect) { /* if ymax==recty, rendering of layer is ready, we should not draw, other things happen... */ - if (rr->renlay==NULL || renrect->ymax>=rr->recty) + if (rr->renlay == NULL || renrect->ymax >= rr->recty) return; /* xmin here is first subrect x coord, xmax defines subrect width */ xmin = renrect->xmin + rr->crop; xmax = renrect->xmax - xmin + rr->crop; - if (xmax<2) + if (xmax < 2) return; - ymin= renrect->ymin + rr->crop; - ymax= renrect->ymax - ymin + rr->crop; - if (ymax<2) + ymin = renrect->ymin + rr->crop; + ymax = renrect->ymax - ymin + rr->crop; + if (ymax < 2) return; renrect->ymin = renrect->ymax; } else { xmin = ymin = rr->crop; - xmax = rr->rectx - 2*rr->crop; - ymax = rr->recty - 2*rr->crop; + xmax = rr->rectx - 2 * rr->crop; + ymax = rr->recty - 2 * rr->crop; } /* xmin ymin is in tile coords. transform to ibuf */ - rxmin= rr->tilerect.xmin + xmin; + rxmin = rr->tilerect.xmin + xmin; if (rxmin >= ibuf->x) return; - rymin= rr->tilerect.ymin + ymin; + rymin = rr->tilerect.ymin + ymin; if (rymin >= ibuf->y) return; if (rxmin + xmax > ibuf->x) - xmax= ibuf->x - rxmin; + xmax = ibuf->x - rxmin; if (rymin + ymax > ibuf->y) - ymax= ibuf->y - rymin; + ymax = ibuf->y - rymin; if (xmax < 1 || ymax < 1) return; /* find current float rect for display, first case is after composite... still weak */ if (rr->rectf) - rectf= rr->rectf; + rectf = rr->rectf; else { if (rr->rect32) return; else { - if (rr->renlay==NULL || rr->renlay->rectf==NULL) return; - rectf= rr->renlay->rectf; + if (rr->renlay == NULL || rr->renlay->rectf == NULL) return; + rectf = rr->renlay->rectf; } } - if (rectf==NULL) return; + if (rectf == NULL) return; - if (ibuf->rect==NULL) + if (ibuf->rect == NULL) imb_addrectImBuf(ibuf); - rectf+= 4*(rr->rectx*ymin + xmin); - rectc= (unsigned char*)(ibuf->rect + ibuf->x*rymin + rxmin); + rectf += 4 * (rr->rectx * ymin + xmin); + rectc = (unsigned char *)(ibuf->rect + ibuf->x * rymin + rxmin); if (scene && (scene->r.color_mgt_flag & R_COLOR_MANAGEMENT)) { - profile_from= IB_PROFILE_LINEAR_RGB; - predivide= (scene->r.color_mgt_flag & R_COLOR_MANAGEMENT_PREDIVIDE); + profile_from = IB_PROFILE_LINEAR_RGB; + predivide = (scene->r.color_mgt_flag & R_COLOR_MANAGEMENT_PREDIVIDE); } else { - profile_from= IB_PROFILE_SRGB; - predivide= 0; + profile_from = IB_PROFILE_SRGB; + predivide = 0; } IMB_buffer_byte_from_float(rectc, rectf, - 4, ibuf->dither, IB_PROFILE_SRGB, profile_from, predivide, - xmax, ymax, ibuf->x, rr->rectx); + 4, ibuf->dither, IB_PROFILE_SRGB, profile_from, predivide, + xmax, ymax, ibuf->x, rr->rectx); } /* ****************************** render invoking ***************** */ @@ -162,14 +162,14 @@ static void screen_render_scene_layer_set(wmOperator *op, Main *mainp, Scene **s /* single layer re-render */ if (RNA_struct_property_is_set(op->ptr, "scene")) { Scene *scn; - char scene_name[MAX_ID_NAME-2]; + char scene_name[MAX_ID_NAME - 2]; RNA_string_get(op->ptr, "scene", scene_name); scn = (Scene *)BLI_findstring(&mainp->scene, scene_name, offsetof(ID, name) + 2); if (scn) { /* camera switch wont have updated */ - scn->r.cfra= (*scene)->r.cfra; + scn->r.cfra = (*scene)->r.cfra; scene_camera_switch_update(scn); *scene = scn; @@ -191,16 +191,16 @@ static void screen_render_scene_layer_set(wmOperator *op, Main *mainp, Scene **s /* executes blocking render */ static int screen_render_exec(bContext *C, wmOperator *op) { - Scene *scene= CTX_data_scene(C); - SceneRenderLayer *srl= NULL; + Scene *scene = CTX_data_scene(C); + SceneRenderLayer *srl = NULL; Render *re; Image *ima; - View3D *v3d= CTX_wm_view3d(C); - Main *mainp= CTX_data_main(C); + View3D *v3d = CTX_wm_view3d(C); + Main *mainp = CTX_data_main(C); unsigned int lay; - const short is_animation= RNA_boolean_get(op->ptr, "animation"); - const short is_write_still= RNA_boolean_get(op->ptr, "write_still"); - struct Object *camera_override= v3d ? V3D_CAMERA_LOCAL(v3d) : NULL; + const short is_animation = RNA_boolean_get(op->ptr, "animation"); + const short is_write_still = RNA_boolean_get(op->ptr, "write_still"); + struct Object *camera_override = v3d ? V3D_CAMERA_LOCAL(v3d) : NULL; /* custom scene and single layer re-render */ screen_render_scene_layer_set(op, mainp, &scene, &srl); @@ -210,20 +210,20 @@ static int screen_render_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - re= RE_NewRender(scene->id.name); - lay= (v3d)? v3d->lay: scene->lay; + re = RE_NewRender(scene->id.name); + lay = (v3d) ? v3d->lay : scene->lay; - G.afbreek= 0; - RE_test_break_cb(re, NULL, (int (*)(void *)) blender_test_break); + G.afbreek = 0; + RE_test_break_cb(re, NULL, (int (*)(void *))blender_test_break); - ima= BKE_image_verify_viewer(IMA_TYPE_R_RESULT, "Render Result"); + ima = BKE_image_verify_viewer(IMA_TYPE_R_RESULT, "Render Result"); BKE_image_signal(ima, NULL, IMA_SIGNAL_FREE); BKE_image_backup_render(scene, ima); /* cleanup sequencer caches before starting user triggered render. - * otherwise, invalidated cache entries can make their way into - * the output rendering. We can't put that into RE_BlenderFrame, - * since sequence rendering can call that recursively... (peter) */ + * otherwise, invalidated cache entries can make their way into + * the output rendering. We can't put that into RE_BlenderFrame, + * since sequence rendering can call that recursively... (peter) */ seq_stripelem_cache_cleanup(); RE_SetReports(re, op->reports); @@ -238,7 +238,7 @@ static int screen_render_exec(bContext *C, wmOperator *op) // no redraw needed, we leave state as we entered it ED_update_for_newframe(mainp, scene, CTX_wm_screen(C), 1); - WM_event_add_notifier(C, NC_SCENE|ND_RENDER_RESULT, scene); + WM_event_add_notifier(C, NC_SCENE | ND_RENDER_RESULT, scene); return OPERATOR_FINISHED; } @@ -262,7 +262,7 @@ typedef struct RenderJob { static void render_freejob(void *rjv) { - RenderJob *rj= rjv; + RenderJob *rj = rjv; MEM_freeN(rj); } @@ -270,53 +270,53 @@ static void render_freejob(void *rjv) /* str is IMA_MAX_RENDER_TEXT in size */ static void make_renderinfo_string(RenderStats *rs, Scene *scene, char *str) { - char info_time_str[32]; // used to be extern to header_info.c + char info_time_str[32]; // used to be extern to header_info.c uintptr_t mem_in_use, mmap_in_use, peak_memory; float megs_used_memory, mmap_used_memory, megs_peak_memory; - char *spos= str; + char *spos = str; - mem_in_use= MEM_get_memory_in_use(); - mmap_in_use= MEM_get_mapped_memory_in_use(); + mem_in_use = MEM_get_memory_in_use(); + mmap_in_use = MEM_get_mapped_memory_in_use(); peak_memory = MEM_get_peak_memory(); - megs_used_memory= (mem_in_use-mmap_in_use)/(1024.0*1024.0); - mmap_used_memory= (mmap_in_use)/(1024.0*1024.0); - megs_peak_memory = (peak_memory)/(1024.0*1024.0); + megs_used_memory = (mem_in_use - mmap_in_use) / (1024.0 * 1024.0); + mmap_used_memory = (mmap_in_use) / (1024.0 * 1024.0); + megs_peak_memory = (peak_memory) / (1024.0 * 1024.0); if (scene->lay & 0xFF000000) - spos+= sprintf(spos, "Localview | "); + spos += sprintf(spos, "Localview | "); else if (scene->r.scemode & R_SINGLE_LAYER) - spos+= sprintf(spos, "Single Layer | "); + spos += sprintf(spos, "Single Layer | "); if (rs->statstr) { - spos+= sprintf(spos, "%s ", rs->statstr); + spos += sprintf(spos, "%s ", rs->statstr); } else { - spos+= sprintf(spos, "Fra:%d ", (scene->r.cfra)); - if (rs->totvert) spos+= sprintf(spos, "Ve:%d ", rs->totvert); - if (rs->totface) spos+= sprintf(spos, "Fa:%d ", rs->totface); - if (rs->tothalo) spos+= sprintf(spos, "Ha:%d ", rs->tothalo); - if (rs->totstrand) spos+= sprintf(spos, "St:%d ", rs->totstrand); - if (rs->totlamp) spos+= sprintf(spos, "La:%d ", rs->totlamp); - spos+= sprintf(spos, "Mem:%.2fM (%.2fM, peak %.2fM) ", megs_used_memory, mmap_used_memory, megs_peak_memory); + spos += sprintf(spos, "Fra:%d ", (scene->r.cfra)); + if (rs->totvert) spos += sprintf(spos, "Ve:%d ", rs->totvert); + if (rs->totface) spos += sprintf(spos, "Fa:%d ", rs->totface); + if (rs->tothalo) spos += sprintf(spos, "Ha:%d ", rs->tothalo); + if (rs->totstrand) spos += sprintf(spos, "St:%d ", rs->totstrand); + if (rs->totlamp) spos += sprintf(spos, "La:%d ", rs->totlamp); + spos += sprintf(spos, "Mem:%.2fM (%.2fM, peak %.2fM) ", megs_used_memory, mmap_used_memory, megs_peak_memory); if (rs->curfield) - spos+= sprintf(spos, "Field %d ", rs->curfield); + spos += sprintf(spos, "Field %d ", rs->curfield); if (rs->curblur) - spos+= sprintf(spos, "Blur %d ", rs->curblur); + spos += sprintf(spos, "Blur %d ", rs->curblur); } BLI_timestr(rs->lastframetime, info_time_str); - spos+= sprintf(spos, "Time:%s ", info_time_str); + spos += sprintf(spos, "Time:%s ", info_time_str); if (rs->curfsa) - spos+= sprintf(spos, "| Full Sample %d ", rs->curfsa); + spos += sprintf(spos, "| Full Sample %d ", rs->curfsa); if (rs->infostr && rs->infostr[0]) - spos+= sprintf(spos, "| %s ", rs->infostr); + spos += sprintf(spos, "| %s ", rs->infostr); /* very weak... but 512 characters is quite safe */ - if (spos >= str+IMA_MAX_RENDER_TEXT) + if (spos >= str + IMA_MAX_RENDER_TEXT) if (G.f & G_DEBUG) printf("WARNING! renderwin text beyond limit \n"); @@ -324,15 +324,15 @@ static void make_renderinfo_string(RenderStats *rs, Scene *scene, char *str) static void image_renderinfo_cb(void *rjv, RenderStats *rs) { - RenderJob *rj= rjv; + RenderJob *rj = rjv; RenderResult *rr; - rr= RE_AcquireResultRead(rj->re); + rr = RE_AcquireResultRead(rj->re); if (rr) { /* malloc OK here, stats_draw is not in tile threads */ - if (rr->text==NULL) - rr->text= MEM_callocN(IMA_MAX_RENDER_TEXT, "rendertext"); + if (rr->text == NULL) + rr->text = MEM_callocN(IMA_MAX_RENDER_TEXT, "rendertext"); make_renderinfo_string(rs, rj->scene, rr->text); } @@ -340,26 +340,26 @@ static void image_renderinfo_cb(void *rjv, RenderStats *rs) RE_ReleaseResult(rj->re); /* make jobs timer to send notifier */ - *(rj->do_update)= 1; + *(rj->do_update) = 1; } static void render_progress_update(void *rjv, float progress) { - RenderJob *rj= rjv; + RenderJob *rj = rjv; if (rj->progress && *rj->progress != progress) { *rj->progress = progress; /* make jobs timer to send notifier */ - *(rj->do_update)= 1; + *(rj->do_update) = 1; } } static void image_rect_update(void *rjv, RenderResult *rr, volatile rcti *renrect) { - RenderJob *rj= rjv; - Image *ima= rj->image; + RenderJob *rj = rjv; + Image *ima = rj->image; ImBuf *ibuf; void *lock; @@ -367,23 +367,23 @@ static void image_rect_update(void *rjv, RenderResult *rr, volatile rcti *renrec if (ima->render_slot != ima->last_render_slot) return; - ibuf= BKE_image_acquire_ibuf(ima, &rj->iuser, &lock); + ibuf = BKE_image_acquire_ibuf(ima, &rj->iuser, &lock); if (ibuf) { image_buffer_rect_update(rj->scene, rr, ibuf, renrect); /* make jobs timer to send notifier */ - *(rj->do_update)= 1; + *(rj->do_update) = 1; } BKE_image_release_ibuf(ima, lock); } static void render_startjob(void *rjv, short *stop, short *do_update, float *progress) { - RenderJob *rj= rjv; + RenderJob *rj = rjv; - rj->stop= stop; - rj->do_update= do_update; - rj->progress= progress; + rj->stop = stop; + rj->do_update = do_update; + rj->progress = progress; RE_SetReports(rj->re, rj->reports); @@ -397,7 +397,7 @@ static void render_startjob(void *rjv, short *stop, short *do_update, float *pro static void render_endjob(void *rjv) { - RenderJob *rj= rjv; + RenderJob *rj = rjv; /* this render may be used again by the sequencer without the active 'Render' where the callbacks * would be re-assigned. assign dummy callbacks to avoid referencing freed renderjobs bug [#24508] */ @@ -418,7 +418,7 @@ static void render_endjob(void *rjv) if (rj->srl) { nodeUpdateID(rj->scene->nodetree, &rj->scene->id); - WM_main_add_notifier(NC_NODE|NA_EDITED, rj->scene); + WM_main_add_notifier(NC_NODE | NA_EDITED, rj->scene); } /* XXX render stability hack */ @@ -429,7 +429,7 @@ static void render_endjob(void *rjv) /* called by render, check job 'stop' value or the global */ static int render_breakjob(void *rjv) { - RenderJob *rj= rjv; + RenderJob *rj = rjv; if (G.afbreek) return 1; @@ -450,8 +450,8 @@ static void render_drawlock(void *UNUSED(rjv), int lock) static int screen_render_modal(bContext *C, wmOperator *UNUSED(op), wmEvent *event) { /* no running blender, remove handler and pass through */ - if (0==WM_jobs_test(CTX_wm_manager(C), CTX_data_scene(C))) { - return OPERATOR_FINISHED|OPERATOR_PASS_THROUGH; + if (0 == WM_jobs_test(CTX_wm_manager(C), CTX_data_scene(C))) { + return OPERATOR_FINISHED | OPERATOR_PASS_THROUGH; } /* running render */ @@ -468,18 +468,18 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event) { /* new render clears all callbacks */ Main *mainp; - Scene *scene= CTX_data_scene(C); - SceneRenderLayer *srl=NULL; - bScreen *screen= CTX_wm_screen(C); - View3D *v3d= CTX_wm_view3d(C); + Scene *scene = CTX_data_scene(C); + SceneRenderLayer *srl = NULL; + bScreen *screen = CTX_wm_screen(C); + View3D *v3d = CTX_wm_view3d(C); Render *re; wmJob *steve; RenderJob *rj; Image *ima; int jobflag; - const short is_animation= RNA_boolean_get(op->ptr, "animation"); - const short is_write_still= RNA_boolean_get(op->ptr, "write_still"); - struct Object *camera_override= v3d ? V3D_CAMERA_LOCAL(v3d) : NULL; + const short is_animation = RNA_boolean_get(op->ptr, "animation"); + const short is_write_still = RNA_boolean_get(op->ptr, "write_still"); + struct Object *camera_override = v3d ? V3D_CAMERA_LOCAL(v3d) : NULL; const char *name; /* only one render job at a time */ @@ -501,10 +501,10 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event) /* get main */ if (G.rt == 101) { /* thread-safety experiment, copy main from the undo buffer */ - mainp= BKE_undo_get_main(&scene); + mainp = BKE_undo_get_main(&scene); } else - mainp= CTX_data_main(C); + mainp = CTX_data_main(C); /* cancel animation playback */ if (screen->animtimer) @@ -517,13 +517,13 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event) multires_force_render_update(CTX_data_active_object(C)); /* cleanup sequencer caches before starting user triggered render. - * otherwise, invalidated cache entries can make their way into - * the output rendering. We can't put that into RE_BlenderFrame, - * since sequence rendering can call that recursively... (peter) */ + * otherwise, invalidated cache entries can make their way into + * the output rendering. We can't put that into RE_BlenderFrame, + * since sequence rendering can call that recursively... (peter) */ seq_stripelem_cache_cleanup(); /* get editmode results */ - ED_object_exit_editmode(C, 0); /* 0 = does not exit editmode */ + ED_object_exit_editmode(C, 0); /* 0 = does not exit editmode */ // store spare // get view3d layer, local layer, make this nice api call to render @@ -532,7 +532,7 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event) /* ensure at least 1 area shows result */ render_view_open(C, event->x, event->y); - jobflag= WM_JOB_EXCL_RENDER|WM_JOB_PRIORITY|WM_JOB_PROGRESS; + jobflag = WM_JOB_EXCL_RENDER | WM_JOB_PRIORITY | WM_JOB_PROGRESS; /* custom scene and single layer re-render */ screen_render_scene_layer_set(op, mainp, &scene, &srl); @@ -541,49 +541,49 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event) jobflag |= WM_JOB_SUSPEND; /* job custom data */ - rj= MEM_callocN(sizeof(RenderJob), "render job"); - rj->main= mainp; - rj->scene= scene; - rj->win= CTX_wm_window(C); + rj = MEM_callocN(sizeof(RenderJob), "render job"); + rj->main = mainp; + rj->scene = scene; + rj->win = CTX_wm_window(C); rj->srl = srl; rj->camera_override = camera_override; - rj->lay = (v3d)? v3d->lay: scene->lay; - rj->anim= is_animation; - rj->write_still= is_write_still && !is_animation; - rj->iuser.scene= scene; - rj->iuser.ok= 1; - rj->reports= op->reports; + rj->lay = (v3d) ? v3d->lay : scene->lay; + rj->anim = is_animation; + rj->write_still = is_write_still && !is_animation; + rj->iuser.scene = scene; + rj->iuser.ok = 1; + rj->reports = op->reports; /* setup job */ - if (RE_seq_render_active(scene, &scene->r)) name= "Sequence Render"; - else name= "Render"; + if (RE_seq_render_active(scene, &scene->r)) name = "Sequence Render"; + else name = "Render"; - steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene, name, jobflag); + steve = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene, name, jobflag); WM_jobs_customdata(steve, rj, render_freejob); - WM_jobs_timer(steve, 0.2, NC_SCENE|ND_RENDER_RESULT, 0); + WM_jobs_timer(steve, 0.2, NC_SCENE | ND_RENDER_RESULT, 0); WM_jobs_callbacks(steve, render_startjob, NULL, NULL, render_endjob); /* get a render result image, and make sure it is empty */ - ima= BKE_image_verify_viewer(IMA_TYPE_R_RESULT, "Render Result"); + ima = BKE_image_verify_viewer(IMA_TYPE_R_RESULT, "Render Result"); BKE_image_signal(ima, NULL, IMA_SIGNAL_FREE); BKE_image_backup_render(rj->scene, ima); - rj->image= ima; + rj->image = ima; /* setup new render */ - re= RE_NewRender(scene->id.name); + re = RE_NewRender(scene->id.name); RE_test_break_cb(re, rj, render_breakjob); RE_draw_lock_cb(re, rj, render_drawlock); RE_display_draw_cb(re, rj, image_rect_update); RE_stats_draw_cb(re, rj, image_renderinfo_cb); RE_progress_cb(re, rj, render_progress_update); - rj->re= re; - G.afbreek= 0; + rj->re = re; + G.afbreek = 0; WM_jobs_start(CTX_wm_manager(C), steve); WM_cursor_wait(0); - WM_event_add_notifier(C, NC_SCENE|ND_RENDER_RESULT, scene); + WM_event_add_notifier(C, NC_SCENE | ND_RENDER_RESULT, scene); /* we set G.rendering here already instead of only in the job, this ensure * main loop or other scene updates are disabled in time, since they may @@ -614,6 +614,6 @@ void RENDER_OT_render(wmOperatorType *ot) RNA_def_boolean(ot->srna, "animation", 0, "Animation", "Render files from the animation range of this scene"); RNA_def_boolean(ot->srna, "write_still", 0, "Write Image", "Save rendered the image to the output path (used only when animation is disabled)"); RNA_def_string(ot->srna, "layer", "", RE_MAXNAME, "Render Layer", "Single render layer to re-render (used only when animation is disabled)"); - RNA_def_string(ot->srna, "scene", "", MAX_ID_NAME-2, "Scene", "Scene to render, current scene if not specified"); + RNA_def_string(ot->srna, "scene", "", MAX_ID_NAME - 2, "Scene", "Scene to render, current scene if not specified"); } diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c index 26996893ae5..45983347a12 100644 --- a/source/blender/editors/render/render_opengl.c +++ b/source/blender/editors/render/render_opengl.c @@ -114,28 +114,28 @@ static unsigned int screen_opengl_layers(OGLRender *oglrender) static void screen_opengl_render_apply(OGLRender *oglrender) { - Scene *scene= oglrender->scene; - ARegion *ar= oglrender->ar; - View3D *v3d= oglrender->v3d; - RegionView3D *rv3d= oglrender->rv3d; + Scene *scene = oglrender->scene; + ARegion *ar = oglrender->ar; + View3D *v3d = oglrender->v3d; + RegionView3D *rv3d = oglrender->rv3d; RenderResult *rr; - Object *camera= NULL; + Object *camera = NULL; ImBuf *ibuf; void *lock; float winmat[4][4]; - int sizex= oglrender->sizex; - int sizey= oglrender->sizey; - const short view_context= (v3d != NULL); + int sizex = oglrender->sizex; + int sizey = oglrender->sizey; + const short view_context = (v3d != NULL); - rr= RE_AcquireResultRead(oglrender->re); + rr = RE_AcquireResultRead(oglrender->re); if (view_context) { GPU_offscreen_bind(oglrender->ofs); /* bind */ /* render 3d view */ - if (rv3d->persp==RV3D_CAMOB && v3d->camera) { + if (rv3d->persp == RV3D_CAMOB && v3d->camera) { /*int is_ortho= scene->r.mode & R_ORTHO;*/ - camera= v3d->camera; + camera = v3d->camera; RE_GetCameraWindow(oglrender->re, camera, scene->r.cfra, winmat); } @@ -143,9 +143,9 @@ static void screen_opengl_render_apply(OGLRender *oglrender) rctf viewplane; float clipsta, clipend; - int is_ortho= ED_view3d_viewplane_get(v3d, rv3d, sizex, sizey, &viewplane, &clipsta, &clipend); + int is_ortho = ED_view3d_viewplane_get(v3d, rv3d, sizex, sizey, &viewplane, &clipsta, &clipend); if (is_ortho) orthographic_m4(winmat, viewplane.xmin, viewplane.xmax, viewplane.ymin, viewplane.ymax, -clipend, clipend); - else perspective_m4(winmat, viewplane.xmin, viewplane.xmax, viewplane.ymin, viewplane.ymax, clipsta, clipend); + else perspective_m4(winmat, viewplane.xmin, viewplane.xmax, viewplane.ymin, viewplane.ymax, clipsta, clipend); } if ((scene->r.mode & R_OSA) == 0) { @@ -156,8 +156,8 @@ static void screen_opengl_render_apply(OGLRender *oglrender) /* simple accumulation, less hassle then FSAA FBO's */ static float jit_ofs[32][2]; float winmat_jitter[4][4]; - float *accum_buffer= MEM_mallocN(sizex * sizey * sizeof(float) * 4, "accum1"); - float *accum_tmp= MEM_mallocN(sizex * sizey * sizeof(float) * 4, "accum2"); + float *accum_buffer = MEM_mallocN(sizex * sizey * sizeof(float) * 4, "accum1"); + float *accum_tmp = MEM_mallocN(sizex * sizey * sizeof(float) * 4, "accum2"); int j; BLI_initjit(jit_ofs[0], scene->r.osa); @@ -167,7 +167,7 @@ static void screen_opengl_render_apply(OGLRender *oglrender) GPU_offscreen_read_pixels(oglrender->ofs, GL_FLOAT, accum_buffer); /* skip the first sample */ - for (j=1; j < scene->r.osa; j++) { + for (j = 1; j < scene->r.osa; j++) { copy_m4_m4(winmat_jitter, winmat); window_translate_m4(winmat_jitter, rv3d->persmat, (jit_ofs[j][0] * 2.0f) / sizex, @@ -175,10 +175,10 @@ static void screen_opengl_render_apply(OGLRender *oglrender) ED_view3d_draw_offscreen(scene, v3d, ar, sizex, sizey, NULL, winmat_jitter, TRUE); GPU_offscreen_read_pixels(oglrender->ofs, GL_FLOAT, accum_tmp); - add_vn_vn(accum_buffer, accum_tmp, sizex*sizey*sizeof(float)); + add_vn_vn(accum_buffer, accum_tmp, sizex * sizey * sizeof(float)); } - mul_vn_vn_fl(rr->rectf, accum_buffer, sizex*sizey*sizeof(float), 1.0f / scene->r.osa); + mul_vn_vn_fl(rr->rectf, accum_buffer, sizex * sizey * sizeof(float), 1.0f / scene->r.osa); MEM_freeN(accum_buffer); MEM_freeN(accum_tmp); @@ -188,9 +188,9 @@ static void screen_opengl_render_apply(OGLRender *oglrender) } else { /* shouldnt suddenly give errors mid-render but possible */ - char err_out[256]= "unknown"; - ImBuf *ibuf_view= ED_view3d_draw_offscreen_imbuf_simple(scene, scene->camera, oglrender->sizex, oglrender->sizey, IB_rectfloat, OB_SOLID, TRUE, err_out); - camera= scene->camera; + char err_out[256] = "unknown"; + ImBuf *ibuf_view = ED_view3d_draw_offscreen_imbuf_simple(scene, scene->camera, oglrender->sizex, oglrender->sizey, IB_rectfloat, OB_SOLID, TRUE, err_out); + camera = scene->camera; if (ibuf_view) { memcpy(rr->rectf, ibuf_view->rect_float, sizeof(float) * 4 * oglrender->sizex * oglrender->sizey); @@ -215,17 +215,17 @@ static void screen_opengl_render_apply(OGLRender *oglrender) * float buffer. */ if (oglrender->scene->r.color_mgt_flag & R_COLOR_MANAGEMENT) { - int predivide= 0; /* no alpha */ + int predivide = 0; /* no alpha */ IMB_buffer_float_from_float(rr->rectf, rr->rectf, - 4, IB_PROFILE_LINEAR_RGB, IB_PROFILE_SRGB, predivide, - oglrender->sizex, oglrender->sizey, oglrender->sizex, oglrender->sizex); + 4, IB_PROFILE_LINEAR_RGB, IB_PROFILE_SRGB, predivide, + oglrender->sizex, oglrender->sizey, oglrender->sizex, oglrender->sizex); } RE_ReleaseResult(oglrender->re); /* update byte from float buffer */ - ibuf= BKE_image_acquire_ibuf(oglrender->ima, &oglrender->iuser, &lock); + ibuf = BKE_image_acquire_ibuf(oglrender->ima, &oglrender->iuser, &lock); if (ibuf) { image_buffer_rect_update(scene, rr, ibuf, NULL); @@ -239,9 +239,9 @@ static void screen_opengl_render_apply(OGLRender *oglrender) } BKE_makepicstring(name, scene->r.pic, oglrender->bmain->name, scene->r.cfra, scene->r.im_format.imtype, scene->r.scemode & R_EXTENSION, FALSE); - ok= BKE_write_ibuf_as(ibuf, name, &scene->r.im_format, TRUE); /* no need to stamp here */ - if (ok) printf("OpenGL Render written to '%s'\n", name); - else printf("OpenGL Render failed to write '%s'\n", name); + ok = BKE_write_ibuf_as(ibuf, name, &scene->r.im_format, TRUE); /* no need to stamp here */ + if (ok) printf("OpenGL Render written to '%s'\n", name); + else printf("OpenGL Render failed to write '%s'\n", name); } } @@ -251,17 +251,17 @@ static void screen_opengl_render_apply(OGLRender *oglrender) static int screen_opengl_render_init(bContext *C, wmOperator *op) { /* new render clears all callbacks */ - Scene *scene= CTX_data_scene(C); - ScrArea *prevsa= CTX_wm_area(C); - ARegion *prevar= CTX_wm_region(C); + Scene *scene = CTX_data_scene(C); + ScrArea *prevsa = CTX_wm_area(C); + ARegion *prevar = CTX_wm_region(C); RenderResult *rr; GPUOffScreen *ofs; OGLRender *oglrender; int sizex, sizey; - short is_view_context= RNA_boolean_get(op->ptr, "view_context"); - const short is_animation= RNA_boolean_get(op->ptr, "animation"); - const short is_write_still= RNA_boolean_get(op->ptr, "write_still"); - char err_out[256]= "unknown"; + short is_view_context = RNA_boolean_get(op->ptr, "view_context"); + const short is_animation = RNA_boolean_get(op->ptr, "animation"); + const short is_write_still = RNA_boolean_get(op->ptr, "write_still"); + char err_out[256] = "unknown"; if (G.background) { BKE_report(op->reports, RPT_ERROR, "Can't use OpenGL render in background mode (no opengl context)"); @@ -279,7 +279,7 @@ static int screen_opengl_render_init(bContext *C, wmOperator *op) if (WM_jobs_test(CTX_wm_manager(C), scene)) return 0; - if (!is_view_context && scene->camera==NULL) { + if (!is_view_context && scene->camera == NULL) { BKE_report(op->reports, RPT_ERROR, "Scene has no camera"); return 0; } @@ -296,11 +296,11 @@ static int screen_opengl_render_init(bContext *C, wmOperator *op) WM_cursor_wait(1); /* create offscreen buffer */ - sizex= (scene->r.size*scene->r.xsch)/100; - sizey= (scene->r.size*scene->r.ysch)/100; + sizex = (scene->r.size * scene->r.xsch) / 100; + sizey = (scene->r.size * scene->r.ysch) / 100; /* corrects render size with actual size, not every card supports non-power-of-two dimensions */ - ofs= GPU_offscreen_create(sizex, sizey, err_out); + ofs = GPU_offscreen_create(sizex, sizey, err_out); if (!ofs) { BKE_reportf(op->reports, RPT_ERROR, "Failed to create OpenGL offscreen buffer, %s", err_out); @@ -308,27 +308,27 @@ static int screen_opengl_render_init(bContext *C, wmOperator *op) } /* allocate opengl render */ - oglrender= MEM_callocN(sizeof(OGLRender), "OGLRender"); - op->customdata= oglrender; + oglrender = MEM_callocN(sizeof(OGLRender), "OGLRender"); + op->customdata = oglrender; - oglrender->ofs= ofs; - oglrender->sizex= sizex; - oglrender->sizey= sizey; - oglrender->bmain= CTX_data_main(C); - oglrender->scene= scene; - oglrender->cfrao= scene->r.cfra; + oglrender->ofs = ofs; + oglrender->sizex = sizex; + oglrender->sizey = sizey; + oglrender->bmain = CTX_data_main(C); + oglrender->scene = scene; + oglrender->cfrao = scene->r.cfra; - oglrender->write_still= is_write_still && !is_animation; + oglrender->write_still = is_write_still && !is_animation; oglrender->obcenter_dia_back = U.obcenter_dia; U.obcenter_dia = 0; - oglrender->prevsa= prevsa; - oglrender->prevar= prevar; + oglrender->prevsa = prevsa; + oglrender->prevar = prevar; if (is_view_context) { ED_view3d_context_user_region(C, &oglrender->v3d, &oglrender->ar); /* so quad view renders camera */ - oglrender->rv3d= oglrender->ar->regiondata; + oglrender->rv3d = oglrender->ar->regiondata; /* MUST be cleared on exit */ oglrender->scene->customdata_mask_modal = (ED_view3d_datamask(oglrender->scene, oglrender->v3d) | @@ -341,22 +341,22 @@ static int screen_opengl_render_init(bContext *C, wmOperator *op) } /* create render */ - oglrender->re= RE_NewRender(scene->id.name); + oglrender->re = RE_NewRender(scene->id.name); /* create image and image user */ - oglrender->ima= BKE_image_verify_viewer(IMA_TYPE_R_RESULT, "Render Result"); + oglrender->ima = BKE_image_verify_viewer(IMA_TYPE_R_RESULT, "Render Result"); BKE_image_signal(oglrender->ima, NULL, IMA_SIGNAL_FREE); BKE_image_backup_render(oglrender->scene, oglrender->ima); - oglrender->iuser.scene= scene; - oglrender->iuser.ok= 1; + oglrender->iuser.scene = scene; + oglrender->iuser.ok = 1; /* create render result */ RE_InitState(oglrender->re, NULL, &scene->r, NULL, sizex, sizey, NULL); - rr= RE_AcquireResultWrite(oglrender->re); - if (rr->rectf==NULL) - rr->rectf= MEM_callocN(sizeof(float)*4*sizex*sizey, "screen_opengl_render_init rect"); + rr = RE_AcquireResultWrite(oglrender->re); + if (rr->rectf == NULL) + rr->rectf = MEM_callocN(sizeof(float) * 4 * sizex * sizey, "screen_opengl_render_init rect"); RE_ReleaseResult(oglrender->re); return 1; @@ -364,8 +364,8 @@ static int screen_opengl_render_init(bContext *C, wmOperator *op) static void screen_opengl_render_end(bContext *C, OGLRender *oglrender) { - Main *bmain= CTX_data_main(C); - Scene *scene= oglrender->scene; + Main *bmain = CTX_data_main(C); + Scene *scene = oglrender->scene; if (oglrender->mh) { if (BKE_imtype_is_movie(scene->r.im_format.imtype)) @@ -373,20 +373,20 @@ static void screen_opengl_render_end(bContext *C, OGLRender *oglrender) } if (oglrender->timer) { /* exec will not have a timer */ - scene->r.cfra= oglrender->cfrao; + scene->r.cfra = oglrender->cfrao; scene_update_for_newframe(bmain, scene, screen_opengl_layers(oglrender)); WM_event_remove_timer(CTX_wm_manager(C), CTX_wm_window(C), oglrender->timer); } WM_cursor_wait(0); - WM_event_add_notifier(C, NC_SCENE|ND_RENDER_RESULT, oglrender->scene); + WM_event_add_notifier(C, NC_SCENE | ND_RENDER_RESULT, oglrender->scene); U.obcenter_dia = oglrender->obcenter_dia_back; GPU_offscreen_free(oglrender->ofs); - oglrender->scene->customdata_mask_modal= 0; + oglrender->scene->customdata_mask_modal = 0; CTX_wm_area_set(C, oglrender->prevsa); CTX_wm_region_set(C, oglrender->prevar); @@ -408,11 +408,11 @@ static int screen_opengl_render_anim_initialize(bContext *C, wmOperator *op) OGLRender *oglrender; Scene *scene; - oglrender= op->customdata; - scene= oglrender->scene; + oglrender = op->customdata; + scene = oglrender->scene; - oglrender->reports= op->reports; - oglrender->mh= BKE_get_movie_handle(scene->r.im_format.imtype); + oglrender->reports = op->reports; + oglrender->mh = BKE_get_movie_handle(scene->r.im_format.imtype); if (BKE_imtype_is_movie(scene->r.im_format.imtype)) { if (!oglrender->mh->start_movie(scene, &scene->r, oglrender->sizex, oglrender->sizey, oglrender->reports)) { screen_opengl_render_end(C, oglrender); @@ -420,31 +420,31 @@ static int screen_opengl_render_anim_initialize(bContext *C, wmOperator *op) } } - oglrender->cfrao= scene->r.cfra; - oglrender->nfra= PSFRA; - scene->r.cfra= PSFRA; + oglrender->cfrao = scene->r.cfra; + oglrender->nfra = PSFRA; + scene->r.cfra = PSFRA; return 1; } static int screen_opengl_render_anim_step(bContext *C, wmOperator *op) { - Main *bmain= CTX_data_main(C); - OGLRender *oglrender= op->customdata; - Scene *scene= oglrender->scene; + Main *bmain = CTX_data_main(C); + OGLRender *oglrender = op->customdata; + Scene *scene = oglrender->scene; ImBuf *ibuf; void *lock; char name[FILE_MAX]; - int ok= 0; - const short view_context= (oglrender->v3d != NULL); - Object *camera= NULL; + int ok = 0; + const short view_context = (oglrender->v3d != NULL); + Object *camera = NULL; /* update animated image textures for gpu, etc, * call before scene_update_for_newframe so modifiers with textuers don't lag 1 frame */ ED_image_update_frame(bmain, scene->r.cfra); /* go to next frame */ - while (CFRAnfra) { - unsigned int lay= screen_opengl_layers(oglrender); + while (CFRA < oglrender->nfra) { + unsigned int lay = screen_opengl_layers(oglrender); if (lay & 0xFF000000) lay &= 0xFF000000; @@ -456,50 +456,50 @@ static int screen_opengl_render_anim_step(bContext *C, wmOperator *op) scene_update_for_newframe(bmain, scene, screen_opengl_layers(oglrender)); if (view_context) { - if (oglrender->rv3d->persp==RV3D_CAMOB && oglrender->v3d->camera && oglrender->v3d->scenelock) { + if (oglrender->rv3d->persp == RV3D_CAMOB && oglrender->v3d->camera && oglrender->v3d->scenelock) { /* since scene_update_for_newframe() is used rather * then ED_update_for_newframe() the camera needs to be set */ if (scene_camera_switch_update(scene)) { - oglrender->v3d->camera= scene->camera; + oglrender->v3d->camera = scene->camera; } - camera= oglrender->v3d->camera; + camera = oglrender->v3d->camera; } } else { scene_camera_switch_update(scene); - camera= scene->camera; + camera = scene->camera; } /* render into offscreen buffer */ screen_opengl_render_apply(oglrender); /* save to disk */ - ibuf= BKE_image_acquire_ibuf(oglrender->ima, &oglrender->iuser, &lock); + ibuf = BKE_image_acquire_ibuf(oglrender->ima, &oglrender->iuser, &lock); if (ibuf) { /* color -> greyscale */ /* editing directly would alter the render view */ if (scene->r.im_format.planes == R_IMF_PLANES_BW) { - ImBuf *ibuf_bw= IMB_dupImBuf(ibuf); + ImBuf *ibuf_bw = IMB_dupImBuf(ibuf); IMB_color_to_bw(ibuf_bw); // IMB_freeImBuf(ibuf); /* owned by the image */ - ibuf= ibuf_bw; + ibuf = ibuf_bw; } else { /* this is lightweight & doesnt re-alloc the buffers, only do this * to save the correct bit depth since the image is always RGBA */ - ImBuf *ibuf_cpy= IMB_allocImBuf(ibuf->x, ibuf->y, scene->r.im_format.planes, 0); - ibuf_cpy->rect= ibuf->rect; - ibuf_cpy->rect_float= ibuf->rect_float; - ibuf_cpy->zbuf_float= ibuf->zbuf_float; - ibuf= ibuf_cpy; + ImBuf *ibuf_cpy = IMB_allocImBuf(ibuf->x, ibuf->y, scene->r.im_format.planes, 0); + ibuf_cpy->rect = ibuf->rect; + ibuf_cpy->rect_float = ibuf->rect_float; + ibuf_cpy->zbuf_float = ibuf->zbuf_float; + ibuf = ibuf_cpy; } if (BKE_imtype_is_movie(scene->r.im_format.imtype)) { - ok= oglrender->mh->append_movie(&scene->r, SFRA, CFRA, (int*)ibuf->rect, - oglrender->sizex, oglrender->sizey, oglrender->reports); + ok = oglrender->mh->append_movie(&scene->r, SFRA, CFRA, (int *)ibuf->rect, + oglrender->sizex, oglrender->sizey, oglrender->reports); if (ok) { printf("Append frame %d", scene->r.cfra); BKE_reportf(op->reports, RPT_INFO, "Appended frame: %d", scene->r.cfra); @@ -507,9 +507,9 @@ static int screen_opengl_render_anim_step(bContext *C, wmOperator *op) } else { BKE_makepicstring(name, scene->r.pic, oglrender->bmain->name, scene->r.cfra, scene->r.im_format.imtype, scene->r.scemode & R_EXTENSION, TRUE); - ok= BKE_write_ibuf_stamp(scene, camera, ibuf, name, &scene->r.im_format); + ok = BKE_write_ibuf_stamp(scene, camera, ibuf, name, &scene->r.im_format); - if (ok==0) { + if (ok == 0) { printf("Write error: cannot save %s\n", name); BKE_reportf(op->reports, RPT_ERROR, "Write error: cannot save %s", name); } @@ -544,11 +544,11 @@ static int screen_opengl_render_anim_step(bContext *C, wmOperator *op) static int screen_opengl_render_modal(bContext *C, wmOperator *op, wmEvent *event) { - OGLRender *oglrender= op->customdata; - int anim= RNA_boolean_get(op->ptr, "animation"); + OGLRender *oglrender = op->customdata; + int anim = RNA_boolean_get(op->ptr, "animation"); int ret; - switch(event->type) { + switch (event->type) { case ESCKEY: /* cancel */ screen_opengl_render_end(C, op->customdata); @@ -563,7 +563,7 @@ static int screen_opengl_render_modal(bContext *C, wmOperator *op, wmEvent *even } /* run first because screen_opengl_render_anim_step can free oglrender */ - WM_event_add_notifier(C, NC_SCENE|ND_RENDER_RESULT, oglrender->scene); + WM_event_add_notifier(C, NC_SCENE | ND_RENDER_RESULT, oglrender->scene); if (anim == 0) { screen_opengl_render_apply(op->customdata); @@ -571,7 +571,7 @@ static int screen_opengl_render_modal(bContext *C, wmOperator *op, wmEvent *even return OPERATOR_FINISHED; } else - ret= screen_opengl_render_anim_step(C, op); + ret = screen_opengl_render_anim_step(C, op); /* stop at the end or on error */ if (ret == 0) { @@ -584,7 +584,7 @@ static int screen_opengl_render_modal(bContext *C, wmOperator *op, wmEvent *even static int screen_opengl_render_invoke(bContext *C, wmOperator *op, wmEvent *event) { OGLRender *oglrender; - int anim= RNA_boolean_get(op->ptr, "animation"); + int anim = RNA_boolean_get(op->ptr, "animation"); if (!screen_opengl_render_init(C, op)) return OPERATOR_CANCELLED; @@ -594,11 +594,11 @@ static int screen_opengl_render_invoke(bContext *C, wmOperator *op, wmEvent *eve return OPERATOR_CANCELLED; } - oglrender= op->customdata; + oglrender = op->customdata; render_view_open(C, event->x, event->y); WM_event_add_modal_handler(C, op); - oglrender->timer= WM_event_add_timer(CTX_wm_manager(C), CTX_wm_window(C), TIMER, 0.01f); + oglrender->timer = WM_event_add_timer(CTX_wm_manager(C), CTX_wm_window(C), TIMER, 0.01f); return OPERATOR_RUNNING_MODAL; } @@ -606,7 +606,7 @@ static int screen_opengl_render_invoke(bContext *C, wmOperator *op, wmEvent *eve /* executes blocking render */ static int screen_opengl_render_exec(bContext *C, wmOperator *op) { - const short is_animation= RNA_boolean_get(op->ptr, "animation"); + const short is_animation = RNA_boolean_get(op->ptr, "animation"); if (!screen_opengl_render_init(C, op)) return OPERATOR_CANCELLED; @@ -619,19 +619,19 @@ static int screen_opengl_render_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } else { - int ret= 1; + int ret = 1; if (!screen_opengl_render_anim_initialize(C, op)) return OPERATOR_CANCELLED; while (ret) { - ret= screen_opengl_render_anim_step(C, op); + ret = screen_opengl_render_anim_step(C, op); } } // no redraw needed, we leave state as we entered it // ED_update_for_newframe(C, 1); - WM_event_add_notifier(C, NC_SCENE|ND_RENDER_RESULT, CTX_data_scene(C)); + WM_event_add_notifier(C, NC_SCENE | ND_RENDER_RESULT, CTX_data_scene(C)); return OPERATOR_FINISHED; } diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index 9ba961302f1..27e1486c4f3 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -100,9 +100,9 @@ #include "render_intern.h" -ImBuf* get_brush_icon(Brush *brush) +ImBuf *get_brush_icon(Brush *brush) { - static const int flags = IB_rect|IB_multilayer|IB_metadata; + static const int flags = IB_rect | IB_multilayer | IB_metadata; char path[FILE_MAX]; char *folder; @@ -116,16 +116,16 @@ ImBuf* get_brush_icon(Brush *brush) BLI_strncpy(path, brush->icon_filepath, sizeof(brush->icon_filepath)); BLI_path_abs(path, G.main->name); - brush->icon_imbuf= IMB_loadiffname(path, flags); + brush->icon_imbuf = IMB_loadiffname(path, flags); // otherwise lets try to find it in other directories if (!(brush->icon_imbuf)) { - folder= BLI_get_folder(BLENDER_DATAFILES, "brushicons"); + folder = BLI_get_folder(BLENDER_DATAFILES, "brushicons"); BLI_make_file_string(G.main->name, path, folder, brush->icon_filepath); if (path[0]) - brush->icon_imbuf= IMB_loadiffname(path, flags); + brush->icon_imbuf = IMB_loadiffname(path, flags); } if (brush->icon_imbuf) @@ -156,7 +156,7 @@ typedef struct ShaderPreview { Lamp *lampcopy; World *worldcopy; - float col[4]; /* active object color */ + float col[4]; /* active object color */ int sizex, sizey; unsigned int *pr_rect; @@ -179,7 +179,7 @@ typedef struct IconPreview { /* *************************** Preview for buttons *********************** */ -static Main *pr_main= NULL; +static Main *pr_main = NULL; void ED_preview_init_dbase(void) { @@ -187,16 +187,16 @@ void ED_preview_init_dbase(void) BlendFileData *bfd; extern int datatoc_preview_blend_size; extern char datatoc_preview_blend[]; - const int fileflags= G.fileflags; + const int fileflags = G.fileflags; G.fileflags |= G_FILE_NO_UI; - bfd= BLO_read_from_memory(datatoc_preview_blend, datatoc_preview_blend_size, NULL); + bfd = BLO_read_from_memory(datatoc_preview_blend, datatoc_preview_blend_size, NULL); if (bfd) { - pr_main= bfd->main; + pr_main = bfd->main; MEM_freeN(bfd); } - G.fileflags= fileflags; + G.fileflags = fileflags; #endif } @@ -212,18 +212,18 @@ static int preview_mat_has_sss(Material *mat, bNodeTree *ntree) if (mat->sss_flag & MA_DIFF_SSS) return 1; if (mat->nodetree) - if ( preview_mat_has_sss(NULL, mat->nodetree)) + if (preview_mat_has_sss(NULL, mat->nodetree)) return 1; } else if (ntree) { bNode *node; - for (node= ntree->nodes.first; node; node= node->next) { - if (node->type==NODE_GROUP && node->id) { - if ( preview_mat_has_sss(NULL, (bNodeTree *)node->id)) + for (node = ntree->nodes.first; node; node = node->next) { + if (node->type == NODE_GROUP && node->id) { + if (preview_mat_has_sss(NULL, (bNodeTree *)node->id)) return 1; } else if (node->id && ELEM(node->type, SH_NODE_MATERIAL, SH_NODE_MATERIAL_EXT)) { - mat= (Material *)node->id; + mat = (Material *)node->id; if (mat->sss_flag & MA_DIFF_SSS) return 1; } @@ -239,55 +239,55 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre Scene *sce; Base *base; - if (pr_main==NULL) return NULL; + if (pr_main == NULL) return NULL; - sce= pr_main->scene.first; + sce = pr_main->scene.first; if (sce) { /* this flag tells render to not execute depsgraph or ipos etc */ sce->r.scemode |= R_PREVIEWBUTS; /* set world always back, is used now */ - sce->world= pr_main->world.first; + sce->world = pr_main->world.first; /* now: exposure copy */ if (scene->world) { - sce->world->exp= scene->world->exp; - sce->world->range= scene->world->range; + sce->world->exp = scene->world->exp; + sce->world->range = scene->world->range; } sce->r.color_mgt_flag = scene->r.color_mgt_flag; /* prevent overhead for small renders and icons (32) */ if (id && sp->sizex < 40) - sce->r.xparts= sce->r.yparts= 1; + sce->r.xparts = sce->r.yparts = 1; else - sce->r.xparts= sce->r.yparts= 4; + sce->r.xparts = sce->r.yparts = 4; /* exception: don't color manage texture previews or icons */ - if ((id && sp->pr_method==PR_ICON_RENDER) || id_type == ID_TE) + if ((id && sp->pr_method == PR_ICON_RENDER) || id_type == ID_TE) sce->r.color_mgt_flag &= ~R_COLOR_MANAGEMENT; - if ((id && sp->pr_method==PR_ICON_RENDER) && id_type != ID_WO) - sce->r.alphamode= R_ALPHAPREMUL; + if ((id && sp->pr_method == PR_ICON_RENDER) && id_type != ID_WO) + sce->r.alphamode = R_ALPHAPREMUL; else - sce->r.alphamode= R_ADDSKY; + sce->r.alphamode = R_ADDSKY; - sce->r.cfra= scene->r.cfra; + sce->r.cfra = scene->r.cfra; BLI_strncpy(sce->r.engine, scene->r.engine, sizeof(sce->r.engine)); - if (id_type==ID_MA) { - Material *mat= NULL, *origmat= (Material *)id; + if (id_type == ID_MA) { + Material *mat = NULL, *origmat = (Material *)id; if (origmat) { /* work on a copy */ - mat= localize_material(origmat); - sp->matcopy= mat; + mat = localize_material(origmat); + sp->matcopy = mat; BLI_addtail(&pr_main->mat, mat); - init_render_material(mat, 0, NULL); /* call that retrieves mode_l */ + init_render_material(mat, 0, NULL); /* call that retrieves mode_l */ end_render_material(mat); /* un-useful option */ - if (sp->pr_method==PR_ICON_RENDER) + if (sp->pr_method == PR_ICON_RENDER) mat->shade_flag &= ~MA_OBCOLOR; /* turn on raytracing if needed */ @@ -304,9 +304,9 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre /* this only works in a specific case where the preview.blend contains * an object starting with 'c' which has a material linked to it (not the obdata) * and that material has a fake shadow texture in the active texture slot */ - for (base= sce->base.first; base; base= base->next) { - if (base->object->id.name[2]=='c') { - Material *shadmat= give_current_material(base->object, base->object->actcol); + for (base = sce->base.first; base; base = base->next) { + if (base->object->id.name[2] == 'c') { + Material *shadmat = give_current_material(base->object, base->object->actcol); if (shadmat) { if (mat->mode & MA_SHADBUF) shadmat->septex = 0; else shadmat->septex |= 1; @@ -317,10 +317,10 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre /* turn off bounce lights for volume, * doesn't make much visual difference and slows it down too */ if (mat->material_type == MA_TYPE_VOLUME) { - for (base= sce->base.first; base; base= base->next) { + for (base = sce->base.first; base; base = base->next) { if (base->object->type == OB_LAMP) { /* if doesn't match 'Lamp.002' --> main key light */ - if ( strcmp(base->object->id.name+2, "Lamp.002") != 0 ) { + if (strcmp(base->object->id.name + 2, "Lamp.002") != 0) { base->object->restrictflag |= OB_RESTRICT_RENDER; } } @@ -328,17 +328,17 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre } - if (sp->pr_method==PR_ICON_RENDER) { + if (sp->pr_method == PR_ICON_RENDER) { if (mat->material_type == MA_TYPE_HALO) { - sce->lay= 1<lay = 1 << MA_FLAT; } else { - sce->lay= 1<lay = 1 << MA_SPHERE_A; } } else { - sce->lay= 1<pr_type; - if (mat->nodetree && sp->pr_method==PR_NODE_RENDER) { + sce->lay = 1 << mat->pr_type; + if (mat->nodetree && sp->pr_method == PR_NODE_RENDER) { /* two previews, they get copied by wmJob */ ntreeInitPreview(mat->nodetree, sp->sizex, sp->sizey); ntreeInitPreview(origmat->nodetree, sp->sizex, sp->sizey); @@ -346,22 +346,22 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre } } else { - sce->r.mode &= ~(R_OSA|R_RAYTRACE|R_SSS); + sce->r.mode &= ~(R_OSA | R_RAYTRACE | R_SSS); } - for (base= sce->base.first; base; base= base->next) { - if (base->object->id.name[2]=='p') { + for (base = sce->base.first; base; base = base->next) { + if (base->object->id.name[2] == 'p') { /* copy over object color, in case material uses it */ copy_v4_v4(base->object->col, sp->col); if (OB_TYPE_SUPPORT_MATERIAL(base->object->type)) { /* don't use assign_material, it changed mat->id.us, which shows in the UI */ - Material ***matar= give_matarar(base->object); - int actcol= MAX2(base->object->actcol > 0, 1) - 1; + Material ***matar = give_matarar(base->object); + int actcol = MAX2(base->object->actcol > 0, 1) - 1; if (matar && actcol < base->object->totcol) - (*matar)[actcol]= mat; + (*matar)[actcol] = mat; } else if (base->object->type == OB_LAMP) { base->object->restrictflag &= ~OB_RESTRICT_RENDER; @@ -369,92 +369,92 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre } } } - else if (id_type==ID_TE) { - Tex *tex= NULL, *origtex= (Tex *)id; + else if (id_type == ID_TE) { + Tex *tex = NULL, *origtex = (Tex *)id; if (origtex) { - tex= localize_texture(origtex); - sp->texcopy= tex; + tex = localize_texture(origtex); + sp->texcopy = tex; BLI_addtail(&pr_main->tex, tex); } - sce->lay= 1<lay = 1 << MA_TEXTURE; - for (base= sce->base.first; base; base= base->next) { - if (base->object->id.name[2]=='t') { - Material *mat= give_current_material(base->object, base->object->actcol); + for (base = sce->base.first; base; base = base->next) { + if (base->object->id.name[2] == 't') { + Material *mat = give_current_material(base->object, base->object->actcol); if (mat && mat->mtex[0]) { - mat->mtex[0]->tex= tex; + mat->mtex[0]->tex = tex; if (tex && sp->slot) mat->mtex[0]->which_output = sp->slot->which_output; /* show alpha in this case */ - if (tex==NULL || (tex->flag & TEX_PRV_ALPHA)) { + if (tex == NULL || (tex->flag & TEX_PRV_ALPHA)) { mat->mtex[0]->mapto |= MAP_ALPHA; - mat->alpha= 0.0f; + mat->alpha = 0.0f; } else { mat->mtex[0]->mapto &= ~MAP_ALPHA; - mat->alpha= 1.0f; + mat->alpha = 1.0f; } } } } - if (tex && tex->nodetree && sp->pr_method==PR_NODE_RENDER) { + if (tex && tex->nodetree && sp->pr_method == PR_NODE_RENDER) { /* two previews, they get copied by wmJob */ ntreeInitPreview(origtex->nodetree, sp->sizex, sp->sizey); ntreeInitPreview(tex->nodetree, sp->sizex, sp->sizey); } } - else if (id_type==ID_LA) { - Lamp *la= NULL, *origla= (Lamp *)id; + else if (id_type == ID_LA) { + Lamp *la = NULL, *origla = (Lamp *)id; /* work on a copy */ if (origla) { - la= localize_lamp(origla); - sp->lampcopy= la; + la = localize_lamp(origla); + sp->lampcopy = la; BLI_addtail(&pr_main->lamp, la); } - if (la && la->type==LA_SUN && (la->sun_effect_type & LA_SUN_EFFECT_SKY)) { - sce->lay= 1<world= scene->world; - sce->camera= (Object *)BLI_findstring(&pr_main->object, "CameraAtmo", offsetof(ID, name)+2); + if (la && la->type == LA_SUN && (la->sun_effect_type & LA_SUN_EFFECT_SKY)) { + sce->lay = 1 << MA_ATMOS; + sce->world = scene->world; + sce->camera = (Object *)BLI_findstring(&pr_main->object, "CameraAtmo", offsetof(ID, name) + 2); } else { - sce->lay= 1<world= NULL; - sce->camera= (Object *)BLI_findstring(&pr_main->object, "Camera", offsetof(ID, name)+2); + sce->lay = 1 << MA_LAMP; + sce->world = NULL; + sce->camera = (Object *)BLI_findstring(&pr_main->object, "Camera", offsetof(ID, name) + 2); } sce->r.mode &= ~R_SHADOW; - for (base= sce->base.first; base; base= base->next) { - if (base->object->id.name[2]=='p') { - if (base->object->type==OB_LAMP) - base->object->data= la; + for (base = sce->base.first; base; base = base->next) { + if (base->object->id.name[2] == 'p') { + if (base->object->type == OB_LAMP) + base->object->data = la; } } - if (la && la->nodetree && sp->pr_method==PR_NODE_RENDER) { + if (la && la->nodetree && sp->pr_method == PR_NODE_RENDER) { /* two previews, they get copied by wmJob */ ntreeInitPreview(origla->nodetree, sp->sizex, sp->sizey); ntreeInitPreview(la->nodetree, sp->sizex, sp->sizey); } } - else if (id_type==ID_WO) { - World *wrld= NULL, *origwrld= (World *)id; + else if (id_type == ID_WO) { + World *wrld = NULL, *origwrld = (World *)id; if (origwrld) { - wrld= localize_world(origwrld); - sp->worldcopy= wrld; + wrld = localize_world(origwrld); + sp->worldcopy = wrld; BLI_addtail(&pr_main->world, wrld); } - sce->lay= 1<world= wrld; + sce->lay = 1 << MA_SKY; + sce->world = wrld; - if (wrld && wrld->nodetree && sp->pr_method==PR_NODE_RENDER) { + if (wrld && wrld->nodetree && sp->pr_method == PR_NODE_RENDER) { /* two previews, they get copied by wmJob */ ntreeInitPreview(wrld->nodetree, sp->sizex, sp->sizey); ntreeInitPreview(origwrld->nodetree, sp->sizex, sp->sizey); @@ -474,8 +474,8 @@ static int ed_preview_draw_rect(ScrArea *sa, Scene *sce, ID *id, int split, int Render *re; RenderResult rres; char name[32]; - int do_gamma_correct=0, do_predivide=0; - int offx=0, newx= rect->xmax-rect->xmin, newy= rect->ymax-rect->ymin; + int do_gamma_correct = 0, do_predivide = 0; + int offx = 0, newx = rect->xmax - rect->xmin, newy = rect->ymax - rect->ymin; if (id && GS(id->name) != ID_TE) { /* exception: don't color manage texture previews - show the raw values */ @@ -490,38 +490,38 @@ static int ed_preview_draw_rect(ScrArea *sa, Scene *sce, ID *id, int split, int if (split) { if (first) { - offx= 0; - newx= newx/2; + offx = 0; + newx = newx / 2; } else { - offx= newx/2; - newx= newx - newx/2; + offx = newx / 2; + newx = newx - newx / 2; } } - re= RE_GetRender(name); + re = RE_GetRender(name); RE_AcquireResultImage(re, &rres); if (rres.rectf) { - if (ABS(rres.rectx-newx)<2 && ABS(rres.recty-newy)<2) { + if (ABS(rres.rectx - newx) < 2 && ABS(rres.recty - newy) < 2) { newrect->xmax = MAX2(newrect->xmax, rect->xmin + rres.rectx + offx); newrect->ymax = MAX2(newrect->ymax, rect->ymin + rres.recty); if (rres.rectx && rres.recty) { /* temporary conversion to byte for drawing */ - float fx= rect->xmin + offx; - float fy= rect->ymin; - int profile_from= (do_gamma_correct)? IB_PROFILE_LINEAR_RGB: IB_PROFILE_SRGB; - int dither= 0; + float fx = rect->xmin + offx; + float fy = rect->ymin; + int profile_from = (do_gamma_correct) ? IB_PROFILE_LINEAR_RGB : IB_PROFILE_SRGB; + int dither = 0; unsigned char *rect_byte; - rect_byte= MEM_mallocN(rres.rectx*rres.recty*sizeof(int), "ed_preview_draw_rect"); + rect_byte = MEM_mallocN(rres.rectx * rres.recty * sizeof(int), "ed_preview_draw_rect"); IMB_buffer_byte_from_float(rect_byte, rres.rectf, - 4, dither, IB_PROFILE_SRGB, profile_from, do_predivide, - rres.rectx, rres.recty, rres.rectx, rres.rectx); + 4, dither, IB_PROFILE_SRGB, profile_from, do_predivide, + rres.rectx, rres.recty, rres.rectx, rres.rectx); glaDrawPixelsSafe(fx, fy, rres.rectx, rres.recty, rres.rectx, GL_RGBA, GL_UNSIGNED_BYTE, rect_byte); @@ -540,15 +540,15 @@ static int ed_preview_draw_rect(ScrArea *sa, Scene *sce, ID *id, int split, int void ED_preview_draw(const bContext *C, void *idp, void *parentp, void *slotp, rcti *rect) { if (idp) { - ScrArea *sa= CTX_wm_area(C); + ScrArea *sa = CTX_wm_area(C); Scene *sce = CTX_data_scene(C); ID *id = (ID *)idp; - ID *parent= (ID *)parentp; - MTex *slot= (MTex *)slotp; - SpaceButs *sbuts= sa->spacedata.first; + ID *parent = (ID *)parentp; + MTex *slot = (MTex *)slotp; + SpaceButs *sbuts = sa->spacedata.first; rcti newrect; int ok; - int newx= rect->xmax-rect->xmin, newy= rect->ymax-rect->ymin; + int newx = rect->xmax - rect->xmin, newy = rect->ymax - rect->ymin; newrect.xmin = rect->xmin; newrect.xmax = rect->xmin; @@ -563,15 +563,15 @@ void ED_preview_draw(const bContext *C, void *idp, void *parentp, void *slotp, r ok = ed_preview_draw_rect(sa, sce, id, 0, 0, rect, &newrect); if (ok) - *rect= newrect; + *rect = newrect; /* check for spacetype... */ - if (sbuts->spacetype==SPACE_BUTS && sbuts->preview) { - sbuts->preview= 0; - ok= 0; + if (sbuts->spacetype == SPACE_BUTS && sbuts->preview) { + sbuts->preview = 0; + ok = 0; } - if (ok==0) { + if (ok == 0) { ED_preview_shader_job(C, sa, id, parent, slot, newx, newy, PR_BUTS_RENDER); } } @@ -582,15 +582,15 @@ void ED_preview_draw(const bContext *C, void *idp, void *parentp, void *slotp, r /* inside thread, called by renderer, sets job update value */ static void shader_preview_draw(void *spv, RenderResult *UNUSED(rr), volatile struct rcti *UNUSED(rect)) { - ShaderPreview *sp= spv; + ShaderPreview *sp = spv; - *(sp->do_update)= 1; + *(sp->do_update) = 1; } /* called by renderer, checks job value */ static int shader_preview_break(void *spv) { - ShaderPreview *sp= spv; + ShaderPreview *sp = spv; return *(sp->stop); } @@ -598,30 +598,30 @@ static int shader_preview_break(void *spv) /* outside thread, called before redraw notifiers, it moves finished preview over */ static void shader_preview_updatejob(void *spv) { - ShaderPreview *sp= spv; + ShaderPreview *sp = spv; if (sp->id) { - if (sp->pr_method==PR_NODE_RENDER) { - if ( GS(sp->id->name) == ID_MA) { - Material *mat= (Material *)sp->id; + if (sp->pr_method == PR_NODE_RENDER) { + if (GS(sp->id->name) == ID_MA) { + Material *mat = (Material *)sp->id; if (sp->matcopy && mat->nodetree && sp->matcopy->nodetree) ntreeLocalSync(sp->matcopy->nodetree, mat->nodetree); } - else if ( GS(sp->id->name) == ID_TE) { - Tex *tex= (Tex *)sp->id; + else if (GS(sp->id->name) == ID_TE) { + Tex *tex = (Tex *)sp->id; if (sp->texcopy && tex->nodetree && sp->texcopy->nodetree) ntreeLocalSync(sp->texcopy->nodetree, tex->nodetree); } - else if ( GS(sp->id->name) == ID_WO) { - World *wrld= (World *)sp->id; + else if (GS(sp->id->name) == ID_WO) { + World *wrld = (World *)sp->id; if (sp->worldcopy && wrld->nodetree && sp->worldcopy->nodetree) ntreeLocalSync(sp->worldcopy->nodetree, wrld->nodetree); } - else if ( GS(sp->id->name) == ID_LA) { - Lamp *la= (Lamp *)sp->id; + else if (GS(sp->id->name) == ID_LA) { + Lamp *la = (Lamp *)sp->id; if (sp->lampcopy && la->nodetree && sp->lampcopy->nodetree) ntreeLocalSync(sp->lampcopy->nodetree, la->nodetree); @@ -635,50 +635,50 @@ static void shader_preview_render(ShaderPreview *sp, ID *id, int split, int firs Render *re; Scene *sce; float oldlens; - short idtype= GS(id->name); + short idtype = GS(id->name); char name[32]; int sizex; /* get the stuff from the builtin preview dbase */ - sce= preview_prepare_scene(sp->scene, id, idtype, sp); // XXX sizex - if (sce==NULL) return; + sce = preview_prepare_scene(sp->scene, id, idtype, sp); // XXX sizex + if (sce == NULL) return; if (!split || first) sprintf(name, "Preview %p", sp->owner); else sprintf(name, "SecondPreview %p", sp->owner); - re= RE_GetRender(name); + re = RE_GetRender(name); /* full refreshed render from first tile */ - if (re==NULL) - re= RE_NewRender(name); + if (re == NULL) + re = RE_NewRender(name); /* sce->r gets copied in RE_InitState! */ - sce->r.scemode &= ~(R_MATNODE_PREVIEW|R_TEXNODE_PREVIEW); + sce->r.scemode &= ~(R_MATNODE_PREVIEW | R_TEXNODE_PREVIEW); sce->r.scemode &= ~R_NO_IMAGE_LOAD; - if (sp->pr_method==PR_ICON_RENDER) { + if (sp->pr_method == PR_ICON_RENDER) { sce->r.scemode |= R_NO_IMAGE_LOAD; sce->r.mode |= R_OSA; } - else if (sp->pr_method==PR_NODE_RENDER) { + else if (sp->pr_method == PR_NODE_RENDER) { if (idtype == ID_MA) sce->r.scemode |= R_MATNODE_PREVIEW; else if (idtype == ID_TE) sce->r.scemode |= R_TEXNODE_PREVIEW; sce->r.mode &= ~R_OSA; } - else { /* PR_BUTS_RENDER */ + else { /* PR_BUTS_RENDER */ sce->r.mode |= R_OSA; } /* in case of split preview, use border render */ if (split) { - if (first) sizex= sp->sizex/2; - else sizex= sp->sizex - sp->sizex/2; + if (first) sizex = sp->sizex / 2; + else sizex = sp->sizex - sp->sizex / 2; } - else sizex= sp->sizex; + else sizex = sp->sizex; /* allocates or re-uses render result */ - sce->r.xsch= sizex; - sce->r.ysch= sp->sizey; - sce->r.size= 100; + sce->r.xsch = sizex; + sce->r.ysch = sp->sizey; + sce->r.size = 100; /* callbacs are cleared on GetRender() */ if (ELEM(sp->pr_method, PR_BUTS_RENDER, PR_NODE_RENDER)) { @@ -688,17 +688,17 @@ static void shader_preview_render(ShaderPreview *sp, ID *id, int split, int firs RE_test_break_cb(re, sp, shader_preview_break); /* lens adjust */ - oldlens= ((Camera *)sce->camera->data)->lens; + oldlens = ((Camera *)sce->camera->data)->lens; if (sizex > sp->sizey) - ((Camera *)sce->camera->data)->lens *= (float)sp->sizey/(float)sizex; + ((Camera *)sce->camera->data)->lens *= (float)sp->sizey / (float)sizex; /* entire cycle for render engine */ RE_PreviewRender(re, pr_main, sce); - ((Camera *)sce->camera->data)->lens= oldlens; + ((Camera *)sce->camera->data)->lens = oldlens; /* handle results */ - if (sp->pr_method==PR_ICON_RENDER) { + if (sp->pr_method == PR_ICON_RENDER) { // char *rct= (char *)(sp->pr_rect + 32*16 + 16); if (sp->pr_rect) @@ -726,10 +726,10 @@ static void shader_preview_render(ShaderPreview *sp, ID *id, int split, int firs /* runs inside thread for material and icons */ static void shader_preview_startjob(void *customdata, short *stop, short *do_update) { - ShaderPreview *sp= customdata; + ShaderPreview *sp = customdata; - sp->stop= stop; - sp->do_update= do_update; + sp->stop = stop; + sp->do_update = do_update; if (sp->parent) { shader_preview_render(sp, sp->id, 1, 1); @@ -738,12 +738,12 @@ static void shader_preview_startjob(void *customdata, short *stop, short *do_upd else shader_preview_render(sp, sp->id, 0, 0); - *do_update= 1; + *do_update = 1; } static void shader_preview_free(void *customdata) { - ShaderPreview *sp= customdata; + ShaderPreview *sp = customdata; if (sp->matcopy) { struct IDProperty *properties; @@ -756,14 +756,14 @@ static void shader_preview_free(void *customdata) BLI_remlink(&pr_main->mat, sp->matcopy); /* free_material decrements texture, prevent this. hack alert! */ - for (a=0; amatcopy->mtex[a]; - if (mtex && mtex->tex) mtex->tex= NULL; + for (a = 0; a < MAX_MTEX; a++) { + MTex *mtex = sp->matcopy->mtex[a]; + if (mtex && mtex->tex) mtex->tex = NULL; } free_material(sp->matcopy); - properties= IDP_GetProperties((ID *)sp->matcopy, FALSE); + properties = IDP_GetProperties((ID *)sp->matcopy, FALSE); if (properties) { IDP_FreeProperty(properties); MEM_freeN(properties); @@ -779,7 +779,7 @@ static void shader_preview_free(void *customdata) BLI_remlink(&pr_main->tex, sp->texcopy); free_texture(sp->texcopy); - properties= IDP_GetProperties((ID *)sp->texcopy, FALSE); + properties = IDP_GetProperties((ID *)sp->texcopy, FALSE); if (properties) { IDP_FreeProperty(properties); MEM_freeN(properties); @@ -795,7 +795,7 @@ static void shader_preview_free(void *customdata) BLI_remlink(&pr_main->world, sp->worldcopy); free_world(sp->worldcopy); - properties= IDP_GetProperties((ID *)sp->worldcopy, FALSE); + properties = IDP_GetProperties((ID *)sp->worldcopy, FALSE); if (properties) { IDP_FreeProperty(properties); MEM_freeN(properties); @@ -811,7 +811,7 @@ static void shader_preview_free(void *customdata) BLI_remlink(&pr_main->lamp, sp->lampcopy); free_lamp(sp->lampcopy); - properties= IDP_GetProperties((ID *)sp->lampcopy, FALSE); + properties = IDP_GetProperties((ID *)sp->lampcopy, FALSE); if (properties) { IDP_FreeProperty(properties); MEM_freeN(properties); @@ -832,7 +832,7 @@ static void icon_copy_rect(ImBuf *ibuf, unsigned int w, unsigned int h, unsigned short ex, ey, dx, dy; /* paranoia test */ - if (ibuf==NULL || (ibuf->rect==NULL && ibuf->rect_float==NULL)) + if (ibuf == NULL || (ibuf->rect == NULL && ibuf->rect_float == NULL)) return; /* waste of cpu cyles... but the imbuf API has no other way to scale fast (ton) */ @@ -843,10 +843,10 @@ static void icon_copy_rect(ImBuf *ibuf, unsigned int w, unsigned int h, unsigned if (ima->x > ima->y) { scaledx = (float)w; - scaledy = ( (float)ima->y/(float)ima->x )*(float)w; + scaledy = ( (float)ima->y / (float)ima->x) * (float)w; } else { - scaledx = ( (float)ima->x/(float)ima->y )*(float)h; + scaledx = ( (float)ima->x / (float)ima->y) * (float)h; scaledy = (float)h; } @@ -859,15 +859,15 @@ static void icon_copy_rect(ImBuf *ibuf, unsigned int w, unsigned int h, unsigned IMB_scalefastImBuf(ima, ex, ey); /* if needed, convert to 32 bits */ - if (ima->rect==NULL) + if (ima->rect == NULL) IMB_rect_from_float(ima); srect = ima->rect; drect = rect; - drect+= dy*w+dx; - for (;ey > 0; ey--) { - memcpy(drect,srect, ex * sizeof(int)); + drect += dy * w + dx; + for (; ey > 0; ey--) { + memcpy(drect, srect, ex * sizeof(int)); drect += w; srect += ima->x; } @@ -877,55 +877,55 @@ static void icon_copy_rect(ImBuf *ibuf, unsigned int w, unsigned int h, unsigned static void set_alpha(char *cp, int sizex, int sizey, char alpha) { - int a, size= sizex*sizey; + int a, size = sizex * sizey; - for (a=0; aid; - short idtype= GS(id->name); + ShaderPreview *sp = customdata; + ID *id = sp->id; + short idtype = GS(id->name); if (idtype == ID_IM) { - Image *ima= (Image*)id; - ImBuf *ibuf= NULL; - ImageUser iuser= {NULL}; + Image *ima = (Image *)id; + ImBuf *ibuf = NULL; + ImageUser iuser = {NULL}; /* ima->ok is zero when Image cannot load */ - if (ima==NULL || ima->ok==0) + if (ima == NULL || ima->ok == 0) return; /* setup dummy image user */ - iuser.ok= iuser.framenr= 1; - iuser.scene= sp->scene; + iuser.ok = iuser.framenr = 1; + iuser.scene = sp->scene; /* elubie: this needs to be changed: here image is always loaded if not * already there. Very expensive for large images. Need to find a way to * only get existing ibuf */ ibuf = BKE_image_get_ibuf(ima, &iuser); - if (ibuf==NULL || ibuf->rect==NULL) + if (ibuf == NULL || ibuf->rect == NULL) return; icon_copy_rect(ibuf, sp->sizex, sp->sizey, sp->pr_rect); - *do_update= 1; + *do_update = 1; } else if (idtype == ID_BR) { - Brush *br= (Brush*)id; + Brush *br = (Brush *)id; - br->icon_imbuf= get_brush_icon(br); + br->icon_imbuf = get_brush_icon(br); - memset(sp->pr_rect, 0x888888, sp->sizex*sp->sizey*sizeof(unsigned int)); + memset(sp->pr_rect, 0x888888, sp->sizex * sp->sizey * sizeof(unsigned int)); if (!(br->icon_imbuf) || !(br->icon_imbuf->rect)) return; icon_copy_rect(br->icon_imbuf, sp->sizex, sp->sizey, sp->pr_rect); - *do_update= 1; + *do_update = 1; } else { /* re-use shader job */ @@ -934,13 +934,13 @@ static void icon_preview_startjob(void *customdata, short *stop, short *do_updat /* world is rendered with alpha=0, so it wasn't displayed * this could be render option for sky to, for later */ if (idtype == ID_WO) { - set_alpha((char*)sp->pr_rect, sp->sizex, sp->sizey, 255); + set_alpha((char *)sp->pr_rect, sp->sizex, sp->sizey, 255); } else if (idtype == ID_MA) { - Material* ma = (Material*)id; + Material *ma = (Material *)id; if (ma->material_type == MA_TYPE_HALO) - set_alpha((char*)sp->pr_rect, sp->sizex, sp->sizey, 255); + set_alpha((char *)sp->pr_rect, sp->sizex, sp->sizey, 255); } } } @@ -950,7 +950,7 @@ static void icon_preview_startjob(void *customdata, short *stop, short *do_updat static void common_preview_startjob(void *customdata, short *stop, short *do_update, float *UNUSED(progress)) { - ShaderPreview *sp= customdata; + ShaderPreview *sp = customdata; if (sp->pr_method == PR_ICON_RENDER) icon_preview_startjob(customdata, stop, do_update); @@ -992,12 +992,12 @@ static void icon_preview_startjob_all_sizes(void *customdata, short *stop, short memset(&sp, 0, sizeof(ShaderPreview)); /* construct shader preview from image size and previewcustomdata */ - sp.scene= ip->scene; - sp.owner= ip->owner; - sp.sizex= cur_size->sizex; - sp.sizey= cur_size->sizey; - sp.pr_method= PR_ICON_RENDER; - sp.pr_rect= cur_size->rect; + sp.scene = ip->scene; + sp.owner = ip->owner; + sp.sizex = cur_size->sizex; + sp.sizey = cur_size->sizey; + sp.pr_method = PR_ICON_RENDER; + sp.pr_rect = cur_size->rect; sp.id = ip->id; common_preview_startjob(&sp, stop, do_update, progress); @@ -1011,7 +1011,7 @@ static void icon_preview_endjob(void *customdata) IconPreview *ip = customdata; if (ip->id && GS(ip->id->name) == ID_BR) - WM_main_add_notifier(NC_BRUSH|NA_EDITED, ip->id); + WM_main_add_notifier(NC_BRUSH | NA_EDITED, ip->id); } static void icon_preview_free(void *customdata) @@ -1028,19 +1028,19 @@ void ED_preview_icon_job(const bContext *C, void *owner, ID *id, unsigned int *r IconPreview *ip, *old_ip; /* suspended start means it starts after 1 timer step, see WM_jobs_timer below */ - steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), owner, "Icon Preview", WM_JOB_EXCL_RENDER|WM_JOB_SUSPEND); + steve = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), owner, "Icon Preview", WM_JOB_EXCL_RENDER | WM_JOB_SUSPEND); - ip= MEM_callocN(sizeof(IconPreview), "icon preview"); + ip = MEM_callocN(sizeof(IconPreview), "icon preview"); /* render all resolutions from suspended job too */ - old_ip= WM_jobs_get_customdata(steve); + old_ip = WM_jobs_get_customdata(steve); if (old_ip) BLI_movelisttolist(&ip->sizes, &old_ip->sizes); /* customdata for preview thread */ - ip->scene= CTX_data_scene(C); - ip->owner= id; - ip->id= id; + ip->scene = CTX_data_scene(C); + ip->owner = id; + ip->id = id; icon_preview_add_size(ip, rect, sizex, sizey); @@ -1054,24 +1054,24 @@ void ED_preview_icon_job(const bContext *C, void *owner, ID *id, unsigned int *r void ED_preview_shader_job(const bContext *C, void *owner, ID *id, ID *parent, MTex *slot, int sizex, int sizey, int method) { - Object *ob= CTX_data_active_object(C); + Object *ob = CTX_data_active_object(C); wmJob *steve; ShaderPreview *sp; - steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), owner, "Shader Preview", WM_JOB_EXCL_RENDER); - sp= MEM_callocN(sizeof(ShaderPreview), "shader preview"); + steve = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), owner, "Shader Preview", WM_JOB_EXCL_RENDER); + sp = MEM_callocN(sizeof(ShaderPreview), "shader preview"); /* customdata for preview thread */ - sp->scene= CTX_data_scene(C); - sp->owner= owner; - sp->sizex= sizex; - sp->sizey= sizey; - sp->pr_method= method; + sp->scene = CTX_data_scene(C); + sp->owner = owner; + sp->sizex = sizex; + sp->sizey = sizey; + sp->pr_method = method; sp->id = id; - sp->parent= parent; - sp->slot= slot; + sp->parent = parent; + sp->slot = slot; if (ob && ob->totcol) copy_v4_v4(sp->col, ob->col); - else sp->col[0]= sp->col[1]= sp->col[2]= sp->col[3]= 1.0f; + else sp->col[0] = sp->col[1] = sp->col[2] = sp->col[3] = 1.0f; /* setup job */ WM_jobs_customdata(steve, sp, shader_preview_free); @@ -1083,7 +1083,7 @@ void ED_preview_shader_job(const bContext *C, void *owner, ID *id, ID *parent, M void ED_preview_kill_jobs(const struct bContext *C) { - wmWindowManager *wm= CTX_wm_manager(C); + wmWindowManager *wm = CTX_wm_manager(C); if (wm) WM_jobs_kill(wm, NULL, common_preview_startjob); } diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index 260817d743f..6e2a83c13bb 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -87,20 +87,20 @@ #include "RE_pipeline.h" -#include "render_intern.h" // own include +#include "render_intern.h" // own include /********************** material slot operators *********************/ static int material_slot_add_exec(bContext *C, wmOperator *UNUSED(op)) { - Object *ob= ED_object_context(C); + Object *ob = ED_object_context(C); if (!ob) return OPERATOR_CANCELLED; object_add_material_slot(ob); - WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); - WM_event_add_notifier(C, NC_OBJECT|ND_OB_SHADING, ob); + WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); + WM_event_add_notifier(C, NC_OBJECT | ND_OB_SHADING, ob); return OPERATOR_FINISHED; } @@ -117,12 +117,12 @@ void OBJECT_OT_material_slot_add(wmOperatorType *ot) ot->poll = ED_operator_object_active_editable; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } static int material_slot_remove_exec(bContext *C, wmOperator *op) { - Object *ob= ED_object_context(C); + Object *ob = ED_object_context(C); if (!ob) return OPERATOR_CANCELLED; @@ -135,8 +135,8 @@ static int material_slot_remove_exec(bContext *C, wmOperator *op) object_remove_material_slot(ob); DAG_id_tag_update(&ob->id, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); - WM_event_add_notifier(C, NC_OBJECT|ND_OB_SHADING, ob); + WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); + WM_event_add_notifier(C, NC_OBJECT | ND_OB_SHADING, ob); return OPERATOR_FINISHED; } @@ -153,52 +153,53 @@ void OBJECT_OT_material_slot_remove(wmOperatorType *ot) ot->poll = ED_operator_object_active_editable; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } static int material_slot_assign_exec(bContext *C, wmOperator *UNUSED(op)) { - Object *ob= ED_object_context(C); + Object *ob = ED_object_context(C); if (!ob) return OPERATOR_CANCELLED; - if (ob && ob->actcol>0) { + if (ob && ob->actcol > 0) { if (ob->type == OB_MESH) { BMEditMesh *em = BMEdit_FromObject(ob); BMFace *efa; BMIter iter; if (em) { - BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) { + BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) + { if (BM_elem_flag_test(efa, BM_ELEM_SELECT)) - efa->mat_nr= ob->actcol-1; + efa->mat_nr = ob->actcol - 1; } } } else if (ELEM(ob->type, OB_CURVE, OB_SURF)) { Nurb *nu; - ListBase *nurbs= curve_editnurbs((Curve*)ob->data); + ListBase *nurbs = curve_editnurbs((Curve *)ob->data); if (nurbs) { - for (nu= nurbs->first; nu; nu= nu->next) + for (nu = nurbs->first; nu; nu = nu->next) if (isNurbsel(nu)) - nu->mat_nr= nu->charidx= ob->actcol-1; + nu->mat_nr = nu->charidx = ob->actcol - 1; } } else if (ob->type == OB_FONT) { - EditFont *ef= ((Curve*)ob->data)->editfont; + EditFont *ef = ((Curve *)ob->data)->editfont; int i, selstart, selend; if (ef && BKE_font_getselection(ob, &selstart, &selend)) { - for (i=selstart; i<=selend; i++) + for (i = selstart; i <= selend; i++) ef->textbufinfo[i].mat_nr = ob->actcol; } } } DAG_id_tag_update(&ob->id, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, ob->data); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, ob->data); return OPERATOR_FINISHED; } @@ -215,7 +216,7 @@ void OBJECT_OT_material_slot_assign(wmOperatorType *ot) ot->poll = ED_operator_object_active_editable; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } static int material_slot_de_select(bContext *C, int select) @@ -229,24 +230,24 @@ static int material_slot_de_select(bContext *C, int select) BMEditMesh *em = BMEdit_FromObject(ob); if (em) { - EDBM_deselect_by_material(em, ob->actcol-1, select); + EDBM_deselect_by_material(em, ob->actcol - 1, select); } } else if (ELEM(ob->type, OB_CURVE, OB_SURF)) { - ListBase *nurbs= curve_editnurbs((Curve*)ob->data); + ListBase *nurbs = curve_editnurbs((Curve *)ob->data); Nurb *nu; BPoint *bp; BezTriple *bezt; int a; if (nurbs) { - for (nu= nurbs->first; nu; nu=nu->next) { - if (nu->mat_nr==ob->actcol-1) { + for (nu = nurbs->first; nu; nu = nu->next) { + if (nu->mat_nr == ob->actcol - 1) { if (nu->bezt) { - a= nu->pntsu; - bezt= nu->bezt; + a = nu->pntsu; + bezt = nu->bezt; while (a--) { - if (bezt->hide==0) { + if (bezt->hide == 0) { if (select) { bezt->f1 |= SELECT; bezt->f2 |= SELECT; @@ -262,10 +263,10 @@ static int material_slot_de_select(bContext *C, int select) } } else if (nu->bp) { - a= nu->pntsu*nu->pntsv; - bp= nu->bp; + a = nu->pntsu * nu->pntsv; + bp = nu->bp; while (a--) { - if (bp->hide==0) { + if (bp->hide == 0) { if (select) bp->f1 |= SELECT; else bp->f1 &= ~SELECT; } @@ -277,7 +278,7 @@ static int material_slot_de_select(bContext *C, int select) } } - WM_event_add_notifier(C, NC_GEOM|ND_SELECT, ob->data); + WM_event_add_notifier(C, NC_GEOM | ND_SELECT, ob->data); return OPERATOR_FINISHED; } @@ -298,7 +299,7 @@ void OBJECT_OT_material_slot_select(wmOperatorType *ot) ot->exec = material_slot_select_exec; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } static int material_slot_deselect_exec(bContext *C, wmOperator *UNUSED(op)) @@ -317,26 +318,26 @@ void OBJECT_OT_material_slot_deselect(wmOperatorType *ot) ot->exec = material_slot_deselect_exec; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } static int material_slot_copy_exec(bContext *C, wmOperator *UNUSED(op)) { - Object *ob= ED_object_context(C); + Object *ob = ED_object_context(C); Material ***matar; - if (!ob || !(matar= give_matarar(ob))) + if (!ob || !(matar = give_matarar(ob))) return OPERATOR_CANCELLED; - CTX_DATA_BEGIN(C, Object*, ob_iter, selected_editable_objects) { + CTX_DATA_BEGIN(C, Object *, ob_iter, selected_editable_objects) { if (ob != ob_iter && give_matarar(ob_iter)) { if (ob->data != ob_iter->data) assign_matarar(ob_iter, matar, ob->totcol); - if (ob_iter->totcol==ob->totcol) { - ob_iter->actcol= ob->actcol; - WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob_iter); + if (ob_iter->totcol == ob->totcol) { + ob_iter->actcol = ob->actcol; + WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob_iter); } } } @@ -357,28 +358,28 @@ void OBJECT_OT_material_slot_copy(wmOperatorType *ot) ot->exec = material_slot_copy_exec; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /********************** new material operator *********************/ static int new_material_exec(bContext *C, wmOperator *UNUSED(op)) { - Scene *scene= CTX_data_scene(C); - Material *ma= CTX_data_pointer_get_type(C, "material", &RNA_Material).data; + Scene *scene = CTX_data_scene(C); + Material *ma = CTX_data_pointer_get_type(C, "material", &RNA_Material).data; PointerRNA ptr, idptr; PropertyRNA *prop; /* add or copy material */ if (ma) { - ma= copy_material(ma); + ma = copy_material(ma); } else { - ma= add_material("Material"); + ma = add_material("Material"); if (scene_use_new_shading_nodes(scene)) { ED_node_shader_default(scene, &ma->id); - ma->use_nodes= 1; + ma->use_nodes = 1; } } @@ -395,7 +396,7 @@ static int new_material_exec(bContext *C, wmOperator *UNUSED(op)) RNA_property_update(C, &ptr, prop); } - WM_event_add_notifier(C, NC_MATERIAL|NA_ADDED, ma); + WM_event_add_notifier(C, NC_MATERIAL | NA_ADDED, ma); return OPERATOR_FINISHED; } @@ -411,22 +412,22 @@ void MATERIAL_OT_new(wmOperatorType *ot) ot->exec = new_material_exec; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /********************** new texture operator *********************/ static int new_texture_exec(bContext *C, wmOperator *UNUSED(op)) { - Tex *tex= CTX_data_pointer_get_type(C, "texture", &RNA_Texture).data; + Tex *tex = CTX_data_pointer_get_type(C, "texture", &RNA_Texture).data; PointerRNA ptr, idptr; PropertyRNA *prop; /* add or copy texture */ if (tex) - tex= copy_texture(tex); + tex = copy_texture(tex); else - tex= add_texture("Texture"); + tex = add_texture("Texture"); /* hook into UI */ uiIDContextProperty(C, &ptr, &prop); @@ -441,7 +442,7 @@ static int new_texture_exec(bContext *C, wmOperator *UNUSED(op)) RNA_property_update(C, &ptr, prop); } - WM_event_add_notifier(C, NC_TEXTURE|NA_ADDED, tex); + WM_event_add_notifier(C, NC_TEXTURE | NA_ADDED, tex); return OPERATOR_FINISHED; } @@ -457,28 +458,28 @@ void TEXTURE_OT_new(wmOperatorType *ot) ot->exec = new_texture_exec; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /********************** new world operator *********************/ static int new_world_exec(bContext *C, wmOperator *UNUSED(op)) { - Scene *scene= CTX_data_scene(C); - World *wo= CTX_data_pointer_get_type(C, "world", &RNA_World).data; + Scene *scene = CTX_data_scene(C); + World *wo = CTX_data_pointer_get_type(C, "world", &RNA_World).data; PointerRNA ptr, idptr; PropertyRNA *prop; /* add or copy world */ if (wo) { - wo= copy_world(wo); + wo = copy_world(wo); } else { - wo= add_world("World"); + wo = add_world("World"); if (scene_use_new_shading_nodes(scene)) { ED_node_shader_default(scene, &wo->id); - wo->use_nodes= 1; + wo->use_nodes = 1; } } @@ -495,7 +496,7 @@ static int new_world_exec(bContext *C, wmOperator *UNUSED(op)) RNA_property_update(C, &ptr, prop); } - WM_event_add_notifier(C, NC_WORLD|NA_ADDED, wo); + WM_event_add_notifier(C, NC_WORLD | NA_ADDED, wo); return OPERATOR_FINISHED; } @@ -511,19 +512,19 @@ void WORLD_OT_new(wmOperatorType *ot) ot->exec = new_world_exec; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /********************** render layer operators *********************/ static int render_layer_add_exec(bContext *C, wmOperator *UNUSED(op)) { - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); scene_add_render_layer(scene, NULL); - scene->r.actlay= BLI_countlist(&scene->r.layers) - 1; + scene->r.actlay = BLI_countlist(&scene->r.layers) - 1; - WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene); + WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene); return OPERATOR_FINISHED; } @@ -539,7 +540,7 @@ void SCENE_OT_render_layer_add(wmOperatorType *ot) ot->exec = render_layer_add_exec; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } static int render_layer_remove_exec(bContext *C, wmOperator *UNUSED(op)) @@ -550,7 +551,7 @@ static int render_layer_remove_exec(bContext *C, wmOperator *UNUSED(op)) if (!scene_remove_render_layer(CTX_data_main(C), scene, rl)) return OPERATOR_CANCELLED; - WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, scene); + WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS, scene); return OPERATOR_FINISHED; } @@ -566,63 +567,63 @@ void SCENE_OT_render_layer_remove(wmOperatorType *ot) ot->exec = render_layer_remove_exec; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } static int texture_slot_move(bContext *C, wmOperator *op) { - ID *id= CTX_data_pointer_get_type(C, "texture_slot", &RNA_TextureSlot).id.data; + ID *id = CTX_data_pointer_get_type(C, "texture_slot", &RNA_TextureSlot).id.data; if (id) { MTex **mtex_ar, *mtexswap; short act; - int type= RNA_enum_get(op->ptr, "type"); - struct AnimData *adt= BKE_animdata_from_id(id); + int type = RNA_enum_get(op->ptr, "type"); + struct AnimData *adt = BKE_animdata_from_id(id); give_active_mtex(id, &mtex_ar, &act); if (type == -1) { /* Up */ if (act > 0) { mtexswap = mtex_ar[act]; - mtex_ar[act] = mtex_ar[act-1]; - mtex_ar[act-1] = mtexswap; + mtex_ar[act] = mtex_ar[act - 1]; + mtex_ar[act - 1] = mtexswap; - BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, act-1, -1, 0); - BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, act, act-1, 0); + BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, act - 1, -1, 0); + BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, act, act - 1, 0); BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, -1, act, 0); - if (GS(id->name)==ID_MA) { - Material *ma= (Material *)id; - int mtexuse = ma->septex & (1<septex &= ~(1<septex |= (ma->septex & (1<<(act-1))) << 1; - ma->septex &= ~(1<<(act-1)); + if (GS(id->name) == ID_MA) { + Material *ma = (Material *)id; + int mtexuse = ma->septex & (1 << act); + ma->septex &= ~(1 << act); + ma->septex |= (ma->septex & (1 << (act - 1))) << 1; + ma->septex &= ~(1 << (act - 1)); ma->septex |= mtexuse >> 1; } - set_active_mtex(id, act-1); + set_active_mtex(id, act - 1); } } else { /* Down */ - if (act < MAX_MTEX-1) { + if (act < MAX_MTEX - 1) { mtexswap = mtex_ar[act]; - mtex_ar[act] = mtex_ar[act+1]; - mtex_ar[act+1] = mtexswap; + mtex_ar[act] = mtex_ar[act + 1]; + mtex_ar[act + 1] = mtexswap; - BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, act+1, -1, 0); - BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, act, act+1, 0); + BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, act + 1, -1, 0); + BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, act, act + 1, 0); BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, -1, act, 0); - if (GS(id->name)==ID_MA) { - Material *ma= (Material *)id; - int mtexuse = ma->septex & (1<septex &= ~(1<septex |= (ma->septex & (1<<(act+1))) >> 1; - ma->septex &= ~(1<<(act+1)); + if (GS(id->name) == ID_MA) { + Material *ma = (Material *)id; + int mtexuse = ma->septex & (1 << act); + ma->septex &= ~(1 << act); + ma->septex |= (ma->septex & (1 << (act + 1))) >> 1; + ma->septex &= ~(1 << (act + 1)); ma->septex |= mtexuse << 1; } - set_active_mtex(id, act+1); + set_active_mtex(id, act + 1); } } @@ -650,7 +651,7 @@ void TEXTURE_OT_slot_move(wmOperatorType *ot) ot->exec = texture_slot_move; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; RNA_def_enum(ot->srna, "type", slot_move, 0, "Type", ""); } @@ -662,8 +663,8 @@ void TEXTURE_OT_slot_move(wmOperatorType *ot) static int save_envmap(wmOperator *op, Scene *scene, EnvMap *env, char *path, const char imtype) { float layout[12]; - if ( RNA_struct_find_property(op->ptr, "layout") ) - RNA_float_get_array(op->ptr, "layout",layout); + if (RNA_struct_find_property(op->ptr, "layout") ) + RNA_float_get_array(op->ptr, "layout", layout); else memcpy(layout, default_envmap_layout, sizeof(layout)); @@ -678,7 +679,7 @@ static int save_envmap(wmOperator *op, Scene *scene, EnvMap *env, char *path, co static int envmap_save_exec(bContext *C, wmOperator *op) { - Tex *tex= CTX_data_pointer_get_type(C, "texture", &RNA_Texture).data; + Tex *tex = CTX_data_pointer_get_type(C, "texture", &RNA_Texture).data; Scene *scene = CTX_data_scene(C); //int imtype = RNA_enum_get(op->ptr, "file_type"); char imtype = scene->r.im_format.imtype; @@ -717,13 +718,13 @@ static int envmap_save_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event static int envmap_save_poll(bContext *C) { - Tex *tex= CTX_data_pointer_get_type(C, "texture", &RNA_Texture).data; + Tex *tex = CTX_data_pointer_get_type(C, "texture", &RNA_Texture).data; if (!tex) return 0; if (!tex->env || !tex->env->ok) return 0; - if (tex->env->cube[1]==NULL) + if (tex->env->cube[1] == NULL) return 0; return 1; @@ -746,32 +747,32 @@ void TEXTURE_OT_envmap_save(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER; /* no undo since this doesnt modify the env-map */ /* properties */ - prop= RNA_def_float_array(ot->srna, "layout", 12, default_envmap_layout, 0.0f, 0.0f, "File layout", "Flat array describing the X,Y position of each cube face in the output image, where 1 is the size of a face - order is [+Z -Z +Y -X -Y +X] (use -1 to skip a face)", 0.0f, 0.0f); + prop = RNA_def_float_array(ot->srna, "layout", 12, default_envmap_layout, 0.0f, 0.0f, "File layout", "Flat array describing the X,Y position of each cube face in the output image, where 1 is the size of a face - order is [+Z -Z +Y -X -Y +X] (use -1 to skip a face)", 0.0f, 0.0f); RNA_def_property_flag(prop, PROP_HIDDEN); - WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE, FILE_SPECIAL, FILE_SAVE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY); + WM_operator_properties_filesel(ot, FOLDERFILE | IMAGEFILE | MOVIEFILE, FILE_SPECIAL, FILE_SAVE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY); } static int envmap_clear_exec(bContext *C, wmOperator *UNUSED(op)) { - Tex *tex= CTX_data_pointer_get_type(C, "texture", &RNA_Texture).data; + Tex *tex = CTX_data_pointer_get_type(C, "texture", &RNA_Texture).data; BKE_free_envmapdata(tex->env); - WM_event_add_notifier(C, NC_TEXTURE|NA_EDITED, tex); + WM_event_add_notifier(C, NC_TEXTURE | NA_EDITED, tex); return OPERATOR_FINISHED; } static int envmap_clear_poll(bContext *C) { - Tex *tex= CTX_data_pointer_get_type(C, "texture", &RNA_Texture).data; + Tex *tex = CTX_data_pointer_get_type(C, "texture", &RNA_Texture).data; if (!tex) return 0; if (!tex->env || !tex->env->ok) return 0; - if (tex->env->cube[1]==NULL) + if (tex->env->cube[1] == NULL) return 0; return 1; @@ -789,7 +790,7 @@ void TEXTURE_OT_envmap_clear(wmOperatorType *ot) ot->poll = envmap_clear_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } static int envmap_clear_all_exec(bContext *C, wmOperator *UNUSED(op)) @@ -797,11 +798,11 @@ static int envmap_clear_all_exec(bContext *C, wmOperator *UNUSED(op)) Main *bmain = CTX_data_main(C); Tex *tex; - for (tex=bmain->tex.first; tex; tex=tex->id.next) + for (tex = bmain->tex.first; tex; tex = tex->id.next) if (tex->env) BKE_free_envmapdata(tex->env); - WM_event_add_notifier(C, NC_TEXTURE|NA_EDITED, tex); + WM_event_add_notifier(C, NC_TEXTURE | NA_EDITED, tex); return OPERATOR_FINISHED; } @@ -818,7 +819,7 @@ void TEXTURE_OT_envmap_clear_all(wmOperatorType *ot) ot->poll = envmap_clear_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /********************** material operators *********************/ @@ -826,9 +827,9 @@ void TEXTURE_OT_envmap_clear_all(wmOperatorType *ot) /* material copy/paste */ static int copy_material_exec(bContext *C, wmOperator *UNUSED(op)) { - Material *ma= CTX_data_pointer_get_type(C, "material", &RNA_Material).data; + Material *ma = CTX_data_pointer_get_type(C, "material", &RNA_Material).data; - if (ma==NULL) + if (ma == NULL) return OPERATOR_CANCELLED; copy_matcopybuf(ma); @@ -852,14 +853,14 @@ void MATERIAL_OT_copy(wmOperatorType *ot) static int paste_material_exec(bContext *C, wmOperator *UNUSED(op)) { - Material *ma= CTX_data_pointer_get_type(C, "material", &RNA_Material).data; + Material *ma = CTX_data_pointer_get_type(C, "material", &RNA_Material).data; - if (ma==NULL) + if (ma == NULL) return OPERATOR_CANCELLED; paste_matcopybuf(ma); - WM_event_add_notifier(C, NC_MATERIAL|ND_SHADING_DRAW, ma); + WM_event_add_notifier(C, NC_MATERIAL | ND_SHADING_DRAW, ma); return OPERATOR_FINISHED; } @@ -875,69 +876,69 @@ void MATERIAL_OT_paste(wmOperatorType *ot) ot->exec = paste_material_exec; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } -static short mtexcopied=0; /* must be reset on file load */ +static short mtexcopied = 0; /* must be reset on file load */ static MTex mtexcopybuf; void ED_render_clear_mtex_copybuf(void) -{ /* use for file reload */ - mtexcopied= 0; +{ /* use for file reload */ + mtexcopied = 0; } static void copy_mtex_copybuf(ID *id) { - MTex **mtex= NULL; + MTex **mtex = NULL; - switch(GS(id->name)) { + switch (GS(id->name)) { case ID_MA: - mtex= &(((Material *)id)->mtex[(int)((Material *)id)->texact]); + mtex = &(((Material *)id)->mtex[(int)((Material *)id)->texact]); break; case ID_LA: - mtex= &(((Lamp *)id)->mtex[(int)((Lamp *)id)->texact]); + mtex = &(((Lamp *)id)->mtex[(int)((Lamp *)id)->texact]); // la->mtex[(int)la->texact] // TODO break; case ID_WO: - mtex= &(((World *)id)->mtex[(int)((World *)id)->texact]); + mtex = &(((World *)id)->mtex[(int)((World *)id)->texact]); // mtex= wrld->mtex[(int)wrld->texact]; // TODO break; case ID_PA: - mtex= &(((ParticleSettings *)id)->mtex[(int)((ParticleSettings *)id)->texact]); + mtex = &(((ParticleSettings *)id)->mtex[(int)((ParticleSettings *)id)->texact]); break; } if (mtex && *mtex) { memcpy(&mtexcopybuf, *mtex, sizeof(MTex)); - mtexcopied= 1; + mtexcopied = 1; } else { - mtexcopied= 0; + mtexcopied = 0; } } static void paste_mtex_copybuf(ID *id) { - MTex **mtex= NULL; + MTex **mtex = NULL; - if (mtexcopied == 0 || mtexcopybuf.tex==NULL) + if (mtexcopied == 0 || mtexcopybuf.tex == NULL) return; - switch(GS(id->name)) { + switch (GS(id->name)) { case ID_MA: - mtex= &(((Material *)id)->mtex[(int)((Material *)id)->texact]); + mtex = &(((Material *)id)->mtex[(int)((Material *)id)->texact]); break; case ID_LA: - mtex= &(((Lamp *)id)->mtex[(int)((Lamp *)id)->texact]); + mtex = &(((Lamp *)id)->mtex[(int)((Lamp *)id)->texact]); // la->mtex[(int)la->texact] // TODO break; case ID_WO: - mtex= &(((World *)id)->mtex[(int)((World *)id)->texact]); + mtex = &(((World *)id)->mtex[(int)((World *)id)->texact]); // mtex= wrld->mtex[(int)wrld->texact]; // TODO break; case ID_PA: - mtex= &(((ParticleSettings *)id)->mtex[(int)((ParticleSettings *)id)->texact]); + mtex = &(((ParticleSettings *)id)->mtex[(int)((ParticleSettings *)id)->texact]); break; default: BLI_assert("invalid id type"); @@ -945,8 +946,8 @@ static void paste_mtex_copybuf(ID *id) } if (mtex) { - if (*mtex==NULL) { - *mtex= MEM_mallocN(sizeof(MTex), "mtex copy"); + if (*mtex == NULL) { + *mtex = MEM_mallocN(sizeof(MTex), "mtex copy"); } else if ((*mtex)->tex) { (*mtex)->tex->id.us--; @@ -961,9 +962,9 @@ static void paste_mtex_copybuf(ID *id) static int copy_mtex_exec(bContext *C, wmOperator *UNUSED(op)) { - ID *id= CTX_data_pointer_get_type(C, "texture_slot", &RNA_TextureSlot).id.data; + ID *id = CTX_data_pointer_get_type(C, "texture_slot", &RNA_TextureSlot).id.data; - if (id==NULL) { + if (id == NULL) { /* copying empty slot */ ED_render_clear_mtex_copybuf(); return OPERATOR_CANCELLED; @@ -976,7 +977,7 @@ static int copy_mtex_exec(bContext *C, wmOperator *UNUSED(op)) static int copy_mtex_poll(bContext *C) { - ID *id= CTX_data_pointer_get_type(C, "texture_slot", &RNA_TextureSlot).id.data; + ID *id = CTX_data_pointer_get_type(C, "texture_slot", &RNA_TextureSlot).id.data; return (id != NULL); } @@ -998,13 +999,13 @@ void TEXTURE_OT_slot_copy(wmOperatorType *ot) static int paste_mtex_exec(bContext *C, wmOperator *UNUSED(op)) { - ID *id= CTX_data_pointer_get_type(C, "texture_slot", &RNA_TextureSlot).id.data; + ID *id = CTX_data_pointer_get_type(C, "texture_slot", &RNA_TextureSlot).id.data; - if (id==NULL) { - Material *ma= CTX_data_pointer_get_type(C, "material", &RNA_Material).data; - Lamp *la= CTX_data_pointer_get_type(C, "lamp", &RNA_Lamp).data; - World *wo= CTX_data_pointer_get_type(C, "world", &RNA_World).data; - ParticleSystem *psys= CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem).data; + if (id == NULL) { + Material *ma = CTX_data_pointer_get_type(C, "material", &RNA_Material).data; + Lamp *la = CTX_data_pointer_get_type(C, "lamp", &RNA_Lamp).data; + World *wo = CTX_data_pointer_get_type(C, "world", &RNA_World).data; + ParticleSystem *psys = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem).data; if (ma) id = &ma->id; @@ -1015,13 +1016,13 @@ static int paste_mtex_exec(bContext *C, wmOperator *UNUSED(op)) else if (psys) id = &psys->part->id; - if (id==NULL) + if (id == NULL) return OPERATOR_CANCELLED; } paste_mtex_copybuf(id); - WM_event_add_notifier(C, NC_TEXTURE|ND_SHADING_DRAW, NULL); + WM_event_add_notifier(C, NC_TEXTURE | ND_SHADING_DRAW, NULL); return OPERATOR_FINISHED; } @@ -1037,6 +1038,6 @@ void TEXTURE_OT_slot_paste(wmOperatorType *ot) ot->exec = paste_mtex_exec; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } diff --git a/source/blender/editors/render/render_update.c b/source/blender/editors/render/render_update.c index 72b29c56811..b56a295864b 100644 --- a/source/blender/editors/render/render_update.c +++ b/source/blender/editors/render/render_update.c @@ -62,7 +62,7 @@ #include "ED_node.h" #include "ED_render.h" -#include "render_intern.h" // own include +#include "render_intern.h" // own include /***************************** Render Engines ********************************/ @@ -80,26 +80,26 @@ void ED_render_scene_update(Main *bmain, Scene *scene, int updated) if (!BLI_thread_is_main()) return; - C= CTX_create(); + C = CTX_create(); CTX_data_main_set(C, bmain); CTX_data_scene_set(C, scene); CTX_wm_manager_set(C, bmain->wm.first); - for (sc=bmain->screen.first; sc; sc=sc->id.next) { - for (sa=sc->areabase.first; sa; sa=sa->next) { + for (sc = bmain->screen.first; sc; sc = sc->id.next) { + for (sa = sc->areabase.first; sa; sa = sa->next) { if (sa->spacetype != SPACE_VIEW3D) continue; - for (ar=sa->regionbase.first; ar; ar=ar->next) { + for (ar = sa->regionbase.first; ar; ar = ar->next) { RegionView3D *rv3d; RenderEngine *engine; if (ar->regiontype != RGN_TYPE_WINDOW) continue; - rv3d= ar->regiondata; - engine= rv3d->render_engine; + rv3d = ar->regiondata; + engine = rv3d->render_engine; if (engine && (updated || (engine->flag & RE_ENGINE_DO_UPDATE))) { CTX_wm_screen_set(C, sc); @@ -123,22 +123,22 @@ void ED_render_engine_changed(Main *bmain) ScrArea *sa; ARegion *ar; - for (sc=bmain->screen.first; sc; sc=sc->id.next) { - for (sa=sc->areabase.first; sa; sa=sa->next) { + for (sc = bmain->screen.first; sc; sc = sc->id.next) { + for (sa = sc->areabase.first; sa; sa = sa->next) { if (sa->spacetype != SPACE_VIEW3D) continue; - for (ar=sa->regionbase.first; ar; ar=ar->next) { + for (ar = sa->regionbase.first; ar; ar = ar->next) { RegionView3D *rv3d; if (ar->regiontype != RGN_TYPE_WINDOW) continue; - rv3d= ar->regiondata; + rv3d = ar->regiondata; if (rv3d->render_engine) { RE_engine_free(rv3d->render_engine); - rv3d->render_engine= NULL; + rv3d->render_engine = NULL; } } } @@ -146,9 +146,9 @@ void ED_render_engine_changed(Main *bmain) } /***************************** Updates *********************************** - * ED_render_id_flush_update gets called from DAG_id_tag_update, to do * - * editor level updates when the ID changes. when these ID blocks are in * - * the dependency graph, we can get rid of the manual dependency checks */ +* ED_render_id_flush_update gets called from DAG_id_tag_update, to do * +* editor level updates when the ID changes. when these ID blocks are in * +* the dependency graph, we can get rid of the manual dependency checks */ static int mtex_use_tex(MTex **mtex, int tot, Tex *tex) { @@ -157,7 +157,7 @@ static int mtex_use_tex(MTex **mtex, int tot, Tex *tex) if (!mtex) return 0; - for (a=0; atex == tex) return 1; @@ -168,16 +168,16 @@ static int nodes_use_tex(bNodeTree *ntree, Tex *tex) { bNode *node; - for (node=ntree->nodes.first; node; node= node->next) { + for (node = ntree->nodes.first; node; node = node->next) { if (node->id) { - if (node->id == (ID*)tex) { + if (node->id == (ID *)tex) { return 1; } else if (GS(node->id->name) == ID_MA) { - if (mtex_use_tex(((Material*)node->id)->mtex, MAX_MTEX, tex)) + if (mtex_use_tex(((Material *)node->id)->mtex, MAX_MTEX, tex)) return 1; } - else if (node->type==NODE_GROUP) { + else if (node->type == NODE_GROUP) { if (nodes_use_tex((bNodeTree *)node->id, tex)) return 1; } @@ -191,12 +191,12 @@ static int nodes_use_material(bNodeTree *ntree, Material *ma) { bNode *node; - for (node=ntree->nodes.first; node; node= node->next) { + for (node = ntree->nodes.first; node; node = node->next) { if (node->id) { - if (node->id == (ID*)ma) { + if (node->id == (ID *)ma) { return 1; } - else if (node->type==NODE_GROUP) { + else if (node->type == NODE_GROUP) { if (nodes_use_material((bNodeTree *)node->id, ma)) return 1; } @@ -218,8 +218,8 @@ static void material_changed(Main *bmain, Material *ma) GPU_material_free(ma); /* find node materials using this */ - for (parent=bmain->mat.first; parent; parent=parent->id.next) { - if (parent->use_nodes && parent->nodetree && nodes_use_material(parent->nodetree, ma)); + for (parent = bmain->mat.first; parent; parent = parent->id.next) { + if (parent->use_nodes && parent->nodetree && nodes_use_material(parent->nodetree, ma)) ; else continue; BKE_icon_changed(BKE_icon_getid(&parent->id)); @@ -241,9 +241,9 @@ static void texture_changed(Main *bmain, Tex *tex) BKE_icon_changed(BKE_icon_getid(&tex->id)); /* find materials */ - for (ma=bmain->mat.first; ma; ma=ma->id.next) { - if (mtex_use_tex(ma->mtex, MAX_MTEX, tex)); - else if (ma->use_nodes && ma->nodetree && nodes_use_tex(ma->nodetree, tex)); + for (ma = bmain->mat.first; ma; ma = ma->id.next) { + if (mtex_use_tex(ma->mtex, MAX_MTEX, tex)) ; + else if (ma->use_nodes && ma->nodetree && nodes_use_tex(ma->nodetree, tex)) ; else continue; BKE_icon_changed(BKE_icon_getid(&ma->id)); @@ -253,27 +253,27 @@ static void texture_changed(Main *bmain, Tex *tex) } /* find lamps */ - for (la=bmain->lamp.first; la; la=la->id.next) { - if (mtex_use_tex(la->mtex, MAX_MTEX, tex)); - else if (la->nodetree && nodes_use_tex(la->nodetree, tex)); + for (la = bmain->lamp.first; la; la = la->id.next) { + if (mtex_use_tex(la->mtex, MAX_MTEX, tex)) ; + else if (la->nodetree && nodes_use_tex(la->nodetree, tex)) ; else continue; BKE_icon_changed(BKE_icon_getid(&la->id)); } /* find worlds */ - for (wo=bmain->world.first; wo; wo=wo->id.next) { - if (mtex_use_tex(wo->mtex, MAX_MTEX, tex)); - else if (wo->nodetree && nodes_use_tex(wo->nodetree, tex)); + for (wo = bmain->world.first; wo; wo = wo->id.next) { + if (mtex_use_tex(wo->mtex, MAX_MTEX, tex)) ; + else if (wo->nodetree && nodes_use_tex(wo->nodetree, tex)) ; else continue; BKE_icon_changed(BKE_icon_getid(&wo->id)); } /* find compositing nodes */ - for (scene=bmain->scene.first; scene; scene=scene->id.next) { + for (scene = bmain->scene.first; scene; scene = scene->id.next) { if (scene->use_nodes && scene->nodetree) { - for (node=scene->nodetree->nodes.first; node; node=node->next) { + for (node = scene->nodetree->nodes.first; node; node = node->next) { if (node->id == &tex->id) ED_node_changed_update(&scene->id, node); } @@ -290,11 +290,11 @@ static void lamp_changed(Main *bmain, Lamp *la) BKE_icon_changed(BKE_icon_getid(&la->id)); /* glsl */ - for (ob=bmain->object.first; ob; ob=ob->id.next) + for (ob = bmain->object.first; ob; ob = ob->id.next) if (ob->data == la && ob->gpulamp.first) GPU_lamp_free(ob); - for (ma=bmain->mat.first; ma; ma=ma->id.next) + for (ma = bmain->mat.first; ma; ma = ma->id.next) if (ma->gpumaterial.first) GPU_material_free(ma); } @@ -307,7 +307,7 @@ static void world_changed(Main *bmain, World *wo) BKE_icon_changed(BKE_icon_getid(&wo->id)); /* glsl */ - for (ma=bmain->mat.first; ma; ma=ma->id.next) + for (ma = bmain->mat.first; ma; ma = ma->id.next) if (ma->gpumaterial.first) GPU_material_free(ma); } @@ -320,7 +320,7 @@ static void image_changed(Main *bmain, Image *ima) BKE_icon_changed(BKE_icon_getid(&ima->id)); /* textures */ - for (tex=bmain->tex.first; tex; tex=tex->id.next) + for (tex = bmain->tex.first; tex; tex = tex->id.next) if (tex->ima == ima) texture_changed(bmain, tex); } @@ -331,35 +331,35 @@ static void scene_changed(Main *bmain, Scene *UNUSED(scene)) Material *ma; /* glsl */ - for (ob=bmain->object.first; ob; ob=ob->id.next) + for (ob = bmain->object.first; ob; ob = ob->id.next) if (ob->gpulamp.first) GPU_lamp_free(ob); - for (ma=bmain->mat.first; ma; ma=ma->id.next) + for (ma = bmain->mat.first; ma; ma = ma->id.next) if (ma->gpumaterial.first) GPU_material_free(ma); } void ED_render_id_flush_update(Main *bmain, ID *id) { - switch(GS(id->name)) { + switch (GS(id->name)) { case ID_MA: - material_changed(bmain, (Material*)id); + material_changed(bmain, (Material *)id); break; case ID_TE: - texture_changed(bmain, (Tex*)id); + texture_changed(bmain, (Tex *)id); break; case ID_WO: - world_changed(bmain, (World*)id); + world_changed(bmain, (World *)id); break; case ID_LA: - lamp_changed(bmain, (Lamp*)id); + lamp_changed(bmain, (Lamp *)id); break; case ID_IM: - image_changed(bmain, (Image*)id); + image_changed(bmain, (Image *)id); break; case ID_SCE: - scene_changed(bmain, (Scene*)id); + scene_changed(bmain, (Scene *)id); break; default: break; diff --git a/source/blender/editors/render/render_view.c b/source/blender/editors/render/render_view.c index 31b53fcabe1..0d902722183 100644 --- a/source/blender/editors/render/render_view.c +++ b/source/blender/editors/render/render_view.c @@ -61,24 +61,24 @@ /* would use BKE_screen_find_big_area(...) but this is too specific */ static ScrArea *biggest_non_image_area(bContext *C) { - bScreen *sc= CTX_wm_screen(C); - ScrArea *sa, *big= NULL; - int size, maxsize= 0, bwmaxsize= 0; - short foundwin= 0; + bScreen *sc = CTX_wm_screen(C); + ScrArea *sa, *big = NULL; + int size, maxsize = 0, bwmaxsize = 0; + short foundwin = 0; - for (sa= sc->areabase.first; sa; sa= sa->next) { + for (sa = sc->areabase.first; sa; sa = sa->next) { if (sa->winx > 30 && sa->winy > 30) { - size= sa->winx*sa->winy; + size = sa->winx * sa->winy; if (sa->spacetype == SPACE_BUTS) { if (foundwin == 0 && size > bwmaxsize) { - bwmaxsize= size; - big= sa; + bwmaxsize = size; + big = sa; } } else if (sa->spacetype != SPACE_IMAGE && size > maxsize) { - maxsize= size; - big= sa; - foundwin= 1; + maxsize = size; + big = sa; + foundwin = 1; } } } @@ -88,16 +88,16 @@ static ScrArea *biggest_non_image_area(bContext *C) static ScrArea *find_area_showing_r_result(bContext *C, wmWindow **win) { - wmWindowManager *wm= CTX_wm_manager(C); + wmWindowManager *wm = CTX_wm_manager(C); ScrArea *sa = NULL; SpaceImage *sima; /* find an imagewindow showing render result */ - for (*win=wm->windows.first; *win; *win= (*win)->next) { - for (sa= (*win)->screen->areabase.first; sa; sa= sa->next) { - if (sa->spacetype==SPACE_IMAGE) { - sima= sa->spacedata.first; - if (sima->image && sima->image->type==IMA_TYPE_R_RESULT) + for (*win = wm->windows.first; *win; *win = (*win)->next) { + for (sa = (*win)->screen->areabase.first; sa; sa = sa->next) { + if (sa->spacetype == SPACE_IMAGE) { + sima = sa->spacedata.first; + if (sima->image && sima->image->type == IMA_TYPE_R_RESULT) break; } } @@ -110,14 +110,14 @@ static ScrArea *find_area_showing_r_result(bContext *C, wmWindow **win) static ScrArea *find_area_image_empty(bContext *C) { - bScreen *sc= CTX_wm_screen(C); + bScreen *sc = CTX_wm_screen(C); ScrArea *sa; SpaceImage *sima; /* find an imagewindow showing render result */ - for (sa=sc->areabase.first; sa; sa= sa->next) { - if (sa->spacetype==SPACE_IMAGE) { - sima= sa->spacedata.first; + for (sa = sc->areabase.first; sa; sa = sa->next) { + if (sa->spacetype == SPACE_IMAGE) { + sima = sa->spacedata.first; if (!sima->image) break; } @@ -131,70 +131,70 @@ static ScrArea *find_area_image_empty(bContext *C) /* new window uses x,y to set position */ void render_view_open(bContext *C, int mx, int my) { - wmWindow *win= CTX_wm_window(C); - Scene *scene= CTX_data_scene(C); - ScrArea *sa= NULL; + wmWindow *win = CTX_wm_window(C); + Scene *scene = CTX_data_scene(C); + ScrArea *sa = NULL; SpaceImage *sima; - int area_was_image=0; + int area_was_image = 0; - if (scene->r.displaymode==R_OUTPUT_NONE) + if (scene->r.displaymode == R_OUTPUT_NONE) return; - if (scene->r.displaymode==R_OUTPUT_WINDOW) { + if (scene->r.displaymode == R_OUTPUT_WINDOW) { rcti rect; int sizex, sizey; - sizex= 10 + (scene->r.xsch*scene->r.size)/100; - sizey= 40 + (scene->r.ysch*scene->r.size)/100; + sizex = 10 + (scene->r.xsch * scene->r.size) / 100; + sizey = 40 + (scene->r.ysch * scene->r.size) / 100; /* arbitrary... miniature image window views don't make much sense */ - if (sizex < 320) sizex= 320; - if (sizey < 256) sizey= 256; + if (sizex < 320) sizex = 320; + if (sizey < 256) sizey = 256; /* XXX some magic to calculate postition */ - rect.xmin = mx + win->posx - sizex/2; - rect.ymin = my + win->posy - sizey/2; + rect.xmin = mx + win->posx - sizex / 2; + rect.ymin = my + win->posy - sizey / 2; rect.xmax = rect.xmin + sizex; rect.ymax = rect.ymin + sizey; /* changes context! */ WM_window_open_temp(C, &rect, WM_WINDOW_RENDER); - sa= CTX_wm_area(C); + sa = CTX_wm_area(C); } - else if (scene->r.displaymode==R_OUTPUT_SCREEN) { + else if (scene->r.displaymode == R_OUTPUT_SCREEN) { if (CTX_wm_area(C) && CTX_wm_area(C)->spacetype == SPACE_IMAGE) area_was_image = 1; /* this function returns with changed context */ - sa= ED_screen_full_newspace(C, CTX_wm_area(C), SPACE_IMAGE); + sa = ED_screen_full_newspace(C, CTX_wm_area(C), SPACE_IMAGE); } if (!sa) { - sa= find_area_showing_r_result(C, &win); - if (sa==NULL) - sa= find_area_image_empty(C); + sa = find_area_showing_r_result(C, &win); + if (sa == NULL) + sa = find_area_image_empty(C); /* if area found in other window, we make that one show in front */ - if (win && win!=CTX_wm_window(C)) + if (win && win != CTX_wm_window(C)) wm_window_raise(win); - if (sa==NULL) { + if (sa == NULL) { /* find largest open non-image area */ - sa= biggest_non_image_area(C); + sa = biggest_non_image_area(C); if (sa) { ED_area_newspace(C, sa, SPACE_IMAGE); - sima= sa->spacedata.first; + sima = sa->spacedata.first; /* makes ESC go back to prev space */ sima->flag |= SI_PREVSPACE; } else { /* use any area of decent size */ - sa= BKE_screen_find_big_area(CTX_wm_screen(C), -1, 0); - if (sa->spacetype!=SPACE_IMAGE) { + sa = BKE_screen_find_big_area(CTX_wm_screen(C), -1, 0); + if (sa->spacetype != SPACE_IMAGE) { // XXX newspace(sa, SPACE_IMAGE); - sima= sa->spacedata.first; + sima = sa->spacedata.first; /* makes ESC go back to prev space */ sima->flag |= SI_PREVSPACE; @@ -202,10 +202,10 @@ void render_view_open(bContext *C, int mx, int my) } } } - sima= sa->spacedata.first; + sima = sa->spacedata.first; /* get the correct image, and scale it */ - sima->image= BKE_image_verify_viewer(IMA_TYPE_R_RESULT, "Render Result"); + sima->image = BKE_image_verify_viewer(IMA_TYPE_R_RESULT, "Render Result"); /* if we're rendering to full screen, set appropriate hints on image editor @@ -229,9 +229,9 @@ void render_view_open(bContext *C, int mx, int my) static int render_view_cancel_exec(bContext *C, wmOperator *UNUSED(op)) { - wmWindow *win= CTX_wm_window(C); - ScrArea *sa= CTX_wm_area(C); - SpaceImage *sima= sa->spacedata.first; + wmWindow *win = CTX_wm_window(C); + ScrArea *sa = CTX_wm_area(C); + SpaceImage *sima = sa->spacedata.first; /* test if we have a temp screen in front */ if (CTX_wm_window(C)->screen->temp) { @@ -284,11 +284,11 @@ static int render_view_show_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent } else { wmWindow *win, *winshow; - ScrArea *sa= find_area_showing_r_result(C, &winshow); + ScrArea *sa = find_area_showing_r_result(C, &winshow); /* is there another window showing result? */ - for (win= CTX_wm_manager(C)->windows.first; win; win= win->next) { - if (win->screen->temp || (win==winshow && winshow!=wincur)) { + for (win = CTX_wm_manager(C)->windows.first; win; win = win->next) { + if (win->screen->temp || (win == winshow && winshow != wincur)) { wm_window_raise(win); return OPERATOR_FINISHED; } @@ -298,7 +298,7 @@ static int render_view_show_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent if (sa) { /* but don't close it when rendering */ if (!G.rendering) { - SpaceImage *sima= sa->spacedata.first; + SpaceImage *sima = sa->spacedata.first; if (sima->flag & SI_PREVSPACE) { sima->flag &= ~SI_PREVSPACE; -- cgit v1.2.3 From 9c5907cc79126c96a82356d16960838d47671c83 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Thu, 29 Mar 2012 23:13:44 +0000 Subject: Small code cleanups related to arrays. * Added helpful comment on 'keepverts' slot of bmop finddoubles. * Removed unused macro 'E' from MOD_array. --- source/blender/bmesh/intern/bmesh_opdefines.c | 3 +++ source/blender/modifiers/intern/MOD_array.c | 7 ------- 2 files changed, 3 insertions(+), 7 deletions(-) (limited to 'source/blender') diff --git a/source/blender/bmesh/intern/bmesh_opdefines.c b/source/blender/bmesh/intern/bmesh_opdefines.c index 086aea63d50..34a1a3e7511 100644 --- a/source/blender/bmesh/intern/bmesh_opdefines.c +++ b/source/blender/bmesh/intern/bmesh_opdefines.c @@ -224,6 +224,9 @@ static BMOpDefine bmo_mirror_def = { * * Takes input verts and find vertices they should weld to. Outputs a * mapping slot suitable for use with the weld verts bmop. + * + * If keepverts is used, vertices outside that set can only be merged + * with vertices in that set. */ static BMOpDefine bmo_finddoubles_def = { "finddoubles", diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c index 4f102e8ad67..ceae07f1f43 100644 --- a/source/blender/modifiers/intern/MOD_array.c +++ b/source/blender/modifiers/intern/MOD_array.c @@ -374,12 +374,6 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, } #define _E(s, i) ((BMVert **)(s)->data.buf)[i] - /* generate merge mapping using index map. we do this by using the - * operator slots as lookup arrays.*/ - #define E(i) \ - ((i) < geom_slot->len ? \ - _E(geom_slot, i) : \ - _E(newout_slot, (i)-geom_slot->len)) for (i=0; i Date: Thu, 29 Mar 2012 23:14:09 +0000 Subject: Small fix for r45256, AKEY (de)selection not working. Added call to BM_mesh_select_mode_flush on entering edit mode. --- source/blender/editors/object/object_edit.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender') diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index b92f641584b..2fbc2966bc8 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -451,6 +451,8 @@ void ED_object_enter_editmode(bContext *C, int flag) /* order doesn't matter */ EDBM_mesh_normals_update(em); BMEdit_RecalcTessellation(em); + + BM_mesh_select_mode_flush(em->bm); } WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_EDITMODE_MESH, scene); -- cgit v1.2.3 From 9e497291ee7164a4aa8c4f3e24ac9d2c52fc60c5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 29 Mar 2012 23:33:50 +0000 Subject: support for opengl rendering in the sequencer (header icons as with 3D view). while opengl could be used for display you couldn't output it to a file. extended the existing opengl render operator to optionally take input from the sequencer. notes: - doesn't redraw in the viewport yet (only output in terminal) - doesn't do OSA --- source/blender/editors/render/render_opengl.c | 52 +++++++++++++++++++++++---- 1 file changed, 46 insertions(+), 6 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c index 45983347a12..180e72c8cd7 100644 --- a/source/blender/editors/render/render_opengl.c +++ b/source/blender/editors/render/render_opengl.c @@ -50,6 +50,7 @@ #include "BKE_main.h" #include "BKE_report.h" #include "BKE_scene.h" +#include "BKE_sequencer.h" #include "BKE_writeavi.h" #include "WM_api.h" @@ -87,6 +88,10 @@ typedef struct OGLRender { short obcenter_dia_back; /* temp overwrite */ + short is_sequencer; + SpaceSeq *sseq; + + Image *ima; ImageUser iuser; @@ -128,8 +133,28 @@ static void screen_opengl_render_apply(OGLRender *oglrender) const short view_context = (v3d != NULL); rr = RE_AcquireResultRead(oglrender->re); - - if (view_context) { + + if (oglrender->is_sequencer) { + SeqRenderData context; + int chanshown = oglrender->sseq ? oglrender->sseq->chanshown : 0; + + context = seq_new_render_data(oglrender->bmain, scene, oglrender->sizex, oglrender->sizey, 100.0f); + + ibuf = give_ibuf_seq(context, CFRA, chanshown); + + if (ibuf) { + BLI_assert((oglrender->sizex == ibuf->x) && (oglrender->sizey == ibuf->y)); + + if (ibuf->rect_float == NULL) { + IMB_float_from_rect(ibuf); + } + + memcpy(rr->rectf, ibuf->rect_float, sizeof(float) * 4 * oglrender->sizex * oglrender->sizey); + + IMB_freeImBuf(ibuf); + } + } + else if (view_context) { GPU_offscreen_bind(oglrender->ofs); /* bind */ /* render 3d view */ @@ -197,7 +222,7 @@ static void screen_opengl_render_apply(OGLRender *oglrender) IMB_freeImBuf(ibuf_view); } else { - fprintf(stderr, "screen_opengl_render_apply: failed to get buffer, %s\n", err_out); + fprintf(stderr, "%s: failed to get buffer, %s\n", __func__, err_out); } } @@ -260,6 +285,7 @@ static int screen_opengl_render_init(bContext *C, wmOperator *op) int sizex, sizey; short is_view_context = RNA_boolean_get(op->ptr, "view_context"); const short is_animation = RNA_boolean_get(op->ptr, "animation"); + const short is_sequencer = RNA_boolean_get(op->ptr, "sequencer"); const short is_write_still = RNA_boolean_get(op->ptr, "write_still"); char err_out[256] = "unknown"; @@ -320,6 +346,12 @@ static int screen_opengl_render_init(bContext *C, wmOperator *op) oglrender->write_still = is_write_still && !is_animation; + oglrender->is_sequencer = is_sequencer; + if (is_sequencer) { + oglrender->sseq = CTX_wm_space_seq(C);; + } + + oglrender->obcenter_dia_back = U.obcenter_dia; U.obcenter_dia = 0; @@ -638,6 +670,8 @@ static int screen_opengl_render_exec(bContext *C, wmOperator *op) void RENDER_OT_opengl(wmOperatorType *ot) { + PropertyRNA *prop; + /* identifiers */ ot->name = "OpenGL Render"; ot->description = "OpenGL render active viewport"; @@ -651,9 +685,15 @@ void RENDER_OT_opengl(wmOperatorType *ot) ot->poll = ED_operator_screenactive; - RNA_def_boolean(ot->srna, "animation", 0, "Animation", "Render files from the animation range of this scene"); - RNA_def_boolean(ot->srna, "write_still", 0, "Write Image", "Save rendered the image to the output path (used only when animation is disabled)"); - RNA_def_boolean(ot->srna, "view_context", 1, "View Context", "Use the current 3D view for rendering, else use scene settings"); + prop = RNA_def_boolean(ot->srna, "animation", 0, "Animation", "Render files from the animation range of this scene"); + RNA_def_property_flag(prop, PROP_SKIP_SAVE); + prop = RNA_def_boolean(ot->srna, "sequencer", 0, "Sequencer", "Render using the sequencers OpenGL display"); + RNA_def_property_flag(prop, PROP_SKIP_SAVE); + prop = RNA_def_boolean(ot->srna, "write_still", 0, "Write Image", "Save rendered the image to the output path (used only when animation is disabled)"); + RNA_def_property_flag(prop, PROP_SKIP_SAVE); + prop = RNA_def_boolean(ot->srna, "view_context", 1, "View Context", "Use the current 3D view for rendering, else use scene settings"); + RNA_def_property_flag(prop, PROP_SKIP_SAVE); + } /* function for getting an opengl buffer from a View3D, used by sequencer */ -- cgit v1.2.3 From bf21f02ad0ebfd81aa2d20a3886c7ba5e751e125 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 30 Mar 2012 00:23:22 +0000 Subject: fix [#30718] Selecting vertices, edges, faces and undoing - results in wrong header status info converting mesh to bmesh resulted in incorrect stats. --- source/blender/bmesh/intern/bmesh_mesh_conv.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'source/blender') diff --git a/source/blender/bmesh/intern/bmesh_mesh_conv.c b/source/blender/bmesh/intern/bmesh_mesh_conv.c index 1e478b9b4a8..c5cc0a01b9c 100644 --- a/source/blender/bmesh/intern/bmesh_mesh_conv.c +++ b/source/blender/bmesh/intern/bmesh_mesh_conv.c @@ -142,10 +142,10 @@ void BM_mesh_bm_from_me(BMesh *bm, Mesh *me, int set_key, int act_key_nr) vt[i] = v; /* transfer flag */ - v->head.hflag = BM_vert_flag_from_mflag(mvert->flag); + v->head.hflag = BM_vert_flag_from_mflag(mvert->flag & ~SELECT); /* this is necessary for selection counts to work properly */ - if (BM_elem_flag_test(v, BM_ELEM_SELECT)) { + if (mvert->flag & SELECT) { BM_vert_select_set(bm, v, TRUE); } @@ -190,10 +190,12 @@ void BM_mesh_bm_from_me(BMesh *bm, Mesh *me, int set_key, int act_key_nr) et[i] = e; /* transfer flags */ - e->head.hflag = BM_edge_flag_from_mflag(medge->flag); + e->head.hflag = BM_edge_flag_from_mflag(medge->flag & ~SELECT); /* this is necessary for selection counts to work properly */ - if (BM_elem_flag_test(e, BM_ELEM_SELECT)) BM_elem_select_set(bm, e, TRUE); + if (medge->flag & SELECT) { + BM_elem_select_set(bm, e, TRUE); + } /* Copy Custom Data */ CustomData_to_bmesh_block(&me->edata, &bm->edata, i, &e->head.data); @@ -254,10 +256,12 @@ void BM_mesh_bm_from_me(BMesh *bm, Mesh *me, int set_key, int act_key_nr) BM_elem_index_set(f, bm->totface - 1); /* set_ok */ /* transfer flag */ - f->head.hflag = BM_face_flag_from_mflag(mpoly->flag); + f->head.hflag = BM_face_flag_from_mflag(mpoly->flag & ~SELECT); /* this is necessary for selection counts to work properly */ - if (BM_elem_flag_test(f, BM_ELEM_SELECT)) BM_elem_select_set(bm, f, TRUE); + if (mpoly->flag & SELECT) { + BM_elem_select_set(bm, f, TRUE); + } f->mat_nr = mpoly->mat_nr; if (i == me->act_face) bm->act_face = f; -- cgit v1.2.3 From 6113c0e0b71bffd98c6fbffd51b7238d1ca348a4 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 30 Mar 2012 00:58:29 +0000 Subject: fix [#30725] BMesh - Select Linked ignores faces --- source/blender/editors/mesh/editmesh_select.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender') diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index c2e47ef0a09..c4afac78c59 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -1833,6 +1833,8 @@ static int edbm_select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent * BM_elem_select_set(bm, e, sel); } BMW_end(&walker); + + BM_mesh_select_mode_flush(bm); } WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit); -- cgit v1.2.3 From 7b60ebf398757e40006b239d52562874b6b07784 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 30 Mar 2012 01:11:11 +0000 Subject: fix for unhiding faces showing invalid normals. --- source/blender/editors/mesh/editmesh_utils.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender') diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index ff3415545eb..7bb1cc6944e 100644 --- a/source/blender/editors/mesh/editmesh_utils.c +++ b/source/blender/editors/mesh/editmesh_utils.c @@ -1248,6 +1248,9 @@ void EDBM_mesh_reveal(BMEditMesh *em) } EDBM_selectmode_flush(em); + + /* hidden faces can have invalid normals */ + EDBM_mesh_normals_update(em); } /* so many tools call these that we better make it a generic function. -- cgit v1.2.3 From a6ebffe182e3867b8a365499c7eb990fb277cbe7 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 30 Mar 2012 01:51:25 +0000 Subject: style cleanup: interface --- source/blender/editors/interface/interface.c | 1894 ++++++------ source/blender/editors/interface/interface_anim.c | 30 +- source/blender/editors/interface/interface_draw.c | 872 +++--- .../blender/editors/interface/interface_handlers.c | 3144 ++++++++++---------- source/blender/editors/interface/interface_icons.c | 358 +-- .../blender/editors/interface/interface_layout.c | 1236 ++++---- source/blender/editors/interface/interface_ops.c | 126 +- source/blender/editors/interface/interface_panel.c | 644 ++-- .../blender/editors/interface/interface_regions.c | 1307 ++++---- source/blender/editors/interface/interface_style.c | 188 +- .../editors/interface/interface_templates.c | 1044 +++---- source/blender/editors/interface/interface_utils.c | 56 +- .../blender/editors/interface/interface_widgets.c | 1534 +++++----- source/blender/editors/interface/resources.c | 1420 ++++----- source/blender/editors/interface/view2d.c | 896 +++--- source/blender/editors/interface/view2d_ops.c | 515 ++-- 16 files changed, 7640 insertions(+), 7624 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index b6821abf243..1cb51e8f6fa 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -72,16 +72,16 @@ #include "interface_intern.h" -#define MENU_WIDTH 120 -#define MENU_ITEM_HEIGHT 20 -#define MENU_SEP_HEIGHT 6 +#define MENU_WIDTH 120 +#define MENU_ITEM_HEIGHT 20 +#define MENU_SEP_HEIGHT 6 #define PRECISION_FLOAT_MAX 6 #define PRECISION_FLOAT_MAX_POW 1000000 /* pow(10, PRECISION_FLOAT_MAX) */ /* avoid unneeded calls to ui_get_but_val */ #define UI_BUT_VALUE_UNSET DBL_MAX -#define UI_GET_BUT_VALUE_INIT(_but, _value) if (_value == DBL_MAX) { (_value)= ui_get_but_val(_but); } +#define UI_GET_BUT_VALUE_INIT(_but, _value) if (_value == DBL_MAX) { (_value) = ui_get_but_val(_but); } /* * a full doc with API notes can be found in bf-blender/trunk/blender/doc/guides/interface_API.txt @@ -99,41 +99,41 @@ void ui_block_to_window_fl(const ARegion *ar, uiBlock *block, float *x, float *y float gx, gy; int sx, sy, getsizex, getsizey; - getsizex= ar->winrct.xmax-ar->winrct.xmin+1; - getsizey= ar->winrct.ymax-ar->winrct.ymin+1; - sx= ar->winrct.xmin; - sy= ar->winrct.ymin; + getsizex = ar->winrct.xmax - ar->winrct.xmin + 1; + getsizey = ar->winrct.ymax - ar->winrct.ymin + 1; + sx = ar->winrct.xmin; + sy = ar->winrct.ymin; - gx= *x; - gy= *y; + gx = *x; + gy = *y; if (block->panel) { gx += block->panel->ofsx; gy += block->panel->ofsy; } - *x= ((float)sx) + ((float)getsizex)*(0.5f+ 0.5f*(gx*block->winmat[0][0]+ gy*block->winmat[1][0]+ block->winmat[3][0])); - *y= ((float)sy) + ((float)getsizey)*(0.5f+ 0.5f*(gx*block->winmat[0][1]+ gy*block->winmat[1][1]+ block->winmat[3][1])); + *x = ((float)sx) + ((float)getsizex) * (0.5f + 0.5f * (gx * block->winmat[0][0] + gy * block->winmat[1][0] + block->winmat[3][0])); + *y = ((float)sy) + ((float)getsizey) * (0.5f + 0.5f * (gx * block->winmat[0][1] + gy * block->winmat[1][1] + block->winmat[3][1])); } void ui_block_to_window(const ARegion *ar, uiBlock *block, int *x, int *y) { float fx, fy; - fx= *x; - fy= *y; + fx = *x; + fy = *y; ui_block_to_window_fl(ar, block, &fx, &fy); - *x= (int)(fx+0.5f); - *y= (int)(fy+0.5f); + *x = (int)(fx + 0.5f); + *y = (int)(fy + 0.5f); } void ui_block_to_window_rct(const ARegion *ar, uiBlock *block, rctf *graph, rcti *winr) { rctf tmpr; - tmpr= *graph; + tmpr = *graph; ui_block_to_window_fl(ar, block, &tmpr.xmin, &tmpr.ymin); ui_block_to_window_fl(ar, block, &tmpr.xmax, &tmpr.ymax); @@ -143,29 +143,29 @@ void ui_block_to_window_rct(const ARegion *ar, uiBlock *block, rctf *graph, rcti winr->ymax = tmpr.ymax; } -void ui_window_to_block_fl(const ARegion *ar, uiBlock *block, float *x, float *y) /* for mouse cursor */ +void ui_window_to_block_fl(const ARegion *ar, uiBlock *block, float *x, float *y) /* for mouse cursor */ { float a, b, c, d, e, f, px, py; int sx, sy, getsizex, getsizey; - getsizex= ar->winrct.xmax-ar->winrct.xmin+1; - getsizey= ar->winrct.ymax-ar->winrct.ymin+1; - sx= ar->winrct.xmin; - sy= ar->winrct.ymin; + getsizex = ar->winrct.xmax - ar->winrct.xmin + 1; + getsizey = ar->winrct.ymax - ar->winrct.ymin + 1; + sx = ar->winrct.xmin; + sy = ar->winrct.ymin; - a= 0.5f*((float)getsizex)*block->winmat[0][0]; - b= 0.5f*((float)getsizex)*block->winmat[1][0]; - c= 0.5f*((float)getsizex)*(1.0f+block->winmat[3][0]); + a = 0.5f * ((float)getsizex) * block->winmat[0][0]; + b = 0.5f * ((float)getsizex) * block->winmat[1][0]; + c = 0.5f * ((float)getsizex) * (1.0f + block->winmat[3][0]); - d= 0.5f*((float)getsizey)*block->winmat[0][1]; - e= 0.5f*((float)getsizey)*block->winmat[1][1]; - f= 0.5f*((float)getsizey)*(1.0f+block->winmat[3][1]); + d = 0.5f * ((float)getsizey) * block->winmat[0][1]; + e = 0.5f * ((float)getsizey) * block->winmat[1][1]; + f = 0.5f * ((float)getsizey) * (1.0f + block->winmat[3][1]); - px= *x - sx; - py= *y - sy; + px = *x - sx; + py = *y - sy; - *y= (a*(py-f) + d*(c-px))/(a*e-d*b); - *x= (px- b*(*y)- c)/a; + *y = (a * (py - f) + d * (c - px)) / (a * e - d * b); + *x = (px - b * (*y) - c) / a; if (block->panel) { *x -= block->panel->ofsx; @@ -177,19 +177,19 @@ void ui_window_to_block(const ARegion *ar, uiBlock *block, int *x, int *y) { float fx, fy; - fx= *x; - fy= *y; + fx = *x; + fy = *y; ui_window_to_block_fl(ar, block, &fx, &fy); - *x= (int)(fx+0.5f); - *y= (int)(fy+0.5f); + *x = (int)(fx + 0.5f); + *y = (int)(fy + 0.5f); } void ui_window_to_region(const ARegion *ar, int *x, int *y) { - *x-= ar->winrct.xmin; - *y-= ar->winrct.ymin; + *x -= ar->winrct.xmin; + *y -= ar->winrct.ymin; } /* ******************* block calc ************************* */ @@ -198,7 +198,7 @@ void ui_block_translate(uiBlock *block, int x, int y) { uiBut *bt; - for (bt= block->buttons.first; bt; bt=bt->next) { + for (bt = block->buttons.first; bt; bt = bt->next) { bt->x1 += x; bt->y1 += y; bt->x2 += x; @@ -213,16 +213,16 @@ void ui_block_translate(uiBlock *block, int x, int y) static void ui_text_bounds_block(uiBlock *block, float offset) { - uiStyle *style=UI_GetStyle(); + uiStyle *style = UI_GetStyle(); uiBut *bt; - int i = 0, j, x1addval= offset, nextcol; - int lastcol= 0, col= 0; + int i = 0, j, x1addval = offset, nextcol; + int lastcol = 0, col = 0; uiStyleFontSet(&style->widget); - for (bt= block->buttons.first; bt; bt= bt->next) { - if (bt->type!=SEPR) { - j= BLF_width(style->widget.uifont_id, bt->drawstr); + for (bt = block->buttons.first; bt; bt = bt->next) { + if (bt->type != SEPR) { + j = BLF_width(style->widget.uifont_id, bt->drawstr); if (j > i) i = j; } @@ -232,26 +232,26 @@ static void ui_text_bounds_block(uiBlock *block, float offset) } /* cope with multi collumns */ - bt= block->buttons.first; + bt = block->buttons.first; while (bt) { if (bt->next && bt->x1 < bt->next->x1) { - nextcol= 1; + nextcol = 1; col++; } - else nextcol= 0; + else nextcol = 0; bt->x1 = x1addval; bt->x2 = bt->x1 + i + block->bounds; if (col == lastcol) - bt->x2= MAX2(bt->x2, offset + block->minbounds); + bt->x2 = MAX2(bt->x2, offset + block->minbounds); - ui_check_but(bt); // clips text again + ui_check_but(bt); // clips text again if (nextcol) - x1addval+= i + block->bounds; + x1addval += i + block->bounds; - bt= bt->next; + bt = bt->next; } } @@ -260,26 +260,26 @@ void ui_bounds_block(uiBlock *block) uiBut *bt; int xof; - if (block->buttons.first==NULL) { + if (block->buttons.first == NULL) { if (block->panel) { - block->minx= 0.0; block->maxx= block->panel->sizex; - block->miny= 0.0; block->maxy= block->panel->sizey; + block->minx = 0.0; block->maxx = block->panel->sizex; + block->miny = 0.0; block->maxy = block->panel->sizey; } } else { - block->minx= block->miny= 10000; - block->maxx= block->maxy= -10000; + block->minx = block->miny = 10000; + block->maxx = block->maxy = -10000; - bt= block->buttons.first; + bt = block->buttons.first; while (bt) { - if (bt->x1 < block->minx) block->minx= bt->x1; - if (bt->y1 < block->miny) block->miny= bt->y1; + if (bt->x1 < block->minx) block->minx = bt->x1; + if (bt->y1 < block->miny) block->miny = bt->y1; - if (bt->x2 > block->maxx) block->maxx= bt->x2; - if (bt->y2 > block->maxy) block->maxy= bt->y2; + if (bt->x2 > block->maxx) block->maxx = bt->x2; + if (bt->y2 > block->maxy) block->maxy = bt->y2; - bt= bt->next; + bt = bt->next; } block->minx -= block->bounds; @@ -288,22 +288,22 @@ void ui_bounds_block(uiBlock *block) block->maxy += block->bounds; } - block->maxx= block->minx + MAX2(block->maxx - block->minx, block->minbounds); + block->maxx = block->minx + MAX2(block->maxx - block->minx, block->minbounds); /* hardcoded exception... but that one is annoying with larger safety */ - bt= block->buttons.first; - if (bt && strncmp(bt->str, "ERROR", 5)==0) xof= 10; - else xof= 40; - - block->safety.xmin = block->minx-xof; - block->safety.ymin = block->miny-xof; - block->safety.xmax = block->maxx+xof; - block->safety.ymax = block->maxy+xof; + bt = block->buttons.first; + if (bt && strncmp(bt->str, "ERROR", 5) == 0) xof = 10; + else xof = 40; + + block->safety.xmin = block->minx - xof; + block->safety.ymin = block->miny - xof; + block->safety.xmax = block->maxx + xof; + block->safety.ymax = block->maxy + xof; } static void ui_centered_bounds_block(const bContext *C, uiBlock *block) { - wmWindow *window= CTX_wm_window(C); + wmWindow *window = CTX_wm_window(C); int xmax, ymax; int startx, starty; int width, height; @@ -316,8 +316,8 @@ static void ui_centered_bounds_block(const bContext *C, uiBlock *block) ui_bounds_block(block); - width= block->maxx - block->minx; - height= block->maxy - block->miny; + width = block->maxx - block->minx; + height = block->maxy - block->miny; startx = (xmax * 0.5f) - (width * 0.5f); starty = (ymax * 0.5f) - (height * 0.5f); @@ -330,60 +330,60 @@ static void ui_centered_bounds_block(const bContext *C, uiBlock *block) } static void ui_popup_bounds_block(const bContext *C, uiBlock *block, int bounds_calc) { - wmWindow *window= CTX_wm_window(C); + wmWindow *window = CTX_wm_window(C); int startx, starty, endx, endy, width, height, oldwidth, oldheight; int oldbounds, xmax, ymax; - oldbounds= block->bounds; + oldbounds = block->bounds; /* compute mouse position with user defined offset */ ui_bounds_block(block); wm_window_get_size(window, &xmax, &ymax); - oldwidth= block->maxx - block->minx; - oldheight= block->maxy - block->miny; + oldwidth = block->maxx - block->minx; + oldheight = block->maxy - block->miny; /* first we ensure wide enough text bounds */ - if (bounds_calc==UI_BLOCK_BOUNDS_POPUP_MENU) { + if (bounds_calc == UI_BLOCK_BOUNDS_POPUP_MENU) { if (block->flag & UI_BLOCK_LOOP) { - block->bounds= 50; + block->bounds = 50; ui_text_bounds_block(block, block->minx); } } /* next we recompute bounds */ - block->bounds= oldbounds; + block->bounds = oldbounds; ui_bounds_block(block); /* and we adjust the position to fit within window */ - width= block->maxx - block->minx; - height= block->maxy - block->miny; + width = block->maxx - block->minx; + height = block->maxy - block->miny; /* avoid divide by zero below, caused by calling with no UI, but better not crash */ - oldwidth= oldwidth > 0 ? oldwidth : MAX2(1, width); - oldheight= oldheight > 0 ? oldheight : MAX2(1, height); + oldwidth = oldwidth > 0 ? oldwidth : MAX2(1, width); + oldheight = oldheight > 0 ? oldheight : MAX2(1, height); /* offset block based on mouse position, user offset is scaled * along in case we resized the block in ui_text_bounds_block */ - startx= window->eventstate->x + block->minx + (block->mx*width)/oldwidth; - starty= window->eventstate->y + block->miny + (block->my*height)/oldheight; + startx = window->eventstate->x + block->minx + (block->mx * width) / oldwidth; + starty = window->eventstate->y + block->miny + (block->my * height) / oldheight; - if (startx<10) - startx= 10; - if (starty<10) - starty= 10; - - endx= startx+width; - endy= starty+height; - - if (endx>xmax) { - endx= xmax-10; - startx= endx-width; + if (startx < 10) + startx = 10; + if (starty < 10) + starty = 10; + + endx = startx + width; + endy = starty + height; + + if (endx > xmax) { + endx = xmax - 10; + startx = endx - width; } - if (endy>ymax-20) { - endy= ymax-20; - starty= endy-height; + if (endy > ymax - 20) { + endy = ymax - 20; + starty = endy - height; } ui_block_translate(block, startx - block->minx, starty - block->miny); @@ -395,43 +395,43 @@ static void ui_popup_bounds_block(const bContext *C, uiBlock *block, int bounds_ /* used for various cases */ void uiBoundsBlock(uiBlock *block, int addval) { - if (block==NULL) + if (block == NULL) return; - block->bounds= addval; - block->dobounds= UI_BLOCK_BOUNDS; + block->bounds = addval; + block->dobounds = UI_BLOCK_BOUNDS; } /* used for pulldowns */ void uiTextBoundsBlock(uiBlock *block, int addval) { - block->bounds= addval; - block->dobounds= UI_BLOCK_BOUNDS_TEXT; + block->bounds = addval; + block->dobounds = UI_BLOCK_BOUNDS_TEXT; } /* used for block popups */ void uiPopupBoundsBlock(uiBlock *block, int addval, int mx, int my) { - block->bounds= addval; - block->dobounds= UI_BLOCK_BOUNDS_POPUP_MOUSE; - block->mx= mx; - block->my= my; + block->bounds = addval; + block->dobounds = UI_BLOCK_BOUNDS_POPUP_MOUSE; + block->mx = mx; + block->my = my; } /* used for menu popups */ void uiMenuPopupBoundsBlock(uiBlock *block, int addval, int mx, int my) { - block->bounds= addval; - block->dobounds= UI_BLOCK_BOUNDS_POPUP_MENU; - block->mx= mx; - block->my= my; + block->bounds = addval; + block->dobounds = UI_BLOCK_BOUNDS_POPUP_MENU; + block->mx = mx; + block->my = my; } /* used for centered popups, i.e. splash */ void uiCenteredBoundsBlock(uiBlock *block, int addval) { - block->bounds= addval; - block->dobounds= UI_BLOCK_BOUNDS_POPUP_CENTER; + block->bounds = addval; + block->dobounds = UI_BLOCK_BOUNDS_POPUP_CENTER; } void uiExplicitBoundsBlock(uiBlock *block, int minx, int miny, int maxx, int maxy) @@ -452,26 +452,26 @@ static int ui_but_float_precision(uiBut *but, double value) int prec; /* first check if prec is 0 and fallback to a simple default */ - if ((prec= (int)but->a2) == 0) { - prec= (but->hardmax < 10.001f) ? 3 : 2; + if ((prec = (int)but->a2) == 0) { + prec = (but->hardmax < 10.001f) ? 3 : 2; } /* check on the number of decimal places need to display * the number, this is so 0.00001 is not displayed as 0.00, * _but_, this is only for small values si 10.0001 will not get * the same treatment */ - if (value != 0.0 && (value= ABS(value)) < 0.1) { - int value_i= (int)((value * PRECISION_FLOAT_MAX_POW) + 0.5); + if (value != 0.0 && (value = ABS(value)) < 0.1) { + int value_i = (int)((value * PRECISION_FLOAT_MAX_POW) + 0.5); if (value_i != 0) { - const int prec_span= 3; /* show: 0.01001, 5 would allow 0.0100001 for eg. */ + const int prec_span = 3; /* show: 0.01001, 5 would allow 0.0100001 for eg. */ int test_prec; - int prec_min= -1; - int dec_flag= 0; - int i= PRECISION_FLOAT_MAX; + int prec_min = -1; + int dec_flag = 0; + int i = PRECISION_FLOAT_MAX; while (i && value_i) { if (value_i % 10) { - dec_flag |= 1<> (prec_min + 1)) & ((1 << prec_span) - 1); + dec_flag = (dec_flag >> (prec_min + 1)) & ((1 << prec_span) - 1); while (dec_flag) { test_prec++; @@ -488,7 +488,7 @@ static int ui_but_float_precision(uiBut *but, double value) } if (test_prec > prec) { - prec= test_prec; + prec = test_prec; } } } @@ -502,17 +502,17 @@ static void ui_draw_linkline(uiLinkLine *line) { rcti rect; - if (line->from==NULL || line->to==NULL) return; + if (line->from == NULL || line->to == NULL) return; - rect.xmin = (line->from->x1+line->from->x2)/2.0f; - rect.ymin = (line->from->y1+line->from->y2)/2.0f; - rect.xmax = (line->to->x1+line->to->x2)/2.0f; - rect.ymax = (line->to->y1+line->to->y2)/2.0f; + rect.xmin = (line->from->x1 + line->from->x2) / 2.0f; + rect.ymin = (line->from->y1 + line->from->y2) / 2.0f; + rect.xmax = (line->to->x1 + line->to->x2) / 2.0f; + rect.ymax = (line->to->y1 + line->to->y2) / 2.0f; if (line->flag & UI_SELECT) - glColor3ub(100,100,100); + glColor3ub(100, 100, 100); else - glColor3ub(0,0,0); + glColor3ub(0, 0, 0); ui_draw_link_bezier(&rect); } @@ -522,16 +522,16 @@ static void ui_draw_links(uiBlock *block) uiBut *but; uiLinkLine *line; - but= block->buttons.first; + but = block->buttons.first; while (but) { - if (but->type==LINK && but->link) { - line= but->link->lines.first; + if (but->type == LINK && but->link) { + line = but->link->lines.first; while (line) { ui_draw_linkline(line); - line= line->next; + line = line->next; } } - but= but->next; + but = but->next; } } @@ -550,7 +550,7 @@ static int ui_but_equals_old(uiBut *but, uiBut *oldbut) if (but->funcN != oldbut->funcN) return 0; if (oldbut->func_arg1 != oldbut && but->func_arg1 != oldbut->func_arg1) return 0; if (oldbut->func_arg2 != oldbut && but->func_arg2 != oldbut->func_arg2) return 0; - if (!but->funcN && ((but->poin != oldbut->poin && (uiBut*)oldbut->poin != oldbut) || but->pointype != oldbut->pointype)) return 0; + if (!but->funcN && ((but->poin != oldbut->poin && (uiBut *)oldbut->poin != oldbut) || but->pointype != oldbut->pointype)) return 0; if (but->optype != oldbut->optype) return 0; return 1; @@ -563,26 +563,26 @@ static void ui_but_update_linklines(uiBlock *block, uiBut *oldbut, uiBut *newbut uiBut *but; /* if active button is LINK */ - if (newbut->type==LINK && newbut->link) { + if (newbut->type == LINK && newbut->link) { SWAP(uiLink *, oldbut->link, newbut->link); - for (line= oldbut->link->lines.first; line; line= line->next) { - if (line->to==newbut) - line->to= oldbut; - if (line->from==newbut) - line->from= oldbut; + for (line = oldbut->link->lines.first; line; line = line->next) { + if (line->to == newbut) + line->to = oldbut; + if (line->from == newbut) + line->from = oldbut; } } /* check all other button links */ - for (but= block->buttons.first; but; but= but->next) { - if (but!=newbut && but->type==LINK && but->link) { - for (line= but->link->lines.first; line; line= line->next) { - if (line->to==newbut) - line->to= oldbut; - if (line->from==newbut) - line->from= oldbut; + for (but = block->buttons.first; but; but = but->next) { + if (but != newbut && but->type == LINK && but->link) { + for (line = but->link->lines.first; line; line = line->next) { + if (line->to == newbut) + line->to = oldbut; + if (line->from == newbut) + line->from = oldbut; } } } @@ -591,14 +591,14 @@ static void ui_but_update_linklines(uiBlock *block, uiBut *oldbut, uiBut *newbut static int ui_but_update_from_old_block(const bContext *C, uiBlock *block, uiBut **butpp) { uiBlock *oldblock; - uiBut *oldbut, *but= *butpp; - int found= 0; + uiBut *oldbut, *but = *butpp; + int found = 0; - oldblock= block->oldblock; + oldblock = block->oldblock; if (!oldblock) return found; - for (oldbut=oldblock->buttons.first; oldbut; oldbut=oldbut->next) { + for (oldbut = oldblock->buttons.first; oldbut; oldbut = oldbut->next) { if (ui_but_equals_old(oldbut, but)) { if (oldbut->active) { #if 0 @@ -622,19 +622,19 @@ static int ui_but_update_from_old_block(const bContext *C, uiBlock *block, uiBut // but->softmax= oldbut->softmax; // but->linkto[0]= oldbut->linkto[0]; // but->linkto[1]= oldbut->linkto[1]; - found= 1; + found = 1; // oldbut->active= NULL; /* move button over from oldblock to new block */ BLI_remlink(&oldblock->buttons, oldbut); BLI_insertlink(&block->buttons, but, oldbut); - oldbut->block= block; - *butpp= oldbut; + oldbut->block = block; + *butpp = oldbut; /* still stuff needs to be copied */ - oldbut->x1= but->x1; oldbut->y1= but->y1; - oldbut->x2= but->x2; oldbut->y2= but->y2; - oldbut->context= but->context; /* set by Layout */ + oldbut->x1 = but->x1; oldbut->y1 = but->y1; + oldbut->x2 = but->x2; oldbut->y2 = but->y2; + oldbut->context = but->context; /* set by Layout */ /* typically the same pointers, but not on undo/redo */ /* XXX some menu buttons store button itself in but->poin. Ugly */ @@ -646,7 +646,7 @@ static int ui_but_update_from_old_block(const bContext *C, uiBlock *block, uiBut /* copy hardmin for list rows to prevent 'sticking' highlight to mouse position * when scrolling without moving mouse (see [#28432]) */ if (ELEM(oldbut->type, ROW, LISTROW)) - oldbut->hardmax= but->hardmax; + oldbut->hardmax = but->hardmax; ui_but_update_linklines(block, oldbut, but); @@ -676,27 +676,27 @@ int uiButActiveOnly(const bContext *C, uiBlock *block, uiBut *but) { uiBlock *oldblock; uiBut *oldbut; - int activate= 0, found= 0, isactive= 0; + int activate = 0, found = 0, isactive = 0; - oldblock= block->oldblock; + oldblock = block->oldblock; if (!oldblock) - activate= 1; + activate = 1; else { - for (oldbut=oldblock->buttons.first; oldbut; oldbut=oldbut->next) { + for (oldbut = oldblock->buttons.first; oldbut; oldbut = oldbut->next) { if (ui_but_equals_old(oldbut, but)) { - found= 1; + found = 1; if (oldbut->active) - isactive= 1; + isactive = 1; break; } } } - if (activate || found==0) { + if (activate || found == 0) { ui_button_activate_do( (bContext *)C, CTX_wm_region(C), but); } - else if (found && isactive==0) { + else if (found && isactive == 0) { BLI_remlink(&block->buttons, but); ui_free_but(C, but); @@ -715,7 +715,7 @@ static int ui_but_is_rna_undo(uiBut *but) * we could disable undo for buttons with no ID too but may have * unforeseen consequences, so best check for ID's we _know_ are not * handled by undo - campbell */ - ID *id= but->rnapoin.id.data; + ID *id = but->rnapoin.id.data; if (ID_CHECK_UNDO(id) == FALSE) { return FALSE; } @@ -736,34 +736,34 @@ static void ui_menu_block_set_keyaccels(uiBlock *block) { uiBut *but; - unsigned int menu_key_mask= 0; + unsigned int menu_key_mask = 0; unsigned char menu_key; const char *str_pt; int pass; - int tot_missing= 0; + int tot_missing = 0; /* only do it before bounding */ if (block->minx != block->maxx) return; - for (pass=0; pass<2; pass++) { + for (pass = 0; pass < 2; pass++) { /* 2 Passes, on for first letter only, second for any letter if first fails * fun first pass on all buttons so first word chars always get first priority */ - for (but=block->buttons.first; but; but=but->next) { + for (but = block->buttons.first; but; but = but->next) { if (!ELEM4(but->type, BUT, MENU, BLOCK, PULLDOWN) || (but->flag & UI_HIDDEN)) { /* pass */ } - else if (but->menu_key=='\0') { + else if (but->menu_key == '\0') { if (but->str) { - for (str_pt= but->str; *str_pt; ) { - menu_key= tolower(*str_pt); - if ((menu_key >= 'a' && menu_key <= 'z') && !(menu_key_mask & 1<<(menu_key-'a'))) { - menu_key_mask |= 1<<(menu_key-'a'); + for (str_pt = but->str; *str_pt; ) { + menu_key = tolower(*str_pt); + if ((menu_key >= 'a' && menu_key <= 'z') && !(menu_key_mask & 1 << (menu_key - 'a'))) { + menu_key_mask |= 1 << (menu_key - 'a'); break; } - if (pass==0) { + if (pass == 0) { /* Skip to next delimiter on first pass (be picky) */ while (isalpha(*str_pt)) str_pt++; @@ -778,7 +778,7 @@ static void ui_menu_block_set_keyaccels(uiBlock *block) } if (*str_pt) { - but->menu_key= menu_key; + but->menu_key = menu_key; } else { /* run second pass */ @@ -786,7 +786,7 @@ static void ui_menu_block_set_keyaccels(uiBlock *block) } /* if all keys have been used just exit, unlikely */ - if (menu_key_mask == (1<<26)-1) { + if (menu_key_mask == (1 << 26) - 1) { return; } } @@ -807,9 +807,9 @@ void ui_but_add_shortcut(uiBut *but, const char *shortcut_str, const short do_st { if (do_strip) { - char *cpoin= strchr(but->str, '|'); + char *cpoin = strchr(but->str, '|'); if (cpoin) { - *cpoin= '\0'; + *cpoin = '\0'; } } @@ -840,36 +840,36 @@ static void ui_menu_block_set_keymaps(const bContext *C, uiBlock *block) /* for menu's */ MenuType *mt; - IDProperty *prop_menu= NULL; - IDProperty *prop_menu_name= NULL; + IDProperty *prop_menu = NULL; + IDProperty *prop_menu_name = NULL; /* only do it before bounding */ if (block->minx != block->maxx) return; - for (but=block->buttons.first; but; but=but->next) { + for (but = block->buttons.first; but; but = but->next) { if (but->optype) { - IDProperty *prop= (but->opptr)? but->opptr->data: NULL; + IDProperty *prop = (but->opptr) ? but->opptr->data : NULL; if (WM_key_event_operator_string(C, but->optype->idname, but->opcontext, prop, TRUE, - buf, sizeof(buf))) + buf, sizeof(buf))) { ui_but_add_shortcut(but, buf, FALSE); } } - else if ((mt= uiButGetMenuType(but))) { + else if ((mt = uiButGetMenuType(but))) { /* only allocate menu property once */ if (prop_menu == NULL) { /* annoying, create a property */ IDPropertyTemplate val = {0}; - prop_menu= IDP_New(IDP_GROUP, &val, __func__); /* dummy, name is unimportant */ - IDP_AddToGroup(prop_menu, (prop_menu_name= IDP_NewString("", "name", sizeof(mt->idname)))); + prop_menu = IDP_New(IDP_GROUP, &val, __func__); /* dummy, name is unimportant */ + IDP_AddToGroup(prop_menu, (prop_menu_name = IDP_NewString("", "name", sizeof(mt->idname)))); } IDP_AssignString(prop_menu_name, mt->idname, sizeof(mt->idname)); if (WM_key_event_operator_string(C, "WM_OT_call_menu", WM_OP_INVOKE_REGION_WIN, prop_menu, FALSE, - buf, sizeof(buf))) + buf, sizeof(buf))) { ui_but_add_shortcut(but, buf, FALSE); } @@ -888,41 +888,41 @@ static void ui_menu_block_set_keymaps(const bContext *C, uiBlock *block) void uiEndBlock(const bContext *C, uiBlock *block) { uiBut *but; - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); /* inherit flags from 'old' buttons that was drawn here previous, based * on matching buttons, we need this to make button event handling non * blocking, while still allowing buttons to be remade each redraw as it * is expected by blender code */ - for (but=block->buttons.first; but; but=but->next) { + for (but = block->buttons.first; but; but = but->next) { if (ui_but_update_from_old_block(C, block, &but)) ui_check_but(but); /* temp? Proper check for greying out */ if (but->optype) { - wmOperatorType *ot= but->optype; + wmOperatorType *ot = but->optype; if (but->context) - CTX_store_set((bContext*)C, but->context); + CTX_store_set((bContext *)C, but->context); - if (ot == NULL || WM_operator_poll_context((bContext*)C, ot, but->opcontext)==0) { + if (ot == NULL || WM_operator_poll_context((bContext *)C, ot, but->opcontext) == 0) { but->flag |= UI_BUT_DISABLED; but->lock = 1; } if (but->context) - CTX_store_set((bContext*)C, NULL); + CTX_store_set((bContext *)C, NULL); } - ui_but_anim_flag(but, (scene)? scene->r.cfra: 0.0f); + ui_but_anim_flag(but, (scene) ? scene->r.cfra : 0.0f); } if (block->oldblock) { - block->auto_open= block->oldblock->auto_open; - block->auto_open_last= block->oldblock->auto_open_last; - block->tooltipdisabled= block->oldblock->tooltipdisabled; + block->auto_open = block->oldblock->auto_open; + block->auto_open_last = block->oldblock->auto_open_last; + block->tooltipdisabled = block->oldblock->tooltipdisabled; - block->oldblock= NULL; + block->oldblock = NULL; } /* handle pending stuff */ @@ -939,10 +939,10 @@ void uiEndBlock(const bContext *C, uiBlock *block) else if (block->dobounds == UI_BLOCK_BOUNDS_POPUP_CENTER) ui_centered_bounds_block(C, block); else if (block->dobounds) ui_popup_bounds_block(C, block, block->dobounds); - if (block->minx==0.0f && block->maxx==0.0f) uiBoundsBlock(block, 0); + if (block->minx == 0.0f && block->maxx == 0.0f) uiBoundsBlock(block, 0); if (block->flag & UI_BUT_ALIGN) uiBlockEndAlign(block); - block->endblock= 1; + block->endblock = 1; } /* ************** BLOCK DRAWING FUNCTION ************* */ @@ -950,16 +950,16 @@ void uiEndBlock(const bContext *C, uiBlock *block) void ui_fontscale(short *points, float aspect) { if (aspect < 0.9f || aspect > 1.1f) { - float pointsf= *points; + float pointsf = *points; /* for some reason scaling fonts goes too fast compared to widget size */ - aspect= sqrt(aspect); + aspect = sqrt(aspect); pointsf /= aspect; if (aspect > 1.0f) - *points= ceilf(pointsf); + *points = ceilf(pointsf); else - *points= floorf(pointsf); + *points = floorf(pointsf); } } @@ -969,42 +969,42 @@ static void ui_but_to_pixelrect(rcti *rect, const ARegion *ar, uiBlock *block, u float gx, gy; float getsizex, getsizey; - getsizex= ar->winx; - getsizey= ar->winy; + getsizex = ar->winx; + getsizey = ar->winy; - gx= (but?but->x1:block->minx) + (block->panel?block->panel->ofsx:0.0f); - gy= (but?but->y1:block->miny) + (block->panel?block->panel->ofsy:0.0f); + gx = (but ? but->x1 : block->minx) + (block->panel ? block->panel->ofsx : 0.0f); + gy = (but ? but->y1 : block->miny) + (block->panel ? block->panel->ofsy : 0.0f); - rect->xmin = floorf(getsizex*(0.5f+ 0.5f*(gx*block->winmat[0][0]+ gy*block->winmat[1][0]+ block->winmat[3][0]))); - rect->ymin = floorf(getsizey*(0.5f+ 0.5f*(gx*block->winmat[0][1]+ gy*block->winmat[1][1]+ block->winmat[3][1]))); + rect->xmin = floorf(getsizex * (0.5f + 0.5f * (gx * block->winmat[0][0] + gy * block->winmat[1][0] + block->winmat[3][0]))); + rect->ymin = floorf(getsizey * (0.5f + 0.5f * (gx * block->winmat[0][1] + gy * block->winmat[1][1] + block->winmat[3][1]))); - gx= (but?but->x2:block->maxx) + (block->panel?block->panel->ofsx:0.0f); - gy= (but?but->y2:block->maxy) + (block->panel?block->panel->ofsy:0.0f); + gx = (but ? but->x2 : block->maxx) + (block->panel ? block->panel->ofsx : 0.0f); + gy = (but ? but->y2 : block->maxy) + (block->panel ? block->panel->ofsy : 0.0f); - rect->xmax = floorf(getsizex*(0.5f+ 0.5f*(gx*block->winmat[0][0]+ gy*block->winmat[1][0]+ block->winmat[3][0]))); - rect->ymax = floorf(getsizey*(0.5f+ 0.5f*(gx*block->winmat[0][1]+ gy*block->winmat[1][1]+ block->winmat[3][1]))); + rect->xmax = floorf(getsizex * (0.5f + 0.5f * (gx * block->winmat[0][0] + gy * block->winmat[1][0] + block->winmat[3][0]))); + rect->ymax = floorf(getsizey * (0.5f + 0.5f * (gx * block->winmat[0][1] + gy * block->winmat[1][1] + block->winmat[3][1]))); } /* uses local copy of style, to scale things down, and allow widgets to change stuff */ void uiDrawBlock(const bContext *C, uiBlock *block) { - uiStyle style= *UI_GetStyle(); // XXX pass on as arg + uiStyle style = *UI_GetStyle(); // XXX pass on as arg ARegion *ar; uiBut *but; rcti rect; int multisample_enabled; /* get menu region or area region */ - ar= CTX_wm_menu(C); + ar = CTX_wm_menu(C); if (!ar) - ar= CTX_wm_region(C); + ar = CTX_wm_region(C); if (!block->endblock) uiEndBlock(C, block); /* disable AA, makes widgets too blurry */ - multisample_enabled= glIsEnabled(GL_MULTISAMPLE_ARB); + multisample_enabled = glIsEnabled(GL_MULTISAMPLE_ARB); if (multisample_enabled) glDisable(GL_MULTISAMPLE_ARB); @@ -1027,7 +1027,7 @@ void uiDrawBlock(const bContext *C, uiBlock *block) glPushMatrix(); glLoadIdentity(); - wmOrtho2(-0.01f, ar->winx-0.01f, -0.01f, ar->winy-0.01f); + wmOrtho2(-0.01f, ar->winx - 0.01f, -0.01f, ar->winy - 0.01f); /* back */ if (block->flag & UI_BLOCK_LOOP) @@ -1036,8 +1036,8 @@ void uiDrawBlock(const bContext *C, uiBlock *block) ui_draw_aligned_panel(&style, block, &rect); /* widgets */ - for (but= block->buttons.first; but; but= but->next) { - if (!(but->flag & (UI_HIDDEN|UI_SCROLLED))) { + for (but = block->buttons.first; but; but = but->next) { + if (!(but->flag & (UI_HIDDEN | UI_SCROLLED))) { ui_but_to_pixelrect(&rect, ar, block, but); /* XXX: figure out why invalid coordinates happen when closing render window */ @@ -1063,64 +1063,64 @@ void uiDrawBlock(const bContext *C, uiBlock *block) static void ui_is_but_sel(uiBut *but, double *value) { - short is_push=0, is_true=1; + short is_push = 0, is_true = 1; - if (ELEM3(but->type, TOGN, ICONTOGN, OPTIONN)) is_true= 0; + if (ELEM3(but->type, TOGN, ICONTOGN, OPTIONN)) is_true = 0; - if ( but->bit ) { + if (but->bit) { int lvalue; UI_GET_BUT_VALUE_INIT(but, *value) - lvalue= (int)*value; - if ( BTST(lvalue, (but->bitnr)) ) is_push= is_true; - else is_push= !is_true; + lvalue = (int)*value; + if (BTST(lvalue, (but->bitnr)) ) is_push = is_true; + else is_push = !is_true; } else { - switch(but->type) { - case BUT: - is_push= 2; - break; - case HOTKEYEVT: - case KEYEVT: - is_push= 2; - break; - case TOGBUT: - case TOG: - case TOGR: - case TOG3: - case BUT_TOGDUAL: - case ICONTOG: - case OPTION: - UI_GET_BUT_VALUE_INIT(but, *value) - if (*value != (double)but->hardmin) is_push= 1; - break; - case ICONTOGN: - case TOGN: - case OPTIONN: - UI_GET_BUT_VALUE_INIT(but, *value) - if (*value==0.0) is_push= 1; - break; - case ROW: - case LISTROW: - UI_GET_BUT_VALUE_INIT(but, *value) - /* support for rna enum buts */ - if (but->rnaprop && (RNA_property_flag(but->rnaprop) & PROP_ENUM_FLAG)) { - if ((int)*value & (int)but->hardmax) is_push= 1; - } - else { - if (*value == (double)but->hardmax) is_push= 1; - } - break; - case COL: - is_push= 2; - break; - default: - is_push= 2; - break; + switch (but->type) { + case BUT: + is_push = 2; + break; + case HOTKEYEVT: + case KEYEVT: + is_push = 2; + break; + case TOGBUT: + case TOG: + case TOGR: + case TOG3: + case BUT_TOGDUAL: + case ICONTOG: + case OPTION: + UI_GET_BUT_VALUE_INIT(but, *value) + if (*value != (double)but->hardmin) is_push = 1; + break; + case ICONTOGN: + case TOGN: + case OPTIONN: + UI_GET_BUT_VALUE_INIT(but, *value) + if (*value == 0.0) is_push = 1; + break; + case ROW: + case LISTROW: + UI_GET_BUT_VALUE_INIT(but, *value) + /* support for rna enum buts */ + if (but->rnaprop && (RNA_property_flag(but->rnaprop) & PROP_ENUM_FLAG)) { + if ((int)*value & (int)but->hardmax) is_push = 1; + } + else { + if (*value == (double)but->hardmax) is_push = 1; + } + break; + case COL: + is_push = 2; + break; + default: + is_push = 2; + break; } } - if (is_push==2); - else if (is_push==1) but->flag |= UI_SELECT; + if (is_push == 2) ; + else if (is_push == 1) but->flag |= UI_SELECT; else but->flag &= ~UI_SELECT; } @@ -1128,12 +1128,12 @@ static uiBut *ui_find_inlink(uiBlock *block, void *poin) { uiBut *but; - but= block->buttons.first; + but = block->buttons.first; while (but) { - if (but->type==INLINK) { + if (but->type == INLINK) { if (but->poin == poin) return but; } - but= but->next; + but = but->next; } return NULL; } @@ -1142,10 +1142,10 @@ static void ui_add_link_line(ListBase *listb, uiBut *but, uiBut *bt) { uiLinkLine *line; - line= MEM_callocN(sizeof(uiLinkLine), "linkline"); + line = MEM_callocN(sizeof(uiLinkLine), "linkline"); BLI_addtail(listb, line); - line->from= but; - line->to= bt; + line->from = but; + line->to = bt; } uiBut *uiFindInlink(uiBlock *block, void *poin) @@ -1160,31 +1160,31 @@ void uiComposeLinks(uiBlock *block) void ***ppoin; int a; - but= block->buttons.first; + but = block->buttons.first; while (but) { - if (but->type==LINK) { - link= but->link; + if (but->type == LINK) { + link = but->link; /* for all pointers in the array */ if (link) { if (link->ppoin) { - ppoin= link->ppoin; - for (a=0; a < *(link->totlink); a++) { - bt= ui_find_inlink(block, (*ppoin)[a] ); + ppoin = link->ppoin; + for (a = 0; a < *(link->totlink); a++) { + bt = ui_find_inlink(block, (*ppoin)[a]); if (bt) { ui_add_link_line(&link->lines, but, bt); } } } else if (link->poin) { - bt= ui_find_inlink(block, *(link->poin) ); + bt = ui_find_inlink(block, *(link->poin) ); if (bt) { ui_add_link_line(&link->lines, but, bt); } } } } - but= but->next; + but = but->next; } } @@ -1194,15 +1194,15 @@ void uiComposeLinks(uiBlock *block) void uiBlockSetButLock(uiBlock *block, int val, const char *lockstr) { if (val) { - block->lock= val ? 1:0; - block->lockstr= lockstr; + block->lock = val ? 1 : 0; + block->lockstr = lockstr; } } void uiBlockClearButLock(uiBlock *block) { - block->lock= 0; - block->lockstr= NULL; + block->lock = 0; + block->lockstr = NULL; } /* *************************************************************** */ @@ -1214,22 +1214,22 @@ void ui_delete_linkline(uiLinkLine *line, uiBut *but) BLI_remlink(&but->link->lines, line); - link= line->from->link; + link = line->from->link; /* are there more pointers allowed? */ if (link->ppoin) { - if (*(link->totlink)==1) { - *(link->totlink)= 0; + if (*(link->totlink) == 1) { + *(link->totlink) = 0; MEM_freeN(*(link->ppoin)); - *(link->ppoin)= NULL; + *(link->ppoin) = NULL; } else { - b= 0; - for (a=0; a< (*(link->totlink)); a++) { + b = 0; + for (a = 0; a < (*(link->totlink)); a++) { - if ( (*(link->ppoin))[a] != line->to->poin ) { - (*(link->ppoin))[b]= (*(link->ppoin))[a]; + if ( (*(link->ppoin))[a] != line->to->poin) { + (*(link->ppoin))[b] = (*(link->ppoin))[a]; b++; } } @@ -1237,7 +1237,7 @@ void ui_delete_linkline(uiLinkLine *line, uiBut *but) } } else { - *(link->poin)= NULL; + *(link->poin) = NULL; } MEM_freeN(line); @@ -1259,32 +1259,32 @@ void ui_get_but_vectorf(uiBut *but, float vec[3]) } if (but->rnaprop) { - prop= but->rnaprop; + prop = but->rnaprop; - vec[0]= vec[1]= vec[2]= 0.0f; + vec[0] = vec[1] = vec[2] = 0.0f; if (RNA_property_type(prop) == PROP_FLOAT) { - tot= RNA_property_array_length(&but->rnapoin, prop); - tot= MIN2(tot, 3); + tot = RNA_property_array_length(&but->rnapoin, prop); + tot = MIN2(tot, 3); - for (a=0; arnapoin, prop, a); + for (a = 0; a < tot; a++) + vec[a] = RNA_property_float_get_index(&but->rnapoin, prop, a); } } else if (but->pointype == CHA) { - char *cp= (char *)but->poin; - vec[0]= ((float)cp[0])/255.0f; - vec[1]= ((float)cp[1])/255.0f; - vec[2]= ((float)cp[2])/255.0f; + char *cp = (char *)but->poin; + vec[0] = ((float)cp[0]) / 255.0f; + vec[1] = ((float)cp[1]) / 255.0f; + vec[2] = ((float)cp[2]) / 255.0f; } else if (but->pointype == FLO) { - float *fp= (float *)but->poin; + float *fp = (float *)but->poin; copy_v3_v3(vec, fp); } else { - if (but->editvec==NULL) { + if (but->editvec == NULL) { fprintf(stderr, "ui_get_but_vectorf: can't get color, should never happen\n"); - vec[0]= vec[1]= vec[2]= 0.0f; + vec[0] = vec[1] = vec[2] = 0.0f; } } @@ -1303,35 +1303,35 @@ void ui_set_but_vectorf(uiBut *but, const float vec[3]) } if (but->rnaprop) { - prop= but->rnaprop; + prop = but->rnaprop; if (RNA_property_type(prop) == PROP_FLOAT) { int tot; int a; - tot= RNA_property_array_length(&but->rnapoin, prop); - tot= MIN2(tot, 3); + tot = RNA_property_array_length(&but->rnapoin, prop); + tot = MIN2(tot, 3); - for (a=0; arnapoin, prop, a, vec[a]); } } } else if (but->pointype == CHA) { - char *cp= (char *)but->poin; - cp[0]= (char)(0.5f + vec[0]*255.0f); - cp[1]= (char)(0.5f + vec[1]*255.0f); - cp[2]= (char)(0.5f + vec[2]*255.0f); + char *cp = (char *)but->poin; + cp[0] = (char)(0.5f + vec[0] * 255.0f); + cp[1] = (char)(0.5f + vec[1] * 255.0f); + cp[2] = (char)(0.5f + vec[2] * 255.0f); } else if (but->pointype == FLO) { - float *fp= (float *)but->poin; + float *fp = (float *)but->poin; copy_v3_v3(fp, vec); } } int ui_is_but_float(uiBut *but) { - if (but->pointype==FLO && but->poin) + if (but->pointype == FLO && but->poin) return 1; if (but->rnaprop && RNA_property_type(but->rnaprop) == PROP_FLOAT) @@ -1342,8 +1342,8 @@ int ui_is_but_float(uiBut *but) int ui_is_but_unit(uiBut *but) { - UnitSettings *unit= but->block->unit; - const int unit_type= uiButGetUnitType(but); + UnitSettings *unit = but->block->unit; + const int unit_type = uiButGetUnitType(but); if (unit_type == PROP_UNIT_NONE) return 0; @@ -1368,7 +1368,7 @@ int ui_is_but_unit(uiBut *but) int ui_is_but_rna_valid(uiBut *but) { - if (but->rnaprop==NULL || RNA_struct_contains_property(&but->rnapoin, but->rnaprop)) { + if (but->rnaprop == NULL || RNA_struct_contains_property(&but->rnapoin, but->rnaprop)) { return TRUE; } else { @@ -1383,61 +1383,61 @@ double ui_get_but_val(uiBut *but) double value = 0.0; if (but->editval) { return *(but->editval); } - if (but->poin==NULL && but->rnapoin.data==NULL) return 0.0; + if (but->poin == NULL && but->rnapoin.data == NULL) return 0.0; if (but->rnaprop) { - prop= but->rnaprop; + prop = but->rnaprop; - switch(RNA_property_type(prop)) { + switch (RNA_property_type(prop)) { case PROP_BOOLEAN: if (RNA_property_array_check(prop)) - value= RNA_property_boolean_get_index(&but->rnapoin, prop, but->rnaindex); + value = RNA_property_boolean_get_index(&but->rnapoin, prop, but->rnaindex); else - value= RNA_property_boolean_get(&but->rnapoin, prop); + value = RNA_property_boolean_get(&but->rnapoin, prop); break; case PROP_INT: if (RNA_property_array_check(prop)) - value= RNA_property_int_get_index(&but->rnapoin, prop, but->rnaindex); + value = RNA_property_int_get_index(&but->rnapoin, prop, but->rnaindex); else - value= RNA_property_int_get(&but->rnapoin, prop); + value = RNA_property_int_get(&but->rnapoin, prop); break; case PROP_FLOAT: if (RNA_property_array_check(prop)) - value= RNA_property_float_get_index(&but->rnapoin, prop, but->rnaindex); + value = RNA_property_float_get_index(&but->rnapoin, prop, but->rnaindex); else - value= RNA_property_float_get(&but->rnapoin, prop); + value = RNA_property_float_get(&but->rnapoin, prop); break; case PROP_ENUM: - value= RNA_property_enum_get(&but->rnapoin, prop); + value = RNA_property_enum_get(&but->rnapoin, prop); break; default: - value= 0.0; + value = 0.0; break; } } - else if (but->type== HSVSLI) { + else if (but->type == HSVSLI) { float h, s, v, *fp; - fp= (but->editvec)? but->editvec: (float *)but->poin; + fp = (but->editvec) ? but->editvec : (float *)but->poin; rgb_to_hsv(fp[0], fp[1], fp[2], &h, &s, &v); - switch(but->str[0]) { - case 'H': value= h; break; - case 'S': value= s; break; - case 'V': value= v; break; + switch (but->str[0]) { + case 'H': value = h; break; + case 'S': value = s; break; + case 'V': value = v; break; } } - else if ( but->pointype == CHA ) { - value= *(char *)but->poin; + else if (but->pointype == CHA) { + value = *(char *)but->poin; } - else if ( but->pointype == SHO ) { - value= *(short *)but->poin; + else if (but->pointype == SHO) { + value = *(short *)but->poin; } - else if ( but->pointype == INT ) { - value= *(int *)but->poin; + else if (but->pointype == INT) { + value = *(int *)but->poin; } - else if ( but->pointype == FLO ) { - value= *(float *)but->poin; + else if (but->pointype == FLO) { + value = *(float *)but->poin; } return value; @@ -1449,10 +1449,10 @@ void ui_set_but_val(uiBut *but, double value) /* value is a hsv value: convert to rgb */ if (but->rnaprop) { - prop= but->rnaprop; + prop = but->rnaprop; if (RNA_property_editable(&but->rnapoin, prop)) { - switch(RNA_property_type(prop)) { + switch (RNA_property_type(prop)) { case PROP_BOOLEAN: if (RNA_property_array_length(&but->rnapoin, prop)) RNA_property_boolean_set_index(&but->rnapoin, prop, but->rnaindex, value); @@ -1473,7 +1473,7 @@ void ui_set_but_val(uiBut *but, double value) break; case PROP_ENUM: if (RNA_property_flag(prop) & PROP_ENUM_FLAG) { - int ivalue= (int)value; + int ivalue = (int)value; ivalue ^= RNA_property_enum_get(&but->rnapoin, prop); /* toggle for enum/flag buttons */ RNA_property_enum_set(&but->rnapoin, prop, ivalue); } @@ -1488,56 +1488,56 @@ void ui_set_but_val(uiBut *but, double value) /* we can't be sure what RNA set functions actually do, * so leave this unset */ - value= UI_BUT_VALUE_UNSET; + value = UI_BUT_VALUE_UNSET; } - else if (but->pointype==0); - else if (but->type==HSVSLI ) { + else if (but->pointype == 0) ; + else if (but->type == HSVSLI) { float h, s, v, *fp; - fp= (but->editvec)? but->editvec: (float *)but->poin; + fp = (but->editvec) ? but->editvec : (float *)but->poin; rgb_to_hsv(fp[0], fp[1], fp[2], &h, &s, &v); - switch(but->str[0]) { - case 'H': h= value; break; - case 'S': s= value; break; - case 'V': v= value; break; + switch (but->str[0]) { + case 'H': h = value; break; + case 'S': s = value; break; + case 'V': v = value; break; } - hsv_to_rgb(h, s, v, fp, fp+1, fp+2); + hsv_to_rgb(h, s, v, fp, fp + 1, fp + 2); } else { /* first do rounding */ - if (but->pointype==CHA) - value= (char)floor(value+0.5); - else if (but->pointype==SHO ) { + if (but->pointype == CHA) + value = (char)floor(value + 0.5); + else if (but->pointype == SHO) { /* gcc 3.2.1 seems to have problems * casting a double like 32772.0 to * a short so we cast to an int, then * to a short */ int gcckludge; - gcckludge = (int) floor(value+0.5); - value= (short)gcckludge; + gcckludge = (int) floor(value + 0.5); + value = (short)gcckludge; } - else if (but->pointype==INT ) - value= (int)floor(value+0.5); - else if (but->pointype==FLO ) { - float fval= (float)value; - if (fval>= -0.00001f && fval<= 0.00001f) fval= 0.0f; /* prevent negative zero */ - value= fval; + else if (but->pointype == INT) + value = (int)floor(value + 0.5); + else if (but->pointype == FLO) { + float fval = (float)value; + if (fval >= -0.00001f && fval <= 0.00001f) fval = 0.0f; /* prevent negative zero */ + value = fval; } /* then set value with possible edit override */ if (but->editval) - value= *but->editval= value; - else if (but->pointype==CHA) - value= *((char *)but->poin)= (char)value; - else if (but->pointype==SHO) - value= *((short *)but->poin)= (short)value; - else if (but->pointype==INT) - value= *((int *)but->poin)= (int)value; - else if (but->pointype==FLO) - value= *((float *)but->poin)= (float)value; + value = *but->editval = value; + else if (but->pointype == CHA) + value = *((char *)but->poin) = (char)value; + else if (but->pointype == SHO) + value = *((short *)but->poin) = (short)value; + else if (but->pointype == INT) + value = *((int *)but->poin) = (int)value; + else if (but->pointype == FLO) + value = *((float *)but->poin) = (float)value; } /* update select flag */ @@ -1549,15 +1549,15 @@ int ui_get_but_string_max_length(uiBut *but) if (ELEM(but->type, TEX, SEARCH_MENU)) return but->hardmax; else if (but->type == IDPOIN) - return MAX_ID_NAME-2; + return MAX_ID_NAME - 2; else return UI_MAX_DRAW_STR; } static double ui_get_but_scale_unit(uiBut *but, double value) { - UnitSettings *unit= but->block->unit; - int unit_type= uiButGetUnitType(but); + UnitSettings *unit = but->block->unit; + int unit_type = uiButGetUnitType(but); if (unit_type == PROP_UNIT_LENGTH) { return value * (double)unit->scale_length; @@ -1569,7 +1569,7 @@ static double ui_get_but_scale_unit(uiBut *but, double value) return value * pow(unit->scale_length, 3); } else if (unit_type == PROP_UNIT_TIME) { /* WARNING - using evil_C :| */ - Scene *scene= CTX_data_scene(but->block->evil_C); + Scene *scene = CTX_data_scene(but->block->evil_C); return FRA2TIME(value); } else { @@ -1581,14 +1581,14 @@ static double ui_get_but_scale_unit(uiBut *but, double value) void ui_convert_to_unit_alt_name(uiBut *but, char *str, size_t maxlen) { if (ui_is_but_unit(but)) { - UnitSettings *unit= but->block->unit; - int unit_type= uiButGetUnitType(but); + UnitSettings *unit = but->block->unit; + int unit_type = uiButGetUnitType(but); char *orig_str; - orig_str= MEM_callocN(sizeof(char)*maxlen + 1, "textedit sub str"); + orig_str = MEM_callocN(sizeof(char) * maxlen + 1, "textedit sub str"); memcpy(orig_str, str, maxlen); - bUnit_ToUnitAltName(str, maxlen, orig_str, unit->system, unit_type>>16); + bUnit_ToUnitAltName(str, maxlen, orig_str, unit->system, unit_type >> 16); MEM_freeN(orig_str); } @@ -1596,29 +1596,29 @@ void ui_convert_to_unit_alt_name(uiBut *but, char *str, size_t maxlen) static void ui_get_but_string_unit(uiBut *but, char *str, int len_max, double value, int pad) { - UnitSettings *unit= but->block->unit; - int do_split= unit->flag & USER_UNIT_OPT_SPLIT; - int unit_type= uiButGetUnitType(but); - int precision= but->a2; + UnitSettings *unit = but->block->unit; + int do_split = unit->flag & USER_UNIT_OPT_SPLIT; + int unit_type = uiButGetUnitType(but); + int precision = but->a2; - if (unit->scale_length<0.0001f) unit->scale_length= 1.0f; // XXX do_versions + if (unit->scale_length < 0.0001f) unit->scale_length = 1.0f; // XXX do_versions /* Sanity checks */ - if (precision > PRECISION_FLOAT_MAX) precision= PRECISION_FLOAT_MAX; - else if (precision==0) precision= 2; + if (precision > PRECISION_FLOAT_MAX) precision = PRECISION_FLOAT_MAX; + else if (precision == 0) precision = 2; - bUnit_AsString(str, len_max, ui_get_but_scale_unit(but, value), precision, unit->system, unit_type>>16, do_split, pad); + bUnit_AsString(str, len_max, ui_get_but_scale_unit(but, value), precision, unit->system, unit_type >> 16, do_split, pad); } static float ui_get_but_step_unit(uiBut *but, float step_default) { - int unit_type= uiButGetUnitType(but)>>16; + int unit_type = uiButGetUnitType(but) >> 16; float step; step = bUnit_ClosestScalar(ui_get_but_scale_unit(but, step_default), but->block->unit->system, unit_type); if (step > 0.0f) { /* -1 is an error value */ - return (float)((double)step/ui_get_but_scale_unit(but, 1.0))*100.0f; + return (float)((double)step / ui_get_but_scale_unit(but, 1.0)) * 100.0f; } else { return step_default; @@ -1630,19 +1630,19 @@ void ui_get_but_string(uiBut *but, char *str, size_t maxlen) { if (but->rnaprop && ELEM3(but->type, TEX, IDPOIN, SEARCH_MENU)) { PropertyType type; - char *buf= NULL; + char *buf = NULL; int buf_len; - type= RNA_property_type(but->rnaprop); + type = RNA_property_type(but->rnaprop); if (type == PROP_STRING) { /* RNA string */ - buf= RNA_property_string_get_alloc(&but->rnapoin, but->rnaprop, str, maxlen, &buf_len); + buf = RNA_property_string_get_alloc(&but->rnapoin, but->rnaprop, str, maxlen, &buf_len); } else if (type == PROP_POINTER) { /* RNA pointer */ - PointerRNA ptr= RNA_property_pointer_get(&but->rnapoin, but->rnaprop); - buf= RNA_struct_name_get_alloc(&ptr, str, maxlen, &buf_len); + PointerRNA ptr = RNA_property_pointer_get(&but->rnapoin, but->rnaprop); + buf = RNA_struct_name_get_alloc(&ptr, str, maxlen, &buf_len); } if (!buf) { @@ -1650,16 +1650,16 @@ void ui_get_but_string(uiBut *but, char *str, size_t maxlen) } else if (buf && buf != str) { /* string was too long, we have to truncate */ - memcpy(str, buf, MIN2(maxlen, buf_len+1)); + memcpy(str, buf, MIN2(maxlen, buf_len + 1)); MEM_freeN(buf); } } else if (but->type == IDPOIN) { /* ID pointer */ if (but->idpoin_idpp) { /* Can be NULL for ID properties by python */ - ID *id= *(but->idpoin_idpp); + ID *id = *(but->idpoin_idpp); if (id) { - BLI_strncpy(str, id->name+2, maxlen); + BLI_strncpy(str, id->name + 2, maxlen); return; } } @@ -1677,19 +1677,19 @@ void ui_get_but_string(uiBut *but, char *str, size_t maxlen) return; } else if (ui_but_anim_expression_get(but, str, maxlen)) - ; /* driver expression */ + ; /* driver expression */ else { /* number editing */ double value; - value= ui_get_but_val(but); + value = ui_get_but_val(but); if (ui_is_but_float(but)) { if (ui_is_but_unit(but)) { ui_get_but_string_unit(but, str, maxlen, value, 0); } else { - const int prec= ui_but_float_precision(but, value); + const int prec = ui_but_float_precision(but, value); BLI_snprintf(str, maxlen, "%.*f", prec, value); } } @@ -1703,12 +1703,12 @@ void ui_get_but_string(uiBut *but, char *str, size_t maxlen) static int ui_set_but_string_eval_num_unit(bContext *C, uiBut *but, const char *str, double *value) { char str_unit_convert[256]; - const int unit_type= uiButGetUnitType(but); + const int unit_type = uiButGetUnitType(but); BLI_strncpy(str_unit_convert, str, sizeof(str_unit_convert)); /* ugly, use the draw string to get the value, this could cause problems if it includes some text which resolves to a unit */ - bUnit_ReplaceString(str_unit_convert, sizeof(str_unit_convert), but->drawstr, ui_get_but_scale_unit(but, 1.0), but->block->unit->system, unit_type>>16); + bUnit_ReplaceString(str_unit_convert, sizeof(str_unit_convert), but->drawstr, ui_get_but_scale_unit(but, 1.0), but->block->unit->system, unit_type >> 16); return (BPY_button_exec(C, str_unit_convert, value, TRUE) != -1); } @@ -1718,28 +1718,28 @@ static int ui_set_but_string_eval_num_unit(bContext *C, uiBut *but, const char * int ui_set_but_string_eval_num(bContext *C, uiBut *but, const char *str, double *value) { - int ok= FALSE; + int ok = FALSE; #ifdef WITH_PYTHON if (str[0] != '\0') { - int is_unit_but= ui_is_but_unit(but); + int is_unit_but = ui_is_but_unit(but); /* only enable verbose if we won't run again with units */ - if (BPY_button_exec(C, str, value, is_unit_but==FALSE) != -1) { + if (BPY_button_exec(C, str, value, is_unit_but == FALSE) != -1) { /* if the value parsed ok without unit conversion this button may still need a unit multiplier */ if (is_unit_but) { char str_new[128]; BLI_snprintf(str_new, sizeof(str_new), "%f", *value); - ok= ui_set_but_string_eval_num_unit(C, but, str_new, value); + ok = ui_set_but_string_eval_num_unit(C, but, str_new, value); } else { - ok= TRUE; /* parse normal string via py (no unit conversion needed) */ + ok = TRUE; /* parse normal string via py (no unit conversion needed) */ } } else if (is_unit_but) { /* parse failed, this is a unit but so run replacements and parse again */ - ok= ui_set_but_string_eval_num_unit(C, but, str, value); + ok = ui_set_but_string_eval_num_unit(C, but, str, value); } } @@ -1763,7 +1763,7 @@ int ui_set_but_string(bContext *C, uiBut *but, const char *str) if (RNA_property_editable(&but->rnapoin, but->rnaprop)) { PropertyType type; - type= RNA_property_type(but->rnaprop); + type = RNA_property_type(but->rnaprop); if (type == PROP_STRING) { /* RNA string */ @@ -1780,8 +1780,8 @@ int ui_set_but_string(bContext *C, uiBut *but, const char *str) return 1; } else { - ptr= but->rnasearchpoin; - prop= but->rnasearchprop; + ptr = but->rnasearchpoin; + prop = but->rnasearchprop; if (prop && RNA_property_collection_lookup_string(&ptr, prop, str, &rptr)) RNA_property_pointer_set(&but->rnapoin, but->rnaprop, rptr); @@ -1801,7 +1801,7 @@ int ui_set_but_string(bContext *C, uiBut *but, const char *str) else if (but->type == TEX) { /* string */ if (ui_is_but_utf8(but)) BLI_strncpy_utf8(but->poin, str, but->hardmax); - else BLI_strncpy(but->poin, str, but->hardmax); + else BLI_strncpy(but->poin, str, but->hardmax); return 1; } @@ -1814,9 +1814,9 @@ int ui_set_but_string(bContext *C, uiBut *but, const char *str) /* driver expression */ return 1; } - else if (str[0]=='#') { + else if (str[0] == '#') { /* shortcut to create new driver expression (versus immediate Py-execution) */ - return ui_but_anim_expression_create(but, str+1); + return ui_but_anim_expression_create(but, str + 1); } else { /* number editing */ @@ -1826,12 +1826,12 @@ int ui_set_but_string(bContext *C, uiBut *but, const char *str) return 0; } - if (!ui_is_but_float(but)) value= (int)floor(value + 0.5); - if (but->type==NUMABS) value= fabs(value); + if (!ui_is_but_float(but)) value = (int)floor(value + 0.5); + if (but->type == NUMABS) value = fabs(value); /* not that we use hard limits here */ - if (value < (double)but->hardmin) value= but->hardmin; - if (value > (double)but->hardmax) value= but->hardmax; + if (value < (double)but->hardmin) value = but->hardmin; + if (value > (double)but->hardmax) value = but->hardmax; ui_set_but_val(but, value); return 1; @@ -1853,12 +1853,12 @@ void ui_set_but_default(bContext *C, short all) static double soft_range_round_up(double value, double max) { /* round up to .., 0.1, 0.2, 0.5, 1, 2, 5, 10, 20, 50, .. */ - double newmax= pow(10.0, ceil(log(value)/M_LN10)); + double newmax = pow(10.0, ceil(log(value) / M_LN10)); - if (newmax*0.2 >= max && newmax*0.2 >= value) - return newmax*0.2; - else if (newmax*0.5 >= max && newmax*0.5 >= value) - return newmax*0.5; + if (newmax * 0.2 >= max && newmax * 0.2 >= value) + return newmax * 0.2; + else if (newmax * 0.5 >= max && newmax * 0.5 >= value) + return newmax * 0.5; else return newmax; } @@ -1866,12 +1866,12 @@ static double soft_range_round_up(double value, double max) static double soft_range_round_down(double value, double max) { /* round down to .., 0.1, 0.2, 0.5, 1, 2, 5, 10, 20, 50, .. */ - double newmax= pow(10.0, floor(log(value)/M_LN10)); + double newmax = pow(10.0, floor(log(value) / M_LN10)); - if (newmax*5.0 <= max && newmax*5.0 <= value) - return newmax*5.0; - else if (newmax*2.0 <= max && newmax*2.0 <= value) - return newmax*2.0; + if (newmax * 5.0 <= max && newmax * 5.0 <= value) + return newmax * 5.0; + else if (newmax * 2.0 <= max && newmax * 2.0 <= value) + return newmax * 2.0; else return newmax; } @@ -1883,72 +1883,72 @@ void ui_set_but_soft_range(uiBut *but, double value) * which isn't so bad. */ if (but->rnaprop) { - const PropertyType type= RNA_property_type(but->rnaprop); + const PropertyType type = RNA_property_type(but->rnaprop); double softmin, softmax /*, step, precision*/; - double value_min= value; - double value_max= value; + double value_min = value; + double value_max = value; /* clamp button range to something reasonable in case * we get -inf/inf from RNA properties */ if (type == PROP_INT) { int imin, imax, istep; - const int array_len= RNA_property_array_length(&but->rnapoin, but->rnaprop); + const int array_len = RNA_property_array_length(&but->rnapoin, but->rnaprop); RNA_property_int_ui_range(&but->rnapoin, but->rnaprop, &imin, &imax, &istep); - softmin= (imin == INT_MIN)? -1e4: imin; - softmax= (imin == INT_MAX)? 1e4: imax; + softmin = (imin == INT_MIN) ? -1e4 : imin; + softmax = (imin == INT_MAX) ? 1e4 : imax; /*step= istep;*/ /*UNUSED*/ /*precision= 1;*/ /*UNUSED*/ if (array_len >= 2) { int value_range[2]; RNA_property_int_get_array_range(&but->rnapoin, but->rnaprop, value_range); - value_min= (double)value_range[0]; - value_max= (double)value_range[1]; + value_min = (double)value_range[0]; + value_max = (double)value_range[1]; } } else if (type == PROP_FLOAT) { float fmin, fmax, fstep, fprecision; - const int array_len= RNA_property_array_length(&but->rnapoin, but->rnaprop); + const int array_len = RNA_property_array_length(&but->rnapoin, but->rnaprop); RNA_property_float_ui_range(&but->rnapoin, but->rnaprop, &fmin, &fmax, &fstep, &fprecision); - softmin= (fmin == -FLT_MAX)? (float)-1e4: fmin; - softmax= (fmax == FLT_MAX)? (float)1e4: fmax; + softmin = (fmin == -FLT_MAX) ? (float)-1e4 : fmin; + softmax = (fmax == FLT_MAX) ? (float)1e4 : fmax; /*step= fstep;*/ /*UNUSED*/ /*precision= fprecision;*/ /*UNUSED*/ if (array_len >= 2) { float value_range[2]; RNA_property_float_get_array_range(&but->rnapoin, but->rnaprop, value_range); - value_min= (double)value_range[0]; - value_max= (double)value_range[1]; + value_min = (double)value_range[0]; + value_max = (double)value_range[1]; } } else return; /* if the value goes out of the soft/max range, adapt the range */ - if (value_min+1e-10 < softmin) { + if (value_min + 1e-10 < softmin) { if (value_min < 0.0) - softmin= -soft_range_round_up(-value_min, -softmin); + softmin = -soft_range_round_up(-value_min, -softmin); else - softmin= soft_range_round_down(value_min, softmin); + softmin = soft_range_round_down(value_min, softmin); if (softmin < (double)but->hardmin) - softmin= (double)but->hardmin; + softmin = (double)but->hardmin; } - if (value_max-1e-10 > softmax) { + if (value_max - 1e-10 > softmax) { if (value_max < 0.0) - softmax= -soft_range_round_down(-value_max, -softmax); + softmax = -soft_range_round_down(-value_max, -softmax); else - softmax= soft_range_round_up(value_max, softmax); + softmax = soft_range_round_up(value_max, softmax); if (softmax > (double)but->hardmax) - softmax= but->hardmax; + softmax = but->hardmax; } - but->softmin= softmin; - but->softmax= softmax; + but->softmin = softmin; + but->softmax = softmax; } } @@ -2004,7 +2004,7 @@ void uiFreeBlock(const bContext *C, uiBlock *block) { uiBut *but; - while ( (but= block->buttons.first) ) { + while ( (but = block->buttons.first) ) { BLI_remlink(&block->buttons, but); ui_free_but(C, but); } @@ -2029,7 +2029,7 @@ void uiFreeBlocks(const bContext *C, ListBase *lb) { uiBlock *block; - while ( (block= lb->first) ) { + while ( (block = lb->first) ) { BLI_remlink(lb, block); uiFreeBlock(C, block); } @@ -2039,8 +2039,8 @@ void uiFreeInactiveBlocks(const bContext *C, ListBase *lb) { uiBlock *block, *nextblock; - for (block=lb->first; block; block=nextblock) { - nextblock= block->next; + for (block = lb->first; block; block = nextblock) { + nextblock = block->next; if (!block->handle) { if (!block->active) { @@ -2048,31 +2048,31 @@ void uiFreeInactiveBlocks(const bContext *C, ListBase *lb) uiFreeBlock(C, block); } else - block->active= 0; + block->active = 0; } } } void uiBlockSetRegion(uiBlock *block, ARegion *region) { - ListBase *lb= ®ion->uiblocks; - uiBlock *oldblock= NULL; + ListBase *lb = ®ion->uiblocks; + uiBlock *oldblock = NULL; /* each listbase only has one block with this name, free block * if is already there so it can be rebuilt from scratch */ if (lb) { - oldblock= BLI_findstring(lb, block->name, offsetof(uiBlock, name)); + oldblock = BLI_findstring(lb, block->name, offsetof(uiBlock, name)); if (oldblock) { - oldblock->active= 0; - oldblock->panel= NULL; + oldblock->active = 0; + oldblock->panel = NULL; } /* at the beginning of the list! for dynamical menus/blocks */ BLI_addhead(lb, block); } - block->oldblock= oldblock; + block->oldblock = oldblock; } uiBlock *uiBeginBlock(const bContext *C, ARegion *region, const char *name, short dt) @@ -2082,19 +2082,19 @@ uiBlock *uiBeginBlock(const bContext *C, ARegion *region, const char *name, shor Scene *scn; int getsizex, getsizey; - window= CTX_wm_window(C); + window = CTX_wm_window(C); scn = CTX_data_scene(C); - block= MEM_callocN(sizeof(uiBlock), "uiBlock"); - block->active= 1; - block->dt= dt; - block->evil_C= (void*)C; // XXX + block = MEM_callocN(sizeof(uiBlock), "uiBlock"); + block->active = 1; + block->dt = dt; + block->evil_C = (void *)C; // XXX if (scn) { - block->color_profile= (scn->r.color_mgt_flag & R_COLOR_MANAGEMENT); + block->color_profile = (scn->r.color_mgt_flag & R_COLOR_MANAGEMENT); /* copy to avoid crash when scene gets deleted with ui still open */ - block->unit= MEM_mallocN(sizeof(scn->unit), "UI UnitSettings"); + block->unit = MEM_mallocN(sizeof(scn->unit), "UI UnitSettings"); memcpy(block->unit, &scn->unit, sizeof(scn->unit)); } @@ -2110,7 +2110,7 @@ uiBlock *uiBeginBlock(const bContext *C, ARegion *region, const char *name, shor /* TODO - investigate why block->winmat[0][0] is negative * in the image view when viewRedrawForce is called */ - block->aspect= 2.0/fabs( (getsizex)*block->winmat[0][0]); + block->aspect = 2.0 / fabs( (getsizex) * block->winmat[0][0]); } else { /* no subwindow created yet, for menus for example, so we @@ -2119,8 +2119,8 @@ uiBlock *uiBeginBlock(const bContext *C, ARegion *region, const char *name, shor wm_subwindow_getmatrix(window, window->screen->mainwin, block->winmat); wm_subwindow_getsize(window, window->screen->mainwin, &getsizex, &getsizey); - block->aspect= 2.0/fabs(getsizex*block->winmat[0][0]); - block->auto_open= TRUE; + block->aspect = 2.0 / fabs(getsizex * block->winmat[0][0]); + block->auto_open = TRUE; block->flag |= UI_BLOCK_LOOP; /* tag as menu */ } @@ -2134,13 +2134,13 @@ uiBlock *uiGetBlock(const char *name, ARegion *ar) void uiBlockSetEmboss(uiBlock *block, char dt) { - block->dt= dt; + block->dt = dt; } void ui_check_but(uiBut *but) { /* if something changed in the button */ - double value= UI_BUT_VALUE_UNSET; + double value = UI_BUT_VALUE_UNSET; // float okwidth; // UNUSED ui_is_but_sel(but, &value); @@ -2152,7 +2152,7 @@ void ui_check_but(uiBut *but) } /* test for min and max, icon sliders, etc */ - switch( but->type ) { + switch (but->type) { case NUM: case SLI: case SCROLL: @@ -2167,7 +2167,7 @@ void ui_check_but(uiBut *but) { double value_abs; UI_GET_BUT_VALUE_INIT(but, value) - value_abs= fabs(value); + value_abs = fabs(value); if (value_abs < (double)but->hardmin) ui_set_but_val(but, but->hardmin); else if (value_abs > (double)but->hardmax) ui_set_but_val(but, but->hardmax); break; @@ -2175,22 +2175,22 @@ void ui_check_but(uiBut *but) case ICONTOG: case ICONTOGN: if (!but->rnaprop || (RNA_property_flag(but->rnaprop) & PROP_ICONS_CONSECUTIVE)) { - if (but->flag & UI_SELECT) but->iconadd= 1; - else but->iconadd= 0; + if (but->flag & UI_SELECT) but->iconadd = 1; + else but->iconadd = 0; } break; case ICONROW: if (!but->rnaprop || (RNA_property_flag(but->rnaprop) & PROP_ICONS_CONSECUTIVE)) { UI_GET_BUT_VALUE_INIT(but, value) - but->iconadd= (int)value- (int)(but->hardmin); + but->iconadd = (int)value - (int)(but->hardmin); } break; case ICONTEXTROW: if (!but->rnaprop || (RNA_property_flag(but->rnaprop) & PROP_ICONS_CONSECUTIVE)) { UI_GET_BUT_VALUE_INIT(but, value) - but->iconadd= (int)value- (int)(but->hardmin); + but->iconadd = (int)value - (int)(but->hardmin); } break; } @@ -2200,125 +2200,125 @@ void ui_check_but(uiBut *but) // okwidth= -4 + (but->x2 - but->x1); // UNUSED /* name: */ - switch( but->type ) { + switch (but->type) { - case MENU: - case ICONTEXTROW: + case MENU: + case ICONTEXTROW: - if (but->x2 - but->x1 > 24) { - UI_GET_BUT_VALUE_INIT(but, value) - ui_set_name_menu(but, (int)value); - } - break; + if (but->x2 - but->x1 > 24) { + UI_GET_BUT_VALUE_INIT(but, value) + ui_set_name_menu(but, (int)value); + } + break; - case NUM: - case NUMSLI: - case HSVSLI: - case NUMABS: + case NUM: + case NUMSLI: + case HSVSLI: + case NUMABS: - UI_GET_BUT_VALUE_INIT(but, value) + UI_GET_BUT_VALUE_INIT(but, value) - if (ui_is_but_float(but)) { - if (value == (double) FLT_MAX) BLI_snprintf(but->drawstr, sizeof(but->drawstr), "%sinf", but->str); - else if (value == (double) -FLT_MAX) BLI_snprintf(but->drawstr, sizeof(but->drawstr), "%s-inf", but->str); - /* support length type buttons */ - else if (ui_is_but_unit(but)) { - char new_str[sizeof(but->drawstr)]; - ui_get_but_string_unit(but, new_str, sizeof(new_str), value, TRUE); - BLI_snprintf(but->drawstr, sizeof(but->drawstr), "%s%s", but->str, new_str); + if (ui_is_but_float(but)) { + if (value == (double) FLT_MAX) BLI_snprintf(but->drawstr, sizeof(but->drawstr), "%sinf", but->str); + else if (value == (double) -FLT_MAX) BLI_snprintf(but->drawstr, sizeof(but->drawstr), "%s-inf", but->str); + /* support length type buttons */ + else if (ui_is_but_unit(but)) { + char new_str[sizeof(but->drawstr)]; + ui_get_but_string_unit(but, new_str, sizeof(new_str), value, TRUE); + BLI_snprintf(but->drawstr, sizeof(but->drawstr), "%s%s", but->str, new_str); + } + else { + const int prec = ui_but_float_precision(but, value); + BLI_snprintf(but->drawstr, sizeof(but->drawstr), "%s%.*f", but->str, prec, value); + } } else { - const int prec= ui_but_float_precision(but, value); - BLI_snprintf(but->drawstr, sizeof(but->drawstr), "%s%.*f", but->str, prec, value); + BLI_snprintf(but->drawstr, sizeof(but->drawstr), "%s%d", but->str, (int)value); } - } - else { - BLI_snprintf(but->drawstr, sizeof(but->drawstr), "%s%d", but->str, (int)value); - } - if (but->rnaprop) { - PropertySubType pstype = RNA_property_subtype(but->rnaprop); + if (but->rnaprop) { + PropertySubType pstype = RNA_property_subtype(but->rnaprop); - if (pstype == PROP_PERCENTAGE) - strcat(but->drawstr, "%"); - } - break; + if (pstype == PROP_PERCENTAGE) + strcat(but->drawstr, "%"); + } + break; - case LABEL: - if (ui_is_but_float(but)) { - int prec; - UI_GET_BUT_VALUE_INIT(but, value) - prec= ui_but_float_precision(but, value); - BLI_snprintf(but->drawstr, sizeof(but->drawstr), "%s%.*f", but->str, prec, value); - } - else { - BLI_strncpy(but->drawstr, but->str, UI_MAX_DRAW_STR); - } + case LABEL: + if (ui_is_but_float(but)) { + int prec; + UI_GET_BUT_VALUE_INIT(but, value) + prec = ui_but_float_precision(but, value); + BLI_snprintf(but->drawstr, sizeof(but->drawstr), "%s%.*f", but->str, prec, value); + } + else { + BLI_strncpy(but->drawstr, but->str, UI_MAX_DRAW_STR); + } - break; + break; - case IDPOIN: - case TEX: - case SEARCH_MENU: - if (!but->editstr) { - char str[UI_MAX_DRAW_STR]; + case IDPOIN: + case TEX: + case SEARCH_MENU: + if (!but->editstr) { + char str[UI_MAX_DRAW_STR]; - ui_get_but_string(but, str, UI_MAX_DRAW_STR-strlen(but->str)); + ui_get_but_string(but, str, UI_MAX_DRAW_STR - strlen(but->str)); - BLI_snprintf(but->drawstr, sizeof(but->drawstr), "%s%s", but->str, str); - } - break; + BLI_snprintf(but->drawstr, sizeof(but->drawstr), "%s%s", but->str, str); + } + break; - case KEYEVT: - BLI_strncpy(but->drawstr, but->str, UI_MAX_DRAW_STR); - if (but->flag & UI_SELECT) { - strcat(but->drawstr, "Press a key"); - } - else { - UI_GET_BUT_VALUE_INIT(but, value) - strcat(but->drawstr, WM_key_event_string((short)value)); - } - break; + case KEYEVT: + BLI_strncpy(but->drawstr, but->str, UI_MAX_DRAW_STR); + if (but->flag & UI_SELECT) { + strcat(but->drawstr, "Press a key"); + } + else { + UI_GET_BUT_VALUE_INIT(but, value) + strcat(but->drawstr, WM_key_event_string((short)value)); + } + break; - case HOTKEYEVT: - if (but->flag & UI_SELECT) { - but->drawstr[0]= '\0'; - - if (but->modifier_key) { - char *str= but->drawstr; - - if (but->modifier_key & KM_SHIFT) - str= strcat(str, "Shift "); - if (but->modifier_key & KM_CTRL) - str= strcat(str, "Ctrl "); - if (but->modifier_key & KM_ALT) - str= strcat(str, "Alt "); - if (but->modifier_key & KM_OSKEY) - str= strcat(str, "Cmd "); - - (void)str; /* UNUSED */ + case HOTKEYEVT: + if (but->flag & UI_SELECT) { + but->drawstr[0] = '\0'; + + if (but->modifier_key) { + char *str = but->drawstr; + + if (but->modifier_key & KM_SHIFT) + str = strcat(str, "Shift "); + if (but->modifier_key & KM_CTRL) + str = strcat(str, "Ctrl "); + if (but->modifier_key & KM_ALT) + str = strcat(str, "Alt "); + if (but->modifier_key & KM_OSKEY) + str = strcat(str, "Cmd "); + + (void)str; /* UNUSED */ + } + else + strcat(but->drawstr, "Press a key "); } else - strcat(but->drawstr, "Press a key "); - } - else - BLI_strncpy(but->drawstr, but->str, UI_MAX_DRAW_STR); + BLI_strncpy(but->drawstr, but->str, UI_MAX_DRAW_STR); + + break; - break; + case BUT_TOGDUAL: + /* trying to get the dual-icon to left of text... not very nice */ + if (but->str[0]) { + BLI_strncpy(but->drawstr, " ", UI_MAX_DRAW_STR); + BLI_strncpy(but->drawstr + 2, but->str, UI_MAX_DRAW_STR - 2); + } + break; - case BUT_TOGDUAL: - /* trying to get the dual-icon to left of text... not very nice */ - if (but->str[0]) { - BLI_strncpy(but->drawstr, " ", UI_MAX_DRAW_STR); - BLI_strncpy(but->drawstr+2, but->str, UI_MAX_DRAW_STR-2); - } - break; - - case HSVCUBE: - case HSVCIRCLE: - break; - default: - BLI_strncpy(but->drawstr, but->str, UI_MAX_DRAW_STR); + case HSVCUBE: + case HSVCIRCLE: + break; + default: + BLI_strncpy(but->drawstr, but->str, UI_MAX_DRAW_STR); } @@ -2345,8 +2345,8 @@ static int buts_are_horiz(uiBut *but1, uiBut *but2) { float dx, dy; - dx= fabs( but1->x2 - but2->x1); - dy= fabs( but1->y1 - but2->y2); + dx = fabs(but1->x2 - but2->x1); + dy = fabs(but1->y1 - but2->y2); if (dx > dy) return 0; return 1; @@ -2354,7 +2354,7 @@ static int buts_are_horiz(uiBut *but1, uiBut *but2) void uiBlockEndAlign(uiBlock *block) { - block->flag &= ~UI_BUT_ALIGN; // all 4 flags + block->flag &= ~UI_BUT_ALIGN; // all 4 flags } int ui_but_can_align(uiBut *but) @@ -2364,12 +2364,12 @@ int ui_but_can_align(uiBut *but) static void ui_block_do_align_but(uiBut *first, short nr) { - uiBut *prev, *but=NULL, *next; - int flag= 0, cols=0, rows=0; + uiBut *prev, *but = NULL, *next; + int flag = 0, cols = 0, rows = 0; /* auto align */ - for (but=first; but && but->alignnr == nr; but=but->next) { + for (but = first; but && but->alignnr == nr; but = but->next) { if (but->next && but->next->alignnr == nr) { if (buts_are_horiz(but, but->next)) cols++; else rows++; @@ -2379,60 +2379,60 @@ static void ui_block_do_align_but(uiBut *first, short nr) /* rows==0: 1 row, cols==0: 1 column */ /* note; how it uses 'flag' in loop below (either set it, or OR it) is confusing */ - for (but=first, prev=NULL; but && but->alignnr == nr; prev=but, but=but->next) { - next= but->next; + for (but = first, prev = NULL; but && but->alignnr == nr; prev = but, but = but->next) { + next = but->next; if (next && next->alignnr != nr) - next= NULL; + next = NULL; /* clear old flag */ but->flag &= ~UI_BUT_ALIGN; - if (flag==0) { /* first case */ + if (flag == 0) { /* first case */ if (next) { if (buts_are_horiz(but, next)) { - if (rows==0) - flag= UI_BUT_ALIGN_RIGHT; + if (rows == 0) + flag = UI_BUT_ALIGN_RIGHT; else - flag= UI_BUT_ALIGN_DOWN|UI_BUT_ALIGN_RIGHT; + flag = UI_BUT_ALIGN_DOWN | UI_BUT_ALIGN_RIGHT; } else { - flag= UI_BUT_ALIGN_DOWN; + flag = UI_BUT_ALIGN_DOWN; } } } - else if (next==NULL) { /* last case */ + else if (next == NULL) { /* last case */ if (prev) { if (buts_are_horiz(prev, but)) { - if (rows==0) - flag= UI_BUT_ALIGN_LEFT; + if (rows == 0) + flag = UI_BUT_ALIGN_LEFT; else - flag= UI_BUT_ALIGN_TOP|UI_BUT_ALIGN_LEFT; + flag = UI_BUT_ALIGN_TOP | UI_BUT_ALIGN_LEFT; } - else flag= UI_BUT_ALIGN_TOP; + else flag = UI_BUT_ALIGN_TOP; } } else if (buts_are_horiz(but, next)) { /* check if this is already second row */ - if ( prev && buts_are_horiz(prev, but)==0) { + if (prev && buts_are_horiz(prev, but) == 0) { flag &= ~UI_BUT_ALIGN_LEFT; flag |= UI_BUT_ALIGN_TOP; /* exception case: bottom row */ - if (rows>0) { - uiBut *bt= but; + if (rows > 0) { + uiBut *bt = but; while (bt && bt->alignnr == nr) { - if (bt->next && bt->next->alignnr == nr && buts_are_horiz(bt, bt->next)==0 ) break; - bt= bt->next; + if (bt->next && bt->next->alignnr == nr && buts_are_horiz(bt, bt->next) == 0) break; + bt = bt->next; } - if (bt==NULL || bt->alignnr != nr) flag= UI_BUT_ALIGN_TOP|UI_BUT_ALIGN_RIGHT; + if (bt == NULL || bt->alignnr != nr) flag = UI_BUT_ALIGN_TOP | UI_BUT_ALIGN_RIGHT; } } else flag |= UI_BUT_ALIGN_LEFT; } else { - if (cols==0) { + if (cols == 0) { flag |= UI_BUT_ALIGN_TOP; } - else { /* next button switches to new row */ + else { /* next button switches to new row */ if (prev && buts_are_horiz(prev, but)) flag |= UI_BUT_ALIGN_LEFT; @@ -2441,13 +2441,13 @@ static void ui_block_do_align_but(uiBut *first, short nr) flag |= UI_BUT_ALIGN_TOP; } - if ( (flag & UI_BUT_ALIGN_TOP)==0) { /* stil top row */ + if ( (flag & UI_BUT_ALIGN_TOP) == 0) { /* stil top row */ if (prev) { if (next && buts_are_horiz(but, next)) - flag = UI_BUT_ALIGN_DOWN|UI_BUT_ALIGN_LEFT|UI_BUT_ALIGN_RIGHT; + flag = UI_BUT_ALIGN_DOWN | UI_BUT_ALIGN_LEFT | UI_BUT_ALIGN_RIGHT; else { /* last button in top row */ - flag = UI_BUT_ALIGN_DOWN|UI_BUT_ALIGN_LEFT; + flag = UI_BUT_ALIGN_DOWN | UI_BUT_ALIGN_LEFT; } } else @@ -2463,33 +2463,33 @@ static void ui_block_do_align_but(uiBut *first, short nr) /* merge coordinates */ if (prev) { // simple cases - if (rows==0) { - but->x1= (prev->x2+but->x1)/2.0f; - prev->x2= but->x1; + if (rows == 0) { + but->x1 = (prev->x2 + but->x1) / 2.0f; + prev->x2 = but->x1; } - else if (cols==0) { - but->y2= (prev->y1+but->y2)/2.0f; - prev->y1= but->y2; + else if (cols == 0) { + but->y2 = (prev->y1 + but->y2) / 2.0f; + prev->y1 = but->y2; } else { if (buts_are_horiz(prev, but)) { - but->x1= (prev->x2+but->x1)/2.0f; - prev->x2= but->x1; + but->x1 = (prev->x2 + but->x1) / 2.0f; + prev->x2 = but->x1; /* copy height too */ - but->y2= prev->y2; + but->y2 = prev->y2; } - else if (prev->prev && buts_are_horiz(prev->prev, prev)==0) { + else if (prev->prev && buts_are_horiz(prev->prev, prev) == 0) { /* the previous button is a single one in its row */ - but->y2= (prev->y1+but->y2)/2.0f; - prev->y1= but->y2; + but->y2 = (prev->y1 + but->y2) / 2.0f; + prev->y1 = but->y2; - but->x1= prev->x1; - if (next && buts_are_horiz(but, next)==0) - but->x2= prev->x2; + but->x1 = prev->x1; + if (next && buts_are_horiz(but, next) == 0) + but->x2 = prev->x2; } else { /* the previous button is not a single one in its row */ - but->y2= prev->y1; + but->y2 = prev->y1; } } } @@ -2502,19 +2502,19 @@ void ui_block_do_align(uiBlock *block) short nr; /* align buttons with same align nr */ - for (but=block->buttons.first; but;) { + for (but = block->buttons.first; but; ) { if (but->alignnr) { - nr= but->alignnr; + nr = but->alignnr; ui_block_do_align_but(but, nr); /* skip with same number */ - for (; but && but->alignnr == nr; but=but->next); + for (; but && but->alignnr == nr; but = but->next) ; if (!but) break; } else - but= but->next; + but = but->next; } } @@ -2531,76 +2531,76 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, const char *str, uiBut *but; int slen; - if (type & BUTPOIN) { /* a pointer is required */ - if (poin==NULL) + if (type & BUTPOIN) { /* a pointer is required */ + if (poin == NULL) return NULL; } - but= MEM_callocN(sizeof(uiBut), "uiBut"); + but = MEM_callocN(sizeof(uiBut), "uiBut"); - but->type= type & BUTTYPE; - but->pointype= type & BUTPOIN; - but->bit= type & BIT; - but->bitnr= type & 31; + but->type = type & BUTTYPE; + but->pointype = type & BUTPOIN; + but->bit = type & BIT; + but->bitnr = type & 31; but->icon = ICON_NONE; - but->iconadd=0; + but->iconadd = 0; - but->retval= retval; + but->retval = retval; - slen= strlen(str); - if (slen >= UI_MAX_NAME_STR-1) { - but->str= MEM_mallocN(slen+2, "ui_def_but str"); /* why +2 ? */ + slen = strlen(str); + if (slen >= UI_MAX_NAME_STR - 1) { + but->str = MEM_mallocN(slen + 2, "ui_def_but str"); /* why +2 ? */ } else { - but->str= but->strdata; + but->str = but->strdata; } - memcpy(but->str, str, slen+1); + memcpy(but->str, str, slen + 1); - but->x1= x1; - but->y1= y1; - but->x2= (x1+x2); - but->y2= (y1+y2); - - but->poin= poin; - but->hardmin= but->softmin= min; - but->hardmax= but->softmax= max; - but->a1= a1; - but->a2= a2; - but->tip= tip; - - but->lock= block->lock; - but->lockstr= block->lockstr; - but->dt= block->dt; + but->x1 = x1; + but->y1 = y1; + but->x2 = (x1 + x2); + but->y2 = (y1 + y2); + + but->poin = poin; + but->hardmin = but->softmin = min; + but->hardmax = but->softmax = max; + but->a1 = a1; + but->a2 = a2; + but->tip = tip; - but->aspect= 1.0f; //XXX block->aspect; - but->block= block; // pointer back, used for frontbuffer status, and picker + but->lock = block->lock; + but->lockstr = block->lockstr; + but->dt = block->dt; + + but->aspect = 1.0f; //XXX block->aspect; + but->block = block; // pointer back, used for frontbuffer status, and picker if ((block->flag & UI_BUT_ALIGN) && ui_but_can_align(but)) - but->alignnr= block->alignnr; + but->alignnr = block->alignnr; - but->func= block->func; - but->func_arg1= block->func_arg1; - but->func_arg2= block->func_arg2; + but->func = block->func; + but->func_arg1 = block->func_arg1; + but->func_arg2 = block->func_arg2; - but->funcN= block->funcN; + but->funcN = block->funcN; if (block->func_argN) - but->func_argN= MEM_dupallocN(block->func_argN); + but->func_argN = MEM_dupallocN(block->func_argN); - but->pos= -1; /* cursor invisible */ + but->pos = -1; /* cursor invisible */ - if (ELEM4(but->type, NUM, NUMABS, NUMSLI, HSVSLI)) { /* add a space to name */ + if (ELEM4(but->type, NUM, NUMABS, NUMSLI, HSVSLI)) { /* add a space to name */ /* slen remains unchanged from previous assignment, ensure this stays true */ - if (slen>0 && slenstr[slen-1]!=' ') { - but->str[slen]= ' '; - but->str[slen+1]= 0; + if (slen > 0 && slen < UI_MAX_NAME_STR - 2) { + if (but->str[slen - 1] != ' ') { + but->str[slen] = ' '; + but->str[slen + 1] = 0; } } } if ((block->flag & UI_BLOCK_LOOP) || ELEM8(but->type, MENU, TEX, LABEL, IDPOIN, BLOCK, BUTM, SEARCH_MENU, PROGRESSBAR)) - but->flag |= (UI_TEXT_LEFT|UI_ICON_LEFT); - else if (but->type==BUT_TOGDUAL) + but->flag |= (UI_TEXT_LEFT | UI_ICON_LEFT); + else if (but->type == BUT_TOGDUAL) but->flag |= UI_ICON_LEFT; but->flag |= (block->flag & UI_BUT_ALIGN); @@ -2612,9 +2612,9 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, const char *str, } /* keep track of UI_interface.h */ - if (ELEM7(but->type, BLOCK, BUT, LABEL, PULLDOWN, ROUNDBOX, LISTBOX, BUTM)); - else if (ELEM3(but->type, SCROLL, SEPR, FTPREVIEW)); - else if (but->type >= SEARCH_MENU); + if (ELEM7(but->type, BLOCK, BUT, LABEL, PULLDOWN, ROUNDBOX, LISTBOX, BUTM)) ; + else if (ELEM3(but->type, SCROLL, SEPR, FTPREVIEW)) ; + else if (but->type >= SEARCH_MENU) ; else but->flag |= UI_BUT_UNDO; BLI_addtail(&block->buttons, but); @@ -2641,16 +2641,16 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, const char *str, */ #define UI_DEF_BUT_RNA_DISABLE(but) \ - but->flag |= UI_BUT_DISABLED; \ - but->lock = 1; \ - but->lockstr = "" + but->flag |= UI_BUT_DISABLED; \ + but->lock = 1; \ + but->lockstr = "" static uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, PointerRNA *ptr, PropertyRNA *prop, int index, float min, float max, float a1, float a2, const char *tip) { - const PropertyType proptype= RNA_property_type(prop); + const PropertyType proptype = RNA_property_type(prop); uiBut *but; - int freestr= 0, icon= 0; + int freestr = 0, icon = 0; /* use rna values if parameters are not specified */ if (!str) { @@ -2660,11 +2660,11 @@ static uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, const char *s int i, totitem, value, free; RNA_property_enum_items_gettexted(block->evil_C, ptr, prop, &item, &totitem, &free); - value= RNA_property_enum_get(ptr, prop); + value = RNA_property_enum_get(ptr, prop); - dynstr= BLI_dynstr_new(); + dynstr = BLI_dynstr_new(); BLI_dynstr_appendf(dynstr, "%s%%t", RNA_property_ui_name(prop)); - for (i=0; ievil_C, ptr, prop, &item, &totitem, &free); - for (i=0; irnapoin= *ptr; - but->rnaprop= prop; + but->rnapoin = *ptr; + but->rnaprop = prop; if (RNA_property_array_length(&but->rnapoin, but->rnaprop)) - but->rnaindex= index; + but->rnaindex = index; else - but->rnaindex= 0; + but->rnaindex = 0; if (icon) { - but->icon= (BIFIconID)icon; + but->icon = (BIFIconID)icon; but->flag |= UI_HAS_ICON; - but->flag|= UI_ICON_LEFT; + but->flag |= UI_ICON_LEFT; } if (!RNA_property_editable(&but->rnapoin, prop)) { @@ -2782,7 +2782,7 @@ static uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, const char *s /* If this button uses units, calculate the step from this */ if ((proptype == PROP_FLOAT) && ui_is_but_unit(but)) { - but->a1= ui_get_but_step_unit(but, but->a1); + but->a1 = ui_get_but_step_unit(but, but->a1); } if (freestr) { @@ -2794,14 +2794,14 @@ static uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, const char *s static uiBut *ui_def_but_rna_propname(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, PointerRNA *ptr, const char *propname, int index, float min, float max, float a1, float a2, const char *tip) { - PropertyRNA *prop= RNA_struct_find_property(ptr, propname); + PropertyRNA *prop = RNA_struct_find_property(ptr, propname); uiBut *but; if (prop) { - but= ui_def_but_rna(block, type, retval, str, x1, y1, x2, y2, ptr, prop, index, min, max, a1, a2, tip); + but = ui_def_but_rna(block, type, retval, str, x1, y1, x2, y2, ptr, prop, index, min, max, a1, a2, tip); } else { - but= ui_def_but(block, type, retval, propname, x1, y1, x2, y2, NULL, min, max, a1, a2, tip); + but = ui_def_but(block, type, retval, propname, x1, y1, x2, y2, NULL, min, max, a1, a2, tip); UI_DEF_BUT_RNA_DISABLE(but); } @@ -2820,13 +2820,13 @@ static uiBut *ui_def_but_operator_ptr(uiBlock *block, int type, wmOperatorType * str = ""; } - if ((!tip || tip[0]=='\0') && ot && ot->srna) { + if ((!tip || tip[0] == '\0') && ot && ot->srna) { tip = RNA_struct_ui_description(ot->srna); } - but= ui_def_but(block, type, -1, str, x1, y1, x2, y2, NULL, 0, 0, 0, 0, tip); - but->optype= ot; - but->opcontext= opcontext; + but = ui_def_but(block, type, -1, str, x1, y1, x2, y2, NULL, 0, 0, 0, 0, tip); + but->optype = ot; + but->opcontext = opcontext; but->flag &= ~UI_BUT_UNDO; /* no need for ui_but_is_undo(), we never need undo here */ if (!ot) { @@ -2839,7 +2839,7 @@ static uiBut *ui_def_but_operator_ptr(uiBlock *block, int type, wmOperatorType * } #if 0 /* UNUSED */ -static uiBut *UNUSED_FUNCTION(ui_def_but_operator)(uiBlock *block, int type, const char *opname, int opcontext, const char *str, int x1, int y1, short x2, short y2, const char *tip) +static uiBut *UNUSED_FUNCTION(ui_def_but_operator) (uiBlock * block, int type, const char *opname, int opcontext, const char *str, int x1, int y1, short x2, short y2, const char *tip) { wmOperatorType *ot = WM_operatortype_find(opname, 0); if (str == NULL && ot == NULL) str = opname; @@ -2852,20 +2852,20 @@ static uiBut *ui_def_but_operator_text(uiBlock *block, int type, const char *opn uiBut *but; wmOperatorType *ot; - ot= WM_operatortype_find(opname, 0); + ot = WM_operatortype_find(opname, 0); if (!str) { - if (ot) str= ot->name; - else str= opname; + if (ot) str = ot->name; + else str = opname; } - if ((!tip || tip[0]=='\0') && ot && ot->description) { - tip= ot->description; + if ((!tip || tip[0] == '\0') && ot && ot->description) { + tip = ot->description; } - but= ui_def_but(block, type, -1, str, x1, y1, x2, y2, poin, min, max, a1, a2, tip); - but->optype= ot; - but->opcontext= opcontext; + but = ui_def_but(block, type, -1, str, x1, y1, x2, y2, poin, min, max, a1, a2, tip); + but->optype = ot; + but->opcontext = opcontext; but->flag &= ~UI_BUT_UNDO; /* no need for ui_but_is_undo(), we never need undo here */ if (!ot) { @@ -2879,30 +2879,30 @@ static uiBut *ui_def_but_operator_text(uiBlock *block, int type, const char *opn uiBut *uiDefBut(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip) { - uiBut *but= ui_def_but(block, type, retval, str, x1, y1, x2, y2, poin, min, max, a1, a2, tip); + uiBut *but = ui_def_but(block, type, retval, str, x1, y1, x2, y2, poin, min, max, a1, a2, tip); ui_check_but(but); return but; } - /* if _x_ is a power of two (only one bit) return the power, - * otherwise return -1. - * (1<>=16; - if (x&0xFF00) idx+=8, x>>=8; - if (x&0xF0) idx+=4, x>>=4; - if (x&0xC) idx+=2, x>>=2; - if (x&0x2) idx+=1; + if (x & 0xFFFF0000) idx += 16, x >>= 16; + if (x & 0xFF00) idx += 8, x >>= 8; + if (x & 0xF0) idx += 4, x >>= 4; + if (x & 0xC) idx += 2, x >>= 2; + if (x & 0x2) idx += 1; return idx; } @@ -2919,38 +2919,38 @@ AutoComplete *autocomplete_begin(const char *startname, size_t maxlen) { AutoComplete *autocpl; - autocpl= MEM_callocN(sizeof(AutoComplete), "AutoComplete"); - autocpl->maxlen= maxlen; - autocpl->truncate= MEM_callocN(sizeof(char)*maxlen, "AutoCompleteTruncate"); - autocpl->startname= startname; + autocpl = MEM_callocN(sizeof(AutoComplete), "AutoComplete"); + autocpl->maxlen = maxlen; + autocpl->truncate = MEM_callocN(sizeof(char) * maxlen, "AutoCompleteTruncate"); + autocpl->startname = startname; return autocpl; } void autocomplete_do_name(AutoComplete *autocpl, const char *name) { - char *truncate= autocpl->truncate; - const char *startname= autocpl->startname; + char *truncate = autocpl->truncate; + const char *startname = autocpl->startname; int a; - for (a=0; amaxlen-1; a++) { - if (startname[a]==0 || startname[a]!=name[a]) + for (a = 0; a < autocpl->maxlen - 1; a++) { + if (startname[a] == 0 || startname[a] != name[a]) break; } /* found a match */ - if (startname[a]==0) { + if (startname[a] == 0) { /* first match */ - if (truncate[0]==0) + if (truncate[0] == 0) BLI_strncpy(truncate, name, autocpl->maxlen); else { /* remove from truncate what is not in bone->name */ - for (a=0; amaxlen-1; a++) { + for (a = 0; a < autocpl->maxlen - 1; a++) { if (name[a] == 0) { - truncate[a]= 0; + truncate[a] = 0; break; } - else if (truncate[a]!=name[a]) - truncate[a]= 0; + else if (truncate[a] != name[a]) + truncate[a] = 0; } } } @@ -2971,18 +2971,18 @@ void autocomplete_end(AutoComplete *autocpl, char *autoname) /* autocomplete callback for ID buttons */ static void autocomplete_id(bContext *C, char *str, void *arg_v) { - int blocktype= (intptr_t)arg_v; - ListBase *listb= which_libbase(CTX_data_main(C), blocktype); + int blocktype = (intptr_t)arg_v; + ListBase *listb = which_libbase(CTX_data_main(C), blocktype); - if (listb==NULL) return; + if (listb == NULL) return; /* search if str matches the beginning of an ID struct */ if (str[0]) { - AutoComplete *autocpl= autocomplete_begin(str, MAX_ID_NAME-2); + AutoComplete *autocpl = autocomplete_begin(str, MAX_ID_NAME - 2); ID *id; - for (id= listb->first; id; id= id->next) - autocomplete_do_name(autocpl, id->name+2); + for (id = listb->first; id; id = id->next) + autocomplete_do_name(autocpl, id->name + 2); autocomplete_end(autocpl, str); } @@ -2991,8 +2991,8 @@ static void autocomplete_id(bContext *C, char *str, void *arg_v) static void ui_check_but_and_iconize(uiBut *but, int icon) { if (icon) { - but->icon= (BIFIconID) icon; - but->flag|= UI_HAS_ICON; + but->icon = (BIFIconID) icon; + but->flag |= UI_HAS_ICON; } ui_check_but(but); @@ -3000,57 +3000,57 @@ static void ui_check_but_and_iconize(uiBut *but, int icon) static uiBut *uiDefButBit(uiBlock *block, int type, int bit, int retval, const char *str, int x1, int y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip) { - int bitIdx= findBitIndex(bit); - if (bitIdx==-1) { + int bitIdx = findBitIndex(bit); + if (bitIdx == -1) { return NULL; } else { - return uiDefBut(block, type|BIT|bitIdx, retval, str, x1, y1, x2, y2, poin, min, max, a1, a2, tip); + return uiDefBut(block, type | BIT | bitIdx, retval, str, x1, y1, x2, y2, poin, min, max, a1, a2, tip); } } uiBut *uiDefButF(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip) { - return uiDefBut(block, type|FLO, retval, str, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); + return uiDefBut(block, type | FLO, retval, str, x1, y1, x2, y2, (void *) poin, min, max, a1, a2, tip); } uiBut *uiDefButBitF(uiBlock *block, int type, int bit, int retval, const char *str, int x1, int y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip) { - return uiDefButBit(block, type|FLO, bit, retval, str, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); + return uiDefButBit(block, type | FLO, bit, retval, str, x1, y1, x2, y2, (void *) poin, min, max, a1, a2, tip); } uiBut *uiDefButI(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip) { - return uiDefBut(block, type|INT, retval, str, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); + return uiDefBut(block, type | INT, retval, str, x1, y1, x2, y2, (void *) poin, min, max, a1, a2, tip); } uiBut *uiDefButBitI(uiBlock *block, int type, int bit, int retval, const char *str, int x1, int y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip) { - return uiDefButBit(block, type|INT, bit, retval, str, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); + return uiDefButBit(block, type | INT, bit, retval, str, x1, y1, x2, y2, (void *) poin, min, max, a1, a2, tip); } uiBut *uiDefButS(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, const char *tip) { - return uiDefBut(block, type|SHO, retval, str, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); + return uiDefBut(block, type | SHO, retval, str, x1, y1, x2, y2, (void *) poin, min, max, a1, a2, tip); } uiBut *uiDefButBitS(uiBlock *block, int type, int bit, int retval, const char *str, int x1, int y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, const char *tip) { - return uiDefButBit(block, type|SHO, bit, retval, str, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); + return uiDefButBit(block, type | SHO, bit, retval, str, x1, y1, x2, y2, (void *) poin, min, max, a1, a2, tip); } uiBut *uiDefButC(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, const char *tip) { - return uiDefBut(block, type|CHA, retval, str, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); + return uiDefBut(block, type | CHA, retval, str, x1, y1, x2, y2, (void *) poin, min, max, a1, a2, tip); } uiBut *uiDefButBitC(uiBlock *block, int type, int bit, int retval, const char *str, int x1, int y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, const char *tip) { - return uiDefButBit(block, type|CHA, bit, retval, str, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); + return uiDefButBit(block, type | CHA, bit, retval, str, x1, y1, x2, y2, (void *) poin, min, max, a1, a2, tip); } uiBut *uiDefButR(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, PointerRNA *ptr, const char *propname, int index, float min, float max, float a1, float a2, const char *tip) { uiBut *but; - but= ui_def_but_rna_propname(block, type, retval, str, x1, y1, x2, y2, ptr, propname, index, min, max, a1, a2, tip); + but = ui_def_but_rna_propname(block, type, retval, str, x1, y1, x2, y2, ptr, propname, index, min, max, a1, a2, tip); ui_check_but(but); return but; } uiBut *uiDefButR_prop(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, PointerRNA *ptr, PropertyRNA *prop, int index, float min, float max, float a1, float a2, const char *tip) { uiBut *but; - but= ui_def_but_rna(block, type, retval, str, x1, y1, x2, y2, ptr, prop, index, min, max, a1, a2, tip); + but = ui_def_but_rna(block, type, retval, str, x1, y1, x2, y2, ptr, prop, index, min, max, a1, a2, tip); ui_check_but(but); return but; } @@ -3058,7 +3058,7 @@ uiBut *uiDefButR_prop(uiBlock *block, int type, int retval, const char *str, int uiBut *uiDefButO_ptr(uiBlock *block, int type, wmOperatorType *ot, int opcontext, const char *str, int x1, int y1, short x2, short y2, const char *tip) { uiBut *but; - but= ui_def_but_operator_ptr(block, type, ot, opcontext, str, x1, y1, x2, y2, tip); + but = ui_def_but_operator_ptr(block, type, ot, opcontext, str, x1, y1, x2, y2, tip); ui_check_but(but); return but; } @@ -3071,7 +3071,7 @@ uiBut *uiDefButO(uiBlock *block, int type, const char *opname, int opcontext, co uiBut *uiDefButTextO(uiBlock *block, int type, const char *opname, int opcontext, const char *str, int x1, int y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip) { - uiBut *but= ui_def_but_operator_text(block, type, opname, opcontext, str, x1, y1, x2, y2, poin, min, max, a1, a2, tip); + uiBut *but = ui_def_but_operator_text(block, type, opname, opcontext, str, x1, y1, x2, y2, poin, min, max, a1, a2, tip); ui_check_but(but); return but; } @@ -3079,64 +3079,64 @@ uiBut *uiDefButTextO(uiBlock *block, int type, const char *opname, int opcontext /* if a1==1.0 then a2 is an extra icon blending factor (alpha 0.0 - 1.0) */ uiBut *uiDefIconBut(uiBlock *block, int type, int retval, int icon, int x1, int y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip) { - uiBut *but= ui_def_but(block, type, retval, "", x1, y1, x2, y2, poin, min, max, a1, a2, tip); + uiBut *but = ui_def_but(block, type, retval, "", x1, y1, x2, y2, poin, min, max, a1, a2, tip); ui_check_but_and_iconize(but, icon); return but; } static uiBut *uiDefIconButBit(uiBlock *block, int type, int bit, int retval, int icon, int x1, int y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip) { - int bitIdx= findBitIndex(bit); - if (bitIdx==-1) { + int bitIdx = findBitIndex(bit); + if (bitIdx == -1) { return NULL; } else { - return uiDefIconBut(block, type|BIT|bitIdx, retval, icon, x1, y1, x2, y2, poin, min, max, a1, a2, tip); + return uiDefIconBut(block, type | BIT | bitIdx, retval, icon, x1, y1, x2, y2, poin, min, max, a1, a2, tip); } } uiBut *uiDefIconButF(uiBlock *block, int type, int retval, int icon, int x1, int y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip) { - return uiDefIconBut(block, type|FLO, retval, icon, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); + return uiDefIconBut(block, type | FLO, retval, icon, x1, y1, x2, y2, (void *) poin, min, max, a1, a2, tip); } uiBut *uiDefIconButBitF(uiBlock *block, int type, int bit, int retval, int icon, int x1, int y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip) { - return uiDefIconButBit(block, type|FLO, bit, retval, icon, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); + return uiDefIconButBit(block, type | FLO, bit, retval, icon, x1, y1, x2, y2, (void *) poin, min, max, a1, a2, tip); } uiBut *uiDefIconButI(uiBlock *block, int type, int retval, int icon, int x1, int y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip) { - return uiDefIconBut(block, type|INT, retval, icon, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); + return uiDefIconBut(block, type | INT, retval, icon, x1, y1, x2, y2, (void *) poin, min, max, a1, a2, tip); } uiBut *uiDefIconButBitI(uiBlock *block, int type, int bit, int retval, int icon, int x1, int y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip) { - return uiDefIconButBit(block, type|INT, bit, retval, icon, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); + return uiDefIconButBit(block, type | INT, bit, retval, icon, x1, y1, x2, y2, (void *) poin, min, max, a1, a2, tip); } uiBut *uiDefIconButS(uiBlock *block, int type, int retval, int icon, int x1, int y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, const char *tip) { - return uiDefIconBut(block, type|SHO, retval, icon, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); + return uiDefIconBut(block, type | SHO, retval, icon, x1, y1, x2, y2, (void *) poin, min, max, a1, a2, tip); } uiBut *uiDefIconButBitS(uiBlock *block, int type, int bit, int retval, int icon, int x1, int y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, const char *tip) { - return uiDefIconButBit(block, type|SHO, bit, retval, icon, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); + return uiDefIconButBit(block, type | SHO, bit, retval, icon, x1, y1, x2, y2, (void *) poin, min, max, a1, a2, tip); } uiBut *uiDefIconButC(uiBlock *block, int type, int retval, int icon, int x1, int y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, const char *tip) { - return uiDefIconBut(block, type|CHA, retval, icon, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); + return uiDefIconBut(block, type | CHA, retval, icon, x1, y1, x2, y2, (void *) poin, min, max, a1, a2, tip); } uiBut *uiDefIconButBitC(uiBlock *block, int type, int bit, int retval, int icon, int x1, int y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, const char *tip) { - return uiDefIconButBit(block, type|CHA, bit, retval, icon, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); + return uiDefIconButBit(block, type | CHA, bit, retval, icon, x1, y1, x2, y2, (void *) poin, min, max, a1, a2, tip); } uiBut *uiDefIconButR(uiBlock *block, int type, int retval, int icon, int x1, int y1, short x2, short y2, PointerRNA *ptr, const char *propname, int index, float min, float max, float a1, float a2, const char *tip) { uiBut *but; - but= ui_def_but_rna_propname(block, type, retval, "", x1, y1, x2, y2, ptr, propname, index, min, max, a1, a2, tip); + but = ui_def_but_rna_propname(block, type, retval, "", x1, y1, x2, y2, ptr, propname, index, min, max, a1, a2, tip); ui_check_but_and_iconize(but, icon); return but; } uiBut *uiDefIconButR_prop(uiBlock *block, int type, int retval, int icon, int x1, int y1, short x2, short y2, PointerRNA *ptr, PropertyRNA *prop, int index, float min, float max, float a1, float a2, const char *tip) { uiBut *but; - but= ui_def_but_rna(block, type, retval, "", x1, y1, x2, y2, ptr, prop, index, min, max, a1, a2, tip); + but = ui_def_but_rna(block, type, retval, "", x1, y1, x2, y2, ptr, prop, index, min, max, a1, a2, tip); ui_check_but_and_iconize(but, icon); return but; } @@ -3144,7 +3144,7 @@ uiBut *uiDefIconButR_prop(uiBlock *block, int type, int retval, int icon, int x1 uiBut *uiDefIconButO_ptr(uiBlock *block, int type, wmOperatorType *ot, int opcontext, int icon, int x1, int y1, short x2, short y2, const char *tip) { uiBut *but; - but= ui_def_but_operator_ptr(block, type, ot, opcontext, "", x1, y1, x2, y2, tip); + but = ui_def_but_operator_ptr(block, type, ot, opcontext, "", x1, y1, x2, y2, tip); ui_check_but_and_iconize(but, icon); return but; } @@ -3157,76 +3157,76 @@ uiBut *uiDefIconButO(uiBlock *block, int type, const char *opname, int opcontext /* Button containing both string label and icon */ uiBut *uiDefIconTextBut(uiBlock *block, int type, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip) { - uiBut *but= ui_def_but(block, type, retval, str, x1, y1, x2, y2, poin, min, max, a1, a2, tip); + uiBut *but = ui_def_but(block, type, retval, str, x1, y1, x2, y2, poin, min, max, a1, a2, tip); ui_check_but_and_iconize(but, icon); - but->flag|= UI_ICON_LEFT; + but->flag |= UI_ICON_LEFT; return but; } static uiBut *uiDefIconTextButBit(uiBlock *block, int type, int bit, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip) { - int bitIdx= findBitIndex(bit); - if (bitIdx==-1) { + int bitIdx = findBitIndex(bit); + if (bitIdx == -1) { return NULL; } else { - return uiDefIconTextBut(block, type|BIT|bitIdx, retval, icon, str, x1, y1, x2, y2, poin, min, max, a1, a2, tip); + return uiDefIconTextBut(block, type | BIT | bitIdx, retval, icon, str, x1, y1, x2, y2, poin, min, max, a1, a2, tip); } } uiBut *uiDefIconTextButF(uiBlock *block, int type, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip) { - return uiDefIconTextBut(block, type|FLO, retval, icon, str, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); + return uiDefIconTextBut(block, type | FLO, retval, icon, str, x1, y1, x2, y2, (void *) poin, min, max, a1, a2, tip); } uiBut *uiDefIconTextButBitF(uiBlock *block, int type, int bit, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, float *poin, float min, float max, float a1, float a2, const char *tip) { - return uiDefIconTextButBit(block, type|FLO, bit, retval, icon, str, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); + return uiDefIconTextButBit(block, type | FLO, bit, retval, icon, str, x1, y1, x2, y2, (void *) poin, min, max, a1, a2, tip); } uiBut *uiDefIconTextButI(uiBlock *block, int type, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip) { - return uiDefIconTextBut(block, type|INT, retval, icon, str, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); + return uiDefIconTextBut(block, type | INT, retval, icon, str, x1, y1, x2, y2, (void *) poin, min, max, a1, a2, tip); } uiBut *uiDefIconTextButBitI(uiBlock *block, int type, int bit, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, int *poin, float min, float max, float a1, float a2, const char *tip) { - return uiDefIconTextButBit(block, type|INT, bit, retval, icon, str, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); + return uiDefIconTextButBit(block, type | INT, bit, retval, icon, str, x1, y1, x2, y2, (void *) poin, min, max, a1, a2, tip); } uiBut *uiDefIconTextButS(uiBlock *block, int type, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, const char *tip) { - return uiDefIconTextBut(block, type|SHO, retval, icon, str, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); + return uiDefIconTextBut(block, type | SHO, retval, icon, str, x1, y1, x2, y2, (void *) poin, min, max, a1, a2, tip); } uiBut *uiDefIconTextButBitS(uiBlock *block, int type, int bit, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, short *poin, float min, float max, float a1, float a2, const char *tip) { - return uiDefIconTextButBit(block, type|SHO, bit, retval, icon, str, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); + return uiDefIconTextButBit(block, type | SHO, bit, retval, icon, str, x1, y1, x2, y2, (void *) poin, min, max, a1, a2, tip); } uiBut *uiDefIconTextButC(uiBlock *block, int type, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, const char *tip) { - return uiDefIconTextBut(block, type|CHA, retval, icon, str, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); + return uiDefIconTextBut(block, type | CHA, retval, icon, str, x1, y1, x2, y2, (void *) poin, min, max, a1, a2, tip); } uiBut *uiDefIconTextButBitC(uiBlock *block, int type, int bit, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, char *poin, float min, float max, float a1, float a2, const char *tip) { - return uiDefIconTextButBit(block, type|CHA, bit, retval, icon, str, x1, y1, x2, y2, (void*) poin, min, max, a1, a2, tip); + return uiDefIconTextButBit(block, type | CHA, bit, retval, icon, str, x1, y1, x2, y2, (void *) poin, min, max, a1, a2, tip); } uiBut *uiDefIconTextButR(uiBlock *block, int type, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, PointerRNA *ptr, const char *propname, int index, float min, float max, float a1, float a2, const char *tip) { uiBut *but; - but= ui_def_but_rna_propname(block, type, retval, str, x1, y1, x2, y2, ptr, propname, index, min, max, a1, a2, tip); + but = ui_def_but_rna_propname(block, type, retval, str, x1, y1, x2, y2, ptr, propname, index, min, max, a1, a2, tip); ui_check_but_and_iconize(but, icon); - but->flag|= UI_ICON_LEFT; + but->flag |= UI_ICON_LEFT; return but; } uiBut *uiDefIconTextButR_prop(uiBlock *block, int type, int retval, int icon, const char *str, int x1, int y1, short x2, short y2, PointerRNA *ptr, PropertyRNA *prop, int index, float min, float max, float a1, float a2, const char *tip) { uiBut *but; - but= ui_def_but_rna(block, type, retval, str, x1, y1, x2, y2, ptr, prop, index, min, max, a1, a2, tip); + but = ui_def_but_rna(block, type, retval, str, x1, y1, x2, y2, ptr, prop, index, min, max, a1, a2, tip); ui_check_but_and_iconize(but, icon); - but->flag|= UI_ICON_LEFT; + but->flag |= UI_ICON_LEFT; return but; } uiBut *uiDefIconTextButO_ptr(uiBlock *block, int type, wmOperatorType *ot, int opcontext, int icon, const char *str, int x1, int y1, short x2, short y2, const char *tip) { uiBut *but; - but= ui_def_but_operator_ptr(block, type, ot, opcontext, str, x1, y1, x2, y2, tip); + but = ui_def_but_operator_ptr(block, type, ot, opcontext, str, x1, y1, x2, y2, tip); ui_check_but_and_iconize(but, icon); - but->flag|= UI_ICON_LEFT; + but->flag |= UI_ICON_LEFT; return but; } uiBut *uiDefIconTextButO(uiBlock *block, int type, const char *opname, int opcontext, int icon, const char *str, int x1, int y1, short x2, short y2, const char *tip) @@ -3241,13 +3241,13 @@ void uiSetButLink(uiBut *but, void **poin, void ***ppoin, short *tot, int from, { uiLink *link; - link= but->link= MEM_callocN(sizeof(uiLink), "new uilink"); + link = but->link = MEM_callocN(sizeof(uiLink), "new uilink"); - link->poin= poin; - link->ppoin= ppoin; - link->totlink= tot; - link->fromcode= from; - link->tocode= to; + link->poin = poin; + link->ppoin = ppoin; + link->totlink = tot; + link->fromcode = from; + link->tocode = to; } /* cruft to make uiBlock and uiBut private */ @@ -3255,18 +3255,18 @@ void uiSetButLink(uiBut *but, void **poin, void ***ppoin, short *tot, int from, int uiBlocksGetYMin(ListBase *lb) { uiBlock *block; - int min= 0; + int min = 0; - for (block= lb->first; block; block= block->next) - if (block==lb->first || block->minyminy; + for (block = lb->first; block; block = block->next) + if (block == lb->first || block->miny < min) + min = block->miny; return min; } void uiBlockSetDirection(uiBlock *block, int direction) { - block->direction= direction; + block->direction = direction; } /* this call escapes if there's alignment flags */ @@ -3274,62 +3274,62 @@ void uiBlockFlipOrder(uiBlock *block) { ListBase lb; uiBut *but, *next; - float centy, miny=10000, maxy= -10000; + float centy, miny = 10000, maxy = -10000; if (U.uiflag & USER_MENUFIXEDORDER) return; else if (block->flag & UI_BLOCK_NO_FLIP) return; - for (but= block->buttons.first; but; but= but->next) { + for (but = block->buttons.first; but; but = but->next) { if (but->flag & UI_BUT_ALIGN) return; - if (but->y1 < miny) miny= but->y1; - if (but->y2 > maxy) maxy= but->y2; + if (but->y1 < miny) miny = but->y1; + if (but->y2 > maxy) maxy = but->y2; } /* mirror trick */ - centy= (miny+maxy)/2.0f; - for (but= block->buttons.first; but; but= but->next) { - but->y1 = centy-(but->y1-centy); - but->y2 = centy-(but->y2-centy); + centy = (miny + maxy) / 2.0f; + for (but = block->buttons.first; but; but = but->next) { + but->y1 = centy - (but->y1 - centy); + but->y2 = centy - (but->y2 - centy); SWAP(float, but->y1, but->y2); } /* also flip order in block itself, for example for arrowkey */ - lb.first= lb.last= NULL; - but= block->buttons.first; + lb.first = lb.last = NULL; + but = block->buttons.first; while (but) { - next= but->next; + next = but->next; BLI_remlink(&block->buttons, but); BLI_addtail(&lb, but); - but= next; + but = next; } - block->buttons= lb; + block->buttons = lb; } void uiBlockSetFlag(uiBlock *block, int flag) { - block->flag|= flag; + block->flag |= flag; } void uiBlockClearFlag(uiBlock *block, int flag) { - block->flag&= ~flag; + block->flag &= ~flag; } void uiBlockSetXOfs(uiBlock *block, int xofs) { - block->xofs= xofs; + block->xofs = xofs; } void uiButSetFlag(uiBut *but, int flag) { - but->flag|= flag; + but->flag |= flag; } void uiButClearFlag(uiBut *but, int flag) { - but->flag&= ~flag; + but->flag &= ~flag; } int uiButGetRetVal(uiBut *but) @@ -3339,47 +3339,47 @@ int uiButGetRetVal(uiBut *but) void uiButSetDragID(uiBut *but, ID *id) { - but->dragtype= WM_DRAG_ID; - but->dragpoin= (void *)id; + but->dragtype = WM_DRAG_ID; + but->dragpoin = (void *)id; } void uiButSetDragRNA(uiBut *but, PointerRNA *ptr) { - but->dragtype= WM_DRAG_RNA; - but->dragpoin= (void *)ptr; + but->dragtype = WM_DRAG_RNA; + but->dragpoin = (void *)ptr; } void uiButSetDragPath(uiBut *but, const char *path) { - but->dragtype= WM_DRAG_PATH; - but->dragpoin= (void *)path; + but->dragtype = WM_DRAG_PATH; + but->dragpoin = (void *)path; } void uiButSetDragName(uiBut *but, const char *name) { - but->dragtype= WM_DRAG_NAME; - but->dragpoin= (void *)name; + but->dragtype = WM_DRAG_NAME; + but->dragpoin = (void *)name; } /* value from button itself */ void uiButSetDragValue(uiBut *but) { - but->dragtype= WM_DRAG_VALUE; + but->dragtype = WM_DRAG_VALUE; } void uiButSetDragImage(uiBut *but, const char *path, int icon, struct ImBuf *imb, float scale) { - but->dragtype= WM_DRAG_PATH; - but->icon= icon; /* no flag UI_HAS_ICON, so icon doesnt draw in button */ - but->dragpoin= (void *)path; - but->imb= imb; - but->imb_scale= scale; + but->dragtype = WM_DRAG_PATH; + but->icon = icon; /* no flag UI_HAS_ICON, so icon doesnt draw in button */ + but->dragpoin = (void *)path; + but->imb = imb; + but->imb_scale = scale; } PointerRNA *uiButGetOperatorPtrRNA(uiBut *but) { if (but->optype && !but->opptr) { - but->opptr= MEM_callocN(sizeof(PointerRNA), "uiButOpPtr"); + but->opptr = MEM_callocN(sizeof(PointerRNA), "uiButOpPtr"); WM_operator_properties_create_ptr(but->opptr, but->optype); } @@ -3388,7 +3388,7 @@ PointerRNA *uiButGetOperatorPtrRNA(uiBut *but) void uiButSetUnitType(uiBut *but, const int unit_type) { - but->unit_type= (unsigned char)(unit_type>>16); + but->unit_type = (unsigned char)(unit_type >> 16); } int uiButGetUnitType(uiBut *but) @@ -3409,21 +3409,21 @@ int uiButGetUnitType(uiBut *but) void uiBlockSetHandleFunc(uiBlock *block, uiBlockHandleFunc func, void *arg) { - block->handle_func= func; - block->handle_func_arg= arg; + block->handle_func = func; + block->handle_func_arg = arg; } void uiBlockSetButmFunc(uiBlock *block, uiMenuHandleFunc func, void *arg) { - block->butm_func= func; - block->butm_func_arg= arg; + block->butm_func = func; + block->butm_func_arg = arg; } void uiBlockSetFunc(uiBlock *block, uiButHandleFunc func, void *arg1, void *arg2) { - block->func= func; - block->func_arg1= arg1; - block->func_arg2= arg2; + block->func = func; + block->func_arg1 = arg1; + block->func_arg2 = arg2; } void uiBlockSetNFunc(uiBlock *block, uiButHandleFunc func, void *argN, void *arg2) @@ -3432,29 +3432,29 @@ void uiBlockSetNFunc(uiBlock *block, uiButHandleFunc func, void *argN, void *arg MEM_freeN(block->func_argN); } - block->funcN= func; - block->func_argN= argN; - block->func_arg2= arg2; + block->funcN = func; + block->func_argN = argN; + block->func_arg2 = arg2; } void uiButSetRenameFunc(uiBut *but, uiButHandleRenameFunc func, void *arg1) { - but->rename_func= func; - but->rename_arg1= arg1; + but->rename_func = func; + but->rename_arg1 = arg1; } void uiBlockSetDrawExtraFunc(uiBlock *block, void (*func)(const bContext *C, void *idv, void *arg1, void *arg2, rcti *rect), void *arg1, void *arg2) { - block->drawextra= func; - block->drawextra_arg1= arg1; - block->drawextra_arg2= arg2; + block->drawextra = func; + block->drawextra_arg1 = arg1; + block->drawextra_arg2 = arg2; } void uiButSetFunc(uiBut *but, uiButHandleFunc func, void *arg1, void *arg2) { - but->func= func; - but->func_arg1= arg1; - but->func_arg2= arg2; + but->func = func; + but->func_arg1 = arg1; + but->func_arg2 = arg2; } void uiButSetNFunc(uiBut *but, uiButHandleNFunc funcN, void *argN, void *arg2) @@ -3463,22 +3463,22 @@ void uiButSetNFunc(uiBut *but, uiButHandleNFunc funcN, void *argN, void *arg2) MEM_freeN(but->func_argN); } - but->funcN= funcN; - but->func_argN= argN; - but->func_arg2= arg2; + but->funcN = funcN; + but->func_argN = argN; + but->func_arg2 = arg2; } void uiButSetCompleteFunc(uiBut *but, uiButCompleteFunc func, void *arg) { - but->autocomplete_func= func; - but->autofunc_arg= arg; + but->autocomplete_func = func; + but->autofunc_arg = arg; } uiBut *uiDefIDPoinBut(uiBlock *block, uiIDPoinFuncFP func, short blocktype, int retval, const char *str, int x1, int y1, short x2, short y2, void *idpp, const char *tip) { - uiBut *but= ui_def_but(block, IDPOIN, retval, str, x1, y1, x2, y2, NULL, 0.0, 0.0, 0.0, 0.0, tip); - but->idpoin_func= func; - but->idpoin_idpp= (ID**) idpp; + uiBut *but = ui_def_but(block, IDPOIN, retval, str, x1, y1, x2, y2, NULL, 0.0, 0.0, 0.0, 0.0, tip); + but->idpoin_func = func; + but->idpoin_idpp = (ID **) idpp; ui_check_but(but); if (blocktype) @@ -3489,20 +3489,20 @@ uiBut *uiDefIDPoinBut(uiBlock *block, uiIDPoinFuncFP func, short blocktype, int uiBut *uiDefBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, const char *str, int x1, int y1, short x2, short y2, const char *tip) { - uiBut *but= ui_def_but(block, BLOCK, 0, str, x1, y1, x2, y2, arg, 0.0, 0.0, 0.0, 0.0, tip); - but->block_create_func= func; + uiBut *but = ui_def_but(block, BLOCK, 0, str, x1, y1, x2, y2, arg, 0.0, 0.0, 0.0, 0.0, tip); + but->block_create_func = func; ui_check_but(but); return but; } uiBut *uiDefBlockButN(uiBlock *block, uiBlockCreateFunc func, void *argN, const char *str, int x1, int y1, short x2, short y2, const char *tip) { - uiBut *but= ui_def_but(block, BLOCK, 0, str, x1, y1, x2, y2, NULL, 0.0, 0.0, 0.0, 0.0, tip); - but->block_create_func= func; + uiBut *but = ui_def_but(block, BLOCK, 0, str, x1, y1, x2, y2, NULL, 0.0, 0.0, 0.0, 0.0, tip); + but->block_create_func = func; if (but->func_argN) { MEM_freeN(but->func_argN); } - but->func_argN= argN; + but->func_argN = argN; ui_check_but(but); return but; } @@ -3510,31 +3510,31 @@ uiBut *uiDefBlockButN(uiBlock *block, uiBlockCreateFunc func, void *argN, const uiBut *uiDefPulldownBut(uiBlock *block, uiBlockCreateFunc func, void *arg, const char *str, int x1, int y1, short x2, short y2, const char *tip) { - uiBut *but= ui_def_but(block, PULLDOWN, 0, str, x1, y1, x2, y2, arg, 0.0, 0.0, 0.0, 0.0, tip); - but->block_create_func= func; + uiBut *but = ui_def_but(block, PULLDOWN, 0, str, x1, y1, x2, y2, arg, 0.0, 0.0, 0.0, 0.0, tip); + but->block_create_func = func; ui_check_but(but); return but; } uiBut *uiDefMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, const char *str, int x1, int y1, short x2, short y2, const char *tip) { - uiBut *but= ui_def_but(block, PULLDOWN, 0, str, x1, y1, x2, y2, arg, 0.0, 0.0, 0.0, 0.0, tip); - but->menu_create_func= func; + uiBut *but = ui_def_but(block, PULLDOWN, 0, str, x1, y1, x2, y2, arg, 0.0, 0.0, 0.0, 0.0, tip); + but->menu_create_func = func; ui_check_but(but); return but; } uiBut *uiDefIconTextMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, const char *str, int x1, int y1, short x2, short y2, const char *tip) { - uiBut *but= ui_def_but(block, PULLDOWN, 0, str, x1, y1, x2, y2, arg, 0.0, 0.0, 0.0, 0.0, tip); + uiBut *but = ui_def_but(block, PULLDOWN, 0, str, x1, y1, x2, y2, arg, 0.0, 0.0, 0.0, 0.0, tip); - but->icon= (BIFIconID) icon; - but->flag|= UI_HAS_ICON; + but->icon = (BIFIconID) icon; + but->flag |= UI_HAS_ICON; - but->flag|= UI_ICON_LEFT; - but->flag|= UI_ICON_SUBMENU; + but->flag |= UI_ICON_LEFT; + but->flag |= UI_ICON_SUBMENU; - but->menu_create_func= func; + but->menu_create_func = func; ui_check_but(but); return but; @@ -3542,13 +3542,13 @@ uiBut *uiDefIconTextMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, in uiBut *uiDefIconMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, int x1, int y1, short x2, short y2, const char *tip) { - uiBut *but= ui_def_but(block, PULLDOWN, 0, "", x1, y1, x2, y2, arg, 0.0, 0.0, 0.0, 0.0, tip); + uiBut *but = ui_def_but(block, PULLDOWN, 0, "", x1, y1, x2, y2, arg, 0.0, 0.0, 0.0, 0.0, tip); - but->icon= (BIFIconID) icon; + but->icon = (BIFIconID) icon; but->flag |= UI_HAS_ICON; - but->flag &=~ UI_ICON_LEFT; + but->flag &= ~UI_ICON_LEFT; - but->menu_create_func= func; + but->menu_create_func = func; ui_check_but(but); return but; @@ -3557,17 +3557,17 @@ uiBut *uiDefIconMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, int ic /* Block button containing both string label and icon */ uiBut *uiDefIconTextBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, int icon, const char *str, int x1, int y1, short x2, short y2, const char *tip) { - uiBut *but= ui_def_but(block, BLOCK, 0, str, x1, y1, x2, y2, arg, 0.0, 0.0, 0.0, 0.0, tip); + uiBut *but = ui_def_but(block, BLOCK, 0, str, x1, y1, x2, y2, arg, 0.0, 0.0, 0.0, 0.0, tip); /* XXX temp, old menu calls pass on icon arrow, which is now UI_ICON_SUBMENU flag */ - if (icon!=ICON_RIGHTARROW_THIN) { - but->icon= (BIFIconID) icon; - but->flag|= UI_ICON_LEFT; + if (icon != ICON_RIGHTARROW_THIN) { + but->icon = (BIFIconID) icon; + but->flag |= UI_ICON_LEFT; } - but->flag|= UI_HAS_ICON; - but->flag|= UI_ICON_SUBMENU; + but->flag |= UI_HAS_ICON; + but->flag |= UI_ICON_SUBMENU; - but->block_create_func= func; + but->block_create_func = func; ui_check_but(but); return but; @@ -3576,14 +3576,14 @@ uiBut *uiDefIconTextBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, /* Block button containing icon */ uiBut *uiDefIconBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, int retval, int icon, int x1, int y1, short x2, short y2, const char *tip) { - uiBut *but= ui_def_but(block, BLOCK, retval, "", x1, y1, x2, y2, arg, 0.0, 0.0, 0.0, 0.0, tip); + uiBut *but = ui_def_but(block, BLOCK, retval, "", x1, y1, x2, y2, arg, 0.0, 0.0, 0.0, 0.0, tip); - but->icon= (BIFIconID) icon; - but->flag|= UI_HAS_ICON; + but->icon = (BIFIconID) icon; + but->flag |= UI_HAS_ICON; - but->flag|= UI_ICON_LEFT; + but->flag |= UI_ICON_LEFT; - but->block_create_func= func; + but->block_create_func = func; ui_check_but(but); return but; @@ -3591,7 +3591,7 @@ uiBut *uiDefIconBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, int uiBut *uiDefKeyevtButS(uiBlock *block, int retval, const char *str, int x1, int y1, short x2, short y2, short *spoin, const char *tip) { - uiBut *but= ui_def_but(block, KEYEVT|SHO, retval, str, x1, y1, x2, y2, spoin, 0.0, 0.0, 0.0, 0.0, tip); + uiBut *but = ui_def_but(block, KEYEVT | SHO, retval, str, x1, y1, x2, y2, spoin, 0.0, 0.0, 0.0, 0.0, tip); ui_check_but(but); return but; } @@ -3600,8 +3600,8 @@ uiBut *uiDefKeyevtButS(uiBlock *block, int retval, const char *str, int x1, int /* modkeypoin will be set to KM_SHIFT, KM_ALT, KM_CTRL, KM_OSKEY bits */ uiBut *uiDefHotKeyevtButS(uiBlock *block, int retval, const char *str, int x1, int y1, short x2, short y2, short *keypoin, short *modkeypoin, const char *tip) { - uiBut *but= ui_def_but(block, HOTKEYEVT|SHO, retval, str, x1, y1, x2, y2, keypoin, 0.0, 0.0, 0.0, 0.0, tip); - but->modifier_key= *modkeypoin; + uiBut *but = ui_def_but(block, HOTKEYEVT | SHO, retval, str, x1, y1, x2, y2, keypoin, 0.0, 0.0, 0.0, 0.0, tip); + but->modifier_key = *modkeypoin; ui_check_but(but); return but; } @@ -3611,12 +3611,12 @@ uiBut *uiDefHotKeyevtButS(uiBlock *block, int retval, const char *str, int x1, i /* here a1 and a2, if set, control thumbnail preview rows/cols */ uiBut *uiDefSearchBut(uiBlock *block, void *arg, int retval, int icon, int maxlen, int x1, int y1, short x2, short y2, float a1, float a2, const char *tip) { - uiBut *but= ui_def_but(block, SEARCH_MENU, retval, "", x1, y1, x2, y2, arg, 0.0, maxlen, a1, a2, tip); + uiBut *but = ui_def_but(block, SEARCH_MENU, retval, "", x1, y1, x2, y2, arg, 0.0, maxlen, a1, a2, tip); - but->icon= (BIFIconID) icon; - but->flag|= UI_HAS_ICON; + but->icon = (BIFIconID) icon; + but->flag |= UI_HAS_ICON; - but->flag|= UI_ICON_LEFT|UI_TEXT_LEFT; + but->flag |= UI_ICON_LEFT | UI_TEXT_LEFT; ui_check_but(but); @@ -3628,13 +3628,13 @@ uiBut *uiDefSearchBut(uiBlock *block, void *arg, int retval, int icon, int maxle /* if active set, button opens with this item visible and selected */ void uiButSetSearchFunc(uiBut *but, uiButSearchFunc sfunc, void *arg, uiButHandleFunc bfunc, void *active) { - but->search_func= sfunc; - but->search_arg= arg; + but->search_func = sfunc; + but->search_arg = arg; uiButSetFunc(but, bfunc, arg, active); /* search buttons show red-alert if item doesn't exist, not for menus */ - if (0==(but->block->flag & UI_BLOCK_LOOP)) { + if (0 == (but->block->flag & UI_BLOCK_LOOP)) { /* skip empty buttons, not all buttons need input, we only show invalid */ if (but->drawstr[0]) ui_but_search_test(but); @@ -3648,11 +3648,11 @@ void uiButSetFocusOnEnter(wmWindow *win, uiBut *but) { wmEvent event; - event= *(win->eventstate); - event.type= EVT_BUT_OPEN; - event.val= KM_PRESS; - event.customdata= but; - event.customdatafree= FALSE; + event = *(win->eventstate); + event.type = EVT_BUT_OPEN; + event.val = KM_PRESS; + event.customdata = but; + event.customdatafree = FALSE; wm_event_add(win, &event); } diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c index 9b48e956468..955d564e111 100644 --- a/source/blender/editors/interface/interface_anim.c +++ b/source/blender/editors/interface/interface_anim.c @@ -65,9 +65,9 @@ void ui_but_anim_flag(uiBut *but, float cfra) FCurve *fcu; int driven; - but->flag &= ~(UI_BUT_ANIMATED|UI_BUT_ANIMATED_KEY|UI_BUT_DRIVEN); + but->flag &= ~(UI_BUT_ANIMATED | UI_BUT_ANIMATED_KEY | UI_BUT_DRIVEN); - fcu= ui_but_get_fcurve(but, NULL, &driven); + fcu = ui_but_get_fcurve(but, NULL, &driven); if (fcu) { if (!driven) { @@ -88,10 +88,10 @@ int ui_but_anim_expression_get(uiBut *but, char *str, size_t maxlen) ChannelDriver *driver; int driven; - fcu= ui_but_get_fcurve(but, NULL, &driven); + fcu = ui_but_get_fcurve(but, NULL, &driven); if (fcu && driven) { - driver= fcu->driver; + driver = fcu->driver; if (driver && driver->type == DRIVER_TYPE_PYTHON) { BLI_strncpy(str, driver->expression, maxlen); @@ -108,15 +108,15 @@ int ui_but_anim_expression_set(uiBut *but, const char *str) ChannelDriver *driver; int driven; - fcu= ui_but_get_fcurve(but, NULL, &driven); + fcu = ui_but_get_fcurve(but, NULL, &driven); if (fcu && driven) { - driver= fcu->driver; + driver = fcu->driver; if (driver && driver->type == DRIVER_TYPE_PYTHON) { BLI_strncpy_utf8(driver->expression, str, sizeof(driver->expression)); driver->flag |= DRIVER_FLAG_RECOMPILE; - WM_event_add_notifier(but->block->evil_C, NC_ANIMATION|ND_KEYFRAME, NULL); + WM_event_add_notifier(but->block->evil_C, NC_ANIMATION | ND_KEYFRAME, NULL); return 1; } } @@ -131,7 +131,7 @@ int ui_but_anim_expression_create(uiBut *but, const char *str) ID *id; FCurve *fcu; char *path; - short ok=0; + short ok = 0; /* button must have RNA-pointer to a numeric-capable property */ if (ELEM(NULL, but->rnapoin.data, but->rnaprop)) { @@ -143,7 +143,7 @@ int ui_but_anim_expression_create(uiBut *but, const char *str) /* make sure we have animdata for this */ // FIXME: until materials can be handled by depsgraph, don't allow drivers to be created for them id = (ID *)but->rnapoin.id.data; - if ((id == NULL) || (GS(id->name)==ID_MA) || (GS(id->name)==ID_TE)) { + if ((id == NULL) || (GS(id->name) == ID_MA) || (GS(id->name) == ID_TE)) { if (G.f & G_DEBUG) printf("ERROR: create expression failed - invalid id-datablock for adding drivers (%p)\n", id); return 0; @@ -155,7 +155,7 @@ int ui_but_anim_expression_create(uiBut *but, const char *str) /* create driver */ fcu = verify_driver_fcurve(id, path, but->rnaindex, 1); if (fcu) { - ChannelDriver *driver= fcu->driver; + ChannelDriver *driver = fcu->driver; if (driver) { /* set type of driver */ @@ -167,7 +167,7 @@ int ui_but_anim_expression_create(uiBut *but, const char *str) /* updates */ driver->flag |= DRIVER_FLAG_RECOMPILE; - WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME, NULL); + WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME, NULL); } } @@ -183,10 +183,10 @@ void ui_but_anim_autokey(bContext *C, uiBut *but, Scene *scene, float cfra) FCurve *fcu; int driven; - fcu= ui_but_get_fcurve(but, &action, &driven); + fcu = ui_but_get_fcurve(but, &action, &driven); if (fcu && !driven) { - id= but->rnapoin.id.data; + id = but->rnapoin.id.data; // TODO: this should probably respect the keyingset only option for anim if (autokeyframe_cfra_can_key(scene, id)) { @@ -194,8 +194,8 @@ void ui_but_anim_autokey(bContext *C, uiBut *but, Scene *scene, float cfra) short flag = ANIM_get_keyframing_flags(scene, 1); fcu->flag &= ~FCURVE_SELECTED; - insert_keyframe(reports, id, action, ((fcu->grp)?(fcu->grp->name):(NULL)), fcu->rna_path, fcu->array_index, cfra, flag); - WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL); + insert_keyframe(reports, id, action, ((fcu->grp) ? (fcu->grp->name) : (NULL)), fcu->rna_path, fcu->array_index, cfra, flag); + WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL); } } } diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c index a2f253cecaf..91d3c890df3 100644 --- a/source/blender/editors/interface/interface_draw.c +++ b/source/blender/editors/interface/interface_draw.c @@ -58,16 +58,16 @@ /* own include */ #include "interface_intern.h" -#define UI_DISABLED_ALPHA_OFFS -160 +#define UI_DISABLED_ALPHA_OFFS -160 -static int roundboxtype= UI_CNR_ALL; +static int roundboxtype = UI_CNR_ALL; void uiSetRoundBox(int type) { /* Not sure the roundbox function is the best place to change this * if this is undone, its not that big a deal, only makes curves edges * square for the */ - roundboxtype= type; + roundboxtype = type; } @@ -78,54 +78,54 @@ int uiGetRoundBox(void) void uiDrawBox(int mode, float minx, float miny, float maxx, float maxy, float rad) { - float vec[7][2]= {{0.195, 0.02}, {0.383, 0.067}, {0.55, 0.169}, {0.707, 0.293}, - {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805}}; + float vec[7][2] = {{0.195, 0.02}, {0.383, 0.067}, {0.55, 0.169}, {0.707, 0.293}, + {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805}}; int a; /* mult */ - for (a=0; a<7; a++) { - vec[a][0]*= rad; vec[a][1]*= rad; + for (a = 0; a < 7; a++) { + vec[a][0] *= rad; vec[a][1] *= rad; } glBegin(mode); /* start with corner right-bottom */ if (roundboxtype & UI_CNR_BOTTOM_RIGHT) { - glVertex2f(maxx-rad, miny); - for (a=0; a<7; a++) { - glVertex2f(maxx-rad+vec[a][0], miny+vec[a][1]); + glVertex2f(maxx - rad, miny); + for (a = 0; a < 7; a++) { + glVertex2f(maxx - rad + vec[a][0], miny + vec[a][1]); } - glVertex2f(maxx, miny+rad); + glVertex2f(maxx, miny + rad); } else glVertex2f(maxx, miny); /* corner right-top */ if (roundboxtype & UI_CNR_TOP_RIGHT) { - glVertex2f(maxx, maxy-rad); - for (a=0; a<7; a++) { - glVertex2f(maxx-vec[a][1], maxy-rad+vec[a][0]); + glVertex2f(maxx, maxy - rad); + for (a = 0; a < 7; a++) { + glVertex2f(maxx - vec[a][1], maxy - rad + vec[a][0]); } - glVertex2f(maxx-rad, maxy); + glVertex2f(maxx - rad, maxy); } else glVertex2f(maxx, maxy); /* corner left-top */ if (roundboxtype & UI_CNR_TOP_LEFT) { - glVertex2f(minx+rad, maxy); - for (a=0; a<7; a++) { - glVertex2f(minx+rad-vec[a][0], maxy-vec[a][1]); + glVertex2f(minx + rad, maxy); + for (a = 0; a < 7; a++) { + glVertex2f(minx + rad - vec[a][0], maxy - vec[a][1]); } - glVertex2f(minx, maxy-rad); + glVertex2f(minx, maxy - rad); } else glVertex2f(minx, maxy); /* corner left-bottom */ if (roundboxtype & UI_CNR_BOTTOM_LEFT) { - glVertex2f(minx, miny+rad); - for (a=0; a<7; a++) { - glVertex2f(minx+vec[a][1], miny+rad-vec[a][0]); + glVertex2f(minx, miny + rad); + for (a = 0; a < 7; a++) { + glVertex2f(minx + vec[a][1], miny + rad - vec[a][0]); } - glVertex2f(minx+rad, miny); + glVertex2f(minx + rad, miny); } else glVertex2f(minx, miny); @@ -136,9 +136,9 @@ static void round_box_shade_col(const float col1[3], float const col2[3], const { float col[3]; - col[0]= (fac*col1[0] + (1.0f-fac)*col2[0]); - col[1]= (fac*col1[1] + (1.0f-fac)*col2[1]); - col[2]= (fac*col1[2] + (1.0f-fac)*col2[2]); + col[0] = (fac * col1[0] + (1.0f - fac) * col2[0]); + col[1] = (fac * col1[1] + (1.0f - fac) * col2[1]); + col[2] = (fac * col1[2] + (1.0f - fac) * col2[2]); glColor3fv(col); } @@ -146,27 +146,27 @@ static void round_box_shade_col(const float col1[3], float const col2[3], const /* view2d scrollers use it */ void uiDrawBoxShade(int mode, float minx, float miny, float maxx, float maxy, float rad, float shadetop, float shadedown) { - float vec[7][2]= {{0.195, 0.02}, {0.383, 0.067}, {0.55, 0.169}, {0.707, 0.293}, - {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805}}; - const float div= maxy - miny; - const float idiv= 1.0f / div; + float vec[7][2] = {{0.195, 0.02}, {0.383, 0.067}, {0.55, 0.169}, {0.707, 0.293}, + {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805}}; + const float div = maxy - miny; + const float idiv = 1.0f / div; float coltop[3], coldown[3], color[4]; int a; /* mult */ - for (a=0; a<7; a++) { - vec[a][0]*= rad; vec[a][1]*= rad; + for (a = 0; a < 7; a++) { + vec[a][0] *= rad; vec[a][1] *= rad; } /* get current color, needs to be outside of glBegin/End */ glGetFloatv(GL_CURRENT_COLOR, color); /* 'shade' defines strength of shading */ - coltop[0]= color[0]+shadetop; if (coltop[0]>1.0f) coltop[0]= 1.0f; - coltop[1]= color[1]+shadetop; if (coltop[1]>1.0f) coltop[1]= 1.0f; - coltop[2]= color[2]+shadetop; if (coltop[2]>1.0f) coltop[2]= 1.0f; - coldown[0]= color[0]+shadedown; if (coldown[0]<0.0f) coldown[0]= 0.0f; - coldown[1]= color[1]+shadedown; if (coldown[1]<0.0f) coldown[1]= 0.0f; - coldown[2]= color[2]+shadedown; if (coldown[2]<0.0f) coldown[2]= 0.0f; + coltop[0] = color[0] + shadetop; if (coltop[0] > 1.0f) coltop[0] = 1.0f; + coltop[1] = color[1] + shadetop; if (coltop[1] > 1.0f) coltop[1] = 1.0f; + coltop[2] = color[2] + shadetop; if (coltop[2] > 1.0f) coltop[2] = 1.0f; + coldown[0] = color[0] + shadedown; if (coldown[0] < 0.0f) coldown[0] = 0.0f; + coldown[1] = color[1] + shadedown; if (coldown[1] < 0.0f) coldown[1] = 0.0f; + coldown[2] = color[2] + shadedown; if (coldown[2] < 0.0f) coldown[2] = 0.0f; glShadeModel(GL_SMOOTH); glBegin(mode); @@ -175,15 +175,15 @@ void uiDrawBoxShade(int mode, float minx, float miny, float maxx, float maxy, fl if (roundboxtype & UI_CNR_BOTTOM_RIGHT) { round_box_shade_col(coltop, coldown, 0.0); - glVertex2f(maxx-rad, miny); + glVertex2f(maxx - rad, miny); - for (a=0; a<7; a++) { - round_box_shade_col(coltop, coldown, vec[a][1]*idiv); - glVertex2f(maxx-rad+vec[a][0], miny+vec[a][1]); + for (a = 0; a < 7; a++) { + round_box_shade_col(coltop, coldown, vec[a][1] * idiv); + glVertex2f(maxx - rad + vec[a][0], miny + vec[a][1]); } - round_box_shade_col(coltop, coldown, rad*idiv); - glVertex2f(maxx, miny+rad); + round_box_shade_col(coltop, coldown, rad * idiv); + glVertex2f(maxx, miny + rad); } else { round_box_shade_col(coltop, coldown, 0.0); @@ -193,15 +193,15 @@ void uiDrawBoxShade(int mode, float minx, float miny, float maxx, float maxy, fl /* corner right-top */ if (roundboxtype & UI_CNR_TOP_RIGHT) { - round_box_shade_col(coltop, coldown, (div-rad)*idiv); - glVertex2f(maxx, maxy-rad); + round_box_shade_col(coltop, coldown, (div - rad) * idiv); + glVertex2f(maxx, maxy - rad); - for (a=0; a<7; a++) { - round_box_shade_col(coltop, coldown, (div-rad+vec[a][1])*idiv); - glVertex2f(maxx-vec[a][1], maxy-rad+vec[a][0]); + for (a = 0; a < 7; a++) { + round_box_shade_col(coltop, coldown, (div - rad + vec[a][1]) * idiv); + glVertex2f(maxx - vec[a][1], maxy - rad + vec[a][0]); } round_box_shade_col(coltop, coldown, 1.0); - glVertex2f(maxx-rad, maxy); + glVertex2f(maxx - rad, maxy); } else { round_box_shade_col(coltop, coldown, 1.0); @@ -212,15 +212,15 @@ void uiDrawBoxShade(int mode, float minx, float miny, float maxx, float maxy, fl if (roundboxtype & UI_CNR_TOP_LEFT) { round_box_shade_col(coltop, coldown, 1.0); - glVertex2f(minx+rad, maxy); + glVertex2f(minx + rad, maxy); - for (a=0; a<7; a++) { - round_box_shade_col(coltop, coldown, (div-vec[a][1])*idiv); - glVertex2f(minx+rad-vec[a][0], maxy-vec[a][1]); + for (a = 0; a < 7; a++) { + round_box_shade_col(coltop, coldown, (div - vec[a][1]) * idiv); + glVertex2f(minx + rad - vec[a][0], maxy - vec[a][1]); } - round_box_shade_col(coltop, coldown, (div-rad)*idiv); - glVertex2f(minx, maxy-rad); + round_box_shade_col(coltop, coldown, (div - rad) * idiv); + glVertex2f(minx, maxy - rad); } else { round_box_shade_col(coltop, coldown, 1.0); @@ -230,16 +230,16 @@ void uiDrawBoxShade(int mode, float minx, float miny, float maxx, float maxy, fl /* corner left-bottom */ if (roundboxtype & UI_CNR_BOTTOM_LEFT) { - round_box_shade_col(coltop, coldown, rad*idiv); - glVertex2f(minx, miny+rad); + round_box_shade_col(coltop, coldown, rad * idiv); + glVertex2f(minx, miny + rad); - for (a=0; a<7; a++) { - round_box_shade_col(coltop, coldown, (rad-vec[a][1])*idiv); - glVertex2f(minx+vec[a][1], miny+rad-vec[a][0]); + for (a = 0; a < 7; a++) { + round_box_shade_col(coltop, coldown, (rad - vec[a][1]) * idiv); + glVertex2f(minx + vec[a][1], miny + rad - vec[a][0]); } round_box_shade_col(coltop, coldown, 0.0); - glVertex2f(minx+rad, miny); + glVertex2f(minx + rad, miny); } else { round_box_shade_col(coltop, coldown, 0.0); @@ -254,27 +254,27 @@ void uiDrawBoxShade(int mode, float minx, float miny, float maxx, float maxy, fl /* view2d scrollers use it */ void uiDrawBoxVerticalShade(int mode, float minx, float miny, float maxx, float maxy, float rad, float shadeLeft, float shadeRight) { - float vec[7][2]= {{0.195, 0.02}, {0.383, 0.067}, {0.55, 0.169}, {0.707, 0.293}, - {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805}}; - const float div= maxx - minx; - const float idiv= 1.0f / div; + float vec[7][2] = {{0.195, 0.02}, {0.383, 0.067}, {0.55, 0.169}, {0.707, 0.293}, + {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805}}; + const float div = maxx - minx; + const float idiv = 1.0f / div; float colLeft[3], colRight[3], color[4]; int a; /* mult */ - for (a=0; a<7; a++) { - vec[a][0]*= rad; vec[a][1]*= rad; + for (a = 0; a < 7; a++) { + vec[a][0] *= rad; vec[a][1] *= rad; } /* get current color, needs to be outside of glBegin/End */ glGetFloatv(GL_CURRENT_COLOR, color); /* 'shade' defines strength of shading */ - colLeft[0]= color[0]+shadeLeft; if (colLeft[0]>1.0f) colLeft[0]= 1.0f; - colLeft[1]= color[1]+shadeLeft; if (colLeft[1]>1.0f) colLeft[1]= 1.0f; - colLeft[2]= color[2]+shadeLeft; if (colLeft[2]>1.0f) colLeft[2]= 1.0f; - colRight[0]= color[0]+shadeRight; if (colRight[0]<0.0f) colRight[0]= 0.0f; - colRight[1]= color[1]+shadeRight; if (colRight[1]<0.0f) colRight[1]= 0.0f; - colRight[2]= color[2]+shadeRight; if (colRight[2]<0.0f) colRight[2]= 0.0f; + colLeft[0] = color[0] + shadeLeft; if (colLeft[0] > 1.0f) colLeft[0] = 1.0f; + colLeft[1] = color[1] + shadeLeft; if (colLeft[1] > 1.0f) colLeft[1] = 1.0f; + colLeft[2] = color[2] + shadeLeft; if (colLeft[2] > 1.0f) colLeft[2] = 1.0f; + colRight[0] = color[0] + shadeRight; if (colRight[0] < 0.0f) colRight[0] = 0.0f; + colRight[1] = color[1] + shadeRight; if (colRight[1] < 0.0f) colRight[1] = 0.0f; + colRight[2] = color[2] + shadeRight; if (colRight[2] < 0.0f) colRight[2] = 0.0f; glShadeModel(GL_SMOOTH); glBegin(mode); @@ -282,15 +282,15 @@ void uiDrawBoxVerticalShade(int mode, float minx, float miny, float maxx, float /* start with corner right-bottom */ if (roundboxtype & UI_CNR_BOTTOM_RIGHT) { round_box_shade_col(colLeft, colRight, 0.0); - glVertex2f(maxx-rad, miny); + glVertex2f(maxx - rad, miny); - for (a=0; a<7; a++) { - round_box_shade_col(colLeft, colRight, vec[a][0]*idiv); - glVertex2f(maxx-rad+vec[a][0], miny+vec[a][1]); + for (a = 0; a < 7; a++) { + round_box_shade_col(colLeft, colRight, vec[a][0] * idiv); + glVertex2f(maxx - rad + vec[a][0], miny + vec[a][1]); } - round_box_shade_col(colLeft, colRight, rad*idiv); - glVertex2f(maxx, miny+rad); + round_box_shade_col(colLeft, colRight, rad * idiv); + glVertex2f(maxx, miny + rad); } else { round_box_shade_col(colLeft, colRight, 0.0); @@ -300,15 +300,15 @@ void uiDrawBoxVerticalShade(int mode, float minx, float miny, float maxx, float /* corner right-top */ if (roundboxtype & UI_CNR_TOP_RIGHT) { round_box_shade_col(colLeft, colRight, 0.0); - glVertex2f(maxx, maxy-rad); + glVertex2f(maxx, maxy - rad); - for (a=0; a<7; a++) { + for (a = 0; a < 7; a++) { - round_box_shade_col(colLeft, colRight, (div-rad-vec[a][0])*idiv); - glVertex2f(maxx-vec[a][1], maxy-rad+vec[a][0]); + round_box_shade_col(colLeft, colRight, (div - rad - vec[a][0]) * idiv); + glVertex2f(maxx - vec[a][1], maxy - rad + vec[a][0]); } - round_box_shade_col(colLeft, colRight, (div-rad)*idiv); - glVertex2f(maxx-rad, maxy); + round_box_shade_col(colLeft, colRight, (div - rad) * idiv); + glVertex2f(maxx - rad, maxy); } else { round_box_shade_col(colLeft, colRight, 0.0); @@ -317,16 +317,16 @@ void uiDrawBoxVerticalShade(int mode, float minx, float miny, float maxx, float /* corner left-top */ if (roundboxtype & UI_CNR_TOP_LEFT) { - round_box_shade_col(colLeft, colRight, (div-rad)*idiv); - glVertex2f(minx+rad, maxy); + round_box_shade_col(colLeft, colRight, (div - rad) * idiv); + glVertex2f(minx + rad, maxy); - for (a=0; a<7; a++) { - round_box_shade_col(colLeft, colRight, (div-rad+vec[a][0])*idiv); - glVertex2f(minx+rad-vec[a][0], maxy-vec[a][1]); + for (a = 0; a < 7; a++) { + round_box_shade_col(colLeft, colRight, (div - rad + vec[a][0]) * idiv); + glVertex2f(minx + rad - vec[a][0], maxy - vec[a][1]); } round_box_shade_col(colLeft, colRight, 1.0); - glVertex2f(minx, maxy-rad); + glVertex2f(minx, maxy - rad); } else { round_box_shade_col(colLeft, colRight, 1.0); @@ -336,15 +336,15 @@ void uiDrawBoxVerticalShade(int mode, float minx, float miny, float maxx, float /* corner left-bottom */ if (roundboxtype & UI_CNR_BOTTOM_LEFT) { round_box_shade_col(colLeft, colRight, 1.0); - glVertex2f(minx, miny+rad); + glVertex2f(minx, miny + rad); - for (a=0; a<7; a++) { - round_box_shade_col(colLeft, colRight, (vec[a][0])*idiv); - glVertex2f(minx+vec[a][1], miny+rad-vec[a][0]); + for (a = 0; a < 7; a++) { + round_box_shade_col(colLeft, colRight, (vec[a][0]) * idiv); + glVertex2f(minx + vec[a][1], miny + rad - vec[a][0]); } round_box_shade_col(colLeft, colRight, 1.0); - glVertex2f(minx+rad, miny); + glVertex2f(minx + rad, miny); } else { round_box_shade_col(colLeft, colRight, 1.0); @@ -362,19 +362,19 @@ void uiRoundRect(float minx, float miny, float maxx, float maxy, float rad) if (roundboxtype & UI_RB_ALPHA) { glGetFloatv(GL_CURRENT_COLOR, color); - color[3]= 0.5; + color[3] = 0.5; glColor4fv(color); - glEnable( GL_BLEND ); + glEnable(GL_BLEND); } /* set antialias line */ - glEnable( GL_LINE_SMOOTH ); - glEnable( GL_BLEND ); + glEnable(GL_LINE_SMOOTH); + glEnable(GL_BLEND); uiDrawBox(GL_LINE_LOOP, minx, miny, maxx, maxy, rad); - glDisable( GL_BLEND ); - glDisable( GL_LINE_SMOOTH ); + glDisable(GL_BLEND); + glDisable(GL_LINE_SMOOTH); } /* (old, used in outliner) plain antialiased filled box */ @@ -384,9 +384,9 @@ void uiRoundBox(float minx, float miny, float maxx, float maxy, float rad) if (roundboxtype & UI_RB_ALPHA) { glGetFloatv(GL_CURRENT_COLOR, color); - color[3]= 0.5; + color[3] = 0.5; glColor4fv(color); - glEnable( GL_BLEND ); + glEnable(GL_BLEND); } ui_draw_anti_roundbox(GL_POLYGON, minx, miny, maxx, maxy, rad); @@ -401,16 +401,16 @@ void uiEmboss(float x1, float y1, float x2, float y2, int sel) { /* below */ - if (sel) glColor3ub(200,200,200); - else glColor3ub(50,50,50); + if (sel) glColor3ub(200, 200, 200); + else glColor3ub(50, 50, 50); fdrawline(x1, y1, x2, y1); /* right */ fdrawline(x2, y1, x2, y2); /* top */ - if (sel) glColor3ub(50,50,50); - else glColor3ub(200,200,200); + if (sel) glColor3ub(50, 50, 50); + else glColor3ub(200, 200, 200); fdrawline(x1, y2, x2, y2); /* left */ @@ -426,7 +426,7 @@ void ui_draw_but_IMAGE(ARegion *UNUSED(ar), uiBut *but, uiWidgetColors *UNUSED(w (void)rect; (void)but; #else - ImBuf *ibuf= (ImBuf *)but->poin; + ImBuf *ibuf = (ImBuf *)but->poin; //GLint scissor[4]; //int w, h; @@ -545,14 +545,14 @@ static void ui_draw_but_CHARTAB(uiBut *but) // Draw one grid cell glBegin(GL_LINE_LOOP); - glVertex2f(sx, sy); - glVertex2f(ex, sy); - glVertex2f(ex, ey); - glVertex2f(sx, ey); + glVertex2f(sx, sy); + glVertex2f(ex, sy); + glVertex2f(ex, ey); + glVertex2f(sx, ey); glEnd(); // Draw character inside the cell - memset(wstr, 0, sizeof(wchar_t)*2); + memset(wstr, 0, sizeof(wchar_t) * 2); memset(ustr, 0, 16); // Set the font to be either unicode or FO_BUILTIN_NAME @@ -580,25 +580,25 @@ static void ui_draw_but_CHARTAB(uiBut *but) // Calculate the position wid = FTF_GetStringWidth((char *) ustr, FTF_USE_GETTEXT | FTF_INPUT_UTF8); - FTF_GetBoundingBox((char *) ustr, &llx,&lly,&llz,&urx,&ury,&urz, FTF_USE_GETTEXT | FTF_INPUT_UTF8); - dx = urx-llx; - dy = ury-lly; + FTF_GetBoundingBox((char *) ustr, &llx, &lly, &llz, &urx, &ury, &urz, FTF_USE_GETTEXT | FTF_INPUT_UTF8); + dx = urx - llx; + dy = ury - lly; // This isn't fully functional since the but->aspect isn't working like I suspected - px = sx + ((butw/but->aspect)-dx)/2; - py = sy + ((buth/but->aspect)-dy)/2; + px = sx + ((butw / but->aspect) - dx) / 2; + py = sy + ((buth / but->aspect) - dy) / 2; // Set the position and draw the character ui_rasterpos_safe(px, py, but->aspect); FTF_DrawString((char *) ustr, FTF_USE_GETTEXT | FTF_INPUT_UTF8); } else { - ui_rasterpos_safe(sx + butw/2, sy + buth/2, but->aspect); + ui_rasterpos_safe(sx + butw / 2, sy + buth / 2, but->aspect); UI_DrawString(but->font, (char *) ustr, 0); } // Calculate the next position and character - sx += butw; ex +=butw; + sx += butw; ex += butw; cs++; } /* Add the y position and reset x position */ @@ -637,23 +637,23 @@ static void draw_scope_end(rctf *rect, GLint *scissor) /* restore scissortest */ glScissor(scissor[0], scissor[1], scissor[2], scissor[3]); - glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); /* scale widget */ - scaler_x1 = rect->xmin + (rect->xmax - rect->xmin)/2 - SCOPE_RESIZE_PAD; - scaler_x2 = rect->xmin + (rect->xmax - rect->xmin)/2 + SCOPE_RESIZE_PAD; + scaler_x1 = rect->xmin + (rect->xmax - rect->xmin) / 2 - SCOPE_RESIZE_PAD; + scaler_x2 = rect->xmin + (rect->xmax - rect->xmin) / 2 + SCOPE_RESIZE_PAD; glColor4f(0.f, 0.f, 0.f, 0.25f); - fdrawline(scaler_x1, rect->ymin-4, scaler_x2, rect->ymin-4); - fdrawline(scaler_x1, rect->ymin-7, scaler_x2, rect->ymin-7); + fdrawline(scaler_x1, rect->ymin - 4, scaler_x2, rect->ymin - 4); + fdrawline(scaler_x1, rect->ymin - 7, scaler_x2, rect->ymin - 7); glColor4f(1.f, 1.f, 1.f, 0.25f); - fdrawline(scaler_x1, rect->ymin-5, scaler_x2, rect->ymin-5); - fdrawline(scaler_x1, rect->ymin-8, scaler_x2, rect->ymin-8); + fdrawline(scaler_x1, rect->ymin - 5, scaler_x2, rect->ymin - 5); + fdrawline(scaler_x1, rect->ymin - 8, scaler_x2, rect->ymin - 8); /* outline */ glColor4f(0.f, 0.f, 0.f, 0.5f); uiSetRoundBox(UI_CNR_ALL); - uiDrawBox(GL_LINE_LOOP, rect->xmin-1, rect->ymin, rect->xmax+1, rect->ymax+1, 3.0f); + uiDrawBox(GL_LINE_LOOP, rect->xmin - 1, rect->ymin, rect->xmax + 1, rect->ymax + 1, 3.0f); } static void histogram_draw_one(float r, float g, float b, float alpha, float x, float y, float w, float h, float *data, int res) @@ -667,10 +667,10 @@ static void histogram_draw_one(float r, float g, float b, float alpha, float x, glShadeModel(GL_FLAT); glBegin(GL_QUAD_STRIP); glVertex2f(x, y); - glVertex2f(x, y + (data[0]*h)); - for (i=1; i < res; i++) { - float x2 = x + i * (w/(float)res); - glVertex2f(x2, y + (data[i]*h)); + glVertex2f(x, y + (data[0] * h)); + for (i = 1; i < res; i++) { + float x2 = x + i * (w / (float)res); + glVertex2f(x2, y + (data[i] * h)); glVertex2f(x2, y); } glEnd(); @@ -681,9 +681,9 @@ static void histogram_draw_one(float r, float g, float b, float alpha, float x, glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_LINE_SMOOTH); glBegin(GL_LINE_STRIP); - for (i=0; i < res; i++) { - float x2 = x + i * (w/(float)res); - glVertex2f(x2, y + (data[i]*h)); + for (i = 0; i < res; i++) { + float x2 = x + i * (w / (float)res); + glVertex2f(x2, y + (data[i] * h)); } glEnd(); glDisable(GL_LINE_SMOOTH); @@ -699,30 +699,30 @@ void ui_draw_but_HISTOGRAM(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wcol) //float alpha; GLint scissor[4]; - rect.xmin = (float)recti->xmin+1; - rect.xmax = (float)recti->xmax-1; - rect.ymin = (float)recti->ymin+SCOPE_RESIZE_PAD+2; - rect.ymax = (float)recti->ymax-1; + rect.xmin = (float)recti->xmin + 1; + rect.xmax = (float)recti->xmax - 1; + rect.ymin = (float)recti->ymin + SCOPE_RESIZE_PAD + 2; + rect.ymax = (float)recti->ymax - 1; w = rect.xmax - rect.xmin; h = (rect.ymax - rect.ymin) * hist->ymax; glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glColor4f(0.f, 0.f, 0.f, 0.3f); uiSetRoundBox(UI_CNR_ALL); - uiDrawBox(GL_POLYGON, rect.xmin-1, rect.ymin-1, rect.xmax+1, rect.ymax+1, 3.0f); + uiDrawBox(GL_POLYGON, rect.xmin - 1, rect.ymin - 1, rect.xmax + 1, rect.ymax + 1, 3.0f); /* need scissor test, histogram can draw outside of boundary */ glGetIntegerv(GL_VIEWPORT, scissor); - glScissor(ar->winrct.xmin + (rect.xmin-1), ar->winrct.ymin+(rect.ymin-1), (rect.xmax+1)-(rect.xmin-1), (rect.ymax+1)-(rect.ymin-1)); + glScissor(ar->winrct.xmin + (rect.xmin - 1), ar->winrct.ymin + (rect.ymin - 1), (rect.xmax + 1) - (rect.xmin - 1), (rect.ymax + 1) - (rect.ymin - 1)); glColor4f(1.f, 1.f, 1.f, 0.08f); /* draw grid lines here */ - for (i=1; i<4; i++) { - fdrawline(rect.xmin, rect.ymin+(i/4.f)*h, rect.xmax, rect.ymin+(i/4.f)*h); - fdrawline(rect.xmin+(i/4.f)*w, rect.ymin, rect.xmin+(i/4.f)*w, rect.ymax); + for (i = 1; i < 4; i++) { + fdrawline(rect.xmin, rect.ymin + (i / 4.f) * h, rect.xmax, rect.ymin + (i / 4.f) * h); + fdrawline(rect.xmin + (i / 4.f) * w, rect.ymin, rect.xmin + (i / 4.f) * w, rect.ymax); } if (hist->mode == HISTO_MODE_LUMA) @@ -747,88 +747,88 @@ void ui_draw_but_WAVEFORM(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wcol), int i, c; float w, w3, h, alpha, yofs; GLint scissor[4]; - float colors[3][3]= MAT3_UNITY; - float colorsycc[3][3] = {{1,0,1},{1,1,0},{0,1,1}}; + float colors[3][3] = MAT3_UNITY; + float colorsycc[3][3] = {{1, 0, 1}, {1, 1, 0}, {0, 1, 1}}; float colors_alpha[3][3], colorsycc_alpha[3][3]; /* colors pre multiplied by alpha for speed up */ float min, max; - if (scopes==NULL) return; - - rect.xmin = (float)recti->xmin+1; - rect.xmax = (float)recti->xmax-1; - rect.ymin = (float)recti->ymin+SCOPE_RESIZE_PAD+2; - rect.ymax = (float)recti->ymax-1; + if (scopes == NULL) return; - if (scopes->wavefrm_yfac < 0.5f ) - scopes->wavefrm_yfac =0.98f; - w = rect.xmax - rect.xmin-7; - h = (rect.ymax - rect.ymin)*scopes->wavefrm_yfac; - yofs= rect.ymin + (rect.ymax - rect.ymin -h)/2.0f; - w3=w/3.0f; + rect.xmin = (float)recti->xmin + 1; + rect.xmax = (float)recti->xmax - 1; + rect.ymin = (float)recti->ymin + SCOPE_RESIZE_PAD + 2; + rect.ymax = (float)recti->ymax - 1; + + if (scopes->wavefrm_yfac < 0.5f) + scopes->wavefrm_yfac = 0.98f; + w = rect.xmax - rect.xmin - 7; + h = (rect.ymax - rect.ymin) * scopes->wavefrm_yfac; + yofs = rect.ymin + (rect.ymax - rect.ymin - h) / 2.0f; + w3 = w / 3.0f; /* log scale for alpha */ - alpha = scopes->wavefrm_alpha*scopes->wavefrm_alpha; + alpha = scopes->wavefrm_alpha * scopes->wavefrm_alpha; - for (c=0; c<3; c++) { - for (i=0; i<3; i++) { + for (c = 0; c < 3; c++) { + for (i = 0; i < 3; i++) { colors_alpha[c][i] = colors[c][i] * alpha; colorsycc_alpha[c][i] = colorsycc[c][i] * alpha; } } glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glColor4f(0.f, 0.f, 0.f, 0.3f); uiSetRoundBox(UI_CNR_ALL); - uiDrawBox(GL_POLYGON, rect.xmin-1, rect.ymin-1, rect.xmax+1, rect.ymax+1, 3.0f); + uiDrawBox(GL_POLYGON, rect.xmin - 1, rect.ymin - 1, rect.xmax + 1, rect.ymax + 1, 3.0f); /* need scissor test, waveform can draw outside of boundary */ glGetIntegerv(GL_VIEWPORT, scissor); - glScissor(ar->winrct.xmin + (rect.xmin-1), ar->winrct.ymin+(rect.ymin-1), (rect.xmax+1)-(rect.xmin-1), (rect.ymax+1)-(rect.ymin-1)); + glScissor(ar->winrct.xmin + (rect.xmin - 1), ar->winrct.ymin + (rect.ymin - 1), (rect.xmax + 1) - (rect.xmin - 1), (rect.ymax + 1) - (rect.ymin - 1)); glColor4f(1.f, 1.f, 1.f, 0.08f); /* draw grid lines here */ - for (i=0; i<6; i++) { + for (i = 0; i < 6; i++) { char str[4]; - BLI_snprintf(str, sizeof(str), "%-3d",i*20); - str[3]='\0'; - fdrawline(rect.xmin+22, yofs+(i/5.f)*h, rect.xmax+1, yofs+(i/5.f)*h); - BLF_draw_default(rect.xmin+1, yofs-5+(i/5.f)*h, 0, str, sizeof(str)-1); + BLI_snprintf(str, sizeof(str), "%-3d", i * 20); + str[3] = '\0'; + fdrawline(rect.xmin + 22, yofs + (i / 5.f) * h, rect.xmax + 1, yofs + (i / 5.f) * h); + BLF_draw_default(rect.xmin + 1, yofs - 5 + (i / 5.f) * h, 0, str, sizeof(str) - 1); /* in the loop because blf_draw reset it */ glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); } /* 3 vertical separation */ - if (scopes->wavefrm_mode!= SCOPES_WAVEFRM_LUMA) { - for (i=1; i<3; i++) { - fdrawline(rect.xmin+i*w3, rect.ymin, rect.xmin+i*w3, rect.ymax); + if (scopes->wavefrm_mode != SCOPES_WAVEFRM_LUMA) { + for (i = 1; i < 3; i++) { + fdrawline(rect.xmin + i * w3, rect.ymin, rect.xmin + i * w3, rect.ymax); } } /* separate min max zone on the right */ - fdrawline(rect.xmin+w, rect.ymin, rect.xmin+w, rect.ymax); + fdrawline(rect.xmin + w, rect.ymin, rect.xmin + w, rect.ymax); /* 16-235-240 level in case of ITU-R BT601/709 */ glColor4f(1.f, 0.4f, 0.f, 0.2f); if (ELEM(scopes->wavefrm_mode, SCOPES_WAVEFRM_YCC_601, SCOPES_WAVEFRM_YCC_709)) { - fdrawline(rect.xmin+22, yofs+h*16.0f/255.0f, rect.xmax+1, yofs+h*16.0f/255.0f); - fdrawline(rect.xmin+22, yofs+h*235.0f/255.0f, rect.xmin+w3, yofs+h*235.0f/255.0f); - fdrawline(rect.xmin+3*w3, yofs+h*235.0f/255.0f, rect.xmax+1, yofs+h*235.0f/255.0f); - fdrawline(rect.xmin+w3, yofs+h*240.0f/255.0f, rect.xmax+1, yofs+h*240.0f/255.0f); + fdrawline(rect.xmin + 22, yofs + h * 16.0f / 255.0f, rect.xmax + 1, yofs + h * 16.0f / 255.0f); + fdrawline(rect.xmin + 22, yofs + h * 235.0f / 255.0f, rect.xmin + w3, yofs + h * 235.0f / 255.0f); + fdrawline(rect.xmin + 3 * w3, yofs + h * 235.0f / 255.0f, rect.xmax + 1, yofs + h * 235.0f / 255.0f); + fdrawline(rect.xmin + w3, yofs + h * 240.0f / 255.0f, rect.xmax + 1, yofs + h * 240.0f / 255.0f); } /* 7.5 IRE black point level for NTSC */ - if (scopes->wavefrm_mode== SCOPES_WAVEFRM_LUMA) - fdrawline(rect.xmin, yofs+h*0.075f, rect.xmax+1, yofs+h*0.075f); + if (scopes->wavefrm_mode == SCOPES_WAVEFRM_LUMA) + fdrawline(rect.xmin, yofs + h * 0.075f, rect.xmax + 1, yofs + h * 0.075f); if (scopes->ok && scopes->waveform_1 != NULL) { /* LUMA (1 channel) */ - glBlendFunc(GL_ONE,GL_ONE); + glBlendFunc(GL_ONE, GL_ONE); glColor3f(alpha, alpha, alpha); if (scopes->wavefrm_mode == SCOPES_WAVEFRM_LUMA) { - glBlendFunc(GL_ONE,GL_ONE); + glBlendFunc(GL_ONE, GL_ONE); glPushMatrix(); glEnableClientState(GL_VERTEX_ARRAY); @@ -843,18 +843,18 @@ void ui_draw_but_WAVEFORM(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wcol), /* min max */ glColor3f(.5f, .5f, .5f); - min= yofs+scopes->minmax[0][0]*h; - max= yofs+scopes->minmax[0][1]*h; + min = yofs + scopes->minmax[0][0] * h; + max = yofs + scopes->minmax[0][1] * h; CLAMP(min, rect.ymin, rect.ymax); CLAMP(max, rect.ymin, rect.ymax); - fdrawline(rect.xmax-3,min,rect.xmax-3,max); + fdrawline(rect.xmax - 3, min, rect.xmax - 3, max); } /* RGB / YCC (3 channels) */ else if (ELEM4(scopes->wavefrm_mode, SCOPES_WAVEFRM_RGB, SCOPES_WAVEFRM_YCC_601, SCOPES_WAVEFRM_YCC_709, SCOPES_WAVEFRM_YCC_JPEG)) { int rgb = (scopes->wavefrm_mode == SCOPES_WAVEFRM_RGB); - glBlendFunc(GL_ONE,GL_ONE); + glBlendFunc(GL_ONE, GL_ONE); glPushMatrix(); glEnableClientState(GL_VERTEX_ARRAY); @@ -862,17 +862,17 @@ void ui_draw_but_WAVEFORM(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wcol), glTranslatef(rect.xmin, yofs, 0.f); glScalef(w3, h, 0.f); - glColor3fv((rgb)?colors_alpha[0]:colorsycc_alpha[0]); + glColor3fv((rgb) ? colors_alpha[0] : colorsycc_alpha[0]); glVertexPointer(2, GL_FLOAT, 0, scopes->waveform_1); glDrawArrays(GL_POINTS, 0, scopes->waveform_tot); glTranslatef(1.f, 0.f, 0.f); - glColor3fv((rgb)?colors_alpha[1]:colorsycc_alpha[1]); + glColor3fv((rgb) ? colors_alpha[1] : colorsycc_alpha[1]); glVertexPointer(2, GL_FLOAT, 0, scopes->waveform_2); glDrawArrays(GL_POINTS, 0, scopes->waveform_tot); glTranslatef(1.f, 0.f, 0.f); - glColor3fv((rgb)?colors_alpha[2]:colorsycc_alpha[2]); + glColor3fv((rgb) ? colors_alpha[2] : colorsycc_alpha[2]); glVertexPointer(2, GL_FLOAT, 0, scopes->waveform_3); glDrawArrays(GL_POINTS, 0, scopes->waveform_tot); @@ -881,16 +881,16 @@ void ui_draw_but_WAVEFORM(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wcol), /* min max */ - for (c=0; c<3; c++) { + for (c = 0; c < 3; c++) { if (scopes->wavefrm_mode == SCOPES_WAVEFRM_RGB) - glColor3f(colors[c][0]*0.75f, colors[c][1]*0.75f, colors[c][2]*0.75f); + glColor3f(colors[c][0] * 0.75f, colors[c][1] * 0.75f, colors[c][2] * 0.75f); else - glColor3f(colorsycc[c][0]*0.75f, colorsycc[c][1]*0.75f, colorsycc[c][2]*0.75f); - min= yofs+scopes->minmax[c][0]*h; - max= yofs+scopes->minmax[c][1]*h; + glColor3f(colorsycc[c][0] * 0.75f, colorsycc[c][1] * 0.75f, colorsycc[c][2] * 0.75f); + min = yofs + scopes->minmax[c][0] * h; + max = yofs + scopes->minmax[c][1] * h; CLAMP(min, rect.ymin, rect.ymax); CLAMP(max, rect.ymin, rect.ymax); - fdrawline(rect.xmin+w+2+c*2,min,rect.xmin+w+2+c*2,max); + fdrawline(rect.xmin + w + 2 + c * 2, min, rect.xmin + w + 2 + c * 2, max); } } @@ -902,128 +902,128 @@ void ui_draw_but_WAVEFORM(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wcol), static float polar_to_x(float center, float diam, float ampli, float angle) { - return center + diam * ampli * cosf(angle); + return center + diam *ampli *cosf(angle); } static float polar_to_y(float center, float diam, float ampli, float angle) { - return center + diam * ampli * sinf(angle); + return center + diam *ampli *sinf(angle); } static void vectorscope_draw_target(float centerx, float centery, float diam, const float colf[3]) { - float y,u,v; - float tangle=0.f, tampli; + float y, u, v; + float tangle = 0.f, tampli; float dangle, dampli, dangle2, dampli2; rgb_to_yuv(colf[0], colf[1], colf[2], &y, &u, &v); - if (u>0 && v>=0) tangle=atanf(v/u); - else if (u>0 && v<0) tangle= atanf(v/u) + 2.0f * (float)M_PI; - else if (u<0) tangle=atanf(v/u) + (float)M_PI; - else if (u==0 && v > 0.0f) tangle= (float)M_PI/2.0f; - else if (u==0 && v < 0.0f) tangle=-(float)M_PI/2.0f; - tampli= sqrtf(u*u+v*v); + if (u > 0 && v >= 0) tangle = atanf(v / u); + else if (u > 0 && v < 0) tangle = atanf(v / u) + 2.0f * (float)M_PI; + else if (u < 0) tangle = atanf(v / u) + (float)M_PI; + else if (u == 0 && v > 0.0f) tangle = (float)M_PI / 2.0f; + else if (u == 0 && v < 0.0f) tangle = -(float)M_PI / 2.0f; + tampli = sqrtf(u * u + v * v); /* small target vary by 2.5 degree and 2.5 IRE unit */ glColor4f(1.0f, 1.0f, 1.0, 0.12f); - dangle= DEG2RADF(2.5f); - dampli= 2.5f/200.0f; + dangle = DEG2RADF(2.5f); + dampli = 2.5f / 200.0f; glBegin(GL_LINE_STRIP); - glVertex2f(polar_to_x(centerx,diam,tampli+dampli,tangle+dangle), polar_to_y(centery,diam,tampli+dampli,tangle+dangle)); - glVertex2f(polar_to_x(centerx,diam,tampli-dampli,tangle+dangle), polar_to_y(centery,diam,tampli-dampli,tangle+dangle)); - glVertex2f(polar_to_x(centerx,diam,tampli-dampli,tangle-dangle), polar_to_y(centery,diam,tampli-dampli,tangle-dangle)); - glVertex2f(polar_to_x(centerx,diam,tampli+dampli,tangle-dangle), polar_to_y(centery,diam,tampli+dampli,tangle-dangle)); - glVertex2f(polar_to_x(centerx,diam,tampli+dampli,tangle+dangle), polar_to_y(centery,diam,tampli+dampli,tangle+dangle)); + glVertex2f(polar_to_x(centerx, diam, tampli + dampli, tangle + dangle), polar_to_y(centery, diam, tampli + dampli, tangle + dangle)); + glVertex2f(polar_to_x(centerx, diam, tampli - dampli, tangle + dangle), polar_to_y(centery, diam, tampli - dampli, tangle + dangle)); + glVertex2f(polar_to_x(centerx, diam, tampli - dampli, tangle - dangle), polar_to_y(centery, diam, tampli - dampli, tangle - dangle)); + glVertex2f(polar_to_x(centerx, diam, tampli + dampli, tangle - dangle), polar_to_y(centery, diam, tampli + dampli, tangle - dangle)); + glVertex2f(polar_to_x(centerx, diam, tampli + dampli, tangle + dangle), polar_to_y(centery, diam, tampli + dampli, tangle + dangle)); glEnd(); /* big target vary by 10 degree and 20% amplitude */ glColor4f(1.0f, 1.0f, 1.0, 0.12f); - dangle= DEG2RADF(10.0f); - dampli= 0.2f*tampli; - dangle2= DEG2RADF(5.0f); - dampli2= 0.5f*dampli; + dangle = DEG2RADF(10.0f); + dampli = 0.2f * tampli; + dangle2 = DEG2RADF(5.0f); + dampli2 = 0.5f * dampli; glBegin(GL_LINE_STRIP); - glVertex2f(polar_to_x(centerx,diam,tampli+dampli-dampli2,tangle+dangle), polar_to_y(centery,diam,tampli+dampli-dampli2,tangle+dangle)); - glVertex2f(polar_to_x(centerx,diam,tampli+dampli,tangle+dangle), polar_to_y(centery,diam,tampli+dampli,tangle+dangle)); - glVertex2f(polar_to_x(centerx,diam,tampli+dampli,tangle+dangle-dangle2), polar_to_y(centery,diam,tampli+dampli,tangle+dangle-dangle2)); + glVertex2f(polar_to_x(centerx, diam, tampli + dampli - dampli2, tangle + dangle), polar_to_y(centery, diam, tampli + dampli - dampli2, tangle + dangle)); + glVertex2f(polar_to_x(centerx, diam, tampli + dampli, tangle + dangle), polar_to_y(centery, diam, tampli + dampli, tangle + dangle)); + glVertex2f(polar_to_x(centerx, diam, tampli + dampli, tangle + dangle - dangle2), polar_to_y(centery, diam, tampli + dampli, tangle + dangle - dangle2)); glEnd(); glBegin(GL_LINE_STRIP); - glVertex2f(polar_to_x(centerx,diam,tampli-dampli+dampli2,tangle+dangle), polar_to_y(centery ,diam,tampli-dampli+dampli2,tangle+dangle)); - glVertex2f(polar_to_x(centerx,diam,tampli-dampli,tangle+dangle), polar_to_y(centery,diam,tampli-dampli,tangle+dangle)); - glVertex2f(polar_to_x(centerx,diam,tampli-dampli,tangle+dangle-dangle2), polar_to_y(centery,diam,tampli-dampli,tangle+dangle-dangle2)); + glVertex2f(polar_to_x(centerx, diam, tampli - dampli + dampli2, tangle + dangle), polar_to_y(centery, diam, tampli - dampli + dampli2, tangle + dangle)); + glVertex2f(polar_to_x(centerx, diam, tampli - dampli, tangle + dangle), polar_to_y(centery, diam, tampli - dampli, tangle + dangle)); + glVertex2f(polar_to_x(centerx, diam, tampli - dampli, tangle + dangle - dangle2), polar_to_y(centery, diam, tampli - dampli, tangle + dangle - dangle2)); glEnd(); glBegin(GL_LINE_STRIP); - glVertex2f(polar_to_x(centerx,diam,tampli-dampli+dampli2,tangle-dangle), polar_to_y(centery,diam,tampli-dampli+dampli2,tangle-dangle)); - glVertex2f(polar_to_x(centerx,diam,tampli-dampli,tangle-dangle), polar_to_y(centery,diam,tampli-dampli,tangle-dangle)); - glVertex2f(polar_to_x(centerx,diam,tampli-dampli,tangle-dangle+dangle2), polar_to_y(centery,diam,tampli-dampli,tangle-dangle+dangle2)); + glVertex2f(polar_to_x(centerx, diam, tampli - dampli + dampli2, tangle - dangle), polar_to_y(centery, diam, tampli - dampli + dampli2, tangle - dangle)); + glVertex2f(polar_to_x(centerx, diam, tampli - dampli, tangle - dangle), polar_to_y(centery, diam, tampli - dampli, tangle - dangle)); + glVertex2f(polar_to_x(centerx, diam, tampli - dampli, tangle - dangle + dangle2), polar_to_y(centery, diam, tampli - dampli, tangle - dangle + dangle2)); glEnd(); glBegin(GL_LINE_STRIP); - glVertex2f(polar_to_x(centerx,diam,tampli+dampli-dampli2,tangle-dangle), polar_to_y(centery,diam,tampli+dampli-dampli2,tangle-dangle)); - glVertex2f(polar_to_x(centerx,diam,tampli+dampli,tangle-dangle), polar_to_y(centery,diam,tampli+dampli,tangle-dangle)); - glVertex2f(polar_to_x(centerx,diam,tampli+dampli,tangle-dangle+dangle2), polar_to_y(centery,diam,tampli+dampli,tangle-dangle+dangle2)); + glVertex2f(polar_to_x(centerx, diam, tampli + dampli - dampli2, tangle - dangle), polar_to_y(centery, diam, tampli + dampli - dampli2, tangle - dangle)); + glVertex2f(polar_to_x(centerx, diam, tampli + dampli, tangle - dangle), polar_to_y(centery, diam, tampli + dampli, tangle - dangle)); + glVertex2f(polar_to_x(centerx, diam, tampli + dampli, tangle - dangle + dangle2), polar_to_y(centery, diam, tampli + dampli, tangle - dangle + dangle2)); glEnd(); } void ui_draw_but_VECTORSCOPE(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wcol), rcti *recti) { - const float skin_rad= DEG2RADF(123.0f); /* angle in radians of the skin tone line */ + const float skin_rad = DEG2RADF(123.0f); /* angle in radians of the skin tone line */ Scopes *scopes = (Scopes *)but->poin; rctf rect; int i, j; float w, h, centerx, centery, diam; float alpha; - const float colors[6][3]={{.75,0,0},{.75,.75,0},{0,.75,0},{0,.75,.75},{0,0,.75},{.75,0,.75}}; + const float colors[6][3] = {{.75, 0, 0}, {.75, .75, 0}, {0, .75, 0}, {0, .75, .75}, {0, 0, .75}, {.75, 0, .75}}; GLint scissor[4]; - rect.xmin = (float)recti->xmin+1; - rect.xmax = (float)recti->xmax-1; - rect.ymin = (float)recti->ymin+SCOPE_RESIZE_PAD+2; - rect.ymax = (float)recti->ymax-1; + rect.xmin = (float)recti->xmin + 1; + rect.xmax = (float)recti->xmax - 1; + rect.ymin = (float)recti->ymin + SCOPE_RESIZE_PAD + 2; + rect.ymax = (float)recti->ymax - 1; w = rect.xmax - rect.xmin; h = rect.ymax - rect.ymin; - centerx = rect.xmin + w/2; - centery = rect.ymin + h/2; - diam= (wvecscope_alpha*scopes->vecscope_alpha*scopes->vecscope_alpha; + alpha = scopes->vecscope_alpha * scopes->vecscope_alpha * scopes->vecscope_alpha; glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glColor4f(0.f, 0.f, 0.f, 0.3f); uiSetRoundBox(UI_CNR_ALL); - uiDrawBox(GL_POLYGON, rect.xmin-1, rect.ymin-1, rect.xmax+1, rect.ymax+1, 3.0f); + uiDrawBox(GL_POLYGON, rect.xmin - 1, rect.ymin - 1, rect.xmax + 1, rect.ymax + 1, 3.0f); /* need scissor test, hvectorscope can draw outside of boundary */ glGetIntegerv(GL_VIEWPORT, scissor); - glScissor(ar->winrct.xmin + (rect.xmin-1), ar->winrct.ymin+(rect.ymin-1), (rect.xmax+1)-(rect.xmin-1), (rect.ymax+1)-(rect.ymin-1)); + glScissor(ar->winrct.xmin + (rect.xmin - 1), ar->winrct.ymin + (rect.ymin - 1), (rect.xmax + 1) - (rect.xmin - 1), (rect.ymax + 1) - (rect.ymin - 1)); glColor4f(1.f, 1.f, 1.f, 0.08f); /* draw grid elements */ /* cross */ - fdrawline(centerx - (diam/2)-5, centery, centerx + (diam/2)+5, centery); - fdrawline(centerx, centery - (diam/2)-5, centerx, centery + (diam/2)+5); + fdrawline(centerx - (diam / 2) - 5, centery, centerx + (diam / 2) + 5, centery); + fdrawline(centerx, centery - (diam / 2) - 5, centerx, centery + (diam / 2) + 5); /* circles */ - for (j=0; j<5; j++) { + for (j = 0; j < 5; j++) { glBegin(GL_LINE_STRIP); - for (i=0; i<=360; i=i+15) { - const float a= DEG2RADF((float)i); - const float r= (j+1)/10.0f; - glVertex2f(polar_to_x(centerx,diam,r,a), polar_to_y(centery,diam,r,a)); + for (i = 0; i <= 360; i = i + 15) { + const float a = DEG2RADF((float)i); + const float r = (j + 1) / 10.0f; + glVertex2f(polar_to_x(centerx, diam, r, a), polar_to_y(centery, diam, r, a)); } glEnd(); } /* skin tone line */ glColor4f(1.f, 0.4f, 0.f, 0.2f); - fdrawline(polar_to_x(centerx, diam, 0.5f, skin_rad), polar_to_y(centery,diam,0.5,skin_rad), - polar_to_x(centerx, diam, 0.1f, skin_rad), polar_to_y(centery,diam,0.1,skin_rad)); + fdrawline(polar_to_x(centerx, diam, 0.5f, skin_rad), polar_to_y(centery, diam, 0.5, skin_rad), + polar_to_x(centerx, diam, 0.1f, skin_rad), polar_to_y(centery, diam, 0.1, skin_rad)); /* saturation points */ - for (i=0; i<6; i++) + for (i = 0; i < 6; i++) vectorscope_draw_target(centerx, centery, diam, colors[i]); if (scopes->ok && scopes->vecscope != NULL) { /* pixel point cloud */ - glBlendFunc(GL_ONE,GL_ONE); + glBlendFunc(GL_ONE, GL_ONE); glColor3f(alpha, alpha, alpha); glPushMatrix(); @@ -1052,49 +1052,49 @@ void ui_draw_but_COLORBAND(uiBut *but, uiWidgetColors *UNUSED(wcol), rcti *rect) float x1, y1, sizex, sizey; float v3[2], v1[2], v2[2], v1a[2], v2a[2]; int a; - float pos, colf[4]= {0,0,0,0}; /* initialize in case the colorband isn't valid */ + float pos, colf[4] = {0, 0, 0, 0}; /* initialize in case the colorband isn't valid */ - coba= (ColorBand *)(but->editcoba? but->editcoba: but->poin); - if (coba==NULL) return; + coba = (ColorBand *)(but->editcoba ? but->editcoba : but->poin); + if (coba == NULL) return; - x1= rect->xmin; - y1= rect->ymin; - sizex= rect->xmax-x1; - sizey= rect->ymax-y1; + x1 = rect->xmin; + y1 = rect->ymin; + sizex = rect->xmax - x1; + sizey = rect->ymax - y1; /* first background, to show tranparency */ glColor4ub(UI_TRANSP_DARK, UI_TRANSP_DARK, UI_TRANSP_DARK, 255); - glRectf(x1, y1, x1+sizex, y1+sizey); + glRectf(x1, y1, x1 + sizex, y1 + sizey); glEnable(GL_POLYGON_STIPPLE); glColor4ub(UI_TRANSP_LIGHT, UI_TRANSP_LIGHT, UI_TRANSP_LIGHT, 255); glPolygonStipple(checker_stipple_sml); - glRectf(x1, y1, x1+sizex, y1+sizey); + glRectf(x1, y1, x1 + sizex, y1 + sizey); glDisable(GL_POLYGON_STIPPLE); glShadeModel(GL_FLAT); glEnable(GL_BLEND); - cbd= coba->data; + cbd = coba->data; - v1[0]= v2[0]= x1; - v1[1]= y1; - v2[1]= y1+sizey; + v1[0] = v2[0] = x1; + v1[1] = y1; + v2[1] = y1 + sizey; glBegin(GL_QUAD_STRIP); - glColor4fv( &cbd->r ); + glColor4fv(&cbd->r); glVertex2fv(v1); glVertex2fv(v2); - for ( a = 1; a <= sizex; a++ ) { - pos = ((float)a) / (sizex-1); + for (a = 1; a <= sizex; a++) { + pos = ((float)a) / (sizex - 1); do_colorband(coba, pos, colf); if (but->block->color_profile != BLI_PR_NONE) linearrgb_to_srgb_v3_v3(colf, colf); - v1[0]=v2[0]= x1 + a; + v1[0] = v2[0] = x1 + a; - glColor4fv( colf ); + glColor4fv(colf); glVertex2fv(v1); glVertex2fv(v2); } @@ -1104,23 +1104,23 @@ void ui_draw_but_COLORBAND(uiBut *but, uiWidgetColors *UNUSED(wcol), rcti *rect) /* outline */ glColor4f(0.0, 0.0, 0.0, 1.0); - fdrawbox(x1, y1, x1+sizex, y1+sizey); + fdrawbox(x1, y1, x1 + sizex, y1 + sizey); /* help lines */ - v1[0]= v2[0]=v3[0]= x1; - v1[1]= y1; - v1a[1]= y1+0.25f*sizey; - v2[1]= y1+0.5f*sizey; - v2a[1]= y1+0.75f*sizey; - v3[1]= y1+sizey; + v1[0] = v2[0] = v3[0] = x1; + v1[1] = y1; + v1a[1] = y1 + 0.25f * sizey; + v2[1] = y1 + 0.5f * sizey; + v2a[1] = y1 + 0.75f * sizey; + v3[1] = y1 + sizey; - cbd= coba->data; + cbd = coba->data; glBegin(GL_LINES); - for (a=0; atot; a++, cbd++) { - v1[0]=v2[0]=v3[0]=v1a[0]=v2a[0]= x1+ cbd->pos*sizex; + for (a = 0; a < coba->tot; a++, cbd++) { + v1[0] = v2[0] = v3[0] = v1a[0] = v2a[0] = x1 + cbd->pos * sizex; - if (a==coba->cur) { + if (a == coba->cur) { glColor3ub(0, 0, 0); glVertex2fv(v1); glVertex2fv(v3); @@ -1166,17 +1166,17 @@ void ui_draw_but_COLORBAND(uiBut *but, uiWidgetColors *UNUSED(wcol), rcti *rect) void ui_draw_but_NORMAL(uiBut *but, uiWidgetColors *wcol, rcti *rect) { - static GLuint displist=0; + static GLuint displist = 0; int a, old[8]; - GLfloat diff[4], diffn[4]={1.0f, 1.0f, 1.0f, 1.0f}; - float vec0[4]={0.0f, 0.0f, 0.0f, 0.0f}; + GLfloat diff[4], diffn[4] = {1.0f, 1.0f, 1.0f, 1.0f}; + float vec0[4] = {0.0f, 0.0f, 0.0f, 0.0f}; float dir[4], size; /* store stuff */ glGetMaterialfv(GL_FRONT, GL_DIFFUSE, diff); /* backdrop */ - glColor3ubv((unsigned char*)wcol->inner); + glColor3ubv((unsigned char *)wcol->inner); uiSetRoundBox(UI_CNR_ALL); uiDrawBox(GL_POLYGON, rect->xmin, rect->ymin, rect->xmax, rect->ymax, 5.0f); @@ -1185,9 +1185,9 @@ void ui_draw_but_NORMAL(uiBut *but, uiWidgetColors *wcol, rcti *rect) glCullFace(GL_BACK); glEnable(GL_CULL_FACE); /* disable blender light */ - for (a=0; a<8; a++) { - old[a]= glIsEnabled(GL_LIGHT0+a); - glDisable(GL_LIGHT0+a); + for (a = 0; a < 8; a++) { + old[a] = glIsEnabled(GL_LIGHT0 + a); + glDisable(GL_LIGHT0 + a); } /* own light */ @@ -1196,7 +1196,7 @@ void ui_draw_but_NORMAL(uiBut *but, uiWidgetColors *wcol, rcti *rect) ui_get_but_vectorf(but, dir); - dir[3]= 0.0f; /* glLight needs 4 args, 0.0 is sun */ + dir[3] = 0.0f; /* glLight needs 4 args, 0.0 is sun */ glLightfv(GL_LIGHT7, GL_POSITION, dir); glLightfv(GL_LIGHT7, GL_DIFFUSE, diffn); glLightfv(GL_LIGHT7, GL_SPECULAR, vec0); @@ -1205,25 +1205,25 @@ void ui_draw_but_NORMAL(uiBut *but, uiWidgetColors *wcol, rcti *rect) /* transform to button */ glPushMatrix(); - glTranslatef(rect->xmin + 0.5f*(rect->xmax-rect->xmin), rect->ymin+ 0.5f*(rect->ymax-rect->ymin), 0.0f); + glTranslatef(rect->xmin + 0.5f * (rect->xmax - rect->xmin), rect->ymin + 0.5f * (rect->ymax - rect->ymin), 0.0f); - if ( rect->xmax-rect->xmin < rect->ymax-rect->ymin) - size= (rect->xmax-rect->xmin)/200.f; + if (rect->xmax - rect->xmin < rect->ymax - rect->ymin) + size = (rect->xmax - rect->xmin) / 200.f; else - size= (rect->ymax-rect->ymin)/200.f; + size = (rect->ymax - rect->ymin) / 200.f; glScalef(size, size, size); - if (displist==0) { - GLUquadricObj *qobj; + if (displist == 0) { + GLUquadricObj *qobj; - displist= glGenLists(1); + displist = glGenLists(1); glNewList(displist, GL_COMPILE_AND_EXECUTE); - qobj= gluNewQuadric(); + qobj = gluNewQuadric(); gluQuadricDrawStyle(qobj, GLU_FILL); glShadeModel(GL_SMOOTH); - gluSphere( qobj, 100.0, 32, 24); + gluSphere(qobj, 100.0, 32, 24); glShadeModel(GL_FLAT); gluDeleteQuadric(qobj); @@ -1239,19 +1239,19 @@ void ui_draw_but_NORMAL(uiBut *but, uiWidgetColors *wcol, rcti *rect) /* AA circle */ glEnable(GL_BLEND); - glEnable(GL_LINE_SMOOTH ); - glColor3ubv((unsigned char*)wcol->inner); - glutil_draw_lined_arc(0.0f, M_PI*2.0, 100.0f, 32); + glEnable(GL_LINE_SMOOTH); + glColor3ubv((unsigned char *)wcol->inner); + glutil_draw_lined_arc(0.0f, M_PI * 2.0, 100.0f, 32); glDisable(GL_BLEND); - glDisable(GL_LINE_SMOOTH ); + glDisable(GL_LINE_SMOOTH); /* matrix after circle */ glPopMatrix(); /* enable blender light */ - for (a=0; a<8; a++) { + for (a = 0; a < 8; a++) { if (old[a]) - glEnable(GL_LIGHT0+a); + glEnable(GL_LIGHT0 + a); } } @@ -1260,22 +1260,22 @@ static void ui_draw_but_curve_grid(rcti *rect, float zoomx, float zoomy, float o float dx, dy, fx, fy; glBegin(GL_LINES); - dx= step*zoomx; - fx= rect->xmin + zoomx*(-offsx); - if (fx > rect->xmin) fx -= dx*(floorf(fx-rect->xmin)); + dx = step * zoomx; + fx = rect->xmin + zoomx * (-offsx); + if (fx > rect->xmin) fx -= dx * (floorf(fx - rect->xmin)); while (fx < rect->xmax) { glVertex2f(fx, rect->ymin); glVertex2f(fx, rect->ymax); - fx+= dx; + fx += dx; } - dy= step*zoomy; - fy= rect->ymin + zoomy*(-offsy); - if (fy > rect->ymin) fy -= dy*(floorf(fy-rect->ymin)); + dy = step * zoomy; + fy = rect->ymin + zoomy * (-offsy); + if (fy > rect->ymin) fy -= dy * (floorf(fy - rect->ymin)); while (fy < rect->ymax) { glVertex2f(rect->xmin, fy); glVertex2f(rect->xmax, fy); - fy+= dy; + fy += dy; } glEnd(); @@ -1283,9 +1283,9 @@ static void ui_draw_but_curve_grid(rcti *rect, float zoomx, float zoomy, float o static void glColor3ubvShade(unsigned char *col, int shade) { - glColor3ub(col[0]-shade>0?col[0]-shade:0, - col[1]-shade>0?col[1]-shade:0, - col[2]-shade>0?col[2]-shade:0); + glColor3ub(col[0] - shade > 0 ? col[0] - shade : 0, + col[1] - shade > 0 ? col[1] - shade : 0, + col[2] - shade > 0 ? col[2] - shade : 0); } void ui_draw_but_CURVE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *rect) @@ -1298,8 +1298,8 @@ void ui_draw_but_CURVE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *rect rcti scissor_new; int a; - cumap= (CurveMapping *)(but->editcumap? but->editcumap: but->poin); - cuma= cumap->cm+cumap->cur; + cumap = (CurveMapping *)(but->editcumap ? but->editcumap : but->poin); + cuma = cumap->cm + cumap->cur; /* need scissor test, curve can draw outside of boundary */ glGetIntegerv(GL_VIEWPORT, scissor); @@ -1308,26 +1308,26 @@ void ui_draw_but_CURVE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *rect scissor_new.xmax = ar->winrct.xmin + rect->xmax; scissor_new.ymax = ar->winrct.ymin + rect->ymax; BLI_isect_rcti(&scissor_new, &ar->winrct, &scissor_new); - glScissor(scissor_new.xmin, scissor_new.ymin, scissor_new.xmax-scissor_new.xmin, scissor_new.ymax-scissor_new.ymin); + glScissor(scissor_new.xmin, scissor_new.ymin, scissor_new.xmax - scissor_new.xmin, scissor_new.ymax - scissor_new.ymin); /* calculate offset and zoom */ - zoomx= (rect->xmax-rect->xmin-2.0f*but->aspect)/(cumap->curr.xmax - cumap->curr.xmin); - zoomy= (rect->ymax-rect->ymin-2.0f*but->aspect)/(cumap->curr.ymax - cumap->curr.ymin); - offsx= cumap->curr.xmin-but->aspect/zoomx; - offsy= cumap->curr.ymin-but->aspect/zoomy; + zoomx = (rect->xmax - rect->xmin - 2.0f * but->aspect) / (cumap->curr.xmax - cumap->curr.xmin); + zoomy = (rect->ymax - rect->ymin - 2.0f * but->aspect) / (cumap->curr.ymax - cumap->curr.ymin); + offsx = cumap->curr.xmin - but->aspect / zoomx; + offsy = cumap->curr.ymin - but->aspect / zoomy; /* backdrop */ if (cumap->flag & CUMA_DO_CLIP) { glColor3ubvShade((unsigned char *)wcol->inner, -20); glRectf(rect->xmin, rect->ymin, rect->xmax, rect->ymax); - glColor3ubv((unsigned char*)wcol->inner); - glRectf(rect->xmin + zoomx*(cumap->clipr.xmin-offsx), - rect->ymin + zoomy*(cumap->clipr.ymin-offsy), - rect->xmin + zoomx*(cumap->clipr.xmax-offsx), - rect->ymin + zoomy*(cumap->clipr.ymax-offsy)); + glColor3ubv((unsigned char *)wcol->inner); + glRectf(rect->xmin + zoomx * (cumap->clipr.xmin - offsx), + rect->ymin + zoomy * (cumap->clipr.ymin - offsy), + rect->xmin + zoomx * (cumap->clipr.xmax - offsx), + rect->ymin + zoomy * (cumap->clipr.ymax - offsy)); } else { - glColor3ubv((unsigned char*)wcol->inner); + glColor3ubv((unsigned char *)wcol->inner); glRectf(rect->xmin, rect->ymin, rect->xmax, rect->ymax); } @@ -1340,22 +1340,22 @@ void ui_draw_but_CURVE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *rect /* axes */ glColor3ubvShade((unsigned char *)wcol->inner, -50); glBegin(GL_LINES); - glVertex2f(rect->xmin, rect->ymin + zoomy*(-offsy)); - glVertex2f(rect->xmax, rect->ymin + zoomy*(-offsy)); - glVertex2f(rect->xmin + zoomx*(-offsx), rect->ymin); - glVertex2f(rect->xmin + zoomx*(-offsx), rect->ymax); + glVertex2f(rect->xmin, rect->ymin + zoomy * (-offsy)); + glVertex2f(rect->xmax, rect->ymin + zoomy * (-offsy)); + glVertex2f(rect->xmin + zoomx * (-offsx), rect->ymin); + glVertex2f(rect->xmin + zoomx * (-offsx), rect->ymax); glEnd(); /* magic trigger for curve backgrounds */ if (but->a1 != -1) { if (but->a1 == UI_GRAD_H) { rcti grid; - float col[3]= {0.0f, 0.0f, 0.0f}; /* dummy arg */ + float col[3] = {0.0f, 0.0f, 0.0f}; /* dummy arg */ - grid.xmin = rect->xmin + zoomx*(-offsx); - grid.xmax = rect->xmax + zoomx*(-offsx); - grid.ymin = rect->ymin + zoomy*(-offsy); - grid.ymax = rect->ymax + zoomy*(-offsy); + grid.xmin = rect->xmin + zoomx * (-offsx); + grid.xmax = rect->xmax + zoomx * (-offsx); + grid.ymin = rect->ymin + zoomy * (-offsy); + grid.ymax = rect->ymax + zoomy * (-offsy); glEnable(GL_BLEND); ui_draw_gradient(&grid, col, UI_GRAD_H, 0.5f); @@ -1370,8 +1370,8 @@ void ui_draw_but_CURVE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *rect if (cumap->flag & CUMA_DRAW_CFRA) { glColor3ub(0x60, 0xc0, 0x40); glBegin(GL_LINES); - glVertex2f(rect->xmin + zoomx*(cumap->sample[0]-offsx), rect->ymin); - glVertex2f(rect->xmin + zoomx*(cumap->sample[0]-offsx), rect->ymax); + glVertex2f(rect->xmin + zoomx * (cumap->sample[0] - offsx), rect->ymin); + glVertex2f(rect->xmin + zoomx * (cumap->sample[0] - offsx), rect->ymax); glEnd(); } #endif @@ -1380,60 +1380,60 @@ void ui_draw_but_CURVE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *rect /* XXX 2.48 */ #if 0 if (cumap->flag & CUMA_DRAW_SAMPLE) { - if (cumap->cur==3) { - float lum= cumap->sample[0]*0.35f + cumap->sample[1]*0.45f + cumap->sample[2]*0.2f; + if (cumap->cur == 3) { + float lum = cumap->sample[0] * 0.35f + cumap->sample[1] * 0.45f + cumap->sample[2] * 0.2f; glColor3ub(240, 240, 240); glBegin(GL_LINES); - glVertex2f(rect->xmin + zoomx*(lum-offsx), rect->ymin); - glVertex2f(rect->xmin + zoomx*(lum-offsx), rect->ymax); + glVertex2f(rect->xmin + zoomx * (lum - offsx), rect->ymin); + glVertex2f(rect->xmin + zoomx * (lum - offsx), rect->ymax); glEnd(); } else { - if (cumap->cur==0) + if (cumap->cur == 0) glColor3ub(240, 100, 100); - else if (cumap->cur==1) + else if (cumap->cur == 1) glColor3ub(100, 240, 100); else glColor3ub(100, 100, 240); glBegin(GL_LINES); - glVertex2f(rect->xmin + zoomx*(cumap->sample[cumap->cur]-offsx), rect->ymin); - glVertex2f(rect->xmin + zoomx*(cumap->sample[cumap->cur]-offsx), rect->ymax); + glVertex2f(rect->xmin + zoomx * (cumap->sample[cumap->cur] - offsx), rect->ymin); + glVertex2f(rect->xmin + zoomx * (cumap->sample[cumap->cur] - offsx), rect->ymax); glEnd(); } } #endif /* the curve */ - glColor3ubv((unsigned char*)wcol->item); + glColor3ubv((unsigned char *)wcol->item); glEnable(GL_LINE_SMOOTH); glEnable(GL_BLEND); glBegin(GL_LINE_STRIP); - if (cuma->table==NULL) - curvemapping_changed(cumap, 0); /* 0 = no remove doubles */ - cmp= cuma->table; + if (cuma->table == NULL) + curvemapping_changed(cumap, 0); /* 0 = no remove doubles */ + cmp = cuma->table; /* first point */ - if ((cuma->flag & CUMA_EXTEND_EXTRAPOLATE)==0) - glVertex2f(rect->xmin, rect->ymin + zoomy*(cmp[0].y-offsy)); + if ((cuma->flag & CUMA_EXTEND_EXTRAPOLATE) == 0) + glVertex2f(rect->xmin, rect->ymin + zoomy * (cmp[0].y - offsy)); else { - fx= rect->xmin + zoomx*(cmp[0].x-offsx + cuma->ext_in[0]); - fy= rect->ymin + zoomy*(cmp[0].y-offsy + cuma->ext_in[1]); + fx = rect->xmin + zoomx * (cmp[0].x - offsx + cuma->ext_in[0]); + fy = rect->ymin + zoomy * (cmp[0].y - offsy + cuma->ext_in[1]); glVertex2f(fx, fy); } - for (a=0; a<=CM_TABLE; a++) { - fx= rect->xmin + zoomx*(cmp[a].x-offsx); - fy= rect->ymin + zoomy*(cmp[a].y-offsy); + for (a = 0; a <= CM_TABLE; a++) { + fx = rect->xmin + zoomx * (cmp[a].x - offsx); + fy = rect->ymin + zoomy * (cmp[a].y - offsy); glVertex2f(fx, fy); } /* last point */ - if ((cuma->flag & CUMA_EXTEND_EXTRAPOLATE)==0) - glVertex2f(rect->xmax, rect->ymin + zoomy*(cmp[CM_TABLE].y-offsy)); + if ((cuma->flag & CUMA_EXTEND_EXTRAPOLATE) == 0) + glVertex2f(rect->xmax, rect->ymin + zoomy * (cmp[CM_TABLE].y - offsy)); else { - fx= rect->xmin + zoomx*(cmp[CM_TABLE].x-offsx - cuma->ext_out[0]); - fy= rect->ymin + zoomy*(cmp[CM_TABLE].y-offsy - cuma->ext_out[1]); + fx = rect->xmin + zoomx * (cmp[CM_TABLE].x - offsx - cuma->ext_out[0]); + fy = rect->ymin + zoomy * (cmp[CM_TABLE].y - offsy - cuma->ext_out[1]); glVertex2f(fx, fy); } glEnd(); @@ -1441,16 +1441,16 @@ void ui_draw_but_CURVE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *rect glDisable(GL_BLEND); /* the points, use aspect to make them visible on edges */ - cmp= cuma->curve; + cmp = cuma->curve; glPointSize(3.0f); bglBegin(GL_POINTS); - for (a=0; atotpoint; a++) { + for (a = 0; a < cuma->totpoint; a++) { if (cmp[a].flag & SELECT) UI_ThemeColor(TH_TEXT_HI); else UI_ThemeColor(TH_TEXT); - fac[0]= rect->xmin + zoomx*(cmp[a].x-offsx); - fac[1]= rect->ymin + zoomy*(cmp[a].y-offsy); + fac[0] = rect->xmin + zoomx * (cmp[a].x - offsx); + fac[1] = rect->ymin + zoomy * (cmp[a].y - offsy); bglVertex2fv(fac); } bglEnd(); @@ -1460,25 +1460,25 @@ void ui_draw_but_CURVE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *rect glScissor(scissor[0], scissor[1], scissor[2], scissor[3]); /* outline */ - glColor3ubv((unsigned char*)wcol->outline); + glColor3ubv((unsigned char *)wcol->outline); fdrawbox(rect->xmin, rect->ymin, rect->xmax, rect->ymax); } static ImBuf *scale_trackpreview_ibuf(ImBuf *ibuf, float track_pos[2], int width, float height, int margin) { ImBuf *scaleibuf; - const float scalex= ((float)ibuf->x-2*margin) / width; - const float scaley= ((float)ibuf->y-2*margin) / height; - float off_x= (int)track_pos[0]-track_pos[0]+0.5f; - float off_y= (int)track_pos[1]-track_pos[1]+0.5f; + const float scalex = ((float)ibuf->x - 2 * margin) / width; + const float scaley = ((float)ibuf->y - 2 * margin) / height; + float off_x = (int)track_pos[0] - track_pos[0] + 0.5f; + float off_y = (int)track_pos[1] - track_pos[1] + 0.5f; int x, y; - scaleibuf= IMB_allocImBuf(width, height, 32, IB_rect); + scaleibuf = IMB_allocImBuf(width, height, 32, IB_rect); - for (y= 0; ypoin; - rect.xmin = (float)recti->xmin+1; - rect.xmax = (float)recti->xmax-1; - rect.ymin = (float)recti->ymin+SCOPE_RESIZE_PAD+2; - rect.ymax = (float)recti->ymax-1; + rect.xmin = (float)recti->xmin + 1; + rect.xmax = (float)recti->xmax - 1; + rect.ymin = (float)recti->ymin + SCOPE_RESIZE_PAD + 2; + rect.ymax = (float)recti->ymax - 1; glEnable(GL_BLEND); - glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); /* need scissor test, preview image can draw outside of boundary */ glGetIntegerv(GL_VIEWPORT, scissor); - glScissor(ar->winrct.xmin + (rect.xmin-1), ar->winrct.ymin+(rect.ymin-1), (rect.xmax+1)-(rect.xmin-1), (rect.ymax+1)-(rect.ymin-1)); + glScissor(ar->winrct.xmin + (rect.xmin - 1), ar->winrct.ymin + (rect.ymin - 1), (rect.xmax + 1) - (rect.xmin - 1), (rect.ymax + 1) - (rect.ymin - 1)); if (scopes->track_disabled) { glColor4f(0.7f, 0.3f, 0.3f, 0.3f); uiSetRoundBox(15); - uiDrawBox(GL_POLYGON, rect.xmin-1, rect.ymin, rect.xmax+1, rect.ymax+1, 3.0f); + uiDrawBox(GL_POLYGON, rect.xmin - 1, rect.ymin, rect.xmax + 1, rect.ymax + 1, 3.0f); - ok= 1; + ok = 1; } else if (scopes->track_preview) { /* additional margin around image */ /* NOTE: should be kept in sync with value from BKE_movieclip_update_scopes */ - const int margin= 3; + const int margin = 3; float zoomx, zoomy, track_pos[2], off_x, off_y; int a, width, height; ImBuf *drawibuf; glPushMatrix(); - track_pos[0]= scopes->track_pos[0]-margin; - track_pos[1]= scopes->track_pos[1]-margin; + track_pos[0] = scopes->track_pos[0] - margin; + track_pos[1] = scopes->track_pos[1] - margin; /* draw content of pattern area */ - glScissor(ar->winrct.xmin+rect.xmin, ar->winrct.ymin+rect.ymin, scissor[2], scissor[3]); + glScissor(ar->winrct.xmin + rect.xmin, ar->winrct.ymin + rect.ymin, scissor[2], scissor[3]); - width= rect.xmax-rect.xmin+1; - height = rect.ymax-rect.ymin; + width = rect.xmax - rect.xmin + 1; + height = rect.ymax - rect.ymin; if (width > 0 && height > 0) { - zoomx= (float)width / (scopes->track_preview->x-2*margin); - zoomy= (float)height / (scopes->track_preview->y-2*margin); + zoomx = (float)width / (scopes->track_preview->x - 2 * margin); + zoomy = (float)height / (scopes->track_preview->y - 2 * margin); - off_x= ((int)track_pos[0]-track_pos[0]+0.5f)*zoomx; - off_y= ((int)track_pos[1]-track_pos[1]+0.5f)*zoomy; + off_x = ((int)track_pos[0] - track_pos[0] + 0.5f) * zoomx; + off_y = ((int)track_pos[1] - track_pos[1] + 0.5f) * zoomy; - drawibuf= scale_trackpreview_ibuf(scopes->track_preview, track_pos, width, height, margin); + drawibuf = scale_trackpreview_ibuf(scopes->track_preview, track_pos, width, height, margin); - glaDrawPixelsSafe(rect.xmin, rect.ymin+1, drawibuf->x, drawibuf->y, + glaDrawPixelsSafe(rect.xmin, rect.ymin + 1, drawibuf->x, drawibuf->y, drawibuf->x, GL_RGBA, GL_UNSIGNED_BYTE, drawibuf->rect); IMB_freeImBuf(drawibuf); /* draw cross for pizel position */ - glTranslatef(off_x+rect.xmin+track_pos[0]*zoomx, off_y+rect.ymin+track_pos[1]*zoomy, 0.f); - glScissor(ar->winrct.xmin + rect.xmin, ar->winrct.ymin+rect.ymin, rect.xmax-rect.xmin, rect.ymax-rect.ymin); + glTranslatef(off_x + rect.xmin + track_pos[0] * zoomx, off_y + rect.ymin + track_pos[1] * zoomy, 0.f); + glScissor(ar->winrct.xmin + rect.xmin, ar->winrct.ymin + rect.ymin, rect.xmax - rect.xmin, rect.ymax - rect.ymin); - for (a= 0; a< 2; a++) { - if (a==1) { + for (a = 0; a < 2; a++) { + if (a == 1) { glLineStipple(3, 0xaaaa); glEnable(GL_LINE_STIPPLE); UI_ThemeColor(TH_SEL_MARKER); @@ -1560,24 +1560,24 @@ void ui_draw_but_TRACKPREVIEW(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wc } glBegin(GL_LINES); - glVertex2f(-10.0f, 0.0f); - glVertex2f(10.0f, 0.0f); - glVertex2f(0.0f, -10.0f); - glVertex2f(0.0f, 10.0f); - glEnd(); + glVertex2f(-10.0f, 0.0f); + glVertex2f(10.0f, 0.0f); + glVertex2f(0.0f, -10.0f); + glVertex2f(0.0f, 10.0f); + glEnd(); } } glDisable(GL_LINE_STIPPLE); glPopMatrix(); - ok= 1; + ok = 1; } if (!ok) { glColor4f(0.f, 0.f, 0.f, 0.3f); uiSetRoundBox(15); - uiDrawBox(GL_POLYGON, rect.xmin-1, rect.ymin, rect.xmax+1, rect.ymax+1, 3.0f); + uiDrawBox(GL_POLYGON, rect.xmin - 1, rect.ymin, rect.xmax + 1, rect.ymax + 1, 3.0f); } /* outline, scale gripper */ @@ -1598,10 +1598,10 @@ static void ui_shadowbox(float minx, float miny, float maxx, float maxy, float s glBegin(GL_POLYGON); glColor4ub(0, 0, 0, alpha); glVertex2f(maxx, miny); - glVertex2f(maxx, maxy-0.3f*shadsize); + glVertex2f(maxx, maxy - 0.3f * shadsize); glColor4ub(0, 0, 0, 0); - glVertex2f(maxx+shadsize, maxy-0.75f*shadsize); - glVertex2f(maxx+shadsize, miny); + glVertex2f(maxx + shadsize, maxy - 0.75f * shadsize); + glVertex2f(maxx + shadsize, miny); glEnd(); /* corner shape */ @@ -1609,19 +1609,19 @@ static void ui_shadowbox(float minx, float miny, float maxx, float maxy, float s glColor4ub(0, 0, 0, alpha); glVertex2f(maxx, miny); glColor4ub(0, 0, 0, 0); - glVertex2f(maxx+shadsize, miny); - glVertex2f(maxx+0.7f*shadsize, miny-0.7f*shadsize); - glVertex2f(maxx, miny-shadsize); + glVertex2f(maxx + shadsize, miny); + glVertex2f(maxx + 0.7f * shadsize, miny - 0.7f * shadsize); + glVertex2f(maxx, miny - shadsize); glEnd(); /* bottom quad */ glBegin(GL_POLYGON); glColor4ub(0, 0, 0, alpha); - glVertex2f(minx+0.3f*shadsize, miny); + glVertex2f(minx + 0.3f * shadsize, miny); glVertex2f(maxx, miny); glColor4ub(0, 0, 0, 0); - glVertex2f(maxx, miny-shadsize); - glVertex2f(minx+0.5f*shadsize, miny-shadsize); + glVertex2f(maxx, miny - shadsize); + glVertex2f(minx + 0.5f * shadsize, miny - shadsize); glEnd(); glDisable(GL_BLEND); @@ -1631,9 +1631,9 @@ static void ui_shadowbox(float minx, float miny, float maxx, float maxy, float s void uiDrawBoxShadow(unsigned char alpha, float minx, float miny, float maxx, float maxy) { /* accumulated outline boxes to make shade not linear, is more pleasant */ - ui_shadowbox(minx, miny, maxx, maxy, 11.0, (20*alpha)>>8); - ui_shadowbox(minx, miny, maxx, maxy, 7.0, (40*alpha)>>8); - ui_shadowbox(minx, miny, maxx, maxy, 5.0, (80*alpha)>>8); + ui_shadowbox(minx, miny, maxx, maxy, 11.0, (20 * alpha) >> 8); + ui_shadowbox(minx, miny, maxx, maxy, 7.0, (40 * alpha) >> 8); + ui_shadowbox(minx, miny, maxx, maxy, 5.0, (80 * alpha) >> 8); } @@ -1643,39 +1643,39 @@ void ui_dropshadow(rctf *rct, float radius, float aspect, int UNUSED(select)) int i; float rad; float a; - char alpha= 2; + char alpha = 2; glEnable(GL_BLEND); - if (radius > (rct->ymax-rct->ymin-10.0f)/2.0f) - rad= (rct->ymax-rct->ymin-10.0f)/2.0f; + if (radius > (rct->ymax - rct->ymin - 10.0f) / 2.0f) + rad = (rct->ymax - rct->ymin - 10.0f) / 2.0f; else - rad= radius; + rad = radius; - i= 12; + i = 12; #if 0 if (select) { - a= i*aspect; /* same as below */ + a = i * aspect; /* same as below */ } else #endif { - a= i*aspect; + a = i * aspect; } - for (; i--; a-=aspect) { + for (; i--; a -= aspect) { /* alpha ranges from 2 to 20 or so */ glColor4ub(0, 0, 0, alpha); - alpha+= 2; + alpha += 2; - uiDrawBox(GL_POLYGON, rct->xmin - a, rct->ymin - a, rct->xmax + a, rct->ymax-10.0f + a, rad+a); + uiDrawBox(GL_POLYGON, rct->xmin - a, rct->ymin - a, rct->xmax + a, rct->ymax - 10.0f + a, rad + a); } /* outline emphasis */ - glEnable( GL_LINE_SMOOTH ); + glEnable(GL_LINE_SMOOTH); glColor4ub(0, 0, 0, 100); - uiDrawBox(GL_LINE_LOOP, rct->xmin-0.5f, rct->ymin-0.5f, rct->xmax+0.5f, rct->ymax+0.5f, radius+0.5f); - glDisable( GL_LINE_SMOOTH ); + uiDrawBox(GL_LINE_LOOP, rct->xmin - 0.5f, rct->ymin - 0.5f, rct->xmax + 0.5f, rct->ymax + 0.5f, radius + 0.5f); + glDisable(GL_LINE_SMOOTH); glDisable(GL_BLEND); } diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index ce437fde69e..4213a67130b 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -81,11 +81,11 @@ static void ui_add_link(bContext *C, uiBut *from, uiBut *to); /***************** structs and defines ****************/ -#define BUTTON_TOOLTIP_DELAY 0.500 -#define BUTTON_FLASH_DELAY 0.020 -#define MENU_SCROLL_INTERVAL 0.1 -#define BUTTON_AUTO_OPEN_THRESH 0.3 -#define BUTTON_MOUSE_TOWARDS_THRESH 1.0 +#define BUTTON_TOOLTIP_DELAY 0.500 +#define BUTTON_FLASH_DELAY 0.020 +#define MENU_SCROLL_INTERVAL 0.1 +#define BUTTON_AUTO_OPEN_THRESH 0.3 +#define BUTTON_MOUSE_TOWARDS_THRESH 1.0 typedef enum uiButtonActivateType { BUTTON_ACTIVATE_OVER, @@ -213,7 +213,7 @@ static int ui_but_editable(uiBut *but) static uiBut *ui_but_prev(uiBut *but) { while (but->prev) { - but= but->prev; + but = but->prev; if (!ui_but_editable(but)) return but; } return NULL; @@ -222,7 +222,7 @@ static uiBut *ui_but_prev(uiBut *but) static uiBut *ui_but_next(uiBut *but) { while (but->next) { - but= but->next; + but = but->next; if (!ui_but_editable(but)) return but; } return NULL; @@ -232,10 +232,10 @@ static uiBut *ui_but_first(uiBlock *block) { uiBut *but; - but= block->buttons.first; + but = block->buttons.first; while (but) { if (!ui_but_editable(but)) return but; - but= but->next; + but = but->next; } return NULL; } @@ -244,10 +244,10 @@ static uiBut *ui_but_last(uiBlock *block) { uiBut *but; - but= block->buttons.last; + but = block->buttons.last; while (but) { if (!ui_but_editable(but)) return but; - but= but->prev; + but = but->prev; } return NULL; } @@ -265,7 +265,7 @@ static int ui_is_a_warp_but(uiBut *but) int ui_is_but_utf8(uiBut *but) { if (but->rnaprop) { - const int subtype= RNA_property_subtype(but->rnaprop); + const int subtype = RNA_property_subtype(but->rnaprop); return !(ELEM4(subtype, PROP_FILEPATH, PROP_DIRPATH, PROP_FILENAME, PROP_BYTESTRING)); } else { @@ -280,56 +280,56 @@ static ListBase UIAfterFuncs = {NULL, NULL}; static void ui_apply_but_func(bContext *C, uiBut *but) { uiAfterFunc *after; - uiBlock *block= but->block; + uiBlock *block = but->block; /* these functions are postponed and only executed after all other * handling is done, i.e. menus are closed, in order to avoid conflicts * with these functions removing the buttons we are working with */ if (but->func || but->funcN || block->handle_func || but->rename_func || (but->type == BUTM && block->butm_func) || but->optype || but->rnaprop) { - after= MEM_callocN(sizeof(uiAfterFunc), "uiAfterFunc"); + after = MEM_callocN(sizeof(uiAfterFunc), "uiAfterFunc"); if (but->func && ELEM(but, but->func_arg1, but->func_arg2)) { /* exception, this will crash due to removed button otherwise */ but->func(C, but->func_arg1, but->func_arg2); } else - after->func= but->func; + after->func = but->func; - after->func_arg1= but->func_arg1; - after->func_arg2= but->func_arg2; - after->func_arg3= but->func_arg3; + after->func_arg1 = but->func_arg1; + after->func_arg2 = but->func_arg2; + after->func_arg3 = but->func_arg3; - after->funcN= but->funcN; - after->func_argN= MEM_dupallocN(but->func_argN); + after->funcN = but->funcN; + after->func_argN = MEM_dupallocN(but->func_argN); - after->rename_func= but->rename_func; - after->rename_arg1= but->rename_arg1; - after->rename_orig= but->rename_orig; /* needs free! */ - - after->handle_func= block->handle_func; - after->handle_func_arg= block->handle_func_arg; - after->retval= but->retval; + after->rename_func = but->rename_func; + after->rename_arg1 = but->rename_arg1; + after->rename_orig = but->rename_orig; /* needs free! */ + + after->handle_func = block->handle_func; + after->handle_func_arg = block->handle_func_arg; + after->retval = but->retval; if (but->type == BUTM) { - after->butm_func= block->butm_func; - after->butm_func_arg= block->butm_func_arg; - after->a2= but->a2; + after->butm_func = block->butm_func; + after->butm_func_arg = block->butm_func_arg; + after->a2 = but->a2; } - after->optype= but->optype; - after->opcontext= but->opcontext; - after->opptr= but->opptr; + after->optype = but->optype; + after->opcontext = but->opcontext; + after->opptr = but->opptr; - after->rnapoin= but->rnapoin; - after->rnaprop= but->rnaprop; + after->rnapoin = but->rnapoin; + after->rnaprop = but->rnaprop; if (but->context) - after->context= CTX_store_copy(but->context); + after->context = CTX_store_copy(but->context); - but->optype= NULL; - but->opcontext= 0; - but->opptr= NULL; + but->optype = NULL; + but->opcontext = 0; + but->opptr = NULL; BLI_addtail(&UIAfterFuncs, after); } @@ -337,25 +337,25 @@ static void ui_apply_but_func(bContext *C, uiBut *but) static void ui_apply_autokey_undo(bContext *C, uiBut *but) { - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); uiAfterFunc *after; if (but->flag & UI_BUT_UNDO) { - const char *str= NULL; + const char *str = NULL; /* define which string to use for undo */ if (ELEM(but->type, LINK, INLINK)) str = "Add button link"; else if (ELEM(but->type, MENU, ICONTEXTROW)) str = but->drawstr; - else if (but->drawstr[0]) str= but->drawstr; - else str= but->tip; + else if (but->drawstr[0]) str = but->drawstr; + else str = but->tip; /* fallback, else we don't get an undo! */ if (str == NULL || str[0] == '\0') { - str= "Unknown Action"; + str = "Unknown Action"; } /* delayed, after all other funcs run, popups are closed, etc */ - after= MEM_callocN(sizeof(uiAfterFunc), "uiAfterFunc"); + after = MEM_callocN(sizeof(uiAfterFunc), "uiAfterFunc"); BLI_strncpy(after->undostr, str, sizeof(after->undostr)); BLI_addtail(&UIAfterFuncs, after); } @@ -371,11 +371,11 @@ static void ui_apply_but_funcs_after(bContext *C) ListBase funcs; /* copy to avoid recursive calls */ - funcs= UIAfterFuncs; - UIAfterFuncs.first= UIAfterFuncs.last= NULL; + funcs = UIAfterFuncs; + UIAfterFuncs.first = UIAfterFuncs.last = NULL; - for (afterf=funcs.first; afterf; afterf=after.next) { - after= *afterf; /* copy to avoid memleak on exit() */ + for (afterf = funcs.first; afterf; afterf = after.next) { + after = *afterf; /* copy to avoid memleak on exit() */ BLI_freelinkN(&funcs, afterf); if (after.context) @@ -383,12 +383,12 @@ static void ui_apply_but_funcs_after(bContext *C) if (after.opptr) { /* free in advance to avoid leak on exit */ - opptr= *after.opptr, + opptr = *after.opptr, MEM_freeN(after.opptr); } if (after.optype) - WM_operator_name_call(C, after.optype->idname, after.opcontext, (after.opptr)? &opptr: NULL); + WM_operator_name_call(C, after.optype->idname, after.opcontext, (after.opptr) ? &opptr : NULL); if (after.opptr) WM_operator_properties_free(&opptr); @@ -427,8 +427,8 @@ static void ui_apply_but_BUT(bContext *C, uiBut *but, uiHandleButtonData *data) { ui_apply_but_func(C, but); - data->retval= but->retval; - data->applied= 1; + data->retval = but->retval; + data->applied = 1; } static void ui_apply_but_BUTM(bContext *C, uiBut *but, uiHandleButtonData *data) @@ -436,8 +436,8 @@ static void ui_apply_but_BUTM(bContext *C, uiBut *but, uiHandleButtonData *data) ui_set_but_val(but, but->hardmin); ui_apply_but_func(C, but); - data->retval= but->retval; - data->applied= 1; + data->retval = but->retval; + data->applied = 1; } static void ui_apply_but_BLOCK(bContext *C, uiBut *but, uiHandleButtonData *data) @@ -447,8 +447,8 @@ static void ui_apply_but_BLOCK(bContext *C, uiBut *but, uiHandleButtonData *data ui_check_but(but); ui_apply_but_func(C, but); - data->retval= but->retval; - data->applied= 1; + data->retval = but->retval; + data->applied = 1; } static void ui_apply_but_TOG(bContext *C, uiBut *but, uiHandleButtonData *data) @@ -457,57 +457,57 @@ static void ui_apply_but_TOG(bContext *C, uiBut *but, uiHandleButtonData *data) int w, lvalue, push; /* local hack... */ - if (but->type==BUT_TOGDUAL && data->togdual) { - if (but->pointype==SHO) + if (but->type == BUT_TOGDUAL && data->togdual) { + if (but->pointype == SHO) but->poin += 2; - else if (but->pointype==INT) + else if (but->pointype == INT) but->poin += 4; } - value= ui_get_but_val(but); - lvalue= (int)value; + value = ui_get_but_val(but); + lvalue = (int)value; if (but->bit) { - w= BTST(lvalue, but->bitnr); + w = BTST(lvalue, but->bitnr); if (w) lvalue = BCLR(lvalue, but->bitnr); else lvalue = BSET(lvalue, but->bitnr); - if (but->type==TOGR) { + if (but->type == TOGR) { if (!data->togonly) { - lvalue= 1<<(but->bitnr); + lvalue = 1 << (but->bitnr); ui_set_but_val(but, (double)lvalue); } else { - if (lvalue==0) lvalue= 1<<(but->bitnr); + if (lvalue == 0) lvalue = 1 << (but->bitnr); } } ui_set_but_val(but, (double)lvalue); - if (but->type==ICONTOG || but->type==ICONTOGN) ui_check_but(but); + if (but->type == ICONTOG || but->type == ICONTOGN) ui_check_but(but); } else { - if (value==0.0) push= 1; - else push= 0; + if (value == 0.0) push = 1; + else push = 0; - if (ELEM3(but->type, TOGN, ICONTOGN, OPTIONN)) push= !push; + if (ELEM3(but->type, TOGN, ICONTOGN, OPTIONN)) push = !push; ui_set_but_val(but, (double)push); - if (but->type==ICONTOG || but->type==ICONTOGN) ui_check_but(but); + if (but->type == ICONTOG || but->type == ICONTOGN) ui_check_but(but); } /* end local hack... */ - if (but->type==BUT_TOGDUAL && data->togdual) { - if (but->pointype==SHO) + if (but->type == BUT_TOGDUAL && data->togdual) { + if (but->pointype == SHO) but->poin -= 2; - else if (but->pointype==INT) + else if (but->pointype == INT) but->poin -= 4; } ui_apply_but_func(C, but); - data->retval= but->retval; - data->applied= 1; + data->retval = but->retval; + data->applied = 1; } static void ui_apply_but_ROW(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data) @@ -517,14 +517,14 @@ static void ui_apply_but_ROW(bContext *C, uiBlock *block, uiBut *but, uiHandleBu ui_set_but_val(but, but->hardmax); /* states of other row buttons */ - for (bt= block->buttons.first; bt; bt= bt->next) - if (bt!=but && bt->poin==but->poin && ELEM(bt->type, ROW, LISTROW)) + for (bt = block->buttons.first; bt; bt = bt->next) + if (bt != but && bt->poin == but->poin && ELEM(bt->type, ROW, LISTROW)) ui_check_but(bt); ui_apply_but_func(C, but); - data->retval= but->retval; - data->applied= 1; + data->retval = but->retval; + data->applied = 1; } static void ui_apply_but_TEX(bContext *C, uiBut *but, uiHandleButtonData *data) @@ -538,22 +538,22 @@ static void ui_apply_but_TEX(bContext *C, uiBut *but, uiHandleButtonData *data) /* give butfunc the original text too */ /* feature used for bone renaming, channels, etc */ /* afterfunc frees origstr */ - but->rename_orig= data->origstr; - data->origstr= NULL; + but->rename_orig = data->origstr; + data->origstr = NULL; ui_apply_but_func(C, but); - data->retval= but->retval; - data->applied= 1; + data->retval = but->retval; + data->applied = 1; } static void ui_apply_but_NUM(bContext *C, uiBut *but, uiHandleButtonData *data) { if (data->str) { if (ui_set_but_string(C, but, data->str)) { - data->value= ui_get_but_val(but); + data->value = ui_get_but_val(but); } else { - data->cancel= 1; + data->cancel = 1; return; } } @@ -563,43 +563,43 @@ static void ui_apply_but_NUM(bContext *C, uiBut *but, uiHandleButtonData *data) ui_check_but(but); ui_apply_but_func(C, but); - data->retval= but->retval; - data->applied= 1; + data->retval = but->retval; + data->applied = 1; } static void ui_apply_but_TOG3(bContext *C, uiBut *but, uiHandleButtonData *data) { - if (but->pointype==SHO ) { - short *sp= (short *)but->poin; + if (but->pointype == SHO) { + short *sp = (short *)but->poin; - if ( BTST(sp[1], but->bitnr)) { - sp[1]= BCLR(sp[1], but->bitnr); - sp[0]= BCLR(sp[0], but->bitnr); + if (BTST(sp[1], but->bitnr)) { + sp[1] = BCLR(sp[1], but->bitnr); + sp[0] = BCLR(sp[0], but->bitnr); } - else if ( BTST(sp[0], but->bitnr)) { - sp[1]= BSET(sp[1], but->bitnr); + else if (BTST(sp[0], but->bitnr)) { + sp[1] = BSET(sp[1], but->bitnr); } else { - sp[0]= BSET(sp[0], but->bitnr); + sp[0] = BSET(sp[0], but->bitnr); } } else { - if ( BTST(*(but->poin+2), but->bitnr)) { - *(but->poin+2)= BCLR(*(but->poin+2), but->bitnr); - *(but->poin)= BCLR(*(but->poin), but->bitnr); + if (BTST(*(but->poin + 2), but->bitnr)) { + *(but->poin + 2) = BCLR(*(but->poin + 2), but->bitnr); + *(but->poin) = BCLR(*(but->poin), but->bitnr); } - else if ( BTST(*(but->poin), but->bitnr)) { - *(but->poin+2)= BSET(*(but->poin+2), but->bitnr); + else if (BTST(*(but->poin), but->bitnr)) { + *(but->poin + 2) = BSET(*(but->poin + 2), but->bitnr); } else { - *(but->poin)= BSET(*(but->poin), but->bitnr); + *(but->poin) = BSET(*(but->poin), but->bitnr); } } ui_check_but(but); ui_apply_but_func(C, but); - data->retval= but->retval; - data->applied= 1; + data->retval = but->retval; + data->applied = 1; } static void ui_apply_but_VEC(bContext *C, uiBut *but, uiHandleButtonData *data) @@ -608,22 +608,22 @@ static void ui_apply_but_VEC(bContext *C, uiBut *but, uiHandleButtonData *data) ui_check_but(but); ui_apply_but_func(C, but); - data->retval= but->retval; - data->applied= 1; + data->retval = but->retval; + data->applied = 1; } static void ui_apply_but_COLORBAND(bContext *C, uiBut *but, uiHandleButtonData *data) { ui_apply_but_func(C, but); - data->retval= but->retval; - data->applied= 1; + data->retval = but->retval; + data->applied = 1; } static void ui_apply_but_CURVE(bContext *C, uiBut *but, uiHandleButtonData *data) { ui_apply_but_func(C, but); - data->retval= but->retval; - data->applied= 1; + data->retval = but->retval; + data->applied = 1; } static void ui_apply_but_IDPOIN(bContext *C, uiBut *but, uiHandleButtonData *data) @@ -631,16 +631,16 @@ static void ui_apply_but_IDPOIN(bContext *C, uiBut *but, uiHandleButtonData *dat ui_set_but_string(C, but, data->str); ui_check_but(but); ui_apply_but_func(C, but); - data->retval= but->retval; - data->applied= 1; + data->retval = but->retval; + data->applied = 1; } #ifdef WITH_INTERNATIONAL static void ui_apply_but_CHARTAB(bContext *C, uiBut *but, uiHandleButtonData *data) { ui_apply_but_func(C, but); - data->retval= but->retval; - data->applied= 1; + data->retval = but->retval; + data->applied = 1; } #endif @@ -649,21 +649,21 @@ static void ui_apply_but_CHARTAB(bContext *C, uiBut *but, uiHandleButtonData *da static int ui_but_mouse_inside_icon(uiBut *but, ARegion *ar, wmEvent *event) { rcti rect; - int x= event->x, y= event->y; + int x = event->x, y = event->y; ui_window_to_block(ar, but->block, &x, &y); rect.xmin = but->x1; rect.xmax = but->x2; rect.ymin = but->y1; rect.ymax = but->y2; - if (but->imb); /* use button size itself */ + if (but->imb) ; /* use button size itself */ else if (but->flag & UI_ICON_LEFT) { - rect.xmax = rect.xmin + (rect.ymax-rect.ymin); + rect.xmax = rect.xmin + (rect.ymax - rect.ymin); } else { - int delta= (rect.xmax-rect.xmin) - (rect.ymax-rect.ymin); - rect.xmin += delta/2; - rect.xmax -= delta/2; + int delta = (rect.xmax - rect.xmin) - (rect.ymax - rect.ymin); + rect.xmin += delta / 2; + rect.xmax -= delta / 2; } return BLI_in_rcti(&rect, x, y); @@ -674,15 +674,15 @@ static int ui_but_start_drag(bContext *C, uiBut *but, uiHandleButtonData *data, /* prevent other WM gestures to start while we try to drag */ WM_gestures_remove(C); - if ( ABS(data->dragstartx - event->x) + ABS(data->dragstarty - event->y) > U.dragthreshold ) { + if (ABS(data->dragstartx - event->x) + ABS(data->dragstarty - event->y) > U.dragthreshold) { wmDrag *drag; button_activate_state(C, but, BUTTON_STATE_EXIT); - data->cancel= 1; + data->cancel = 1; - drag= WM_event_start_drag(C, but->icon, but->dragtype, but->dragpoin, ui_get_but_val(but)); + drag = WM_event_start_drag(C, but->icon, but->dragtype, but->dragpoin, ui_get_but_val(but)); if (but->imb) - WM_event_drag_image(drag, but->imb, but->imb_scale, but->x2-but->x1, but->y2-but->y1); + WM_event_drag_image(drag, but->imb, but->imb_scale, but->x2 - but->x1, but->y2 - but->y1); return 1; } @@ -698,33 +698,33 @@ static void ui_delete_active_linkline(uiBlock *block) uiLinkLine *line, *nline; int a, b; - but= block->buttons.first; + but = block->buttons.first; while (but) { - if (but->type==LINK && but->link) { - line= but->link->lines.first; + if (but->type == LINK && but->link) { + line = but->link->lines.first; while (line) { - nline= line->next; + nline = line->next; if (line->flag & UI_SELECT) { BLI_remlink(&but->link->lines, line); - link= line->from->link; + link = line->from->link; /* are there more pointers allowed? */ if (link->ppoin) { - if (*(link->totlink)==1) { - *(link->totlink)= 0; + if (*(link->totlink) == 1) { + *(link->totlink) = 0; MEM_freeN(*(link->ppoin)); - *(link->ppoin)= NULL; + *(link->ppoin) = NULL; } else { - b= 0; - for (a=0; a< (*(link->totlink)); a++) { + b = 0; + for (a = 0; a < (*(link->totlink)); a++) { - if ( (*(link->ppoin))[a] != line->to->poin ) { - (*(link->ppoin))[b]= (*(link->ppoin))[a]; + if ( (*(link->ppoin))[a] != line->to->poin) { + (*(link->ppoin))[b] = (*(link->ppoin))[a]; b++; } } @@ -732,15 +732,15 @@ static void ui_delete_active_linkline(uiBlock *block) } } else { - *(link->poin)= NULL; + *(link->poin) = NULL; } MEM_freeN(line); } - line= nline; + line = nline; } } - but= but->next; + but = but->next; } } @@ -750,12 +750,12 @@ static uiLinkLine *ui_is_a_link(uiBut *from, uiBut *to) uiLinkLine *line; uiLink *link; - link= from->link; + link = from->link; if (link) { - line= link->lines.first; + line = link->lines.first; while (line) { - if (line->from==from && line->to==to) return line; - line= line->next; + if (line->from == from && line->to == to) return line; + line = line->next; } } return NULL; @@ -765,27 +765,27 @@ static uiLinkLine *ui_is_a_link(uiBut *from, uiBut *to) /* Try to add an AND Controller between the sensor and the actuator logic bricks and to connect them all */ static void ui_add_smart_controller(bContext *C, uiBut *from, uiBut *to) { - Object *ob= NULL; + Object *ob = NULL; bSensor *sens_iter; bActuator *act_to, *act_iter; bController *cont; bController ***sens_from_links; uiBut *tmp_but; - uiLink *link= from->link; + uiLink *link = from->link; if (link->ppoin) - sens_from_links= (bController ***)(link->ppoin); + sens_from_links = (bController ***)(link->ppoin); else return; act_to = (bActuator *)(to->poin); /* (1) get the object */ - CTX_DATA_BEGIN(C, Object*, ob_iter, selected_editable_objects) { - for (sens_iter= ob_iter->sensors.first; sens_iter; sens_iter= sens_iter->next) + CTX_DATA_BEGIN(C, Object *, ob_iter, selected_editable_objects) { + for (sens_iter = ob_iter->sensors.first; sens_iter; sens_iter = sens_iter->next) { if (&(sens_iter->links) == sens_from_links) { - ob= ob_iter; + ob = ob_iter; break; } } @@ -795,7 +795,7 @@ static void ui_add_smart_controller(bContext *C, uiBut *from, uiBut *to) if (!ob) return; /* (2) check if the sensor and the actuator are from the same object */ - for (act_iter= ob->actuators.first; act_iter; act_iter= (bActuator *)act_iter->next) { + for (act_iter = ob->actuators.first; act_iter; act_iter = (bActuator *)act_iter->next) { if (act_iter == act_to) break; } @@ -810,13 +810,13 @@ static void ui_add_smart_controller(bContext *C, uiBut *from, uiBut *to) /* (4) link the sensor->controller->actuator */ tmp_but = MEM_callocN(sizeof(uiBut), "uiBut"); uiSetButLink(tmp_but, (void **)&cont, (void ***)&(cont->links), &(cont->totlinks), from->link->tocode, (int)to->hardmin); - tmp_but->hardmin= from->link->tocode; - tmp_but->poin= (char *)cont; + tmp_but->hardmin = from->link->tocode; + tmp_but->poin = (char *)cont; - tmp_but->type= INLINK; + tmp_but->type = INLINK; ui_add_link(C, from, tmp_but); - tmp_but->type= LINK; + tmp_but->type = LINK; ui_add_link(C, tmp_but, to); /* (5) garbage collection */ @@ -833,45 +833,45 @@ static void ui_add_link(bContext *C, uiBut *from, uiBut *to) void **oldppoin; int a; - if ( (line= ui_is_a_link(from, to)) ) { + if ( (line = ui_is_a_link(from, to)) ) { line->flag |= UI_SELECT; ui_delete_active_linkline(from->block); return; } - if (from->type==INLINK && to->type==INLINK) { + if (from->type == INLINK && to->type == INLINK) { return; } - else if (from->type==LINK && to->type==INLINK) { - if ( from->link->tocode != (int)to->hardmin ) { + else if (from->type == LINK && to->type == INLINK) { + if (from->link->tocode != (int)to->hardmin) { ui_add_smart_controller(C, from, to); return; } } - else if (from->type==INLINK && to->type==LINK) { - if ( to->link->tocode == (int)from->hardmin ) { + else if (from->type == INLINK && to->type == LINK) { + if (to->link->tocode == (int)from->hardmin) { return; } } - link= from->link; + link = from->link; /* are there more pointers allowed? */ if (link->ppoin) { - oldppoin= *(link->ppoin); + oldppoin = *(link->ppoin); (*(link->totlink))++; - *(link->ppoin)= MEM_callocN( *(link->totlink)*sizeof(void *), "new link"); + *(link->ppoin) = MEM_callocN(*(link->totlink) * sizeof(void *), "new link"); - for (a=0; a< (*(link->totlink))-1; a++) { - (*(link->ppoin))[a]= oldppoin[a]; + for (a = 0; a < (*(link->totlink)) - 1; a++) { + (*(link->ppoin))[a] = oldppoin[a]; } - (*(link->ppoin))[a]= to->poin; + (*(link->ppoin))[a] = to->poin; if (oldppoin) MEM_freeN(oldppoin); } else { - *(link->poin)= to->poin; + *(link->poin) = to->poin; } } @@ -879,52 +879,52 @@ static void ui_add_link(bContext *C, uiBut *from, uiBut *to) static void ui_apply_but_LINK(bContext *C, uiBut *but, uiHandleButtonData *data) { - ARegion *ar= CTX_wm_region(C); + ARegion *ar = CTX_wm_region(C); uiBut *bt; - for (bt= but->block->buttons.first; bt; bt= bt->next) { - if ( ui_mouse_inside_button(ar, bt, but->linkto[0]+ar->winrct.xmin, but->linkto[1]+ar->winrct.ymin) ) + for (bt = but->block->buttons.first; bt; bt = bt->next) { + if (ui_mouse_inside_button(ar, bt, but->linkto[0] + ar->winrct.xmin, but->linkto[1] + ar->winrct.ymin) ) break; } - if (bt && bt!=but) { + if (bt && bt != but) { if (!ELEM(bt->type, LINK, INLINK) || !ELEM(but->type, LINK, INLINK)) return; - if (but->type==LINK) ui_add_link(C, but, bt); + if (but->type == LINK) ui_add_link(C, but, bt); else ui_add_link(C, bt, but); ui_apply_but_func(C, but); - data->retval= but->retval; + data->retval = but->retval; } - data->applied= 1; + data->applied = 1; } static void ui_apply_but_IMAGE(bContext *C, uiBut *but, uiHandleButtonData *data) { ui_apply_but_func(C, but); - data->retval= but->retval; - data->applied= 1; + data->retval = but->retval; + data->applied = 1; } static void ui_apply_but_HISTOGRAM(bContext *C, uiBut *but, uiHandleButtonData *data) { ui_apply_but_func(C, but); - data->retval= but->retval; - data->applied= 1; + data->retval = but->retval; + data->applied = 1; } static void ui_apply_but_WAVEFORM(bContext *C, uiBut *but, uiHandleButtonData *data) { ui_apply_but_func(C, but); - data->retval= but->retval; - data->applied= 1; + data->retval = but->retval; + data->applied = 1; } static void ui_apply_but_TRACKPREVIEW(bContext *C, uiBut *but, uiHandleButtonData *data) { ui_apply_but_func(C, but); - data->retval= but->retval; - data->applied= 1; + data->retval = but->retval; + data->applied = 1; } @@ -936,7 +936,7 @@ static void ui_apply_button(bContext *C, uiBlock *block, uiBut *but, uiHandleBut ColorBand *editcoba; CurveMapping *editcumap; - data->retval= 0; + data->retval = 0; /* if we cancel and have not applied yet, there is nothing to do, * otherwise we have to restore the original value again */ @@ -945,36 +945,36 @@ static void ui_apply_button(bContext *C, uiBlock *block, uiBut *but, uiHandleBut return; if (data->str) MEM_freeN(data->str); - data->str= data->origstr; - data->origstr= NULL; - data->value= data->origvalue; - data->origvalue= 0.0; + data->str = data->origstr; + data->origstr = NULL; + data->value = data->origvalue; + data->origvalue = 0.0; copy_v3_v3(data->vec, data->origvec); - data->origvec[0]= data->origvec[1]= data->origvec[2]= 0.0f; + data->origvec[0] = data->origvec[1] = data->origvec[2] = 0.0f; } else { /* we avoid applying interactive edits a second time * at the end with the appliedinteractive flag */ if (interactive) - data->appliedinteractive= 1; + data->appliedinteractive = 1; else if (data->appliedinteractive) return; } /* ensures we are writing actual values */ - editstr= but->editstr; - editval= but->editval; - editvec= but->editvec; - editcoba= but->editcoba; - editcumap= but->editcumap; - but->editstr= NULL; - but->editval= NULL; - but->editvec= NULL; - but->editcoba= NULL; - but->editcumap= NULL; + editstr = but->editstr; + editval = but->editval; + editvec = but->editvec; + editcoba = but->editcoba; + editcumap = but->editcumap; + but->editstr = NULL; + but->editval = NULL; + but->editvec = NULL; + but->editcoba = NULL; + but->editcumap = NULL; /* handle different types */ - switch(but->type) { + switch (but->type) { case BUT: ui_apply_but_BUT(C, but, data); break; @@ -1063,11 +1063,11 @@ static void ui_apply_button(bContext *C, uiBlock *block, uiBut *but, uiHandleBut break; } - but->editstr= editstr; - but->editval= editval; - but->editvec= editvec; - but->editcoba= editcoba; - but->editcumap= editcumap; + but->editstr = editstr; + but->editval = editval; + but->editvec = editvec; + but->editcoba = editcoba; + but->editcumap = editcumap; } /* ******************* drop event ******************** */ @@ -1076,17 +1076,17 @@ static void ui_apply_button(bContext *C, uiBlock *block, uiBut *but, uiHandleBut static void ui_but_drop(bContext *C, wmEvent *event, uiBut *but, uiHandleButtonData *data) { wmDrag *wmd; - ListBase *drags= event->customdata; /* drop event type has listbase customdata by default */ + ListBase *drags = event->customdata; /* drop event type has listbase customdata by default */ - for (wmd= drags->first; wmd; wmd= wmd->next) { - if (wmd->type==WM_DRAG_ID) { + for (wmd = drags->first; wmd; wmd = wmd->next) { + if (wmd->type == WM_DRAG_ID) { /* align these types with UI_but_active_drop_name */ if (ELEM3(but->type, TEX, IDPOIN, SEARCH_MENU)) { - ID *id= (ID *)wmd->poin; + ID *id = (ID *)wmd->poin; - if (but->poin==NULL && but->rnapoin.data==NULL) {} + if (but->poin == NULL && but->rnapoin.data == NULL) {} button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING); - BLI_strncpy(data->str, id->name+2, data->maxlen); + BLI_strncpy(data->str, id->name + 2, data->maxlen); button_activate_state(C, but, BUTTON_STATE_EXIT); } } @@ -1100,22 +1100,22 @@ static void ui_but_drop(bContext *C, wmEvent *event, uiBut *but, uiHandleButtonD static void ui_but_copy_paste(bContext *C, uiBut *but, uiHandleButtonData *data, char mode) { static ColorBand but_copypaste_coba = {0}; - char buf[UI_MAX_DRAW_STR+1]= {0}; + char buf[UI_MAX_DRAW_STR + 1] = {0}; - if (mode=='v' && but->lock) + if (mode == 'v' && but->lock) return; - if (mode=='v') { + if (mode == 'v') { /* extract first line from clipboard in case of multi-line copies */ - char *p, *pbuf= WM_clipboard_text_get(0); - p= pbuf; + char *p, *pbuf = WM_clipboard_text_get(0); + p = pbuf; if (p) { int i = 0; - while (*p && *p!='\r' && *p!='\n' && itype, NUM, NUMABS, NUMSLI, HSVSLI)) { - if (but->poin==NULL && but->rnapoin.data==NULL); - else if (mode=='c') { + if (but->poin == NULL && but->rnapoin.data == NULL) ; + else if (mode == 'c') { ui_get_but_string(but, buf, sizeof(buf)); WM_clipboard_text_set(buf, 0); } @@ -1133,7 +1133,7 @@ static void ui_but_copy_paste(bContext *C, uiBut *but, uiHandleButtonData *data, if (ui_set_but_string_eval_num(C, but, buf, &val)) { button_activate_state(C, but, BUTTON_STATE_NUM_EDITING); - data->value= val; + data->value = val; ui_set_but_string(C, but, buf); button_activate_state(C, but, BUTTON_STATE_EXIT); } @@ -1141,11 +1141,11 @@ static void ui_but_copy_paste(bContext *C, uiBut *but, uiHandleButtonData *data, } /* RGB triple */ - else if (but->type==COL) { + else if (but->type == COL) { float rgb[3]; - if (but->poin==NULL && but->rnapoin.data==NULL); - else if (mode=='c') { + if (but->poin == NULL && but->rnapoin.data == NULL) ; + else if (mode == 'c') { ui_get_but_vectorf(but, rgb); BLI_snprintf(buf, sizeof(buf), "[%f, %f, %f]", rgb[0], rgb[1], rgb[2]); @@ -1163,21 +1163,21 @@ static void ui_but_copy_paste(bContext *C, uiBut *but, uiHandleButtonData *data, /* text/string and ID data */ else if (ELEM3(but->type, TEX, IDPOIN, SEARCH_MENU)) { - uiHandleButtonData *active_data= but->active; + uiHandleButtonData *active_data = but->active; - if (but->poin==NULL && but->rnapoin.data==NULL); - else if (mode=='c') { + if (but->poin == NULL && but->rnapoin.data == NULL) ; + else if (mode == 'c') { button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING); BLI_strncpy(buf, active_data->str, UI_MAX_DRAW_STR); WM_clipboard_text_set(active_data->str, 0); - active_data->cancel= 1; + active_data->cancel = 1; button_activate_state(C, but, BUTTON_STATE_EXIT); } else { button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING); if (ui_is_but_utf8(but)) BLI_strncpy_utf8(active_data->str, buf, active_data->maxlen); - else BLI_strncpy(active_data->str, buf, active_data->maxlen); + else BLI_strncpy(active_data->str, buf, active_data->maxlen); if (but->type == SEARCH_MENU) { /* else uiSearchboxData.active member is not updated [#26856] */ @@ -1187,19 +1187,19 @@ static void ui_but_copy_paste(bContext *C, uiBut *but, uiHandleButtonData *data, } } /* colorband (not supported by system clipboard) */ - else if (but->type==BUT_COLORBAND) { - if (mode=='c') { - if (but->poin==NULL) + else if (but->type == BUT_COLORBAND) { + if (mode == 'c') { + if (but->poin == NULL) return; memcpy(&but_copypaste_coba, but->poin, sizeof(ColorBand)); } else { - if (but_copypaste_coba.tot==0) + if (but_copypaste_coba.tot == 0) return; if (!but->poin) - but->poin= MEM_callocN(sizeof(ColorBand), "colorband"); + but->poin = MEM_callocN(sizeof(ColorBand), "colorband"); button_activate_state(C, but, BUTTON_STATE_NUM_EDITING); memcpy(data->coba, &but_copypaste_coba, sizeof(ColorBand) ); @@ -1208,12 +1208,12 @@ static void ui_but_copy_paste(bContext *C, uiBut *but, uiHandleButtonData *data, } /* operator button (any type) */ else if (but->optype) { - if (mode=='c') { + if (mode == 'c') { PointerRNA *opptr; char *str; - opptr= uiButGetOperatorPtrRNA(but); /* allocated when needed, the button owns it */ + opptr = uiButGetOperatorPtrRNA(but); /* allocated when needed, the button owns it */ - str= WM_operator_pystring(C, but->optype, opptr, 0); + str = WM_operator_pystring(C, but->optype, opptr, 0); WM_clipboard_text_set(str, 0); @@ -1227,12 +1227,12 @@ static void ui_but_copy_paste(bContext *C, uiBut *but, uiHandleButtonData *data, static int ui_textedit_delete_selection(uiBut *but, uiHandleButtonData *data) { - char *str= data->str; - int len= strlen(str); - int change= 0; + char *str = data->str; + int len = strlen(str); + int change = 0; if (but->selsta != but->selend && len) { memmove(str + but->selsta, str + but->selend, (len - but->selend) + 1); - change= 1; + change = 1; } but->pos = but->selend = but->selsta; @@ -1242,23 +1242,23 @@ static int ui_textedit_delete_selection(uiBut *but, uiHandleButtonData *data) /* note, but->block->aspect is used here, when drawing button style is getting scaled too */ static void ui_textedit_set_cursor_pos(uiBut *but, uiHandleButtonData *data, short x) { - uiStyle *style= UI_GetStyle(); // XXX pass on as arg + uiStyle *style = UI_GetStyle(); // XXX pass on as arg uiFontStyle *fstyle = &style->widget; - int startx= but->x1; + int startx = but->x1; char *origstr; uiStyleFontSet(fstyle); - if (fstyle->kerning==1) /* for BLF_width */ + if (fstyle->kerning == 1) /* for BLF_width */ BLF_enable(fstyle->uifont_id, BLF_KERNING_DEFAULT); - origstr= MEM_callocN(sizeof(char)*data->maxlen, "ui_textedit origstr"); + origstr = MEM_callocN(sizeof(char) * data->maxlen, "ui_textedit origstr"); BLI_strncpy(origstr, but->drawstr, data->maxlen); /* XXX solve generic */ - if (but->type==NUM || but->type==NUMSLI) - startx += (int)(0.5f*(but->y2 - but->y1)); + if (but->type == NUM || but->type == NUMSLI) + startx += (int)(0.5f * (but->y2 - but->y1)); else if (ELEM(but->type, TEX, SEARCH_MENU)) { startx += 5; if (but->flag & UI_HAS_ICON) @@ -1273,7 +1273,7 @@ static void ui_textedit_set_cursor_pos(uiBut *but, uiHandleButtonData *data, sho while (i > 0) { if (BLI_str_cursor_step_prev_utf8(origstr, but->ofs, &i)) { - if (BLF_width(fstyle->uifont_id, origstr+i) > (startx - x)*0.25f) break; // 0.25 == scale factor for less sensitivity + if (BLF_width(fstyle->uifont_id, origstr + i) > (startx - x) * 0.25f) break; // 0.25 == scale factor for less sensitivity } else { break; /* unlikely but possible */ @@ -1290,13 +1290,13 @@ static void ui_textedit_set_cursor_pos(uiBut *but, uiHandleButtonData *data, sho float cdist, cdist_prev = 0.0f; short pos_prev; - const float aspect_sqrt= sqrtf(but->block->aspect); + const float aspect_sqrt = sqrtf(but->block->aspect); but->pos = pos_prev = strlen(origstr) - but->ofs; while (TRUE) { /* XXX does not take zoom level into account */ - cdist = startx + aspect_sqrt * BLF_width(fstyle->uifont_id, origstr + but->ofs); + cdist = startx + aspect_sqrt *BLF_width(fstyle->uifont_id, origstr + but->ofs); /* check if position is found */ if (cdist < x) { @@ -1321,7 +1321,7 @@ static void ui_textedit_set_cursor_pos(uiBut *but, uiHandleButtonData *data, sho } } but->pos += but->ofs; - if (but->pos<0) but->pos= 0; + if (but->pos < 0) but->pos = 0; } if (fstyle->kerning == 1) @@ -1350,25 +1350,25 @@ static int ui_textedit_type_buf(uiBut *but, uiHandleButtonData *data, const char *utf8_buf, int utf8_buf_len) { char *str; - int len, changed= 0; + int len, changed = 0; - str= data->str; - len= strlen(str); + str = data->str; + len = strlen(str); - if (len-(but->selend - but->selsta)+1 <= data->maxlen) { - int step= utf8_buf_len; + if (len - (but->selend - but->selsta) + 1 <= data->maxlen) { + int step = utf8_buf_len; /* type over the current selection */ if ((but->selend - but->selsta) > 0) { - changed= ui_textedit_delete_selection(but, data); - len= strlen(str); + changed = ui_textedit_delete_selection(but, data); + len = strlen(str); } if (len + step < data->maxlen) { memmove(&str[but->pos + step], &str[but->pos], (len + 1) - but->pos); memcpy(&str[but->pos], utf8_buf, step * sizeof(char)); but->pos += step; - changed= 1; + changed = 1; } } @@ -1377,7 +1377,7 @@ static int ui_textedit_type_buf(uiBut *but, uiHandleButtonData *data, static int ui_textedit_type_ascii(uiBut *but, uiHandleButtonData *data, char ascii) { - char buf[2]= {ascii, '\0'}; + char buf[2] = {ascii, '\0'}; if (ui_is_but_utf8(but) && (BLI_str_utf8_size(buf) == -1)) { printf("%s: entering invalid ascii char into an ascii key (%d)\n", @@ -1392,17 +1392,17 @@ static int ui_textedit_type_ascii(uiBut *but, uiHandleButtonData *data, char asc static void ui_textedit_move(uiBut *but, uiHandleButtonData *data, strCursorJumpDirection direction, int select, strCursorJumpType jump) { - const char *str= data->str; - const int len= strlen(str); - const int pos_prev= but->pos; - const int has_sel= (but->selend - but->selsta) > 0; + const char *str = data->str; + const int len = strlen(str); + const int pos_prev = but->pos; + const int has_sel = (but->selend - but->selsta) > 0; ui_check_but(but); /* special case, quit selection and set cursor */ if (has_sel && !select) { if (jump == STRCUR_JUMP_ALL) { - but->selsta = but->selend= but->pos = direction ? len : 0; + but->selsta = but->selend = but->pos = direction ? len : 0; } else { if (direction) { @@ -1424,42 +1424,42 @@ static void ui_textedit_move(uiBut *but, uiHandleButtonData *data, strCursorJump if (has_sel) { if (data->selextend == 0) { - data->selextend= EXTEND_RIGHT; + data->selextend = EXTEND_RIGHT; } if (direction) { if (data->selextend == EXTEND_RIGHT) { - but->selend= but->pos; + but->selend = but->pos; } else { - but->selsta= but->pos; + but->selsta = but->pos; } } else { if (data->selextend == EXTEND_LEFT) { - but->selsta= but->pos; + but->selsta = but->pos; } else { - but->selend= but->pos; + but->selend = but->pos; } } if (but->selend < but->selsta) { SWAP(short, but->selsta, but->selend); - data->selextend= (data->selextend == EXTEND_RIGHT) ? EXTEND_LEFT : EXTEND_RIGHT; + data->selextend = (data->selextend == EXTEND_RIGHT) ? EXTEND_LEFT : EXTEND_RIGHT; } } /* new selection */ else { if (direction) { - data->selextend= EXTEND_RIGHT; - but->selend= but->pos; - but->selsta= pos_prev; + data->selextend = EXTEND_RIGHT; + but->selend = but->pos; + but->selsta = pos_prev; } else { - data->selextend= EXTEND_LEFT; - but->selend= pos_prev; - but->selsta= but->pos; + data->selextend = EXTEND_LEFT; + but->selend = pos_prev; + but->selsta = but->pos; } } } @@ -1468,43 +1468,43 @@ static void ui_textedit_move(uiBut *but, uiHandleButtonData *data, strCursorJump static int ui_textedit_delete(uiBut *but, uiHandleButtonData *data, int direction, strCursorJumpType jump) { - char *str= data->str; - const int len= strlen(str); + char *str = data->str; + const int len = strlen(str); - int changed= 0; + int changed = 0; if (jump == STRCUR_JUMP_ALL) { - if (len) changed=1; - str[0]= '\0'; - but->pos= 0; + if (len) changed = 1; + str[0] = '\0'; + but->pos = 0; } else if (direction) { /* delete */ if ((but->selend - but->selsta) > 0) { - changed= ui_textedit_delete_selection(but, data); + changed = ui_textedit_delete_selection(but, data); } - else if (but->pos>=0 && but->pospos >= 0 && but->pos < len) { int pos = but->pos; int step; BLI_str_cursor_step_utf8(str, len, &pos, direction, jump); step = pos - but->pos; memmove(&str[but->pos], &str[but->pos + step], (len + 1) - but->pos); - changed= 1; + changed = 1; } } else { /* backspace */ if (len != 0) { if ((but->selend - but->selsta) > 0) { - changed= ui_textedit_delete_selection(but, data); + changed = ui_textedit_delete_selection(but, data); } - else if (but->pos>0) { + else if (but->pos > 0) { int pos = but->pos; int step; BLI_str_cursor_step_utf8(str, len, &pos, direction, jump); - step= but->pos - pos; + step = but->pos - pos; memmove(&str[but->pos - step], &str[but->pos], (len + 1) - but->pos); but->pos -= step; - changed= 1; + changed = 1; } } } @@ -1515,64 +1515,64 @@ static int ui_textedit_delete(uiBut *but, uiHandleButtonData *data, int directio static int ui_textedit_autocomplete(bContext *C, uiBut *but, uiHandleButtonData *data) { char *str; - int changed= 1; + int changed = 1; - str= data->str; + str = data->str; if (data->searchbox) ui_searchbox_autocomplete(C, data->searchbox, but, data->str); else but->autocomplete_func(C, str, but->autofunc_arg); - but->pos= strlen(str); - but->selsta= but->selend= but->pos; + but->pos = strlen(str); + but->selsta = but->selend = but->pos; return changed; } static int ui_textedit_copypaste(uiBut *but, uiHandleButtonData *data, int paste, int copy, int cut) { - char buf[UI_MAX_DRAW_STR]={0}; + char buf[UI_MAX_DRAW_STR] = {0}; char *str, *p, *pbuf; - int len, x, i, changed= 0; + int len, x, i, changed = 0; - str= data->str; - len= strlen(str); + str = data->str; + len = strlen(str); /* paste */ if (paste) { /* extract the first line from the clipboard */ - p = pbuf= WM_clipboard_text_get(0); + p = pbuf = WM_clipboard_text_get(0); if (p && p[0]) { unsigned int y; - i= 0; - while (*p && *p!='\r' && *p!='\n' && iselend - but->selsta) > 0) { ui_textedit_delete_selection(but, data); - len= strlen(str); + len = strlen(str); } - for (y=0; ymaxlen) { - for (x= data->maxlen; x>but->pos; x--) - str[x]= str[x-1]; - str[but->pos]= buf[y]; + if (len + 1 < data->maxlen) { + for (x = data->maxlen; x > but->pos; x--) + str[x] = str[x - 1]; + str[but->pos] = buf[y]; but->pos++; len++; - str[len]= '\0'; + str[len] = '\0'; } } - changed= 1; + changed = 1; } if (pbuf) { @@ -1582,8 +1582,8 @@ static int ui_textedit_copypaste(uiBut *but, uiHandleButtonData *data, int paste /* cut & copy */ else if (copy || cut) { /* copy the contents to the copypaste buffer */ - for (x= but->selsta; x <= but->selend; x++) { - if (x==but->selend) + for (x = but->selsta; x <= but->selend; x++) { + if (x == but->selend) buf[x] = '\0'; else buf[(x - but->selsta)] = str[x]; @@ -1594,7 +1594,7 @@ static int ui_textedit_copypaste(uiBut *but, uiHandleButtonData *data, int paste /* for cut only, delete the selection afterwards */ if (cut) if ((but->selend - but->selsta) > 0) - changed= ui_textedit_delete_selection(but, data); + changed = ui_textedit_delete_selection(but, data); } return changed; @@ -1606,12 +1606,12 @@ static void ui_textedit_begin(bContext *C, uiBut *but, uiHandleButtonData *data) if (data->str) { MEM_freeN(data->str); - data->str= NULL; + data->str = NULL; } /* retrieve string */ - data->maxlen= ui_get_but_string_max_length(but); - data->str= MEM_callocN(sizeof(char)*data->maxlen + 1, "textedit str"); + data->maxlen = ui_get_but_string_max_length(but); + data->str = MEM_callocN(sizeof(char) * data->maxlen + 1, "textedit str"); ui_get_but_string(but, data->str, data->maxlen); if (ELEM3(but->type, NUM, NUMABS, NUMSLI)) { @@ -1632,8 +1632,8 @@ static void ui_textedit_begin(bContext *C, uiBut *but, uiHandleButtonData *data) but->selend = len; /* optional searchbox */ - if (but->type==SEARCH_MENU) { - data->searchbox= ui_searchbox_create(C, data->region, but); + if (but->type == SEARCH_MENU) { + data->searchbox = ui_searchbox_create(C, data->region, but); ui_searchbox_update(C, data->searchbox, but, 1); /* 1= reset */ } @@ -1646,7 +1646,7 @@ static void ui_textedit_end(bContext *C, uiBut *but, uiHandleButtonData *data) { if (but) { if (ui_is_but_utf8(but)) { - int strip= BLI_utf8_invalid_strip(but->editstr, strlen(but->editstr)); + int strip = BLI_utf8_invalid_strip(but->editstr, strlen(but->editstr)); /* not a file?, strip non utf-8 chars */ if (strip) { /* wont happen often so isn't that annoying to keep it here for a while */ @@ -1655,15 +1655,15 @@ static void ui_textedit_end(bContext *C, uiBut *but, uiHandleButtonData *data) } if (data->searchbox) { - if (data->cancel==0) + if (data->cancel == 0) ui_searchbox_apply(but, data->searchbox); ui_searchbox_free(C, data->searchbox); - data->searchbox= NULL; + data->searchbox = NULL; } - but->editstr= NULL; - but->pos= -1; + but->editstr = NULL; + but->pos = -1; } WM_cursor_restore(CTX_wm_window(C)); @@ -1677,20 +1677,20 @@ static void ui_textedit_next_but(uiBlock *block, uiBut *actbut, uiHandleButtonDa if (ELEM4(actbut->type, LABEL, SEPR, ROUNDBOX, LISTBOX)) return; - for (but= actbut->next; but; but= but->next) { + for (but = actbut->next; but; but = but->next) { if (ELEM7(but->type, TEX, NUM, NUMABS, NUMSLI, HSVSLI, IDPOIN, SEARCH_MENU)) { if (!(but->flag & UI_BUT_DISABLED)) { - data->postbut= but; - data->posttype= BUTTON_ACTIVATE_TEXT_EDITING; + data->postbut = but; + data->posttype = BUTTON_ACTIVATE_TEXT_EDITING; return; } } } - for (but= block->buttons.first; but!=actbut; but= but->next) { + for (but = block->buttons.first; but != actbut; but = but->next) { if (ELEM7(but->type, TEX, NUM, NUMABS, NUMSLI, HSVSLI, IDPOIN, SEARCH_MENU)) { if (!(but->flag & UI_BUT_DISABLED)) { - data->postbut= but; - data->posttype= BUTTON_ACTIVATE_TEXT_EDITING; + data->postbut = but; + data->posttype = BUTTON_ACTIVATE_TEXT_EDITING; return; } } @@ -1705,20 +1705,20 @@ static void ui_textedit_prev_but(uiBlock *block, uiBut *actbut, uiHandleButtonDa if (ELEM4(actbut->type, LABEL, SEPR, ROUNDBOX, LISTBOX)) return; - for (but= actbut->prev; but; but= but->prev) { + for (but = actbut->prev; but; but = but->prev) { if (ELEM7(but->type, TEX, NUM, NUMABS, NUMSLI, HSVSLI, IDPOIN, SEARCH_MENU)) { if (!(but->flag & UI_BUT_DISABLED)) { - data->postbut= but; - data->posttype= BUTTON_ACTIVATE_TEXT_EDITING; + data->postbut = but; + data->posttype = BUTTON_ACTIVATE_TEXT_EDITING; return; } } } - for (but= block->buttons.last; but!=actbut; but= but->prev) { + for (but = block->buttons.last; but != actbut; but = but->prev) { if (ELEM7(but->type, TEX, NUM, NUMABS, NUMSLI, HSVSLI, IDPOIN, SEARCH_MENU)) { if (!(but->flag & UI_BUT_DISABLED)) { - data->postbut= but; - data->posttype= BUTTON_ACTIVATE_TEXT_EDITING; + data->postbut = but; + data->posttype = BUTTON_ACTIVATE_TEXT_EDITING; return; } } @@ -1728,9 +1728,9 @@ static void ui_textedit_prev_but(uiBlock *block, uiBut *actbut, uiHandleButtonDa static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, wmEvent *event) { - int mx, my, changed= 0, inbox=0, update= 0, retval= WM_UI_HANDLER_CONTINUE; + int mx, my, changed = 0, inbox = 0, update = 0, retval = WM_UI_HANDLER_CONTINUE; - switch(event->type) { + switch (event->type) { case WHEELUPMOUSE: case WHEELDOWNMOUSE: case MOUSEMOVE: @@ -1740,110 +1740,110 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle break; case RIGHTMOUSE: case ESCKEY: - data->cancel= 1; - data->escapecancel= 1; + data->cancel = 1; + data->escapecancel = 1; button_activate_state(C, but, BUTTON_STATE_EXIT); - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; break; case LEFTMOUSE: { /* exit on LMB only on RELEASE for searchbox, to mimic other popups, and allow multiple menu levels */ if (data->searchbox) - inbox= ui_searchbox_inside(data->searchbox, event->x, event->y); + inbox = ui_searchbox_inside(data->searchbox, event->x, event->y); - if (event->val==KM_PRESS) { - mx= event->x; - my= event->y; + if (event->val == KM_PRESS) { + mx = event->x; + my = event->y; ui_window_to_block(data->region, block, &mx, &my); if (ui_but_contains_pt(but, mx, my)) { ui_textedit_set_cursor_pos(but, data, mx); but->selsta = but->selend = but->pos; - data->selstartx= mx; + data->selstartx = mx; button_activate_state(C, but, BUTTON_STATE_TEXT_SELECTING); - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; } - else if (inbox==0) { + else if (inbox == 0) { /* if searchbox, click outside will cancel */ if (data->searchbox) - data->cancel= data->escapecancel= 1; + data->cancel = data->escapecancel = 1; button_activate_state(C, but, BUTTON_STATE_EXIT); - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; } } else if (inbox) { button_activate_state(C, but, BUTTON_STATE_EXIT); - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; } break; } } - if (event->val==KM_PRESS) { + if (event->val == KM_PRESS) { switch (event->type) { case VKEY: case XKEY: case CKEY: if (event->ctrl || event->oskey) { if (event->type == VKEY) - changed= ui_textedit_copypaste(but, data, 1, 0, 0); + changed = ui_textedit_copypaste(but, data, 1, 0, 0); else if (event->type == CKEY) - changed= ui_textedit_copypaste(but, data, 0, 1, 0); + changed = ui_textedit_copypaste(but, data, 0, 1, 0); else if (event->type == XKEY) - changed= ui_textedit_copypaste(but, data, 0, 0, 1); + changed = ui_textedit_copypaste(but, data, 0, 0, 1); - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; } break; case RIGHTARROWKEY: ui_textedit_move(but, data, STRCUR_DIR_NEXT, event->shift, event->ctrl ? STRCUR_JUMP_DELIM : STRCUR_JUMP_NONE); - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; break; case LEFTARROWKEY: ui_textedit_move(but, data, STRCUR_DIR_PREV, event->shift, event->ctrl ? STRCUR_JUMP_DELIM : STRCUR_JUMP_NONE); - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; break; case DOWNARROWKEY: if (data->searchbox) { ui_searchbox_event(C, data->searchbox, but, event); break; } - /* pass on purposedly */ + /* pass on purposedly */ case ENDKEY: ui_textedit_move(but, data, STRCUR_DIR_NEXT, event->shift, STRCUR_JUMP_ALL); - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; break; case UPARROWKEY: if (data->searchbox) { ui_searchbox_event(C, data->searchbox, but, event); break; } - /* pass on purposedly */ + /* pass on purposedly */ case HOMEKEY: ui_textedit_move(but, data, STRCUR_DIR_PREV, event->shift, STRCUR_JUMP_ALL); - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; break; case PADENTER: case RETKEY: button_activate_state(C, but, BUTTON_STATE_EXIT); - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; break; case DELKEY: - changed= ui_textedit_delete(but, data, 1, event->ctrl ? STRCUR_JUMP_DELIM : STRCUR_JUMP_NONE); - retval= WM_UI_HANDLER_BREAK; + changed = ui_textedit_delete(but, data, 1, event->ctrl ? STRCUR_JUMP_DELIM : STRCUR_JUMP_NONE); + retval = WM_UI_HANDLER_BREAK; break; case BACKSPACEKEY: - changed= ui_textedit_delete(but, data, 0, event->shift ? STRCUR_JUMP_ALL : (event->ctrl ? STRCUR_JUMP_DELIM : STRCUR_JUMP_NONE)); - retval= WM_UI_HANDLER_BREAK; + changed = ui_textedit_delete(but, data, 0, event->shift ? STRCUR_JUMP_ALL : (event->ctrl ? STRCUR_JUMP_DELIM : STRCUR_JUMP_NONE)); + retval = WM_UI_HANDLER_BREAK; break; case TABKEY: /* there is a key conflict here, we can't tab with autocomplete */ if (but->autocomplete_func || data->searchbox) { - changed= ui_textedit_autocomplete(C, but, data); - update= 1; /* do live update for tab key */ + changed = ui_textedit_autocomplete(C, but, data); + update = 1; /* do live update for tab key */ } /* the hotkey here is not well defined, was G.qual so we check all */ else if (event->shift || event->ctrl || event->alt || event->oskey) { @@ -1854,53 +1854,53 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle ui_textedit_next_but(block, but, data); button_activate_state(C, but, BUTTON_STATE_EXIT); } - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; break; } if ((event->ascii || event->utf8_buf[0]) && (retval == WM_UI_HANDLER_CONTINUE)) { char ascii = event->ascii; - const char *utf8_buf= event->utf8_buf; + const char *utf8_buf = event->utf8_buf; /* exception that's useful for number buttons, some keyboard * numpads have a comma instead of a period */ if (ELEM3(but->type, NUM, NUMABS, NUMSLI)) { /* could use data->min*/ if (event->type == PADPERIOD && ascii == ',') { ascii = '.'; - utf8_buf= NULL; /* force ascii fallback */ + utf8_buf = NULL; /* force ascii fallback */ } } if (utf8_buf && utf8_buf[0]) { - int utf8_buf_len= BLI_str_utf8_size(utf8_buf); + int utf8_buf_len = BLI_str_utf8_size(utf8_buf); /* keep this printf until utf8 is well tested */ if (utf8_buf_len != 1) { printf("%s: utf8 char '%.*s'\n", __func__, utf8_buf_len, utf8_buf); } // strcpy(utf8_buf, "12345"); - changed= ui_textedit_type_buf(but, data, event->utf8_buf, utf8_buf_len); + changed = ui_textedit_type_buf(but, data, event->utf8_buf, utf8_buf_len); } else { - changed= ui_textedit_type_ascii(but, data, ascii); + changed = ui_textedit_type_ascii(but, data, ascii); } - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; } /* textbutton with magnifier icon: do live update for search button */ - if (but->icon==ICON_VIEWZOOM) - update= 1; + if (but->icon == ICON_VIEWZOOM) + update = 1; } if (changed) { /* only update when typing for TAB key */ if (update && data->interactive) ui_apply_button(C, block, but, data, 1); else ui_check_but(but); - but->changed= TRUE; + but->changed = TRUE; if (data->searchbox) - ui_searchbox_update(C, data->searchbox, but, 1); /* 1 = reset */ + ui_searchbox_update(C, data->searchbox, but, 1); /* 1 = reset */ } if (changed || (retval == WM_UI_HANDLER_BREAK)) @@ -1909,22 +1909,22 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle static void ui_do_but_textedit_select(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, wmEvent *event) { - int mx, my, retval= WM_UI_HANDLER_CONTINUE; + int mx, my, retval = WM_UI_HANDLER_CONTINUE; - switch(event->type) { + switch (event->type) { case MOUSEMOVE: { - mx= event->x; - my= event->y; + mx = event->x; + my = event->y; ui_window_to_block(data->region, block, &mx, &my); ui_textedit_set_cursor_select(but, data, mx); - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; break; } case LEFTMOUSE: if (event->val == KM_RELEASE) button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING); - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; break; } @@ -1939,49 +1939,49 @@ static void ui_do_but_textedit_select(bContext *C, uiBlock *block, uiBut *but, u static void ui_numedit_begin(uiBut *but, uiHandleButtonData *data) { if (but->type == BUT_CURVE) { - but->editcumap= (CurveMapping*)but->poin; + but->editcumap = (CurveMapping *)but->poin; } else if (but->type == BUT_COLORBAND) { - data->coba= (ColorBand*)but->poin; - but->editcoba= data->coba; + data->coba = (ColorBand *)but->poin; + but->editcoba = data->coba; } else if (ELEM3(but->type, BUT_NORMAL, HSVCUBE, HSVCIRCLE)) { ui_get_but_vectorf(but, data->origvec); copy_v3_v3(data->vec, data->origvec); - but->editvec= data->vec; + but->editvec = data->vec; } else { float softrange, softmin, softmax; - data->startvalue= ui_get_but_val(but); - data->origvalue= data->startvalue; - data->value= data->origvalue; - but->editval= &data->value; + data->startvalue = ui_get_but_val(but); + data->origvalue = data->startvalue; + data->value = data->origvalue; + but->editval = &data->value; - softmin= but->softmin; - softmax= but->softmax; - softrange= softmax - softmin; + softmin = but->softmin; + softmax = but->softmax; + softrange = softmax - softmin; - data->dragfstart= (softrange == 0.0f)? 0.0f: ((float)data->value - softmin)/softrange; - data->dragf= data->dragfstart; + data->dragfstart = (softrange == 0.0f) ? 0.0f : ((float)data->value - softmin) / softrange; + data->dragf = data->dragfstart; } - data->dragchange= 0; - data->draglock= 1; + data->dragchange = 0; + data->draglock = 1; } static void ui_numedit_end(uiBut *but, uiHandleButtonData *data) { - but->editval= NULL; - but->editvec= NULL; - but->editcoba= NULL; - but->editcumap= NULL; + but->editval = NULL; + but->editvec = NULL; + but->editcoba = NULL; + but->editcumap = NULL; - data->dragstartx= 0; - data->draglastx= 0; - data->dragchange= 0; - data->dragcbd= NULL; - data->dragsel= 0; + data->dragstartx = 0; + data->draglastx = 0; + data->dragchange = 0; + data->dragcbd = NULL; + data->dragsel = 0; } static void ui_numedit_apply(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data) @@ -1996,64 +1996,64 @@ static void ui_numedit_apply(bContext *C, uiBlock *block, uiBut *but, uiHandleBu static void ui_blockopen_begin(bContext *C, uiBut *but, uiHandleButtonData *data) { - uiBlockCreateFunc func= NULL; - uiBlockHandleCreateFunc handlefunc= NULL; - uiMenuCreateFunc menufunc= NULL; - char *menustr= NULL; - void *arg= NULL; + uiBlockCreateFunc func = NULL; + uiBlockHandleCreateFunc handlefunc = NULL; + uiMenuCreateFunc menufunc = NULL; + char *menustr = NULL; + void *arg = NULL; - switch(but->type) { + switch (but->type) { case BLOCK: case PULLDOWN: if (but->menu_create_func) { - menufunc= but->menu_create_func; - arg= but->poin; + menufunc = but->menu_create_func; + arg = but->poin; } else { - func= but->block_create_func; - arg= but->poin?but->poin:but->func_argN; + func = but->block_create_func; + arg = but->poin ? but->poin : but->func_argN; } break; case MENU: if (but->menu_create_func) { - menufunc= but->menu_create_func; - arg= but->poin; + menufunc = but->menu_create_func; + arg = but->poin; } else { - data->origvalue= ui_get_but_val(but); - data->value= data->origvalue; - but->editval= &data->value; + data->origvalue = ui_get_but_val(but); + data->value = data->origvalue; + but->editval = &data->value; - menustr= but->str; + menustr = but->str; } break; case ICONROW: - menufunc= ui_block_func_ICONROW; - arg= but; + menufunc = ui_block_func_ICONROW; + arg = but; break; case ICONTEXTROW: - menufunc= ui_block_func_ICONTEXTROW; - arg= but; + menufunc = ui_block_func_ICONTEXTROW; + arg = but; break; case COL: ui_get_but_vectorf(but, data->origvec); copy_v3_v3(data->vec, data->origvec); - but->editvec= data->vec; + but->editvec = data->vec; - handlefunc= ui_block_func_COL; - arg= but; + handlefunc = ui_block_func_COL; + arg = but; break; } if (func || handlefunc) { - data->menu= ui_popup_block_create(C, data->region, but, func, handlefunc, arg); + data->menu = ui_popup_block_create(C, data->region, but, func, handlefunc, arg); if (but->block->handle) - data->menu->popup= but->block->handle->popup; + data->menu->popup = but->block->handle->popup; } else if (menufunc || menustr) { - data->menu= ui_popup_menu_create(C, data->region, but, menufunc, arg, menustr); + data->menu = ui_popup_menu_create(C, data->region, but, menufunc, arg, menustr); if (but->block->handle) - data->menu->popup= but->block->handle->popup; + data->menu->popup = but->block->handle->popup; } /* this makes adjacent blocks auto open from now on */ @@ -2063,15 +2063,15 @@ static void ui_blockopen_begin(bContext *C, uiBut *but, uiHandleButtonData *data static void ui_blockopen_end(bContext *C, uiBut *but, uiHandleButtonData *data) { if (but) { - but->editval= NULL; - but->editvec= NULL; + but->editval = NULL; + but->editvec = NULL; - but->block->auto_open_last= PIL_check_seconds_timer(); + but->block->auto_open_last = PIL_check_seconds_timer(); } if (data->menu) { ui_popup_block_free(C, data->menu); - data->menu= NULL; + data->menu = NULL; } } @@ -2080,7 +2080,7 @@ static void ui_blockopen_end(bContext *C, uiBut *but, uiHandleButtonData *data) static int ui_do_but_BUT(bContext *C, uiBut *but, uiHandleButtonData *data, wmEvent *event) { if (data->state == BUTTON_STATE_HIGHLIGHT) { - if (event->type == LEFTMOUSE && event->val==KM_PRESS) { + if (event->type == LEFTMOUSE && event->val == KM_PRESS) { button_activate_state(C, but, BUTTON_STATE_WAIT_RELEASE); return WM_UI_HANDLER_BREAK; } @@ -2088,15 +2088,15 @@ static int ui_do_but_BUT(bContext *C, uiBut *but, uiHandleButtonData *data, wmEv button_activate_state(C, but, BUTTON_STATE_EXIT); return WM_UI_HANDLER_BREAK; } - else if (ELEM(event->type, PADENTER, RETKEY) && event->val==KM_PRESS) { + else if (ELEM(event->type, PADENTER, RETKEY) && event->val == KM_PRESS) { button_activate_state(C, but, BUTTON_STATE_WAIT_FLASH); return WM_UI_HANDLER_BREAK; } } else if (data->state == BUTTON_STATE_WAIT_RELEASE) { - if (event->type == LEFTMOUSE && event->val!=KM_PRESS) { + if (event->type == LEFTMOUSE && event->val != KM_PRESS) { if (!(but->flag & UI_SELECT)) - data->cancel= 1; + data->cancel = 1; button_activate_state(C, but, BUTTON_STATE_EXIT); return WM_UI_HANDLER_BREAK; } @@ -2108,9 +2108,9 @@ static int ui_do_but_BUT(bContext *C, uiBut *but, uiHandleButtonData *data, wmEv static int ui_do_but_HOTKEYEVT(bContext *C, uiBut *but, uiHandleButtonData *data, wmEvent *event) { if (data->state == BUTTON_STATE_HIGHLIGHT) { - if (ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->val==KM_PRESS) { - but->drawstr[0]= 0; - but->modifier_key= 0; + if (ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->val == KM_PRESS) { + but->drawstr[0] = 0; + but->modifier_key = 0; button_activate_state(C, but, BUTTON_STATE_WAIT_KEY_EVENT); return WM_UI_HANDLER_BREAK; } @@ -2120,14 +2120,14 @@ static int ui_do_but_HOTKEYEVT(bContext *C, uiBut *but, uiHandleButtonData *data if (event->type == MOUSEMOVE) return WM_UI_HANDLER_CONTINUE; - if (event->type == LEFTMOUSE && event->val==KM_PRESS) { + if (event->type == LEFTMOUSE && event->val == KM_PRESS) { /* only cancel if click outside the button */ if (ui_mouse_inside_button(but->active->region, but, event->x, event->y) == 0) { /* data->cancel doesnt work, this button opens immediate */ if (but->flag & UI_BUT_IMMEDIATE) ui_set_but_val(but, 0); else - data->cancel= 1; + data->cancel = 1; button_activate_state(C, but, BUTTON_STATE_EXIT); return WM_UI_HANDLER_BREAK; } @@ -2136,27 +2136,27 @@ static int ui_do_but_HOTKEYEVT(bContext *C, uiBut *but, uiHandleButtonData *data /* always set */ but->modifier_key = 0; if (event->shift) but->modifier_key |= KM_SHIFT; - if (event->alt) but->modifier_key |= KM_ALT; - if (event->ctrl) but->modifier_key |= KM_CTRL; + if (event->alt) but->modifier_key |= KM_ALT; + if (event->ctrl) but->modifier_key |= KM_CTRL; if (event->oskey) but->modifier_key |= KM_OSKEY; ui_check_but(but); ED_region_tag_redraw(data->region); - if (event->val==KM_PRESS) { + if (event->val == KM_PRESS) { if (ISHOTKEY(event->type)) { if (WM_key_event_string(event->type)[0]) ui_set_but_val(but, event->type); else - data->cancel= 1; + data->cancel = 1; button_activate_state(C, but, BUTTON_STATE_EXIT); return WM_UI_HANDLER_BREAK; } else if (event->type == ESCKEY) { - data->cancel= 1; - data->escapecancel= 1; + data->cancel = 1; + data->escapecancel = 1; button_activate_state(C, but, BUTTON_STATE_EXIT); } @@ -2169,7 +2169,7 @@ static int ui_do_but_HOTKEYEVT(bContext *C, uiBut *but, uiHandleButtonData *data static int ui_do_but_KEYEVT(bContext *C, uiBut *but, uiHandleButtonData *data, wmEvent *event) { if (data->state == BUTTON_STATE_HIGHLIGHT) { - if (ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->val==KM_PRESS) { + if (ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->val == KM_PRESS) { button_activate_state(C, but, BUTTON_STATE_WAIT_KEY_EVENT); return WM_UI_HANDLER_BREAK; } @@ -2178,11 +2178,11 @@ static int ui_do_but_KEYEVT(bContext *C, uiBut *but, uiHandleButtonData *data, w if (event->type == MOUSEMOVE) return WM_UI_HANDLER_CONTINUE; - if (event->val==KM_PRESS) { + if (event->val == KM_PRESS) { if (WM_key_event_string(event->type)[0]) ui_set_but_val(but, event->type); else - data->cancel= 1; + data->cancel = 1; button_activate_state(C, but, BUTTON_STATE_EXIT); } @@ -2194,8 +2194,8 @@ static int ui_do_but_KEYEVT(bContext *C, uiBut *but, uiHandleButtonData *data, w static int ui_do_but_TEX(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, wmEvent *event) { if (data->state == BUTTON_STATE_HIGHLIGHT) { - if (ELEM(event->type, LEFTMOUSE, EVT_BUT_OPEN) && event->val==KM_PRESS) { - if (but->dt == UI_EMBOSSN && !event->ctrl); + if (ELEM(event->type, LEFTMOUSE, EVT_BUT_OPEN) && event->val == KM_PRESS) { + if (but->dt == UI_EMBOSSN && !event->ctrl) ; else { button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING); return WM_UI_HANDLER_BREAK; @@ -2217,9 +2217,9 @@ static int ui_do_but_TEX(bContext *C, uiBlock *block, uiBut *but, uiHandleButton static int ui_do_but_TOG(bContext *C, uiBut *but, uiHandleButtonData *data, wmEvent *event) { if (data->state == BUTTON_STATE_HIGHLIGHT) { - if (ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->val==KM_PRESS) { - data->togdual= event->ctrl; - data->togonly= !event->shift; + if (ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->val == KM_PRESS) { + data->togdual = event->ctrl; + data->togonly = !event->shift; button_activate_state(C, but, BUTTON_STATE_EXIT); return WM_UI_HANDLER_BREAK; } @@ -2233,19 +2233,19 @@ static int ui_do_but_EXIT(bContext *C, uiBut *but, uiHandleButtonData *data, wmE if (data->state == BUTTON_STATE_HIGHLIGHT) { /* first handle click on icondrag type button */ - if (event->type==LEFTMOUSE && but->dragpoin) { + if (event->type == LEFTMOUSE && but->dragpoin) { if (ui_but_mouse_inside_icon(but, data->region, event)) { /* tell the button to wait and keep checking further events to * see if it should start dragging */ button_activate_state(C, but, BUTTON_STATE_WAIT_DRAG); - data->dragstartx= event->x; - data->dragstarty= event->y; + data->dragstartx = event->x; + data->dragstarty = event->y; return WM_UI_HANDLER_CONTINUE; } } - if (ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->val==KM_PRESS) { + if (ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->val == KM_PRESS) { int ret = WM_UI_HANDLER_BREAK; /* XXX (a bit ugly) Special case handling for filebrowser drag button */ if (but->dragpoin && but->imb && ui_but_mouse_inside_icon(but, data->region, event)) { @@ -2265,7 +2265,7 @@ static int ui_do_but_EXIT(bContext *C, uiBut *but, uiHandleButtonData *data, wmE /* If the mouse has been pressed and released, getting to * this point without triggering a drag, then clear the * drag state for this button and continue to pass on the event */ - if (event->type==LEFTMOUSE && event->val==KM_RELEASE) { + if (event->type == LEFTMOUSE && event->val == KM_RELEASE) { button_activate_state(C, but, BUTTON_STATE_EXIT); return WM_UI_HANDLER_CONTINUE; } @@ -2281,18 +2281,18 @@ static int ui_do_but_EXIT(bContext *C, uiBut *but, uiHandleButtonData *data, wmE /* var names match ui_numedit_but_NUM */ static float ui_numedit_apply_snapf(uiBut *but, float tempf, float softmin, float softmax, float softrange, int snap) { - if (tempf==softmin || tempf==softmax || snap==0) { + if (tempf == softmin || tempf == softmax || snap == 0) { /* pass */ } else { - float fac= 1.0f; + float fac = 1.0f; if (ui_is_but_unit(but)) { - UnitSettings *unit= but->block->unit; - int unit_type= uiButGetUnitType(but)>>16; + UnitSettings *unit = but->block->unit; + int unit_type = uiButGetUnitType(but) >> 16; if (bUnit_IsValid(unit->system, unit_type)) { - fac= (float)bUnit_BaseScalar(unit->system, unit_type); + fac = (float)bUnit_BaseScalar(unit->system, unit_type); if (ELEM3(unit_type, B_UNIT_LENGTH, B_UNIT_AREA, B_UNIT_VOLUME)) { fac /= unit->scale_length; } @@ -2307,15 +2307,15 @@ static float ui_numedit_apply_snapf(uiBut *but, float tempf, float softmin, floa softrange /= fac; } - if (snap==1) { - if (softrange < 2.10f) tempf= 0.1f*floorf(10.0f*tempf); - else if (softrange < 21.0f) tempf= floorf(tempf); - else tempf= 10.0f*floorf(tempf/10.0f); + if (snap == 1) { + if (softrange < 2.10f) tempf = 0.1f * floorf(10.0f * tempf); + else if (softrange < 21.0f) tempf = floorf(tempf); + else tempf = 10.0f * floorf(tempf / 10.0f); } - else if (snap==2) { - if (softrange < 2.10f) tempf= 0.01f*floorf(100.0f*tempf); - else if (softrange < 21.0f) tempf= 0.1f*floorf(10.0f*tempf); - else tempf= floor(tempf); + else if (snap == 2) { + if (softrange < 2.10f) tempf = 0.01f * floorf(100.0f * tempf); + else if (softrange < 21.0f) tempf = 0.1f * floorf(10.0f * tempf); + else tempf = floor(tempf); } if (fac != 1.0f) @@ -2327,18 +2327,18 @@ static float ui_numedit_apply_snapf(uiBut *but, float tempf, float softmin, floa static float ui_numedit_apply_snap(int temp, float softmin, float softmax, int snap) { - if (temp==softmin || temp==softmax) + if (temp == softmin || temp == softmax) return temp; - switch(snap) { - case 0: - break; - case 1: - temp= 10*(temp/10); - break; - case 2: - temp= 100*(temp/100); - break; + switch (snap) { + case 0: + break; + case 1: + temp = 10 * (temp / 10); + break; + case 2: + temp = 100 * (temp / 100); + break; } return temp; @@ -2347,7 +2347,7 @@ static float ui_numedit_apply_snap(int temp, float softmin, float softmax, int s static int ui_numedit_but_NUM(uiBut *but, uiHandleButtonData *data, float fac, int snap, int mx) { float deler, tempf, softmin, softmax, softrange; - int lvalue, temp, changed= 0; + int lvalue, temp, changed = 0; if (mx == data->draglastx) return changed; @@ -2355,93 +2355,93 @@ static int ui_numedit_but_NUM(uiBut *but, uiHandleButtonData *data, float fac, i /* drag-lock - prevent unwanted scroll adjustments */ /* change value (now 3) to adjust threshold in pixels */ if (data->draglock) { - if (abs(mx-data->dragstartx) <= 3) + if (abs(mx - data->dragstartx) <= 3) return changed; - data->draglock= 0; - data->dragstartx= mx; /* ignore mouse movement within drag-lock */ + data->draglock = 0; + data->dragstartx = mx; /* ignore mouse movement within drag-lock */ } - softmin= but->softmin; - softmax= but->softmax; - softrange= softmax - softmin; + softmin = but->softmin; + softmax = but->softmax; + softrange = softmax - softmin; if (ui_is_a_warp_but(but)) { /* Mouse location isn't screen clamped to the screen so use a linear mapping * 2px == 1-int, or 1px == 1-ClickStep */ if (ui_is_but_float(but)) { - fac *= 0.01f*but->a1; + fac *= 0.01f * but->a1; tempf = (float)data->startvalue + ((float)(mx - data->dragstartx) * fac); - tempf= ui_numedit_apply_snapf(but, tempf, softmin, softmax, softrange, snap); + tempf = ui_numedit_apply_snapf(but, tempf, softmin, softmax, softrange, snap); -#if 1 /* fake moving the click start, nicer for dragging back after passing the limit */ +#if 1 /* fake moving the click start, nicer for dragging back after passing the limit */ if (tempf < softmin) { - data->dragstartx -= (softmin-tempf) / fac; - tempf= softmin; + data->dragstartx -= (softmin - tempf) / fac; + tempf = softmin; } else if (tempf > softmax) { - data->dragstartx += (tempf-softmax) / fac; - tempf= softmax; + data->dragstartx += (tempf - softmax) / fac; + tempf = softmax; } #else CLAMP(tempf, softmin, softmax); #endif if (tempf != (float)data->value) { - data->dragchange= 1; - data->value= tempf; - changed= 1; + data->dragchange = 1; + data->value = tempf; + changed = 1; } } else { - if (softrange > 256) fac= 1.0; /* 1px == 1 */ - else if (softrange > 32) fac= 1.0/2.0; /* 2px == 1 */ - else fac= 1.0/16.0; /* 16px == 1? */ + if (softrange > 256) fac = 1.0; /* 1px == 1 */ + else if (softrange > 32) fac = 1.0 / 2.0; /* 2px == 1 */ + else fac = 1.0 / 16.0; /* 16px == 1? */ - temp= data->startvalue + (((double)mx - data->dragstartx) * (double)fac); - temp= ui_numedit_apply_snap(temp, softmin, softmax, snap); + temp = data->startvalue + (((double)mx - data->dragstartx) * (double)fac); + temp = ui_numedit_apply_snap(temp, softmin, softmax, snap); -#if 1 /* fake moving the click start, nicer for dragging back after passing the limit */ +#if 1 /* fake moving the click start, nicer for dragging back after passing the limit */ if (temp < softmin) { - data->dragstartx -= (softmin-temp) / fac; - temp= softmin; + data->dragstartx -= (softmin - temp) / fac; + temp = softmin; } else if (temp > softmax) { - data->dragstartx += (temp-softmax) / fac; - temp= softmax; + data->dragstartx += (temp - softmax) / fac; + temp = softmax; } #else CLAMP(temp, softmin, softmax); #endif if (temp != data->value) { - data->dragchange= 1; - data->value= temp; - changed= 1; + data->dragchange = 1; + data->value = temp; + changed = 1; } } - data->draglastx= mx; + data->draglastx = mx; } else { /* Use a non-linear mapping of the mouse drag especially for large floats (normal behavior) */ - deler= 500; + deler = 500; if (!ui_is_but_float(but)) { /* prevent large ranges from getting too out of control */ if (softrange > 600) deler = powf(softrange, 0.75); - if (softrange < 100) deler= 200.0; - if (softrange < 25) deler= 50.0; + if (softrange < 100) deler = 200.0; + if (softrange < 25) deler = 50.0; } deler /= fac; if (softrange > 11) { /* non linear change in mouse input- good for high precicsion */ - data->dragf+= (((float)(mx-data->draglastx))/deler) * (fabsf(data->dragstartx-mx)*0.002f); + data->dragf += (((float)(mx - data->draglastx)) / deler) * (fabsf(data->dragstartx - mx) * 0.002f); } else if (softrange > 129) { /* only scale large int buttons */ /* non linear change in mouse input- good for high precicsionm ints need less fine tuning */ - data->dragf+= (((float)(mx-data->draglastx))/deler) * (fabsf(data->dragstartx-mx)*0.004f); + data->dragf += (((float)(mx - data->draglastx)) / deler) * (fabsf(data->dragstartx - mx) * 0.004f); } else { /*no scaling */ @@ -2449,34 +2449,34 @@ static int ui_numedit_but_NUM(uiBut *but, uiHandleButtonData *data, float fac, i } CLAMP(data->dragf, 0.0f, 1.0f); - data->draglastx= mx; - tempf= (softmin + data->dragf*softrange); + data->draglastx = mx; + tempf = (softmin + data->dragf * softrange); if (!ui_is_but_float(but)) { - temp= floorf(tempf + 0.5f); + temp = floorf(tempf + 0.5f); - temp= ui_numedit_apply_snap(temp, softmin, softmax, snap); + temp = ui_numedit_apply_snap(temp, softmin, softmax, snap); CLAMP(temp, softmin, softmax); - lvalue= (int)data->value; + lvalue = (int)data->value; if (temp != lvalue) { - data->dragchange= 1; - data->value= (double)temp; - changed= 1; + data->dragchange = 1; + data->value = (double)temp; + changed = 1; } } else { - temp= 0; - tempf= ui_numedit_apply_snapf(but, tempf, softmin, softmax, softrange, snap); + temp = 0; + tempf = ui_numedit_apply_snapf(but, tempf, softmin, softmax, softrange, snap); CLAMP(tempf, softmin, softmax); if (tempf != (float)data->value) { - data->dragchange= 1; - data->value= tempf; - changed= 1; + data->dragchange = 1; + data->value = tempf; + changed = 1; } } } @@ -2487,81 +2487,81 @@ static int ui_numedit_but_NUM(uiBut *but, uiHandleButtonData *data, float fac, i static int ui_do_but_NUM(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, wmEvent *event) { - int mx, my; /* mouse location scaled to fit the UI */ + int mx, my; /* mouse location scaled to fit the UI */ int screen_mx, screen_my; /* mouse location kept at screen pixel coords */ - int click= 0; - int retval= WM_UI_HANDLER_CONTINUE; + int click = 0; + int retval = WM_UI_HANDLER_CONTINUE; - mx= screen_mx= event->x; - my= screen_my= event->y; + mx = screen_mx = event->x; + my = screen_my = event->y; ui_window_to_block(data->region, block, &mx, &my); if (data->state == BUTTON_STATE_HIGHLIGHT) { /* XXX hardcoded keymap check.... */ if (event->type == WHEELDOWNMOUSE && event->alt) { - mx= but->x1; - click= 1; + mx = but->x1; + click = 1; } else if (event->type == WHEELUPMOUSE && event->alt) { - mx= but->x2; - click= 1; + mx = but->x2; + click = 1; } - else if (event->val==KM_PRESS) { + else if (event->val == KM_PRESS) { if (ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->ctrl) { button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING); - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; } else if (event->type == LEFTMOUSE) { - data->dragstartx= data->draglastx= ui_is_a_warp_but(but) ? screen_mx:mx; + data->dragstartx = data->draglastx = ui_is_a_warp_but(but) ? screen_mx : mx; button_activate_state(C, but, BUTTON_STATE_NUM_EDITING); - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; } - else if (ELEM(event->type, PADENTER, RETKEY) && event->val==KM_PRESS) - click= 1; - else if (event->type == MINUSKEY && event->val==KM_PRESS) { + else if (ELEM(event->type, PADENTER, RETKEY) && event->val == KM_PRESS) + click = 1; + else if (event->type == MINUSKEY && event->val == KM_PRESS) { button_activate_state(C, but, BUTTON_STATE_NUM_EDITING); data->value = -data->value; button_activate_state(C, but, BUTTON_STATE_EXIT); - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; } } } else if (data->state == BUTTON_STATE_NUM_EDITING) { if (event->type == ESCKEY) { - data->cancel= 1; - data->escapecancel= 1; + data->cancel = 1; + data->escapecancel = 1; button_activate_state(C, but, BUTTON_STATE_EXIT); } - else if (event->type == LEFTMOUSE && event->val!=KM_PRESS) { + else if (event->type == LEFTMOUSE && event->val != KM_PRESS) { if (data->dragchange) button_activate_state(C, but, BUTTON_STATE_EXIT); else - click= 1; + click = 1; } else if (event->type == MOUSEMOVE) { float fac; int snap; - fac= 1.0f; + fac = 1.0f; if (event->shift) fac /= 10.0f; if (event->alt) fac /= 20.0f; - snap= (event->ctrl)? (event->shift)? 2: 1: 0; + snap = (event->ctrl) ? (event->shift) ? 2 : 1 : 0; - if (ui_numedit_but_NUM(but, data, fac, snap, (ui_is_a_warp_but(but) ? screen_mx:mx))) + if (ui_numedit_but_NUM(but, data, fac, snap, (ui_is_a_warp_but(but) ? screen_mx : mx))) ui_numedit_apply(C, block, but, data); } - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; } else if (data->state == BUTTON_STATE_TEXT_EDITING) { ui_do_but_textedit(C, block, but, data, event); - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; } else if (data->state == BUTTON_STATE_TEXT_SELECTING) { ui_do_but_textedit_select(C, block, but, data, event); - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; } if (click) { @@ -2570,29 +2570,29 @@ static int ui_do_but_NUM(bContext *C, uiBlock *block, uiBut *but, uiHandleButton float tempf, softmin, softmax; int temp; - softmin= but->softmin; - softmax= but->softmax; + softmin = but->softmin; + softmax = but->softmax; if (!ui_is_but_float(but)) { - if (mx < (but->x1 + (but->x2 - but->x1)/3 - 3)) { + if (mx < (but->x1 + (but->x2 - but->x1) / 3 - 3)) { button_activate_state(C, but, BUTTON_STATE_NUM_EDITING); - temp= (int)data->value - 1; - if (temp>=softmin && temp<=softmax) - data->value= (double)temp; + temp = (int)data->value - 1; + if (temp >= softmin && temp <= softmax) + data->value = (double)temp; else - data->cancel= 1; + data->cancel = 1; button_activate_state(C, but, BUTTON_STATE_EXIT); } - else if (mx > (but->x1 + (2*(but->x2 - but->x1)/3) + 3)) { + else if (mx > (but->x1 + (2 * (but->x2 - but->x1) / 3) + 3)) { button_activate_state(C, but, BUTTON_STATE_NUM_EDITING); - temp= (int)data->value + 1; - if (temp>=softmin && temp<=softmax) - data->value= (double)temp; + temp = (int)data->value + 1; + if (temp >= softmin && temp <= softmax) + data->value = (double)temp; else - data->cancel= 1; + data->cancel = 1; button_activate_state(C, but, BUTTON_STATE_EXIT); } @@ -2600,21 +2600,21 @@ static int ui_do_but_NUM(bContext *C, uiBlock *block, uiBut *but, uiHandleButton button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING); } else { - if (mx < (but->x1 + (but->x2 - but->x1)/3 - 3)) { + if (mx < (but->x1 + (but->x2 - but->x1) / 3 - 3)) { button_activate_state(C, but, BUTTON_STATE_NUM_EDITING); - tempf= (float)data->value - 0.01f * but->a1; + tempf = (float)data->value - 0.01f * but->a1; if (tempf < softmin) tempf = softmin; - data->value= tempf; + data->value = tempf; button_activate_state(C, but, BUTTON_STATE_EXIT); } - else if (mx > but->x1 + (2*((but->x2 - but->x1)/3) + 3)) { + else if (mx > but->x1 + (2 * ((but->x2 - but->x1) / 3) + 3)) { button_activate_state(C, but, BUTTON_STATE_NUM_EDITING); - tempf= (float)data->value + 0.01f * but->a1; + tempf = (float)data->value + 0.01f * but->a1; if (tempf > softmax) tempf = softmax; - data->value= tempf; + data->value = tempf; button_activate_state(C, but, BUTTON_STATE_EXIT); } @@ -2622,7 +2622,7 @@ static int ui_do_but_NUM(bContext *C, uiBlock *block, uiBut *but, uiHandleButton button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING); } - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; } return retval; @@ -2631,70 +2631,70 @@ static int ui_do_but_NUM(bContext *C, uiBlock *block, uiBut *but, uiHandleButton static int ui_numedit_but_SLI(uiBut *but, uiHandleButtonData *data, int shift, int ctrl, int mx) { float deler, f, tempf, softmin, softmax, softrange; - int temp, lvalue, changed= 0; + int temp, lvalue, changed = 0; - softmin= but->softmin; - softmax= but->softmax; - softrange= softmax - softmin; + softmin = but->softmin; + softmax = but->softmax; + softrange = softmax - softmin; - if (but->type==NUMSLI) deler= ((but->x2-but->x1) - 5.0f*but->aspect); - else if (but->type==HSVSLI) deler= ((but->x2-but->x1)/2.0f - 5.0f*but->aspect); - else if (but->type==SCROLL) { - int horizontal= (but->x2 - but->x1 > but->y2 - but->y1); - float size= (horizontal)? (but->x2-but->x1): -(but->y2-but->y1); - deler= size*(but->softmax - but->softmin)/(but->softmax - but->softmin + but->a1); + if (but->type == NUMSLI) deler = ((but->x2 - but->x1) - 5.0f * but->aspect); + else if (but->type == HSVSLI) deler = ((but->x2 - but->x1) / 2.0f - 5.0f * but->aspect); + else if (but->type == SCROLL) { + int horizontal = (but->x2 - but->x1 > but->y2 - but->y1); + float size = (horizontal) ? (but->x2 - but->x1) : -(but->y2 - but->y1); + deler = size * (but->softmax - but->softmin) / (but->softmax - but->softmin + but->a1); } - else deler= (but->x2-but->x1- 5.0f*but->aspect); + else deler = (but->x2 - but->x1 - 5.0f * but->aspect); - f= (float)(mx-data->dragstartx)/deler + data->dragfstart; + f = (float)(mx - data->dragstartx) / deler + data->dragfstart; if (shift) - f= (f-data->dragfstart)/10.0f + data->dragfstart; + f = (f - data->dragfstart) / 10.0f + data->dragfstart; CLAMP(f, 0.0f, 1.0f); - tempf= softmin + f*softrange; - temp= floorf(tempf+0.5f); + tempf = softmin + f * softrange; + temp = floorf(tempf + 0.5f); if (ctrl) { - if (tempf==softmin || tempf==softmax); + if (tempf == softmin || tempf == softmax) ; else if (ui_is_but_float(but)) { if (shift) { - if (tempf==softmin || tempf==softmax); - else if (softmax-softmin < 2.10f) tempf= 0.01f * floorf(100.0f*tempf); - else if (softmax-softmin < 21.0f) tempf= 0.1f * floorf(10.0f*tempf); - else tempf= floorf(tempf); + if (tempf == softmin || tempf == softmax) ; + else if (softmax - softmin < 2.10f) tempf = 0.01f * floorf(100.0f * tempf); + else if (softmax - softmin < 21.0f) tempf = 0.1f * floorf(10.0f * tempf); + else tempf = floorf(tempf); } else { - if (softmax-softmin < 2.10f) tempf= 0.1f * floorf(10.0f*tempf); - else if (softmax-softmin < 21.0f) tempf= floorf(tempf); - else tempf= 10.0f*floorf(tempf/10.0f); + if (softmax - softmin < 2.10f) tempf = 0.1f * floorf(10.0f * tempf); + else if (softmax - softmin < 21.0f) tempf = floorf(tempf); + else tempf = 10.0f * floorf(tempf / 10.0f); } } else { - temp= 10*(temp/10); - tempf= temp; + temp = 10 * (temp / 10); + tempf = temp; } } if (!ui_is_but_float(but)) { - lvalue= floor(data->value+0.5); + lvalue = floor(data->value + 0.5); CLAMP(temp, softmin, softmax); if (temp != lvalue) { - data->value= temp; - data->dragchange= 1; - changed= 1; + data->value = temp; + data->dragchange = 1; + changed = 1; } } else { CLAMP(tempf, softmin, softmax); if (tempf != (float)data->value) { - data->value= tempf; - data->dragchange= 1; - changed= 1; + data->value = tempf; + data->dragchange = 1; + changed = 1; } } @@ -2703,27 +2703,27 @@ static int ui_numedit_but_SLI(uiBut *but, uiHandleButtonData *data, int shift, i static int ui_do_but_SLI(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, wmEvent *event) { - int mx, my, click= 0; - int retval= WM_UI_HANDLER_CONTINUE; + int mx, my, click = 0; + int retval = WM_UI_HANDLER_CONTINUE; - mx= event->x; - my= event->y; + mx = event->x; + my = event->y; ui_window_to_block(data->region, block, &mx, &my); if (data->state == BUTTON_STATE_HIGHLIGHT) { /* XXX hardcoded keymap check.... */ if (event->type == WHEELDOWNMOUSE && event->alt) { - mx= but->x1; - click= 2; + mx = but->x1; + click = 2; } else if (event->type == WHEELUPMOUSE && event->alt) { - mx= but->x2; - click= 2; + mx = but->x2; + click = 2; } - else if (event->val==KM_PRESS) { + else if (event->val == KM_PRESS) { if (ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->ctrl) { button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING); - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; } /* alt-click on sides to get "arrows" like in NUM buttons, and match wheel usage above */ else if (event->type == LEFTMOUSE && event->alt) { @@ -2735,101 +2735,101 @@ static int ui_do_but_SLI(bContext *C, uiBlock *block, uiBut *but, uiHandleButton mx = but->x2; } else if (event->type == LEFTMOUSE) { - data->dragstartx= mx; - data->draglastx= mx; + data->dragstartx = mx; + data->draglastx = mx; button_activate_state(C, but, BUTTON_STATE_NUM_EDITING); - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; } - else if (ELEM(event->type, PADENTER, RETKEY) && event->val==KM_PRESS) - click= 1; - else if (event->type == MINUSKEY && event->val==KM_PRESS) { + else if (ELEM(event->type, PADENTER, RETKEY) && event->val == KM_PRESS) + click = 1; + else if (event->type == MINUSKEY && event->val == KM_PRESS) { button_activate_state(C, but, BUTTON_STATE_NUM_EDITING); data->value = -data->value; button_activate_state(C, but, BUTTON_STATE_EXIT); - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; } } } else if (data->state == BUTTON_STATE_NUM_EDITING) { if (event->type == ESCKEY) { - data->cancel= 1; - data->escapecancel= 1; + data->cancel = 1; + data->escapecancel = 1; button_activate_state(C, but, BUTTON_STATE_EXIT); } - else if (event->type == LEFTMOUSE && event->val!=KM_PRESS) { + else if (event->type == LEFTMOUSE && event->val != KM_PRESS) { if (data->dragchange) button_activate_state(C, but, BUTTON_STATE_EXIT); else - click= 1; + click = 1; } else if (event->type == MOUSEMOVE) { if (ui_numedit_but_SLI(but, data, event->shift, event->ctrl, mx)) ui_numedit_apply(C, block, but, data); } - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; } else if (data->state == BUTTON_STATE_TEXT_EDITING) { ui_do_but_textedit(C, block, but, data, event); - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; } else if (data->state == BUTTON_STATE_TEXT_SELECTING) { ui_do_but_textedit_select(C, block, but, data, event); - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; } if (click) { - if (click==2) { + if (click == 2) { /* nudge slider to the left or right */ float f, tempf, softmin, softmax, softrange; int temp; button_activate_state(C, but, BUTTON_STATE_NUM_EDITING); - softmin= but->softmin; - softmax= but->softmax; - softrange= softmax - softmin; + softmin = but->softmin; + softmax = but->softmax; + softrange = softmax - softmin; - tempf= data->value; - temp= (int)data->value; + tempf = data->value; + temp = (int)data->value; #if 0 - if (but->type==SLI) { - f= (float)(mx-but->x1)/(but->x2-but->x1); /* same as below */ + if (but->type == SLI) { + f = (float)(mx - but->x1) / (but->x2 - but->x1); /* same as below */ } else #endif { - f= (float)(mx- but->x1)/(but->x2-but->x1); + f = (float)(mx - but->x1) / (but->x2 - but->x1); } - f= softmin + f*softrange; + f = softmin + f * softrange; if (!ui_is_but_float(but)) { - if (f=softmin && temp<=softmax) - data->value= temp; + if (temp >= softmin && temp <= softmax) + data->value = temp; else - data->cancel= 1; + data->cancel = 1; } else { - if (f=softmin && tempf<=softmax) - data->value= tempf; + if (tempf >= softmin && tempf <= softmax) + data->value = tempf; else - data->cancel= 1; + data->cancel = 1; } button_activate_state(C, but, BUTTON_STATE_EXIT); - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; } else { /* edit the value directly */ button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING); - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; } } @@ -2839,49 +2839,49 @@ static int ui_do_but_SLI(bContext *C, uiBlock *block, uiBut *but, uiHandleButton static int ui_do_but_SCROLL(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, wmEvent *event) { int mx, my /*, click= 0 */; - int retval= WM_UI_HANDLER_CONTINUE; - int horizontal= (but->x2 - but->x1 > but->y2 - but->y1); + int retval = WM_UI_HANDLER_CONTINUE; + int horizontal = (but->x2 - but->x1 > but->y2 - but->y1); - mx= event->x; - my= event->y; + mx = event->x; + my = event->y; ui_window_to_block(data->region, block, &mx, &my); if (data->state == BUTTON_STATE_HIGHLIGHT) { - if (event->val==KM_PRESS) { + if (event->val == KM_PRESS) { if (event->type == LEFTMOUSE) { if (horizontal) { - data->dragstartx= mx; - data->draglastx= mx; + data->dragstartx = mx; + data->draglastx = mx; } else { - data->dragstartx= my; - data->draglastx= my; + data->dragstartx = my; + data->draglastx = my; } button_activate_state(C, but, BUTTON_STATE_NUM_EDITING); - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; } /* UNUSED - otherwise code is ok, add back if needed */ #if 0 - else if (ELEM(event->type, PADENTER, RETKEY) && event->val==KM_PRESS) - click= 1; + else if (ELEM(event->type, PADENTER, RETKEY) && event->val == KM_PRESS) + click = 1; #endif } } else if (data->state == BUTTON_STATE_NUM_EDITING) { if (event->type == ESCKEY) { - data->cancel= 1; - data->escapecancel= 1; + data->cancel = 1; + data->escapecancel = 1; button_activate_state(C, but, BUTTON_STATE_EXIT); } - else if (event->type == LEFTMOUSE && event->val!=KM_PRESS) { + else if (event->type == LEFTMOUSE && event->val != KM_PRESS) { button_activate_state(C, but, BUTTON_STATE_EXIT); } else if (event->type == MOUSEMOVE) { - if (ui_numedit_but_SLI(but, data, 0, 0, (horizontal)? mx: my)) + if (ui_numedit_but_SLI(but, data, 0, 0, (horizontal) ? mx : my)) ui_numedit_apply(C, block, but, data); } - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; } return retval; @@ -2894,24 +2894,24 @@ static int ui_do_but_BLOCK(bContext *C, uiBut *but, uiHandleButtonData *data, wm if (data->state == BUTTON_STATE_HIGHLIGHT) { /* first handle click on icondrag type button */ - if (event->type==LEFTMOUSE && but->dragpoin && event->val==KM_PRESS) { + if (event->type == LEFTMOUSE && but->dragpoin && event->val == KM_PRESS) { if (ui_but_mouse_inside_icon(but, data->region, event)) { button_activate_state(C, but, BUTTON_STATE_WAIT_DRAG); - data->dragstartx= event->x; - data->dragstarty= event->y; + data->dragstartx = event->x; + data->dragstarty = event->y; return WM_UI_HANDLER_BREAK; } } /* regular open menu */ - if (ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->val==KM_PRESS) { + if (ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->val == KM_PRESS) { button_activate_state(C, but, BUTTON_STATE_MENU_OPEN); return WM_UI_HANDLER_BREAK; } else if (ELEM3(but->type, MENU, ICONROW, ICONTEXTROW)) { if (event->type == WHEELDOWNMOUSE && event->alt) { - data->value= ui_step_name_menu(but, -1); + data->value = ui_step_name_menu(but, -1); button_activate_state(C, but, BUTTON_STATE_EXIT); ui_apply_button(C, but->block, but, data, 1); @@ -2922,37 +2922,37 @@ static int ui_do_but_BLOCK(bContext *C, uiBut *but, uiHandleButtonData *data, wm * all that mouse leave and cancel stuff, so quick scroll wouldn't be an issue anymore. * same goes for scrolling wheel in another direction below (sergey) */ - data->postbut= but; - data->posttype= BUTTON_ACTIVATE_OVER; + data->postbut = but; + data->posttype = BUTTON_ACTIVATE_OVER; return WM_UI_HANDLER_BREAK; } else if (event->type == WHEELUPMOUSE && event->alt) { - data->value= ui_step_name_menu(but, 1); + data->value = ui_step_name_menu(but, 1); button_activate_state(C, but, BUTTON_STATE_EXIT); ui_apply_button(C, but->block, but, data, 1); /* why this is needed described above */ - data->postbut= but; - data->posttype= BUTTON_ACTIVATE_OVER; + data->postbut = but; + data->posttype = BUTTON_ACTIVATE_OVER; return WM_UI_HANDLER_BREAK; } } - else if (but->type==COL) { - if ( ELEM(event->type, WHEELDOWNMOUSE, WHEELUPMOUSE) && event->alt) { - float *hsv= ui_block_hsv_get(but->block); + else if (but->type == COL) { + if (ELEM(event->type, WHEELDOWNMOUSE, WHEELUPMOUSE) && event->alt) { + float *hsv = ui_block_hsv_get(but->block); float col[3]; ui_get_but_vectorf(but, col); - rgb_to_hsv_compat(col[0], col[1], col[2], hsv, hsv+1, hsv+2); + rgb_to_hsv_compat(col[0], col[1], col[2], hsv, hsv + 1, hsv + 2); - if (event->type==WHEELDOWNMOUSE) - hsv[2]= CLAMPIS(hsv[2]-0.05f, 0.0f, 1.0f); + if (event->type == WHEELDOWNMOUSE) + hsv[2] = CLAMPIS(hsv[2] - 0.05f, 0.0f, 1.0f); else - hsv[2]= CLAMPIS(hsv[2]+0.05f, 0.0f, 1.0f); + hsv[2] = CLAMPIS(hsv[2] + 0.05f, 0.0f, 1.0f); - hsv_to_rgb(hsv[0], hsv[1], hsv[2], data->vec, data->vec+1, data->vec+2); + hsv_to_rgb(hsv[0], hsv[1], hsv[2], data->vec, data->vec + 1, data->vec + 2); ui_set_but_vectorf(but, data->vec); button_activate_state(C, but, BUTTON_STATE_EXIT); @@ -2969,13 +2969,13 @@ static int ui_do_but_BLOCK(bContext *C, uiBut *but, uiHandleButtonData *data, wm } /* outside icon quit, not needed if drag activated */ - if (0==ui_but_mouse_inside_icon(but, data->region, event)) { + if (0 == ui_but_mouse_inside_icon(but, data->region, event)) { button_activate_state(C, but, BUTTON_STATE_EXIT); - data->cancel= 1; + data->cancel = 1; return WM_UI_HANDLER_BREAK; } - if (event->type==LEFTMOUSE && event->val==KM_RELEASE) { + if (event->type == LEFTMOUSE && event->val == KM_RELEASE) { button_activate_state(C, but, BUTTON_STATE_MENU_OPEN); return WM_UI_HANDLER_BREAK; } @@ -2988,7 +2988,7 @@ static int ui_do_but_BLOCK(bContext *C, uiBut *but, uiHandleButtonData *data, wm static int ui_numedit_but_NORMAL(uiBut *but, uiHandleButtonData *data, int mx, int my) { float dx, dy, rad, radsq, mrad, *fp; - int mdx, mdy, changed= 1; + int mdx, mdy, changed = 1; /* button is presumed square */ /* if mouse moves outside of sphere, it does negative normal */ @@ -2996,50 +2996,50 @@ static int ui_numedit_but_NORMAL(uiBut *but, uiHandleButtonData *data, int mx, i /* note that both data->vec and data->origvec should be normalized * else we'll get a harmless but annoying jump when first clicking */ - fp= data->origvec; - rad= (but->x2 - but->x1); - radsq= rad*rad; + fp = data->origvec; + rad = (but->x2 - but->x1); + radsq = rad * rad; - if (fp[2]>0.0f) { - mdx= (rad*fp[0]); - mdy= (rad*fp[1]); + if (fp[2] > 0.0f) { + mdx = (rad * fp[0]); + mdy = (rad * fp[1]); } - else if (fp[2]> -1.0f) { - mrad= rad/sqrtf(fp[0]*fp[0] + fp[1]*fp[1]); + else if (fp[2] > -1.0f) { + mrad = rad / sqrtf(fp[0] * fp[0] + fp[1] * fp[1]); - mdx= 2.0f*mrad*fp[0] - (rad*fp[0]); - mdy= 2.0f*mrad*fp[1] - (rad*fp[1]); + mdx = 2.0f * mrad * fp[0] - (rad * fp[0]); + mdy = 2.0f * mrad * fp[1] - (rad * fp[1]); } - else mdx= mdy= 0; + else mdx = mdy = 0; - dx= (float)(mx+mdx-data->dragstartx); - dy= (float)(my+mdy-data->dragstarty); + dx = (float)(mx + mdx - data->dragstartx); + dy = (float)(my + mdy - data->dragstarty); - fp= data->vec; - mrad= dx*dx+dy*dy; - if (mrad < radsq) { /* inner circle */ - fp[0]= dx; - fp[1]= dy; - fp[2]= sqrt( radsq-dx*dx-dy*dy ); + fp = data->vec; + mrad = dx * dx + dy * dy; + if (mrad < radsq) { /* inner circle */ + fp[0] = dx; + fp[1] = dy; + fp[2] = sqrt(radsq - dx * dx - dy * dy); } - else { /* outer circle */ + else { /* outer circle */ - mrad= rad/sqrtf(mrad); // veclen + mrad = rad / sqrtf(mrad); // veclen - dx*= (2.0f*mrad - 1.0f); - dy*= (2.0f*mrad - 1.0f); + dx *= (2.0f * mrad - 1.0f); + dy *= (2.0f * mrad - 1.0f); - mrad= dx*dx+dy*dy; + mrad = dx * dx + dy * dy; if (mrad < radsq) { - fp[0]= dx; - fp[1]= dy; - fp[2]= -sqrt( radsq-dx*dx-dy*dy ); + fp[0] = dx; + fp[1] = dy; + fp[2] = -sqrt(radsq - dx * dx - dy * dy); } } normalize_v3(fp); - data->draglastx= mx; - data->draglasty= my; + data->draglastx = mx; + data->draglasty = my; return changed; } @@ -3048,16 +3048,16 @@ static int ui_do_but_NORMAL(bContext *C, uiBlock *block, uiBut *but, uiHandleBut { int mx, my; - mx= event->x; - my= event->y; + mx = event->x; + my = event->y; ui_window_to_block(data->region, block, &mx, &my); if (data->state == BUTTON_STATE_HIGHLIGHT) { - if (event->type==LEFTMOUSE && event->val==KM_PRESS) { - data->dragstartx= mx; - data->dragstarty= my; - data->draglastx= mx; - data->draglasty= my; + if (event->type == LEFTMOUSE && event->val == KM_PRESS) { + data->dragstartx = mx; + data->dragstarty = my; + data->draglastx = mx; + data->draglasty = my; button_activate_state(C, but, BUTTON_STATE_NUM_EDITING); /* also do drag the first time */ @@ -3069,12 +3069,12 @@ static int ui_do_but_NORMAL(bContext *C, uiBlock *block, uiBut *but, uiHandleBut } else if (data->state == BUTTON_STATE_NUM_EDITING) { if (event->type == MOUSEMOVE) { - if (mx!=data->draglastx || my!=data->draglasty) { + if (mx != data->draglastx || my != data->draglasty) { if (ui_numedit_but_NORMAL(but, data, mx, my)) ui_numedit_apply(C, block, but, data); } } - else if (event->type==LEFTMOUSE && event->val!=KM_PRESS) + else if (event->type == LEFTMOUSE && event->val != KM_PRESS) button_activate_state(C, but, BUTTON_STATE_EXIT); return WM_UI_HANDLER_BREAK; @@ -3086,9 +3086,9 @@ static int ui_do_but_NORMAL(bContext *C, uiBlock *block, uiBut *but, uiHandleBut static int ui_numedit_but_HSVCUBE(uiBut *but, uiHandleButtonData *data, int mx, int my) { float rgb[3]; - float *hsv= ui_block_hsv_get(but->block); + float *hsv = ui_block_hsv_get(but->block); float x, y; - int changed= 1; + int changed = 1; int color_profile = but->block->color_profile; if (but->rnaprop) { @@ -3098,64 +3098,64 @@ static int ui_numedit_but_HSVCUBE(uiBut *but, uiHandleButtonData *data, int mx, ui_get_but_vectorf(but, rgb); - rgb_to_hsv_compat(rgb[0], rgb[1], rgb[2], hsv, hsv+1, hsv+2); + rgb_to_hsv_compat(rgb[0], rgb[1], rgb[2], hsv, hsv + 1, hsv + 2); /* relative position within box */ - x= ((float)mx-but->x1)/(but->x2-but->x1); - y= ((float)my-but->y1)/(but->y2-but->y1); + x = ((float)mx - but->x1) / (but->x2 - but->x1); + y = ((float)my - but->y1) / (but->y2 - but->y1); CLAMP(x, 0.0f, 1.0f); CLAMP(y, 0.0f, 1.0f); - switch((int)but->a1) { - case UI_GRAD_SV: - hsv[2]= x; - hsv[1]= y; - break; - case UI_GRAD_HV: - hsv[0]= x; - hsv[2]= y; - break; - case UI_GRAD_HS: - hsv[0]= x; - hsv[1]= y; - break; - case UI_GRAD_H: - hsv[0]= x; - break; - case UI_GRAD_S: - hsv[1]= x; - break; - case UI_GRAD_V: - hsv[2]= x; - break; - case UI_GRAD_V_ALT: - /* vertical 'value' strip */ - - /* exception only for value strip - use the range set in but->min/max */ - hsv[2] = y * (but->softmax - but->softmin) + but->softmin; - - if (color_profile) - hsv[2] = srgb_to_linearrgb(hsv[2]); - - if (hsv[2] > but->softmax) - hsv[2] = but->softmax; - break; - default: - assert(!"invalid hsv type"); + switch ((int)but->a1) { + case UI_GRAD_SV: + hsv[2] = x; + hsv[1] = y; + break; + case UI_GRAD_HV: + hsv[0] = x; + hsv[2] = y; + break; + case UI_GRAD_HS: + hsv[0] = x; + hsv[1] = y; + break; + case UI_GRAD_H: + hsv[0] = x; + break; + case UI_GRAD_S: + hsv[1] = x; + break; + case UI_GRAD_V: + hsv[2] = x; + break; + case UI_GRAD_V_ALT: + /* vertical 'value' strip */ + + /* exception only for value strip - use the range set in but->min/max */ + hsv[2] = y * (but->softmax - but->softmin) + but->softmin; + + if (color_profile) + hsv[2] = srgb_to_linearrgb(hsv[2]); + + if (hsv[2] > but->softmax) + hsv[2] = but->softmax; + break; + default: + assert(!"invalid hsv type"); } - hsv_to_rgb(hsv[0], hsv[1], hsv[2], rgb, rgb+1, rgb+2); + hsv_to_rgb(hsv[0], hsv[1], hsv[2], rgb, rgb + 1, rgb + 2); copy_v3_v3(data->vec, rgb); - data->draglastx= mx; - data->draglasty= my; + data->draglastx = mx; + data->draglasty = my; return changed; } static void ui_ndofedit_but_HSVCUBE(uiBut *but, uiHandleButtonData *data, wmNDOFMotionData *ndof, int shift) { - float *hsv= ui_block_hsv_get(but->block); + float *hsv = ui_block_hsv_get(but->block); float rgb[3]; float sensitivity = (shift ? 0.15f : 0.3f) * ndof->dt; @@ -3167,9 +3167,9 @@ static void ui_ndofedit_but_HSVCUBE(uiBut *but, uiHandleButtonData *data, wmNDOF } ui_get_but_vectorf(but, rgb); - rgb_to_hsv_compat(rgb[0], rgb[1], rgb[2], hsv, hsv+1, hsv+2); + rgb_to_hsv_compat(rgb[0], rgb[1], rgb[2], hsv, hsv + 1, hsv + 2); - switch((int)but->a1) { + switch ((int)but->a1) { case UI_GRAD_SV: hsv[2] += ndof->ry * sensitivity; hsv[1] += ndof->rx * sensitivity; @@ -3205,7 +3205,7 @@ static void ui_ndofedit_but_HSVCUBE(uiBut *but, uiHandleButtonData *data, wmNDOF assert(!"invalid hsv type"); } - hsv_to_rgb(hsv[0], hsv[1], hsv[2], rgb, rgb+1, rgb+2); + hsv_to_rgb(hsv[0], hsv[1], hsv[2], rgb, rgb + 1, rgb + 2); copy_v3_v3(data->vec, rgb); ui_set_but_vectorf(but, data->vec); } @@ -3214,16 +3214,16 @@ static int ui_do_but_HSVCUBE(bContext *C, uiBlock *block, uiBut *but, uiHandleBu { int mx, my; - mx= event->x; - my= event->y; + mx = event->x; + my = event->y; ui_window_to_block(data->region, block, &mx, &my); if (data->state == BUTTON_STATE_HIGHLIGHT) { - if (event->type==LEFTMOUSE && event->val==KM_PRESS) { - data->dragstartx= mx; - data->dragstarty= my; - data->draglastx= mx; - data->draglasty= my; + if (event->type == LEFTMOUSE && event->val == KM_PRESS) { + data->dragstartx = mx; + data->dragstarty = my; + data->draglastx = mx; + data->draglasty = my; button_activate_state(C, but, BUTTON_STATE_NUM_EDITING); /* also do drag the first time */ @@ -3233,7 +3233,7 @@ static int ui_do_but_HSVCUBE(bContext *C, uiBlock *block, uiBut *but, uiHandleBu return WM_UI_HANDLER_BREAK; } else if (event->type == NDOF_MOTION) { - wmNDOFMotionData *ndof = (wmNDOFMotionData*) event->customdata; + wmNDOFMotionData *ndof = (wmNDOFMotionData *) event->customdata; ui_ndofedit_but_HSVCUBE(but, data, ndof, event->shift); @@ -3244,25 +3244,25 @@ static int ui_do_but_HSVCUBE(bContext *C, uiBlock *block, uiBut *but, uiHandleBu } /* XXX hardcoded keymap check.... */ else if (event->type == BACKSPACEKEY && event->val == KM_PRESS) { - if (but->a1==UI_GRAD_V_ALT) { + if (but->a1 == UI_GRAD_V_ALT) { int len; /* reset only value */ - len= RNA_property_array_length(&but->rnapoin, but->rnaprop); + len = RNA_property_array_length(&but->rnapoin, but->rnaprop); if (len >= 3) { float rgb[3], def_hsv[3]; float *def; - float *hsv= ui_block_hsv_get(but->block); - def= MEM_callocN(sizeof(float)*len, "reset_defaults - float"); + float *hsv = ui_block_hsv_get(but->block); + def = MEM_callocN(sizeof(float) * len, "reset_defaults - float"); RNA_property_float_get_default_array(&but->rnapoin, but->rnaprop, def); - rgb_to_hsv(def[0], def[1], def[2], def_hsv, def_hsv+1, def_hsv+2); + rgb_to_hsv(def[0], def[1], def[2], def_hsv, def_hsv + 1, def_hsv + 2); ui_get_but_vectorf(but, rgb); - rgb_to_hsv_compat(rgb[0], rgb[1], rgb[2], hsv, hsv+1, hsv+2); + rgb_to_hsv_compat(rgb[0], rgb[1], rgb[2], hsv, hsv + 1, hsv + 2); - hsv_to_rgb(hsv[0], hsv[1], def_hsv[2], rgb, rgb+1, rgb+2); + hsv_to_rgb(hsv[0], hsv[1], def_hsv[2], rgb, rgb + 1, rgb + 2); ui_set_but_vectorf(but, rgb); RNA_property_update(C, &but->rnapoin, but->rnaprop); @@ -3275,17 +3275,17 @@ static int ui_do_but_HSVCUBE(bContext *C, uiBlock *block, uiBut *but, uiHandleBu } else if (data->state == BUTTON_STATE_NUM_EDITING) { if (event->type == ESCKEY) { - data->cancel= 1; - data->escapecancel= 1; + data->cancel = 1; + data->escapecancel = 1; button_activate_state(C, but, BUTTON_STATE_EXIT); } else if (event->type == MOUSEMOVE) { - if (mx!=data->draglastx || my!=data->draglasty) { + if (mx != data->draglastx || my != data->draglasty) { if (ui_numedit_but_HSVCUBE(but, data, mx, my)) ui_numedit_apply(C, block, but, data); } } - else if (event->type==LEFTMOUSE && event->val!=KM_PRESS) + else if (event->type == LEFTMOUSE && event->val != KM_PRESS) button_activate_state(C, but, BUTTON_STATE_EXIT); return WM_UI_HANDLER_BREAK; @@ -3297,7 +3297,7 @@ static int ui_do_but_HSVCUBE(bContext *C, uiBlock *block, uiBut *but, uiHandleBu static int ui_numedit_but_HSVCIRCLE(uiBut *but, uiHandleButtonData *data, int mx, int my, int shift) { rcti rect; - int changed= 1; + int changed = 1; float rgb[3]; float hsv[3]; @@ -3306,7 +3306,7 @@ static int ui_numedit_but_HSVCIRCLE(uiBut *but, uiHandleButtonData *data, int mx ui_get_but_vectorf(but, rgb); copy_v3_v3(hsv, ui_block_hsv_get(but->block)); - rgb_to_hsv_compat(rgb[0], rgb[1], rgb[2], hsv, hsv+1, hsv+2); + rgb_to_hsv_compat(rgb[0], rgb[1], rgb[2], hsv, hsv + 1, hsv + 2); /* exception, when using color wheel in 'locked' value state: * allow choosing a hue for black values, by giving a tiny increment */ @@ -3315,18 +3315,18 @@ static int ui_numedit_but_HSVCIRCLE(uiBut *but, uiHandleButtonData *data, int mx } if (U.uiflag & USER_CONTINUOUS_MOUSE) { - float fac= shift ? 0.05f : 1.0f; + float fac = shift ? 0.05f : 1.0f; /* slow down the mouse, this is fairly picky */ - mx = (data->dragstartx*(1.0f-fac) + mx*fac); - my = (data->dragstarty*(1.0f-fac) + my*fac); + mx = (data->dragstartx * (1.0f - fac) + mx * fac); + my = (data->dragstarty * (1.0f - fac) + my * fac); } - ui_hsvcircle_vals_from_pos(hsv, hsv+1, &rect, (float)mx, (float)my); + ui_hsvcircle_vals_from_pos(hsv, hsv + 1, &rect, (float)mx, (float)my); if (but->flag & UI_BUT_COLOR_CUBIC) - hsv[1]= 1.0f - sqrt3f(1.0f - hsv[1]); + hsv[1] = 1.0f - sqrt3f(1.0f - hsv[1]); - hsv_to_rgb(hsv[0], hsv[1], hsv[2], rgb, rgb+1, rgb+2); + hsv_to_rgb(hsv[0], hsv[1], hsv[2], rgb, rgb + 1, rgb + 2); if ((but->flag & UI_BUT_VEC_SIZE_LOCK) && (rgb[0] || rgb[1] || rgb[2])) { normalize_v3(rgb); @@ -3335,21 +3335,21 @@ static int ui_numedit_but_HSVCIRCLE(uiBut *but, uiHandleButtonData *data, int mx ui_set_but_vectorf(but, rgb); - data->draglastx= mx; - data->draglasty= my; + data->draglastx = mx; + data->draglasty = my; return changed; } static void ui_ndofedit_but_HSVCIRCLE(uiBut *but, uiHandleButtonData *data, wmNDOFMotionData *ndof, int shift) { - float *hsv= ui_block_hsv_get(but->block); + float *hsv = ui_block_hsv_get(but->block); float rgb[3]; float phi, r /*, sqr */ /* UNUSED */, v[2]; float sensitivity = (shift ? 0.15f : 0.3f) * ndof->dt; ui_get_but_vectorf(but, rgb); - rgb_to_hsv_compat(rgb[0], rgb[1], rgb[2], hsv, hsv+1, hsv+2); + rgb_to_hsv_compat(rgb[0], rgb[1], rgb[2], hsv, hsv + 1, hsv + 2); /* Convert current colour on hue/sat disc to circular coordinates phi, r */ phi = fmodf(hsv[0] + 0.25f, 1.0f) * -2.0f * (float)M_PI; @@ -3365,7 +3365,7 @@ static void ui_ndofedit_but_HSVCIRCLE(uiBut *but, uiHandleButtonData *data, wmND v[1] += ndof->rx * sensitivity; /* convert back to polar coords on circle */ - phi = atan2f(v[0], v[1])/(2.0f*(float)M_PI) + 0.5f; + phi = atan2f(v[0], v[1]) / (2.0f * (float)M_PI) + 0.5f; /* use ndof z rotation to additionally rotate hue */ phi -= ndof->rz * sensitivity * 0.5f; @@ -3383,7 +3383,7 @@ static void ui_ndofedit_but_HSVCIRCLE(uiBut *but, uiHandleButtonData *data, wmND if (hsv[2] == 0.0f) hsv[2] = 0.0001f; } - hsv_to_rgb(hsv[0], hsv[1], hsv[2], data->vec, data->vec+1, data->vec+2); + hsv_to_rgb(hsv[0], hsv[1], hsv[2], data->vec, data->vec + 1, data->vec + 2); if ((but->flag & UI_BUT_VEC_SIZE_LOCK) && (data->vec[0] || data->vec[1] || data->vec[2])) { normalize_v3(data->vec); @@ -3397,16 +3397,16 @@ static void ui_ndofedit_but_HSVCIRCLE(uiBut *but, uiHandleButtonData *data, wmND static int ui_do_but_HSVCIRCLE(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, wmEvent *event) { int mx, my; - mx= event->x; - my= event->y; + mx = event->x; + my = event->y; ui_window_to_block(data->region, block, &mx, &my); if (data->state == BUTTON_STATE_HIGHLIGHT) { - if (event->type==LEFTMOUSE && event->val==KM_PRESS) { - data->dragstartx= mx; - data->dragstarty= my; - data->draglastx= mx; - data->draglasty= my; + if (event->type == LEFTMOUSE && event->val == KM_PRESS) { + data->dragstartx = mx; + data->dragstarty = my; + data->draglastx = mx; + data->draglasty = my; button_activate_state(C, but, BUTTON_STATE_NUM_EDITING); /* also do drag the first time */ @@ -3416,7 +3416,7 @@ static int ui_do_but_HSVCIRCLE(bContext *C, uiBlock *block, uiBut *but, uiHandle return WM_UI_HANDLER_BREAK; } else if (event->type == NDOF_MOTION) { - wmNDOFMotionData *ndof = (wmNDOFMotionData*) event->customdata; + wmNDOFMotionData *ndof = (wmNDOFMotionData *) event->customdata; ui_ndofedit_but_HSVCIRCLE(but, data, ndof, event->shift); @@ -3431,20 +3431,20 @@ static int ui_do_but_HSVCIRCLE(bContext *C, uiBlock *block, uiBut *but, uiHandle /* reset only saturation */ - len= RNA_property_array_length(&but->rnapoin, but->rnaprop); + len = RNA_property_array_length(&but->rnapoin, but->rnaprop); if (len >= 3) { float rgb[3], def_hsv[3]; float *def; - float *hsv= ui_block_hsv_get(but->block); - def= MEM_callocN(sizeof(float)*len, "reset_defaults - float"); + float *hsv = ui_block_hsv_get(but->block); + def = MEM_callocN(sizeof(float) * len, "reset_defaults - float"); RNA_property_float_get_default_array(&but->rnapoin, but->rnaprop, def); - rgb_to_hsv(def[0], def[1], def[2], def_hsv, def_hsv+1, def_hsv+2); + rgb_to_hsv(def[0], def[1], def[2], def_hsv, def_hsv + 1, def_hsv + 2); ui_get_but_vectorf(but, rgb); - rgb_to_hsv_compat(rgb[0], rgb[1], rgb[2], hsv, hsv+1, hsv+2); + rgb_to_hsv_compat(rgb[0], rgb[1], rgb[2], hsv, hsv + 1, hsv + 2); - hsv_to_rgb(hsv[0], def_hsv[1], hsv[2], rgb, rgb+1, rgb+2); + hsv_to_rgb(hsv[0], def_hsv[1], hsv[2], rgb, rgb + 1, rgb + 2); ui_set_but_vectorf(but, rgb); RNA_property_update(C, &but->rnapoin, but->rnaprop); @@ -3456,30 +3456,30 @@ static int ui_do_but_HSVCIRCLE(bContext *C, uiBlock *block, uiBut *but, uiHandle } else if (data->state == BUTTON_STATE_NUM_EDITING) { if (event->type == ESCKEY) { - data->cancel= 1; - data->escapecancel= 1; + data->cancel = 1; + data->escapecancel = 1; button_activate_state(C, but, BUTTON_STATE_EXIT); } /* XXX hardcoded keymap check.... */ else if (event->type == WHEELDOWNMOUSE) { - float *hsv= ui_block_hsv_get(but->block); - hsv[2]= CLAMPIS(hsv[2]-0.05f, 0.0f, 1.0f); - ui_set_but_hsv(but); // converts to rgb + float *hsv = ui_block_hsv_get(but->block); + hsv[2] = CLAMPIS(hsv[2] - 0.05f, 0.0f, 1.0f); + ui_set_but_hsv(but); // converts to rgb ui_numedit_apply(C, block, but, data); } else if (event->type == WHEELUPMOUSE) { - float *hsv= ui_block_hsv_get(but->block); - hsv[2]= CLAMPIS(hsv[2]+0.05f, 0.0f, 1.0f); - ui_set_but_hsv(but); // converts to rgb + float *hsv = ui_block_hsv_get(but->block); + hsv[2] = CLAMPIS(hsv[2] + 0.05f, 0.0f, 1.0f); + ui_set_but_hsv(but); // converts to rgb ui_numedit_apply(C, block, but, data); } else if (event->type == MOUSEMOVE) { - if (mx!=data->draglastx || my!=data->draglasty) { + if (mx != data->draglastx || my != data->draglasty) { if (ui_numedit_but_HSVCIRCLE(but, data, mx, my, event->shift)) ui_numedit_apply(C, block, but, data); } } - else if (event->type==LEFTMOUSE && event->val!=KM_PRESS) { + else if (event->type == LEFTMOUSE && event->val != KM_PRESS) { button_activate_state(C, but, BUTTON_STATE_EXIT); } return WM_UI_HANDLER_BREAK; @@ -3492,20 +3492,20 @@ static int ui_do_but_HSVCIRCLE(bContext *C, uiBlock *block, uiBut *but, uiHandle static int ui_numedit_but_COLORBAND(uiBut *but, uiHandleButtonData *data, int mx) { float dx; - int changed= 0; + int changed = 0; if (data->draglastx == mx) return changed; - dx= ((float)(mx - data->draglastx))/(but->x2-but->x1); + dx = ((float)(mx - data->draglastx)) / (but->x2 - but->x1); data->dragcbd->pos += dx; CLAMP(data->dragcbd->pos, 0.0f, 1.0f); colorband_update_sort(data->coba); - data->dragcbd= data->coba->data + data->coba->cur; /* because qsort */ + data->dragcbd = data->coba->data + data->coba->cur; /* because qsort */ - data->draglastx= mx; - changed= 1; + data->draglastx = mx; + changed = 1; return changed; } @@ -3514,40 +3514,40 @@ static int ui_do_but_COLORBAND(bContext *C, uiBlock *block, uiBut *but, uiHandle { ColorBand *coba; CBData *cbd; - int mx, my, a, xco, mindist= 12; + int mx, my, a, xco, mindist = 12; - mx= event->x; - my= event->y; + mx = event->x; + my = event->y; ui_window_to_block(data->region, block, &mx, &my); if (data->state == BUTTON_STATE_HIGHLIGHT) { - if (event->type==LEFTMOUSE && event->val==KM_PRESS) { - coba= (ColorBand*)but->poin; + if (event->type == LEFTMOUSE && event->val == KM_PRESS) { + coba = (ColorBand *)but->poin; if (event->ctrl) { /* insert new key on mouse location */ - float pos= ((float)(mx - but->x1))/(but->x2-but->x1); + float pos = ((float)(mx - but->x1)) / (but->x2 - but->x1); colorband_element_add(coba, pos); button_activate_state(C, but, BUTTON_STATE_EXIT); } else { - data->dragstartx= mx; - data->dragstarty= my; - data->draglastx= mx; - data->draglasty= my; + data->dragstartx = mx; + data->dragstarty = my; + data->draglastx = mx; + data->draglasty = my; /* activate new key when mouse is close */ - for (a=0, cbd= coba->data; atot; a++, cbd++) { - xco= but->x1 + (cbd->pos*(but->x2-but->x1)); - xco= ABS(xco-mx); - if (a==coba->cur) xco+= 5; // selected one disadvantage - if (xcocur= a; - mindist= xco; + for (a = 0, cbd = coba->data; a < coba->tot; a++, cbd++) { + xco = but->x1 + (cbd->pos * (but->x2 - but->x1)); + xco = ABS(xco - mx); + if (a == coba->cur) xco += 5; // selected one disadvantage + if (xco < mindist) { + coba->cur = a; + mindist = xco; } } - data->dragcbd= coba->data + coba->cur; + data->dragcbd = coba->data + coba->cur; button_activate_state(C, but, BUTTON_STATE_NUM_EDITING); } @@ -3556,12 +3556,12 @@ static int ui_do_but_COLORBAND(bContext *C, uiBlock *block, uiBut *but, uiHandle } else if (data->state == BUTTON_STATE_NUM_EDITING) { if (event->type == MOUSEMOVE) { - if (mx!=data->draglastx || my!=data->draglasty) { + if (mx != data->draglastx || my != data->draglasty) { if (ui_numedit_but_COLORBAND(but, data, mx)) ui_numedit_apply(C, block, but, data); } } - else if (event->type==LEFTMOUSE && event->val!=KM_PRESS) + else if (event->type == LEFTMOUSE && event->val != KM_PRESS) button_activate_state(C, but, BUTTON_STATE_EXIT); return WM_UI_HANDLER_BREAK; @@ -3572,81 +3572,81 @@ static int ui_do_but_COLORBAND(bContext *C, uiBlock *block, uiBut *but, uiHandle static int ui_numedit_but_CURVE(uiBut *but, uiHandleButtonData *data, int snap, int mx, int my) { - CurveMapping *cumap= (CurveMapping*)but->poin; - CurveMap *cuma= cumap->cm+cumap->cur; - CurveMapPoint *cmp= cuma->curve; + CurveMapping *cumap = (CurveMapping *)but->poin; + CurveMap *cuma = cumap->cm + cumap->cur; + CurveMapPoint *cmp = cuma->curve; float fx, fy, zoomx, zoomy /*, offsx, offsy */ /* UNUSED */; - int a, changed= 0; + int a, changed = 0; - zoomx= (but->x2-but->x1)/(cumap->curr.xmax-cumap->curr.xmin); - zoomy= (but->y2-but->y1)/(cumap->curr.ymax-cumap->curr.ymin); + zoomx = (but->x2 - but->x1) / (cumap->curr.xmax - cumap->curr.xmin); + zoomy = (but->y2 - but->y1) / (cumap->curr.ymax - cumap->curr.ymin); /* offsx= cumap->curr.xmin; */ /* offsy= cumap->curr.ymin; */ if (snap) { float d[2]; - d[0]= mx - data->dragstartx; - d[1]= my - data->dragstarty; + d[0] = mx - data->dragstartx; + d[1] = my - data->dragstarty; if (len_v2(d) < 3.0f) - snap= 0; + snap = 0; } if (data->dragsel != -1) { - int moved_point= 0; /* for ctrl grid, can't use orig coords because of sorting */ + int moved_point = 0; /* for ctrl grid, can't use orig coords because of sorting */ - fx= (mx-data->draglastx)/zoomx; - fy= (my-data->draglasty)/zoomy; - for (a=0; atotpoint; a++) { + fx = (mx - data->draglastx) / zoomx; + fy = (my - data->draglasty) / zoomy; + for (a = 0; a < cuma->totpoint; a++) { if (cmp[a].flag & SELECT) { - float origx= cmp[a].x, origy= cmp[a].y; - cmp[a].x+= fx; - cmp[a].y+= fy; + float origx = cmp[a].x, origy = cmp[a].y; + cmp[a].x += fx; + cmp[a].y += fy; if (snap) { - cmp[a].x= 0.125f*floorf(0.5f + 8.0f*cmp[a].x); - cmp[a].y= 0.125f*floorf(0.5f + 8.0f*cmp[a].y); + cmp[a].x = 0.125f * floorf(0.5f + 8.0f * cmp[a].x); + cmp[a].y = 0.125f * floorf(0.5f + 8.0f * cmp[a].y); } - if (cmp[a].x!=origx || cmp[a].y!=origy) - moved_point= 1; + if (cmp[a].x != origx || cmp[a].y != origy) + moved_point = 1; } } - curvemapping_changed(cumap, 0); /* no remove doubles */ + curvemapping_changed(cumap, 0); /* no remove doubles */ if (moved_point) { - data->draglastx= mx; - data->draglasty= my; - changed= 1; + data->draglastx = mx; + data->draglasty = my; + changed = 1; } - data->dragchange= 1; /* mark for selection */ + data->dragchange = 1; /* mark for selection */ } else { - fx= (mx-data->draglastx)/zoomx; - fy= (my-data->draglasty)/zoomy; + fx = (mx - data->draglastx) / zoomx; + fy = (my - data->draglasty) / zoomy; /* clamp for clip */ if (cumap->flag & CUMA_DO_CLIP) { - if (cumap->curr.xmin-fx < cumap->clipr.xmin) - fx= cumap->curr.xmin - cumap->clipr.xmin; - else if (cumap->curr.xmax-fx > cumap->clipr.xmax) - fx= cumap->curr.xmax - cumap->clipr.xmax; - if (cumap->curr.ymin-fy < cumap->clipr.ymin) - fy= cumap->curr.ymin - cumap->clipr.ymin; - else if (cumap->curr.ymax-fy > cumap->clipr.ymax) - fy= cumap->curr.ymax - cumap->clipr.ymax; - } - - cumap->curr.xmin-=fx; - cumap->curr.ymin-=fy; - cumap->curr.xmax-=fx; - cumap->curr.ymax-=fy; + if (cumap->curr.xmin - fx < cumap->clipr.xmin) + fx = cumap->curr.xmin - cumap->clipr.xmin; + else if (cumap->curr.xmax - fx > cumap->clipr.xmax) + fx = cumap->curr.xmax - cumap->clipr.xmax; + if (cumap->curr.ymin - fy < cumap->clipr.ymin) + fy = cumap->curr.ymin - cumap->clipr.ymin; + else if (cumap->curr.ymax - fy > cumap->clipr.ymax) + fy = cumap->curr.ymax - cumap->clipr.ymax; + } + + cumap->curr.xmin -= fx; + cumap->curr.ymin -= fy; + cumap->curr.xmax -= fx; + cumap->curr.ymax -= fy; - data->draglastx= mx; - data->draglasty= my; + data->draglastx = mx; + data->draglasty = my; - changed= 1; + changed = 1; } return changed; @@ -3654,44 +3654,44 @@ static int ui_numedit_but_CURVE(uiBut *but, uiHandleButtonData *data, int snap, static int ui_do_but_CURVE(bContext *C, uiBlock *block, uiBut *but, uiHandleButtonData *data, wmEvent *event) { - int mx, my, a, changed= 0; + int mx, my, a, changed = 0; - mx= event->x; - my= event->y; + mx = event->x; + my = event->y; ui_window_to_block(data->region, block, &mx, &my); if (data->state == BUTTON_STATE_HIGHLIGHT) { - if (event->type==LEFTMOUSE && event->val==KM_PRESS) { - CurveMapping *cumap= (CurveMapping*)but->poin; - CurveMap *cuma= cumap->cm+cumap->cur; + if (event->type == LEFTMOUSE && event->val == KM_PRESS) { + CurveMapping *cumap = (CurveMapping *)but->poin; + CurveMap *cuma = cumap->cm + cumap->cur; CurveMapPoint *cmp; float fx, fy, zoomx, zoomy, offsx, offsy; - float dist, mindist= 200.0f; // 14 pixels radius - int sel= -1; + float dist, mindist = 200.0f; // 14 pixels radius + int sel = -1; - zoomx= (but->x2-but->x1)/(cumap->curr.xmax-cumap->curr.xmin); - zoomy= (but->y2-but->y1)/(cumap->curr.ymax-cumap->curr.ymin); - offsx= cumap->curr.xmin; - offsy= cumap->curr.ymin; + zoomx = (but->x2 - but->x1) / (cumap->curr.xmax - cumap->curr.xmin); + zoomy = (but->y2 - but->y1) / (cumap->curr.ymax - cumap->curr.ymin); + offsx = cumap->curr.xmin; + offsy = cumap->curr.ymin; if (event->ctrl) { - fx= ((float)my - but->x1)/zoomx + offsx; - fy= ((float)my - but->y1)/zoomy + offsy; + fx = ((float)my - but->x1) / zoomx + offsx; + fy = ((float)my - but->y1) / zoomy + offsy; curvemap_insert(cuma, fx, fy); curvemapping_changed(cumap, 0); - changed= 1; + changed = 1; } /* check for selecting of a point */ - cmp= cuma->curve; /* ctrl adds point, new malloc */ - for (a=0; atotpoint; a++) { - fx= but->x1 + zoomx*(cmp[a].x-offsx); - fy= but->y1 + zoomy*(cmp[a].y-offsy); - dist= (fx-mx)*(fx-mx) + (fy-my)*(fy-my); + cmp = cuma->curve; /* ctrl adds point, new malloc */ + for (a = 0; a < cuma->totpoint; a++) { + fx = but->x1 + zoomx * (cmp[a].x - offsx); + fy = but->y1 + zoomy * (cmp[a].y - offsy); + dist = (fx - mx) * (fx - mx) + (fy - my) * (fy - my); if (dist < mindist) { - sel= a; - mindist= dist; + sel = a; + mindist = dist; } } @@ -3700,14 +3700,14 @@ static int ui_do_but_CURVE(bContext *C, uiBlock *block, uiBut *but, uiHandleButt /* if the click didn't select anything, check if it's clicked on the * curve itself, and if so, add a point */ - fx= ((float)mx - but->x1)/zoomx + offsx; - fy= ((float)my - but->y1)/zoomy + offsy; + fx = ((float)mx - but->x1) / zoomx + offsx; + fy = ((float)my - but->y1) / zoomy + offsy; - cmp= cuma->table; + cmp = cuma->table; /* loop through the curve segment table and find what's near the mouse. * 0.05 is kinda arbitrary, but seems to be what works nicely. */ - for (i=0; i<=CM_TABLE; i++) { + for (i = 0; i <= CM_TABLE; i++) { if ( (fabsf(fx - cmp[i].x) < 0.05f) && (fabsf(fy - cmp[i].y) < 0.05f)) { @@ -3715,13 +3715,13 @@ static int ui_do_but_CURVE(bContext *C, uiBlock *block, uiBut *but, uiHandleButt curvemap_insert(cuma, fx, fy); curvemapping_changed(cumap, 0); - changed= 1; + changed = 1; /* reset cmp back to the curve points again, rather than drawing segments */ - cmp= cuma->curve; + cmp = cuma->curve; /* find newly added point and make it 'sel' */ - for (a=0; atotpoint; a++) + for (a = 0; a < cuma->totpoint; a++) if (cmp[a].x == fx) sel = a; @@ -3730,11 +3730,11 @@ static int ui_do_but_CURVE(bContext *C, uiBlock *block, uiBut *but, uiHandleButt } } - if (sel!= -1) { + if (sel != -1) { /* ok, we move a point */ /* deselect all if this one is deselect. except if we hold shift */ if (event->shift == FALSE) { - for (a=0; atotpoint; a++) + for (a = 0; a < cuma->totpoint; a++) cmp[a].flag &= ~SELECT; cmp[sel].flag |= SELECT; } @@ -3743,15 +3743,15 @@ static int ui_do_but_CURVE(bContext *C, uiBlock *block, uiBut *but, uiHandleButt } else { /* move the view */ - data->cancel= 1; + data->cancel = 1; } - data->dragsel= sel; + data->dragsel = sel; - data->dragstartx= mx; - data->dragstarty= my; - data->draglastx= mx; - data->draglasty= my; + data->dragstartx = mx; + data->dragstarty = my; + data->draglastx = mx; + data->draglasty = my; button_activate_state(C, but, BUTTON_STATE_NUM_EDITING); return WM_UI_HANDLER_BREAK; @@ -3759,27 +3759,27 @@ static int ui_do_but_CURVE(bContext *C, uiBlock *block, uiBut *but, uiHandleButt } else if (data->state == BUTTON_STATE_NUM_EDITING) { if (event->type == MOUSEMOVE) { - if (mx!=data->draglastx || my!=data->draglasty) { + if (mx != data->draglastx || my != data->draglasty) { if (ui_numedit_but_CURVE(but, data, event->ctrl, mx, my)) ui_numedit_apply(C, block, but, data); } } - else if (event->type==LEFTMOUSE && event->val!=KM_PRESS) { + else if (event->type == LEFTMOUSE && event->val != KM_PRESS) { if (data->dragsel != -1) { - CurveMapping *cumap= (CurveMapping*)but->poin; - CurveMap *cuma= cumap->cm+cumap->cur; - CurveMapPoint *cmp= cuma->curve; + CurveMapping *cumap = (CurveMapping *)but->poin; + CurveMap *cuma = cumap->cm + cumap->cur; + CurveMapPoint *cmp = cuma->curve; if (!data->dragchange) { /* deselect all, select one */ if (event->shift == FALSE) { - for (a=0; atotpoint; a++) + for (a = 0; a < cuma->totpoint; a++) cmp[a].flag &= ~SELECT; cmp[data->dragsel].flag |= SELECT; } } else - curvemapping_changed(cumap, 1); /* remove doubles */ + curvemapping_changed(cumap, 1); /* remove doubles */ } button_activate_state(C, but, BUTTON_STATE_EXIT); @@ -3804,8 +3804,8 @@ static int ui_numedit_but_HISTOGRAM(uiBut *but, uiHandleButtonData *data, int mx { Histogram *hist = (Histogram *)but->poin; /* rcti rect; */ - int changed= 1; - float /* dx, */ dy, yfac=1.f; /* UNUSED */ + int changed = 1; + float /* dx, */ dy, yfac = 1.f; /* UNUSED */ /* rect.xmin = but->x1; rect.xmax = but->x2; */ /* rect.ymin = but->y1; rect.ymax = but->y2; */ @@ -3815,7 +3815,7 @@ static int ui_numedit_but_HISTOGRAM(uiBut *but, uiHandleButtonData *data, int mx if (in_scope_resize_zone(but, data->dragstartx, data->dragstarty)) { - /* resize histogram widget itself */ + /* resize histogram widget itself */ hist->height = (but->y2 - but->y1) + (data->dragstarty - my); } else { @@ -3826,8 +3826,8 @@ static int ui_numedit_but_HISTOGRAM(uiBut *but, uiHandleButtonData *data, int mx CLAMP(hist->ymax, 1.f, 100.f); } - data->draglastx= mx; - data->draglasty= my; + data->draglastx = mx; + data->draglasty = my; return changed; } @@ -3836,16 +3836,16 @@ static int ui_do_but_HISTOGRAM(bContext *C, uiBlock *block, uiBut *but, uiHandle { int mx, my; - mx= event->x; - my= event->y; + mx = event->x; + my = event->y; ui_window_to_block(data->region, block, &mx, &my); if (data->state == BUTTON_STATE_HIGHLIGHT) { - if (event->type==LEFTMOUSE && event->val==KM_PRESS) { - data->dragstartx= mx; - data->dragstarty= my; - data->draglastx= mx; - data->draglasty= my; + if (event->type == LEFTMOUSE && event->val == KM_PRESS) { + data->dragstartx = mx; + data->dragstarty = my; + data->draglastx = mx; + data->draglasty = my; button_activate_state(C, but, BUTTON_STATE_NUM_EDITING); /* also do drag the first time */ @@ -3865,17 +3865,17 @@ static int ui_do_but_HISTOGRAM(bContext *C, uiBlock *block, uiBut *but, uiHandle } else if (data->state == BUTTON_STATE_NUM_EDITING) { if (event->type == ESCKEY) { - data->cancel= 1; - data->escapecancel= 1; + data->cancel = 1; + data->escapecancel = 1; button_activate_state(C, but, BUTTON_STATE_EXIT); } else if (event->type == MOUSEMOVE) { - if (mx!=data->draglastx || my!=data->draglasty) { + if (mx != data->draglastx || my != data->draglasty) { if (ui_numedit_but_HISTOGRAM(but, data, mx, my)) ui_numedit_apply(C, block, but, data); } } - else if (event->type==LEFTMOUSE && event->val!=KM_PRESS) { + else if (event->type == LEFTMOUSE && event->val != KM_PRESS) { button_activate_state(C, but, BUTTON_STATE_EXIT); } return WM_UI_HANDLER_BREAK; @@ -3888,7 +3888,7 @@ static int ui_numedit_but_WAVEFORM(uiBut *but, uiHandleButtonData *data, int mx, { Scopes *scopes = (Scopes *)but->poin; /* rcti rect; */ - int changed= 1; + int changed = 1; float /* dx, */ dy /* , yfac=1.f */; /* UNUSED */ /* rect.xmin = but->x1; rect.xmax = but->x2; */ @@ -3899,19 +3899,19 @@ static int ui_numedit_but_WAVEFORM(uiBut *but, uiHandleButtonData *data, int mx, if (in_scope_resize_zone(but, data->dragstartx, data->dragstarty)) { - /* resize waveform widget itself */ + /* resize waveform widget itself */ scopes->wavefrm_height = (but->y2 - but->y1) + (data->dragstarty - my); } else { /* scale waveform values */ /* yfac = scopes->wavefrm_yfac; */ /* UNUSED */ - scopes->wavefrm_yfac += dy/200.0f; + scopes->wavefrm_yfac += dy / 200.0f; CLAMP(scopes->wavefrm_yfac, 0.5f, 2.f); } - data->draglastx= mx; - data->draglasty= my; + data->draglastx = mx; + data->draglasty = my; return changed; } @@ -3920,16 +3920,16 @@ static int ui_do_but_WAVEFORM(bContext *C, uiBlock *block, uiBut *but, uiHandleB { int mx, my; - mx= event->x; - my= event->y; + mx = event->x; + my = event->y; ui_window_to_block(data->region, block, &mx, &my); if (data->state == BUTTON_STATE_HIGHLIGHT) { - if (event->type==LEFTMOUSE && event->val==KM_PRESS) { - data->dragstartx= mx; - data->dragstarty= my; - data->draglastx= mx; - data->draglasty= my; + if (event->type == LEFTMOUSE && event->val == KM_PRESS) { + data->dragstartx = mx; + data->dragstarty = my; + data->draglastx = mx; + data->draglasty = my; button_activate_state(C, but, BUTTON_STATE_NUM_EDITING); /* also do drag the first time */ @@ -3949,17 +3949,17 @@ static int ui_do_but_WAVEFORM(bContext *C, uiBlock *block, uiBut *but, uiHandleB } else if (data->state == BUTTON_STATE_NUM_EDITING) { if (event->type == ESCKEY) { - data->cancel= 1; - data->escapecancel= 1; + data->cancel = 1; + data->escapecancel = 1; button_activate_state(C, but, BUTTON_STATE_EXIT); } else if (event->type == MOUSEMOVE) { - if (mx!=data->draglastx || my!=data->draglasty) { + if (mx != data->draglastx || my != data->draglasty) { if (ui_numedit_but_WAVEFORM(but, data, mx, my)) ui_numedit_apply(C, block, but, data); } } - else if (event->type==LEFTMOUSE && event->val!=KM_PRESS) { + else if (event->type == LEFTMOUSE && event->val != KM_PRESS) { button_activate_state(C, but, BUTTON_STATE_EXIT); } return WM_UI_HANDLER_BREAK; @@ -3972,7 +3972,7 @@ static int ui_numedit_but_VECTORSCOPE(uiBut *but, uiHandleButtonData *data, int { Scopes *scopes = (Scopes *)but->poin; /* rcti rect; */ - int changed= 1; + int changed = 1; /* float dx, dy; */ /* rect.xmin = but->x1; rect.xmax = but->x2; */ @@ -3982,12 +3982,12 @@ static int ui_numedit_but_VECTORSCOPE(uiBut *but, uiHandleButtonData *data, int /* dy = my - data->draglasty; */ if (in_scope_resize_zone(but, data->dragstartx, data->dragstarty)) { - /* resize vectorscope widget itself */ + /* resize vectorscope widget itself */ scopes->vecscope_height = (but->y2 - but->y1) + (data->dragstarty - my); } - data->draglastx= mx; - data->draglasty= my; + data->draglastx = mx; + data->draglasty = my; return changed; } @@ -3996,16 +3996,16 @@ static int ui_do_but_VECTORSCOPE(bContext *C, uiBlock *block, uiBut *but, uiHand { int mx, my; - mx= event->x; - my= event->y; + mx = event->x; + my = event->y; ui_window_to_block(data->region, block, &mx, &my); if (data->state == BUTTON_STATE_HIGHLIGHT) { - if (event->type==LEFTMOUSE && event->val==KM_PRESS) { - data->dragstartx= mx; - data->dragstarty= my; - data->draglastx= mx; - data->draglasty= my; + if (event->type == LEFTMOUSE && event->val == KM_PRESS) { + data->dragstartx = mx; + data->dragstarty = my; + data->draglastx = mx; + data->draglasty = my; button_activate_state(C, but, BUTTON_STATE_NUM_EDITING); /* also do drag the first time */ @@ -4017,17 +4017,17 @@ static int ui_do_but_VECTORSCOPE(bContext *C, uiBlock *block, uiBut *but, uiHand } else if (data->state == BUTTON_STATE_NUM_EDITING) { if (event->type == ESCKEY) { - data->cancel= 1; - data->escapecancel= 1; + data->cancel = 1; + data->escapecancel = 1; button_activate_state(C, but, BUTTON_STATE_EXIT); } else if (event->type == MOUSEMOVE) { - if (mx!=data->draglastx || my!=data->draglasty) { + if (mx != data->draglastx || my != data->draglasty) { if (ui_numedit_but_VECTORSCOPE(but, data, mx, my)) ui_numedit_apply(C, block, but, data); } } - else if (event->type==LEFTMOUSE && event->val!=KM_PRESS) { + else if (event->type == LEFTMOUSE && event->val != KM_PRESS) { button_activate_state(C, but, BUTTON_STATE_EXIT); } return WM_UI_HANDLER_BREAK; @@ -4046,12 +4046,12 @@ static int ui_do_but_CHARTAB(bContext *UNUSED(C), uiBlock *UNUSED(block), uiBut float butw, buth; int mx, my, x, y, cs, che; - mx= event->x; - my= event->y; + mx = event->x; + my = event->y; ui_window_to_block(data->region, block, &mx, &my); if (data->state == BUTTON_STATE_HIGHLIGHT) { - if (ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->val==KM_PRESS) { + if (ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->val == KM_PRESS) { /* Calculate the size of the button */ width = abs(but->x2 - but->x1); height = abs(but->y2 - but->y1); @@ -4071,22 +4071,22 @@ static int ui_do_but_CHARTAB(bContext *UNUSED(C), uiBlock *UNUSED(block), uiBut x = (int) ((mx / butw) - 0.5); y = (int) (6 - ((my / buth) - 0.5)); - che = cs + (y*12) + x; + che = cs + (y * 12) + x; if (che > G.charmax) che = 0; if (G.obedit) { - do_textedit(0,0,che); + do_textedit(0, 0, che); } button_activate_state(C, but, BUTTON_STATE_EXIT); return WM_UI_HANDLER_BREAK; } else if (ELEM(event->type, WHEELUPMOUSE, PAGEUPKEY)) { - for (but= block->buttons.first; but; but= but->next) { + for (but = block->buttons.first; but; but = but->next) { if (but->type == CHARTAB) { - G.charstart = G.charstart - (12*6); + G.charstart = G.charstart - (12 * 6); if (G.charstart < 0) G.charstart = 0; if (G.charstart < G.charmin) @@ -4094,14 +4094,14 @@ static int ui_do_but_CHARTAB(bContext *UNUSED(C), uiBlock *UNUSED(block), uiBut ui_draw_but(but); //Really nasty... to update the num button from the same butblock - for (bt= block->buttons.first; bt; bt= bt->next) + for (bt = block->buttons.first; bt; bt = bt->next) { if (ELEM(bt->type, NUM, NUMABS)) { ui_check_but(bt); ui_draw_but(bt); } } - retval=UI_CONT; + retval = UI_CONT; break; } } @@ -4109,16 +4109,16 @@ static int ui_do_but_CHARTAB(bContext *UNUSED(C), uiBlock *UNUSED(block), uiBut return WM_UI_HANDLER_BREAK; } else if (ELEM(event->type, WHEELDOWNMOUSE, PAGEDOWNKEY)) { - for (but= block->buttons.first; but; but= but->next) { + for (but = block->buttons.first; but; but = but->next) { if (but->type == CHARTAB) { - G.charstart = G.charstart + (12*6); - if (G.charstart > (0xffff - 12*6)) - G.charstart = 0xffff - (12*6); - if (G.charstart > G.charmax - 12*6) - G.charstart = G.charmax - 12*6; + G.charstart = G.charstart + (12 * 6); + if (G.charstart > (0xffff - 12 * 6)) + G.charstart = 0xffff - (12 * 6); + if (G.charstart > G.charmax - 12 * 6) + G.charstart = G.charmax - 12 * 6; ui_draw_but(but); - for (bt= block->buttons.first; bt; bt= bt->next) + for (bt = block->buttons.first; bt; bt = bt->next) { if (ELEM(bt->type, NUM, NUMABS)) { ui_check_but(bt); @@ -4127,7 +4127,7 @@ static int ui_do_but_CHARTAB(bContext *UNUSED(C), uiBlock *UNUSED(block), uiBut } but->flag |= UI_ACTIVE; - retval=UI_RETURN_OK; + retval = UI_RETURN_OK; break; } } @@ -4147,7 +4147,7 @@ static int ui_do_but_LINK(bContext *C, uiBut *but, uiHandleButtonData *data, wmE VECCOPY2D(but->linkto, event->mval); if (data->state == BUTTON_STATE_HIGHLIGHT) { - if (event->type == LEFTMOUSE && event->val==KM_PRESS) { + if (event->type == LEFTMOUSE && event->val == KM_PRESS) { button_activate_state(C, but, BUTTON_STATE_WAIT_RELEASE); return WM_UI_HANDLER_BREAK; } @@ -4158,9 +4158,9 @@ static int ui_do_but_LINK(bContext *C, uiBut *but, uiHandleButtonData *data, wmE } else if (data->state == BUTTON_STATE_WAIT_RELEASE) { - if (event->type == LEFTMOUSE && event->val!=KM_PRESS) { + if (event->type == LEFTMOUSE && event->val != KM_PRESS) { if (!(but->flag & UI_SELECT)) - data->cancel= 1; + data->cancel = 1; button_activate_state(C, but, BUTTON_STATE_EXIT); return WM_UI_HANDLER_BREAK; } @@ -4172,7 +4172,7 @@ static int ui_do_but_LINK(bContext *C, uiBut *but, uiHandleButtonData *data, wmE static int ui_numedit_but_TRACKPREVIEW(bContext *C, uiBut *but, uiHandleButtonData *data, int mx, int my, int shift) { MovieClipScopes *scopes = (MovieClipScopes *)but->poin; - int changed= 1; + int changed = 1; float dx, dy; dx = mx - data->draglastx; @@ -4184,26 +4184,26 @@ static int ui_numedit_but_TRACKPREVIEW(bContext *C, uiBut *but, uiHandleButtonDa } if (in_scope_resize_zone(but, data->dragstartx, data->dragstarty)) { - /* resize preview widget itself */ + /* resize preview widget itself */ scopes->track_preview_height = (but->y2 - but->y1) + (data->dragstarty - my); } else { if (scopes->marker) { - if (scopes->marker->framenr!=scopes->framenr) - scopes->marker= BKE_tracking_ensure_marker(scopes->track, scopes->framenr); + if (scopes->marker->framenr != scopes->framenr) + scopes->marker = BKE_tracking_ensure_marker(scopes->track, scopes->framenr); - scopes->marker->flag&= ~(MARKER_DISABLED|MARKER_TRACKED); - scopes->marker->pos[0]+= -dx*scopes->slide_scale[0] / (but->block->maxx-but->block->minx); - scopes->marker->pos[1]+= -dy*scopes->slide_scale[1] / (but->block->maxy-but->block->miny); + scopes->marker->flag &= ~(MARKER_DISABLED | MARKER_TRACKED); + scopes->marker->pos[0] += -dx * scopes->slide_scale[0] / (but->block->maxx - but->block->minx); + scopes->marker->pos[1] += -dy * scopes->slide_scale[1] / (but->block->maxy - but->block->miny); - WM_event_add_notifier(C, NC_MOVIECLIP|NA_EDITED, NULL); + WM_event_add_notifier(C, NC_MOVIECLIP | NA_EDITED, NULL); } - scopes->ok= 0; + scopes->ok = 0; } - data->draglastx= mx; - data->draglasty= my; + data->draglastx = mx; + data->draglasty = my; return changed; } @@ -4212,16 +4212,16 @@ static int ui_do_but_TRACKPREVIEW(bContext *C, uiBlock *block, uiBut *but, uiHan { int mx, my; - mx= event->x; - my= event->y; + mx = event->x; + my = event->y; ui_window_to_block(data->region, block, &mx, &my); if (data->state == BUTTON_STATE_HIGHLIGHT) { - if (event->type==LEFTMOUSE && event->val==KM_PRESS) { - data->dragstartx= mx; - data->dragstarty= my; - data->draglastx= mx; - data->draglasty= my; + if (event->type == LEFTMOUSE && event->val == KM_PRESS) { + data->dragstartx = mx; + data->dragstarty = my; + data->draglastx = mx; + data->draglasty = my; button_activate_state(C, but, BUTTON_STATE_NUM_EDITING); /* also do drag the first time */ @@ -4233,17 +4233,17 @@ static int ui_do_but_TRACKPREVIEW(bContext *C, uiBlock *block, uiBut *but, uiHan } else if (data->state == BUTTON_STATE_NUM_EDITING) { if (event->type == ESCKEY) { - data->cancel= 1; - data->escapecancel= 1; + data->cancel = 1; + data->escapecancel = 1; button_activate_state(C, but, BUTTON_STATE_EXIT); } else if (event->type == MOUSEMOVE) { - if (mx!=data->draglastx || my!=data->draglasty) { + if (mx != data->draglastx || my != data->draglasty) { if (ui_numedit_but_TRACKPREVIEW(C, but, data, mx, my, event->shift)) ui_numedit_apply(C, block, but, data); } } - else if (event->type==LEFTMOUSE && event->val!=KM_PRESS) { + else if (event->type == LEFTMOUSE && event->val != KM_PRESS) { button_activate_state(C, but, BUTTON_STATE_EXIT); } return WM_UI_HANDLER_BREAK; @@ -4259,11 +4259,11 @@ static void but_shortcut_name_func(bContext *C, void *arg1, int UNUSED(event)) if (but->optype) { char shortcut_str[128]; - IDProperty *prop= (but->opptr)? but->opptr->data: NULL; + IDProperty *prop = (but->opptr) ? but->opptr->data : NULL; /* complex code to change name of button */ if (WM_key_event_operator_string(C, but->optype->idname, but->opcontext, prop, TRUE, - shortcut_str, sizeof(shortcut_str))) + shortcut_str, sizeof(shortcut_str))) { ui_but_add_shortcut(but, shortcut_str, TRUE); } @@ -4276,29 +4276,29 @@ static void but_shortcut_name_func(bContext *C, void *arg1, int UNUSED(event)) static uiBlock *menu_change_shortcut(bContext *C, ARegion *ar, void *arg) { - wmWindowManager *wm= CTX_wm_manager(C); + wmWindowManager *wm = CTX_wm_manager(C); uiBlock *block; uiBut *but = (uiBut *)arg; wmKeyMap *km; wmKeyMapItem *kmi; PointerRNA ptr; uiLayout *layout; - uiStyle *style= UI_GetStyle(); - IDProperty *prop= (but->opptr)? but->opptr->data: NULL; + uiStyle *style = UI_GetStyle(); + IDProperty *prop = (but->opptr) ? but->opptr->data : NULL; int kmi_id = WM_key_event_operator_id(C, but->optype->idname, but->opcontext, prop, 1, &km); kmi = WM_keymap_item_find_id(km, kmi_id); RNA_pointer_create(&wm->id, &RNA_KeyMapItem, kmi, &ptr); - block= uiBeginBlock(C, ar, "_popup", UI_EMBOSS); + block = uiBeginBlock(C, ar, "_popup", UI_EMBOSS); uiBlockSetHandleFunc(block, but_shortcut_name_func, but); uiBlockSetFlag(block, UI_BLOCK_MOVEMOUSE_QUIT); uiBlockSetDirection(block, UI_CENTER); - layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, 0, 0, 200, 20, style); + layout = uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, 0, 0, 200, 20, style); - uiItemR(layout, &ptr, "type", UI_ITEM_R_FULL_EVENT|UI_ITEM_R_IMMEDIATE, "", ICON_NONE); + uiItemR(layout, &ptr, "type", UI_ITEM_R_FULL_EVENT | UI_ITEM_R_IMMEDIATE, "", ICON_NONE); uiPopupBoundsBlock(block, 6, -50, 26); uiEndBlock(C, block); @@ -4308,15 +4308,15 @@ static uiBlock *menu_change_shortcut(bContext *C, ARegion *ar, void *arg) static uiBlock *menu_add_shortcut(bContext *C, ARegion *ar, void *arg) { - wmWindowManager *wm= CTX_wm_manager(C); + wmWindowManager *wm = CTX_wm_manager(C); uiBlock *block; uiBut *but = (uiBut *)arg; wmKeyMap *km; wmKeyMapItem *kmi; PointerRNA ptr; uiLayout *layout; - uiStyle *style= UI_GetStyle(); - IDProperty *prop= (but->opptr)? but->opptr->data: NULL; + uiStyle *style = UI_GetStyle(); + IDProperty *prop = (but->opptr) ? but->opptr->data : NULL; int kmi_id; /* XXX this guess_opname can potentially return a different keymap than being found on adding later... */ @@ -4326,7 +4326,7 @@ static uiBlock *menu_add_shortcut(bContext *C, ARegion *ar, void *arg) /* copy properties, prop can be NULL for reset */ if (prop) - prop= IDP_CopyProperty(prop); + prop = IDP_CopyProperty(prop); WM_keymap_properties_reset(kmi, prop); /* update and get pointers again */ @@ -4337,14 +4337,14 @@ static uiBlock *menu_add_shortcut(bContext *C, ARegion *ar, void *arg) RNA_pointer_create(&wm->id, &RNA_KeyMapItem, kmi, &ptr); - block= uiBeginBlock(C, ar, "_popup", UI_EMBOSS); + block = uiBeginBlock(C, ar, "_popup", UI_EMBOSS); uiBlockSetHandleFunc(block, but_shortcut_name_func, but); uiBlockSetFlag(block, UI_BLOCK_RET_1); uiBlockSetDirection(block, UI_CENTER); - layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, 0, 0, 200, 20, style); + layout = uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, 0, 0, 200, 20, style); - uiItemR(layout, &ptr, "type", UI_ITEM_R_FULL_EVENT|UI_ITEM_R_IMMEDIATE, "", ICON_NONE); + uiItemR(layout, &ptr, "type", UI_ITEM_R_FULL_EVENT | UI_ITEM_R_IMMEDIATE, "", ICON_NONE); uiPopupBoundsBlock(block, 6, -50, 26); uiEndBlock(C, block); @@ -4364,7 +4364,7 @@ static void remove_shortcut_func(bContext *C, void *arg1, void *UNUSED(arg2)) uiBut *but = (uiBut *)arg1; wmKeyMap *km; wmKeyMapItem *kmi; - IDProperty *prop= (but->opptr)? but->opptr->data: NULL; + IDProperty *prop = (but->opptr) ? but->opptr->data : NULL; int kmi_id = WM_key_event_operator_id(C, but->optype->idname, but->opcontext, prop, 1, &km); kmi = WM_keymap_item_find_id(km, kmi_id); @@ -4388,31 +4388,31 @@ static int ui_but_menu(bContext *C, uiBut *but) int length; const char *name; - if ((but->rnapoin.data && but->rnaprop)==0 && but->optype==NULL) + if ((but->rnapoin.data && but->rnaprop) == 0 && but->optype == NULL) return 0; button_timers_tooltip_remove(C, but); if (but->rnaprop) - name= RNA_property_ui_name(but->rnaprop); + name = RNA_property_ui_name(but->rnaprop); else if (but->optype) - name= but->optype->name; + name = but->optype->name; else - name= ""; // XXX - should never happen. + name = ""; // XXX - should never happen. - pup= uiPupMenuBegin(C, name, ICON_NONE); - layout= uiPupMenuLayout(pup); + pup = uiPupMenuBegin(C, name, ICON_NONE); + layout = uiPupMenuLayout(pup); uiLayoutSetOperatorContext(layout, WM_OP_INVOKE_DEFAULT); if (but->rnapoin.data && but->rnaprop) { - short is_anim= RNA_property_animateable(&but->rnapoin, but->rnaprop); + short is_anim = RNA_property_animateable(&but->rnapoin, but->rnaprop); /* second slower test, saved people finding keyframe items in menus when its not possible */ if (is_anim) - is_anim= RNA_property_path_from_ID_check(&but->rnapoin, but->rnaprop); + is_anim = RNA_property_path_from_ID_check(&but->rnapoin, but->rnaprop); - length= RNA_property_array_length(&but->rnapoin, but->rnaprop); + length = RNA_property_array_length(&but->rnapoin, but->rnaprop); /* Keyframes */ if (but->flag & UI_BUT_ANIMATED_KEY) { @@ -4433,7 +4433,7 @@ static int ui_but_menu(bContext *C, uiBut *but) } - else if (but->flag & UI_BUT_DRIVEN); + else if (but->flag & UI_BUT_DRIVEN) ; else if (is_anim) { if (length) { uiItemBooleanO(layout, "Insert Keyframes", ICON_NONE, "ANIM_OT_keyframe_insert_button", "all", 1); @@ -4458,7 +4458,7 @@ static int ui_but_menu(bContext *C, uiBut *but) if (ANIM_driver_can_paste()) uiItemO(layout, "Paste Driver", ICON_NONE, "ANIM_OT_paste_driver_button"); } - else if (but->flag & (UI_BUT_ANIMATED_KEY|UI_BUT_ANIMATED)); + else if (but->flag & (UI_BUT_ANIMATED_KEY | UI_BUT_ANIMATED)) ; else if (is_anim) { uiItemS(layout); @@ -4513,11 +4513,11 @@ static int ui_but_menu(bContext *C, uiBut *but) if (but->optype) { uiBlock *block = uiLayoutGetBlock(layout); uiBut *but2; - IDProperty *prop= (but->opptr)? but->opptr->data: NULL; + IDProperty *prop = (but->opptr) ? but->opptr->data : NULL; int w = uiLayoutGetWidth(layout); wmKeyMap *km; wmKeyMapItem *kmi = NULL; - int kmi_id= WM_key_event_operator_id(C, but->optype->idname, but->opcontext, prop, 1, &km); + int kmi_id = WM_key_event_operator_id(C, but->optype->idname, but->opcontext, prop, 1, &km); if (kmi_id) kmi = WM_keymap_item_find_id(km, kmi_id); @@ -4544,7 +4544,7 @@ static int ui_but_menu(bContext *C, uiBut *but) } - { /* Docs */ + { /* Docs */ char buf[512]; PointerRNA ptr_props; @@ -4594,26 +4594,26 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, wmEvent *event) uiHandleButtonData *data; int retval; - data= but->active; - retval= WM_UI_HANDLER_CONTINUE; + data = but->active; + retval = WM_UI_HANDLER_CONTINUE; if (but->flag & UI_BUT_DISABLED) return WM_UI_HANDLER_CONTINUE; - if ( (data->state == BUTTON_STATE_HIGHLIGHT) && - /* check prevval because of modal operators [#24016], - * modifier check is to allow Ctrl+C for copy. - * if this causes other problems, remove this check and suffer the bug :) - campbell */ - ((event->prevval != KM_PRESS) || (ISKEYMODIFIER(event->prevtype)) || (event->type == EVT_DROP)) - ) { + if ((data->state == BUTTON_STATE_HIGHLIGHT) && + /* check prevval because of modal operators [#24016], + * modifier check is to allow Ctrl+C for copy. + * if this causes other problems, remove this check and suffer the bug :) - campbell */ + ((event->prevval != KM_PRESS) || (ISKEYMODIFIER(event->prevtype)) || (event->type == EVT_DROP))) + { /* handle copy-paste */ - if (ELEM(event->type, CKEY, VKEY) && event->val==KM_PRESS && (event->ctrl || event->oskey)) { - ui_but_copy_paste(C, but, data, (event->type == CKEY)? 'c': 'v'); + if (ELEM(event->type, CKEY, VKEY) && event->val == KM_PRESS && (event->ctrl || event->oskey)) { + ui_but_copy_paste(C, but, data, (event->type == CKEY) ? 'c' : 'v'); return WM_UI_HANDLER_BREAK; } /* handle drop */ else if (event->type == EVT_DROP) { - ui_but_drop (C, event, but, data); + ui_but_drop(C, event, but, data); } /* handle keyframing */ else if (event->type == IKEY && !ELEM3(KM_MOD_FIRST, event->ctrl, event->oskey, event->shift) && event->val == KM_PRESS) { @@ -4674,7 +4674,7 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, wmEvent *event) return WM_UI_HANDLER_BREAK; } } - else if (but->pointype && but->poin==NULL) { + else if (but->pointype && but->poin == NULL) { /* there's a pointer needed */ BKE_reportf(NULL, RPT_WARNING, "DoButton pointer error: %s", but->str); button_activate_state(C, but, BUTTON_STATE_EXIT); @@ -4682,107 +4682,107 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, wmEvent *event) } } - switch(but->type) { - case BUT: - retval= ui_do_but_BUT(C, but, data, event); - break; - case KEYEVT: - retval= ui_do_but_KEYEVT(C, but, data, event); - break; - case HOTKEYEVT: - retval= ui_do_but_HOTKEYEVT(C, but, data, event); - break; - case TOGBUT: - case TOG: - case TOGR: - case ICONTOG: - case ICONTOGN: - case TOGN: - case BUT_TOGDUAL: - case OPTION: - case OPTIONN: - retval= ui_do_but_TOG(C, but, data, event); - break; - case SCROLL: - retval= ui_do_but_SCROLL(C, block, but, data, event); - break; - case NUM: - case NUMABS: - retval= ui_do_but_NUM(C, block, but, data, event); - break; - case SLI: - case NUMSLI: - case HSVSLI: - retval= ui_do_but_SLI(C, block, but, data, event); - break; - case ROUNDBOX: - case LISTBOX: - case LABEL: - case TOG3: - case ROW: - case LISTROW: - case BUT_IMAGE: - case PROGRESSBAR: - retval= ui_do_but_EXIT(C, but, data, event); - break; - case HISTOGRAM: - retval= ui_do_but_HISTOGRAM(C, block, but, data, event); - break; - case WAVEFORM: - retval= ui_do_but_WAVEFORM(C, block, but, data, event); - break; - case VECTORSCOPE: - retval= ui_do_but_VECTORSCOPE(C, block, but, data, event); - break; - case TEX: - case IDPOIN: - case SEARCH_MENU: - retval= ui_do_but_TEX(C, block, but, data, event); - break; - case MENU: - case ICONROW: - case ICONTEXTROW: - case BLOCK: - case PULLDOWN: - retval= ui_do_but_BLOCK(C, but, data, event); - break; - case BUTM: - retval= ui_do_but_BUT(C, but, data, event); - break; - case COL: - if (but->a1 == UI_GRAD_V_ALT) // signal to prevent calling up color picker - retval= ui_do_but_EXIT(C, but, data, event); - else - retval= ui_do_but_BLOCK(C, but, data, event); - break; - case BUT_NORMAL: - retval= ui_do_but_NORMAL(C, block, but, data, event); - break; - case BUT_COLORBAND: - retval= ui_do_but_COLORBAND(C, block, but, data, event); - break; - case BUT_CURVE: - retval= ui_do_but_CURVE(C, block, but, data, event); - break; - case HSVCUBE: - retval= ui_do_but_HSVCUBE(C, block, but, data, event); - break; - case HSVCIRCLE: - retval= ui_do_but_HSVCIRCLE(C, block, but, data, event); - break; + switch (but->type) { + case BUT: + retval = ui_do_but_BUT(C, but, data, event); + break; + case KEYEVT: + retval = ui_do_but_KEYEVT(C, but, data, event); + break; + case HOTKEYEVT: + retval = ui_do_but_HOTKEYEVT(C, but, data, event); + break; + case TOGBUT: + case TOG: + case TOGR: + case ICONTOG: + case ICONTOGN: + case TOGN: + case BUT_TOGDUAL: + case OPTION: + case OPTIONN: + retval = ui_do_but_TOG(C, but, data, event); + break; + case SCROLL: + retval = ui_do_but_SCROLL(C, block, but, data, event); + break; + case NUM: + case NUMABS: + retval = ui_do_but_NUM(C, block, but, data, event); + break; + case SLI: + case NUMSLI: + case HSVSLI: + retval = ui_do_but_SLI(C, block, but, data, event); + break; + case ROUNDBOX: + case LISTBOX: + case LABEL: + case TOG3: + case ROW: + case LISTROW: + case BUT_IMAGE: + case PROGRESSBAR: + retval = ui_do_but_EXIT(C, but, data, event); + break; + case HISTOGRAM: + retval = ui_do_but_HISTOGRAM(C, block, but, data, event); + break; + case WAVEFORM: + retval = ui_do_but_WAVEFORM(C, block, but, data, event); + break; + case VECTORSCOPE: + retval = ui_do_but_VECTORSCOPE(C, block, but, data, event); + break; + case TEX: + case IDPOIN: + case SEARCH_MENU: + retval = ui_do_but_TEX(C, block, but, data, event); + break; + case MENU: + case ICONROW: + case ICONTEXTROW: + case BLOCK: + case PULLDOWN: + retval = ui_do_but_BLOCK(C, but, data, event); + break; + case BUTM: + retval = ui_do_but_BUT(C, but, data, event); + break; + case COL: + if (but->a1 == UI_GRAD_V_ALT) // signal to prevent calling up color picker + retval = ui_do_but_EXIT(C, but, data, event); + else + retval = ui_do_but_BLOCK(C, but, data, event); + break; + case BUT_NORMAL: + retval = ui_do_but_NORMAL(C, block, but, data, event); + break; + case BUT_COLORBAND: + retval = ui_do_but_COLORBAND(C, block, but, data, event); + break; + case BUT_CURVE: + retval = ui_do_but_CURVE(C, block, but, data, event); + break; + case HSVCUBE: + retval = ui_do_but_HSVCUBE(C, block, but, data, event); + break; + case HSVCIRCLE: + retval = ui_do_but_HSVCIRCLE(C, block, but, data, event); + break; #ifdef WITH_INTERNATIONAL - case CHARTAB: - retval= ui_do_but_CHARTAB(C, block, but, data, event); - break; + case CHARTAB: + retval = ui_do_but_CHARTAB(C, block, but, data, event); + break; #endif - case LINK: - case INLINK: - retval= ui_do_but_LINK(C, but, data, event); - break; - case TRACKPREVIEW: - retval= ui_do_but_TRACKPREVIEW(C, block, but, data, event); - break; + case LINK: + case INLINK: + retval = ui_do_but_LINK(C, but, data, event); + break; + case TRACKPREVIEW: + retval = ui_do_but_TRACKPREVIEW(C, block, but, data, event); + break; } return retval; @@ -4792,7 +4792,7 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, wmEvent *event) static int ui_but_contains_pt(uiBut *but, int mx, int my) { - return ((but->x1x2>=mx) && (but->y1y2>=my)); + return ((but->x1 < mx && but->x2 >= mx) && (but->y1 < my && but->y2 >= my)); } static uiBut *ui_but_find_activated(ARegion *ar) @@ -4800,8 +4800,8 @@ static uiBut *ui_but_find_activated(ARegion *ar) uiBlock *block; uiBut *but; - for (block=ar->uiblocks.first; block; block=block->next) - for (but=block->buttons.first; but; but= but->next) + for (block = ar->uiblocks.first; block; block = block->next) + for (but = block->buttons.first; but; but = but->next) if (but->active) return but; @@ -4816,16 +4816,16 @@ int ui_button_is_active(ARegion *ar) /* is called by notifier */ void uiFreeActiveButtons(const bContext *C, bScreen *screen) { - ScrArea *sa= screen->areabase.first; + ScrArea *sa = screen->areabase.first; - for (;sa; sa= sa->next) { - ARegion *ar= sa->regionbase.first; - for (;ar; ar= ar->next) { - uiBut *but= ui_but_find_activated(ar); + for (; sa; sa = sa->next) { + ARegion *ar = sa->regionbase.first; + for (; ar; ar = ar->next) { + uiBut *but = ui_but_find_activated(ar); if (but) { - uiHandleButtonData *data= but->active; + uiHandleButtonData *data = but->active; - if (data->menu==NULL && data->searchbox==NULL) + if (data->menu == NULL && data->searchbox == NULL) if (data->state == BUTTON_STATE_HIGHLIGHT) ui_button_active_free(C, but); } @@ -4839,8 +4839,8 @@ void uiFreeActiveButtons(const bContext *C, bScreen *screen) /* called in region context */ int UI_but_active_drop_name(bContext *C) { - ARegion *ar= CTX_wm_region(C); - uiBut *but= ui_but_find_activated(ar); + ARegion *ar = CTX_wm_region(C); + uiBut *but = ui_but_find_activated(ar); if (but) { if (ELEM3(but->type, TEX, IDPOIN, SEARCH_MENU)) @@ -4859,8 +4859,8 @@ static void ui_blocks_set_tooltips(ARegion *ar, int enable) /* we disabled buttons when when they were already shown, and * re-enable them on mouse move */ - for (block=ar->uiblocks.first; block; block=block->next) - block->tooltipdisabled= !enable; + for (block = ar->uiblocks.first; block; block = block->next) + block->tooltipdisabled = !enable; } static int ui_mouse_inside_region(ARegion *ar, int x, int y) @@ -4869,8 +4869,8 @@ static int ui_mouse_inside_region(ARegion *ar, int x, int y) /* check if the mouse is in the region */ if (!BLI_in_rcti(&ar->winrct, x, y)) { - for (block=ar->uiblocks.first; block; block=block->next) - block->auto_open= FALSE; + for (block = ar->uiblocks.first; block; block = block->next) + block->auto_open = FALSE; return 0; } @@ -4880,14 +4880,14 @@ static int ui_mouse_inside_region(ARegion *ar, int x, int y) * even when they are not visible, so we need to make a copy of the mask to * use to check */ - if (ar->v2d.mask.xmin!=ar->v2d.mask.xmax) { - View2D *v2d= &ar->v2d; + if (ar->v2d.mask.xmin != ar->v2d.mask.xmax) { + View2D *v2d = &ar->v2d; rcti mask_rct; int mx, my; /* convert window coordinates to region coordinates */ - mx= x; - my= y; + mx = x; + my = y; ui_window_to_region(ar, &mx, &my); /* make a copy of the mask rect, and tweak accordingly for hidden scrollbars */ @@ -4896,14 +4896,14 @@ static int ui_mouse_inside_region(ARegion *ar, int x, int y) mask_rct.ymin = v2d->mask.ymin; mask_rct.ymax = v2d->mask.ymax; - if (v2d->scroll & (V2D_SCROLL_VERTICAL_HIDE|V2D_SCROLL_VERTICAL_FULLR)) { + if (v2d->scroll & (V2D_SCROLL_VERTICAL_HIDE | V2D_SCROLL_VERTICAL_FULLR)) { if (v2d->scroll & V2D_SCROLL_LEFT) mask_rct.xmin = v2d->vert.xmin; else if (v2d->scroll & V2D_SCROLL_RIGHT) mask_rct.xmax = v2d->vert.xmax; } - if (v2d->scroll & (V2D_SCROLL_HORIZONTAL_HIDE|V2D_SCROLL_HORIZONTAL_FULLR)) { - if (v2d->scroll & (V2D_SCROLL_BOTTOM|V2D_SCROLL_BOTTOM_O)) + if (v2d->scroll & (V2D_SCROLL_HORIZONTAL_HIDE | V2D_SCROLL_HORIZONTAL_FULLR)) { + if (v2d->scroll & (V2D_SCROLL_BOTTOM | V2D_SCROLL_BOTTOM_O)) mask_rct.ymin = v2d->hor.ymin; else if (v2d->scroll & V2D_SCROLL_TOP) mask_rct.ymax = v2d->hor.ymax; @@ -4933,7 +4933,7 @@ static int ui_mouse_inside_button(ARegion *ar, uiBut *but, int x, int y) static uiBut *ui_but_find_mouse_over(ARegion *ar, int x, int y) { uiBlock *block; - uiBut *but, *butover= NULL; + uiBut *but, *butover = NULL; int mx, my; // if (!win->active) @@ -4941,14 +4941,14 @@ static uiBut *ui_but_find_mouse_over(ARegion *ar, int x, int y) if (!ui_mouse_inside_region(ar, x, y)) return NULL; - for (block=ar->uiblocks.first; block; block=block->next) { - mx= x; - my= y; + for (block = ar->uiblocks.first; block; block = block->next) { + mx = x; + my = y; ui_window_to_block(ar, block, &mx, &my); - for (but=block->buttons.first; but; but= but->next) { + for (but = block->buttons.first; but; but = but->next) { /* note, LABEL is included for hilights, this allows drags */ - if (but->type==LABEL && but->dragpoin==NULL) + if (but->type == LABEL && but->dragpoin == NULL) continue; if (ELEM3(but->type, ROUNDBOX, SEPR, LISTBOX)) continue; @@ -4957,15 +4957,17 @@ static uiBut *ui_but_find_mouse_over(ARegion *ar, int x, int y) if (but->flag & UI_SCROLLED) continue; if (ui_but_contains_pt(but, mx, my)) - butover= but; + butover = but; } /* CLIP_EVENTS prevents the event from reaching other blocks */ if (block->flag & UI_BLOCK_CLIP_EVENTS) { /* check if mouse is inside block */ if (block->minx <= mx && block->maxx >= mx && - block->miny <= my && block->maxy >= my) + block->miny <= my && block->maxy >= my) + { break; + } } } @@ -4983,12 +4985,12 @@ static uiBut *ui_list_find_mouse_over(ARegion *ar, int x, int y) if (!ui_mouse_inside_region(ar, x, y)) return NULL; - for (block=ar->uiblocks.first; block; block=block->next) { - mx= x; - my= y; + for (block = ar->uiblocks.first; block; block = block->next) { + mx = x; + my = y; ui_window_to_block(ar, block, &mx, &my); - for (but=block->buttons.last; but; but= but->prev) + for (but = block->buttons.last; but; but = but->prev) if (but->type == LISTBOX && ui_but_contains_pt(but, mx, my)) return but; } @@ -5001,56 +5003,56 @@ static uiBut *ui_list_find_mouse_over(ARegion *ar, int x, int y) static int button_modal_state(uiHandleButtonState state) { return ELEM6(state, BUTTON_STATE_WAIT_RELEASE, BUTTON_STATE_WAIT_KEY_EVENT, - BUTTON_STATE_NUM_EDITING, BUTTON_STATE_TEXT_EDITING, - BUTTON_STATE_TEXT_SELECTING, BUTTON_STATE_MENU_OPEN); + BUTTON_STATE_NUM_EDITING, BUTTON_STATE_TEXT_EDITING, + BUTTON_STATE_TEXT_SELECTING, BUTTON_STATE_MENU_OPEN); } static void button_timers_tooltip_remove(bContext *C, uiBut *but) { uiHandleButtonData *data; - data= but->active; + data = but->active; if (data) { if (data->tooltiptimer) { WM_event_remove_timer(data->wm, data->window, data->tooltiptimer); - data->tooltiptimer= NULL; + data->tooltiptimer = NULL; } if (data->tooltip) { ui_tooltip_free(C, data->tooltip); - data->tooltip= NULL; + data->tooltip = NULL; } if (data->autoopentimer) { WM_event_remove_timer(data->wm, data->window, data->autoopentimer); - data->autoopentimer= NULL; + data->autoopentimer = NULL; } } } static void button_tooltip_timer_reset(bContext *C, uiBut *but) { - wmWindowManager *wm= CTX_wm_manager(C); + wmWindowManager *wm = CTX_wm_manager(C); uiHandleButtonData *data; - data= but->active; + data = but->active; if (data->tooltiptimer) { WM_event_remove_timer(data->wm, data->window, data->tooltiptimer); - data->tooltiptimer= NULL; + data->tooltiptimer = NULL; } if (U.flag & USER_TOOLTIPS) if (!but->block->tooltipdisabled) if (!wm->drags.first) - data->tooltiptimer= WM_event_add_timer(data->wm, data->window, TIMER, BUTTON_TOOLTIP_DELAY); + data->tooltiptimer = WM_event_add_timer(data->wm, data->window, TIMER, BUTTON_TOOLTIP_DELAY); } static void button_activate_state(bContext *C, uiBut *but, uiHandleButtonState state) { uiHandleButtonData *data; - data= but->active; + data = but->active; if (data->state == state) return; @@ -5065,13 +5067,13 @@ static void button_activate_state(bContext *C, uiBut *but, uiHandleButtonState s if (data->used_mouse && !data->autoopentimer) { int time; - if (but->block->auto_open==TRUE) time= 1; // test for toolbox - else if ((but->block->flag & UI_BLOCK_LOOP && but->type != BLOCK) || but->block->auto_open==TRUE) time= 5*U.menuthreshold2; - else if (U.uiflag & USER_MENUOPENAUTO) time= 5*U.menuthreshold1; - else time= -1; + if (but->block->auto_open == TRUE) time = 1; // test for toolbox + else if ((but->block->flag & UI_BLOCK_LOOP && but->type != BLOCK) || but->block->auto_open == TRUE) time = 5 * U.menuthreshold2; + else if (U.uiflag & USER_MENUOPENAUTO) time = 5 * U.menuthreshold1; + else time = -1; if (time >= 0) - data->autoopentimer= WM_event_add_timer(data->wm, data->window, TIMER, 0.02*(double)time); + data->autoopentimer = WM_event_add_timer(data->wm, data->window, TIMER, 0.02 * (double)time); } } } @@ -5107,11 +5109,11 @@ static void button_activate_state(bContext *C, uiBut *but, uiHandleButtonState s /* add a short delay before exiting, to ensure there is some feedback */ if (state == BUTTON_STATE_WAIT_FLASH) { - data->flashtimer= WM_event_add_timer(data->wm, data->window, TIMER, BUTTON_FLASH_DELAY); + data->flashtimer = WM_event_add_timer(data->wm, data->window, TIMER, BUTTON_FLASH_DELAY); } else if (data->flashtimer) { WM_event_remove_timer(data->wm, data->window, data->flashtimer); - data->flashtimer= NULL; + data->flashtimer = NULL; } /* add a blocking ui handler at the window handler for blocking, modal states @@ -5123,7 +5125,7 @@ static void button_activate_state(bContext *C, uiBut *but, uiHandleButtonState s } else { if (button_modal_state(data->state)) - WM_event_remove_ui_handler(&data->window->modalhandlers, ui_handler_region_menu, NULL, data, 1); /* 1 = postpone free */ + WM_event_remove_ui_handler(&data->window->modalhandlers, ui_handler_region_menu, NULL, data, 1); /* 1 = postpone free */ } } @@ -5132,7 +5134,7 @@ static void button_activate_state(bContext *C, uiBut *but, uiHandleButtonState s but->flag &= ~UI_SELECT; } - data->state= state; + data->state = state; if (state != BUTTON_STATE_EXIT) { /* When objects for eg. are removed, running ui_check_but() can access @@ -5153,34 +5155,34 @@ static void button_activate_init(bContext *C, ARegion *ar, uiBut *but, uiButtonA uiHandleButtonData *data; /* setup struct */ - data= MEM_callocN(sizeof(uiHandleButtonData), "uiHandleButtonData"); - data->wm= CTX_wm_manager(C); - data->window= CTX_wm_window(C); - data->region= ar; - if ( ELEM(but->type, BUT_CURVE, SEARCH_MENU) ); // XXX curve is temp - else data->interactive= 1; + data = MEM_callocN(sizeof(uiHandleButtonData), "uiHandleButtonData"); + data->wm = CTX_wm_manager(C); + data->window = CTX_wm_window(C); + data->region = ar; + if (ELEM(but->type, BUT_CURVE, SEARCH_MENU) ) ; // XXX curve is temp + else data->interactive = 1; data->state = BUTTON_STATE_INIT; /* activate button */ but->flag |= UI_ACTIVE; - but->active= data; + but->active = data; /* we disable auto_open in the block after a threshold, because we still * want to allow auto opening adjacent menus even if no button is activated * in between going over to the other button, but only for a short while */ - if (type == BUTTON_ACTIVATE_OVER && but->block->auto_open==TRUE) - if (but->block->auto_open_last+BUTTON_AUTO_OPEN_THRESH < PIL_check_seconds_timer()) - but->block->auto_open= FALSE; + if (type == BUTTON_ACTIVATE_OVER && but->block->auto_open == TRUE) + if (but->block->auto_open_last + BUTTON_AUTO_OPEN_THRESH < PIL_check_seconds_timer()) + but->block->auto_open = FALSE; if (type == BUTTON_ACTIVATE_OVER) { - data->used_mouse= 1; + data->used_mouse = 1; } button_activate_state(C, but, BUTTON_STATE_HIGHLIGHT); /* activate right away */ if (but->flag & UI_BUT_IMMEDIATE) { - if (but->type==HOTKEYEVT) + if (but->type == HOTKEYEVT) button_activate_state(C, but, BUTTON_STATE_WAIT_KEY_EVENT); /* .. more to be added here */ } @@ -5190,12 +5192,12 @@ static void button_activate_init(bContext *C, ARegion *ar, uiBut *but, uiButtonA /* activate first button in submenu */ if (data->menu && data->menu->region) { - ARegion *subar= data->menu->region; - uiBlock *subblock= subar->uiblocks.first; + ARegion *subar = data->menu->region; + uiBlock *subblock = subar->uiblocks.first; uiBut *subbut; if (subblock) { - subbut= ui_but_first(subblock); + subbut = ui_but_first(subblock); if (subbut) ui_handle_button_activate(C, subar, subbut, BUTTON_ACTIVATE); @@ -5210,7 +5212,7 @@ static void button_activate_init(bContext *C, ARegion *ar, uiBut *but, uiButtonA static void button_activate_exit(bContext *C, uiHandleButtonData *data, uiBut *but, int mousemove, int onfree) { - uiBlock *block= but->block; + uiBlock *block = but->block; uiBut *bt; /* ensure we are in the exit state */ @@ -5228,9 +5230,9 @@ static void button_activate_exit(bContext *C, uiHandleButtonData *data, uiBut *b if (!data->cancel || data->escapecancel) { uiPopupBlockHandle *menu; - menu= block->handle; - menu->butretval= data->retval; - menu->menuretval= (data->cancel)? UI_RETURN_CANCEL: UI_RETURN_OK; + menu = block->handle; + menu->butretval = data->retval; + menu->menuretval = (data->cancel) ? UI_RETURN_CANCEL : UI_RETURN_OK; } } @@ -5244,11 +5246,11 @@ static void button_activate_exit(bContext *C, uiHandleButtonData *data, uiBut *b } /* disable tooltips until mousemove + last active flag */ - for (block=data->region->uiblocks.first; block; block=block->next) { - for (bt=block->buttons.first; bt; bt=bt->next) + for (block = data->region->uiblocks.first; block; block = block->next) { + for (bt = block->buttons.first; bt; bt = bt->next) bt->flag &= ~UI_BUT_LAST_ACTIVE; - block->tooltipdisabled= 1; + block->tooltipdisabled = 1; } ui_blocks_set_tooltips(data->region, 0); @@ -5264,8 +5266,8 @@ static void button_activate_exit(bContext *C, uiHandleButtonData *data, uiBut *b /* clean up button */ MEM_freeN(but->active); - but->active= NULL; - but->flag &= ~(UI_ACTIVE|UI_SELECT); + but->active = NULL; + but->flag &= ~(UI_ACTIVE | UI_SELECT); but->flag |= UI_BUT_LAST_ACTIVE; if (!onfree) ui_check_but(but); @@ -5285,37 +5287,37 @@ void ui_button_active_free(const bContext *C, uiBut *but) * active, this is bad for user interaction, but we need to handle this * case cleanly anyway in case it happens */ if (but->active) { - data= but->active; - data->cancel= 1; - button_activate_exit((bContext*)C, data, but, 0, 1); + data = but->active; + data->cancel = 1; + button_activate_exit((bContext *)C, data, but, 0, 1); } } /* returns the active button with an optional checking function */ static uiBut *ui_context_button_active(const bContext *C, int (*but_check_cb)(uiBut *)) { - uiBut *but_found= NULL; + uiBut *but_found = NULL; - ARegion *ar= CTX_wm_region(C); + ARegion *ar = CTX_wm_region(C); while (ar) { uiBlock *block; - uiBut *but, *activebut= NULL; + uiBut *but, *activebut = NULL; /* find active button */ - for (block=ar->uiblocks.first; block; block=block->next) { - for (but=block->buttons.first; but; but= but->next) { + for (block = ar->uiblocks.first; block; block = block->next) { + for (but = block->buttons.first; but; but = but->next) { if (but->active) - activebut= but; + activebut = but; else if (!activebut && (but->flag & UI_BUT_LAST_ACTIVE)) - activebut= but; + activebut = but; } } if (activebut && (but_check_cb == NULL || but_check_cb(activebut))) { - uiHandleButtonData *data= activebut->active; + uiHandleButtonData *data = activebut->active; - but_found= activebut; + but_found = activebut; /* recurse into opened menu, like colorpicker case */ if (data && data->menu && (ar != data->menu->region)) { @@ -5351,29 +5353,29 @@ uiBut *uiContextActiveButton(const struct bContext *C) /* helper function for insert keyframe, reset to default, etc operators */ void uiContextActiveProperty(const bContext *C, struct PointerRNA *ptr, struct PropertyRNA **prop, int *index) { - uiBut *activebut= ui_context_rna_button_active(C); + uiBut *activebut = ui_context_rna_button_active(C); memset(ptr, 0, sizeof(*ptr)); if (activebut && activebut->rnapoin.data) { - *ptr= activebut->rnapoin; - *prop= activebut->rnaprop; - *index= activebut->rnaindex; + *ptr = activebut->rnapoin; + *prop = activebut->rnaprop; + *index = activebut->rnaindex; } else { - *prop= NULL; - *index= 0; + *prop = NULL; + *index = 0; } } void uiContextActivePropertyHandle(bContext *C) { - uiBut *activebut= ui_context_rna_button_active(C); + uiBut *activebut = ui_context_rna_button_active(C); if (activebut) { /* TODO, look into a better way to handle the button change * currently this is mainly so reset defaults works for the * operator redo panel - campbell */ - uiBlock *block= activebut->block; + uiBlock *block = activebut->block; if (block->handle_func) { block->handle_func(C, block->handle_func_arg, 0); } @@ -5382,7 +5384,7 @@ void uiContextActivePropertyHandle(bContext *C) wmOperator *uiContextActiveOperator(const struct bContext *C) { - ARegion *ar_ctx= CTX_wm_region(C); + ARegion *ar_ctx = CTX_wm_region(C); uiBlock *block; /* background mode */ @@ -5391,7 +5393,7 @@ wmOperator *uiContextActiveOperator(const struct bContext *C) } /* scan active regions ui */ - for (block=ar_ctx->uiblocks.first; block; block=block->next) { + for (block = ar_ctx->uiblocks.first; block; block = block->next) { if (block->ui_operator) { return block->ui_operator; } @@ -5399,14 +5401,14 @@ wmOperator *uiContextActiveOperator(const struct bContext *C) /* scan popups */ { - bScreen *sc= CTX_wm_screen(C); + bScreen *sc = CTX_wm_screen(C); ARegion *ar; - for (ar= sc->regionbase.first; ar; ar= ar->next) { + for (ar = sc->regionbase.first; ar; ar = ar->next) { if (ar == ar_ctx) { continue; } - for (block=ar->uiblocks.first; block; block=block->next) { + for (block = ar->uiblocks.first; block; block = block->next) { if (block->ui_operator) { return block->ui_operator; } @@ -5420,30 +5422,30 @@ wmOperator *uiContextActiveOperator(const struct bContext *C) /* helper function for insert keyframe, reset to default, etc operators */ void uiContextAnimUpdate(const bContext *C) { - Scene *scene= CTX_data_scene(C); - ARegion *ar= CTX_wm_region(C); + Scene *scene = CTX_data_scene(C); + ARegion *ar = CTX_wm_region(C); uiBlock *block; uiBut *but, *activebut; while (ar) { /* find active button */ - activebut= NULL; + activebut = NULL; - for (block=ar->uiblocks.first; block; block=block->next) { - for (but=block->buttons.first; but; but= but->next) { - ui_but_anim_flag(but, (scene)? scene->r.cfra: 0.0f); + for (block = ar->uiblocks.first; block; block = block->next) { + for (but = block->buttons.first; but; but = but->next) { + ui_but_anim_flag(but, (scene) ? scene->r.cfra : 0.0f); ED_region_tag_redraw(ar); if (but->active) - activebut= but; + activebut = but; else if (!activebut && (but->flag & UI_BUT_LAST_ACTIVE)) - activebut= but; + activebut = but; } } if (activebut) { /* always recurse into opened menu, so all buttons update (like colorpicker) */ - uiHandleButtonData *data= activebut->active; + uiHandleButtonData *data = activebut->active; if (data && data->menu) ar = data->menu->region; else @@ -5463,9 +5465,9 @@ static uiBut *uit_but_find_open_event(ARegion *ar, wmEvent *event) uiBlock *block; uiBut *but; - for (block=ar->uiblocks.first; block; block=block->next) { - for (but=block->buttons.first; but; but= but->next) - if (but==event->customdata) + for (block = ar->uiblocks.first; block; block = block->next) { + for (but = block->buttons.first; but; but = but->next) + if (but == event->customdata) return but; } return NULL; @@ -5476,12 +5478,12 @@ static int ui_handle_button_over(bContext *C, wmEvent *event, ARegion *ar) uiBut *but; if (event->type == MOUSEMOVE) { - but= ui_but_find_mouse_over(ar, event->x, event->y); + but = ui_but_find_mouse_over(ar, event->x, event->y); if (but) button_activate_init(C, ar, but, BUTTON_ACTIVATE_OVER); } else if (event->type == EVT_BUT_OPEN) { - but= uit_but_find_open_event(ar, event); + but = uit_but_find_open_event(ar, event); if (but) { button_activate_init(C, ar, but, BUTTON_ACTIVATE_OVER); ui_do_button(C, but->block, but, event); @@ -5494,16 +5496,16 @@ static int ui_handle_button_over(bContext *C, wmEvent *event, ARegion *ar) /* exported to interface.c: uiButActiveOnly() */ void ui_button_activate_do(bContext *C, ARegion *ar, uiBut *but) { - wmWindow *win= CTX_wm_window(C); + wmWindow *win = CTX_wm_window(C); wmEvent event; button_activate_init(C, ar, but, BUTTON_ACTIVATE_OVER); - event= *(win->eventstate); /* XXX huh huh? make api call */ - event.type= EVT_BUT_OPEN; - event.val= KM_PRESS; - event.customdata= but; - event.customdatafree= FALSE; + event = *(win->eventstate); /* XXX huh huh? make api call */ + event.type = EVT_BUT_OPEN; + event.val = KM_PRESS; + event.customdata = but; + event.customdatafree = FALSE; ui_do_button(C, but->block, but, &event); } @@ -5513,10 +5515,10 @@ static void ui_handle_button_activate(bContext *C, ARegion *ar, uiBut *but, uiBu uiBut *oldbut; uiHandleButtonData *data; - oldbut= ui_but_find_activated(ar); + oldbut = ui_but_find_activated(ar); if (oldbut) { - data= oldbut->active; - data->cancel= 1; + data = oldbut->active; + data->cancel = 1; button_activate_exit(C, data, oldbut, 0, 0); } @@ -5534,31 +5536,31 @@ static int ui_handle_button_event(bContext *C, wmEvent *event, uiBut *but) uiButtonActivateType posttype; int retval; - data= but->active; - block= but->block; - ar= data->region; + data = but->active; + block = but->block; + ar = data->region; - retval= WM_UI_HANDLER_CONTINUE; + retval = WM_UI_HANDLER_CONTINUE; if (data->state == BUTTON_STATE_HIGHLIGHT) { - switch(event->type) { + switch (event->type) { case WINDEACTIVATE: case EVT_BUT_CANCEL: - data->cancel= 1; + data->cancel = 1; button_activate_state(C, but, BUTTON_STATE_EXIT); - retval= WM_UI_HANDLER_CONTINUE; + retval = WM_UI_HANDLER_CONTINUE; break; case MOUSEMOVE: /* verify if we are still over the button, if not exit */ if (!ui_mouse_inside_button(ar, but, event->x, event->y)) { - data->cancel= 1; + data->cancel = 1; button_activate_state(C, but, BUTTON_STATE_EXIT); } else if (ui_but_find_mouse_over(ar, event->x, event->y) != but) { - data->cancel= 1; + data->cancel = 1; button_activate_state(C, but, BUTTON_STATE_EXIT); } - else if (event->x!=event->prevx || event->y!=event->prevy) { + else if (event->x != event->prevx || event->y != event->prevy) { /* re-enable tooltip on mouse move */ ui_blocks_set_tooltips(ar, 1); button_tooltip_timer_reset(C, but); @@ -5569,46 +5571,46 @@ static int ui_handle_button_event(bContext *C, wmEvent *event, uiBut *but) /* handle tooltip timer */ if (event->customdata == data->tooltiptimer) { WM_event_remove_timer(data->wm, data->window, data->tooltiptimer); - data->tooltiptimer= NULL; + data->tooltiptimer = NULL; if (!data->tooltip) - data->tooltip= ui_tooltip_create(C, data->region, but); + data->tooltip = ui_tooltip_create(C, data->region, but); } /* handle menu auto open timer */ else if (event->customdata == data->autoopentimer) { WM_event_remove_timer(data->wm, data->window, data->autoopentimer); - data->autoopentimer= NULL; + data->autoopentimer = NULL; if (ui_mouse_inside_button(ar, but, event->x, event->y)) button_activate_state(C, but, BUTTON_STATE_MENU_OPEN); } - retval= WM_UI_HANDLER_CONTINUE; + retval = WM_UI_HANDLER_CONTINUE; break; - case WHEELUPMOUSE: - case WHEELDOWNMOUSE: - case MIDDLEMOUSE: - /* XXX hardcoded keymap check... but anyway, while view changes, tooltips should be removed */ - if (data->tooltiptimer) { - WM_event_remove_timer(data->wm, data->window, data->tooltiptimer); - data->tooltiptimer= NULL; - } + case WHEELUPMOUSE: + case WHEELDOWNMOUSE: + case MIDDLEMOUSE: + /* XXX hardcoded keymap check... but anyway, while view changes, tooltips should be removed */ + if (data->tooltiptimer) { + WM_event_remove_timer(data->wm, data->window, data->tooltiptimer); + data->tooltiptimer = NULL; + } /* pass on purposedly */ - default: - /* handle button type specific events */ - retval= ui_do_button(C, block, but, event); + default: + /* handle button type specific events */ + retval = ui_do_button(C, block, but, event); } } } else if (data->state == BUTTON_STATE_WAIT_RELEASE) { - switch(event->type) { + switch (event->type) { case WINDEACTIVATE: - data->cancel= 1; + data->cancel = 1; button_activate_state(C, but, BUTTON_STATE_EXIT); break; case MOUSEMOVE: - if (ELEM(but->type,LINK, INLINK)) { + if (ELEM(but->type, LINK, INLINK)) { but->flag |= UI_SELECT; ui_do_button(C, block, but, event); ED_region_tag_redraw(data->region); @@ -5618,15 +5620,15 @@ static int ui_handle_button_event(bContext *C, wmEvent *event, uiBut *but) /* also de-activate for buttons that only show higlights */ if (ui_mouse_inside_button(ar, but, event->x, event->y)) { if (!(but->flag & UI_SELECT)) { - but->flag |= (UI_SELECT|UI_ACTIVE); - data->cancel= 0; + but->flag |= (UI_SELECT | UI_ACTIVE); + data->cancel = 0; ED_region_tag_redraw(data->region); } } else { if (but->flag & UI_SELECT) { - but->flag &= ~(UI_SELECT|UI_ACTIVE); - data->cancel= 1; + but->flag &= ~(UI_SELECT | UI_ACTIVE); + data->cancel = 1; ED_region_tag_redraw(data->region); } } @@ -5638,50 +5640,50 @@ static int ui_handle_button_event(bContext *C, wmEvent *event, uiBut *but) break; } - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; } else if (data->state == BUTTON_STATE_WAIT_FLASH) { - switch(event->type) { + switch (event->type) { case TIMER: { if (event->customdata == data->flashtimer) button_activate_state(C, but, BUTTON_STATE_EXIT); } } - retval= WM_UI_HANDLER_CONTINUE; + retval = WM_UI_HANDLER_CONTINUE; } else if (data->state == BUTTON_STATE_MENU_OPEN) { /* check for exit because of mouse-over another button */ - switch(event->type) { + switch (event->type) { case MOUSEMOVE: if (data->menu && data->menu->region) if (ui_mouse_inside_region(data->menu->region, event->x, event->y)) break; - { - uiBut *bt= ui_but_find_mouse_over(ar, event->x, event->y); + { + uiBut *bt = ui_but_find_mouse_over(ar, event->x, event->y); - if (bt && bt->active != data) { - if (but->type != COL) /* exception */ - data->cancel= 1; - button_activate_state(C, but, BUTTON_STATE_EXIT); + if (bt && bt->active != data) { + if (but->type != COL) /* exception */ + data->cancel = 1; + button_activate_state(C, but, BUTTON_STATE_EXIT); + } + break; } - break; - } } ui_do_button(C, block, but, event); - retval= WM_UI_HANDLER_CONTINUE; + retval = WM_UI_HANDLER_CONTINUE; } else { - retval= ui_do_button(C, block, but, event); + retval = ui_do_button(C, block, but, event); // retval= WM_UI_HANDLER_BREAK; XXX why ? } if (data->state == BUTTON_STATE_EXIT) { - postbut= data->postbut; - posttype= data->posttype; + postbut = data->postbut; + posttype = data->posttype; button_activate_exit(C, data, but, (postbut == NULL), 0); @@ -5695,17 +5697,17 @@ static int ui_handle_button_event(bContext *C, wmEvent *event, uiBut *but) static int ui_handle_list_event(bContext *C, wmEvent *event, ARegion *ar) { - uiBut *but= ui_list_find_mouse_over(ar, event->x, event->y); - int retval= WM_UI_HANDLER_CONTINUE; + uiBut *but = ui_list_find_mouse_over(ar, event->x, event->y); + int retval = WM_UI_HANDLER_CONTINUE; int value, min, max; if (but && (event->val == KM_PRESS)) { - Panel *pa= but->block->panel; + Panel *pa = but->block->panel; if (ELEM(event->type, UPARROWKEY, DOWNARROWKEY) || - ((ELEM(event->type, WHEELUPMOUSE, WHEELDOWNMOUSE) && event->alt))) { + ((ELEM(event->type, WHEELUPMOUSE, WHEELDOWNMOUSE) && event->alt))) { /* activate up/down the list */ - value= RNA_property_int_get(&but->rnapoin, but->rnaprop); + value = RNA_property_int_get(&but->rnapoin, but->rnaprop); if (ELEM(event->type, UPARROWKEY, WHEELUPMOUSE)) value--; @@ -5713,34 +5715,34 @@ static int ui_handle_list_event(bContext *C, wmEvent *event, ARegion *ar) value++; if (value < pa->list_scroll) - pa->list_scroll= value; - else if (value >= pa->list_scroll+pa->list_size) - pa->list_scroll= value - pa->list_size + 1; + pa->list_scroll = value; + else if (value >= pa->list_scroll + pa->list_size) + pa->list_scroll = value - pa->list_size + 1; RNA_property_int_range(&but->rnapoin, but->rnaprop, &min, &max); - value= CLAMPIS(value, min, max); + value = CLAMPIS(value, min, max); RNA_property_int_set(&but->rnapoin, but->rnaprop, value); RNA_property_update(C, &but->rnapoin, but->rnaprop); ED_region_tag_redraw(ar); - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; } else if (ELEM(event->type, WHEELUPMOUSE, WHEELDOWNMOUSE) && event->shift) { /* silly replacement for proper grip */ if (pa->list_grip_size == 0) - pa->list_grip_size= pa->list_size; + pa->list_grip_size = pa->list_size; if (event->type == WHEELUPMOUSE) pa->list_grip_size--; else pa->list_grip_size++; - pa->list_grip_size= MAX2(pa->list_grip_size, 1); + pa->list_grip_size = MAX2(pa->list_grip_size, 1); ED_region_tag_redraw(ar); - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; } else if (ELEM(event->type, WHEELUPMOUSE, WHEELDOWNMOUSE)) { if (pa->list_last_len > pa->list_size) { @@ -5752,7 +5754,7 @@ static int ui_handle_list_event(bContext *C, wmEvent *event, ARegion *ar) ED_region_tag_redraw(ar); - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; } } } @@ -5765,43 +5767,43 @@ static void ui_handle_button_return_submenu(bContext *C, wmEvent *event, uiBut * uiHandleButtonData *data; uiPopupBlockHandle *menu; - data= but->active; - menu= data->menu; + data = but->active; + menu = data->menu; /* copy over return values from the closing menu */ if ((menu->menuretval & UI_RETURN_OK) || (menu->menuretval & UI_RETURN_UPDATE)) { if (but->type == COL) copy_v3_v3(data->vec, menu->retvec); else if (ELEM3(but->type, MENU, ICONROW, ICONTEXTROW)) - data->value= menu->retvalue; + data->value = menu->retvalue; } if (menu->menuretval & UI_RETURN_UPDATE) { if (data->interactive) ui_apply_button(C, but->block, but, data, 1); else ui_check_but(but); - menu->menuretval= 0; + menu->menuretval = 0; } /* now change button state or exit, which will close the submenu */ if ((menu->menuretval & UI_RETURN_OK) || (menu->menuretval & UI_RETURN_CANCEL)) { if (menu->menuretval != UI_RETURN_OK) - data->cancel= 1; + data->cancel = 1; button_activate_exit(C, data, but, 1, 0); } else if (menu->menuretval & UI_RETURN_OUT) { - if (event->type==MOUSEMOVE && ui_mouse_inside_button(data->region, but, event->x, event->y)) { + if (event->type == MOUSEMOVE && ui_mouse_inside_button(data->region, but, event->x, event->y)) { button_activate_state(C, but, BUTTON_STATE_HIGHLIGHT); } else { if (ISKEYBOARD(event->type)) { /* keyboard menu hierarchy navigation, going back to previous level */ - but->active->used_mouse= 0; + but->active->used_mouse = 0; button_activate_state(C, but, BUTTON_STATE_HIGHLIGHT); } else { - data->cancel= 1; + data->cancel = 1; button_activate_exit(C, data, but, 1, 0); } } @@ -5822,14 +5824,14 @@ static void ui_handle_button_return_submenu(bContext *C, wmEvent *event, uiBut * static void ui_mouse_motion_towards_init(uiPopupBlockHandle *menu, int mx, int my, int force) { if (!menu->dotowards || force) { - menu->dotowards= 1; - menu->towardsx= mx; - menu->towardsy= my; + menu->dotowards = 1; + menu->towardsx = mx; + menu->towardsy = my; if (force) - menu->towardstime= DBL_MAX; /* unlimited time */ + menu->towardstime = DBL_MAX; /* unlimited time */ else - menu->towardstime= PIL_check_seconds_timer(); + menu->towardstime = PIL_check_seconds_timer(); } } @@ -5843,51 +5845,51 @@ static int ui_mouse_motion_towards_check(uiBlock *block, uiPopupBlockHandle *men /* verify that we are moving towards one of the edges of the * menu block, in other words, in the triangle formed by the * initial mouse location and two edge points. */ - p1[0]= block->minx-20; - p1[1]= block->miny-20; + p1[0] = block->minx - 20; + p1[1] = block->miny - 20; - p2[0]= block->maxx+20; - p2[1]= block->miny-20; + p2[0] = block->maxx + 20; + p2[1] = block->miny - 20; - p3[0]= block->maxx+20; - p3[1]= block->maxy+20; + p3[0] = block->maxx + 20; + p3[1] = block->maxy + 20; - p4[0]= block->minx-20; - p4[1]= block->maxy+20; + p4[0] = block->minx - 20; + p4[1] = block->maxy + 20; - oldp[0]= menu->towardsx; - oldp[1]= menu->towardsy; + oldp[0] = menu->towardsx; + oldp[1] = menu->towardsy; - newp[0]= mx; - newp[1]= my; + newp[0] = mx; + newp[1] = my; if (len_v2v2(oldp, newp) < 4.0f) return menu->dotowards; - closer= 0; + closer = 0; closer |= isect_point_tri_v2(newp, oldp, p1, p2); closer |= isect_point_tri_v2(newp, oldp, p2, p3); closer |= isect_point_tri_v2(newp, oldp, p3, p4); closer |= isect_point_tri_v2(newp, oldp, p4, p1); if (!closer) - menu->dotowards= 0; + menu->dotowards = 0; /* 1 second timer */ if (PIL_check_seconds_timer() - menu->towardstime > BUTTON_MOUSE_TOWARDS_THRESH) - menu->dotowards= 0; + menu->dotowards = 0; return menu->dotowards; } static char ui_menu_scroll_test(uiBlock *block, int my) { - if (block->flag & (UI_BLOCK_CLIPTOP|UI_BLOCK_CLIPBOTTOM)) { + if (block->flag & (UI_BLOCK_CLIPTOP | UI_BLOCK_CLIPBOTTOM)) { if (block->flag & UI_BLOCK_CLIPTOP) - if (my > block->maxy-14) + if (my > block->maxy - 14) return 't'; if (block->flag & UI_BLOCK_CLIPBOTTOM) - if (my < block->miny+14) + if (my < block->miny + 14) return 'b'; } return 0; @@ -5895,46 +5897,46 @@ static char ui_menu_scroll_test(uiBlock *block, int my) static int ui_menu_scroll(ARegion *ar, uiBlock *block, int my) { - char test= ui_menu_scroll_test(block, my); + char test = ui_menu_scroll_test(block, my); if (test) { - uiBut *b1= block->buttons.first; - uiBut *b2= block->buttons.last; + uiBut *b1 = block->buttons.first; + uiBut *b2 = block->buttons.last; uiBut *bnext; uiBut *bprev; - int dy= 0; + int dy = 0; /* get first and last visible buttons */ while (b1 && ui_but_next(b1) && (b1->flag & UI_SCROLLED)) - b1= ui_but_next(b1); + b1 = ui_but_next(b1); while (b2 && ui_but_prev(b2) && (b2->flag & UI_SCROLLED)) - b2= ui_but_prev(b2); + b2 = ui_but_prev(b2); /* skips separators */ - bnext= ui_but_next(b1); - bprev= ui_but_prev(b2); + bnext = ui_but_next(b1); + bprev = ui_but_prev(b2); - if (bnext==NULL || bprev==NULL) + if (bnext == NULL || bprev == NULL) return 0; - if (test=='t') { + if (test == 't') { /* bottom button is first button */ if (b1->y1 < b2->y1) - dy= bnext->y1 - b1->y1; + dy = bnext->y1 - b1->y1; /* bottom button is last button */ else - dy= bprev->y1 - b2->y1; + dy = bprev->y1 - b2->y1; } - else if (test=='b') { + else if (test == 'b') { /* bottom button is first button */ if (b1->y1 < b2->y1) - dy= b1->y1 - bnext->y1; + dy = b1->y1 - bnext->y1; /* bottom button is last button */ else - dy= b2->y1 - bprev->y1; + dy = b2->y1 - bprev->y1; } if (dy) { - for (b1= block->buttons.first; b1; b1= b1->next) { + for (b1 = block->buttons.first; b1; b1 = b1->next) { b1->y1 -= dy; b1->y2 -= dy; } @@ -5957,25 +5959,25 @@ static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle uiBut *but, *bt; int inside, act, count, mx, my, retval; - ar= menu->region; - block= ar->uiblocks.first; + ar = menu->region; + block = ar->uiblocks.first; - act= 0; - retval= WM_UI_HANDLER_CONTINUE; + act = 0; + retval = WM_UI_HANDLER_CONTINUE; - mx= event->x; - my= event->y; + mx = event->x; + my = event->y; ui_window_to_block(ar, block, &mx, &my); /* check if mouse is inside block */ - inside= 0; + inside = 0; if (block->minx <= mx && block->maxx >= mx) if (block->miny <= my && block->maxy >= my) - inside= 1; + inside = 1; /* if there's an active modal button, don't check events or outside, except for search menu */ - but= ui_but_find_activated(ar); - if (but && button_modal_state(but->active->state) && but->type!=SEARCH_MENU) { + but = ui_but_find_activated(ar); + if (but && button_modal_state(but->active->state) && but->type != SEARCH_MENU) { /* if a button is activated modal, always reset the start mouse * position of the towards mechanism to avoid loosing focus, * and don't handle events */ @@ -5992,41 +5994,41 @@ static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle /* add menu scroll timer, if needed */ if (ui_menu_scroll_test(block, my)) - if (menu->scrolltimer==NULL) - menu->scrolltimer= - WM_event_add_timer(CTX_wm_manager(C), CTX_wm_window(C), TIMER, MENU_SCROLL_INTERVAL); + if (menu->scrolltimer == NULL) + menu->scrolltimer = + WM_event_add_timer(CTX_wm_manager(C), CTX_wm_window(C), TIMER, MENU_SCROLL_INTERVAL); } /* first block own event func */ - if (block->block_event_func && block->block_event_func(C, block, event)); + if (block->block_event_func && block->block_event_func(C, block, event)) ; /* events not for active search menu button */ - else if (but==NULL || but->type!=SEARCH_MENU) { - switch(event->type) { + else if (but == NULL || but->type != SEARCH_MENU) { + switch (event->type) { /* closing sublevels of pulldowns */ case LEFTARROWKEY: - if (event->val==KM_PRESS && (block->flag & UI_BLOCK_LOOP)) + if (event->val == KM_PRESS && (block->flag & UI_BLOCK_LOOP)) if (block->saferct.first) - menu->menuretval= UI_RETURN_OUT; + menu->menuretval = UI_RETURN_OUT; - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; break; /* opening sublevels of pulldowns */ case RIGHTARROWKEY: - if (event->val==KM_PRESS && (block->flag & UI_BLOCK_LOOP)) { - but= ui_but_find_activated(ar); + if (event->val == KM_PRESS && (block->flag & UI_BLOCK_LOOP)) { + but = ui_but_find_activated(ar); if (!but) { /* no item active, we make first active */ - if (block->direction & UI_TOP) but= ui_but_last(block); - else but= ui_but_first(block); + if (block->direction & UI_TOP) but = ui_but_last(block); + else but = ui_but_first(block); } if (but && ELEM(but->type, BLOCK, PULLDOWN)) ui_handle_button_activate(C, ar, but, BUTTON_ACTIVATE_OPEN); } - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; break; case UPARROWKEY: @@ -6034,28 +6036,28 @@ static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle case WHEELUPMOUSE: case WHEELDOWNMOUSE: /* arrowkeys: only handle for block_loop blocks */ - if (event->alt || event->shift || event->ctrl || event->oskey); + if (event->alt || event->shift || event->ctrl || event->oskey) ; else if (inside || (block->flag & UI_BLOCK_LOOP)) { - if (event->val==KM_PRESS) { - but= ui_but_find_activated(ar); + if (event->val == KM_PRESS) { + but = ui_but_find_activated(ar); if (but) { /* is there a situation where UI_LEFT or UI_RIGHT would also change navigation direction? */ - if ( ((ELEM(event->type, DOWNARROWKEY, WHEELDOWNMOUSE)) && (block->direction & UI_DOWN)) || - ((ELEM(event->type, DOWNARROWKEY, WHEELDOWNMOUSE)) && (block->direction & UI_RIGHT)) || - ((ELEM(event->type, UPARROWKEY, WHEELUPMOUSE)) && (block->direction & UI_TOP)) - ) { + if (((ELEM(event->type, DOWNARROWKEY, WHEELDOWNMOUSE)) && (block->direction & UI_DOWN)) || + ((ELEM(event->type, DOWNARROWKEY, WHEELDOWNMOUSE)) && (block->direction & UI_RIGHT)) || + ((ELEM(event->type, UPARROWKEY, WHEELUPMOUSE)) && (block->direction & UI_TOP))) + { /* the following is just a hack - uiBut->type set to BUT and BUTM have there menus built * opposite ways - this should be changed so that all popup-menus use the same uiBlock->direction */ if (but->type & BUT) - but= ui_but_next(but); + but = ui_but_next(but); else - but= ui_but_prev(but); + but = ui_but_prev(but); } else { if (but->type & BUT) - but= ui_but_prev(but); + but = ui_but_prev(but); else - but= ui_but_next(but); + but = ui_but_next(but); } if (but) @@ -6063,23 +6065,23 @@ static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle } if (!but) { - if ( ((ELEM(event->type, UPARROWKEY, WHEELUPMOUSE)) && (block->direction & UI_DOWN)) || - ((ELEM(event->type, UPARROWKEY, WHEELUPMOUSE)) && (block->direction & UI_RIGHT)) || - ((ELEM(event->type, DOWNARROWKEY, WHEELDOWNMOUSE)) && (block->direction & UI_TOP)) - ) { - if ((bt= ui_but_first(block)) && (bt->type & BUT)) { - bt= ui_but_last(block); + if (((ELEM(event->type, UPARROWKEY, WHEELUPMOUSE)) && (block->direction & UI_DOWN)) || + ((ELEM(event->type, UPARROWKEY, WHEELUPMOUSE)) && (block->direction & UI_RIGHT)) || + ((ELEM(event->type, DOWNARROWKEY, WHEELDOWNMOUSE)) && (block->direction & UI_TOP))) + { + if ((bt = ui_but_first(block)) && (bt->type & BUT)) { + bt = ui_but_last(block); } else { /* keep ui_but_first() */ } } else { - if ((bt= ui_but_first(block)) && (bt->type & BUT)) { + if ((bt = ui_but_first(block)) && (bt->type & BUT)) { /* keep ui_but_first() */ } else { - bt= ui_but_last(block); + bt = ui_but_last(block); } } @@ -6088,56 +6090,56 @@ static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle } } - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; } break; - case ONEKEY: case PAD1: - act= 1; - case TWOKEY: case PAD2: - if (act==0) act= 2; - case THREEKEY: case PAD3: - if (act==0) act= 3; - case FOURKEY: case PAD4: - if (act==0) act= 4; - case FIVEKEY: case PAD5: - if (act==0) act= 5; - case SIXKEY: case PAD6: - if (act==0) act= 6; - case SEVENKEY: case PAD7: - if (act==0) act= 7; - case EIGHTKEY: case PAD8: - if (act==0) act= 8; - case NINEKEY: case PAD9: - if (act==0) act= 9; - case ZEROKEY: case PAD0: - if (act==0) act= 10; - - if ((block->flag & UI_BLOCK_NUMSELECT) && event->val==KM_PRESS) { - if (event->alt) act+= 10; - - count= 0; - for (but= block->buttons.first; but; but= but->next) { - int doit= 0; + case ONEKEY: case PAD1: + act = 1; + case TWOKEY: case PAD2: + if (act == 0) act = 2; + case THREEKEY: case PAD3: + if (act == 0) act = 3; + case FOURKEY: case PAD4: + if (act == 0) act = 4; + case FIVEKEY: case PAD5: + if (act == 0) act = 5; + case SIXKEY: case PAD6: + if (act == 0) act = 6; + case SEVENKEY: case PAD7: + if (act == 0) act = 7; + case EIGHTKEY: case PAD8: + if (act == 0) act = 8; + case NINEKEY: case PAD9: + if (act == 0) act = 9; + case ZEROKEY: case PAD0: + if (act == 0) act = 10; + + if ((block->flag & UI_BLOCK_NUMSELECT) && event->val == KM_PRESS) { + if (event->alt) act += 10; + + count = 0; + for (but = block->buttons.first; but; but = but->next) { + int doit = 0; - if (but->type!=LABEL && but->type!=SEPR) + if (but->type != LABEL && but->type != SEPR) count++; /* exception for rna layer buts */ if (but->rnapoin.data && but->rnaprop) { if (ELEM(RNA_property_subtype(but->rnaprop), PROP_LAYER, PROP_LAYER_MEMBER)) { - if (but->rnaindex== act-1) - doit=1; + if (but->rnaindex == act - 1) + doit = 1; } } /* exception for menus like layer buts, with button aligning they're not drawn in order */ - else if (but->type==TOGR) { - if (but->bitnr==act-1) - doit= 1; + else if (but->type == TOGR) { + if (but->bitnr == act - 1) + doit = 1; } - else if (count==act) - doit=1; + else if (count == act) + doit = 1; if (doit) { ui_handle_button_activate(C, ar, but, BUTTON_ACTIVATE_APPLY); @@ -6145,7 +6147,7 @@ static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle } } - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; } break; @@ -6177,14 +6179,14 @@ static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle case YKEY: case ZKEY: { - if ( (event->val == KM_PRESS) && + if ((event->val == KM_PRESS) && (event->shift == FALSE) && (event->ctrl == FALSE) && - (event->oskey == FALSE) - ) { - for (but= block->buttons.first; but; but= but->next) { + (event->oskey == FALSE)) + { + for (but = block->buttons.first; but; but = but->next) { - if (but->menu_key==event->type) { + if (but->menu_key == event->type) { if (but->type == BUT) { /* mainly for operator buttons */ ui_handle_button_activate(C, ar, but, BUTTON_ACTIVATE_APPLY); @@ -6205,7 +6207,7 @@ static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle } } - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; } break; } @@ -6216,43 +6218,43 @@ static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle if (block->flag & UI_BLOCK_LOOP) { /* if we click outside the block, verify if we clicked on the * button that opened us, otherwise we need to close */ - if (inside==0) { - uiSafetyRct *saferct= block->saferct.first; + if (inside == 0) { + uiSafetyRct *saferct = block->saferct.first; - if (ELEM3(event->type, LEFTMOUSE, MIDDLEMOUSE, RIGHTMOUSE) && event->val==KM_PRESS) { + if (ELEM3(event->type, LEFTMOUSE, MIDDLEMOUSE, RIGHTMOUSE) && event->val == KM_PRESS) { if (saferct && !BLI_in_rctf(&saferct->parent, event->x, event->y)) { if (block->flag & (UI_BLOCK_OUT_1)) - menu->menuretval= UI_RETURN_OK; + menu->menuretval = UI_RETURN_OK; else - menu->menuretval= UI_RETURN_OUT; + menu->menuretval = UI_RETURN_OUT; } } } - if (menu->menuretval); - else if (event->type==ESCKEY && event->val==KM_PRESS) { + if (menu->menuretval) ; + else if (event->type == ESCKEY && event->val == KM_PRESS) { /* esc cancels this and all preceding menus */ - menu->menuretval= UI_RETURN_CANCEL; + menu->menuretval = UI_RETURN_CANCEL; } - else if (ELEM(event->type, RETKEY, PADENTER) && event->val==KM_PRESS) { + else if (ELEM(event->type, RETKEY, PADENTER) && event->val == KM_PRESS) { /* enter will always close this block, we let the event * get handled by the button if it is activated, otherwise we cancel */ if (!ui_but_find_activated(ar)) - menu->menuretval= UI_RETURN_CANCEL | UI_RETURN_POPUP_OK; + menu->menuretval = UI_RETURN_CANCEL | UI_RETURN_POPUP_OK; } else { ui_mouse_motion_towards_check(block, menu, mx, my); /* check mouse moving outside of the menu */ - if (inside==0 && (block->flag & UI_BLOCK_MOVEMOUSE_QUIT)) { + if (inside == 0 && (block->flag & UI_BLOCK_MOVEMOUSE_QUIT)) { uiSafetyRct *saferct; /* check for all parent rects, enables arrowkeys to be used */ - for (saferct=block->saferct.first; saferct; saferct= saferct->next) { + for (saferct = block->saferct.first; saferct; saferct = saferct->next) { /* for mouse move we only check our own rect, for other * events we check all preceding block rects too to make * arrow keys navigation work */ - if (event->type!=MOUSEMOVE || saferct==block->saferct.first) { + if (event->type != MOUSEMOVE || saferct == block->saferct.first) { if (BLI_in_rctf(&saferct->parent, (float)event->x, (float)event->y)) break; if (BLI_in_rctf(&saferct->safety, (float)event->x, (float)event->y)) @@ -6263,12 +6265,12 @@ static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle /* strict check, and include the parent rect */ if (!menu->dotowards && !saferct) { if (block->flag & (UI_BLOCK_OUT_1)) - menu->menuretval= UI_RETURN_OK; + menu->menuretval = UI_RETURN_OK; else - menu->menuretval= UI_RETURN_OUT; + menu->menuretval = UI_RETURN_OUT; } - else if (menu->dotowards && event->type==MOUSEMOVE) - retval= WM_UI_HANDLER_BREAK; + else if (menu->dotowards && event->type == MOUSEMOVE) + retval = WM_UI_HANDLER_BREAK; } } } @@ -6279,22 +6281,22 @@ static int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle * anymore why it was there? but it meant enter didn't work * for example when mouse was not over submenu */ if ((/*inside &&*/ (!menu->menuretval || (menu->menuretval & UI_RETURN_UPDATE)) && retval == WM_UI_HANDLER_CONTINUE) || event->type == TIMER) { - but= ui_but_find_activated(ar); + but = ui_but_find_activated(ar); if (but) { - ScrArea *ctx_area= CTX_wm_area(C); - ARegion *ctx_region= CTX_wm_region(C); + ScrArea *ctx_area = CTX_wm_area(C); + ARegion *ctx_region = CTX_wm_region(C); if (menu->ctx_area) CTX_wm_area_set(C, menu->ctx_area); if (menu->ctx_region) CTX_wm_region_set(C, menu->ctx_region); - retval= ui_handle_button_event(C, event, but); + retval = ui_handle_button_event(C, event, but); if (menu->ctx_area) CTX_wm_area_set(C, ctx_area); if (menu->ctx_region) CTX_wm_region_set(C, ctx_region); } else - retval= ui_handle_button_over(C, event, ar); + retval = ui_handle_button_over(C, event, ar); } /* if we set a menu return value, ensure we continue passing this on to @@ -6317,24 +6319,24 @@ static int ui_handle_menu_return_submenu(bContext *C, wmEvent *event, uiPopupBlo uiPopupBlockHandle *submenu; int mx, my, update; - ar= menu->region; - block= ar->uiblocks.first; + ar = menu->region; + block = ar->uiblocks.first; - but= ui_but_find_activated(ar); - data= but->active; - submenu= data->menu; + but = ui_but_find_activated(ar); + data = but->active; + submenu = data->menu; if (submenu->menuretval) { /* first decide if we want to close our own menu cascading, if * so pass on the sub menu return value to our own menu handle */ if ((submenu->menuretval & UI_RETURN_OK) || (submenu->menuretval & UI_RETURN_CANCEL)) { if (!(block->flag & UI_BLOCK_KEEP_OPEN)) { - menu->menuretval= submenu->menuretval; - menu->butretval= data->retval; + menu->menuretval = submenu->menuretval; + menu->butretval = data->retval; } } - update= (submenu->menuretval & UI_RETURN_UPDATE); + update = (submenu->menuretval & UI_RETURN_UPDATE); /* now let activated button in this menu exit, which * will actually close the submenu too */ @@ -6346,8 +6348,8 @@ static int ui_handle_menu_return_submenu(bContext *C, wmEvent *event, uiPopupBlo /* for cases where close does not cascade, allow the user to * move the mouse back towards the menu without closing */ - mx= event->x; - my= event->y; + mx = event->x; + my = event->y; ui_window_to_block(ar, block, &mx, &my); ui_mouse_motion_towards_init(menu, mx, my, 1); @@ -6362,22 +6364,22 @@ static int ui_handle_menus_recursive(bContext *C, wmEvent *event, uiPopupBlockHa uiBut *but; uiHandleButtonData *data; uiPopupBlockHandle *submenu; - int retval= WM_UI_HANDLER_CONTINUE; + int retval = WM_UI_HANDLER_CONTINUE; /* check if we have a submenu, and handle events for it first */ - but= ui_but_find_activated(menu->region); - data= (but)? but->active: NULL; - submenu= (data)? data->menu: NULL; + but = ui_but_find_activated(menu->region); + data = (but) ? but->active : NULL; + submenu = (data) ? data->menu : NULL; if (submenu) - retval= ui_handle_menus_recursive(C, event, submenu); + retval = ui_handle_menus_recursive(C, event, submenu); /* now handle events for our own menu */ if (retval == WM_UI_HANDLER_CONTINUE || event->type == TIMER) { if (submenu && submenu->menuretval) - retval= ui_handle_menu_return_submenu(C, event, menu); + retval = ui_handle_menu_return_submenu(C, event, menu); else - retval= ui_handle_menu_event(C, event, menu, (submenu == NULL)); + retval = ui_handle_menu_event(C, event, menu, (submenu == NULL)); } return retval; @@ -6392,29 +6394,29 @@ static int ui_handler_region(bContext *C, wmEvent *event, void *UNUSED(userdata) int retval; /* here we handle buttons at the region level, non-modal */ - ar= CTX_wm_region(C); - retval= WM_UI_HANDLER_CONTINUE; + ar = CTX_wm_region(C); + retval = WM_UI_HANDLER_CONTINUE; - if (ar==NULL) return retval; - if (ar->uiblocks.first==NULL) return retval; + if (ar == NULL) return retval; + if (ar->uiblocks.first == NULL) return retval; /* either handle events for already activated button or try to activate */ - but= ui_but_find_activated(ar); + but = ui_but_find_activated(ar); - retval= ui_handler_panel_region(C, event); + retval = ui_handler_panel_region(C, event); if (retval == WM_UI_HANDLER_CONTINUE) - retval= ui_handle_list_event(C, event, ar); + retval = ui_handle_list_event(C, event, ar); if (retval == WM_UI_HANDLER_CONTINUE) { if (but) - retval= ui_handle_button_event(C, event, but); + retval = ui_handle_button_event(C, event, but); else - retval= ui_handle_button_over(C, event, ar); + retval = ui_handle_button_over(C, event, ar); } /* re-enable tooltips */ - if (event->type == MOUSEMOVE && (event->x!=event->prevx || event->y!=event->prevy)) + if (event->type == MOUSEMOVE && (event->x != event->prevx || event->y != event->prevy)) ui_blocks_set_tooltips(ar, 1); /* delayed apply callbacks */ @@ -6428,12 +6430,12 @@ static void ui_handler_remove_region(bContext *C, void *UNUSED(userdata)) bScreen *sc; ARegion *ar; - ar= CTX_wm_region(C); + ar = CTX_wm_region(C); if (ar == NULL) return; uiFreeBlocks(C, &ar->uiblocks); - sc= CTX_wm_screen(C); + sc = CTX_wm_screen(C); if (sc == NULL) return; /* delayed apply callbacks, but not for screen level regions, those @@ -6452,20 +6454,20 @@ static int ui_handler_region_menu(bContext *C, wmEvent *event, void *UNUSED(user /* here we handle buttons at the window level, modal, for example * while number sliding, text editing, or when a menu block is open */ - ar= CTX_wm_menu(C); + ar = CTX_wm_menu(C); if (!ar) - ar= CTX_wm_region(C); + ar = CTX_wm_region(C); - but= ui_but_find_activated(ar); + but = ui_but_find_activated(ar); if (but) { /* handle activated button events */ - data= but->active; + data = but->active; if (data->state == BUTTON_STATE_MENU_OPEN) { /* handle events for menus and their buttons recursively, * this will handle events from the top to the bottom menu */ - retval= ui_handle_menus_recursive(C, event, data->menu); + retval = ui_handle_menus_recursive(C, event, data->menu); /* handle events for the activated button */ if (retval == WM_UI_HANDLER_CONTINUE || event->type == TIMER) { @@ -6482,7 +6484,7 @@ static int ui_handler_region_menu(bContext *C, wmEvent *event, void *UNUSED(user } /* re-enable tooltips */ - if (event->type == MOUSEMOVE && (event->x!=event->prevx || event->y!=event->prevy)) + if (event->type == MOUSEMOVE && (event->x != event->prevx || event->y != event->prevy)) ui_blocks_set_tooltips(ar, 1); /* delayed apply callbacks */ @@ -6495,14 +6497,14 @@ static int ui_handler_region_menu(bContext *C, wmEvent *event, void *UNUSED(user /* two types of popups, one with operator + enum, other with regular callbacks */ static int ui_handler_popup(bContext *C, wmEvent *event, void *userdata) { - uiPopupBlockHandle *menu= userdata; + uiPopupBlockHandle *menu = userdata; ui_handle_menus_recursive(C, event, menu); /* free if done, does not free handle itself */ if (menu->menuretval) { /* copy values, we have to free first (closes region) */ - uiPopupBlockHandle temp= *menu; + uiPopupBlockHandle temp = *menu; ui_popup_block_free(C, menu); UI_remove_popup_handlers(&CTX_wm_window(C)->modalhandlers, menu); @@ -6518,7 +6520,7 @@ static int ui_handler_popup(bContext *C, wmEvent *event, void *userdata) } else { /* re-enable tooltips */ - if (event->type == MOUSEMOVE && (event->x!=event->prevx || event->y!=event->prevy)) + if (event->type == MOUSEMOVE && (event->x != event->prevx || event->y != event->prevy)) ui_blocks_set_tooltips(menu->region, 1); } @@ -6531,7 +6533,7 @@ static int ui_handler_popup(bContext *C, wmEvent *event, void *userdata) static void ui_handler_remove_popup(bContext *C, void *userdata) { - uiPopupBlockHandle *menu= userdata; + uiPopupBlockHandle *menu = userdata; /* free menu block if window is closed for some reason */ ui_popup_block_free(C, menu); diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index 4b5612c6408..24881c034f4 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -75,15 +75,15 @@ #include "interface_intern.h" -#define ICON_IMAGE_W 600 -#define ICON_IMAGE_H 640 +#define ICON_IMAGE_W 600 +#define ICON_IMAGE_H 640 -#define ICON_GRID_COLS 26 -#define ICON_GRID_ROWS 30 +#define ICON_GRID_COLS 26 +#define ICON_GRID_ROWS 30 -#define ICON_GRID_MARGIN 5 -#define ICON_GRID_W 16 -#define ICON_GRID_H 16 +#define ICON_GRID_MARGIN 5 +#define ICON_GRID_W 16 +#define ICON_GRID_H 16 typedef struct IconImage { int w; @@ -93,10 +93,10 @@ typedef struct IconImage { typedef void (*VectorDrawFunc)(int x, int y, int w, int h, float alpha); -#define ICON_TYPE_PREVIEW 0 -#define ICON_TYPE_TEXTURE 1 -#define ICON_TYPE_BUFFER 2 -#define ICON_TYPE_VECTOR 3 +#define ICON_TYPE_PREVIEW 0 +#define ICON_TYPE_TEXTURE 1 +#define ICON_TYPE_BUFFER 2 +#define ICON_TYPE_VECTOR 3 typedef struct DrawInfo { int type; @@ -107,7 +107,7 @@ typedef struct DrawInfo { VectorDrawFunc func; } vector; struct { - IconImage* image; + IconImage *image; } buffer; struct { int x, y, w, h; @@ -145,24 +145,24 @@ static void def_internal_icon(ImBuf *bbuf, int icon_id, int xofs, int yofs, int new_icon->type = 0; di = MEM_callocN(sizeof(DrawInfo), "drawinfo"); - di->type= type; + di->type = type; if (type == ICON_TYPE_TEXTURE) { - di->data.texture.x= xofs; - di->data.texture.y= yofs; - di->data.texture.w= size; - di->data.texture.h= size; + di->data.texture.x = xofs; + di->data.texture.y = yofs; + di->data.texture.w = size; + di->data.texture.h = size; } else if (type == ICON_TYPE_BUFFER) { iimg = MEM_mallocN(sizeof(IconImage), "icon_img"); - iimg->rect = MEM_mallocN(size*size*sizeof(unsigned int), "icon_rect"); + iimg->rect = MEM_mallocN(size * size * sizeof(unsigned int), "icon_rect"); iimg->w = size; iimg->h = size; /* Here we store the rect in the icon - same as before */ imgsize = bbuf->x; - for (y=0; yrect[y*size], &bbuf->rect[(y+yofs)*imgsize+xofs], size*sizeof(int)); + for (y = 0; y < size; y++) { + memcpy(&iimg->rect[y * size], &bbuf->rect[(y + yofs) * imgsize + xofs], size * sizeof(int)); } di->data.buffer.image = iimg; @@ -174,10 +174,10 @@ static void def_internal_icon(ImBuf *bbuf, int icon_id, int xofs, int yofs, int BKE_icon_set(icon_id, new_icon); } -static void def_internal_vicon( int icon_id, VectorDrawFunc drawFunc) +static void def_internal_vicon(int icon_id, VectorDrawFunc drawFunc) { Icon *new_icon = NULL; - DrawInfo* di; + DrawInfo *di; new_icon = MEM_callocN(sizeof(Icon), "texicon"); @@ -185,7 +185,7 @@ static void def_internal_vicon( int icon_id, VectorDrawFunc drawFunc) new_icon->type = 0; di = MEM_callocN(sizeof(DrawInfo), "drawinfo"); - di->type= ICON_TYPE_VECTOR; + di->type = ICON_TYPE_VECTOR; di->data.vector.func = drawFunc; new_icon->drawinfo_free = NULL; @@ -196,7 +196,7 @@ static void def_internal_vicon( int icon_id, VectorDrawFunc drawFunc) /* Vector Icon Drawing Routines */ - /* Utilities */ +/* Utilities */ static void viconutil_set_point(GLint pt[2], int x, int y) { @@ -204,7 +204,7 @@ static void viconutil_set_point(GLint pt[2], int x, int y) pt[1] = y; } -static void viconutil_draw_tri(GLint (*pts)[2]) +static void viconutil_draw_tri(GLint(*pts)[2]) { glBegin(GL_TRIANGLES); glVertex2iv(pts[0]); @@ -213,41 +213,41 @@ static void viconutil_draw_tri(GLint (*pts)[2]) glEnd(); } -static void viconutil_draw_lineloop(GLint (*pts)[2], int numPoints) +static void viconutil_draw_lineloop(GLint(*pts)[2], int numPoints) { int i; glBegin(GL_LINE_LOOP); - for (i=0; i"); \ - def_internal_icon(bbuf, icon_id, 0, 0, w, ICON_TYPE_BUFFER); \ - IMB_freeImBuf(bbuf); - // end INIT_BRUSH_ICON +#define INIT_BRUSH_ICON(icon_id, name) \ + { \ + bbuf = IMB_ibImageFromMemory((unsigned char *)datatoc_ ##name## _png, \ + datatoc_ ##name## _png_size, \ + IB_rect, ""); \ + def_internal_icon(bbuf, icon_id, 0, 0, w, ICON_TYPE_BUFFER); \ + IMB_freeImBuf(bbuf); \ + } (void)0 + /* end INIT_BRUSH_ICON */ ImBuf *bbuf; const int w = 96; @@ -507,34 +510,34 @@ static void init_brush_icons(void) static void init_internal_icons(void) { - bTheme *btheme= UI_GetTheme(); - ImBuf *bbuf= NULL; + bTheme *btheme = UI_GetTheme(); + ImBuf *bbuf = NULL; int x, y, icontype; char iconfilestr[FILE_MAX]; - if ((btheme!=NULL) && btheme->tui.iconfile[0]) { - char *icondir= BLI_get_folder(BLENDER_DATAFILES, "icons"); + if ((btheme != NULL) && btheme->tui.iconfile[0]) { + char *icondir = BLI_get_folder(BLENDER_DATAFILES, "icons"); if (icondir) { BLI_join_dirfile(iconfilestr, sizeof(iconfilestr), icondir, btheme->tui.iconfile); bbuf = IMB_loadiffname(iconfilestr, IB_rect); /* if the image is missing bbuf will just be NULL */ if (bbuf && (bbuf->x < ICON_IMAGE_W || bbuf->y < ICON_IMAGE_H)) { printf("\n***WARNING***\nIcons file %s too small.\nUsing built-in Icons instead\n", iconfilestr); IMB_freeImBuf(bbuf); - bbuf= NULL; + bbuf = NULL; } } else { printf("%s: 'icons' data path not found, continuing\n", __func__); } } - if (bbuf==NULL) - bbuf = IMB_ibImageFromMemory((unsigned char*)datatoc_blender_icons_png, datatoc_blender_icons_png_size, IB_rect, ""); + if (bbuf == NULL) + bbuf = IMB_ibImageFromMemory((unsigned char *)datatoc_blender_icons_png, datatoc_blender_icons_png_size, IB_rect, ""); if (bbuf) { /* free existing texture if any */ if (icongltex.id) { glDeleteTextures(1, &icongltex.id); - icongltex.id= 0; + icongltex.id = 0; } /* we only use a texture for cards with non-power of two */ @@ -544,8 +547,8 @@ static void init_internal_icons(void) if (icongltex.id) { icongltex.w = bbuf->x; icongltex.h = bbuf->y; - icongltex.invw = 1.0f/bbuf->x; - icongltex.invh = 1.0f/bbuf->y; + icongltex.invw = 1.0f / bbuf->x; + icongltex.invh = 1.0f / bbuf->y; glBindTexture(GL_TEXTURE_2D, icongltex.id); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, bbuf->x, bbuf->y, 0, GL_RGBA, GL_UNSIGNED_BYTE, bbuf->rect); @@ -555,24 +558,24 @@ static void init_internal_icons(void) if (glGetError() == GL_OUT_OF_MEMORY) { glDeleteTextures(1, &icongltex.id); - icongltex.id= 0; + icongltex.id = 0; } } } } if (icongltex.id) - icontype= ICON_TYPE_TEXTURE; + icontype = ICON_TYPE_TEXTURE; else - icontype= ICON_TYPE_BUFFER; + icontype = ICON_TYPE_BUFFER; if (bbuf) { - for (y=0; yfirst = list->last = NULL; icondir = BLI_get_folder(BLENDER_DATAFILES, "icons"); - if (icondir==NULL) + if (icondir == NULL) return; /* since BLI_dir_contents changes the current working directory, restore it @@ -614,7 +617,7 @@ static void init_iconfile_list(struct ListBase *list) totfile = BLI_dir_contents(icondir, &dir); if (restoredir && !chdir(olddir)) {} /* fix warning about checking return value */ - for (i=0; ix; @@ -637,7 +640,7 @@ static void init_iconfile_list(struct ListBase *list) IMB_freeImBuf(bbuf); } else { - ifilex= ifiley= 0; + ifilex = ifiley = 0; } /* bad size or failed to load */ @@ -645,7 +648,7 @@ static void init_iconfile_list(struct ListBase *list) printf("icon '%s' is wrong size %dx%d\n", iconfilestr, ifilex, ifiley); continue; } -#endif /* removed */ +#endif /* removed */ /* found a potential icon file, so make an entry for it in the cache list */ ifile = MEM_callocN(sizeof(IconFile), "IconFile"); @@ -661,9 +664,9 @@ static void init_iconfile_list(struct ListBase *list) } /* free temporary direntry structure that's been created by BLI_dir_contents() */ - i= totfile-1; + i = totfile - 1; - for (; i>=0; i--) { + for (; i >= 0; i--) { MEM_freeN(dir[i].relname); MEM_freeN(dir[i].path); if (dir[i].string) { @@ -671,14 +674,14 @@ static void init_iconfile_list(struct ListBase *list) } } free(dir); - dir= NULL; + dir = NULL; } static void free_iconfile_list(struct ListBase *list) { - IconFile *ifile=NULL, *next_ifile=NULL; + IconFile *ifile = NULL, *next_ifile = NULL; - for (ifile=list->first; ifile; ifile=next_ifile) { + for (ifile = list->first; ifile; ifile = next_ifile) { next_ifile = ifile->next; BLI_freelinkN(list, ifile); } @@ -687,9 +690,9 @@ static void free_iconfile_list(struct ListBase *list) int UI_iconfile_get_index(const char *filename) { IconFile *ifile; - ListBase *list=&(iconfilelist); + ListBase *list = &(iconfilelist); - for (ifile=list->first; ifile; ifile=ifile->next) { + for (ifile = list->first; ifile; ifile = ifile->next) { if (BLI_path_cmp(filename, ifile->filename) == 0) { return ifile->index; } @@ -700,7 +703,7 @@ int UI_iconfile_get_index(const char *filename) ListBase *UI_iconfile_list(void) { - ListBase *list=&(iconfilelist); + ListBase *list = &(iconfilelist); return list; } @@ -711,7 +714,7 @@ void UI_icons_free(void) #ifndef WITH_HEADLESS if (icongltex.id) { glDeleteTextures(1, &icongltex.id); - icongltex.id= 0; + icongltex.id = 0; } free_iconfile_list(&iconfilelist); @@ -740,7 +743,7 @@ static DrawInfo *icon_create_drawinfo(void) DrawInfo *di = NULL; di = MEM_callocN(sizeof(DrawInfo), "di_icon"); - di->type= ICON_TYPE_PREVIEW; + di->type = ICON_TYPE_PREVIEW; return di; } @@ -753,7 +756,7 @@ int UI_icon_get_width(int icon_id) icon = BKE_icon_get(icon_id); - if (icon==NULL) { + if (icon == NULL) { if (G.f & G_DEBUG) printf("%s: Internal error, no icon for icon ID: %d\n", __func__, icon_id); return 0; @@ -778,13 +781,13 @@ int UI_icon_get_height(int icon_id) icon = BKE_icon_get(icon_id); - if (icon==NULL) { + if (icon == NULL) { if (G.f & G_DEBUG) printf("%s: Internal error, no icon for icon ID: %d\n", __func__, icon_id); return 0; } - di = (DrawInfo*)icon->drawinfo; + di = (DrawInfo *)icon->drawinfo; if (!di) { di = icon_create_drawinfo(); @@ -814,7 +817,7 @@ void UI_icons_init(int first_dyn_id) static int preview_render_size(enum eIconSizes size) { switch (size) { - case ICON_SIZE_ICON: return 32; + case ICON_SIZE_ICON: return 32; case ICON_SIZE_PREVIEW: return PREVIEW_DEFAULT_HEIGHT; } return 0; @@ -822,7 +825,7 @@ static int preview_render_size(enum eIconSizes size) /* Create rect for the icon */ -static void icon_create_rect(struct PreviewImage* prv_img, enum eIconSizes size) +static void icon_create_rect(struct PreviewImage *prv_img, enum eIconSizes size) { unsigned int render_size = preview_render_size(size); @@ -835,13 +838,13 @@ static void icon_create_rect(struct PreviewImage* prv_img, enum eIconSizes size) prv_img->h[size] = render_size; prv_img->changed[size] = 1; prv_img->changed_timestamp[size] = 0; - prv_img->rect[size] = MEM_callocN(render_size*render_size*sizeof(unsigned int), "prv_rect"); + prv_img->rect[size] = MEM_callocN(render_size * render_size * sizeof(unsigned int), "prv_rect"); } } /* only called when icon has changed */ /* only call with valid pointer from UI_icon_draw */ -static void icon_set_image(bContext *C, ID *id, PreviewImage* prv_img, enum eIconSizes size) +static void icon_set_image(bContext *C, ID *id, PreviewImage *prv_img, enum eIconSizes size) { if (!prv_img) { if (G.f & G_DEBUG) @@ -852,15 +855,15 @@ static void icon_set_image(bContext *C, ID *id, PreviewImage* prv_img, enum eIco icon_create_rect(prv_img, size); ED_preview_icon_job(C, prv_img, id, prv_img->rect[size], - prv_img->w[size], prv_img->h[size]); + prv_img->w[size], prv_img->h[size]); } static void icon_draw_rect(float x, float y, int w, int h, float UNUSED(aspect), int rw, int rh, unsigned int *rect, float alpha, float *rgb, short is_preview) { - ImBuf *ima= NULL; + ImBuf *ima = NULL; /* sanity check */ - if (w<=0 || h<=0 || w>2000 || h>2000) { + if (w <= 0 || h <= 0 || w > 2000 || h > 2000) { printf("%s: icons are %i x %i pixels?\n", __func__, w, h); BLI_assert(!"invalid icon size"); return; @@ -877,12 +880,12 @@ static void icon_draw_rect(float x, float y, int w, int h, float UNUSED(aspect), } /* rect contains image in 'rendersize', we only scale if needed */ - if (rw!=w && rh!=h) { + if (rw != w && rh != h) { /* first allocate imbuf for scaling and copy preview into it */ ima = IMB_allocImBuf(rw, rh, 32, IB_rect); - memcpy(ima->rect, rect, rw*rh*sizeof(unsigned int)); + memcpy(ima->rect, rect, rw * rh * sizeof(unsigned int)); IMB_scaleImBuf(ima, w, h); /* scale it */ - rect= ima->rect; + rect = ima->rect; } /* draw */ @@ -915,10 +918,10 @@ static void icon_draw_texture(float x, float y, float w, float h, int ix, int iy if (rgb) glColor4f(rgb[0], rgb[1], rgb[2], alpha); else glColor4f(1.0f, 1.0f, 1.0f, alpha); - x1= ix*icongltex.invw; - x2= (ix + ih)*icongltex.invw; - y1= iy*icongltex.invh; - y2= (iy + ih)*icongltex.invh; + x1 = ix * icongltex.invw; + x2 = (ix + ih) * icongltex.invw; + y1 = iy * icongltex.invh; + y2 = (iy + ih) * icongltex.invh; glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, icongltex.id); @@ -928,13 +931,13 @@ static void icon_draw_texture(float x, float y, float w, float h, int ix, int iy glVertex2f(x, y); glTexCoord2f(x2, y1); - glVertex2f(x+w, y); + glVertex2f(x + w, y); glTexCoord2f(x2, y2); - glVertex2f(x+w, y+h); + glVertex2f(x + w, y + h); glTexCoord2f(x1, y2); - glVertex2f(x, y+h); + glVertex2f(x, y + h); glEnd(); glBindTexture(GL_TEXTURE_2D, 0); @@ -953,23 +956,23 @@ static int get_draw_size(enum eIconSizes size) static void icon_draw_size(float x, float y, int icon_id, float aspect, float alpha, float *rgb, enum eIconSizes size, int draw_size, int UNUSED(nocreate), short is_preview) { - bTheme *btheme= UI_GetTheme(); + bTheme *btheme = UI_GetTheme(); Icon *icon = NULL; DrawInfo *di = NULL; IconImage *iimg; - float fdraw_size= is_preview ? draw_size : (draw_size * UI_DPI_ICON_FAC); + float fdraw_size = is_preview ? draw_size : (draw_size * UI_DPI_ICON_FAC); int w, h; icon = BKE_icon_get(icon_id); alpha *= btheme->tui.icon_alpha; - if (icon==NULL) { + if (icon == NULL) { if (G.f & G_DEBUG) printf("%s: Internal error, no icon for icon ID: %d\n", __func__, icon_id); return; } - di = (DrawInfo*)icon->drawinfo; + di = (DrawInfo *)icon->drawinfo; if (!di) { di = icon_create_drawinfo(); @@ -979,8 +982,8 @@ static void icon_draw_size(float x, float y, int icon_id, float aspect, float al } /* scale width and height according to aspect */ - w = (int)(fdraw_size/aspect + 0.5f); - h = (int)(fdraw_size/aspect + 0.5f); + w = (int)(fdraw_size / aspect + 0.5f); + h = (int)(fdraw_size / aspect + 0.5f); if (di->type == ICON_TYPE_VECTOR) { /* vector icons use the uiBlock transformation, they are not drawn @@ -989,22 +992,22 @@ static void icon_draw_size(float x, float y, int icon_id, float aspect, float al } else if (di->type == ICON_TYPE_TEXTURE) { icon_draw_texture(x, y, (float)w, (float)h, di->data.texture.x, di->data.texture.y, - di->data.texture.w, di->data.texture.h, alpha, rgb); + di->data.texture.w, di->data.texture.h, alpha, rgb); } else if (di->type == ICON_TYPE_BUFFER) { /* it is a builtin icon */ - iimg= di->data.buffer.image; + iimg = di->data.buffer.image; - if (!iimg->rect) return; /* something has gone wrong! */ + if (!iimg->rect) return; /* something has gone wrong! */ icon_draw_rect(x, y, w, h, aspect, iimg->w, iimg->h, iimg->rect, alpha, rgb, is_preview); } else if (di->type == ICON_TYPE_PREVIEW) { - PreviewImage* pi = BKE_previewimg_get((ID*)icon->obj); + PreviewImage *pi = BKE_previewimg_get((ID *)icon->obj); if (pi) { /* no create icon on this level in code */ - if (!pi->rect[size]) return; /* something has gone wrong! */ + if (!pi->rect[size]) return; /* something has gone wrong! */ /* preview images use premul alpha ... */ glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); @@ -1016,7 +1019,7 @@ static void icon_draw_size(float x, float y, int icon_id, float aspect, float al static void ui_id_preview_image_render_size(bContext *C, ID *id, PreviewImage *pi, int size) { - if ((pi->changed[size] ||!pi->rect[size])) { /* changed only ever set by dynamic icons */ + if ((pi->changed[size] || !pi->rect[size])) { /* changed only ever set by dynamic icons */ /* create the rect if necessary */ icon_set_image(C, id, pi, size); @@ -1030,9 +1033,9 @@ static void ui_id_icon_render(bContext *C, ID *id, int big) if (pi) { if (big) - ui_id_preview_image_render_size(C, id, pi, ICON_SIZE_PREVIEW); /* bigger preview size */ + ui_id_preview_image_render_size(C, id, pi, ICON_SIZE_PREVIEW); /* bigger preview size */ else - ui_id_preview_image_render_size(C, id, pi, ICON_SIZE_ICON); /* icon size */ + ui_id_preview_image_render_size(C, id, pi, ICON_SIZE_ICON); /* icon size */ } } @@ -1057,7 +1060,7 @@ static void ui_id_brush_render(bContext *C, ID *id) static int ui_id_brush_get_icon(bContext *C, ID *id) { - Brush *br = (Brush*)id; + Brush *br = (Brush *)id; if (br->flag & BRUSH_CUSTOM_ICON) { BKE_icon_getid(id); @@ -1076,13 +1079,14 @@ static int ui_id_brush_get_icon(bContext *C, ID *id) if (CTX_wm_view3d(C) && ob) { if (ob->mode & OB_MODE_SCULPT) mode = OB_MODE_SCULPT; - else if (ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT)) + else if (ob->mode & (OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT)) mode = OB_MODE_VERTEX_PAINT; else if (ob->mode & OB_MODE_TEXTURE_PAINT) mode = OB_MODE_TEXTURE_PAINT; } else if ((sima = CTX_wm_space_image(C)) && - (sima->flag & SI_DRAWTOOL)) { + (sima->flag & SI_DRAWTOOL)) + { mode = OB_MODE_TEXTURE_PAINT; } @@ -1109,19 +1113,19 @@ static int ui_id_brush_get_icon(bContext *C, ID *id) int ui_id_icon_get(bContext *C, ID *id, int big) { - int iconid= 0; + int iconid = 0; /* icon */ - switch(GS(id->name)) { + switch (GS(id->name)) { case ID_BR: - iconid= ui_id_brush_get_icon(C, id); + iconid = ui_id_brush_get_icon(C, id); break; case ID_MA: /* fall through */ case ID_TE: /* fall through */ case ID_IM: /* fall through */ case ID_WO: /* fall through */ case ID_LA: /* fall through */ - iconid= BKE_icon_getid(id); + iconid = BKE_icon_getid(id); /* checks if not exists, or changed */ ui_id_icon_render(C, id, big); break; diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 88db06c5ec3..91e38e7d914 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -60,11 +60,11 @@ /************************ Structs and Defines *************************/ -#define RNA_NO_INDEX -1 -#define RNA_ENUM_VALUE -2 +#define RNA_NO_INDEX -1 +#define RNA_ENUM_VALUE -2 -#define EM_SEPR_X 6 -#define EM_SEPR_Y 6 +#define EM_SEPR_X 6 +#define EM_SEPR_Y 6 #define UI_OPERATOR_ERROR_RET(_ot, _opname, return_statement) \ if (ot == NULL) { \ @@ -170,12 +170,12 @@ typedef struct uiLayoutItemRoot { static const char *ui_item_name_add_colon(const char *name, char namestr[UI_MAX_NAME_STR]) { - int len= strlen(name); + int len = strlen(name); - if (len != 0 && len+1 < UI_MAX_NAME_STR) { + if (len != 0 && len + 1 < UI_MAX_NAME_STR) { BLI_strncpy(namestr, name, UI_MAX_NAME_STR); - namestr[len]= ':'; - namestr[len+1]= '\0'; + namestr[len] = ':'; + namestr[len + 1] = '\0'; return namestr; } @@ -189,22 +189,22 @@ static int ui_item_fit(int item, int pos, int all, int available, int last, int return item; if (offset) - *offset= 0; + *offset = 0; if (all > available) { /* contents is bigger than available space */ if (last) - return available-pos; + return available - pos; else - return (item*available)/all; + return (item * available) / all; } else { /* contents is smaller or equal to available space */ if (alignment == UI_LAYOUT_ALIGN_EXPAND) { if (last) - return available-pos; + return available - pos; else - return (item*available)/all; + return (item * available) / all; } else return item; @@ -212,12 +212,12 @@ static int ui_item_fit(int item, int pos, int all, int available, int last, int } /* variable button size in which direction? */ -#define UI_ITEM_VARY_X 1 -#define UI_ITEM_VARY_Y 2 +#define UI_ITEM_VARY_X 1 +#define UI_ITEM_VARY_Y 2 static int ui_layout_vary_direction(uiLayout *layout) { - return (layout->root->type == UI_LAYOUT_HEADER || layout->alignment != UI_LAYOUT_ALIGN_EXPAND)? UI_ITEM_VARY_X: UI_ITEM_VARY_Y; + return (layout->root->type == UI_LAYOUT_HEADER || layout->alignment != UI_LAYOUT_ALIGN_EXPAND) ? UI_ITEM_VARY_X : UI_ITEM_VARY_Y; } /* estimated size of text + icon */ @@ -226,62 +226,62 @@ static int ui_text_icon_width(uiLayout *layout, const char *name, int icon, int int variable = ui_layout_vary_direction(layout) == UI_ITEM_VARY_X; if (icon && !name[0]) - return UI_UNIT_X; /* icon only */ + return UI_UNIT_X; /* icon only */ else if (icon) - return (variable)? UI_GetStringWidth(name) + (compact? 5: 10) + UI_UNIT_X: 10*UI_UNIT_X; /* icon + text */ + return (variable) ? UI_GetStringWidth(name) + (compact ? 5 : 10) + UI_UNIT_X : 10 * UI_UNIT_X; /* icon + text */ else - return (variable)? UI_GetStringWidth(name) + (compact? 5: 10) + UI_UNIT_X: 10*UI_UNIT_X; /* text only */ + return (variable) ? UI_GetStringWidth(name) + (compact ? 5 : 10) + UI_UNIT_X : 10 * UI_UNIT_X; /* text only */ } static void ui_item_size(uiItem *item, int *r_w, int *r_h) { if (item->type == ITEM_BUTTON) { - uiButtonItem *bitem= (uiButtonItem*)item; + uiButtonItem *bitem = (uiButtonItem *)item; - if (r_w) *r_w= bitem->but->x2 - bitem->but->x1; - if (r_h) *r_h= bitem->but->y2 - bitem->but->y1; + if (r_w) *r_w = bitem->but->x2 - bitem->but->x1; + if (r_h) *r_h = bitem->but->y2 - bitem->but->y1; } else { - uiLayout *litem= (uiLayout*)item; + uiLayout *litem = (uiLayout *)item; - if (r_w) *r_w= litem->w; - if (r_h) *r_h= litem->h; + if (r_w) *r_w = litem->w; + if (r_h) *r_h = litem->h; } } static void ui_item_offset(uiItem *item, int *r_x, int *r_y) { if (item->type == ITEM_BUTTON) { - uiButtonItem *bitem= (uiButtonItem*)item; + uiButtonItem *bitem = (uiButtonItem *)item; - if (r_x) *r_x= bitem->but->x1; - if (r_y) *r_y= bitem->but->y1; + if (r_x) *r_x = bitem->but->x1; + if (r_y) *r_y = bitem->but->y1; } else { - if (r_x) *r_x= 0; - if (r_y) *r_y= 0; + if (r_x) *r_x = 0; + if (r_y) *r_y = 0; } } static void ui_item_position(uiItem *item, int x, int y, int w, int h) { if (item->type == ITEM_BUTTON) { - uiButtonItem *bitem= (uiButtonItem*)item; + uiButtonItem *bitem = (uiButtonItem *)item; - bitem->but->x1= x; - bitem->but->y1= y; - bitem->but->x2= x+w; - bitem->but->y2= y+h; + bitem->but->x1 = x; + bitem->but->y1 = y; + bitem->but->x2 = x + w; + bitem->but->y2 = y + h; ui_check_but(bitem->but); /* for strlen */ } else { - uiLayout *litem= (uiLayout*)item; + uiLayout *litem = (uiLayout *)item; - litem->x= x; - litem->y= y+h; - litem->w= w; - litem->h= h; + litem->x = x; + litem->y = y + h; + litem->w = w; + litem->h = h; } } @@ -289,7 +289,7 @@ static void ui_item_position(uiItem *item, int x, int y, int w, int h) static int ui_layout_local_dir(uiLayout *layout) { - switch(layout->item.type) { + switch (layout->item.type) { case ITEM_LAYOUT_ROW: case ITEM_LAYOUT_ROOT: case ITEM_LAYOUT_OVERLAP: @@ -309,34 +309,34 @@ static uiLayout *ui_item_local_sublayout(uiLayout *test, uiLayout *layout, int a uiLayout *sub; if (ui_layout_local_dir(test) == UI_LAYOUT_HORIZONTAL) - sub= uiLayoutRow(layout, align); + sub = uiLayoutRow(layout, align); else - sub= uiLayoutColumn(layout, align); + sub = uiLayoutColumn(layout, align); - sub->space= 0; + sub->space = 0; return sub; } static void ui_layer_but_cb(bContext *C, void *arg_but, void *arg_index) { - wmWindow *win= CTX_wm_window(C); - uiBut *but= arg_but, *cbut; - PointerRNA *ptr= &but->rnapoin; - PropertyRNA *prop= but->rnaprop; - int i, index= GET_INT_FROM_POINTER(arg_index); - int shift= win->eventstate->shift; - int len= RNA_property_array_length(ptr, prop); + wmWindow *win = CTX_wm_window(C); + uiBut *but = arg_but, *cbut; + PointerRNA *ptr = &but->rnapoin; + PropertyRNA *prop = but->rnaprop; + int i, index = GET_INT_FROM_POINTER(arg_index); + int shift = win->eventstate->shift; + int len = RNA_property_array_length(ptr, prop); if (!shift) { RNA_property_boolean_set_index(ptr, prop, index, TRUE); - for (i=0; iblock->buttons.first; cbut; cbut=cbut->next) + for (cbut = but->block->buttons.first; cbut; cbut = cbut->next) ui_check_but(cbut); } } @@ -344,7 +344,7 @@ static void ui_layer_but_cb(bContext *C, void *arg_but, void *arg_index) /* create buttons for an item with an RNA array */ static void ui_item_array(uiLayout *layout, uiBlock *block, const char *name, int icon, PointerRNA *ptr, PropertyRNA *prop, int len, int x, int y, int w, int UNUSED(h), int expand, int slider, int toggle, int icon_only) { - uiStyle *style= layout->root->style; + uiStyle *style = layout->root->style; uiBut *but; PropertyType type; PropertySubType subtype; @@ -352,10 +352,10 @@ static void ui_item_array(uiLayout *layout, uiBlock *block, const char *name, in int a, b; /* retrieve type and subtype */ - type= RNA_property_type(prop); - subtype= RNA_property_subtype(prop); + type = RNA_property_type(prop); + subtype = RNA_property_subtype(prop); - sub= ui_item_local_sublayout(layout, layout, 1); + sub = ui_item_local_sublayout(layout, layout, 1); uiBlockSetCurLayout(block, sub); /* create label */ @@ -366,68 +366,68 @@ static void ui_item_array(uiLayout *layout, uiBlock *block, const char *name, in if (type == PROP_BOOLEAN && ELEM(subtype, PROP_LAYER, PROP_LAYER_MEMBER)) { /* special check for layer layout */ int butw, buth, unit; - int cols= (len >= 20)? 2: 1; - int colbuts= len/(2*cols); - int layer_used= 0; + int cols = (len >= 20) ? 2 : 1; + int colbuts = len / (2 * cols); + int layer_used = 0; uiBlockSetCurLayout(block, uiLayoutAbsolute(layout, 0)); - unit= UI_UNIT_X*0.75; - butw= unit; - buth= unit; + unit = UI_UNIT_X * 0.75; + butw = unit; + buth = unit; if (ptr->type == &RNA_Armature) { - bArmature *arm= (bArmature *)ptr->data; - layer_used= arm->layer_used; + bArmature *arm = (bArmature *)ptr->data; + layer_used = arm->layer_used; } - for (b=0; bbuttonspacex; + x += colbuts * butw + style->buttonspacex; } } else if (subtype == PROP_MATRIX) { - int totdim, dim_size[3]; /* 3 == RNA_MAX_ARRAY_DIMENSION */ + int totdim, dim_size[3]; /* 3 == RNA_MAX_ARRAY_DIMENSION */ int row, col; uiBlockSetCurLayout(block, uiLayoutAbsolute(layout, 1)); - totdim= RNA_property_array_dimension(ptr, prop, dim_size); - if (totdim != 2) return; /* only 2D matrices supported in UI so far */ + totdim = RNA_property_array_dimension(ptr, prop, dim_size); + if (totdim != 2) return; /* only 2D matrices supported in UI so far */ w /= dim_size[0]; /* h /= dim_size[1]; */ /* UNUSED */ - for (a=0; atype==NUM) - but->type= NUMSLI; + for (a = 0; a < len; a++) { + col = a % dim_size[0]; + row = a / dim_size[0]; + + but = uiDefAutoButR(block, ptr, prop, a, "", ICON_NONE, x + w * col, y + (dim_size[1] * UI_UNIT_Y) - (row * UI_UNIT_Y), w, UI_UNIT_Y); + if (slider && but->type == NUM) + but->type = NUMSLI; } } else if (subtype == PROP_DIRECTION) { - uiDefButR_prop(block, BUT_NORMAL, 0, name, x, y, UI_UNIT_X*3, UI_UNIT_Y*3, ptr, prop, 0, 0, 0, -1, -1, NULL); + uiDefButR_prop(block, BUT_NORMAL, 0, name, x, y, UI_UNIT_X * 3, UI_UNIT_Y * 3, ptr, prop, 0, 0, 0, -1, -1, NULL); } else { /* note, this block of code is a bit arbitrary and has just been made @@ -438,33 +438,33 @@ static void ui_item_array(uiLayout *layout, uiBlock *block, const char *name, in uiDefAutoButR(block, ptr, prop, -1, "", ICON_NONE, 0, 0, w, UI_UNIT_Y); } else { - int *boolarr= NULL; + int *boolarr = NULL; /* even if 'expand' is fale, expanding anyway */ /* layout for known array subtypes */ - char str[3]= {'\0'}; + char str[3] = {'\0'}; if (!icon_only) { if (type != PROP_BOOLEAN) { - str[1]= ':'; + str[1] = ':'; } } /* show checkboxes for rna on a non-emboss block (menu for eg) */ if (type == PROP_BOOLEAN && ELEM(layout->root->block->dt, UI_EMBOSSN, UI_EMBOSSP)) { - boolarr= MEM_callocN(sizeof(int)*len, "ui_item_array"); + boolarr = MEM_callocN(sizeof(int) * len, "ui_item_array"); RNA_property_boolean_get_array(ptr, prop, boolarr); } - for (a=0; atype==NUM) - but->type= NUMSLI; - if (toggle && but->type==OPTION) - but->type= TOG; + if (slider && but->type == NUM) + but->type = NUMSLI; + if (toggle && but->type == OPTION) + but->type = TOG; } if (boolarr) { @@ -486,14 +486,14 @@ static void ui_item_enum_expand(uiLayout *layout, uiBlock *block, PointerRNA *pt RNA_property_enum_items_gettexted(block->evil_C, ptr, prop, &item, &totitem, &free); uiBlockSetCurLayout(block, ui_item_local_sublayout(layout, layout, 1)); - for (a=0; acurlayout, name, icon, 0); + name = (!uiname || uiname[0]) ? item[a].name : ""; + icon = item[a].icon; + value = item[a].value; + itemw = ui_text_icon_width(block->curlayout, name, icon, 0); if (icon && name[0] && !icon_only) but = uiDefIconTextButR_prop(block, ROW, 0, icon, name, 0, 0, itemw, h, ptr, prop, -1, 0, value, -1, -1, NULL); @@ -515,7 +515,7 @@ static void ui_item_enum_expand(uiLayout *layout, uiBlock *block, PointerRNA *pt /* callback for keymap item change button */ static void ui_keymap_but_cb(bContext *UNUSED(C), void *but_v, void *UNUSED(key_v)) { - uiBut *but= but_v; + uiBut *but = but_v; RNA_boolean_set(&but->rnapoin, "shift", (but->modifier_key & KM_SHIFT) != 0); RNA_boolean_set(&but->rnapoin, "ctrl", (but->modifier_key & KM_CTRL) != 0); @@ -527,37 +527,37 @@ static void ui_keymap_but_cb(bContext *UNUSED(C), void *but_v, void *UNUSED(key_ static uiBut *ui_item_with_label(uiLayout *layout, uiBlock *block, const char *name, int icon, PointerRNA *ptr, PropertyRNA *prop, int index, int x, int y, int w, int h, int flag) { uiLayout *sub; - uiBut *but=NULL; + uiBut *but = NULL; PropertyType type; PropertySubType subtype; int labelw; - sub= uiLayoutRow(layout, 0); + sub = uiLayoutRow(layout, 0); uiBlockSetCurLayout(block, sub); if (name[0]) { /* XXX UI_GetStringWidth is not accurate */ #if 0 labelw = UI_GetStringWidth(name); - CLAMP(labelw, w/4, 3*w/4); + CLAMP(labelw, w / 4, 3 * w / 4); #endif - labelw= w/3; + labelw = w / 3; uiDefBut(block, LABEL, 0, name, x, y, labelw, h, NULL, 0.0, 0.0, 0, 0, ""); - w= w-labelw; + w = w - labelw; } - type= RNA_property_type(prop); - subtype= RNA_property_subtype(prop); + type = RNA_property_type(prop); + subtype = RNA_property_subtype(prop); if (subtype == PROP_FILEPATH || subtype == PROP_DIRPATH) { uiBlockSetCurLayout(block, uiLayoutRow(sub, 1)); - uiDefAutoButR(block, ptr, prop, index, "", icon, x, y, w-UI_UNIT_X, h); + uiDefAutoButR(block, ptr, prop, index, "", icon, x, y, w - UI_UNIT_X, h); /* BUTTONS_OT_file_browse calls uiFileBrowseContextProperty */ - but = uiDefIconButO(block, BUT, subtype==PROP_DIRPATH ? - "BUTTONS_OT_directory_browse" : - "BUTTONS_OT_file_browse", - WM_OP_INVOKE_DEFAULT, ICON_FILESEL, x, y, UI_UNIT_X, h, NULL); + but = uiDefIconButO(block, BUT, subtype == PROP_DIRPATH ? + "BUTTONS_OT_directory_browse" : + "BUTTONS_OT_file_browse", + WM_OP_INVOKE_DEFAULT, ICON_FILESEL, x, y, UI_UNIT_X, h, NULL); } else if (flag & UI_ITEM_R_EVENT) { uiDefButR_prop(block, KEYEVT, 0, name, x, y, w, h, ptr, prop, index, 0, 0, -1, -1, NULL); @@ -575,7 +575,7 @@ static uiBut *ui_item_with_label(uiLayout *layout, uiBlock *block, const char *n } } else - but = uiDefAutoButR(block, ptr, prop, index, (type == PROP_ENUM && !(flag & UI_ITEM_R_ICON_ONLY))? NULL: "", icon, x, y, w, h); + but = uiDefAutoButR(block, ptr, prop, index, (type == PROP_ENUM && !(flag & UI_ITEM_R_ICON_ONLY)) ? NULL : "", icon, x, y, w, h); uiBlockSetCurLayout(block, layout); return but; @@ -583,25 +583,25 @@ static uiBut *ui_item_with_label(uiLayout *layout, uiBlock *block, const char *n void uiFileBrowseContextProperty(const bContext *C, PointerRNA *ptr, PropertyRNA **prop) { - ARegion *ar= CTX_wm_region(C); + ARegion *ar = CTX_wm_region(C); uiBlock *block; uiBut *but, *prevbut; memset(ptr, 0, sizeof(*ptr)); - *prop= NULL; + *prop = NULL; if (!ar) return; - for (block=ar->uiblocks.first; block; block=block->next) { - for (but=block->buttons.first; but; but= but->next) { - prevbut= but->prev; + for (block = ar->uiblocks.first; block; block = block->next) { + for (but = block->buttons.first; but; but = but->next) { + prevbut = but->prev; /* find the button before the active one */ if ((but->flag & UI_BUT_LAST_ACTIVE) && prevbut && prevbut->rnapoin.data) { if (RNA_property_type(prevbut->rnaprop) == PROP_STRING) { - *ptr= prevbut->rnapoin; - *prop= prevbut->rnaprop; + *ptr = prevbut->rnapoin; + *prop = prevbut->rnaprop; return; } } @@ -614,16 +614,16 @@ void uiFileBrowseContextProperty(const bContext *C, PointerRNA *ptr, PropertyRNA /* disabled item */ static void ui_item_disabled(uiLayout *layout, const char *name) { - uiBlock *block= layout->root->block; + uiBlock *block = layout->root->block; uiBut *but; int w; uiBlockSetCurLayout(block, layout); if (!name) - name= ""; + name = ""; - w= ui_text_icon_width(layout, name, 0, 0); + w = ui_text_icon_width(layout, name, 0, 0); but = uiDefBut(block, LABEL, 0, name, 0, 0, w, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, ""); but->flag |= UI_BUT_DISABLED; @@ -634,7 +634,7 @@ static void ui_item_disabled(uiLayout *layout, const char *name) /* operator items */ PointerRNA uiItemFullO_ptr(uiLayout *layout, wmOperatorType *ot, const char *name, int icon, IDProperty *properties, int context, int flag) { - uiBlock *block= layout->root->block; + uiBlock *block = layout->root->block; uiBut *but; int w; @@ -646,12 +646,12 @@ PointerRNA uiItemFullO_ptr(uiLayout *layout, wmOperatorType *ot, const char *nam } if (layout->root->type == UI_LAYOUT_MENU && !icon) - icon= ICON_BLANK1; + icon = ICON_BLANK1; /* create button */ uiBlockSetCurLayout(block, layout); - w= ui_text_icon_width(layout, name, icon, 0); + w = ui_text_icon_width(layout, name, icon, 0); if (flag & UI_ITEM_R_NO_BG) uiBlockSetEmboss(block, UI_EMBOSSN); @@ -683,14 +683,14 @@ PointerRNA uiItemFullO_ptr(uiLayout *layout, wmOperatorType *ot, const char *nam /* assign properties */ if (properties || (flag & UI_ITEM_O_RETURN_PROPS)) { - PointerRNA *opptr= uiButGetOperatorPtrRNA(but); + PointerRNA *opptr = uiButGetOperatorPtrRNA(but); if (properties) { - opptr->data= properties; + opptr->data = properties; } else { IDPropertyTemplate val = {0}; - opptr->data= IDP_New(IDP_GROUP, &val, "wmOperatorProperties"); + opptr->data = IDP_New(IDP_GROUP, &val, "wmOperatorProperties"); } return *opptr; @@ -781,7 +781,7 @@ void uiItemsFullEnumO(uiLayout *layout, const char *opname, const char *propname PointerRNA ptr; PropertyRNA *prop; uiBut *bt; - uiBlock *block= layout->root->block; + uiBlock *block = layout->root->block; if (!ot || !ot->srna) { ui_item_disabled(layout, opname); @@ -798,12 +798,12 @@ void uiItemsFullEnumO(uiLayout *layout, const char *opname, const char *propname if (prop && RNA_property_type(prop) == PROP_ENUM) { EnumPropertyItem *item; int totitem, i, free; - uiLayout *split= uiLayoutSplit(layout, 0, 0); - uiLayout *column= uiLayoutColumn(split, 0); + uiLayout *split = uiLayoutSplit(layout, 0, 0); + uiLayout *column = uiLayoutColumn(split, 0); RNA_property_enum_items_gettexted(block->evil_C, &ptr, prop, &item, &totitem, &free); - for (i=0; iflag |= UI_BLOCK_NO_FLIP; } uiItemL(column, item[i].name, ICON_NONE); - bt= block->buttons.last; - bt->flag= UI_TEXT_LEFT; + bt = block->buttons.last; + bt->flag = UI_TEXT_LEFT; } else /* XXX bug here, collums draw bottom item badly */ uiItemS(column); @@ -857,7 +857,7 @@ void uiItemEnumO_value(uiLayout *layout, const char *name, int icon, const char PointerRNA ptr; PropertyRNA *prop; - UI_OPERATOR_ERROR_RET(ot, opname, return); + UI_OPERATOR_ERROR_RET(ot, opname, return ); WM_operator_properties_create_ptr(&ptr, ot); @@ -888,14 +888,14 @@ void uiItemEnumO_string(uiLayout *layout, const char *name, int icon, const char EnumPropertyItem *item; int value, free; - UI_OPERATOR_ERROR_RET(ot, opname, return); + UI_OPERATOR_ERROR_RET(ot, opname, return ); WM_operator_properties_create_ptr(&ptr, ot); /* enum lookup */ - if ((prop= RNA_struct_find_property(&ptr, propname))) { + if ((prop = RNA_struct_find_property(&ptr, propname))) { RNA_property_enum_items_gettexted(layout->root->block->evil_C, &ptr, prop, &item, NULL, &free); - if (item==NULL || RNA_enum_value_from_id(item, value_str, &value)==0) { + if (item == NULL || RNA_enum_value_from_id(item, value_str, &value) == 0) { if (free) { MEM_freeN(item); } @@ -926,7 +926,7 @@ void uiItemBooleanO(uiLayout *layout, const char *name, int icon, const char *op wmOperatorType *ot = WM_operatortype_find(opname, 0); /* print error next */ PointerRNA ptr; - UI_OPERATOR_ERROR_RET(ot, opname, return); + UI_OPERATOR_ERROR_RET(ot, opname, return ); WM_operator_properties_create_ptr(&ptr, ot); RNA_boolean_set(&ptr, propname, value); @@ -939,7 +939,7 @@ void uiItemIntO(uiLayout *layout, const char *name, int icon, const char *opname wmOperatorType *ot = WM_operatortype_find(opname, 0); /* print error next */ PointerRNA ptr; - UI_OPERATOR_ERROR_RET(ot, opname, return); + UI_OPERATOR_ERROR_RET(ot, opname, return ); WM_operator_properties_create_ptr(&ptr, ot); RNA_int_set(&ptr, propname, value); @@ -952,7 +952,7 @@ void uiItemFloatO(uiLayout *layout, const char *name, int icon, const char *opna wmOperatorType *ot = WM_operatortype_find(opname, 0); /* print error next */ PointerRNA ptr; - UI_OPERATOR_ERROR_RET(ot, opname, return); + UI_OPERATOR_ERROR_RET(ot, opname, return ); WM_operator_properties_create_ptr(&ptr, ot); RNA_float_set(&ptr, propname, value); @@ -965,7 +965,7 @@ void uiItemStringO(uiLayout *layout, const char *name, int icon, const char *opn wmOperatorType *ot = WM_operatortype_find(opname, 0); /* print error next */ PointerRNA ptr; - UI_OPERATOR_ERROR_RET(ot, opname, return); + UI_OPERATOR_ERROR_RET(ot, opname, return ); WM_operator_properties_create_ptr(&ptr, ot); RNA_string_set(&ptr, propname, value); @@ -987,46 +987,46 @@ static void ui_item_rna_size(uiLayout *layout, const char *name, int icon, Point int len, w, h; /* arbitrary extended width by type */ - type= RNA_property_type(prop); - subtype= RNA_property_subtype(prop); - len= RNA_property_array_length(ptr, prop); + type = RNA_property_type(prop); + subtype = RNA_property_subtype(prop); + len = RNA_property_array_length(ptr, prop); if (ELEM3(type, PROP_STRING, PROP_POINTER, PROP_ENUM) && !name[0] && !icon_only) - name= "non-empty text"; + name = "non-empty text"; else if (type == PROP_BOOLEAN && !name[0] && !icon_only) - icon= ICON_DOT; + icon = ICON_DOT; - w= ui_text_icon_width(layout, name, icon, 0); - h= UI_UNIT_Y; + w = ui_text_icon_width(layout, name, icon, 0); + h = UI_UNIT_Y; /* increase height for arrays */ if (index == RNA_NO_INDEX && len > 0) { if (!name[0] && icon == ICON_NONE) - h= 0; + h = 0; if (ELEM(subtype, PROP_LAYER, PROP_LAYER_MEMBER)) - h += 2*UI_UNIT_Y; + h += 2 * UI_UNIT_Y; else if (subtype == PROP_MATRIX) - h += ceil(sqrt(len))*UI_UNIT_Y; + h += ceil(sqrt(len)) * UI_UNIT_Y; else - h += len*UI_UNIT_Y; + h += len * UI_UNIT_Y; } else if (ui_layout_vary_direction(layout) == UI_ITEM_VARY_X) { if (type == PROP_BOOLEAN && name[0]) - w += UI_UNIT_X/5; + w += UI_UNIT_X / 5; else if (type == PROP_ENUM) - w += UI_UNIT_X/4; + w += UI_UNIT_X / 4; else if (type == PROP_FLOAT || type == PROP_INT) - w += UI_UNIT_X*3; + w += UI_UNIT_X * 3; } - *r_w= w; - *r_h= h; + *r_w = w; + *r_h = h; } void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index, int value, int flag, const char *name, int icon) { - uiBlock *block= layout->root->block; + uiBlock *block = layout->root->block; uiBut *but; PropertyType type; char namestr[UI_MAX_NAME_STR]; @@ -1035,44 +1035,44 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index uiBlockSetCurLayout(block, layout); /* retrieve info */ - type= RNA_property_type(prop); - is_array= RNA_property_array_check(prop); - len= (is_array) ? RNA_property_array_length(ptr, prop) : 0; + type = RNA_property_type(prop); + is_array = RNA_property_array_check(prop); + len = (is_array) ? RNA_property_array_length(ptr, prop) : 0; /* set name and icon */ if (!name) - name= RNA_property_ui_name(prop); + name = RNA_property_ui_name(prop); if (icon == ICON_NONE) - icon= RNA_property_ui_icon(prop); + icon = RNA_property_ui_icon(prop); if (ELEM4(type, PROP_INT, PROP_FLOAT, PROP_STRING, PROP_POINTER)) - name= ui_item_name_add_colon(name, namestr); + name = ui_item_name_add_colon(name, namestr); else if (type == PROP_BOOLEAN && is_array && index == RNA_NO_INDEX) - name= ui_item_name_add_colon(name, namestr); + name = ui_item_name_add_colon(name, namestr); else if (type == PROP_ENUM && index != RNA_ENUM_VALUE) - name= ui_item_name_add_colon(name, namestr); + name = ui_item_name_add_colon(name, namestr); if (layout->root->type == UI_LAYOUT_MENU) { if (type == PROP_BOOLEAN && ((is_array == FALSE) || (index != RNA_NO_INDEX))) { - if (is_array) icon= (RNA_property_boolean_get_index(ptr, prop, index)) ? ICON_CHECKBOX_HLT: ICON_CHECKBOX_DEHLT; - else icon= (RNA_property_boolean_get(ptr, prop)) ? ICON_CHECKBOX_HLT: ICON_CHECKBOX_DEHLT; + if (is_array) icon = (RNA_property_boolean_get_index(ptr, prop, index)) ? ICON_CHECKBOX_HLT : ICON_CHECKBOX_DEHLT; + else icon = (RNA_property_boolean_get(ptr, prop)) ? ICON_CHECKBOX_HLT : ICON_CHECKBOX_DEHLT; } else if (type == PROP_ENUM && index == RNA_ENUM_VALUE) { - int enum_value= RNA_property_enum_get(ptr, prop); + int enum_value = RNA_property_enum_get(ptr, prop); if (RNA_property_flag(prop) & PROP_ENUM_FLAG) { - icon= (enum_value & value)? ICON_CHECKBOX_HLT: ICON_CHECKBOX_DEHLT; + icon = (enum_value & value) ? ICON_CHECKBOX_HLT : ICON_CHECKBOX_DEHLT; } else { - icon= (enum_value == value)? ICON_CHECKBOX_HLT: ICON_CHECKBOX_DEHLT; + icon = (enum_value == value) ? ICON_CHECKBOX_HLT : ICON_CHECKBOX_DEHLT; } } } - slider= (flag & UI_ITEM_R_SLIDER); - toggle= (flag & UI_ITEM_R_TOGGLE); - expand= (flag & UI_ITEM_R_EXPAND); - icon_only= (flag & UI_ITEM_R_ICON_ONLY); - no_bg= (flag & UI_ITEM_R_NO_BG); + slider = (flag & UI_ITEM_R_SLIDER); + toggle = (flag & UI_ITEM_R_TOGGLE); + expand = (flag & UI_ITEM_R_EXPAND); + icon_only = (flag & UI_ITEM_R_ICON_ONLY); + no_bg = (flag & UI_ITEM_R_NO_BG); /* get size */ ui_item_rna_size(layout, name, icon, ptr, prop, index, icon_only, &w, &h); @@ -1097,7 +1097,7 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index ui_item_enum_expand(layout, block, ptr, prop, name, h, icon_only); /* property with separate label */ else if (type == PROP_ENUM || type == PROP_STRING || type == PROP_POINTER) { - but= ui_item_with_label(layout, block, name, icon, ptr, prop, index, 0, 0, w, h, flag); + but = ui_item_with_label(layout, block, name, icon, ptr, prop, index, 0, 0, w, h, flag); ui_but_add_search(but, ptr, prop, NULL, NULL); if (layout->redalert) @@ -1107,11 +1107,11 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index else { but = uiDefAutoButR(block, ptr, prop, index, name, icon, 0, 0, w, h); - if (slider && but->type==NUM) - but->type= NUMSLI; + if (slider && but->type == NUM) + but->type = NUMSLI; - if (toggle && but->type==OPTION) - but->type= TOG; + if (toggle && but->type == OPTION) + but->type = TOG; if (layout->redalert) uiButSetFlag(but, UI_BUT_REDALERT); @@ -1123,7 +1123,7 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index void uiItemR(uiLayout *layout, PointerRNA *ptr, const char *propname, int flag, const char *name, int icon) { - PropertyRNA *prop= RNA_struct_find_property(ptr, propname); + PropertyRNA *prop = RNA_struct_find_property(ptr, propname); if (!prop) { ui_item_disabled(layout, propname); @@ -1136,7 +1136,7 @@ void uiItemR(uiLayout *layout, PointerRNA *ptr, const char *propname, int flag, void uiItemEnumR(uiLayout *layout, const char *name, int icon, struct PointerRNA *ptr, const char *propname, int value) { - PropertyRNA *prop= RNA_struct_find_property(ptr, propname); + PropertyRNA *prop = RNA_struct_find_property(ptr, propname); if (!prop || RNA_property_type(prop) != PROP_ENUM) { ui_item_disabled(layout, propname); @@ -1149,7 +1149,7 @@ void uiItemEnumR(uiLayout *layout, const char *name, int icon, struct PointerRNA void uiItemEnumR_string(uiLayout *layout, struct PointerRNA *ptr, const char *propname, const char *value, const char *name, int icon) { - PropertyRNA *prop= RNA_struct_find_property(ptr, propname); + PropertyRNA *prop = RNA_struct_find_property(ptr, propname); EnumPropertyItem *item; int ivalue, a, free; @@ -1170,7 +1170,7 @@ void uiItemEnumR_string(uiLayout *layout, struct PointerRNA *ptr, const char *pr return; } - for (a=0; item[a].identifier; a++) { + for (a = 0; item[a].identifier; a++) { if (item[a].value == ivalue) { uiItemFullR(layout, ptr, prop, RNA_ENUM_VALUE, ivalue, 0, name ? name : item[a].name, icon ? icon : item[a].icon); break; @@ -1185,10 +1185,10 @@ void uiItemEnumR_string(uiLayout *layout, struct PointerRNA *ptr, const char *pr void uiItemsEnumR(uiLayout *layout, struct PointerRNA *ptr, const char *propname) { PropertyRNA *prop; - uiBlock *block= layout->root->block; + uiBlock *block = layout->root->block; uiBut *bt; - prop= RNA_struct_find_property(ptr, propname); + prop = RNA_struct_find_property(ptr, propname); if (!prop) { ui_item_disabled(layout, propname); @@ -1203,26 +1203,26 @@ void uiItemsEnumR(uiLayout *layout, struct PointerRNA *ptr, const char *propname else { EnumPropertyItem *item; int totitem, i, free; - uiLayout *split= uiLayoutSplit(layout, 0, 0); - uiLayout *column= uiLayoutColumn(split, 0); + uiLayout *split = uiLayoutSplit(layout, 0, 0); + uiLayout *column = uiLayoutColumn(split, 0); RNA_property_enum_items_gettexted(block->evil_C, ptr, prop, &item, &totitem, &free); - for (i=0; iflag |= UI_BLOCK_NO_FLIP; } uiItemL(column, item[i].name, ICON_NONE); - bt= block->buttons.last; - bt->flag= UI_TEXT_LEFT; + bt = block->buttons.last; + bt->flag = UI_TEXT_LEFT; } else uiItemS(column); @@ -1249,7 +1249,7 @@ static int sort_search_items_list(void *a, void *b) CollItemSearch *cis1 = (CollItemSearch *)a; CollItemSearch *cis2 = (CollItemSearch *)b; - if (BLI_strcasecmp(cis1->name, cis2->name)>0) + if (BLI_strcasecmp(cis1->name, cis2->name) > 0) return 1; else return 0; @@ -1257,12 +1257,12 @@ static int sort_search_items_list(void *a, void *b) static void rna_search_cb(const struct bContext *C, void *arg_but, const char *str, uiSearchItems *items) { - uiBut *but= arg_but; + uiBut *but = arg_but; char *name; - int i=0, iconid=0, flag= RNA_property_flag(but->rnaprop); - ListBase *items_list= MEM_callocN(sizeof(ListBase), "items_list"); + int i = 0, iconid = 0, flag = RNA_property_flag(but->rnaprop); + ListBase *items_list = MEM_callocN(sizeof(ListBase), "items_list"); CollItemSearch *cis; - const int skip_filter= !but->changed; + const int skip_filter = !but->changed; /* build a temporary list of relevant items first */ RNA_PROP_BEGIN(&but->rnasearchpoin, itemptr, but->rnasearchprop) { @@ -1271,25 +1271,25 @@ static void rna_search_cb(const struct bContext *C, void *arg_but, const char *s continue; /* use filter */ - if (RNA_property_type(but->rnaprop)==PROP_POINTER) { - if (RNA_property_pointer_poll(&but->rnapoin, but->rnaprop, &itemptr)==0) + if (RNA_property_type(but->rnaprop) == PROP_POINTER) { + if (RNA_property_pointer_poll(&but->rnapoin, but->rnaprop, &itemptr) == 0) continue; } if (itemptr.type && RNA_struct_is_ID(itemptr.type)) { - ID *id= itemptr.data; + ID *id = itemptr.data; char name_ui[MAX_ID_NAME]; -#if 0 /* this name is used for a string comparison and can't be modified, TODO */ +#if 0 /* this name is used for a string comparison and can't be modified, TODO */ name_uiprefix_id(name_ui, id); #else - BLI_strncpy(name_ui, id->name+2, sizeof(name_ui)); + BLI_strncpy(name_ui, id->name + 2, sizeof(name_ui)); #endif - name= BLI_strdup(name_ui); - iconid= ui_id_icon_get((bContext*)C, id, 0); + name = BLI_strdup(name_ui); + iconid = ui_id_icon_get((bContext *)C, id, 0); } else { - name= RNA_struct_name_get_alloc(&itemptr, NULL, 0, NULL); /* could use the string length here */ + name = RNA_struct_name_get_alloc(&itemptr, NULL, 0, NULL); /* could use the string length here */ iconid = 0; } @@ -1311,13 +1311,13 @@ static void rna_search_cb(const struct bContext *C, void *arg_but, const char *s BLI_sortlist(items_list, sort_search_items_list); /* add search items from temporary list */ - for (cis=items_list->first; cis; cis=cis->next) { + for (cis = items_list->first; cis; cis = cis->next) { if (!uiSearchItemAdd(items, cis->name, SET_INT_IN_POINTER(cis->index), cis->iconid)) { break; } } - for (cis=items_list->first; cis; cis=cis->next) { + for (cis = items_list->first; cis; cis = cis->next) { MEM_freeN(cis->name); } BLI_freelistN(items_list); @@ -1331,15 +1331,15 @@ static void search_id_collection(StructRNA *ptype, PointerRNA *ptr, PropertyRNA /* look for collection property in Main */ RNA_main_pointer_create(G.main, ptr); - *prop= NULL; + *prop = NULL; RNA_STRUCT_BEGIN(ptr, iprop) { /* if it's a collection and has same pointer type, we've got it */ if (RNA_property_type(iprop) == PROP_COLLECTION) { - srna= RNA_property_pointer_type(ptr, iprop); + srna = RNA_property_pointer_type(ptr, iprop); if (ptype == srna) { - *prop= iprop; + *prop = iprop; break; } } @@ -1355,19 +1355,19 @@ void ui_but_add_search(uiBut *but, PointerRNA *ptr, PropertyRNA *prop, PointerRN /* for ID's we do automatic lookup */ if (!searchprop) { if (RNA_property_type(prop) == PROP_POINTER) { - ptype= RNA_property_pointer_type(ptr, prop); + ptype = RNA_property_pointer_type(ptr, prop); search_id_collection(ptype, &sptr, &searchprop); - searchptr= &sptr; + searchptr = &sptr; } } /* turn button into search button */ if (searchprop) { - but->type= SEARCH_MENU; - but->hardmax= MAX2(but->hardmax, 256); - but->rnasearchpoin= *searchptr; - but->rnasearchprop= searchprop; - but->flag |= UI_ICON_LEFT|UI_TEXT_LEFT; + but->type = SEARCH_MENU; + but->hardmax = MAX2(but->hardmax, 256); + but->rnasearchpoin = *searchptr; + but->rnasearchprop = searchprop; + but->flag |= UI_ICON_LEFT | UI_TEXT_LEFT; uiButSetSearchFunc(but, rna_search_cb, but, NULL, NULL); } @@ -1383,20 +1383,20 @@ void uiItemPointerR(uiLayout *layout, struct PointerRNA *ptr, const char *propna int w, h; /* validate arguments */ - prop= RNA_struct_find_property(ptr, propname); + prop = RNA_struct_find_property(ptr, propname); if (!prop) { RNA_warning("property not found: %s.%s", RNA_struct_identifier(ptr->type), propname); return; } - type= RNA_property_type(prop); + type = RNA_property_type(prop); if (!ELEM(type, PROP_POINTER, PROP_STRING)) { RNA_warning("Property %s must be a pointer or string", propname); return; } - searchprop= RNA_struct_find_property(searchptr, searchpropname); + searchprop = RNA_struct_find_property(searchptr, searchpropname); if (!searchprop) { @@ -1409,22 +1409,22 @@ void uiItemPointerR(uiLayout *layout, struct PointerRNA *ptr, const char *propna } /* get icon & name */ - if (icon==ICON_NONE) { + if (icon == ICON_NONE) { if (type == PROP_POINTER) - icontype= RNA_property_pointer_type(ptr, prop); + icontype = RNA_property_pointer_type(ptr, prop); else - icontype= RNA_property_pointer_type(searchptr, searchprop); + icontype = RNA_property_pointer_type(searchptr, searchprop); - icon= RNA_struct_ui_icon(icontype); + icon = RNA_struct_ui_icon(icontype); } if (!name) - name= RNA_property_ui_name(prop); + name = RNA_property_ui_name(prop); /* create button */ - block= uiLayoutGetBlock(layout); + block = uiLayoutGetBlock(layout); ui_item_rna_size(layout, name, icon, ptr, prop, 0, 0, &w, &h); - but= ui_item_with_label(layout, block, name, icon, ptr, prop, 0, 0, 0, w, h, 0); + but = ui_item_with_label(layout, block, name, icon, ptr, prop, 0, 0, 0, w, h, 0); ui_but_add_search(but, ptr, prop, searchptr, searchprop); } @@ -1432,17 +1432,17 @@ void uiItemPointerR(uiLayout *layout, struct PointerRNA *ptr, const char *propna /* menu item */ static void ui_item_menutype_func(bContext *C, uiLayout *layout, void *arg_mt) { - MenuType *mt= (MenuType*)arg_mt; + MenuType *mt = (MenuType *)arg_mt; Menu menu = {NULL}; - menu.type= mt; - menu.layout= layout; + menu.type = mt; + menu.layout = layout; mt->draw(C, &menu); } static void ui_item_menu(uiLayout *layout, const char *name, int icon, uiMenuCreateFunc func, void *arg, void *argN, const char *tip) { - uiBlock *block= layout->root->block; + uiBlock *block = layout->root->block; uiBut *but; int w, h; @@ -1452,12 +1452,12 @@ static void ui_item_menu(uiLayout *layout, const char *name, int icon, uiMenuCre uiBlockSetEmboss(block, UI_EMBOSS); if (!name) - name= ""; + name = ""; if (layout->root->type == UI_LAYOUT_MENU && !icon) - icon= ICON_BLANK1; + icon = ICON_BLANK1; - w= ui_text_icon_width(layout, name, icon, 1); - h= UI_UNIT_Y; + w = ui_text_icon_width(layout, name, icon, 1); + h = UI_UNIT_Y; if (layout->root->type == UI_LAYOUT_HEADER) /* ugly .. */ w -= 10; @@ -1470,14 +1470,14 @@ static void ui_item_menu(uiLayout *layout, const char *name, int icon, uiMenuCre but = uiDefMenuBut(block, func, arg, name, 0, 0, w, h, tip); if (argN) { /* ugly .. */ - but->poin= (char*)but; - but->func_argN= argN; + but->poin = (char *)but; + but->func_argN = argN; } if (layout->root->type == UI_LAYOUT_HEADER) uiBlockSetEmboss(block, UI_EMBOSS); else if (ELEM(layout->root->type, UI_LAYOUT_PANEL, UI_LAYOUT_TOOLBAR)) { - but->type= MENU; + but->type = MENU; but->flag |= UI_TEXT_LEFT; } } @@ -1488,7 +1488,7 @@ void uiItemM(uiLayout *layout, bContext *UNUSED(C), const char *menuname, const mt = WM_menutype_find(menuname, FALSE); - if (mt==NULL) { + if (mt == NULL) { RNA_warning("not found %s", menuname); return; } @@ -1498,7 +1498,7 @@ void uiItemM(uiLayout *layout, bContext *UNUSED(C), const char *menuname, const } if (layout->root->type == UI_LAYOUT_MENU && !icon) - icon= ICON_BLANK1; + icon = ICON_BLANK1; ui_item_menu(layout, name, icon, ui_item_menutype_func, mt, NULL, mt->description); } @@ -1506,18 +1506,18 @@ void uiItemM(uiLayout *layout, bContext *UNUSED(C), const char *menuname, const /* label item */ static uiBut *uiItemL_(uiLayout *layout, const char *name, int icon) { - uiBlock *block= layout->root->block; + uiBlock *block = layout->root->block; uiBut *but; int w; uiBlockSetCurLayout(block, layout); if (!name) - name= ""; + name = ""; if (layout->root->type == UI_LAYOUT_MENU && !icon) - icon= ICON_BLANK1; + icon = ICON_BLANK1; - w= ui_text_icon_width(layout, name, icon, 0); + w = ui_text_icon_width(layout, name, icon, 0); if (icon && name[0]) but = uiDefIconTextBut(block, LABEL, 0, icon, name, 0, 0, w, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, ""); @@ -1536,7 +1536,7 @@ void uiItemL(uiLayout *layout, const char *name, int icon) void uiItemLDrag(uiLayout *layout, PointerRNA *ptr, const char *name, int icon) { - uiBut *but= uiItemL_(layout, name, icon); + uiBut *but = uiItemL_(layout, name, icon); if (ptr && ptr->type) if (RNA_struct_is_ID(ptr->type)) @@ -1548,18 +1548,18 @@ void uiItemLDrag(uiLayout *layout, PointerRNA *ptr, const char *name, int icon) void uiItemV(uiLayout *layout, const char *name, int icon, int argval) { /* label */ - uiBlock *block= layout->root->block; - float *retvalue= (block->handle)? &block->handle->retvalue: NULL; + uiBlock *block = layout->root->block; + float *retvalue = (block->handle) ? &block->handle->retvalue : NULL; int w; uiBlockSetCurLayout(block, layout); if (!name) - name= ""; + name = ""; if (layout->root->type == UI_LAYOUT_MENU && !icon) - icon= ICON_BLANK1; + icon = ICON_BLANK1; - w= ui_text_icon_width(layout, name, icon, 0); + w = ui_text_icon_width(layout, name, icon, 0); if (icon && name[0]) uiDefIconTextButF(block, BUT, argval, icon, name, 0, 0, w, UI_UNIT_Y, retvalue, 0.0, 0.0, 0, 0, ""); @@ -1572,7 +1572,7 @@ void uiItemV(uiLayout *layout, const char *name, int icon, int argval) /* separator item */ void uiItemS(uiLayout *layout) { - uiBlock *block= layout->root->block; + uiBlock *block = layout->root->block; uiBlockSetCurLayout(block, layout); uiDefBut(block, SEPR, 0, "", 0, 0, EM_SEPR_X, EM_SEPR_Y, NULL, 0.0, 0.0, 0, 0, ""); @@ -1598,7 +1598,7 @@ typedef struct MenuItemLevel { static void menu_item_enum_opname_menu(bContext *UNUSED(C), uiLayout *layout, void *arg) { - MenuItemLevel *lvl= (MenuItemLevel*)(((uiBut*)arg)->func_argN); + MenuItemLevel *lvl = (MenuItemLevel *)(((uiBut *)arg)->func_argN); uiLayoutSetOperatorContext(layout, lvl->opcontext); uiItemsEnumO(layout, lvl->opname, lvl->propname); @@ -1609,7 +1609,7 @@ void uiItemMenuEnumO(uiLayout *layout, const char *opname, const char *propname, wmOperatorType *ot = WM_operatortype_find(opname, 0); /* print error next */ MenuItemLevel *lvl; - UI_OPERATOR_ERROR_RET(ot, opname, return); + UI_OPERATOR_ERROR_RET(ot, opname, return ); if (!ot->srna) { ui_item_disabled(layout, opname); @@ -1618,21 +1618,21 @@ void uiItemMenuEnumO(uiLayout *layout, const char *opname, const char *propname, } if (!name) - name= ot->name; + name = ot->name; if (layout->root->type == UI_LAYOUT_MENU && !icon) - icon= ICON_BLANK1; + icon = ICON_BLANK1; - lvl= MEM_callocN(sizeof(MenuItemLevel), "MenuItemLevel"); + lvl = MEM_callocN(sizeof(MenuItemLevel), "MenuItemLevel"); BLI_strncpy(lvl->opname, opname, sizeof(lvl->opname)); BLI_strncpy(lvl->propname, propname, sizeof(lvl->propname)); - lvl->opcontext= layout->root->opcontext; + lvl->opcontext = layout->root->opcontext; ui_item_menu(layout, name, icon, menu_item_enum_opname_menu, NULL, lvl, ot->description); } static void menu_item_enum_rna_menu(bContext *UNUSED(C), uiLayout *layout, void *arg) { - MenuItemLevel *lvl= (MenuItemLevel*)(((uiBut*)arg)->func_argN); + MenuItemLevel *lvl = (MenuItemLevel *)(((uiBut *)arg)->func_argN); uiLayoutSetOperatorContext(layout, lvl->opcontext); uiItemsEnumR(layout, &lvl->rnapoin, lvl->propname); @@ -1643,7 +1643,7 @@ void uiItemMenuEnumR(uiLayout *layout, struct PointerRNA *ptr, const char *propn MenuItemLevel *lvl; PropertyRNA *prop; - prop= RNA_struct_find_property(ptr, propname); + prop = RNA_struct_find_property(ptr, propname); if (!prop) { ui_item_disabled(layout, propname); RNA_warning("property not found: %s.%s", RNA_struct_identifier(ptr->type), propname); @@ -1651,14 +1651,14 @@ void uiItemMenuEnumR(uiLayout *layout, struct PointerRNA *ptr, const char *propn } if (!name) - name= RNA_property_ui_name(prop); + name = RNA_property_ui_name(prop); if (layout->root->type == UI_LAYOUT_MENU && !icon) - icon= ICON_BLANK1; + icon = ICON_BLANK1; - lvl= MEM_callocN(sizeof(MenuItemLevel), "MenuItemLevel"); - lvl->rnapoin= *ptr; + lvl = MEM_callocN(sizeof(MenuItemLevel), "MenuItemLevel"); + lvl->rnapoin = *ptr; BLI_strncpy(lvl->propname, propname, sizeof(lvl->propname)); - lvl->opcontext= layout->root->opcontext; + lvl->opcontext = layout->root->opcontext; ui_item_menu(layout, name, icon, menu_item_enum_rna_menu, NULL, lvl, RNA_property_description(prop)); } @@ -1671,14 +1671,14 @@ static void ui_litem_estimate_row(uiLayout *litem) uiItem *item; int itemw, itemh; - litem->w= 0; - litem->h= 0; + litem->w = 0; + litem->h = 0; - for (item=litem->items.first; item; item=item->next) { + for (item = litem->items.first; item; item = item->next) { ui_item_size(item, &itemw, &itemh); litem->w += itemw; - litem->h= MAX2(itemh, litem->h); + litem->h = MAX2(itemh, litem->h); if (item->next) litem->w += litem->space; @@ -1687,22 +1687,22 @@ static void ui_litem_estimate_row(uiLayout *litem) static int ui_litem_min_width(int itemw) { - return MIN2(2*UI_UNIT_X, itemw); + return MIN2(2 * UI_UNIT_X, itemw); } static void ui_litem_layout_row(uiLayout *litem) { uiItem *item; int x, y, w, tot, totw, neww, itemw, minw, itemh, offset; - int fixedw, freew, fixedx, freex, flag= 0, lastw= 0; + int fixedw, freew, fixedx, freex, flag = 0, lastw = 0; /* x= litem->x; */ /* UNUSED */ - y= litem->y; - w= litem->w; - totw= 0; - tot= 0; + y = litem->y; + w = litem->w; + totw = 0; + tot = 0; - for (item=litem->items.first; item; item=item->next) { + for (item = litem->items.first; item; item = item->next) { ui_item_size(item, &itemw, &itemh); totw += itemw; tot++; @@ -1712,88 +1712,88 @@ static void ui_litem_layout_row(uiLayout *litem) return; if (w != 0) - w -= (tot-1)*litem->space; - fixedw= 0; + w -= (tot - 1) * litem->space; + fixedw = 0; /* keep clamping items to fixed minimum size until all are done */ do { - freew= 0; - x= 0; - flag= 0; + freew = 0; + x = 0; + flag = 0; - for (item=litem->items.first; item; item=item->next) { + for (item = litem->items.first; item; item = item->next) { if (item->flag) continue; ui_item_size(item, &itemw, &itemh); - minw= ui_litem_min_width(itemw); + minw = ui_litem_min_width(itemw); if (w - lastw > 0) - neww= ui_item_fit(itemw, x, totw, w-lastw, !item->next, litem->alignment, NULL); + neww = ui_item_fit(itemw, x, totw, w - lastw, !item->next, litem->alignment, NULL); else - neww= 0; /* no space left, all will need clamping to minimum size */ + neww = 0; /* no space left, all will need clamping to minimum size */ x += neww; if ((neww < minw || itemw == minw) && w != 0) { /* fixed size */ - item->flag= 1; + item->flag = 1; fixedw += minw; - flag= 1; + flag = 1; totw -= itemw; } else { /* keep free size */ - item->flag= 0; + item->flag = 0; freew += itemw; } } - lastw= fixedw; + lastw = fixedw; } while (flag); - freex= 0; - fixedx= 0; - x= litem->x; + freex = 0; + fixedx = 0; + x = litem->x; - for (item=litem->items.first; item; item=item->next) { + for (item = litem->items.first; item; item = item->next) { ui_item_size(item, &itemw, &itemh); - minw= ui_litem_min_width(itemw); + minw = ui_litem_min_width(itemw); if (item->flag) { /* fixed minimum size items */ - itemw= ui_item_fit(minw, fixedx, fixedw, MIN2(w, fixedw), !item->next, litem->alignment, NULL); + itemw = ui_item_fit(minw, fixedx, fixedw, MIN2(w, fixedw), !item->next, litem->alignment, NULL); fixedx += itemw; } else { /* free size item */ - itemw= ui_item_fit(itemw, freex, freew, w-fixedw, !item->next, litem->alignment, NULL); + itemw = ui_item_fit(itemw, freex, freew, w - fixedw, !item->next, litem->alignment, NULL); freex += itemw; } /* align right/center */ - offset= 0; + offset = 0; if (litem->alignment == UI_LAYOUT_ALIGN_RIGHT) { - if (freew > 0 && freew < w-fixedw) - offset= (w - fixedw) - freew; + if (freew > 0 && freew < w - fixedw) + offset = (w - fixedw) - freew; } else if (litem->alignment == UI_LAYOUT_ALIGN_CENTER) { - if (freew > 0 && freew < w-fixedw) - offset= ((w - fixedw) - freew)/2; + if (freew > 0 && freew < w - fixedw) + offset = ((w - fixedw) - freew) / 2; } /* position item */ - ui_item_position(item, x+offset, y-itemh, itemw, itemh); + ui_item_position(item, x + offset, y - itemh, itemw, itemh); x += itemw; if (item->next) x += litem->space; } - litem->w= x - litem->x; - litem->h= litem->y - y; - litem->x= x; - litem->y= y; + litem->w = x - litem->x; + litem->h = litem->y - y; + litem->x = x; + litem->y = y; } /* single-column layout */ @@ -1802,13 +1802,13 @@ static void ui_litem_estimate_column(uiLayout *litem) uiItem *item; int itemw, itemh; - litem->w= 0; - litem->h= 0; + litem->w = 0; + litem->h = 0; - for (item=litem->items.first; item; item=item->next) { + for (item = litem->items.first; item; item = item->next) { ui_item_size(item, &itemw, &itemh); - litem->w= MAX2(litem->w, itemw); + litem->w = MAX2(litem->w, itemw); litem->h += itemh; if (item->next) @@ -1821,10 +1821,10 @@ static void ui_litem_layout_column(uiLayout *litem) uiItem *item; int itemh, x, y; - x= litem->x; - y= litem->y; + x = litem->x; + y = litem->y; - for (item=litem->items.first; item; item=item->next) { + for (item = litem->items.first; item; item = item->next) { ui_item_size(item, NULL, &itemh); y -= itemh; @@ -1834,9 +1834,9 @@ static void ui_litem_layout_column(uiLayout *litem) y -= litem->space; } - litem->h= litem->y - y; - litem->x= x; - litem->y= y; + litem->h = litem->y - y; + litem->x = x; + litem->y = y; } /* root layout */ @@ -1856,59 +1856,59 @@ static void ui_litem_layout_root(uiLayout *litem) /* box layout */ static void ui_litem_estimate_box(uiLayout *litem) { - uiStyle *style= litem->root->style; + uiStyle *style = litem->root->style; ui_litem_estimate_column(litem); - litem->w += 2*style->boxspace; + litem->w += 2 * style->boxspace; litem->h += style->boxspace; } static void ui_litem_layout_box(uiLayout *litem) { - uiLayoutItemBx *box= (uiLayoutItemBx*)litem; - uiStyle *style= litem->root->style; + uiLayoutItemBx *box = (uiLayoutItemBx *)litem; + uiStyle *style = litem->root->style; uiBut *but; int w, h; - w= litem->w; - h= litem->h; + w = litem->w; + h = litem->h; litem->x += style->boxspace; - if (w != 0) litem->w -= 2*style->boxspace; - if (h != 0) litem->h -= 2*style->boxspace; + if (w != 0) litem->w -= 2 * style->boxspace; + if (h != 0) litem->h -= 2 * style->boxspace; ui_litem_layout_column(litem); litem->x -= style->boxspace; litem->y -= style->boxspace; - if (w != 0) litem->w += 2*style->boxspace; + if (w != 0) litem->w += 2 * style->boxspace; if (h != 0) litem->h += style->boxspace; /* roundbox around the sublayout */ - but= box->roundbox; - but->x1= litem->x; - but->y1= litem->y; - but->x2= litem->x+litem->w; - but->y2= litem->y+litem->h; + but = box->roundbox; + but->x1 = litem->x; + but->y1 = litem->y; + but->x2 = litem->x + litem->w; + but->y2 = litem->y + litem->h; } /* multi-column layout, automatically flowing to the next */ static void ui_litem_estimate_column_flow(uiLayout *litem) { - uiStyle *style= litem->root->style; - uiLayoutItemFlow *flow= (uiLayoutItemFlow*)litem; + uiStyle *style = litem->root->style; + uiLayoutItemFlow *flow = (uiLayoutItemFlow *)litem; uiItem *item; - int col, x, y, emh, emy, miny, itemw, itemh, maxw=0; + int col, x, y, emh, emy, miny, itemw, itemh, maxw = 0; int toth, totitem; /* compute max needed width and total height */ - toth= 0; - totitem= 0; - for (item=litem->items.first; item; item=item->next) { + toth = 0; + totitem = 0; + for (item = litem->items.first; item; item = item->next) { ui_item_size(item, &itemw, &itemh); - maxw= MAX2(maxw, itemw); + maxw = MAX2(maxw, itemw); toth += itemh; totitem++; } @@ -1916,97 +1916,97 @@ static void ui_litem_estimate_column_flow(uiLayout *litem) if (flow->number <= 0) { /* auto compute number of columns, not very good */ if (maxw == 0) { - flow->totcol= 1; + flow->totcol = 1; return; } - flow->totcol= MAX2(litem->root->emw/maxw, 1); - flow->totcol= MIN2(flow->totcol, totitem); + flow->totcol = MAX2(litem->root->emw / maxw, 1); + flow->totcol = MIN2(flow->totcol, totitem); } else - flow->totcol= flow->number; + flow->totcol = flow->number; /* compute sizes */ - x= 0; - y= 0; - emy= 0; - miny= 0; + x = 0; + y = 0; + emy = 0; + miny = 0; - maxw= 0; - emh= toth/flow->totcol; + maxw = 0; + emh = toth / flow->totcol; /* create column per column */ - col= 0; - for (item=litem->items.first; item; item=item->next) { + col = 0; + for (item = litem->items.first; item; item = item->next) { ui_item_size(item, &itemw, &itemh); y -= itemh + style->buttonspacey; - miny= MIN2(miny, y); + miny = MIN2(miny, y); emy -= itemh; - maxw= MAX2(itemw, maxw); + maxw = MAX2(itemw, maxw); /* decide to go to next one */ - if (col < flow->totcol-1 && emy <= -emh) { + if (col < flow->totcol - 1 && emy <= -emh) { x += maxw + litem->space; - maxw= 0; - y= 0; + maxw = 0; + y = 0; col++; } } - litem->w= x; - litem->h= litem->y - miny; + litem->w = x; + litem->h = litem->y - miny; } static void ui_litem_layout_column_flow(uiLayout *litem) { - uiStyle *style= litem->root->style; - uiLayoutItemFlow *flow= (uiLayoutItemFlow*)litem; + uiStyle *style = litem->root->style; + uiLayoutItemFlow *flow = (uiLayoutItemFlow *)litem; uiItem *item; int col, x, y, w, emh, emy, miny, itemw, itemh; int toth, totitem, offset; /* compute max needed width and total height */ - toth= 0; - totitem= 0; - for (item=litem->items.first; item; item=item->next) { + toth = 0; + totitem = 0; + for (item = litem->items.first; item; item = item->next) { ui_item_size(item, &itemw, &itemh); toth += itemh; totitem++; } /* compute sizes */ - x= litem->x; - y= litem->y; - emy= 0; - miny= 0; + x = litem->x; + y = litem->y; + emy = 0; + miny = 0; - w= litem->w - (flow->totcol-1)*style->columnspace; - emh= toth/flow->totcol; + w = litem->w - (flow->totcol - 1) * style->columnspace; + emh = toth / flow->totcol; /* create column per column */ - col= 0; - for (item=litem->items.first; item; item=item->next) { + col = 0; + for (item = litem->items.first; item; item = item->next) { ui_item_size(item, NULL, &itemh); - itemw= ui_item_fit(1, x-litem->x, flow->totcol, w, col == flow->totcol-1, litem->alignment, &offset); + itemw = ui_item_fit(1, x - litem->x, flow->totcol, w, col == flow->totcol - 1, litem->alignment, &offset); y -= itemh; emy -= itemh; - ui_item_position(item, x+offset, y, itemw, itemh); + ui_item_position(item, x + offset, y, itemw, itemh); y -= style->buttonspacey; - miny= MIN2(miny, y); + miny = MIN2(miny, y); /* decide to go to next one */ - if (col < flow->totcol-1 && emy <= -emh) { + if (col < flow->totcol - 1 && emy <= -emh) { x += itemw + style->columnspace; - y= litem->y; + y = litem->y; col++; } } - litem->h= litem->y - miny; - litem->x= x; - litem->y= miny; + litem->h = litem->y - miny; + litem->x = x; + litem->y = miny; } /* free layout */ @@ -2015,20 +2015,20 @@ static void ui_litem_estimate_absolute(uiLayout *litem) uiItem *item; int itemx, itemy, itemw, itemh, minx, miny; - minx= 1e6; - miny= 1e6; - litem->w= 0; - litem->h= 0; + minx = 1e6; + miny = 1e6; + litem->w = 0; + litem->h = 0; - for (item=litem->items.first; item; item=item->next) { + for (item = litem->items.first; item; item = item->next) { ui_item_offset(item, &itemx, &itemy); ui_item_size(item, &itemw, &itemh); - minx= MIN2(minx, itemx); - miny= MIN2(miny, itemy); + minx = MIN2(minx, itemx); + miny = MIN2(miny, itemy); - litem->w= MAX2(litem->w, itemx+itemw); - litem->h= MAX2(litem->h, itemy+itemh); + litem->w = MAX2(litem->w, itemx + itemw); + litem->h = MAX2(litem->h, itemy + itemh); } litem->w -= minx; @@ -2038,59 +2038,59 @@ static void ui_litem_estimate_absolute(uiLayout *litem) static void ui_litem_layout_absolute(uiLayout *litem) { uiItem *item; - float scalex=1.0f, scaley=1.0f; + float scalex = 1.0f, scaley = 1.0f; int x, y, newx, newy, itemx, itemy, itemh, itemw, minx, miny, totw, toth; - minx= 1e6; - miny= 1e6; - totw= 0; - toth= 0; + minx = 1e6; + miny = 1e6; + totw = 0; + toth = 0; - for (item=litem->items.first; item; item=item->next) { + for (item = litem->items.first; item; item = item->next) { ui_item_offset(item, &itemx, &itemy); ui_item_size(item, &itemw, &itemh); - minx= MIN2(minx, itemx); - miny= MIN2(miny, itemy); + minx = MIN2(minx, itemx); + miny = MIN2(miny, itemy); - totw= MAX2(totw, itemx+itemw); - toth= MAX2(toth, itemy+itemh); + totw = MAX2(totw, itemx + itemw); + toth = MAX2(toth, itemy + itemh); } totw -= minx; toth -= miny; if (litem->w && totw > 0) - scalex= (float)litem->w/(float)totw; + scalex = (float)litem->w / (float)totw; if (litem->h && toth > 0) - scaley= (float)litem->h/(float)toth; + scaley = (float)litem->h / (float)toth; - x= litem->x; - y= litem->y - scaley*toth; + x = litem->x; + y = litem->y - scaley * toth; - for (item=litem->items.first; item; item=item->next) { + for (item = litem->items.first; item; item = item->next) { ui_item_offset(item, &itemx, &itemy); ui_item_size(item, &itemw, &itemh); if (scalex != 1.0f) { - newx= (itemx - minx)*scalex; - itemw= (itemx - minx + itemw)*scalex - newx; - itemx= minx + newx; + newx = (itemx - minx) * scalex; + itemw = (itemx - minx + itemw) * scalex - newx; + itemx = minx + newx; } if (scaley != 1.0f) { - newy= (itemy - miny)*scaley; - itemh= (itemy - miny + itemh)*scaley - newy; - itemy= miny + newy; + newy = (itemy - miny) * scaley; + itemh = (itemy - miny + itemh) * scaley - newy; + itemy = miny + newy; } - ui_item_position(item, x+itemx-minx, y+itemy-miny, itemw, itemh); + ui_item_position(item, x + itemx - minx, y + itemy - miny, itemw, itemh); } - litem->w= scalex*totw; - litem->h= litem->y - y; - litem->x= x + litem->w; - litem->y= y; + litem->w = scalex * totw; + litem->h = litem->y - y; + litem->x = x + litem->w; + litem->y = y; } /* split layout */ @@ -2101,42 +2101,42 @@ static void ui_litem_estimate_split(uiLayout *litem) static void ui_litem_layout_split(uiLayout *litem) { - uiLayoutItemSplit *split= (uiLayoutItemSplit*)litem; + uiLayoutItemSplit *split = (uiLayoutItemSplit *)litem; uiItem *item; float percentage; - const int tot= BLI_countlist(&litem->items); - int itemh, x, y, w, colw=0; + const int tot = BLI_countlist(&litem->items); + int itemh, x, y, w, colw = 0; if (tot == 0) return; - x= litem->x; - y= litem->y; + x = litem->x; + y = litem->y; - percentage= (split->percentage == 0.0f)? 1.0f/(float)tot: split->percentage; + percentage = (split->percentage == 0.0f) ? 1.0f / (float)tot : split->percentage; - w= (litem->w - (tot-1)*litem->space); - colw= w*percentage; - colw= MAX2(colw, 0); + w = (litem->w - (tot - 1) * litem->space); + colw = w * percentage; + colw = MAX2(colw, 0); - for (item=litem->items.first; item; item=item->next) { + for (item = litem->items.first; item; item = item->next) { ui_item_size(item, NULL, &itemh); - ui_item_position(item, x, y-itemh, colw, itemh); + ui_item_position(item, x, y - itemh, colw, itemh); x += colw; if (item->next) { - colw= (w - (int)(w*percentage))/(tot-1); - colw= MAX2(colw, 0); + colw = (w - (int)(w * percentage)) / (tot - 1); + colw = MAX2(colw, 0); x += litem->space; } } - litem->w= x - litem->x; - litem->h= litem->y - y; - litem->x= x; - litem->y= y; + litem->w = x - litem->x; + litem->h = litem->y - y; + litem->x = x; + litem->y = y; } /* overlap layout */ @@ -2145,14 +2145,14 @@ static void ui_litem_estimate_overlap(uiLayout *litem) uiItem *item; int itemw, itemh; - litem->w= 0; - litem->h= 0; + litem->w = 0; + litem->h = 0; - for (item=litem->items.first; item; item=item->next) { + for (item = litem->items.first; item; item = item->next) { ui_item_size(item, &itemw, &itemh); - litem->w= MAX2(itemw, litem->w); - litem->h= MAX2(itemh, litem->h); + litem->w = MAX2(itemw, litem->w); + litem->h = MAX2(itemh, litem->h); } } @@ -2161,18 +2161,18 @@ static void ui_litem_layout_overlap(uiLayout *litem) uiItem *item; int itemw, itemh, x, y; - x= litem->x; - y= litem->y; + x = litem->x; + y = litem->y; - for (item=litem->items.first; item; item=item->next) { + for (item = litem->items.first; item; item = item->next) { ui_item_size(item, &itemw, &itemh); - ui_item_position(item, x, y-itemh, litem->w, itemh); + ui_item_position(item, x, y - itemh, litem->w, itemh); - litem->h= MAX2(litem->h, itemh); + litem->h = MAX2(litem->h, itemh); } - litem->x= x; - litem->y= y - litem->h; + litem->x = x; + litem->y = y - litem->h; } /* layout create functions */ @@ -2180,14 +2180,14 @@ uiLayout *uiLayoutRow(uiLayout *layout, int align) { uiLayout *litem; - litem= MEM_callocN(sizeof(uiLayout), "uiLayoutRow"); - litem->item.type= ITEM_LAYOUT_ROW; - litem->root= layout->root; - litem->align= align; - litem->active= 1; - litem->enabled= 1; - litem->context= layout->context; - litem->space= (align)? 0: layout->root->style->buttonspacex; + litem = MEM_callocN(sizeof(uiLayout), "uiLayoutRow"); + litem->item.type = ITEM_LAYOUT_ROW; + litem->root = layout->root; + litem->align = align; + litem->active = 1; + litem->enabled = 1; + litem->context = layout->context; + litem->space = (align) ? 0 : layout->root->style->buttonspacex; litem->w = layout->w; BLI_addtail(&layout->items, litem); @@ -2200,14 +2200,14 @@ uiLayout *uiLayoutColumn(uiLayout *layout, int align) { uiLayout *litem; - litem= MEM_callocN(sizeof(uiLayout), "uiLayoutColumn"); - litem->item.type= ITEM_LAYOUT_COLUMN; - litem->root= layout->root; - litem->align= align; - litem->active= 1; - litem->enabled= 1; - litem->context= layout->context; - litem->space= (litem->align)? 0: layout->root->style->buttonspacey; + litem = MEM_callocN(sizeof(uiLayout), "uiLayoutColumn"); + litem->item.type = ITEM_LAYOUT_COLUMN; + litem->root = layout->root; + litem->align = align; + litem->active = 1; + litem->enabled = 1; + litem->context = layout->context; + litem->space = (litem->align) ? 0 : layout->root->style->buttonspacey; litem->w = layout->w; BLI_addtail(&layout->items, litem); @@ -2220,16 +2220,16 @@ uiLayout *uiLayoutColumnFlow(uiLayout *layout, int number, int align) { uiLayoutItemFlow *flow; - flow= MEM_callocN(sizeof(uiLayoutItemFlow), "uiLayoutItemFlow"); - flow->litem.item.type= ITEM_LAYOUT_COLUMN_FLOW; - flow->litem.root= layout->root; - flow->litem.align= align; - flow->litem.active= 1; - flow->litem.enabled= 1; - flow->litem.context= layout->context; - flow->litem.space= (flow->litem.align)? 0: layout->root->style->columnspace; + flow = MEM_callocN(sizeof(uiLayoutItemFlow), "uiLayoutItemFlow"); + flow->litem.item.type = ITEM_LAYOUT_COLUMN_FLOW; + flow->litem.root = layout->root; + flow->litem.align = align; + flow->litem.active = 1; + flow->litem.enabled = 1; + flow->litem.context = layout->context; + flow->litem.space = (flow->litem.align) ? 0 : layout->root->style->columnspace; flow->litem.w = layout->w; - flow->number= number; + flow->number = number; BLI_addtail(&layout->items, flow); uiBlockSetCurLayout(layout->root->block, &flow->litem); @@ -2241,52 +2241,52 @@ static uiLayoutItemBx *ui_layout_box(uiLayout *layout, int type) { uiLayoutItemBx *box; - box= MEM_callocN(sizeof(uiLayoutItemBx), "uiLayoutItemBx"); - box->litem.item.type= ITEM_LAYOUT_BOX; - box->litem.root= layout->root; - box->litem.active= 1; - box->litem.enabled= 1; - box->litem.context= layout->context; - box->litem.space= layout->root->style->columnspace; + box = MEM_callocN(sizeof(uiLayoutItemBx), "uiLayoutItemBx"); + box->litem.item.type = ITEM_LAYOUT_BOX; + box->litem.root = layout->root; + box->litem.active = 1; + box->litem.enabled = 1; + box->litem.context = layout->context; + box->litem.space = layout->root->style->columnspace; box->litem.w = layout->w; BLI_addtail(&layout->items, box); uiBlockSetCurLayout(layout->root->block, &box->litem); - box->roundbox= uiDefBut(layout->root->block, type, 0, "", 0, 0, 0, 0, NULL, 0.0, 0.0, 0, 0, ""); + box->roundbox = uiDefBut(layout->root->block, type, 0, "", 0, 0, 0, 0, NULL, 0.0, 0.0, 0, 0, ""); return box; } uiLayout *uiLayoutBox(uiLayout *layout) { - return (uiLayout*)ui_layout_box(layout, ROUNDBOX); + return (uiLayout *)ui_layout_box(layout, ROUNDBOX); } uiLayout *uiLayoutListBox(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, PointerRNA *actptr, PropertyRNA *actprop) { - uiLayoutItemBx *box= ui_layout_box(layout, LISTBOX); - uiBut *but= box->roundbox; + uiLayoutItemBx *box = ui_layout_box(layout, LISTBOX); + uiBut *but = box->roundbox; - but->rnasearchpoin= *ptr; - but->rnasearchprop= prop; - but->rnapoin= *actptr; - but->rnaprop= actprop; + but->rnasearchpoin = *ptr; + but->rnasearchprop = prop; + but->rnapoin = *actptr; + but->rnaprop = actprop; - return (uiLayout*)box; + return (uiLayout *)box; } uiLayout *uiLayoutAbsolute(uiLayout *layout, int align) { uiLayout *litem; - litem= MEM_callocN(sizeof(uiLayout), "uiLayoutAbsolute"); - litem->item.type= ITEM_LAYOUT_ABSOLUTE; - litem->root= layout->root; - litem->align= align; - litem->active= 1; - litem->enabled= 1; - litem->context= layout->context; + litem = MEM_callocN(sizeof(uiLayout), "uiLayoutAbsolute"); + litem->item.type = ITEM_LAYOUT_ABSOLUTE; + litem->root = layout->root; + litem->align = align; + litem->active = 1; + litem->enabled = 1; + litem->context = layout->context; BLI_addtail(&layout->items, litem); uiBlockSetCurLayout(layout->root->block, litem); @@ -2298,7 +2298,7 @@ uiBlock *uiLayoutAbsoluteBlock(uiLayout *layout) { uiBlock *block; - block= uiLayoutGetBlock(layout); + block = uiLayoutGetBlock(layout); uiLayoutAbsolute(layout, 0); return block; @@ -2308,12 +2308,12 @@ uiLayout *uiLayoutOverlap(uiLayout *layout) { uiLayout *litem; - litem= MEM_callocN(sizeof(uiLayout), "uiLayoutOverlap"); - litem->item.type= ITEM_LAYOUT_OVERLAP; - litem->root= layout->root; - litem->active= 1; - litem->enabled= 1; - litem->context= layout->context; + litem = MEM_callocN(sizeof(uiLayout), "uiLayoutOverlap"); + litem->item.type = ITEM_LAYOUT_OVERLAP; + litem->root = layout->root; + litem->active = 1; + litem->enabled = 1; + litem->context = layout->context; BLI_addtail(&layout->items, litem); uiBlockSetCurLayout(layout->root->block, litem); @@ -2325,16 +2325,16 @@ uiLayout *uiLayoutSplit(uiLayout *layout, float percentage, int align) { uiLayoutItemSplit *split; - split= MEM_callocN(sizeof(uiLayoutItemSplit), "uiLayoutItemSplit"); - split->litem.item.type= ITEM_LAYOUT_SPLIT; - split->litem.root= layout->root; - split->litem.align= align; - split->litem.active= 1; - split->litem.enabled= 1; - split->litem.context= layout->context; - split->litem.space= layout->root->style->columnspace; - split->litem.w= layout->w; - split->percentage= percentage; + split = MEM_callocN(sizeof(uiLayoutItemSplit), "uiLayoutItemSplit"); + split->litem.item.type = ITEM_LAYOUT_SPLIT; + split->litem.root = layout->root; + split->litem.align = align; + split->litem.active = 1; + split->litem.enabled = 1; + split->litem.context = layout->context; + split->litem.space = layout->root->style->columnspace; + split->litem.w = layout->w; + split->percentage = percentage; BLI_addtail(&layout->items, split); uiBlockSetCurLayout(layout->root->block, &split->litem); @@ -2344,37 +2344,37 @@ uiLayout *uiLayoutSplit(uiLayout *layout, float percentage, int align) void uiLayoutSetActive(uiLayout *layout, int active) { - layout->active= active; + layout->active = active; } void uiLayoutSetEnabled(uiLayout *layout, int enabled) { - layout->enabled= enabled; + layout->enabled = enabled; } void uiLayoutSetRedAlert(uiLayout *layout, int redalert) { - layout->redalert= redalert; + layout->redalert = redalert; } void uiLayoutSetKeepAspect(uiLayout *layout, int keepaspect) { - layout->keepaspect= keepaspect; + layout->keepaspect = keepaspect; } void uiLayoutSetAlignment(uiLayout *layout, int alignment) { - layout->alignment= alignment; + layout->alignment = alignment; } void uiLayoutSetScaleX(uiLayout *layout, float scale) { - layout->scale[0]= scale; + layout->scale[0] = scale; } void uiLayoutSetScaleY(uiLayout *layout, float scale) { - layout->scale[1]= scale; + layout->scale[1] = scale; } int uiLayoutGetActive(uiLayout *layout) @@ -2424,7 +2424,7 @@ static void ui_item_scale(uiLayout *litem, float scale[2]) uiItem *item; int x, y, w, h; - for (item=litem->items.last; item; item=item->prev) { + for (item = litem->items.last; item; item = item->prev) { ui_item_size(item, &w, &h); ui_item_offset(item, &x, &y); @@ -2447,9 +2447,9 @@ static void ui_item_estimate(uiItem *item) uiItem *subitem; if (item->type != ITEM_BUTTON) { - uiLayout *litem= (uiLayout*)item; + uiLayout *litem = (uiLayout *)item; - for (subitem=litem->items.first; subitem; subitem=subitem->next) + for (subitem = litem->items.first; subitem; subitem = subitem->next) ui_item_estimate(subitem); if (litem->items.first == NULL) @@ -2458,7 +2458,7 @@ static void ui_item_estimate(uiItem *item) if (litem->scale[0] != 0.0f || litem->scale[1] != 0.0f) ui_item_scale(litem, litem->scale); - switch(litem->item.type) { + switch (litem->item.type) { case ITEM_LAYOUT_COLUMN: ui_litem_estimate_column(litem); break; @@ -2495,23 +2495,23 @@ static void ui_item_align(uiLayout *litem, short nr) uiButtonItem *bitem; uiLayoutItemBx *box; - for (item=litem->items.last; item; item=item->prev) { + for (item = litem->items.last; item; item = item->prev) { if (item->type == ITEM_BUTTON) { - bitem= (uiButtonItem*)item; + bitem = (uiButtonItem *)item; if (ui_but_can_align(bitem->but)) if (!bitem->but->alignnr) - bitem->but->alignnr= nr; + bitem->but->alignnr = nr; } - else if (item->type == ITEM_LAYOUT_ABSOLUTE); - else if (item->type == ITEM_LAYOUT_OVERLAP); + else if (item->type == ITEM_LAYOUT_ABSOLUTE) ; + else if (item->type == ITEM_LAYOUT_OVERLAP) ; else if (item->type == ITEM_LAYOUT_BOX) { - box= (uiLayoutItemBx*)item; - box->roundbox->alignnr= nr; + box = (uiLayoutItemBx *)item; + box->roundbox->alignnr = nr; BLI_remlink(&litem->root->block->buttons, box->roundbox); BLI_addhead(&litem->root->block->buttons, box->roundbox); } else - ui_item_align((uiLayout*)item, nr); + ui_item_align((uiLayout *)item, nr); } } @@ -2520,13 +2520,13 @@ static void ui_item_flag(uiLayout *litem, int flag) uiItem *item; uiButtonItem *bitem; - for (item=litem->items.last; item; item=item->prev) { + for (item = litem->items.last; item; item = item->prev) { if (item->type == ITEM_BUTTON) { - bitem= (uiButtonItem*)item; + bitem = (uiButtonItem *)item; bitem->but->flag |= flag; } else - ui_item_flag((uiLayout*)item, flag); + ui_item_flag((uiLayout *)item, flag); } } @@ -2535,7 +2535,7 @@ static void ui_item_layout(uiItem *item) uiItem *subitem; if (item->type != ITEM_BUTTON) { - uiLayout *litem= (uiLayout*)item; + uiLayout *litem = (uiLayout *)item; if (litem->items.first == NULL) return; @@ -2547,7 +2547,7 @@ static void ui_item_layout(uiItem *item) if (!litem->enabled) ui_item_flag(litem, UI_BUT_DISABLED); - switch(litem->item.type) { + switch (litem->item.type) { case ITEM_LAYOUT_COLUMN: ui_litem_layout_column(litem); break; @@ -2576,7 +2576,7 @@ static void ui_item_layout(uiItem *item) break; } - for (subitem=litem->items.first; subitem; subitem=subitem->next) + for (subitem = litem->items.first; subitem; subitem = subitem->next) ui_item_layout(subitem); } } @@ -2589,21 +2589,21 @@ static void ui_layout_end(uiBlock *block, uiLayout *layout, int *x, int *y) ui_item_estimate(&layout->item); ui_item_layout(&layout->item); - if (x) *x= layout->x; - if (y) *y= layout->y; + if (x) *x = layout->x; + if (y) *y = layout->y; } static void ui_layout_free(uiLayout *layout) { uiItem *item, *next; - for (item=layout->items.first; item; item=next) { - next= item->next; + for (item = layout->items.first; item; item = next) { + next = item->next; if (item->type == ITEM_BUTTON) MEM_freeN(item); else - ui_layout_free((uiLayout*)item); + ui_layout_free((uiLayout *)item); } MEM_freeN(layout); @@ -2614,37 +2614,37 @@ uiLayout *uiBlockLayout(uiBlock *block, int dir, int type, int x, int y, int siz uiLayout *layout; uiLayoutRoot *root; - root= MEM_callocN(sizeof(uiLayoutRoot), "uiLayoutRoot"); - root->type= type; - root->style= style; - root->block= block; - root->opcontext= WM_OP_INVOKE_REGION_WIN; + root = MEM_callocN(sizeof(uiLayoutRoot), "uiLayoutRoot"); + root->type = type; + root->style = style; + root->block = block; + root->opcontext = WM_OP_INVOKE_REGION_WIN; - layout= MEM_callocN(sizeof(uiLayout), "uiLayout"); - layout->item.type= ITEM_LAYOUT_ROOT; + layout = MEM_callocN(sizeof(uiLayout), "uiLayout"); + layout->item.type = ITEM_LAYOUT_ROOT; - layout->x= x; - layout->y= y; - layout->root= root; - layout->space= style->templatespace; - layout->active= 1; - layout->enabled= 1; - layout->context= NULL; + layout->x = x; + layout->y = y; + layout->root = root; + layout->space = style->templatespace; + layout->active = 1; + layout->enabled = 1; + layout->context = NULL; if (type == UI_LAYOUT_MENU) - layout->space= 0; + layout->space = 0; if (dir == UI_LAYOUT_HORIZONTAL) { - layout->h= size; - layout->root->emh= em*UI_UNIT_Y; + layout->h = size; + layout->root->emh = em * UI_UNIT_Y; } else { - layout->w= size; - layout->root->emw= em*UI_UNIT_X; + layout->w = size; + layout->root->emw = em * UI_UNIT_X; } - block->curlayout= layout; - root->layout= layout; + block->curlayout = layout; + root->layout = layout; BLI_addtail(&block->layouts, root); return layout; @@ -2663,45 +2663,45 @@ int uiLayoutGetOperatorContext(uiLayout *layout) void uiBlockSetCurLayout(uiBlock *block, uiLayout *layout) { - block->curlayout= layout; + block->curlayout = layout; } void ui_layout_add_but(uiLayout *layout, uiBut *but) { uiButtonItem *bitem; - bitem= MEM_callocN(sizeof(uiButtonItem), "uiButtonItem"); - bitem->item.type= ITEM_BUTTON; - bitem->but= but; + bitem = MEM_callocN(sizeof(uiButtonItem), "uiButtonItem"); + bitem->item.type = ITEM_BUTTON; + bitem->but = but; BLI_addtail(&layout->items, bitem); if (layout->context) { - but->context= layout->context; - but->context->used= 1; + but->context = layout->context; + but->context->used = 1; } } void uiLayoutSetOperatorContext(uiLayout *layout, int opcontext) { - layout->root->opcontext= opcontext; + layout->root->opcontext = opcontext; } void uiLayoutSetFunc(uiLayout *layout, uiMenuHandleFunc handlefunc, void *argv) { - layout->root->handlefunc= handlefunc; - layout->root->argv= argv; + layout->root->handlefunc = handlefunc; + layout->root->argv = argv; } void uiBlockLayoutResolve(uiBlock *block, int *x, int *y) { uiLayoutRoot *root; - if (x) *x= 0; - if (y) *y= 0; + if (x) *x = 0; + if (y) *y = 0; - block->curlayout= NULL; + block->curlayout = NULL; - for (root=block->layouts.first; root; root=root->next) { + for (root = block->layouts.first; root; root = root->next) { /* NULL in advance so we don't interfere when adding button */ ui_layout_end(block, root->layout, x, y); ui_layout_free(root->layout); @@ -2718,8 +2718,8 @@ void uiBlockLayoutResolve(uiBlock *block, int *x, int *y) void uiLayoutSetContextPointer(uiLayout *layout, const char *name, PointerRNA *ptr) { - uiBlock *block= layout->root->block; - layout->context= CTX_store_add(&block->contexts, name, ptr); + uiBlock *block = layout->root->block; + layout->context = CTX_store_add(&block->contexts, name, ptr); } @@ -2751,33 +2751,33 @@ static void ui_intro_items(DynStr *ds, ListBase *lb) BLI_dynstr_append(ds, "["); - for (item=lb->first; item; item=item->next) { + for (item = lb->first; item; item = item->next) { BLI_dynstr_append(ds, "{"); /* could also use the INT but this is nicer*/ - switch(item->type) { - case ITEM_BUTTON: BLI_dynstr_append(ds, "'type':'BUTTON', ");break; - case ITEM_LAYOUT_ROW: BLI_dynstr_append(ds, "'type':'ROW', "); break; - case ITEM_LAYOUT_COLUMN: BLI_dynstr_append(ds, "'type':'COLUMN', "); break; - case ITEM_LAYOUT_COLUMN_FLOW:BLI_dynstr_append(ds, "'type':'COLUMN_FLOW', "); break; - case ITEM_LAYOUT_ROW_FLOW: BLI_dynstr_append(ds, "'type':'ROW_FLOW', "); break; - case ITEM_LAYOUT_BOX: BLI_dynstr_append(ds, "'type':'BOX', "); break; - case ITEM_LAYOUT_ABSOLUTE: BLI_dynstr_append(ds, "'type':'ABSOLUTE', "); break; - case ITEM_LAYOUT_SPLIT: BLI_dynstr_append(ds, "'type':'SPLIT', "); break; - case ITEM_LAYOUT_OVERLAP: BLI_dynstr_append(ds, "'type':'OVERLAP', "); break; - case ITEM_LAYOUT_ROOT: BLI_dynstr_append(ds, "'type':'ROOT', "); break; - default: BLI_dynstr_append(ds, "'type':'UNKNOWN', "); break; + switch (item->type) { + case ITEM_BUTTON: BLI_dynstr_append(ds, "'type':'BUTTON', "); break; + case ITEM_LAYOUT_ROW: BLI_dynstr_append(ds, "'type':'ROW', "); break; + case ITEM_LAYOUT_COLUMN: BLI_dynstr_append(ds, "'type':'COLUMN', "); break; + case ITEM_LAYOUT_COLUMN_FLOW: BLI_dynstr_append(ds, "'type':'COLUMN_FLOW', "); break; + case ITEM_LAYOUT_ROW_FLOW: BLI_dynstr_append(ds, "'type':'ROW_FLOW', "); break; + case ITEM_LAYOUT_BOX: BLI_dynstr_append(ds, "'type':'BOX', "); break; + case ITEM_LAYOUT_ABSOLUTE: BLI_dynstr_append(ds, "'type':'ABSOLUTE', "); break; + case ITEM_LAYOUT_SPLIT: BLI_dynstr_append(ds, "'type':'SPLIT', "); break; + case ITEM_LAYOUT_OVERLAP: BLI_dynstr_append(ds, "'type':'OVERLAP', "); break; + case ITEM_LAYOUT_ROOT: BLI_dynstr_append(ds, "'type':'ROOT', "); break; + default: BLI_dynstr_append(ds, "'type':'UNKNOWN', "); break; } - switch(item->type) { - case ITEM_BUTTON: - ui_intro_button(ds, (uiButtonItem *)item); - break; - default: - BLI_dynstr_append(ds, "'items':"); - ui_intro_items(ds, &((uiLayout*)item)->items); - break; + switch (item->type) { + case ITEM_BUTTON: + ui_intro_button(ds, (uiButtonItem *)item); + break; + default: + BLI_dynstr_append(ds, "'items':"); + ui_intro_items(ds, &((uiLayout *)item)->items); + break; } BLI_dynstr_append(ds, "}"); @@ -2796,7 +2796,7 @@ static void ui_intro_uiLayout(DynStr *ds, uiLayout *layout) static char *str = NULL; // XXX, constant re-freeing, far from ideal. const char *uiLayoutIntrospect(uiLayout *layout) { - DynStr *ds= BLI_dynstr_new(); + DynStr *ds = BLI_dynstr_new(); if (str) { MEM_freeN(str); @@ -2816,11 +2816,11 @@ static void ui_layout_operator_buts__reset_cb(bContext *UNUSED(C), void *op_pt, } /* this function does not initialize the layout, functions can be called on the layout before and after */ -void uiLayoutOperatorButs(const bContext *C, uiLayout *layout, wmOperator *op,int (*check_prop)(struct PointerRNA *, struct PropertyRNA *), const char label_align, const short flag) +void uiLayoutOperatorButs(const bContext *C, uiLayout *layout, wmOperator *op, int (*check_prop)(struct PointerRNA *, struct PropertyRNA *), const char label_align, const short flag) { if (!op->properties) { IDPropertyTemplate val = {0}; - op->properties= IDP_New(IDP_GROUP, &val, "wmOperatorProperties"); + op->properties = IDP_New(IDP_GROUP, &val, "wmOperatorProperties"); } if (flag & UI_LAYOUT_OP_SHOW_TITLE) { @@ -2840,37 +2840,37 @@ void uiLayoutOperatorButs(const bContext *C, uiLayout *layout, wmOperator *op,in PointerRNA op_ptr; uiLayout *row; - uiLayoutGetBlock(layout)->ui_operator= op; + uiLayoutGetBlock(layout)->ui_operator = op; - row= uiLayoutRow(layout, TRUE); + row = uiLayoutRow(layout, TRUE); uiItemM(row, (bContext *)C, "WM_MT_operator_presets", NULL, ICON_NONE); WM_operator_properties_create(&op_ptr, "WM_OT_operator_preset_add"); RNA_string_set(&op_ptr, "operator", op->type->idname); - op_ptr= uiItemFullO(row, "WM_OT_operator_preset_add", "", ICON_ZOOMIN, op_ptr.data, WM_OP_INVOKE_DEFAULT, 0); + op_ptr = uiItemFullO(row, "WM_OT_operator_preset_add", "", ICON_ZOOMIN, op_ptr.data, WM_OP_INVOKE_DEFAULT, 0); WM_operator_properties_create(&op_ptr, "WM_OT_operator_preset_add"); RNA_string_set(&op_ptr, "operator", op->type->idname); RNA_boolean_set(&op_ptr, "remove_active", TRUE); - op_ptr= uiItemFullO(row, "WM_OT_operator_preset_add", "", ICON_ZOOMOUT, op_ptr.data, WM_OP_INVOKE_DEFAULT, 0); + op_ptr = uiItemFullO(row, "WM_OT_operator_preset_add", "", ICON_ZOOMOUT, op_ptr.data, WM_OP_INVOKE_DEFAULT, 0); } if (op->type->ui) { - op->layout= layout; - op->type->ui((bContext*)C, op); - op->layout= NULL; + op->layout = layout; + op->type->ui((bContext *)C, op); + op->layout = NULL; /* UI_LAYOUT_OP_SHOW_EMPTY ignored */ } else { - wmWindowManager *wm= CTX_wm_manager(C); + wmWindowManager *wm = CTX_wm_manager(C); PointerRNA ptr; int empty; RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr); /* main draw call */ - empty= uiDefAutoButsRNA(layout, &ptr, check_prop, label_align) == 0; + empty = uiDefAutoButsRNA(layout, &ptr, check_prop, label_align) == 0; if (empty && (flag & UI_LAYOUT_OP_SHOW_EMPTY)) { uiItemL(layout, IFACE_("No Properties"), ICON_NONE); @@ -2885,9 +2885,9 @@ void uiLayoutOperatorButs(const bContext *C, uiLayout *layout, wmOperator *op,in uiBut *but; uiLayout *col; /* needed to avoid alignment errors with previous buttons */ - col= uiLayoutColumn(layout, 0); - block= uiLayoutGetBlock(col); - but = uiDefIconTextBut(block , BUT, 0, ICON_FILE_REFRESH, IFACE_("Reset"), 0, 0, 18, 20, + col = uiLayoutColumn(layout, 0); + block = uiLayoutGetBlock(col); + but = uiDefIconTextBut(block, BUT, 0, ICON_FILE_REFRESH, IFACE_("Reset"), 0, 0, 18, 20, NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Reset operator defaults")); uiButSetFunc(but, ui_layout_operator_buts__reset_cb, op, NULL); } @@ -2896,7 +2896,7 @@ void uiLayoutOperatorButs(const bContext *C, uiLayout *layout, wmOperator *op,in { uiBut *but; - for (but= uiLayoutGetBlock(layout)->buttons.first; but; but= but->next) { + for (but = uiLayoutGetBlock(layout)->buttons.first; but; but = but->next) { /* no undo for buttons for operator redo panels */ uiButClearFlag(but, UI_BUT_UNDO); diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c index 4e97a38fe25..34116f24901 100644 --- a/source/blender/editors/interface/interface_ops.c +++ b/source/blender/editors/interface/interface_ops.c @@ -78,7 +78,7 @@ static int eyedropper_init(bContext *C, wmOperator *op) { Eyedropper *eye; - op->customdata= eye= MEM_callocN(sizeof(Eyedropper), "Eyedropper"); + op->customdata = eye = MEM_callocN(sizeof(Eyedropper), "Eyedropper"); uiContextActiveProperty(C, &eye->ptr, &eye->prop, &eye->index); @@ -91,7 +91,7 @@ static void eyedropper_exit(bContext *C, wmOperator *op) if (op->customdata) MEM_freeN(op->customdata); - op->customdata= NULL; + op->customdata = NULL; } static int eyedropper_cancel(bContext *C, wmOperator *op) @@ -130,12 +130,12 @@ static int eyedropper_modal(bContext *C, wmOperator *op, wmEvent *event) { Eyedropper *eye = (Eyedropper *)op->customdata; - switch(event->type) { + switch (event->type) { case ESCKEY: case RIGHTMOUSE: return eyedropper_cancel(C, op); case LEFTMOUSE: - if (event->val==KM_RELEASE) { + if (event->val == KM_RELEASE) { eyedropper_sample(C, eye, event->x, event->y); eyedropper_exit(C, op); return OPERATOR_FINISHED; @@ -165,7 +165,7 @@ static int eyedropper_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event) } /* Repeat operator */ -static int eyedropper_exec (bContext *C, wmOperator *op) +static int eyedropper_exec(bContext *C, wmOperator *op) { /* init */ if (eyedropper_init(C, op)) { @@ -239,14 +239,14 @@ static int copy_data_path_button_exec(bContext *C, wmOperator *UNUSED(op)) PointerRNA ptr; PropertyRNA *prop; char *path; - int success= 0; + int success = 0; int index; /* try to create driver using property retrieved from UI */ uiContextActiveProperty(C, &ptr, &prop, &index); if (ptr.id.data && ptr.data && prop) { - path= RNA_path_from_ID_to_property(&ptr, prop); + path = RNA_path_from_ID_to_property(&ptr, prop); if (path) { WM_clipboard_text_set(path, FALSE); @@ -255,7 +255,7 @@ static int copy_data_path_button_exec(bContext *C, wmOperator *UNUSED(op)) } /* since we're just copying, we don't really need to do anything else...*/ - return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED; + return (success) ? OPERATOR_FINISHED : OPERATOR_CANCELLED; } static void UI_OT_copy_data_path_button(wmOperatorType *ot) @@ -290,7 +290,7 @@ static int reset_default_button_exec(bContext *C, wmOperator *op) { PointerRNA ptr; PropertyRNA *prop; - int success= 0; + int success = 0; int index, all = RNA_boolean_get(op->ptr, "all"); /* try to reset the nominated setting to its default value */ @@ -298,14 +298,14 @@ static int reset_default_button_exec(bContext *C, wmOperator *op) /* if there is a valid property that is editable... */ if (ptr.data && prop && RNA_property_editable(&ptr, prop)) { - if (RNA_property_reset(&ptr, prop, (all)? -1: index)) { + if (RNA_property_reset(&ptr, prop, (all) ? -1 : index)) { /* perform updates required for this property */ RNA_property_update(C, &ptr, prop); /* as if we pressed the button */ uiContextActivePropertyHandle(C); - success= 1; + success = 1; } } @@ -313,7 +313,7 @@ static int reset_default_button_exec(bContext *C, wmOperator *op) * edits on the screen or on operator settings. * it might be better to move undo's inline - campbell */ if (success) { - ID *id= ptr.id.data; + ID *id = ptr.id.data; if (id && ID_CHECK_UNDO(id)) { /* do nothing, go ahead with undo */ } @@ -323,7 +323,7 @@ static int reset_default_button_exec(bContext *C, wmOperator *op) } /* end hack */ - return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED; + return (success) ? OPERATOR_FINISHED : OPERATOR_CANCELLED; } static void UI_OT_reset_default_button(wmOperatorType *ot) @@ -366,7 +366,7 @@ static int copy_to_selected_button_poll(bContext *C) { PointerRNA ptr; PropertyRNA *prop; - int index, success= 0; + int index, success = 0; uiContextActiveProperty(C, &ptr, &prop, &index); @@ -375,9 +375,9 @@ static int copy_to_selected_button_poll(bContext *C) ListBase lb; if (copy_to_selected_list(C, &ptr, &lb)) { - for (link= lb.first; link; link=link->next) + for (link = lb.first; link; link = link->next) if (link->ptr.data != ptr.data && RNA_property_editable(&link->ptr, prop)) - success= 1; + success = 1; BLI_freelistN(&lb); } @@ -390,7 +390,7 @@ static int copy_to_selected_button_exec(bContext *C, wmOperator *op) { PointerRNA ptr; PropertyRNA *prop; - int success= 0; + int success = 0; int index, all = RNA_boolean_get(op->ptr, "all"); /* try to reset the nominated setting to its default value */ @@ -402,11 +402,11 @@ static int copy_to_selected_button_exec(bContext *C, wmOperator *op) ListBase lb; if (copy_to_selected_list(C, &ptr, &lb)) { - for (link= lb.first; link; link=link->next) { + for (link = lb.first; link; link = link->next) { if (link->ptr.data != ptr.data && RNA_property_editable(&link->ptr, prop)) { - if (RNA_property_copy(&link->ptr, &ptr, prop, (all)? -1: index)) { + if (RNA_property_copy(&link->ptr, &ptr, prop, (all) ? -1 : index)) { RNA_property_update(C, &link->ptr, prop); - success= 1; + success = 1; } } } @@ -415,7 +415,7 @@ static int copy_to_selected_button_exec(bContext *C, wmOperator *op) } } - return (success)? OPERATOR_FINISHED: OPERATOR_CANCELLED; + return (success) ? OPERATOR_FINISHED : OPERATOR_CANCELLED; } static void UI_OT_copy_to_selected_button(wmOperatorType *ot) @@ -430,7 +430,7 @@ static void UI_OT_copy_to_selected_button(wmOperatorType *ot) ot->exec = copy_to_selected_button_exec; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ RNA_def_boolean(ot->srna, "all", 1, "All", "Reset to default values all elements of the array"); @@ -460,7 +460,7 @@ static int reports_to_text_exec(bContext *C, wmOperator *UNUSED(op)) * - if commandline debug option enabled, show debug reports too * - otherwise, up to info (which is what users normally see) */ - str = BKE_reports_string(reports, (G.f & G_DEBUG)? RPT_DEBUG : RPT_INFO); + str = BKE_reports_string(reports, (G.f & G_DEBUG) ? RPT_DEBUG : RPT_INFO); if (str) { write_text(txt, str); @@ -502,7 +502,7 @@ struct uiEditSourceButStore { } uiEditSourceButStore; /* should only ever be set while the edit source operator is running */ -static struct uiEditSourceStore *ui_editsource_info= NULL; +static struct uiEditSourceStore *ui_editsource_info = NULL; int UI_editsource_enable_check(void) { @@ -513,7 +513,7 @@ static void ui_editsource_active_but_set(uiBut *but) { BLI_assert(ui_editsource_info == NULL); - ui_editsource_info= MEM_callocN(sizeof(uiEditSourceStore), __func__); + ui_editsource_info = MEM_callocN(sizeof(uiEditSourceStore), __func__); memcpy(&ui_editsource_info->but_orig, but, sizeof(uiBut)); ui_editsource_info->hash = BLI_ghash_new(BLI_ghashutil_ptrhash, @@ -525,7 +525,7 @@ static void ui_editsource_active_but_clear(void) { BLI_ghash_free(ui_editsource_info->hash, NULL, (GHashValFreeFP)MEM_freeN); MEM_freeN(ui_editsource_info); - ui_editsource_info= NULL; + ui_editsource_info = NULL; } static int ui_editsource_uibut_match(uiBut *but_a, uiBut *but_b) @@ -538,16 +538,16 @@ static int ui_editsource_uibut_match(uiBut *but_a, uiBut *but_b) /* this just needs to be a 'good-enough' comparison so we can know beyond * reasonable doubt that these buttons are the same between redraws. * if this fails it only means edit-source fails - campbell */ - if ( (but_a->x1 == but_b->x1) && - (but_a->x2 == but_b->x2) && - (but_a->y1 == but_b->y1) && - (but_a->y2 == but_b->y2) && - (but_a->type == but_b->type) && - (but_a->rnaprop == but_b->rnaprop) && - (but_a->optype == but_b->optype) && - (but_a->unit_type == but_b->unit_type) && - strncmp(but_a->drawstr, but_b->drawstr, UI_MAX_DRAW_STR) == 0 - ) { + if ((but_a->x1 == but_b->x1) && + (but_a->x2 == but_b->x2) && + (but_a->y1 == but_b->y1) && + (but_a->y2 == but_b->y2) && + (but_a->type == but_b->type) && + (but_a->rnaprop == but_b->rnaprop) && + (but_a->optype == but_b->optype) && + (but_a->unit_type == but_b->unit_type) && + (strncmp(but_a->drawstr, but_b->drawstr, UI_MAX_DRAW_STR) == 0)) + { return TRUE; } else { @@ -559,10 +559,10 @@ void UI_editsource_active_but_test(uiBut *but) { extern void PyC_FileAndNum_Safe(const char **filename, int *lineno); - struct uiEditSourceButStore *but_store= MEM_callocN(sizeof(uiEditSourceButStore), __func__); + struct uiEditSourceButStore *but_store = MEM_callocN(sizeof(uiEditSourceButStore), __func__); const char *fn; - int lineno= -1; + int lineno = -1; #if 0 printf("comparing buttons: '%s' == '%s'\n", @@ -573,12 +573,12 @@ void UI_editsource_active_but_test(uiBut *but) if (lineno != -1) { BLI_strncpy(but_store->py_dbg_fn, fn, - sizeof(but_store->py_dbg_fn)); - but_store->py_dbg_ln= lineno; + sizeof(but_store->py_dbg_fn)); + but_store->py_dbg_ln = lineno; } else { - but_store->py_dbg_fn[0]= '\0'; - but_store->py_dbg_ln= -1; + but_store->py_dbg_fn[0] = '\0'; + but_store->py_dbg_ln = -1; } BLI_ghash_insert(ui_editsource_info->hash, but, but_store); @@ -589,17 +589,17 @@ void UI_editsource_active_but_test(uiBut *but) static int editsource_text_edit(bContext *C, wmOperator *op, char filepath[FILE_MAX], int line) { - struct Main *bmain= CTX_data_main(C); + struct Main *bmain = CTX_data_main(C); Text *text; - for (text=bmain->text.first; text; text=text->id.next) { + for (text = bmain->text.first; text; text = text->id.next) { if (text->name && BLI_path_cmp(text->name, filepath) == 0) { break; } } if (text == NULL) { - text= add_text(filepath, bmain->name); + text = add_text(filepath, bmain->name); } if (text == NULL) { @@ -610,10 +610,10 @@ static int editsource_text_edit(bContext *C, wmOperator *op, else { /* naughty!, find text area to set, not good behavior * but since this is a dev tool lets allow it - campbell */ - ScrArea *sa= BKE_screen_find_big_area(CTX_wm_screen(C), SPACE_TEXT, 0); + ScrArea *sa = BKE_screen_find_big_area(CTX_wm_screen(C), SPACE_TEXT, 0); if (sa) { - SpaceText *st= sa->spacedata.first; - st->text= text; + SpaceText *st = sa->spacedata.first; + st->text = text; } else { BKE_reportf(op->reports, RPT_INFO, @@ -621,7 +621,7 @@ static int editsource_text_edit(bContext *C, wmOperator *op, } txt_move_toline(text, line - 1, FALSE); - WM_event_add_notifier(C, NC_TEXT|ND_CURSOR, text); + WM_event_add_notifier(C, NC_TEXT | ND_CURSOR, text); } return OPERATOR_FINISHED; @@ -629,13 +629,13 @@ static int editsource_text_edit(bContext *C, wmOperator *op, static int editsource_exec(bContext *C, wmOperator *op) { - uiBut *but= uiContextActiveButton(C); + uiBut *but = uiContextActiveButton(C); if (but) { GHashIterator ghi; - struct uiEditSourceButStore *but_store= NULL; + struct uiEditSourceButStore *but_store = NULL; - ARegion *ar= CTX_wm_region(C); + ARegion *ar = CTX_wm_region(C); int ret; /* needed else the active button does not get tested */ @@ -650,12 +650,12 @@ static int editsource_exec(bContext *C, wmOperator *op) ED_region_do_draw(C, ar); for (BLI_ghashIterator_init(&ghi, ui_editsource_info->hash); - !BLI_ghashIterator_isDone(&ghi); - BLI_ghashIterator_step(&ghi)) + !BLI_ghashIterator_isDone(&ghi); + BLI_ghashIterator_step(&ghi)) { - uiBut *but= BLI_ghashIterator_getKey(&ghi); + uiBut *but = BLI_ghashIterator_getKey(&ghi); if (but && ui_editsource_uibut_match(&ui_editsource_info->but_orig, but)) { - but_store= BLI_ghashIterator_getValue(&ghi); + but_store = BLI_ghashIterator_getValue(&ghi); break; } @@ -663,20 +663,20 @@ static int editsource_exec(bContext *C, wmOperator *op) if (but_store) { if (but_store->py_dbg_ln != -1) { - ret= editsource_text_edit(C, op, - but_store->py_dbg_fn, - but_store->py_dbg_ln); + ret = editsource_text_edit(C, op, + but_store->py_dbg_fn, + but_store->py_dbg_ln); } else { BKE_report(op->reports, RPT_ERROR, - "Active button isn't from a script, cant edit source."); - ret= OPERATOR_CANCELLED; + "Active button isn't from a script, cant edit source."); + ret = OPERATOR_CANCELLED; } } else { BKE_report(op->reports, RPT_ERROR, - "Active button match can't be found."); - ret= OPERATOR_CANCELLED; + "Active button match can't be found."); + ret = OPERATOR_CANCELLED; } diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index 08c96aaf0fb..0be1761eaf5 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -65,15 +65,15 @@ /*********************** defines and structs ************************/ -#define ANIMATION_TIME 0.30 -#define ANIMATION_INTERVAL 0.02 +#define ANIMATION_TIME 0.30 +#define ANIMATION_INTERVAL 0.02 -#define PNL_LAST_ADDED 1 -#define PNL_ACTIVE 2 -#define PNL_WAS_ACTIVE 4 -#define PNL_ANIM_ALIGN 8 -#define PNL_NEW_ADDED 16 -#define PNL_FIRST 32 +#define PNL_LAST_ADDED 1 +#define PNL_ACTIVE 2 +#define PNL_WAS_ACTIVE 4 +#define PNL_ANIM_ALIGN 8 +#define PNL_NEW_ADDED 16 +#define PNL_FIRST 32 typedef enum uiHandlePanelState { PANEL_STATE_DRAG, @@ -103,15 +103,15 @@ static void panel_activate_state(const bContext *C, Panel *pa, uiHandlePanelStat static int panel_aligned(ScrArea *sa, ARegion *ar) { - if (sa->spacetype==SPACE_BUTS && ar->regiontype == RGN_TYPE_WINDOW) { - SpaceButs *sbuts= sa->spacedata.first; + if (sa->spacetype == SPACE_BUTS && ar->regiontype == RGN_TYPE_WINDOW) { + SpaceButs *sbuts = sa->spacedata.first; return sbuts->align; } - else if (sa->spacetype==SPACE_USERPREF && ar->regiontype == RGN_TYPE_WINDOW) + else if (sa->spacetype == SPACE_USERPREF && ar->regiontype == RGN_TYPE_WINDOW) return BUT_VERTICAL; - else if (sa->spacetype==SPACE_FILE && ar->regiontype == RGN_TYPE_CHANNELS) + else if (sa->spacetype == SPACE_FILE && ar->regiontype == RGN_TYPE_CHANNELS) return BUT_VERTICAL; - else if (sa->spacetype==SPACE_IMAGE && ar->regiontype == RGN_TYPE_PREVIEW) + else if (sa->spacetype == SPACE_IMAGE && ar->regiontype == RGN_TYPE_PREVIEW) return BUT_VERTICAL; else if (ELEM3(ar->regiontype, RGN_TYPE_UI, RGN_TYPE_TOOLS, RGN_TYPE_TOOL_PROPS)) return BUT_VERTICAL; @@ -122,39 +122,39 @@ static int panel_aligned(ScrArea *sa, ARegion *ar) static int panels_re_align(ScrArea *sa, ARegion *ar, Panel **r_pa) { Panel *pa; - int active= 0; + int active = 0; - *r_pa= NULL; + *r_pa = NULL; - if (sa->spacetype==SPACE_BUTS && ar->regiontype == RGN_TYPE_WINDOW) { - SpaceButs *sbuts= sa->spacedata.first; + if (sa->spacetype == SPACE_BUTS && ar->regiontype == RGN_TYPE_WINDOW) { + SpaceButs *sbuts = sa->spacedata.first; if (sbuts->align) - if (sbuts->re_align || sbuts->mainbo!=sbuts->mainb) + if (sbuts->re_align || sbuts->mainbo != sbuts->mainb) return 1; } - else if (ar->regiontype==RGN_TYPE_UI) + else if (ar->regiontype == RGN_TYPE_UI) return 1; - else if (sa->spacetype==SPACE_IMAGE && ar->regiontype == RGN_TYPE_PREVIEW) + else if (sa->spacetype == SPACE_IMAGE && ar->regiontype == RGN_TYPE_PREVIEW) return 1; - else if (sa->spacetype==SPACE_FILE && ar->regiontype == RGN_TYPE_CHANNELS) + else if (sa->spacetype == SPACE_FILE && ar->regiontype == RGN_TYPE_CHANNELS) return 1; /* in case panel is added or disappears */ - for (pa=ar->panels.first; pa; pa=pa->next) { + for (pa = ar->panels.first; pa; pa = pa->next) { if ((pa->runtime_flag & PNL_WAS_ACTIVE) && !(pa->runtime_flag & PNL_ACTIVE)) return 1; if (!(pa->runtime_flag & PNL_WAS_ACTIVE) && (pa->runtime_flag & PNL_ACTIVE)) return 1; if (pa->activedata) - active= 1; + active = 1; } /* in case we need to do an animation (size changes) */ - for (pa=ar->panels.first; pa; pa=pa->next) { + for (pa = ar->panels.first; pa; pa = pa->next) { if (pa->runtime_flag & PNL_ANIM_ALIGN) { if (!active) - *r_pa= pa; + *r_pa = pa; return 1; } } @@ -168,35 +168,35 @@ static void ui_panel_copy_offset(Panel *pa, Panel *papar) { /* with respect to sizes... papar is parent */ - pa->ofsx= papar->ofsx; - pa->ofsy= papar->ofsy + papar->sizey-pa->sizey; + pa->ofsx = papar->ofsx; + pa->ofsy = papar->ofsy + papar->sizey - pa->sizey; } Panel *uiBeginPanel(ScrArea *sa, ARegion *ar, uiBlock *block, PanelType *pt, int *open) { Panel *pa, *patab, *palast, *panext; - char *drawname= pt->label; - char *idname= pt->idname; - char *tabname= pt->idname; - char *hookname= NULL; + char *drawname = pt->label; + char *idname = pt->idname; + char *tabname = pt->idname; + char *hookname = NULL; int newpanel; - int align= panel_aligned(sa, ar); + int align = panel_aligned(sa, ar); /* check if Panel exists, then use that one */ - for (pa=ar->panels.first; pa; pa=pa->next) - if (strncmp(pa->panelname, idname, UI_MAX_NAME_STR)==0) - if (strncmp(pa->tabname, tabname, UI_MAX_NAME_STR)==0) + for (pa = ar->panels.first; pa; pa = pa->next) + if (strncmp(pa->panelname, idname, UI_MAX_NAME_STR) == 0) + if (strncmp(pa->tabname, tabname, UI_MAX_NAME_STR) == 0) break; - newpanel= (pa == NULL); + newpanel = (pa == NULL); if (!newpanel) { - pa->type= pt; + pa->type = pt; } else { /* new panel */ - pa= MEM_callocN(sizeof(Panel), "new panel"); - pa->type= pt; + pa = MEM_callocN(sizeof(Panel), "new panel"); + pa->type = pt; BLI_strncpy(pa->panelname, idname, UI_MAX_NAME_STR); BLI_strncpy(pa->tabname, tabname, UI_MAX_NAME_STR); @@ -207,21 +207,21 @@ Panel *uiBeginPanel(ScrArea *sa, ARegion *ar, uiBlock *block, PanelType *pt, int pa->flag |= PNL_CLOSEDX; } - pa->ofsx= 0; - pa->ofsy= 0; - pa->sizex= 0; - pa->sizey= 0; + pa->ofsx = 0; + pa->ofsy = 0; + pa->sizex = 0; + pa->sizey = 0; pa->runtime_flag |= PNL_NEW_ADDED; BLI_addtail(&ar->panels, pa); /* make new Panel tabbed? */ if (hookname) { - for (patab= ar->panels.first; patab; patab= patab->next) { - if ((patab->runtime_flag & PNL_ACTIVE) && patab->paneltab==NULL) { - if (strncmp(hookname, patab->panelname, UI_MAX_NAME_STR)==0) { - if (strncmp(tabname, patab->tabname, UI_MAX_NAME_STR)==0) { - pa->paneltab= patab; + for (patab = ar->panels.first; patab; patab = patab->next) { + if ((patab->runtime_flag & PNL_ACTIVE) && patab->paneltab == NULL) { + if (strncmp(hookname, patab->panelname, UI_MAX_NAME_STR) == 0) { + if (strncmp(tabname, patab->tabname, UI_MAX_NAME_STR) == 0) { + pa->paneltab = patab; ui_panel_copy_offset(pa, patab); break; } @@ -236,14 +236,14 @@ Panel *uiBeginPanel(ScrArea *sa, ARegion *ar, uiBlock *block, PanelType *pt, int /* if a new panel is added, we insert it right after the panel * that was last added. this way new panels are inserted in the * right place between versions */ - for (palast=ar->panels.first; palast; palast=palast->next) + for (palast = ar->panels.first; palast; palast = palast->next) if (palast->runtime_flag & PNL_LAST_ADDED) break; if (newpanel) { - pa->sortorder= (palast)? palast->sortorder+1: 0; + pa->sortorder = (palast) ? palast->sortorder + 1 : 0; - for (panext=ar->panels.first; panext; panext=panext->next) + for (panext = ar->panels.first; panext; panext = panext->next) if (panext != pa && panext->sortorder >= pa->sortorder) panext->sortorder++; } @@ -252,63 +252,63 @@ Panel *uiBeginPanel(ScrArea *sa, ARegion *ar, uiBlock *block, PanelType *pt, int palast->runtime_flag &= ~PNL_LAST_ADDED; /* assign to block */ - block->panel= pa; - pa->runtime_flag |= PNL_ACTIVE|PNL_LAST_ADDED; + block->panel = pa; + pa->runtime_flag |= PNL_ACTIVE | PNL_LAST_ADDED; - *open= 0; + *open = 0; if (pa->paneltab) return pa; if (pa->flag & PNL_CLOSED) return pa; - *open= 1; + *open = 1; return pa; } void uiEndPanel(uiBlock *block, int width, int height) { - Panel *pa= block->panel; + Panel *pa = block->panel; if (pa->runtime_flag & PNL_NEW_ADDED) { pa->runtime_flag &= ~PNL_NEW_ADDED; - pa->sizex= width; - pa->sizey= height; + pa->sizex = width; + pa->sizey = height; } else { /* check if we need to do an animation */ if (!ELEM(width, 0, pa->sizex) || !ELEM(height, 0, pa->sizey)) { pa->runtime_flag |= PNL_ANIM_ALIGN; if (height != 0) - pa->ofsy += pa->sizey-height; + pa->ofsy += pa->sizey - height; } /* update width/height if non-zero */ if (width != 0) - pa->sizex= width; + pa->sizex = width; if (height != 0) - pa->sizey= height; + pa->sizey = height; } } static void ui_offset_panel_block(uiBlock *block) { - uiStyle *style= UI_GetStyle(); + uiStyle *style = UI_GetStyle(); uiBut *but; int ofsy; /* compute bounds and offset */ ui_bounds_block(block); - ofsy= block->panel->sizey - style->panelspace; + ofsy = block->panel->sizey - style->panelspace; - for (but= block->buttons.first; but; but=but->next) { + for (but = block->buttons.first; but; but = but->next) { but->y1 += ofsy; but->y2 += ofsy; } - block->maxx= block->panel->sizex; - block->maxy= block->panel->sizey; - block->minx= block->miny= 0.0; + block->maxx = block->panel->sizex; + block->maxy = block->panel->sizey; + block->minx = block->miny = 0.0; } /**************************** drawing *******************************/ @@ -332,27 +332,27 @@ static void uiPanelPop(uiBlock *UNUSED(block)) /* triangle 'icon' for panel header */ void UI_DrawTriIcon(float x, float y, char dir) { - if (dir=='h') { - ui_draw_anti_tria( x-3, y-5, x-3, y+5, x+7,y ); + if (dir == 'h') { + ui_draw_anti_tria(x - 3, y - 5, x - 3, y + 5, x + 7, y); } - else if (dir=='t') { - ui_draw_anti_tria( x-5, y-7, x+5, y-7, x, y+3); + else if (dir == 't') { + ui_draw_anti_tria(x - 5, y - 7, x + 5, y - 7, x, y + 3); } else { /* 'v' = vertical, down */ - ui_draw_anti_tria( x-5, y+3, x+5, y+3, x, y-7); + ui_draw_anti_tria(x - 5, y + 3, x + 5, y + 3, x, y - 7); } } /* triangle 'icon' inside rect */ static void ui_draw_tria_rect(rctf *rect, char dir) { - if (dir=='h') { - float half= 0.5f*(rect->ymax - rect->ymin); - ui_draw_anti_tria(rect->xmin, rect->ymin, rect->xmin, rect->ymax, rect->xmax, rect->ymin+half); + if (dir == 'h') { + float half = 0.5f * (rect->ymax - rect->ymin); + ui_draw_anti_tria(rect->xmin, rect->ymin, rect->xmin, rect->ymax, rect->xmax, rect->ymin + half); } else { - float half= 0.5f*(rect->xmax - rect->xmin); - ui_draw_anti_tria(rect->xmin, rect->ymax, rect->xmax, rect->ymax, rect->xmin+half, rect->ymin); + float half = 0.5f * (rect->xmax - rect->xmin); + ui_draw_anti_tria(rect->xmin, rect->ymax, rect->xmax, rect->ymax, rect->xmin + half, rect->ymin); } } @@ -379,33 +379,33 @@ static void ui_draw_anti_x(float x1, float y1, float x2, float y2) static void ui_draw_x_icon(float x, float y) { - ui_draw_anti_x(x, y, x+9.375f, y+9.375f); + ui_draw_anti_x(x, y, x + 9.375f, y + 9.375f); } -#define PNL_ICON UI_UNIT_X /* could be UI_UNIT_Y too */ +#define PNL_ICON UI_UNIT_X /* could be UI_UNIT_Y too */ static void ui_draw_panel_scalewidget(rcti *rect) { float xmin, xmax, dx; float ymin, ymax, dy; - xmin= rect->xmax-PNL_HEADER+2; - xmax= rect->xmax-3; - ymin= rect->ymin+3; - ymax= rect->ymin+PNL_HEADER-2; + xmin = rect->xmax - PNL_HEADER + 2; + xmax = rect->xmax - 3; + ymin = rect->ymin + 3; + ymax = rect->ymin + PNL_HEADER - 2; - dx= 0.5f*(xmax-xmin); - dy= 0.5f*(ymax-ymin); + dx = 0.5f * (xmax - xmin); + dy = 0.5f * (ymax - ymin); glEnable(GL_BLEND); glColor4ub(255, 255, 255, 50); fdrawline(xmin, ymin, xmax, ymax); - fdrawline(xmin+dx, ymin, xmax, ymax-dy); + fdrawline(xmin + dx, ymin, xmax, ymax - dy); glColor4ub(0, 0, 0, 50); - fdrawline(xmin, ymin+1, xmax, ymax+1); - fdrawline(xmin+dx, ymin+1, xmax, ymax-dy+1); + fdrawline(xmin, ymin + 1, xmax, ymax + 1); + fdrawline(xmin + dx, ymin + 1, xmax, ymax - dy + 1); glDisable(GL_BLEND); } @@ -414,64 +414,64 @@ static void ui_draw_panel_dragwidget(rctf *rect) float xmin, xmax, dx; float ymin, ymax, dy; - xmin= rect->xmin; - xmax= rect->xmax; - ymin= rect->ymin; - ymax= rect->ymax; + xmin = rect->xmin; + xmax = rect->xmax; + ymin = rect->ymin; + ymax = rect->ymax; - dx= 0.333f*(xmax-xmin); - dy= 0.333f*(ymax-ymin); + dx = 0.333f * (xmax - xmin); + dy = 0.333f * (ymax - ymin); glEnable(GL_BLEND); glColor4ub(255, 255, 255, 50); fdrawline(xmin, ymax, xmax, ymin); - fdrawline(xmin+dx, ymax, xmax, ymin+dy); - fdrawline(xmin+2*dx, ymax, xmax, ymin+2*dy); + fdrawline(xmin + dx, ymax, xmax, ymin + dy); + fdrawline(xmin + 2 * dx, ymax, xmax, ymin + 2 * dy); glColor4ub(0, 0, 0, 50); - fdrawline(xmin, ymax+1, xmax, ymin+1); - fdrawline(xmin+dx, ymax+1, xmax, ymin+dy+1); - fdrawline(xmin+2*dx, ymax+1, xmax, ymin+2*dy+1); + fdrawline(xmin, ymax + 1, xmax, ymin + 1); + fdrawline(xmin + dx, ymax + 1, xmax, ymin + dy + 1); + fdrawline(xmin + 2 * dx, ymax + 1, xmax, ymin + 2 * dy + 1); glDisable(GL_BLEND); } static void ui_draw_aligned_panel_header(uiStyle *style, uiBlock *block, rcti *rect, char dir) { - Panel *panel= block->panel; + Panel *panel = block->panel; rcti hrect; - int pnl_icons; + int pnl_icons; const char *activename = IFACE_(panel->drawname[0] ? panel->drawname : panel->panelname); /* + 0.001f to avoid flirting with float inaccuracy */ - if (panel->control & UI_PNL_CLOSE) pnl_icons=(panel->labelofs+2*PNL_ICON+5)/block->aspect + 0.001f; - else pnl_icons= (panel->labelofs+PNL_ICON+5)/block->aspect + 0.001f; + if (panel->control & UI_PNL_CLOSE) pnl_icons = (panel->labelofs + 2 * PNL_ICON + 5) / block->aspect + 0.001f; + else pnl_icons = (panel->labelofs + PNL_ICON + 5) / block->aspect + 0.001f; /* active tab */ /* draw text label */ UI_ThemeColor(TH_TITLE); - hrect= *rect; + hrect = *rect; if (dir == 'h') { - hrect.xmin = rect->xmin+pnl_icons; - hrect.ymin += 2.0f/block->aspect; + hrect.xmin = rect->xmin + pnl_icons; + hrect.ymin += 2.0f / block->aspect; uiStyleFontDraw(&style->paneltitle, &hrect, activename); } else { /* ignore 'pnl_icons', otherwise the text gets offset horizontally * + 0.001f to avoid flirting with float inaccuracy */ - hrect.xmin = rect->xmin + (PNL_ICON+5)/block->aspect + 0.001f; + hrect.xmin = rect->xmin + (PNL_ICON + 5) / block->aspect + 0.001f; uiStyleFontDrawRotated(&style->paneltitle, &hrect, activename); } } static void rectf_scale(rctf *rect, float scale) { - float centx= 0.5f*(rect->xmin+rect->xmax); - float centy= 0.5f*(rect->ymin+rect->ymax); - float sizex= 0.5f*scale*(rect->xmax - rect->xmin); - float sizey= 0.5f*scale*(rect->ymax - rect->ymin); + float centx = 0.5f * (rect->xmin + rect->xmax); + float centy = 0.5f * (rect->ymin + rect->ymax); + float sizex = 0.5f * scale * (rect->xmax - rect->xmin); + float sizey = 0.5f * scale * (rect->ymax - rect->ymin); rect->xmin = centx - sizex; rect->xmax = centx + sizex; @@ -482,8 +482,8 @@ static void rectf_scale(rctf *rect, float scale) /* panel integrated in buttonswindow, tool/property lists etc */ void ui_draw_aligned_panel(uiStyle *style, uiBlock *block, rcti *rect) { - bTheme *btheme= UI_GetTheme(); - Panel *panel= block->panel; + bTheme *btheme = UI_GetTheme(); + Panel *panel = block->panel; rcti headrect; rctf itemrect; int ofsx; @@ -493,35 +493,35 @@ void ui_draw_aligned_panel(uiStyle *style, uiBlock *block, rcti *rect) /* calculate header rect */ /* + 0.001f to prevent flicker due to float inaccuracy */ - headrect= *rect; + headrect = *rect; headrect.ymin = headrect.ymax; - headrect.ymax = headrect.ymin + floor(PNL_HEADER/block->aspect + 0.001f); + headrect.ymax = headrect.ymin + floor(PNL_HEADER / block->aspect + 0.001f); { - float minx= rect->xmin; - float maxx= rect->xmax; - float y= headrect.ymax; + float minx = rect->xmin; + float maxx = rect->xmax; + float y = headrect.ymax; glEnable(GL_BLEND); if (btheme->tui.panel.show_header) { /* draw with background color */ glEnable(GL_BLEND); - glColor4ubv((unsigned char*)btheme->tui.panel.header); - glRectf(minx, headrect.ymin+1, maxx, y); + glColor4ubv((unsigned char *)btheme->tui.panel.header); + glRectf(minx, headrect.ymin + 1, maxx, y); fdrawline(minx, y, maxx, y); fdrawline(minx, y, maxx, y); } else if (!(panel->runtime_flag & PNL_FIRST)) { /* draw embossed separator */ - minx += 5.0f/block->aspect; - maxx -= 5.0f/block->aspect; + minx += 5.0f / block->aspect; + maxx -= 5.0f / block->aspect; glColor4f(0.0f, 0.0f, 0.0f, 0.5f); fdrawline(minx, y, maxx, y); glColor4f(1.0f, 1.0f, 1.0f, 0.25f); - fdrawline(minx, y-1, maxx, y-1); + fdrawline(minx, y - 1, maxx, y - 1); glDisable(GL_BLEND); } @@ -533,8 +533,8 @@ void ui_draw_aligned_panel(uiStyle *style, uiBlock *block, rcti *rect) ui_draw_aligned_panel_header(style, block, &headrect, 'h'); /* itemrect smaller */ - itemrect.xmax = headrect.xmax - 5.0f/block->aspect; - itemrect.xmin = itemrect.xmax - (headrect.ymax-headrect.ymin); + itemrect.xmax = headrect.xmax - 5.0f / block->aspect; + itemrect.xmin = itemrect.xmax - (headrect.ymax - headrect.ymin); itemrect.ymin = headrect.ymin; itemrect.ymax = headrect.ymax; @@ -561,7 +561,7 @@ void ui_draw_aligned_panel(uiStyle *style, uiBlock *block, rcti *rect) else uiSetRoundBox(UI_CNR_NONE); UI_ThemeColorShade(TH_BACK, -120); - uiRoundRect(0.5f + rect->xmin, 0.5f + rect->ymin, 0.5f + rect->xmax, 0.5f + headrect.ymax+1, 8); + uiRoundRect(0.5f + rect->xmin, 0.5f + rect->ymin, 0.5f + rect->xmax, 0.5f + headrect.ymax + 1, 8); } if (panel->control & UI_PNL_SCALE) @@ -570,20 +570,20 @@ void ui_draw_aligned_panel(uiStyle *style, uiBlock *block, rcti *rect) /* draw optional close icon */ - ofsx= 6; + ofsx = 6; if (panel->control & UI_PNL_CLOSE) { UI_ThemeColor(TH_TEXT); - ui_draw_x_icon(rect->xmin+2+ofsx, rect->ymax+2); - ofsx= 22; + ui_draw_x_icon(rect->xmin + 2 + ofsx, rect->ymax + 2); + ofsx = 22; } /* draw collapse icon */ UI_ThemeColor(TH_TEXT); /* itemrect smaller */ - itemrect.xmin = headrect.xmin + 5.0f/block->aspect; - itemrect.xmax = itemrect.xmin + (headrect.ymax-headrect.ymin); + itemrect.xmin = headrect.xmin + 5.0f / block->aspect; + itemrect.xmax = itemrect.xmin + (headrect.ymax - headrect.ymin); itemrect.ymin = headrect.ymin; itemrect.ymax = headrect.ymax; @@ -621,17 +621,17 @@ static int get_panel_size_y(Panel *pa) * change sizey or location when closed */ static int get_panel_real_ofsy(Panel *pa) { - if (pa->flag & PNL_CLOSEDY) return pa->ofsy+pa->sizey; - else if (pa->paneltab && (pa->paneltab->flag & PNL_CLOSEDY)) return pa->ofsy+pa->sizey; + if (pa->flag & PNL_CLOSEDY) return pa->ofsy + pa->sizey; + else if (pa->paneltab && (pa->paneltab->flag & PNL_CLOSEDY)) return pa->ofsy + pa->sizey; else if (pa->paneltab) return pa->paneltab->ofsy; else return pa->ofsy; } static int get_panel_real_ofsx(Panel *pa) { - if (pa->flag & PNL_CLOSEDX) return pa->ofsx+get_panel_header(pa); - else if (pa->paneltab && (pa->paneltab->flag & PNL_CLOSEDX)) return pa->ofsx+get_panel_header(pa); - else return pa->ofsx+pa->sizex; + if (pa->flag & PNL_CLOSEDX) return pa->ofsx + get_panel_header(pa); + else if (pa->paneltab && (pa->paneltab->flag & PNL_CLOSEDX)) return pa->ofsx + get_panel_header(pa); + else return pa->ofsx + pa->sizex; } typedef struct PanelSort { @@ -646,7 +646,7 @@ typedef struct PanelSort { static int find_leftmost_panel(const void *a1, const void *a2) { - const PanelSort *ps1=a1, *ps2=a2; + const PanelSort *ps1 = a1, *ps2 = a2; if (ps1->pa->ofsx > ps2->pa->ofsx) return 1; else if (ps1->pa->ofsx < ps2->pa->ofsx) return -1; @@ -659,14 +659,14 @@ static int find_leftmost_panel(const void *a1, const void *a2) static int find_highest_panel(const void *a1, const void *a2) { - const PanelSort *ps1=a1, *ps2=a2; + const PanelSort *ps1 = a1, *ps2 = a2; /* stick uppermost header-less panels to the top of the region - * prevent them from being sorted */ if (ps1->pa->sortorder < ps2->pa->sortorder && ps1->pa->type->flag & PNL_NO_HEADER) return -1; - if (ps1->pa->ofsy+ps1->pa->sizey < ps2->pa->ofsy+ps2->pa->sizey) return 1; - else if (ps1->pa->ofsy+ps1->pa->sizey > ps2->pa->ofsy+ps2->pa->sizey) return -1; + if (ps1->pa->ofsy + ps1->pa->sizey < ps2->pa->ofsy + ps2->pa->sizey) return 1; + else if (ps1->pa->ofsy + ps1->pa->sizey > ps2->pa->ofsy + ps2->pa->sizey) return -1; else if (ps1->pa->sortorder > ps2->pa->sortorder) return 1; else if (ps1->pa->sortorder < ps2->pa->sortorder) return -1; @@ -675,7 +675,7 @@ static int find_highest_panel(const void *a1, const void *a2) static int compare_panel(const void *a1, const void *a2) { - const PanelSort *ps1=a1, *ps2=a2; + const PanelSort *ps1 = a1, *ps2 = a2; if (ps1->pa->sortorder > ps2->pa->sortorder) return 1; else if (ps1->pa->sortorder < ps2->pa->sortorder) return -1; @@ -689,85 +689,85 @@ static int uiAlignPanelStep(ScrArea *sa, ARegion *ar, float fac, int drag) { Panel *pa; PanelSort *ps, *panelsort, *psnext; - int a, tot=0, done; - int align= panel_aligned(sa, ar); + int a, tot = 0, done; + int align = panel_aligned(sa, ar); /* count active, not tabbed panels */ - for (pa= ar->panels.first; pa; pa= pa->next) - if ((pa->runtime_flag & PNL_ACTIVE) && pa->paneltab==NULL) + for (pa = ar->panels.first; pa; pa = pa->next) + if ((pa->runtime_flag & PNL_ACTIVE) && pa->paneltab == NULL) tot++; - if (tot==0) return 0; + if (tot == 0) return 0; /* extra; change close direction? */ - for (pa= ar->panels.first; pa; pa= pa->next) { - if ((pa->runtime_flag & PNL_ACTIVE) && pa->paneltab==NULL) { - if ((pa->flag & PNL_CLOSEDX) && (align==BUT_VERTICAL)) + for (pa = ar->panels.first; pa; pa = pa->next) { + if ((pa->runtime_flag & PNL_ACTIVE) && pa->paneltab == NULL) { + if ((pa->flag & PNL_CLOSEDX) && (align == BUT_VERTICAL)) pa->flag ^= PNL_CLOSED; - else if ((pa->flag & PNL_CLOSEDY) && (align==BUT_HORIZONTAL)) + else if ((pa->flag & PNL_CLOSEDY) && (align == BUT_HORIZONTAL)) pa->flag ^= PNL_CLOSED; } } /* sort panels */ - panelsort= MEM_callocN(tot*sizeof(PanelSort), "panelsort"); + panelsort = MEM_callocN(tot * sizeof(PanelSort), "panelsort"); - ps= panelsort; - for (pa= ar->panels.first; pa; pa= pa->next) { - if ((pa->runtime_flag & PNL_ACTIVE) && pa->paneltab==NULL) { - ps->pa= MEM_dupallocN(pa); - ps->orig= pa; + ps = panelsort; + for (pa = ar->panels.first; pa; pa = pa->next) { + if ((pa->runtime_flag & PNL_ACTIVE) && pa->paneltab == NULL) { + ps->pa = MEM_dupallocN(pa); + ps->orig = pa; ps++; } } if (drag) { /* while we are dragging, we sort on location and update sortorder */ - if (align==BUT_VERTICAL) + if (align == BUT_VERTICAL) qsort(panelsort, tot, sizeof(PanelSort), find_highest_panel); else qsort(panelsort, tot, sizeof(PanelSort), find_leftmost_panel); - for (ps=panelsort, a=0; aorig->sortorder= a; + for (ps = panelsort, a = 0; a < tot; a++, ps++) + ps->orig->sortorder = a; } else /* otherwise use sortorder */ qsort(panelsort, tot, sizeof(PanelSort), compare_panel); /* no smart other default start loc! this keeps switching f5/f6/etc compatible */ - ps= panelsort; - ps->pa->ofsx= 0; - ps->pa->ofsy= -get_panel_size_y(ps->pa); + ps = panelsort; + ps->pa->ofsx = 0; + ps->pa->ofsy = -get_panel_size_y(ps->pa); - for (a=0; apa->ofsx= ps->pa->ofsx; - psnext->pa->ofsy= get_panel_real_ofsy(ps->pa) - get_panel_size_y(psnext->pa); + for (a = 0; a < tot - 1; a++, ps++) { + psnext = ps + 1; + + if (align == BUT_VERTICAL) { + psnext->pa->ofsx = ps->pa->ofsx; + psnext->pa->ofsy = get_panel_real_ofsy(ps->pa) - get_panel_size_y(psnext->pa); } else { - psnext->pa->ofsx= get_panel_real_ofsx(ps->pa); - psnext->pa->ofsy= ps->pa->ofsy + get_panel_size_y(ps->pa) - get_panel_size_y(psnext->pa); + psnext->pa->ofsx = get_panel_real_ofsx(ps->pa); + psnext->pa->ofsy = ps->pa->ofsy + get_panel_size_y(ps->pa) - get_panel_size_y(psnext->pa); } } /* we interpolate */ - done= 0; - ps= panelsort; - for (a=0; apa->flag & PNL_SELECT)==0) { + done = 0; + ps = panelsort; + for (a = 0; a < tot; a++, ps++) { + if ((ps->pa->flag & PNL_SELECT) == 0) { if ((ps->orig->ofsx != ps->pa->ofsx) || (ps->orig->ofsy != ps->pa->ofsy)) { - ps->orig->ofsx= floorf(0.5f + fac*(float)ps->pa->ofsx + (1.0f-fac)*(float)ps->orig->ofsx); - ps->orig->ofsy= floorf(0.5f + fac*(float)ps->pa->ofsy + (1.0f-fac)*(float)ps->orig->ofsy); - done= 1; + ps->orig->ofsx = floorf(0.5f + fac * (float)ps->pa->ofsx + (1.0f - fac) * (float)ps->orig->ofsx); + ps->orig->ofsy = floorf(0.5f + fac * (float)ps->pa->ofsy + (1.0f - fac) * (float)ps->orig->ofsy); + done = 1; } } } /* copy locations to tabs */ - for (pa= ar->panels.first; pa; pa= pa->next) + for (pa = ar->panels.first; pa; pa = pa->next) if (pa->paneltab && (pa->runtime_flag & PNL_ACTIVE)) ui_panel_copy_offset(pa, pa->paneltab); @@ -783,49 +783,49 @@ static int uiAlignPanelStep(ScrArea *sa, ARegion *ar, float fac, int drag) static void ui_panels_size(ScrArea *sa, ARegion *ar, int *x, int *y) { Panel *pa; - int align= panel_aligned(sa, ar); + int align = panel_aligned(sa, ar); int sizex = UI_PANEL_WIDTH; int sizey = UI_PANEL_WIDTH; /* compute size taken up by panels, for setting in view2d */ - for (pa= ar->panels.first; pa; pa= pa->next) { + for (pa = ar->panels.first; pa; pa = pa->next) { if (pa->runtime_flag & PNL_ACTIVE) { int pa_sizex, pa_sizey; - if (align==BUT_VERTICAL) { - pa_sizex= pa->ofsx + pa->sizex; - pa_sizey= get_panel_real_ofsy(pa); + if (align == BUT_VERTICAL) { + pa_sizex = pa->ofsx + pa->sizex; + pa_sizey = get_panel_real_ofsy(pa); } else { - pa_sizex= get_panel_real_ofsx(pa) + pa->sizex; - pa_sizey= pa->ofsy + get_panel_size_y(pa); + pa_sizex = get_panel_real_ofsx(pa) + pa->sizex; + pa_sizey = pa->ofsy + get_panel_size_y(pa); } - sizex= MAX2(sizex, pa_sizex); - sizey= MIN2(sizey, pa_sizey); + sizex = MAX2(sizex, pa_sizex); + sizey = MIN2(sizey, pa_sizey); } } - *x= sizex; - *y= sizey; + *x = sizex; + *y = sizey; } static void ui_do_animate(const bContext *C, Panel *panel) { - uiHandlePanelData *data= panel->activedata; - ScrArea *sa= CTX_wm_area(C); - ARegion *ar= CTX_wm_region(C); + uiHandlePanelData *data = panel->activedata; + ScrArea *sa = CTX_wm_area(C); + ARegion *ar = CTX_wm_region(C); float fac; - fac= (PIL_check_seconds_timer()-data->starttime)/ANIMATION_TIME; - fac= sqrt(fac); - fac= MIN2(fac, 1.0f); + fac = (PIL_check_seconds_timer() - data->starttime) / ANIMATION_TIME; + fac = sqrt(fac); + fac = MIN2(fac, 1.0f); /* for max 1 second, interpolate positions */ if (uiAlignPanelStep(sa, ar, fac, 0)) ED_region_tag_redraw(ar); else - fac= 1.0f; + fac = 1.0f; if (fac >= 1.0f) { panel_activate_state(C, panel, PANEL_STATE_EXIT); @@ -839,46 +839,46 @@ void uiBeginPanels(const bContext *UNUSED(C), ARegion *ar) /* set all panels as inactive, so that at the end we know * which ones were used */ - for (pa=ar->panels.first; pa; pa=pa->next) { + for (pa = ar->panels.first; pa; pa = pa->next) { if (pa->runtime_flag & PNL_ACTIVE) - pa->runtime_flag= PNL_WAS_ACTIVE; + pa->runtime_flag = PNL_WAS_ACTIVE; else - pa->runtime_flag= 0; + pa->runtime_flag = 0; } } /* only draws blocks with panels */ void uiEndPanels(const bContext *C, ARegion *ar, int *x, int *y) { - ScrArea *sa= CTX_wm_area(C); + ScrArea *sa = CTX_wm_area(C); uiBlock *block; Panel *panot, *panew, *patest, *pa, *firstpa; /* offset contents */ - for (block= ar->uiblocks.first; block; block= block->next) + for (block = ar->uiblocks.first; block; block = block->next) if (block->active && block->panel) ui_offset_panel_block(block); /* consistency; are panels not made, whilst they have tabs */ - for (panot= ar->panels.first; panot; panot= panot->next) { - if ((panot->runtime_flag & PNL_ACTIVE)==0) { // not made + for (panot = ar->panels.first; panot; panot = panot->next) { + if ((panot->runtime_flag & PNL_ACTIVE) == 0) { // not made - for (panew= ar->panels.first; panew; panew= panew->next) { + for (panew = ar->panels.first; panew; panew = panew->next) { if ((panew->runtime_flag & PNL_ACTIVE)) { - if (panew->paneltab==panot) { // panew is tab in notmade pa + if (panew->paneltab == panot) { // panew is tab in notmade pa break; } } } /* now panew can become the new parent, check all other tabs */ if (panew) { - for (patest= ar->panels.first; patest; patest= patest->next) { + for (patest = ar->panels.first; patest; patest = patest->next) { if (patest->paneltab == panot) { - patest->paneltab= panew; + patest->paneltab = panew; } } - panot->paneltab= panew; - panew->paneltab= NULL; + panot->paneltab = panew; + panew->paneltab = NULL; ED_region_tag_redraw(ar); // the buttons panew were not made } } @@ -893,11 +893,11 @@ void uiEndPanels(const bContext *C, ARegion *ar, int *x, int *y) } /* tag first panel */ - firstpa= NULL; - for (block= ar->uiblocks.first; block; block=block->next) + firstpa = NULL; + for (block = ar->uiblocks.first; block; block = block->next) if (block->active && block->panel) if (!firstpa || block->panel->sortorder < firstpa->sortorder) - firstpa= block->panel; + firstpa = block->panel; if (firstpa) firstpa->runtime_flag |= PNL_FIRST; @@ -913,13 +913,13 @@ void uiDrawPanels(const bContext *C, ARegion *ar) UI_ThemeClearColor(TH_BACK); /* draw panels, selected on top */ - for (block= ar->uiblocks.first; block; block=block->next) { + for (block = ar->uiblocks.first; block; block = block->next) { if (block->active && block->panel && !(block->panel->flag & PNL_SELECT)) { uiDrawBlock(C, block); } } - for (block= ar->uiblocks.first; block; block=block->next) { + for (block = ar->uiblocks.first; block; block = block->next) { if (block->active && block->panel && (block->panel->flag & PNL_SELECT)) { uiDrawBlock(C, block); } @@ -934,22 +934,22 @@ static void check_panel_overlap(ARegion *ar, Panel *panel) /* also called with panel==NULL for clear */ - for (pa=ar->panels.first; pa; pa=pa->next) { + for (pa = ar->panels.first; pa; pa = pa->next) { pa->flag &= ~PNL_OVERLAP; if (panel && (pa != panel)) { - if (pa->paneltab==NULL && (pa->runtime_flag & PNL_ACTIVE)) { - float safex= 0.2, safey= 0.2; - - if (pa->flag & PNL_CLOSEDX) safex= 0.05; - else if (pa->flag & PNL_CLOSEDY) safey= 0.05; - else if (panel->flag & PNL_CLOSEDX) safex= 0.05; - else if (panel->flag & PNL_CLOSEDY) safey= 0.05; + if (pa->paneltab == NULL && (pa->runtime_flag & PNL_ACTIVE)) { + float safex = 0.2, safey = 0.2; - if (pa->ofsx > panel->ofsx- safex*panel->sizex) - if (pa->ofsx+pa->sizex < panel->ofsx+ (1.0f+safex)*panel->sizex) - if (pa->ofsy > panel->ofsy- safey*panel->sizey) - if (pa->ofsy+pa->sizey < panel->ofsy+ (1.0f+safey)*panel->sizey) - pa->flag |= PNL_OVERLAP; + if (pa->flag & PNL_CLOSEDX) safex = 0.05; + else if (pa->flag & PNL_CLOSEDY) safey = 0.05; + else if (panel->flag & PNL_CLOSEDX) safex = 0.05; + else if (panel->flag & PNL_CLOSEDY) safey = 0.05; + + if (pa->ofsx > panel->ofsx - safex * panel->sizex) + if (pa->ofsx + pa->sizex < panel->ofsx + (1.0f + safex) * panel->sizex) + if (pa->ofsy > panel->ofsy - safey * panel->sizey) + if (pa->ofsy + pa->sizey < panel->ofsy + (1.0f + safey) * panel->sizey) + pa->flag |= PNL_OVERLAP; } } } @@ -959,36 +959,36 @@ static void check_panel_overlap(ARegion *ar, Panel *panel) static void ui_do_drag(const bContext *C, wmEvent *event, Panel *panel) { - uiHandlePanelData *data= panel->activedata; - ScrArea *sa= CTX_wm_area(C); - ARegion *ar= CTX_wm_region(C); - short align= panel_aligned(sa, ar), dx=0, dy=0; + uiHandlePanelData *data = panel->activedata; + ScrArea *sa = CTX_wm_area(C); + ARegion *ar = CTX_wm_region(C); + short align = panel_aligned(sa, ar), dx = 0, dy = 0; /* first clip for window, no dragging outside */ if (!BLI_in_rcti(&ar->winrct, event->x, event->y)) return; - dx= (event->x-data->startx) & ~(PNL_GRID-1); - dy= (event->y-data->starty) & ~(PNL_GRID-1); + dx = (event->x - data->startx) & ~(PNL_GRID - 1); + dy = (event->y - data->starty) & ~(PNL_GRID - 1); - dx *= (float)(ar->v2d.cur.xmax - ar->v2d.cur.xmin)/(float)(ar->winrct.xmax - ar->winrct.xmin); - dy *= (float)(ar->v2d.cur.ymax - ar->v2d.cur.ymin)/(float)(ar->winrct.ymax - ar->winrct.ymin); + dx *= (float)(ar->v2d.cur.xmax - ar->v2d.cur.xmin) / (float)(ar->winrct.xmax - ar->winrct.xmin); + dy *= (float)(ar->v2d.cur.ymax - ar->v2d.cur.ymin) / (float)(ar->winrct.ymax - ar->winrct.ymin); if (data->state == PANEL_STATE_DRAG_SCALE) { - panel->sizex = MAX2(data->startsizex+dx, UI_PANEL_MINX); + panel->sizex = MAX2(data->startsizex + dx, UI_PANEL_MINX); - if (data->startsizey-dy < UI_PANEL_MINY) - dy= -UI_PANEL_MINY+data->startsizey; + if (data->startsizey - dy < UI_PANEL_MINY) + dy = -UI_PANEL_MINY + data->startsizey; - panel->sizey= data->startsizey-dy; - panel->ofsy= data->startofsy+dy; + panel->sizey = data->startsizey - dy; + panel->ofsy = data->startofsy + dy; } else { /* reset the panel snapping, to allow dragging away from snapped edges */ panel->snap = PNL_SNAP_NONE; - panel->ofsx = data->startofsx+dx; - panel->ofsy = data->startofsy+dy; + panel->ofsx = data->startofsx + dx; + panel->ofsy = data->startofsy + dy; check_panel_overlap(ar, panel); if (align) uiAlignPanelStep(sa, ar, 0.2, 1); @@ -1004,55 +1004,55 @@ static void ui_do_drag(const bContext *C, wmEvent *event, Panel *panel) /* also it supposes a block has panel, and isn't a menu */ static void ui_handle_panel_header(const bContext *C, uiBlock *block, int mx, int my, int event) { - ScrArea *sa= CTX_wm_area(C); - ARegion *ar= CTX_wm_region(C); + ScrArea *sa = CTX_wm_area(C); + ARegion *ar = CTX_wm_region(C); Panel *pa; - int align= panel_aligned(sa, ar), button= 0; + int align = panel_aligned(sa, ar), button = 0; /* mouse coordinates in panel space! */ /* XXX weak code, currently it assumes layout style for location of widgets */ /* check open/collapsed button */ - if (event==RETKEY) - button= 1; - else if (event==AKEY) - button= 1; + if (event == RETKEY) + button = 1; + else if (event == AKEY) + button = 1; else if (block->panel->flag & PNL_CLOSEDX) { - if (my >= block->maxy) button= 1; + if (my >= block->maxy) button = 1; } else if (block->panel->control & UI_PNL_CLOSE) { /* whole of header can be used to collapse panel (except top-right corner) */ - if (mx <= block->maxx-8-PNL_ICON) button= 2; + if (mx <= block->maxx - 8 - PNL_ICON) button = 2; //else if (mx <= block->minx+10+2*PNL_ICON+2) button= 1; } - else if (mx <= block->maxx-PNL_ICON-12) { - button= 1; + else if (mx <= block->maxx - PNL_ICON - 12) { + button = 1; } if (button) { - if (button==2) { // close + if (button == 2) { // close ED_region_tag_redraw(ar); } - else { // collapse + else { // collapse if (block->panel->flag & PNL_CLOSED) { block->panel->flag &= ~PNL_CLOSED; /* snap back up so full panel aligns with screen edge */ if (block->panel->snap & PNL_SNAP_BOTTOM) - block->panel->ofsy= 0; + block->panel->ofsy = 0; } - else if (align==BUT_HORIZONTAL) { + else if (align == BUT_HORIZONTAL) { block->panel->flag |= PNL_CLOSEDX; } else { /* snap down to bottom screen edge*/ block->panel->flag |= PNL_CLOSEDY; if (block->panel->snap & PNL_SNAP_BOTTOM) - block->panel->ofsy= -block->panel->sizey; + block->panel->ofsy = -block->panel->sizey; } - for (pa= ar->panels.first; pa; pa= pa->next) { - if (pa->paneltab==block->panel) { + for (pa = ar->panels.first; pa; pa = pa->next) { + if (pa->paneltab == block->panel) { if (block->panel->flag & PNL_CLOSED) pa->flag |= PNL_CLOSED; else pa->flag &= ~PNL_CLOSED; } @@ -1064,7 +1064,7 @@ static void ui_handle_panel_header(const bContext *C, uiBlock *block, int mx, in else ED_region_tag_redraw(ar); } - else if (mx <= (block->maxx-PNL_ICON-12)+PNL_ICON+2) { + else if (mx <= (block->maxx - PNL_ICON - 12) + PNL_ICON + 2) { panel_activate_state(C, block->panel, PANEL_STATE_DRAG); } } @@ -1074,35 +1074,35 @@ static void ui_handle_panel_header(const bContext *C, uiBlock *block, int mx, in int ui_handler_panel_region(bContext *C, wmEvent *event) { - ARegion *ar= CTX_wm_region(C); + ARegion *ar = CTX_wm_region(C); uiBlock *block; Panel *pa; - int retval, mx, my, inside_header= 0, inside_scale= 0, inside; + int retval, mx, my, inside_header = 0, inside_scale = 0, inside; - retval= WM_UI_HANDLER_CONTINUE; - for (block=ar->uiblocks.last; block; block=block->prev) { - mx= event->x; - my= event->y; + retval = WM_UI_HANDLER_CONTINUE; + for (block = ar->uiblocks.last; block; block = block->prev) { + mx = event->x; + my = event->y; ui_window_to_block(ar, block, &mx, &my); /* check if inside boundbox */ - inside= 0; - pa= block->panel; + inside = 0; + pa = block->panel; - if (!pa || pa->paneltab!=NULL) + if (!pa || pa->paneltab != NULL) continue; if (pa->type && pa->type->flag & PNL_NO_HEADER) // XXX - accessed freed panels when scripts reload, need to fix. continue; if (block->minx <= mx && block->maxx >= mx) - if (block->miny <= my && block->maxy+PNL_HEADER >= my) - inside= 1; + if (block->miny <= my && block->maxy + PNL_HEADER >= my) + inside = 1; - if (inside && event->val==KM_PRESS) { + if (inside && event->val == KM_PRESS) { if (event->type == AKEY && !ELEM4(KM_MOD_FIRST, event->ctrl, event->oskey, event->shift, event->alt)) { if (pa->flag & PNL_CLOSEDY) { - if ((block->maxy <= my) && (block->maxy+PNL_HEADER >= my)) + if ((block->maxy <= my) && (block->maxy + PNL_HEADER >= my)) ui_handle_panel_header(C, block, mx, my, event->type); } else @@ -1119,19 +1119,19 @@ int ui_handler_panel_region(bContext *C, wmEvent *event) if (inside) { /* clicked at panel header? */ if (pa->flag & PNL_CLOSEDX) { - if (block->minx <= mx && block->minx+PNL_HEADER >= mx) - inside_header= 1; + if (block->minx <= mx && block->minx + PNL_HEADER >= mx) + inside_header = 1; } - else if ((block->maxy <= my) && (block->maxy+PNL_HEADER >= my)) { - inside_header= 1; + else if ((block->maxy <= my) && (block->maxy + PNL_HEADER >= my)) { + inside_header = 1; } else if (pa->control & UI_PNL_SCALE) { - if (block->maxx-PNL_HEADER <= mx) - if (block->miny+PNL_HEADER >= my) - inside_scale= 1; + if (block->maxx - PNL_HEADER <= mx) + if (block->miny + PNL_HEADER >= my) + inside_scale = 1; } - if (event->val==KM_PRESS) { + if (event->val == KM_PRESS) { /* open close on header */ if (ELEM(event->type, RETKEY, PADENTER)) { if (inside_header) { @@ -1155,34 +1155,34 @@ int ui_handler_panel_region(bContext *C, wmEvent *event) if (block->handler) { rem_blockhandler(sa, block->handler); ED_region_tag_redraw(ar); - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; } #endif } - else if (event->type==PADPLUSKEY || event->type==PADMINUS) { + else if (event->type == PADPLUSKEY || event->type == PADMINUS) { #if 0 // XXX make float panel exception? - int zoom=0; + int zoom = 0; /* if panel is closed, only zoom if mouse is over the header */ - if (pa->flag & (PNL_CLOSEDX|PNL_CLOSEDY)) { + if (pa->flag & (PNL_CLOSEDX | PNL_CLOSEDY)) { if (inside_header) - zoom=1; + zoom = 1; } else - zoom=1; + zoom = 1; if (zoom) { - ScrArea *sa= CTX_wm_area(C); - SpaceLink *sl= sa->spacedata.first; + ScrArea *sa = CTX_wm_area(C); + SpaceLink *sl = sa->spacedata.first; - if (sa->spacetype!=SPACE_BUTS) { + if (sa->spacetype != SPACE_BUTS) { if (!(pa->control & UI_PNL_SCALE)) { - if (event->type==PADPLUSKEY) sl->blockscale+= 0.1; - else sl->blockscale-= 0.1; + if (event->type == PADPLUSKEY) sl->blockscale += 0.1; + else sl->blockscale -= 0.1; CLAMP(sl->blockscale, 0.6, 1.0); ED_region_tag_redraw(ar); - retval= WM_UI_HANDLER_BREAK; + retval = WM_UI_HANDLER_BREAK; } } } @@ -1200,14 +1200,14 @@ int ui_handler_panel_region(bContext *C, wmEvent *event) /* note, this is modal handler and should not swallow events for animation */ static int ui_handler_panel(bContext *C, wmEvent *event, void *userdata) { - Panel *panel= userdata; - uiHandlePanelData *data= panel->activedata; + Panel *panel = userdata; + uiHandlePanelData *data = panel->activedata; /* verify if we can stop */ - if (event->type == LEFTMOUSE && event->val!=KM_PRESS) { - ScrArea *sa= CTX_wm_area(C); - ARegion *ar= CTX_wm_region(C); - int align= panel_aligned(sa, ar); + if (event->type == LEFTMOUSE && event->val != KM_PRESS) { + ScrArea *sa = CTX_wm_area(C); + ARegion *ar = CTX_wm_region(C); + int align = panel_aligned(sa, ar); if (align) panel_activate_state(C, panel, PANEL_STATE_ANIMATION); @@ -1225,7 +1225,7 @@ static int ui_handler_panel(bContext *C, wmEvent *event, void *userdata) ui_do_drag(C, event, panel); } - data= panel->activedata; + data = panel->activedata; if (data && data->state == PANEL_STATE_ANIMATION) return WM_UI_HANDLER_CONTINUE; @@ -1235,16 +1235,16 @@ static int ui_handler_panel(bContext *C, wmEvent *event, void *userdata) static void ui_handler_remove_panel(bContext *C, void *userdata) { - Panel *pa= userdata; + Panel *pa = userdata; panel_activate_state(C, pa, PANEL_STATE_EXIT); } static void panel_activate_state(const bContext *C, Panel *pa, uiHandlePanelState state) { - uiHandlePanelData *data= pa->activedata; - wmWindow *win= CTX_wm_window(C); - ARegion *ar= CTX_wm_region(C); + uiHandlePanelData *data = pa->activedata; + wmWindow *win = CTX_wm_window(C); + ARegion *ar = CTX_wm_region(C); if (data && data->state == state) return; @@ -1267,49 +1267,49 @@ static void panel_activate_state(const bContext *C, Panel *pa, uiHandlePanelStat if (data && data->animtimer) { WM_event_remove_timer(CTX_wm_manager(C), win, data->animtimer); - data->animtimer= NULL; + data->animtimer = NULL; } if (state == PANEL_STATE_EXIT) { MEM_freeN(data); - pa->activedata= NULL; + pa->activedata = NULL; WM_event_remove_ui_handler(&win->modalhandlers, ui_handler_panel, ui_handler_remove_panel, pa, 0); } else { if (!data) { - data= MEM_callocN(sizeof(uiHandlePanelData), "uiHandlePanelData"); - pa->activedata= data; + data = MEM_callocN(sizeof(uiHandlePanelData), "uiHandlePanelData"); + pa->activedata = data; WM_event_add_ui_handler(C, &win->modalhandlers, ui_handler_panel, ui_handler_remove_panel, pa); } if (ELEM(state, PANEL_STATE_ANIMATION, PANEL_STATE_DRAG)) - data->animtimer= WM_event_add_timer(CTX_wm_manager(C), win, TIMER, ANIMATION_INTERVAL); - - data->state= state; - data->startx= win->eventstate->x; - data->starty= win->eventstate->y; - data->startofsx= pa->ofsx; - data->startofsy= pa->ofsy; - data->startsizex= pa->sizex; - data->startsizey= pa->sizey; - data->starttime= PIL_check_seconds_timer(); + data->animtimer = WM_event_add_timer(CTX_wm_manager(C), win, TIMER, ANIMATION_INTERVAL); + + data->state = state; + data->startx = win->eventstate->x; + data->starty = win->eventstate->y; + data->startofsx = pa->ofsx; + data->startofsy = pa->ofsy; + data->startsizex = pa->sizex; + data->startsizey = pa->sizey; + data->starttime = PIL_check_seconds_timer(); } ED_region_tag_redraw(ar); /* XXX exception handling, 3d window preview panel */ #if 0 - if (block->drawextra==BIF_view3d_previewdraw) + if (block->drawextra == BIF_view3d_previewdraw) BIF_view3d_previewrender_clear(curarea); #endif /* XXX exception handling, 3d window preview panel */ #if 0 - if (block->drawextra==BIF_view3d_previewdraw) + if (block->drawextra == BIF_view3d_previewdraw) BIF_view3d_previewrender_signal(curarea, PR_DISPRECT); - else if (strcmp(block->name, "image_panel_preview")==0) + else if (strcmp(block->name, "image_panel_preview") == 0) image_preview_event(2); #endif } diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index 13962777da3..1c37fcdd488 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -68,11 +68,11 @@ #include "interface_intern.h" -#define MENU_SEPR_HEIGHT 6 -#define B_NOP -1 -#define MENU_SHADOW_SIDE 8 -#define MENU_SHADOW_BOTTOM 10 -#define MENU_TOP 8 +#define MENU_SEPR_HEIGHT 6 +#define B_NOP -1 +#define MENU_SHADOW_SIDE 8 +#define MENU_SHADOW_BOTTOM 10 +#define MENU_TOP 8 /*********************** Menu Data Parsing ********************* */ @@ -94,13 +94,13 @@ typedef struct MenuData { static MenuData *menudata_new(const char *instr) { - MenuData *md= MEM_mallocN(sizeof(*md), "MenuData"); + MenuData *md = MEM_mallocN(sizeof(*md), "MenuData"); - md->instr= instr; - md->title= NULL; - md->titleicon= 0; - md->items= NULL; - md->nitems= md->itemssize= 0; + md->instr = instr; + md->title = NULL; + md->titleicon = 0; + md->items = NULL; + md->nitems = md->itemssize = 0; return md; } @@ -108,30 +108,30 @@ static MenuData *menudata_new(const char *instr) static void menudata_set_title(MenuData *md, const char *title, int titleicon) { if (!md->title) - md->title= title; + md->title = title; if (!md->titleicon) - md->titleicon= titleicon; + md->titleicon = titleicon; } static void menudata_add_item(MenuData *md, const char *str, int retval, int icon, int sepr) { - if (md->nitems==md->itemssize) { - int nsize= md->itemssize?(md->itemssize<<1):1; - MenuEntry *oitems= md->items; + if (md->nitems == md->itemssize) { + int nsize = md->itemssize ? (md->itemssize << 1) : 1; + MenuEntry *oitems = md->items; - md->items= MEM_mallocN(nsize*sizeof(*md->items), "md->items"); + md->items = MEM_mallocN(nsize * sizeof(*md->items), "md->items"); if (oitems) { - memcpy(md->items, oitems, md->nitems*sizeof(*md->items)); + memcpy(md->items, oitems, md->nitems * sizeof(*md->items)); MEM_freeN(oitems); } - md->itemssize= nsize; + md->itemssize = nsize; } - md->items[md->nitems].str= str; - md->items[md->nitems].retval= retval; - md->items[md->nitems].icon= icon; - md->items[md->nitems].sepr= sepr; + md->items[md->nitems].str = str; + md->items[md->nitems].retval = retval; + md->items[md->nitems].icon = icon; + md->items[md->nitems].sepr = sepr; md->nitems++; } @@ -144,86 +144,86 @@ static void menudata_free(MenuData *md) MEM_freeN(md); } - /** - * Parse menu description strings, string is of the - * form "[sss%t|]{(sss[%xNN]|), (%l|), (sss%l|)}", ssss%t indicates the - * menu title, sss or sss%xNN indicates an option, - * if %xNN is given then NN is the return value if - * that option is selected otherwise the return value - * is the index of the option (starting with 1). %l - * indicates a seperator, sss%l indicates a label and - * new column. - * - * \param str String to be parsed. - * \retval new menudata structure, free with menudata_free() - */ +/** + * Parse menu description strings, string is of the + * form "[sss%t|]{(sss[%xNN]|), (%l|), (sss%l|)}", ssss%t indicates the + * menu title, sss or sss%xNN indicates an option, + * if %xNN is given then NN is the return value if + * that option is selected otherwise the return value + * is the index of the option (starting with 1). %l + * indicates a seperator, sss%l indicates a label and + * new column. + * + * \param str String to be parsed. + * \retval new menudata structure, free with menudata_free() + */ static MenuData *decompose_menu_string(const char *str) { - char *instr= BLI_strdup(str); - MenuData *md= menudata_new(instr); - const char *nitem= NULL; - char *s= instr; - int nicon=0, nretval= 1, nitem_is_title= 0, nitem_is_sepr= 0; + char *instr = BLI_strdup(str); + MenuData *md = menudata_new(instr); + const char *nitem = NULL; + char *s = instr; + int nicon = 0, nretval = 1, nitem_is_title = 0, nitem_is_sepr = 0; while (1) { - char c= *s; + char c = *s; - if (c=='%') { - if (s[1]=='x') { - nretval= atoi(s+2); + if (c == '%') { + if (s[1] == 'x') { + nretval = atoi(s + 2); - *s= '\0'; + *s = '\0'; s++; } - else if (s[1]=='t') { - nitem_is_title= (s != instr); /* check for empty title */ + else if (s[1] == 't') { + nitem_is_title = (s != instr); /* check for empty title */ - *s= '\0'; + *s = '\0'; s++; } - else if (s[1]=='l') { - nitem_is_sepr= 1; - if (!nitem) nitem= ""; + else if (s[1] == 'l') { + nitem_is_sepr = 1; + if (!nitem) nitem = ""; - *s= '\0'; + *s = '\0'; s++; } - else if (s[1]=='i') { - nicon= atoi(s+2); + else if (s[1] == 'i') { + nicon = atoi(s + 2); - *s= '\0'; + *s = '\0'; s++; } } - else if (c=='|' || c == '\n' || c=='\0') { + else if (c == '|' || c == '\n' || c == '\0') { if (nitem) { - *s= '\0'; + *s = '\0'; if (nitem_is_title) { menudata_set_title(md, nitem, nicon); - nitem_is_title= 0; + nitem_is_title = 0; } else if (nitem_is_sepr) { /* prevent separator to get a value */ menudata_add_item(md, nitem, -1, nicon, 1); - nretval= md->nitems+1; - nitem_is_sepr= 0; + nretval = md->nitems + 1; + nitem_is_sepr = 0; } else { menudata_add_item(md, nitem, nretval, nicon, 0); - nretval= md->nitems+1; + nretval = md->nitems + 1; } - nitem= NULL; - nicon= 0; + nitem = NULL; + nicon = 0; } - if (c=='\0') { + if (c == '\0') { break; } } else if (!nitem) { - nitem= s; + nitem = s; } s++; @@ -237,9 +237,9 @@ void ui_set_name_menu(uiBut *but, int value) MenuData *md; int i; - md= decompose_menu_string(but->str); - for (i=0; initems; i++) { - if (md->items[i].retval==value) { + md = decompose_menu_string(but->str); + for (i = 0; i < md->nitems; i++) { + if (md->items[i].retval == value) { BLI_strncpy(but->drawstr, md->items[i].str, sizeof(but->drawstr)); break; } @@ -251,29 +251,29 @@ void ui_set_name_menu(uiBut *but, int value) int ui_step_name_menu(uiBut *but, int step) { MenuData *md; - int value= ui_get_but_val(but); + int value = ui_get_but_val(but); int i; - md= decompose_menu_string(but->str); - for (i=0; initems; i++) - if (md->items[i].retval==value) + md = decompose_menu_string(but->str); + for (i = 0; i < md->nitems; i++) + if (md->items[i].retval == value) break; - if (step==1) { + if (step == 1) { /* skip separators */ - for (; initems-1; i++) { - if (md->items[i+1].retval != -1) { - value= md->items[i+1].retval; + for (; i < md->nitems - 1; i++) { + if (md->items[i + 1].retval != -1) { + value = md->items[i + 1].retval; break; } } } else { - if (i>0) { + if (i > 0) { /* skip separators */ - for (; i>0; i--) { - if (md->items[i-1].retval != -1) { - value= md->items[i-1].retval; + for (; i > 0; i--) { + if (md->items[i - 1].retval != -1) { + value = md->items[i - 1].retval; break; } } @@ -292,11 +292,11 @@ static ARegion *ui_add_temporary_region(bScreen *sc) { ARegion *ar; - ar= MEM_callocN(sizeof(ARegion), "area region"); + ar = MEM_callocN(sizeof(ARegion), "area region"); BLI_addtail(&sc->regionbase, ar); - ar->regiontype= RGN_TYPE_TEMPORARY; - ar->alignment= RGN_ALIGN_FLOAT; + ar->regiontype = RGN_TYPE_TEMPORARY; + ar->alignment = RGN_ALIGN_FLOAT; return ar; } @@ -307,7 +307,7 @@ static void ui_remove_temporary_region(bContext *C, bScreen *sc, ARegion *ar) wm_draw_region_clear(CTX_wm_window(C), ar); ED_region_exit(C, ar); - BKE_area_region_free(NULL, ar); /* NULL: no spacetype */ + BKE_area_region_free(NULL, ar); /* NULL: no spacetype */ BLI_freelinkN(&sc->regionbase, ar); } @@ -350,9 +350,9 @@ static void rgb_tint(float col[3], static void ui_tooltip_region_draw_cb(const bContext *UNUSED(C), ARegion *ar) { - uiTooltipData *data= ar->regiondata; - uiWidgetColors* theme = ui_tooltip_get_theme(); - rcti bbox= data->bbox; + uiTooltipData *data = ar->regiondata; + uiWidgetColors *theme = ui_tooltip_get_theme(); + rcti bbox = data->bbox; float tip_colors[UI_TIP_LC_MAX][3]; float *main_color = tip_colors[UI_TIP_LC_MAIN]; /* the color from the theme */ @@ -391,7 +391,7 @@ static void ui_tooltip_region_draw_cb(const bContext *UNUSED(C), ARegion *ar) /* draw text */ uiStyleFontSet(&data->fstyle); - bbox.ymax = bbox.ymax - 0.5f*((bbox.ymax - bbox.ymin) - data->toth); + bbox.ymax = bbox.ymax - 0.5f * ((bbox.ymax - bbox.ymin) - data->toth); bbox.ymin = bbox.ymax - data->lineh; for (i = 0; i < data->totline; i++) { @@ -406,20 +406,20 @@ static void ui_tooltip_region_free_cb(ARegion *ar) { uiTooltipData *data; - data= ar->regiondata; + data = ar->regiondata; MEM_freeN(data); - ar->regiondata= NULL; + ar->regiondata = NULL; } ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but) { - uiStyle *style= UI_GetStyle(); + uiStyle *style = UI_GetStyle(); static ARegionType type; ARegion *ar; uiTooltipData *data; IDProperty *prop; char buf[512]; - float fonth, fontw, aspect= but->block->aspect; + float fonth, fontw, aspect = but->block->aspect; float x1f, x2f, y1f, y2f; int x1, x2, y1, y2, winx, winy, ofsx, ofsy, w, h, a; @@ -427,11 +427,11 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but) return NULL; /* create tooltip data */ - data= MEM_callocN(sizeof(uiTooltipData), "uiTooltipData"); + data = MEM_callocN(sizeof(uiTooltipData), "uiTooltipData"); /* special case, enum rna buttons only have enum item description, use general enum description too before the specific one */ if (but->rnaprop && RNA_property_type(but->rnaprop) == PROP_ENUM) { - const char *descr= RNA_property_description(but->rnaprop); + const char *descr = RNA_property_description(but->rnaprop); if (descr && descr[0]) { BLI_strncpy(data->lines[data->totline], descr, sizeof(data->lines[0])); data->color_id[data->totline] = UI_TIP_LC_MAIN; @@ -441,11 +441,11 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but) if (ELEM(but->type, ROW, MENU)) { EnumPropertyItem *item; int i, totitem, free; - int value = (but->type == ROW)? but->hardmax: ui_get_but_val(but); + int value = (but->type == ROW) ? but->hardmax : ui_get_but_val(but); RNA_property_enum_items_gettexted(C, &but->rnapoin, but->rnaprop, &item, &totitem, &free); - for (i=0; ilines[data->totline], sizeof(data->lines[0]), "%s: %s", item[i].name, item[i].description); @@ -470,10 +470,10 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but) if (but->optype && !(but->block->flag & UI_BLOCK_LOOP)) { /* operator keymap (not menus, they already have it) */ - prop= (but->opptr)? but->opptr->data: NULL; + prop = (but->opptr) ? but->opptr->data : NULL; if (WM_key_event_operator_string(C, but->optype->idname, but->opcontext, prop, TRUE, - buf, sizeof(buf))) + buf, sizeof(buf))) { BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_("Shortcut: %s"), buf); data->color_id[data->totline] = UI_TIP_LC_NORMAL; @@ -492,11 +492,11 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but) } if (but->rnaprop) { - int unit_type= uiButGetUnitType(but); + int unit_type = uiButGetUnitType(but); if (unit_type == PROP_UNIT_ROTATION) { if (RNA_property_type(but->rnaprop) == PROP_FLOAT) { - float value= RNA_property_array_check(but->rnaprop) ? RNA_property_float_get_index(&but->rnapoin, but->rnaprop, but->rnaindex) : RNA_property_float_get(&but->rnapoin, but->rnaprop); + float value = RNA_property_array_check(but->rnaprop) ? RNA_property_float_get_index(&but->rnapoin, but->rnaprop, but->rnaindex) : RNA_property_float_get(&but->rnapoin, but->rnaprop); BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_("Radians: %f"), value); data->color_id[data->totline] = UI_TIP_LC_NORMAL; data->totline++; @@ -520,7 +520,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but) } if (but->rnapoin.id.data) { - ID *id= but->rnapoin.id.data; + ID *id = but->rnapoin.id.data; if (id->lib && id->lib->name) { BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_("Library: %s"), id->lib->name); data->color_id[data->totline] = UI_TIP_LC_NORMAL; @@ -531,9 +531,9 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but) else if (but->optype) { PointerRNA *opptr; char *str; - opptr= uiButGetOperatorPtrRNA(but); /* allocated when needed, the button owns it */ + opptr = uiButGetOperatorPtrRNA(but); /* allocated when needed, the button owns it */ - str= WM_operator_pystring(C, but->optype, opptr, 0); + str = WM_operator_pystring(C, but->optype, opptr, 0); /* operator info */ if ((U.flag & USER_TOOLTIPS_PYTHON) == 0) { @@ -549,7 +549,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but) const char *poll_msg; CTX_wm_operator_poll_msg_set(C, NULL); WM_operator_poll_context(C, but->optype, but->opcontext); - poll_msg= CTX_wm_operator_poll_msg_get(C); + poll_msg = CTX_wm_operator_poll_msg_get(C); if (poll_msg) { BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_("Disabled: %s"), poll_msg); data->color_id[data->totline] = UI_TIP_LC_ALERT; /* alert */ @@ -559,7 +559,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but) } else if (ELEM(but->type, MENU, PULLDOWN)) { if ((U.flag & USER_TOOLTIPS_PYTHON) == 0) { - MenuType *mt= uiButGetMenuType(but); + MenuType *mt = uiButGetMenuType(but); if (mt) { BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_("Python: %s"), mt->idname); data->color_id[data->totline] = UI_TIP_LC_PYTHON; @@ -577,16 +577,16 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but) } /* create area region */ - ar= ui_add_temporary_region(CTX_wm_screen(C)); + ar = ui_add_temporary_region(CTX_wm_screen(C)); memset(&type, 0, sizeof(ARegionType)); - type.draw= ui_tooltip_region_draw_cb; - type.free= ui_tooltip_region_free_cb; - ar->type= &type; + type.draw = ui_tooltip_region_draw_cb; + type.free = ui_tooltip_region_free_cb; + ar->type = &type; /* set font, get bb */ - data->fstyle= style->widget; /* copy struct */ - data->fstyle.align= UI_STYLE_TEXT_CENTER; + data->fstyle = style->widget; /* copy struct */ + data->fstyle.align = UI_STYLE_TEXT_CENTER; uiStyleFontSet(&data->fstyle); /* these defines may need to be tweaked depending on font */ @@ -594,38 +594,38 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but) #define TIP_BORDER_X 16.0f #define TIP_BORDER_Y 6.0f - h= BLF_height_max(data->fstyle.uifont_id); + h = BLF_height_max(data->fstyle.uifont_id); - for (a=0, fontw=0, fonth=0; atotline; a++) { - w= BLF_width(data->fstyle.uifont_id, data->lines[a]); - fontw= MAX2(fontw, w); - fonth += (a == 0)? h: h+TIP_MARGIN_Y; + for (a = 0, fontw = 0, fonth = 0; a < data->totline; a++) { + w = BLF_width(data->fstyle.uifont_id, data->lines[a]); + fontw = MAX2(fontw, w); + fonth += (a == 0) ? h : h + TIP_MARGIN_Y; } fontw *= aspect; - ar->regiondata= data; + ar->regiondata = data; - data->toth= fonth; - data->lineh= h; - data->spaceh= TIP_MARGIN_Y; + data->toth = fonth; + data->lineh = h; + data->spaceh = TIP_MARGIN_Y; /* compute position */ - ofsx= (but->block->panel)? but->block->panel->ofsx: 0; - ofsy= (but->block->panel)? but->block->panel->ofsy: 0; + ofsx = (but->block->panel) ? but->block->panel->ofsx : 0; + ofsy = (but->block->panel) ? but->block->panel->ofsy : 0; - x1f= (but->x1 + but->x2) * 0.5f + ofsx - (TIP_BORDER_X * aspect); - x2f= x1f + fontw + (TIP_BORDER_X * aspect); - y2f= but->y1 + ofsy - (TIP_BORDER_Y * aspect); - y1f= y2f - fonth*aspect - (TIP_BORDER_Y * aspect); + x1f = (but->x1 + but->x2) * 0.5f + ofsx - (TIP_BORDER_X * aspect); + x2f = x1f + fontw + (TIP_BORDER_X * aspect); + y2f = but->y1 + ofsy - (TIP_BORDER_Y * aspect); + y1f = y2f - fonth * aspect - (TIP_BORDER_Y * aspect); #undef TIP_MARGIN_Y #undef TIP_BORDER_X #undef TIP_BORDER_Y /* copy to int, gets projected if possible too */ - x1= x1f; y1= y1f; x2= x2f; y2= y2f; + x1 = x1f; y1 = y1f; x2 = x2f; y2 = y2f; if (butregion) { /* XXX temp, region v2ds can be empty still */ @@ -645,12 +645,12 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but) if (x2 > winx) { /* super size */ if (x2 > winx + x1) { - x2= winx; - x1= 0; + x2 = winx; + x1 = 0; } else { - x1 -= x2-winx; - x2= winx; + x1 -= x2 - winx; + x2 = winx; } } /* ensure at least 5 px above screen bounds @@ -662,9 +662,9 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but) /* widget rect, in region coords */ data->bbox.xmin = MENU_SHADOW_SIDE; - data->bbox.xmax = x2-x1 + MENU_SHADOW_SIDE; + data->bbox.xmax = x2 - x1 + MENU_SHADOW_SIDE; data->bbox.ymin = MENU_SHADOW_BOTTOM; - data->bbox.ymax = y2-y1 + MENU_SHADOW_BOTTOM; + data->bbox.ymax = y2 - y1 + MENU_SHADOW_BOTTOM; /* region bigger for shadow */ ar->winrct.xmin = x1 - MENU_SHADOW_SIDE; @@ -707,13 +707,13 @@ typedef struct uiSearchboxData { rcti bbox; uiFontStyle fstyle; uiSearchItems items; - int active; /* index in items array */ - int noback; /* when menu opened with enough space for this */ - int preview; /* draw thumbnail previews, rather than list */ + int active; /* index in items array */ + int noback; /* when menu opened with enough space for this */ + int preview; /* draw thumbnail previews, rather than list */ int prv_rows, prv_cols; } uiSearchboxData; -#define SEARCH_ITEMS 10 +#define SEARCH_ITEMS 10 /* exported for use by search callbacks */ /* returns zero if nothing to add */ @@ -727,14 +727,14 @@ int uiSearchItemAdd(uiSearchItems *items, const char *name, void *poin, int icon /* hijack for finding active item */ if (items->active) { - if (poin==items->active) - items->offset_i= items->totitem; + if (poin == items->active) + items->offset_i = items->totitem; items->totitem++; return 1; } - if (items->totitem>=items->maxitem) { - items->more= 1; + if (items->totitem >= items->maxitem) { + items->more = 1; return 0; } @@ -747,9 +747,9 @@ int uiSearchItemAdd(uiSearchItems *items, const char *name, void *poin, int icon if (items->names) BLI_strncpy(items->names[items->totitem], name, items->maxstrlen); if (items->pointers) - items->pointers[items->totitem]= poin; + items->pointers[items->totitem] = poin; if (items->icons) - items->icons[items->totitem]= iconid; + items->icons[items->totitem] = iconid; items->totitem++; @@ -758,36 +758,36 @@ int uiSearchItemAdd(uiSearchItems *items, const char *name, void *poin, int icon int uiSearchBoxhHeight(void) { - return SEARCH_ITEMS*UI_UNIT_Y + 2*MENU_TOP; + return SEARCH_ITEMS * UI_UNIT_Y + 2 * MENU_TOP; } /* ar is the search box itself */ static void ui_searchbox_select(bContext *C, ARegion *ar, uiBut *but, int step) { - uiSearchboxData *data= ar->regiondata; + uiSearchboxData *data = ar->regiondata; /* apply step */ - data->active+= step; + data->active += step; - if (data->items.totitem==0) - data->active= 0; + if (data->items.totitem == 0) + data->active = 0; else if (data->active > data->items.totitem) { if (data->items.more) { data->items.offset++; - data->active= data->items.totitem; + data->active = data->items.totitem; ui_searchbox_update(C, ar, but, 0); } else - data->active= data->items.totitem; + data->active = data->items.totitem; } else if (data->active < 1) { if (data->items.offset) { data->items.offset--; - data->active= 1; + data->active = 1; ui_searchbox_update(C, ar, but, 0); } else if (data->active < 0) - data->active= 0; + data->active = 0; } ED_region_tag_redraw(ar); @@ -797,11 +797,11 @@ static void ui_searchbox_butrect(rcti *rect, uiSearchboxData *data, int itemnr) { /* thumbnail preview */ if (data->preview) { - int buth = (data->bbox.ymax - data->bbox.ymin - 2*MENU_TOP) / data->prv_rows; + int buth = (data->bbox.ymax - data->bbox.ymin - 2 * MENU_TOP) / data->prv_rows; int butw = (data->bbox.xmax - data->bbox.xmin) / data->prv_cols; int row, col; - *rect= data->bbox; + *rect = data->bbox; col = itemnr % data->prv_cols; row = itemnr / data->prv_cols; @@ -814,13 +814,13 @@ static void ui_searchbox_butrect(rcti *rect, uiSearchboxData *data, int itemnr) } /* list view */ else { - int buth= (data->bbox.ymax-data->bbox.ymin - 2*MENU_TOP)/SEARCH_ITEMS; + int buth = (data->bbox.ymax - data->bbox.ymin - 2 * MENU_TOP) / SEARCH_ITEMS; - *rect= data->bbox; + *rect = data->bbox; rect->xmin = data->bbox.xmin + 3.0f; rect->xmax = data->bbox.xmax - 3.0f; - rect->ymax = data->bbox.ymax - MENU_TOP - itemnr*buth; + rect->ymax = data->bbox.ymax - MENU_TOP - itemnr * buth; rect->ymin = rect->ymax - buth; } @@ -829,35 +829,35 @@ static void ui_searchbox_butrect(rcti *rect, uiSearchboxData *data, int itemnr) /* x and y in screencoords */ int ui_searchbox_inside(ARegion *ar, int x, int y) { - uiSearchboxData *data= ar->regiondata; + uiSearchboxData *data = ar->regiondata; - return(BLI_in_rcti(&data->bbox, x-ar->winrct.xmin, y-ar->winrct.ymin)); + return(BLI_in_rcti(&data->bbox, x - ar->winrct.xmin, y - ar->winrct.ymin)); } /* string validated to be of correct length (but->hardmax) */ void ui_searchbox_apply(uiBut *but, ARegion *ar) { - uiSearchboxData *data= ar->regiondata; + uiSearchboxData *data = ar->regiondata; - but->func_arg2= NULL; + but->func_arg2 = NULL; if (data->active) { - char *name= data->items.names[data->active-1]; - char *cpoin= strchr(name, '|'); + char *name = data->items.names[data->active - 1]; + char *cpoin = strchr(name, '|'); - if (cpoin) cpoin[0]= 0; + if (cpoin) cpoin[0] = 0; BLI_strncpy(but->editstr, name, data->items.maxstrlen); - if (cpoin) cpoin[0]= '|'; + if (cpoin) cpoin[0] = '|'; - but->func_arg2= data->items.pointers[data->active-1]; + but->func_arg2 = data->items.pointers[data->active - 1]; } } void ui_searchbox_event(bContext *C, ARegion *ar, uiBut *but, wmEvent *event) { - uiSearchboxData *data= ar->regiondata; + uiSearchboxData *data = ar->regiondata; - switch(event->type) { + switch (event->type) { case WHEELUPMOUSE: case UPARROWKEY: ui_searchbox_select(C, ar, but, -1); @@ -871,11 +871,11 @@ void ui_searchbox_event(bContext *C, ARegion *ar, uiBut *but, wmEvent *event) rcti rect; int a; - for (a=0; aitems.totitem; a++) { + for (a = 0; a < data->items.totitem; a++) { ui_searchbox_butrect(&rect, data, a); if (BLI_in_rcti(&rect, event->x - ar->winrct.xmin, event->y - ar->winrct.ymin)) { - if ( data->active!= a+1) { - data->active= a+1; + if (data->active != a + 1) { + data->active = a + 1; ui_searchbox_select(C, ar, but, 0); break; } @@ -889,46 +889,46 @@ void ui_searchbox_event(bContext *C, ARegion *ar, uiBut *but, wmEvent *event) /* ar is the search box itself */ void ui_searchbox_update(bContext *C, ARegion *ar, uiBut *but, int reset) { - uiSearchboxData *data= ar->regiondata; + uiSearchboxData *data = ar->regiondata; /* reset vars */ - data->items.totitem= 0; - data->items.more= 0; - if (reset==0) { - data->items.offset_i= data->items.offset; + data->items.totitem = 0; + data->items.more = 0; + if (reset == 0) { + data->items.offset_i = data->items.offset; } else { - data->items.offset_i= data->items.offset= 0; - data->active= 0; + data->items.offset_i = data->items.offset = 0; + data->active = 0; /* handle active */ if (but->search_func && but->func_arg2) { - data->items.active= but->func_arg2; + data->items.active = but->func_arg2; but->search_func(C, but->search_arg, but->editstr, &data->items); - data->items.active= NULL; + data->items.active = NULL; /* found active item, calculate real offset by centering it */ if (data->items.totitem) { /* first case, begin of list */ if (data->items.offset_i < data->items.maxitem) { - data->active= data->items.offset_i+1; - data->items.offset_i= 0; + data->active = data->items.offset_i + 1; + data->items.offset_i = 0; } else { /* second case, end of list */ if (data->items.totitem - data->items.offset_i <= data->items.maxitem) { - data->active= 1 + data->items.offset_i - data->items.totitem + data->items.maxitem; - data->items.offset_i= data->items.totitem - data->items.maxitem; + data->active = 1 + data->items.offset_i - data->items.totitem + data->items.maxitem; + data->items.offset_i = data->items.totitem - data->items.maxitem; } else { /* center active item */ - data->items.offset_i -= data->items.maxitem/2; - data->active= 1 + data->items.maxitem/2; + data->items.offset_i -= data->items.maxitem / 2; + data->active = 1 + data->items.maxitem / 2; } } } - data->items.offset= data->items.offset_i; - data->items.totitem= 0; + data->items.offset = data->items.offset_i; + data->items.totitem = 0; } } @@ -937,19 +937,19 @@ void ui_searchbox_update(bContext *C, ARegion *ar, uiBut *but, int reset) but->search_func(C, but->search_arg, but->editstr, &data->items); /* handle case where editstr is equal to one of items */ - if (reset && data->active==0) { + if (reset && data->active == 0) { int a; - for (a=0; aitems.totitem; a++) { - char *cpoin= strchr(data->items.names[a], '|'); + for (a = 0; a < data->items.totitem; a++) { + char *cpoin = strchr(data->items.names[a], '|'); - if (cpoin) cpoin[0]= 0; - if (0==strcmp(but->editstr, data->items.names[a])) - data->active= a+1; - if (cpoin) cpoin[0]= '|'; + if (cpoin) cpoin[0] = 0; + if (0 == strcmp(but->editstr, data->items.names[a])) + data->active = a + 1; + if (cpoin) cpoin[0] = '|'; } - if (data->items.totitem==1 && but->editstr[0]) - data->active= 1; + if (data->items.totitem == 1 && but->editstr[0]) + data->active = 1; } /* validate selected item */ @@ -960,27 +960,27 @@ void ui_searchbox_update(bContext *C, ARegion *ar, uiBut *but, int reset) void ui_searchbox_autocomplete(bContext *C, ARegion *ar, uiBut *but, char *str) { - uiSearchboxData *data= ar->regiondata; + uiSearchboxData *data = ar->regiondata; if (str[0]) { - data->items.autocpl= autocomplete_begin(str, ui_get_but_string_max_length(but)); + data->items.autocpl = autocomplete_begin(str, ui_get_but_string_max_length(but)); but->search_func(C, but->search_arg, but->editstr, &data->items); autocomplete_end(data->items.autocpl, str); - data->items.autocpl= NULL; + data->items.autocpl = NULL; } } static void ui_searchbox_region_draw_cb(const bContext *UNUSED(C), ARegion *ar) { - uiSearchboxData *data= ar->regiondata; + uiSearchboxData *data = ar->regiondata; /* pixel space */ - wmOrtho2(-0.01f, ar->winx-0.01f, -0.01f, ar->winy-0.01f); + wmOrtho2(-0.01f, ar->winx - 0.01f, -0.01f, ar->winy - 0.01f); if (!data->noback) - ui_draw_search_back(NULL, NULL, &data->bbox); /* style not used yet */ + ui_draw_search_back(NULL, NULL, &data->bbox); /* style not used yet */ /* draw text */ if (data->items.totitem) { @@ -989,51 +989,51 @@ static void ui_searchbox_region_draw_cb(const bContext *UNUSED(C), ARegion *ar) if (data->preview) { /* draw items */ - for (a=0; aitems.totitem; a++) { + for (a = 0; a < data->items.totitem; a++) { ui_searchbox_butrect(&rect, data, a); /* widget itself */ if (data->preview) - ui_draw_preview_item(&data->fstyle, &rect, data->items.names[a], data->items.icons[a], (a+1)==data->active?UI_ACTIVE:0); + ui_draw_preview_item(&data->fstyle, &rect, data->items.names[a], data->items.icons[a], (a + 1) == data->active ? UI_ACTIVE : 0); else - ui_draw_menu_item(&data->fstyle, &rect, data->items.names[a], data->items.icons[a], (a+1)==data->active?UI_ACTIVE:0); + ui_draw_menu_item(&data->fstyle, &rect, data->items.names[a], data->items.icons[a], (a + 1) == data->active ? UI_ACTIVE : 0); } /* indicate more */ if (data->items.more) { - ui_searchbox_butrect(&rect, data, data->items.maxitem-1); + ui_searchbox_butrect(&rect, data, data->items.maxitem - 1); glEnable(GL_BLEND); - UI_icon_draw(rect.xmax-18, rect.ymin-7, ICON_TRIA_DOWN); + UI_icon_draw(rect.xmax - 18, rect.ymin - 7, ICON_TRIA_DOWN); glDisable(GL_BLEND); } if (data->items.offset) { ui_searchbox_butrect(&rect, data, 0); glEnable(GL_BLEND); - UI_icon_draw(rect.xmin, rect.ymax-9, ICON_TRIA_UP); + UI_icon_draw(rect.xmin, rect.ymax - 9, ICON_TRIA_UP); glDisable(GL_BLEND); } } else { /* draw items */ - for (a=0; aitems.totitem; a++) { + for (a = 0; a < data->items.totitem; a++) { ui_searchbox_butrect(&rect, data, a); /* widget itself */ - ui_draw_menu_item(&data->fstyle, &rect, data->items.names[a], data->items.icons[a], (a+1)==data->active?UI_ACTIVE:0); + ui_draw_menu_item(&data->fstyle, &rect, data->items.names[a], data->items.icons[a], (a + 1) == data->active ? UI_ACTIVE : 0); } /* indicate more */ if (data->items.more) { - ui_searchbox_butrect(&rect, data, data->items.maxitem-1); + ui_searchbox_butrect(&rect, data, data->items.maxitem - 1); glEnable(GL_BLEND); - UI_icon_draw((rect.xmax-rect.xmin)/2, rect.ymin-9, ICON_TRIA_DOWN); + UI_icon_draw((rect.xmax - rect.xmin) / 2, rect.ymin - 9, ICON_TRIA_DOWN); glDisable(GL_BLEND); } if (data->items.offset) { ui_searchbox_butrect(&rect, data, 0); glEnable(GL_BLEND); - UI_icon_draw((rect.xmax-rect.xmin)/2, rect.ymax-7, ICON_TRIA_UP); + UI_icon_draw((rect.xmax - rect.xmin) / 2, rect.ymax - 7, ICON_TRIA_UP); glDisable(GL_BLEND); } } @@ -1042,7 +1042,7 @@ static void ui_searchbox_region_draw_cb(const bContext *UNUSED(C), ARegion *ar) static void ui_searchbox_region_free_cb(ARegion *ar) { - uiSearchboxData *data= ar->regiondata; + uiSearchboxData *data = ar->regiondata; int a; /* free search data */ @@ -1054,42 +1054,42 @@ static void ui_searchbox_region_free_cb(ARegion *ar) MEM_freeN(data->items.icons); MEM_freeN(data); - ar->regiondata= NULL; + ar->regiondata = NULL; } ARegion *ui_searchbox_create(bContext *C, ARegion *butregion, uiBut *but) { - uiStyle *style= UI_GetStyle(); + uiStyle *style = UI_GetStyle(); static ARegionType type; ARegion *ar; uiSearchboxData *data; - float aspect= but->block->aspect; + float aspect = but->block->aspect; float x1f, x2f, y1f, y2f; int x1, x2, y1, y2, winx, winy, ofsx, ofsy; /* create area region */ - ar= ui_add_temporary_region(CTX_wm_screen(C)); + ar = ui_add_temporary_region(CTX_wm_screen(C)); memset(&type, 0, sizeof(ARegionType)); - type.draw= ui_searchbox_region_draw_cb; - type.free= ui_searchbox_region_free_cb; - ar->type= &type; + type.draw = ui_searchbox_region_draw_cb; + type.free = ui_searchbox_region_free_cb; + ar->type = &type; /* create searchbox data */ - data= MEM_callocN(sizeof(uiSearchboxData), "uiSearchboxData"); + data = MEM_callocN(sizeof(uiSearchboxData), "uiSearchboxData"); /* set font, get bb */ - data->fstyle= style->widget; /* copy struct */ - data->fstyle.align= UI_STYLE_TEXT_CENTER; + data->fstyle = style->widget; /* copy struct */ + data->fstyle.align = UI_STYLE_TEXT_CENTER; ui_fontscale(&data->fstyle.points, aspect); uiStyleFontSet(&data->fstyle); - ar->regiondata= data; + ar->regiondata = data; /* special case, hardcoded feature, not draw backdrop when called from menus, * assume for design that popup already added it */ if (but->block->flag & UI_BLOCK_LOOP) - data->noback= 1; + data->noback = 1; if (but->a1 > 0 && but->a2 > 0) { data->preview = 1; @@ -1102,30 +1102,30 @@ ARegion *ui_searchbox_create(bContext *C, ARegion *butregion, uiBut *but) /* this case is search menu inside other menu */ /* we copy region size */ - ar->winrct= butregion->winrct; + ar->winrct = butregion->winrct; /* widget rect, in region coords */ data->bbox.xmin = MENU_SHADOW_SIDE; - data->bbox.xmax = (ar->winrct.xmax-ar->winrct.xmin) - MENU_SHADOW_SIDE; + data->bbox.xmax = (ar->winrct.xmax - ar->winrct.xmin) - MENU_SHADOW_SIDE; data->bbox.ymin = MENU_SHADOW_BOTTOM; - data->bbox.ymax = (ar->winrct.ymax-ar->winrct.ymin) - MENU_SHADOW_BOTTOM; + data->bbox.ymax = (ar->winrct.ymax - ar->winrct.ymin) - MENU_SHADOW_BOTTOM; /* check if button is lower half */ - if ( but->y2 < (but->block->miny+but->block->maxy)/2 ) { - data->bbox.ymin += (but->y2-but->y1); + if (but->y2 < (but->block->miny + but->block->maxy) / 2) { + data->bbox.ymin += (but->y2 - but->y1); } else { - data->bbox.ymax -= (but->y2-but->y1); + data->bbox.ymax -= (but->y2 - but->y1); } } else { - x1f= but->x1 - 5; /* align text with button */ - x2f= but->x2 + 5; /* symmetrical */ - y2f= but->y1; - y1f= y2f - uiSearchBoxhHeight(); + x1f = but->x1 - 5; /* align text with button */ + x2f = but->x2 + 5; /* symmetrical */ + y2f = but->y1; + y1f = y2f - uiSearchBoxhHeight(); - ofsx= (but->block->panel)? but->block->panel->ofsx: 0; - ofsy= (but->block->panel)? but->block->panel->ofsy: 0; + ofsx = (but->block->panel) ? but->block->panel->ofsx : 0; + ofsy = (but->block->panel) ? but->block->panel->ofsy : 0; x1f += ofsx; x2f += ofsx; @@ -1133,10 +1133,10 @@ ARegion *ui_searchbox_create(bContext *C, ARegion *butregion, uiBut *but) y2f += ofsy; /* minimal width */ - if (x2f - x1f < 150) x2f= x1f+150; // XXX arbitrary + if (x2f - x1f < 150) x2f = x1f + 150; // XXX arbitrary /* copy to int, gets projected if possible too */ - x1= x1f; y1= y1f; x2= x2f; y2= y2f; + x1 = x1f; y1 = y1f; x2 = x2f; y2 = y2f; if (butregion->v2d.cur.xmin != butregion->v2d.cur.xmax) { UI_view2d_to_region_no_clip(&butregion->v2d, x1f, y1f, &x1, &y1); @@ -1153,12 +1153,12 @@ ARegion *ui_searchbox_create(bContext *C, ARegion *butregion, uiBut *but) if (x2 > winx) { /* super size */ if (x2 > winx + x1) { - x2= winx; - x1= 0; + x2 = winx; + x1 = 0; } else { - x1 -= x2-winx; - x2= winx; + x1 -= x2 - winx; + x2 = winx; } } @@ -1167,15 +1167,15 @@ ARegion *ui_searchbox_create(bContext *C, ARegion *butregion, uiBut *but) UI_view2d_to_region_no_clip(&butregion->v2d, 0, but->y2 + ofsy, NULL, &newy1); newy1 += butregion->winrct.ymin; - y2= y2-y1 + newy1; - y1= newy1; + y2 = y2 - y1 + newy1; + y1 = newy1; } /* widget rect, in region coords */ data->bbox.xmin = MENU_SHADOW_SIDE; - data->bbox.xmax = x2-x1 + MENU_SHADOW_SIDE; + data->bbox.xmax = x2 - x1 + MENU_SHADOW_SIDE; data->bbox.ymin = MENU_SHADOW_BOTTOM; - data->bbox.ymax = y2-y1 + MENU_SHADOW_BOTTOM; + data->bbox.ymax = y2 - y1 + MENU_SHADOW_BOTTOM; /* region bigger for shadow */ ar->winrct.xmin = x1 - MENU_SHADOW_SIDE; @@ -1192,18 +1192,18 @@ ARegion *ui_searchbox_create(bContext *C, ARegion *butregion, uiBut *but) /* prepare search data */ if (data->preview) { - data->items.maxitem= data->prv_rows * data->prv_cols; + data->items.maxitem = data->prv_rows * data->prv_cols; } else { - data->items.maxitem= SEARCH_ITEMS; + data->items.maxitem = SEARCH_ITEMS; } - data->items.maxstrlen= but->hardmax; - data->items.totitem= 0; - data->items.names= MEM_callocN(data->items.maxitem*sizeof(void *), "search names"); - data->items.pointers= MEM_callocN(data->items.maxitem*sizeof(void *), "search pointers"); - data->items.icons= MEM_callocN(data->items.maxitem*sizeof(int), "search icons"); - for (x1=0; x1items.maxitem; x1++) - data->items.names[x1]= MEM_callocN(but->hardmax+1, "search pointers"); + data->items.maxstrlen = but->hardmax; + data->items.totitem = 0; + data->items.names = MEM_callocN(data->items.maxitem * sizeof(void *), "search names"); + data->items.pointers = MEM_callocN(data->items.maxitem * sizeof(void *), "search pointers"); + data->items.icons = MEM_callocN(data->items.maxitem * sizeof(int), "search icons"); + for (x1 = 0; x1 < data->items.maxitem; x1++) + data->items.names[x1] = MEM_callocN(but->hardmax + 1, "search pointers"); return ar; } @@ -1226,25 +1226,25 @@ void ui_but_search_test(uiBut *but) return; } - items= MEM_callocN(sizeof(uiSearchItems), "search items"); + items = MEM_callocN(sizeof(uiSearchItems), "search items"); /* setup search struct */ - items->maxitem= 10; - items->maxstrlen= 256; - items->names= MEM_callocN(items->maxitem*sizeof(void *), "search names"); - for (x1=0; x1maxitem; x1++) - items->names[x1]= MEM_callocN(but->hardmax+1, "search names"); + items->maxitem = 10; + items->maxstrlen = 256; + items->names = MEM_callocN(items->maxitem * sizeof(void *), "search names"); + for (x1 = 0; x1 < items->maxitem; x1++) + items->names[x1] = MEM_callocN(but->hardmax + 1, "search names"); but->search_func(but->block->evil_C, but->search_arg, but->drawstr, items); /* only redalert when we are sure of it, this can miss cases when >10 matches */ - if (items->totitem==0) + if (items->totitem == 0) uiButSetFlag(but, UI_BUT_REDALERT); - else if (items->more==0) { - for (x1= 0; x1totitem; x1++) - if (strcmp(but->drawstr, items->names[x1])==0) + else if (items->more == 0) { + for (x1 = 0; x1 < items->totitem; x1++) + if (strcmp(but->drawstr, items->names[x1]) == 0) break; - if (x1==items->totitem) + if (x1 == items->totitem) uiButSetFlag(but, UI_BUT_REDALERT); } @@ -1265,8 +1265,8 @@ static void ui_block_position(wmWindow *window, ARegion *butregion, uiBut *but, uiSafetyRct *saferct; rctf butrct; /*float aspect;*/ /*UNUSED*/ - int xsize, ysize, xof=0, yof=0, center; - short dir1= 0, dir2=0; + int xsize, ysize, xof = 0, yof = 0, center; + short dir1 = 0, dir2 = 0; /* transform to window coordinates, using the source button region/block */ butrct.xmin = but->x1; butrct.xmax = but->x2; @@ -1278,24 +1278,24 @@ static void ui_block_position(wmWindow *window, ARegion *butregion, uiBut *but, /* calc block rect */ if (block->minx == 0.0f && block->maxx == 0.0f) { if (block->buttons.first) { - block->minx= block->miny= 10000; - block->maxx= block->maxy= -10000; + block->minx = block->miny = 10000; + block->maxx = block->maxy = -10000; - bt= block->buttons.first; + bt = block->buttons.first; while (bt) { - if (bt->x1 < block->minx) block->minx= bt->x1; - if (bt->y1 < block->miny) block->miny= bt->y1; + if (bt->x1 < block->minx) block->minx = bt->x1; + if (bt->y1 < block->miny) block->miny = bt->y1; - if (bt->x2 > block->maxx) block->maxx= bt->x2; - if (bt->y2 > block->maxy) block->maxy= bt->y2; + if (bt->x2 > block->maxx) block->maxx = bt->x2; + if (bt->y2 > block->maxy) block->maxy = bt->y2; - bt= bt->next; + bt = bt->next; } } else { /* we're nice and allow empty blocks too */ - block->minx= block->miny= 0; - block->maxx= block->maxy= 20; + block->minx = block->miny = 0; + block->maxx = block->maxy = 20; } } @@ -1306,124 +1306,124 @@ static void ui_block_position(wmWindow *window, ARegion *butregion, uiBut *but, //block->minx-= 2.0; block->miny-= 2.0; //block->maxx+= 2.0; block->maxy+= 2.0; - xsize= block->maxx - block->minx+4; // 4 for shadow - ysize= block->maxy - block->miny+4; + xsize = block->maxx - block->minx + 4; // 4 for shadow + ysize = block->maxy - block->miny + 4; /*aspect/= (float)xsize;*/ /*UNUSED*/ { - int left=0, right=0, top=0, down=0; + int left = 0, right = 0, top = 0, down = 0; int winx, winy; // int offscreen; wm_window_get_size(window, &winx, &winy); - if (block->direction & UI_CENTER) center= ysize/2; - else center= 0; + if (block->direction & UI_CENTER) center = ysize / 2; + else center = 0; /* check if there's space at all */ - if ( butrct.xmin-xsize > 0.0f) left= 1; - if ( butrct.xmax+xsize < winx) right= 1; - if ( butrct.ymin-ysize+center > 0.0f) down= 1; - if ( butrct.ymax+ysize-center < winy) top= 1; - - if (top==0 && down==0) { - if (butrct.ymin-ysize < winy-butrct.ymax-ysize) - top= 1; + if (butrct.xmin - xsize > 0.0f) left = 1; + if (butrct.xmax + xsize < winx) right = 1; + if (butrct.ymin - ysize + center > 0.0f) down = 1; + if (butrct.ymax + ysize - center < winy) top = 1; + + if (top == 0 && down == 0) { + if (butrct.ymin - ysize < winy - butrct.ymax - ysize) + top = 1; else - down= 1; + down = 1; } - dir1= block->direction & UI_DIRECTION; + dir1 = block->direction & UI_DIRECTION; /* secundary directions */ - if (dir1 & (UI_TOP|UI_DOWN)) { - if (dir1 & UI_LEFT) dir2= UI_LEFT; - else if (dir1 & UI_RIGHT) dir2= UI_RIGHT; - dir1 &= (UI_TOP|UI_DOWN); + if (dir1 & (UI_TOP | UI_DOWN)) { + if (dir1 & UI_LEFT) dir2 = UI_LEFT; + else if (dir1 & UI_RIGHT) dir2 = UI_RIGHT; + dir1 &= (UI_TOP | UI_DOWN); } - if (dir2==0) if (dir1==UI_LEFT || dir1==UI_RIGHT) dir2= UI_DOWN; - if (dir2==0) if (dir1==UI_TOP || dir1==UI_DOWN) dir2= UI_LEFT; + if (dir2 == 0) if (dir1 == UI_LEFT || dir1 == UI_RIGHT) dir2 = UI_DOWN; + if (dir2 == 0) if (dir1 == UI_TOP || dir1 == UI_DOWN) dir2 = UI_LEFT; /* no space at all? don't change */ if (left || right) { - if (dir1==UI_LEFT && left==0) dir1= UI_RIGHT; - if (dir1==UI_RIGHT && right==0) dir1= UI_LEFT; + if (dir1 == UI_LEFT && left == 0) dir1 = UI_RIGHT; + if (dir1 == UI_RIGHT && right == 0) dir1 = UI_LEFT; /* this is aligning, not append! */ - if (dir2==UI_LEFT && right==0) dir2= UI_RIGHT; - if (dir2==UI_RIGHT && left==0) dir2= UI_LEFT; + if (dir2 == UI_LEFT && right == 0) dir2 = UI_RIGHT; + if (dir2 == UI_RIGHT && left == 0) dir2 = UI_LEFT; } if (down || top) { - if (dir1==UI_TOP && top==0) dir1= UI_DOWN; - if (dir1==UI_DOWN && down==0) dir1= UI_TOP; - if (dir2==UI_TOP && top==0) dir2= UI_DOWN; - if (dir2==UI_DOWN && down==0) dir2= UI_TOP; - } - - if (dir1==UI_LEFT) { - xof= butrct.xmin - block->maxx; - if (dir2==UI_TOP) yof= butrct.ymin - block->miny-center; - else yof= butrct.ymax - block->maxy+center; - } - else if (dir1==UI_RIGHT) { - xof= butrct.xmax - block->minx; - if (dir2==UI_TOP) yof= butrct.ymin - block->miny-center; - else yof= butrct.ymax - block->maxy+center; - } - else if (dir1==UI_TOP) { - yof= butrct.ymax - block->miny; - if (dir2==UI_RIGHT) xof= butrct.xmax - block->maxx; - else xof= butrct.xmin - block->minx; + if (dir1 == UI_TOP && top == 0) dir1 = UI_DOWN; + if (dir1 == UI_DOWN && down == 0) dir1 = UI_TOP; + if (dir2 == UI_TOP && top == 0) dir2 = UI_DOWN; + if (dir2 == UI_DOWN && down == 0) dir2 = UI_TOP; + } + + if (dir1 == UI_LEFT) { + xof = butrct.xmin - block->maxx; + if (dir2 == UI_TOP) yof = butrct.ymin - block->miny - center; + else yof = butrct.ymax - block->maxy + center; + } + else if (dir1 == UI_RIGHT) { + xof = butrct.xmax - block->minx; + if (dir2 == UI_TOP) yof = butrct.ymin - block->miny - center; + else yof = butrct.ymax - block->maxy + center; + } + else if (dir1 == UI_TOP) { + yof = butrct.ymax - block->miny; + if (dir2 == UI_RIGHT) xof = butrct.xmax - block->maxx; + else xof = butrct.xmin - block->minx; // changed direction? - if ((dir1 & block->direction)==0) { + if ((dir1 & block->direction) == 0) { if (block->direction & UI_SHIFT_FLIPPED) - xof+= dir2==UI_LEFT?25:-25; + xof += dir2 == UI_LEFT ? 25 : -25; uiBlockFlipOrder(block); } } - else if (dir1==UI_DOWN) { - yof= butrct.ymin - block->maxy; - if (dir2==UI_RIGHT) xof= butrct.xmax - block->maxx; - else xof= butrct.xmin - block->minx; + else if (dir1 == UI_DOWN) { + yof = butrct.ymin - block->maxy; + if (dir2 == UI_RIGHT) xof = butrct.xmax - block->maxx; + else xof = butrct.xmin - block->minx; // changed direction? - if ((dir1 & block->direction)==0) { + if ((dir1 & block->direction) == 0) { if (block->direction & UI_SHIFT_FLIPPED) - xof+= dir2==UI_LEFT?25:-25; + xof += dir2 == UI_LEFT ? 25 : -25; uiBlockFlipOrder(block); } } /* and now we handle the exception; no space below or to top */ - if (top==0 && down==0) { - if (dir1==UI_LEFT || dir1==UI_RIGHT) { + if (top == 0 && down == 0) { + if (dir1 == UI_LEFT || dir1 == UI_RIGHT) { // align with bottom of screen // yof= ysize; (not with menu scrolls) } } /* or no space left or right */ - if (left==0 && right==0) { - if (dir1==UI_TOP || dir1==UI_DOWN) { + if (left == 0 && right == 0) { + if (dir1 == UI_TOP || dir1 == UI_DOWN) { // align with left size of screen - xof= -block->minx+5; + xof = -block->minx + 5; } } // apply requested offset in the block - xof += block->xofs/block->aspect; - yof += block->yofs/block->aspect; + xof += block->xofs / block->aspect; + yof += block->yofs / block->aspect; #if 0 /* clamp to window bounds, could be made into an option if its ever annoying */ - if ( (offscreen= (block->miny+yof)) < 0) yof -= offscreen; /* bottom */ - else if ((offscreen= (block->maxy+yof)-winy) > 0) yof -= offscreen; /* top */ - if ( (offscreen= (block->minx+xof)) < 0) xof -= offscreen; /* left */ - else if ((offscreen= (block->maxx+xof)-winx) > 0) xof -= offscreen; /* right */ + if ( (offscreen = (block->miny + yof)) < 0) yof -= offscreen; /* bottom */ + else if ((offscreen = (block->maxy + yof) - winy) > 0) yof -= offscreen; /* top */ + if ( (offscreen = (block->minx + xof)) < 0) xof -= offscreen; /* left */ + else if ((offscreen = (block->maxx + xof) - winx) > 0) xof -= offscreen; /* right */ #endif } /* apply offset, buttons in window coords */ - for (bt= block->buttons.first; bt; bt= bt->next) { + for (bt = block->buttons.first; bt; bt = bt->next) { ui_block_to_window_fl(butregion, but->block, &bt->x1, &bt->y1); ui_block_to_window_fl(butregion, but->block, &bt->x2, &bt->y2); @@ -1432,7 +1432,7 @@ static void ui_block_position(wmWindow *window, ARegion *butregion, uiBut *but, bt->y1 += yof; bt->y2 += yof; - bt->aspect= 1.0; + bt->aspect = 1.0; // ui_check_but recalculates drawstring size in pixels ui_check_but(bt); } @@ -1444,43 +1444,43 @@ static void ui_block_position(wmWindow *window, ARegion *butregion, uiBut *but, /* safety calculus */ if (but) { - float midx= (butrct.xmin+butrct.xmax)/2.0f; - float midy= (butrct.ymin+butrct.ymax)/2.0f; + float midx = (butrct.xmin + butrct.xmax) / 2.0f; + float midy = (butrct.ymin + butrct.ymax) / 2.0f; /* when you are outside parent button, safety there should be smaller */ // parent button to left - if ( midx < block->minx ) block->safety.xmin = block->minx-3; - else block->safety.xmin = block->minx-40; + if (midx < block->minx) block->safety.xmin = block->minx - 3; + else block->safety.xmin = block->minx - 40; // parent button to right - if ( midx > block->maxx ) block->safety.xmax = block->maxx+3; - else block->safety.xmax = block->maxx+40; + if (midx > block->maxx) block->safety.xmax = block->maxx + 3; + else block->safety.xmax = block->maxx + 40; // parent button on bottom - if ( midy < block->miny ) block->safety.ymin = block->miny-3; - else block->safety.ymin = block->miny-40; + if (midy < block->miny) block->safety.ymin = block->miny - 3; + else block->safety.ymin = block->miny - 40; // parent button on top - if ( midy > block->maxy ) block->safety.ymax = block->maxy+3; - else block->safety.ymax = block->maxy+40; + if (midy > block->maxy) block->safety.ymax = block->maxy + 3; + else block->safety.ymax = block->maxy + 40; // exception for switched pulldowns... - if (dir1 && (dir1 & block->direction)==0) { - if (dir2==UI_RIGHT) block->safety.xmax = block->maxx+3; - if (dir2==UI_LEFT) block->safety.xmin = block->minx-3; + if (dir1 && (dir1 & block->direction) == 0) { + if (dir2 == UI_RIGHT) block->safety.xmax = block->maxx + 3; + if (dir2 == UI_LEFT) block->safety.xmin = block->minx - 3; } - block->direction= dir1; + block->direction = dir1; } else { - block->safety.xmin = block->minx-40; - block->safety.ymin = block->miny-40; - block->safety.xmax = block->maxx+40; - block->safety.ymax = block->maxy+40; + block->safety.xmin = block->minx - 40; + block->safety.ymin = block->miny - 40; + block->safety.xmax = block->maxx + 40; + block->safety.ymax = block->maxy + 40; } /* keep a list of these, needed for pulldown menus */ - saferct= MEM_callocN(sizeof(uiSafetyRct), "uiSafetyRct"); - saferct->parent= butrct; - saferct->safety= block->safety; + saferct = MEM_callocN(sizeof(uiSafetyRct), "uiSafetyRct"); + saferct->parent = butrct; + saferct->safety = block->safety; BLI_freelistN(&block->saferct); if (but) BLI_duplicatelist(&block->saferct, &but->block->saferct); @@ -1491,7 +1491,7 @@ static void ui_block_region_draw(const bContext *C, ARegion *ar) { uiBlock *block; - for (block=ar->uiblocks.first; block; block=block->next) + for (block = ar->uiblocks.first; block; block = block->next) uiDrawBlock(C, block); } @@ -1502,14 +1502,14 @@ static void ui_popup_block_clip(wmWindow *window, uiBlock *block) wm_window_get_size(window, &winx, &winy); if (block->minx < MENU_SHADOW_SIDE) - block->minx= MENU_SHADOW_SIDE; - if (block->maxx > winx-MENU_SHADOW_SIDE) - block->maxx= winx-MENU_SHADOW_SIDE; + block->minx = MENU_SHADOW_SIDE; + if (block->maxx > winx - MENU_SHADOW_SIDE) + block->maxx = winx - MENU_SHADOW_SIDE; if (block->miny < MENU_SHADOW_BOTTOM) - block->miny= MENU_SHADOW_BOTTOM; - if (block->maxy > winy-MENU_TOP) - block->maxy= winy-MENU_TOP; + block->miny = MENU_SHADOW_BOTTOM; + if (block->maxy > winy - MENU_TOP) + block->maxy = winy - MENU_TOP; } void ui_popup_block_scrolltest(uiBlock *block) @@ -1518,21 +1518,21 @@ void ui_popup_block_scrolltest(uiBlock *block) /* Knowing direction is necessary for multi-column menus... */ int is_flip = (block->direction & UI_TOP) && !(block->flag & UI_BLOCK_NO_FLIP); - block->flag &= ~(UI_BLOCK_CLIPBOTTOM|UI_BLOCK_CLIPTOP); + block->flag &= ~(UI_BLOCK_CLIPBOTTOM | UI_BLOCK_CLIPTOP); - for (bt= block->buttons.first; bt; bt= bt->next) + for (bt = block->buttons.first; bt; bt = bt->next) bt->flag &= ~UI_SCROLLED; - if (block->buttons.first==block->buttons.last) + if (block->buttons.first == block->buttons.last) return; /* mark buttons that are outside boundary and the ones next to it for arrow(s) */ - for (bt= block->buttons.first; bt; bt= bt->next) { + for (bt = block->buttons.first; bt; bt = bt->next) { if (bt->y1 < block->miny) { bt->flag |= UI_SCROLLED; block->flag |= UI_BLOCK_CLIPBOTTOM; /* make space for arrow */ - if (bt->y2 < block->miny +10) { + if (bt->y2 < block->miny + 10) { if (is_flip && bt->next && bt->next->y1 > bt->y1) bt->next->flag |= UI_SCROLLED; else if (!is_flip && bt->prev && bt->prev->y1 > bt->y1) @@ -1543,7 +1543,7 @@ void ui_popup_block_scrolltest(uiBlock *block) bt->flag |= UI_SCROLLED; block->flag |= UI_BLOCK_CLIPTOP; /* make space for arrow */ - if (bt->y1 > block->maxy -10) { + if (bt->y1 > block->maxy - 10) { if (!is_flip && bt->next && bt->next->y2 < bt->y2) bt->next->flag |= UI_SCROLLED; else if (is_flip && bt->prev && bt->prev->y2 < bt->y2) @@ -1555,7 +1555,7 @@ void ui_popup_block_scrolltest(uiBlock *block) uiPopupBlockHandle *ui_popup_block_create(bContext *C, ARegion *butregion, uiBut *but, uiBlockCreateFunc create_func, uiBlockHandleCreateFunc handle_create_func, void *arg) { - wmWindow *window= CTX_wm_window(C); + wmWindow *window = CTX_wm_window(C); static ARegionType type; ARegion *ar; uiBlock *block; @@ -1564,37 +1564,37 @@ uiPopupBlockHandle *ui_popup_block_create(bContext *C, ARegion *butregion, uiBut uiSafetyRct *saferct; /* create handle */ - handle= MEM_callocN(sizeof(uiPopupBlockHandle), "uiPopupBlockHandle"); + handle = MEM_callocN(sizeof(uiPopupBlockHandle), "uiPopupBlockHandle"); /* store context for operator */ - handle->ctx_area= CTX_wm_area(C); - handle->ctx_region= CTX_wm_region(C); + handle->ctx_area = CTX_wm_area(C); + handle->ctx_region = CTX_wm_region(C); /* create area region */ - ar= ui_add_temporary_region(CTX_wm_screen(C)); - handle->region= ar; + ar = ui_add_temporary_region(CTX_wm_screen(C)); + handle->region = ar; memset(&type, 0, sizeof(ARegionType)); - type.draw= ui_block_region_draw; - ar->type= &type; + type.draw = ui_block_region_draw; + ar->type = &type; UI_add_region_handlers(&ar->handlers); /* create ui block */ if (create_func) - block= create_func(C, handle->region, arg); + block = create_func(C, handle->region, arg); else - block= handle_create_func(C, handle, arg); + block = handle_create_func(C, handle, arg); if (block->handle) { memcpy(block->handle, handle, sizeof(uiPopupBlockHandle)); MEM_freeN(handle); - handle= block->handle; + handle = block->handle; } else - block->handle= handle; + block->handle = handle; - ar->regiondata= handle; + ar->regiondata = handle; if (!block->endblock) uiEndBlock(C, block); @@ -1602,7 +1602,7 @@ uiPopupBlockHandle *ui_popup_block_create(bContext *C, ARegion *butregion, uiBut /* if this is being created from a button */ if (but) { if (ELEM(but->type, BLOCK, PULLDOWN)) - block->xofs = -2; /* for proper alignment */ + block->xofs = -2; /* for proper alignment */ block->aspect = but->block->aspect; @@ -1610,10 +1610,10 @@ uiPopupBlockHandle *ui_popup_block_create(bContext *C, ARegion *butregion, uiBut } else { /* keep a list of these, needed for pulldown menus */ - saferct= MEM_callocN(sizeof(uiSafetyRct), "uiSafetyRct"); - saferct->safety= block->safety; + saferct = MEM_callocN(sizeof(uiSafetyRct), "uiSafetyRct"); + saferct->safety = block->safety; BLI_addhead(&block->saferct, saferct); - block->flag |= UI_BLOCK_POPUP|UI_BLOCK_NUMSELECT; + block->flag |= UI_BLOCK_POPUP | UI_BLOCK_NUMSELECT; } /* clip block with window boundary */ @@ -1632,7 +1632,7 @@ uiPopupBlockHandle *ui_popup_block_create(bContext *C, ARegion *butregion, uiBut block->miny -= ar->winrct.ymin; block->maxy -= ar->winrct.ymin; - for (bt= block->buttons.first; bt; bt= bt->next) { + for (bt = block->buttons.first; bt; bt = bt->next) { bt->x1 -= ar->winrct.xmin; bt->x2 -= ar->winrct.xmin; bt->y1 -= ar->winrct.ymin; @@ -1672,32 +1672,32 @@ void ui_popup_block_free(bContext *C, uiPopupBlockHandle *handle) static void ui_block_func_MENUSTR(bContext *UNUSED(C), uiLayout *layout, void *arg_str) { - uiBlock *block= uiLayoutGetBlock(layout); - uiPopupBlockHandle *handle= block->handle; - uiLayout *split, *column=NULL; + uiBlock *block = uiLayoutGetBlock(layout); + uiPopupBlockHandle *handle = block->handle; + uiLayout *split, *column = NULL; uiBut *bt; MenuData *md; MenuEntry *entry; - const char *instr= arg_str; + const char *instr = arg_str; int columns, rows, a, b; - int column_start= 0, column_end= 0; + int column_start = 0, column_end = 0; uiBlockSetFlag(block, UI_BLOCK_MOVEMOUSE_QUIT); /* compute menu data */ - md= decompose_menu_string(instr); + md = decompose_menu_string(instr); /* columns and row estimation */ - columns= (md->nitems+20)/20; - if (columns<1) - columns= 1; - if (columns>8) - columns= (md->nitems+25)/25; - - rows= md->nitems/columns; - if (rows<1) - rows= 1; - while (rows*columnsnitems) + columns = (md->nitems + 20) / 20; + if (columns < 1) + columns = 1; + if (columns > 8) + columns = (md->nitems + 25) / 25; + + rows = md->nitems / columns; + if (rows < 1) + rows = 1; + while (rows * columns < md->nitems) rows++; /* create title */ @@ -1707,14 +1707,14 @@ static void ui_block_func_MENUSTR(bContext *UNUSED(C), uiLayout *layout, void *a } else { uiItemL(layout, md->title, ICON_NONE); - bt= block->buttons.last; - bt->flag= UI_TEXT_LEFT; + bt = block->buttons.last; + bt->flag = UI_TEXT_LEFT; } } /* inconsistent, but menus with labels do not look good flipped */ - entry= md->items; - for (a=0; anitems; a++, entry++) { + entry = md->items; + for (a = 0; a < md->nitems; a++, entry++) { if (entry->sepr && entry->str[0]) { block->flag |= UI_BLOCK_NO_FLIP; break; @@ -1722,45 +1722,45 @@ static void ui_block_func_MENUSTR(bContext *UNUSED(C), uiLayout *layout, void *a } /* create items */ - split= uiLayoutSplit(layout, 0, 0); + split = uiLayoutSplit(layout, 0, 0); - for (a=0; anitems; a++) { + for (a = 0; a < md->nitems; a++) { if (a == column_end) { /* start new column, and find out where it ends in advance, so we * can flip the order of items properly per column */ - column_start= a; - column_end= md->nitems; + column_start = a; + column_end = md->nitems; - for (b=a+1; bnitems; b++) { - entry= &md->items[b]; + for (b = a + 1; b < md->nitems; b++) { + entry = &md->items[b]; /* new column on N rows or on separation label */ - if (((b-a) % rows == 0) || (entry->sepr && entry->str[0])) { + if (((b - a) % rows == 0) || (entry->sepr && entry->str[0])) { column_end = b; break; } } - column= uiLayoutColumn(split, 0); + column = uiLayoutColumn(split, 0); } if (block->flag & UI_BLOCK_NO_FLIP) - entry= &md->items[a]; + entry = &md->items[a]; else - entry= &md->items[column_start + column_end-1-a]; + entry = &md->items[column_start + column_end - 1 - a]; if (entry->sepr) { uiItemL(column, entry->str, entry->icon); - bt= block->buttons.last; - bt->flag= UI_TEXT_LEFT; + bt = block->buttons.last; + bt->flag = UI_TEXT_LEFT; } else if (entry->icon) { - uiDefIconTextButF(block, BUTM|FLO, B_NOP, entry->icon, entry->str, 0, 0, - UI_UNIT_X*5, UI_UNIT_Y, &handle->retvalue, (float) entry->retval, 0.0, 0, 0, ""); + uiDefIconTextButF(block, BUTM | FLO, B_NOP, entry->icon, entry->str, 0, 0, + UI_UNIT_X * 5, UI_UNIT_Y, &handle->retvalue, (float) entry->retval, 0.0, 0, 0, ""); } else { - uiDefButF(block, BUTM|FLO, B_NOP, entry->str, 0, 0, - UI_UNIT_X*5, UI_UNIT_X, &handle->retvalue, (float) entry->retval, 0.0, 0, 0, ""); + uiDefButF(block, BUTM | FLO, B_NOP, entry->str, 0, 0, + UI_UNIT_X * 5, UI_UNIT_X, &handle->retvalue, (float) entry->retval, 0.0, 0, 0, ""); } } @@ -1769,46 +1769,46 @@ static void ui_block_func_MENUSTR(bContext *UNUSED(C), uiLayout *layout, void *a void ui_block_func_ICONROW(bContext *UNUSED(C), uiLayout *layout, void *arg_but) { - uiBlock *block= uiLayoutGetBlock(layout); - uiPopupBlockHandle *handle= block->handle; - uiBut *but= arg_but; + uiBlock *block = uiLayoutGetBlock(layout); + uiPopupBlockHandle *handle = block->handle; + uiBut *but = arg_but; int a; uiBlockSetFlag(block, UI_BLOCK_MOVEMOUSE_QUIT); - for (a=(int)but->hardmin; a<=(int)but->hardmax; a++) - uiDefIconButF(block, BUTM|FLO, B_NOP, but->icon+(a-but->hardmin), 0, 0, UI_UNIT_X*5, UI_UNIT_Y, - &handle->retvalue, (float)a, 0.0, 0, 0, ""); + for (a = (int)but->hardmin; a <= (int)but->hardmax; a++) + uiDefIconButF(block, BUTM | FLO, B_NOP, but->icon + (a - but->hardmin), 0, 0, UI_UNIT_X * 5, UI_UNIT_Y, + &handle->retvalue, (float)a, 0.0, 0, 0, ""); } void ui_block_func_ICONTEXTROW(bContext *UNUSED(C), uiLayout *layout, void *arg_but) { - uiBlock *block= uiLayoutGetBlock(layout); - uiPopupBlockHandle *handle= block->handle; - uiBut *but= arg_but, *bt; + uiBlock *block = uiLayoutGetBlock(layout); + uiPopupBlockHandle *handle = block->handle; + uiBut *but = arg_but, *bt; MenuData *md; MenuEntry *entry; int a; uiBlockSetFlag(block, UI_BLOCK_MOVEMOUSE_QUIT); - md= decompose_menu_string(but->str); + md = decompose_menu_string(but->str); /* title */ if (md->title) { - bt= uiDefBut(block, LABEL, 0, md->title, 0, 0, UI_UNIT_X*5, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, ""); - bt->flag= UI_TEXT_LEFT; + bt = uiDefBut(block, LABEL, 0, md->title, 0, 0, UI_UNIT_X * 5, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, ""); + bt->flag = UI_TEXT_LEFT; } /* loop through the menu options and draw them out with icons & text labels */ - for (a=0; anitems; a++) { - entry= &md->items[md->nitems-a-1]; + for (a = 0; a < md->nitems; a++) { + entry = &md->items[md->nitems - a - 1]; if (entry->sepr) uiItemS(layout); else - uiDefIconTextButF(block, BUTM|FLO, B_NOP, (short)((but->icon)+(entry->retval-but->hardmin)), entry->str, - 0, 0, UI_UNIT_X*5, UI_UNIT_Y, &handle->retvalue, (float) entry->retval, 0.0, 0, 0, ""); + uiDefIconTextButF(block, BUTM | FLO, B_NOP, (short)((but->icon) + (entry->retval - but->hardmin)), entry->str, + 0, 0, UI_UNIT_X * 5, UI_UNIT_Y, &handle->retvalue, (float) entry->retval, 0.0, 0, 0, ""); } menudata_free(md); @@ -1829,18 +1829,18 @@ static void ui_warp_pointer(int x, int y) /********************* Color Button ****************/ /* picker sizes S hsize, F full size, D spacer, B button/pallette height */ -#define SPICK 110.0 -#define FPICK 180.0 -#define DPICK 6.0 -#define BPICK 24.0 +#define SPICK 110.0 +#define FPICK 180.0 +#define DPICK 6.0 +#define BPICK 24.0 /* for picker, while editing hsv */ void ui_set_but_hsv(uiBut *but) { float col[3]; - float *hsv= ui_block_hsv_get(but->block); + float *hsv = ui_block_hsv_get(but->block); - hsv_to_rgb(hsv[0], hsv[1], hsv[2], col, col+1, col+2); + hsv_to_rgb(hsv[0], hsv[1], hsv[2], col, col + 1, col + 2); ui_set_but_vectorf(but, col); } @@ -1848,21 +1848,21 @@ void ui_set_but_hsv(uiBut *but) static void ui_update_block_buts_rgb(uiBlock *block, float *rgb) { uiBut *bt; - float *hsv= ui_block_hsv_get(block); + float *hsv = ui_block_hsv_get(block); /* this is to keep the H and S value when V is equal to zero * and we are working in HSV mode, of course! */ - rgb_to_hsv_compat(rgb[0], rgb[1], rgb[2], hsv, hsv+1, hsv+2); + rgb_to_hsv_compat(rgb[0], rgb[1], rgb[2], hsv, hsv + 1, hsv + 2); // this updates button strings, is hackish... but button pointers are on stack of caller function - for (bt= block->buttons.first; bt; bt= bt->next) { + for (bt = block->buttons.first; bt; bt = bt->next) { if (bt->rnaprop) { ui_set_but_vectorf(bt, rgb); } - else if (strcmp(bt->str, "Hex: ")==0) { + else if (strcmp(bt->str, "Hex: ") == 0) { float rgb_gamma[3]; double intpart; char col[16]; @@ -1885,23 +1885,23 @@ static void ui_update_block_buts_rgb(uiBlock *block, float *rgb) strcpy(bt->poin, col); } - else if (bt->str[1]==' ') { - if (bt->str[0]=='R') { + else if (bt->str[1] == ' ') { + if (bt->str[0] == 'R') { ui_set_but_val(bt, rgb[0]); } - else if (bt->str[0]=='G') { + else if (bt->str[0] == 'G') { ui_set_but_val(bt, rgb[1]); } - else if (bt->str[0]=='B') { + else if (bt->str[0] == 'B') { ui_set_but_val(bt, rgb[2]); } - else if (bt->str[0]=='H') { + else if (bt->str[0] == 'H') { ui_set_but_val(bt, hsv[0]); } - else if (bt->str[0]=='S') { + else if (bt->str[0] == 'S') { ui_set_but_val(bt, hsv[1]); } - else if (bt->str[0]=='V') { + else if (bt->str[0] == 'V') { ui_set_but_val(bt, hsv[2]); } } @@ -1912,8 +1912,8 @@ static void ui_update_block_buts_rgb(uiBlock *block, float *rgb) static void do_picker_rna_cb(bContext *UNUSED(C), void *bt1, void *UNUSED(arg)) { - uiBut *but= (uiBut *)bt1; - uiPopupBlockHandle *popup= but->block->handle; + uiBut *but = (uiBut *)bt1; + uiPopupBlockHandle *popup = but->block->handle; PropertyRNA *prop = but->rnaprop; PointerRNA ptr = but->rnapoin; float rgb[4]; @@ -1924,32 +1924,32 @@ static void do_picker_rna_cb(bContext *UNUSED(C), void *bt1, void *UNUSED(arg)) } if (popup) - popup->menuretval= UI_RETURN_UPDATE; + popup->menuretval = UI_RETURN_UPDATE; } static void do_hsv_rna_cb(bContext *UNUSED(C), void *bt1, void *UNUSED(arg)) { - uiBut *but= (uiBut *)bt1; - uiPopupBlockHandle *popup= but->block->handle; + uiBut *but = (uiBut *)bt1; + uiPopupBlockHandle *popup = but->block->handle; float rgb[3]; - float *hsv= ui_block_hsv_get(but->block); + float *hsv = ui_block_hsv_get(but->block); - hsv_to_rgb(hsv[0], hsv[1], hsv[2], rgb, rgb+1, rgb+2); + hsv_to_rgb(hsv[0], hsv[1], hsv[2], rgb, rgb + 1, rgb + 2); ui_update_block_buts_rgb(but->block, rgb); if (popup) - popup->menuretval= UI_RETURN_UPDATE; + popup->menuretval = UI_RETURN_UPDATE; } static void do_hex_rna_cb(bContext *UNUSED(C), void *bt1, void *hexcl) { - uiBut *but= (uiBut *)bt1; - uiPopupBlockHandle *popup= but->block->handle; - char *hexcol= (char *)hexcl; + uiBut *but = (uiBut *)bt1; + uiPopupBlockHandle *popup = but->block->handle; + char *hexcol = (char *)hexcl; float rgb[3]; - hex_to_rgb(hexcol, rgb, rgb+1, rgb+2); + hex_to_rgb(hexcol, rgb, rgb + 1, rgb + 2); /* Hex code is assumed to be in sRGB space (coming from other applications, web, etc) */ if (but->block->color_profile != BLI_PR_NONE) { @@ -1960,16 +1960,16 @@ static void do_hex_rna_cb(bContext *UNUSED(C), void *bt1, void *hexcl) ui_update_block_buts_rgb(but->block, rgb); if (popup) - popup->menuretval= UI_RETURN_UPDATE; + popup->menuretval = UI_RETURN_UPDATE; } static void close_popup_cb(bContext *UNUSED(C), void *bt1, void *UNUSED(arg)) { - uiBut *but= (uiBut *)bt1; - uiPopupBlockHandle *popup= but->block->handle; + uiBut *but = (uiBut *)bt1; + uiPopupBlockHandle *popup = but->block->handle; if (popup) - popup->menuretval= UI_RETURN_OK; + popup->menuretval = UI_RETURN_OK; } static void picker_new_hide_reveal(uiBlock *block, short colormode) @@ -1977,26 +1977,26 @@ static void picker_new_hide_reveal(uiBlock *block, short colormode) uiBut *bt; /* tag buttons */ - for (bt= block->buttons.first; bt; bt= bt->next) { + for (bt = block->buttons.first; bt; bt = bt->next) { if (bt->type == LABEL) { - if ( bt->str[1]=='G') { - if (colormode==2) bt->flag &= ~UI_HIDDEN; + if (bt->str[1] == 'G') { + if (colormode == 2) bt->flag &= ~UI_HIDDEN; else bt->flag |= UI_HIDDEN; } } - if (bt->type==NUMSLI || bt->type==TEX) { - if ( bt->str[1]=='e') { - if (colormode==2) bt->flag &= ~UI_HIDDEN; + if (bt->type == NUMSLI || bt->type == TEX) { + if (bt->str[1] == 'e') { + if (colormode == 2) bt->flag &= ~UI_HIDDEN; else bt->flag |= UI_HIDDEN; } - else if ( ELEM3(bt->str[0], 'R', 'G', 'B')) { - if (colormode==0) bt->flag &= ~UI_HIDDEN; + else if (ELEM3(bt->str[0], 'R', 'G', 'B')) { + if (colormode == 0) bt->flag &= ~UI_HIDDEN; else bt->flag |= UI_HIDDEN; } - else if ( ELEM3(bt->str[0], 'H', 'S', 'V')) { - if (colormode==1) bt->flag &= ~UI_HIDDEN; + else if (ELEM3(bt->str[0], 'H', 'S', 'V')) { + if (colormode == 1) bt->flag &= ~UI_HIDDEN; else bt->flag |= UI_HIDDEN; } } @@ -2005,32 +2005,32 @@ static void picker_new_hide_reveal(uiBlock *block, short colormode) static void do_picker_new_mode_cb(bContext *UNUSED(C), void *bt1, void *UNUSED(arg)) { - uiBut *bt= bt1; - short colormode= ui_get_but_val(bt); + uiBut *bt = bt1; + short colormode = ui_get_but_val(bt); picker_new_hide_reveal(bt->block, colormode); } /* picker sizes S hsize, F full size, D spacer, B button/pallette height */ -#define SPICK1 150.0 -#define DPICK1 6.0 +#define SPICK1 150.0 +#define DPICK1 6.0 -#define PICKER_H 150 -#define PICKER_W 150 -#define PICKER_SPACE 6 -#define PICKER_BAR 14 +#define PICKER_H 150 +#define PICKER_W 150 +#define PICKER_SPACE 6 +#define PICKER_BAR 14 -#define PICKER_TOTAL_W (PICKER_W+PICKER_SPACE+PICKER_BAR) +#define PICKER_TOTAL_W (PICKER_W + PICKER_SPACE + PICKER_BAR) static void circle_picker(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop) { uiBut *bt; /* HS circle */ - bt= uiDefButR_prop(block, HSVCIRCLE, 0, "", 0, 0, PICKER_H, PICKER_W, ptr, prop, 0, 0.0, 0.0, 0, 0, "Color"); + bt = uiDefButR_prop(block, HSVCIRCLE, 0, "", 0, 0, PICKER_H, PICKER_W, ptr, prop, 0, 0.0, 0.0, 0, 0, "Color"); uiButSetFunc(bt, do_picker_rna_cb, bt, NULL); /* value */ - bt= uiDefButR_prop(block, HSVCUBE, 0, "", PICKER_W+PICKER_SPACE,0,PICKER_BAR,PICKER_H, ptr, prop, 0, 0.0, 0.0, UI_GRAD_V_ALT, 0, "Value"); + bt = uiDefButR_prop(block, HSVCUBE, 0, "", PICKER_W + PICKER_SPACE, 0, PICKER_BAR, PICKER_H, ptr, prop, 0, 0.0, 0.0, UI_GRAD_V_ALT, 0, "Value"); uiButSetFunc(bt, do_picker_rna_cb, bt, NULL); } @@ -2041,11 +2041,11 @@ static void square_picker(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, in int bartype = type + 3; /* HS square */ - bt= uiDefButR_prop(block, HSVCUBE, 0, "", 0, PICKER_BAR+PICKER_SPACE, PICKER_TOTAL_W, PICKER_H, ptr, prop, 0, 0.0, 0.0, type, 0, "Color"); + bt = uiDefButR_prop(block, HSVCUBE, 0, "", 0, PICKER_BAR + PICKER_SPACE, PICKER_TOTAL_W, PICKER_H, ptr, prop, 0, 0.0, 0.0, type, 0, "Color"); uiButSetFunc(bt, do_picker_rna_cb, bt, NULL); /* value */ - bt= uiDefButR_prop(block, HSVCUBE, 0, "", 0, 0, PICKER_TOTAL_W, PICKER_BAR, ptr, prop, 0, 0.0, 0.0, bartype, 0, "Value"); + bt = uiDefButR_prop(block, HSVCUBE, 0, "", 0, 0, PICKER_TOTAL_W, PICKER_BAR, ptr, prop, 0, 0.0, 0.0, bartype, 0, "Value"); uiButSetFunc(bt, do_picker_rna_cb, bt, NULL); } @@ -2053,18 +2053,18 @@ static void square_picker(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, in /* a HS circle, V slider, rgb/hsv/hex sliders */ static void uiBlockPicker(uiBlock *block, float *rgb, PointerRNA *ptr, PropertyRNA *prop) { - static short colormode= 0; /* temp? 0=rgb, 1=hsv, 2=hex */ + static short colormode = 0; /* temp? 0=rgb, 1=hsv, 2=hex */ uiBut *bt; int width, butwidth; static char tip[50]; static char hexcol[128]; float rgb_gamma[3]; float min, max, step, precision; - float *hsv= ui_block_hsv_get(block); + float *hsv = ui_block_hsv_get(block); ui_block_hsv_get(block); - width= PICKER_TOTAL_W; + width = PICKER_TOTAL_W; butwidth = width - UI_UNIT_X - 10; /* existence of profile means storage is in linear color space, with display correction */ @@ -2079,7 +2079,7 @@ static void uiBlockPicker(uiBlock *block, float *rgb, PointerRNA *ptr, PropertyR } /* sneaky way to check for alpha */ - rgb[3]= FLT_MAX; + rgb[3] = FLT_MAX; RNA_property_float_ui_range(ptr, prop, &min, &max, &step, &precision); RNA_property_float_get_array(ptr, prop, rgb); @@ -2101,24 +2101,24 @@ static void uiBlockPicker(uiBlock *block, float *rgb, PointerRNA *ptr, PropertyR /* mode */ uiBlockBeginAlign(block); - bt= uiDefButS(block, ROW, 0, "RGB", 0, -30, width/3, UI_UNIT_Y, &colormode, 0.0, 0.0, 0, 0, ""); + bt = uiDefButS(block, ROW, 0, "RGB", 0, -30, width / 3, UI_UNIT_Y, &colormode, 0.0, 0.0, 0, 0, ""); uiButSetFunc(bt, do_picker_new_mode_cb, bt, NULL); - bt= uiDefButS(block, ROW, 0, "HSV", width/3, -30, width/3, UI_UNIT_Y, &colormode, 0.0, 1.0, 0, 0, ""); + bt = uiDefButS(block, ROW, 0, "HSV", width / 3, -30, width / 3, UI_UNIT_Y, &colormode, 0.0, 1.0, 0, 0, ""); uiButSetFunc(bt, do_picker_new_mode_cb, bt, NULL); - bt= uiDefButS(block, ROW, 0, "Hex", 2*width/3, -30, width/3, UI_UNIT_Y, &colormode, 0.0, 2.0, 0, 0, ""); + bt = uiDefButS(block, ROW, 0, "Hex", 2 * width / 3, -30, width / 3, UI_UNIT_Y, &colormode, 0.0, 2.0, 0, 0, ""); uiButSetFunc(bt, do_picker_new_mode_cb, bt, NULL); uiBlockEndAlign(block); - bt= uiDefIconButO(block, BUT, "UI_OT_eyedropper", WM_OP_INVOKE_DEFAULT, ICON_EYEDROPPER, butwidth+10, -60, UI_UNIT_X, UI_UNIT_Y, NULL); + bt = uiDefIconButO(block, BUT, "UI_OT_eyedropper", WM_OP_INVOKE_DEFAULT, ICON_EYEDROPPER, butwidth + 10, -60, UI_UNIT_X, UI_UNIT_Y, NULL); uiButSetFunc(bt, close_popup_cb, bt, NULL); /* RGB values */ uiBlockBeginAlign(block); - bt= uiDefButR_prop(block, NUMSLI, 0, "R ", 0, -60, butwidth, UI_UNIT_Y, ptr, prop, 0, 0.0, 0.0, 0, 3, "Red"); + bt = uiDefButR_prop(block, NUMSLI, 0, "R ", 0, -60, butwidth, UI_UNIT_Y, ptr, prop, 0, 0.0, 0.0, 0, 3, "Red"); uiButSetFunc(bt, do_picker_rna_cb, bt, NULL); - bt= uiDefButR_prop(block, NUMSLI, 0, "G ", 0, -80, butwidth, UI_UNIT_Y, ptr, prop, 1, 0.0, 0.0, 0, 3, "Green"); + bt = uiDefButR_prop(block, NUMSLI, 0, "G ", 0, -80, butwidth, UI_UNIT_Y, ptr, prop, 1, 0.0, 0.0, 0, 3, "Green"); uiButSetFunc(bt, do_picker_rna_cb, bt, NULL); - bt= uiDefButR_prop(block, NUMSLI, 0, "B ", 0, -100, butwidth, UI_UNIT_Y, ptr, prop, 2, 0.0, 0.0, 0, 3, "Blue"); + bt = uiDefButR_prop(block, NUMSLI, 0, "B ", 0, -100, butwidth, UI_UNIT_Y, ptr, prop, 2, 0.0, 0.0, 0, 3, "Blue"); uiButSetFunc(bt, do_picker_rna_cb, bt, NULL); // could use uiItemFullR(col, ptr, prop, -1, 0, UI_ITEM_R_EXPAND|UI_ITEM_R_SLIDER, "", ICON_NONE); @@ -2126,29 +2126,29 @@ static void uiBlockPicker(uiBlock *block, float *rgb, PointerRNA *ptr, PropertyR /* HSV values */ uiBlockBeginAlign(block); - bt= uiDefButF(block, NUMSLI, 0, "H ", 0, -60, butwidth, UI_UNIT_Y, hsv, 0.0, 1.0, 10, 3, "Hue"); + bt = uiDefButF(block, NUMSLI, 0, "H ", 0, -60, butwidth, UI_UNIT_Y, hsv, 0.0, 1.0, 10, 3, "Hue"); uiButSetFunc(bt, do_hsv_rna_cb, bt, hsv); - bt= uiDefButF(block, NUMSLI, 0, "S ", 0, -80, butwidth, UI_UNIT_Y, hsv+1, 0.0, 1.0, 10, 3, "Saturation"); + bt = uiDefButF(block, NUMSLI, 0, "S ", 0, -80, butwidth, UI_UNIT_Y, hsv + 1, 0.0, 1.0, 10, 3, "Saturation"); uiButSetFunc(bt, do_hsv_rna_cb, bt, hsv); - bt= uiDefButF(block, NUMSLI, 0, "V ", 0, -100, butwidth, UI_UNIT_Y, hsv+2, 0.0, max, 10, 3, "Value"); + bt = uiDefButF(block, NUMSLI, 0, "V ", 0, -100, butwidth, UI_UNIT_Y, hsv + 2, 0.0, max, 10, 3, "Value"); uiButSetFunc(bt, do_hsv_rna_cb, bt, hsv); uiBlockEndAlign(block); if (rgb[3] != FLT_MAX) { - bt= uiDefButR_prop(block, NUMSLI, 0, "A ", 0, -120, butwidth, UI_UNIT_Y, ptr, prop, 3, 0.0, 0.0, 0, 0, "Alpha"); + bt = uiDefButR_prop(block, NUMSLI, 0, "A ", 0, -120, butwidth, UI_UNIT_Y, ptr, prop, 3, 0.0, 0.0, 0, 0, "Alpha"); uiButSetFunc(bt, do_picker_rna_cb, bt, NULL); } else { - rgb[3]= 1.0f; + rgb[3] = 1.0f; } BLI_snprintf(hexcol, sizeof(hexcol), "%02X%02X%02X", FTOCHAR(rgb_gamma[0]), FTOCHAR(rgb_gamma[1]), FTOCHAR(rgb_gamma[2])); - bt= uiDefBut(block, TEX, 0, "Hex: ", 0, -60, butwidth, UI_UNIT_Y, hexcol, 0, 8, 0, 0, "Hex triplet for color (#RRGGBB)"); + bt = uiDefBut(block, TEX, 0, "Hex: ", 0, -60, butwidth, UI_UNIT_Y, hexcol, 0, 8, 0, 0, "Hex triplet for color (#RRGGBB)"); uiButSetFunc(bt, do_hex_rna_cb, bt, hexcol); uiDefBut(block, LABEL, 0, "(Gamma Corrected)", 0, -80, butwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, ""); - rgb_to_hsv(rgb[0], rgb[1], rgb[2], hsv, hsv+1, hsv+2); + rgb_to_hsv(rgb[0], rgb[1], rgb[2], hsv, hsv + 1, hsv + 2); picker_new_hide_reveal(block, colormode); } @@ -2156,33 +2156,33 @@ static void uiBlockPicker(uiBlock *block, float *rgb, PointerRNA *ptr, PropertyR static int ui_picker_small_wheel_cb(const bContext *UNUSED(C), uiBlock *block, wmEvent *event) { - float add= 0.0f; + float add = 0.0f; - if (event->type==WHEELUPMOUSE) - add= 0.05f; - else if (event->type==WHEELDOWNMOUSE) - add= -0.05f; + if (event->type == WHEELUPMOUSE) + add = 0.05f; + else if (event->type == WHEELDOWNMOUSE) + add = -0.05f; - if (add!=0.0f) { + if (add != 0.0f) { uiBut *but; - for (but= block->buttons.first; but; but= but->next) { - if (but->type==HSVCUBE && but->active==NULL) { - uiPopupBlockHandle *popup= block->handle; + for (but = block->buttons.first; but; but = but->next) { + if (but->type == HSVCUBE && but->active == NULL) { + uiPopupBlockHandle *popup = block->handle; float col[3]; - float *hsv= ui_block_hsv_get(block); + float *hsv = ui_block_hsv_get(block); ui_get_but_vectorf(but, col); - rgb_to_hsv_compat(col[0], col[1], col[2], hsv, hsv+1, hsv+2); - hsv[2]= CLAMPIS(hsv[2]+add, 0.0f, 1.0f); - hsv_to_rgb(hsv[0], hsv[1], hsv[2], col, col+1, col+2); + rgb_to_hsv_compat(col[0], col[1], col[2], hsv, hsv + 1, hsv + 2); + hsv[2] = CLAMPIS(hsv[2] + add, 0.0f, 1.0f); + hsv_to_rgb(hsv[0], hsv[1], hsv[2], col, col + 1, col + 2); ui_set_but_vectorf(but, col); ui_update_block_buts_rgb(block, col); if (popup) - popup->menuretval= UI_RETURN_UPDATE; + popup->menuretval = UI_RETURN_UPDATE; return 1; } @@ -2193,10 +2193,10 @@ static int ui_picker_small_wheel_cb(const bContext *UNUSED(C), uiBlock *block, w uiBlock *ui_block_func_COL(bContext *C, uiPopupBlockHandle *handle, void *arg_but) { - uiBut *but= arg_but; + uiBut *but = arg_but; uiBlock *block; - block= uiBeginBlock(C, handle->region, __func__, UI_EMBOSS); + block = uiBeginBlock(C, handle->region, __func__, UI_EMBOSS); if (but->rnaprop) { if (RNA_property_subtype(but->rnaprop) == PROP_COLOR_GAMMA) { @@ -2210,13 +2210,13 @@ uiBlock *ui_block_func_COL(bContext *C, uiPopupBlockHandle *handle, void *arg_bu uiBlockPicker(block, handle->retvec, &but->rnapoin, but->rnaprop); - block->flag= UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_KEEP_OPEN|UI_BLOCK_OUT_1; + block->flag = UI_BLOCK_LOOP | UI_BLOCK_REDRAW | UI_BLOCK_KEEP_OPEN | UI_BLOCK_OUT_1; uiBoundsBlock(block, 10); - block->block_event_func= ui_picker_small_wheel_cb; + block->block_event_func = ui_picker_small_wheel_cb; /* and lets go */ - block->direction= UI_TOP; + block->direction = UI_TOP; return block; } @@ -2227,11 +2227,11 @@ static int ui_popup_string_hash(char *str) { /* sometimes button contains hotkey, sometimes not, strip for proper compare */ int hash; - char *delimit= strchr(str, '|'); + char *delimit = strchr(str, '|'); - if (delimit) *delimit= 0; - hash= BLI_ghashutil_strhash(str); - if (delimit) *delimit= '|'; + if (delimit) *delimit = 0; + hash = BLI_ghashutil_strhash(str); + if (delimit) *delimit = '|'; return hash; } @@ -2244,23 +2244,23 @@ static int ui_popup_menu_hash(const char *str) /* but == NULL read, otherwise set */ uiBut *ui_popup_menu_memory(uiBlock *block, uiBut *but) { - static int mem[256], first=1; - int hash= block->puphash; + static int mem[256], first = 1; + int hash = block->puphash; if (first) { /* init */ memset(mem, -1, sizeof(mem)); - first= 0; + first = 0; } if (but) { /* set */ - mem[hash & 255 ]= ui_popup_string_hash(but->str); + mem[hash & 255] = ui_popup_string_hash(but->str); return NULL; } else { /* get */ - for (but=block->buttons.first; but; but=but->next) + for (but = block->buttons.first; but; but = but->next) if (ui_popup_string_hash(but->str) == mem[hash & 255]) return but; @@ -2286,80 +2286,81 @@ static uiBlock *ui_block_func_POPUP(bContext *C, uiPopupBlockHandle *handle, voi { uiBlock *block; uiBut *bt; - uiPopupMenu *pup= arg_pup; + uiPopupMenu *pup = arg_pup; int offset[2], direction, minwidth, width, height, flip; if (pup->menu_func) { - pup->block->handle= handle; + pup->block->handle = handle; pup->menu_func(C, pup->layout, pup->menu_arg); - pup->block->handle= NULL; + pup->block->handle = NULL; } if (pup->but) { /* minimum width to enforece */ - minwidth= pup->but->x2 - pup->but->x1; + minwidth = pup->but->x2 - pup->but->x1; if (pup->but->type == PULLDOWN || pup->but->menu_create_func) { - direction= UI_DOWN; - flip= 1; + direction = UI_DOWN; + flip = 1; } else { - direction= UI_TOP; - flip= 0; + direction = UI_TOP; + flip = 0; } } else { - minwidth= 50; - direction= UI_DOWN; - flip= 1; + minwidth = 50; + direction = UI_DOWN; + flip = 1; } - block= pup->block; + block = pup->block; /* in some cases we create the block before the region, * so we set it delayed here if necessary */ if (BLI_findindex(&handle->region->uiblocks, block) == -1) uiBlockSetRegion(block, handle->region); - block->direction= direction; + block->direction = direction; uiBlockLayoutResolve(block, &width, &height); uiBlockSetFlag(block, UI_BLOCK_MOVEMOUSE_QUIT); if (pup->popup) { - uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_NUMSELECT|UI_BLOCK_RET_1); + uiBlockSetFlag(block, UI_BLOCK_LOOP | UI_BLOCK_REDRAW | UI_BLOCK_NUMSELECT | UI_BLOCK_RET_1); uiBlockSetDirection(block, direction); /* offset the mouse position, possibly based on earlier selection */ if ((block->flag & UI_BLOCK_POPUP_MEMORY) && - (bt= ui_popup_menu_memory(block, NULL))) { + (bt = ui_popup_menu_memory(block, NULL))) + { /* position mouse on last clicked item, at 0.8*width of the * button, so it doesn't overlap the text too much, also note * the offset is negative because we are inverse moving the * block to be under the mouse */ - offset[0]= -(bt->x1 + 0.8f*(bt->x2 - bt->x1)); - offset[1]= -(bt->y1 + 0.5f*UI_UNIT_Y); + offset[0] = -(bt->x1 + 0.8f * (bt->x2 - bt->x1)); + offset[1] = -(bt->y1 + 0.5f * UI_UNIT_Y); } else { /* position mouse at 0.8*width of the button and below the tile * on the first item */ - offset[0]= 0; - for (bt=block->buttons.first; bt; bt=bt->next) - offset[0]= MIN2(offset[0], -(bt->x1 + 0.8f*(bt->x2 - bt->x1))); + offset[0] = 0; + for (bt = block->buttons.first; bt; bt = bt->next) + offset[0] = MIN2(offset[0], -(bt->x1 + 0.8f * (bt->x2 - bt->x1))); - offset[1]= 1.5*UI_UNIT_Y; + offset[1] = 1.5 * UI_UNIT_Y; } - block->minbounds= minwidth; + block->minbounds = minwidth; uiMenuPopupBoundsBlock(block, 1, offset[0], offset[1]); } else { /* for a header menu we set the direction automatic */ if (!pup->slideout && flip) { - ScrArea *sa= CTX_wm_area(C); - if (sa && sa->headertype==HEADERDOWN) { - ARegion *ar= CTX_wm_region(C); + ScrArea *sa = CTX_wm_area(C); + if (sa && sa->headertype == HEADERDOWN) { + ARegion *ar = CTX_wm_region(C); if (ar && ar->regiontype == RGN_TYPE_HEADER) { uiBlockSetDirection(block, UI_TOP); uiBlockFlipOrder(block); @@ -2367,7 +2368,7 @@ static uiBlock *ui_block_func_POPUP(bContext *C, uiPopupBlockHandle *handle, voi } } - block->minbounds= minwidth; + block->minbounds = minwidth; uiTextBoundsBlock(block, 50); } @@ -2382,22 +2383,22 @@ static uiBlock *ui_block_func_POPUP(bContext *C, uiPopupBlockHandle *handle, voi uiPopupBlockHandle *ui_popup_menu_create(bContext *C, ARegion *butregion, uiBut *but, uiMenuCreateFunc menu_func, void *arg, char *str) { - wmWindow *window= CTX_wm_window(C); - uiStyle *style= UI_GetStyle(); + wmWindow *window = CTX_wm_window(C); + uiStyle *style = UI_GetStyle(); uiPopupBlockHandle *handle; uiPopupMenu *pup; - pup= MEM_callocN(sizeof(uiPopupMenu), __func__); - pup->block= uiBeginBlock(C, NULL, __func__, UI_EMBOSSP); - pup->layout= uiBlockLayout(pup->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_MENU, 0, 0, 200, 0, style); - pup->slideout= (but && (but->block->flag & UI_BLOCK_LOOP)); - pup->but= but; + pup = MEM_callocN(sizeof(uiPopupMenu), __func__); + pup->block = uiBeginBlock(C, NULL, __func__, UI_EMBOSSP); + pup->layout = uiBlockLayout(pup->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_MENU, 0, 0, 200, 0, style); + pup->slideout = (but && (but->block->flag & UI_BLOCK_LOOP)); + pup->but = but; uiLayoutSetOperatorContext(pup->layout, WM_OP_INVOKE_REGION_WIN); if (!but) { /* no button to start from, means we are a popup */ - pup->mx= window->eventstate->x; - pup->my= window->eventstate->y; - pup->popup= 1; + pup->mx = window->eventstate->x; + pup->my = window->eventstate->y; + pup->popup = 1; pup->block->flag |= UI_BLOCK_NO_FLIP; } /* some enums reversing is strange, currently we have no good way to @@ -2416,19 +2417,19 @@ uiPopupBlockHandle *ui_popup_menu_create(bContext *C, ARegion *butregion, uiBut if (str) { /* menu is created from a string */ - pup->menu_func= ui_block_func_MENUSTR; - pup->menu_arg= str; + pup->menu_func = ui_block_func_MENUSTR; + pup->menu_arg = str; } else { /* menu is created from a callback */ - pup->menu_func= menu_func; - pup->menu_arg= arg; + pup->menu_func = menu_func; + pup->menu_arg = arg; } - handle= ui_popup_block_create(C, butregion, but, NULL, ui_block_func_POPUP, pup); + handle = ui_popup_block_create(C, butregion, but, NULL, ui_block_func_POPUP, pup); if (!but) { - handle->popup= 1; + handle->popup = 1; UI_add_popup_handlers(C, &window->modalhandlers, handle); WM_event_add_mousemove(C); @@ -2444,18 +2445,18 @@ uiPopupBlockHandle *ui_popup_menu_create(bContext *C, ARegion *butregion, uiBut /* only return handler, and set optional title */ uiPopupMenu *uiPupMenuBegin(bContext *C, const char *title, int icon) { - uiStyle *style= UI_GetStyle(); - uiPopupMenu *pup= MEM_callocN(sizeof(uiPopupMenu), "popup menu"); + uiStyle *style = UI_GetStyle(); + uiPopupMenu *pup = MEM_callocN(sizeof(uiPopupMenu), "popup menu"); uiBut *but; - pup->block= uiBeginBlock(C, NULL, __func__, UI_EMBOSSP); + pup->block = uiBeginBlock(C, NULL, __func__, UI_EMBOSSP); pup->block->flag |= UI_BLOCK_POPUP_MEMORY; - pup->block->puphash= ui_popup_menu_hash(title); - pup->layout= uiBlockLayout(pup->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_MENU, 0, 0, 200, 0, style); + pup->block->puphash = ui_popup_menu_hash(title); + pup->layout = uiBlockLayout(pup->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_MENU, 0, 0, 200, 0, style); uiLayoutSetOperatorContext(pup->layout, WM_OP_EXEC_REGION_WIN); /* create in advance so we can let buttons point to retval already */ - pup->block->handle= MEM_callocN(sizeof(uiPopupBlockHandle), "uiPopupBlockHandle"); + pup->block->handle = MEM_callocN(sizeof(uiPopupBlockHandle), "uiPopupBlockHandle"); /* create title button */ if (title && title[0]) { @@ -2467,7 +2468,7 @@ uiPopupMenu *uiPupMenuBegin(bContext *C, const char *title, int icon) } else { but = uiDefBut(pup->block, LABEL, 0, title, 0, 0, 200, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, ""); - but->flag= UI_TEXT_LEFT; + but->flag = UI_TEXT_LEFT; } } @@ -2477,15 +2478,15 @@ uiPopupMenu *uiPupMenuBegin(bContext *C, const char *title, int icon) /* set the whole structure to work */ void uiPupMenuEnd(bContext *C, uiPopupMenu *pup) { - wmWindow *window= CTX_wm_window(C); + wmWindow *window = CTX_wm_window(C); uiPopupBlockHandle *menu; - pup->popup= 1; - pup->mx= window->eventstate->x; - pup->my= window->eventstate->y; + pup->popup = 1; + pup->mx = window->eventstate->x; + pup->my = window->eventstate->y; - menu= ui_popup_block_create(C, NULL, NULL, NULL, ui_block_func_POPUP, pup); - menu->popup= 1; + menu = ui_popup_block_create(C, NULL, NULL, NULL, ui_block_func_POPUP, pup); + menu->popup = 1; UI_add_popup_handlers(C, &window->modalhandlers, menu); WM_event_add_mousemove(C); @@ -2502,7 +2503,7 @@ uiLayout *uiPupMenuLayout(uiPopupMenu *pup) static void operator_name_cb(bContext *C, void *arg, int retval) { - const char *opname= arg; + const char *opname = arg; if (opname && retval > 0) WM_operator_name_call(C, opname, WM_OP_EXEC_DEFAULT, NULL); @@ -2510,7 +2511,7 @@ static void operator_name_cb(bContext *C, void *arg, int retval) static void operator_cb(bContext *C, void *arg, int retval) { - wmOperator *op= arg; + wmOperator *op = arg; if (op && retval > 0) WM_operator_call(C, op); @@ -2528,15 +2529,15 @@ static void vconfirm_opname(bContext *C, const char *opname, const char *title, uiPopupBlockHandle *handle; char *s, buf[512]; - s= buf; - if (title) s+= sprintf(s, "%s%%t|", title); + s = buf; + if (title) s += sprintf(s, "%s%%t|", title); vsnprintf(s, sizeof(buf) - (s - buf), itemfmt, ap); - buf[sizeof(buf) - 1]= '\0'; + buf[sizeof(buf) - 1] = '\0'; - handle= ui_popup_menu_create(C, NULL, NULL, NULL, NULL, buf); + handle = ui_popup_menu_create(C, NULL, NULL, NULL, NULL, buf); - handle->popup_func= operator_name_cb; - handle->popup_arg= (void *)opname; + handle->popup_func = operator_name_cb; + handle->popup_arg = (void *)opname; } static void confirm_operator(bContext *C, wmOperator *op, const char *title, const char *item) @@ -2544,15 +2545,15 @@ static void confirm_operator(bContext *C, wmOperator *op, const char *title, con uiPopupBlockHandle *handle; char *s, buf[512]; - s= buf; - if (title) s+= BLI_snprintf(s, sizeof(buf), "%s%%t|%s", title, item); + s = buf; + if (title) s += BLI_snprintf(s, sizeof(buf), "%s%%t|%s", title, item); (void)s; - handle= ui_popup_menu_create(C, NULL, NULL, NULL, NULL, buf); + handle = ui_popup_menu_create(C, NULL, NULL, NULL, NULL, buf); - handle->popup_func= operator_cb; - handle->popup_arg= op; - handle->cancel_func= confirm_cancel_operator; + handle->popup_func = operator_cb; + handle->popup_arg = op; + handle->cancel_func = confirm_cancel_operator; } void uiPupMenuOkee(bContext *C, const char *opname, const char *str, ...) @@ -2612,11 +2613,11 @@ void uiPupMenuReports(bContext *C, ReportList *reports) if (!CTX_wm_window(C)) return; - ds= BLI_dynstr_new(); + ds = BLI_dynstr_new(); - for (report=reports->list.first; report; report=report->next) { + for (report = reports->list.first; report; report = report->next) { if (report->type < reports->printlevel) - ; /* pass */ + ; /* pass */ else if (report->type >= RPT_ERROR) BLI_dynstr_appendf(ds, "Error %%i%d%%t|%s", ICON_ERROR, report->message); else if (report->type >= RPT_WARNING) @@ -2625,7 +2626,7 @@ void uiPupMenuReports(bContext *C, ReportList *reports) BLI_dynstr_appendf(ds, "Info %%i%d%%t|%s", ICON_INFO, report->message); } - str= BLI_dynstr_get_cstring(ds); + str = BLI_dynstr_get_cstring(ds); if (str[0] != '\0') ui_popup_menu_create(C, NULL, NULL, NULL, NULL, str); MEM_freeN(str); @@ -2640,19 +2641,19 @@ void uiPupMenuInvoke(bContext *C, const char *idname) Menu menu; MenuType *mt = WM_menutype_find(idname, TRUE); - if (mt==NULL) { + if (mt == NULL) { printf("%s: named menu \"%s\" not found\n", __func__, idname); return; } - if (mt->poll && mt->poll(C, mt)==0) + if (mt->poll && mt->poll(C, mt) == 0) return; - pup= uiPupMenuBegin(C, mt->label, ICON_NONE); - layout= uiPupMenuLayout(pup); + pup = uiPupMenuBegin(C, mt->label, ICON_NONE); + layout = uiPupMenuLayout(pup); - menu.layout= layout; - menu.type= mt; + menu.layout = layout; + menu.type = mt; mt->draw(C, &menu); @@ -2664,13 +2665,13 @@ void uiPupMenuInvoke(bContext *C, const char *idname) void uiPupBlockO(bContext *C, uiBlockCreateFunc func, void *arg, const char *opname, int opcontext) { - wmWindow *window= CTX_wm_window(C); + wmWindow *window = CTX_wm_window(C); uiPopupBlockHandle *handle; - handle= ui_popup_block_create(C, NULL, NULL, func, NULL, arg); - handle->popup= 1; - handle->optype= (opname)? WM_operatortype_find(opname, 0): NULL; - handle->opcontext= opcontext; + handle = ui_popup_block_create(C, NULL, NULL, func, NULL, arg); + handle->popup = 1; + handle->optype = (opname) ? WM_operatortype_find(opname, 0) : NULL; + handle->opcontext = opcontext; UI_add_popup_handlers(C, &window->modalhandlers, handle); WM_event_add_mousemove(C); @@ -2683,16 +2684,16 @@ void uiPupBlock(bContext *C, uiBlockCreateFunc func, void *arg) void uiPupBlockEx(bContext *C, uiBlockCreateFunc func, uiBlockHandleFunc popup_func, uiBlockCancelFunc cancel_func, void *arg) { - wmWindow *window= CTX_wm_window(C); + wmWindow *window = CTX_wm_window(C); uiPopupBlockHandle *handle; - handle= ui_popup_block_create(C, NULL, NULL, func, NULL, arg); - handle->popup= 1; - handle->retvalue= 1; + handle = ui_popup_block_create(C, NULL, NULL, func, NULL, arg); + handle->popup = 1; + handle->retvalue = 1; - handle->popup_arg= arg; - handle->popup_func= popup_func; - handle->cancel_func= cancel_func; + handle->popup_arg = arg; + handle->popup_func = popup_func; + handle->cancel_func = cancel_func; // handle->opcontext= opcontext; UI_add_popup_handlers(C, &window->modalhandlers, handle); @@ -2702,17 +2703,17 @@ void uiPupBlockEx(bContext *C, uiBlockCreateFunc func, uiBlockHandleFunc popup_f #if 0 /* UNUSED */ void uiPupBlockOperator(bContext *C, uiBlockCreateFunc func, wmOperator *op, int opcontext) { - wmWindow *window= CTX_wm_window(C); + wmWindow *window = CTX_wm_window(C); uiPopupBlockHandle *handle; - handle= ui_popup_block_create(C, NULL, NULL, func, NULL, op); - handle->popup= 1; - handle->retvalue= 1; + handle = ui_popup_block_create(C, NULL, NULL, func, NULL, op); + handle->popup = 1; + handle->retvalue = 1; - handle->popup_arg= op; - handle->popup_func= operator_cb; - handle->cancel_func= confirm_cancel_operator; - handle->opcontext= opcontext; + handle->popup_arg = op; + handle->popup_func = operator_cb; + handle->cancel_func = confirm_cancel_operator; + handle->opcontext = opcontext; UI_add_popup_handlers(C, &window->modalhandlers, handle); WM_event_add_mousemove(C); diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c index 6a2038b18bc..91e3b99e23b 100644 --- a/source/blender/editors/interface/interface_style.c +++ b/source/blender/editors/interface/interface_style.c @@ -79,61 +79,61 @@ static uiStyle *ui_style_new(ListBase *styles, const char *name, short uifont_id) { - uiStyle *style= MEM_callocN(sizeof(uiStyle), "new style"); + uiStyle *style = MEM_callocN(sizeof(uiStyle), "new style"); BLI_addtail(styles, style); BLI_strncpy(style->name, name, MAX_STYLE_NAME); - style->panelzoom= 1.0; /* unused */ - - style->paneltitle.uifont_id= uifont_id; - style->paneltitle.points= 12; - style->paneltitle.kerning= 1; - style->paneltitle.shadow= 1; - style->paneltitle.shadx= 0; - style->paneltitle.shady= -1; - style->paneltitle.shadowalpha= 0.15f; - style->paneltitle.shadowcolor= 1.0f; - - style->grouplabel.uifont_id= uifont_id; - style->grouplabel.points= 12; - style->grouplabel.kerning= 1; - style->grouplabel.shadow= 3; - style->grouplabel.shadx= 0; - style->grouplabel.shady= -1; - style->grouplabel.shadowalpha= 0.25f; - - style->widgetlabel.uifont_id= uifont_id; - style->widgetlabel.points= 11; - style->widgetlabel.kerning= 1; - style->widgetlabel.shadow= 3; - style->widgetlabel.shadx= 0; - style->widgetlabel.shady= -1; - style->widgetlabel.shadowalpha= 0.15f; - style->widgetlabel.shadowcolor= 1.0f; - - style->widget.uifont_id= uifont_id; - style->widget.points= 11; - style->widget.kerning= 1; - style->widget.shadowalpha= 0.25f; - - style->columnspace= 8; - style->templatespace= 5; - style->boxspace= 5; - style->buttonspacex= 8; - style->buttonspacey= 2; - style->panelspace= 8; - style->panelouter= 4; + style->panelzoom = 1.0; /* unused */ + + style->paneltitle.uifont_id = uifont_id; + style->paneltitle.points = 12; + style->paneltitle.kerning = 1; + style->paneltitle.shadow = 1; + style->paneltitle.shadx = 0; + style->paneltitle.shady = -1; + style->paneltitle.shadowalpha = 0.15f; + style->paneltitle.shadowcolor = 1.0f; + + style->grouplabel.uifont_id = uifont_id; + style->grouplabel.points = 12; + style->grouplabel.kerning = 1; + style->grouplabel.shadow = 3; + style->grouplabel.shadx = 0; + style->grouplabel.shady = -1; + style->grouplabel.shadowalpha = 0.25f; + + style->widgetlabel.uifont_id = uifont_id; + style->widgetlabel.points = 11; + style->widgetlabel.kerning = 1; + style->widgetlabel.shadow = 3; + style->widgetlabel.shadx = 0; + style->widgetlabel.shady = -1; + style->widgetlabel.shadowalpha = 0.15f; + style->widgetlabel.shadowcolor = 1.0f; + + style->widget.uifont_id = uifont_id; + style->widget.points = 11; + style->widget.kerning = 1; + style->widget.shadowalpha = 0.25f; + + style->columnspace = 8; + style->templatespace = 5; + style->boxspace = 5; + style->buttonspacex = 8; + style->buttonspacey = 2; + style->panelspace = 8; + style->panelouter = 4; return style; } static uiFont *uifont_to_blfont(int id) { - uiFont *font= U.uifonts.first; + uiFont *font = U.uifonts.first; - for (; font; font= font->next) { - if (font->uifont_id==id) { + for (; font; font = font->next) { + if (font->uifont_id == id) { return font; } } @@ -144,31 +144,31 @@ static uiFont *uifont_to_blfont(int id) void uiStyleFontDrawExt(uiFontStyle *fs, rcti *rect, const char *str, - float *r_xofs, float *r_yofs) + float *r_xofs, float *r_yofs) { float height; - int xofs=0, yofs; + int xofs = 0, yofs; uiStyleFontSet(fs); - height= BLF_ascender(fs->uifont_id); - yofs= ceil( 0.5f*(rect->ymax - rect->ymin - height)); + height = BLF_ascender(fs->uifont_id); + yofs = ceil(0.5f * (rect->ymax - rect->ymin - height)); - if (fs->align==UI_STYLE_TEXT_CENTER) { - xofs= floor( 0.5f*(rect->xmax - rect->xmin - BLF_width(fs->uifont_id, str))); + if (fs->align == UI_STYLE_TEXT_CENTER) { + xofs = floor(0.5f * (rect->xmax - rect->xmin - BLF_width(fs->uifont_id, str))); /* don't center text if it chops off the start of the text, 2 gives some margin */ if (xofs < 2) { - xofs= 2; + xofs = 2; } } - else if (fs->align==UI_STYLE_TEXT_RIGHT) { - xofs= rect->xmax - rect->xmin - BLF_width(fs->uifont_id, str) - 1; + else if (fs->align == UI_STYLE_TEXT_RIGHT) { + xofs = rect->xmax - rect->xmin - BLF_width(fs->uifont_id, str) - 1; } /* clip is very strict, so we give it some space */ - BLF_clipping(fs->uifont_id, rect->xmin-1, rect->ymin-4, rect->xmax+1, rect->ymax+4); + BLF_clipping(fs->uifont_id, rect->xmin - 1, rect->ymin - 4, rect->xmax + 1, rect->ymax + 4); BLF_enable(fs->uifont_id, BLF_CLIPPING); - BLF_position(fs->uifont_id, rect->xmin+xofs, rect->ymin+yofs, 0.0f); + BLF_position(fs->uifont_id, rect->xmin + xofs, rect->ymin + yofs, 0.0f); if (fs->shadow) { BLF_enable(fs->uifont_id, BLF_SHADOW); @@ -186,15 +186,15 @@ void uiStyleFontDrawExt(uiFontStyle *fs, rcti *rect, const char *str, if (fs->kerning == 1) BLF_disable(fs->uifont_id, BLF_KERNING_DEFAULT); - *r_xofs= xofs; - *r_yofs= yofs; + *r_xofs = xofs; + *r_yofs = yofs; } void uiStyleFontDraw(uiFontStyle *fs, rcti *rect, const char *str) { float xofs, yofs; uiStyleFontDrawExt(fs, rect, str, - &xofs, &yofs); + &xofs, &yofs); } /* drawn same as above, but at 90 degree angle */ @@ -207,16 +207,16 @@ void uiStyleFontDrawRotated(uiFontStyle *fs, rcti *rect, const char *str) uiStyleFontSet(fs); - height= BLF_ascender(fs->uifont_id); + height = BLF_ascender(fs->uifont_id); /* becomes x-offset when rotated */ - xofs= ceil( 0.5f*(rect->ymax - rect->ymin - height)); + xofs = ceil(0.5f * (rect->ymax - rect->ymin - height)); /* ignore UI_STYLE, always aligned to top */ /* rotate counter-clockwise for now (assumes left-to-right language)*/ - xofs+= height; - yofs= BLF_width(fs->uifont_id, str) + 5; - angle= 90.0f; + xofs += height; + yofs = BLF_width(fs->uifont_id, str) + 5; + angle = 90.0f; /* translate rect to vertical */ txtrect.xmin = rect->xmin - (rect->ymax - rect->ymin); @@ -226,9 +226,9 @@ void uiStyleFontDrawRotated(uiFontStyle *fs, rcti *rect, const char *str) /* clip is very strict, so we give it some space */ /* clipping is done without rotation, so make rect big enough to contain both positions */ - BLF_clipping(fs->uifont_id, txtrect.xmin-1, txtrect.ymin-yofs-xofs-4, rect->xmax+1, rect->ymax+4); + BLF_clipping(fs->uifont_id, txtrect.xmin - 1, txtrect.ymin - yofs - xofs - 4, rect->xmax + 1, rect->ymax + 4); BLF_enable(fs->uifont_id, BLF_CLIPPING); - BLF_position(fs->uifont_id, txtrect.xmin+xofs, txtrect.ymax-yofs, 0.0f); + BLF_position(fs->uifont_id, txtrect.xmin + xofs, txtrect.ymax - yofs, 0.0f); BLF_enable(fs->uifont_id, BLF_ROTATION); BLF_rotation(fs->uifont_id, angle); @@ -253,7 +253,7 @@ void uiStyleFontDrawRotated(uiFontStyle *fs, rcti *rect, const char *str) /* ************** helpers ************************ */ /* XXX: read a style configure */ -uiStyle* UI_GetStyle(void) +uiStyle *UI_GetStyle(void) { uiStyle *style = NULL; /* offset is two struct uiStyle pointers */ @@ -264,17 +264,17 @@ uiStyle* UI_GetStyle(void) /* temporarily, does widget font */ int UI_GetStringWidth(const char *str) { - uiStyle *style= UI_GetStyle(); - uiFontStyle *fstyle= &style->widget; + uiStyle *style = UI_GetStyle(); + uiFontStyle *fstyle = &style->widget; int width; - if (fstyle->kerning==1) /* for BLF_width */ + if (fstyle->kerning == 1) /* for BLF_width */ BLF_enable(fstyle->uifont_id, BLF_KERNING_DEFAULT); uiStyleFontSet(fstyle); - width= BLF_width(fstyle->uifont_id, str); + width = BLF_width(fstyle->uifont_id, str); - if (fstyle->kerning==1) + if (fstyle->kerning == 1) BLF_disable(fstyle->uifont_id, BLF_KERNING_DEFAULT); return width; @@ -283,7 +283,7 @@ int UI_GetStringWidth(const char *str) /* temporarily, does widget font */ void UI_DrawString(float x, float y, const char *str) { - uiStyle *style= UI_GetStyle(); + uiStyle *style = UI_GetStyle(); if (style->widget.kerning == 1) BLF_enable(style->widget.uifont_id, BLF_KERNING_DEFAULT); @@ -302,39 +302,39 @@ void UI_DrawString(float x, float y, const char *str) /* reading without uifont will create one */ void uiStyleInit(void) { - uiFont *font= U.uifonts.first; - uiStyle *style= U.uistyles.first; + uiFont *font = U.uifonts.first; + uiStyle *style = U.uistyles.first; /* recover from uninitialized dpi */ if (U.dpi == 0) - U.dpi= 72; + U.dpi = 72; CLAMP(U.dpi, 48, 128); /* default builtin */ - if (font==NULL) { - font= MEM_callocN(sizeof(uiFont), "ui font"); + if (font == NULL) { + font = MEM_callocN(sizeof(uiFont), "ui font"); BLI_addtail(&U.uifonts, font); BLI_strncpy(font->filename, "default", sizeof(font->filename)); - font->uifont_id= UIFONT_DEFAULT; + font->uifont_id = UIFONT_DEFAULT; } - for (font= U.uifonts.first; font; font= font->next) { + for (font = U.uifonts.first; font; font = font->next) { - if (font->uifont_id==UIFONT_DEFAULT) { + if (font->uifont_id == UIFONT_DEFAULT) { #ifdef WITH_INTERNATIONAL - int font_size= datatoc_bfont_ttf_size; - unsigned char *font_ttf= (unsigned char*)datatoc_bfont_ttf; + int font_size = datatoc_bfont_ttf_size; + unsigned char *font_ttf = (unsigned char *)datatoc_bfont_ttf; static int last_font_size = 0; /* use unicode font for translation */ if (U.transopts & USER_DOTRANSLATE) { - font_ttf= BLF_get_unifont(&font_size); + font_ttf = BLF_get_unifont(&font_size); if (!font_ttf) { /* fall back if not found */ - font_size= datatoc_bfont_ttf_size; - font_ttf= (unsigned char*)datatoc_bfont_ttf; + font_size = datatoc_bfont_ttf_size; + font_ttf = (unsigned char *)datatoc_bfont_ttf; } } @@ -344,15 +344,15 @@ void uiStyleInit(void) last_font_size = font_size; } - font->blf_id= BLF_load_mem("default", font_ttf, font_size); + font->blf_id = BLF_load_mem("default", font_ttf, font_size); #else - font->blf_id= BLF_load_mem("default", (unsigned char*)datatoc_bfont_ttf, datatoc_bfont_ttf_size); + font->blf_id = BLF_load_mem("default", (unsigned char *)datatoc_bfont_ttf, datatoc_bfont_ttf_size); #endif } else { - font->blf_id= BLF_load(font->filename); + font->blf_id = BLF_load(font->filename); if (font->blf_id == -1) - font->blf_id= BLF_load_mem("default", (unsigned char*)datatoc_bfont_ttf, datatoc_bfont_ttf_size); + font->blf_id = BLF_load_mem("default", (unsigned char *)datatoc_bfont_ttf, datatoc_bfont_ttf_size); } if (font->blf_id == -1) { @@ -370,26 +370,26 @@ void uiStyleInit(void) } } - if (style==NULL) { - ui_style_new(&U.uistyles, "Default Style", UIFONT_DEFAULT ); + if (style == NULL) { + ui_style_new(&U.uistyles, "Default Style", UIFONT_DEFAULT); } // XXX, this should be moved into a style, but for now best only load the monospaced font once. if (blf_mono_font == -1) - blf_mono_font= BLF_load_mem_unique("monospace", (unsigned char *)datatoc_bmonofont_ttf, datatoc_bmonofont_ttf_size); + blf_mono_font = BLF_load_mem_unique("monospace", (unsigned char *)datatoc_bmonofont_ttf, datatoc_bmonofont_ttf_size); BLF_size(blf_mono_font, 12, 72); /* second for rendering else we get threading problems */ if (blf_mono_font_render == -1) - blf_mono_font_render= BLF_load_mem_unique("monospace", (unsigned char *)datatoc_bmonofont_ttf, datatoc_bmonofont_ttf_size); + blf_mono_font_render = BLF_load_mem_unique("monospace", (unsigned char *)datatoc_bmonofont_ttf, datatoc_bmonofont_ttf_size); BLF_size(blf_mono_font_render, 12, 72); } void uiStyleFontSet(uiFontStyle *fs) { - uiFont *font= uifont_to_blfont(fs->uifont_id); + uiFont *font = uifont_to_blfont(fs->uifont_id); BLF_size(font->blf_id, fs->points, U.dpi); } diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 91ff4000541..81db18aa0f8 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -83,7 +83,7 @@ void uiTemplateHeader(uiLayout *layout, bContext *C, int menus) { uiBlock *block; - block= uiLayoutAbsoluteBlock(layout); + block = uiLayoutAbsoluteBlock(layout); if (menus) ED_area_header_standardbuttons(C, block, 0); else ED_area_header_switchbutton(C, block, 0); } @@ -102,7 +102,7 @@ typedef struct TemplateID { /* Search browse menu, assign */ static void id_search_call_cb(bContext *C, void *arg_template, void *item) { - TemplateID *template= (TemplateID*)arg_template; + TemplateID *template = (TemplateID *)arg_template; /* ID */ if (item) { @@ -117,34 +117,34 @@ static void id_search_call_cb(bContext *C, void *arg_template, void *item) /* ID Search browse menu, do the search */ static void id_search_cb(const bContext *C, void *arg_template, const char *str, uiSearchItems *items) { - TemplateID *template= (TemplateID*)arg_template; - ListBase *lb= template->idlb; - ID *id, *id_from= template->ptr.id.data; + TemplateID *template = (TemplateID *)arg_template; + ListBase *lb = template->idlb; + ID *id, *id_from = template->ptr.id.data; int iconid; - int flag= RNA_property_flag(template->prop); + int flag = RNA_property_flag(template->prop); /* ID listbase */ - for (id= lb->first; id; id= id->next) { + for (id = lb->first; id; id = id->next) { if (!((flag & PROP_ID_SELF_CHECK) && id == id_from)) { /* use filter */ - if (RNA_property_type(template->prop)==PROP_POINTER) { + if (RNA_property_type(template->prop) == PROP_POINTER) { PointerRNA ptr; RNA_id_pointer_create(id, &ptr); - if (RNA_property_pointer_poll(&template->ptr, template->prop, &ptr)==0) + if (RNA_property_pointer_poll(&template->ptr, template->prop, &ptr) == 0) continue; } /* hide dot-datablocks, but only if filter does not force it visible */ if (U.uiflag & USER_HIDE_DOT) - if ((id->name[2]=='.') && (str[0] != '.')) + if ((id->name[2] == '.') && (str[0] != '.')) continue; - if (BLI_strcasestr(id->name+2, str)) { + if (BLI_strcasestr(id->name + 2, str)) { char name_ui[MAX_ID_NAME]; name_uiprefix_id(name_ui, id); - iconid= ui_id_icon_get((bContext*)C, id, template->preview); + iconid = ui_id_icon_get((bContext *)C, id, template->preview); if (!uiSearchItemAdd(items, name_ui, id, iconid)) break; @@ -159,20 +159,20 @@ static uiBlock *id_search_menu(bContext *C, ARegion *ar, void *arg_litem) static char search[256]; static TemplateID template; PointerRNA idptr; - wmWindow *win= CTX_wm_window(C); + wmWindow *win = CTX_wm_window(C); uiBlock *block; uiBut *but; /* clear initial search string, then all items show */ - search[0]= 0; + search[0] = 0; /* arg_litem is malloced, can be freed by parent button */ - template= *((TemplateID*)arg_litem); + template = *((TemplateID *)arg_litem); /* get active id for showing first item */ - idptr= RNA_property_pointer_get(&template.ptr, template.prop); + idptr = RNA_property_pointer_get(&template.ptr, template.prop); - block= uiBeginBlock(C, ar, "_popup", UI_EMBOSS); - uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_RET_1); + block = uiBeginBlock(C, ar, "_popup", UI_EMBOSS); + uiBlockSetFlag(block, UI_BLOCK_LOOP | UI_BLOCK_REDRAW | UI_BLOCK_RET_1); /* preview thumbnails */ if (template.prv_rows > 0 && template.prv_cols > 0) { @@ -214,24 +214,24 @@ static uiBlock *id_search_menu(bContext *C, ARegion *ar, void *arg_litem) void uiIDContextProperty(bContext *C, PointerRNA *ptr, PropertyRNA **prop) { TemplateID *template; - ARegion *ar= CTX_wm_region(C); + ARegion *ar = CTX_wm_region(C); uiBlock *block; uiBut *but; memset(ptr, 0, sizeof(*ptr)); - *prop= NULL; + *prop = NULL; if (!ar) return; - for (block=ar->uiblocks.first; block; block=block->next) { - for (but=block->buttons.first; but; but= but->next) { + for (block = ar->uiblocks.first; block; block = block->next) { + for (but = block->buttons.first; but; but = but->next) { /* find the button before the active one */ - if ((but->flag & (UI_BUT_LAST_ACTIVE|UI_ACTIVE))) { + if ((but->flag & (UI_BUT_LAST_ACTIVE | UI_ACTIVE))) { if (but->func_argN) { - template= but->func_argN; - *ptr= template->ptr; - *prop= template->prop; + template = but->func_argN; + *ptr = template->ptr; + *prop = template->prop; return; } } @@ -242,12 +242,12 @@ void uiIDContextProperty(bContext *C, PointerRNA *ptr, PropertyRNA **prop) static void template_id_cb(bContext *C, void *arg_litem, void *arg_event) { - TemplateID *template= (TemplateID*)arg_litem; - PointerRNA idptr= RNA_property_pointer_get(&template->ptr, template->prop); - ID *id= idptr.data; - int event= GET_INT_FROM_POINTER(arg_event); + TemplateID *template = (TemplateID *)arg_litem; + PointerRNA idptr = RNA_property_pointer_get(&template->ptr, template->prop); + ID *id = idptr.data; + int event = GET_INT_FROM_POINTER(arg_event); - switch(event) { + switch (event) { case UI_ID_BROWSE: case UI_ID_PIN: RNA_warning("warning, id event %d shouldnt come here", event); @@ -262,7 +262,7 @@ static void template_id_cb(bContext *C, void *arg_litem, void *arg_event) RNA_property_update(C, &template->ptr, template->prop); if (id && CTX_wm_window(C)->eventstate->shift) /* useful hidden functionality, */ - id->us= 0; + id->us = 0; break; case UI_ID_FAKE_USER: @@ -276,7 +276,7 @@ static void template_id_cb(bContext *C, void *arg_litem, void *arg_event) if (id) { if (id_make_local(id, 0)) { /* reassign to get get proper updates/notifiers */ - idptr= RNA_property_pointer_get(&template->ptr, template->prop); + idptr = RNA_property_pointer_get(&template->ptr, template->prop); RNA_property_pointer_set(&template->ptr, template->prop, idptr); RNA_property_update(C, &template->ptr, template->prop); } @@ -284,14 +284,14 @@ static void template_id_cb(bContext *C, void *arg_litem, void *arg_event) break; case UI_ID_ALONE: if (id) { - const int do_scene_obj= (GS(id->name) == ID_OB) && - (template->ptr.type == &RNA_SceneObjects); + const int do_scene_obj = (GS(id->name) == ID_OB) && + (template->ptr.type == &RNA_SceneObjects); /* make copy */ if (do_scene_obj) { - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); ED_object_single_user(scene, (struct Object *)id); - WM_event_add_notifier(C, NC_SCENE|ND_OB_ACTIVE, scene); + WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene); } else { if (id) { @@ -310,7 +310,7 @@ static void template_id_cb(bContext *C, void *arg_litem, void *arg_event) static const char *template_id_browse_tip(StructRNA *type) { if (type) { - switch(RNA_type_to_ID_code(type)) { + switch (RNA_type_to_ID_code(type)) { case ID_SCE: return N_("Browse Scene to be linked"); case ID_OB: return N_("Browse Object to be linked"); case ID_ME: return N_("Browse Mesh Data to be linked"); @@ -345,42 +345,42 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str PointerRNA idptr; // ListBase *lb; // UNUSED ID *id, *idfrom; - int editable= RNA_property_editable(&template->ptr, template->prop); + int editable = RNA_property_editable(&template->ptr, template->prop); - idptr= RNA_property_pointer_get(&template->ptr, template->prop); - id= idptr.data; - idfrom= template->ptr.id.data; + idptr = RNA_property_pointer_get(&template->ptr, template->prop); + id = idptr.data; + idfrom = template->ptr.id.data; // lb= template->idlb; - block= uiLayoutGetBlock(layout); + block = uiLayoutGetBlock(layout); uiBlockBeginAlign(block); if (idptr.type) - type= idptr.type; + type = idptr.type; if (flag & UI_ID_PREVIEWS) { - but = uiDefBlockButN(block, id_search_menu, MEM_dupallocN(template), "", 0, 0, UI_UNIT_X*6, UI_UNIT_Y*6, - TIP_(template_id_browse_tip(type))); + but = uiDefBlockButN(block, id_search_menu, MEM_dupallocN(template), "", 0, 0, UI_UNIT_X * 6, UI_UNIT_Y * 6, + TIP_(template_id_browse_tip(type))); if (type) { - but->icon= RNA_struct_ui_icon(type); + but->icon = RNA_struct_ui_icon(type); if (id) but->icon = ui_id_icon_get(C, id, 1); - uiButSetFlag(but, UI_HAS_ICON|UI_ICON_PREVIEW); + uiButSetFlag(but, UI_HAS_ICON | UI_ICON_PREVIEW); } if ((idfrom && idfrom->lib) || !editable) uiButSetFlag(but, UI_BUT_DISABLED); uiLayoutRow(layout, 1); - template->preview= 1; + template->preview = 1; } else if (flag & UI_ID_BROWSE) { - but = uiDefBlockButN(block, id_search_menu, MEM_dupallocN(template), "", 0, 0, UI_UNIT_X*1.6, UI_UNIT_Y, - TIP_(template_id_browse_tip(type))); + but = uiDefBlockButN(block, id_search_menu, MEM_dupallocN(template), "", 0, 0, UI_UNIT_X * 1.6, UI_UNIT_Y, + TIP_(template_id_browse_tip(type))); if (type) { - but->icon= RNA_struct_ui_icon(type); + but->icon = RNA_struct_ui_icon(type); /* default dragging of icon for id browse buttons */ uiButSetDragID(but, id); - uiButSetFlag(but, UI_HAS_ICON|UI_ICON_LEFT); + uiButSetFlag(but, UI_HAS_ICON | UI_ICON_LEFT); } if ((idfrom && idfrom->lib) || !editable) @@ -390,23 +390,23 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str /* text button with name */ if (id) { char name[UI_MAX_NAME_STR]; - const short user_alert= (id->us <= 0); + const short user_alert = (id->us <= 0); //text_idbutton(id, name); - name[0]= '\0'; - but = uiDefButR(block, TEX, 0, name, 0, 0, UI_UNIT_X*6, UI_UNIT_Y, &idptr, "name", -1, 0, 0, -1, -1, NULL); + name[0] = '\0'; + but = uiDefButR(block, TEX, 0, name, 0, 0, UI_UNIT_X * 6, UI_UNIT_Y, &idptr, "name", -1, 0, 0, -1, -1, NULL); uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_RENAME)); if (user_alert) uiButSetFlag(but, UI_BUT_REDALERT); if (id->lib) { if (id->flag & LIB_INDIRECT) { - but = uiDefIconBut(block, BUT, 0, ICON_LIBRARY_DATA_INDIRECT, 0,0,UI_UNIT_X,UI_UNIT_Y, NULL, 0, 0, 0, 0, - TIP_("Indirect library datablock, cannot change")); + but = uiDefIconBut(block, BUT, 0, ICON_LIBRARY_DATA_INDIRECT, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, + TIP_("Indirect library datablock, cannot change")); uiButSetFlag(but, UI_BUT_DISABLED); } else { - but = uiDefIconBut(block, BUT, 0, ICON_LIBRARY_DATA_DIRECT, 0,0,UI_UNIT_X,UI_UNIT_Y, NULL, 0, 0, 0, 0, - TIP_("Direct linked library datablock, click to make local")); + but = uiDefIconBut(block, BUT, 0, ICON_LIBRARY_DATA_DIRECT, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, + TIP_("Direct linked library datablock, click to make local")); if (!id_make_local(id, 1 /* test */) || (idfrom && idfrom->lib)) uiButSetFlag(but, UI_BUT_DISABLED); } @@ -419,8 +419,8 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str BLI_snprintf(numstr, sizeof(numstr), "%d", id->us); - but = uiDefBut(block, BUT, 0, numstr, 0,0,UI_UNIT_X + ((id->us < 10) ? 0:10), UI_UNIT_Y, NULL, 0, 0, 0, 0, - TIP_("Display number of users of this data (click to make a single-user copy)")); + but = uiDefBut(block, BUT, 0, numstr, 0, 0, UI_UNIT_X + ((id->us < 10) ? 0 : 10), UI_UNIT_Y, NULL, 0, 0, 0, 0, + TIP_("Display number of users of this data (click to make a single-user copy)")); uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_ALONE)); if (!id_copy(id, NULL, 1 /* test only */) || (idfrom && idfrom->lib) || !editable) @@ -435,14 +435,14 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str } if (flag & UI_ID_ADD_NEW) { - int w= id?UI_UNIT_X: (flag & UI_ID_OPEN)? UI_UNIT_X*3: UI_UNIT_X*6; + int w = id ? UI_UNIT_X : (flag & UI_ID_OPEN) ? UI_UNIT_X * 3 : UI_UNIT_X * 6; if (newop) { - but = uiDefIconTextButO(block, BUT, newop, WM_OP_INVOKE_DEFAULT, ICON_ZOOMIN, (id)? "": IFACE_("New"), 0, 0, w, UI_UNIT_Y, NULL); + but = uiDefIconTextButO(block, BUT, newop, WM_OP_INVOKE_DEFAULT, ICON_ZOOMIN, (id) ? "" : IFACE_("New"), 0, 0, w, UI_UNIT_Y, NULL); uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_ADD_NEW)); } else { - but = uiDefIconTextBut(block, BUT, 0, ICON_ZOOMIN, (id)? "": IFACE_("New"), 0, 0, w, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL); + but = uiDefIconTextBut(block, BUT, 0, ICON_ZOOMIN, (id) ? "" : IFACE_("New"), 0, 0, w, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL); uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_ADD_NEW)); } @@ -451,14 +451,14 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str } if (flag & UI_ID_OPEN) { - int w= id?UI_UNIT_X: (flag & UI_ID_ADD_NEW)? UI_UNIT_X*3: UI_UNIT_X*6; + int w = id ? UI_UNIT_X : (flag & UI_ID_ADD_NEW) ? UI_UNIT_X * 3 : UI_UNIT_X * 6; if (openop) { - but = uiDefIconTextButO(block, BUT, openop, WM_OP_INVOKE_DEFAULT, ICON_FILESEL, (id)? "": IFACE_("Open"), 0, 0, w, UI_UNIT_Y, NULL); + but = uiDefIconTextButO(block, BUT, openop, WM_OP_INVOKE_DEFAULT, ICON_FILESEL, (id) ? "" : IFACE_("Open"), 0, 0, w, UI_UNIT_Y, NULL); uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_OPEN)); } else { - but = uiDefIconTextBut(block, BUT, 0, ICON_FILESEL, (id)? "": IFACE_("Open"), 0, 0, w, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL); + but = uiDefIconTextBut(block, BUT, 0, ICON_FILESEL, (id) ? "" : IFACE_("Open"), 0, 0, w, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL); uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_OPEN)); } @@ -467,7 +467,7 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str } /* delete button */ - if (id && (flag & UI_ID_DELETE) && (RNA_property_flag(template->prop) & PROP_NEVER_UNLINK)==0) { + if (id && (flag & UI_ID_DELETE) && (RNA_property_flag(template->prop) & PROP_NEVER_UNLINK) == 0) { if (unlinkop) { but = uiDefIconButO(block, BUT, unlinkop, WM_OP_INVOKE_REGION_WIN, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL); /* so we can access the template from operators, font unlinking needs this */ @@ -475,7 +475,7 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str } else { but = uiDefIconBut(block, BUT, 0, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, - TIP_("Unlink datablock. Shift + Click to set users to zero, data will then not be saved")); + TIP_("Unlink datablock. Shift + Click to set users to zero, data will then not be saved")); uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_DELETE)); if (RNA_property_flag(template->prop) & PROP_NEVER_NULL) @@ -499,16 +499,16 @@ static void ui_template_id(uiLayout *layout, bContext *C, PointerRNA *ptr, const StructRNA *type; short idcode; - prop= RNA_struct_find_property(ptr, propname); + prop = RNA_struct_find_property(ptr, propname); if (!prop || RNA_property_type(prop) != PROP_POINTER) { RNA_warning("pointer property not found: %s.%s", RNA_struct_identifier(ptr->type), propname); return; } - template= MEM_callocN(sizeof(TemplateID), "TemplateID"); - template->ptr= *ptr; - template->prop= prop; + template = MEM_callocN(sizeof(TemplateID), "TemplateID"); + template->ptr = *ptr; + template->prop = prop; template->prv_rows = prv_rows; template->prv_cols = prv_cols; @@ -517,9 +517,9 @@ static void ui_template_id(uiLayout *layout, bContext *C, PointerRNA *ptr, const if (openop) flag |= UI_ID_OPEN; - type= RNA_property_pointer_type(ptr, prop); - idcode= RNA_type_to_ID_code(type); - template->idlb= which_libbase(CTX_data_main(C), idcode); + type = RNA_property_pointer_type(ptr, prop); + idcode = RNA_type_to_ID_code(type); + template->idlb = which_libbase(CTX_data_main(C), idcode); /* create UI elements for this template * - template_ID makes a copy of the template data and assigns it to the relevant buttons @@ -534,17 +534,17 @@ static void ui_template_id(uiLayout *layout, bContext *C, PointerRNA *ptr, const void uiTemplateID(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *propname, const char *newop, const char *openop, const char *unlinkop) { - ui_template_id(layout, C, ptr, propname, newop, openop, unlinkop, UI_ID_BROWSE|UI_ID_RENAME|UI_ID_DELETE, 0, 0); + ui_template_id(layout, C, ptr, propname, newop, openop, unlinkop, UI_ID_BROWSE | UI_ID_RENAME | UI_ID_DELETE, 0, 0); } void uiTemplateIDBrowse(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *propname, const char *newop, const char *openop, const char *unlinkop) { - ui_template_id(layout, C, ptr, propname, newop, openop, unlinkop, UI_ID_BROWSE|UI_ID_RENAME, 0, 0); + ui_template_id(layout, C, ptr, propname, newop, openop, unlinkop, UI_ID_BROWSE | UI_ID_RENAME, 0, 0); } void uiTemplateIDPreview(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *propname, const char *newop, const char *openop, const char *unlinkop, int rows, int cols) { - ui_template_id(layout, C, ptr, propname, newop, openop, unlinkop, UI_ID_BROWSE|UI_ID_RENAME|UI_ID_DELETE|UI_ID_PREVIEWS, rows, cols); + ui_template_id(layout, C, ptr, propname, newop, openop, unlinkop, UI_ID_BROWSE | UI_ID_RENAME | UI_ID_DELETE | UI_ID_PREVIEWS, rows, cols); } /************************ ID Chooser Template ***************************/ @@ -560,8 +560,8 @@ void uiTemplateAnyID(uiLayout *layout, PointerRNA *ptr, const char *propname, co uiLayout *row; /* get properties... */ - propID= RNA_struct_find_property(ptr, propname); - propType= RNA_struct_find_property(ptr, proptypename); + propID = RNA_struct_find_property(ptr, propname); + propType = RNA_struct_find_property(ptr, proptypename); if (!propID || RNA_property_type(propID) != PROP_POINTER) { RNA_warning("pointer property not found: %s.%s", RNA_struct_identifier(ptr->type), propname); @@ -573,7 +573,7 @@ void uiTemplateAnyID(uiLayout *layout, PointerRNA *ptr, const char *propname, co } /* Start drawing UI Elements using standard defines */ - row= uiLayoutRow(layout, 1); + row = uiLayoutRow(layout, 1); /* Label - either use the provided text, or will become "ID-Block:" */ if (text) @@ -605,14 +605,14 @@ void uiTemplatePathBuilder(uiLayout *layout, PointerRNA *ptr, const char *propna uiLayout *row; /* check that properties are valid */ - propPath= RNA_struct_find_property(ptr, propname); + propPath = RNA_struct_find_property(ptr, propname); if (!propPath || RNA_property_type(propPath) != PROP_STRING) { RNA_warning("path property not found: %s.%s", RNA_struct_identifier(ptr->type), propname); return; } /* Start drawing UI Elements using standard defines */ - row= uiLayoutRow(layout, 1); + row = uiLayoutRow(layout, 1); /* Path (existing string) Widget */ uiItemR(row, ptr, propname, 0, text, ICON_RNA); @@ -643,13 +643,13 @@ static void modifiers_setOnCage(bContext *C, void *ob_v, void *md_v) { Scene *scene = CTX_data_scene(C); Object *ob = ob_v; - ModifierData *md= md_v; + ModifierData *md = md_v; int i, cageIndex = modifiers_getCageIndex(scene, ob, NULL, 0); /* undo button operation */ md->mode ^= eModifierMode_OnCage; - for (i = 0, md=ob->modifiers.first; md; ++i, md=md->next) { + for (i = 0, md = ob->modifiers.first; md; ++i, md = md->next) { if (md == md_v) { if (i >= cageIndex) md->mode ^= eModifierMode_OnCage; @@ -657,7 +657,7 @@ static void modifiers_setOnCage(bContext *C, void *ob_v, void *md_v) } } - WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob); + WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); DAG_id_tag_update(&ob->id, OB_RECALC_DATA); } @@ -676,7 +676,7 @@ static void modifiers_convertToReal(bContext *C, void *ob_v, void *md_v) ob->partype = PAROBJECT; - WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob); + WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob); DAG_id_tag_update(&ob->id, OB_RECALC_DATA); ED_undo_push(C, "Modifier convert to real"); @@ -697,7 +697,7 @@ static int modifier_is_simulation(ModifierData *md) { /* Physic Tab */ if (ELEM7(md->type, eModifierType_Cloth, eModifierType_Collision, eModifierType_Fluidsim, eModifierType_Smoke, - eModifierType_Softbody, eModifierType_Surface, eModifierType_DynamicPaint)) + eModifierType_Softbody, eModifierType_Surface, eModifierType_DynamicPaint)) { return 1; } @@ -718,30 +718,30 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob, uiBut *but; uiBlock *block; uiLayout *box, *column, *row; - uiLayout *result= NULL; + uiLayout *result = NULL; int isVirtual = (md->mode & eModifierMode_Virtual); char str[128]; /* create RNA pointer */ RNA_pointer_create(&ob->id, &RNA_Modifier, md, &ptr); - column= uiLayoutColumn(layout, 1); + column = uiLayoutColumn(layout, 1); uiLayoutSetContextPointer(column, "modifier", &ptr); /* rounded header ------------------------------------------------------------------- */ - box= uiLayoutBox(column); + box = uiLayoutBox(column); if (isVirtual) { - row= uiLayoutRow(box, 0); + row = uiLayoutRow(box, 0); uiLayoutSetAlignment(row, UI_LAYOUT_ALIGN_EXPAND); - block= uiLayoutGetBlock(row); + block = uiLayoutGetBlock(row); /* VIRTUAL MODIFIER */ // XXX this is not used now, since these cannot be accessed via RNA BLI_snprintf(str, sizeof(str), "%s parent deform", md->name); uiDefBut(block, LABEL, 0, str, 0, 0, 185, UI_UNIT_Y, NULL, 0.0, 0.0, 0.0, 0.0, "Modifier name"); but = uiDefBut(block, BUT, 0, IFACE_("Make Real"), 0, 0, 80, 16, NULL, 0.0, 0.0, 0.0, 0.0, - TIP_("Convert virtual modifier to a real modifier")); + TIP_("Convert virtual modifier to a real modifier")); uiButSetFunc(but, modifiers_convertToReal, ob, md); } else { @@ -763,8 +763,8 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob, /* mode enabling buttons */ uiBlockBeginAlign(block); /* Softbody not allowed in this situation, enforce! */ - if ( ((md->type!=eModifierType_Softbody && md->type!=eModifierType_Collision) || !(ob->pd && ob->pd->deflect)) - && (md->type!=eModifierType_Surface) ) + if ( ((md->type != eModifierType_Softbody && md->type != eModifierType_Collision) || !(ob->pd && ob->pd->deflect)) + && (md->type != eModifierType_Surface) ) { uiItemR(row, &ptr, "show_render", 0, "", ICON_NONE); uiItemR(row, &ptr, "show_viewport", 0, "", ICON_NONE); @@ -773,11 +773,11 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob, uiItemR(row, &ptr, "show_in_editmode", 0, "", ICON_NONE); } - if (ob->type==OB_MESH) { + if (ob->type == OB_MESH) { if (modifier_couldBeCage(scene, md) && (index <= lastCageIndex)) { /* -- convert to rna ? */ - but = uiDefIconButBitI(block, TOG, eModifierMode_OnCage, 0, ICON_MESH_DATA, 0, 0, UI_UNIT_X-2, UI_UNIT_Y, &md->mode, 0.0, 0.0, 0.0, 0.0, - TIP_("Apply modifier to editing cage during Editmode")); + but = uiDefIconButBitI(block, TOG, eModifierMode_OnCage, 0, ICON_MESH_DATA, 0, 0, UI_UNIT_X - 2, UI_UNIT_Y, &md->mode, 0.0, 0.0, 0.0, 0.0, + TIP_("Apply modifier to editing cage during Editmode")); if (index < cageIndex) uiButSetFlag(but, UI_BUT_DISABLED); uiButSetFunc(but, modifiers_setOnCage, ob, md); @@ -787,7 +787,7 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob, /* place holder button */ uiBlockSetEmboss(block, UI_EMBOSSN); - but = uiDefIconBut(block, BUT, 0, ICON_NONE, 0, 0, UI_UNIT_X-2, UI_UNIT_Y, NULL, 0.0, 0.0, 0.0, 0.0, NULL); + but = uiDefIconBut(block, BUT, 0, ICON_NONE, 0, 0, UI_UNIT_X - 2, UI_UNIT_Y, NULL, 0.0, 0.0, 0.0, 0.0, NULL); uiButSetFlag(but, UI_BUT_DISABLED); uiBlockSetEmboss(block, UI_EMBOSS); } @@ -797,8 +797,8 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob, if (ELEM3(md->type, eModifierType_Hook, eModifierType_Softbody, eModifierType_MeshDeform)) { /* add disabled pre-tessellated button, so users could have * message for this modifiers */ - but = uiDefIconButBitI(block, TOG, eModifierMode_ApplyOnSpline, 0, ICON_SURFACE_DATA, 0, 0, UI_UNIT_X-2, UI_UNIT_Y, &md->mode, 0.0, 0.0, 0.0, 0.0, - TIP_("This modifier could be applied on splines' points only")); + but = uiDefIconButBitI(block, TOG, eModifierMode_ApplyOnSpline, 0, ICON_SURFACE_DATA, 0, 0, UI_UNIT_X - 2, UI_UNIT_Y, &md->mode, 0.0, 0.0, 0.0, 0.0, + TIP_("This modifier could be applied on splines' points only")); uiButSetFlag(but, UI_BUT_DISABLED); } else if (mti->type != eModifierTypeType_Constructive) { @@ -830,15 +830,15 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob, /* modifier settings (under the header) --------------------------------------------------- */ if (!isVirtual && (md->mode & eModifierMode_Expanded)) { /* apply/convert/copy */ - box= uiLayoutBox(column); - row= uiLayoutRow(box, 0); + box = uiLayoutBox(column); + row = uiLayoutRow(box, 0); if (!ELEM(md->type, eModifierType_Collision, eModifierType_Surface)) { /* only here obdata, the rest of modifiers is ob level */ uiBlockSetButLock(block, object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE); - if (md->type==eModifierType_ParticleSystem) { - ParticleSystem *psys= ((ParticleSystemModifierData *)md)->psys; + if (md->type == eModifierType_ParticleSystem) { + ParticleSystem *psys = ((ParticleSystemModifierData *)md)->psys; if (!(ob->mode & OB_MODE_PARTICLE_EDIT) && psys->pathcache) { if (ELEM(psys->part->ren_as, PART_DRAW_GR, PART_DRAW_OB)) @@ -863,8 +863,8 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob, } /* result is the layout block inside the box, that we return so that modifier settings can be drawn */ - result= uiLayoutColumn(box, 0); - block= uiLayoutAbsoluteBlock(box); + result = uiLayoutColumn(box, 0); + block = uiLayoutAbsoluteBlock(box); } /* error messages */ @@ -890,8 +890,8 @@ uiLayout *uiTemplateModifier(uiLayout *layout, bContext *C, PointerRNA *ptr) return NULL; } - ob= ptr->id.data; - md= ptr->data; + ob = ptr->id.data; + md = ptr->data; if (!ob || !(GS(ob->id.name) == ID_OB)) { RNA_warning("Expected modifier on object"); @@ -906,7 +906,7 @@ uiLayout *uiTemplateModifier(uiLayout *layout, bContext *C, PointerRNA *ptr) // XXX virtual modifiers are not accesible for python vmd = modifiers_getVirtualModifierList(ob); - for (i=0; vmd; i++, vmd=vmd->next) { + for (i = 0; vmd; i++, vmd = vmd->next) { if (md == vmd) return draw_modifier(layout, scene, ob, md, i, cageIndex, lastCageIndex); else if (vmd->mode & eModifierMode_Virtual) @@ -923,30 +923,30 @@ uiLayout *uiTemplateModifier(uiLayout *layout, bContext *C, PointerRNA *ptr) #include "BKE_action.h" #include "BKE_constraint.h" -#define REDRAWIPO 1 -#define REDRAWNLA 2 -#define REDRAWBUTSOBJECT 3 -#define REDRAWACTION 4 -#define B_CONSTRAINT_TEST 5 -#define B_CONSTRAINT_CHANGETARGET 6 -#define REMAKEIPO 8 -#define B_DIFF 9 +#define REDRAWIPO 1 +#define REDRAWNLA 2 +#define REDRAWBUTSOBJECT 3 +#define REDRAWACTION 4 +#define B_CONSTRAINT_TEST 5 +#define B_CONSTRAINT_CHANGETARGET 6 +#define REMAKEIPO 8 +#define B_DIFF 9 static void do_constraint_panels(bContext *C, void *ob_pt, int event) { - Main *bmain= CTX_data_main(C); - Scene *scene= CTX_data_scene(C); - Object *ob= (Object *)ob_pt; - - switch(event) { - case B_CONSTRAINT_TEST: - break; // no handling - case B_CONSTRAINT_CHANGETARGET: - if (ob->pose) ob->pose->flag |= POSE_RECALC; // checks & sorts pose channels - DAG_scene_sort(bmain, scene); - break; - default: - break; + Main *bmain = CTX_data_main(C); + Scene *scene = CTX_data_scene(C); + Object *ob = (Object *)ob_pt; + + switch (event) { + case B_CONSTRAINT_TEST: + break; // no handling + case B_CONSTRAINT_CHANGETARGET: + if (ob->pose) ob->pose->flag |= POSE_RECALC; // checks & sorts pose channels + DAG_scene_sort(bmain, scene); + break; + default: + break; } // note: RNA updates now call this, commenting else it gets called twice. @@ -955,10 +955,10 @@ static void do_constraint_panels(bContext *C, void *ob_pt, int event) // object_test_constraints(ob); // if (ob->pose) update_pose_constraint_flags(ob->pose); - if (ob->type==OB_ARMATURE) DAG_id_tag_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB); + if (ob->type == OB_ARMATURE) DAG_id_tag_update(&ob->id, OB_RECALC_DATA | OB_RECALC_OB); else DAG_id_tag_update(&ob->id, OB_RECALC_OB); - WM_event_add_notifier(C, NC_OBJECT|ND_CONSTRAINT, ob); + WM_event_add_notifier(C, NC_OBJECT | ND_CONSTRAINT, ob); } static void constraint_active_func(bContext *UNUSED(C), void *ob_v, void *con_v) @@ -969,17 +969,17 @@ static void constraint_active_func(bContext *UNUSED(C), void *ob_v, void *con_v) /* draw panel showing settings for a constraint */ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con) { - bPoseChannel *pchan= get_active_posechannel(ob); + bPoseChannel *pchan = get_active_posechannel(ob); bConstraintTypeInfo *cti; uiBlock *block; - uiLayout *result= NULL, *col, *box, *row; + uiLayout *result = NULL, *col, *box, *row; PointerRNA ptr; char typestr[32]; - short proxy_protected, xco=0, yco=0; + short proxy_protected, xco = 0, yco = 0; // int rb_col; // UNUSED /* get constraint typeinfo */ - cti= constraint_get_typeinfo(con); + cti = constraint_get_typeinfo(con); if (cti == NULL) { /* exception for 'Null' constraint - it doesn't have constraint typeinfo! */ BLI_strncpy(typestr, (con->type == CONSTRAINT_TYPE_NULL) ? "Null" : "Unknown", sizeof(typestr)); @@ -989,23 +989,23 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con) /* determine whether constraint is proxy protected or not */ if (proxylocked_constraints_owner(ob, pchan)) - proxy_protected= (con->flag & CONSTRAINT_PROXY_LOCAL)==0; + proxy_protected = (con->flag & CONSTRAINT_PROXY_LOCAL) == 0; else - proxy_protected= 0; + proxy_protected = 0; /* unless button has own callback, it adds this callback to button */ - block= uiLayoutGetBlock(layout); + block = uiLayoutGetBlock(layout); uiBlockSetHandleFunc(block, do_constraint_panels, ob); uiBlockSetFunc(block, constraint_active_func, ob, con); RNA_pointer_create(&ob->id, &RNA_Constraint, con, &ptr); - col= uiLayoutColumn(layout, 1); + col = uiLayoutColumn(layout, 1); uiLayoutSetContextPointer(col, "constraint", &ptr); - box= uiLayoutBox(col); + box = uiLayoutBox(col); row = uiLayoutRow(box, 0); - block= uiLayoutGetBlock(box); + block = uiLayoutGetBlock(box); /* Draw constraint header */ @@ -1015,7 +1015,7 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con) uiBlockSetEmboss(block, UI_EMBOSS); /* name */ - uiDefBut(block, LABEL, B_CONSTRAINT_TEST, typestr, xco+10, yco, 100, 18, NULL, 0.0, 0.0, 0.0, 0.0, ""); + uiDefBut(block, LABEL, B_CONSTRAINT_TEST, typestr, xco + 10, yco, 100, 18, NULL, 0.0, 0.0, 0.0, 0.0, ""); if (con->flag & CONSTRAINT_DISABLE) uiLayoutSetRedAlert(row, 1); @@ -1033,8 +1033,8 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con) uiBlockSetEmboss(block, UI_EMBOSSN); /* draw a ghost icon (for proxy) and also a lock beside it, to show that constraint is "proxy locked" */ - uiDefIconBut(block, BUT, B_CONSTRAINT_TEST, ICON_GHOST, xco+244, yco, 19, 19, NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Proxy Protected")); - uiDefIconBut(block, BUT, B_CONSTRAINT_TEST, ICON_LOCKED, xco+262, yco, 19, 19, NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Proxy Protected")); + uiDefIconBut(block, BUT, B_CONSTRAINT_TEST, ICON_GHOST, xco + 244, yco, 19, 19, NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Proxy Protected")); + uiDefIconBut(block, BUT, B_CONSTRAINT_TEST, ICON_LOCKED, xco + 262, yco, 19, 19, NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Proxy Protected")); uiBlockSetEmboss(block, UI_EMBOSS); } @@ -1046,20 +1046,20 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con) * as that poses problems when restoring them, so disable the "up" button where * it may cause this situation. * - * Up/Down buttons should only be shown (or not greyed - todo) if they serve some purpose. + * Up/Down buttons should only be shown (or not greyed - todo) if they serve some purpose. */ if (proxylocked_constraints_owner(ob, pchan)) { if (con->prev) { - prev_proxylock= (con->prev->flag & CONSTRAINT_PROXY_LOCAL) ? 0 : 1; + prev_proxylock = (con->prev->flag & CONSTRAINT_PROXY_LOCAL) ? 0 : 1; } else - prev_proxylock= 0; + prev_proxylock = 0; } else - prev_proxylock= 0; + prev_proxylock = 0; - show_upbut= ((prev_proxylock == 0) && (con->prev)); - show_downbut= (con->next) ? 1 : 0; + show_upbut = ((prev_proxylock == 0) && (con->prev)); + show_downbut = (con->next) ? 1 : 0; /* enabled */ uiBlockSetEmboss(block, UI_EMBOSSN); @@ -1094,9 +1094,9 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con) (yco) -= 21; } else { - box= uiLayoutBox(col); - block= uiLayoutAbsoluteBlock(box); - result= box; + box = uiLayoutBox(col); + block = uiLayoutAbsoluteBlock(box); + result = box; } /* clear any locks set up for proxies/lib-linking */ @@ -1116,8 +1116,8 @@ uiLayout *uiTemplateConstraint(uiLayout *layout, PointerRNA *ptr) return NULL; } - ob= ptr->id.data; - con= ptr->data; + ob = ptr->id.data; + con = ptr->data; if (!ob || !(GS(ob->id.name) == ID_OB)) { RNA_warning("Expected constraint on object"); @@ -1127,8 +1127,8 @@ uiLayout *uiTemplateConstraint(uiLayout *layout, PointerRNA *ptr) uiBlockSetButLock(uiLayoutGetBlock(layout), (ob && ob->id.lib), ERROR_LIBDATA_MESSAGE); /* hrms, the temporal constraint should not draw! */ - if (con->type==CONSTRAINT_TYPE_KINEMATIC) { - bKinematicConstraint *data= con->data; + if (con->type == CONSTRAINT_TYPE_KINEMATIC) { + bKinematicConstraint *data = con->data; if (data->flag & CONSTRAINT_IK_TEMP) return NULL; } @@ -1147,9 +1147,9 @@ uiLayout *uiTemplateConstraint(uiLayout *layout, PointerRNA *ptr) static void do_preview_buttons(bContext *C, void *arg, int event) { - switch(event) { + switch (event) { case B_MATPRV: - WM_event_add_notifier(C, NC_MATERIAL|ND_SHADING, arg); + WM_event_add_notifier(C, NC_MATERIAL | ND_SHADING, arg); break; } } @@ -1158,10 +1158,10 @@ void uiTemplatePreview(uiLayout *layout, ID *id, int show_buttons, ID *parent, M { uiLayout *row, *col; uiBlock *block; - Material *ma= NULL; - Tex *tex = (Tex*)id; + Material *ma = NULL; + Tex *tex = (Tex *)id; ID *pid, *pparent; - short *pr_texture= NULL; + short *pr_texture = NULL; PointerRNA material_ptr; PointerRNA texture_ptr; @@ -1171,41 +1171,41 @@ void uiTemplatePreview(uiLayout *layout, ID *id, int show_buttons, ID *parent, M } /* decide what to render */ - pid= id; - pparent= NULL; + pid = id; + pparent = NULL; if (id && (GS(id->name) == ID_TE)) { if (parent && (GS(parent->name) == ID_MA)) - pr_texture= &((Material*)parent)->pr_texture; + pr_texture = &((Material *)parent)->pr_texture; else if (parent && (GS(parent->name) == ID_WO)) - pr_texture= &((World*)parent)->pr_texture; + pr_texture = &((World *)parent)->pr_texture; else if (parent && (GS(parent->name) == ID_LA)) - pr_texture= &((Lamp*)parent)->pr_texture; + pr_texture = &((Lamp *)parent)->pr_texture; if (pr_texture) { if (*pr_texture == TEX_PR_OTHER) - pid= parent; + pid = parent; else if (*pr_texture == TEX_PR_BOTH) - pparent= parent; + pparent = parent; } } /* layout */ - block= uiLayoutGetBlock(layout); - row= uiLayoutRow(layout, 0); - col= uiLayoutColumn(row, 0); + block = uiLayoutGetBlock(layout); + row = uiLayoutRow(layout, 0); + col = uiLayoutColumn(row, 0); uiLayoutSetKeepAspect(col, 1); /* add preview */ - uiDefBut(block, BUT_EXTRA, 0, "", 0, 0, UI_UNIT_X*6, UI_UNIT_Y*6, pid, 0.0, 0.0, 0, 0, ""); + uiDefBut(block, BUT_EXTRA, 0, "", 0, 0, UI_UNIT_X * 6, UI_UNIT_Y * 6, pid, 0.0, 0.0, 0, 0, ""); uiBlockSetDrawExtraFunc(block, ED_preview_draw, pparent, slot); uiBlockSetHandleFunc(block, do_preview_buttons, NULL); /* add buttons */ if (pid && show_buttons) { if (GS(pid->name) == ID_MA || (pparent && GS(pparent->name) == ID_MA)) { - if (GS(pid->name) == ID_MA) ma= (Material*)pid; - else ma= (Material*)pparent; + if (GS(pid->name) == ID_MA) ma = (Material *)pid; + else ma = (Material *)pparent; /* Create RNA Pointer */ RNA_pointer_create(id, &RNA_Material, ma, &material_ptr); @@ -1220,17 +1220,17 @@ void uiTemplatePreview(uiLayout *layout, ID *id, int show_buttons, ID *parent, M RNA_pointer_create(id, &RNA_Texture, tex, &texture_ptr); uiLayoutRow(layout, 1); - uiDefButS(block, ROW, B_MATPRV, IFACE_("Texture"), 0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_TEXTURE, 0, 0, ""); + uiDefButS(block, ROW, B_MATPRV, IFACE_("Texture"), 0, 0, UI_UNIT_X * 10, UI_UNIT_Y, pr_texture, 10, TEX_PR_TEXTURE, 0, 0, ""); if (GS(parent->name) == ID_MA) - uiDefButS(block, ROW, B_MATPRV, IFACE_("Material"), 0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_OTHER, 0, 0, ""); + uiDefButS(block, ROW, B_MATPRV, IFACE_("Material"), 0, 0, UI_UNIT_X * 10, UI_UNIT_Y, pr_texture, 10, TEX_PR_OTHER, 0, 0, ""); else if (GS(parent->name) == ID_LA) - uiDefButS(block, ROW, B_MATPRV, IFACE_("Lamp"), 0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_OTHER, 0, 0, ""); + uiDefButS(block, ROW, B_MATPRV, IFACE_("Lamp"), 0, 0, UI_UNIT_X * 10, UI_UNIT_Y, pr_texture, 10, TEX_PR_OTHER, 0, 0, ""); else if (GS(parent->name) == ID_WO) - uiDefButS(block, ROW, B_MATPRV, IFACE_("World"), 0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_OTHER, 0, 0, ""); - uiDefButS(block, ROW, B_MATPRV, IFACE_("Both"), 0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_BOTH, 0, 0, ""); + uiDefButS(block, ROW, B_MATPRV, IFACE_("World"), 0, 0, UI_UNIT_X * 10, UI_UNIT_Y, pr_texture, 10, TEX_PR_OTHER, 0, 0, ""); + uiDefButS(block, ROW, B_MATPRV, IFACE_("Both"), 0, 0, UI_UNIT_X * 10, UI_UNIT_Y, pr_texture, 10, TEX_PR_BOTH, 0, 0, ""); /* Alpha button for texture preview */ - if (*pr_texture!=TEX_PR_OTHER) { + if (*pr_texture != TEX_PR_OTHER) { row = uiLayoutRow(layout, 0); uiItemR(row, &texture_ptr, "use_preview_alpha", 0, NULL, ICON_NONE); } @@ -1248,7 +1248,7 @@ typedef struct RNAUpdateCb { static void rna_update_cb(bContext *C, void *arg_cb, void *UNUSED(arg)) { - RNAUpdateCb *cb= (RNAUpdateCb*)arg_cb; + RNAUpdateCb *cb = (RNAUpdateCb *)arg_cb; /* we call update here on the pointer property, this way the * owner of the curve mapping can still define it's own update @@ -1260,12 +1260,12 @@ static void rna_update_cb(bContext *C, void *arg_cb, void *UNUSED(arg)) static void colorband_add_cb(bContext *C, void *cb_v, void *coba_v) { - ColorBand *coba= coba_v; - float pos= 0.5f; + ColorBand *coba = coba_v; + float pos = 0.5f; if (coba->tot > 1) { - if (coba->cur > 0) pos= (coba->data[coba->cur-1].pos + coba->data[coba->cur].pos) * 0.5f; - else pos= (coba->data[coba->cur+1].pos + coba->data[coba->cur].pos) * 0.5f; + if (coba->cur > 0) pos = (coba->data[coba->cur - 1].pos + coba->data[coba->cur].pos) * 0.5f; + else pos = (coba->data[coba->cur + 1].pos + coba->data[coba->cur].pos) * 0.5f; } if (colorband_element_add(coba, pos)) { @@ -1276,7 +1276,7 @@ static void colorband_add_cb(bContext *C, void *cb_v, void *coba_v) static void colorband_del_cb(bContext *C, void *cb_v, void *coba_v) { - ColorBand *coba= coba_v; + ColorBand *coba = coba_v; if (colorband_element_remove(coba, coba->cur)) { ED_undo_push(C, "Delete colorband"); @@ -1288,19 +1288,19 @@ static void colorband_flip_cb(bContext *C, void *cb_v, void *coba_v) { CBData data_tmp[MAXCOLORBAND]; - ColorBand *coba= coba_v; + ColorBand *coba = coba_v; int a; - for (a=0; atot; a++) { - data_tmp[a]= coba->data[coba->tot - (a + 1)]; + for (a = 0; a < coba->tot; a++) { + data_tmp[a] = coba->data[coba->tot - (a + 1)]; } - for (a=0; atot; a++) { + for (a = 0; a < coba->tot; a++) { data_tmp[a].pos = 1.0f - data_tmp[a].pos; - coba->data[a]= data_tmp[a]; + coba->data[a] = data_tmp[a]; } /* may as well flip the cur*/ - coba->cur= coba->tot - (coba->cur + 1); + coba->cur = coba->tot - (coba->cur + 1); ED_undo_push(C, "Flip colorband"); @@ -1309,8 +1309,8 @@ static void colorband_flip_cb(bContext *C, void *cb_v, void *coba_v) static void colorband_update_cb(bContext *UNUSED(C), void *bt_v, void *coba_v) { - uiBut *bt= bt_v; - ColorBand *coba= coba_v; + uiBut *bt = bt_v; + ColorBand *coba = coba_v; /* sneaky update here, we need to sort the colorband points to be in order, * however the RNA pointer then is wrong, so we update it */ @@ -1323,46 +1323,46 @@ static void colorband_buttons_large(uiLayout *layout, uiBlock *block, ColorBand { uiBut *bt; uiLayout *row; - const int line1_y= yoffs + 65 + UI_UNIT_Y + 2; /* 2 for some space between the buttons */ - const int line2_y= yoffs + 65; + const int line1_y = yoffs + 65 + UI_UNIT_Y + 2; /* 2 for some space between the buttons */ + const int line2_y = yoffs + 65; - if (coba==NULL) return; + if (coba == NULL) return; - bt= uiDefBut(block, BUT, 0, IFACE_("Add"), 0+xoffs,line1_y,40,UI_UNIT_Y, NULL, 0, 0, 0, 0, - TIP_("Add a new color stop to the colorband")); + bt = uiDefBut(block, BUT, 0, IFACE_("Add"), 0 + xoffs, line1_y, 40, UI_UNIT_Y, NULL, 0, 0, 0, 0, + TIP_("Add a new color stop to the colorband")); uiButSetNFunc(bt, colorband_add_cb, MEM_dupallocN(cb), coba); - bt= uiDefBut(block, BUT, 0, IFACE_("Delete"), 45+xoffs,line1_y,45,UI_UNIT_Y, NULL, 0, 0, 0, 0, - TIP_("Delete the active position")); + bt = uiDefBut(block, BUT, 0, IFACE_("Delete"), 45 + xoffs, line1_y, 45, UI_UNIT_Y, NULL, 0, 0, 0, 0, + TIP_("Delete the active position")); uiButSetNFunc(bt, colorband_del_cb, MEM_dupallocN(cb), coba); /* XXX, todo for later - convert to operator - campbell */ - bt= uiDefBut(block, BUT, 0, "F", 95+xoffs,line1_y,20,UI_UNIT_Y, NULL, 0, 0, 0, 0, TIP_("Flip colorband")); + bt = uiDefBut(block, BUT, 0, "F", 95 + xoffs, line1_y, 20, UI_UNIT_Y, NULL, 0, 0, 0, 0, TIP_("Flip colorband")); uiButSetNFunc(bt, colorband_flip_cb, MEM_dupallocN(cb), coba); - uiDefButS(block, NUM, 0, "", 120+xoffs,line1_y,80, UI_UNIT_Y, &coba->cur, 0.0, (float)(MAX2(0, coba->tot-1)), 0, 0, TIP_("Choose active color stop")); + uiDefButS(block, NUM, 0, "", 120 + xoffs, line1_y, 80, UI_UNIT_Y, &coba->cur, 0.0, (float)(MAX2(0, coba->tot - 1)), 0, 0, TIP_("Choose active color stop")); - bt= uiDefButS(block, MENU, 0, IFACE_("Interpolation %t|Ease %x1|Cardinal %x3|Linear %x0|B-Spline %x2|Constant %x4"), - 210+xoffs, line1_y, 90, UI_UNIT_Y, &coba->ipotype, 0.0, 0.0, 0, 0, TIP_("Set interpolation between color stops")); + bt = uiDefButS(block, MENU, 0, IFACE_("Interpolation %t|Ease %x1|Cardinal %x3|Linear %x0|B-Spline %x2|Constant %x4"), + 210 + xoffs, line1_y, 90, UI_UNIT_Y, &coba->ipotype, 0.0, 0.0, 0, 0, TIP_("Set interpolation between color stops")); uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL); uiBlockEndAlign(block); - bt= uiDefBut(block, BUT_COLORBAND, 0, "", xoffs,line2_y,300,UI_UNIT_Y, coba, 0, 0, 0, 0, ""); + bt = uiDefBut(block, BUT_COLORBAND, 0, "", xoffs, line2_y, 300, UI_UNIT_Y, coba, 0, 0, 0, 0, ""); uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL); if (coba->tot) { - CBData *cbd= coba->data + coba->cur; + CBData *cbd = coba->data + coba->cur; /* better to use rna so we can animate them */ PointerRNA ptr; RNA_pointer_create(cb->ptr.id.data, &RNA_ColorRampElement, cbd, &ptr); - row= uiLayoutRow(layout, 0); + row = uiLayoutRow(layout, 0); uiItemR(row, &ptr, "position", 0, "Pos", ICON_NONE); - bt= block->buttons.last; + bt = block->buttons.last; uiButSetFunc(bt, colorband_update_cb, bt, coba); uiItemR(row, &ptr, "color", 0, "", ICON_NONE); @@ -1373,33 +1373,33 @@ static void colorband_buttons_large(uiLayout *layout, uiBlock *block, ColorBand static void colorband_buttons_small(uiLayout *layout, uiBlock *block, ColorBand *coba, rctf *butr, RNAUpdateCb *cb) { uiBut *bt; - float unit= (butr->xmax-butr->xmin)/14.0f; - float xs= butr->xmin; + float unit = (butr->xmax - butr->xmin) / 14.0f; + float xs = butr->xmin; uiBlockBeginAlign(block); - bt= uiDefBut(block, BUT, 0, IFACE_("Add"), xs,butr->ymin+UI_UNIT_Y,2.0f*unit,UI_UNIT_Y, NULL, 0, 0, 0, 0, - TIP_("Add a new color stop to the colorband")); + bt = uiDefBut(block, BUT, 0, IFACE_("Add"), xs, butr->ymin + UI_UNIT_Y, 2.0f * unit, UI_UNIT_Y, NULL, 0, 0, 0, 0, + TIP_("Add a new color stop to the colorband")); uiButSetNFunc(bt, colorband_add_cb, MEM_dupallocN(cb), coba); - bt= uiDefBut(block, BUT, 0, IFACE_("Delete"), xs+2.0f*unit,butr->ymin+UI_UNIT_Y,1.5f*unit,UI_UNIT_Y, NULL, 0, 0, 0, 0, - TIP_("Delete the active position")); + bt = uiDefBut(block, BUT, 0, IFACE_("Delete"), xs + 2.0f * unit, butr->ymin + UI_UNIT_Y, 1.5f * unit, UI_UNIT_Y, NULL, 0, 0, 0, 0, + TIP_("Delete the active position")); uiButSetNFunc(bt, colorband_del_cb, MEM_dupallocN(cb), coba); - bt= uiDefBut(block, BUT, 0, "F", xs+3.5f*unit,butr->ymin+UI_UNIT_Y,0.5f*unit,UI_UNIT_Y, NULL, 0, 0, 0, 0, TIP_("Flip the color ramp")); + bt = uiDefBut(block, BUT, 0, "F", xs + 3.5f * unit, butr->ymin + UI_UNIT_Y, 0.5f * unit, UI_UNIT_Y, NULL, 0, 0, 0, 0, TIP_("Flip the color ramp")); uiButSetNFunc(bt, colorband_flip_cb, MEM_dupallocN(cb), coba); uiBlockEndAlign(block); if (coba->tot) { - CBData *cbd= coba->data + coba->cur; + CBData *cbd = coba->data + coba->cur; PointerRNA ptr; RNA_pointer_create(cb->ptr.id.data, &RNA_ColorRampElement, cbd, &ptr); uiItemR(layout, &ptr, "color", 0, "", ICON_NONE); } - bt= uiDefButS(block, MENU, 0, TIP_("Interpolation %t|Ease %x1|Cardinal %x3|Linear %x0|B-Spline %x2|Constant %x4"), - xs+10.0f*unit, butr->ymin+UI_UNIT_Y, unit*4, UI_UNIT_Y, &coba->ipotype, 0.0, 0.0, 0, 0, - TIP_("Set interpolation between color stops")); + bt = uiDefButS(block, MENU, 0, TIP_("Interpolation %t|Ease %x1|Cardinal %x3|Linear %x0|B-Spline %x2|Constant %x4"), + xs + 10.0f * unit, butr->ymin + UI_UNIT_Y, unit * 4, UI_UNIT_Y, &coba->ipotype, 0.0, 0.0, 0, 0, + TIP_("Set interpolation between color stops")); uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL); - bt= uiDefBut(block, BUT_COLORBAND, 0, "", xs,butr->ymin,butr->xmax-butr->xmin,UI_UNIT_Y, coba, 0, 0, 0, 0, ""); + bt = uiDefBut(block, BUT_COLORBAND, 0, "", xs, butr->ymin, butr->xmax - butr->xmin, UI_UNIT_Y, coba, 0, 0, 0, 0, ""); uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL); uiBlockEndAlign(block); @@ -1415,7 +1415,7 @@ static void colorband_buttons_layout(uiLayout *layout, uiBlock *block, ColorBand void uiTemplateColorRamp(uiLayout *layout, PointerRNA *ptr, const char *propname, int expand) { - PropertyRNA *prop= RNA_struct_find_property(ptr, propname); + PropertyRNA *prop = RNA_struct_find_property(ptr, propname); PointerRNA cptr; RNAUpdateCb *cb; uiBlock *block; @@ -1424,18 +1424,18 @@ void uiTemplateColorRamp(uiLayout *layout, PointerRNA *ptr, const char *propname if (!prop || RNA_property_type(prop) != PROP_POINTER) return; - cptr= RNA_property_pointer_get(ptr, prop); + cptr = RNA_property_pointer_get(ptr, prop); if (!cptr.data || !RNA_struct_is_a(cptr.type, &RNA_ColorRamp)) return; - cb= MEM_callocN(sizeof(RNAUpdateCb), "RNAUpdateCb"); - cb->ptr= *ptr; - cb->prop= prop; + cb = MEM_callocN(sizeof(RNAUpdateCb), "RNAUpdateCb"); + cb->ptr = *ptr; + cb->prop = prop; rect.xmin = 0; rect.xmax = 200; rect.ymin = 0; rect.ymax = 190; - block= uiLayoutAbsoluteBlock(layout); + block = uiLayoutAbsoluteBlock(layout); colorband_buttons_layout(layout, block, cptr.data, &rect, !expand, cb); MEM_freeN(cb); @@ -1445,7 +1445,7 @@ void uiTemplateColorRamp(uiLayout *layout, PointerRNA *ptr, const char *propname void uiTemplateHistogram(uiLayout *layout, PointerRNA *ptr, const char *propname) { - PropertyRNA *prop= RNA_struct_find_property(ptr, propname); + PropertyRNA *prop = RNA_struct_find_property(ptr, propname); PointerRNA cptr; RNAUpdateCb *cb; uiBlock *block; @@ -1456,25 +1456,25 @@ void uiTemplateHistogram(uiLayout *layout, PointerRNA *ptr, const char *propname if (!prop || RNA_property_type(prop) != PROP_POINTER) return; - cptr= RNA_property_pointer_get(ptr, prop); + cptr = RNA_property_pointer_get(ptr, prop); if (!cptr.data || !RNA_struct_is_a(cptr.type, &RNA_Histogram)) return; - cb= MEM_callocN(sizeof(RNAUpdateCb), "RNAUpdateCb"); - cb->ptr= *ptr; - cb->prop= prop; + cb = MEM_callocN(sizeof(RNAUpdateCb), "RNAUpdateCb"); + cb->ptr = *ptr; + cb->prop = prop; rect.xmin = 0; rect.xmax = 200; rect.ymin = 0; rect.ymax = 190; - block= uiLayoutAbsoluteBlock(layout); + block = uiLayoutAbsoluteBlock(layout); //colorband_buttons_layout(layout, block, cptr.data, &rect, !expand, cb); hist = (Histogram *)cptr.data; - hist->height= (hist->height<=UI_UNIT_Y)?UI_UNIT_Y:hist->height; + hist->height = (hist->height <= UI_UNIT_Y) ? UI_UNIT_Y : hist->height; - bt= uiDefBut(block, HISTOGRAM, 0, "", rect.xmin, rect.ymin, rect.xmax-rect.xmin, hist->height, hist, 0, 0, 0, 0, ""); + bt = uiDefBut(block, HISTOGRAM, 0, "", rect.xmin, rect.ymin, rect.xmax - rect.xmin, hist->height, hist, 0, 0, 0, 0, ""); uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL); MEM_freeN(cb); @@ -1484,7 +1484,7 @@ void uiTemplateHistogram(uiLayout *layout, PointerRNA *ptr, const char *propname void uiTemplateWaveform(uiLayout *layout, PointerRNA *ptr, const char *propname) { - PropertyRNA *prop= RNA_struct_find_property(ptr, propname); + PropertyRNA *prop = RNA_struct_find_property(ptr, propname); PointerRNA cptr; RNAUpdateCb *cb; uiBlock *block; @@ -1495,23 +1495,23 @@ void uiTemplateWaveform(uiLayout *layout, PointerRNA *ptr, const char *propname) if (!prop || RNA_property_type(prop) != PROP_POINTER) return; - cptr= RNA_property_pointer_get(ptr, prop); + cptr = RNA_property_pointer_get(ptr, prop); if (!cptr.data || !RNA_struct_is_a(cptr.type, &RNA_Scopes)) return; scopes = (Scopes *)cptr.data; - cb= MEM_callocN(sizeof(RNAUpdateCb), "RNAUpdateCb"); - cb->ptr= *ptr; - cb->prop= prop; + cb = MEM_callocN(sizeof(RNAUpdateCb), "RNAUpdateCb"); + cb->ptr = *ptr; + cb->prop = prop; rect.xmin = 0; rect.xmax = 200; rect.ymin = 0; rect.ymax = 190; - block= uiLayoutAbsoluteBlock(layout); + block = uiLayoutAbsoluteBlock(layout); - scopes->wavefrm_height= (scopes->wavefrm_height<=UI_UNIT_Y)?UI_UNIT_Y:scopes->wavefrm_height; + scopes->wavefrm_height = (scopes->wavefrm_height <= UI_UNIT_Y) ? UI_UNIT_Y : scopes->wavefrm_height; - bt= uiDefBut(block, WAVEFORM, 0, "", rect.xmin, rect.ymin, rect.xmax-rect.xmin, scopes->wavefrm_height, scopes, 0, 0, 0, 0, ""); + bt = uiDefBut(block, WAVEFORM, 0, "", rect.xmin, rect.ymin, rect.xmax - rect.xmin, scopes->wavefrm_height, scopes, 0, 0, 0, 0, ""); (void)bt; // UNUSED MEM_freeN(cb); @@ -1521,7 +1521,7 @@ void uiTemplateWaveform(uiLayout *layout, PointerRNA *ptr, const char *propname) void uiTemplateVectorscope(uiLayout *layout, PointerRNA *ptr, const char *propname) { - PropertyRNA *prop= RNA_struct_find_property(ptr, propname); + PropertyRNA *prop = RNA_struct_find_property(ptr, propname); PointerRNA cptr; RNAUpdateCb *cb; uiBlock *block; @@ -1532,23 +1532,23 @@ void uiTemplateVectorscope(uiLayout *layout, PointerRNA *ptr, const char *propna if (!prop || RNA_property_type(prop) != PROP_POINTER) return; - cptr= RNA_property_pointer_get(ptr, prop); + cptr = RNA_property_pointer_get(ptr, prop); if (!cptr.data || !RNA_struct_is_a(cptr.type, &RNA_Scopes)) return; scopes = (Scopes *)cptr.data; - cb= MEM_callocN(sizeof(RNAUpdateCb), "RNAUpdateCb"); - cb->ptr= *ptr; - cb->prop= prop; + cb = MEM_callocN(sizeof(RNAUpdateCb), "RNAUpdateCb"); + cb->ptr = *ptr; + cb->prop = prop; rect.xmin = 0; rect.xmax = 200; rect.ymin = 0; rect.ymax = 190; - block= uiLayoutAbsoluteBlock(layout); + block = uiLayoutAbsoluteBlock(layout); - scopes->vecscope_height= (scopes->vecscope_height<=UI_UNIT_Y)?UI_UNIT_Y:scopes->vecscope_height; + scopes->vecscope_height = (scopes->vecscope_height <= UI_UNIT_Y) ? UI_UNIT_Y : scopes->vecscope_height; - bt= uiDefBut(block, VECTORSCOPE, 0, "", rect.xmin, rect.ymin, rect.xmax-rect.xmin, scopes->vecscope_height, scopes, 0, 0, 0, 0, ""); + bt = uiDefBut(block, VECTORSCOPE, 0, "", rect.xmin, rect.ymin, rect.xmax - rect.xmin, scopes->vecscope_height, scopes, 0, 0, 0, 0, ""); uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL); MEM_freeN(cb); @@ -1563,13 +1563,13 @@ static void curvemap_buttons_zoom_in(bContext *C, void *cumap_v, void *UNUSED(ar float d; /* we allow 20 times zoom */ - if ( (cumap->curr.xmax - cumap->curr.xmin) > 0.04f*(cumap->clipr.xmax - cumap->clipr.xmin) ) { - d= 0.1154f*(cumap->curr.xmax - cumap->curr.xmin); - cumap->curr.xmin+= d; - cumap->curr.xmax-= d; - d= 0.1154f*(cumap->curr.ymax - cumap->curr.ymin); - cumap->curr.ymin+= d; - cumap->curr.ymax-= d; + if ( (cumap->curr.xmax - cumap->curr.xmin) > 0.04f * (cumap->clipr.xmax - cumap->clipr.xmin) ) { + d = 0.1154f * (cumap->curr.xmax - cumap->curr.xmin); + cumap->curr.xmin += d; + cumap->curr.xmax -= d; + d = 0.1154f * (cumap->curr.ymax - cumap->curr.ymin); + cumap->curr.ymin += d; + cumap->curr.ymax -= d; } ED_region_tag_redraw(CTX_wm_region(C)); @@ -1581,32 +1581,32 @@ static void curvemap_buttons_zoom_out(bContext *C, void *cumap_v, void *UNUSED(u float d, d1; /* we allow 20 times zoom, but don't view outside clip */ - if ( (cumap->curr.xmax - cumap->curr.xmin) < 20.0f*(cumap->clipr.xmax - cumap->clipr.xmin) ) { - d= d1= 0.15f*(cumap->curr.xmax - cumap->curr.xmin); + if ( (cumap->curr.xmax - cumap->curr.xmin) < 20.0f * (cumap->clipr.xmax - cumap->clipr.xmin) ) { + d = d1 = 0.15f * (cumap->curr.xmax - cumap->curr.xmin); if (cumap->flag & CUMA_DO_CLIP) - if (cumap->curr.xmin-d < cumap->clipr.xmin) - d1= cumap->curr.xmin - cumap->clipr.xmin; - cumap->curr.xmin-= d1; + if (cumap->curr.xmin - d < cumap->clipr.xmin) + d1 = cumap->curr.xmin - cumap->clipr.xmin; + cumap->curr.xmin -= d1; - d1= d; + d1 = d; if (cumap->flag & CUMA_DO_CLIP) - if (cumap->curr.xmax+d > cumap->clipr.xmax) - d1= -cumap->curr.xmax + cumap->clipr.xmax; - cumap->curr.xmax+= d1; + if (cumap->curr.xmax + d > cumap->clipr.xmax) + d1 = -cumap->curr.xmax + cumap->clipr.xmax; + cumap->curr.xmax += d1; - d= d1= 0.15f*(cumap->curr.ymax - cumap->curr.ymin); + d = d1 = 0.15f * (cumap->curr.ymax - cumap->curr.ymin); if (cumap->flag & CUMA_DO_CLIP) - if (cumap->curr.ymin-d < cumap->clipr.ymin) - d1= cumap->curr.ymin - cumap->clipr.ymin; - cumap->curr.ymin-= d1; + if (cumap->curr.ymin - d < cumap->clipr.ymin) + d1 = cumap->curr.ymin - cumap->clipr.ymin; + cumap->curr.ymin -= d1; - d1= d; + d1 = d; if (cumap->flag & CUMA_DO_CLIP) - if (cumap->curr.ymax+d > cumap->clipr.ymax) - d1= -cumap->curr.ymax + cumap->clipr.ymax; - cumap->curr.ymax+= d1; + if (cumap->curr.ymax + d > cumap->clipr.ymax) + d1 = -cumap->curr.ymax + cumap->clipr.ymax; + cumap->curr.ymax += d1; } ED_region_tag_redraw(CTX_wm_region(C)); @@ -1623,7 +1623,7 @@ static void curvemap_buttons_delete(bContext *C, void *cb_v, void *cumap_v) { CurveMapping *cumap = cumap_v; - curvemap_remove(cumap->cm+cumap->cur, SELECT); + curvemap_remove(cumap->cm + cumap->cur, SELECT); curvemapping_changed(cumap, 0); rna_update_cb(C, cb_v, NULL); @@ -1635,22 +1635,22 @@ static uiBlock *curvemap_clipping_func(bContext *C, struct ARegion *ar, void *cu CurveMapping *cumap = cumap_v; uiBlock *block; uiBut *bt; - float width= 8*UI_UNIT_X; + float width = 8 * UI_UNIT_X; block = uiBeginBlock(C, ar, __func__, UI_EMBOSS); /* use this for a fake extra empy space around the buttons */ - uiDefBut(block, LABEL, 0, "", -4, 16, width+8, 6*UI_UNIT_Y, NULL, 0, 0, 0, 0, ""); + uiDefBut(block, LABEL, 0, "", -4, 16, width + 8, 6 * UI_UNIT_Y, NULL, 0, 0, 0, 0, ""); - bt= uiDefButBitI(block, TOG, CUMA_DO_CLIP, 1, "Use Clipping", - 0,5*UI_UNIT_Y,width,UI_UNIT_Y, &cumap->flag, 0.0, 0.0, 10, 0, ""); + bt = uiDefButBitI(block, TOG, CUMA_DO_CLIP, 1, "Use Clipping", + 0, 5 * UI_UNIT_Y, width, UI_UNIT_Y, &cumap->flag, 0.0, 0.0, 10, 0, ""); uiButSetFunc(bt, curvemap_buttons_setclip, cumap, NULL); uiBlockBeginAlign(block); - uiDefButF(block, NUM, 0, IFACE_("Min X "), 0,4*UI_UNIT_Y,width,UI_UNIT_Y, &cumap->clipr.xmin, -100.0, cumap->clipr.xmax, 10, 0, ""); - uiDefButF(block, NUM, 0, IFACE_("Min Y "), 0,3*UI_UNIT_Y,width,UI_UNIT_Y, &cumap->clipr.ymin, -100.0, cumap->clipr.ymax, 10, 0, ""); - uiDefButF(block, NUM, 0, IFACE_("Max X "), 0,2*UI_UNIT_Y,width,UI_UNIT_Y, &cumap->clipr.xmax, cumap->clipr.xmin, 100.0, 10, 0, ""); - uiDefButF(block, NUM, 0, IFACE_("Max Y "), 0,UI_UNIT_Y,width,UI_UNIT_Y, &cumap->clipr.ymax, cumap->clipr.ymin, 100.0, 10, 0, ""); + uiDefButF(block, NUM, 0, IFACE_("Min X "), 0, 4 * UI_UNIT_Y, width, UI_UNIT_Y, &cumap->clipr.xmin, -100.0, cumap->clipr.xmax, 10, 0, ""); + uiDefButF(block, NUM, 0, IFACE_("Min Y "), 0, 3 * UI_UNIT_Y, width, UI_UNIT_Y, &cumap->clipr.ymin, -100.0, cumap->clipr.ymax, 10, 0, ""); + uiDefButF(block, NUM, 0, IFACE_("Max X "), 0, 2 * UI_UNIT_Y, width, UI_UNIT_Y, &cumap->clipr.xmax, cumap->clipr.xmin, 100.0, 10, 0, ""); + uiDefButF(block, NUM, 0, IFACE_("Max Y "), 0, UI_UNIT_Y, width, UI_UNIT_Y, &cumap->clipr.ymax, cumap->clipr.ymin, 100.0, 10, 0, ""); uiBlockSetDirection(block, UI_RIGHT); @@ -1661,17 +1661,17 @@ static uiBlock *curvemap_clipping_func(bContext *C, struct ARegion *ar, void *cu static void curvemap_tools_dofunc(bContext *C, void *cumap_v, int event) { CurveMapping *cumap = cumap_v; - CurveMap *cuma= cumap->cm+cumap->cur; + CurveMap *cuma = cumap->cm + cumap->cur; - switch(event) { + switch (event) { case 0: /* reset */ - curvemap_reset(cuma, &cumap->clipr, cumap->preset, CURVEMAP_SLOPE_POSITIVE); + curvemap_reset(cuma, &cumap->clipr, cumap->preset, CURVEMAP_SLOPE_POSITIVE); curvemapping_changed(cumap, 0); break; case 1: - cumap->curr= cumap->clipr; + cumap->curr = cumap->clipr; break; - case 2: /* set vector */ + case 2: /* set vector */ curvemap_sethandle(cuma, 1); curvemapping_changed(cumap, 0); break; @@ -1694,17 +1694,17 @@ static void curvemap_tools_dofunc(bContext *C, void *cumap_v, int event) static uiBlock *curvemap_tools_func(bContext *C, struct ARegion *ar, void *cumap_v) { uiBlock *block; - short yco= 0, menuwidth=10*UI_UNIT_X; + short yco = 0, menuwidth = 10 * UI_UNIT_X; - block= uiBeginBlock(C, ar, __func__, UI_EMBOSS); + block = uiBeginBlock(C, ar, __func__, UI_EMBOSS); uiBlockSetButmFunc(block, curvemap_tools_dofunc, cumap_v); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, IFACE_("Reset View"), 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 1, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, IFACE_("Vector Handle"), 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 2, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, IFACE_("Auto Handle"), 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 3, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, IFACE_("Extend Horizontal"), 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 4, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, IFACE_("Extend Extrapolated"), 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 5, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, IFACE_("Reset Curve"), 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, IFACE_("Reset View"), 0, yco -= UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 1, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, IFACE_("Vector Handle"), 0, yco -= UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 2, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, IFACE_("Auto Handle"), 0, yco -= UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 3, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, IFACE_("Extend Horizontal"), 0, yco -= UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 4, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, IFACE_("Extend Extrapolated"), 0, yco -= UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 5, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, IFACE_("Reset Curve"), 0, yco -= UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, ""); uiBlockSetDirection(block, UI_RIGHT); uiTextBoundsBlock(block, 50); @@ -1716,15 +1716,15 @@ static uiBlock *curvemap_tools_func(bContext *C, struct ARegion *ar, void *cumap static uiBlock *curvemap_brush_tools_func(bContext *C, struct ARegion *ar, void *cumap_v) { uiBlock *block; - short yco= 0, menuwidth=10*UI_UNIT_X; + short yco = 0, menuwidth = 10 * UI_UNIT_X; - block= uiBeginBlock(C, ar, __func__, UI_EMBOSS); + block = uiBeginBlock(C, ar, __func__, UI_EMBOSS); uiBlockSetButmFunc(block, curvemap_tools_dofunc, cumap_v); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, IFACE_("Reset View"), 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 1, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, IFACE_("Vector Handle"), 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 2, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, IFACE_("Auto Handle"), 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 3, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, IFACE_("Reset Curve"), 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, IFACE_("Reset View"), 0, yco -= UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 1, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, IFACE_("Vector Handle"), 0, yco -= UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 2, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, IFACE_("Auto Handle"), 0, yco -= UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 3, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, IFACE_("Reset Curve"), 0, yco -= UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, ""); uiBlockSetDirection(block, UI_RIGHT); uiTextBoundsBlock(block, 50); @@ -1744,11 +1744,11 @@ static void curvemap_buttons_reset(bContext *C, void *cb_v, void *cumap_v) int a; cumap->preset = CURVE_PRESET_LINE; - for (a=0; acm+a, &cumap->clipr, cumap->preset, CURVEMAP_SLOPE_POSITIVE); + for (a = 0; a < CM_TOT; a++) + curvemap_reset(cumap->cm + a, &cumap->clipr, cumap->preset, CURVEMAP_SLOPE_POSITIVE); - cumap->black[0]=cumap->black[1]=cumap->black[2]= 0.0f; - cumap->white[0]=cumap->white[1]=cumap->white[2]= 1.0f; + cumap->black[0] = cumap->black[1] = cumap->black[2] = 0.0f; + cumap->white[0] = cumap->white[1] = cumap->white[2] = 1.0f; curvemapping_set_black_white(cumap, NULL, NULL); curvemapping_changed(cumap, 0); @@ -1759,106 +1759,106 @@ static void curvemap_buttons_reset(bContext *C, void *cb_v, void *cumap_v) /* still unsure how this call evolves... we use labeltype for defining what curve-channels to show */ static void curvemap_buttons_layout(uiLayout *layout, PointerRNA *ptr, char labeltype, int levels, int brush, RNAUpdateCb *cb) { - CurveMapping *cumap= ptr->data; + CurveMapping *cumap = ptr->data; uiLayout *row, *sub, *split; uiBlock *block; uiBut *bt; - float dx= UI_UNIT_X; + float dx = UI_UNIT_X; int icon, size; - int bg=-1; + int bg = -1; - block= uiLayoutGetBlock(layout); + block = uiLayoutGetBlock(layout); /* curve chooser */ - row= uiLayoutRow(layout, 0); + row = uiLayoutRow(layout, 0); - if (labeltype=='v') { + if (labeltype == 'v') { /* vector */ - sub= uiLayoutRow(row, 1); + sub = uiLayoutRow(row, 1); uiLayoutSetAlignment(sub, UI_LAYOUT_ALIGN_LEFT); if (cumap->cm[0].curve) { - bt= uiDefButI(block, ROW, 0, "X", 0, 0, dx, dx, &cumap->cur, 0.0, 0.0, 0.0, 0.0, ""); + bt = uiDefButI(block, ROW, 0, "X", 0, 0, dx, dx, &cumap->cur, 0.0, 0.0, 0.0, 0.0, ""); uiButSetFunc(bt, curvemap_buttons_redraw, NULL, NULL); } if (cumap->cm[1].curve) { - bt= uiDefButI(block, ROW, 0, "Y", 0, 0, dx, dx, &cumap->cur, 0.0, 1.0, 0.0, 0.0, ""); + bt = uiDefButI(block, ROW, 0, "Y", 0, 0, dx, dx, &cumap->cur, 0.0, 1.0, 0.0, 0.0, ""); uiButSetFunc(bt, curvemap_buttons_redraw, NULL, NULL); } if (cumap->cm[2].curve) { - bt= uiDefButI(block, ROW, 0, "Z", 0, 0, dx, dx, &cumap->cur, 0.0, 2.0, 0.0, 0.0, ""); + bt = uiDefButI(block, ROW, 0, "Z", 0, 0, dx, dx, &cumap->cur, 0.0, 2.0, 0.0, 0.0, ""); uiButSetFunc(bt, curvemap_buttons_redraw, NULL, NULL); } } - else if (labeltype=='c') { + else if (labeltype == 'c') { /* color */ - sub= uiLayoutRow(row, 1); + sub = uiLayoutRow(row, 1); uiLayoutSetAlignment(sub, UI_LAYOUT_ALIGN_LEFT); if (cumap->cm[3].curve) { - bt= uiDefButI(block, ROW, 0, "C", 0, 0, dx, dx, &cumap->cur, 0.0, 3.0, 0.0, 0.0, ""); + bt = uiDefButI(block, ROW, 0, "C", 0, 0, dx, dx, &cumap->cur, 0.0, 3.0, 0.0, 0.0, ""); uiButSetFunc(bt, curvemap_buttons_redraw, NULL, NULL); } if (cumap->cm[0].curve) { - bt= uiDefButI(block, ROW, 0, "R", 0, 0, dx, dx, &cumap->cur, 0.0, 0.0, 0.0, 0.0, ""); + bt = uiDefButI(block, ROW, 0, "R", 0, 0, dx, dx, &cumap->cur, 0.0, 0.0, 0.0, 0.0, ""); uiButSetFunc(bt, curvemap_buttons_redraw, NULL, NULL); } if (cumap->cm[1].curve) { - bt= uiDefButI(block, ROW, 0, "G", 0, 0, dx, dx, &cumap->cur, 0.0, 1.0, 0.0, 0.0, ""); + bt = uiDefButI(block, ROW, 0, "G", 0, 0, dx, dx, &cumap->cur, 0.0, 1.0, 0.0, 0.0, ""); uiButSetFunc(bt, curvemap_buttons_redraw, NULL, NULL); } if (cumap->cm[2].curve) { - bt= uiDefButI(block, ROW, 0, "B", 0, 0, dx, dx, &cumap->cur, 0.0, 2.0, 0.0, 0.0, ""); + bt = uiDefButI(block, ROW, 0, "B", 0, 0, dx, dx, &cumap->cur, 0.0, 2.0, 0.0, 0.0, ""); uiButSetFunc(bt, curvemap_buttons_redraw, NULL, NULL); } } else if (labeltype == 'h') { /* HSV */ - sub= uiLayoutRow(row, 1); + sub = uiLayoutRow(row, 1); uiLayoutSetAlignment(sub, UI_LAYOUT_ALIGN_LEFT); if (cumap->cm[0].curve) { - bt= uiDefButI(block, ROW, 0, "H", 0, 0, dx, dx, &cumap->cur, 0.0, 0.0, 0.0, 0.0, ""); + bt = uiDefButI(block, ROW, 0, "H", 0, 0, dx, dx, &cumap->cur, 0.0, 0.0, 0.0, 0.0, ""); uiButSetFunc(bt, curvemap_buttons_redraw, NULL, NULL); } if (cumap->cm[1].curve) { - bt= uiDefButI(block, ROW, 0, "S", 0, 0, dx, dx, &cumap->cur, 0.0, 1.0, 0.0, 0.0, ""); + bt = uiDefButI(block, ROW, 0, "S", 0, 0, dx, dx, &cumap->cur, 0.0, 1.0, 0.0, 0.0, ""); uiButSetFunc(bt, curvemap_buttons_redraw, NULL, NULL); } if (cumap->cm[2].curve) { - bt= uiDefButI(block, ROW, 0, "V", 0, 0, dx, dx, &cumap->cur, 0.0, 2.0, 0.0, 0.0, ""); + bt = uiDefButI(block, ROW, 0, "V", 0, 0, dx, dx, &cumap->cur, 0.0, 2.0, 0.0, 0.0, ""); uiButSetFunc(bt, curvemap_buttons_redraw, NULL, NULL); } } else uiLayoutSetAlignment(row, UI_LAYOUT_ALIGN_RIGHT); - if (labeltype=='h') + if (labeltype == 'h') bg = UI_GRAD_H; /* operation buttons */ - sub= uiLayoutRow(row, 1); + sub = uiLayoutRow(row, 1); uiBlockSetEmboss(block, UI_EMBOSSN); - bt= uiDefIconBut(block, BUT, 0, ICON_ZOOMIN, 0, 0, dx, dx, NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Zoom in")); + bt = uiDefIconBut(block, BUT, 0, ICON_ZOOMIN, 0, 0, dx, dx, NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Zoom in")); uiButSetFunc(bt, curvemap_buttons_zoom_in, cumap, NULL); - bt= uiDefIconBut(block, BUT, 0, ICON_ZOOMOUT, 0, 0, dx, dx, NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Zoom out")); + bt = uiDefIconBut(block, BUT, 0, ICON_ZOOMOUT, 0, 0, dx, dx, NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Zoom out")); uiButSetFunc(bt, curvemap_buttons_zoom_out, cumap, NULL); if (brush) - bt= uiDefIconBlockBut(block, curvemap_brush_tools_func, cumap, 0, ICON_MODIFIER, 0, 0, dx, dx, TIP_("Tools")); + bt = uiDefIconBlockBut(block, curvemap_brush_tools_func, cumap, 0, ICON_MODIFIER, 0, 0, dx, dx, TIP_("Tools")); else - bt= uiDefIconBlockBut(block, curvemap_tools_func, cumap, 0, ICON_MODIFIER, 0, 0, dx, dx, TIP_("Tools")); + bt = uiDefIconBlockBut(block, curvemap_tools_func, cumap, 0, ICON_MODIFIER, 0, 0, dx, dx, TIP_("Tools")); uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL); - if (cumap->flag & CUMA_DO_CLIP) icon= ICON_CLIPUV_HLT; else icon= ICON_CLIPUV_DEHLT; - bt= uiDefIconBlockBut(block, curvemap_clipping_func, cumap, 0, icon, 0, 0, dx, dx, TIP_("Clipping Options")); + if (cumap->flag & CUMA_DO_CLIP) icon = ICON_CLIPUV_HLT; else icon = ICON_CLIPUV_DEHLT; + bt = uiDefIconBlockBut(block, curvemap_clipping_func, cumap, 0, icon, 0, 0, dx, dx, TIP_("Clipping Options")); uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL); - bt= uiDefIconBut(block, BUT, 0, ICON_X, 0, 0, dx, dx, NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Delete points")); + bt = uiDefIconBut(block, BUT, 0, ICON_X, 0, 0, dx, dx, NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Delete points")); uiButSetNFunc(bt, curvemap_buttons_delete, MEM_dupallocN(cb), cumap); uiBlockSetEmboss(block, UI_EMBOSS); @@ -1866,19 +1866,19 @@ static void curvemap_buttons_layout(uiLayout *layout, PointerRNA *ptr, char labe uiBlockSetNFunc(block, rna_update_cb, MEM_dupallocN(cb), NULL); /* curve itself */ - size= uiLayoutGetWidth(layout); - row= uiLayoutRow(layout, 0); + size = uiLayoutGetWidth(layout); + row = uiLayoutRow(layout, 0); uiDefBut(block, BUT_CURVE, 0, "", 0, 0, size, MIN2(size, 200), cumap, 0.0f, 1.0f, bg, 0, ""); /* black/white levels */ if (levels) { - split= uiLayoutSplit(layout, 0, 0); + split = uiLayoutSplit(layout, 0, 0); uiItemR(uiLayoutColumn(split, 0), ptr, "black_level", UI_ITEM_R_EXPAND, NULL, ICON_NONE); uiItemR(uiLayoutColumn(split, 0), ptr, "white_level", UI_ITEM_R_EXPAND, NULL, ICON_NONE); uiLayoutRow(layout, 0); - bt=uiDefBut(block, BUT, 0, IFACE_("Reset"), 0, 0, UI_UNIT_X*10, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, - TIP_("Reset Black/White point and curves")); + bt = uiDefBut(block, BUT, 0, IFACE_("Reset"), 0, 0, UI_UNIT_X * 10, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, + TIP_("Reset Black/White point and curves")); uiButSetNFunc(bt, curvemap_buttons_reset, MEM_dupallocN(cb), cumap); } @@ -1888,7 +1888,7 @@ static void curvemap_buttons_layout(uiLayout *layout, PointerRNA *ptr, char labe void uiTemplateCurveMapping(uiLayout *layout, PointerRNA *ptr, const char *propname, int type, int levels, int brush) { RNAUpdateCb *cb; - PropertyRNA *prop= RNA_struct_find_property(ptr, propname); + PropertyRNA *prop = RNA_struct_find_property(ptr, propname); PointerRNA cptr; if (!prop) { @@ -1903,13 +1903,13 @@ void uiTemplateCurveMapping(uiLayout *layout, PointerRNA *ptr, const char *propn return; } - cptr= RNA_property_pointer_get(ptr, prop); + cptr = RNA_property_pointer_get(ptr, prop); if (!cptr.data || !RNA_struct_is_a(cptr.type, &RNA_CurveMapping)) return; - cb= MEM_callocN(sizeof(RNAUpdateCb), "RNAUpdateCb"); - cb->ptr= *ptr; - cb->prop= prop; + cb = MEM_callocN(sizeof(RNAUpdateCb), "RNAUpdateCb"); + cb->ptr = *ptr; + cb->prop = prop; curvemap_buttons_layout(layout, &cptr, type, levels, brush, cb); @@ -1918,12 +1918,12 @@ void uiTemplateCurveMapping(uiLayout *layout, PointerRNA *ptr, const char *propn /********************* ColorWheel Template ************************/ -#define WHEEL_SIZE 100 +#define WHEEL_SIZE 100 void uiTemplateColorWheel(uiLayout *layout, PointerRNA *ptr, const char *propname, int value_slider, int lock, int lock_luminosity, int cubic) { - PropertyRNA *prop= RNA_struct_find_property(ptr, propname); - uiBlock *block= uiLayoutGetBlock(layout); + PropertyRNA *prop = RNA_struct_find_property(ptr, propname); + uiBlock *block = uiLayoutGetBlock(layout); uiLayout *col, *row; uiBut *but; float softmin, softmax, step, precision; @@ -1936,9 +1936,9 @@ void uiTemplateColorWheel(uiLayout *layout, PointerRNA *ptr, const char *propnam RNA_property_float_ui_range(ptr, prop, &softmin, &softmax, &step, &precision); col = uiLayoutColumn(layout, 0); - row= uiLayoutRow(col, 1); + row = uiLayoutRow(col, 1); - but = uiDefButR_prop(block, HSVCIRCLE, 0, "", 0, 0, WHEEL_SIZE, WHEEL_SIZE, ptr, prop, -1, 0.0, 0.0, 0, 0, ""); + but = uiDefButR_prop(block, HSVCIRCLE, 0, "", 0, 0, WHEEL_SIZE, WHEEL_SIZE, ptr, prop, -1, 0.0, 0.0, 0, 0, ""); if (lock) { but->flag |= UI_BUT_COLOR_LOCK; @@ -1948,7 +1948,7 @@ void uiTemplateColorWheel(uiLayout *layout, PointerRNA *ptr, const char *propnam float color[4]; /* in case of alpha */ but->flag |= UI_BUT_VEC_SIZE_LOCK; RNA_property_float_get_array(ptr, prop, color); - but->a2= len_v3(color); + but->a2 = len_v3(color); } if (cubic) @@ -1957,7 +1957,7 @@ void uiTemplateColorWheel(uiLayout *layout, PointerRNA *ptr, const char *propnam uiItemS(row); if (value_slider) - uiDefButR_prop(block, HSVCUBE, 0, "", WHEEL_SIZE+6, 0, 14, WHEEL_SIZE, ptr, prop, -1, softmin, softmax, UI_GRAD_V_ALT, 0, ""); + uiDefButR_prop(block, HSVCUBE, 0, "", WHEEL_SIZE + 6, 0, 14, WHEEL_SIZE, ptr, prop, -1, softmin, softmax, UI_GRAD_V_ALT, 0, ""); } /********************* Layer Buttons Template ************************/ @@ -1966,11 +1966,11 @@ static void handle_layer_buttons(bContext *C, void *arg1, void *arg2) { uiBut *but = arg1; int cur = GET_INT_FROM_POINTER(arg2); - wmWindow *win= CTX_wm_window(C); - int i, tot, shift= win->eventstate->shift; + wmWindow *win = CTX_wm_window(C); + int i, tot, shift = win->eventstate->shift; if (!shift) { - tot= RNA_property_array_length(&but->rnapoin, but->rnaprop); + tot = RNA_property_array_length(&but->rnapoin, but->rnaprop); /* Normally clicking only selects one layer */ RNA_property_boolean_set_index(&but->rnapoin, but->rnaprop, cur, TRUE); @@ -1989,15 +1989,15 @@ static void handle_layer_buttons(bContext *C, void *arg1, void *arg2) // the array of layer bitflags void uiTemplateLayers(uiLayout *layout, PointerRNA *ptr, const char *propname, - PointerRNA *used_ptr, const char *used_propname, int active_layer) + PointerRNA *used_ptr, const char *used_propname, int active_layer) { uiLayout *uRow, *uCol; - PropertyRNA *prop, *used_prop= NULL; + PropertyRNA *prop, *used_prop = NULL; int groups, cols, layers; int group, col, layer, row; int cols_per_group = 5; - prop= RNA_struct_find_property(ptr, propname); + prop = RNA_struct_find_property(ptr, propname); if (!prop) { RNA_warning("layers property not found: %s.%s", RNA_struct_identifier(ptr->type), propname); return; @@ -2009,12 +2009,12 @@ void uiTemplateLayers(uiLayout *layout, PointerRNA *ptr, const char *propname, * the 'remainder' is added to this, as it will be ok to have first row slightly wider if need be * - for now, only split into groups if group will have at least 5 items */ - layers= RNA_property_array_length(ptr, prop); - cols= (layers / 2) + (layers % 2); - groups= ((cols / 2) < cols_per_group) ? (1) : (cols / cols_per_group); + layers = RNA_property_array_length(ptr, prop); + cols = (layers / 2) + (layers % 2); + groups = ((cols / 2) < cols_per_group) ? (1) : (cols / cols_per_group); if (used_ptr && used_propname) { - used_prop= RNA_struct_find_property(used_ptr, used_propname); + used_prop = RNA_struct_find_property(used_ptr, used_propname); if (!used_prop) { RNA_warning("used layers property not found: %s.%s", RNA_struct_identifier(ptr->type), used_propname); return; @@ -2026,19 +2026,19 @@ void uiTemplateLayers(uiLayout *layout, PointerRNA *ptr, const char *propname, /* layers are laid out going across rows, with the columns being divided into groups */ - for (group= 0; group < groups; group++) { - uCol= uiLayoutColumn(layout, 1); + for (group = 0; group < groups; group++) { + uCol = uiLayoutColumn(layout, 1); - for (row= 0; row < 2; row++) { + for (row = 0; row < 2; row++) { uiBlock *block; uiBut *but; - uRow= uiLayoutRow(uCol, 1); - block= uiLayoutGetBlock(uRow); - layer= groups*cols_per_group*row + cols_per_group*group; + uRow = uiLayoutRow(uCol, 1); + block = uiLayoutGetBlock(uRow); + layer = groups * cols_per_group * row + cols_per_group * group; /* add layers as toggle buts */ - for (col= 0; (col < cols_per_group) && (layer < layers); col++, layer++) { + for (col = 0; (col < cols_per_group) && (layer < layers); col++, layer++) { int icon = 0; int butlay = 1 << layer; @@ -2047,9 +2047,9 @@ void uiTemplateLayers(uiLayout *layout, PointerRNA *ptr, const char *propname, else if (used_prop && RNA_property_boolean_get_index(used_ptr, used_prop, layer)) icon = ICON_LAYER_USED; - but = uiDefAutoButR(block, ptr, prop, layer, "", icon, 0, 0, UI_UNIT_X/2, UI_UNIT_Y/2); + but = uiDefAutoButR(block, ptr, prop, layer, "", icon, 0, 0, UI_UNIT_X / 2, UI_UNIT_Y / 2); uiButSetFunc(but, handle_layer_buttons, but, SET_INT_IN_POINTER(layer)); - but->type= TOG; + but->type = TOG; } } } @@ -2060,7 +2060,7 @@ void uiTemplateLayers(uiLayout *layout, PointerRNA *ptr, const char *propname, static int list_item_icon_get(bContext *C, PointerRNA *itemptr, int rnaicon, int big) { - ID *id= NULL; + ID *id = NULL; int icon; if (!itemptr->data) @@ -2068,16 +2068,16 @@ static int list_item_icon_get(bContext *C, PointerRNA *itemptr, int rnaicon, int /* try ID, material or texture slot */ if (RNA_struct_is_ID(itemptr->type)) { - id= itemptr->id.data; + id = itemptr->id.data; } else if (RNA_struct_is_a(itemptr->type, &RNA_MaterialSlot)) { - id= RNA_pointer_get(itemptr, "material").data; + id = RNA_pointer_get(itemptr, "material").data; } else if (RNA_struct_is_a(itemptr->type, &RNA_TextureSlot)) { - id= RNA_pointer_get(itemptr, "texture").data; + id = RNA_pointer_get(itemptr, "texture").data; } else if (RNA_struct_is_a(itemptr->type, &RNA_DynamicPaintSurface)) { - DynamicPaintSurface *surface= (DynamicPaintSurface*)itemptr->data; + DynamicPaintSurface *surface = (DynamicPaintSurface *)itemptr->data; if (surface->format == MOD_DPAINT_SURFACE_F_PTEX) return ICON_TEXTURE_SHADED; else if (surface->format == MOD_DPAINT_SURFACE_F_VERTEX) return ICON_OUTLINER_DATA_MESH; @@ -2086,7 +2086,7 @@ static int list_item_icon_get(bContext *C, PointerRNA *itemptr, int rnaicon, int /* get icon from ID */ if (id) { - icon= ui_id_icon_get(C, id, big); + icon = ui_id_icon_get(C, id, big); if (icon) return icon; @@ -2097,30 +2097,30 @@ static int list_item_icon_get(bContext *C, PointerRNA *itemptr, int rnaicon, int static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, PointerRNA *itemptr, int i, int rnaicon, PointerRNA *activeptr, PropertyRNA *activeprop, const char *prop_list_id) { - uiBlock *block= uiLayoutGetBlock(layout); + uiBlock *block = uiLayoutGetBlock(layout); uiBut *but; uiLayout *split, *overlap, *sub, *row; char *namebuf; const char *name; int icon; - overlap= uiLayoutOverlap(layout); + overlap = uiLayoutOverlap(layout); /* list item behind label & other buttons */ - sub= uiLayoutRow(overlap, 0); + sub = uiLayoutRow(overlap, 0); - but = uiDefButR_prop(block, LISTROW, 0, "", 0,0, UI_UNIT_X*10,UI_UNIT_Y, activeptr, activeprop, 0, 0, i, 0, 0, ""); + but = uiDefButR_prop(block, LISTROW, 0, "", 0, 0, UI_UNIT_X * 10, UI_UNIT_Y, activeptr, activeprop, 0, 0, i, 0, 0, ""); uiButSetFlag(but, UI_BUT_NO_TOOLTIP); - sub= uiLayoutRow(overlap, 0); + sub = uiLayoutRow(overlap, 0); /* retrieve icon and name */ - icon= list_item_icon_get(C, itemptr, rnaicon, 0); + icon = list_item_icon_get(C, itemptr, rnaicon, 0); if (icon == ICON_NONE || icon == ICON_DOT) - icon= 0; + icon = 0; - namebuf= RNA_struct_name_get_alloc(itemptr, NULL, 0, NULL); - name= (namebuf)? namebuf: ""; + namebuf = RNA_struct_name_get_alloc(itemptr, NULL, 0, NULL); + name = (namebuf) ? namebuf : ""; /* hardcoded types */ if (itemptr->type == &RNA_MeshTexturePolyLayer || itemptr->type == &RNA_MeshLoopColorLayer) { @@ -2142,19 +2142,19 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe else if (RNA_struct_is_a(itemptr->type, &RNA_MaterialSlot)) { /* provision to draw active node name */ Material *ma, *manode; - Scene *scene= CTX_data_scene(C); - Object *ob= (Object*)ptr->id.data; - int index= (Material**)itemptr->data - ob->mat; + Scene *scene = CTX_data_scene(C); + Object *ob = (Object *)ptr->id.data; + int index = (Material **)itemptr->data - ob->mat; /* default item with material base name */ uiItemL(sub, name, icon); - ma= give_current_material(ob, index+1); + ma = give_current_material(ob, index + 1); if (ma && !scene_use_new_shading_nodes(scene)) { - manode= give_node_material(ma); + manode = give_node_material(ma); if (manode) { char str[MAX_ID_NAME + 12]; - BLI_snprintf(str, sizeof(str), "Node %s", manode->id.name+2); + BLI_snprintf(str, sizeof(str), "Node %s", manode->id.name + 2); uiItemL(sub, str, ui_id_icon_get(C, &manode->id, 1)); } else if (ma->use_nodes) { @@ -2163,28 +2163,28 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe } } else if (itemptr->type == &RNA_ShapeKey) { - Object *ob= (Object*)activeptr->data; - Key *key= (Key*)itemptr->id.data; + Object *ob = (Object *)activeptr->data; + Key *key = (Key *)itemptr->id.data; - split= uiLayoutSplit(sub, 0.66f, 0); + split = uiLayoutSplit(sub, 0.66f, 0); uiItemL(split, name, icon); uiBlockSetEmboss(block, UI_EMBOSSN); - row= uiLayoutRow(split, 1); + row = uiLayoutRow(split, 1); if (i == 0 || (key->type != KEY_RELATIVE)) uiItemL(row, "", ICON_NONE); else uiItemR(row, itemptr, "value", 0, "", ICON_NONE); uiItemR(row, itemptr, "mute", 0, "", 0); if ( (key->flag & KEYBLOCK_MUTE) || - (ob->mode == OB_MODE_EDIT && !((ob->shapeflag & OB_SHAPE_EDIT_MODE) && ob->type == OB_MESH)) ) + (ob->mode == OB_MODE_EDIT && !((ob->shapeflag & OB_SHAPE_EDIT_MODE) && ob->type == OB_MESH)) ) { uiLayoutSetActive(row, 0); } uiBlockSetEmboss(block, UI_EMBOSS); } else if (itemptr->type == &RNA_VertexGroup) { - bDeformGroup *dg= (bDeformGroup *)itemptr->data; + bDeformGroup *dg = (bDeformGroup *)itemptr->data; uiItemL(sub, name, icon); /* RNA does not allow nice lock icons, use lower level buttons */ #if 0 @@ -2196,7 +2196,7 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe #endif } else if (itemptr->type == &RNA_KeyingSetPath) { - KS_Path *ksp = (KS_Path*)itemptr->data; + KS_Path *ksp = (KS_Path *)itemptr->data; /* icon needs to be the type of ID which is currently active */ RNA_enum_icon_from_value(id_type_items, ksp->idtype, &icon); @@ -2208,25 +2208,25 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe char name_final[96]; const char *enum_name; PropertyRNA *prop = RNA_struct_find_property(itemptr, "surface_type"); - DynamicPaintSurface *surface= (DynamicPaintSurface*)itemptr->data; + DynamicPaintSurface *surface = (DynamicPaintSurface *)itemptr->data; RNA_property_enum_name(C, itemptr, prop, RNA_property_enum_get(itemptr, prop), &enum_name); - BLI_snprintf(name_final, sizeof(name_final), "%s (%s)",name,enum_name); + BLI_snprintf(name_final, sizeof(name_final), "%s (%s)", name, enum_name); uiItemL(sub, name_final, icon); if (dynamicPaint_surfaceHasColorPreview(surface)) { uiBlockSetEmboss(block, UI_EMBOSSN); uiDefIconButR(block, OPTION, 0, (surface->flags & MOD_DPAINT_PREVIEW) ? ICON_RESTRICT_VIEW_OFF : ICON_RESTRICT_VIEW_ON, - 0, 0, UI_UNIT_X, UI_UNIT_Y, itemptr, "show_preview", 0, 0, 0, 0, 0, NULL); + 0, 0, UI_UNIT_X, UI_UNIT_Y, itemptr, "show_preview", 0, 0, 0, 0, 0, NULL); uiBlockSetEmboss(block, UI_EMBOSS); } uiDefButR(block, OPTION, 0, "", 0, 0, UI_UNIT_X, UI_UNIT_Y, itemptr, "is_active", i, 0, 0, 0, 0, NULL); } else if (itemptr->type == &RNA_MovieTrackingObject) { - MovieTrackingObject *tracking_object= (MovieTrackingObject*)itemptr->data; + MovieTrackingObject *tracking_object = (MovieTrackingObject *)itemptr->data; - split= uiLayoutSplit(sub, 0.75f, 0); - if (tracking_object->flag&TRACKING_OBJECT_CAMERA) { + split = uiLayoutSplit(sub, 0.75f, 0); + if (tracking_object->flag & TRACKING_OBJECT_CAMERA) { uiItemL(split, name, ICON_CAMERA_DATA); } else { @@ -2263,19 +2263,19 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe * which would obviously produce a sigsev... */ if (itemptr->type) { /* If the special property is set for the item, and it is a collection... */ - PropertyRNA *prop_list= RNA_struct_find_property(itemptr, prop_list_id); + PropertyRNA *prop_list = RNA_struct_find_property(itemptr, prop_list_id); if (prop_list && RNA_property_type(prop_list) == PROP_STRING) { int prop_names_len; char *prop_names = RNA_property_string_get_alloc(itemptr, prop_list, NULL, 0, &prop_names_len); - char *prop_names_end= prop_names + prop_names_len; - char *id= prop_names; + char *prop_names_end = prop_names + prop_names_len; + char *id = prop_names; char *id_next; while (id < prop_names_end) { - if ((id_next= strchr(id, ':'))) *id_next++= '\0'; - else id_next= prop_names_end; + if ((id_next = strchr(id, ':'))) *id_next++ = '\0'; + else id_next = prop_names_end; uiItemR(row, itemptr, id, 0, NULL, 0); - id= id_next; + id = id_next; } MEM_freeN(prop_names); } @@ -2283,7 +2283,7 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe } else - uiItemL(sub, name, icon); /* fails, backdrop LISTROW... */ + uiItemL(sub, name, icon); /* fails, backdrop LISTROW... */ /* free name */ if (namebuf) { @@ -2294,7 +2294,7 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *propname, PointerRNA *activeptr, const char *activepropname, const char *prop_list, int rows, int maxrows, int listtype) { //Scene *scene= CTX_data_scene(C); - PropertyRNA *prop= NULL, *activeprop; + PropertyRNA *prop = NULL, *activeprop; PropertyType type, activetype; StructRNA *ptype; uiLayout *box, *row, *col; @@ -2303,11 +2303,11 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char * Panel *pa; const char *name; char numstr[32]; - int rnaicon=0, icon=0, i= 0, activei= 0, len= 0, items, found, min, max; + int rnaicon = 0, icon = 0, i = 0, activei = 0, len = 0, items, found, min, max; /* validate arguments */ - block= uiLayoutGetBlock(layout); - pa= block->panel; + block = uiLayoutGetBlock(layout); + pa = block->panel; if (!pa) { RNA_warning("Only works inside a panel"); @@ -2318,28 +2318,28 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char * return; if (ptr->data) { - prop= RNA_struct_find_property(ptr, propname); + prop = RNA_struct_find_property(ptr, propname); if (!prop) { RNA_warning("Property not found: %s.%s", RNA_struct_identifier(ptr->type), propname); return; } } - activeprop= RNA_struct_find_property(activeptr, activepropname); + activeprop = RNA_struct_find_property(activeptr, activepropname); if (!activeprop) { RNA_warning("Property not found: %s.%s", RNA_struct_identifier(ptr->type), activepropname); return; } if (prop) { - type= RNA_property_type(prop); + type = RNA_property_type(prop); if (type != PROP_COLLECTION) { RNA_warning("uiExpected collection property"); return; } } - activetype= RNA_property_type(activeprop); + activetype = RNA_property_type(activeprop); if (activetype != PROP_INT) { RNA_warning("Expected integer property"); return; @@ -2347,27 +2347,27 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char * /* get icon */ if (ptr->data && prop) { - ptype= RNA_property_pointer_type(ptr, prop); - rnaicon= RNA_struct_ui_icon(ptype); + ptype = RNA_property_pointer_type(ptr, prop); + rnaicon = RNA_struct_ui_icon(ptype); } /* get active data */ - activei= RNA_property_int_get(activeptr, activeprop); + activei = RNA_property_int_get(activeptr, activeprop); if (listtype == 'i') { - box= uiLayoutListBox(layout, ptr, prop, activeptr, activeprop); - col= uiLayoutColumn(box, 1); - row= uiLayoutRow(col, 0); + box = uiLayoutListBox(layout, ptr, prop, activeptr, activeprop); + col = uiLayoutColumn(box, 1); + row = uiLayoutRow(col, 0); if (ptr->data && prop) { /* create list items */ RNA_PROP_BEGIN(ptr, itemptr, prop) { /* create button */ if (!(i % 9)) - row= uiLayoutRow(col, 0); + row = uiLayoutRow(col, 0); - icon= list_item_icon_get(C, &itemptr, rnaicon, 1); - but = uiDefIconButR_prop(block, LISTROW, 0, icon, 0,0,UI_UNIT_X*10,UI_UNIT_Y, activeptr, activeprop, 0, 0, i, 0, 0, ""); + icon = list_item_icon_get(C, &itemptr, rnaicon, 1); + but = uiDefIconButR_prop(block, LISTROW, 0, icon, 0, 0, UI_UNIT_X * 10, UI_UNIT_Y, activeptr, activeprop, 0, 0, i, 0, 0, ""); uiButSetFlag(but, UI_BUT_NO_TOOLTIP); @@ -2379,18 +2379,18 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char * else if (listtype == 'c') { /* compact layout */ - row= uiLayoutRow(layout, 1); + row = uiLayoutRow(layout, 1); if (ptr->data && prop) { /* create list items */ RNA_PROP_BEGIN(ptr, itemptr, prop) { - found= (activei == i); + found = (activei == i); if (found) { /* create button */ - name= RNA_struct_name_get_alloc(&itemptr, NULL, 0, NULL); - icon= list_item_icon_get(C, &itemptr, rnaicon, 0); - uiItemL(row, (name)? name: "", icon); + name = RNA_struct_name_get_alloc(&itemptr, NULL, 0, NULL); + icon = list_item_icon_get(C, &itemptr, rnaicon, 0); + uiItemL(row, (name) ? name : "", icon); if (name) { MEM_freeN((void *)name); @@ -2408,45 +2408,45 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char * /* next/prev button */ BLI_snprintf(numstr, sizeof(numstr), "%d :", i); - but = uiDefIconTextButR_prop(block, NUM, 0, 0, numstr, 0,0,UI_UNIT_X*5,UI_UNIT_Y, activeptr, activeprop, 0, 0, 0, 0, 0, ""); + but = uiDefIconTextButR_prop(block, NUM, 0, 0, numstr, 0, 0, UI_UNIT_X * 5, UI_UNIT_Y, activeptr, activeprop, 0, 0, 0, 0, 0, ""); if (i == 0) uiButSetFlag(but, UI_BUT_DISABLED); } else { /* default rows */ if (rows == 0) - rows= 5; + rows = 5; if (maxrows == 0) maxrows = 5; if (pa->list_grip_size != 0) - rows= pa->list_grip_size; + rows = pa->list_grip_size; /* layout */ - box= uiLayoutListBox(layout, ptr, prop, activeptr, activeprop); - row= uiLayoutRow(box, 0); + box = uiLayoutListBox(layout, ptr, prop, activeptr, activeprop); + row = uiLayoutRow(box, 0); col = uiLayoutColumn(row, 1); /* init numbers */ RNA_property_int_range(activeptr, activeprop, &min, &max); if (prop) - len= RNA_property_collection_length(ptr, prop); - items= CLAMPIS(len, rows, MAX2(rows, maxrows)); + len = RNA_property_collection_length(ptr, prop); + items = CLAMPIS(len, rows, MAX2(rows, maxrows)); /* if list length changes and active is out of view, scroll to it */ if (pa->list_last_len != len) - if ((activei < pa->list_scroll || activei >= pa->list_scroll+items)) - pa->list_scroll= activei; + if ((activei < pa->list_scroll || activei >= pa->list_scroll + items)) + pa->list_scroll = activei; - pa->list_scroll= MIN2(pa->list_scroll, len-items); - pa->list_scroll= MAX2(pa->list_scroll, 0); - pa->list_size= items; - pa->list_last_len= len; + pa->list_scroll = MIN2(pa->list_scroll, len - items); + pa->list_scroll = MAX2(pa->list_scroll, 0); + pa->list_size = items; + pa->list_last_len = len; if (ptr->data && prop) { /* create list items */ RNA_PROP_BEGIN(ptr, itemptr, prop) { - if (i >= pa->list_scroll && ilist_scroll+items) + if (i >= pa->list_scroll && i < pa->list_scroll + items) list_item_row(C, col, ptr, &itemptr, i, rnaicon, activeptr, activeprop, prop_list); i++; @@ -2455,7 +2455,7 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char * } /* add dummy buttons to fill space */ - while (i < pa->list_scroll+items) { + while (i < pa->list_scroll + items) { if (i >= pa->list_scroll) uiItemL(col, "", ICON_NONE); i++; @@ -2463,8 +2463,8 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char * /* add scrollbar */ if (len > items) { - col= uiLayoutColumn(row, 0); - uiDefButI(block, SCROLL, 0, "", 0,0,UI_UNIT_X*0.75,UI_UNIT_Y*items, &pa->list_scroll, 0, len-items, items, 0, ""); + col = uiLayoutColumn(row, 0); + uiDefButI(block, SCROLL, 0, "", 0, 0, UI_UNIT_X * 0.75, UI_UNIT_Y * items, &pa->list_scroll, 0, len - items, items, 0, ""); } } } @@ -2473,7 +2473,7 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char * static void operator_call_cb(bContext *C, void *UNUSED(arg1), void *arg2) { - wmOperatorType *ot= arg2; + wmOperatorType *ot = arg2; if (ot) WM_operator_name_call(C, ot->idname, WM_OP_INVOKE_DEFAULT, NULL); @@ -2481,29 +2481,29 @@ static void operator_call_cb(bContext *C, void *UNUSED(arg1), void *arg2) static void operator_search_cb(const bContext *C, void *UNUSED(arg), const char *str, uiSearchItems *items) { - GHashIterator *iter= WM_operatortype_iter(); + GHashIterator *iter = WM_operatortype_iter(); - for ( ; !BLI_ghashIterator_isDone(iter); BLI_ghashIterator_step(iter)) { - wmOperatorType *ot= BLI_ghashIterator_getValue(iter); + for (; !BLI_ghashIterator_isDone(iter); BLI_ghashIterator_step(iter)) { + wmOperatorType *ot = BLI_ghashIterator_getValue(iter); if (BLI_strcasestr(ot->name, str)) { - if (WM_operator_poll((bContext*)C, ot)) { + if (WM_operator_poll((bContext *)C, ot)) { char name[256]; - int len= strlen(ot->name); + int len = strlen(ot->name); /* display name for menu, can hold hotkey */ BLI_strncpy(name, ot->name, sizeof(name)); /* check for hotkey */ - if (len < sizeof(name)-6) { + if (len < sizeof(name) - 6) { if (WM_key_event_operator_string(C, ot->idname, WM_OP_EXEC_DEFAULT, NULL, TRUE, - &name[len+1], sizeof(name)-len-1)) + &name[len + 1], sizeof(name) - len - 1)) { - name[len]= '|'; + name[len] = '|'; } } - if (0==uiSearchItemAdd(items, name, ot, 0)) + if (0 == uiSearchItemAdd(items, name, ot, 0)) break; } } @@ -2515,29 +2515,29 @@ void uiTemplateOperatorSearch(uiLayout *layout) { uiBlock *block; uiBut *but; - static char search[256]= ""; + static char search[256] = ""; - block= uiLayoutGetBlock(layout); + block = uiLayoutGetBlock(layout); uiBlockSetCurLayout(block, layout); - but = uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 0, 0, UI_UNIT_X*6, UI_UNIT_Y, 0, 0, ""); + but = uiDefSearchBut(block, search, 0, ICON_VIEWZOOM, sizeof(search), 0, 0, UI_UNIT_X * 6, UI_UNIT_Y, 0, 0, ""); uiButSetSearchFunc(but, operator_search_cb, NULL, operator_call_cb, NULL); } /************************* Running Jobs Template **************************/ -#define B_STOPRENDER 1 -#define B_STOPCAST 2 -#define B_STOPANIM 3 -#define B_STOPCOMPO 4 -#define B_STOPSEQ 5 -#define B_STOPCLIP 6 +#define B_STOPRENDER 1 +#define B_STOPCAST 2 +#define B_STOPANIM 3 +#define B_STOPCOMPO 4 +#define B_STOPSEQ 5 +#define B_STOPCLIP 6 static void do_running_jobs(bContext *C, void *UNUSED(arg), int event) { - switch(event) { + switch (event) { case B_STOPRENDER: - G.afbreek= 1; + G.afbreek = 1; break; case B_STOPCAST: WM_jobs_stop(CTX_wm_manager(C), CTX_wm_screen(C), NULL); @@ -2559,62 +2559,62 @@ static void do_running_jobs(bContext *C, void *UNUSED(arg), int event) void uiTemplateRunningJobs(uiLayout *layout, bContext *C) { - bScreen *screen= CTX_wm_screen(C); - wmWindowManager *wm= CTX_wm_manager(C); - ScrArea *sa= CTX_wm_area(C); + bScreen *screen = CTX_wm_screen(C); + wmWindowManager *wm = CTX_wm_manager(C); + ScrArea *sa = CTX_wm_area(C); uiBlock *block; - void *owner= NULL; + void *owner = NULL; int handle_event; - block= uiLayoutGetBlock(layout); + block = uiLayoutGetBlock(layout); uiBlockSetCurLayout(block, layout); uiBlockSetHandleFunc(block, do_running_jobs, NULL); - if (sa->spacetype==SPACE_NODE) { + if (sa->spacetype == SPACE_NODE) { if (WM_jobs_test(wm, sa)) - owner = sa; - handle_event= B_STOPCOMPO; + owner = sa; + handle_event = B_STOPCOMPO; } - else if (sa->spacetype==SPACE_SEQ) { + else if (sa->spacetype == SPACE_SEQ) { if (WM_jobs_test(wm, sa)) owner = sa; handle_event = B_STOPSEQ; } - else if (sa->spacetype==SPACE_CLIP) { + else if (sa->spacetype == SPACE_CLIP) { if (WM_jobs_test(wm, sa)) - owner = sa; - handle_event= B_STOPCLIP; + owner = sa; + handle_event = B_STOPCLIP; } else { Scene *scene; /* another scene can be rendering too, for example via compositor */ - for (scene= CTX_data_main(C)->scene.first; scene; scene= scene->id.next) + for (scene = CTX_data_main(C)->scene.first; scene; scene = scene->id.next) if (WM_jobs_test(wm, scene)) break; owner = scene; - handle_event= B_STOPRENDER; + handle_event = B_STOPRENDER; } if (owner) { uiLayout *ui_abs; - ui_abs= uiLayoutAbsolute(layout, 0); + ui_abs = uiLayoutAbsolute(layout, 0); (void)ui_abs; // UNUSED uiDefIconBut(block, BUT, handle_event, ICON_PANEL_CLOSE, - 0, UI_UNIT_Y*0.1, UI_UNIT_X*0.8, UI_UNIT_Y*0.8, NULL, 0.0f, 0.0f, 0, 0, TIP_("Stop this job")); + 0, UI_UNIT_Y * 0.1, UI_UNIT_X * 0.8, UI_UNIT_Y * 0.8, NULL, 0.0f, 0.0f, 0, 0, TIP_("Stop this job")); uiDefBut(block, PROGRESSBAR, 0, WM_jobs_name(wm, owner), - UI_UNIT_X, 0, 100, UI_UNIT_Y, NULL, 0.0f, 0.0f, WM_jobs_progress(wm, owner), 0, TIP_("Progress")); + UI_UNIT_X, 0, 100, UI_UNIT_Y, NULL, 0.0f, 0.0f, WM_jobs_progress(wm, owner), 0, TIP_("Progress")); uiLayoutRow(layout, 0); } if (WM_jobs_test(wm, screen)) - uiDefIconTextBut(block, BUT, B_STOPCAST, ICON_CANCEL, IFACE_("Capture"), 0,0,85,UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, - TIP_("Stop screencast")); + uiDefIconTextBut(block, BUT, B_STOPCAST, ICON_CANCEL, IFACE_("Capture"), 0, 0, 85, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, + TIP_("Stop screencast")); if (screen->animtimer) - uiDefIconTextBut(block, BUT, B_STOPANIM, ICON_CANCEL, TIP_("Anim Player"), 0,0,100,UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, - TIP_("Stop animation playback")); + uiDefIconTextBut(block, BUT, B_STOPANIM, ICON_CANCEL, TIP_("Anim Player"), 0, 0, 100, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, + TIP_("Stop animation playback")); } /************************* Reports for Last Operator Template **************************/ @@ -2622,40 +2622,40 @@ void uiTemplateRunningJobs(uiLayout *layout, bContext *C) void uiTemplateReportsBanner(uiLayout *layout, bContext *C) { ReportList *reports = CTX_wm_reports(C); - Report *report= BKE_reports_last_displayable(reports); + Report *report = BKE_reports_last_displayable(reports); ReportTimerInfo *rti; uiLayout *ui_abs; uiBlock *block; uiBut *but; - uiStyle *style= UI_GetStyle(); + uiStyle *style = UI_GetStyle(); int width; - int icon=0; + int icon = 0; /* if the report display has timed out, don't show */ if (!reports->reporttimer) return; - rti= (ReportTimerInfo *)reports->reporttimer->customdata; + rti = (ReportTimerInfo *)reports->reporttimer->customdata; - if (!rti || rti->widthfac==0.0f || !report) return; + if (!rti || rti->widthfac == 0.0f || !report) return; - ui_abs= uiLayoutAbsolute(layout, 0); - block= uiLayoutGetBlock(ui_abs); + ui_abs = uiLayoutAbsolute(layout, 0); + block = uiLayoutGetBlock(ui_abs); width = BLF_width(style->widget.uifont_id, report->message); - width = MIN2(rti->widthfac*width, width); + width = MIN2(rti->widthfac * width, width); width = MAX2(width, 10); /* make a box around the report to make it stand out */ uiBlockBeginAlign(block); - but = uiDefBut(block, ROUNDBOX, 0, "", 0, 0, UI_UNIT_X+10, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, ""); + but = uiDefBut(block, ROUNDBOX, 0, "", 0, 0, UI_UNIT_X + 10, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, ""); /* set the report's bg color in but->col - ROUNDBOX feature */ rgb_float_to_uchar(but->col, rti->col); - but->col[3]= 255; + but->col[3] = 255; - but = uiDefBut(block, ROUNDBOX, 0, "", UI_UNIT_X+10, 0, UI_UNIT_X+width, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, ""); - but->col[0]= but->col[1]= but->col[2]= FTOCHAR(rti->greyscale); - but->col[3]= 255; + but = uiDefBut(block, ROUNDBOX, 0, "", UI_UNIT_X + 10, 0, UI_UNIT_X + width, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, ""); + but->col[0] = but->col[1] = but->col[2] = FTOCHAR(rti->greyscale); + but->col[3] = 255; uiBlockEndAlign(block); @@ -2680,14 +2680,14 @@ void uiTemplateReportsBanner(uiLayout *layout, bContext *C) uiBlockSetEmboss(block, UI_EMBOSS); - uiDefBut(block, LABEL, 0, report->message, UI_UNIT_X+10, 0, UI_UNIT_X+width, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, ""); + uiDefBut(block, LABEL, 0, report->message, UI_UNIT_X + 10, 0, UI_UNIT_X + width, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, ""); } /********************************* Keymap *************************************/ static void keymap_item_modified(bContext *UNUSED(C), void *kmi_p, void *UNUSED(unused)) { - wmKeyMapItem *kmi = (wmKeyMapItem*)kmi_p; + wmKeyMapItem *kmi = (wmKeyMapItem *)kmi_p; WM_keyconfig_update_tag(NULL, kmi); } @@ -2700,18 +2700,18 @@ static void template_keymap_item_properties(uiLayout *layout, const char *title, if (title) uiItemL(layout, title, ICON_NONE); - flow= uiLayoutColumnFlow(layout, 2, 0); + flow = uiLayoutColumnFlow(layout, 2, 0); RNA_STRUCT_BEGIN(ptr, prop) { - int flag= RNA_property_flag(prop); + int flag = RNA_property_flag(prop); if (flag & PROP_HIDDEN) continue; /* recurse for nested properties */ if (RNA_property_type(prop) == PROP_POINTER) { - PointerRNA propptr= RNA_property_pointer_get(ptr, prop); - const char *name= RNA_property_ui_name(prop); + PointerRNA propptr = RNA_property_pointer_get(ptr, prop); + const char *name = RNA_property_ui_name(prop); if (propptr.data && RNA_struct_is_a(propptr.type, &RNA_OperatorProperties)) { template_keymap_item_properties(layout, name, &propptr); @@ -2727,16 +2727,16 @@ static void template_keymap_item_properties(uiLayout *layout, const char *title, void uiTemplateKeymapItemProperties(uiLayout *layout, PointerRNA *ptr) { - PointerRNA propptr= RNA_pointer_get(ptr, "properties"); + PointerRNA propptr = RNA_pointer_get(ptr, "properties"); if (propptr.data) { - uiBut *but= uiLayoutGetBlock(layout)->buttons.last; + uiBut *but = uiLayoutGetBlock(layout)->buttons.last; template_keymap_item_properties(layout, NULL, &propptr); /* attach callbacks to compensate for missing properties update, * we don't know which keymap (item) is being modified there */ - for (; but; but=but->next) + for (; but; but = but->next) uiButSetFunc(but, keymap_item_modified, ptr->data, NULL); } } diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c index 91b37896e66..2f1075bde19 100644 --- a/source/blender/editors/interface/interface_utils.c +++ b/source/blender/editors/interface/interface_utils.c @@ -53,12 +53,12 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int index, const char *name, int icon, int x1, int y1, int x2, int y2) { - uiBut *but=NULL; + uiBut *but = NULL; - switch(RNA_property_type(prop)) { + switch (RNA_property_type(prop)) { case PROP_BOOLEAN: { - int arraylen= RNA_property_array_length(ptr, prop); + int arraylen = RNA_property_array_length(ptr, prop); if (arraylen && index == -1) return NULL; @@ -74,7 +74,7 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind case PROP_INT: case PROP_FLOAT: { - int arraylen= RNA_property_array_length(ptr, prop); + int arraylen = RNA_property_array_length(ptr, prop); if (arraylen && index == -1) { if (ELEM(RNA_property_subtype(prop), PROP_COLOR, PROP_COLOR_GAMMA)) @@ -105,12 +105,12 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind case PROP_POINTER: { PointerRNA pptr; - pptr= RNA_property_pointer_get(ptr, prop); + pptr = RNA_property_pointer_get(ptr, prop); if (!pptr.type) - pptr.type= RNA_property_pointer_type(ptr, prop); - icon= RNA_struct_ui_icon(pptr.type); + pptr.type = RNA_property_pointer_type(ptr, prop); + icon = RNA_struct_ui_icon(pptr.type); if (icon == ICON_DOT) - icon= 0; + icon = 0; but = uiDefIconTextButR_prop(block, IDPOIN, 0, icon, name, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL); break; @@ -123,7 +123,7 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind break; } default: - but= NULL; + but = NULL; break; } @@ -135,47 +135,47 @@ int uiDefAutoButsRNA(uiLayout *layout, PointerRNA *ptr, int (*check_prop)(Pointe uiLayout *split, *col; int flag; const char *name; - int tot= 0; + int tot = 0; assert(ELEM3(label_align, '\0', 'H', 'V')); RNA_STRUCT_BEGIN(ptr, prop) { - flag= RNA_property_flag(prop); - if (flag & PROP_HIDDEN || (check_prop && check_prop(ptr, prop)==FALSE)) + flag = RNA_property_flag(prop); + if (flag & PROP_HIDDEN || (check_prop && check_prop(ptr, prop) == FALSE)) continue; if (label_align != '\0') { PropertyType type = RNA_property_type(prop); int is_boolean = (type == PROP_BOOLEAN && !RNA_property_array_check(prop)); - name= RNA_property_ui_name(prop); + name = RNA_property_ui_name(prop); - if (label_align=='V') { - col= uiLayoutColumn(layout, 1); + if (label_align == 'V') { + col = uiLayoutColumn(layout, 1); if (!is_boolean) uiItemL(col, name, ICON_NONE); } - else if (label_align=='H') { + else if (label_align == 'H') { split = uiLayoutSplit(layout, 0.5f, 0); - col= uiLayoutColumn(split, 0); - uiItemL(col, (is_boolean)? "": name, ICON_NONE); - col= uiLayoutColumn(split, 0); + col = uiLayoutColumn(split, 0); + uiItemL(col, (is_boolean) ? "" : name, ICON_NONE); + col = uiLayoutColumn(split, 0); } else { - col= NULL; + col = NULL; } /* may meed to add more cases here. - * don't override enum flag names */ + * don't override enum flag names */ /* name is shown above, empty name for button below */ - name= (flag & PROP_ENUM_FLAG || is_boolean)? NULL: ""; + name = (flag & PROP_ENUM_FLAG || is_boolean) ? NULL : ""; } else { - col= layout; - name= NULL; /* no smart label alignment, show default name with button */ + col = layout; + name = NULL; /* no smart label alignment, show default name with button */ } uiItemFullR(col, ptr, prop, -1, 0, 0, name, ICON_NONE); @@ -194,14 +194,14 @@ int uiIconFromID(ID *id) PointerRNA ptr; short idcode; - if (id==NULL) + if (id == NULL) return ICON_NONE; - idcode= GS(id->name); + idcode = GS(id->name); /* exception for objects */ if (idcode == ID_OB) { - ob= (Object*)id; + ob = (Object *)id; if (ob->type == OB_EMPTY) return ICON_EMPTY_DATA; @@ -213,5 +213,5 @@ int uiIconFromID(ID *id) * will set the right type, also with subclassing */ RNA_id_pointer_create(id, &ptr); - return (ptr.type)? RNA_struct_ui_icon(ptr.type) : ICON_NONE; + return (ptr.type) ? RNA_struct_ui_icon(ptr.type) : ICON_NONE; } diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index b7e2ba1c179..4ecd85f62e7 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -88,7 +88,7 @@ typedef struct uiWidgetTrias { /* max as used by round_box__edges */ #define WIDGET_CURVE_RESOLU 9 -#define WIDGET_SIZE_MAX (WIDGET_CURVE_RESOLU*4) +#define WIDGET_SIZE_MAX (WIDGET_CURVE_RESOLU * 4) typedef struct uiWidgetBase { @@ -127,62 +127,70 @@ typedef struct uiWidgetType { /* *********************** draw data ************************** */ -static float cornervec[WIDGET_CURVE_RESOLU][2]= {{0.0, 0.0}, {0.195, 0.02}, {0.383, 0.067}, {0.55, 0.169}, -{0.707, 0.293}, {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805}, {1.0, 1.0}}; +static float cornervec[WIDGET_CURVE_RESOLU][2] = {{0.0, 0.0}, {0.195, 0.02}, {0.383, 0.067}, {0.55, 0.169}, + {0.707, 0.293}, {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805}, {1.0, 1.0}}; #define WIDGET_AA_JITTER 8 -static float jit[WIDGET_AA_JITTER][2]= { - { 0.468813 , -0.481430}, {-0.155755 , -0.352820}, - { 0.219306 , -0.238501}, {-0.393286 , -0.110949}, - {-0.024699 , 0.013908}, { 0.343805 , 0.147431}, - {-0.272855 , 0.269918}, { 0.095909 , 0.388710}}; - -static float num_tria_vert[3][2]= { -{-0.352077, 0.532607}, {-0.352077, -0.549313}, {0.330000, -0.008353}}; - -static unsigned int num_tria_face[1][3]= { -{0, 1, 2}}; - -static float scroll_circle_vert[16][2]= { -{0.382684, 0.923879}, {0.000001, 1.000000}, {-0.382683, 0.923880}, {-0.707107, 0.707107}, -{-0.923879, 0.382684}, {-1.000000, 0.000000}, {-0.923880, -0.382684}, {-0.707107, -0.707107}, -{-0.382683, -0.923880}, {0.000000, -1.000000}, {0.382684, -0.923880}, {0.707107, -0.707107}, -{0.923880, -0.382684}, {1.000000, -0.000000}, {0.923880, 0.382683}, {0.707107, 0.707107}}; - -static unsigned int scroll_circle_face[14][3]= { -{0, 1, 2}, {2, 0, 3}, {3, 0, 15}, {3, 15, 4}, {4, 15, 14}, {4, 14, 5}, {5, 14, 13}, {5, 13, 6}, -{6, 13, 12}, {6, 12, 7}, {7, 12, 11}, {7, 11, 8}, {8, 11, 10}, {8, 10, 9}}; - -static float menu_tria_vert[6][2]= { -{-0.41, 0.16}, {0.41, 0.16}, {0, 0.82}, -{0, -0.82}, {-0.41, -0.16}, {0.41, -0.16}}; - -static unsigned int menu_tria_face[2][3]= {{2, 0, 1}, {3, 5, 4}}; - -static float check_tria_vert[6][2]= { -{-0.578579, 0.253369}, {-0.392773, 0.412794}, {-0.004241, -0.328551}, -{-0.003001, 0.034320}, {1.055313, 0.864744}, {0.866408, 1.026895}}; - -static unsigned int check_tria_face[4][3]= { -{3, 2, 4}, {3, 4, 5}, {1, 0, 3}, {0, 2, 3}}; - -GLubyte checker_stipple_sml[32*32/8] = -{ - 255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, - 255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, - 0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255, - 0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255, - 255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, - 255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, - 0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255, - 0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255, +static float jit[WIDGET_AA_JITTER][2] = { + { 0.468813, -0.481430}, {-0.155755, -0.352820}, + { 0.219306, -0.238501}, {-0.393286, -0.110949}, + {-0.024699, 0.013908}, { 0.343805, 0.147431}, + {-0.272855, 0.269918}, { 0.095909, 0.388710} +}; + +static float num_tria_vert[3][2] = { + {-0.352077, 0.532607}, {-0.352077, -0.549313}, {0.330000, -0.008353} +}; + +static unsigned int num_tria_face[1][3] = { + {0, 1, 2} +}; + +static float scroll_circle_vert[16][2] = { + {0.382684, 0.923879}, {0.000001, 1.000000}, {-0.382683, 0.923880}, {-0.707107, 0.707107}, + {-0.923879, 0.382684}, {-1.000000, 0.000000}, {-0.923880, -0.382684}, {-0.707107, -0.707107}, + {-0.382683, -0.923880}, {0.000000, -1.000000}, {0.382684, -0.923880}, {0.707107, -0.707107}, + {0.923880, -0.382684}, {1.000000, -0.000000}, {0.923880, 0.382683}, {0.707107, 0.707107} +}; + +static unsigned int scroll_circle_face[14][3] = { + {0, 1, 2}, {2, 0, 3}, {3, 0, 15}, {3, 15, 4}, {4, 15, 14}, {4, 14, 5}, {5, 14, 13}, {5, 13, 6}, + {6, 13, 12}, {6, 12, 7}, {7, 12, 11}, {7, 11, 8}, {8, 11, 10}, {8, 10, 9} +}; + +static float menu_tria_vert[6][2] = { + {-0.41, 0.16}, {0.41, 0.16}, {0, 0.82}, + {0, -0.82}, {-0.41, -0.16}, {0.41, -0.16} +}; + +static unsigned int menu_tria_face[2][3] = {{2, 0, 1}, {3, 5, 4}}; + +static float check_tria_vert[6][2] = { + {-0.578579, 0.253369}, {-0.392773, 0.412794}, {-0.004241, -0.328551}, + {-0.003001, 0.034320}, {1.055313, 0.864744}, {0.866408, 1.026895} +}; + +static unsigned int check_tria_face[4][3] = { + {3, 2, 4}, {3, 4, 5}, {1, 0, 3}, {0, 2, 3} +}; + +GLubyte checker_stipple_sml[32 * 32 / 8] = +{ + 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, + 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, + 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, + 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, + 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, + 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, + 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, + 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, 0, 255, }; /* ************************************************* */ void ui_draw_anti_tria(float x1, float y1, float x2, float y2, float x3, float y3) { - float tri_arr[3][2]= {{x1, y1}, {x2, y2}, {x3, y3}}; + float tri_arr[3][2] = {{x1, y1}, {x2, y2}, {x3, y3}}; float color[4]; int j; @@ -215,7 +223,7 @@ void ui_draw_anti_roundbox(int mode, float minx, float miny, float maxx, float m color[3] *= 0.125f; glColor4fv(color); - for (j = 0; j < WIDGET_AA_JITTER; j++) { + for (j = 0; j < WIDGET_AA_JITTER; j++) { glTranslatef(1.0f * jit[j][0], 1.0f * jit[j][1], 0.0f); uiDrawBox(mode, minx, miny, maxx, maxy, rad); glTranslatef(-1.0f * jit[j][0], -1.0f * jit[j][1], 0.0f); @@ -226,14 +234,14 @@ void ui_draw_anti_roundbox(int mode, float minx, float miny, float maxx, float m static void widget_init(uiWidgetBase *wtb) { - wtb->totvert= wtb->halfwayvert= 0; - wtb->tria1.tot= 0; - wtb->tria2.tot= 0; - - wtb->inner= 1; - wtb->outline= 1; - wtb->emboss= 1; - wtb->shadedir= 1; + wtb->totvert = wtb->halfwayvert = 0; + wtb->tria1.tot = 0; + wtb->tria2.tot = 0; + + wtb->inner = 1; + wtb->outline = 1; + wtb->emboss = 1; + wtb->shadedir = 1; } /* helper call, makes shadow rect, with 'sun' above menu, so only shadow to left/right/bottom */ @@ -242,74 +250,74 @@ static int round_box_shadow_edges(float (*vert)[2], rcti *rect, float rad, int r { float vec[WIDGET_CURVE_RESOLU][2]; float minx, miny, maxx, maxy; - int a, tot= 0; + int a, tot = 0; - rad+= step; + rad += step; - if (2.0f*rad > rect->ymax-rect->ymin) - rad= 0.5f*(rect->ymax-rect->ymin); + if (2.0f * rad > rect->ymax - rect->ymin) + rad = 0.5f * (rect->ymax - rect->ymin); - minx= rect->xmin-step; - miny= rect->ymin-step; - maxx= rect->xmax+step; - maxy= rect->ymax+step; + minx = rect->xmin - step; + miny = rect->ymin - step; + maxx = rect->xmax + step; + maxy = rect->ymax + step; /* mult */ - for (a=0; a < WIDGET_CURVE_RESOLU; a++) { - vec[a][0]= rad*cornervec[a][0]; - vec[a][1]= rad*cornervec[a][1]; + for (a = 0; a < WIDGET_CURVE_RESOLU; a++) { + vec[a][0] = rad * cornervec[a][0]; + vec[a][1] = rad * cornervec[a][1]; } /* start with left-top, anti clockwise */ if (roundboxalign & UI_CNR_TOP_LEFT) { - for (a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) { - vert[tot][0]= minx+rad-vec[a][0]; - vert[tot][1]= maxy-vec[a][1]; + for (a = 0; a < WIDGET_CURVE_RESOLU; a++, tot++) { + vert[tot][0] = minx + rad - vec[a][0]; + vert[tot][1] = maxy - vec[a][1]; } } else { - for (a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) { - vert[tot][0]= minx; - vert[tot][1]= maxy; + for (a = 0; a < WIDGET_CURVE_RESOLU; a++, tot++) { + vert[tot][0] = minx; + vert[tot][1] = maxy; } } if (roundboxalign & UI_CNR_BOTTOM_LEFT) { - for (a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) { - vert[tot][0]= minx+vec[a][1]; - vert[tot][1]= miny+rad-vec[a][0]; + for (a = 0; a < WIDGET_CURVE_RESOLU; a++, tot++) { + vert[tot][0] = minx + vec[a][1]; + vert[tot][1] = miny + rad - vec[a][0]; } } else { - for (a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) { - vert[tot][0]= minx; - vert[tot][1]= miny; + for (a = 0; a < WIDGET_CURVE_RESOLU; a++, tot++) { + vert[tot][0] = minx; + vert[tot][1] = miny; } } if (roundboxalign & UI_CNR_BOTTOM_RIGHT) { - for (a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) { - vert[tot][0]= maxx-rad+vec[a][0]; - vert[tot][1]= miny+vec[a][1]; + for (a = 0; a < WIDGET_CURVE_RESOLU; a++, tot++) { + vert[tot][0] = maxx - rad + vec[a][0]; + vert[tot][1] = miny + vec[a][1]; } } else { - for (a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) { - vert[tot][0]= maxx; - vert[tot][1]= miny; + for (a = 0; a < WIDGET_CURVE_RESOLU; a++, tot++) { + vert[tot][0] = maxx; + vert[tot][1] = miny; } } if (roundboxalign & UI_CNR_TOP_RIGHT) { - for (a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) { - vert[tot][0]= maxx-vec[a][1]; - vert[tot][1]= maxy-rad+vec[a][0]; + for (a = 0; a < WIDGET_CURVE_RESOLU; a++, tot++) { + vert[tot][0] = maxx - vec[a][1]; + vert[tot][1] = maxy - rad + vec[a][0]; } } else { - for (a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) { - vert[tot][0]= maxx; - vert[tot][1]= maxy; + for (a = 0; a < WIDGET_CURVE_RESOLU; a++, tot++) { + vert[tot][0] = maxx; + vert[tot][1] = maxy; } } return tot; @@ -319,58 +327,58 @@ static int round_box_shadow_edges(float (*vert)[2], rcti *rect, float rad, int r static void round_box__edges(uiWidgetBase *wt, int roundboxalign, rcti *rect, float rad, float radi) { float vec[WIDGET_CURVE_RESOLU][2], veci[WIDGET_CURVE_RESOLU][2]; - float minx= rect->xmin, miny= rect->ymin, maxx= rect->xmax, maxy= rect->ymax; - float minxi= minx + 1.0f; /* boundbox inner */ - float maxxi= maxx - 1.0f; - float minyi= miny + 1.0f; - float maxyi= maxy - 1.0f; - float facxi= (maxxi!=minxi) ? 1.0f/(maxxi-minxi) : 0.0f; /* for uv, can divide by zero */ - float facyi= (maxyi!=minyi) ? 1.0f/(maxyi-minyi) : 0.0f; - int a, tot= 0, minsize; - const int hnum= ((roundboxalign & (UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT))==(UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT) || - (roundboxalign & (UI_CNR_BOTTOM_RIGHT | UI_CNR_BOTTOM_LEFT))==(UI_CNR_BOTTOM_RIGHT | UI_CNR_BOTTOM_LEFT)) ? 1 : 2; - const int vnum= ((roundboxalign & (UI_CNR_TOP_LEFT | UI_CNR_BOTTOM_LEFT))==(UI_CNR_TOP_LEFT | UI_CNR_BOTTOM_LEFT) || - (roundboxalign & (UI_CNR_TOP_RIGHT | UI_CNR_BOTTOM_RIGHT))==(UI_CNR_TOP_RIGHT | UI_CNR_BOTTOM_RIGHT)) ? 1 : 2; - - minsize= MIN2((rect->xmax-rect->xmin)*hnum, (rect->ymax-rect->ymin)*vnum); - - if (2.0f*rad > minsize) - rad= 0.5f*minsize; - - if (2.0f*(radi+1.0f) > minsize) - radi= 0.5f*minsize - 1.0f; + float minx = rect->xmin, miny = rect->ymin, maxx = rect->xmax, maxy = rect->ymax; + float minxi = minx + 1.0f; /* boundbox inner */ + float maxxi = maxx - 1.0f; + float minyi = miny + 1.0f; + float maxyi = maxy - 1.0f; + float facxi = (maxxi != minxi) ? 1.0f / (maxxi - minxi) : 0.0f; /* for uv, can divide by zero */ + float facyi = (maxyi != minyi) ? 1.0f / (maxyi - minyi) : 0.0f; + int a, tot = 0, minsize; + const int hnum = ((roundboxalign & (UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT)) == (UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT) || + (roundboxalign & (UI_CNR_BOTTOM_RIGHT | UI_CNR_BOTTOM_LEFT)) == (UI_CNR_BOTTOM_RIGHT | UI_CNR_BOTTOM_LEFT)) ? 1 : 2; + const int vnum = ((roundboxalign & (UI_CNR_TOP_LEFT | UI_CNR_BOTTOM_LEFT)) == (UI_CNR_TOP_LEFT | UI_CNR_BOTTOM_LEFT) || + (roundboxalign & (UI_CNR_TOP_RIGHT | UI_CNR_BOTTOM_RIGHT)) == (UI_CNR_TOP_RIGHT | UI_CNR_BOTTOM_RIGHT)) ? 1 : 2; + + minsize = MIN2((rect->xmax - rect->xmin) * hnum, (rect->ymax - rect->ymin) * vnum); + + if (2.0f * rad > minsize) + rad = 0.5f * minsize; + + if (2.0f * (radi + 1.0f) > minsize) + radi = 0.5f * minsize - 1.0f; /* mult */ - for (a=0; a < WIDGET_CURVE_RESOLU; a++) { - veci[a][0]= radi*cornervec[a][0]; - veci[a][1]= radi*cornervec[a][1]; - vec[a][0]= rad*cornervec[a][0]; - vec[a][1]= rad*cornervec[a][1]; + for (a = 0; a < WIDGET_CURVE_RESOLU; a++) { + veci[a][0] = radi * cornervec[a][0]; + veci[a][1] = radi * cornervec[a][1]; + vec[a][0] = rad * cornervec[a][0]; + vec[a][1] = rad * cornervec[a][1]; } /* corner left-bottom */ if (roundboxalign & UI_CNR_BOTTOM_LEFT) { - for (a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) { - wt->inner_v[tot][0]= minxi+veci[a][1]; - wt->inner_v[tot][1]= minyi+radi-veci[a][0]; + for (a = 0; a < WIDGET_CURVE_RESOLU; a++, tot++) { + wt->inner_v[tot][0] = minxi + veci[a][1]; + wt->inner_v[tot][1] = minyi + radi - veci[a][0]; - wt->outer_v[tot][0]= minx+vec[a][1]; - wt->outer_v[tot][1]= miny+rad-vec[a][0]; + wt->outer_v[tot][0] = minx + vec[a][1]; + wt->outer_v[tot][1] = miny + rad - vec[a][0]; - wt->inner_uv[tot][0]= facxi*(wt->inner_v[tot][0] - minxi); - wt->inner_uv[tot][1]= facyi*(wt->inner_v[tot][1] - minyi); + wt->inner_uv[tot][0] = facxi * (wt->inner_v[tot][0] - minxi); + wt->inner_uv[tot][1] = facyi * (wt->inner_v[tot][1] - minyi); } } else { - wt->inner_v[tot][0]= minxi; - wt->inner_v[tot][1]= minyi; + wt->inner_v[tot][0] = minxi; + wt->inner_v[tot][1] = minyi; - wt->outer_v[tot][0]= minx; - wt->outer_v[tot][1]= miny; + wt->outer_v[tot][0] = minx; + wt->outer_v[tot][1] = miny; - wt->inner_uv[tot][0]= 0.0f; - wt->inner_uv[tot][1]= 0.0f; + wt->inner_uv[tot][0] = 0.0f; + wt->inner_uv[tot][1] = 0.0f; tot++; } @@ -378,55 +386,55 @@ static void round_box__edges(uiWidgetBase *wt, int roundboxalign, rcti *rect, fl /* corner right-bottom */ if (roundboxalign & UI_CNR_BOTTOM_RIGHT) { - for (a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) { - wt->inner_v[tot][0]= maxxi-radi+veci[a][0]; - wt->inner_v[tot][1]= minyi+veci[a][1]; + for (a = 0; a < WIDGET_CURVE_RESOLU; a++, tot++) { + wt->inner_v[tot][0] = maxxi - radi + veci[a][0]; + wt->inner_v[tot][1] = minyi + veci[a][1]; - wt->outer_v[tot][0]= maxx-rad+vec[a][0]; - wt->outer_v[tot][1]= miny+vec[a][1]; + wt->outer_v[tot][0] = maxx - rad + vec[a][0]; + wt->outer_v[tot][1] = miny + vec[a][1]; - wt->inner_uv[tot][0]= facxi*(wt->inner_v[tot][0] - minxi); - wt->inner_uv[tot][1]= facyi*(wt->inner_v[tot][1] - minyi); + wt->inner_uv[tot][0] = facxi * (wt->inner_v[tot][0] - minxi); + wt->inner_uv[tot][1] = facyi * (wt->inner_v[tot][1] - minyi); } } else { - wt->inner_v[tot][0]= maxxi; - wt->inner_v[tot][1]= minyi; + wt->inner_v[tot][0] = maxxi; + wt->inner_v[tot][1] = minyi; - wt->outer_v[tot][0]= maxx; - wt->outer_v[tot][1]= miny; + wt->outer_v[tot][0] = maxx; + wt->outer_v[tot][1] = miny; - wt->inner_uv[tot][0]= 1.0f; - wt->inner_uv[tot][1]= 0.0f; + wt->inner_uv[tot][0] = 1.0f; + wt->inner_uv[tot][1] = 0.0f; tot++; } - wt->halfwayvert= tot; + wt->halfwayvert = tot; /* corner right-top */ if (roundboxalign & UI_CNR_TOP_RIGHT) { - for (a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) { - wt->inner_v[tot][0]= maxxi-veci[a][1]; - wt->inner_v[tot][1]= maxyi-radi+veci[a][0]; + for (a = 0; a < WIDGET_CURVE_RESOLU; a++, tot++) { + wt->inner_v[tot][0] = maxxi - veci[a][1]; + wt->inner_v[tot][1] = maxyi - radi + veci[a][0]; - wt->outer_v[tot][0]= maxx-vec[a][1]; - wt->outer_v[tot][1]= maxy-rad+vec[a][0]; + wt->outer_v[tot][0] = maxx - vec[a][1]; + wt->outer_v[tot][1] = maxy - rad + vec[a][0]; - wt->inner_uv[tot][0]= facxi*(wt->inner_v[tot][0] - minxi); - wt->inner_uv[tot][1]= facyi*(wt->inner_v[tot][1] - minyi); + wt->inner_uv[tot][0] = facxi * (wt->inner_v[tot][0] - minxi); + wt->inner_uv[tot][1] = facyi * (wt->inner_v[tot][1] - minyi); } } else { - wt->inner_v[tot][0]= maxxi; - wt->inner_v[tot][1]= maxyi; + wt->inner_v[tot][0] = maxxi; + wt->inner_v[tot][1] = maxyi; - wt->outer_v[tot][0]= maxx; - wt->outer_v[tot][1]= maxy; + wt->outer_v[tot][0] = maxx; + wt->outer_v[tot][1] = maxy; - wt->inner_uv[tot][0]= 1.0f; - wt->inner_uv[tot][1]= 1.0f; + wt->inner_uv[tot][0] = 1.0f; + wt->inner_uv[tot][1] = 1.0f; tot++; } @@ -434,40 +442,40 @@ static void round_box__edges(uiWidgetBase *wt, int roundboxalign, rcti *rect, fl /* corner left-top */ if (roundboxalign & UI_CNR_TOP_LEFT) { - for (a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) { - wt->inner_v[tot][0]= minxi+radi-veci[a][0]; - wt->inner_v[tot][1]= maxyi-veci[a][1]; + for (a = 0; a < WIDGET_CURVE_RESOLU; a++, tot++) { + wt->inner_v[tot][0] = minxi + radi - veci[a][0]; + wt->inner_v[tot][1] = maxyi - veci[a][1]; - wt->outer_v[tot][0]= minx+rad-vec[a][0]; - wt->outer_v[tot][1]= maxy-vec[a][1]; + wt->outer_v[tot][0] = minx + rad - vec[a][0]; + wt->outer_v[tot][1] = maxy - vec[a][1]; - wt->inner_uv[tot][0]= facxi*(wt->inner_v[tot][0] - minxi); - wt->inner_uv[tot][1]= facyi*(wt->inner_v[tot][1] - minyi); + wt->inner_uv[tot][0] = facxi * (wt->inner_v[tot][0] - minxi); + wt->inner_uv[tot][1] = facyi * (wt->inner_v[tot][1] - minyi); } } else { - wt->inner_v[tot][0]= minxi; - wt->inner_v[tot][1]= maxyi; + wt->inner_v[tot][0] = minxi; + wt->inner_v[tot][1] = maxyi; - wt->outer_v[tot][0]= minx; - wt->outer_v[tot][1]= maxy; + wt->outer_v[tot][0] = minx; + wt->outer_v[tot][1] = maxy; - wt->inner_uv[tot][0]= 0.0f; - wt->inner_uv[tot][1]= 1.0f; + wt->inner_uv[tot][0] = 0.0f; + wt->inner_uv[tot][1] = 1.0f; tot++; } BLI_assert(tot <= WIDGET_SIZE_MAX); - wt->totvert= tot; + wt->totvert = tot; } static void round_box_edges(uiWidgetBase *wt, int roundboxalign, rcti *rect, float rad) { - round_box__edges(wt, roundboxalign, rect, rad, rad-1.0f); + round_box__edges(wt, roundboxalign, rect, rad, rad - 1.0f); } @@ -475,78 +483,78 @@ static void round_box_edges(uiWidgetBase *wt, int roundboxalign, rcti *rect, flo static void widget_num_tria(uiWidgetTrias *tria, rcti *rect, float triasize, char where) { float centx, centy, sizex, sizey, minsize; - int a, i1=0, i2=1; + int a, i1 = 0, i2 = 1; - minsize= MIN2(rect->xmax-rect->xmin, rect->ymax-rect->ymin); + minsize = MIN2(rect->xmax - rect->xmin, rect->ymax - rect->ymin); /* center position and size */ - centx= (float)rect->xmin + 0.5f*minsize; - centy= (float)rect->ymin + 0.5f*minsize; - sizex= sizey= -0.5f*triasize*minsize; + centx = (float)rect->xmin + 0.5f * minsize; + centy = (float)rect->ymin + 0.5f * minsize; + sizex = sizey = -0.5f * triasize * minsize; - if (where=='r') { - centx= (float)rect->xmax - 0.5f*minsize; - sizex= -sizex; + if (where == 'r') { + centx = (float)rect->xmax - 0.5f * minsize; + sizex = -sizex; } - else if (where=='t') { - centy= (float)rect->ymax - 0.5f*minsize; - sizey= -sizey; - i2=0; i1= 1; + else if (where == 't') { + centy = (float)rect->ymax - 0.5f * minsize; + sizey = -sizey; + i2 = 0; i1 = 1; } - else if (where=='b') { - sizex= -sizex; - i2=0; i1= 1; + else if (where == 'b') { + sizex = -sizex; + i2 = 0; i1 = 1; } - for (a=0; a<3; a++) { - tria->vec[a][0]= sizex*num_tria_vert[a][i1] + centx; - tria->vec[a][1]= sizey*num_tria_vert[a][i2] + centy; + for (a = 0; a < 3; a++) { + tria->vec[a][0] = sizex * num_tria_vert[a][i1] + centx; + tria->vec[a][1] = sizey * num_tria_vert[a][i2] + centy; } - tria->tot= 1; - tria->index= num_tria_face; + tria->tot = 1; + tria->index = num_tria_face; } static void widget_scroll_circle(uiWidgetTrias *tria, rcti *rect, float triasize, char where) { float centx, centy, sizex, sizey, minsize; - int a, i1=0, i2=1; + int a, i1 = 0, i2 = 1; - minsize= MIN2(rect->xmax-rect->xmin, rect->ymax-rect->ymin); + minsize = MIN2(rect->xmax - rect->xmin, rect->ymax - rect->ymin); /* center position and size */ - centx= (float)rect->xmin + 0.5f*minsize; - centy= (float)rect->ymin + 0.5f*minsize; - sizex= sizey= -0.5f*triasize*minsize; + centx = (float)rect->xmin + 0.5f * minsize; + centy = (float)rect->ymin + 0.5f * minsize; + sizex = sizey = -0.5f * triasize * minsize; - if (where=='r') { - centx= (float)rect->xmax - 0.5f*minsize; - sizex= -sizex; + if (where == 'r') { + centx = (float)rect->xmax - 0.5f * minsize; + sizex = -sizex; } - else if (where=='t') { - centy= (float)rect->ymax - 0.5f*minsize; - sizey= -sizey; - i2=0; i1= 1; + else if (where == 't') { + centy = (float)rect->ymax - 0.5f * minsize; + sizey = -sizey; + i2 = 0; i1 = 1; } - else if (where=='b') { - sizex= -sizex; - i2=0; i1= 1; + else if (where == 'b') { + sizex = -sizex; + i2 = 0; i1 = 1; } - for (a=0; a<16; a++) { - tria->vec[a][0]= sizex*scroll_circle_vert[a][i1] + centx; - tria->vec[a][1]= sizey*scroll_circle_vert[a][i2] + centy; + for (a = 0; a < 16; a++) { + tria->vec[a][0] = sizex * scroll_circle_vert[a][i1] + centx; + tria->vec[a][1] = sizey * scroll_circle_vert[a][i2] + centy; } - tria->tot= 14; - tria->index= scroll_circle_face; + tria->tot = 14; + tria->index = scroll_circle_face; } static void widget_trias_draw(uiWidgetTrias *tria) { glEnableClientState(GL_VERTEX_ARRAY); glVertexPointer(2, GL_FLOAT, 0, tria->vec); - glDrawElements(GL_TRIANGLES, tria->tot*3, GL_UNSIGNED_INT, tria->index); + glDrawElements(GL_TRIANGLES, tria->tot * 3, GL_UNSIGNED_INT, tria->index); glDisableClientState(GL_VERTEX_ARRAY); } @@ -556,22 +564,22 @@ static void widget_menu_trias(uiWidgetTrias *tria, rcti *rect) int a; /* center position and size */ - centx= rect->xmax - 0.5f*(rect->ymax-rect->ymin); - centy= rect->ymin + 0.5f*(rect->ymax-rect->ymin); - size= 0.4f*(rect->ymax-rect->ymin); + centx = rect->xmax - 0.5f * (rect->ymax - rect->ymin); + centy = rect->ymin + 0.5f * (rect->ymax - rect->ymin); + size = 0.4f * (rect->ymax - rect->ymin); /* XXX exception */ - asp= ((float)rect->xmax-rect->xmin)/((float)rect->ymax-rect->ymin); + asp = ((float)rect->xmax - rect->xmin) / ((float)rect->ymax - rect->ymin); if (asp > 1.2f && asp < 2.6f) - centx= rect->xmax - 0.3f*(rect->ymax-rect->ymin); + centx = rect->xmax - 0.3f * (rect->ymax - rect->ymin); - for (a=0; a<6; a++) { - tria->vec[a][0]= size*menu_tria_vert[a][0] + centx; - tria->vec[a][1]= size*menu_tria_vert[a][1] + centy; + for (a = 0; a < 6; a++) { + tria->vec[a][0] = size * menu_tria_vert[a][0] + centx; + tria->vec[a][1] = size * menu_tria_vert[a][1] + centy; } - tria->tot= 2; - tria->index= menu_tria_face; + tria->tot = 2; + tria->index = menu_tria_face; } static void widget_check_trias(uiWidgetTrias *tria, rcti *rect) @@ -580,17 +588,17 @@ static void widget_check_trias(uiWidgetTrias *tria, rcti *rect) int a; /* center position and size */ - centx= rect->xmin + 0.5f*(rect->ymax-rect->ymin); - centy= rect->ymin + 0.5f*(rect->ymax-rect->ymin); - size= 0.5f*(rect->ymax-rect->ymin); + centx = rect->xmin + 0.5f * (rect->ymax - rect->ymin); + centy = rect->ymin + 0.5f * (rect->ymax - rect->ymin); + size = 0.5f * (rect->ymax - rect->ymin); - for (a=0; a<6; a++) { - tria->vec[a][0]= size*check_tria_vert[a][0] + centx; - tria->vec[a][1]= size*check_tria_vert[a][1] + centy; + for (a = 0; a < 6; a++) { + tria->vec[a][0] = size * check_tria_vert[a][0] + centx; + tria->vec[a][1] = size * check_tria_vert[a][1] + centy; } - tria->tot= 4; - tria->index= check_tria_face; + tria->tot = 4; + tria->index = check_tria_face; } @@ -598,58 +606,58 @@ static void widget_check_trias(uiWidgetTrias *tria, rcti *rect) static void shadecolors4(char coltop[4], char *coldown, const char *color, short shadetop, short shadedown) { - coltop[0]= CLAMPIS(color[0]+shadetop, 0, 255); - coltop[1]= CLAMPIS(color[1]+shadetop, 0, 255); - coltop[2]= CLAMPIS(color[2]+shadetop, 0, 255); - coltop[3]= color[3]; + coltop[0] = CLAMPIS(color[0] + shadetop, 0, 255); + coltop[1] = CLAMPIS(color[1] + shadetop, 0, 255); + coltop[2] = CLAMPIS(color[2] + shadetop, 0, 255); + coltop[3] = color[3]; - coldown[0]= CLAMPIS(color[0]+shadedown, 0, 255); - coldown[1]= CLAMPIS(color[1]+shadedown, 0, 255); - coldown[2]= CLAMPIS(color[2]+shadedown, 0, 255); - coldown[3]= color[3]; + coldown[0] = CLAMPIS(color[0] + shadedown, 0, 255); + coldown[1] = CLAMPIS(color[1] + shadedown, 0, 255); + coldown[2] = CLAMPIS(color[2] + shadedown, 0, 255); + coldown[3] = color[3]; } static void round_box_shade_col4_r(unsigned char col_r[4], const char col1[4], const char col2[4], const float fac) { - const int faci= FTOCHAR(fac); - const int facm= 255-faci; + const int faci = FTOCHAR(fac); + const int facm = 255 - faci; - col_r[0]= (faci*col1[0] + facm*col2[0])>>8; - col_r[1]= (faci*col1[1] + facm*col2[1])>>8; - col_r[2]= (faci*col1[2] + facm*col2[2])>>8; - col_r[3]= (faci*col1[3] + facm*col2[3])>>8; + col_r[0] = (faci * col1[0] + facm * col2[0]) >> 8; + col_r[1] = (faci * col1[1] + facm * col2[1]) >> 8; + col_r[2] = (faci * col1[2] + facm * col2[2]) >> 8; + col_r[3] = (faci * col1[3] + facm * col2[3]) >> 8; } -static void widget_verts_to_quad_strip(uiWidgetBase *wtb, const int totvert, float quad_strip[WIDGET_SIZE_MAX*2+2][2]) +static void widget_verts_to_quad_strip(uiWidgetBase *wtb, const int totvert, float quad_strip[WIDGET_SIZE_MAX * 2 + 2][2]) { int a; - for (a=0; aouter_v[a]); - copy_v2_v2(quad_strip[a*2+1], wtb->inner_v[a]); + for (a = 0; a < totvert; a++) { + copy_v2_v2(quad_strip[a * 2], wtb->outer_v[a]); + copy_v2_v2(quad_strip[a * 2 + 1], wtb->inner_v[a]); } - copy_v2_v2(quad_strip[a*2], wtb->outer_v[0]); - copy_v2_v2(quad_strip[a*2+1], wtb->inner_v[0]); + copy_v2_v2(quad_strip[a * 2], wtb->outer_v[0]); + copy_v2_v2(quad_strip[a * 2 + 1], wtb->inner_v[0]); } -static void widget_verts_to_quad_strip_open(uiWidgetBase *wtb, const int totvert, float quad_strip[WIDGET_SIZE_MAX*2][2]) +static void widget_verts_to_quad_strip_open(uiWidgetBase *wtb, const int totvert, float quad_strip[WIDGET_SIZE_MAX * 2][2]) { int a; - for (a=0; aouter_v[a][0]; - quad_strip[a*2][1]= wtb->outer_v[a][1]; - quad_strip[a*2+1][0]= wtb->outer_v[a][0]; - quad_strip[a*2+1][1]= wtb->outer_v[a][1] - 1.0f; + for (a = 0; a < totvert; a++) { + quad_strip[a * 2][0] = wtb->outer_v[a][0]; + quad_strip[a * 2][1] = wtb->outer_v[a][1]; + quad_strip[a * 2 + 1][0] = wtb->outer_v[a][0]; + quad_strip[a * 2 + 1][1] = wtb->outer_v[a][1] - 1.0f; } } static void widgetbase_outline(uiWidgetBase *wtb) { - float quad_strip[WIDGET_SIZE_MAX*2+2][2]; /* + 2 because the last pair is wrapped */ + float quad_strip[WIDGET_SIZE_MAX * 2 + 2][2]; /* + 2 because the last pair is wrapped */ widget_verts_to_quad_strip(wtb, wtb->totvert, quad_strip); glEnableClientState(GL_VERTEX_ARRAY); glVertexPointer(2, GL_FLOAT, 0, quad_strip); - glDrawArrays(GL_QUAD_STRIP, 0, wtb->totvert*2 + 2); + glDrawArrays(GL_QUAD_STRIP, 0, wtb->totvert * 2 + 2); glDisableClientState(GL_VERTEX_ARRAY); } @@ -661,10 +669,10 @@ static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol) /* backdrop non AA */ if (wtb->inner) { - if (wcol->shaded==0) { + if (wcol->shaded == 0) { if (wcol->alpha_check) { float inner_v_half[WIDGET_SIZE_MAX][2]; - float x_mid= 0.0f; /* used for dumb clamping of values */ + float x_mid = 0.0f; /* used for dumb clamping of values */ /* dark checkers */ glColor4ub(UI_TRANSP_DARK, UI_TRANSP_DARK, UI_TRANSP_DARK, 255); @@ -688,10 +696,10 @@ static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol) /* alpha fill */ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - glColor4ubv((unsigned char*)wcol->inner); + glColor4ubv((unsigned char *)wcol->inner); glEnableClientState(GL_VERTEX_ARRAY); - for (a=0; atotvert; a++) { + for (a = 0; a < wtb->totvert; a++) { x_mid += wtb->inner_v[a][0]; } x_mid /= wtb->totvert; @@ -703,9 +711,9 @@ static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol) /* 1/2 solid color */ glColor4ub(wcol->inner[0], wcol->inner[1], wcol->inner[2], 255); - for (a=0; atotvert; a++) { - inner_v_half[a][0]= MIN2(wtb->inner_v[a][0], x_mid); - inner_v_half[a][1]= wtb->inner_v[a][1]; + for (a = 0; a < wtb->totvert; a++) { + inner_v_half[a][0] = MIN2(wtb->inner_v[a][0], x_mid); + inner_v_half[a][1] = wtb->inner_v[a][1]; } glEnableClientState(GL_VERTEX_ARRAY); @@ -715,7 +723,7 @@ static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol) } else { /* simple fill */ - glColor4ubv((unsigned char*)wcol->inner); + glColor4ubv((unsigned char *)wcol->inner); glEnableClientState(GL_VERTEX_ARRAY); glVertexPointer(2, GL_FLOAT, 0, wtb->inner_v); @@ -726,12 +734,12 @@ static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol) else { char col1[4], col2[4]; unsigned char col_array[WIDGET_SIZE_MAX * 4]; - unsigned char *col_pt= col_array; + unsigned char *col_pt = col_array; shadecolors4(col1, col2, wcol->inner, wcol->shadetop, wcol->shadedown); glShadeModel(GL_SMOOTH); - for (a=0; atotvert; a++, col_pt += 4) { + for (a = 0; a < wtb->totvert; a++, col_pt += 4) { round_box_shade_col4_r(col_pt, col1, col2, wtb->inner_uv[a][wtb->shadedir]); } @@ -749,8 +757,8 @@ static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol) /* for each AA step */ if (wtb->outline) { - float quad_strip[WIDGET_SIZE_MAX*2+2][2]; /* + 2 because the last pair is wrapped */ - float quad_strip_emboss[WIDGET_SIZE_MAX*2][2]; /* only for emboss */ + float quad_strip[WIDGET_SIZE_MAX * 2 + 2][2]; /* + 2 because the last pair is wrapped */ + float quad_strip_emboss[WIDGET_SIZE_MAX * 2][2]; /* only for emboss */ const unsigned char tcol[4] = {wcol->outline[0], wcol->outline[1], @@ -772,14 +780,14 @@ static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol) glColor4ubv(tcol); glVertexPointer(2, GL_FLOAT, 0, quad_strip); - glDrawArrays(GL_QUAD_STRIP, 0, wtb->totvert*2 + 2); + glDrawArrays(GL_QUAD_STRIP, 0, wtb->totvert * 2 + 2); /* emboss bottom shadow */ if (wtb->emboss) { glColor4f(1.0f, 1.0f, 1.0f, 0.02f); glVertexPointer(2, GL_FLOAT, 0, quad_strip_emboss); - glDrawArrays(GL_QUAD_STRIP, 0, wtb->halfwayvert*2); + glDrawArrays(GL_QUAD_STRIP, 0, wtb->halfwayvert * 2); } glTranslatef(-1.0f * jit[j][0], -1.0f * jit[j][1], 0.0f); @@ -817,23 +825,23 @@ static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol) /* *********************** text/icon ************************************** */ -#define PREVIEW_PAD 4 +#define PREVIEW_PAD 4 static void widget_draw_preview(BIFIconID icon, float UNUSED(alpha), rcti *rect) { int w, h, size; - if (icon==ICON_NONE) + if (icon == ICON_NONE) return; w = rect->xmax - rect->xmin; h = rect->ymax - rect->ymin; size = MIN2(w, h); - size -= PREVIEW_PAD*2; /* padding */ + size -= PREVIEW_PAD * 2; /* padding */ if (size > 0) { - int x = rect->xmin + w/2 - size/2; - int y = rect->ymin + h/2 - size/2; + int x = rect->xmin + w / 2 - size / 2; + int y = rect->ymin + h / 2 - size / 2; UI_icon_draw_preview_aspect_size(x, y, icon, 1.0f, size); } @@ -849,7 +857,7 @@ static int ui_but_draw_menu_icon(uiBut *but) static void widget_draw_icon(uiBut *but, BIFIconID icon, float alpha, rcti *rect) { - int xs=0, ys=0; + int xs = 0, ys = 0; float aspect, height; if (but->flag & UI_ICON_PREVIEW) { @@ -858,67 +866,67 @@ static void widget_draw_icon(uiBut *but, BIFIconID icon, float alpha, rcti *rect } /* this icon doesn't need draw... */ - if (icon==ICON_BLANK1 && (but->flag & UI_ICON_SUBMENU)==0) return; + if (icon == ICON_BLANK1 && (but->flag & UI_ICON_SUBMENU) == 0) return; /* we need aspect from block, for menus... these buttons are scaled in uiPositionBlock() */ - aspect= but->block->aspect; + aspect = but->block->aspect; if (aspect != but->aspect) { /* prevent scaling up icon in pupmenu */ if (aspect < 1.0f) { - height= UI_DPI_ICON_SIZE; + height = UI_DPI_ICON_SIZE; aspect = 1.0f; } else - height= UI_DPI_ICON_SIZE/aspect; + height = UI_DPI_ICON_SIZE / aspect; } else - height= UI_DPI_ICON_SIZE; + height = UI_DPI_ICON_SIZE; /* calculate blend color */ if (ELEM4(but->type, TOG, ROW, TOGN, LISTROW)) { - if (but->flag & UI_SELECT); - else if (but->flag & UI_ACTIVE); - else alpha= 0.5f; + if (but->flag & UI_SELECT) ; + else if (but->flag & UI_ACTIVE) ; + else alpha = 0.5f; } /* extra feature allows more alpha blending */ - if (but->type==LABEL && but->a1==1.0f) alpha *= but->a2; + if (but->type == LABEL && but->a1 == 1.0f) alpha *= but->a2; glEnable(GL_BLEND); - if (icon && icon!=ICON_BLANK1) { + if (icon && icon != ICON_BLANK1) { if (but->flag & UI_ICON_LEFT) { - if (but->type==BUT_TOGDUAL) { + if (but->type == BUT_TOGDUAL) { if (but->drawstr[0]) { - xs= rect->xmin-1; + xs = rect->xmin - 1; } else { - xs= (rect->xmin+rect->xmax- height)/2; + xs = (rect->xmin + rect->xmax - height) / 2; } } else if (but->block->flag & UI_BLOCK_LOOP) { - if (but->type==SEARCH_MENU) - xs= rect->xmin+4; + if (but->type == SEARCH_MENU) + xs = rect->xmin + 4; else - xs= rect->xmin+1; + xs = rect->xmin + 1; } - else if ((but->type==ICONROW) || (but->type==ICONTEXTROW)) { - xs= rect->xmin+3; + else if ((but->type == ICONROW) || (but->type == ICONTEXTROW)) { + xs = rect->xmin + 3; } else { - xs= rect->xmin+4; + xs = rect->xmin + 4; } - ys= (rect->ymin+rect->ymax- height)/2; + ys = (rect->ymin + rect->ymax - height) / 2; } else { - xs= (rect->xmin+rect->xmax- height)/2; - ys= (rect->ymin+rect->ymax- height)/2; + xs = (rect->xmin + rect->xmax - height) / 2; + ys = (rect->ymin + rect->ymax - height) / 2; } /* to indicate draggable */ if (but->dragpoin && (but->flag & UI_ACTIVE)) { - float rgb[3]= {1.25f, 1.25f, 1.25f}; + float rgb[3] = {1.25f, 1.25f, 1.25f}; UI_icon_draw_aspect_color(xs, ys, icon, aspect, rgb); } else @@ -926,8 +934,8 @@ static void widget_draw_icon(uiBut *but, BIFIconID icon, float alpha, rcti *rect } if (ui_but_draw_menu_icon(but)) { - xs= rect->xmax-17; - ys= (rect->ymin+rect->ymax- height)/2; + xs = rect->xmax - 17; + ys = (rect->ymin + rect->ymax - height) / 2; UI_icon_draw_aspect(xs, ys, ICON_RIGHTARROW_THIN, aspect, alpha); } @@ -954,28 +962,28 @@ static void ui_text_clip_give_next_off(uiBut *but) /* sets but->ofs to make sure text is correctly visible */ static void ui_text_leftclip(uiFontStyle *fstyle, uiBut *but, rcti *rect) { - int border= (but->flag & UI_BUT_ALIGN_RIGHT)? 8: 10; - int okwidth= rect->xmax-rect->xmin - border; + int border = (but->flag & UI_BUT_ALIGN_RIGHT) ? 8 : 10; + int okwidth = rect->xmax - rect->xmin - border; if (but->flag & UI_HAS_ICON) okwidth -= UI_DPI_ICON_SIZE; /* need to set this first */ uiStyleFontSet(fstyle); - if (fstyle->kerning==1) /* for BLF_width */ + if (fstyle->kerning == 1) /* for BLF_width */ BLF_enable(fstyle->uifont_id, BLF_KERNING_DEFAULT); /* if text editing we define ofs dynamically */ if (but->editstr && but->pos >= 0) { if (but->ofs > but->pos) - but->ofs= but->pos; + but->ofs = but->pos; if (BLF_width(fstyle->uifont_id, but->drawstr) <= okwidth) but->ofs = 0; } - else but->ofs= 0; + else but->ofs = 0; - but->strwidth= BLF_width(fstyle->uifont_id, but->drawstr + but->ofs); + but->strwidth = BLF_width(fstyle->uifont_id, but->drawstr + but->ofs); while (but->strwidth > okwidth) { @@ -987,54 +995,54 @@ static void ui_text_leftclip(uiFontStyle *fstyle, uiBut *but, rcti *rect) /* copy draw string */ BLI_strncpy_utf8(buf, but->drawstr, sizeof(buf)); /* string position of cursor */ - buf[but->pos]= 0; - width= BLF_width(fstyle->uifont_id, buf+but->ofs); + buf[but->pos] = 0; + width = BLF_width(fstyle->uifont_id, buf + but->ofs); /* if cursor is at 20 pixels of right side button we clip left */ - if (width > okwidth-20) + if (width > okwidth - 20) ui_text_clip_give_next_off(but); else { int len, bytes; /* shift string to the left */ if (width < 20 && but->ofs > 0) ui_text_clip_give_prev_off(but); - len= strlen(but->drawstr); - bytes= BLI_str_utf8_size(BLI_str_find_prev_char_utf8(but->drawstr, but->drawstr + len)); - but->drawstr[ len-bytes ]= 0; + len = strlen(but->drawstr); + bytes = BLI_str_utf8_size(BLI_str_find_prev_char_utf8(but->drawstr, but->drawstr + len)); + but->drawstr[len - bytes] = 0; } } else ui_text_clip_give_next_off(but); - but->strwidth= BLF_width(fstyle->uifont_id, but->drawstr+but->ofs); + but->strwidth = BLF_width(fstyle->uifont_id, but->drawstr + but->ofs); if (but->strwidth < 10) break; } - if (fstyle->kerning==1) + if (fstyle->kerning == 1) BLF_disable(fstyle->uifont_id, BLF_KERNING_DEFAULT); } static void ui_text_label_rightclip(uiFontStyle *fstyle, uiBut *but, rcti *rect) { - int border= (but->flag & UI_BUT_ALIGN_RIGHT)? 8: 10; - int okwidth= rect->xmax-rect->xmin - border; - char *cpoin=NULL; + int border = (but->flag & UI_BUT_ALIGN_RIGHT) ? 8 : 10; + int okwidth = rect->xmax - rect->xmin - border; + char *cpoin = NULL; char *cpend = but->drawstr + strlen(but->drawstr); /* need to set this first */ uiStyleFontSet(fstyle); - if (fstyle->kerning==1) /* for BLF_width */ + if (fstyle->kerning == 1) /* for BLF_width */ BLF_enable(fstyle->uifont_id, BLF_KERNING_DEFAULT); - but->strwidth= BLF_width(fstyle->uifont_id, but->drawstr); - but->ofs= 0; + but->strwidth = BLF_width(fstyle->uifont_id, but->drawstr); + but->ofs = 0; /* find the space after ':' separator */ - cpoin= strrchr(but->drawstr, ':'); + cpoin = strrchr(but->drawstr, ':'); - if (cpoin && (cpoin < cpend-2)) { + if (cpoin && (cpoin < cpend - 2)) { char *cp2 = cpoin; /* chop off the leading text, starting from the right */ @@ -1044,10 +1052,10 @@ static void ui_text_label_rightclip(uiFontStyle *fstyle, uiBut *but, rcti *rect) bytes = 1; /* shift the text after and including cp2 back by 1 char, +1 to include null terminator */ - memmove(cp2-bytes, cp2, strlen(cp2)+1); - cp2-=bytes; + memmove(cp2 - bytes, cp2, strlen(cp2) + 1); + cp2 -= bytes; - but->strwidth= BLF_width(fstyle->uifont_id, but->drawstr+but->ofs); + but->strwidth = BLF_width(fstyle->uifont_id, but->drawstr + but->ofs); if (but->strwidth < 10) break; } @@ -1056,26 +1064,26 @@ static void ui_text_label_rightclip(uiFontStyle *fstyle, uiBut *but, rcti *rect) while ((but->strwidth > okwidth) && (but->ofs < 2)) { ui_text_clip_give_next_off(but); - but->strwidth= BLF_width(fstyle->uifont_id, but->drawstr+but->ofs); + but->strwidth = BLF_width(fstyle->uifont_id, but->drawstr + but->ofs); if (but->strwidth < 10) break; } } /* once the label's gone, chop off the least significant digits */ - while (but->strwidth > okwidth ) { - int len= strlen(but->drawstr); - int bytes= BLI_str_utf8_size(BLI_str_find_prev_char_utf8(but->drawstr, but->drawstr + len)); + while (but->strwidth > okwidth) { + int len = strlen(but->drawstr); + int bytes = BLI_str_utf8_size(BLI_str_find_prev_char_utf8(but->drawstr, but->drawstr + len)); if (bytes < 0) bytes = 1; - but->drawstr[ len-bytes ]= 0; + but->drawstr[len - bytes] = 0; - but->strwidth= BLF_width(fstyle->uifont_id, but->drawstr+but->ofs); + but->strwidth = BLF_width(fstyle->uifont_id, but->drawstr + but->ofs); if (but->strwidth < 10) break; } - if (fstyle->kerning==1) + if (fstyle->kerning == 1) BLF_disable(fstyle->uifont_id, BLF_KERNING_DEFAULT); } @@ -1091,16 +1099,16 @@ static void widget_draw_text(uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *b uiStyleFontSet(fstyle); if (but->editstr || (but->flag & UI_TEXT_LEFT)) - fstyle->align= UI_STYLE_TEXT_LEFT; + fstyle->align = UI_STYLE_TEXT_LEFT; else - fstyle->align= UI_STYLE_TEXT_CENTER; + fstyle->align = UI_STYLE_TEXT_CENTER; - if (fstyle->kerning==1) /* for BLF_width */ + if (fstyle->kerning == 1) /* for BLF_width */ BLF_enable(fstyle->uifont_id, BLF_KERNING_DEFAULT); /* text button selection and cursor */ if (but->editstr && but->pos != -1) { - short t=0, pos=0, ch; + short t = 0, pos = 0, ch; short selsta_tmp, selend_tmp, selsta_draw, selwidth_draw; if ((but->selend - but->selsta) > 0) { @@ -1108,46 +1116,46 @@ static void widget_draw_text(uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *b selsta_tmp = but->selsta; selend_tmp = but->selend; - if (but->drawstr[0]!=0) { + if (but->drawstr[0] != 0) { if (but->selsta >= but->ofs) { - ch= but->drawstr[selsta_tmp]; - but->drawstr[selsta_tmp]= 0; + ch = but->drawstr[selsta_tmp]; + but->drawstr[selsta_tmp] = 0; - selsta_draw = BLF_width(fstyle->uifont_id, but->drawstr+but->ofs); + selsta_draw = BLF_width(fstyle->uifont_id, but->drawstr + but->ofs); - but->drawstr[selsta_tmp]= ch; + but->drawstr[selsta_tmp] = ch; } else { selsta_draw = 0; } - ch= but->drawstr[selend_tmp]; - but->drawstr[selend_tmp]= 0; + ch = but->drawstr[selend_tmp]; + but->drawstr[selend_tmp] = 0; - selwidth_draw = BLF_width(fstyle->uifont_id, but->drawstr+but->ofs); + selwidth_draw = BLF_width(fstyle->uifont_id, but->drawstr + but->ofs); - but->drawstr[selend_tmp]= ch; + but->drawstr[selend_tmp] = ch; - glColor3ubv((unsigned char*)wcol->item); - glRects(rect->xmin+selsta_draw, rect->ymin+2, rect->xmin+selwidth_draw, rect->ymax-2); + glColor3ubv((unsigned char *)wcol->item); + glRects(rect->xmin + selsta_draw, rect->ymin + 2, rect->xmin + selwidth_draw, rect->ymax - 2); } } else { /* text cursor */ - pos= but->pos; + pos = but->pos; if (pos >= but->ofs) { - if (but->drawstr[0]!=0) { - ch= but->drawstr[pos]; - but->drawstr[pos]= 0; + if (but->drawstr[0] != 0) { + ch = but->drawstr[pos]; + but->drawstr[pos] = 0; - t= BLF_width(fstyle->uifont_id, but->drawstr+but->ofs) / but->aspect; + t = BLF_width(fstyle->uifont_id, but->drawstr + but->ofs) / but->aspect; - but->drawstr[pos]= ch; + but->drawstr[pos] = ch; } glColor3f(0.20, 0.6, 0.9); - glRects(rect->xmin+t, rect->ymin+2, rect->xmin+t+2, rect->ymax-2); + glRects(rect->xmin + t, rect->ymin + 2, rect->xmin + t + 2, rect->ymax - 2); } } } @@ -1161,15 +1169,15 @@ static void widget_draw_text(uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *b /* cut string in 2 parts - only for menu entries */ if ((but->block->flag & UI_BLOCK_LOOP)) { - if (ELEM5(but->type, SLI, NUM, TEX, NUMSLI, NUMABS)==0) { - cpoin= strchr(but->drawstr, '|'); - if (cpoin) *cpoin= 0; + if (ELEM5(but->type, SLI, NUM, TEX, NUMSLI, NUMABS) == 0) { + cpoin = strchr(but->drawstr, '|'); + if (cpoin) *cpoin = 0; } } - glColor3ubv((unsigned char*)wcol->text); + glColor3ubv((unsigned char *)wcol->text); - uiStyleFontDrawExt(fstyle, rect, but->drawstr+but->ofs, &font_xofs, &font_yofs); + uiStyleFontDrawExt(fstyle, rect, but->drawstr + but->ofs, &font_xofs, &font_yofs); if (but->menu_key != '\0') { char fixedbuf[128]; @@ -1177,24 +1185,24 @@ static void widget_draw_text(uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *b BLI_strncpy(fixedbuf, but->drawstr + but->ofs, sizeof(fixedbuf)); - str= strchr(fixedbuf, but->menu_key-32); /* upper case */ - if (str==NULL) - str= strchr(fixedbuf, but->menu_key); + str = strchr(fixedbuf, but->menu_key - 32); /* upper case */ + if (str == NULL) + str = strchr(fixedbuf, but->menu_key); if (str) { - int ul_index= -1; + int ul_index = -1; float ul_advance; - ul_index= (int)(str - fixedbuf); + ul_index = (int)(str - fixedbuf); if (fstyle->kerning == 1) { BLF_enable(fstyle->uifont_id, BLF_KERNING_DEFAULT); } - fixedbuf[ul_index]= '\0'; - ul_advance= BLF_width(fstyle->uifont_id, fixedbuf); + fixedbuf[ul_index] = '\0'; + ul_advance = BLF_width(fstyle->uifont_id, fixedbuf); - BLF_position(fstyle->uifont_id, rect->xmin+font_xofs + ul_advance, rect->ymin+font_yofs, 0.0f); + BLF_position(fstyle->uifont_id, rect->xmin + font_xofs + ul_advance, rect->ymin + font_yofs, 0.0f); BLF_draw(fstyle->uifont_id, "_", 2); if (fstyle->kerning == 1) { @@ -1205,10 +1213,10 @@ static void widget_draw_text(uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *b /* part text right aligned */ if (cpoin) { - fstyle->align= UI_STYLE_TEXT_RIGHT; + fstyle->align = UI_STYLE_TEXT_RIGHT; rect->xmax -= ui_but_draw_menu_icon(but) ? UI_DPI_ICON_SIZE : 5; - uiStyleFontDraw(fstyle, rect, cpoin+1); - *cpoin= '|'; + uiStyleFontDraw(fstyle, rect, cpoin + 1); + *cpoin = '|'; } } @@ -1216,7 +1224,7 @@ static void widget_draw_text(uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *b static void widget_draw_text_icon(uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *but, rcti *rect) { - if (but==NULL) return; + if (but == NULL) return; /* clip but->drawstr to fit in available space */ if (but->editstr && but->pos >= 0) { @@ -1231,24 +1239,24 @@ static void widget_draw_text_icon(uiFontStyle *fstyle, uiWidgetColors *wcol, uiB else if ((but->block->flag & UI_BLOCK_LOOP) && (but->type == BUT)) { ui_text_leftclip(fstyle, but, rect); } - else but->ofs= 0; + else but->ofs = 0; /* check for button text label */ if (but->type == ICONTEXTROW) { - widget_draw_icon(but, (BIFIconID) (but->icon+but->iconadd), 1.0f, rect); + widget_draw_icon(but, (BIFIconID) (but->icon + but->iconadd), 1.0f, rect); } else { - if (but->type==BUT_TOGDUAL) { - int dualset= 0; - if (but->pointype==SHO) - dualset= BTST( *(((short *)but->poin)+1), but->bitnr); - else if (but->pointype==INT) - dualset= BTST( *(((int *)but->poin)+1), but->bitnr); + if (but->type == BUT_TOGDUAL) { + int dualset = 0; + if (but->pointype == SHO) + dualset = BTST(*(((short *)but->poin) + 1), but->bitnr); + else if (but->pointype == INT) + dualset = BTST(*(((int *)but->poin) + 1), but->bitnr); - widget_draw_icon(but, ICON_DOT, dualset?1.0f:0.25f, rect); + widget_draw_icon(but, ICON_DOT, dualset ? 1.0f : 0.25f, rect); } - else if (but->type==MENU && (but->flag & UI_BUT_NODE_LINK)) { + else if (but->type == MENU && (but->flag & UI_BUT_NODE_LINK)) { int tmp = rect->xmin; rect->xmin = rect->xmax - (rect->ymax - rect->ymin) - 1; widget_draw_icon(but, ICON_LAYER_USED, 1.0f, rect); @@ -1259,9 +1267,9 @@ static void widget_draw_text_icon(uiFontStyle *fstyle, uiWidgetColors *wcol, uiB * and offset the text label to accommodate it */ if (but->flag & UI_HAS_ICON) { - widget_draw_icon(but, but->icon+but->iconadd, 1.0f, rect); + widget_draw_icon(but, but->icon + but->iconadd, 1.0f, rect); - rect->xmin += (int)((float)UI_icon_get_width(but->icon+but->iconadd) * UI_DPI_ICON_FAC); + rect->xmin += (int)((float)UI_icon_get_width(but->icon + but->iconadd) * UI_DPI_ICON_FAC); if (but->editstr || (but->flag & UI_TEXT_LEFT)) rect->xmin += 5; @@ -1290,7 +1298,7 @@ static void widget_draw_text_icon(uiFontStyle *fstyle, uiWidgetColors *wcol, uiB * float blend; */ -static struct uiWidgetStateColors wcol_state_colors= { +static struct uiWidgetStateColors wcol_state_colors = { {115, 190, 76, 255}, {90, 166, 51, 255}, {240, 235, 100, 255}, @@ -1312,7 +1320,7 @@ static struct uiWidgetStateColors wcol_state_colors= { * float shadetop, shadedown; */ -static struct uiWidgetColors wcol_num= { +static struct uiWidgetColors wcol_num = { {25, 25, 25, 255}, {180, 180, 180, 255}, {153, 153, 153, 255}, @@ -1325,7 +1333,7 @@ static struct uiWidgetColors wcol_num= { -20, 0 }; -static struct uiWidgetColors wcol_numslider= { +static struct uiWidgetColors wcol_numslider = { {25, 25, 25, 255}, {180, 180, 180, 255}, {153, 153, 153, 255}, @@ -1338,7 +1346,7 @@ static struct uiWidgetColors wcol_numslider= { -20, 0 }; -static struct uiWidgetColors wcol_text= { +static struct uiWidgetColors wcol_text = { {25, 25, 25, 255}, {153, 153, 153, 255}, {153, 153, 153, 255}, @@ -1351,7 +1359,7 @@ static struct uiWidgetColors wcol_text= { 0, 25 }; -static struct uiWidgetColors wcol_option= { +static struct uiWidgetColors wcol_option = { {0, 0, 0, 255}, {70, 70, 70, 255}, {70, 70, 70, 255}, @@ -1365,7 +1373,7 @@ static struct uiWidgetColors wcol_option= { }; /* button that shows popup */ -static struct uiWidgetColors wcol_menu= { +static struct uiWidgetColors wcol_menu = { {0, 0, 0, 255}, {70, 70, 70, 255}, {70, 70, 70, 255}, @@ -1379,7 +1387,7 @@ static struct uiWidgetColors wcol_menu= { }; /* button that starts pulldown */ -static struct uiWidgetColors wcol_pulldown= { +static struct uiWidgetColors wcol_pulldown = { {0, 0, 0, 255}, {63, 63, 63, 255}, {86, 128, 194, 255}, @@ -1393,7 +1401,7 @@ static struct uiWidgetColors wcol_pulldown= { }; /* button inside menu */ -static struct uiWidgetColors wcol_menu_item= { +static struct uiWidgetColors wcol_menu_item = { {0, 0, 0, 255}, {0, 0, 0, 0}, {86, 128, 194, 255}, @@ -1407,7 +1415,7 @@ static struct uiWidgetColors wcol_menu_item= { }; /* backdrop menu + title text color */ -static struct uiWidgetColors wcol_menu_back= { +static struct uiWidgetColors wcol_menu_back = { {0, 0, 0, 255}, {25, 25, 25, 230}, {45, 45, 45, 230}, @@ -1421,7 +1429,7 @@ static struct uiWidgetColors wcol_menu_back= { }; /* tooltip colour */ -static struct uiWidgetColors wcol_tooltip= { +static struct uiWidgetColors wcol_tooltip = { {0, 0, 0, 255}, {25, 25, 25, 230}, {45, 45, 45, 230}, @@ -1434,7 +1442,7 @@ static struct uiWidgetColors wcol_tooltip= { 25, -20 }; -static struct uiWidgetColors wcol_radio= { +static struct uiWidgetColors wcol_radio = { {0, 0, 0, 255}, {70, 70, 70, 255}, {86, 128, 194, 255}, @@ -1447,7 +1455,7 @@ static struct uiWidgetColors wcol_radio= { 15, -15 }; -static struct uiWidgetColors wcol_regular= { +static struct uiWidgetColors wcol_regular = { {25, 25, 25, 255}, {153, 153, 153, 255}, {100, 100, 100, 255}, @@ -1460,7 +1468,7 @@ static struct uiWidgetColors wcol_regular= { 0, 0 }; -static struct uiWidgetColors wcol_tool= { +static struct uiWidgetColors wcol_tool = { {25, 25, 25, 255}, {153, 153, 153, 255}, {100, 100, 100, 255}, @@ -1473,7 +1481,7 @@ static struct uiWidgetColors wcol_tool= { 15, -15 }; -static struct uiWidgetColors wcol_box= { +static struct uiWidgetColors wcol_box = { {25, 25, 25, 255}, {128, 128, 128, 255}, {100, 100, 100, 255}, @@ -1486,7 +1494,7 @@ static struct uiWidgetColors wcol_box= { 0, 0 }; -static struct uiWidgetColors wcol_toggle= { +static struct uiWidgetColors wcol_toggle = { {25, 25, 25, 255}, {153, 153, 153, 255}, {100, 100, 100, 255}, @@ -1499,7 +1507,7 @@ static struct uiWidgetColors wcol_toggle= { 0, 0 }; -static struct uiWidgetColors wcol_scroll= { +static struct uiWidgetColors wcol_scroll = { {50, 50, 50, 180}, {80, 80, 80, 180}, {100, 100, 100, 180}, @@ -1512,7 +1520,7 @@ static struct uiWidgetColors wcol_scroll= { 5, -5 }; -static struct uiWidgetColors wcol_progress= { +static struct uiWidgetColors wcol_progress = { {0, 0, 0, 255}, {190, 190, 190, 255}, {100, 100, 100, 180}, @@ -1525,7 +1533,7 @@ static struct uiWidgetColors wcol_progress= { 0, 0 }; -static struct uiWidgetColors wcol_list_item= { +static struct uiWidgetColors wcol_list_item = { {0, 0, 0, 255}, {0, 0, 0, 0}, {86, 128, 194, 255}, @@ -1539,7 +1547,7 @@ static struct uiWidgetColors wcol_list_item= { }; /* free wcol struct to play with */ -static struct uiWidgetColors wcol_tmp= { +static struct uiWidgetColors wcol_tmp = { {0, 0, 0, 255}, {128, 128, 128, 255}, {100, 100, 100, 255}, @@ -1556,25 +1564,25 @@ static struct uiWidgetColors wcol_tmp= { /* called for theme init (new theme) and versions */ void ui_widget_color_init(ThemeUI *tui) { - tui->wcol_regular= wcol_regular; - tui->wcol_tool= wcol_tool; - tui->wcol_text= wcol_text; - tui->wcol_radio= wcol_radio; - tui->wcol_option= wcol_option; - tui->wcol_toggle= wcol_toggle; - tui->wcol_num= wcol_num; - tui->wcol_numslider= wcol_numslider; - tui->wcol_menu= wcol_menu; - tui->wcol_pulldown= wcol_pulldown; - tui->wcol_menu_back= wcol_menu_back; + tui->wcol_regular = wcol_regular; + tui->wcol_tool = wcol_tool; + tui->wcol_text = wcol_text; + tui->wcol_radio = wcol_radio; + tui->wcol_option = wcol_option; + tui->wcol_toggle = wcol_toggle; + tui->wcol_num = wcol_num; + tui->wcol_numslider = wcol_numslider; + tui->wcol_menu = wcol_menu; + tui->wcol_pulldown = wcol_pulldown; + tui->wcol_menu_back = wcol_menu_back; tui->wcol_tooltip = wcol_tooltip; - tui->wcol_menu_item= wcol_menu_item; - tui->wcol_box= wcol_box; - tui->wcol_scroll= wcol_scroll; - tui->wcol_list_item= wcol_list_item; - tui->wcol_progress= wcol_progress; + tui->wcol_menu_item = wcol_menu_item; + tui->wcol_box = wcol_box; + tui->wcol_scroll = wcol_scroll; + tui->wcol_list_item = wcol_list_item; + tui->wcol_progress = wcol_progress; - tui->wcol_state= wcol_state_colors; + tui->wcol_state = wcol_state_colors; } /* ************ button callbacks, state ***************** */ @@ -1582,18 +1590,18 @@ void ui_widget_color_init(ThemeUI *tui) static void widget_state_blend(char cp[3], const char cpstate[3], const float fac) { if (fac != 0.0f) { - cp[0]= (int)((1.0f-fac)*cp[0] + fac*cpstate[0]); - cp[1]= (int)((1.0f-fac)*cp[1] + fac*cpstate[1]); - cp[2]= (int)((1.0f-fac)*cp[2] + fac*cpstate[2]); + cp[0] = (int)((1.0f - fac) * cp[0] + fac * cpstate[0]); + cp[1] = (int)((1.0f - fac) * cp[1] + fac * cpstate[1]); + cp[2] = (int)((1.0f - fac) * cp[2] + fac * cpstate[2]); } } /* copy colors from theme, and set changes in it based on state */ static void widget_state(uiWidgetType *wt, int state) { - uiWidgetStateColors *wcol_state= wt->wcol_state; + uiWidgetStateColors *wcol_state = wt->wcol_state; - wt->wcol= *(wt->wcol_theme); + wt->wcol = *(wt->wcol_theme); if (state & UI_SELECT) { copy_v4_v4_char(wt->wcol.inner, wt->wcol.inner_sel); @@ -1619,18 +1627,18 @@ static void widget_state(uiWidgetType *wt, int state) widget_state_blend(wt->wcol.inner, wcol_state->inner_driven, wcol_state->blend); if (state & UI_ACTIVE) { /* mouse over? */ - wt->wcol.inner[0]= wt->wcol.inner[0]>=240? 255 : wt->wcol.inner[0]+15; - wt->wcol.inner[1]= wt->wcol.inner[1]>=240? 255 : wt->wcol.inner[1]+15; - wt->wcol.inner[2]= wt->wcol.inner[2]>=240? 255 : wt->wcol.inner[2]+15; + wt->wcol.inner[0] = wt->wcol.inner[0] >= 240 ? 255 : wt->wcol.inner[0] + 15; + wt->wcol.inner[1] = wt->wcol.inner[1] >= 240 ? 255 : wt->wcol.inner[1] + 15; + wt->wcol.inner[2] = wt->wcol.inner[2] >= 240 ? 255 : wt->wcol.inner[2] + 15; } } if (state & UI_BUT_REDALERT) { - char red[4]= {255, 0, 0}; + char red[4] = {255, 0, 0}; widget_state_blend(wt->wcol.inner, red, 0.4f); } if (state & UI_BUT_NODE_ACTIVE) { - char blue[4]= {86, 128, 194}; + char blue[4] = {86, 128, 194}; widget_state_blend(wt->wcol.inner, blue, 0.3f); } } @@ -1638,8 +1646,8 @@ static void widget_state(uiWidgetType *wt, int state) /* sliders use special hack which sets 'item' as inner when drawing filling */ static void widget_state_numslider(uiWidgetType *wt, int state) { - uiWidgetStateColors *wcol_state= wt->wcol_state; - float blend= wcol_state->blend - 0.2f; // XXX special tweak to make sure that bar will still be visible + uiWidgetStateColors *wcol_state = wt->wcol_state; + float blend = wcol_state->blend - 0.2f; // XXX special tweak to make sure that bar will still be visible /* call this for option button */ widget_state(wt, state); @@ -1692,7 +1700,7 @@ static void widget_state_option_menu(uiWidgetType *wt, int state) if (state & UI_SELECT) UI_GetThemeColor4ubv(TH_TEXT_HI, (unsigned char *)wt->wcol.text); else { - bTheme *btheme= UI_GetTheme(); /* XXX */ + bTheme *btheme = UI_GetTheme(); /* XXX */ copy_v3_v3_char(wt->wcol.text, btheme->tui.wcol_menu_back.text); } @@ -1701,13 +1709,13 @@ static void widget_state_option_menu(uiWidgetType *wt, int state) static void widget_state_nothing(uiWidgetType *wt, int UNUSED(state)) { - wt->wcol= *(wt->wcol_theme); + wt->wcol = *(wt->wcol_theme); } /* special case, button that calls pulldown */ static void widget_state_pulldown(uiWidgetType *wt, int state) { - wt->wcol= *(wt->wcol_theme); + wt->wcol = *(wt->wcol_theme); copy_v4_v4_char(wt->wcol.inner, wt->wcol.inner_sel); copy_v3_v3_char(wt->wcol.outline, wt->wcol.inner); @@ -1719,12 +1727,12 @@ static void widget_state_pulldown(uiWidgetType *wt, int state) /* special case, menu items */ static void widget_state_menu_item(uiWidgetType *wt, int state) { - wt->wcol= *(wt->wcol_theme); + wt->wcol = *(wt->wcol_theme); - if (state & (UI_BUT_DISABLED|UI_BUT_INACTIVE)) { - wt->wcol.text[0]= 0.5f*(wt->wcol.text[0]+wt->wcol.text_sel[0]); - wt->wcol.text[1]= 0.5f*(wt->wcol.text[1]+wt->wcol.text_sel[1]); - wt->wcol.text[2]= 0.5f*(wt->wcol.text[2]+wt->wcol.text_sel[2]); + if (state & (UI_BUT_DISABLED | UI_BUT_INACTIVE)) { + wt->wcol.text[0] = 0.5f * (wt->wcol.text[0] + wt->wcol.text_sel[0]); + wt->wcol.text[1] = 0.5f * (wt->wcol.text[1] + wt->wcol.text_sel[1]); + wt->wcol.text[2] = 0.5f * (wt->wcol.text[2] + wt->wcol.text_sel[2]); } else if (state & UI_ACTIVE) { copy_v4_v4_char(wt->wcol.inner, wt->wcol.inner_sel); @@ -1739,27 +1747,27 @@ static void widget_state_menu_item(uiWidgetType *wt, int state) static void widget_softshadow(rcti *rect, int roundboxalign, float radin, float radout) { uiWidgetBase wtb; - rcti rect1= *rect; + rcti rect1 = *rect; float alpha, alphastep; int step, totvert; - float quad_strip[WIDGET_SIZE_MAX*2][2]; + float quad_strip[WIDGET_SIZE_MAX * 2][2]; /* prevent tooltips to not show round shadow */ - if ( 2.0f*radout > 0.2f*(rect1.ymax-rect1.ymin) ) - rect1.ymax -= 0.2f*(rect1.ymax-rect1.ymin); + if (2.0f * radout > 0.2f * (rect1.ymax - rect1.ymin) ) + rect1.ymax -= 0.2f * (rect1.ymax - rect1.ymin); else - rect1.ymax -= 2.0f*radout; + rect1.ymax -= 2.0f * radout; /* inner part */ - totvert= round_box_shadow_edges(wtb.inner_v, &rect1, radin, roundboxalign & (UI_CNR_BOTTOM_RIGHT | UI_CNR_BOTTOM_LEFT), 0.0f); + totvert = round_box_shadow_edges(wtb.inner_v, &rect1, radin, roundboxalign & (UI_CNR_BOTTOM_RIGHT | UI_CNR_BOTTOM_LEFT), 0.0f); /* inverse linear shadow alpha */ - alpha= 0.15; - alphastep= 0.67; + alpha = 0.15; + alphastep = 0.67; glEnableClientState(GL_VERTEX_ARRAY); - for (step= 1; step<=radout; step++, alpha*=alphastep) { + for (step = 1; step <= radout; step++, alpha *= alphastep) { round_box_shadow_edges(wtb.outer_v, &rect1, radin, UI_CNR_ALL, (float)step); glColor4f(0.0f, 0.0f, 0.0f, alpha); @@ -1767,7 +1775,7 @@ static void widget_softshadow(rcti *rect, int roundboxalign, float radin, float widget_verts_to_quad_strip_open(&wtb, totvert, quad_strip); glVertexPointer(2, GL_FLOAT, 0, quad_strip); - glDrawArrays(GL_QUAD_STRIP, 0, totvert*2); + glDrawArrays(GL_QUAD_STRIP, 0, totvert * 2); } glDisableClientState(GL_VERTEX_ARRAY); @@ -1776,7 +1784,7 @@ static void widget_softshadow(rcti *rect, int roundboxalign, float radin, float static void widget_menu_back(uiWidgetColors *wcol, rcti *rect, int flag, int direction) { uiWidgetBase wtb; - int roundboxalign= UI_CNR_ALL; + int roundboxalign = UI_CNR_ALL; widget_init(&wtb); @@ -1786,11 +1794,11 @@ static void widget_menu_back(uiWidgetColors *wcol, rcti *rect, int flag, int dir //rect->ymax += 4.0; } else if (direction == UI_DOWN) { - roundboxalign= (UI_CNR_BOTTOM_RIGHT | UI_CNR_BOTTOM_LEFT); + roundboxalign = (UI_CNR_BOTTOM_RIGHT | UI_CNR_BOTTOM_LEFT); rect->ymin -= 4.0; } else if (direction == UI_TOP) { - roundboxalign= UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT; + roundboxalign = UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT; rect->ymax += 4.0; } @@ -1798,7 +1806,7 @@ static void widget_menu_back(uiWidgetColors *wcol, rcti *rect, int flag, int dir widget_softshadow(rect, roundboxalign, 5.0f, 8.0f); round_box_edges(&wtb, roundboxalign, rect, 5.0f); - wtb.emboss= 0; + wtb.emboss = 0; widgetbase_draw(&wtb, wcol); glDisable(GL_BLEND); @@ -1812,14 +1820,14 @@ static void ui_hsv_cursor(float x, float y) glTranslatef(x, y, 0.0f); glColor3f(1.0f, 1.0f, 1.0f); - glutil_draw_filled_arc(0.0f, M_PI*2.0, 3.0f, 8); + glutil_draw_filled_arc(0.0f, M_PI * 2.0, 3.0f, 8); glEnable(GL_BLEND); - glEnable(GL_LINE_SMOOTH ); + glEnable(GL_LINE_SMOOTH); glColor3f(0.0f, 0.0f, 0.0f); - glutil_draw_lined_arc(0.0f, M_PI*2.0, 3.0f, 12); + glutil_draw_lined_arc(0.0f, M_PI * 2.0, 3.0f, 12); glDisable(GL_BLEND); - glDisable(GL_LINE_SMOOTH ); + glDisable(GL_LINE_SMOOTH); glPopMatrix(); @@ -1828,51 +1836,51 @@ static void ui_hsv_cursor(float x, float y) void ui_hsvcircle_vals_from_pos(float *valrad, float *valdist, rcti *rect, float mx, float my) { /* duplication of code... well, simple is better now */ - float centx= (float)(rect->xmin + rect->xmax)/2; - float centy= (float)(rect->ymin + rect->ymax)/2; + float centx = (float)(rect->xmin + rect->xmax) / 2; + float centy = (float)(rect->ymin + rect->ymax) / 2; float radius, dist; - if ( rect->xmax-rect->xmin > rect->ymax-rect->ymin ) - radius= (float)(rect->ymax - rect->ymin)/2; + if (rect->xmax - rect->xmin > rect->ymax - rect->ymin) + radius = (float)(rect->ymax - rect->ymin) / 2; else - radius= (float)(rect->xmax - rect->xmin)/2; + radius = (float)(rect->xmax - rect->xmin) / 2; - mx-= centx; - my-= centy; - dist= sqrt( mx*mx + my*my); + mx -= centx; + my -= centy; + dist = sqrt(mx * mx + my * my); if (dist < radius) - *valdist= dist/radius; + *valdist = dist / radius; else - *valdist= 1.0f; + *valdist = 1.0f; - *valrad= atan2f(mx, my)/(2.0f*(float)M_PI) + 0.5f; + *valrad = atan2f(mx, my) / (2.0f * (float)M_PI) + 0.5f; } static void ui_draw_but_HSVCIRCLE(uiBut *but, uiWidgetColors *wcol, rcti *rect) { /* gouraud triangle fan */ - float radstep, ang= 0.0f; + float radstep, ang = 0.0f; float centx, centy, radius, cursor_radius; float rgb[3], hsvo[3], hsv[3], col[3], colcent[3]; - int a, tot= 32; + int a, tot = 32; int color_profile = but->block->color_profile; if (but->rnaprop && RNA_property_subtype(but->rnaprop) == PROP_COLOR_GAMMA) color_profile = BLI_PR_NONE; - radstep= 2.0f*(float)M_PI/(float)tot; - centx= (float)(rect->xmin + rect->xmax)/2; - centy= (float)(rect->ymin + rect->ymax)/2; + radstep = 2.0f * (float)M_PI / (float)tot; + centx = (float)(rect->xmin + rect->xmax) / 2; + centy = (float)(rect->ymin + rect->ymax) / 2; - if ( rect->xmax-rect->xmin > rect->ymax-rect->ymin ) - radius= (float)(rect->ymax - rect->ymin)/2; + if (rect->xmax - rect->xmin > rect->ymax - rect->ymin) + radius = (float)(rect->ymax - rect->ymin) / 2; else - radius= (float)(rect->xmax - rect->xmin)/2; + radius = (float)(rect->xmax - rect->xmin) / 2; /* color */ ui_get_but_vectorf(but, rgb); copy_v3_v3(hsv, ui_block_hsv_get(but->block)); - rgb_to_hsv_compat(rgb[0], rgb[1], rgb[2], hsv, hsv+1, hsv+2); + rgb_to_hsv_compat(rgb[0], rgb[1], rgb[2], hsv, hsv + 1, hsv + 2); copy_v3_v3(hsvo, hsv); /* exception: if 'lock' is set @@ -1883,24 +1891,24 @@ static void ui_draw_but_HSVCIRCLE(uiBut *but, uiWidgetColors *wcol, rcti *rect) else if (color_profile) hsv[2] = linearrgb_to_srgb(hsv[2]); - hsv_to_rgb(0.f, 0.f, hsv[2], colcent, colcent+1, colcent+2); + hsv_to_rgb(0.f, 0.f, hsv[2], colcent, colcent + 1, colcent + 2); glShadeModel(GL_SMOOTH); glBegin(GL_TRIANGLE_FAN); glColor3fv(colcent); - glVertex2f( centx, centy); + glVertex2f(centx, centy); - for (a=0; a<=tot; a++, ang+=radstep) { - float si= sin(ang); - float co= cos(ang); + for (a = 0; a <= tot; a++, ang += radstep) { + float si = sin(ang); + float co = cos(ang); - ui_hsvcircle_vals_from_pos(hsv, hsv+1, rect, centx + co*radius, centy + si*radius); + ui_hsvcircle_vals_from_pos(hsv, hsv + 1, rect, centx + co * radius, centy + si * radius); CLAMP(hsv[2], 0.0f, 1.0f); /* for display only */ - hsv_to_rgb(hsv[0], hsv[1], hsv[2], col, col+1, col+2); + hsv_to_rgb(hsv[0], hsv[1], hsv[2], col, col + 1, col + 2); glColor3fv(col); - glVertex2f( centx + co*radius, centy + si*radius); + glVertex2f(centx + co * radius, centy + si * radius); } glEnd(); @@ -1910,23 +1918,23 @@ static void ui_draw_but_HSVCIRCLE(uiBut *but, uiWidgetColors *wcol, rcti *rect) glPushMatrix(); glTranslatef(centx, centy, 0.0f); glEnable(GL_BLEND); - glEnable(GL_LINE_SMOOTH ); - glColor3ubv((unsigned char*)wcol->outline); - glutil_draw_lined_arc(0.0f, M_PI*2.0, radius, tot + 1); + glEnable(GL_LINE_SMOOTH); + glColor3ubv((unsigned char *)wcol->outline); + glutil_draw_lined_arc(0.0f, M_PI * 2.0, radius, tot + 1); glDisable(GL_BLEND); - glDisable(GL_LINE_SMOOTH ); + glDisable(GL_LINE_SMOOTH); glPopMatrix(); /* cursor */ - ang= 2.0f*(float)M_PI*hsvo[0] + 0.5f*(float)M_PI; + ang = 2.0f * (float)M_PI * hsvo[0] + 0.5f * (float)M_PI; if (but->flag & UI_BUT_COLOR_CUBIC) cursor_radius = (1.0f - powf(1.0f - hsvo[1], 3.0f)); else cursor_radius = hsvo[1]; - radius= CLAMPIS(cursor_radius, 0.0f, 1.0f) * radius; - ui_hsv_cursor(centx + cosf(-ang)*radius, centy + sinf(-ang)*radius); + radius = CLAMPIS(cursor_radius, 0.0f, 1.0f) * radius; + ui_hsv_cursor(centx + cosf(-ang) * radius, centy + sinf(-ang) * radius); } /* ************ custom buttons, old stuff ************** */ @@ -1935,15 +1943,15 @@ static void ui_draw_but_HSVCIRCLE(uiBut *but, uiWidgetColors *wcol, rcti *rect) void ui_draw_gradient(rcti *rect, const float hsv[3], int type, float alpha) { int a; - float h= hsv[0], s= hsv[1], v= hsv[2]; + float h = hsv[0], s = hsv[1], v = hsv[2]; float dx, dy, sx1, sx2, sy; - float col0[4][3]; // left half, rect bottom to top - float col1[4][3]; // right half, rect bottom to top + float col0[4][3]; // left half, rect bottom to top + float col1[4][3]; // right half, rect bottom to top /* draw series of gouraud rects */ glShadeModel(GL_SMOOTH); - switch(type) { + switch (type) { case UI_GRAD_SV: hsv_to_rgb(h, 0.0, 0.0, &col1[0][0], &col1[0][1], &col1[0][2]); hsv_to_rgb(h, 0.333, 0.0, &col1[1][0], &col1[1][1], &col1[1][2]); @@ -1990,7 +1998,7 @@ void ui_draw_gradient(rcti *rect, const float hsv[3], int type, float alpha) /* old below */ - for (dx=0.0f; dx<1.0f; dx+= 0.05f) { + for (dx = 0.0f; dx < 1.0f; dx += 0.05f) { // previous color copy_v3_v3(col0[0], col1[0]); copy_v3_v3(col0[1], col1[1]); @@ -1998,7 +2006,7 @@ void ui_draw_gradient(rcti *rect, const float hsv[3], int type, float alpha) copy_v3_v3(col0[3], col1[3]); // new color - switch(type) { + switch (type) { case UI_GRAD_SV: hsv_to_rgb(h, 0.0, dx, &col1[0][0], &col1[0][1], &col1[0][2]); hsv_to_rgb(h, 0.333, dx, &col1[1][0], &col1[1][1], &col1[1][2]); @@ -2038,24 +2046,24 @@ void ui_draw_gradient(rcti *rect, const float hsv[3], int type, float alpha) } // rect - sx1= rect->xmin + dx*(rect->xmax-rect->xmin); - sx2= rect->xmin + (dx+0.05f)*(rect->xmax-rect->xmin); - sy= rect->ymin; - dy= (rect->ymax-rect->ymin)/3.0; + sx1 = rect->xmin + dx * (rect->xmax - rect->xmin); + sx2 = rect->xmin + (dx + 0.05f) * (rect->xmax - rect->xmin); + sy = rect->ymin; + dy = (rect->ymax - rect->ymin) / 3.0; glBegin(GL_QUADS); - for (a=0; a<3; a++, sy+=dy) { + for (a = 0; a < 3; a++, sy += dy) { glColor4f(col0[a][0], col0[a][1], col0[a][2], alpha); glVertex2f(sx1, sy); glColor4f(col1[a][0], col1[a][1], col1[a][2], alpha); glVertex2f(sx2, sy); - glColor4f(col1[a+1][0], col1[a+1][1], col1[a+1][2], alpha); - glVertex2f(sx2, sy+dy); + glColor4f(col1[a + 1][0], col1[a + 1][1], col1[a + 1][2], alpha); + glVertex2f(sx2, sy + dy); - glColor4f(col0[a+1][0], col0[a+1][1], col0[a+1][2], alpha); - glVertex2f(sx1, sy+dy); + glColor4f(col0[a + 1][0], col0[a + 1][1], col0[a + 1][2], alpha); + glVertex2f(sx1, sy + dy); } glEnd(); } @@ -2068,44 +2076,44 @@ void ui_draw_gradient(rcti *rect, const float hsv[3], int type, float alpha) static void ui_draw_but_HSVCUBE(uiBut *but, rcti *rect) { - float rgb[3], h,s,v; - float x=0.0f, y=0.0f; - float *hsv= ui_block_hsv_get(but->block); + float rgb[3], h, s, v; + float x = 0.0f, y = 0.0f; + float *hsv = ui_block_hsv_get(but->block); float hsvn[3]; - h= hsv[0]; - s= hsv[1]; - v= hsv[2]; + h = hsv[0]; + s = hsv[1]; + v = hsv[2]; ui_get_but_vectorf(but, rgb); rgb_to_hsv_compat(rgb[0], rgb[1], rgb[2], &h, &s, &v); - hsvn[0]= h; - hsvn[1]= s; - hsvn[2]= v; + hsvn[0] = h; + hsvn[1] = s; + hsvn[2] = v; ui_draw_gradient(rect, hsvn, but->a1, 1.f); - switch((int)but->a1) { + switch ((int)but->a1) { case UI_GRAD_SV: - x= v; y= s; break; + x = v; y = s; break; case UI_GRAD_HV: - x= h; y= v; break; + x = h; y = v; break; case UI_GRAD_HS: - x= h; y= s; break; + x = h; y = s; break; case UI_GRAD_H: - x= h; y= 0.5; break; + x = h; y = 0.5; break; case UI_GRAD_S: - x= s; y= 0.5; break; + x = s; y = 0.5; break; case UI_GRAD_V: - x= v; y= 0.5; break; + x = v; y = 0.5; break; } /* cursor */ - x= rect->xmin + x*(rect->xmax-rect->xmin); - y= rect->ymin + y*(rect->ymax-rect->ymin); - CLAMP(x, rect->xmin+3.0f, rect->xmax-3.0f); - CLAMP(y, rect->ymin+3.0f, rect->ymax-3.0f); + x = rect->xmin + x * (rect->xmax - rect->xmin); + y = rect->ymin + y * (rect->ymax - rect->ymin); + CLAMP(x, rect->xmin + 3.0f, rect->xmax - 3.0f); + CLAMP(y, rect->ymin + 3.0f, rect->ymax - 3.0f); ui_hsv_cursor(x, y); @@ -2118,7 +2126,7 @@ static void ui_draw_but_HSVCUBE(uiBut *but, rcti *rect) static void ui_draw_but_HSV_v(uiBut *but, rcti *rect) { uiWidgetBase wtb; - float rad= 0.5f*(rect->xmax - rect->xmin); + float rad = 0.5f * (rect->xmax - rect->xmin); float x, y; float rgb[3], hsv[3], v, range; int color_profile = but->block->color_profile; @@ -2127,7 +2135,7 @@ static void ui_draw_but_HSV_v(uiBut *but, rcti *rect) color_profile = BLI_PR_NONE; ui_get_but_vectorf(but, rgb); - rgb_to_hsv(rgb[0], rgb[1], rgb[2], hsv, hsv+1, hsv+2); + rgb_to_hsv(rgb[0], rgb[1], rgb[2], hsv, hsv + 1, hsv + 2); v = hsv[2]; if (color_profile) @@ -2135,7 +2143,7 @@ static void ui_draw_but_HSV_v(uiBut *but, rcti *rect) /* map v from property range to [0,1] */ range = but->softmax - but->softmin; - v = (v - but->softmin)/range; + v = (v - but->softmin) / range; widget_init(&wtb); @@ -2143,18 +2151,18 @@ static void ui_draw_but_HSV_v(uiBut *but, rcti *rect) round_box_edges(&wtb, UI_CNR_ALL, rect, rad); /* setup temp colors */ - wcol_tmp.outline[0]= wcol_tmp.outline[1]= wcol_tmp.outline[2]= 0; - wcol_tmp.inner[0]= wcol_tmp.inner[1]= wcol_tmp.inner[2]= 128; - wcol_tmp.shadetop= 127; - wcol_tmp.shadedown= -128; - wcol_tmp.shaded= 1; + wcol_tmp.outline[0] = wcol_tmp.outline[1] = wcol_tmp.outline[2] = 0; + wcol_tmp.inner[0] = wcol_tmp.inner[1] = wcol_tmp.inner[2] = 128; + wcol_tmp.shadetop = 127; + wcol_tmp.shadedown = -128; + wcol_tmp.shaded = 1; widgetbase_draw(&wtb, &wcol_tmp); /* cursor */ - x= rect->xmin + 0.5f * (rect->xmax-rect->xmin); - y= rect->ymin + v * (rect->ymax-rect->ymin); - CLAMP(y, rect->ymin+3.0f, rect->ymax-3.0f); + x = rect->xmin + 0.5f * (rect->xmax - rect->xmin); + y = rect->ymin + v * (rect->ymax - rect->ymin); + CLAMP(y, rect->ymin + 3.0f, rect->ymax - 3.0f); ui_hsv_cursor(x, y); @@ -2164,7 +2172,7 @@ static void ui_draw_but_HSV_v(uiBut *but, rcti *rect) /* ************ separator, for menus etc ***************** */ static void ui_draw_separator(rcti *rect, uiWidgetColors *wcol) { - int y = rect->ymin + (rect->ymax - rect->ymin)/2 - 1; + int y = rect->ymin + (rect->ymax - rect->ymin) / 2 - 1; unsigned char col[4]; col[0] = wcol->text[0]; @@ -2183,8 +2191,8 @@ static void ui_draw_separator(rcti *rect, uiWidgetColors *wcol) static void widget_numbut(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign) { uiWidgetBase wtb; - float rad= 0.5f*(rect->ymax - rect->ymin); - float textofs = rad*0.75f; + float rad = 0.5f * (rect->ymax - rect->ymin); + float textofs = rad * 0.75f; if (state & UI_SELECT) SWAP(short, wcol->shadetop, wcol->shadedown); @@ -2212,29 +2220,29 @@ int ui_link_bezier_points(rcti *rect, float coord_array[][2], int resol) { float dist, vec[4][2]; - vec[0][0]= rect->xmin; - vec[0][1]= rect->ymin; - vec[3][0]= rect->xmax; - vec[3][1]= rect->ymax; + vec[0][0] = rect->xmin; + vec[0][1] = rect->ymin; + vec[3][0] = rect->xmax; + vec[3][1] = rect->ymax; - dist= 0.5f*ABS(vec[0][0] - vec[3][0]); + dist = 0.5f * ABS(vec[0][0] - vec[3][0]); - vec[1][0]= vec[0][0]+dist; - vec[1][1]= vec[0][1]; + vec[1][0] = vec[0][0] + dist; + vec[1][1] = vec[0][1]; - vec[2][0]= vec[3][0]-dist; - vec[2][1]= vec[3][1]; + vec[2][0] = vec[3][0] - dist; + vec[2][1] = vec[3][1]; - forward_diff_bezier(vec[0][0], vec[1][0], vec[2][0], vec[3][0], coord_array[0], resol, sizeof(float)*2); - forward_diff_bezier(vec[0][1], vec[1][1], vec[2][1], vec[3][1], coord_array[0]+1, resol, sizeof(float)*2); + forward_diff_bezier(vec[0][0], vec[1][0], vec[2][0], vec[3][0], coord_array[0], resol, sizeof(float) * 2); + forward_diff_bezier(vec[0][1], vec[1][1], vec[2][1], vec[3][1], coord_array[0] + 1, resol, sizeof(float) * 2); return 1; } -#define LINK_RESOL 24 +#define LINK_RESOL 24 void ui_draw_link_bezier(rcti *rect) { - float coord_array[LINK_RESOL+1][2]; + float coord_array[LINK_RESOL + 1][2]; if (ui_link_bezier_points(rect, coord_array, LINK_RESOL)) { /* we can reuse the dist variable here to increment the GL curve eval amount*/ @@ -2260,19 +2268,19 @@ void uiWidgetScrollDraw(uiWidgetColors *wcol, rcti *rect, rcti *slider, int stat uiWidgetBase wtb; float rad; int horizontal; - short outline=0; + short outline = 0; widget_init(&wtb); /* determine horizontal/vertical */ - horizontal= (rect->xmax - rect->xmin > rect->ymax - rect->ymin); + horizontal = (rect->xmax - rect->xmin > rect->ymax - rect->ymin); if (horizontal) - rad= 0.5f*(rect->ymax - rect->ymin); + rad = 0.5f * (rect->ymax - rect->ymin); else - rad= 0.5f*(rect->xmax - rect->xmin); + rad = 0.5f * (rect->xmax - rect->xmin); - wtb.shadedir= (horizontal)? 1: 0; + wtb.shadedir = (horizontal) ? 1 : 0; /* draw back part, colors swapped and shading inverted */ if (horizontal) @@ -2282,25 +2290,25 @@ void uiWidgetScrollDraw(uiWidgetColors *wcol, rcti *rect, rcti *slider, int stat widgetbase_draw(&wtb, wcol); /* slider */ - if (slider->xmax-slider->xmin<2 || slider->ymax-slider->ymin<2); + if (slider->xmax - slider->xmin < 2 || slider->ymax - slider->ymin < 2) ; else { SWAP(short, wcol->shadetop, wcol->shadedown); copy_v4_v4_char(wcol->inner, wcol->item); - if (wcol->shadetop>wcol->shadedown) - wcol->shadetop+= 20; /* XXX violates themes... */ - else wcol->shadedown+= 20; + if (wcol->shadetop > wcol->shadedown) + wcol->shadetop += 20; /* XXX violates themes... */ + else wcol->shadedown += 20; if (state & UI_SCROLL_PRESSED) { - wcol->inner[0]= wcol->inner[0]>=250? 255 : wcol->inner[0]+5; - wcol->inner[1]= wcol->inner[1]>=250? 255 : wcol->inner[1]+5; - wcol->inner[2]= wcol->inner[2]>=250? 255 : wcol->inner[2]+5; + wcol->inner[0] = wcol->inner[0] >= 250 ? 255 : wcol->inner[0] + 5; + wcol->inner[1] = wcol->inner[1] >= 250 ? 255 : wcol->inner[1] + 5; + wcol->inner[2] = wcol->inner[2] >= 250 ? 255 : wcol->inner[2] + 5; } /* draw */ - wtb.emboss= 0; /* only emboss once */ + wtb.emboss = 0; /* only emboss once */ /* exception for progress bar */ if (state & UI_SCROLL_NO_OUTLINE) @@ -2309,10 +2317,10 @@ void uiWidgetScrollDraw(uiWidgetColors *wcol, rcti *rect, rcti *slider, int stat round_box_edges(&wtb, UI_CNR_ALL, slider, rad); if (state & UI_SCROLL_ARROWS) { - if (wcol->item[0] > 48) wcol->item[0]-= 48; - if (wcol->item[1] > 48) wcol->item[1]-= 48; - if (wcol->item[2] > 48) wcol->item[2]-= 48; - wcol->item[3]= 255; + if (wcol->item[0] > 48) wcol->item[0] -= 48; + if (wcol->item[1] > 48) wcol->item[1] -= 48; + if (wcol->item[2] > 48) wcol->item[2] -= 48; + wcol->item[3] = 255; if (horizontal) { widget_scroll_circle(&wtb.tria1, slider, 0.6f, 'l'); @@ -2338,24 +2346,24 @@ static void widget_scroll(uiBut *but, uiWidgetColors *wcol, rcti *rect, int stat int horizontal; /* calculate slider part */ - value= ui_get_but_val(but); + value = ui_get_but_val(but); - size= (but->softmax + but->a1 - but->softmin); - size= MAX2(size, 2); + size = (but->softmax + but->a1 - but->softmin); + size = MAX2(size, 2); /* position */ - rect1= *rect; + rect1 = *rect; /* determine horizontal/vertical */ - horizontal= (rect->xmax - rect->xmin > rect->ymax - rect->ymin); + horizontal = (rect->xmax - rect->xmin > rect->ymax - rect->ymin); if (horizontal) { - fac= (rect->xmax - rect->xmin)/(size); - rect1.xmin = rect1.xmin + ceilf(fac*((float)value - but->softmin)); - rect1.xmax = rect1.xmin + ceilf(fac*(but->a1 - but->softmin)); + fac = (rect->xmax - rect->xmin) / (size); + rect1.xmin = rect1.xmin + ceilf(fac * ((float)value - but->softmin)); + rect1.xmax = rect1.xmin + ceilf(fac * (but->a1 - but->softmin)); /* ensure minimium size */ - min= rect->ymax - rect->ymin; + min = rect->ymax - rect->ymin; if (rect1.xmax - rect1.xmin < min) { rect1.xmax = rect1.xmin + min; @@ -2367,12 +2375,12 @@ static void widget_scroll(uiBut *but, uiWidgetColors *wcol, rcti *rect, int stat } } else { - fac= (rect->ymax - rect->ymin)/(size); - rect1.ymax = rect1.ymax - ceilf(fac*((float)value - but->softmin)); - rect1.ymin = rect1.ymax - ceilf(fac*(but->a1 - but->softmin)); + fac = (rect->ymax - rect->ymin) / (size); + rect1.ymax = rect1.ymax - ceilf(fac * ((float)value - but->softmin)); + rect1.ymin = rect1.ymax - ceilf(fac * (but->a1 - but->softmin)); /* ensure minimium size */ - min= rect->xmax - rect->xmin; + min = rect->xmax - rect->xmin; if (rect1.ymax - rect1.ymin < min) { rect1.ymax = rect1.ymin + min; @@ -2385,9 +2393,9 @@ static void widget_scroll(uiBut *but, uiWidgetColors *wcol, rcti *rect, int stat } if (state & UI_SELECT) - state= UI_SCROLL_PRESSED; + state = UI_SCROLL_PRESSED; else - state= 0; + state = 0; uiWidgetScrollDraw(wcol, rect, &rect1, state); } @@ -2405,7 +2413,7 @@ static void widget_progressbar(uiBut *but, uiWidgetColors *wcol, rcti *rect, int w = value * (rect_prog.xmax - rect_prog.xmin); /* ensure minimium size */ - min= rect_prog.ymax - rect_prog.ymin; + min = rect_prog.ymax - rect_prog.ymin; w = MAX2(w, min); rect_bar.xmax = rect_bar.xmin + w; @@ -2425,8 +2433,8 @@ static void widget_link(uiBut *but, uiWidgetColors *UNUSED(wcol), rcti *rect, in UI_ThemeColor(TH_TEXT_HI); - rectlink.xmin = (rect->xmin+rect->xmax)/2; - rectlink.ymin = (rect->ymin+rect->ymax)/2; + rectlink.xmin = (rect->xmin + rect->xmax) / 2; + rectlink.ymin = (rect->ymin + rect->ymax) / 2; rectlink.xmax = but->linkto[0]; rectlink.ymax = but->linkto[1]; @@ -2448,17 +2456,17 @@ static void widget_numslider(uiBut *but, uiWidgetColors *wcol, rcti *rect, int s /* backdrop first */ /* fully rounded */ - offs= 0.5f*(rect->ymax - rect->ymin); - toffs = offs*0.75f; + offs = 0.5f * (rect->ymax - rect->ymin); + toffs = offs * 0.75f; round_box_edges(&wtb, roundboxalign, rect, offs); - wtb.outline= 0; + wtb.outline = 0; widgetbase_draw(&wtb, wcol); /* draw left/right parts only when not in text editing */ if (!(state & UI_TEXTINPUT)) { - /* slider part */ + /* slider part */ copy_v3_v3_char(outline, wcol->outline); copy_v3_v3_char(wcol->outline, wcol->item); copy_v3_v3_char(wcol->inner, wcol->item); @@ -2466,24 +2474,24 @@ static void widget_numslider(uiBut *but, uiWidgetColors *wcol, rcti *rect, int s if (!(state & UI_SELECT)) SWAP(short, wcol->shadetop, wcol->shadedown); - rect1= *rect; + rect1 = *rect; - value= ui_get_but_val(but); - fac= ((float)value-but->softmin)*(rect1.xmax - rect1.xmin - offs)/(but->softmax - but->softmin); + value = ui_get_but_val(but); + fac = ((float)value - but->softmin) * (rect1.xmax - rect1.xmin - offs) / (but->softmax - but->softmin); /* left part of slider, always rounded */ - rect1.xmax = rect1.xmin + ceil(offs+1.0f); + rect1.xmax = rect1.xmin + ceil(offs + 1.0f); round_box_edges(&wtb1, roundboxalign & ~(UI_CNR_TOP_RIGHT | UI_CNR_BOTTOM_RIGHT), &rect1, offs); - wtb1.outline= 0; + wtb1.outline = 0; widgetbase_draw(&wtb1, wcol); /* right part of slider, interpolate roundness */ rect1.xmax = rect1.xmin + fac + offs; - rect1.xmin+= floor(offs-1.0f); + rect1.xmin += floor(offs - 1.0f); if (rect1.xmax + offs > rect->xmax) - offs*= (rect1.xmax + offs - rect->xmax)/offs; + offs *= (rect1.xmax + offs - rect->xmax) / offs; else - offs= 0.0f; + offs = 0.0f; round_box_edges(&wtb1, roundboxalign & ~(UI_CNR_TOP_LEFT | UI_CNR_BOTTOM_LEFT), &rect1, offs); widgetbase_draw(&wtb1, wcol); @@ -2494,8 +2502,8 @@ static void widget_numslider(uiBut *but, uiWidgetColors *wcol, rcti *rect, int s } /* outline */ - wtb.outline= 1; - wtb.inner= 0; + wtb.outline = 1; + wtb.inner = 0; widgetbase_draw(&wtb, wcol); /* text space */ @@ -2512,14 +2520,14 @@ static void widget_swatch(uiBut *but, uiWidgetColors *wcol, rcti *rect, int stat float col[4]; int color_profile = but->block->color_profile; - col[3]= 1.0f; + col[3] = 1.0f; if (but->rnaprop) { if (RNA_property_subtype(but->rnaprop) == PROP_COLOR_GAMMA) color_profile = BLI_PR_NONE; - if (RNA_property_array_length(&but->rnapoin, but->rnaprop)==4) { - col[3]= RNA_property_float_get_index(&but->rnapoin, but->rnaprop, 3); + if (RNA_property_array_length(&but->rnapoin, but->rnaprop) == 4) { + col[3] = RNA_property_float_get_index(&but->rnapoin, but->rnaprop, 3); } } @@ -2530,15 +2538,15 @@ static void widget_swatch(uiBut *but, uiWidgetColors *wcol, rcti *rect, int stat ui_get_but_vectorf(but, col); - if (state & (UI_BUT_ANIMATED|UI_BUT_ANIMATED_KEY|UI_BUT_DRIVEN|UI_BUT_REDALERT)) { + if (state & (UI_BUT_ANIMATED | UI_BUT_ANIMATED_KEY | UI_BUT_DRIVEN | UI_BUT_REDALERT)) { // draw based on state - color for keyed etc widgetbase_draw(&wtb, wcol); // inset to draw swatch color - rect->xmin+= SWATCH_KEYED_BORDER; - rect->xmax-= SWATCH_KEYED_BORDER; - rect->ymin+= SWATCH_KEYED_BORDER; - rect->ymax-= SWATCH_KEYED_BORDER; + rect->xmin += SWATCH_KEYED_BORDER; + rect->xmax -= SWATCH_KEYED_BORDER; + rect->ymin += SWATCH_KEYED_BORDER; + rect->ymax -= SWATCH_KEYED_BORDER; round_box_edges(&wtb, roundboxalign, rect, 5.0f); } @@ -2557,11 +2565,11 @@ static void widget_swatch(uiBut *but, uiWidgetColors *wcol, rcti *rect, int stat static void widget_icon_has_anim(uiBut *UNUSED(but), uiWidgetColors *wcol, rcti *rect, int state, int UNUSED(roundboxalign)) { - if (state & (UI_BUT_ANIMATED|UI_BUT_ANIMATED_KEY|UI_BUT_DRIVEN|UI_BUT_REDALERT)) { + if (state & (UI_BUT_ANIMATED | UI_BUT_ANIMATED_KEY | UI_BUT_DRIVEN | UI_BUT_REDALERT)) { uiWidgetBase wtb; widget_init(&wtb); - wtb.outline= 0; + wtb.outline = 0; /* rounded */ round_box_edges(&wtb, UI_CNR_ALL, rect, 10.0f); @@ -2602,7 +2610,7 @@ static void widget_menubut(uiWidgetColors *wcol, rcti *rect, int UNUSED(state), widgetbase_draw(&wtb, wcol); /* text space */ - rect->xmax -= (rect->ymax-rect->ymin); + rect->xmax -= (rect->ymax - rect->ymin); } static void widget_menuiconbut(uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int roundboxalign) @@ -2622,7 +2630,7 @@ static void widget_menunodebut(uiWidgetColors *wcol, rcti *rect, int UNUSED(stat { /* silly node link button hacks */ uiWidgetBase wtb; - uiWidgetColors wcol_backup= *wcol; + uiWidgetColors wcol_backup = *wcol; widget_init(&wtb); @@ -2638,14 +2646,14 @@ static void widget_menunodebut(uiWidgetColors *wcol, rcti *rect, int UNUSED(stat /* decoration */ widgetbase_draw(&wtb, wcol); - *wcol= wcol_backup; + *wcol = wcol_backup; } static void widget_pulldownbut(uiWidgetColors *wcol, rcti *rect, int state, int UNUSED(roundboxalign)) { if (state & UI_ACTIVE) { uiWidgetBase wtb; - float rad= 0.5f*(rect->ymax - rect->ymin); // 4.0f + float rad = 0.5f * (rect->ymax - rect->ymin); // 4.0f widget_init(&wtb); @@ -2663,7 +2671,7 @@ static void widget_menu_itembut(uiWidgetColors *wcol, rcti *rect, int UNUSED(sta widget_init(&wtb); /* not rounded, no outline */ - wtb.outline= 0; + wtb.outline = 0; round_box_edges(&wtb, 0, rect, 0.0f); widgetbase_draw(&wtb, wcol); @@ -2676,7 +2684,7 @@ static void widget_list_itembut(uiWidgetColors *wcol, rcti *rect, int UNUSED(sta widget_init(&wtb); /* rounded, but no outline */ - wtb.outline= 0; + wtb.outline = 0; round_box_edges(&wtb, UI_CNR_ALL, rect, 4.0f); widgetbase_draw(&wtb, wcol); @@ -2685,20 +2693,20 @@ static void widget_list_itembut(uiWidgetColors *wcol, rcti *rect, int UNUSED(sta static void widget_optionbut(uiWidgetColors *wcol, rcti *rect, int state, int UNUSED(roundboxalign)) { uiWidgetBase wtb; - rcti recttemp= *rect; + rcti recttemp = *rect; int delta; widget_init(&wtb); /* square */ - recttemp.xmax = recttemp.xmin + (recttemp.ymax-recttemp.ymin); + recttemp.xmax = recttemp.xmin + (recttemp.ymax - recttemp.ymin); /* smaller */ - delta= 1 + (recttemp.ymax-recttemp.ymin)/8; - recttemp.xmin+= delta; - recttemp.ymin+= delta; - recttemp.xmax-= delta; - recttemp.ymax-= delta; + delta = 1 + (recttemp.ymax - recttemp.ymin) / 8; + recttemp.xmin += delta; + recttemp.ymin += delta; + recttemp.xmax -= delta; + recttemp.ymax -= delta; /* half rounded */ round_box_edges(&wtb, UI_CNR_ALL, &recttemp, 4.0f); @@ -2711,7 +2719,7 @@ static void widget_optionbut(uiWidgetColors *wcol, rcti *rect, int state, int UN widgetbase_draw(&wtb, wcol); /* text space */ - rect->xmin += (rect->ymax-rect->ymin)*0.7 + delta; + rect->xmin += (rect->ymax - rect->ymin) * 0.7 + delta; } @@ -2752,7 +2760,7 @@ static void widget_box(uiBut *but, uiWidgetColors *wcol, rcti *rect, int UNUSED( /* store the box bg as gl clearcolor, to retrieve later when drawing semi-transparent rects * over the top to indicate disabled buttons */ /* XXX, this doesnt work right since the color applies to buttons outside the box too. */ - glClearColor(wcol->inner[0]/255.0, wcol->inner[1]/255.0, wcol->inner[2]/255.0, 1.0); + glClearColor(wcol->inner[0] / 255.0, wcol->inner[1] / 255.0, wcol->inner[2] / 255.0, 1.0); copy_v3_v3_char(wcol->inner, old_col); } @@ -2773,7 +2781,7 @@ static void widget_but(uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int static void widget_roundbut(uiWidgetColors *wcol, rcti *rect, int UNUSED(state), int roundboxalign) { uiWidgetBase wtb; - float rad= 5.0f; //0.5f*(rect->ymax - rect->ymin); + float rad = 5.0f; //0.5f*(rect->ymax - rect->ymin); widget_init(&wtb); @@ -2789,7 +2797,7 @@ static void widget_draw_extra_mask(const bContext *C, uiBut *but, uiWidgetType * unsigned char col[4]; /* state copy! */ - wt->wcol= *(wt->wcol_theme); + wt->wcol = *(wt->wcol_theme); widget_init(&wtb); @@ -2807,8 +2815,8 @@ static void widget_draw_extra_mask(const bContext *C, uiBut *but, uiWidgetType * /* outline */ round_box_edges(&wtb, UI_CNR_ALL, rect, 5.0f); - wtb.outline= 1; - wtb.inner= 0; + wtb.outline = 1; + wtb.inner = 0; widgetbase_draw(&wtb, &wt->wcol); } @@ -2826,61 +2834,61 @@ static void widget_disabled(rcti *rect) /* need -1 and +1 to make it work right for aligned buttons, * but problem may be somewhere else? */ - glRectf(rect->xmin-1, rect->ymin-1, rect->xmax, rect->ymax+1); + glRectf(rect->xmin - 1, rect->ymin - 1, rect->xmax, rect->ymax + 1); glDisable(GL_BLEND); } static uiWidgetType *widget_type(uiWidgetTypeEnum type) { - bTheme *btheme= UI_GetTheme(); + bTheme *btheme = UI_GetTheme(); static uiWidgetType wt; /* defaults */ - wt.wcol_theme= &btheme->tui.wcol_regular; - wt.wcol_state= &btheme->tui.wcol_state; - wt.state= widget_state; - wt.draw= widget_but; - wt.custom= NULL; - wt.text= widget_draw_text_icon; - - switch(type) { + wt.wcol_theme = &btheme->tui.wcol_regular; + wt.wcol_state = &btheme->tui.wcol_state; + wt.state = widget_state; + wt.draw = widget_but; + wt.custom = NULL; + wt.text = widget_draw_text_icon; + + switch (type) { case UI_WTYPE_REGULAR: break; case UI_WTYPE_LABEL: - wt.draw= NULL; - wt.state= widget_state_label; + wt.draw = NULL; + wt.state = widget_state_label; break; case UI_WTYPE_TOGGLE: - wt.wcol_theme= &btheme->tui.wcol_toggle; + wt.wcol_theme = &btheme->tui.wcol_toggle; break; case UI_WTYPE_OPTION: - wt.wcol_theme= &btheme->tui.wcol_option; - wt.draw= widget_optionbut; + wt.wcol_theme = &btheme->tui.wcol_option; + wt.draw = widget_optionbut; break; case UI_WTYPE_RADIO: - wt.wcol_theme= &btheme->tui.wcol_radio; - wt.draw= widget_radiobut; + wt.wcol_theme = &btheme->tui.wcol_radio; + wt.draw = widget_radiobut; break; case UI_WTYPE_NUMBER: - wt.wcol_theme= &btheme->tui.wcol_num; - wt.draw= widget_numbut; + wt.wcol_theme = &btheme->tui.wcol_num; + wt.draw = widget_numbut; break; case UI_WTYPE_SLIDER: - wt.wcol_theme= &btheme->tui.wcol_numslider; - wt.custom= widget_numslider; - wt.state= widget_state_numslider; + wt.wcol_theme = &btheme->tui.wcol_numslider; + wt.custom = widget_numslider; + wt.state = widget_state_numslider; break; case UI_WTYPE_EXEC: - wt.wcol_theme= &btheme->tui.wcol_tool; - wt.draw= widget_roundbut; + wt.wcol_theme = &btheme->tui.wcol_tool; + wt.draw = widget_roundbut; break; case UI_WTYPE_TOOLTIP: @@ -2889,10 +2897,10 @@ static uiWidgetType *widget_type(uiWidgetTypeEnum type) break; - /* strings */ + /* strings */ case UI_WTYPE_NAME: - wt.wcol_theme= &btheme->tui.wcol_text; - wt.draw= widget_textbut; + wt.wcol_theme = &btheme->tui.wcol_text; + wt.draw = widget_textbut; break; case UI_WTYPE_NAME_LINK: @@ -2905,57 +2913,57 @@ static uiWidgetType *widget_type(uiWidgetTypeEnum type) break; - /* start menus */ + /* start menus */ case UI_WTYPE_MENU_RADIO: - wt.wcol_theme= &btheme->tui.wcol_menu; - wt.draw= widget_menubut; + wt.wcol_theme = &btheme->tui.wcol_menu; + wt.draw = widget_menubut; break; case UI_WTYPE_MENU_ICON_RADIO: - wt.wcol_theme= &btheme->tui.wcol_menu; - wt.draw= widget_menuiconbut; + wt.wcol_theme = &btheme->tui.wcol_menu; + wt.draw = widget_menuiconbut; break; case UI_WTYPE_MENU_POINTER_LINK: - wt.wcol_theme= &btheme->tui.wcol_menu; - wt.draw= widget_menubut; + wt.wcol_theme = &btheme->tui.wcol_menu; + wt.draw = widget_menubut; break; case UI_WTYPE_MENU_NODE_LINK: - wt.wcol_theme= &btheme->tui.wcol_menu; - wt.draw= widget_menunodebut; + wt.wcol_theme = &btheme->tui.wcol_menu; + wt.draw = widget_menunodebut; break; case UI_WTYPE_PULLDOWN: - wt.wcol_theme= &btheme->tui.wcol_pulldown; - wt.draw= widget_pulldownbut; - wt.state= widget_state_pulldown; + wt.wcol_theme = &btheme->tui.wcol_pulldown; + wt.draw = widget_pulldownbut; + wt.state = widget_state_pulldown; break; - /* in menus */ + /* in menus */ case UI_WTYPE_MENU_ITEM: - wt.wcol_theme= &btheme->tui.wcol_menu_item; - wt.draw= widget_menu_itembut; - wt.state= widget_state_menu_item; + wt.wcol_theme = &btheme->tui.wcol_menu_item; + wt.draw = widget_menu_itembut; + wt.state = widget_state_menu_item; break; case UI_WTYPE_MENU_BACK: - wt.wcol_theme= &btheme->tui.wcol_menu_back; - wt.draw= widget_menu_back; + wt.wcol_theme = &btheme->tui.wcol_menu_back; + wt.draw = widget_menu_back; break; - /* specials */ + /* specials */ case UI_WTYPE_ICON: - wt.custom= widget_icon_has_anim; + wt.custom = widget_icon_has_anim; break; case UI_WTYPE_SWATCH: - wt.custom= widget_swatch; + wt.custom = widget_swatch; break; case UI_WTYPE_BOX: - wt.custom= widget_box; - wt.wcol_theme= &btheme->tui.wcol_box; + wt.custom = widget_box; + wt.wcol_theme = &btheme->tui.wcol_box; break; case UI_WTYPE_RGB_PICKER: @@ -2965,19 +2973,19 @@ static uiWidgetType *widget_type(uiWidgetTypeEnum type) break; case UI_WTYPE_SCROLL: - wt.wcol_theme= &btheme->tui.wcol_scroll; - wt.state= widget_state_nothing; - wt.custom= widget_scroll; + wt.wcol_theme = &btheme->tui.wcol_scroll; + wt.state = widget_state_nothing; + wt.custom = widget_scroll; break; case UI_WTYPE_LISTITEM: - wt.wcol_theme= &btheme->tui.wcol_list_item; - wt.draw= widget_list_itembut; + wt.wcol_theme = &btheme->tui.wcol_list_item; + wt.draw = widget_list_itembut; break; case UI_WTYPE_PROGRESSBAR: - wt.wcol_theme= &btheme->tui.wcol_progress; - wt.custom= widget_progressbar; + wt.wcol_theme = &btheme->tui.wcol_progress; + wt.custom = widget_progressbar; break; } @@ -2991,11 +2999,11 @@ static int widget_roundbox_set(uiBut *but, rcti *rect) if (but->flag & UI_BUT_ALIGN) { if (but->flag & UI_BUT_ALIGN_TOP) - rect->ymax+= 1; + rect->ymax += 1; if (but->flag & UI_BUT_ALIGN_LEFT) - rect->xmin-= 1; + rect->xmin -= 1; - switch(but->flag & UI_BUT_ALIGN) { + switch (but->flag & UI_BUT_ALIGN) { case UI_BUT_ALIGN_TOP: return UI_CNR_BOTTOM_LEFT | UI_CNR_BOTTOM_RIGHT; case UI_BUT_ALIGN_DOWN: @@ -3023,13 +3031,13 @@ static int widget_roundbox_set(uiBut *but, rcti *rect) /* conversion from old to new buttons, so still messy */ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rcti *rect) { - bTheme *btheme= UI_GetTheme(); - ThemeUI *tui= &btheme->tui; - uiFontStyle *fstyle= &style->widget; - uiWidgetType *wt= NULL; + bTheme *btheme = UI_GetTheme(); + ThemeUI *tui = &btheme->tui; + uiFontStyle *fstyle = &style->widget; + uiWidgetType *wt = NULL; /* handle menus separately */ - if (but->dt==UI_EMBOSSP) { + if (but->dt == UI_EMBOSSP) { switch (but->type) { case LABEL: widget_draw_text_icon(&style->widgetlabel, &tui->wcol_menu_back, but, rect); @@ -3039,12 +3047,12 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct break; default: - wt= widget_type(UI_WTYPE_MENU_ITEM); + wt = widget_type(UI_WTYPE_MENU_ITEM); } } - else if (but->dt==UI_EMBOSSN) { + else if (but->dt == UI_EMBOSSN) { /* "nothing" */ - wt= widget_type(UI_WTYPE_ICON); + wt = widget_type(UI_WTYPE_ICON); } else { @@ -3053,8 +3061,8 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct if (but->block->flag & UI_BLOCK_LOOP) widget_draw_text_icon(&style->widgetlabel, &tui->wcol_menu_back, but, rect); else { - wt= widget_type(UI_WTYPE_LABEL); - fstyle= &style->widgetlabel; + wt = widget_type(UI_WTYPE_LABEL); + fstyle = &style->widgetlabel; } break; @@ -3062,55 +3070,55 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct break; case BUT: - wt= widget_type(UI_WTYPE_EXEC); + wt = widget_type(UI_WTYPE_EXEC); break; case NUM: - wt= widget_type(UI_WTYPE_NUMBER); + wt = widget_type(UI_WTYPE_NUMBER); break; case NUMSLI: case HSVSLI: - wt= widget_type(UI_WTYPE_SLIDER); + wt = widget_type(UI_WTYPE_SLIDER); break; case ROW: - wt= widget_type(UI_WTYPE_RADIO); + wt = widget_type(UI_WTYPE_RADIO); break; case LISTROW: - wt= widget_type(UI_WTYPE_LISTITEM); + wt = widget_type(UI_WTYPE_LISTITEM); break; case TEX: - wt= widget_type(UI_WTYPE_NAME); + wt = widget_type(UI_WTYPE_NAME); break; case SEARCH_MENU: - wt= widget_type(UI_WTYPE_NAME); + wt = widget_type(UI_WTYPE_NAME); if (but->block->flag & UI_BLOCK_LOOP) - wt->wcol_theme= &btheme->tui.wcol_menu_back; + wt->wcol_theme = &btheme->tui.wcol_menu_back; break; case TOGBUT: case TOG: case TOGN: case TOG3: - wt= widget_type(UI_WTYPE_TOGGLE); + wt = widget_type(UI_WTYPE_TOGGLE); break; case OPTION: case OPTIONN: if (!(but->flag & UI_HAS_ICON)) { - wt= widget_type(UI_WTYPE_OPTION); + wt = widget_type(UI_WTYPE_OPTION); but->flag |= UI_TEXT_LEFT; } else - wt= widget_type(UI_WTYPE_TOGGLE); + wt = widget_type(UI_WTYPE_TOGGLE); /* option buttons have strings outside, on menus use different colors */ if (but->block->flag & UI_BLOCK_LOOP) - wt->state= widget_state_option_menu; + wt->state = widget_state_option_menu; break; @@ -3118,34 +3126,34 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct case BLOCK: case ICONTEXTROW: if (but->flag & UI_BUT_NODE_LINK) - wt= widget_type(UI_WTYPE_MENU_NODE_LINK); + wt = widget_type(UI_WTYPE_MENU_NODE_LINK); else if (!but->str[0] && but->icon) - wt= widget_type(UI_WTYPE_MENU_ICON_RADIO); + wt = widget_type(UI_WTYPE_MENU_ICON_RADIO); else - wt= widget_type(UI_WTYPE_MENU_RADIO); + wt = widget_type(UI_WTYPE_MENU_RADIO); break; case PULLDOWN: - wt= widget_type(UI_WTYPE_PULLDOWN); + wt = widget_type(UI_WTYPE_PULLDOWN); break; case BUTM: - wt= widget_type(UI_WTYPE_MENU_ITEM); + wt = widget_type(UI_WTYPE_MENU_ITEM); break; case COL: - wt= widget_type(UI_WTYPE_SWATCH); + wt = widget_type(UI_WTYPE_SWATCH); break; case ROUNDBOX: case LISTBOX: - wt= widget_type(UI_WTYPE_BOX); + wt = widget_type(UI_WTYPE_BOX); break; case LINK: case INLINK: - wt= widget_type(UI_WTYPE_ICON); - wt->custom= widget_link; + wt = widget_type(UI_WTYPE_ICON); + wt->custom = widget_link; break; @@ -3193,12 +3201,12 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct break; case PROGRESSBAR: - wt= widget_type(UI_WTYPE_PROGRESSBAR); - fstyle= &style->widgetlabel; + wt = widget_type(UI_WTYPE_PROGRESSBAR); + fstyle = &style->widgetlabel; break; case SCROLL: - wt= widget_type(UI_WTYPE_SCROLL); + wt = widget_type(UI_WTYPE_SCROLL); break; case TRACKPREVIEW: @@ -3206,17 +3214,17 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct break; default: - wt= widget_type(UI_WTYPE_REGULAR); + wt = widget_type(UI_WTYPE_REGULAR); } } if (wt) { - rcti disablerect= *rect; /* rect gets clipped smaller for text */ + rcti disablerect = *rect; /* rect gets clipped smaller for text */ int roundboxalign, state; - roundboxalign= widget_roundbox_set(but, rect); + roundboxalign = widget_roundbox_set(but, rect); - state= but->flag; + state = but->flag; if (but->editstr) state |= UI_TEXTINPUT; wt->state(wt, state); @@ -3226,15 +3234,15 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct wt->draw(&wt->wcol, rect, state, roundboxalign); wt->text(fstyle, &wt->wcol, but, rect); - if (state & (UI_BUT_DISABLED|UI_BUT_INACTIVE)) - if (but->dt!=UI_EMBOSSP) + if (state & (UI_BUT_DISABLED | UI_BUT_INACTIVE)) + if (but->dt != UI_EMBOSSP) widget_disabled(&disablerect); } } void ui_draw_menu_back(uiStyle *UNUSED(style), uiBlock *block, rcti *rect) { - uiWidgetType *wt= widget_type(UI_WTYPE_MENU_BACK); + uiWidgetType *wt = widget_type(UI_WTYPE_MENU_BACK); wt->state(wt, 0); if (block) @@ -3245,18 +3253,18 @@ void ui_draw_menu_back(uiStyle *UNUSED(style), uiBlock *block, rcti *rect) if (block) { if (block->flag & UI_BLOCK_CLIPTOP) { /* XXX no scaling for UI here yet */ - glColor3ubv((unsigned char*)wt->wcol.text); - UI_DrawTriIcon((rect->xmax+rect->xmin)/2, rect->ymax-8, 't'); + glColor3ubv((unsigned char *)wt->wcol.text); + UI_DrawTriIcon((rect->xmax + rect->xmin) / 2, rect->ymax - 8, 't'); } if (block->flag & UI_BLOCK_CLIPBOTTOM) { /* XXX no scaling for UI here yet */ - glColor3ubv((unsigned char*)wt->wcol.text); - UI_DrawTriIcon((rect->xmax+rect->xmin)/2, rect->ymin+10, 'v'); + glColor3ubv((unsigned char *)wt->wcol.text); + UI_DrawTriIcon((rect->xmax + rect->xmin) / 2, rect->ymin + 10, 'v'); } } } -uiWidgetColors* ui_tooltip_get_theme(void) { +uiWidgetColors *ui_tooltip_get_theme(void) { uiWidgetType *wt = widget_type(UI_WTYPE_TOOLTIP); return wt->wcol_theme; } @@ -3271,7 +3279,7 @@ void ui_draw_tooltip_background(uiStyle *UNUSED(style), uiBlock *UNUSED(block), void ui_draw_search_back(uiStyle *UNUSED(style), uiBlock *block, rcti *rect) { - uiWidgetType *wt= widget_type(UI_WTYPE_BOX); + uiWidgetType *wt = widget_type(UI_WTYPE_BOX); glEnable(GL_BLEND); widget_softshadow(rect, UI_CNR_ALL, 5.0f, 8.0f); @@ -3290,44 +3298,44 @@ void ui_draw_search_back(uiStyle *UNUSED(style), uiBlock *block, rcti *rect) /* state: UI_ACTIVE or 0 */ void ui_draw_menu_item(uiFontStyle *fstyle, rcti *rect, const char *name, int iconid, int state) { - uiWidgetType *wt= widget_type(UI_WTYPE_MENU_ITEM); - rcti _rect= *rect; + uiWidgetType *wt = widget_type(UI_WTYPE_MENU_ITEM); + rcti _rect = *rect; char *cpoin; wt->state(wt, state); wt->draw(&wt->wcol, rect, 0, 0); uiStyleFontSet(fstyle); - fstyle->align= UI_STYLE_TEXT_LEFT; + fstyle->align = UI_STYLE_TEXT_LEFT; /* text location offset */ - rect->xmin+=5; - if (iconid) rect->xmin+= UI_DPI_ICON_SIZE; + rect->xmin += 5; + if (iconid) rect->xmin += UI_DPI_ICON_SIZE; /* cut string in 2 parts? */ - cpoin= strchr(name, '|'); + cpoin = strchr(name, '|'); if (cpoin) { - *cpoin= 0; - rect->xmax -= BLF_width(fstyle->uifont_id, cpoin+1) + 10; + *cpoin = 0; + rect->xmax -= BLF_width(fstyle->uifont_id, cpoin + 1) + 10; } - glColor3ubv((unsigned char*)wt->wcol.text); + glColor3ubv((unsigned char *)wt->wcol.text); uiStyleFontDraw(fstyle, rect, name); /* part text right aligned */ if (cpoin) { - fstyle->align= UI_STYLE_TEXT_RIGHT; + fstyle->align = UI_STYLE_TEXT_RIGHT; rect->xmax = _rect.xmax - 5; - uiStyleFontDraw(fstyle, rect, cpoin+1); - *cpoin= '|'; + uiStyleFontDraw(fstyle, rect, cpoin + 1); + *cpoin = '|'; } /* restore rect, was messed with */ - *rect= _rect; + *rect = _rect; if (iconid) { - int xs= rect->xmin+4; - int ys= 1 + (rect->ymin+rect->ymax- UI_DPI_ICON_SIZE)/2; + int xs = rect->xmin + 4; + int ys = 1 + (rect->ymin + rect->ymax - UI_DPI_ICON_SIZE) / 2; glEnable(GL_BLEND); UI_icon_draw_aspect(xs, ys, iconid, 1.2f, 0.5f); /* XXX scale weak get from fstyle? */ glDisable(GL_BLEND); @@ -3338,7 +3346,7 @@ void ui_draw_preview_item(uiFontStyle *fstyle, rcti *rect, const char *name, int { rcti trect = *rect, bg_rect; float font_dims[2] = {0.0f, 0.0f}; - uiWidgetType *wt= widget_type(UI_WTYPE_MENU_ITEM); + uiWidgetType *wt = widget_type(UI_WTYPE_MENU_ITEM); unsigned char bg_col[3]; wt->state(wt, state); @@ -3366,15 +3374,15 @@ void ui_draw_preview_item(uiFontStyle *fstyle, rcti *rect, const char *name, int bg_rect.xmax = rect->xmax - PREVIEW_PAD; UI_GetThemeColor3ubv(TH_BUTBACK, bg_col); - glColor4ubv((unsigned char*)wt->wcol.item); + glColor4ubv((unsigned char *)wt->wcol.item); glEnable(GL_BLEND); glRecti(bg_rect.xmin, bg_rect.ymin, bg_rect.xmax, bg_rect.ymax); glDisable(GL_BLEND); if (state == UI_ACTIVE) - glColor3ubv((unsigned char*)wt->wcol.text); + glColor3ubv((unsigned char *)wt->wcol.text); else - glColor3ubv((unsigned char*)wt->wcol.text_sel); + glColor3ubv((unsigned char *)wt->wcol.text_sel); uiStyleFontDraw(fstyle, &trect, name); } diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index 64061a8f76b..9f4a351c66d 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -61,9 +61,9 @@ /* global for themes */ typedef void (*VectorDrawFunc)(int x, int y, int w, int h, float alpha); -static bTheme *theme_active=NULL; -static int theme_spacetype= SPACE_VIEW3D; -static int theme_regionid= RGN_TYPE_WINDOW; +static bTheme *theme_active = NULL; +static int theme_spacetype = SPACE_VIEW3D; +static int theme_regionid = RGN_TYPE_WINDOW; void ui_resources_init(void) { @@ -82,393 +82,393 @@ void ui_resources_free(void) const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid) { - ThemeSpace *ts= NULL; - static char error[4]={240, 0, 240, 255}; - static char alert[4]={240, 60, 60, 255}; - static char headerdesel[4]={0,0,0,255}; + ThemeSpace *ts = NULL; + static char error[4] = {240, 0, 240, 255}; + static char alert[4] = {240, 60, 60, 255}; + static char headerdesel[4] = {0, 0, 0, 255}; - const char *cp= error; + const char *cp = error; if (btheme) { // first check for ui buttons theme if (colorid < TH_THEMEUI) { - switch(colorid) { + switch (colorid) { - case TH_REDALERT: - cp= alert; break; + case TH_REDALERT: + cp = alert; break; } } else { - switch(spacetype) { - case SPACE_BUTS: - ts= &btheme->tbuts; - break; - case SPACE_VIEW3D: - ts= &btheme->tv3d; - break; - case SPACE_IPO: - ts= &btheme->tipo; - break; - case SPACE_FILE: - ts= &btheme->tfile; - break; - case SPACE_NLA: - ts= &btheme->tnla; - break; - case SPACE_ACTION: - ts= &btheme->tact; - break; - case SPACE_SEQ: - ts= &btheme->tseq; - break; - case SPACE_IMAGE: - ts= &btheme->tima; - break; - case SPACE_TEXT: - ts= &btheme->text; - break; - case SPACE_OUTLINER: - ts= &btheme->toops; - break; - case SPACE_INFO: - ts= &btheme->tinfo; - break; - case SPACE_USERPREF: - ts= &btheme->tuserpref; - break; - case SPACE_CONSOLE: - ts= &btheme->tconsole; - break; - case SPACE_TIME: - ts= &btheme->ttime; - break; - case SPACE_NODE: - ts= &btheme->tnode; - break; - case SPACE_LOGIC: - ts= &btheme->tlogic; - break; - case SPACE_CLIP: - ts= &btheme->tclip; - break; - default: - ts= &btheme->tv3d; - break; + switch (spacetype) { + case SPACE_BUTS: + ts = &btheme->tbuts; + break; + case SPACE_VIEW3D: + ts = &btheme->tv3d; + break; + case SPACE_IPO: + ts = &btheme->tipo; + break; + case SPACE_FILE: + ts = &btheme->tfile; + break; + case SPACE_NLA: + ts = &btheme->tnla; + break; + case SPACE_ACTION: + ts = &btheme->tact; + break; + case SPACE_SEQ: + ts = &btheme->tseq; + break; + case SPACE_IMAGE: + ts = &btheme->tima; + break; + case SPACE_TEXT: + ts = &btheme->text; + break; + case SPACE_OUTLINER: + ts = &btheme->toops; + break; + case SPACE_INFO: + ts = &btheme->tinfo; + break; + case SPACE_USERPREF: + ts = &btheme->tuserpref; + break; + case SPACE_CONSOLE: + ts = &btheme->tconsole; + break; + case SPACE_TIME: + ts = &btheme->ttime; + break; + case SPACE_NODE: + ts = &btheme->tnode; + break; + case SPACE_LOGIC: + ts = &btheme->tlogic; + break; + case SPACE_CLIP: + ts = &btheme->tclip; + break; + default: + ts = &btheme->tv3d; + break; } - - switch(colorid) { - case TH_BACK: - if (theme_regionid==RGN_TYPE_WINDOW) - cp= ts->back; - else if (theme_regionid==RGN_TYPE_CHANNELS) - cp= ts->list; - else if (theme_regionid==RGN_TYPE_HEADER) - cp= ts->header; - else - cp= ts->button; - break; - case TH_TEXT: - if (theme_regionid==RGN_TYPE_WINDOW) - cp= ts->text; - else if (theme_regionid==RGN_TYPE_CHANNELS) - cp= ts->list_text; - else if (theme_regionid==RGN_TYPE_HEADER) - cp= ts->header_text; - else - cp= ts->button_text; - break; - case TH_TEXT_HI: - if (theme_regionid==RGN_TYPE_WINDOW) - cp= ts->text_hi; - else if (theme_regionid==RGN_TYPE_CHANNELS) - cp= ts->list_text_hi; - else if (theme_regionid==RGN_TYPE_HEADER) - cp= ts->header_text_hi; - else - cp= ts->button_text_hi; - break; - case TH_TITLE: - if (theme_regionid==RGN_TYPE_WINDOW) - cp= ts->title; - else if (theme_regionid==RGN_TYPE_CHANNELS) - cp= ts->list_title; - else if (theme_regionid==RGN_TYPE_HEADER) - cp= ts->header_title; - else - cp= ts->button_title; - break; - - case TH_HEADER: - cp= ts->header; break; - case TH_HEADERDESEL: - /* we calculate a dynamic builtin header deselect color, also for pulldowns... */ - cp= ts->header; - headerdesel[0]= cp[0]>10?cp[0]-10:0; - headerdesel[1]= cp[1]>10?cp[1]-10:0; - headerdesel[2]= cp[2]>10?cp[2]-10:0; - cp= headerdesel; - break; - case TH_HEADER_TEXT: - cp= ts->header_text; break; - case TH_HEADER_TEXT_HI: - cp= ts->header_text_hi; break; - - case TH_PANEL: - cp= ts->panel; break; - case TH_PANEL_TEXT: - cp= ts->panel_text; break; - case TH_PANEL_TEXT_HI: - cp= ts->panel_text_hi; break; - - case TH_BUTBACK: - cp= ts->button; break; - case TH_BUTBACK_TEXT: - cp= ts->button_text; break; - case TH_BUTBACK_TEXT_HI: - cp= ts->button_text_hi; break; - - case TH_SHADE1: - cp= ts->shade1; break; - case TH_SHADE2: - cp= ts->shade2; break; - case TH_HILITE: - cp= ts->hilite; break; - - case TH_GRID: - cp= ts->grid; break; - case TH_WIRE: - cp= ts->wire; break; - case TH_LAMP: - cp= ts->lamp; break; - case TH_SPEAKER: - cp= ts->speaker; break; - case TH_CAMERA: - cp= ts->camera; break; - case TH_EMPTY: - cp= ts->empty; break; - case TH_SELECT: - cp= ts->select; break; - case TH_ACTIVE: - cp= ts->active; break; - case TH_GROUP: - cp= ts->group; break; - case TH_GROUP_ACTIVE: - cp= ts->group_active; break; - case TH_TRANSFORM: - cp= ts->transform; break; - case TH_VERTEX: - cp= ts->vertex; break; - case TH_VERTEX_SELECT: - cp= ts->vertex_select; break; - case TH_VERTEX_SIZE: - cp= &ts->vertex_size; break; - case TH_OUTLINE_WIDTH: - cp= &ts->outline_width; break; - case TH_EDGE: - cp= ts->edge; break; - case TH_EDGE_SELECT: - cp= ts->edge_select; break; - case TH_EDGE_SEAM: - cp= ts->edge_seam; break; - case TH_EDGE_SHARP: - cp= ts->edge_sharp; break; - case TH_EDGE_CREASE: - cp= ts->edge_crease; break; - case TH_EDITMESH_ACTIVE: - cp= ts->editmesh_active; break; - case TH_EDGE_FACESEL: - cp= ts->edge_facesel; break; - case TH_FACE: - cp= ts->face; break; - case TH_FACE_SELECT: - cp= ts->face_select; break; - case TH_FACE_DOT: - cp= ts->face_dot; break; - case TH_FACEDOT_SIZE: - cp= &ts->facedot_size; break; - case TH_DRAWEXTRA_EDGELEN: - cp= ts->extra_edge_len; break; - case TH_DRAWEXTRA_FACEAREA: - cp= ts->extra_face_area; break; - case TH_DRAWEXTRA_FACEANG: - cp= ts->extra_face_angle; break; - case TH_NORMAL: - cp= ts->normal; break; - case TH_VNORMAL: - cp= ts->vertex_normal; break; - case TH_BONE_SOLID: - cp= ts->bone_solid; break; - case TH_BONE_POSE: - cp= ts->bone_pose; break; - case TH_STRIP: - cp= ts->strip; break; - case TH_STRIP_SELECT: - cp= ts->strip_select; break; - case TH_CFRAME: - cp= ts->cframe; break; - case TH_NURB_ULINE: - cp= ts->nurb_uline; break; - case TH_NURB_VLINE: - cp= ts->nurb_vline; break; - case TH_NURB_SEL_ULINE: - cp= ts->nurb_sel_uline; break; - case TH_NURB_SEL_VLINE: - cp= ts->nurb_sel_vline; break; - case TH_ACTIVE_SPLINE: - cp= ts->act_spline; break; - case TH_LASTSEL_POINT: - cp= ts->lastsel_point; break; - case TH_HANDLE_FREE: - cp= ts->handle_free; break; - case TH_HANDLE_AUTO: - cp= ts->handle_auto; break; - case TH_HANDLE_AUTOCLAMP: - cp= ts->handle_auto_clamped; break; - case TH_HANDLE_VECT: - cp= ts->handle_vect; break; - case TH_HANDLE_ALIGN: - cp= ts->handle_align; break; - case TH_HANDLE_SEL_FREE: - cp= ts->handle_sel_free; break; - case TH_HANDLE_SEL_AUTO: - cp= ts->handle_sel_auto; break; - case TH_HANDLE_SEL_AUTOCLAMP: - cp= ts->handle_sel_auto_clamped; break; - case TH_HANDLE_SEL_VECT: - cp= ts->handle_sel_vect; break; - case TH_HANDLE_SEL_ALIGN: - cp= ts->handle_sel_align; break; - - case TH_SYNTAX_B: - cp= ts->syntaxb; break; - case TH_SYNTAX_V: - cp= ts->syntaxv; break; - case TH_SYNTAX_C: - cp= ts->syntaxc; break; - case TH_SYNTAX_L: - cp= ts->syntaxl; break; - case TH_SYNTAX_N: - cp= ts->syntaxn; break; - - case TH_NODE: - cp= ts->syntaxl; break; - case TH_NODE_IN_OUT: - cp= ts->syntaxn; break; - case TH_NODE_OPERATOR: - cp= ts->syntaxb; break; - case TH_NODE_CONVERTOR: - cp= ts->syntaxv; break; - case TH_NODE_GROUP: - cp= ts->syntaxc; break; - case TH_NODE_CURVING: - cp= &ts->noodle_curving; break; - - case TH_SEQ_MOVIE: - cp= ts->movie; break; - case TH_SEQ_MOVIECLIP: - cp= ts->movieclip; break; - case TH_SEQ_IMAGE: - cp= ts->image; break; - case TH_SEQ_SCENE: - cp= ts->scene; break; - case TH_SEQ_AUDIO: - cp= ts->audio; break; - case TH_SEQ_EFFECT: - cp= ts->effect; break; - case TH_SEQ_PLUGIN: - cp= ts->plugin; break; - case TH_SEQ_TRANSITION: - cp= ts->transition; break; - case TH_SEQ_META: - cp= ts->meta; break; - case TH_SEQ_PREVIEW: - cp= ts->preview_back; break; - - case TH_CONSOLE_OUTPUT: - cp= ts->console_output; break; - case TH_CONSOLE_INPUT: - cp= ts-> console_input; break; - case TH_CONSOLE_INFO: - cp= ts->console_info; break; - case TH_CONSOLE_ERROR: - cp= ts->console_error; break; - case TH_CONSOLE_CURSOR: - cp= ts->console_cursor; break; - - case TH_HANDLE_VERTEX: - cp= ts->handle_vertex; - break; - case TH_HANDLE_VERTEX_SELECT: - cp= ts->handle_vertex_select; - break; - case TH_HANDLE_VERTEX_SIZE: - cp= &ts->handle_vertex_size; - break; - - case TH_DOPESHEET_CHANNELOB: - cp= ts->ds_channel; - break; - case TH_DOPESHEET_CHANNELSUBOB: - cp= ts->ds_subchannel; - break; - - case TH_PREVIEW_BACK: - cp= ts->preview_back; - break; - - case TH_STITCH_PREVIEW_FACE: - cp = ts->preview_stitch_face; - break; - - case TH_STITCH_PREVIEW_EDGE: - cp = ts->preview_stitch_edge; - break; - - case TH_STITCH_PREVIEW_VERT: - cp = ts->preview_stitch_vert; - break; - - case TH_STITCH_PREVIEW_STITCHABLE: - cp = ts->preview_stitch_stitchable; - break; - - case TH_STITCH_PREVIEW_UNSTITCHABLE: - cp = ts->preview_stitch_unstitchable; - break; - case TH_STITCH_PREVIEW_ACTIVE: - cp = ts->preview_stitch_active; - break; - case TH_MARKER_OUTLINE: - cp= ts->marker_outline; break; - case TH_MARKER: - cp= ts->marker; break; - case TH_ACT_MARKER: - cp= ts->act_marker; break; - case TH_SEL_MARKER: - cp= ts->sel_marker; break; - case TH_BUNDLE_SOLID: - cp= ts->bundle_solid; break; - case TH_DIS_MARKER: - cp= ts->dis_marker; break; - case TH_PATH_BEFORE: - cp= ts->path_before; break; - case TH_PATH_AFTER: - cp= ts->path_after; break; - case TH_CAMERA_PATH: - cp= ts->camera_path; break; - case TH_LOCK_MARKER: - cp= ts->lock_marker; break; - - case TH_MATCH: - cp= ts->match; - break; - - case TH_SELECT_HIGHLIGHT: - cp= ts->selected_highlight; - break; + + switch (colorid) { + case TH_BACK: + if (theme_regionid == RGN_TYPE_WINDOW) + cp = ts->back; + else if (theme_regionid == RGN_TYPE_CHANNELS) + cp = ts->list; + else if (theme_regionid == RGN_TYPE_HEADER) + cp = ts->header; + else + cp = ts->button; + break; + case TH_TEXT: + if (theme_regionid == RGN_TYPE_WINDOW) + cp = ts->text; + else if (theme_regionid == RGN_TYPE_CHANNELS) + cp = ts->list_text; + else if (theme_regionid == RGN_TYPE_HEADER) + cp = ts->header_text; + else + cp = ts->button_text; + break; + case TH_TEXT_HI: + if (theme_regionid == RGN_TYPE_WINDOW) + cp = ts->text_hi; + else if (theme_regionid == RGN_TYPE_CHANNELS) + cp = ts->list_text_hi; + else if (theme_regionid == RGN_TYPE_HEADER) + cp = ts->header_text_hi; + else + cp = ts->button_text_hi; + break; + case TH_TITLE: + if (theme_regionid == RGN_TYPE_WINDOW) + cp = ts->title; + else if (theme_regionid == RGN_TYPE_CHANNELS) + cp = ts->list_title; + else if (theme_regionid == RGN_TYPE_HEADER) + cp = ts->header_title; + else + cp = ts->button_title; + break; + + case TH_HEADER: + cp = ts->header; break; + case TH_HEADERDESEL: + /* we calculate a dynamic builtin header deselect color, also for pulldowns... */ + cp = ts->header; + headerdesel[0] = cp[0] > 10 ? cp[0] - 10 : 0; + headerdesel[1] = cp[1] > 10 ? cp[1] - 10 : 0; + headerdesel[2] = cp[2] > 10 ? cp[2] - 10 : 0; + cp = headerdesel; + break; + case TH_HEADER_TEXT: + cp = ts->header_text; break; + case TH_HEADER_TEXT_HI: + cp = ts->header_text_hi; break; + + case TH_PANEL: + cp = ts->panel; break; + case TH_PANEL_TEXT: + cp = ts->panel_text; break; + case TH_PANEL_TEXT_HI: + cp = ts->panel_text_hi; break; + + case TH_BUTBACK: + cp = ts->button; break; + case TH_BUTBACK_TEXT: + cp = ts->button_text; break; + case TH_BUTBACK_TEXT_HI: + cp = ts->button_text_hi; break; + + case TH_SHADE1: + cp = ts->shade1; break; + case TH_SHADE2: + cp = ts->shade2; break; + case TH_HILITE: + cp = ts->hilite; break; + + case TH_GRID: + cp = ts->grid; break; + case TH_WIRE: + cp = ts->wire; break; + case TH_LAMP: + cp = ts->lamp; break; + case TH_SPEAKER: + cp = ts->speaker; break; + case TH_CAMERA: + cp = ts->camera; break; + case TH_EMPTY: + cp = ts->empty; break; + case TH_SELECT: + cp = ts->select; break; + case TH_ACTIVE: + cp = ts->active; break; + case TH_GROUP: + cp = ts->group; break; + case TH_GROUP_ACTIVE: + cp = ts->group_active; break; + case TH_TRANSFORM: + cp = ts->transform; break; + case TH_VERTEX: + cp = ts->vertex; break; + case TH_VERTEX_SELECT: + cp = ts->vertex_select; break; + case TH_VERTEX_SIZE: + cp = &ts->vertex_size; break; + case TH_OUTLINE_WIDTH: + cp = &ts->outline_width; break; + case TH_EDGE: + cp = ts->edge; break; + case TH_EDGE_SELECT: + cp = ts->edge_select; break; + case TH_EDGE_SEAM: + cp = ts->edge_seam; break; + case TH_EDGE_SHARP: + cp = ts->edge_sharp; break; + case TH_EDGE_CREASE: + cp = ts->edge_crease; break; + case TH_EDITMESH_ACTIVE: + cp = ts->editmesh_active; break; + case TH_EDGE_FACESEL: + cp = ts->edge_facesel; break; + case TH_FACE: + cp = ts->face; break; + case TH_FACE_SELECT: + cp = ts->face_select; break; + case TH_FACE_DOT: + cp = ts->face_dot; break; + case TH_FACEDOT_SIZE: + cp = &ts->facedot_size; break; + case TH_DRAWEXTRA_EDGELEN: + cp = ts->extra_edge_len; break; + case TH_DRAWEXTRA_FACEAREA: + cp = ts->extra_face_area; break; + case TH_DRAWEXTRA_FACEANG: + cp = ts->extra_face_angle; break; + case TH_NORMAL: + cp = ts->normal; break; + case TH_VNORMAL: + cp = ts->vertex_normal; break; + case TH_BONE_SOLID: + cp = ts->bone_solid; break; + case TH_BONE_POSE: + cp = ts->bone_pose; break; + case TH_STRIP: + cp = ts->strip; break; + case TH_STRIP_SELECT: + cp = ts->strip_select; break; + case TH_CFRAME: + cp = ts->cframe; break; + case TH_NURB_ULINE: + cp = ts->nurb_uline; break; + case TH_NURB_VLINE: + cp = ts->nurb_vline; break; + case TH_NURB_SEL_ULINE: + cp = ts->nurb_sel_uline; break; + case TH_NURB_SEL_VLINE: + cp = ts->nurb_sel_vline; break; + case TH_ACTIVE_SPLINE: + cp = ts->act_spline; break; + case TH_LASTSEL_POINT: + cp = ts->lastsel_point; break; + case TH_HANDLE_FREE: + cp = ts->handle_free; break; + case TH_HANDLE_AUTO: + cp = ts->handle_auto; break; + case TH_HANDLE_AUTOCLAMP: + cp = ts->handle_auto_clamped; break; + case TH_HANDLE_VECT: + cp = ts->handle_vect; break; + case TH_HANDLE_ALIGN: + cp = ts->handle_align; break; + case TH_HANDLE_SEL_FREE: + cp = ts->handle_sel_free; break; + case TH_HANDLE_SEL_AUTO: + cp = ts->handle_sel_auto; break; + case TH_HANDLE_SEL_AUTOCLAMP: + cp = ts->handle_sel_auto_clamped; break; + case TH_HANDLE_SEL_VECT: + cp = ts->handle_sel_vect; break; + case TH_HANDLE_SEL_ALIGN: + cp = ts->handle_sel_align; break; + + case TH_SYNTAX_B: + cp = ts->syntaxb; break; + case TH_SYNTAX_V: + cp = ts->syntaxv; break; + case TH_SYNTAX_C: + cp = ts->syntaxc; break; + case TH_SYNTAX_L: + cp = ts->syntaxl; break; + case TH_SYNTAX_N: + cp = ts->syntaxn; break; + + case TH_NODE: + cp = ts->syntaxl; break; + case TH_NODE_IN_OUT: + cp = ts->syntaxn; break; + case TH_NODE_OPERATOR: + cp = ts->syntaxb; break; + case TH_NODE_CONVERTOR: + cp = ts->syntaxv; break; + case TH_NODE_GROUP: + cp = ts->syntaxc; break; + case TH_NODE_CURVING: + cp = &ts->noodle_curving; break; + + case TH_SEQ_MOVIE: + cp = ts->movie; break; + case TH_SEQ_MOVIECLIP: + cp = ts->movieclip; break; + case TH_SEQ_IMAGE: + cp = ts->image; break; + case TH_SEQ_SCENE: + cp = ts->scene; break; + case TH_SEQ_AUDIO: + cp = ts->audio; break; + case TH_SEQ_EFFECT: + cp = ts->effect; break; + case TH_SEQ_PLUGIN: + cp = ts->plugin; break; + case TH_SEQ_TRANSITION: + cp = ts->transition; break; + case TH_SEQ_META: + cp = ts->meta; break; + case TH_SEQ_PREVIEW: + cp = ts->preview_back; break; + + case TH_CONSOLE_OUTPUT: + cp = ts->console_output; break; + case TH_CONSOLE_INPUT: + cp = ts->console_input; break; + case TH_CONSOLE_INFO: + cp = ts->console_info; break; + case TH_CONSOLE_ERROR: + cp = ts->console_error; break; + case TH_CONSOLE_CURSOR: + cp = ts->console_cursor; break; + + case TH_HANDLE_VERTEX: + cp = ts->handle_vertex; + break; + case TH_HANDLE_VERTEX_SELECT: + cp = ts->handle_vertex_select; + break; + case TH_HANDLE_VERTEX_SIZE: + cp = &ts->handle_vertex_size; + break; + + case TH_DOPESHEET_CHANNELOB: + cp = ts->ds_channel; + break; + case TH_DOPESHEET_CHANNELSUBOB: + cp = ts->ds_subchannel; + break; + + case TH_PREVIEW_BACK: + cp = ts->preview_back; + break; + + case TH_STITCH_PREVIEW_FACE: + cp = ts->preview_stitch_face; + break; + + case TH_STITCH_PREVIEW_EDGE: + cp = ts->preview_stitch_edge; + break; + + case TH_STITCH_PREVIEW_VERT: + cp = ts->preview_stitch_vert; + break; + + case TH_STITCH_PREVIEW_STITCHABLE: + cp = ts->preview_stitch_stitchable; + break; + + case TH_STITCH_PREVIEW_UNSTITCHABLE: + cp = ts->preview_stitch_unstitchable; + break; + case TH_STITCH_PREVIEW_ACTIVE: + cp = ts->preview_stitch_active; + break; + case TH_MARKER_OUTLINE: + cp = ts->marker_outline; break; + case TH_MARKER: + cp = ts->marker; break; + case TH_ACT_MARKER: + cp = ts->act_marker; break; + case TH_SEL_MARKER: + cp = ts->sel_marker; break; + case TH_BUNDLE_SOLID: + cp = ts->bundle_solid; break; + case TH_DIS_MARKER: + cp = ts->dis_marker; break; + case TH_PATH_BEFORE: + cp = ts->path_before; break; + case TH_PATH_AFTER: + cp = ts->path_after; break; + case TH_CAMERA_PATH: + cp = ts->camera_path; break; + case TH_LOCK_MARKER: + cp = ts->lock_marker; break; + + case TH_MATCH: + cp = ts->match; + break; + + case TH_SELECT_HIGHLIGHT: + cp = ts->selected_highlight; + break; } } } @@ -482,63 +482,63 @@ static void ui_theme_init_boneColorSets(bTheme *btheme) int i; /* define default color sets - currently we only define 15 of these, though that should be ample */ - /* set 1 */ + /* set 1 */ rgba_char_args_set(btheme->tarm[0].solid, 0x9a, 0x00, 0x00, 255); rgba_char_args_set(btheme->tarm[0].select, 0xbd, 0x11, 0x11, 255); rgba_char_args_set(btheme->tarm[0].active, 0xf7, 0x0a, 0x0a, 255); - /* set 2 */ + /* set 2 */ rgba_char_args_set(btheme->tarm[1].solid, 0xf7, 0x40, 0x18, 255); rgba_char_args_set(btheme->tarm[1].select, 0xf6, 0x69, 0x13, 255); rgba_char_args_set(btheme->tarm[1].active, 0xfa, 0x99, 0x00, 255); - /* set 3 */ + /* set 3 */ rgba_char_args_set(btheme->tarm[2].solid, 0x1e, 0x91, 0x09, 255); rgba_char_args_set(btheme->tarm[2].select, 0x59, 0xb7, 0x0b, 255); rgba_char_args_set(btheme->tarm[2].active, 0x83, 0xef, 0x1d, 255); - /* set 4 */ + /* set 4 */ rgba_char_args_set(btheme->tarm[3].solid, 0x0a, 0x36, 0x94, 255); rgba_char_args_set(btheme->tarm[3].select, 0x36, 0x67, 0xdf, 255); rgba_char_args_set(btheme->tarm[3].active, 0x5e, 0xc1, 0xef, 255); - /* set 5 */ + /* set 5 */ rgba_char_args_set(btheme->tarm[4].solid, 0xa9, 0x29, 0x4e, 255); rgba_char_args_set(btheme->tarm[4].select, 0xc1, 0x41, 0x6a, 255); rgba_char_args_set(btheme->tarm[4].active, 0xf0, 0x5d, 0x91, 255); - /* set 6 */ + /* set 6 */ rgba_char_args_set(btheme->tarm[5].solid, 0x43, 0x0c, 0x78, 255); rgba_char_args_set(btheme->tarm[5].select, 0x54, 0x3a, 0xa3, 255); rgba_char_args_set(btheme->tarm[5].active, 0x87, 0x64, 0xd5, 255); - /* set 7 */ + /* set 7 */ rgba_char_args_set(btheme->tarm[6].solid, 0x24, 0x78, 0x5a, 255); rgba_char_args_set(btheme->tarm[6].select, 0x3c, 0x95, 0x79, 255); rgba_char_args_set(btheme->tarm[6].active, 0x6f, 0xb6, 0xab, 255); - /* set 8 */ + /* set 8 */ rgba_char_args_set(btheme->tarm[7].solid, 0x4b, 0x70, 0x7c, 255); rgba_char_args_set(btheme->tarm[7].select, 0x6a, 0x86, 0x91, 255); rgba_char_args_set(btheme->tarm[7].active, 0x9b, 0xc2, 0xcd, 255); - /* set 9 */ + /* set 9 */ rgba_char_args_set(btheme->tarm[8].solid, 0xf4, 0xc9, 0x0c, 255); rgba_char_args_set(btheme->tarm[8].select, 0xee, 0xc2, 0x36, 255); rgba_char_args_set(btheme->tarm[8].active, 0xf3, 0xff, 0x00, 255); - /* set 10 */ + /* set 10 */ rgba_char_args_set(btheme->tarm[9].solid, 0x1e, 0x20, 0x24, 255); rgba_char_args_set(btheme->tarm[9].select, 0x48, 0x4c, 0x56, 255); rgba_char_args_set(btheme->tarm[9].active, 0xff, 0xff, 0xff, 255); - /* set 11 */ + /* set 11 */ rgba_char_args_set(btheme->tarm[10].solid, 0x6f, 0x2f, 0x6a, 255); rgba_char_args_set(btheme->tarm[10].select, 0x98, 0x45, 0xbe, 255); rgba_char_args_set(btheme->tarm[10].active, 0xd3, 0x30, 0xd6, 255); - /* set 12 */ + /* set 12 */ rgba_char_args_set(btheme->tarm[11].solid, 0x6c, 0x8e, 0x22, 255); rgba_char_args_set(btheme->tarm[11].select, 0x7f, 0xb0, 0x22, 255); rgba_char_args_set(btheme->tarm[11].active, 0xbb, 0xef, 0x5b, 255); - /* set 13 */ + /* set 13 */ rgba_char_args_set(btheme->tarm[12].solid, 0x8d, 0x8d, 0x8d, 255); rgba_char_args_set(btheme->tarm[12].select, 0xb0, 0xb0, 0xb0, 255); rgba_char_args_set(btheme->tarm[12].active, 0xde, 0xde, 0xde, 255); - /* set 14 */ + /* set 14 */ rgba_char_args_set(btheme->tarm[13].solid, 0x83, 0x43, 0x26, 255); rgba_char_args_set(btheme->tarm[13].select, 0x8b, 0x58, 0x11, 255); rgba_char_args_set(btheme->tarm[13].active, 0xbd, 0x6a, 0x11, 255); - /* set 15 */ + /* set 15 */ rgba_char_args_set(btheme->tarm[14].solid, 0x08, 0x31, 0x0e, 255); rgba_char_args_set(btheme->tarm[14].select, 0x1c, 0x43, 0x0b, 255); rgba_char_args_set(btheme->tarm[14].active, 0x34, 0x62, 0x2b, 255); @@ -551,23 +551,23 @@ static void ui_theme_init_boneColorSets(bTheme *btheme) /* use this call to init new variables in themespace, if they're same for all */ static void ui_theme_init_new_do(ThemeSpace *ts) { - rgba_char_args_test_set(ts->header_text, 0, 0, 0, 255); - rgba_char_args_test_set(ts->header_title, 0, 0, 0, 255); - rgba_char_args_test_set(ts->header_text_hi, 255, 255, 255, 255); - - rgba_char_args_test_set(ts->panel_text, 0, 0, 0, 255); - rgba_char_args_test_set(ts->panel_title, 0, 0, 0, 255); - rgba_char_args_test_set(ts->panel_text_hi, 255, 255, 255, 255); - - rgba_char_args_test_set(ts->button, 145, 145, 145, 245); - rgba_char_args_test_set(ts->button_title, 0, 0, 0, 255); - rgba_char_args_test_set(ts->button_text, 0, 0, 0, 255); - rgba_char_args_test_set(ts->button_text_hi, 255, 255, 255, 255); - - rgba_char_args_test_set(ts->list, 165, 165, 165, 255); - rgba_char_args_test_set(ts->list_title, 0, 0, 0, 255); - rgba_char_args_test_set(ts->list_text, 0, 0, 0, 255); - rgba_char_args_test_set(ts->list_text_hi, 255, 255, 255, 255); + rgba_char_args_test_set(ts->header_text, 0, 0, 0, 255); + rgba_char_args_test_set(ts->header_title, 0, 0, 0, 255); + rgba_char_args_test_set(ts->header_text_hi, 255, 255, 255, 255); + + rgba_char_args_test_set(ts->panel_text, 0, 0, 0, 255); + rgba_char_args_test_set(ts->panel_title, 0, 0, 0, 255); + rgba_char_args_test_set(ts->panel_text_hi, 255, 255, 255, 255); + + rgba_char_args_test_set(ts->button, 145, 145, 145, 245); + rgba_char_args_test_set(ts->button_title, 0, 0, 0, 255); + rgba_char_args_test_set(ts->button_text, 0, 0, 0, 255); + rgba_char_args_test_set(ts->button_text_hi, 255, 255, 255, 255); + + rgba_char_args_test_set(ts->list, 165, 165, 165, 255); + rgba_char_args_test_set(ts->list_title, 0, 0, 0, 255); + rgba_char_args_test_set(ts->list_text, 0, 0, 0, 255); + rgba_char_args_test_set(ts->list_text_hi, 255, 255, 255, 255); } static void ui_theme_init_new(bTheme *btheme) @@ -602,21 +602,21 @@ void ui_theme_init_default(void) bTheme *btheme; /* we search for the theme with name Default */ - for (btheme= U.themes.first; btheme; btheme= btheme->next) { - if (strcmp("Default", btheme->name)==0) break; + for (btheme = U.themes.first; btheme; btheme = btheme->next) { + if (strcmp("Default", btheme->name) == 0) break; } - if (btheme==NULL) { - btheme= MEM_callocN(sizeof(bTheme), "theme"); + if (btheme == NULL) { + btheme = MEM_callocN(sizeof(bTheme), "theme"); BLI_addtail(&U.themes, btheme); strcpy(btheme->name, "Default"); } - UI_SetTheme(0, 0); // make sure the global used in this file is set + UI_SetTheme(0, 0); // make sure the global used in this file is set /* UI buttons */ ui_widget_color_init(&btheme->tui); - btheme->tui.iconfile[0]= 0; + btheme->tui.iconfile[0] = 0; btheme->tui.panel.show_header = FALSE; rgba_char_args_set(btheme->tui.panel.header, 0, 0, 0, 25); @@ -631,8 +631,8 @@ void ui_theme_init_default(void) rgba_char_args_set(btheme->tv3d.text, 0, 0, 0, 255); rgba_char_args_set(btheme->tv3d.text_hi, 255, 255, 255, 255); - rgba_char_args_set_fl(btheme->tv3d.header, 0.45, 0.45, 0.45, 1.0); - rgba_char_args_set_fl(btheme->tv3d.button, 0.45, 0.45, 0.45, 1.0); + rgba_char_args_set_fl(btheme->tv3d.header, 0.45, 0.45, 0.45, 1.0); + rgba_char_args_set_fl(btheme->tv3d.button, 0.45, 0.45, 0.45, 1.0); rgba_char_args_set(btheme->tv3d.panel, 165, 165, 165, 127); rgba_char_args_set(btheme->tv3d.shade1, 160, 160, 160, 100); @@ -651,8 +651,8 @@ void ui_theme_init_default(void) rgba_char_args_set(btheme->tv3d.transform, 0xff, 0xff, 0xff, 255); rgba_char_args_set(btheme->tv3d.vertex, 0, 0, 0, 255); rgba_char_args_set(btheme->tv3d.vertex_select, 255, 133, 0, 255); - btheme->tv3d.vertex_size= 3; - btheme->tv3d.outline_width= 1; + btheme->tv3d.vertex_size = 3; + btheme->tv3d.outline_width = 1; rgba_char_args_set(btheme->tv3d.edge, 0x0, 0x0, 0x0, 255); rgba_char_args_set(btheme->tv3d.edge_select, 255, 160, 0, 255); rgba_char_args_set(btheme->tv3d.edge_seam, 219, 37, 18, 255); @@ -672,13 +672,13 @@ void ui_theme_init_default(void) rgba_char_args_set(btheme->tv3d.button_title, 0, 0, 0, 255); rgba_char_args_set(btheme->tv3d.title, 0, 0, 0, 255); - btheme->tv3d.facedot_size= 4; + btheme->tv3d.facedot_size = 4; rgba_char_args_set(btheme->tv3d.extra_edge_len, 32, 0, 0, 255); rgba_char_args_set(btheme->tv3d.extra_face_area, 0, 32, 0, 255); rgba_char_args_set(btheme->tv3d.extra_face_angle, 0, 0, 128, 255); - rgba_char_args_set(btheme->tv3d.cframe, 0x60, 0xc0, 0x40, 255); + rgba_char_args_set(btheme->tv3d.cframe, 0x60, 0xc0, 0x40, 255); rgba_char_args_set(btheme->tv3d.nurb_uline, 0x90, 0x90, 0x00, 255); rgba_char_args_set(btheme->tv3d.nurb_vline, 0x80, 0x30, 0x60, 255); @@ -705,86 +705,86 @@ void ui_theme_init_default(void) /* space buttons */ /* to have something initialized */ - btheme->tbuts= btheme->tv3d; + btheme->tbuts = btheme->tv3d; - rgba_char_args_set_fl(btheme->tbuts.back, 0.45, 0.45, 0.45, 1.0); + rgba_char_args_set_fl(btheme->tbuts.back, 0.45, 0.45, 0.45, 1.0); rgba_char_args_set(btheme->tbuts.panel, 0x82, 0x82, 0x82, 255); /* graph editor */ - btheme->tipo= btheme->tv3d; - rgba_char_args_set_fl(btheme->tipo.back, 0.42, 0.42, 0.42, 1.0); - rgba_char_args_set_fl(btheme->tipo.list, 0.4, 0.4, 0.4, 1.0); - rgba_char_args_set(btheme->tipo.grid, 94, 94, 94, 255); + btheme->tipo = btheme->tv3d; + rgba_char_args_set_fl(btheme->tipo.back, 0.42, 0.42, 0.42, 1.0); + rgba_char_args_set_fl(btheme->tipo.list, 0.4, 0.4, 0.4, 1.0); + rgba_char_args_set(btheme->tipo.grid, 94, 94, 94, 255); rgba_char_args_set(btheme->tipo.panel, 255, 255, 255, 150); - rgba_char_args_set(btheme->tipo.shade1, 150, 150, 150, 100); /* scrollbars */ - rgba_char_args_set(btheme->tipo.shade2, 0x70, 0x70, 0x70, 100); - rgba_char_args_set(btheme->tipo.vertex, 0, 0, 0, 255); + rgba_char_args_set(btheme->tipo.shade1, 150, 150, 150, 100); /* scrollbars */ + rgba_char_args_set(btheme->tipo.shade2, 0x70, 0x70, 0x70, 100); + rgba_char_args_set(btheme->tipo.vertex, 0, 0, 0, 255); rgba_char_args_set(btheme->tipo.vertex_select, 255, 133, 0, 255); rgba_char_args_set(btheme->tipo.hilite, 0x60, 0xc0, 0x40, 255); - btheme->tipo.vertex_size= 3; + btheme->tipo.vertex_size = 3; - rgba_char_args_set(btheme->tipo.handle_vertex, 0, 0, 0, 255); + rgba_char_args_set(btheme->tipo.handle_vertex, 0, 0, 0, 255); rgba_char_args_set(btheme->tipo.handle_vertex_select, 255, 133, 0, 255); rgba_char_args_set(btheme->tipo.handle_auto_clamped, 0x99, 0x40, 0x30, 255); rgba_char_args_set(btheme->tipo.handle_sel_auto_clamped, 0xf0, 0xaf, 0x90, 255); - btheme->tipo.handle_vertex_size= 4; + btheme->tipo.handle_vertex_size = 4; - rgba_char_args_set(btheme->tipo.ds_channel, 82, 96, 110, 255); - rgba_char_args_set(btheme->tipo.ds_subchannel, 124, 137, 150, 255); + rgba_char_args_set(btheme->tipo.ds_channel, 82, 96, 110, 255); + rgba_char_args_set(btheme->tipo.ds_subchannel, 124, 137, 150, 255); rgba_char_args_set(btheme->tipo.group, 79, 101, 73, 255); rgba_char_args_set(btheme->tipo.group_active, 135, 177, 125, 255); /* dopesheet */ - btheme->tact= btheme->tipo; - rgba_char_args_set(btheme->tact.strip, 12, 10, 10, 128); - rgba_char_args_set(btheme->tact.strip_select, 255, 140, 0, 255); + btheme->tact = btheme->tipo; + rgba_char_args_set(btheme->tact.strip, 12, 10, 10, 128); + rgba_char_args_set(btheme->tact.strip_select, 255, 140, 0, 255); /* space nla */ - btheme->tnla= btheme->tact; + btheme->tnla = btheme->tact; /* space file */ /* to have something initialized */ - btheme->tfile= btheme->tv3d; + btheme->tfile = btheme->tv3d; rgba_char_args_set_fl(btheme->tfile.back, 0.3, 0.3, 0.3, 1); rgba_char_args_set_fl(btheme->tfile.panel, 0.3, 0.3, 0.3, 1); rgba_char_args_set_fl(btheme->tfile.list, 0.4, 0.4, 0.4, 1); - rgba_char_args_set(btheme->tfile.text, 250, 250, 250, 255); + rgba_char_args_set(btheme->tfile.text, 250, 250, 250, 255); rgba_char_args_set(btheme->tfile.text_hi, 15, 15, 15, 255); - rgba_char_args_set(btheme->tfile.panel, 145, 145, 145, 255); // bookmark/ui regions + rgba_char_args_set(btheme->tfile.panel, 145, 145, 145, 255); // bookmark/ui regions rgba_char_args_set(btheme->tfile.active, 130, 130, 130, 255); // selected files rgba_char_args_set(btheme->tfile.hilite, 255, 140, 25, 255); // selected files - rgba_char_args_set(btheme->tfile.grid, 250, 250, 250, 255); - rgba_char_args_set(btheme->tfile.image, 250, 250, 250, 255); - rgba_char_args_set(btheme->tfile.movie, 250, 250, 250, 255); - rgba_char_args_set(btheme->tfile.scene, 250, 250, 250, 255); + rgba_char_args_set(btheme->tfile.grid, 250, 250, 250, 255); + rgba_char_args_set(btheme->tfile.image, 250, 250, 250, 255); + rgba_char_args_set(btheme->tfile.movie, 250, 250, 250, 255); + rgba_char_args_set(btheme->tfile.scene, 250, 250, 250, 255); /* space seq */ - btheme->tseq= btheme->tv3d; - rgba_char_args_set(btheme->tseq.back, 116, 116, 116, 255); - rgba_char_args_set(btheme->tseq.movie, 81, 105, 135, 255); + btheme->tseq = btheme->tv3d; + rgba_char_args_set(btheme->tseq.back, 116, 116, 116, 255); + rgba_char_args_set(btheme->tseq.movie, 81, 105, 135, 255); rgba_char_args_set(btheme->tseq.movieclip, 32, 32, 143, 255); - rgba_char_args_set(btheme->tseq.image, 109, 88, 129, 255); - rgba_char_args_set(btheme->tseq.scene, 78, 152, 62, 255); - rgba_char_args_set(btheme->tseq.audio, 46, 143, 143, 255); - rgba_char_args_set(btheme->tseq.effect, 169, 84, 124, 255); - rgba_char_args_set(btheme->tseq.plugin, 126, 126, 80, 255); + rgba_char_args_set(btheme->tseq.image, 109, 88, 129, 255); + rgba_char_args_set(btheme->tseq.scene, 78, 152, 62, 255); + rgba_char_args_set(btheme->tseq.audio, 46, 143, 143, 255); + rgba_char_args_set(btheme->tseq.effect, 169, 84, 124, 255); + rgba_char_args_set(btheme->tseq.plugin, 126, 126, 80, 255); rgba_char_args_set(btheme->tseq.transition, 162, 95, 111, 255); - rgba_char_args_set(btheme->tseq.meta, 109, 145, 131, 255); - rgba_char_args_set(btheme->tseq.preview_back, 0, 0, 0, 255); + rgba_char_args_set(btheme->tseq.meta, 109, 145, 131, 255); + rgba_char_args_set(btheme->tseq.preview_back, 0, 0, 0, 255); /* space image */ - btheme->tima= btheme->tv3d; - rgba_char_args_set(btheme->tima.back, 53, 53, 53, 255); + btheme->tima = btheme->tv3d; + rgba_char_args_set(btheme->tima.back, 53, 53, 53, 255); rgba_char_args_set(btheme->tima.vertex, 0, 0, 0, 255); rgba_char_args_set(btheme->tima.vertex_select, 255, 133, 0, 255); - btheme->tima.vertex_size= 3; - btheme->tima.facedot_size= 3; + btheme->tima.vertex_size = 3; + btheme->tima.facedot_size = 3; rgba_char_args_set(btheme->tima.face, 255, 255, 255, 10); rgba_char_args_set(btheme->tima.face_select, 255, 133, 0, 60); rgba_char_args_set(btheme->tima.editmesh_active, 255, 255, 255, 128); - rgba_char_args_set_fl(btheme->tima.preview_back, 0.45, 0.45, 0.45, 1.0); + rgba_char_args_set_fl(btheme->tima.preview_back, 0.45, 0.45, 0.45, 1.0); rgba_char_args_set_fl(btheme->tima.preview_stitch_face, 0.5, 0.5, 0.0, 0.2); rgba_char_args_set_fl(btheme->tima.preview_stitch_edge, 1.0, 0.0, 1.0, 0.2); rgba_char_args_set_fl(btheme->tima.preview_stitch_vert, 0.0, 0.0, 1.0, 0.2); @@ -792,36 +792,36 @@ void ui_theme_init_default(void) rgba_char_args_set_fl(btheme->tima.preview_stitch_unstitchable, 1.0, 0.0, 0.0, 1.0); /* space text */ - btheme->text= btheme->tv3d; - rgba_char_args_set(btheme->text.back, 153, 153, 153, 255); - rgba_char_args_set(btheme->text.shade1, 143, 143, 143, 255); - rgba_char_args_set(btheme->text.shade2, 0xc6, 0x77, 0x77, 255); - rgba_char_args_set(btheme->text.hilite, 255, 0, 0, 255); + btheme->text = btheme->tv3d; + rgba_char_args_set(btheme->text.back, 153, 153, 153, 255); + rgba_char_args_set(btheme->text.shade1, 143, 143, 143, 255); + rgba_char_args_set(btheme->text.shade2, 0xc6, 0x77, 0x77, 255); + rgba_char_args_set(btheme->text.hilite, 255, 0, 0, 255); /* syntax highlighting */ - rgba_char_args_set(btheme->text.syntaxn, 0, 0, 200, 255); /* Numbers Blue*/ - rgba_char_args_set(btheme->text.syntaxl, 100, 0, 0, 255); /* Strings red */ - rgba_char_args_set(btheme->text.syntaxc, 0, 100, 50, 255); /* Comments greenish */ - rgba_char_args_set(btheme->text.syntaxv, 95, 95, 0, 255); /* Special */ - rgba_char_args_set(btheme->text.syntaxb, 128, 0, 80, 255); /* Builtin, red-purple */ + rgba_char_args_set(btheme->text.syntaxn, 0, 0, 200, 255); /* Numbers Blue*/ + rgba_char_args_set(btheme->text.syntaxl, 100, 0, 0, 255); /* Strings red */ + rgba_char_args_set(btheme->text.syntaxc, 0, 100, 50, 255); /* Comments greenish */ + rgba_char_args_set(btheme->text.syntaxv, 95, 95, 0, 255); /* Special */ + rgba_char_args_set(btheme->text.syntaxb, 128, 0, 80, 255); /* Builtin, red-purple */ /* space oops */ - btheme->toops= btheme->tv3d; - rgba_char_args_set_fl(btheme->toops.back, 0.45, 0.45, 0.45, 1.0); + btheme->toops = btheme->tv3d; + rgba_char_args_set_fl(btheme->toops.back, 0.45, 0.45, 0.45, 1.0); - rgba_char_args_set_fl(btheme->toops.match, 0.2, 0.5, 0.2, 0.3); /* highlighting search match - soft green*/ + rgba_char_args_set_fl(btheme->toops.match, 0.2, 0.5, 0.2, 0.3); /* highlighting search match - soft green*/ rgba_char_args_set_fl(btheme->toops.selected_highlight, 0.51, 0.53, 0.55, 0.3); /* space info */ - btheme->tinfo= btheme->tv3d; - rgba_char_args_set_fl(btheme->tinfo.back, 0.45, 0.45, 0.45, 1.0); + btheme->tinfo = btheme->tv3d; + rgba_char_args_set_fl(btheme->tinfo.back, 0.45, 0.45, 0.45, 1.0); /* space user preferences */ - btheme->tuserpref= btheme->tv3d; + btheme->tuserpref = btheme->tv3d; rgba_char_args_set_fl(btheme->tuserpref.back, 0.45, 0.45, 0.45, 1.0); /* space console */ - btheme->tconsole= btheme->tv3d; + btheme->tconsole = btheme->tv3d; rgba_char_args_set(btheme->tconsole.back, 0, 0, 0, 255); rgba_char_args_set(btheme->tconsole.console_output, 96, 128, 255, 255); rgba_char_args_set(btheme->tconsole.console_input, 255, 255, 255, 255); @@ -830,27 +830,27 @@ void ui_theme_init_default(void) rgba_char_args_set(btheme->tconsole.console_cursor, 220, 96, 96, 255); /* space time */ - btheme->ttime= btheme->tv3d; - rgba_char_args_set_fl(btheme->ttime.back, 0.45, 0.45, 0.45, 1.0); - rgba_char_args_set_fl(btheme->ttime.grid, 0.36, 0.36, 0.36, 1.0); - rgba_char_args_set(btheme->ttime.shade1, 173, 173, 173, 255); // sliders + btheme->ttime = btheme->tv3d; + rgba_char_args_set_fl(btheme->ttime.back, 0.45, 0.45, 0.45, 1.0); + rgba_char_args_set_fl(btheme->ttime.grid, 0.36, 0.36, 0.36, 1.0); + rgba_char_args_set(btheme->ttime.shade1, 173, 173, 173, 255); // sliders /* space node, re-uses syntax color storage */ - btheme->tnode= btheme->tv3d; + btheme->tnode = btheme->tv3d; rgba_char_args_set(btheme->tnode.edge_select, 255, 255, 255, 255); - rgba_char_args_set(btheme->tnode.syntaxl, 155, 155, 155, 160); /* TH_NODE, backdrop */ - rgba_char_args_set(btheme->tnode.syntaxn, 100, 100, 100, 255); /* in/output */ - rgba_char_args_set(btheme->tnode.syntaxb, 108, 105, 111, 255); /* operator */ - rgba_char_args_set(btheme->tnode.syntaxv, 104, 106, 117, 255); /* generator */ - rgba_char_args_set(btheme->tnode.syntaxc, 105, 117, 110, 255); /* group */ + rgba_char_args_set(btheme->tnode.syntaxl, 155, 155, 155, 160); /* TH_NODE, backdrop */ + rgba_char_args_set(btheme->tnode.syntaxn, 100, 100, 100, 255); /* in/output */ + rgba_char_args_set(btheme->tnode.syntaxb, 108, 105, 111, 255); /* operator */ + rgba_char_args_set(btheme->tnode.syntaxv, 104, 106, 117, 255); /* generator */ + rgba_char_args_set(btheme->tnode.syntaxc, 105, 117, 110, 255); /* group */ btheme->tnode.noodle_curving = 5; /* space logic */ - btheme->tlogic= btheme->tv3d; + btheme->tlogic = btheme->tv3d; rgba_char_args_set(btheme->tlogic.back, 100, 100, 100, 255); /* space clip */ - btheme->tclip= btheme->tv3d; + btheme->tclip = btheme->tv3d; rgba_char_args_set(btheme->tclip.marker_outline, 0x00, 0x00, 0x00, 255); rgba_char_args_set(btheme->tclip.marker, 0x7f, 0x7f, 0x00, 255); @@ -864,22 +864,22 @@ void ui_theme_init_default(void) rgba_char_args_set(btheme->tclip.cframe, 0x60, 0xc0, 0x40, 255); rgba_char_args_set(btheme->tclip.handle_vertex, 0x00, 0x00, 0x00, 0xff); rgba_char_args_set(btheme->tclip.handle_vertex_select, 0xff, 0xff, 0, 0xff); - btheme->tclip.handle_vertex_size= 4; + btheme->tclip.handle_vertex_size = 4; } void UI_SetTheme(int spacetype, int regionid) { - if (spacetype==0) { // called for safety, when delete themes - theme_active= U.themes.first; - theme_spacetype= SPACE_VIEW3D; - theme_regionid= RGN_TYPE_WINDOW; + if (spacetype == 0) { // called for safety, when delete themes + theme_active = U.themes.first; + theme_spacetype = SPACE_VIEW3D; + theme_regionid = RGN_TYPE_WINDOW; } else { // later on, a local theme can be found too - theme_active= U.themes.first; - theme_spacetype= spacetype; - theme_regionid= regionid; + theme_active = U.themes.first; + theme_spacetype = spacetype; + theme_regionid = regionid; } } @@ -893,7 +893,7 @@ void UI_ThemeColor(int colorid) { const unsigned char *cp; - cp= UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid); + cp = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid); glColor3ubv(cp); } @@ -903,7 +903,7 @@ void UI_ThemeColor4(int colorid) { const unsigned char *cp; - cp= UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid); + cp = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid); glColor4ubv(cp); } @@ -914,12 +914,12 @@ void UI_ThemeColorShade(int colorid, int offset) int r, g, b; const unsigned char *cp; - cp= UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid); - r= offset + (int) cp[0]; + cp = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid); + r = offset + (int) cp[0]; CLAMP(r, 0, 255); - g= offset + (int) cp[1]; + g = offset + (int) cp[1]; CLAMP(g, 0, 255); - b= offset + (int) cp[2]; + b = offset + (int) cp[2]; CLAMP(b, 0, 255); //glColor3ub(r, g, b); glColor4ub(r, g, b, cp[3]); @@ -929,14 +929,14 @@ void UI_ThemeColorShadeAlpha(int colorid, int coloffset, int alphaoffset) int r, g, b, a; const unsigned char *cp; - cp= UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid); - r= coloffset + (int) cp[0]; + cp = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid); + r = coloffset + (int) cp[0]; CLAMP(r, 0, 255); - g= coloffset + (int) cp[1]; + g = coloffset + (int) cp[1]; CLAMP(g, 0, 255); - b= coloffset + (int) cp[2]; + b = coloffset + (int) cp[2]; CLAMP(b, 0, 255); - a= alphaoffset + (int) cp[3]; + a = alphaoffset + (int) cp[3]; CLAMP(a, 0, 255); glColor4ub(r, g, b, a); } @@ -947,13 +947,13 @@ void UI_ThemeColorBlend(int colorid1, int colorid2, float fac) int r, g, b; const unsigned char *cp1, *cp2; - cp1= UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid1); - cp2= UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid2); + cp1 = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid1); + cp2 = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid2); CLAMP(fac, 0.0f, 1.0f); - r= floorf((1.0f-fac)*cp1[0] + fac*cp2[0]); - g= floorf((1.0f-fac)*cp1[1] + fac*cp2[1]); - b= floorf((1.0f-fac)*cp1[2] + fac*cp2[2]); + r = floorf((1.0f - fac) * cp1[0] + fac * cp2[0]); + g = floorf((1.0f - fac) * cp1[1] + fac * cp2[1]); + b = floorf((1.0f - fac) * cp1[2] + fac * cp2[2]); glColor3ub(r, g, b); } @@ -964,13 +964,13 @@ void UI_ThemeColorBlendShade(int colorid1, int colorid2, float fac, int offset) int r, g, b; const unsigned char *cp1, *cp2; - cp1= UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid1); - cp2= UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid2); + cp1 = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid1); + cp2 = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid2); CLAMP(fac, 0.0f, 1.0f); - r= offset+floorf((1.0f-fac)*cp1[0] + fac*cp2[0]); - g= offset+floorf((1.0f-fac)*cp1[1] + fac*cp2[1]); - b= offset+floorf((1.0f-fac)*cp1[2] + fac*cp2[2]); + r = offset + floorf((1.0f - fac) * cp1[0] + fac * cp2[0]); + g = offset + floorf((1.0f - fac) * cp1[1] + fac * cp2[1]); + b = offset + floorf((1.0f - fac) * cp1[2] + fac * cp2[2]); CLAMP(r, 0, 255); CLAMP(g, 0, 255); @@ -985,14 +985,14 @@ void UI_ThemeColorBlendShadeAlpha(int colorid1, int colorid2, float fac, int off int r, g, b, a; const unsigned char *cp1, *cp2; - cp1= UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid1); - cp2= UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid2); + cp1 = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid1); + cp2 = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid2); CLAMP(fac, 0.0f, 1.0f); - r= offset+floorf((1.0f-fac)*cp1[0] + fac*cp2[0]); - g= offset+floorf((1.0f-fac)*cp1[1] + fac*cp2[1]); - b= offset+floorf((1.0f-fac)*cp1[2] + fac*cp2[2]); - a= alphaoffset + floorf((1.0f-fac)*cp1[3] + fac*cp2[3]); + r = offset + floorf((1.0f - fac) * cp1[0] + fac * cp2[0]); + g = offset + floorf((1.0f - fac) * cp1[1] + fac * cp2[1]); + b = offset + floorf((1.0f - fac) * cp1[2] + fac * cp2[2]); + a = alphaoffset + floorf((1.0f - fac) * cp1[3] + fac * cp2[3]); CLAMP(r, 0, 255); CLAMP(g, 0, 255); @@ -1008,7 +1008,7 @@ float UI_GetThemeValuef(int colorid) { const unsigned char *cp; - cp= UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid); + cp = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid); return ((float)cp[0]); } @@ -1018,7 +1018,7 @@ int UI_GetThemeValue(int colorid) { const unsigned char *cp; - cp= UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid); + cp = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid); return ((int) cp[0]); } @@ -1029,10 +1029,10 @@ void UI_GetThemeColor3fv(int colorid, float *col) { const unsigned char *cp; - cp= UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid); - col[0]= ((float)cp[0])/255.0f; - col[1]= ((float)cp[1])/255.0f; - col[2]= ((float)cp[2])/255.0f; + cp = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid); + col[0] = ((float)cp[0]) / 255.0f; + col[1] = ((float)cp[1]) / 255.0f; + col[2] = ((float)cp[2]) / 255.0f; } // get the color, range 0.0-1.0, complete with shading offset @@ -1041,18 +1041,18 @@ void UI_GetThemeColorShade3fv(int colorid, int offset, float *col) int r, g, b; const unsigned char *cp; - cp= UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid); + cp = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid); - r= offset + (int) cp[0]; + r = offset + (int) cp[0]; CLAMP(r, 0, 255); - g= offset + (int) cp[1]; + g = offset + (int) cp[1]; CLAMP(g, 0, 255); - b= offset + (int) cp[2]; + b = offset + (int) cp[2]; CLAMP(b, 0, 255); - col[0]= ((float)r)/255.0f; - col[1]= ((float)g)/255.0f; - col[2]= ((float)b)/255.0f; + col[0] = ((float)r) / 255.0f; + col[1] = ((float)g) / 255.0f; + col[2] = ((float)b) / 255.0f; } // get the color, in char pointer @@ -1060,10 +1060,10 @@ void UI_GetThemeColor3ubv(int colorid, unsigned char col[3]) { const unsigned char *cp; - cp= UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid); - col[0]= cp[0]; - col[1]= cp[1]; - col[2]= cp[2]; + cp = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid); + col[0] = cp[0]; + col[1] = cp[1]; + col[2] = cp[2]; } // get the color, in char pointer @@ -1071,22 +1071,22 @@ void UI_GetThemeColor4ubv(int colorid, unsigned char col[4]) { const unsigned char *cp; - cp= UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid); - col[0]= cp[0]; - col[1]= cp[1]; - col[2]= cp[2]; - col[3]= cp[3]; + cp = UI_ThemeGetColorPtr(theme_active, theme_spacetype, colorid); + col[0] = cp[0]; + col[1] = cp[1]; + col[2] = cp[2]; + col[3] = cp[3]; } void UI_GetThemeColorType4ubv(int colorid, int spacetype, char col[4]) { const unsigned char *cp; - cp= UI_ThemeGetColorPtr(theme_active, spacetype, colorid); - col[0]= cp[0]; - col[1]= cp[1]; - col[2]= cp[2]; - col[3]= cp[3]; + cp = UI_ThemeGetColorPtr(theme_active, spacetype, colorid); + col[0] = cp[0]; + col[1] = cp[1]; + col[2] = cp[2]; + col[3] = cp[3]; } // blends and shades between two char color pointers @@ -1094,13 +1094,13 @@ void UI_ColorPtrBlendShade3ubv(const unsigned char cp1[3], const unsigned char c { int r, g, b; CLAMP(fac, 0.0f, 1.0f); - r= offset+floorf((1.0f-fac)*cp1[0] + fac*cp2[0]); - g= offset+floorf((1.0f-fac)*cp1[1] + fac*cp2[1]); - b= offset+floorf((1.0f-fac)*cp1[2] + fac*cp2[2]); - - r= r<0?0:(r>255?255:r); - g= g<0?0:(g>255?255:g); - b= b<0?0:(b>255?255:b); + r = offset + floorf((1.0f - fac) * cp1[0] + fac * cp2[0]); + g = offset + floorf((1.0f - fac) * cp1[1] + fac * cp2[1]); + b = offset + floorf((1.0f - fac) * cp1[2] + fac * cp2[2]); + + r = r < 0 ? 0 : (r > 255 ? 255 : r); + g = g < 0 ? 0 : (g > 255 ? 255 : g); + b = b < 0 ? 0 : (b > 255 ? 255 : b); glColor3ub(r, g, b); } @@ -1109,9 +1109,9 @@ void UI_GetColorPtrShade3ubv(const unsigned char cp[3], unsigned char col[3], in { int r, g, b; - r= offset+(int)cp[0]; - g= offset+(int)cp[1]; - b= offset+(int)cp[2]; + r = offset + (int)cp[0]; + g = offset + (int)cp[1]; + b = offset + (int)cp[2]; CLAMP(r, 0, 255); CLAMP(g, 0, 255); @@ -1128,9 +1128,9 @@ void UI_GetColorPtrBlendShade3ubv(const unsigned char cp1[3], const unsigned cha int r, g, b; CLAMP(fac, 0.0f, 1.0f); - r= offset+floor((1.0f-fac)*cp1[0] + fac*cp2[0]); - g= offset+floor((1.0f-fac)*cp1[1] + fac*cp2[1]); - b= offset+floor((1.0f-fac)*cp1[2] + fac*cp2[2]); + r = offset + floor((1.0f - fac) * cp1[0] + fac * cp2[0]); + g = offset + floor((1.0f - fac) * cp1[1] + fac * cp2[1]); + b = offset + floor((1.0f - fac) * cp1[2] + fac * cp2[2]); CLAMP(r, 0, 255); CLAMP(g, 0, 255); @@ -1151,22 +1151,22 @@ void UI_ThemeClearColor(int colorid) void UI_make_axis_color(const unsigned char src_col[3], unsigned char dst_col[3], const char axis) { - switch(axis) + switch (axis) { case 'X': - dst_col[0]= src_col[0]>219?255:src_col[0]+36; - dst_col[1]= src_col[1]<26?0:src_col[1]-26; - dst_col[2]= src_col[2]<26?0:src_col[2]-26; + dst_col[0] = src_col[0] > 219 ? 255 : src_col[0] + 36; + dst_col[1] = src_col[1] < 26 ? 0 : src_col[1] - 26; + dst_col[2] = src_col[2] < 26 ? 0 : src_col[2] - 26; break; case 'Y': - dst_col[0]= src_col[0]<46?0:src_col[0]-36; - dst_col[1]= src_col[1]>189?255:src_col[1]+66; - dst_col[2]= src_col[2]<46?0:src_col[2]-36; + dst_col[0] = src_col[0] < 46 ? 0 : src_col[0] - 36; + dst_col[1] = src_col[1] > 189 ? 255 : src_col[1] + 66; + dst_col[2] = src_col[2] < 46 ? 0 : src_col[2] - 36; break; case 'Z': - dst_col[0]= src_col[0]<26?0:src_col[0]-26; - dst_col[1]= src_col[1]<26?0:src_col[1]-26; - dst_col[2]= src_col[2]>209?255:src_col[2]+46; + dst_col[0] = src_col[0] < 26 ? 0 : src_col[0] - 26; + dst_col[1] = src_col[1] < 26 ? 0 : src_col[1] - 26; + dst_col[2] = src_col[2] > 209 ? 255 : src_col[2] + 46; break; default: BLI_assert(!"invalid axis arg"); @@ -1178,20 +1178,20 @@ void UI_make_axis_color(const unsigned char src_col[3], unsigned char dst_col[3] /* patching UserDef struct and Themes */ void init_userdef_do_versions(void) { - Main *bmain= G.main; + Main *bmain = G.main; // countall(); /* the UserDef struct is not corrected with do_versions() .... ugh! */ if (U.wheellinescroll == 0) U.wheellinescroll = 3; - if (U.menuthreshold1==0) { - U.menuthreshold1= 5; - U.menuthreshold2= 2; + if (U.menuthreshold1 == 0) { + U.menuthreshold1 = 5; + U.menuthreshold2 = 2; } - if (U.tb_leftmouse==0) { - U.tb_leftmouse= 5; - U.tb_rightmouse= 5; + if (U.tb_leftmouse == 0) { + U.tb_leftmouse = 5; + U.tb_rightmouse = 5; } - if (U.mixbufsize==0) U.mixbufsize= 2048; + if (U.mixbufsize == 0) U.mixbufsize = 2048; if (strcmp(U.tempdir, "/") == 0) { BLI_system_temporary_dir(U.tempdir); } @@ -1204,13 +1204,13 @@ void init_userdef_do_versions(void) // XXX error(STRINGIFY(BLENDER_STARTUP_FILE)" is buggy, please consider removing it.\n"); } /* transform widget settings */ - if (U.tw_hotspot==0) { - U.tw_hotspot= 14; - U.tw_size= 20; // percentage of window size - U.tw_handlesize= 16; // percentage of widget radius + if (U.tw_hotspot == 0) { + U.tw_hotspot = 14; + U.tw_size = 20; // percentage of window size + U.tw_handlesize = 16; // percentage of widget radius } - if (U.pad_rot_angle==0) - U.pad_rot_angle= 15; + if (U.pad_rot_angle == 0) + U.pad_rot_angle = 15; /* graph editor - unselected F-Curve visibility */ if (U.fcu_inactive_alpha == 0) { U.fcu_inactive_alpha = 0.25f; @@ -1218,7 +1218,7 @@ void init_userdef_do_versions(void) /* signal for derivedmesh to use colorband */ /* run in case this was on and is now off in the user prefs [#28096] */ - vDM_ColorBand_store((U.flag & USER_CUSTOM_RANGE) ? (&U.coba_weight):NULL); + vDM_ColorBand_store((U.flag & USER_CUSTOM_RANGE) ? (&U.coba_weight) : NULL); if (bmain->versionfile <= 191) { BLI_strncpy(U.plugtexdir, U.textudir, sizeof(U.plugtexdir)); @@ -1235,22 +1235,22 @@ void init_userdef_do_versions(void) bTheme *btheme; U.uiflag |= USER_GLOBALUNDO; - if (U.undosteps==0) U.undosteps=32; + if (U.undosteps == 0) U.undosteps = 32; - for (btheme= U.themes.first; btheme; btheme= btheme->next) { + for (btheme = U.themes.first; btheme; btheme = btheme->next) { /* check for alpha==0 is safe, then color was never set */ - if (btheme->tv3d.edge_seam[3]==0) { + if (btheme->tv3d.edge_seam[3] == 0) { rgba_char_args_set(btheme->tv3d.edge_seam, 230, 150, 50, 255); } - if (btheme->tv3d.normal[3]==0) { + if (btheme->tv3d.normal[3] == 0) { rgba_char_args_set(btheme->tv3d.normal, 0x22, 0xDD, 0xDD, 255); } - if (btheme->tv3d.vertex_normal[3]==0) { + if (btheme->tv3d.vertex_normal[3] == 0) { rgba_char_args_set(btheme->tv3d.vertex_normal, 0x23, 0x61, 0xDD, 255); } - if (btheme->tv3d.face_dot[3]==0) { + if (btheme->tv3d.face_dot[3] == 0) { rgba_char_args_set(btheme->tv3d.face_dot, 255, 138, 48, 255); - btheme->tv3d.facedot_size= 4; + btheme->tv3d.facedot_size = 4; } } } @@ -1262,30 +1262,30 @@ void init_userdef_do_versions(void) if (bmain->versionfile <= 236) { bTheme *btheme; /* new space type */ - for (btheme= U.themes.first; btheme; btheme= btheme->next) { + for (btheme = U.themes.first; btheme; btheme = btheme->next) { /* check for alpha==0 is safe, then color was never set */ - if (btheme->ttime.back[3]==0) { + if (btheme->ttime.back[3] == 0) { // copied from ui_theme_init_default - btheme->ttime= btheme->tv3d; - rgba_char_args_set_fl(btheme->ttime.back, 0.45, 0.45, 0.45, 1.0); - rgba_char_args_set_fl(btheme->ttime.grid, 0.36, 0.36, 0.36, 1.0); - rgba_char_args_set(btheme->ttime.shade1, 173, 173, 173, 255); // sliders + btheme->ttime = btheme->tv3d; + rgba_char_args_set_fl(btheme->ttime.back, 0.45, 0.45, 0.45, 1.0); + rgba_char_args_set_fl(btheme->ttime.grid, 0.36, 0.36, 0.36, 1.0); + rgba_char_args_set(btheme->ttime.shade1, 173, 173, 173, 255); // sliders } - if (btheme->text.syntaxn[3]==0) { - rgba_char_args_set(btheme->text.syntaxn, 0, 0, 200, 255); /* Numbers Blue*/ - rgba_char_args_set(btheme->text.syntaxl, 100, 0, 0, 255); /* Strings red */ - rgba_char_args_set(btheme->text.syntaxc, 0, 100, 50, 255); /* Comments greenish */ - rgba_char_args_set(btheme->text.syntaxv, 95, 95, 0, 255); /* Special */ - rgba_char_args_set(btheme->text.syntaxb, 128, 0, 80, 255); /* Builtin, red-purple */ + if (btheme->text.syntaxn[3] == 0) { + rgba_char_args_set(btheme->text.syntaxn, 0, 0, 200, 255); /* Numbers Blue*/ + rgba_char_args_set(btheme->text.syntaxl, 100, 0, 0, 255); /* Strings red */ + rgba_char_args_set(btheme->text.syntaxc, 0, 100, 50, 255); /* Comments greenish */ + rgba_char_args_set(btheme->text.syntaxv, 95, 95, 0, 255); /* Special */ + rgba_char_args_set(btheme->text.syntaxb, 128, 0, 80, 255); /* Builtin, red-purple */ } } } if (bmain->versionfile <= 237) { bTheme *btheme; /* bone colors */ - for (btheme= U.themes.first; btheme; btheme= btheme->next) { + for (btheme = U.themes.first; btheme; btheme = btheme->next) { /* check for alpha==0 is safe, then color was never set */ - if (btheme->tv3d.bone_solid[3]==0) { + if (btheme->tv3d.bone_solid[3] == 0) { rgba_char_args_set(btheme->tv3d.bone_solid, 200, 200, 200, 255); rgba_char_args_set(btheme->tv3d.bone_pose, 80, 200, 255, 80); } @@ -1294,10 +1294,10 @@ void init_userdef_do_versions(void) if (bmain->versionfile <= 238) { bTheme *btheme; /* bone colors */ - for (btheme= U.themes.first; btheme; btheme= btheme->next) { + for (btheme = U.themes.first; btheme; btheme = btheme->next) { /* check for alpha==0 is safe, then color was never set */ - if (btheme->tnla.strip[3]==0) { - rgba_char_args_set(btheme->tnla.strip_select, 0xff, 0xff, 0xaa, 255); + if (btheme->tnla.strip[3] == 0) { + rgba_char_args_set(btheme->tnla.strip_select, 0xff, 0xff, 0xaa, 255); rgba_char_args_set(btheme->tnla.strip, 0xe4, 0x9c, 0xc6, 255); } } @@ -1305,46 +1305,46 @@ void init_userdef_do_versions(void) if (bmain->versionfile <= 239) { bTheme *btheme; - for (btheme= U.themes.first; btheme; btheme= btheme->next) { + for (btheme = U.themes.first; btheme; btheme = btheme->next) { /* Lamp theme, check for alpha==0 is safe, then color was never set */ - if (btheme->tv3d.lamp[3]==0) { - rgba_char_args_set(btheme->tv3d.lamp, 0, 0, 0, 40); + if (btheme->tv3d.lamp[3] == 0) { + rgba_char_args_set(btheme->tv3d.lamp, 0, 0, 0, 40); /* TEMPORAL, remove me! (ton) */ U.uiflag |= USER_PLAINMENUS; } } - if (U.obcenter_dia==0) U.obcenter_dia= 6; + if (U.obcenter_dia == 0) U.obcenter_dia = 6; } if (bmain->versionfile <= 241) { bTheme *btheme; - for (btheme= U.themes.first; btheme; btheme= btheme->next) { + for (btheme = U.themes.first; btheme; btheme = btheme->next) { /* Node editor theme, check for alpha==0 is safe, then color was never set */ - if (btheme->tnode.syntaxn[3]==0) { + if (btheme->tnode.syntaxn[3] == 0) { /* re-uses syntax color storage */ - btheme->tnode= btheme->tv3d; + btheme->tnode = btheme->tv3d; rgba_char_args_set(btheme->tnode.edge_select, 255, 255, 255, 255); - rgba_char_args_set(btheme->tnode.syntaxl, 150, 150, 150, 255); /* TH_NODE, backdrop */ - rgba_char_args_set(btheme->tnode.syntaxn, 129, 131, 144, 255); /* in/output */ - rgba_char_args_set(btheme->tnode.syntaxb, 127,127,127, 255); /* operator */ - rgba_char_args_set(btheme->tnode.syntaxv, 142, 138, 145, 255); /* generator */ - rgba_char_args_set(btheme->tnode.syntaxc, 120, 145, 120, 255); /* group */ + rgba_char_args_set(btheme->tnode.syntaxl, 150, 150, 150, 255); /* TH_NODE, backdrop */ + rgba_char_args_set(btheme->tnode.syntaxn, 129, 131, 144, 255); /* in/output */ + rgba_char_args_set(btheme->tnode.syntaxb, 127, 127, 127, 255); /* operator */ + rgba_char_args_set(btheme->tnode.syntaxv, 142, 138, 145, 255); /* generator */ + rgba_char_args_set(btheme->tnode.syntaxc, 120, 145, 120, 255); /* group */ } /* Group theme colors */ - if (btheme->tv3d.group[3]==0) { + if (btheme->tv3d.group[3] == 0) { rgba_char_args_set(btheme->tv3d.group, 0x0C, 0x30, 0x0C, 255); rgba_char_args_set(btheme->tv3d.group_active, 0x66, 0xFF, 0x66, 255); } /* Sequence editor theme*/ - if (btheme->tseq.movie[3]==0) { - rgba_char_args_set(btheme->tseq.movie, 81, 105, 135, 255); - rgba_char_args_set(btheme->tseq.image, 109, 88, 129, 255); - rgba_char_args_set(btheme->tseq.scene, 78, 152, 62, 255); - rgba_char_args_set(btheme->tseq.audio, 46, 143, 143, 255); - rgba_char_args_set(btheme->tseq.effect, 169, 84, 124, 255); - rgba_char_args_set(btheme->tseq.plugin, 126, 126, 80, 255); + if (btheme->tseq.movie[3] == 0) { + rgba_char_args_set(btheme->tseq.movie, 81, 105, 135, 255); + rgba_char_args_set(btheme->tseq.image, 109, 88, 129, 255); + rgba_char_args_set(btheme->tseq.scene, 78, 152, 62, 255); + rgba_char_args_set(btheme->tseq.audio, 46, 143, 143, 255); + rgba_char_args_set(btheme->tseq.effect, 169, 84, 124, 255); + rgba_char_args_set(btheme->tseq.plugin, 126, 126, 80, 255); rgba_char_args_set(btheme->tseq.transition, 162, 95, 111, 255); - rgba_char_args_set(btheme->tseq.meta, 109, 145, 131, 255); + rgba_char_args_set(btheme->tseq.meta, 109, 145, 131, 255); } } @@ -1360,18 +1360,18 @@ void init_userdef_do_versions(void) if (bmain->versionfile <= 242) { bTheme *btheme; - for (btheme= U.themes.first; btheme; btheme= btheme->next) { + for (btheme = U.themes.first; btheme; btheme = btheme->next) { /* long keyframe color */ /* check for alpha==0 is safe, then color was never set */ - if (btheme->tact.strip[3]==0) { + if (btheme->tact.strip[3] == 0) { rgba_char_args_set(btheme->tv3d.edge_sharp, 255, 32, 32, 255); - rgba_char_args_set(btheme->tact.strip_select, 0xff, 0xff, 0xaa, 204); + rgba_char_args_set(btheme->tact.strip_select, 0xff, 0xff, 0xaa, 204); rgba_char_args_set(btheme->tact.strip, 0xe4, 0x9c, 0xc6, 204); } /* IPO-Editor - Vertex Size*/ if (btheme->tipo.vertex_size == 0) { - btheme->tipo.vertex_size= 3; + btheme->tipo.vertex_size = 3; } } } @@ -1381,15 +1381,15 @@ void init_userdef_do_versions(void) } if (bmain->versionfile < 245 || (bmain->versionfile == 245 && bmain->subversionfile < 3)) { bTheme *btheme; - for (btheme= U.themes.first; btheme; btheme= btheme->next) { + for (btheme = U.themes.first; btheme; btheme = btheme->next) { rgba_char_args_set(btheme->tv3d.editmesh_active, 255, 255, 255, 128); } - if (U.coba_weight.tot==0) + if (U.coba_weight.tot == 0) init_colorband(&U.coba_weight, 1); } if ((bmain->versionfile < 245) || (bmain->versionfile == 245 && bmain->subversionfile < 11)) { bTheme *btheme; - for (btheme= U.themes.first; btheme; btheme= btheme->next) { + for (btheme = U.themes.first; btheme; btheme = btheme->next) { /* these should all use the same color */ rgba_char_args_set(btheme->tv3d.cframe, 0x60, 0xc0, 0x40, 255); rgba_char_args_set(btheme->tipo.cframe, 0x60, 0xc0, 0x40, 255); @@ -1402,7 +1402,7 @@ void init_userdef_do_versions(void) } if ((bmain->versionfile < 245) || (bmain->versionfile == 245 && bmain->subversionfile < 13)) { bTheme *btheme; - for (btheme= U.themes.first; btheme; btheme= btheme->next) { + for (btheme = U.themes.first; btheme; btheme = btheme->next) { /* action channel groups (recolor anyway) */ rgba_char_args_set(btheme->tact.group, 0x39, 0x7d, 0x1b, 255); rgba_char_args_set(btheme->tact.group_active, 0x7d, 0xe9, 0x60, 255); @@ -1413,13 +1413,13 @@ void init_userdef_do_versions(void) } } if ((bmain->versionfile < 245) || (bmain->versionfile == 245 && bmain->subversionfile < 16)) { - U.flag |= USER_ADD_VIEWALIGNED|USER_ADD_EDITMODE; + U.flag |= USER_ADD_VIEWALIGNED | USER_ADD_EDITMODE; } if ((bmain->versionfile < 247) || (bmain->versionfile == 247 && bmain->subversionfile <= 2)) { bTheme *btheme; /* adjust themes */ - for (btheme= U.themes.first; btheme; btheme= btheme->next) { + for (btheme = U.themes.first; btheme; btheme = btheme->next) { char *col; /* IPO Editor: Handles/Vertices */ @@ -1427,7 +1427,7 @@ void init_userdef_do_versions(void) rgba_char_args_set(btheme->tipo.handle_vertex, col[0], col[1], col[2], 255); col = btheme->tipo.vertex_select; rgba_char_args_set(btheme->tipo.handle_vertex_select, col[0], col[1], col[2], 255); - btheme->tipo.handle_vertex_size= btheme->tipo.vertex_size; + btheme->tipo.handle_vertex_size = btheme->tipo.vertex_size; /* Sequence/Image Editor: colors for GPencil text */ col = btheme->tv3d.bone_pose; @@ -1440,59 +1440,59 @@ void init_userdef_do_versions(void) if (bmain->versionfile < 250) { bTheme *btheme; - for (btheme= U.themes.first; btheme; btheme= btheme->next) { + for (btheme = U.themes.first; btheme; btheme = btheme->next) { /* this was not properly initialized in 2.45 */ - if (btheme->tima.face_dot[3]==0) { + if (btheme->tima.face_dot[3] == 0) { rgba_char_args_set(btheme->tima.editmesh_active, 255, 255, 255, 128); rgba_char_args_set(btheme->tima.face_dot, 255, 133, 0, 255); - btheme->tima.facedot_size= 2; + btheme->tima.facedot_size = 2; } /* DopeSheet - (Object) Channel color */ - rgba_char_args_set(btheme->tact.ds_channel, 82, 96, 110, 255); - rgba_char_args_set(btheme->tact.ds_subchannel, 124, 137, 150, 255); + rgba_char_args_set(btheme->tact.ds_channel, 82, 96, 110, 255); + rgba_char_args_set(btheme->tact.ds_subchannel, 124, 137, 150, 255); /* DopeSheet - Group Channel color (saner version) */ rgba_char_args_set(btheme->tact.group, 79, 101, 73, 255); rgba_char_args_set(btheme->tact.group_active, 135, 177, 125, 255); /* Graph Editor - (Object) Channel color */ - rgba_char_args_set(btheme->tipo.ds_channel, 82, 96, 110, 255); - rgba_char_args_set(btheme->tipo.ds_subchannel, 124, 137, 150, 255); + rgba_char_args_set(btheme->tipo.ds_channel, 82, 96, 110, 255); + rgba_char_args_set(btheme->tipo.ds_subchannel, 124, 137, 150, 255); /* Graph Editor - Group Channel color */ rgba_char_args_set(btheme->tipo.group, 79, 101, 73, 255); rgba_char_args_set(btheme->tipo.group_active, 135, 177, 125, 255); /* Nla Editor - (Object) Channel color */ - rgba_char_args_set(btheme->tnla.ds_channel, 82, 96, 110, 255); - rgba_char_args_set(btheme->tnla.ds_subchannel, 124, 137, 150, 255); + rgba_char_args_set(btheme->tnla.ds_channel, 82, 96, 110, 255); + rgba_char_args_set(btheme->tnla.ds_subchannel, 124, 137, 150, 255); /* NLA Editor - New Strip colors */ - rgba_char_args_set(btheme->tnla.strip, 12, 10, 10, 128); - rgba_char_args_set(btheme->tnla.strip_select, 255, 140, 0, 255); + rgba_char_args_set(btheme->tnla.strip, 12, 10, 10, 128); + rgba_char_args_set(btheme->tnla.strip_select, 255, 140, 0, 255); } /* adjust grease-pencil distances */ - U.gp_manhattendist= 1; - U.gp_euclideandist= 2; + U.gp_manhattendist = 1; + U.gp_euclideandist = 2; /* adjust default interpolation for new IPO-curves */ - U.ipo_new= BEZT_IPO_BEZ; + U.ipo_new = BEZT_IPO_BEZ; } if (bmain->versionfile < 250 || (bmain->versionfile == 250 && bmain->subversionfile < 1)) { bTheme *btheme; - for (btheme= U.themes.first; btheme; btheme= btheme->next) { + for (btheme = U.themes.first; btheme; btheme = btheme->next) { /* common (new) variables, it checks for alpha==0 */ ui_theme_init_new(btheme); - if (btheme->tui.wcol_num.outline[3]==0) + if (btheme->tui.wcol_num.outline[3] == 0) ui_widget_color_init(&btheme->tui); /* Logic editor theme, check for alpha==0 is safe, then color was never set */ - if (btheme->tlogic.syntaxn[3]==0) { + if (btheme->tlogic.syntaxn[3] == 0) { /* re-uses syntax color storage */ - btheme->tlogic= btheme->tv3d; + btheme->tlogic = btheme->tv3d; rgba_char_args_set(btheme->tlogic.back, 100, 100, 100, 255); } @@ -1525,40 +1525,40 @@ void init_userdef_do_versions(void) if (bmain->versionfile < 250 || (bmain->versionfile == 250 && bmain->subversionfile < 8)) { wmKeyMap *km; - for (km=U.user_keymaps.first; km; km=km->next) { - if (strcmp(km->idname, "Armature_Sketch")==0) + for (km = U.user_keymaps.first; km; km = km->next) { + if (strcmp(km->idname, "Armature_Sketch") == 0) strcpy(km->idname, "Armature Sketch"); - else if (strcmp(km->idname, "View3D")==0) + else if (strcmp(km->idname, "View3D") == 0) strcpy(km->idname, "3D View"); - else if (strcmp(km->idname, "View3D Generic")==0) + else if (strcmp(km->idname, "View3D Generic") == 0) strcpy(km->idname, "3D View Generic"); - else if (strcmp(km->idname, "EditMesh")==0) + else if (strcmp(km->idname, "EditMesh") == 0) strcpy(km->idname, "Mesh"); - else if (strcmp(km->idname, "TimeLine")==0) + else if (strcmp(km->idname, "TimeLine") == 0) strcpy(km->idname, "Timeline"); - else if (strcmp(km->idname, "UVEdit")==0) + else if (strcmp(km->idname, "UVEdit") == 0) strcpy(km->idname, "UV Editor"); - else if (strcmp(km->idname, "Animation_Channels")==0) + else if (strcmp(km->idname, "Animation_Channels") == 0) strcpy(km->idname, "Animation Channels"); - else if (strcmp(km->idname, "GraphEdit Keys")==0) + else if (strcmp(km->idname, "GraphEdit Keys") == 0) strcpy(km->idname, "Graph Editor"); - else if (strcmp(km->idname, "GraphEdit Generic")==0) + else if (strcmp(km->idname, "GraphEdit Generic") == 0) strcpy(km->idname, "Graph Editor Generic"); - else if (strcmp(km->idname, "Action_Keys")==0) + else if (strcmp(km->idname, "Action_Keys") == 0) strcpy(km->idname, "Dopesheet"); - else if (strcmp(km->idname, "NLA Data")==0) + else if (strcmp(km->idname, "NLA Data") == 0) strcpy(km->idname, "NLA Editor"); - else if (strcmp(km->idname, "Node Generic")==0) + else if (strcmp(km->idname, "Node Generic") == 0) strcpy(km->idname, "Node Editor"); - else if (strcmp(km->idname, "Logic Generic")==0) + else if (strcmp(km->idname, "Logic Generic") == 0) strcpy(km->idname, "Logic Editor"); - else if (strcmp(km->idname, "File")==0) + else if (strcmp(km->idname, "File") == 0) strcpy(km->idname, "File Browser"); - else if (strcmp(km->idname, "FileMain")==0) + else if (strcmp(km->idname, "FileMain") == 0) strcpy(km->idname, "File Browser Main"); - else if (strcmp(km->idname, "FileButtons")==0) + else if (strcmp(km->idname, "FileButtons") == 0) strcpy(km->idname, "File Browser Buttons"); - else if (strcmp(km->idname, "Buttons Generic")==0) + else if (strcmp(km->idname, "Buttons Generic") == 0) strcpy(km->idname, "Property Editor"); } } @@ -1578,7 +1578,7 @@ void init_userdef_do_versions(void) U.keyhandles_new = HD_AUTO; /* init new curve colors */ - for (btheme= U.themes.first; btheme; btheme= btheme->next) { + for (btheme = U.themes.first; btheme; btheme = btheme->next) { /* init colors used for handles in 3D-View */ rgba_char_args_set(btheme->tv3d.handle_free, 0, 0, 0, 255); rgba_char_args_set(btheme->tv3d.handle_auto, 0x90, 0x90, 0x00, 255); @@ -1608,7 +1608,7 @@ void init_userdef_do_versions(void) bTheme *btheme; /* init new curve colors */ - for (btheme= U.themes.first; btheme; btheme= btheme->next) { + for (btheme = U.themes.first; btheme; btheme = btheme->next) { if (btheme->tv3d.lastsel_point[3] == 0) rgba_char_args_set(btheme->tv3d.lastsel_point, 0xff, 0xff, 0xff, 255); } @@ -1617,7 +1617,7 @@ void init_userdef_do_versions(void) bTheme *btheme; /* interface_widgets.c */ - struct uiWidgetColors wcol_progress= { + struct uiWidgetColors wcol_progress = { {0, 0, 0, 255}, {190, 190, 190, 255}, {100, 100, 100, 180}, @@ -1630,15 +1630,15 @@ void init_userdef_do_versions(void) 5, -5 }; - for (btheme= U.themes.first; btheme; btheme= btheme->next) { + for (btheme = U.themes.first; btheme; btheme = btheme->next) { /* init progress bar theme */ - btheme->tui.wcol_progress= wcol_progress; + btheme->tui.wcol_progress = wcol_progress; } } if (bmain->versionfile < 255 || (bmain->versionfile == 255 && bmain->subversionfile < 2)) { bTheme *btheme; - for (btheme= U.themes.first; btheme; btheme= btheme->next) { + for (btheme = U.themes.first; btheme; btheme = btheme->next) { rgba_char_args_set(btheme->tv3d.extra_edge_len, 32, 0, 0, 255); rgba_char_args_set(btheme->tv3d.extra_face_angle, 0, 32, 0, 255); rgba_char_args_set(btheme->tv3d.extra_face_area, 0, 0, 128, 255); @@ -1647,8 +1647,8 @@ void init_userdef_do_versions(void) if (bmain->versionfile < 256 || (bmain->versionfile == 256 && bmain->subversionfile < 4)) { bTheme *btheme; - for (btheme= U.themes.first; btheme; btheme= btheme->next) { - if ((btheme->tv3d.outline_width) == 0) btheme->tv3d.outline_width= 1; + for (btheme = U.themes.first; btheme; btheme = btheme->next) { + if ((btheme->tv3d.outline_width) == 0) btheme->tv3d.outline_width = 1; } } @@ -1659,7 +1659,7 @@ void init_userdef_do_versions(void) if (bmain->versionfile < 258 || (bmain->versionfile == 258 && bmain->subversionfile < 2)) { bTheme *btheme; - for (btheme= U.themes.first; btheme; btheme= btheme->next) { + for (btheme = U.themes.first; btheme; btheme = btheme->next) { btheme->tnode.noodle_curving = 5; } } @@ -1667,7 +1667,7 @@ void init_userdef_do_versions(void) if (bmain->versionfile < 259 || (bmain->versionfile == 259 && bmain->subversionfile < 1)) { bTheme *btheme; - for (btheme= U.themes.first; btheme; btheme= btheme->next) { + for (btheme = U.themes.first; btheme; btheme = btheme->next) { btheme->tv3d.speaker[3] = 255; } } @@ -1681,7 +1681,7 @@ void init_userdef_do_versions(void) if (U.keyhandles_new == HD_AUTO) U.keyhandles_new = HD_AUTO_ANIM; - for (btheme= U.themes.first; btheme; btheme= btheme->next) { + for (btheme = U.themes.first; btheme; btheme = btheme->next) { if (btheme->tv3d.bundle_solid[3] == 0) rgba_char_args_set(btheme->tv3d.bundle_solid, 200, 200, 200, 255); @@ -1689,7 +1689,7 @@ void init_userdef_do_versions(void) rgba_char_args_set(btheme->tv3d.camera_path, 0x00, 0x00, 0x00, 255); if ((btheme->tclip.back[3]) == 0) { - btheme->tclip= btheme->tv3d; + btheme->tclip = btheme->tv3d; rgba_char_args_set(btheme->tclip.marker_outline, 0x00, 0x00, 0x00, 255); rgba_char_args_set(btheme->tclip.marker, 0x7f, 0x7f, 0x00, 255); @@ -1703,7 +1703,7 @@ void init_userdef_do_versions(void) rgba_char_args_set(btheme->tclip.cframe, 0x60, 0xc0, 0x40, 255); rgba_char_args_set(btheme->tclip.handle_vertex, 0x00, 0x00, 0x00, 0xff); rgba_char_args_set(btheme->tclip.handle_vertex_select, 0xff, 0xff, 0, 0xff); - btheme->tclip.handle_vertex_size= 4; + btheme->tclip.handle_vertex_size = 4; } /* auto-clamped handles -> based on auto */ @@ -1715,7 +1715,7 @@ void init_userdef_do_versions(void) /* enable (Cycles) addon by default */ if (!BLI_findstring(&U.addons, "cycles", offsetof(bAddon, module))) { - bAddon *baddon= MEM_callocN(sizeof(bAddon), "bAddon"); + bAddon *baddon = MEM_callocN(sizeof(bAddon), "bAddon"); BLI_strncpy(baddon->module, "cycles", sizeof(baddon->module)); BLI_addtail(&U.addons, baddon); } @@ -1724,15 +1724,15 @@ void init_userdef_do_versions(void) if (bmain->versionfile < 260 || (bmain->versionfile == 260 && bmain->subversionfile < 5)) { bTheme *btheme; - for (btheme= U.themes.first; btheme; btheme= btheme->next) { + for (btheme = U.themes.first; btheme; btheme = btheme->next) { rgba_char_args_set(btheme->tui.panel.header, 0, 0, 0, 25); - btheme->tui.icon_alpha= 1.0; + btheme->tui.icon_alpha = 1.0; } } if (bmain->versionfile < 261 || (bmain->versionfile == 261 && bmain->subversionfile < 4)) { bTheme *btheme; - for (btheme= U.themes.first; btheme; btheme= btheme->next) { + for (btheme = U.themes.first; btheme; btheme = btheme->next) { rgba_char_args_set_fl(btheme->tima.preview_stitch_face, 0.071, 0.259, 0.694, 0.150); rgba_char_args_set_fl(btheme->tima.preview_stitch_edge, 1.0, 0.522, 0.0, 0.7); rgba_char_args_set_fl(btheme->tima.preview_stitch_vert, 1.0, 0.522, 0.0, 0.5); @@ -1749,7 +1749,7 @@ void init_userdef_do_versions(void) if (bmain->versionfile < 262 || (bmain->versionfile == 262 && bmain->subversionfile < 2)) { bTheme *btheme; - for (btheme= U.themes.first; btheme; btheme= btheme->next) { + for (btheme = U.themes.first; btheme; btheme = btheme->next) { if (btheme->tui.wcol_menu_item.item[3] == 255) rgba_char_args_set(btheme->tui.wcol_menu_item.item, 172, 172, 172, 128); } @@ -1757,7 +1757,7 @@ void init_userdef_do_versions(void) if (bmain->versionfile < 262 || (bmain->versionfile == 262 && bmain->subversionfile < 3)) { bTheme *btheme; - for (btheme= U.themes.first; btheme; btheme= btheme->next) { + for (btheme = U.themes.first; btheme; btheme = btheme->next) { if (btheme->tui.wcol_tooltip.inner[3] == 0) { btheme->tui.wcol_tooltip = btheme->tui.wcol_menu_back; } @@ -1769,7 +1769,7 @@ void init_userdef_do_versions(void) if (bmain->versionfile < 262 || (bmain->versionfile == 262 && bmain->subversionfile < 4)) { bTheme *btheme; - for (btheme= U.themes.first; btheme; btheme= btheme->next) { + for (btheme = U.themes.first; btheme; btheme = btheme->next) { if (btheme->tseq.movieclip[0] == 0) { rgba_char_args_set(btheme->tseq.movieclip, 32, 32, 143, 255); } @@ -1798,22 +1798,22 @@ void init_userdef_do_versions(void) U.scrcastwait = 50; } if (U.v2d_min_gridsize == 0) { - U.v2d_min_gridsize= 35; + U.v2d_min_gridsize = 35; } - if (U.dragthreshold == 0 ) - U.dragthreshold= 5; - if (U.widget_unit==0) - U.widget_unit= (U.dpi * 20 + 36)/72; + if (U.dragthreshold == 0) + U.dragthreshold = 5; + if (U.widget_unit == 0) + U.widget_unit = (U.dpi * 20 + 36) / 72; if (U.anisotropic_filter <= 0) U.anisotropic_filter = 1; if (U.ndof_sensitivity == 0.0f) { U.ndof_sensitivity = 1.0f; U.ndof_flag = NDOF_LOCK_HORIZON | - NDOF_SHOULD_PAN | NDOF_SHOULD_ZOOM | NDOF_SHOULD_ROTATE; + NDOF_SHOULD_PAN | NDOF_SHOULD_ZOOM | NDOF_SHOULD_ROTATE; } - if (U.tweak_threshold == 0 ) - U.tweak_threshold= 10; + if (U.tweak_threshold == 0) + U.tweak_threshold = 10; /* funny name, but it is GE stuff, moves userdef stuff to engine */ // XXX space_set_commmandline_options(); diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index 792ea88baa7..5c05e9d2ba1 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -66,7 +66,7 @@ /* XXX there's V2D_SCROLL_HORIZONTAL_HIDE and V2D_SCROLL_HORIZONTAL_FULLR ... */ /* helper to allow scrollbars to dynamically hide - * - returns a copy of the scrollbar settings with the flags to display + * - returns a copy of the scrollbar settings with the flags to display * horizontal/vertical scrollbars removed * - input scroll value is the v2d->scroll var * - hide flags are set per region at drawtime @@ -87,23 +87,23 @@ static void view2d_masks(View2D *v2d) /* mask - view frame */ v2d->mask.xmin = v2d->mask.ymin = 0; - v2d->mask.xmax = v2d->winx - 1; /* -1 yes! masks are pixels */ + v2d->mask.xmax = v2d->winx - 1; /* -1 yes! masks are pixels */ v2d->mask.ymax = v2d->winy - 1; #if 0 // XXX see above - v2d->scroll &= ~(V2D_SCROLL_HORIZONTAL_HIDE|V2D_SCROLL_VERTICAL_HIDE); + v2d->scroll &= ~(V2D_SCROLL_HORIZONTAL_HIDE | V2D_SCROLL_VERTICAL_HIDE); /* check size if: */ if (v2d->scroll & V2D_SCROLL_HORIZONTAL) if (!(v2d->scroll & V2D_SCROLL_SCALE_HORIZONTAL)) - if (v2d->tot.xmax-v2d->tot.xmin <= v2d->cur.xmax-v2d->cur.xmin) + if (v2d->tot.xmax - v2d->tot.xmin <= v2d->cur.xmax - v2d->cur.xmin) v2d->scroll |= V2D_SCROLL_HORIZONTAL_HIDE; if (v2d->scroll & V2D_SCROLL_VERTICAL) if (!(v2d->scroll & V2D_SCROLL_SCALE_VERTICAL)) - if (v2d->tot.ymax-v2d->tot.ymin <= v2d->cur.ymax-v2d->cur.ymin) + if (v2d->tot.ymax - v2d->tot.ymin <= v2d->cur.ymax - v2d->cur.ymin) v2d->scroll |= V2D_SCROLL_VERTICAL_HIDE; #endif - scroll= view2d_scroll_mapped(v2d->scroll); + scroll = view2d_scroll_mapped(v2d->scroll); /* scrollers shrink mask area, but should be based off regionsize * - they can only be on one to two edges of the region they define @@ -113,28 +113,28 @@ static void view2d_masks(View2D *v2d) /* vertical scroller */ if (scroll & V2D_SCROLL_LEFT) { /* on left-hand edge of region */ - v2d->vert= v2d->mask; + v2d->vert = v2d->mask; v2d->vert.xmax = V2D_SCROLL_WIDTH; v2d->mask.xmin = v2d->vert.xmax + 1; } else if (scroll & V2D_SCROLL_RIGHT) { /* on right-hand edge of region */ - v2d->vert= v2d->mask; + v2d->vert = v2d->mask; v2d->vert.xmax++; /* one pixel extra... was leaving a minor gap... */ v2d->vert.xmin = v2d->vert.xmax - V2D_SCROLL_WIDTH; v2d->mask.xmax = v2d->vert.xmin - 1; } /* horizontal scroller */ - if (scroll & (V2D_SCROLL_BOTTOM|V2D_SCROLL_BOTTOM_O)) { + if (scroll & (V2D_SCROLL_BOTTOM | V2D_SCROLL_BOTTOM_O)) { /* on bottom edge of region (V2D_SCROLL_BOTTOM_O is outliner, the other is for standard) */ - v2d->hor= v2d->mask; + v2d->hor = v2d->mask; v2d->hor.ymax = V2D_SCROLL_HEIGHT; v2d->mask.ymin = v2d->hor.ymax + 1; } else if (scroll & V2D_SCROLL_TOP) { /* on upper edge of region */ - v2d->hor= v2d->mask; + v2d->hor = v2d->mask; v2d->hor.ymin = v2d->hor.ymax - V2D_SCROLL_HEIGHT; v2d->mask.ymax = v2d->hor.ymin - 1; } @@ -142,7 +142,7 @@ static void view2d_masks(View2D *v2d) /* adjust vertical scroller if there's a horizontal scroller, to leave corner free */ if (scroll & V2D_SCROLL_VERTICAL) { /* just set y min/max for vertical scroller to y min/max of mask as appropriate */ - if (scroll & (V2D_SCROLL_BOTTOM|V2D_SCROLL_BOTTOM_O)) { + if (scroll & (V2D_SCROLL_BOTTOM | V2D_SCROLL_BOTTOM_O)) { /* on bottom edge of region (V2D_SCROLL_BOTTOM_O is outliner, the other is for standard) */ v2d->vert.ymin = v2d->mask.ymin; } @@ -159,125 +159,125 @@ static void view2d_masks(View2D *v2d) /* Initialize all relevant View2D data (including view rects if first time) and/or refresh mask sizes after view resize * - for some of these presets, it is expected that the region will have defined some - * additional settings necessary for the customisation of the 2D viewport to its requirements + * additional settings necessary for the customisation of the 2D viewport to its requirements * - this function should only be called from region init() callbacks, where it is expected that * this is called before UI_view2d_size_update(), as this one checks that the rects are properly initialized. */ void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy) { - short tot_changed= 0, init= 0; - uiStyle *style= UI_GetStyle(); + short tot_changed = 0, init = 0; + uiStyle *style = UI_GetStyle(); /* initialize data if there is a need for such */ if ((v2d->flag & V2D_IS_INITIALISED) == 0) { /* set initialized flag so that View2D doesn't get reinitialised next time again */ v2d->flag |= V2D_IS_INITIALISED; - init= 1; + init = 1; /* see eView2D_CommonViewTypes in UI_view2d.h for available view presets */ switch (type) { /* 'standard view' - optimum setup for 'standard' view behavior, * that should be used new views as basis for their - * own unique View2D settings, which should be used instead of this in most cases... + * own unique View2D settings, which should be used instead of this in most cases... */ case V2D_COMMONVIEW_STANDARD: { /* for now, aspect ratio should be maintained, and zoom is clamped within sane default limits */ - v2d->keepzoom= (V2D_KEEPASPECT|V2D_LIMITZOOM); - v2d->minzoom= 0.01f; - v2d->maxzoom= 1000.0f; + v2d->keepzoom = (V2D_KEEPASPECT | V2D_LIMITZOOM); + v2d->minzoom = 0.01f; + v2d->maxzoom = 1000.0f; /* tot rect and cur should be same size, and aligned using 'standard' OpenGL coordinates for now * - region can resize 'tot' later to fit other data * - keeptot is only within bounds, as strict locking is not that critical * - view is aligned for (0,0) -> (winx-1, winy-1) setup */ - v2d->align= (V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_NEG_Y); - v2d->keeptot= V2D_KEEPTOT_BOUNDS; + v2d->align = (V2D_ALIGN_NO_NEG_X | V2D_ALIGN_NO_NEG_Y); + v2d->keeptot = V2D_KEEPTOT_BOUNDS; v2d->tot.xmin = v2d->tot.ymin = 0.0f; v2d->tot.xmax = (float)(winx - 1); v2d->tot.ymax = (float)(winy - 1); - v2d->cur= v2d->tot; + v2d->cur = v2d->tot; /* scrollers - should we have these by default? */ // XXX for now, we don't override this, or set it either! } - break; + break; /* 'list/channel view' - zoom, aspect ratio, and alignment restrictions are set here */ case V2D_COMMONVIEW_LIST: { /* zoom + aspect ratio are locked */ - v2d->keepzoom = (V2D_LOCKZOOM_X|V2D_LOCKZOOM_Y|V2D_LIMITZOOM|V2D_KEEPASPECT); - v2d->minzoom= v2d->maxzoom= 1.0f; + v2d->keepzoom = (V2D_LOCKZOOM_X | V2D_LOCKZOOM_Y | V2D_LIMITZOOM | V2D_KEEPASPECT); + v2d->minzoom = v2d->maxzoom = 1.0f; /* tot rect has strictly regulated placement, and must only occur in +/- quadrant */ - v2d->align = (V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_POS_Y); + v2d->align = (V2D_ALIGN_NO_NEG_X | V2D_ALIGN_NO_POS_Y); v2d->keeptot = V2D_KEEPTOT_STRICT; - tot_changed= 1; + tot_changed = 1; /* scroller settings are currently not set here... that is left for regions... */ } - break; + break; /* 'stack view' - practically the same as list/channel view, except is located in the pos y half instead. - * zoom, aspect ratio, and alignment restrictions are set here */ + * zoom, aspect ratio, and alignment restrictions are set here */ case V2D_COMMONVIEW_STACK: { /* zoom + aspect ratio are locked */ - v2d->keepzoom = (V2D_LOCKZOOM_X|V2D_LOCKZOOM_Y|V2D_LIMITZOOM|V2D_KEEPASPECT); - v2d->minzoom= v2d->maxzoom= 1.0f; + v2d->keepzoom = (V2D_LOCKZOOM_X | V2D_LOCKZOOM_Y | V2D_LIMITZOOM | V2D_KEEPASPECT); + v2d->minzoom = v2d->maxzoom = 1.0f; /* tot rect has strictly regulated placement, and must only occur in +/+ quadrant */ - v2d->align = (V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_NEG_Y); + v2d->align = (V2D_ALIGN_NO_NEG_X | V2D_ALIGN_NO_NEG_Y); v2d->keeptot = V2D_KEEPTOT_STRICT; - tot_changed= 1; + tot_changed = 1; /* scroller settings are currently not set here... that is left for regions... */ } - break; + break; /* 'header' regions - zoom, aspect ratio, alignment, and panning restrictions are set here */ case V2D_COMMONVIEW_HEADER: { /* zoom + aspect ratio are locked */ - v2d->keepzoom = (V2D_LOCKZOOM_X|V2D_LOCKZOOM_Y|V2D_LIMITZOOM|V2D_KEEPASPECT); - v2d->minzoom= v2d->maxzoom= 1.0f; - v2d->min[0]= v2d->max[0]= (float)(winx-1); - v2d->min[1]= v2d->max[1]= (float)(winy-1); + v2d->keepzoom = (V2D_LOCKZOOM_X | V2D_LOCKZOOM_Y | V2D_LIMITZOOM | V2D_KEEPASPECT); + v2d->minzoom = v2d->maxzoom = 1.0f; + v2d->min[0] = v2d->max[0] = (float)(winx - 1); + v2d->min[1] = v2d->max[1] = (float)(winy - 1); /* tot rect has strictly regulated placement, and must only occur in +/+ quadrant */ - v2d->align = (V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_NEG_Y); + v2d->align = (V2D_ALIGN_NO_NEG_X | V2D_ALIGN_NO_NEG_Y); v2d->keeptot = V2D_KEEPTOT_STRICT; - tot_changed= 1; + tot_changed = 1; /* panning in y-axis is prohibited */ - v2d->keepofs= V2D_LOCKOFS_Y; + v2d->keepofs = V2D_LOCKOFS_Y; /* absolutely no scrollers allowed */ - v2d->scroll= 0; + v2d->scroll = 0; } - break; + break; /* panels view, with horizontal/vertical align */ case V2D_COMMONVIEW_PANELS_UI: { - float panelzoom= (style) ? style->panelzoom : 1.0f; + float panelzoom = (style) ? style->panelzoom : 1.0f; /* for now, aspect ratio should be maintained, and zoom is clamped within sane default limits */ - v2d->keepzoom= (V2D_KEEPASPECT|V2D_LIMITZOOM|V2D_KEEPZOOM); - v2d->minzoom= 0.5f; - v2d->maxzoom= 2.0f; + v2d->keepzoom = (V2D_KEEPASPECT | V2D_LIMITZOOM | V2D_KEEPZOOM); + v2d->minzoom = 0.5f; + v2d->maxzoom = 2.0f; //tot_changed= 1; - v2d->align= (V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_POS_Y); - v2d->keeptot= V2D_KEEPTOT_BOUNDS; + v2d->align = (V2D_ALIGN_NO_NEG_X | V2D_ALIGN_NO_POS_Y); + v2d->keeptot = V2D_KEEPTOT_BOUNDS; - v2d->scroll |= (V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM); + v2d->scroll |= (V2D_SCROLL_RIGHT | V2D_SCROLL_BOTTOM); v2d->scroll |= V2D_SCROLL_HORIZONTAL_HIDE; v2d->scroll &= ~V2D_SCROLL_VERTICAL_HIDE; @@ -289,14 +289,14 @@ void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy) v2d->cur.xmin = 0.0f; /* bad workaround for keeping zoom level with scrollers */ - v2d->cur.xmax = (winx - V2D_SCROLL_WIDTH)*panelzoom; + v2d->cur.xmax = (winx - V2D_SCROLL_WIDTH) * panelzoom; v2d->cur.ymax = 0.0f; - v2d->cur.ymin = (-winy)*panelzoom; + v2d->cur.ymin = (-winy) * panelzoom; } - break; + break; - /* other view types are completely defined using their own settings already */ + /* other view types are completely defined using their own settings already */ default: /* we don't do anything here, as settings should be fine, but just make sure that rect */ break; @@ -304,8 +304,8 @@ void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy) } /* store view size */ - v2d->winx= winx; - v2d->winy= winy; + v2d->winx = winx; + v2d->winy = winy; /* set masks */ view2d_masks(v2d); @@ -328,12 +328,12 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize) rctf *cur, *tot; /* use mask as size of region that View2D resides in, as it takes into account scrollbars already */ - winx= (float)(v2d->mask.xmax - v2d->mask.xmin + 1); - winy= (float)(v2d->mask.ymax - v2d->mask.ymin + 1); + winx = (float)(v2d->mask.xmax - v2d->mask.xmin + 1); + winy = (float)(v2d->mask.ymax - v2d->mask.ymin + 1); /* get pointers to rcts for less typing */ - cur= &v2d->cur; - tot= &v2d->tot; + cur = &v2d->cur; + tot = &v2d->tot; /* we must satisfy the following constraints (in decreasing order of importance): * - alignment restrictions are respected @@ -347,44 +347,44 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize) * - firstly, we calculate the sizes of the rects * - curwidth and curheight are saved as reference... modify width and height values here */ - totwidth= tot->xmax - tot->xmin; - totheight= tot->ymax - tot->ymin; - curwidth= width= cur->xmax - cur->xmin; - curheight= height= cur->ymax - cur->ymin; + totwidth = tot->xmax - tot->xmin; + totheight = tot->ymax - tot->ymin; + curwidth = width = cur->xmax - cur->xmin; + curheight = height = cur->ymax - cur->ymin; /* if zoom is locked, size on the appropriate axis is reset to mask size */ if (v2d->keepzoom & V2D_LOCKZOOM_X) - width= winx; + width = winx; if (v2d->keepzoom & V2D_LOCKZOOM_Y) - height= winy; + height = winy; /* values used to divide, so make it safe * NOTE: width and height must use FLT_MIN instead of 1, otherwise it is impossible to - * get enough resolution in Graph Editor for editing some curves + * get enough resolution in Graph Editor for editing some curves */ - if (width < FLT_MIN) width= 1; - if (height < FLT_MIN) height= 1; - if (winx < 1) winx= 1; - if (winy < 1) winy= 1; + if (width < FLT_MIN) width = 1; + if (height < FLT_MIN) height = 1; + if (winx < 1) winx = 1; + if (winy < 1) winy = 1; /* V2D_LIMITZOOM indicates that zoom level should be preserved when the window size changes */ if (resize && (v2d->keepzoom & V2D_KEEPZOOM)) { float zoom, oldzoom; - if ((v2d->keepzoom & V2D_LOCKZOOM_X)==0) { - zoom= winx / width; - oldzoom= v2d->oldwinx / curwidth; + if ((v2d->keepzoom & V2D_LOCKZOOM_X) == 0) { + zoom = winx / width; + oldzoom = v2d->oldwinx / curwidth; if (oldzoom != zoom) - width *= zoom/oldzoom; + width *= zoom / oldzoom; } - if ((v2d->keepzoom & V2D_LOCKZOOM_Y)==0) { - zoom= winy / height; - oldzoom= v2d->oldwiny / curheight; + if ((v2d->keepzoom & V2D_LOCKZOOM_Y) == 0) { + zoom = winy / height; + oldzoom = v2d->oldwiny / curheight; if (oldzoom != zoom) - height *= zoom/oldzoom; + height *= zoom / oldzoom; } } /* keepzoom (V2D_LIMITZOOM set), indicates that zoom level on each axis must not exceed limits @@ -394,19 +394,19 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize) float zoom, fac; /* check if excessive zoom on x-axis */ - if ((v2d->keepzoom & V2D_LOCKZOOM_X)==0) { - zoom= winx / width; + if ((v2d->keepzoom & V2D_LOCKZOOM_X) == 0) { + zoom = winx / width; if ((zoom < v2d->minzoom) || (zoom > v2d->maxzoom)) { - fac= (zoom < v2d->minzoom) ? (zoom / v2d->minzoom) : (zoom / v2d->maxzoom); + fac = (zoom < v2d->minzoom) ? (zoom / v2d->minzoom) : (zoom / v2d->maxzoom); width *= fac; } } /* check if excessive zoom on y-axis */ - if ((v2d->keepzoom & V2D_LOCKZOOM_Y)==0) { - zoom= winy / height; + if ((v2d->keepzoom & V2D_LOCKZOOM_Y) == 0) { + zoom = winy / height; if ((zoom < v2d->minzoom) || (zoom > v2d->maxzoom)) { - fac= (zoom < v2d->minzoom) ? (zoom / v2d->minzoom) : (zoom / v2d->maxzoom); + fac = (zoom < v2d->minzoom) ? (zoom / v2d->minzoom) : (zoom / v2d->maxzoom); height *= fac; } } @@ -419,35 +419,35 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize) /* check if we should restore aspect ratio (if view size changed) */ if (v2d->keepzoom & V2D_KEEPASPECT) { - short do_x=0, do_y=0, do_cur /* , do_win */ /* UNUSED */; + short do_x = 0, do_y = 0, do_cur /* , do_win */ /* UNUSED */; float /* curRatio, */ /* UNUSED */ winRatio; /* when a window edge changes, the aspect ratio can't be used to * find which is the best new 'cur' rect. thats why it stores 'old' */ - if (winx != v2d->oldwinx) do_x= 1; - if (winy != v2d->oldwiny) do_y= 1; + if (winx != v2d->oldwinx) do_x = 1; + if (winy != v2d->oldwiny) do_y = 1; /* curRatio= height / width; */ /* UNUSED */ - winRatio= winy / winx; + winRatio = winy / winx; /* both sizes change (area/region maximised) */ if (do_x == do_y) { if (do_x && do_y) { /* here is 1,1 case, so all others must be 0,0 */ - if (ABS(winx - v2d->oldwinx) > ABS(winy - v2d->oldwiny)) do_y= 0; - else do_x= 0; + if (ABS(winx - v2d->oldwinx) > ABS(winy - v2d->oldwiny)) do_y = 0; + else do_x = 0; } - else if (winRatio > 1.0f) do_x= 0; - else do_x= 1; + else if (winRatio > 1.0f) do_x = 0; + else do_x = 1; } - do_cur= do_x; + do_cur = do_x; /* do_win= do_y; */ /* UNUSED */ if (do_cur) { if ((v2d->keeptot == V2D_KEEPTOT_STRICT) && (winx != v2d->oldwinx)) { /* special exception for Outliner (and later channel-lists): - * - The view may be moved left to avoid contents being pushed out of view when view shrinks. + * - The view may be moved left to avoid contents being pushed out of view when view shrinks. * - The keeptot code will make sure cur->xmin will not be less than tot->xmin (which cannot be allowed) * - width is not adjusted for changed ratios here... */ @@ -464,7 +464,7 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize) } else { /* portrait window: correct for x */ - width= height / winRatio; + width = height / winRatio; } } else { @@ -488,8 +488,8 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize) } /* store region size for next time */ - v2d->oldwinx= (short)winx; - v2d->oldwiny= (short)winy; + v2d->oldwinx = (short)winx; + v2d->oldwiny = (short)winy; } /* Step 2: apply new sizes to cur rect, but need to take into account alignment settings here... */ @@ -508,8 +508,8 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize) cur->xmax += width - (cur->xmax - cur->xmin); } else { - temp= (cur->xmax + cur->xmin) * 0.5f; - dh= width * 0.5f; + temp = (cur->xmax + cur->xmin) * 0.5f; + dh = width * 0.5f; cur->xmin = temp - dh; cur->xmax = temp + dh; @@ -526,8 +526,8 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize) cur->ymax += height - (cur->ymax - cur->ymin); } else { - temp= (cur->ymax + cur->ymin) * 0.5f; - dh= height * 0.5f; + temp = (cur->ymax + cur->ymin) * 0.5f; + dh = height * 0.5f; cur->ymin = temp - dh; cur->ymax = temp + dh; @@ -540,11 +540,11 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize) float temp, diff; /* recalculate extents of cur */ - curwidth= cur->xmax - cur->xmin; - curheight= cur->ymax - cur->ymin; + curwidth = cur->xmax - cur->xmin; + curheight = cur->ymax - cur->ymin; /* width */ - if ( (curwidth > totwidth) && !(v2d->keepzoom & (V2D_KEEPZOOM|V2D_LOCKZOOM_X|V2D_LIMITZOOM)) ) { + if ( (curwidth > totwidth) && !(v2d->keepzoom & (V2D_KEEPZOOM | V2D_LOCKZOOM_X | V2D_LIMITZOOM)) ) { /* if zoom doesn't have to be maintained, just clamp edges */ if (cur->xmin < tot->xmin) cur->xmin = tot->xmin; if (cur->xmax > tot->xmax) cur->xmax = tot->xmax; @@ -556,21 +556,21 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize) */ if (cur->xmin < tot->xmin) { /* move cur across so that it sits at minimum of tot */ - temp= tot->xmin - cur->xmin; + temp = tot->xmin - cur->xmin; cur->xmin += temp; cur->xmax += temp; } else if (cur->xmax > tot->xmax) { /* - only offset by difference of cur-xmax and tot-xmax if that would not move - * cur-xmin to lie past tot-xmin + * cur-xmin to lie past tot-xmin * - otherwise, simply shift to tot-xmin??? */ - temp= cur->xmax - tot->xmax; + temp = cur->xmax - tot->xmax; if ((cur->xmin - temp) < tot->xmin) { /* only offset by difference from cur-min and tot-min */ - temp= cur->xmin - tot->xmin; + temp = cur->xmin - tot->xmin; cur->xmin -= temp; cur->xmax -= temp; @@ -583,7 +583,7 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize) } else { /* This here occurs when: - * - width too big, but maintaining zoom (i.e. widths cannot be changed) + * - width too big, but maintaining zoom (i.e. widths cannot be changed) * - width is OK, but need to check if outside of boundaries * * So, resolution is to just shift view by the gap between the extremities. @@ -592,29 +592,29 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize) */ if ((cur->xmin < tot->xmin) && (cur->xmax > tot->xmax)) { /* outside boundaries on both sides, so take middle-point of tot, and place in balanced way */ - temp= (tot->xmax + tot->xmin) * 0.5f; - diff= curheight * 0.5f; + temp = (tot->xmax + tot->xmin) * 0.5f; + diff = curheight * 0.5f; cur->xmin = temp - diff; cur->xmax = temp + diff; } else if (cur->xmin < tot->xmin) { /* move cur across so that it sits at minimum of tot */ - temp= tot->xmin - cur->xmin; + temp = tot->xmin - cur->xmin; cur->xmin += temp; cur->xmax += temp; } else if (cur->xmax > tot->xmax) { /* - only offset by difference of cur-xmax and tot-xmax if that would not move - * cur-xmin to lie past tot-xmin + * cur-xmin to lie past tot-xmin * - otherwise, simply shift to tot-xmin??? */ - temp= cur->xmax - tot->xmax; + temp = cur->xmax - tot->xmax; if ((cur->xmin - temp) < tot->xmin) { /* only offset by difference from cur-min and tot-min */ - temp= cur->xmin - tot->xmin; + temp = cur->xmin - tot->xmin; cur->xmin -= temp; cur->xmax -= temp; @@ -627,14 +627,14 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize) } /* height */ - if ( (curheight > totheight) && !(v2d->keepzoom & (V2D_KEEPZOOM|V2D_LOCKZOOM_Y|V2D_LIMITZOOM)) ) { + if ( (curheight > totheight) && !(v2d->keepzoom & (V2D_KEEPZOOM | V2D_LOCKZOOM_Y | V2D_LIMITZOOM)) ) { /* if zoom doesn't have to be maintained, just clamp edges */ if (cur->ymin < tot->ymin) cur->ymin = tot->ymin; if (cur->ymax > tot->ymax) cur->ymax = tot->ymax; } else { /* This here occurs when: - * - height too big, but maintaining zoom (i.e. heights cannot be changed) + * - height too big, but maintaining zoom (i.e. heights cannot be changed) * - height is OK, but need to check if outside of boundaries * * So, resolution is to just shift view by the gap between the extremities. @@ -642,22 +642,22 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize) */ if ((cur->ymin < tot->ymin) && (cur->ymax > tot->ymax)) { /* outside boundaries on both sides, so take middle-point of tot, and place in balanced way */ - temp= (tot->ymax + tot->ymin) * 0.5f; - diff= curheight * 0.5f; + temp = (tot->ymax + tot->ymin) * 0.5f; + diff = curheight * 0.5f; cur->ymin = temp - diff; cur->ymax = temp + diff; } else if (cur->ymin < tot->ymin) { /* there's still space remaining, so shift up */ - temp= tot->ymin - cur->ymin; + temp = tot->ymin - cur->ymin; cur->ymin += temp; cur->ymax += temp; } else if (cur->ymax > tot->ymax) { /* there's still space remaining, so shift down */ - temp= cur->ymax - tot->ymax; + temp = cur->ymax - tot->ymax; cur->ymin -= temp; cur->ymax -= temp; @@ -726,12 +726,12 @@ void UI_view2d_sync(bScreen *screen, ScrArea *area, View2D *v2dcur, int flag) ARegion *ar; /* don't continue if no view syncing to be done */ - if ((v2dcur->flag & (V2D_VIEWSYNC_SCREEN_TIME|V2D_VIEWSYNC_AREA_VERTICAL)) == 0) + if ((v2dcur->flag & (V2D_VIEWSYNC_SCREEN_TIME | V2D_VIEWSYNC_AREA_VERTICAL)) == 0) return; /* check if doing within area syncing (i.e. channels/vertical) */ if ((v2dcur->flag & V2D_VIEWSYNC_AREA_VERTICAL) && (area)) { - for (ar= area->regionbase.first; ar; ar= ar->next) { + for (ar = area->regionbase.first; ar; ar = ar->next) { /* don't operate on self */ if (v2dcur != &ar->v2d) { /* only if view has vertical locks enabled */ @@ -742,7 +742,7 @@ void UI_view2d_sync(bScreen *screen, ScrArea *area, View2D *v2dcur, int flag) ar->v2d.cur.ymax = v2dcur->cur.ymax; } else { /* V2D_LOCK_SET */ - /* active must copy others */ + /* active must copy others */ v2dcur->cur.ymin = ar->v2d.cur.ymin; v2dcur->cur.ymax = ar->v2d.cur.ymax; } @@ -756,8 +756,8 @@ void UI_view2d_sync(bScreen *screen, ScrArea *area, View2D *v2dcur, int flag) /* check if doing whole screen syncing (i.e. time/horizontal) */ if ((v2dcur->flag & V2D_VIEWSYNC_SCREEN_TIME) && (screen)) { - for (sa= screen->areabase.first; sa; sa= sa->next) { - for (ar= sa->regionbase.first; ar; ar= ar->next) { + for (sa = screen->areabase.first; sa; sa = sa->next) { + for (ar = sa->regionbase.first; ar; ar = ar->next) { /* don't operate on self */ if (v2dcur != &ar->v2d) { /* only if view has horizontal locks enabled */ @@ -768,7 +768,7 @@ void UI_view2d_sync(bScreen *screen, ScrArea *area, View2D *v2dcur, int flag) ar->v2d.cur.xmax = v2dcur->cur.xmax; } else { /* V2D_LOCK_SET */ - /* active must copy others */ + /* active must copy others */ v2dcur->cur.xmin = ar->v2d.cur.xmin; v2dcur->cur.xmax = ar->v2d.cur.xmax; } @@ -786,13 +786,13 @@ void UI_view2d_sync(bScreen *screen, ScrArea *area, View2D *v2dcur, int flag) /* Restore 'cur' rect to standard orientation (i.e. optimal maximum view of tot) * This does not take into account if zooming the view on an axis will improve the view (if allowed) */ -void UI_view2d_curRect_reset (View2D *v2d) +void UI_view2d_curRect_reset(View2D *v2d) { float width, height; /* assume width and height of 'cur' rect by default, should be same size as mask */ - width= (float)(v2d->mask.xmax - v2d->mask.xmin + 1); - height= (float)(v2d->mask.ymax - v2d->mask.ymin + 1); + width = (float)(v2d->mask.xmax - v2d->mask.xmin + 1); + height = (float)(v2d->mask.ymax - v2d->mask.ymin + 1); /* handle width - posx and negx flags are mutually exclusive, so watch out */ if ((v2d->align & V2D_ALIGN_NO_POS_X) && !(v2d->align & V2D_ALIGN_NO_NEG_X)) { @@ -807,7 +807,7 @@ void UI_view2d_curRect_reset (View2D *v2d) } else { /* width is centered around x==0 */ - const float dx= (float)width / 2.0f; + const float dx = (float)width / 2.0f; v2d->cur.xmin = -dx; v2d->cur.xmax = dx; @@ -826,7 +826,7 @@ void UI_view2d_curRect_reset (View2D *v2d) } else { /* height is centered around y==0 */ - const float dy= (float)height / 2.0f; + const float dy = (float)height / 2.0f; v2d->cur.ymin = -dy; v2d->cur.ymax = dy; @@ -836,13 +836,13 @@ void UI_view2d_curRect_reset (View2D *v2d) /* ------------------ */ /* Change the size of the maximum viewable area (i.e. 'tot' rect) */ -void UI_view2d_totRect_set_resize (View2D *v2d, int width, int height, int resize) +void UI_view2d_totRect_set_resize(View2D *v2d, int width, int height, int resize) { - int scroll= view2d_scroll_mapped(v2d->scroll); + int scroll = view2d_scroll_mapped(v2d->scroll); /* don't do anything if either value is 0 */ - width= abs(width); - height= abs(height); + width = abs(width); + height = abs(height); /* hrumf! */ /* XXX: there are work arounds for this in the panel and file browse code. */ @@ -853,7 +853,7 @@ void UI_view2d_totRect_set_resize (View2D *v2d, int width, int height, int resiz if (ELEM3(0, v2d, width, height)) { if (G.f & G_DEBUG) - printf("Error: View2D totRect set exiting: v2d=%p width=%d height=%d \n", (void *)v2d, width, height); // XXX temp debug info + printf("Error: View2D totRect set exiting: v2d=%p width=%d height=%d \n", (void *)v2d, width, height); // XXX temp debug info return; } @@ -870,7 +870,7 @@ void UI_view2d_totRect_set_resize (View2D *v2d, int width, int height, int resiz } else { /* width is centered around x==0 */ - const float dx= (float)width / 2.0f; + const float dx = (float)width / 2.0f; v2d->tot.xmin = -dx; v2d->tot.xmax = dx; @@ -889,7 +889,7 @@ void UI_view2d_totRect_set_resize (View2D *v2d, int width, int height, int resiz } else { /* height is centered around y==0 */ - const float dy= (float)height / 2.0f; + const float dy = (float)height / 2.0f; v2d->tot.ymin = -dy; v2d->tot.ymax = dy; @@ -906,16 +906,16 @@ void UI_view2d_totRect_set(View2D *v2d, int width, int height) int UI_view2d_tab_set(View2D *v2d, int tab) { - float default_offset[2]= {0.0f, 0.0f}; + float default_offset[2] = {0.0f, 0.0f}; float *offset, *new_offset; - int changed= 0; + int changed = 0; /* if tab changed, change offset */ if (tab != v2d->tab_cur && v2d->tab_offset) { if (tab < v2d->tab_num) - offset= &v2d->tab_offset[tab*2]; + offset = &v2d->tab_offset[tab * 2]; else - offset= default_offset; + offset = default_offset; v2d->cur.xmax += offset[0] - v2d->cur.xmin; v2d->cur.xmin = offset[0]; @@ -925,26 +925,26 @@ int UI_view2d_tab_set(View2D *v2d, int tab) /* validation should happen in subsequent totRect_set */ - changed= 1; + changed = 1; } /* resize array if needed */ if (tab >= v2d->tab_num) { - new_offset= MEM_callocN(sizeof(float)*(tab+1)*2, "view2d tab offset"); + new_offset = MEM_callocN(sizeof(float) * (tab + 1) * 2, "view2d tab offset"); if (v2d->tab_offset) { - memcpy(new_offset, v2d->tab_offset, sizeof(float)*v2d->tab_num*2); + memcpy(new_offset, v2d->tab_offset, sizeof(float) * v2d->tab_num * 2); MEM_freeN(v2d->tab_offset); } - v2d->tab_offset= new_offset; - v2d->tab_num= tab+1; + v2d->tab_offset = new_offset; + v2d->tab_num = tab + 1; } /* set current tab and offset */ - v2d->tab_cur= tab; - v2d->tab_offset[2*tab+0]= v2d->cur.xmin; - v2d->tab_offset[2*tab+1]= v2d->cur.ymax; + v2d->tab_cur = tab; + v2d->tab_offset[2 * tab + 0] = v2d->cur.xmin; + v2d->tab_offset[2 * tab + 1] = v2d->cur.ymax; return changed; } @@ -955,21 +955,21 @@ int UI_view2d_tab_set(View2D *v2d, int tab) /* mapping function to ensure 'cur' draws extended over the area where sliders are */ static void view2d_map_cur_using_mask(View2D *v2d, rctf *curmasked) { - *curmasked= v2d->cur; + *curmasked = v2d->cur; if (view2d_scroll_mapped(v2d->scroll)) { - float dx= (v2d->cur.xmax-v2d->cur.xmin)/((float)(v2d->mask.xmax-v2d->mask.xmin+1)); - float dy= (v2d->cur.ymax-v2d->cur.ymin)/((float)(v2d->mask.ymax-v2d->mask.ymin+1)); + float dx = (v2d->cur.xmax - v2d->cur.xmin) / ((float)(v2d->mask.xmax - v2d->mask.xmin + 1)); + float dy = (v2d->cur.ymax - v2d->cur.ymin) / ((float)(v2d->mask.ymax - v2d->mask.ymin + 1)); if (v2d->mask.xmin != 0) - curmasked->xmin -= dx*(float)v2d->mask.xmin; - if (v2d->mask.xmax+1 != v2d->winx) - curmasked->xmax += dx*(float)(v2d->winx - v2d->mask.xmax-1); + curmasked->xmin -= dx * (float)v2d->mask.xmin; + if (v2d->mask.xmax + 1 != v2d->winx) + curmasked->xmax += dx * (float)(v2d->winx - v2d->mask.xmax - 1); if (v2d->mask.ymin != 0) - curmasked->ymin -= dy*(float)v2d->mask.ymin; - if (v2d->mask.ymax+1 != v2d->winy) - curmasked->ymax += dy*(float)(v2d->winy - v2d->mask.ymax-1); + curmasked->ymin -= dy * (float)v2d->mask.ymin; + if (v2d->mask.ymax + 1 != v2d->winy) + curmasked->ymax += dy * (float)(v2d->winy - v2d->mask.ymax - 1); } } @@ -985,14 +985,14 @@ void UI_view2d_view_ortho(View2D *v2d) */ /* XXX brecht: instead of zero at least use a tiny offset, otherwise * pixel rounding is effectively random due to float inaccuracy */ - xofs= 0.001f*(v2d->cur.xmax - v2d->cur.xmin)/(v2d->mask.xmax - v2d->mask.xmin); - yofs= 0.001f*(v2d->cur.ymax - v2d->cur.ymin)/(v2d->mask.ymax - v2d->mask.ymin); + xofs = 0.001f * (v2d->cur.xmax - v2d->cur.xmin) / (v2d->mask.xmax - v2d->mask.xmin); + yofs = 0.001f * (v2d->cur.ymax - v2d->cur.ymin) / (v2d->mask.ymax - v2d->mask.ymin); /* apply mask-based adjustments to cur rect (due to scrollers), to eliminate scaling artifacts */ view2d_map_cur_using_mask(v2d, &curmasked); - curmasked.xmin-= xofs; curmasked.xmax-=xofs; - curmasked.ymin-= yofs; curmasked.ymax-=yofs; + curmasked.xmin -= xofs; curmasked.xmax -= xofs; + curmasked.ymin -= yofs; curmasked.ymax -= yofs; /* XXX ton: this flag set by outliner, for icons */ if (v2d->flag & V2D_PIXELOFS_X) { @@ -1005,14 +1005,14 @@ void UI_view2d_view_ortho(View2D *v2d) } /* set matrix on all appropriate axes */ - wmOrtho2(curmasked.xmin-xofs, curmasked.xmax-xofs, curmasked.ymin-yofs, curmasked.ymax-yofs); + wmOrtho2(curmasked.xmin - xofs, curmasked.xmax - xofs, curmasked.ymin - yofs, curmasked.ymax - yofs); /* XXX is this necessary? */ glLoadIdentity(); } /* Set view matrices to only use one axis of 'cur' only - * - xaxis = if non-zero, only use cur x-axis, otherwise use cur-yaxis (mostly this will be used for x) + * - xaxis = if non-zero, only use cur x-axis, otherwise use cur-yaxis (mostly this will be used for x) */ void UI_view2d_view_orthoSpecial(ARegion *ar, View2D *v2d, short xaxis) { @@ -1023,17 +1023,17 @@ void UI_view2d_view_orthoSpecial(ARegion *ar, View2D *v2d, short xaxis) * but only applied where requested */ /* XXX temp (ton) */ - xofs= 0.0f; // (v2d->flag & V2D_PIXELOFS_X) ? 0.375f : 0.0f; - yofs= 0.0f; // (v2d->flag & V2D_PIXELOFS_Y) ? 0.375f : 0.0f; + xofs = 0.0f; // (v2d->flag & V2D_PIXELOFS_X) ? 0.375f : 0.0f; + yofs = 0.0f; // (v2d->flag & V2D_PIXELOFS_Y) ? 0.375f : 0.0f; /* apply mask-based adjustments to cur rect (due to scrollers), to eliminate scaling artifacts */ view2d_map_cur_using_mask(v2d, &curmasked); /* only set matrix with 'cur' coordinates on relevant axes */ if (xaxis) - wmOrtho2(curmasked.xmin-xofs, curmasked.xmax-xofs, -yofs, ar->winy-yofs); + wmOrtho2(curmasked.xmin - xofs, curmasked.xmax - xofs, -yofs, ar->winy - yofs); else - wmOrtho2(-xofs, ar->winx-xofs, curmasked.ymin-yofs, curmasked.ymax-yofs); + wmOrtho2(-xofs, ar->winx - xofs, curmasked.ymin - yofs, curmasked.ymax - yofs); /* XXX is this necessary? */ glLoadIdentity(); @@ -1043,9 +1043,9 @@ void UI_view2d_view_orthoSpecial(ARegion *ar, View2D *v2d, short xaxis) /* Restore view matrices after drawing */ void UI_view2d_view_restore(const bContext *C) { - ARegion *ar= CTX_wm_region(C); - int width= ar->winrct.xmax-ar->winrct.xmin+1; - int height= ar->winrct.ymax-ar->winrct.ymin+1; + ARegion *ar = CTX_wm_region(C); + int width = ar->winrct.xmax - ar->winrct.xmin + 1; + int height = ar->winrct.ymax - ar->winrct.ymin + 1; wmOrtho2(0.0f, (float)width, 0.0f, (float)height); glLoadIdentity(); @@ -1058,9 +1058,9 @@ void UI_view2d_view_restore(const bContext *C) /* View2DGrid is typedef'd in UI_view2d.h */ struct View2DGrid { - float dx, dy; /* stepsize (in pixels) between gridlines */ - float startx, starty; /* initial coordinates to start drawing grid from */ - int powerx, powery; /* step as power of 10 */ + float dx, dy; /* stepsize (in pixels) between gridlines */ + float startx, starty; /* initial coordinates to start drawing grid from */ + int powerx, powery; /* step as power of 10 */ }; /* --------------- */ @@ -1068,20 +1068,20 @@ struct View2DGrid { /* try to write step as a power of 10 */ static void step_to_grid(float *step, int *power, int unit) { - const float loga= (float)log10(*step); + const float loga = (float)log10(*step); float rem; - *power= (int)(loga); + *power = (int)(loga); - rem= loga - (*power); - rem= (float)pow(10.0, rem); + rem = loga - (*power); + rem = (float)pow(10.0, rem); if (loga < 0.0f) { - if (rem < 0.2f) rem= 0.2f; - else if (rem < 0.5f) rem= 0.5f; - else rem= 1.0f; + if (rem < 0.2f) rem = 0.2f; + else if (rem < 0.5f) rem = 0.5f; + else rem = 1.0f; - *step= rem * (float)pow(10.0, (*power)); + *step = rem * (float)pow(10.0, (*power)); /* for frames, we want 1.0 frame intervals only */ if (unit == V2D_UNIT_FRAMES) { @@ -1093,11 +1093,11 @@ static void step_to_grid(float *step, int *power, int unit) if (rem == 1.0f) (*power)++; } else { - if (rem < 2.0f) rem= 2.0f; - else if (rem < 5.0f) rem= 5.0f; - else rem= 10.0f; + if (rem < 2.0f) rem = 2.0f; + else if (rem < 5.0f) rem = 5.0f; + else rem = 10.0f; - *step= rem * (float)pow(10.0, (*power)); + *step = rem * (float)pow(10.0, (*power)); (*power)++; /* prevents printing 1.0, 2.0, 3.0, etc. */ @@ -1128,62 +1128,62 @@ View2DGrid *UI_view2d_grid_calc(Scene *scene, View2D *v2d, short xunits, short x return NULL; /* grid here is allocated... */ - grid= MEM_callocN(sizeof(View2DGrid), "View2DGrid"); + grid = MEM_callocN(sizeof(View2DGrid), "View2DGrid"); /* rule: gridstep is minimal GRIDSTEP pixels */ if (xunits == V2D_UNIT_SECONDS) { - seconddiv= (float)(0.01 * FPS); + seconddiv = (float)(0.01 * FPS); } else { - seconddiv= 1.0f; + seconddiv = 1.0f; } /* calculate x-axis grid scale (only if both args are valid) */ if (ELEM(V2D_ARG_DUMMY, xunits, xclamp) == 0) { - space= v2d->cur.xmax - v2d->cur.xmin; - pixels= (float)(v2d->mask.xmax - v2d->mask.xmin); + space = v2d->cur.xmax - v2d->cur.xmin; + pixels = (float)(v2d->mask.xmax - v2d->mask.xmin); - if (pixels!=0.0f) { - grid->dx= (U.v2d_min_gridsize * space) / (seconddiv * pixels); + if (pixels != 0.0f) { + grid->dx = (U.v2d_min_gridsize * space) / (seconddiv * pixels); step_to_grid(&grid->dx, &grid->powerx, xunits); grid->dx *= seconddiv; } if (xclamp == V2D_GRID_CLAMP) { - if (grid->dx < 0.1f) grid->dx= 0.1f; - grid->powerx-= 2; - if (grid->powerx < -2) grid->powerx= -2; + if (grid->dx < 0.1f) grid->dx = 0.1f; + grid->powerx -= 2; + if (grid->powerx < -2) grid->powerx = -2; } } /* calculate y-axis grid scale (only if both args are valid) */ if (ELEM(V2D_ARG_DUMMY, yunits, yclamp) == 0) { - space= v2d->cur.ymax - v2d->cur.ymin; - pixels= (float)winy; + space = v2d->cur.ymax - v2d->cur.ymin; + pixels = (float)winy; - grid->dy= U.v2d_min_gridsize * space / pixels; + grid->dy = U.v2d_min_gridsize * space / pixels; step_to_grid(&grid->dy, &grid->powery, yunits); if (yclamp == V2D_GRID_CLAMP) { - if (grid->dy < 1.0f) grid->dy= 1.0f; - if (grid->powery < 1) grid->powery= 1; + if (grid->dy < 1.0f) grid->dy = 1.0f; + if (grid->powery < 1) grid->powery = 1; } } /* calculate start position */ if (ELEM(V2D_ARG_DUMMY, xunits, xclamp) == 0) { - grid->startx= seconddiv*(v2d->cur.xmin/seconddiv - (float)fmod(v2d->cur.xmin/seconddiv, grid->dx/seconddiv)); - if (v2d->cur.xmin < 0.0f) grid->startx-= grid->dx; + grid->startx = seconddiv * (v2d->cur.xmin / seconddiv - (float)fmod(v2d->cur.xmin / seconddiv, grid->dx / seconddiv)); + if (v2d->cur.xmin < 0.0f) grid->startx -= grid->dx; } else - grid->startx= v2d->cur.xmin; + grid->startx = v2d->cur.xmin; if (ELEM(V2D_ARG_DUMMY, yunits, yclamp) == 0) { - grid->starty= (v2d->cur.ymin - (float)fmod(v2d->cur.ymin, grid->dy)); - if (v2d->cur.ymin < 0.0f) grid->starty-= grid->dy; + grid->starty = (v2d->cur.ymin - (float)fmod(v2d->cur.ymin, grid->dy)); + if (v2d->cur.ymin < 0.0f) grid->starty -= grid->dy; } else - grid->starty= v2d->cur.ymin; + grid->starty = v2d->cur.ymin; return grid; } @@ -1201,70 +1201,70 @@ void UI_view2d_grid_draw(View2D *v2d, View2DGrid *grid, int flag) /* vertical lines */ if (flag & V2D_VERTICAL_LINES) { /* initialize initial settings */ - vec1[0]= vec2[0]= grid->startx; - vec1[1]= grid->starty; - vec2[1]= v2d->cur.ymax; + vec1[0] = vec2[0] = grid->startx; + vec1[1] = grid->starty; + vec2[1] = v2d->cur.ymax; /* minor gridlines */ - step= (v2d->mask.xmax - v2d->mask.xmin + 1) / U.v2d_min_gridsize; + step = (v2d->mask.xmax - v2d->mask.xmin + 1) / U.v2d_min_gridsize; UI_ThemeColor(TH_GRID); - for (a=0; adx; + vec2[0] = vec1[0] += grid->dx; } /* major gridlines */ - vec2[0]= vec1[0]-= 0.5f*grid->dx; + vec2[0] = vec1[0] -= 0.5f * grid->dx; UI_ThemeColorShade(TH_GRID, 16); step++; - for (a=0; a<=step; a++) { + for (a = 0; a <= step; a++) { glBegin(GL_LINE_STRIP); - glVertex2fv(vec1); - glVertex2fv(vec2); + glVertex2fv(vec1); + glVertex2fv(vec2); glEnd(); - vec2[0]= vec1[0]-= grid->dx; + vec2[0] = vec1[0] -= grid->dx; } } /* horizontal lines */ if (flag & V2D_HORIZONTAL_LINES) { /* only major gridlines */ - vec1[1]= vec2[1]= grid->starty; - vec1[0]= grid->startx; - vec2[0]= v2d->cur.xmax; + vec1[1] = vec2[1] = grid->starty; + vec1[0] = grid->startx; + vec2[0] = v2d->cur.xmax; - step= (v2d->mask.ymax - v2d->mask.ymin + 1) / U.v2d_min_gridsize; + step = (v2d->mask.ymax - v2d->mask.ymin + 1) / U.v2d_min_gridsize; UI_ThemeColor(TH_GRID); - for (a=0; a<=step; a++) { + for (a = 0; a <= step; a++) { glBegin(GL_LINE_STRIP); - glVertex2fv(vec1); - glVertex2fv(vec2); + glVertex2fv(vec1); + glVertex2fv(vec2); glEnd(); - vec2[1]= vec1[1]+= grid->dy; + vec2[1] = vec1[1] += grid->dy; } /* fine grid lines */ - vec2[1]= vec1[1]-= 0.5f*grid->dy; + vec2[1] = vec1[1] -= 0.5f * grid->dy; step++; if (flag & V2D_HORIZONTAL_FINELINES) { UI_ThemeColorShade(TH_GRID, 16); - for (a=0; ady; + vec2[1] = vec1[1] -= grid->dy; } } } @@ -1274,25 +1274,25 @@ void UI_view2d_grid_draw(View2D *v2d, View2DGrid *grid, int flag) /* horizontal axis */ if (flag & V2D_HORIZONTAL_AXIS) { - vec1[0]= v2d->cur.xmin; - vec2[0]= v2d->cur.xmax; - vec1[1]= vec2[1]= 0.0f; + vec1[0] = v2d->cur.xmin; + vec2[0] = v2d->cur.xmax; + vec1[1] = vec2[1] = 0.0f; glBegin(GL_LINE_STRIP); - glVertex2fv(vec1); - glVertex2fv(vec2); + glVertex2fv(vec1); + glVertex2fv(vec2); glEnd(); } /* vertical axis */ if (flag & V2D_VERTICAL_AXIS) { - vec1[1]= v2d->cur.ymin; - vec2[1]= v2d->cur.ymax; - vec1[0]= vec2[0]= 0.0f; + vec1[1] = v2d->cur.ymin; + vec2[1] = v2d->cur.ymax; + vec1[0] = vec2[0] = 0.0f; glBegin(GL_LINE_STRIP); - glVertex2fv(vec1); - glVertex2fv(vec2); + glVertex2fv(vec1); + glVertex2fv(vec2); glEnd(); } } @@ -1300,20 +1300,20 @@ void UI_view2d_grid_draw(View2D *v2d, View2DGrid *grid, int flag) /* Draw a constant grid in given 2d-region */ void UI_view2d_constant_grid_draw(View2D *v2d) { - float start, step= 25.0f; + float start, step = 25.0f; UI_ThemeColorShade(TH_BACK, -10); - start= v2d->cur.xmin - (float)fmod(v2d->cur.xmin, step); + start = v2d->cur.xmin - (float)fmod(v2d->cur.xmin, step); glBegin(GL_LINES); - for (; startcur.xmax; start+=step) { + for (; start < v2d->cur.xmax; start += step) { glVertex2f(start, v2d->cur.ymin); glVertex2f(start, v2d->cur.ymax); } - start= v2d->cur.ymin - (float)fmod(v2d->cur.ymin, step); - for (; startcur.ymax; start+=step) { + start = v2d->cur.ymin - (float)fmod(v2d->cur.ymin, step); + for (; start < v2d->cur.ymax; start += step) { glVertex2f(v2d->cur.xmin, start); glVertex2f(v2d->cur.xmax, start); } @@ -1331,8 +1331,8 @@ void UI_view2d_constant_grid_draw(View2D *v2d) /* the price we pay for not exposting structs :( */ void UI_view2d_grid_size(View2DGrid *grid, float *r_dx, float *r_dy) { - *r_dx= grid->dx; - *r_dy= grid->dy; + *r_dx = grid->dx; + *r_dy = grid->dy; } /* free temporary memory used for drawing grid */ @@ -1349,20 +1349,20 @@ void UI_view2d_grid_free(View2DGrid *grid) /* View2DScrollers is typedef'd in UI_view2d.h * WARNING: the start of this struct must not change, as view2d_ops.c uses this too. - * For now, we don't need to have a separate (internal) header for structs like this... + * For now, we don't need to have a separate (internal) header for structs like this... */ struct View2DScrollers { - /* focus bubbles */ - int vert_min, vert_max; /* vertical scrollbar */ - int hor_min, hor_max; /* horizontal scrollbar */ + /* focus bubbles */ + int vert_min, vert_max; /* vertical scrollbar */ + int hor_min, hor_max; /* horizontal scrollbar */ - rcti hor, vert; /* exact size of slider backdrop */ - int horfull, vertfull; /* set if sliders are full, we don't draw them */ + rcti hor, vert; /* exact size of slider backdrop */ + int horfull, vertfull; /* set if sliders are full, we don't draw them */ /* scales */ - View2DGrid *grid; /* grid for coordinate drawing */ - short xunits, xclamp; /* units and clamping options for x-axis */ - short yunits, yclamp; /* units and clamping options for y-axis */ + View2DGrid *grid; /* grid for coordinate drawing */ + short xunits, xclamp; /* units and clamping options for x-axis */ + short yunits, yclamp; /* units and clamping options for y-axis */ }; /* Calculate relevant scroller properties */ @@ -1371,35 +1371,35 @@ View2DScrollers *UI_view2d_scrollers_calc(const bContext *C, View2D *v2d, short View2DScrollers *scrollers; rcti vert, hor; float fac1, fac2, totsize, scrollsize; - int scroll= view2d_scroll_mapped(v2d->scroll); + int scroll = view2d_scroll_mapped(v2d->scroll); /* scrollers is allocated here... */ - scrollers= MEM_callocN(sizeof(View2DScrollers), "View2DScrollers"); + scrollers = MEM_callocN(sizeof(View2DScrollers), "View2DScrollers"); - vert= v2d->vert; - hor= v2d->hor; + vert = v2d->vert; + hor = v2d->hor; /* slider rects need to be smaller than region */ - hor.xmin+=4; - hor.xmax-=4; + hor.xmin += 4; + hor.xmax -= 4; if (scroll & V2D_SCROLL_BOTTOM) - hor.ymin+=4; + hor.ymin += 4; else - hor.ymax-=4; + hor.ymax -= 4; if (scroll & V2D_SCROLL_LEFT) - vert.xmin+=4; + vert.xmin += 4; else - vert.xmax-=4; - vert.ymin+=4; - vert.ymax-=4; + vert.xmax -= 4; + vert.ymin += 4; + vert.ymax -= 4; - CLAMP(vert.ymin, vert.ymin, vert.ymax-V2D_SCROLLER_HANDLE_SIZE); - CLAMP(hor.xmin, hor.xmin, hor.xmax-V2D_SCROLLER_HANDLE_SIZE); + CLAMP(vert.ymin, vert.ymin, vert.ymax - V2D_SCROLLER_HANDLE_SIZE); + CLAMP(hor.xmin, hor.xmin, hor.xmax - V2D_SCROLLER_HANDLE_SIZE); /* store in scrollers, used for drawing */ - scrollers->vert= vert; - scrollers->hor= hor; + scrollers->vert = vert; + scrollers->hor = hor; /* scroller 'buttons': * - These should always remain within the visible region of the scrollbar @@ -1409,38 +1409,38 @@ View2DScrollers *UI_view2d_scrollers_calc(const bContext *C, View2D *v2d, short /* horizontal scrollers */ if (scroll & V2D_SCROLL_HORIZONTAL) { /* scroller 'button' extents */ - totsize= v2d->tot.xmax - v2d->tot.xmin; - scrollsize= (float)(hor.xmax - hor.xmin); - if (totsize==0.0f) totsize = 1.0f; /* avoid divide by zero */ - - fac1= (v2d->cur.xmin - v2d->tot.xmin) / totsize; - if (fac1<=0.0f) - scrollers->hor_min= hor.xmin; + totsize = v2d->tot.xmax - v2d->tot.xmin; + scrollsize = (float)(hor.xmax - hor.xmin); + if (totsize == 0.0f) totsize = 1.0f; /* avoid divide by zero */ + + fac1 = (v2d->cur.xmin - v2d->tot.xmin) / totsize; + if (fac1 <= 0.0f) + scrollers->hor_min = hor.xmin; else - scrollers->hor_min= (int)(hor.xmin + (fac1 * scrollsize)); + scrollers->hor_min = (int)(hor.xmin + (fac1 * scrollsize)); - fac2= (v2d->cur.xmax - v2d->tot.xmin) / totsize; - if (fac2>=1.0f) - scrollers->hor_max= hor.xmax; + fac2 = (v2d->cur.xmax - v2d->tot.xmin) / totsize; + if (fac2 >= 1.0f) + scrollers->hor_max = hor.xmax; else - scrollers->hor_max= (int)(hor.xmin + (fac2 * scrollsize)); + scrollers->hor_max = (int)(hor.xmin + (fac2 * scrollsize)); /* prevent inverted sliders */ if (scrollers->hor_min > scrollers->hor_max) - scrollers->hor_min= scrollers->hor_max; + scrollers->hor_min = scrollers->hor_max; /* prevent sliders from being too small, and disappearing */ if ((scrollers->hor_max - scrollers->hor_min) < V2D_SCROLLER_HANDLE_SIZE) { - scrollers->hor_max= scrollers->hor_min + V2D_SCROLLER_HANDLE_SIZE; + scrollers->hor_max = scrollers->hor_min + V2D_SCROLLER_HANDLE_SIZE; - CLAMP(scrollers->hor_max, hor.xmin+V2D_SCROLLER_HANDLE_SIZE, hor.xmax); - CLAMP(scrollers->hor_min, hor.xmin, hor.xmax-V2D_SCROLLER_HANDLE_SIZE); + CLAMP(scrollers->hor_max, hor.xmin + V2D_SCROLLER_HANDLE_SIZE, hor.xmax); + CLAMP(scrollers->hor_min, hor.xmin, hor.xmax - V2D_SCROLLER_HANDLE_SIZE); } /* check whether sliders can disappear due to the full-range being used */ if (v2d->keeptot) { if ((fac1 <= 0.0f) && (fac2 >= 1.0f)) { v2d->scroll |= V2D_SCROLL_HORIZONTAL_FULLR; - scrollers->horfull= 1; + scrollers->horfull = 1; } else v2d->scroll &= ~V2D_SCROLL_HORIZONTAL_FULLR; @@ -1450,39 +1450,39 @@ View2DScrollers *UI_view2d_scrollers_calc(const bContext *C, View2D *v2d, short /* vertical scrollers */ if (scroll & V2D_SCROLL_VERTICAL) { /* scroller 'button' extents */ - totsize= v2d->tot.ymax - v2d->tot.ymin; - scrollsize= (float)(vert.ymax - vert.ymin); - if (totsize==0.0f) totsize = 1.0f; /* avoid divide by zero */ - - fac1= (v2d->cur.ymin- v2d->tot.ymin) / totsize; - if (fac1<=0.0f) - scrollers->vert_min= vert.ymin; + totsize = v2d->tot.ymax - v2d->tot.ymin; + scrollsize = (float)(vert.ymax - vert.ymin); + if (totsize == 0.0f) totsize = 1.0f; /* avoid divide by zero */ + + fac1 = (v2d->cur.ymin - v2d->tot.ymin) / totsize; + if (fac1 <= 0.0f) + scrollers->vert_min = vert.ymin; else - scrollers->vert_min= (int)(vert.ymin + (fac1 * scrollsize)); + scrollers->vert_min = (int)(vert.ymin + (fac1 * scrollsize)); - fac2= (v2d->cur.ymax - v2d->tot.ymin) / totsize; - if (fac2>=1.0f) - scrollers->vert_max= vert.ymax; + fac2 = (v2d->cur.ymax - v2d->tot.ymin) / totsize; + if (fac2 >= 1.0f) + scrollers->vert_max = vert.ymax; else - scrollers->vert_max= (int)(vert.ymin + (fac2 * scrollsize)); + scrollers->vert_max = (int)(vert.ymin + (fac2 * scrollsize)); /* prevent inverted sliders */ if (scrollers->vert_min > scrollers->vert_max) - scrollers->vert_min= scrollers->vert_max; + scrollers->vert_min = scrollers->vert_max; /* prevent sliders from being too small, and disappearing */ if ((scrollers->vert_max - scrollers->vert_min) < V2D_SCROLLER_HANDLE_SIZE) { - scrollers->vert_max= scrollers->vert_min + V2D_SCROLLER_HANDLE_SIZE; + scrollers->vert_max = scrollers->vert_min + V2D_SCROLLER_HANDLE_SIZE; - CLAMP(scrollers->vert_max, vert.ymin+V2D_SCROLLER_HANDLE_SIZE, vert.ymax); - CLAMP(scrollers->vert_min, vert.ymin, vert.ymax-V2D_SCROLLER_HANDLE_SIZE); + CLAMP(scrollers->vert_max, vert.ymin + V2D_SCROLLER_HANDLE_SIZE, vert.ymax); + CLAMP(scrollers->vert_min, vert.ymin, vert.ymax - V2D_SCROLLER_HANDLE_SIZE); } /* check whether sliders can disappear due to the full-range being used */ if (v2d->keeptot) { if ((fac1 <= 0.0f) && (fac2 >= 1.0f)) { v2d->scroll |= V2D_SCROLL_VERTICAL_FULLR; - scrollers->vertfull= 1; + scrollers->vertfull = 1; } else v2d->scroll &= ~V2D_SCROLL_VERTICAL_FULLR; @@ -1490,14 +1490,14 @@ View2DScrollers *UI_view2d_scrollers_calc(const bContext *C, View2D *v2d, short } /* grid markings on scrollbars */ - if (scroll & (V2D_SCROLL_SCALE_HORIZONTAL|V2D_SCROLL_SCALE_VERTICAL)) { + if (scroll & (V2D_SCROLL_SCALE_HORIZONTAL | V2D_SCROLL_SCALE_VERTICAL)) { /* store clamping */ - scrollers->xclamp= xclamp; - scrollers->xunits= xunits; - scrollers->yclamp= yclamp; - scrollers->yunits= yunits; + scrollers->xclamp = xclamp; + scrollers->xunits = xunits; + scrollers->yclamp = yclamp; + scrollers->yunits = yunits; - scrollers->grid= UI_view2d_grid_calc(CTX_data_scene(C), v2d, xunits, xclamp, yunits, yclamp, (hor.xmax - hor.xmin), (vert.ymax - vert.ymin)); + scrollers->grid = UI_view2d_grid_calc(CTX_data_scene(C), v2d, xunits, xclamp, yunits, yclamp, (hor.xmax - hor.xmin), (vert.ymax - vert.ymin)); } /* return scrollers */ @@ -1526,19 +1526,19 @@ static void scroll_printstr(Scene *scene, float x, float y, float val, int power ANIM_timecode_string_from_frame(timecode_str, scene, power, (unit == V2D_UNIT_SECONDS), val); /* get length of string, and adjust printing location to fit it into the horizontal scrollbar */ - len= strlen(timecode_str); + len = strlen(timecode_str); if (dir == 'h') { /* seconds/timecode display has slightly longer strings... */ if (unit == V2D_UNIT_SECONDS) - x-= 3*len; + x -= 3 * len; else - x-= 4*len; + x -= 4 * len; } /* Add degree sympbol to end of string for vertical scrollbar? */ if ((dir == 'v') && (unit == V2D_UNIT_DEGREES)) { - timecode_str[len]= 186; - timecode_str[len+1]= 0; + timecode_str[len] = 186; + timecode_str[len + 1] = 0; } /* draw it */ @@ -1548,20 +1548,20 @@ static void scroll_printstr(Scene *scene, float x, float y, float val, int power /* Draw scrollbars in the given 2d-region */ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *vs) { - Scene *scene= CTX_data_scene(C); + Scene *scene = CTX_data_scene(C); rcti vert, hor; - int scroll= view2d_scroll_mapped(v2d->scroll); + int scroll = view2d_scroll_mapped(v2d->scroll); /* make copies of rects for less typing */ - vert= vs->vert; - hor= vs->hor; + vert = vs->vert; + hor = vs->hor; /* horizontal scrollbar */ if (scroll & V2D_SCROLL_HORIZONTAL) { /* only draw scrollbar when it doesn't fill the entire space */ - if (vs->horfull==0) { - bTheme *btheme= UI_GetTheme(); - uiWidgetColors wcol= btheme->tui.wcol_scroll; + if (vs->horfull == 0) { + bTheme *btheme = UI_GetTheme(); + uiWidgetColors wcol = btheme->tui.wcol_scroll; rcti slider; int state; @@ -1570,7 +1570,7 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v slider.ymin = hor.ymin; slider.ymax = hor.ymax; - state= (v2d->scroll_ui & V2D_SCROLL_H_ACTIVE)?UI_SCROLL_PRESSED:0; + state = (v2d->scroll_ui & V2D_SCROLL_H_ACTIVE) ? UI_SCROLL_PRESSED : 0; /* show zoom handles if: * - zooming on x-axis is allowed (no scroll otherwise) @@ -1579,9 +1579,9 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v * (workaround to make sure that button windows don't show these, * and only the time-grids with their zoomability can do so) */ - if ((v2d->keepzoom & V2D_LOCKZOOM_X)==0 && - (v2d->scroll & V2D_SCROLL_SCALE_HORIZONTAL) && - (slider.xmax - slider.xmin > V2D_SCROLLER_HANDLE_SIZE)) + if ((v2d->keepzoom & V2D_LOCKZOOM_X) == 0 && + (v2d->scroll & V2D_SCROLL_SCALE_HORIZONTAL) && + (slider.xmax - slider.xmin > V2D_SCROLLER_HANDLE_SIZE)) { state |= UI_SCROLL_ARROWS; } @@ -1594,22 +1594,22 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v /* scale indicators */ if ((scroll & V2D_SCROLL_SCALE_HORIZONTAL) && (vs->grid)) { - View2DGrid *grid= vs->grid; + View2DGrid *grid = vs->grid; float fac, dfac, fac2, val; /* the numbers: convert grid->startx and -dx to scroll coordinates * - fac is x-coordinate to draw to * - dfac is gap between scale markings */ - fac= (grid->startx - v2d->cur.xmin) / (v2d->cur.xmax - v2d->cur.xmin); - fac= (float)hor.xmin + fac*(hor.xmax - hor.xmin); + fac = (grid->startx - v2d->cur.xmin) / (v2d->cur.xmax - v2d->cur.xmin); + fac = (float)hor.xmin + fac * (hor.xmax - hor.xmin); - dfac= (grid->dx) / (v2d->cur.xmax - v2d->cur.xmin); - dfac= dfac * (hor.xmax - hor.xmin); + dfac = (grid->dx) / (v2d->cur.xmax - v2d->cur.xmin); + dfac = dfac * (hor.xmax - hor.xmin); /* set starting value, and text color */ UI_ThemeColor(TH_TEXT); - val= grid->startx; + val = grid->startx; /* if we're clamping to whole numbers only, make sure entries won't be repeated */ if (vs->xclamp == V2D_GRID_CLAMP) { @@ -1619,45 +1619,45 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v } } if (vs->xunits == V2D_UNIT_FRAMES) - grid->powerx= 1; + grid->powerx = 1; /* draw numbers in the appropriate range */ if (dfac > 0.0f) { - float h= 2.0f+(float)(hor.ymin); + float h = 2.0f + (float)(hor.ymin); - for (; fac < hor.xmax-10; fac+=dfac, val+=grid->dx) { + for (; fac < hor.xmax - 10; fac += dfac, val += grid->dx) { /* make prints look nicer for scrollers */ - if (fac < hor.xmin+10) + if (fac < hor.xmin + 10) continue; switch (vs->xunits) { - case V2D_UNIT_FRAMES: /* frames (as whole numbers)*/ + case V2D_UNIT_FRAMES: /* frames (as whole numbers)*/ scroll_printstr(scene, fac, h, val, grid->powerx, V2D_UNIT_FRAMES, 'h'); break; - case V2D_UNIT_FRAMESCALE: /* frames (not always as whole numbers) */ + case V2D_UNIT_FRAMESCALE: /* frames (not always as whole numbers) */ scroll_printstr(scene, fac, h, val, grid->powerx, V2D_UNIT_FRAMESCALE, 'h'); break; - case V2D_UNIT_SECONDS: /* seconds */ - fac2= val/(float)FPS; + case V2D_UNIT_SECONDS: /* seconds */ + fac2 = val / (float)FPS; scroll_printstr(scene, fac, h, fac2, grid->powerx, V2D_UNIT_SECONDS, 'h'); break; - case V2D_UNIT_SECONDSSEQ: /* seconds with special calculations (only used for sequencer only) */ + case V2D_UNIT_SECONDSSEQ: /* seconds with special calculations (only used for sequencer only) */ { float time; - fac2= val/(float)FPS; - time= (float)floor(fac2); - fac2= fac2-time; + fac2 = val / (float)FPS; + time = (float)floor(fac2); + fac2 = fac2 - time; - scroll_printstr(scene, fac, h, time+(float)FPS*fac2/100.0f, grid->powerx, V2D_UNIT_SECONDSSEQ, 'h'); + scroll_printstr(scene, fac, h, time + (float)FPS * fac2 / 100.0f, grid->powerx, V2D_UNIT_SECONDSSEQ, 'h'); } - break; + break; - case V2D_UNIT_DEGREES: /* Graph Editor for rotation Drivers */ + case V2D_UNIT_DEGREES: /* Graph Editor for rotation Drivers */ /* HACK: although we're drawing horizontal, we make this draw as 'vertical', just to get degree signs */ scroll_printstr(scene, fac, h, val, grid->powerx, V2D_UNIT_DEGREES, 'v'); break; @@ -1670,9 +1670,9 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v /* vertical scrollbar */ if (scroll & V2D_SCROLL_VERTICAL) { /* only draw scrollbar when it doesn't fill the entire space */ - if (vs->vertfull==0) { - bTheme *btheme= UI_GetTheme(); - uiWidgetColors wcol= btheme->tui.wcol_scroll; + if (vs->vertfull == 0) { + bTheme *btheme = UI_GetTheme(); + uiWidgetColors wcol = btheme->tui.wcol_scroll; rcti slider; int state; @@ -1681,7 +1681,7 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v slider.ymin = vs->vert_min; slider.ymax = vs->vert_max; - state= (v2d->scroll_ui & V2D_SCROLL_V_ACTIVE)?UI_SCROLL_PRESSED:0; + state = (v2d->scroll_ui & V2D_SCROLL_V_ACTIVE) ? UI_SCROLL_PRESSED : 0; /* show zoom handles if: * - zooming on y-axis is allowed (no scroll otherwise) @@ -1690,9 +1690,9 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v * (workaround to make sure that button windows don't show these, * and only the time-grids with their zoomability can do so) */ - if ((v2d->keepzoom & V2D_LOCKZOOM_Y)==0 && - (v2d->scroll & V2D_SCROLL_SCALE_VERTICAL) && - (slider.ymax - slider.ymin > V2D_SCROLLER_HANDLE_SIZE)) + if ((v2d->keepzoom & V2D_LOCKZOOM_Y) == 0 && + (v2d->scroll & V2D_SCROLL_SCALE_VERTICAL) && + (slider.ymax - slider.ymin > V2D_SCROLLER_HANDLE_SIZE)) { state |= UI_SCROLL_ARROWS; } @@ -1706,7 +1706,7 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v /* scale indiators */ if ((scroll & V2D_SCROLL_SCALE_VERTICAL) && (vs->grid)) { - View2DGrid *grid= vs->grid; + View2DGrid *grid = vs->grid; float fac, dfac, val; /* the numbers: convert grid->starty and dy to scroll coordinates @@ -1715,15 +1715,15 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v * - these involve a correction for horizontal scrollbar * NOTE: it's assumed that that scrollbar is there if this is involved! */ - fac= (grid->starty- v2d->cur.ymin) / (v2d->cur.ymax - v2d->cur.ymin); - fac= vert.ymin + fac*(vert.ymax - vert.ymin); + fac = (grid->starty - v2d->cur.ymin) / (v2d->cur.ymax - v2d->cur.ymin); + fac = vert.ymin + fac * (vert.ymax - vert.ymin); - dfac= (grid->dy) / (v2d->cur.ymax - v2d->cur.ymin); - dfac= dfac * (vert.ymax - vert.ymin); + dfac = (grid->dy) / (v2d->cur.ymax - v2d->cur.ymin); + dfac = dfac * (vert.ymax - vert.ymin); /* set starting value, and text color */ UI_ThemeColor(TH_TEXT); - val= grid->starty; + val = grid->starty; /* if vertical clamping (to whole numbers) is used (i.e. in Sequencer), apply correction */ if (vs->yclamp == V2D_GRID_CLAMP) @@ -1735,13 +1735,13 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v BLF_rotation_default(90.0f); BLF_enable_default(BLF_ROTATION); - for (; fac < vert.ymax-10; fac+= dfac, val += grid->dy) { + for (; fac < vert.ymax - 10; fac += dfac, val += grid->dy) { /* make prints look nicer for scrollers */ - if (fac < vert.ymin+10) + if (fac < vert.ymin + 10) continue; - scroll_printstr(scene, (float)(vert.xmax)-2.0f, fac, val, grid->powery, vs->yunits, 'v'); + scroll_printstr(scene, (float)(vert.xmax) - 2.0f, fac, val, grid->powery, vs->yunits, 'v'); } BLF_disable_default(BLF_ROTATION); @@ -1817,31 +1817,31 @@ void UI_view2d_listview_cell_to_view(View2D *v2d, short columnwidth, short rowhe * - column, row = the 'coordinates' of the relevant 'cell' */ void UI_view2d_listview_view_to_cell(View2D *v2d, short columnwidth, short rowheight, float startx, float starty, - float viewx, float viewy, int *column, int *row) + float viewx, float viewy, int *column, int *row) { /* adjust view coordinates to be all positive ints, corrected for the start offset */ - const int x= (int)(floorf(fabsf(viewx) + 0.5f) - startx); - const int y= (int)(floorf(fabsf(viewy) + 0.5f) - starty); + const int x = (int)(floorf(fabsf(viewx) + 0.5f) - startx); + const int y = (int)(floorf(fabsf(viewy) + 0.5f) - starty); /* sizes must not be negative */ if ( (v2d == NULL) || ((columnwidth <= 0) && (rowheight <= 0)) ) { - if (column) *column= 0; - if (row) *row= 0; + if (column) *column = 0; + if (row) *row = 0; return; } /* get column */ if ((column) && (columnwidth > 0)) - *column= x / columnwidth; + *column = x / columnwidth; else if (column) - *column= 0; + *column = 0; /* get row */ if ((row) && (rowheight > 0)) - *row= y / rowheight; + *row = y / rowheight; else if (row) - *row= 0; + *row = 0; } /* Get the 'extreme' (min/max) column and row indices which are visible within the 'cur' rect @@ -1850,17 +1850,17 @@ void UI_view2d_listview_view_to_cell(View2D *v2d, short columnwidth, short rowhe * - column/row_min/max = the starting and ending column/row indices */ void UI_view2d_listview_visible_cells(View2D *v2d, short columnwidth, short rowheight, float startx, float starty, - int *column_min, int *column_max, int *row_min, int *row_max) + int *column_min, int *column_max, int *row_min, int *row_max) { /* using 'cur' rect coordinates, call the cell-getting function to get the cells for this */ if (v2d) { /* min */ UI_view2d_listview_view_to_cell(v2d, columnwidth, rowheight, startx, starty, - v2d->cur.xmin, v2d->cur.ymin, column_min, row_min); + v2d->cur.xmin, v2d->cur.ymin, column_min, row_min); /* max*/ UI_view2d_listview_view_to_cell(v2d, columnwidth, rowheight, startx, starty, - v2d->cur.xmax, v2d->cur.ymax, column_max, row_max); + v2d->cur.xmax, v2d->cur.ymax, column_max, row_max); } } @@ -1869,7 +1869,7 @@ void UI_view2d_listview_visible_cells(View2D *v2d, short columnwidth, short rowh /* Convert from screen/region space to 2d-View space * - * - x,y = coordinates to convert + * - x,y = coordinates to convert * - viewx,viewy = resultant coordinates */ void UI_view2d_region_to_view(View2D *v2d, int x, int y, float *r_viewx, float *r_viewy) @@ -1877,73 +1877,73 @@ void UI_view2d_region_to_view(View2D *v2d, int x, int y, float *r_viewx, float * float div, ofs; if (r_viewx) { - div= (float)(v2d->mask.xmax - v2d->mask.xmin); - ofs= (float)v2d->mask.xmin; + div = (float)(v2d->mask.xmax - v2d->mask.xmin); + ofs = (float)v2d->mask.xmin; - *r_viewx= v2d->cur.xmin + (v2d->cur.xmax-v2d->cur.xmin) * ((float)x - ofs) / div; + *r_viewx = v2d->cur.xmin + (v2d->cur.xmax - v2d->cur.xmin) * ((float)x - ofs) / div; } if (r_viewy) { - div= (float)(v2d->mask.ymax - v2d->mask.ymin); - ofs= (float)v2d->mask.ymin; + div = (float)(v2d->mask.ymax - v2d->mask.ymin); + ofs = (float)v2d->mask.ymin; - *r_viewy= v2d->cur.ymin + (v2d->cur.ymax - v2d->cur.ymin) * ((float)y - ofs) / div; + *r_viewy = v2d->cur.ymin + (v2d->cur.ymax - v2d->cur.ymin) * ((float)y - ofs) / div; } } /* Convert from 2d-View space to screen/region space * - Coordinates are clamped to lie within bounds of region * - * - x,y = coordinates to convert - * - regionx,regiony = resultant coordinates + * - x,y = coordinates to convert + * - regionx,regiony = resultant coordinates */ void UI_view2d_view_to_region(View2D *v2d, float x, float y, int *regionx, int *regiony) { /* set initial value in case coordinate lies outside of bounds */ if (regionx) - *regionx= V2D_IS_CLIPPED; + *regionx = V2D_IS_CLIPPED; if (regiony) - *regiony= V2D_IS_CLIPPED; + *regiony = V2D_IS_CLIPPED; /* express given coordinates as proportional values */ - x= (x - v2d->cur.xmin) / (v2d->cur.xmax - v2d->cur.xmin); - y= (y - v2d->cur.ymin) / (v2d->cur.ymax - v2d->cur.ymin); + x = (x - v2d->cur.xmin) / (v2d->cur.xmax - v2d->cur.xmin); + y = (y - v2d->cur.ymin) / (v2d->cur.ymax - v2d->cur.ymin); /* check if values are within bounds */ - if ((x>=0.0f) && (x<=1.0f) && (y>=0.0f) && (y<=1.0f)) { + if ((x >= 0.0f) && (x <= 1.0f) && (y >= 0.0f) && (y <= 1.0f)) { if (regionx) - *regionx= (int)(v2d->mask.xmin + x*(v2d->mask.xmax-v2d->mask.xmin)); + *regionx = (int)(v2d->mask.xmin + x * (v2d->mask.xmax - v2d->mask.xmin)); if (regiony) - *regiony= (int)(v2d->mask.ymin + y*(v2d->mask.ymax-v2d->mask.ymin)); + *regiony = (int)(v2d->mask.ymin + y * (v2d->mask.ymax - v2d->mask.ymin)); } } /* Convert from 2d-view space to screen/region space * - Coordinates are NOT clamped to lie within bounds of region * - * - x,y = coordinates to convert - * - regionx,regiony = resultant coordinates + * - x,y = coordinates to convert + * - regionx,regiony = resultant coordinates */ void UI_view2d_to_region_no_clip(View2D *v2d, float x, float y, int *regionx, int *regiony) { /* step 1: express given coordinates as proportional values */ - x= (x - v2d->cur.xmin) / (v2d->cur.xmax - v2d->cur.xmin); - y= (y - v2d->cur.ymin) / (v2d->cur.ymax - v2d->cur.ymin); + x = (x - v2d->cur.xmin) / (v2d->cur.xmax - v2d->cur.xmin); + y = (y - v2d->cur.ymin) / (v2d->cur.ymax - v2d->cur.ymin); /* step 2: convert proportional distances to screen coordinates */ - x= v2d->mask.xmin + x*(v2d->mask.xmax - v2d->mask.xmin); - y= v2d->mask.ymin + y*(v2d->mask.ymax - v2d->mask.ymin); + x = v2d->mask.xmin + x * (v2d->mask.xmax - v2d->mask.xmin); + y = v2d->mask.ymin + y * (v2d->mask.ymax - v2d->mask.ymin); /* although we don't clamp to lie within region bounds, we must avoid exceeding size of ints */ if (regionx) { - if (x < INT_MIN) *regionx= INT_MIN; - else if (x > INT_MAX) *regionx= INT_MAX; - else *regionx= (int)x; + if (x < INT_MIN) *regionx = INT_MIN; + else if (x > INT_MAX) *regionx = INT_MAX; + else *regionx = (int)x; } if (regiony) { - if (y < INT_MIN) *regiony= INT_MIN; - else if (y > INT_MAX) *regiony= INT_MAX; - else *regiony= (int)y; + if (y < INT_MIN) *regiony = INT_MIN; + else if (y > INT_MAX) *regiony = INT_MAX; + else *regiony = (int)y; } } @@ -1953,8 +1953,8 @@ void UI_view2d_to_region_no_clip(View2D *v2d, float x, float y, int *regionx, in /* View2D data by default resides in region, so get from region stored in context */ View2D *UI_view2d_fromcontext(const bContext *C) { - ScrArea *area= CTX_wm_area(C); - ARegion *region= CTX_wm_region(C); + ScrArea *area = CTX_wm_area(C); + ARegion *region = CTX_wm_region(C); if (area == NULL) return NULL; if (region == NULL) return NULL; @@ -1964,13 +1964,13 @@ View2D *UI_view2d_fromcontext(const bContext *C) /* same as above, but it returns regionwindow. Utility for pulldowns or buttons */ View2D *UI_view2d_fromcontext_rwin(const bContext *C) { - ScrArea *sa= CTX_wm_area(C); - ARegion *region= CTX_wm_region(C); + ScrArea *sa = CTX_wm_area(C); + ARegion *region = CTX_wm_region(C); if (sa == NULL) return NULL; if (region == NULL) return NULL; - if (region->regiontype!=RGN_TYPE_WINDOW) { - ARegion *ar= BKE_area_find_region_type(sa, RGN_TYPE_WINDOW); + if (region->regiontype != RGN_TYPE_WINDOW) { + ARegion *ar = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW); return ar ? &(ar->v2d) : NULL; } return &(region->v2d); @@ -1997,15 +1997,15 @@ void UI_view2d_getscale(View2D *v2d, float *x, float *y) * * - x,y = mouse coordinates in screen (not region) space */ -short UI_view2d_mouse_in_scrollers (const bContext *C, View2D *v2d, int x, int y) +short UI_view2d_mouse_in_scrollers(const bContext *C, View2D *v2d, int x, int y) { - ARegion *ar= CTX_wm_region(C); + ARegion *ar = CTX_wm_region(C); int co[2]; - int scroll= view2d_scroll_mapped(v2d->scroll); + int scroll = view2d_scroll_mapped(v2d->scroll); /* clamp x,y to region-coordinates first */ - co[0]= x - ar->winrct.xmin; - co[1]= y - ar->winrct.ymin; + co[0] = x - ar->winrct.xmin; + co[1] = y - ar->winrct.ymin; /* check if within scrollbars */ if (scroll & V2D_SCROLL_HORIZONTAL) { @@ -2022,7 +2022,7 @@ short UI_view2d_mouse_in_scrollers (const bContext *C, View2D *v2d, int x, int y /* ******************* view2d text drawing cache ******************** */ /* assumes caches are used correctly, so for time being no local storage in v2d */ -static ListBase strings= {NULL, NULL}; +static ListBase strings = {NULL, NULL}; typedef struct View2DString { struct View2DString *next, *prev; @@ -2039,36 +2039,36 @@ void UI_view2d_text_cache_add(View2D *v2d, float x, float y, const char *str, co { int mval[2]; - UI_view2d_view_to_region(v2d, x, y, mval, mval+1); + UI_view2d_view_to_region(v2d, x, y, mval, mval + 1); - if (mval[0]!=V2D_IS_CLIPPED && mval[1]!=V2D_IS_CLIPPED) { - int len= strlen(str)+1; + if (mval[0] != V2D_IS_CLIPPED && mval[1] != V2D_IS_CLIPPED) { + int len = strlen(str) + 1; /* use calloc, rect has to be zeroe'd */ - View2DString *v2s= MEM_callocN(sizeof(View2DString)+len, "View2DString"); - char *v2s_str= (char *)(v2s+1); + View2DString *v2s = MEM_callocN(sizeof(View2DString) + len, "View2DString"); + char *v2s_str = (char *)(v2s + 1); memcpy(v2s_str, str, len); BLI_addtail(&strings, v2s); - v2s->col.pack= *((int *)col); - v2s->mval[0]= mval[0]; - v2s->mval[1]= mval[1]; + v2s->col.pack = *((int *)col); + v2s->mval[0] = mval[0]; + v2s->mval[1] = mval[1]; } } /* no clip (yet) */ void UI_view2d_text_cache_rectf(View2D *v2d, rctf *rect, const char *str, const char col[4]) { - int len= strlen(str)+1; - View2DString *v2s= MEM_callocN(sizeof(View2DString)+len, "View2DString"); - char *v2s_str= (char *)(v2s+1); + int len = strlen(str) + 1; + View2DString *v2s = MEM_callocN(sizeof(View2DString) + len, "View2DString"); + char *v2s_str = (char *)(v2s + 1); memcpy(v2s_str, str, len); UI_view2d_to_region_no_clip(v2d, rect->xmin, rect->ymin, &v2s->rect.xmin, &v2s->rect.ymin); UI_view2d_to_region_no_clip(v2d, rect->xmax, rect->ymax, &v2s->rect.xmax, &v2s->rect.ymax); - v2s->col.pack= *((int *)col); - v2s->mval[0]= v2s->rect.xmin; - v2s->mval[1]= v2s->rect.ymin; + v2s->col.pack = *((int *)col); + v2s->mval[0] = v2s->rect.xmin; + v2s->mval[1] = v2s->rect.ymin; BLI_addtail(&strings, v2s); } @@ -2077,7 +2077,7 @@ void UI_view2d_text_cache_rectf(View2D *v2d, rctf *rect, const char *str, const void UI_view2d_text_cache_draw(ARegion *ar) { View2DString *v2s; - int col_pack_prev= 0; + int col_pack_prev = 0; // glMatrixMode(GL_PROJECTION); // glPushMatrix(); @@ -2085,24 +2085,24 @@ void UI_view2d_text_cache_draw(ARegion *ar) // glPushMatrix(); ED_region_pixelspace(ar); - for (v2s= strings.first; v2s; v2s= v2s->next) { - const char *str= (const char *)(v2s+1); - int xofs=0, yofs; + for (v2s = strings.first; v2s; v2s = v2s->next) { + const char *str = (const char *)(v2s + 1); + int xofs = 0, yofs; - yofs= ceil( 0.5f*(v2s->rect.ymax - v2s->rect.ymin - BLF_height_default("28"))); - if (yofs<1) yofs= 1; + yofs = ceil(0.5f * (v2s->rect.ymax - v2s->rect.ymin - BLF_height_default("28"))); + if (yofs < 1) yofs = 1; if (col_pack_prev != v2s->col.pack) { glColor3ubv(v2s->col.ub); - col_pack_prev= v2s->col.pack; + col_pack_prev = v2s->col.pack; } if (v2s->rect.xmin >= v2s->rect.xmax) - BLF_draw_default((float)v2s->mval[0]+xofs, (float)v2s->mval[1]+yofs, 0.0, str, BLF_DRAW_STR_DUMMY_MAX); + BLF_draw_default((float)v2s->mval[0] + xofs, (float)v2s->mval[1] + yofs, 0.0, str, BLF_DRAW_STR_DUMMY_MAX); else { - BLF_clipping_default(v2s->rect.xmin-4, v2s->rect.ymin-4, v2s->rect.xmax+4, v2s->rect.ymax+4); + BLF_clipping_default(v2s->rect.xmin - 4, v2s->rect.ymin - 4, v2s->rect.xmax + 4, v2s->rect.ymax + 4); BLF_enable_default(BLF_CLIPPING); - BLF_draw_default(v2s->rect.xmin+xofs, v2s->rect.ymin+yofs, 0.0f, str, BLF_DRAW_STR_DUMMY_MAX); + BLF_draw_default(v2s->rect.xmin + xofs, v2s->rect.ymin + yofs, 0.0f, str, BLF_DRAW_STR_DUMMY_MAX); BLF_disable_default(BLF_CLIPPING); } } diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c index c729e944c62..129a47c7063 100644 --- a/source/blender/editors/interface/view2d_ops.c +++ b/source/blender/editors/interface/view2d_ops.c @@ -55,7 +55,7 @@ static int view2d_poll(bContext *C) { - ARegion *ar= CTX_wm_region(C); + ARegion *ar = CTX_wm_region(C); return (ar != NULL) && (ar->v2d.flag & V2D_IS_INITIALISED); } @@ -63,37 +63,37 @@ static int view2d_poll(bContext *C) /* ********************************************************* */ /* VIEW PANNING OPERATOR */ -/* This group of operators come in several forms: +/* This group of operators come in several forms: * 1) Modal 'dragging' with MMB - where movement of mouse dictates amount to pan view by * 2) Scrollwheel 'steps' - rolling mousewheel by one step moves view by predefined amount * * In order to make sure this works, each operator must define the following RNA-Operator Props: - * deltax, deltay - define how much to move view by (relative to zoom-correction factor) + * deltax, deltay - define how much to move view by (relative to zoom-correction factor) */ /* ------------------ Shared 'core' stuff ---------------------- */ /* temp customdata for operator */ typedef struct v2dViewPanData { - bScreen *sc; /* screen where view pan was initiated */ - ScrArea *sa; /* area where view pan was initiated */ - ARegion *ar; /* region where view pan was initiated */ - View2D *v2d; /* view2d we're operating in */ - - float facx, facy; /* amount to move view relative to zoom */ - - /* options for version 1 */ - int startx, starty; /* mouse x/y values in window when operator was initiated */ - int lastx, lasty; /* previous x/y values of mouse in window */ - int invoke_event; /* event starting pan, for modal exit */ + bScreen *sc; /* screen where view pan was initiated */ + ScrArea *sa; /* area where view pan was initiated */ + ARegion *ar; /* region where view pan was initiated */ + View2D *v2d; /* view2d we're operating in */ + + float facx, facy; /* amount to move view relative to zoom */ + + /* options for version 1 */ + int startx, starty; /* mouse x/y values in window when operator was initiated */ + int lastx, lasty; /* previous x/y values of mouse in window */ + int invoke_event; /* event starting pan, for modal exit */ - short in_scroller; /* for MMB in scrollers (old feature in past, but now not that useful) */ + short in_scroller; /* for MMB in scrollers (old feature in past, but now not that useful) */ } v2dViewPanData; /* initialize panning customdata */ static int view_pan_init(bContext *C, wmOperator *op) { - ARegion *ar= CTX_wm_region(C); + ARegion *ar = CTX_wm_region(C); v2dViewPanData *vpd; View2D *v2d; float winx, winy; @@ -103,25 +103,25 @@ static int view_pan_init(bContext *C, wmOperator *op) return 0; /* check if panning is allowed at all */ - v2d= &ar->v2d; + v2d = &ar->v2d; if ((v2d->keepofs & V2D_LOCKOFS_X) && (v2d->keepofs & V2D_LOCKOFS_Y)) return 0; /* set custom-data for operator */ - vpd= MEM_callocN(sizeof(v2dViewPanData), "v2dViewPanData"); - op->customdata= vpd; + vpd = MEM_callocN(sizeof(v2dViewPanData), "v2dViewPanData"); + op->customdata = vpd; /* set pointers to owners */ - vpd->sc= CTX_wm_screen(C); - vpd->sa= CTX_wm_area(C); - vpd->v2d= v2d; + vpd->sc = CTX_wm_screen(C); + vpd->sa = CTX_wm_area(C); + vpd->v2d = v2d; vpd->ar = ar; /* calculate translation factor - based on size of view */ - winx= (float)(ar->winrct.xmax - ar->winrct.xmin + 1); - winy= (float)(ar->winrct.ymax - ar->winrct.ymin + 1); - vpd->facx= (v2d->cur.xmax - v2d->cur.xmin) / winx; - vpd->facy= (v2d->cur.ymax - v2d->cur.ymin) / winy; + winx = (float)(ar->winrct.xmax - ar->winrct.xmin + 1); + winy = (float)(ar->winrct.ymax - ar->winrct.ymin + 1); + vpd->facx = (v2d->cur.xmax - v2d->cur.xmin) / winx; + vpd->facy = (v2d->cur.ymax - v2d->cur.ymin) / winy; return 1; } @@ -129,20 +129,20 @@ static int view_pan_init(bContext *C, wmOperator *op) /* apply transform to view (i.e. adjust 'cur' rect) */ static void view_pan_apply(wmOperator *op) { - v2dViewPanData *vpd= op->customdata; - View2D *v2d= vpd->v2d; + v2dViewPanData *vpd = op->customdata; + View2D *v2d = vpd->v2d; float dx, dy; /* calculate amount to move view by */ - dx= vpd->facx * (float)RNA_int_get(op->ptr, "deltax"); - dy= vpd->facy * (float)RNA_int_get(op->ptr, "deltay"); + dx = vpd->facx * (float)RNA_int_get(op->ptr, "deltax"); + dy = vpd->facy * (float)RNA_int_get(op->ptr, "deltay"); /* only move view on an axis if change is allowed */ - if ((v2d->keepofs & V2D_LOCKOFS_X)==0) { + if ((v2d->keepofs & V2D_LOCKOFS_X) == 0) { v2d->cur.xmin += dx; v2d->cur.xmax += dx; } - if ((v2d->keepofs & V2D_LOCKOFS_Y)==0) { + if ((v2d->keepofs & V2D_LOCKOFS_Y) == 0) { v2d->cur.ymin += dy; v2d->cur.ymax += dy; } @@ -156,9 +156,9 @@ static void view_pan_apply(wmOperator *op) UI_view2d_sync(vpd->sc, vpd->sa, v2d, V2D_LOCK_COPY); /* exceptions */ - if (vpd->sa->spacetype==SPACE_OUTLINER) { + if (vpd->sa->spacetype == SPACE_OUTLINER) { /* don't rebuild full tree, since we're just changing our view */ - SpaceOops *soops= vpd->sa->spacedata.first; + SpaceOops *soops = vpd->sa->spacedata.first; soops->storeflag |= SO_TREESTORE_REDRAW; } } @@ -168,7 +168,7 @@ static void view_pan_exit(wmOperator *op) { if (op->customdata) { MEM_freeN(op->customdata); - op->customdata= NULL; + op->customdata = NULL; } } @@ -188,7 +188,7 @@ static int view_pan_exec(bContext *C, wmOperator *op) /* set up modal operator and relevant settings */ static int view_pan_invoke(bContext *C, wmOperator *op, wmEvent *event) { - wmWindow *window= CTX_wm_window(C); + wmWindow *window = CTX_wm_window(C); v2dViewPanData *vpd; View2D *v2d; @@ -196,13 +196,13 @@ static int view_pan_invoke(bContext *C, wmOperator *op, wmEvent *event) if (!view_pan_init(C, op)) return OPERATOR_PASS_THROUGH; - vpd= op->customdata; - v2d= vpd->v2d; + vpd = op->customdata; + v2d = vpd->v2d; /* set initial settings */ - vpd->startx= vpd->lastx= event->x; - vpd->starty= vpd->lasty= event->y; - vpd->invoke_event= event->type; + vpd->startx = vpd->lastx = event->x; + vpd->starty = vpd->lasty = event->y; + vpd->invoke_event = event->type; if (event->type == MOUSEPAN) { RNA_int_set(op->ptr, "deltax", event->prevx - event->x); @@ -232,7 +232,7 @@ static int view_pan_invoke(bContext *C, wmOperator *op, wmEvent *event) /* handle user input - calculations of mouse-movement need to be done here, not in the apply callback! */ static int view_pan_modal(bContext *C, wmOperator *op, wmEvent *event) { - v2dViewPanData *vpd= op->customdata; + v2dViewPanData *vpd = op->customdata; /* execute the events */ switch (event->type) { @@ -242,18 +242,18 @@ static int view_pan_modal(bContext *C, wmOperator *op, wmEvent *event) RNA_int_set(op->ptr, "deltax", (vpd->lastx - event->x)); RNA_int_set(op->ptr, "deltay", (vpd->lasty - event->y)); - vpd->lastx= event->x; - vpd->lasty= event->y; + vpd->lastx = event->x; + vpd->lasty = event->y; view_pan_apply(op); } - break; - /* XXX - Mode switching isn't implemented. See comments in 36818. - * switch to zoom */ + break; + /* XXX - Mode switching isn't implemented. See comments in 36818. + * switch to zoom */ #if 0 case LEFTMOUSE: - if (event->val==KM_PRESS) { - * calculate overall delta mouse-movement for redo * + if (event->val == KM_PRESS) { + /* calculate overall delta mouse-movement for redo */ RNA_int_set(op->ptr, "deltax", (vpd->startx - vpd->lastx)); RNA_int_set(op->ptr, "deltay", (vpd->starty - vpd->lasty)); @@ -264,8 +264,8 @@ static int view_pan_modal(bContext *C, wmOperator *op, wmEvent *event) } #endif default: - if (event->type == vpd->invoke_event || event->type==ESCKEY) { - if (event->val==KM_RELEASE) { + if (event->type == vpd->invoke_event || event->type == ESCKEY) { + if (event->val == KM_RELEASE) { /* calculate overall delta mouse-movement for redo */ RNA_int_set(op->ptr, "deltax", (vpd->startx - vpd->lastx)); RNA_int_set(op->ptr, "deltay", (vpd->starty - vpd->lasty)); @@ -302,7 +302,7 @@ static void VIEW2D_OT_pan(wmOperatorType *ot) ot->cancel = view_pan_cancel; /* operator is modal */ - ot->flag = OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER; + ot->flag = OPTYPE_BLOCKING | OPTYPE_GRAB_POINTER; /* rna - must keep these in sync with the other operators */ RNA_def_int(ot->srna, "deltax", 0, INT_MIN, INT_MAX, "Delta X", "", INT_MIN, INT_MAX); @@ -321,7 +321,7 @@ static int view_scrollright_exec(bContext *C, wmOperator *op) return OPERATOR_PASS_THROUGH; /* also, check if can pan in horizontal axis */ - vpd= op->customdata; + vpd = op->customdata; if (vpd->v2d->keepofs & V2D_LOCKOFS_X) { view_pan_exit(op); return OPERATOR_PASS_THROUGH; @@ -365,7 +365,7 @@ static int view_scrollleft_exec(bContext *C, wmOperator *op) return OPERATOR_PASS_THROUGH; /* also, check if can pan in horizontal axis */ - vpd= op->customdata; + vpd = op->customdata; if (vpd->v2d->keepofs & V2D_LOCKOFS_X) { view_pan_exit(op); return OPERATOR_PASS_THROUGH; @@ -408,7 +408,7 @@ static int view_scrolldown_exec(bContext *C, wmOperator *op) return OPERATOR_PASS_THROUGH; /* also, check if can pan in vertical axis */ - vpd= op->customdata; + vpd = op->customdata; if (vpd->v2d->keepofs & V2D_LOCKOFS_Y) { view_pan_exit(op); return OPERATOR_PASS_THROUGH; @@ -419,7 +419,7 @@ static int view_scrolldown_exec(bContext *C, wmOperator *op) RNA_int_set(op->ptr, "deltay", -40); if (RNA_boolean_get(op->ptr, "page")) { - ARegion *ar= CTX_wm_region(C); + ARegion *ar = CTX_wm_region(C); RNA_int_set(op->ptr, "deltay", ar->v2d.mask.ymin - ar->v2d.mask.ymax); } @@ -458,7 +458,7 @@ static int view_scrollup_exec(bContext *C, wmOperator *op) return OPERATOR_PASS_THROUGH; /* also, check if can pan in vertical axis */ - vpd= op->customdata; + vpd = op->customdata; if (vpd->v2d->keepofs & V2D_LOCKOFS_Y) { view_pan_exit(op); return OPERATOR_PASS_THROUGH; @@ -469,7 +469,7 @@ static int view_scrollup_exec(bContext *C, wmOperator *op) RNA_int_set(op->ptr, "deltay", 40); if (RNA_boolean_get(op->ptr, "page")) { - ARegion *ar= CTX_wm_region(C); + ARegion *ar = CTX_wm_region(C); RNA_int_set(op->ptr, "deltay", ar->v2d.mask.ymax - ar->v2d.mask.ymin); } @@ -499,7 +499,7 @@ static void VIEW2D_OT_scroll_up(wmOperatorType *ot) /* ********************************************************* */ /* SINGLE-STEP VIEW ZOOMING OPERATOR */ -/* This group of operators come in several forms: +/* This group of operators come in several forms: * 1) Scrollwheel 'steps' - rolling mousewheel by one step zooms view by predefined amount * 2) Scrollwheel 'steps' + alt + ctrl/shift - zooms view on one axis only (ctrl=x, shift=y) // XXX this could be implemented... * 3) Pad +/- Keys - pressing each key moves the zooms the view by a predefined amount @@ -514,42 +514,42 @@ static void VIEW2D_OT_scroll_up(wmOperatorType *ot) /* temp customdata for operator */ typedef struct v2dViewZoomData { - View2D *v2d; /* view2d we're operating in */ + View2D *v2d; /* view2d we're operating in */ ARegion *ar; /* needed for continuous zoom */ wmTimer *timer; double timer_lastdraw; - int lastx, lasty; /* previous x/y values of mouse in window */ - int invoke_event; /* event type that invoked, for modal exits */ - float dx, dy; /* running tally of previous delta values (for obtaining final zoom) */ - float mx_2d, my_2d; /* initial mouse location in v2d coords */ + int lastx, lasty; /* previous x/y values of mouse in window */ + int invoke_event; /* event type that invoked, for modal exits */ + float dx, dy; /* running tally of previous delta values (for obtaining final zoom) */ + float mx_2d, my_2d; /* initial mouse location in v2d coords */ } v2dViewZoomData; /* initialize panning customdata */ static int view_zoomdrag_init(bContext *C, wmOperator *op) { - ARegion *ar= CTX_wm_region(C); + ARegion *ar = CTX_wm_region(C); v2dViewZoomData *vzd; View2D *v2d; /* regions now have v2d-data by default, so check for region */ if (ar == NULL) return 0; - v2d= &ar->v2d; + v2d = &ar->v2d; /* check that 2d-view is zoomable */ if ((v2d->keepzoom & V2D_LOCKZOOM_X) && (v2d->keepzoom & V2D_LOCKZOOM_Y)) return 0; /* set custom-data for operator */ - vzd= MEM_callocN(sizeof(v2dViewZoomData), "v2dViewZoomData"); - op->customdata= vzd; + vzd = MEM_callocN(sizeof(v2dViewZoomData), "v2dViewZoomData"); + op->customdata = vzd; /* set pointers to owners */ - vzd->v2d= v2d; + vzd->v2d = v2d; vzd->ar = ar; return 1; @@ -558,13 +558,13 @@ static int view_zoomdrag_init(bContext *C, wmOperator *op) /* check if step-zoom can be applied */ static int view_zoom_poll(bContext *C) { - ARegion *ar= CTX_wm_region(C); + ARegion *ar = CTX_wm_region(C); View2D *v2d; /* check if there's a region in context to work with */ if (ar == NULL) return 0; - v2d= &ar->v2d; + v2d = &ar->v2d; /* check that 2d-view is zoomable */ if ((v2d->keepzoom & V2D_LOCKZOOM_X) && (v2d->keepzoom & V2D_LOCKZOOM_Y)) @@ -577,42 +577,42 @@ static int view_zoom_poll(bContext *C) /* apply transform to view (i.e. adjust 'cur' rect) */ static void view_zoomstep_apply(bContext *C, wmOperator *op) { - v2dViewZoomData *vzd= op->customdata; - ARegion *ar= CTX_wm_region(C); - View2D *v2d= &ar->v2d; + v2dViewZoomData *vzd = op->customdata; + ARegion *ar = CTX_wm_region(C); + View2D *v2d = &ar->v2d; float dx, dy, facx, facy; /* calculate amount to move view by, ensuring symmetry so the * old zoom level is restored after zooming back the same amount */ - facx= RNA_float_get(op->ptr, "zoomfacx"); - facy= RNA_float_get(op->ptr, "zoomfacy"); + facx = RNA_float_get(op->ptr, "zoomfacx"); + facy = RNA_float_get(op->ptr, "zoomfacy"); if (facx >= 0.0f) { - dx= (v2d->cur.xmax - v2d->cur.xmin) * facx; - dy= (v2d->cur.ymax - v2d->cur.ymin) * facy; + dx = (v2d->cur.xmax - v2d->cur.xmin) * facx; + dy = (v2d->cur.ymax - v2d->cur.ymin) * facy; } else { - dx= ((v2d->cur.xmax - v2d->cur.xmin)/(1.0f + 2.0f*facx)) * facx; - dy= ((v2d->cur.ymax - v2d->cur.ymin)/(1.0f + 2.0f*facy)) * facy; + dx = ((v2d->cur.xmax - v2d->cur.xmin) / (1.0f + 2.0f * facx)) * facx; + dy = ((v2d->cur.ymax - v2d->cur.ymin) / (1.0f + 2.0f * facy)) * facy; } /* only resize view on an axis if change is allowed */ - if ((v2d->keepzoom & V2D_LOCKZOOM_X)==0) { + if ((v2d->keepzoom & V2D_LOCKZOOM_X) == 0) { if (v2d->keepofs & V2D_LOCKOFS_X) { - v2d->cur.xmax -= 2*dx; + v2d->cur.xmax -= 2 * dx; } else if (v2d->keepofs & V2D_KEEPOFS_X) { if (v2d->align & V2D_ALIGN_NO_POS_X) - v2d->cur.xmin += 2*dx; + v2d->cur.xmin += 2 * dx; else - v2d->cur.xmax -= 2*dx; + v2d->cur.xmax -= 2 * dx; } else { if (U.uiflag & USER_ZOOM_TO_MOUSEPOS) { - float mval_fac = (vzd->mx_2d - v2d->cur.xmin) / (v2d->cur.xmax-v2d->cur.xmin); + float mval_fac = (vzd->mx_2d - v2d->cur.xmin) / (v2d->cur.xmax - v2d->cur.xmin); float mval_faci = 1.0f - mval_fac; - float ofs= (mval_fac * dx) - (mval_faci * dx); + float ofs = (mval_fac * dx) - (mval_faci * dx); v2d->cur.xmin += ofs + dx; v2d->cur.xmax += ofs - dx; @@ -623,21 +623,21 @@ static void view_zoomstep_apply(bContext *C, wmOperator *op) } } } - if ((v2d->keepzoom & V2D_LOCKZOOM_Y)==0) { + if ((v2d->keepzoom & V2D_LOCKZOOM_Y) == 0) { if (v2d->keepofs & V2D_LOCKOFS_Y) { - v2d->cur.ymax -= 2*dy; + v2d->cur.ymax -= 2 * dy; } else if (v2d->keepofs & V2D_KEEPOFS_Y) { if (v2d->align & V2D_ALIGN_NO_POS_Y) - v2d->cur.ymin += 2*dy; + v2d->cur.ymin += 2 * dy; else - v2d->cur.ymax -= 2*dy; + v2d->cur.ymax -= 2 * dy; } else { if (U.uiflag & USER_ZOOM_TO_MOUSEPOS) { - float mval_fac = (vzd->my_2d - v2d->cur.ymin) / (v2d->cur.ymax-v2d->cur.ymin); + float mval_fac = (vzd->my_2d - v2d->cur.ymin) / (v2d->cur.ymax - v2d->cur.ymin); float mval_faci = 1.0f - mval_fac; - float ofs= (mval_fac * dy) - (mval_faci * dy); + float ofs = (mval_fac * dy) - (mval_faci * dy); v2d->cur.ymin += ofs + dy; v2d->cur.ymax += ofs - dy; @@ -664,7 +664,7 @@ static void view_zoomstep_exit(wmOperator *op) { if (op->customdata) { MEM_freeN(op->customdata); - op->customdata= NULL; + op->customdata = NULL; } } @@ -694,15 +694,15 @@ static int view_zoomin_invoke(bContext *C, wmOperator *op, wmEvent *event) if (!view_zoomdrag_init(C, op)) return OPERATOR_PASS_THROUGH; - vzd= op->customdata; + vzd = op->customdata; if (U.uiflag & USER_ZOOM_TO_MOUSEPOS) { - ARegion *ar= CTX_wm_region(C); + ARegion *ar = CTX_wm_region(C); /* store initial mouse position (in view space) */ UI_view2d_region_to_view(&ar->v2d, - event->mval[0], event->mval[1], - &vzd->mx_2d, &vzd->my_2d); + event->mval[0], event->mval[1], + &vzd->mx_2d, &vzd->my_2d); } return view_zoomin_exec(C, op); @@ -751,15 +751,15 @@ static int view_zoomout_invoke(bContext *C, wmOperator *op, wmEvent *event) if (!view_zoomdrag_init(C, op)) return OPERATOR_PASS_THROUGH; - vzd= op->customdata; + vzd = op->customdata; if (U.uiflag & USER_ZOOM_TO_MOUSEPOS) { - ARegion *ar= CTX_wm_region(C); + ARegion *ar = CTX_wm_region(C); /* store initial mouse position (in view space) */ UI_view2d_region_to_view(&ar->v2d, - event->mval[0], event->mval[1], - &vzd->mx_2d, &vzd->my_2d); + event->mval[0], event->mval[1], + &vzd->mx_2d, &vzd->my_2d); } return view_zoomout_exec(C, op); @@ -785,7 +785,7 @@ static void VIEW2D_OT_zoom_out(wmOperatorType *ot) /* ********************************************************* */ /* DRAG-ZOOM OPERATOR */ -/* MMB Drag - allows non-uniform scaling by dragging mouse +/* MMB Drag - allows non-uniform scaling by dragging mouse * * In order to make sure this works, each operator must define the following RNA-Operator Props: * deltax, deltay - amounts to add to each side of the 'cur' rect @@ -794,35 +794,35 @@ static void VIEW2D_OT_zoom_out(wmOperatorType *ot) /* apply transform to view (i.e. adjust 'cur' rect) */ static void view_zoomdrag_apply(bContext *C, wmOperator *op) { - v2dViewZoomData *vzd= op->customdata; - View2D *v2d= vzd->v2d; + v2dViewZoomData *vzd = op->customdata; + View2D *v2d = vzd->v2d; float dx, dy; /* get amount to move view by */ - dx= RNA_float_get(op->ptr, "deltax"); - dy= RNA_float_get(op->ptr, "deltay"); + dx = RNA_float_get(op->ptr, "deltax"); + dy = RNA_float_get(op->ptr, "deltay"); /* continuous zoom shouldn't move that fast... */ if (U.viewzoom == USER_ZOOM_CONT) { // XXX store this setting as RNA prop? - double time= PIL_check_seconds_timer(); - float time_step= (float)(time - vzd->timer_lastdraw); + double time = PIL_check_seconds_timer(); + float time_step = (float)(time - vzd->timer_lastdraw); dx *= time_step * 0.5f; dy *= time_step * 0.5f; - vzd->timer_lastdraw= time; + vzd->timer_lastdraw = time; } /* only move view on an axis if change is allowed */ - if ((v2d->keepzoom & V2D_LOCKZOOM_X)==0) { + if ((v2d->keepzoom & V2D_LOCKZOOM_X) == 0) { if (v2d->keepofs & V2D_LOCKOFS_X) { - v2d->cur.xmax -= 2*dx; + v2d->cur.xmax -= 2 * dx; } else { if (U.uiflag & USER_ZOOM_TO_MOUSEPOS) { - float mval_fac = (vzd->mx_2d - v2d->cur.xmin) / (v2d->cur.xmax-v2d->cur.xmin); + float mval_fac = (vzd->mx_2d - v2d->cur.xmin) / (v2d->cur.xmax - v2d->cur.xmin); float mval_faci = 1.0f - mval_fac; - float ofs= (mval_fac * dx) - (mval_faci * dx); + float ofs = (mval_fac * dx) - (mval_faci * dx); v2d->cur.xmin += ofs + dx; v2d->cur.xmax += ofs - dx; @@ -833,15 +833,15 @@ static void view_zoomdrag_apply(bContext *C, wmOperator *op) } } } - if ((v2d->keepzoom & V2D_LOCKZOOM_Y)==0) { + if ((v2d->keepzoom & V2D_LOCKZOOM_Y) == 0) { if (v2d->keepofs & V2D_LOCKOFS_Y) { - v2d->cur.ymax -= 2*dy; + v2d->cur.ymax -= 2 * dy; } else { if (U.uiflag & USER_ZOOM_TO_MOUSEPOS) { - float mval_fac = (vzd->my_2d - v2d->cur.ymin) / (v2d->cur.ymax-v2d->cur.ymin); + float mval_fac = (vzd->my_2d - v2d->cur.ymin) / (v2d->cur.ymax - v2d->cur.ymin); float mval_faci = 1.0f - mval_fac; - float ofs= (mval_fac * dy) - (mval_faci * dy); + float ofs = (mval_fac * dy) - (mval_faci * dy); v2d->cur.ymin += ofs + dy; v2d->cur.ymax += ofs - dy; @@ -865,13 +865,13 @@ static void view_zoomdrag_apply(bContext *C, wmOperator *op) static void view_zoomdrag_exit(bContext *C, wmOperator *op) { if (op->customdata) { - v2dViewZoomData *vzd= op->customdata; + v2dViewZoomData *vzd = op->customdata; if (vzd->timer) WM_event_remove_timer(CTX_wm_manager(C), CTX_wm_window(C), vzd->timer); MEM_freeN(op->customdata); - op->customdata= NULL; + op->customdata = NULL; } } @@ -896,7 +896,7 @@ static int view_zoomdrag_exec(bContext *C, wmOperator *op) /* set up modal operator and relevant settings */ static int view_zoomdrag_invoke(bContext *C, wmOperator *op, wmEvent *event) { - wmWindow *window= CTX_wm_window(C); + wmWindow *window = CTX_wm_window(C); v2dViewZoomData *vzd; View2D *v2d; @@ -904,21 +904,21 @@ static int view_zoomdrag_invoke(bContext *C, wmOperator *op, wmEvent *event) if (!view_zoomdrag_init(C, op)) return OPERATOR_PASS_THROUGH; - vzd= op->customdata; - v2d= vzd->v2d; + vzd = op->customdata; + v2d = vzd->v2d; if (event->type == MOUSEZOOM) { float dx, dy, fac; - vzd->lastx= event->prevx; - vzd->lasty= event->prevy; + vzd->lastx = event->prevx; + vzd->lasty = event->prevy; /* As we have only 1D information (magnify value), feed both axes * with magnify information that is stored in x axis */ - fac= 0.01f * (event->x - event->prevx); - dx= fac * (v2d->cur.xmax - v2d->cur.xmin) / 10.0f; - dy= fac * (v2d->cur.ymax - v2d->cur.ymin) / 10.0f; + fac = 0.01f * (event->x - event->prevx); + dx = fac * (v2d->cur.xmax - v2d->cur.xmin) / 10.0f; + dy = fac * (v2d->cur.ymax - v2d->cur.ymin) / 10.0f; RNA_float_set(op->ptr, "deltax", dx); RNA_float_set(op->ptr, "deltay", dy); @@ -929,21 +929,21 @@ static int view_zoomdrag_invoke(bContext *C, wmOperator *op, wmEvent *event) } /* set initial settings */ - vzd->lastx= event->x; - vzd->lasty= event->y; + vzd->lastx = event->x; + vzd->lasty = event->y; RNA_float_set(op->ptr, "deltax", 0); RNA_float_set(op->ptr, "deltay", 0); /* for modal exit test */ - vzd->invoke_event= event->type; + vzd->invoke_event = event->type; if (U.uiflag & USER_ZOOM_TO_MOUSEPOS) { - ARegion *ar= CTX_wm_region(C); + ARegion *ar = CTX_wm_region(C); /* store initial mouse position (in view space) */ UI_view2d_region_to_view(&ar->v2d, - event->mval[0], event->mval[1], - &vzd->mx_2d, &vzd->my_2d); + event->mval[0], event->mval[1], + &vzd->mx_2d, &vzd->my_2d); } if (v2d->keepofs & V2D_LOCKOFS_X) @@ -958,8 +958,8 @@ static int view_zoomdrag_invoke(bContext *C, wmOperator *op, wmEvent *event) if (U.viewzoom == USER_ZOOM_CONT) { /* needs a timer to continue redrawing */ - vzd->timer= WM_event_add_timer(CTX_wm_manager(C), CTX_wm_window(C), TIMER, 0.01f); - vzd->timer_lastdraw= PIL_check_seconds_timer(); + vzd->timer = WM_event_add_timer(CTX_wm_manager(C), CTX_wm_window(C), TIMER, 0.01f); + vzd->timer_lastdraw = PIL_check_seconds_timer(); } return OPERATOR_RUNNING_MODAL; @@ -968,8 +968,8 @@ static int view_zoomdrag_invoke(bContext *C, wmOperator *op, wmEvent *event) /* handle user input - calculations of mouse-movement need to be done here, not in the apply callback! */ static int view_zoomdrag_modal(bContext *C, wmOperator *op, wmEvent *event) { - v2dViewZoomData *vzd= op->customdata; - View2D *v2d= vzd->v2d; + v2dViewZoomData *vzd = op->customdata; + View2D *v2d = vzd->v2d; /* execute the events */ if (event->type == TIMER && event->customdata == vzd->timer) { @@ -985,35 +985,35 @@ static int view_zoomdrag_modal(bContext *C, wmOperator *op, wmEvent *event) /* x-axis transform */ dist = (v2d->mask.xmax - v2d->mask.xmin) / 2.0f; - dx= 1.0f - (fabsf(vzd->lastx - dist) + 2.0f) / (fabsf(event->x - dist) + 2.0f); - dx*= 0.5f * (v2d->cur.xmax - v2d->cur.xmin); + dx = 1.0f - (fabsf(vzd->lastx - dist) + 2.0f) / (fabsf(event->x - dist) + 2.0f); + dx *= 0.5f * (v2d->cur.xmax - v2d->cur.xmin); /* y-axis transform */ dist = (v2d->mask.ymax - v2d->mask.ymin) / 2.0f; - dy= 1.0f - (fabsf(vzd->lasty - dist) + 2.0f) / (fabsf(event->y - dist) + 2.0f); - dy*= 0.5f * (v2d->cur.ymax - v2d->cur.ymin); + dy = 1.0f - (fabsf(vzd->lasty - dist) + 2.0f) / (fabsf(event->y - dist) + 2.0f); + dy *= 0.5f * (v2d->cur.ymax - v2d->cur.ymin); } else { /* 'continuous' or 'dolly' */ float fac; /* x-axis transform */ - fac= 0.01f * (event->x - vzd->lastx); - dx= fac * (v2d->cur.xmax - v2d->cur.xmin); + fac = 0.01f * (event->x - vzd->lastx); + dx = fac * (v2d->cur.xmax - v2d->cur.xmin); /* y-axis transform */ - fac= 0.01f * (event->y - vzd->lasty); - dy= fac * (v2d->cur.ymax - v2d->cur.ymin); + fac = 0.01f * (event->y - vzd->lasty); + dy = fac * (v2d->cur.ymax - v2d->cur.ymin); #if 0 /* continuous zoom shouldn't move that fast... */ if (U.viewzoom == USER_ZOOM_CONT) { // XXX store this setting as RNA prop? - double time= PIL_check_seconds_timer(); - float time_step= (float)(time - vzd->timer_lastdraw); + double time = PIL_check_seconds_timer(); + float time_step = (float)(time - vzd->timer_lastdraw); dx /= (0.1f / time_step); dy /= (0.1f / time_step); - vzd->timer_lastdraw= time; + vzd->timer_lastdraw = time; } #endif } @@ -1028,23 +1028,23 @@ static int view_zoomdrag_modal(bContext *C, wmOperator *op, wmEvent *event) * - continuous zoom only depends on distance of mouse to starting point to determine rate of change */ if (U.viewzoom != USER_ZOOM_CONT) { // XXX store this setting as RNA prop? - vzd->lastx= event->x; - vzd->lasty= event->y; + vzd->lastx = event->x; + vzd->lasty = event->y; } /* apply zooming */ view_zoomdrag_apply(C, op); } - else if (event->type == vzd->invoke_event || event->type==ESCKEY) { + else if (event->type == vzd->invoke_event || event->type == ESCKEY) { if (event->val == KM_RELEASE) { /* for redo, store the overall deltas - need to respect zoom-locks here... */ - if ((v2d->keepzoom & V2D_LOCKZOOM_X)==0) + if ((v2d->keepzoom & V2D_LOCKZOOM_X) == 0) RNA_float_set(op->ptr, "deltax", vzd->dx); else RNA_float_set(op->ptr, "deltax", 0); - if ((v2d->keepzoom & V2D_LOCKZOOM_Y)==0) + if ((v2d->keepzoom & V2D_LOCKZOOM_Y) == 0) RNA_float_set(op->ptr, "deltay", vzd->dy); else RNA_float_set(op->ptr, "deltay", 0); @@ -1097,8 +1097,8 @@ static void VIEW2D_OT_zoom(wmOperatorType *ot) static int view_borderzoom_exec(bContext *C, wmOperator *op) { - ARegion *ar= CTX_wm_region(C); - View2D *v2d= &ar->v2d; + ARegion *ar = CTX_wm_region(C); + View2D *v2d = &ar->v2d; rctf rect; int gesture_mode; @@ -1107,7 +1107,7 @@ static int view_borderzoom_exec(bContext *C, wmOperator *op) UI_view2d_region_to_view(v2d, RNA_int_get(op->ptr, "xmax"), RNA_int_get(op->ptr, "ymax"), &rect.xmax, &rect.ymax); /* check if zooming in/out view */ - gesture_mode= RNA_int_get(op->ptr, "gesture_mode"); + gesture_mode = RNA_int_get(op->ptr, "gesture_mode"); if (gesture_mode == GESTURE_MODAL_IN) { /* zoom in: @@ -1115,16 +1115,17 @@ static int view_borderzoom_exec(bContext *C, wmOperator *op) * - just set the 'cur' rect to have the same coordinates as the border region * if zoom is allowed to be changed */ - if ((v2d->keepzoom & V2D_LOCKZOOM_X)==0) { + if ((v2d->keepzoom & V2D_LOCKZOOM_X) == 0) { v2d->cur.xmin = rect.xmin; v2d->cur.xmax = rect.xmax; } - if ((v2d->keepzoom & V2D_LOCKZOOM_Y)==0) { + if ((v2d->keepzoom & V2D_LOCKZOOM_Y) == 0) { v2d->cur.ymin = rect.ymin; v2d->cur.ymax = rect.ymax; } } - else /* if (gesture_mode == GESTURE_MODAL_OUT) */ { + else { /* if (gesture_mode == GESTURE_MODAL_OUT) */ + /* zoom out: * - the current 'cur' rect coordinates are going to end up where the 'rect' ones are, * but the 'cur' rect coordinates will need to be adjusted to take in more of the view @@ -1133,18 +1134,18 @@ static int view_borderzoom_exec(bContext *C, wmOperator *op) float zoom, center, size; // TODO: is this zoom factor calculation valid? It seems to produce same results everytime... - if ((v2d->keepzoom & V2D_LOCKZOOM_X)==0) { - size= (v2d->cur.xmax - v2d->cur.xmin); - zoom= size / (rect.xmax - rect.xmin); - center= (v2d->cur.xmax + v2d->cur.xmin) * 0.5f; + if ((v2d->keepzoom & V2D_LOCKZOOM_X) == 0) { + size = (v2d->cur.xmax - v2d->cur.xmin); + zoom = size / (rect.xmax - rect.xmin); + center = (v2d->cur.xmax + v2d->cur.xmin) * 0.5f; v2d->cur.xmin = center - (size * zoom); v2d->cur.xmax = center + (size * zoom); } - if ((v2d->keepzoom & V2D_LOCKZOOM_Y)==0) { - size= (v2d->cur.ymax - v2d->cur.ymin); - zoom= size / (rect.ymax - rect.ymin); - center= (v2d->cur.ymax + v2d->cur.ymin) * 0.5f; + if ((v2d->keepzoom & V2D_LOCKZOOM_Y) == 0) { + size = (v2d->cur.ymax - v2d->cur.ymin); + zoom = size / (rect.ymax - rect.ymin); + center = (v2d->cur.ymax + v2d->cur.ymin) * 0.5f; v2d->cur.ymin = center - (size * zoom); v2d->cur.ymax = center + (size * zoom); @@ -1187,47 +1188,47 @@ static void VIEW2D_OT_zoom_border(wmOperatorType *ot) /* ********************************************************* */ /* SCROLLERS */ -/* Scrollers should behave in the following ways, when clicked on with LMB (and dragged): +/* Scrollers should behave in the following ways, when clicked on with LMB (and dragged): * 1) 'Handles' on end of 'bubble' - when the axis that the scroller represents is zoomable, * enlarge 'cur' rect on the relevant side * 2) 'Bubble'/'bar' - just drag, and bar should move with mouse (view pans opposite) * * In order to make sure this works, each operator must define the following RNA-Operator Props: - * deltax, deltay - define how much to move view by (relative to zoom-correction factor) + * deltax, deltay - define how much to move view by (relative to zoom-correction factor) */ /* customdata for scroller-invoke data */ typedef struct v2dScrollerMove { - View2D *v2d; /* View2D data that this operation affects */ - ARegion *ar; /* region that the scroller is in */ + View2D *v2d; /* View2D data that this operation affects */ + ARegion *ar; /* region that the scroller is in */ - short scroller; /* scroller that mouse is in ('h' or 'v') */ - short zone; /* -1 is min zoomer, 0 is bar, 1 is max zoomer */ // XXX find some way to provide visual feedback of this (active color?) + short scroller; /* scroller that mouse is in ('h' or 'v') */ + short zone; /* -1 is min zoomer, 0 is bar, 1 is max zoomer */ // XXX find some way to provide visual feedback of this (active color?) - float fac; /* view adjustment factor, based on size of region */ - float delta; /* amount moved by mouse on axis of interest */ + float fac; /* view adjustment factor, based on size of region */ + float delta; /* amount moved by mouse on axis of interest */ - float scrollbarwidth; /* width of the scrollbar itself, used for page up/down clicks */ + float scrollbarwidth; /* width of the scrollbar itself, used for page up/down clicks */ int scrollbar_orig; /* initial location of scrollbar x/y, mouse relative */ - int lastx, lasty; /* previous mouse coordinates (in screen coordinates) for determining movement */ + int lastx, lasty; /* previous mouse coordinates (in screen coordinates) for determining movement */ } v2dScrollerMove; /* View2DScrollers is typedef'd in UI_view2d.h * This is a CUT DOWN VERSION of the 'real' version, which is defined in view2d.c, as we only need focus bubble info * WARNING: the start of this struct must not change, so that it stays in sync with the 'real' version - * For now, we don't need to have a separate (internal) header for structs like this... + * For now, we don't need to have a separate (internal) header for structs like this... */ struct View2DScrollers { - /* focus bubbles */ - int vert_min, vert_max; /* vertical scrollbar */ - int hor_min, hor_max; /* horizontal scrollbar */ + /* focus bubbles */ + int vert_min, vert_max; /* vertical scrollbar */ + int hor_min, hor_max; /* horizontal scrollbar */ }; /* quick enum for vsm->zone (scroller handles) */ enum { - SCROLLHANDLE_MIN= -1, + SCROLLHANDLE_MIN = -1, SCROLLHANDLE_BAR, SCROLLHANDLE_MAX, SCROLLHANDLE_MIN_OUTSIDE, @@ -1237,26 +1238,26 @@ enum { /* ------------------------ */ /* check if mouse is within scroller handle - * - mouse = relevant mouse coordinate in region space - * - sc_min, sc_max = extents of scroller 'groove' (potential available space for scroller) - * - sh_min, sh_max = positions of scrollbar handles + * - mouse = relevant mouse coordinate in region space + * - sc_min, sc_max = extents of scroller 'groove' (potential available space for scroller) + * - sh_min, sh_max = positions of scrollbar handles */ static short mouse_in_scroller_handle(int mouse, int sc_min, int sc_max, int sh_min, int sh_max) { - short in_min, in_max, in_bar, out_min, out_max, in_view=1; + short in_min, in_max, in_bar, out_min, out_max, in_view = 1; /* firstly, check if * - 'bubble' fills entire scroller * - 'bubble' completely out of view on either side */ - if ((sh_min <= sc_min) && (sh_max >= sc_max)) in_view= 0; + if ((sh_min <= sc_min) && (sh_max >= sc_max)) in_view = 0; if (sh_min == sh_max) { - if (sh_min <= sc_min) in_view= 0; - if (sh_max >= sc_max) in_view= 0; + if (sh_min <= sc_min) in_view = 0; + if (sh_max >= sc_max) in_view = 0; } else { - if (sh_max <= sc_min) in_view= 0; - if (sh_min >= sc_max) in_view= 0; + if (sh_max <= sc_min) in_view = 0; + if (sh_min >= sc_max) in_view = 0; } @@ -1266,11 +1267,11 @@ static short mouse_in_scroller_handle(int mouse, int sc_min, int sc_max, int sh_ /* check if mouse is in or past either handle */ // TODO: check if these extents are still valid or not - in_max= ( (mouse >= (sh_max - V2D_SCROLLER_HANDLE_SIZE)) && (mouse <= (sh_max + V2D_SCROLLER_HANDLE_SIZE)) ); - in_min= ( (mouse <= (sh_min + V2D_SCROLLER_HANDLE_SIZE)) && (mouse >= (sh_min - V2D_SCROLLER_HANDLE_SIZE)) ); - in_bar= ( (mouse < (sh_max - V2D_SCROLLER_HANDLE_SIZE)) && (mouse > (sh_min + V2D_SCROLLER_HANDLE_SIZE)) ); - out_min= mouse < (sh_min - V2D_SCROLLER_HANDLE_SIZE); - out_max= mouse > (sh_max + V2D_SCROLLER_HANDLE_SIZE); + in_max = ( (mouse >= (sh_max - V2D_SCROLLER_HANDLE_SIZE)) && (mouse <= (sh_max + V2D_SCROLLER_HANDLE_SIZE)) ); + in_min = ( (mouse <= (sh_min + V2D_SCROLLER_HANDLE_SIZE)) && (mouse >= (sh_min - V2D_SCROLLER_HANDLE_SIZE)) ); + in_bar = ( (mouse < (sh_max - V2D_SCROLLER_HANDLE_SIZE)) && (mouse > (sh_min + V2D_SCROLLER_HANDLE_SIZE)) ); + out_min = mouse < (sh_min - V2D_SCROLLER_HANDLE_SIZE); + out_max = mouse > (sh_max + V2D_SCROLLER_HANDLE_SIZE); if (in_bar) return SCROLLHANDLE_BAR; @@ -1292,18 +1293,18 @@ static void scroller_activate_init(bContext *C, wmOperator *op, wmEvent *event, { v2dScrollerMove *vsm; View2DScrollers *scrollers; - ARegion *ar= CTX_wm_region(C); - View2D *v2d= &ar->v2d; + ARegion *ar = CTX_wm_region(C); + View2D *v2d = &ar->v2d; float mask_size; /* set custom-data for operator */ - vsm= MEM_callocN(sizeof(v2dScrollerMove), "v2dScrollerMove"); - op->customdata= vsm; + vsm = MEM_callocN(sizeof(v2dScrollerMove), "v2dScrollerMove"); + op->customdata = vsm; /* set general data */ - vsm->v2d= v2d; - vsm->ar= ar; - vsm->scroller= in_scroller; + vsm->v2d = v2d; + vsm->ar = ar; + vsm->scroller = in_scroller; /* store mouse-coordinates, and convert mouse/screen coordinates to region coordinates */ vsm->lastx = event->x; @@ -1311,20 +1312,20 @@ static void scroller_activate_init(bContext *C, wmOperator *op, wmEvent *event, /* 'zone' depends on where mouse is relative to bubble * - zooming must be allowed on this axis, otherwise, default to pan */ - scrollers= UI_view2d_scrollers_calc(C, v2d, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY); + scrollers = UI_view2d_scrollers_calc(C, v2d, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY, V2D_ARG_DUMMY); if (in_scroller == 'h') { /* horizontal scroller - calculate adjustment factor first */ - mask_size= (float)(v2d->hor.xmax - v2d->hor.xmin); - vsm->fac= (v2d->tot.xmax - v2d->tot.xmin) / mask_size; + mask_size = (float)(v2d->hor.xmax - v2d->hor.xmin); + vsm->fac = (v2d->tot.xmax - v2d->tot.xmin) / mask_size; /* get 'zone' (i.e. which part of scroller is activated) */ - vsm->zone= mouse_in_scroller_handle(event->mval[0], v2d->hor.xmin, v2d->hor.xmax, scrollers->hor_min, scrollers->hor_max); + vsm->zone = mouse_in_scroller_handle(event->mval[0], v2d->hor.xmin, v2d->hor.xmax, scrollers->hor_min, scrollers->hor_max); if ((v2d->keepzoom & V2D_LOCKZOOM_X) && ELEM(vsm->zone, SCROLLHANDLE_MIN, SCROLLHANDLE_MAX)) { /* default to scroll, as handles not usable */ - vsm->zone= SCROLLHANDLE_BAR; + vsm->zone = SCROLLHANDLE_BAR; } vsm->scrollbarwidth = scrollers->hor_max - scrollers->hor_min; @@ -1332,19 +1333,19 @@ static void scroller_activate_init(bContext *C, wmOperator *op, wmEvent *event, } else { /* vertical scroller - calculate adjustment factor first */ - mask_size= (float)(v2d->vert.ymax - v2d->vert.ymin); - vsm->fac= (v2d->tot.ymax - v2d->tot.ymin) / mask_size; + mask_size = (float)(v2d->vert.ymax - v2d->vert.ymin); + vsm->fac = (v2d->tot.ymax - v2d->tot.ymin) / mask_size; /* get 'zone' (i.e. which part of scroller is activated) */ - vsm->zone= mouse_in_scroller_handle(event->mval[1], v2d->vert.ymin, v2d->vert.ymax, scrollers->vert_min, scrollers->vert_max); + vsm->zone = mouse_in_scroller_handle(event->mval[1], v2d->vert.ymin, v2d->vert.ymax, scrollers->vert_min, scrollers->vert_max); if ((v2d->keepzoom & V2D_LOCKZOOM_Y) && ELEM(vsm->zone, SCROLLHANDLE_MIN, SCROLLHANDLE_MAX)) { /* default to scroll, as handles not usable */ - vsm->zone= SCROLLHANDLE_BAR; + vsm->zone = SCROLLHANDLE_BAR; } vsm->scrollbarwidth = scrollers->vert_max - scrollers->vert_min; - vsm->scrollbar_orig = ((scrollers->vert_max + scrollers->vert_min) / 2) + + ar->winrct.ymin; + vsm->scrollbar_orig = ((scrollers->vert_max + scrollers->vert_min) / 2) + +ar->winrct.ymin; } UI_view2d_scrollers_free(scrollers); @@ -1355,12 +1356,12 @@ static void scroller_activate_init(bContext *C, wmOperator *op, wmEvent *event, static void scroller_activate_exit(bContext *C, wmOperator *op) { if (op->customdata) { - v2dScrollerMove *vsm= op->customdata; + v2dScrollerMove *vsm = op->customdata; - vsm->v2d->scroll_ui &= ~(V2D_SCROLL_H_ACTIVE|V2D_SCROLL_V_ACTIVE); + vsm->v2d->scroll_ui &= ~(V2D_SCROLL_H_ACTIVE | V2D_SCROLL_V_ACTIVE); MEM_freeN(op->customdata); - op->customdata= NULL; + op->customdata = NULL; ED_region_tag_redraw(CTX_wm_region(C)); } @@ -1376,12 +1377,12 @@ static int scroller_activate_cancel(bContext *C, wmOperator *op) /* apply transform to view (i.e. adjust 'cur' rect) */ static void scroller_activate_apply(bContext *C, wmOperator *op) { - v2dScrollerMove *vsm= op->customdata; - View2D *v2d= vsm->v2d; + v2dScrollerMove *vsm = op->customdata; + View2D *v2d = vsm->v2d; float temp; /* calculate amount to move view by */ - temp= vsm->fac * vsm->delta; + temp = vsm->fac * vsm->delta; /* type of movement */ switch (vsm->zone) { @@ -1430,7 +1431,7 @@ static void scroller_activate_apply(bContext *C, wmOperator *op) /* handle user input for scrollers - calculations of mouse-movement need to be done here, not in the apply callback! */ static int scroller_activate_modal(bContext *C, wmOperator *op, wmEvent *event) { - v2dScrollerMove *vsm= op->customdata; + v2dScrollerMove *vsm = op->customdata; /* execute the events */ switch (event->type) { @@ -1441,10 +1442,10 @@ static int scroller_activate_modal(bContext *C, wmOperator *op, wmEvent *event) /* if using bar (i.e. 'panning') or 'max' zoom widget */ switch (vsm->scroller) { case 'h': /* horizontal scroller - so only horizontal movement ('cur' moves opposite to mouse) */ - vsm->delta= (float)(event->x - vsm->lastx); + vsm->delta = (float)(event->x - vsm->lastx); break; case 'v': /* vertical scroller - so only vertical movement ('cur' moves opposite to mouse) */ - vsm->delta= (float)(event->y - vsm->lasty); + vsm->delta = (float)(event->y - vsm->lasty); break; } } @@ -1452,25 +1453,25 @@ static int scroller_activate_modal(bContext *C, wmOperator *op, wmEvent *event) /* using 'min' zoom widget */ switch (vsm->scroller) { case 'h': /* horizontal scroller - so only horizontal movement ('cur' moves with mouse) */ - vsm->delta= (float)(vsm->lastx - event->x); + vsm->delta = (float)(vsm->lastx - event->x); break; case 'v': /* vertical scroller - so only vertical movement ('cur' moves with to mouse) */ - vsm->delta= (float)(vsm->lasty - event->y); + vsm->delta = (float)(vsm->lasty - event->y); break; } } /* store previous coordinates */ - vsm->lastx= event->x; - vsm->lasty= event->y; + vsm->lastx = event->x; + vsm->lasty = event->y; scroller_activate_apply(C, op); } - break; + break; case LEFTMOUSE: case MIDDLEMOUSE: - if (event->val==KM_RELEASE) { + if (event->val == KM_RELEASE) { /* single-click was in empty space outside bubble, so scroll by 1 'page' */ if (ELEM(vsm->zone, SCROLLHANDLE_MIN_OUTSIDE, SCROLLHANDLE_MAX_OUTSIDE)) { if (vsm->zone == SCROLLHANDLE_MIN_OUTSIDE) @@ -1500,12 +1501,12 @@ static int scroller_activate_modal(bContext *C, wmOperator *op, wmEvent *event) /* a click (or click drag in progress) should have occurred, so check if it happened in scrollbar */ static int scroller_activate_invoke(bContext *C, wmOperator *op, wmEvent *event) { - ARegion *ar= CTX_wm_region(C); - View2D *v2d= &ar->v2d; - short in_scroller= 0; + ARegion *ar = CTX_wm_region(C); + View2D *v2d = &ar->v2d; + short in_scroller = 0; /* check if mouse in scrollbars, if they're enabled */ - in_scroller= UI_view2d_mouse_in_scrollers(C, v2d, event->x, event->y); + in_scroller = UI_view2d_mouse_in_scrollers(C, v2d, event->x, event->y); /* if in a scroller, init customdata then set modal handler which will catch mousedown to start doing useful stuff */ if (in_scroller) { @@ -1513,39 +1514,39 @@ static int scroller_activate_invoke(bContext *C, wmOperator *op, wmEvent *event) /* initialize customdata */ scroller_activate_init(C, op, event, in_scroller); - vsm= (v2dScrollerMove *)op->customdata; + vsm = (v2dScrollerMove *)op->customdata; /* support for quick jump to location - gtk and qt do this on linux */ if (event->type == MIDDLEMOUSE) { switch (vsm->scroller) { case 'h': /* horizontal scroller - so only horizontal movement ('cur' moves opposite to mouse) */ - vsm->delta= (float)(event->x - vsm->scrollbar_orig); + vsm->delta = (float)(event->x - vsm->scrollbar_orig); break; case 'v': /* vertical scroller - so only vertical movement ('cur' moves opposite to mouse) */ - vsm->delta= (float)(event->y - vsm->scrollbar_orig); + vsm->delta = (float)(event->y - vsm->scrollbar_orig); break; } scroller_activate_apply(C, op); - vsm->zone= SCROLLHANDLE_BAR; + vsm->zone = SCROLLHANDLE_BAR; } /* check if zoom zones are inappropriate (i.e. zoom widgets not shown), so cannot continue * NOTE: see view2d.c for latest conditions, and keep this in sync with that */ if (ELEM(vsm->zone, SCROLLHANDLE_MIN, SCROLLHANDLE_MAX)) { - if ( ((vsm->scroller=='h') && (v2d->scroll & V2D_SCROLL_SCALE_HORIZONTAL)==0) || - ((vsm->scroller=='v') && (v2d->scroll & V2D_SCROLL_SCALE_VERTICAL)==0) ) + if ( ((vsm->scroller == 'h') && (v2d->scroll & V2D_SCROLL_SCALE_HORIZONTAL) == 0) || + ((vsm->scroller == 'v') && (v2d->scroll & V2D_SCROLL_SCALE_VERTICAL) == 0) ) { /* switch to bar (i.e. no scaling gets handled) */ - vsm->zone= SCROLLHANDLE_BAR; + vsm->zone = SCROLLHANDLE_BAR; } } /* check if zone is inappropriate (i.e. 'bar' but panning is banned), so cannot continue */ if (vsm->zone == SCROLLHANDLE_BAR) { - if ( ((vsm->scroller=='h') && (v2d->keepofs & V2D_LOCKOFS_X)) || - ((vsm->scroller=='v') && (v2d->keepofs & V2D_LOCKOFS_Y)) ) + if ( ((vsm->scroller == 'h') && (v2d->keepofs & V2D_LOCKOFS_X)) || + ((vsm->scroller == 'v') && (v2d->keepofs & V2D_LOCKOFS_Y)) ) { /* free customdata initialized */ scroller_activate_exit(C, op); @@ -1556,8 +1557,8 @@ static int scroller_activate_invoke(bContext *C, wmOperator *op, wmEvent *event) } /* zone is also inappropriate if scroller is not visible... */ - if ( ((vsm->scroller=='h') && (v2d->scroll & (V2D_SCROLL_HORIZONTAL_HIDE|V2D_SCROLL_HORIZONTAL_FULLR))) || - ((vsm->scroller=='v') && (v2d->scroll & (V2D_SCROLL_VERTICAL_HIDE|V2D_SCROLL_VERTICAL_FULLR))) ) + if ( ((vsm->scroller == 'h') && (v2d->scroll & (V2D_SCROLL_HORIZONTAL_HIDE | V2D_SCROLL_HORIZONTAL_FULLR))) || + ((vsm->scroller == 'v') && (v2d->scroll & (V2D_SCROLL_VERTICAL_HIDE | V2D_SCROLL_VERTICAL_FULLR))) ) { /* free customdata initialized */ scroller_activate_exit(C, op); @@ -1568,7 +1569,7 @@ static int scroller_activate_invoke(bContext *C, wmOperator *op, wmEvent *event) } /* activate the scroller */ - if (vsm->scroller=='h') + if (vsm->scroller == 'h') v2d->scroll_ui |= V2D_SCROLL_H_ACTIVE; else v2d->scroll_ui |= V2D_SCROLL_V_ACTIVE; @@ -1607,14 +1608,14 @@ static void VIEW2D_OT_scroller_activate(wmOperatorType *ot) static int reset_exec(bContext *C, wmOperator *UNUSED(op)) { - uiStyle *style= UI_GetStyle(); - ARegion *ar= CTX_wm_region(C); - View2D *v2d= &ar->v2d; + uiStyle *style = UI_GetStyle(); + ARegion *ar = CTX_wm_region(C); + View2D *v2d = &ar->v2d; int winx, winy; /* zoom 1.0 */ - winx= (float)(v2d->mask.xmax - v2d->mask.xmin + 1); - winy= (float)(v2d->mask.ymax - v2d->mask.ymin + 1); + winx = (float)(v2d->mask.xmax - v2d->mask.xmin + 1); + winy = (float)(v2d->mask.ymax - v2d->mask.ymin + 1); v2d->cur.xmax = v2d->cur.xmin + winx; v2d->cur.ymax = v2d->cur.ymin + winy; @@ -1624,20 +1625,20 @@ static int reset_exec(bContext *C, wmOperator *UNUSED(op)) /* posx and negx flags are mutually exclusive, so watch out */ if ((v2d->align & V2D_ALIGN_NO_POS_X) && !(v2d->align & V2D_ALIGN_NO_NEG_X)) { v2d->cur.xmax = 0.0f; - v2d->cur.xmin = -winx*style->panelzoom; + v2d->cur.xmin = -winx * style->panelzoom; } else if ((v2d->align & V2D_ALIGN_NO_NEG_X) && !(v2d->align & V2D_ALIGN_NO_POS_X)) { - v2d->cur.xmax = winx*style->panelzoom; + v2d->cur.xmax = winx * style->panelzoom; v2d->cur.xmin = 0.0f; } /* - posx and negx flags are mutually exclusive, so watch out */ if ((v2d->align & V2D_ALIGN_NO_POS_Y) && !(v2d->align & V2D_ALIGN_NO_NEG_Y)) { v2d->cur.ymax = 0.0f; - v2d->cur.ymin = -winy*style->panelzoom; + v2d->cur.ymin = -winy * style->panelzoom; } else if ((v2d->align & V2D_ALIGN_NO_NEG_Y) && !(v2d->align & V2D_ALIGN_NO_POS_Y)) { - v2d->cur.ymax = winy*style->panelzoom; + v2d->cur.ymax = winy * style->panelzoom; v2d->cur.ymin = 0.0f; } } @@ -1715,21 +1716,21 @@ void UI_view2d_keymap(wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "VIEW2D_OT_zoom_in", PADPLUSKEY, KM_PRESS, 0, 0); /* scroll up/down - no modifiers, only when zoom fails */ - /* these may fail if zoom is disallowed, in which case they should pass on event */ + /* these may fail if zoom is disallowed, in which case they should pass on event */ WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_down", WHEELDOWNMOUSE, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_up", WHEELUPMOUSE, KM_PRESS, 0, 0); - /* these may be necessary if vertical scroll is disallowed */ + /* these may be necessary if vertical scroll is disallowed */ WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_right", WHEELDOWNMOUSE, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_left", WHEELUPMOUSE, KM_PRESS, 0, 0); /* alternatives for page up/down to scroll */ #if 0 // XXX disabled, since this causes conflicts with hotkeys in animation editors - /* scroll up/down may fall through to left/right */ + /* scroll up/down may fall through to left/right */ WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_down", PAGEDOWNKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_up", PAGEUPKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_right", PAGEDOWNKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_left", PAGEUPKEY, KM_PRESS, 0, 0); - /* shift for moving view left/right with page up/down */ + /* shift for moving view left/right with page up/down */ WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_right", PAGEDOWNKEY, KM_PRESS, KM_SHIFT, 0); WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_left", PAGEUPKEY, KM_PRESS, KM_SHIFT, 0); #endif -- cgit v1.2.3 From 79871ded0bd3e9cd5d7693ba683724cdb07121c3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 30 Mar 2012 05:26:08 +0000 Subject: fix for finding the python exception line number when running a script in the text editor. - filename comparison was invalid - was stopping on the first traceback, which would reference the caller but not the error line (when the error was in a function). --- source/blender/python/intern/bpy_traceback.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender') diff --git a/source/blender/python/intern/bpy_traceback.c b/source/blender/python/intern/bpy_traceback.c index 0e3162e09a4..f7aa6e0880b 100644 --- a/source/blender/python/intern/bpy_traceback.c +++ b/source/blender/python/intern/bpy_traceback.c @@ -155,12 +155,13 @@ void python_script_error_jump(const char *filepath, int *lineno, int *offset) { PyObject *coerce; const char *tb_filepath = traceback_filepath(tb, &coerce); - const int match = BLI_path_cmp(tb_filepath, filepath) != 0; + const int match = ((BLI_path_cmp(tb_filepath, filepath) == 0) || + ((tb_filepath[0] == '\\' || tb_filepath[0] == '/') && BLI_path_cmp(tb_filepath + 1, filepath) == 0)); Py_DECREF(coerce); if (match) { *lineno = tb->tb_lineno; - break; + /* used to break here, but better find the inner most line */ } } } -- cgit v1.2.3 From 0740e9e46406dc6d8690a149e43932a6963d0568 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 30 Mar 2012 06:11:59 +0000 Subject: fix [#30643] Crasher on entering edit mode with VBOs enabled --- source/blender/gpu/intern/gpu_buffers.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source/blender') diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c index 61d563a54e0..53555346caf 100644 --- a/source/blender/gpu/intern/gpu_buffers.c +++ b/source/blender/gpu/intern/gpu_buffers.c @@ -895,11 +895,11 @@ static int gpu_buffer_size_from_type(DerivedMesh *dm, GPUBufferType type) return sizeof(int)*2*dm->drawObject->totedge; case GPU_BUFFER_UVEDGE: /* each face gets 3 points, 3 edges per triangle, and - each edge has its own, non-shared coords, so each - tri corner needs minimum of 4 floats, quads used - less so here we can over allocate and assume all - tris. */ - return sizeof(float) * dm->drawObject->tot_triangle_point; + * each edge has its own, non-shared coords, so each + * tri corner needs minimum of 4 floats, quads used + * less so here we can over allocate and assume all + * tris. */ + return sizeof(float) * 4 * dm->drawObject->tot_triangle_point; default: return -1; } -- cgit v1.2.3 From e0d94b724441ac30e8b99991bb73beb8e133d57b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 30 Mar 2012 06:45:13 +0000 Subject: minor speedup converting a BMesh to a Mesh - avoid loop over all faces to count how many loops to use, since BMesh stores totloop. also use camel case for UndoMesh (convention) --- source/blender/bmesh/intern/bmesh_mesh_conv.c | 22 ++++++++-------------- source/blender/editors/mesh/editmesh_utils.c | 8 ++++---- 2 files changed, 12 insertions(+), 18 deletions(-) (limited to 'source/blender') diff --git a/source/blender/bmesh/intern/bmesh_mesh_conv.c b/source/blender/bmesh/intern/bmesh_mesh_conv.c index c5cc0a01b9c..1db0280b4af 100644 --- a/source/blender/bmesh/intern/bmesh_mesh_conv.c +++ b/source/blender/bmesh/intern/bmesh_mesh_conv.c @@ -435,31 +435,25 @@ void BM_mesh_bm_to_me(BMesh *bm, Mesh *me, int dotess) BMLoop *l; BMFace *f; BMIter iter, liter; - int i, j, *keyi, ototvert, totloop; + int i, j, *keyi, ototvert; ototvert = me->totvert; - /* new Vertex block */ + /* new vertex block */ if (bm->totvert == 0) mvert = NULL; else mvert = MEM_callocN(bm->totvert * sizeof(MVert), "loadeditbMesh vert"); - /* new Edge block */ + /* new edge block */ if (bm->totedge == 0) medge = NULL; else medge = MEM_callocN(bm->totedge * sizeof(MEdge), "loadeditbMesh edge"); - /* build ngon data */ - /* new Ngon Face block */ + /* new ngon face block */ if (bm->totface == 0) mpoly = NULL; else mpoly = MEM_callocN(bm->totface * sizeof(MPoly), "loadeditbMesh poly"); - /* find number of loops to allocate */ - totloop = 0; - BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) { - totloop += f->len; - } - - if (totloop == 0) mloop = NULL; - else mloop = MEM_callocN(totloop * sizeof(MLoop), "loadeditbMesh loop"); + /* new loop block */ + if (bm->totloop == 0) mloop = NULL; + else mloop = MEM_callocN(bm->totloop * sizeof(MLoop), "loadeditbMesh loop"); /* lets save the old verts just in case we are actually working on * a key ... we now do processing of the keys at the end */ @@ -478,7 +472,7 @@ void BM_mesh_bm_to_me(BMesh *bm, Mesh *me, int dotess) /* add new custom data */ me->totvert = bm->totvert; me->totedge = bm->totedge; - me->totloop = totloop; + me->totloop = bm->totloop; me->totpoly = bm->totface; /* will be overwritten with a valid value if 'dotess' is set, otherwise we * end up with 'me->totface' and me->mface == NULL which can crash [#28625] diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index 7bb1cc6944e..f824a9062c9 100644 --- a/source/blender/editors/mesh/editmesh_utils.c +++ b/source/blender/editors/mesh/editmesh_utils.c @@ -512,11 +512,11 @@ static void *getEditMesh(bContext *C) return NULL; } -typedef struct undomesh { +typedef struct UndoMesh { Mesh me; int selectmode; char obname[MAX_ID_NAME - 2]; -} undomesh; +} UndoMesh; /* undo simply makes copies of a bmesh */ static void *editbtMesh_to_undoMesh(void *emv, void *obdata) @@ -524,7 +524,7 @@ static void *editbtMesh_to_undoMesh(void *emv, void *obdata) BMEditMesh *em = emv; Mesh *obme = obdata; - undomesh *um = MEM_callocN(sizeof(undomesh), "undo Mesh"); + UndoMesh *um = MEM_callocN(sizeof(UndoMesh), "undo Mesh"); BLI_strncpy(um->obname, em->ob->id.name + 2, sizeof(um->obname)); /* make sure shape keys work */ @@ -543,7 +543,7 @@ static void undoMesh_to_editbtMesh(void *umv, void *em_v, void *UNUSED(obdata)) { BMEditMesh *em = em_v, *em_tmp; Object *ob; - undomesh *um = umv; + UndoMesh *um = umv; BMesh *bm; /* BMESH_TODO - its possible the name wont be found right?, should fallback */ -- cgit v1.2.3 From 0e972b6293e556da3716bdfa751b0b085455a111 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 30 Mar 2012 08:43:47 +0000 Subject: partial fix for [#30732] bmesh: loop select continues through hidden sections. loop cut and edge ring select still need to be fixed. --- source/blender/bmesh/intern/bmesh_walkers_impl.c | 14 +++++++++++--- source/blender/editors/mesh/editmesh_select.c | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'source/blender') diff --git a/source/blender/bmesh/intern/bmesh_walkers_impl.c b/source/blender/bmesh/intern/bmesh_walkers_impl.c index 009b5e786c4..5275a988f7b 100644 --- a/source/blender/bmesh/intern/bmesh_walkers_impl.c +++ b/source/blender/bmesh/intern/bmesh_walkers_impl.c @@ -517,7 +517,9 @@ static void *bmw_LoopWalker_step(BMWalker *walker) l = BM_face_other_vert_loop(owalk.f_hub, lwalk->lastv, v); nexte = BM_edge_exists(v, l->v); - if (!BLI_ghash_haskey(walker->visithash, nexte)) { + if (bmw_mask_check_edge(walker, nexte) && + !BLI_ghash_haskey(walker->visithash, nexte)) + { lwalk = BMW_state_add(walker); lwalk->cur = nexte; lwalk->lastv = v; @@ -579,7 +581,10 @@ static void *bmw_LoopWalker_step(BMWalker *walker) } if (l != NULL) { - if (l != e->l && !BLI_ghash_haskey(walker->visithash, l->e)) { + if (l != e->l && + bmw_mask_check_edge(walker, l->e) && + !BLI_ghash_haskey(walker->visithash, l->e)) + { if (!(owalk.is_boundary == FALSE && i != stopi)) { lwalk = BMW_state_add(walker); lwalk->cur = l->e; @@ -602,7 +607,10 @@ static void *bmw_LoopWalker_step(BMWalker *walker) v = i ? e->v2 : e->v1; BM_ITER(nexte, &eiter, walker->bm, BM_EDGES_OF_VERT, v) { - if ((nexte->l == NULL) && !BLI_ghash_haskey(walker->visithash, nexte)) { + if ((nexte->l == NULL) && + bmw_mask_check_edge(walker, nexte) && + !BLI_ghash_haskey(walker->visithash, nexte)) + { lwalk = BMW_state_add(walker); lwalk->cur = nexte; lwalk->lastv = v; diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index c4afac78c59..51449f846d5 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -900,7 +900,7 @@ static void walker_select(BMEditMesh *em, int walkercode, void *start, int selec BMW_init(&walker, bm, walkercode, BMW_MASK_NOP, BMW_MASK_NOP, BMW_MASK_NOP, - BMW_FLAG_NOP, /* BMESH_TODO - should be BMW_FLAG_TEST_HIDDEN ? */ + BMW_FLAG_TEST_HIDDEN, BMW_NIL_LAY); ele = BMW_begin(&walker, start); for (; ele; ele = BMW_step(&walker)) { -- cgit v1.2.3 From 28889a3500ee5dcb1a4851f2d6c40ec3800c968f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 30 Mar 2012 09:27:54 +0000 Subject: fix [#30732] bmesh: loop select continues through hidden sections. --- source/blender/bmesh/intern/bmesh_walkers_impl.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'source/blender') diff --git a/source/blender/bmesh/intern/bmesh_walkers_impl.c b/source/blender/bmesh/intern/bmesh_walkers_impl.c index 5275a988f7b..818a7fb3cfa 100644 --- a/source/blender/bmesh/intern/bmesh_walkers_impl.c +++ b/source/blender/bmesh/intern/bmesh_walkers_impl.c @@ -645,6 +645,10 @@ static int bmw_FaceLoopWalker_include_face(BMWalker *walker, BMLoop *l) return FALSE; } + if (!bmw_mask_check_face(walker, l->f)) { + return FALSE; + } + /* the face must not have been already visite */ if (BLI_ghash_haskey(walker->visithash, l->f) && BLI_ghash_haskey(walker->secvisithash, l->e)) { return FALSE; @@ -839,13 +843,15 @@ static void *bmw_EdgeringWalker_step(BMWalker *walker) int i, len; #endif +#define EDGE_CHECK(e) (bmw_mask_check_edge(walker, e) && BM_edge_is_manifold(e)) + BMW_state_remove(walker); if (!l) return lwalk->wireedge; e = l->e; - if (!BM_edge_is_manifold(e)) { + if (!EDGE_CHECK(e)) { /* walker won't traverse to a non-manifold edge, but may * be started on one, and should not traverse *away* from * a non-manfold edge (non-manifold edges are never in an @@ -862,7 +868,7 @@ static void *bmw_EdgeringWalker_step(BMWalker *walker) i -= 2; } - if ((len <= 0) || (len % 2 != 0) || !BM_edge_is_manifold(l->e)) { + if ((len <= 0) || (len % 2 != 0) || !EDGE_CHECK(l->e)) { l = lwalk->l; i = len; while (i > 0) { @@ -871,7 +877,7 @@ static void *bmw_EdgeringWalker_step(BMWalker *walker) } } /* only walk to manifold edge */ - if ((l->f->len % 2 == 0) && BM_edge_is_manifold(l->e) && + if ((l->f->len % 2 == 0) && EDGE_CHECK(l->e) && !BLI_ghash_haskey(walker->visithash, l->e)) #else @@ -879,11 +885,11 @@ static void *bmw_EdgeringWalker_step(BMWalker *walker) l = l->radial_next; l = l->next->next; - if ((l->f->len != 4) || !BM_edge_is_manifold(l->e)) { + if ((l->f->len != 4) || !EDGE_CHECK(l->e)) { l = lwalk->l->next->next; } /* only walk to manifold edge */ - if ((l->f->len == 4) && BM_edge_is_manifold(l->e) && + if ((l->f->len == 4) && EDGE_CHECK(l->e) && !BLI_ghash_haskey(walker->visithash, l->e)) #endif { @@ -895,6 +901,8 @@ static void *bmw_EdgeringWalker_step(BMWalker *walker) } return e; + +#undef EDGE_CHECK } static void bmw_UVEdgeWalker_begin(BMWalker *walker, void *data) -- cgit v1.2.3 From a32cc95fa87e50efbd2ea152ea44766614894a49 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 30 Mar 2012 10:00:20 +0000 Subject: style cleanup --- source/blender/editors/util/crazyspace.c | 288 ++++++++++++------------- source/blender/editors/util/ed_util.c | 66 +++--- source/blender/editors/util/editmode_undo.c | 172 +++++++-------- source/blender/editors/util/numinput.c | 320 ++++++++++++++-------------- source/blender/editors/util/undo.c | 144 ++++++------- 5 files changed, 496 insertions(+), 494 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/util/crazyspace.c b/source/blender/editors/util/crazyspace.c index cef440668e6..d63ad7f58e6 100644 --- a/source/blender/editors/util/crazyspace.c +++ b/source/blender/editors/util/crazyspace.c @@ -54,7 +54,7 @@ typedef struct { short *flags; } MappedUserData; -#define TAN_MAKE_VEC(a, b, c) a[0]= b[0] + 0.2f*(b[0]-c[0]); a[1]= b[1] + 0.2f*(b[1]-c[1]); a[2]= b[2] + 0.2f*(b[2]-c[2]) +#define TAN_MAKE_VEC(a, b, c) a[0] = b[0] + 0.2f * (b[0] - c[0]); a[1] = b[1] + 0.2f * (b[1] - c[1]); a[2] = b[2] + 0.2f * (b[2] - c[2]) static void set_crazy_vertex_quat(float *quat, float *v1, float *v2, float *v3, float *def1, float *def2, float *def3) { float vecu[3], vecv[3]; @@ -62,11 +62,11 @@ static void set_crazy_vertex_quat(float *quat, float *v1, float *v2, float *v3, TAN_MAKE_VEC(vecu, v1, v2); TAN_MAKE_VEC(vecv, v1, v3); - tri_to_quat( q1,v1, vecu, vecv); + tri_to_quat(q1, v1, vecu, vecv); TAN_MAKE_VEC(vecu, def1, def2); TAN_MAKE_VEC(vecv, def1, def3); - tri_to_quat( q2,def1, vecu, vecv); + tri_to_quat(q2, def1, vecu, vecv); sub_qt_qtqt(quat, q2, q1); } @@ -74,15 +74,15 @@ static void set_crazy_vertex_quat(float *quat, float *v1, float *v2, float *v3, static void make_vertexcos__mapFunc(void *userData, int index, float *co, float *UNUSED(no_f), short *UNUSED(no_s)) { - MappedUserData *mappedData= (MappedUserData*)userData; + MappedUserData *mappedData = (MappedUserData *)userData; float *vec = mappedData->vertexcos; - vec+= 3*index; + vec += 3 * index; if (!mappedData->flags[index]) { /* we need coord from prototype vertex, not it clones or images, * suppose they stored in the beginning of vertex array stored in DM */ copy_v3_v3(vec, co); - mappedData->flags[index]= 1; + mappedData->flags[index] = 1; } } @@ -91,11 +91,11 @@ static int modifiers_disable_subsurf_temporary(Object *ob) ModifierData *md; int disabled = 0; - for (md=ob->modifiers.first; md; md=md->next) - if (md->type==eModifierType_Subsurf) + for (md = ob->modifiers.first; md; md = md->next) + if (md->type == eModifierType_Subsurf) if (md->mode & eModifierMode_OnCage) { md->mode ^= eModifierMode_DisableTemporary; - disabled= 1; + disabled = 1; } return disabled; @@ -104,10 +104,10 @@ static int modifiers_disable_subsurf_temporary(Object *ob) /* disable subsurf temporal, get mapped cos, and enable it */ float *crazyspace_get_mapped_editverts(Scene *scene, Object *obedit) { - Mesh *me= obedit->data; + Mesh *me = obedit->data; DerivedMesh *dm; float *vertexcos; - int nverts= me->edit_btmesh->bm->totvert; + int nverts = me->edit_btmesh->bm->totvert; short *flags; MappedUserData userData; @@ -118,13 +118,13 @@ float *crazyspace_get_mapped_editverts(Scene *scene, Object *obedit) } /* now get the cage */ - dm= editbmesh_get_derived_cage(scene, obedit, me->edit_btmesh, CD_MASK_BAREMESH); + dm = editbmesh_get_derived_cage(scene, obedit, me->edit_btmesh, CD_MASK_BAREMESH); - vertexcos= MEM_callocN(3*sizeof(float)*nverts, "vertexcos map"); - flags= MEM_callocN(sizeof(short)*nverts, "vertexcos flags"); + vertexcos = MEM_callocN(3 * sizeof(float) * nverts, "vertexcos map"); + flags = MEM_callocN(sizeof(short) * nverts, "vertexcos flags"); - userData.vertexcos= vertexcos; - userData.flags= flags; + userData.vertexcos = vertexcos; + userData.flags = flags; dm->foreachMappedVert(dm, make_vertexcos__mapFunc, &userData); dm->release(dm); @@ -143,31 +143,33 @@ void crazyspace_set_quats_editmesh(BMEditMesh *em, float *origcos, float *mapped BMIter iter, liter; BMLoop *l; float *v1, *v2, *v3, *co1, *co2, *co3; - int *vert_table = MEM_callocN(sizeof(int)*em->bm->totvert, "vert_table"); + int *vert_table = MEM_callocN(sizeof(int) * em->bm->totvert, "vert_table"); int index = 0; BM_mesh_elem_index_ensure(em->bm, BM_VERT); - BM_ITER(v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) { + BM_ITER(v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) + { if (!BM_elem_flag_test(v, BM_ELEM_SELECT) || BM_elem_flag_test(v, BM_ELEM_HIDDEN)) continue; - BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_VERT, v) { + BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_VERT, v) + { BMLoop *l2 = BM_face_other_edge_loop(l->f, l->e, v); /* retrieve mapped coordinates */ - v1= mappedcos + 3*BM_elem_index_get(l->v); - v2= mappedcos + 3*BM_elem_index_get(BM_edge_other_vert(l2->e, l->v)); - v3= mappedcos + 3*BM_elem_index_get(BM_edge_other_vert(l->e, l->v)); - - co1= (origcos)? origcos + 3*BM_elem_index_get(l->v) : l->v->co; - co2= (origcos)? origcos + 3*BM_elem_index_get(BM_edge_other_vert(l2->e, l->v)) : BM_edge_other_vert(l2->e, l->v)->co; - co3= (origcos)? origcos + 3*BM_elem_index_get(BM_edge_other_vert(l->e, l->v)) : BM_edge_other_vert(l->e, l->v)->co; + v1 = mappedcos + 3 * BM_elem_index_get(l->v); + v2 = mappedcos + 3 * BM_elem_index_get(BM_edge_other_vert(l2->e, l->v)); + v3 = mappedcos + 3 * BM_elem_index_get(BM_edge_other_vert(l->e, l->v)); + + co1 = (origcos) ? origcos + 3 * BM_elem_index_get(l->v) : l->v->co; + co2 = (origcos) ? origcos + 3 * BM_elem_index_get(BM_edge_other_vert(l2->e, l->v)) : BM_edge_other_vert(l2->e, l->v)->co; + co3 = (origcos) ? origcos + 3 * BM_elem_index_get(BM_edge_other_vert(l->e, l->v)) : BM_edge_other_vert(l->e, l->v)->co; set_crazy_vertex_quat(quats, v1, v2, v3, co1, co2, co3); - quats+= 4; + quats += 4; - vert_table[BM_elem_index_get(l->v)] = index+1; + vert_table[BM_elem_index_get(l->v)] = index + 1; index++; break; /*just do one corner*/ @@ -177,9 +179,9 @@ void crazyspace_set_quats_editmesh(BMEditMesh *em, float *origcos, float *mapped index = 0; BM_ITER(v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) { if (vert_table[index] != 0) - BM_elem_index_set(v, vert_table[index]-1); /* set_dirty! */ + BM_elem_index_set(v, vert_table[index] - 1); /* set_dirty! */ else - BM_elem_index_set(v, -1); /* set_dirty! */ + BM_elem_index_set(v, -1); /* set_dirty! */ index++; } @@ -191,69 +193,69 @@ void crazyspace_set_quats_editmesh(BMEditMesh *em, float *origcos, float *mapped BMEditFace *efa; BMIter iter; float *v1, *v2, *v3, *v4, *co1, *co2, *co3, *co4; - intptr_t index= 0; + intptr_t index = 0; /* two abused locations in vertices */ - for (eve= em->verts.first; eve; eve= eve->next, index++) { + for (eve = em->verts.first; eve; eve = eve->next, index++) { eve->tmp.p = NULL; - eve->prev= (EditVert *)index; + eve->prev = (EditVert *)index; } /* first store two sets of tangent vectors in vertices, we derive it just from the face-edges */ - for (efa= em->faces.first; efa; efa= efa->next) { + for (efa = em->faces.first; efa; efa = efa->next) { /* retrieve mapped coordinates */ - v1= mappedcos + 3*(intptr_t)(efa->v1->prev); - v2= mappedcos + 3*(intptr_t)(efa->v2->prev); - v3= mappedcos + 3*(intptr_t)(efa->v3->prev); + v1 = mappedcos + 3 * (intptr_t)(efa->v1->prev); + v2 = mappedcos + 3 * (intptr_t)(efa->v2->prev); + v3 = mappedcos + 3 * (intptr_t)(efa->v3->prev); - co1= (origcos)? origcos + 3*(intptr_t)(efa->v1->prev): efa->v1->co; - co2= (origcos)? origcos + 3*(intptr_t)(efa->v2->prev): efa->v2->co; - co3= (origcos)? origcos + 3*(intptr_t)(efa->v3->prev): efa->v3->co; + co1 = (origcos) ? origcos + 3 * (intptr_t)(efa->v1->prev) : efa->v1->co; + co2 = (origcos) ? origcos + 3 * (intptr_t)(efa->v2->prev) : efa->v2->co; + co3 = (origcos) ? origcos + 3 * (intptr_t)(efa->v3->prev) : efa->v3->co; - if (efa->v2->tmp.p==NULL && efa->v2->f1) { + if (efa->v2->tmp.p == NULL && efa->v2->f1) { set_crazy_vertex_quat(quats, co2, co3, co1, v2, v3, v1); - efa->v2->tmp.p= (void*)quats; - quats+= 4; + efa->v2->tmp.p = (void *)quats; + quats += 4; } if (efa->v4) { - v4= mappedcos + 3*(intptr_t)(efa->v4->prev); - co4= (origcos)? origcos + 3*(intptr_t)(efa->v4->prev): efa->v4->co; + v4 = mappedcos + 3 * (intptr_t)(efa->v4->prev); + co4 = (origcos) ? origcos + 3 * (intptr_t)(efa->v4->prev) : efa->v4->co; - if (efa->v1->tmp.p==NULL && efa->v1->f1) { + if (efa->v1->tmp.p == NULL && efa->v1->f1) { set_crazy_vertex_quat(quats, co1, co2, co4, v1, v2, v4); - efa->v1->tmp.p= (void*)quats; - quats+= 4; + efa->v1->tmp.p = (void *)quats; + quats += 4; } - if (efa->v3->tmp.p==NULL && efa->v3->f1) { + if (efa->v3->tmp.p == NULL && efa->v3->f1) { set_crazy_vertex_quat(quats, co3, co4, co2, v3, v4, v2); - efa->v3->tmp.p= (void*)quats; - quats+= 4; + efa->v3->tmp.p = (void *)quats; + quats += 4; } - if (efa->v4->tmp.p==NULL && efa->v4->f1) { + if (efa->v4->tmp.p == NULL && efa->v4->f1) { set_crazy_vertex_quat(quats, co4, co1, co3, v4, v1, v3); - efa->v4->tmp.p= (void*)quats; - quats+= 4; + efa->v4->tmp.p = (void *)quats; + quats += 4; } } else { - if (efa->v1->tmp.p==NULL && efa->v1->f1) { + if (efa->v1->tmp.p == NULL && efa->v1->f1) { set_crazy_vertex_quat(quats, co1, co2, co3, v1, v2, v3); - efa->v1->tmp.p= (void*)quats; - quats+= 4; + efa->v1->tmp.p = (void *)quats; + quats += 4; } - if (efa->v3->tmp.p==NULL && efa->v3->f1) { + if (efa->v3->tmp.p == NULL && efa->v3->f1) { set_crazy_vertex_quat(quats, co3, co1, co2, v3, v1, v2); - efa->v3->tmp.p= (void*)quats; - quats+= 4; + efa->v3->tmp.p = (void *)quats; + quats += 4; } } } /* restore abused prev pointer */ - for (prev= NULL, eve= em->verts.first; eve; prev= eve, eve= eve->next) - eve->prev= prev; + for (prev = NULL, eve = em->verts.first; eve; prev = eve, eve = eve->next) + eve->prev = prev; #endif } @@ -266,61 +268,61 @@ void crazyspace_set_quats_mesh(Mesh *me, float *origcos, float *mappedcos, float MFace *mface; float *v1, *v2, *v3, *v4, *co1, *co2, *co3, *co4; - mvert= me->mvert; - for (i=0; itotvert; i++, mvert++) - mvert->flag&= ~ME_VERT_TMP_TAG; + mvert = me->mvert; + for (i = 0; i < me->totvert; i++, mvert++) + mvert->flag &= ~ME_VERT_TMP_TAG; /* first store two sets of tangent vectors in vertices, we derive it just from the face-edges */ - mvert= me->mvert; - mface= me->mface; - for (i=0; itotface; i++, mface++) { + mvert = me->mvert; + mface = me->mface; + for (i = 0; i < me->totface; i++, mface++) { /* retrieve mapped coordinates */ - v1= mappedcos + 3*mface->v1; - v2= mappedcos + 3*mface->v2; - v3= mappedcos + 3*mface->v3; + v1 = mappedcos + 3 * mface->v1; + v2 = mappedcos + 3 * mface->v2; + v3 = mappedcos + 3 * mface->v3; - co1= (origcos)? origcos + 3*mface->v1: mvert[mface->v1].co; - co2= (origcos)? origcos + 3*mface->v2: mvert[mface->v2].co; - co3= (origcos)? origcos + 3*mface->v3: mvert[mface->v3].co; + co1 = (origcos) ? origcos + 3 * mface->v1 : mvert[mface->v1].co; + co2 = (origcos) ? origcos + 3 * mface->v2 : mvert[mface->v2].co; + co3 = (origcos) ? origcos + 3 * mface->v3 : mvert[mface->v3].co; - if ((mvert[mface->v2].flag&ME_VERT_TMP_TAG)==0) { - set_crazy_vertex_quat(&quats[mface->v2*4], co2, co3, co1, v2, v3, v1); - mvert[mface->v2].flag|= ME_VERT_TMP_TAG; + if ((mvert[mface->v2].flag & ME_VERT_TMP_TAG) == 0) { + set_crazy_vertex_quat(&quats[mface->v2 * 4], co2, co3, co1, v2, v3, v1); + mvert[mface->v2].flag |= ME_VERT_TMP_TAG; } if (mface->v4) { - v4= mappedcos + 3*mface->v4; - co4= (origcos)? origcos + 3*mface->v4: mvert[mface->v4].co; + v4 = mappedcos + 3 * mface->v4; + co4 = (origcos) ? origcos + 3 * mface->v4 : mvert[mface->v4].co; - if ((mvert[mface->v1].flag&ME_VERT_TMP_TAG)==0) { - set_crazy_vertex_quat(&quats[mface->v1*4], co1, co2, co4, v1, v2, v4); - mvert[mface->v1].flag|= ME_VERT_TMP_TAG; + if ((mvert[mface->v1].flag & ME_VERT_TMP_TAG) == 0) { + set_crazy_vertex_quat(&quats[mface->v1 * 4], co1, co2, co4, v1, v2, v4); + mvert[mface->v1].flag |= ME_VERT_TMP_TAG; } - if ((mvert[mface->v3].flag&ME_VERT_TMP_TAG)==0) { - set_crazy_vertex_quat(&quats[mface->v3*4], co3, co4, co2, v3, v4, v2); - mvert[mface->v3].flag|= ME_VERT_TMP_TAG; + if ((mvert[mface->v3].flag & ME_VERT_TMP_TAG) == 0) { + set_crazy_vertex_quat(&quats[mface->v3 * 4], co3, co4, co2, v3, v4, v2); + mvert[mface->v3].flag |= ME_VERT_TMP_TAG; } - if ((mvert[mface->v4].flag&ME_VERT_TMP_TAG)==0) { - set_crazy_vertex_quat(&quats[mface->v4*4], co4, co1, co3, v4, v1, v3); - mvert[mface->v4].flag|= ME_VERT_TMP_TAG; + if ((mvert[mface->v4].flag & ME_VERT_TMP_TAG) == 0) { + set_crazy_vertex_quat(&quats[mface->v4 * 4], co4, co1, co3, v4, v1, v3); + mvert[mface->v4].flag |= ME_VERT_TMP_TAG; } } else { - if ((mvert[mface->v1].flag&ME_VERT_TMP_TAG)==0) { - set_crazy_vertex_quat(&quats[mface->v1*4], co1, co2, co3, v1, v2, v3); - mvert[mface->v1].flag|= ME_VERT_TMP_TAG; + if ((mvert[mface->v1].flag & ME_VERT_TMP_TAG) == 0) { + set_crazy_vertex_quat(&quats[mface->v1 * 4], co1, co2, co3, v1, v2, v3); + mvert[mface->v1].flag |= ME_VERT_TMP_TAG; } - if ((mvert[mface->v3].flag&ME_VERT_TMP_TAG)==0) { - set_crazy_vertex_quat(&quats[mface->v3*4], co3, co1, co2, v3, v1, v2); - mvert[mface->v3].flag|= ME_VERT_TMP_TAG; + if ((mvert[mface->v3].flag & ME_VERT_TMP_TAG) == 0) { + set_crazy_vertex_quat(&quats[mface->v3 * 4], co3, co1, co2, v3, v1, v2); + mvert[mface->v3].flag |= ME_VERT_TMP_TAG; } } } } int editbmesh_get_first_deform_matrices(Scene *scene, Object *ob, BMEditMesh *em, - float (**deformmats)[3][3], float (**deformcos)[3]) + float (**deformmats)[3][3], float (**deformcos)[3]) { ModifierData *md; DerivedMesh *dm; @@ -342,18 +344,18 @@ int editbmesh_get_first_deform_matrices(Scene *scene, Object *ob, BMEditMesh *em if (!editbmesh_modifier_is_enabled(scene, md, dm)) continue; - if (mti->type==eModifierTypeType_OnlyDeform && mti->deformMatricesEM) { + if (mti->type == eModifierTypeType_OnlyDeform && mti->deformMatricesEM) { if (!defmats) { - dm= getEditDerivedBMesh(em, ob, NULL); - deformedVerts= editbmesh_get_vertex_cos(em, &numVerts); - defmats= MEM_callocN(sizeof(*defmats)*numVerts, "defmats"); + dm = getEditDerivedBMesh(em, ob, NULL); + deformedVerts = editbmesh_get_vertex_cos(em, &numVerts); + defmats = MEM_callocN(sizeof(*defmats) * numVerts, "defmats"); - for (a=0; adeformMatricesEM(md, ob, em, dm, deformedVerts, defmats, - numVerts); + numVerts); } else break; @@ -366,8 +368,8 @@ int editbmesh_get_first_deform_matrices(Scene *scene, Object *ob, BMEditMesh *em if (dm) dm->release(dm); - *deformmats= defmats; - *deformcos= deformedVerts; + *deformmats = defmats; + *deformcos = deformedVerts; return numleft; } @@ -376,34 +378,34 @@ int sculpt_get_first_deform_matrices(Scene *scene, Object *ob, float (**deformma { ModifierData *md; DerivedMesh *dm; - int a, numVerts= 0; - float (*defmats)[3][3]= NULL, (*deformedVerts)[3]= NULL; - MultiresModifierData *mmd= get_multires_modifier(scene, ob, 0); + int a, numVerts = 0; + float (*defmats)[3][3] = NULL, (*deformedVerts)[3] = NULL; + MultiresModifierData *mmd = get_multires_modifier(scene, ob, 0); int has_multires = mmd != NULL && mmd->sculptlvl > 0; - int numleft= 0; + int numleft = 0; if (has_multires) { - *deformmats= NULL; - *deformcos= NULL; + *deformmats = NULL; + *deformcos = NULL; return numleft; } - dm= NULL; - md= modifiers_getVirtualModifierList(ob); + dm = NULL; + md = modifiers_getVirtualModifierList(ob); - for (; md; md= md->next) { - ModifierTypeInfo *mti= modifierType_getInfo(md->type); + for (; md; md = md->next) { + ModifierTypeInfo *mti = modifierType_getInfo(md->type); if (!modifier_isEnabled(scene, md, eModifierMode_Realtime)) continue; - if (mti->type==eModifierTypeType_OnlyDeform) { + if (mti->type == eModifierTypeType_OnlyDeform) { if (!defmats) { - Mesh *me= (Mesh*)ob->data; - dm= mesh_create_derived(me, ob, NULL); - deformedVerts= mesh_getVertexCos(me, &numVerts); - defmats= MEM_callocN(sizeof(*defmats)*numVerts, "defmats"); + Mesh *me = (Mesh *)ob->data; + dm = mesh_create_derived(me, ob, NULL); + deformedVerts = mesh_getVertexCos(me, &numVerts); + defmats = MEM_callocN(sizeof(*defmats) * numVerts, "defmats"); - for (a=0; anext) { - ModifierTypeInfo *mti= modifierType_getInfo(md->type); + for (; md; md = md->next) { + ModifierTypeInfo *mti = modifierType_getInfo(md->type); if (!modifier_isEnabled(scene, md, eModifierMode_Realtime)) continue; - if (mti->type==eModifierTypeType_OnlyDeform) + if (mti->type == eModifierTypeType_OnlyDeform) numleft++; } if (dm) dm->release(dm); - *deformmats= defmats; - *deformcos= deformedVerts; + *deformmats = defmats; + *deformcos = deformedVerts; return numleft; } void crazyspace_build_sculpt(Scene *scene, Object *ob, float (**deformmats)[3][3], float (**deformcos)[3]) { - int totleft= sculpt_get_first_deform_matrices(scene, ob, deformmats, deformcos); + int totleft = sculpt_get_first_deform_matrices(scene, ob, deformmats, deformcos); if (totleft) { /* there are deformation modifier which doesn't support deformation matrices * calculation. Need additional crazyspace correction */ - float (*deformedVerts)[3]= *deformcos; - float (*origVerts)[3]= MEM_dupallocN(deformedVerts); - float *quats= NULL; - int i, deformed= 0; - ModifierData *md= modifiers_getVirtualModifierList(ob); - Mesh *me= (Mesh*)ob->data; + float (*deformedVerts)[3] = *deformcos; + float (*origVerts)[3] = MEM_dupallocN(deformedVerts); + float *quats = NULL; + int i, deformed = 0; + ModifierData *md = modifiers_getVirtualModifierList(ob); + Mesh *me = (Mesh *)ob->data; - for (; md; md= md->next) { - ModifierTypeInfo *mti= modifierType_getInfo(md->type); + for (; md; md = md->next) { + ModifierTypeInfo *mti = modifierType_getInfo(md->type); if (!modifier_isEnabled(scene, md, eModifierMode_Realtime)) continue; - if (mti->type==eModifierTypeType_OnlyDeform) { + if (mti->type == eModifierTypeType_OnlyDeform) { /* skip leading modifiers which have been already * handled in sculpt_get_first_deform_matrices */ if (mti->deformMatrices && !deformed) continue; mti->deformVerts(md, ob, NULL, deformedVerts, me->totvert, 0, 0); - deformed= 1; + deformed = 1; } } - quats= MEM_mallocN(me->totvert*sizeof(float)*4, "crazy quats"); + quats = MEM_mallocN(me->totvert * sizeof(float) * 4, "crazy quats"); - crazyspace_set_quats_mesh(me, (float*)origVerts, (float*)deformedVerts, quats); + crazyspace_set_quats_mesh(me, (float *)origVerts, (float *)deformedVerts, quats); - for (i=0; itotvert; i++) { + for (i = 0; i < me->totvert; i++) { float qmat[3][3], tmat[3][3]; - quat_to_mat3(qmat, &quats[i*4]); + quat_to_mat3(qmat, &quats[i * 4]); mul_m3_m3m3(tmat, qmat, (*deformmats)[i]); copy_m3_m3((*deformmats)[i], tmat); } @@ -479,12 +481,12 @@ void crazyspace_build_sculpt(Scene *scene, Object *ob, float (**deformmats)[3][3 if (!*deformmats) { int a, numVerts; - Mesh *me= (Mesh*)ob->data; + Mesh *me = (Mesh *)ob->data; - *deformcos= mesh_getVertexCos(me, &numVerts); - *deformmats= MEM_callocN(sizeof(*(*deformmats))*numVerts, "defmats"); + *deformcos = mesh_getVertexCos(me, &numVerts); + *deformmats = MEM_callocN(sizeof(*(*deformmats)) * numVerts, "defmats"); - for (a=0; abasact)? sce->basact->object: NULL; + Main *bmain = CTX_data_main(C); + Scene *sce = CTX_data_scene(C); + Object *ob, *obact = (sce && sce->basact) ? sce->basact->object : NULL; ID *data; /* toggle on modes for objects that were saved with these enabled. for * e.g. linked objects we have to ensure that they are actually the * active object in this scene. */ - for (ob=bmain->object.first; ob; ob=ob->id.next) { - int mode= ob->mode; + for (ob = bmain->object.first; ob; ob = ob->id.next) { + int mode = ob->mode; if (mode && (mode != OB_MODE_POSE)) { - ob->mode= 0; - data= ob->data; + ob->mode = 0; + data = ob->data; if (ob == obact && !ob->id.lib && !(data && data->lib)) ED_object_toggle_modes(C, mode); @@ -91,7 +91,7 @@ void ED_editors_init(bContext *C) /* frees all editmode stuff */ void ED_editors_exit(bContext *C) { - Main *bmain= CTX_data_main(C); + Main *bmain = CTX_data_main(C); Scene *sce; if (!bmain) @@ -101,20 +101,20 @@ void ED_editors_exit(bContext *C) undo_editmode_clear(); ED_undo_paint_free(); - for (sce=bmain->scene.first; sce; sce= sce->id.next) { + for (sce = bmain->scene.first; sce; sce = sce->id.next) { if (sce->obedit) { - Object *ob= sce->obedit; + Object *ob = sce->obedit; if (ob) { - if (ob->type==OB_MESH) { - Mesh *me= ob->data; + if (ob->type == OB_MESH) { + Mesh *me = ob->data; if (me->edit_btmesh) { EDBM_mesh_free(me->edit_btmesh); MEM_freeN(me->edit_btmesh); - me->edit_btmesh= NULL; + me->edit_btmesh = NULL; } } - else if (ob->type==OB_ARMATURE) { + else if (ob->type == OB_ARMATURE) { ED_armature_edit_free(ob); } } @@ -136,16 +136,16 @@ void apply_keyb_grid(int shift, int ctrl, float *val, float fac1, float fac2, fl { /* fac1 is for 'nothing', fac2 for CTRL, fac3 for SHIFT */ if (invert) - ctrl= !ctrl; + ctrl = !ctrl; if (ctrl && shift) { - if (fac3 != 0.0f) *val= fac3*floorf(*val/fac3 +0.5f); + if (fac3 != 0.0f) *val = fac3 * floorf(*val / fac3 + 0.5f); } else if (ctrl) { - if (fac2 != 0.0f) *val= fac2*floorf(*val/fac2 +0.5f); + if (fac2 != 0.0f) *val = fac2 * floorf(*val / fac2 + 0.5f); } else { - if (fac1 != 0.0f) *val= fac1*floorf(*val/fac1 +0.5f); + if (fac1 != 0.0f) *val = fac1 * floorf(*val / fac1 + 0.5f); } } @@ -154,7 +154,7 @@ int GetButStringLength(const char *str) { int rt; - rt= UI_GetStringWidth(str); + rt = UI_GetStringWidth(str); return rt + 15; } @@ -168,11 +168,11 @@ void unpack_menu(bContext *C, const char *opname, const char *id_name, const cha char line[FILE_MAX + 100]; wmOperatorType *ot = WM_operatortype_find(opname, 1); - pup= uiPupMenuBegin(C, "Unpack file", ICON_NONE); - layout= uiPupMenuLayout(pup); + pup = uiPupMenuBegin(C, "Unpack file", ICON_NONE); + layout = uiPupMenuLayout(pup); strcpy(line, "Remove Pack"); - props_ptr= uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); + props_ptr = uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); RNA_enum_set(&props_ptr, "method", PF_REMOVE); RNA_string_set(&props_ptr, "id", id_name); @@ -182,11 +182,11 @@ void unpack_menu(bContext *C, const char *opname, const char *id_name, const cha BLI_strncpy(local_name, abs_name, sizeof(local_name)); BLI_splitdirstring(local_name, fi); BLI_snprintf(local_name, sizeof(local_name), "//%s/%s", folder, fi); - if (strcmp(abs_name, local_name)!=0) { - switch(checkPackedFile(local_name, pf)) { + if (strcmp(abs_name, local_name) != 0) { + switch (checkPackedFile(local_name, pf)) { case PF_NOFILE: BLI_snprintf(line, sizeof(line), "Create %s", local_name); - props_ptr= uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); + props_ptr = uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); RNA_enum_set(&props_ptr, "method", PF_WRITE_LOCAL); RNA_string_set(&props_ptr, "id", id_name); @@ -194,7 +194,7 @@ void unpack_menu(bContext *C, const char *opname, const char *id_name, const cha case PF_EQUAL: BLI_snprintf(line, sizeof(line), "Use %s (identical)", local_name); //uiItemEnumO_ptr(layout, ot, line, 0, "method", PF_USE_LOCAL); - props_ptr= uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); + props_ptr = uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); RNA_enum_set(&props_ptr, "method", PF_USE_LOCAL); RNA_string_set(&props_ptr, "id", id_name); @@ -202,13 +202,13 @@ void unpack_menu(bContext *C, const char *opname, const char *id_name, const cha case PF_DIFFERS: BLI_snprintf(line, sizeof(line), "Use %s (differs)", local_name); //uiItemEnumO_ptr(layout, ot, line, 0, "method", PF_USE_LOCAL); - props_ptr= uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); + props_ptr = uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); RNA_enum_set(&props_ptr, "method", PF_USE_LOCAL); RNA_string_set(&props_ptr, "id", id_name); BLI_snprintf(line, sizeof(line), "Overwrite %s", local_name); //uiItemEnumO_ptr(layout, ot, line, 0, "method", PF_WRITE_LOCAL); - props_ptr= uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); + props_ptr = uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); RNA_enum_set(&props_ptr, "method", PF_WRITE_LOCAL); RNA_string_set(&props_ptr, "id", id_name); break; @@ -216,31 +216,31 @@ void unpack_menu(bContext *C, const char *opname, const char *id_name, const cha } } - switch(checkPackedFile(abs_name, pf)) { + switch (checkPackedFile(abs_name, pf)) { case PF_NOFILE: BLI_snprintf(line, sizeof(line), "Create %s", abs_name); //uiItemEnumO_ptr(layout, ot, line, 0, "method", PF_WRITE_ORIGINAL); - props_ptr= uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); + props_ptr = uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); RNA_enum_set(&props_ptr, "method", PF_WRITE_ORIGINAL); RNA_string_set(&props_ptr, "id", id_name); break; case PF_EQUAL: BLI_snprintf(line, sizeof(line), "Use %s (identical)", abs_name); //uiItemEnumO_ptr(layout, ot, line, 0, "method", PF_USE_ORIGINAL); - props_ptr= uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); + props_ptr = uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); RNA_enum_set(&props_ptr, "method", PF_USE_ORIGINAL); RNA_string_set(&props_ptr, "id", id_name); break; case PF_DIFFERS: BLI_snprintf(line, sizeof(line), "Use %s (differs)", abs_name); //uiItemEnumO_ptr(layout, ot, line, 0, "method", PF_USE_ORIGINAL); - props_ptr= uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); + props_ptr = uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); RNA_enum_set(&props_ptr, "method", PF_USE_ORIGINAL); RNA_string_set(&props_ptr, "id", id_name); BLI_snprintf(line, sizeof(line), "Overwrite %s", abs_name); //uiItemEnumO_ptr(layout, ot, line, 0, "method", PF_WRITE_ORIGINAL); - props_ptr= uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); + props_ptr = uiItemFullO_ptr(layout, ot, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); RNA_enum_set(&props_ptr, "method", PF_WRITE_ORIGINAL); RNA_string_set(&props_ptr, "id", id_name); break; diff --git a/source/blender/editors/util/editmode_undo.c b/source/blender/editors/util/editmode_undo.c index 4416228e2d3..8849a9af9c0 100644 --- a/source/blender/editors/util/editmode_undo.c +++ b/source/blender/editors/util/editmode_undo.c @@ -62,11 +62,11 @@ * Add this in your local code: * * void undo_editmode_push(bContext *C, const char *name, - * void * (*getdata)(bContext *C), // use context to retrieve current editdata - * void (*freedata)(void *), // pointer to function freeing data - * void (*to_editmode)(void *, void *), // data to editmode conversion - * void * (*from_editmode)(void *)) // editmode to data conversion - * int (*validate_undo)(void *, void *)) // check if undo data is still valid + * void * (*getdata)(bContext *C), // use context to retrieve current editdata + * void (*freedata)(void *), // pointer to function freeing data + * void (*to_editmode)(void *, void *), // data to editmode conversion + * void * (*from_editmode)(void *)) // editmode to data conversion + * int (*validate_undo)(void *, void *)) // check if undo data is still valid * * * Further exported for UI is: @@ -83,24 +83,24 @@ static void error(const char *UNUSED(arg)) {} /* ****** XXX ***** */ -#define MAXUNDONAME 64 +#define MAXUNDONAME 64 typedef struct UndoElem { struct UndoElem *next, *prev; - ID id; // copy of editmode object ID - Object *ob; // pointer to edited object - int type; // type of edited object + ID id; // copy of editmode object ID + Object *ob; // pointer to edited object + int type; // type of edited object void *undodata; uintptr_t undosize; char name[MAXUNDONAME]; - void * (*getdata)(bContext *C); + void * (*getdata)(bContext * C); void (*freedata)(void *); void (*to_editmode)(void *, void *, void *); void * (*from_editmode)(void *, void *); int (*validate_undo)(void *, void *); } UndoElem; -static ListBase undobase={NULL, NULL}; -static UndoElem *curundo= NULL; +static ListBase undobase = {NULL, NULL}; +static UndoElem *curundo = NULL; /* ********************* xtern api calls ************* */ @@ -114,14 +114,14 @@ static void undo_restore(UndoElem *undo, void *editdata, void *obdata) /* name can be a dynamic string */ void undo_editmode_push(bContext *C, const char *name, - void * (*getdata)(bContext *C), - void (*freedata)(void *), - void (*to_editmode)(void *, void *, void *), - void *(*from_editmode)(void *, void *), - int (*validate_undo)(void *, void *)) + void * (*getdata)(bContext * C), + void (*freedata)(void *), + void (*to_editmode)(void *, void *, void *), + void *(*from_editmode)(void *, void *), + int (*validate_undo)(void *, void *)) { UndoElem *uel; - Object *obedit= CTX_data_edit_object(C); + Object *obedit = CTX_data_edit_object(C); void *editdata; int nr; uintptr_t memused, totmem, maxmem; @@ -131,65 +131,65 @@ void undo_editmode_push(bContext *C, const char *name, /* remove all undos after (also when curundo==NULL) */ while (undobase.last != curundo) { - uel= undobase.last; + uel = undobase.last; uel->freedata(uel->undodata); BLI_freelinkN(&undobase, uel); } /* make new */ - curundo= uel= MEM_callocN(sizeof(UndoElem), "undo editmode"); + curundo = uel = MEM_callocN(sizeof(UndoElem), "undo editmode"); BLI_strncpy(uel->name, name, sizeof(uel->name)); BLI_addtail(&undobase, uel); - uel->getdata= getdata; - uel->freedata= freedata; - uel->to_editmode= to_editmode; - uel->from_editmode= from_editmode; - uel->validate_undo= validate_undo; + uel->getdata = getdata; + uel->freedata = freedata; + uel->to_editmode = to_editmode; + uel->from_editmode = from_editmode; + uel->validate_undo = validate_undo; /* limit amount to the maximum amount*/ - nr= 0; - uel= undobase.last; + nr = 0; + uel = undobase.last; while (uel) { nr++; - if (nr==U.undosteps) break; - uel= uel->prev; + if (nr == U.undosteps) break; + uel = uel->prev; } if (uel) { - while (undobase.first!=uel) { - UndoElem *first= undobase.first; + while (undobase.first != uel) { + UndoElem *first = undobase.first; first->freedata(first->undodata); BLI_freelinkN(&undobase, first); } } /* copy */ - memused= MEM_get_memory_in_use(); - editdata= getdata(C); - curundo->undodata= curundo->from_editmode(editdata, obedit->data); - curundo->undosize= MEM_get_memory_in_use() - memused; - curundo->ob= obedit; - curundo->id= obedit->id; - curundo->type= obedit->type; + memused = MEM_get_memory_in_use(); + editdata = getdata(C); + curundo->undodata = curundo->from_editmode(editdata, obedit->data); + curundo->undosize = MEM_get_memory_in_use() - memused; + curundo->ob = obedit; + curundo->id = obedit->id; + curundo->type = obedit->type; if (U.undomemory != 0) { /* limit to maximum memory (afterwards, we can't know in advance) */ - totmem= 0; - maxmem= ((uintptr_t)U.undomemory)*1024*1024; + totmem = 0; + maxmem = ((uintptr_t)U.undomemory) * 1024 * 1024; - uel= undobase.last; + uel = undobase.last; while (uel && uel->prev) { - totmem+= uel->undosize; - if (totmem>maxmem) break; - uel= uel->prev; + totmem += uel->undosize; + if (totmem > maxmem) break; + uel = uel->prev; } if (uel) { if (uel->prev && uel->prev->prev) - uel= uel->prev; + uel = uel->prev; - while (undobase.first!=uel) { - UndoElem *first= undobase.first; + while (undobase.first != uel) { + UndoElem *first = undobase.first; first->freedata(first->undodata); BLI_freelinkN(&undobase, first); } @@ -201,69 +201,69 @@ void undo_editmode_push(bContext *C, const char *name, static void undo_clean_stack(bContext *C) { UndoElem *uel, *next; - Object *obedit= CTX_data_edit_object(C); + Object *obedit = CTX_data_edit_object(C); /* global undo changes pointers, so we also allow identical names */ /* side effect: when deleting/renaming object and start editing new one with same name */ - uel= undobase.first; + uel = undobase.first; while (uel) { - void *editdata= uel->getdata(C); - int isvalid= 0; - next= uel->next; + void *editdata = uel->getdata(C); + int isvalid = 0; + next = uel->next; /* for when objects are converted, renamed, or global undo changes pointers... */ - if (uel->type==obedit->type) { - if (strcmp(uel->id.name, obedit->id.name)==0) { - if (uel->validate_undo==NULL) - isvalid= 1; + if (uel->type == obedit->type) { + if (strcmp(uel->id.name, obedit->id.name) == 0) { + if (uel->validate_undo == NULL) + isvalid = 1; else if (uel->validate_undo(uel->undodata, editdata)) - isvalid= 1; + isvalid = 1; } } if (isvalid) - uel->ob= obedit; + uel->ob = obedit; else { if (uel == curundo) - curundo= NULL; + curundo = NULL; uel->freedata(uel->undodata); BLI_freelinkN(&undobase, uel); } - uel= next; + uel = next; } - if (curundo == NULL) curundo= undobase.last; + if (curundo == NULL) curundo = undobase.last; } /* 1= an undo, -1 is a redo. we have to make sure 'curundo' remains at current situation */ void undo_editmode_step(bContext *C, int step) { - Object *obedit= CTX_data_edit_object(C); + Object *obedit = CTX_data_edit_object(C); /* prevent undo to happen on wrong object, stack can be a mix */ undo_clean_stack(C); - if (step==0) { + if (step == 0) { undo_restore(curundo, curundo->getdata(C), obedit->data); } - else if (step==1) { + else if (step == 1) { - if (curundo==NULL || curundo->prev==NULL) error("No more steps to undo"); + if (curundo == NULL || curundo->prev == NULL) error("No more steps to undo"); else { if (G.f & G_DEBUG) printf("undo %s\n", curundo->name); - curundo= curundo->prev; + curundo = curundo->prev; undo_restore(curundo, curundo->getdata(C), obedit->data); } } else { /* curundo has to remain current situation! */ - if (curundo==NULL || curundo->next==NULL) error("No more steps to redo"); + if (curundo == NULL || curundo->next == NULL) error("No more steps to redo"); else { undo_restore(curundo->next, curundo->getdata(C), obedit->data); - curundo= curundo->next; + curundo = curundo->next; if (G.f & G_DEBUG) printf("redo %s\n", curundo->name); } } @@ -282,25 +282,25 @@ void undo_editmode_clear(void) { UndoElem *uel; - uel= undobase.first; + uel = undobase.first; while (uel) { uel->freedata(uel->undodata); - uel= uel->next; + uel = uel->next; } BLI_freelistN(&undobase); - curundo= NULL; + curundo = NULL; } /* based on index nr it does a restore */ void undo_editmode_number(bContext *C, int nr) { UndoElem *uel; - int a=1; + int a = 1; - for (uel= undobase.first; uel; uel= uel->next, a++) { - if (a==nr) break; + for (uel = undobase.first; uel; uel = uel->next, a++) { + if (a == nr) break; } - curundo= uel; + curundo = uel; undo_editmode_step(C, 0); } @@ -308,12 +308,12 @@ void undo_editmode_name(bContext *C, const char *undoname) { UndoElem *uel; - for (uel= undobase.last; uel; uel= uel->prev) { - if (strcmp(undoname, uel->name)==0) + for (uel = undobase.last; uel; uel = uel->prev) { + if (strcmp(undoname, uel->name) == 0) break; } if (uel && uel->prev) { - curundo= uel->prev; + curundo = uel->prev; undo_editmode_step(C, 0); } } @@ -324,8 +324,8 @@ int undo_editmode_valid(const char *undoname) if (undoname) { UndoElem *uel; - for (uel= undobase.last; uel; uel= uel->prev) { - if (strcmp(undoname, uel->name)==0) + for (uel = undobase.last; uel; uel = uel->prev) { + if (strcmp(undoname, uel->name) == 0) break; } return uel != NULL; @@ -343,12 +343,12 @@ const char *undo_editmode_get_name(bContext *C, int nr, int *active) /* prevent wrong numbers to be returned */ undo_clean_stack(C); - if (active) *active= 0; + if (active) *active = 0; - uel= BLI_findlink(&undobase, nr); + uel = BLI_findlink(&undobase, nr); if (uel) { - if (active && uel==curundo) - *active= 1; + if (active && uel == curundo) + *active = 1; return uel->name; } return NULL; @@ -357,7 +357,7 @@ const char *undo_editmode_get_name(bContext *C, int nr, int *active) void *undo_editmode_get_prev(Object *ob) { - UndoElem *ue= undobase.last; - if (ue && ue->prev && ue->prev->ob==ob) return ue->prev->undodata; + UndoElem *ue = undobase.last; + if (ue && ue->prev && ue->prev->ob == ob) return ue->prev->undodata; return NULL; } diff --git a/source/blender/editors/util/numinput.c b/source/blender/editors/util/numinput.c index 1d9e053376a..c037508687b 100644 --- a/source/blender/editors/util/numinput.c +++ b/source/blender/editors/util/numinput.c @@ -30,8 +30,8 @@ */ -#include /* fabs */ -#include /* for size_t */ +#include /* fabs */ +#include /* for size_t */ #include "BLI_utildefines.h" #include "BLI_string.h" @@ -46,19 +46,19 @@ void initNumInput(NumInput *n) { - n->flag = - n->idx = - n->idx_max = + n->flag = + n->idx = + n->idx_max = n->inv[0] = n->inv[1] = n->inv[2] = - n->ctrl[0] = - n->ctrl[1] = - n->ctrl[2] = 0; + n->ctrl[0] = + n->ctrl[1] = + n->ctrl[2] = 0; - n->val[0] = - n->val[1] = - n->val[2] = 0.0f; + n->val[0] = + n->val[1] = + n->val[2] = 0.0f; } void outputNumInput(NumInput *n, char *str) @@ -67,7 +67,7 @@ void outputNumInput(NumInput *n, char *str) char inv[] = "1/"; short i, j; - for (j=0; j<=n->idx_max; j++) { + for (j = 0; j <= n->idx_max; j++) { /* if AFFECTALL and no number typed and cursor not on number, use first number */ if (n->flag & NUM_AFFECT_ALL && n->idx != j && n->ctrl[j] == 0) i = 0; @@ -84,35 +84,35 @@ void outputNumInput(NumInput *n, char *str) else inv[0] = 0; - if ( n->val[i] > 1e10f || n->val[i] < -1e10f ) - BLI_snprintf(&str[j*20], 20, "%s%.4e%c", inv, n->val[i], cur); + if (n->val[i] > 1e10f || n->val[i] < -1e10f) + BLI_snprintf(&str[j * 20], 20, "%s%.4e%c", inv, n->val[i], cur); else switch (n->ctrl[i]) { - case 0: - BLI_snprintf(&str[j*20], 20, "%sNONE%c", inv, cur); - break; - case 1: - case -1: - BLI_snprintf(&str[j*20], 20, "%s%.0f%c", inv, n->val[i], cur); - break; - case 10: - case -10: - BLI_snprintf(&str[j*20], 20, "%s%.f.%c", inv, n->val[i], cur); - break; - case 100: - case -100: - BLI_snprintf(&str[j*20], 20, "%s%.1f%c", inv, n->val[i], cur); - break; - case 1000: - case -1000: - BLI_snprintf(&str[j*20], 20, "%s%.2f%c", inv, n->val[i], cur); - break; - case 10000: - case -10000: - BLI_snprintf(&str[j*20], 20, "%s%.3f%c", inv, n->val[i], cur); - break; - default: - BLI_snprintf(&str[j*20], 20, "%s%.4e%c", inv, n->val[i], cur); + case 0: + BLI_snprintf(&str[j * 20], 20, "%sNONE%c", inv, cur); + break; + case 1: + case -1: + BLI_snprintf(&str[j * 20], 20, "%s%.0f%c", inv, n->val[i], cur); + break; + case 10: + case -10: + BLI_snprintf(&str[j * 20], 20, "%s%.f.%c", inv, n->val[i], cur); + break; + case 100: + case -100: + BLI_snprintf(&str[j * 20], 20, "%s%.1f%c", inv, n->val[i], cur); + break; + case 1000: + case -1000: + BLI_snprintf(&str[j * 20], 20, "%s%.2f%c", inv, n->val[i], cur); + break; + case 10000: + case -10000: + BLI_snprintf(&str[j * 20], 20, "%s%.3f%c", inv, n->val[i], cur); + break; + default: + BLI_snprintf(&str[j * 20], 20, "%s%.4e%c", inv, n->val[i], cur); } } } @@ -121,7 +121,7 @@ short hasNumInput(NumInput *n) { short i; - for (i=0; i<=n->idx_max; i++) { + for (i = 0; i <= n->idx_max; i++) { if (n->ctrl[i]) return 1; } @@ -134,7 +134,7 @@ void applyNumInput(NumInput *n, float *vec) short i, j; if (hasNumInput(n)) { - for (j=0; j<=n->idx_max; j++) { + for (j = 0; j <= n->idx_max; j++) { /* if AFFECTALL and no number typed and cursor not on number, use first number */ if (n->flag & NUM_AFFECT_ALL && n->idx != j && n->ctrl[j] == 0) i = 0; @@ -166,138 +166,138 @@ char handleNumInput(NumInput *n, wmEvent *event) if (event->type == EVT_MODAL_MAP) { switch (event->val) { - case NUM_MODAL_INCREMENT_UP: - if (!n->ctrl[idx]) - n->ctrl[idx] = 1; + case NUM_MODAL_INCREMENT_UP: + if (!n->ctrl[idx]) + n->ctrl[idx] = 1; - n->val[idx] += n->increment; - break; - case NUM_MODAL_INCREMENT_DOWN: - if (!n->ctrl[idx]) - n->ctrl[idx] = 1; + n->val[idx] += n->increment; + break; + case NUM_MODAL_INCREMENT_DOWN: + if (!n->ctrl[idx]) + n->ctrl[idx] = 1; - n->val[idx] -= n->increment; - break; - default: - return 0; + n->val[idx] -= n->increment; + break; + default: + return 0; } } else { switch (event->type) { - case BACKSPACEKEY: - if (n->ctrl[idx] == 0) { - n->val[0] = - n->val[1] = - n->val[2] = 0.0f; - n->ctrl[0] = - n->ctrl[1] = - n->ctrl[2] = 0; - n->inv[0] = - n->inv[1] = - n->inv[2] = 0; - } - else { - n->val[idx] = 0.0f; - n->ctrl[idx] = 0; - n->inv[idx] = 0; - } - break; - case PERIODKEY: - case PADPERIOD: - if (n->flag & NUM_NO_FRACTION) - return 0; - - switch (n->ctrl[idx]) - { - case 0: - case 1: - n->ctrl[idx] = 10; - break; - case -1: - n->ctrl[idx] = -10; - } - break; - case PADMINUS: - if (event->alt) + case BACKSPACEKEY: + if (n->ctrl[idx] == 0) { + n->val[0] = + n->val[1] = + n->val[2] = 0.0f; + n->ctrl[0] = + n->ctrl[1] = + n->ctrl[2] = 0; + n->inv[0] = + n->inv[1] = + n->inv[2] = 0; + } + else { + n->val[idx] = 0.0f; + n->ctrl[idx] = 0; + n->inv[idx] = 0; + } break; - case MINUSKEY: - if (n->flag & NUM_NO_NEGATIVE) + case PERIODKEY: + case PADPERIOD: + if (n->flag & NUM_NO_FRACTION) + return 0; + + switch (n->ctrl[idx]) + { + case 0: + case 1: + n->ctrl[idx] = 10; + break; + case -1: + n->ctrl[idx] = -10; + } break; + case PADMINUS: + if (event->alt) + break; + case MINUSKEY: + if (n->flag & NUM_NO_NEGATIVE) + break; - if (n->ctrl[idx]) { - n->ctrl[idx] *= -1; - n->val[idx] *= -1; - } - else - n->ctrl[idx] = -1; - break; - case PADSLASHKEY: - case SLASHKEY: - if (n->flag & NUM_NO_FRACTION) - return 0; + if (n->ctrl[idx]) { + n->ctrl[idx] *= -1; + n->val[idx] *= -1; + } + else + n->ctrl[idx] = -1; + break; + case PADSLASHKEY: + case SLASHKEY: + if (n->flag & NUM_NO_FRACTION) + return 0; - n->inv[idx] = !n->inv[idx]; - break; - case TABKEY: - if (idx_max == 0) - return 0; + n->inv[idx] = !n->inv[idx]; + break; + case TABKEY: + if (idx_max == 0) + return 0; - idx++; - if (idx > idx_max) - idx = 0; - n->idx = idx; - break; - case PAD9: - case NINEKEY: - Val += 1.0f; - case PAD8: - case EIGHTKEY: - Val += 1.0f; - case PAD7: - case SEVENKEY: - Val += 1.0f; - case PAD6: - case SIXKEY: - Val += 1.0f; - case PAD5: - case FIVEKEY: - Val += 1.0f; - case PAD4: - case FOURKEY: - Val += 1.0f; - case PAD3: - case THREEKEY: - Val += 1.0f; - case PAD2: - case TWOKEY: - Val += 1.0f; - case PAD1: - case ONEKEY: - Val += 1.0f; - case PAD0: - case ZEROKEY: - if (!n->ctrl[idx]) - n->ctrl[idx] = 1; + idx++; + if (idx > idx_max) + idx = 0; + n->idx = idx; + break; + case PAD9: + case NINEKEY: + Val += 1.0f; + case PAD8: + case EIGHTKEY: + Val += 1.0f; + case PAD7: + case SEVENKEY: + Val += 1.0f; + case PAD6: + case SIXKEY: + Val += 1.0f; + case PAD5: + case FIVEKEY: + Val += 1.0f; + case PAD4: + case FOURKEY: + Val += 1.0f; + case PAD3: + case THREEKEY: + Val += 1.0f; + case PAD2: + case TWOKEY: + Val += 1.0f; + case PAD1: + case ONEKEY: + Val += 1.0f; + case PAD0: + case ZEROKEY: + if (!n->ctrl[idx]) + n->ctrl[idx] = 1; - if (fabsf(n->val[idx]) > 9999999.0f); - else if (n->ctrl[idx] == 1) { - n->val[idx] *= 10; - n->val[idx] += Val; - } - else if (n->ctrl[idx] == -1) { - n->val[idx] *= 10; - n->val[idx] -= Val; - } - else { - /* float resolution breaks when over six digits after comma */ - if ( ABS(n->ctrl[idx]) < 10000000) { - n->val[idx] += Val / (float)n->ctrl[idx]; - n->ctrl[idx] *= 10; + if (fabsf(n->val[idx]) > 9999999.0f) ; + else if (n->ctrl[idx] == 1) { + n->val[idx] *= 10; + n->val[idx] += Val; } - } - break; - default: - return 0; + else if (n->ctrl[idx] == -1) { + n->val[idx] *= 10; + n->val[idx] -= Val; + } + else { + /* float resolution breaks when over six digits after comma */ + if (ABS(n->ctrl[idx]) < 10000000) { + n->val[idx] += Val / (float)n->ctrl[idx]; + n->ctrl[idx] *= 10; + } + } + break; + default: + return 0; } } diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c index 69dc1d1f1fb..62d761238e4 100644 --- a/source/blender/editors/util/undo.c +++ b/source/blender/editors/util/undo.c @@ -78,9 +78,9 @@ void ED_undo_push(bContext *C, const char *str) { - wmWindowManager *wm= CTX_wm_manager(C); - Object *obedit= CTX_data_edit_object(C); - Object *obact= CTX_data_active_object(C); + wmWindowManager *wm = CTX_wm_manager(C); + Object *obedit = CTX_data_edit_object(C); + Object *obact = CTX_data_active_object(C); if (G.f & G_DEBUG) printf("undo push %s\n", str); @@ -88,17 +88,17 @@ void ED_undo_push(bContext *C, const char *str) if (obedit) { if (U.undosteps == 0) return; - if (obedit->type==OB_MESH) + if (obedit->type == OB_MESH) undo_push_mesh(C, str); else if (ELEM(obedit->type, OB_CURVE, OB_SURF)) undo_push_curve(C, str); - else if (obedit->type==OB_FONT) + else if (obedit->type == OB_FONT) undo_push_font(C, str); - else if (obedit->type==OB_MBALL) + else if (obedit->type == OB_MBALL) undo_push_mball(C, str); - else if (obedit->type==OB_LATTICE) + else if (obedit->type == OB_LATTICE) undo_push_lattice(C, str); - else if (obedit->type==OB_ARMATURE) + else if (obedit->type == OB_ARMATURE) undo_push_armature(C, str); } else if (obact && obact->mode & OB_MODE_PARTICLE_EDIT) { @@ -112,18 +112,18 @@ void ED_undo_push(bContext *C, const char *str) } if (wm->file_saved) { - wm->file_saved= 0; + wm->file_saved = 0; /* notifier that data changed, for save-over warning or header */ - WM_event_add_notifier(C, NC_WM|ND_DATACHANGED, NULL); + WM_event_add_notifier(C, NC_WM | ND_DATACHANGED, NULL); } } /* note: also check undo_history_exec() in bottom if you change notifiers */ static int ed_undo_step(bContext *C, int step, const char *undoname) { - Object *obedit= CTX_data_edit_object(C); - Object *obact= CTX_data_active_object(C); - ScrArea *sa= CTX_wm_area(C); + Object *obedit = CTX_data_edit_object(C); + Object *obact = CTX_data_active_object(C); + ScrArea *sa = CTX_wm_area(C); /* undo during jobs are running can easily lead to freeing data using by jobs, * or they can just lead to freezing job in some other cases */ @@ -136,8 +136,8 @@ static int ed_undo_step(bContext *C, int step, const char *undoname) return ED_undo_gpencil_step(C, step, undoname); } - if (sa && sa->spacetype==SPACE_IMAGE) { - SpaceImage *sima= (SpaceImage *)sa->spacedata.first; + if (sa && sa->spacetype == SPACE_IMAGE) { + SpaceImage *sima = (SpaceImage *)sa->spacedata.first; if ((obact && obact->mode & OB_MODE_TEXTURE_PAINT) || sima->flag & SI_DRAWTOOL) { if (!ED_undo_paint_step(C, UNDO_PAINT_IMAGE, step, undoname) && undoname) @@ -149,7 +149,7 @@ static int ed_undo_step(bContext *C, int step, const char *undoname) } } - if (sa && sa->spacetype==SPACE_TEXT) { + if (sa && sa->spacetype == SPACE_TEXT) { ED_text_undo_step(C, step); } else if (obedit) { @@ -159,28 +159,28 @@ static int ed_undo_step(bContext *C, int step, const char *undoname) else undo_editmode_step(C, step); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, NULL); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, NULL); } } else { - int do_glob_undo= 0; + int do_glob_undo = 0; if (obact && obact->mode & OB_MODE_TEXTURE_PAINT) { if (!ED_undo_paint_step(C, UNDO_PAINT_IMAGE, step, undoname)) - do_glob_undo= 1; + do_glob_undo = 1; } else if (obact && obact->mode & OB_MODE_SCULPT) { if (!ED_undo_paint_step(C, UNDO_PAINT_MESH, step, undoname)) - do_glob_undo= 1; + do_glob_undo = 1; } else if (obact && obact->mode & OB_MODE_PARTICLE_EDIT) { - if (step==1) + if (step == 1) PE_undo(CTX_data_scene(C)); else PE_redo(CTX_data_scene(C)); } else { - do_glob_undo= 1; + do_glob_undo = 1; } if (do_glob_undo) { @@ -194,7 +194,7 @@ static int ed_undo_step(bContext *C, int step, const char *undoname) else BKE_undo_step(C, step); - WM_event_add_notifier(C, NC_SCENE|ND_LAYER_CONTENT, CTX_data_scene(C)); + WM_event_add_notifier(C, NC_SCENE | ND_LAYER_CONTENT, CTX_data_scene(C)); } } @@ -229,19 +229,19 @@ void ED_undo_pop_op(bContext *C, wmOperator *op) /* name optionally, function used to check for operator redo panel */ int ED_undo_valid(const bContext *C, const char *undoname) { - Object *obedit= CTX_data_edit_object(C); - Object *obact= CTX_data_active_object(C); - ScrArea *sa= CTX_wm_area(C); + Object *obedit = CTX_data_edit_object(C); + Object *obact = CTX_data_active_object(C); + ScrArea *sa = CTX_wm_area(C); - if (sa && sa->spacetype==SPACE_IMAGE) { - SpaceImage *sima= (SpaceImage *)sa->spacedata.first; + if (sa && sa->spacetype == SPACE_IMAGE) { + SpaceImage *sima = (SpaceImage *)sa->spacedata.first; if ((obact && obact->mode & OB_MODE_TEXTURE_PAINT) || sima->flag & SI_DRAWTOOL) { return 1; } } - if (sa && sa->spacetype==SPACE_TEXT) { + if (sa && sa->spacetype == SPACE_TEXT) { return 1; } else if (obedit) { @@ -254,11 +254,11 @@ int ED_undo_valid(const bContext *C, const char *undoname) /* if below tests fail, global undo gets executed */ if (obact && obact->mode & OB_MODE_TEXTURE_PAINT) { - if ( ED_undo_paint_valid(UNDO_PAINT_IMAGE, undoname) ) + if (ED_undo_paint_valid(UNDO_PAINT_IMAGE, undoname) ) return 1; } else if (obact && obact->mode & OB_MODE_SCULPT) { - if ( ED_undo_paint_valid(UNDO_PAINT_MESH, undoname) ) + if (ED_undo_paint_valid(UNDO_PAINT_MESH, undoname) ) return 1; } else if (obact && obact->mode & OB_MODE_PARTICLE_EDIT) { @@ -338,14 +338,14 @@ void ED_OT_redo(wmOperatorType *ot) /* ui callbacks should call this rather than calling WM_operator_repeat() themselves */ int ED_undo_operator_repeat(bContext *C, struct wmOperator *op) { - int ret= 0; + int ret = 0; if (op) { - wmWindowManager *wm= CTX_wm_manager(C); - struct Scene *scene= CTX_data_scene(C); + wmWindowManager *wm = CTX_wm_manager(C); + struct Scene *scene = CTX_data_scene(C); - ARegion *ar= CTX_wm_region(C); - ARegion *ar1= BKE_area_find_region_type(CTX_wm_area(C), RGN_TYPE_WINDOW); + ARegion *ar = CTX_wm_region(C); + ARegion *ar1 = BKE_area_find_region_type(CTX_wm_area(C), RGN_TYPE_WINDOW); if (ar1) CTX_wm_region_set(C, ar1); @@ -369,14 +369,14 @@ int ED_undo_operator_repeat(bContext *C, struct wmOperator *op) op->type->check(C, op); /* ignore return value since its running again anyway */ } - retval= WM_operator_repeat(C, op); - if ((retval & OPERATOR_FINISHED)==0) { + retval = WM_operator_repeat(C, op); + if ((retval & OPERATOR_FINISHED) == 0) { if (G.f & G_DEBUG) printf("redo_cb: operator redo failed: %s, return %d\n", op->type->name, retval); ED_undo_redo(C); } else { - ret= 1; + ret = 1; } } else { @@ -411,13 +411,13 @@ void ED_undo_operator_repeat_cb_evt(bContext *C, void *arg_op, int UNUSED(arg_ev /* ************************** */ -#define UNDOSYSTEM_GLOBAL 1 -#define UNDOSYSTEM_EDITMODE 2 -#define UNDOSYSTEM_PARTICLE 3 +#define UNDOSYSTEM_GLOBAL 1 +#define UNDOSYSTEM_EDITMODE 2 +#define UNDOSYSTEM_PARTICLE 3 static int get_undo_system(bContext *C) { - Object *obedit= CTX_data_edit_object(C); + Object *obedit = CTX_data_edit_object(C); /* find out which undo system */ if (obedit) { @@ -425,7 +425,7 @@ static int get_undo_system(bContext *C) return UNDOSYSTEM_EDITMODE; } else { - Object *obact= CTX_data_active_object(C); + Object *obact = CTX_data_active_object(C); if (obact && obact->mode & OB_MODE_PARTICLE_EDIT) return UNDOSYSTEM_PARTICLE; @@ -439,29 +439,29 @@ static int get_undo_system(bContext *C) /* create enum based on undo items */ static EnumPropertyItem *rna_undo_itemf(bContext *C, int undosys, int *totitem) { - EnumPropertyItem item_tmp= {0}, *item= NULL; - int active, i= 0; + EnumPropertyItem item_tmp = {0}, *item = NULL; + int active, i = 0; while (TRUE) { - const char *name= NULL; + const char *name = NULL; - if (undosys==UNDOSYSTEM_PARTICLE) { - name= PE_undo_get_name(CTX_data_scene(C), i, &active); + if (undosys == UNDOSYSTEM_PARTICLE) { + name = PE_undo_get_name(CTX_data_scene(C), i, &active); } - else if (undosys==UNDOSYSTEM_EDITMODE) { - name= undo_editmode_get_name(C, i, &active); + else if (undosys == UNDOSYSTEM_EDITMODE) { + name = undo_editmode_get_name(C, i, &active); } else { - name= BKE_undo_get_name(i, &active); + name = BKE_undo_get_name(i, &active); } if (name) { - item_tmp.identifier= item_tmp.name= name; + item_tmp.identifier = item_tmp.name = name; if (active) - item_tmp.icon= ICON_RESTRICT_VIEW_OFF; + item_tmp.icon = ICON_RESTRICT_VIEW_OFF; else - item_tmp.icon= ICON_NONE; - item_tmp.value= i++; + item_tmp.icon = ICON_NONE; + item_tmp.value = i++; RNA_enum_item_add(&item, totitem, &item_tmp); } else @@ -476,22 +476,22 @@ static EnumPropertyItem *rna_undo_itemf(bContext *C, int undosys, int *totitem) static int undo_history_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { - int undosys, totitem= 0; + int undosys, totitem = 0; - undosys= get_undo_system(C); + undosys = get_undo_system(C); if (undosys) { - EnumPropertyItem *item= rna_undo_itemf(C, undosys, &totitem); + EnumPropertyItem *item = rna_undo_itemf(C, undosys, &totitem); if (totitem > 0) { - uiPopupMenu *pup= uiPupMenuBegin(C, op->type->name, ICON_NONE); - uiLayout *layout= uiPupMenuLayout(pup); - uiLayout *split= uiLayoutSplit(layout, 0, 0), *column = NULL; + uiPopupMenu *pup = uiPupMenuBegin(C, op->type->name, ICON_NONE); + uiLayout *layout = uiPupMenuLayout(pup); + uiLayout *split = uiLayoutSplit(layout, 0, 0), *column = NULL; int i, c; - for (c=0, i=totitem-1; i >= 0; i--, c++) { - if ( (c % 20)==0 ) - column= uiLayoutColumn(split, 0); + for (c = 0, i = totitem - 1; i >= 0; i--, c++) { + if ( (c % 20) == 0) + column = uiLayoutColumn(split, 0); if (item[i].identifier) uiItemIntO(column, item[i].name, item[i].icon, op->type->idname, "item", item[i].value); @@ -510,19 +510,19 @@ static int undo_history_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even static int undo_history_exec(bContext *C, wmOperator *op) { if (RNA_struct_property_is_set(op->ptr, "item")) { - int undosys= get_undo_system(C); - int item= RNA_int_get(op->ptr, "item"); + int undosys = get_undo_system(C); + int item = RNA_int_get(op->ptr, "item"); - if (undosys==UNDOSYSTEM_PARTICLE) { + if (undosys == UNDOSYSTEM_PARTICLE) { PE_undo_number(CTX_data_scene(C), item); } - else if (undosys==UNDOSYSTEM_EDITMODE) { - undo_editmode_number(C, item+1); - WM_event_add_notifier(C, NC_GEOM|ND_DATA, NULL); + else if (undosys == UNDOSYSTEM_EDITMODE) { + undo_editmode_number(C, item + 1); + WM_event_add_notifier(C, NC_GEOM | ND_DATA, NULL); } else { BKE_undo_number(C, item); - WM_event_add_notifier(C, NC_SCENE|ND_LAYER_CONTENT, CTX_data_scene(C)); + WM_event_add_notifier(C, NC_SCENE | ND_LAYER_CONTENT, CTX_data_scene(C)); } WM_event_add_notifier(C, NC_WINDOW, NULL); -- cgit v1.2.3 From 81e3db364d589d747f17173b79490011d2a403f5 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 30 Mar 2012 10:37:39 +0000 Subject: Camera tracking refactoring: - Deduplicate patetrn sampling used in esm and lmicklt trackers and move SamplePattern to image/sample.h - Move computation of Pearson product-moment correlation into own function in new file image/correlation.h so all trackers can use it to check final correlation. - Remove SAD tracker. It's almost the same as brute tracker, with only two differences: 1. It does brute search of affine transformation which in some cases helps to track rotating features 2. It didn't use common tracker api which probably gave some speed advantage, but lead to a real headache to use it together with other trackers leading to duplicated code in blender side. - Switch blenedr to use brute tracker instead of sad tracker which tracking made source code much more simple to follow. --- source/blender/blenkernel/intern/tracking.c | 171 +++++----------------------- 1 file changed, 28 insertions(+), 143 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c index 350b30b34d3..0af8f2cf625 100644 --- a/source/blender/blenkernel/intern/tracking.c +++ b/source/blender/blenkernel/intern/tracking.c @@ -906,14 +906,8 @@ typedef struct TrackContext { #ifdef WITH_LIBMV float keyframed_pos[2]; - /* ** KLT tracker ** */ struct libmv_RegionTracker *region_tracker; float *patch; /* keyframed patch */ - - /* ** SAD tracker ** */ - int pattern_size; /* size of pattern */ - unsigned char *pattern; /* keyframed pattern */ - unsigned char *warped; /* warped version of reference */ #else int pad; #endif @@ -983,40 +977,37 @@ MovieTrackingContext *BKE_tracking_context_new(MovieClip *clip, MovieClipUser *u #ifdef WITH_LIBMV { - float patx, paty; - patx = (int)((track->pat_max[0]-track->pat_min[0])*width); - paty = (int)((track->pat_max[1]-track->pat_min[1])*height); - - if (ELEM(track->tracker, TRACKER_KLT, TRACKER_HYBRID)) { - float search_size_x = (track->search_max[0]-track->search_min[0])*width; - float search_size_y = (track->search_max[1]-track->search_min[1])*height; - float pattern_size_x = (track->pat_max[0]-track->pat_min[0])*width; - float pattern_size_y = (track->pat_max[1]-track->pat_min[1])*height; - int wndx = (int)patx / 2, wndy = (int)paty / 2; - int half_wnd = MAX2(wndx, wndy); + float patx = (int)((track->pat_max[0]-track->pat_min[0])*width), + paty = (int)((track->pat_max[1]-track->pat_min[1])*height); + + float search_size_x = (track->search_max[0]-track->search_min[0])*width; + float search_size_y = (track->search_max[1]-track->search_min[1])*height; + float pattern_size_x = (track->pat_max[0]-track->pat_min[0])*width; + float pattern_size_y = (track->pat_max[1]-track->pat_min[1])*height; + int wndx = (int)patx / 2, wndy = (int)paty / 2; + int half_wnd = MAX2(wndx, wndy); /* compute the maximum pyramid size */ - float search_to_pattern_ratio = MIN2(search_size_x, search_size_y) - / MAX2(pattern_size_x, pattern_size_y); - float log2_search_to_pattern_ratio = log(floor(search_to_pattern_ratio)) / M_LN2; - int max_pyramid_levels = floor(log2_search_to_pattern_ratio + 1); - - /* try to accommodate the user's choice of pyramid level in a way - * that doesn't cause the coarsest pyramid pattern to be larger - * than the search size */ - int level = MIN2(track->pyramid_levels, max_pyramid_levels); - - if (track->tracker==TRACKER_KLT) { - track_context.region_tracker = - libmv_pyramidRegionTrackerNew(100, level, half_wnd, track->minimum_correlation); - } - else { - track_context.region_tracker = - libmv_hybridRegionTrackerNew(100, half_wnd, track->minimum_correlation); - } + float search_to_pattern_ratio = MIN2(search_size_x, search_size_y) + / MAX2(pattern_size_x, pattern_size_y); + float log2_search_to_pattern_ratio = log(floor(search_to_pattern_ratio)) / M_LN2; + int max_pyramid_levels = floor(log2_search_to_pattern_ratio + 1); + + /* try to accommodate the user's choice of pyramid level in a way + * that doesn't cause the coarsest pyramid pattern to be larger + * than the search size */ + int level = MIN2(track->pyramid_levels, max_pyramid_levels); + + if (track->tracker==TRACKER_KLT) { + track_context.region_tracker = + libmv_pyramidRegionTrackerNew(100, level, half_wnd, track->minimum_correlation); + } + else if (track->tracker == TRACKER_HYBRID) { + track_context.region_tracker = + libmv_hybridRegionTrackerNew(100, half_wnd, track->minimum_correlation); } else if (track->tracker == TRACKER_SAD) { - track_context.pattern_size = MAX2(patx, paty); + track_context.region_tracker= libmv_bruteRegionTrackerNew(MAX2(wndx, wndy), track->minimum_correlation); } } #endif @@ -1062,11 +1053,6 @@ static void track_context_free(void *customdata) if (track_context->patch) MEM_freeN(track_context->patch); - if (track_context->pattern) - MEM_freeN(track_context->pattern); - - if (track_context->warped) - MEM_freeN(track_context->warped); #else (void) track_context; #endif @@ -1282,25 +1268,6 @@ static unsigned char *get_ucharbuf(ImBuf *ibuf) return pixels; } -static unsigned char *get_search_bytebuf(ImBuf *ibuf, MovieTrackingTrack *track, MovieTrackingMarker *marker, - int *width_r, int *height_r, float pos[2], int origin[2]) -{ - ImBuf *tmpibuf; - unsigned char *pixels; - - tmpibuf = BKE_tracking_get_search_imbuf(ibuf, track, marker, 0, 0, pos, origin); - disable_imbuf_channels(tmpibuf, track, FALSE /* don't grayscale */); - - *width_r = tmpibuf->x; - *height_r = tmpibuf->y; - - pixels = get_ucharbuf(tmpibuf); - - IMB_freeImBuf(tmpibuf); - - return pixels; -} - static ImBuf *get_frame_ibuf(MovieTrackingContext *context, int framenr) { ImBuf *ibuf; @@ -1367,18 +1334,6 @@ static ImBuf *get_adjust_ibuf(MovieTrackingContext *context, MovieTrackingTrack return ibuf; } -static void get_warped(TrackContext *track_context, int x, int y, int width, unsigned char *image) -{ - int i, j; - - for (i = 0; i < track_context->pattern_size; i++) { - for (j = 0; j < track_context->pattern_size; j++) { - track_context->warped[i * track_context->pattern_size + j] = - image[(y + i - track_context->pattern_size / 2) * width + x + j - track_context->pattern_size / 2]; - } - } -} - #endif void BKE_tracking_sync(MovieTrackingContext *context) @@ -1464,7 +1419,7 @@ int BKE_tracking_next(MovieTrackingContext *context) { onbound = TRUE; } - else if (ELEM(track->tracker, TRACKER_KLT, TRACKER_HYBRID)) { + else { float *patch_new; if (need_readjust) { @@ -1493,76 +1448,6 @@ int BKE_tracking_next(MovieTrackingContext *context) MEM_freeN(patch_new); } - else if (track->tracker == TRACKER_SAD) { - unsigned char *image_new; - float correlation; - float warp[3][2] = {{0}}; - - if (need_readjust) { - unsigned char *image; - - /* calculate pattern for keyframed position */ - ibuf = get_adjust_ibuf(context, track, marker, curfra, &marker_keyed); - - image = get_search_bytebuf(ibuf, track, marker_keyed, &width, &height, pos, origin); - - memset(warp, 0, sizeof(warp)); - warp[0][0] = 1; - warp[1][1] = 1; - warp[2][0] = pos[0]; - warp[2][1] = pos[1]; - - if (!track_context->pattern) { - int square = track_context->pattern_size*track_context->pattern_size; - - track_context->pattern = MEM_callocN(sizeof(unsigned char) * square, "trackking pattern"); - } - - libmv_SADSamplePattern(image, width, warp, track_context->pattern, track_context->pattern_size); - - MEM_freeN(image); - IMB_freeImBuf(ibuf); - } - - image_new = get_search_bytebuf(ibuf_new, track, marker, &width, &height, pos, origin); - - if (track_context->warped == NULL) { - unsigned char *image_old; - - ibuf = get_frame_ibuf(context, curfra); - - if (track_context->warped == NULL) { - int square = track_context->pattern_size * track_context->pattern_size; - - track_context->warped = MEM_callocN(sizeof(unsigned char)*square, "trackking warped"); - } - - image_old = get_search_bytebuf(ibuf, track, marker, &width, &height, pos, origin); - get_warped(track_context, pos[0], pos[1], width, image_old); - IMB_freeImBuf(ibuf); - MEM_freeN(image_old); - } - - memset(warp, 0, sizeof(warp)); - warp[0][0] = 1; - warp[1][1] = 1; - warp[2][0] = pos[0]; - warp[2][1] = pos[1]; - - correlation = libmv_SADTrackerTrack(track_context->pattern, track_context->warped, - track_context->pattern_size, image_new, - width, width, height, warp); - - x2 = warp[2][0]; - y2 = warp[2][1]; - - tracked = track->minimum_correlation < correlation; - - if (tracked) - get_warped(track_context, x2, y2, width, image_new); - - MEM_freeN(image_new); - } if (tracked && !onbound && finite(x2) && finite(y2)) { if (context->first_time) { -- cgit v1.2.3 From 785373b03abd7bfd258a50a0f274c81229fbf98a Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 30 Mar 2012 10:37:49 +0000 Subject: Added new command-line arguments --debug-ffmpeg and --debug-libmv to be able to see debug prints coming from FFmpeg or libmv independently of general blender debug messages. --- source/blender/blenkernel/BKE_global.h | 1 + source/blender/blenkernel/intern/blender.c | 2 +- source/blender/imbuf/intern/util.c | 3 +-- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h index fab42b5667b..80c9244d232 100644 --- a/source/blender/blenkernel/BKE_global.h +++ b/source/blender/blenkernel/BKE_global.h @@ -107,6 +107,7 @@ typedef struct Global { #define G_DEBUG (1 << 12) #define G_SCRIPT_AUTOEXEC (1 << 13) #define G_SCRIPT_OVERRIDE_PREF (1 << 14) /* when this flag is set ignore the userprefs */ +#define G_DEBUG_FFMPEG (1 << 15) /* #define G_NOFROZEN (1 << 17) also removed */ /* #define G_GREASEPENCIL (1 << 17) also removed */ diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c index b8df30c5de9..bb52af86e00 100644 --- a/source/blender/blenkernel/intern/blender.c +++ b/source/blender/blenkernel/intern/blender.c @@ -281,7 +281,7 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, const char *filepath /* special cases, override loaded flags: */ if (G.f != bfd->globalf) { - const int flags_keep= (G_DEBUG | G_SWAP_EXCHANGE | G_SCRIPT_AUTOEXEC | G_SCRIPT_OVERRIDE_PREF); + const int flags_keep= (G_DEBUG | G_DEBUG_FFMPEG | G_SWAP_EXCHANGE | G_SCRIPT_AUTOEXEC | G_SCRIPT_OVERRIDE_PREF); bfd->globalf= (bfd->globalf & ~flags_keep) | (G.f & flags_keep); } diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c index 008be2fde74..c21c58a114a 100644 --- a/source/blender/imbuf/intern/util.c +++ b/source/blender/imbuf/intern/util.c @@ -231,8 +231,7 @@ void do_init_ffmpeg(void) ffmpeg_init = 1; av_register_all(); avdevice_register_all(); - - if ((G.f & G_DEBUG) == 0) { + if ((G.f & G_DEBUG_FFMPEG) == 0) { silence_log_ffmpeg(1); } else { -- cgit v1.2.3 From 89b83f00608dfb2a7750476035f0635885473d21 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 30 Mar 2012 11:35:58 +0000 Subject: patch to add __deepcopy__ to mathutils types, this is no different to __copy__, except some py utilities expect __deepcopy__ to exist, so better have them. --- source/blender/python/mathutils/mathutils.c | 7 +++++++ source/blender/python/mathutils/mathutils.h | 1 + source/blender/python/mathutils/mathutils_Color.c | 9 ++++++++- source/blender/python/mathutils/mathutils_Euler.c | 9 ++++++++- source/blender/python/mathutils/mathutils_Matrix.c | 8 ++++++++ source/blender/python/mathutils/mathutils_Quaternion.c | 10 +++++++++- source/blender/python/mathutils/mathutils_Vector.c | 8 ++++++++ 7 files changed, 49 insertions(+), 3 deletions(-) (limited to 'source/blender') diff --git a/source/blender/python/mathutils/mathutils.c b/source/blender/python/mathutils/mathutils.c index 5d3de702fb4..5f9e68f07d8 100644 --- a/source/blender/python/mathutils/mathutils.c +++ b/source/blender/python/mathutils/mathutils.c @@ -282,6 +282,13 @@ PyObject *mathutils_dynstr_to_py(struct DynStr *ds) return ret; } +/* silly function, we dont use arg. just check its compatible with __deepcopy__ */ +int mathutils_deepcopy_args_check(PyObject *args) +{ + PyObject *dummy_pydict; + return PyArg_ParseTuple(args, "|O!:__deepcopy__", &PyDict_Type, &dummy_pydict) != 0; +} + /* Mathutils Callbacks */ /* for mathutils internal use only, eventually should re-alloc but to start with we only have a few users */ diff --git a/source/blender/python/mathutils/mathutils.h b/source/blender/python/mathutils/mathutils.h index 75ea18c2df1..b98928eb79d 100644 --- a/source/blender/python/mathutils/mathutils.h +++ b/source/blender/python/mathutils/mathutils.h @@ -124,5 +124,6 @@ int column_vector_multiplication(float rvec[4], VectorObject *vec, MatrixObject /* dynstr as python string utility funcions */ PyObject *mathutils_dynstr_to_py(struct DynStr *ds); +int mathutils_deepcopy_args_check(PyObject *args); #endif /* __MATHUTILS_H__ */ diff --git a/source/blender/python/mathutils/mathutils_Color.c b/source/blender/python/mathutils/mathutils_Color.c index 3b60d6655d6..9b06214b8ec 100644 --- a/source/blender/python/mathutils/mathutils_Color.c +++ b/source/blender/python/mathutils/mathutils_Color.c @@ -107,6 +107,12 @@ static PyObject *Color_copy(ColorObject *self) return Color_CreatePyObject(self->col, Py_NEW, Py_TYPE(self)); } +static PyObject *Color_deepcopy(ColorObject *self, PyObject *args) +{ + if (!mathutils_deepcopy_args_check(args)) + return NULL; + return Color_copy(self); +} //----------------------------print object (internal)-------------- //print the object to screen @@ -789,8 +795,9 @@ static PyGetSetDef Color_getseters[] = { //-----------------------METHOD DEFINITIONS ---------------------- static struct PyMethodDef Color_methods[] = { - {"__copy__", (PyCFunction) Color_copy, METH_NOARGS, Color_copy_doc}, {"copy", (PyCFunction) Color_copy, METH_NOARGS, Color_copy_doc}, + {"__copy__", (PyCFunction) Color_copy, METH_NOARGS, Color_copy_doc}, + {"__deepcopy__", (PyCFunction) Color_deepcopy, METH_VARARGS, Color_copy_doc}, {NULL, NULL, 0, NULL} }; diff --git a/source/blender/python/mathutils/mathutils_Euler.c b/source/blender/python/mathutils/mathutils_Euler.c index ecd0cee03b5..4e3b5f8d52e 100644 --- a/source/blender/python/mathutils/mathutils_Euler.c +++ b/source/blender/python/mathutils/mathutils_Euler.c @@ -299,6 +299,12 @@ static PyObject *Euler_copy(EulerObject *self) return Euler_CreatePyObject(self->eul, self->order, Py_NEW, Py_TYPE(self)); } +static PyObject *Euler_deepcopy(EulerObject *self, PyObject *args) +{ + if (!mathutils_deepcopy_args_check(args)) + return NULL; + return Euler_copy(self); +} //----------------------------print object (internal)-------------- //print the object to screen @@ -632,8 +638,9 @@ static struct PyMethodDef Euler_methods[] = { {"rotate_axis", (PyCFunction) Euler_rotate_axis, METH_VARARGS, Euler_rotate_axis_doc}, {"rotate", (PyCFunction) Euler_rotate, METH_O, Euler_rotate_doc}, {"make_compatible", (PyCFunction) Euler_make_compatible, METH_O, Euler_make_compatible_doc}, - {"__copy__", (PyCFunction) Euler_copy, METH_NOARGS, Euler_copy_doc}, {"copy", (PyCFunction) Euler_copy, METH_NOARGS, Euler_copy_doc}, + {"__copy__", (PyCFunction) Euler_copy, METH_NOARGS, Euler_copy_doc}, + {"__deepcopy__", (PyCFunction) Euler_deepcopy, METH_VARARGS, Euler_copy_doc}, {NULL, NULL, 0, NULL} }; diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c index 472933fab57..4079d69b87d 100644 --- a/source/blender/python/mathutils/mathutils_Matrix.c +++ b/source/blender/python/mathutils/mathutils_Matrix.c @@ -44,6 +44,7 @@ typedef enum eMatrixAccess_t { } eMatrixAccess_t; static PyObject *Matrix_copy(MatrixObject *self); +static PyObject *Matrix_deepcopy(MatrixObject *self, PyObject *args); static int Matrix_ass_slice(MatrixObject *self, int begin, int end, PyObject *value); static PyObject *matrix__apply_to_copy(PyNoArgsFunction matrix_func, MatrixObject *self); static PyObject *MatrixAccess_CreatePyObject(MatrixObject *matrix, const eMatrixAccess_t type); @@ -1519,6 +1520,12 @@ static PyObject *Matrix_copy(MatrixObject *self) return Matrix_CreatePyObject((float (*))self->matrix, self->num_col, self->num_row, Py_NEW, Py_TYPE(self)); } +static PyObject *Matrix_deepcopy(MatrixObject *self, PyObject *args) +{ + if (!mathutils_deepcopy_args_check(args)) + return NULL; + return Matrix_copy(self); +} /*----------------------------print object (internal)-------------*/ /* print the object to screen */ @@ -2269,6 +2276,7 @@ static struct PyMethodDef Matrix_methods[] = { {"lerp", (PyCFunction) Matrix_lerp, METH_VARARGS, Matrix_lerp_doc}, {"copy", (PyCFunction) Matrix_copy, METH_NOARGS, Matrix_copy_doc}, {"__copy__", (PyCFunction) Matrix_copy, METH_NOARGS, Matrix_copy_doc}, + {"__deepcopy__", (PyCFunction) Matrix_deepcopy, METH_VARARGS, Matrix_copy_doc}, /* class methods */ {"Identity", (PyCFunction) C_Matrix_Identity, METH_VARARGS | METH_CLASS, C_Matrix_Identity_doc}, diff --git a/source/blender/python/mathutils/mathutils_Quaternion.c b/source/blender/python/mathutils/mathutils_Quaternion.c index da27c7a57bb..2a1cef5a241 100644 --- a/source/blender/python/mathutils/mathutils_Quaternion.c +++ b/source/blender/python/mathutils/mathutils_Quaternion.c @@ -42,6 +42,7 @@ static PyObject *quat__apply_to_copy(PyNoArgsFunction quat_func, QuaternionObject *self); static void quat__axis_angle_sanitize(float axis[3], float *angle); static PyObject *Quaternion_copy(QuaternionObject *self); +static PyObject *Quaternion_deepcopy(QuaternionObject *self, PyObject *args); //-----------------------------METHODS------------------------------ @@ -478,6 +479,12 @@ static PyObject *Quaternion_copy(QuaternionObject *self) return Quaternion_CreatePyObject(self->quat, Py_NEW, Py_TYPE(self)); } +static PyObject *Quaternion_deepcopy(QuaternionObject *self, PyObject *args) +{ + if (!mathutils_deepcopy_args_check(args)) + return NULL; + return Quaternion_copy(self); +} //----------------------------print object (internal)-------------- //print the object to screen @@ -1157,8 +1164,9 @@ static struct PyMethodDef Quaternion_methods[] = { {"slerp", (PyCFunction) Quaternion_slerp, METH_VARARGS, Quaternion_slerp_doc}, {"rotate", (PyCFunction) Quaternion_rotate, METH_O, Quaternion_rotate_doc}, - {"__copy__", (PyCFunction) Quaternion_copy, METH_NOARGS, Quaternion_copy_doc}, {"copy", (PyCFunction) Quaternion_copy, METH_NOARGS, Quaternion_copy_doc}, + {"__copy__", (PyCFunction) Quaternion_copy, METH_NOARGS, Quaternion_copy_doc}, + {"__deepcopy__", (PyCFunction) Quaternion_deepcopy, METH_VARARGS, Quaternion_copy_doc}, {NULL, NULL, 0, NULL} }; diff --git a/source/blender/python/mathutils/mathutils_Vector.c b/source/blender/python/mathutils/mathutils_Vector.c index fbf30bcb387..17fa9cdd802 100644 --- a/source/blender/python/mathutils/mathutils_Vector.c +++ b/source/blender/python/mathutils/mathutils_Vector.c @@ -47,6 +47,7 @@ #define SWIZZLE_AXIS 0x3 static PyObject *Vector_copy(VectorObject *self); +static PyObject *Vector_deepcopy(VectorObject *self, PyObject *args); static PyObject *Vector_to_tuple_ext(VectorObject *self, int ndigits); static int row_vector_multiplication(float rvec[MAX_DIMENSIONS], VectorObject *vec, MatrixObject *mat); @@ -1211,6 +1212,12 @@ static PyObject *Vector_copy(VectorObject *self) return Vector_CreatePyObject(self->vec, self->size, Py_NEW, Py_TYPE(self)); } +static PyObject *Vector_deepcopy(VectorObject *self, PyObject *args) +{ + if (!mathutils_deepcopy_args_check(args)) + return NULL; + return Vector_copy(self); +} static PyObject *Vector_repr(VectorObject *self) { @@ -2767,6 +2774,7 @@ static struct PyMethodDef Vector_methods[] = { {"copy", (PyCFunction) Vector_copy, METH_NOARGS, Vector_copy_doc}, {"__copy__", (PyCFunction) Vector_copy, METH_NOARGS, NULL}, + {"__deepcopy__", (PyCFunction) Vector_deepcopy, METH_VARARGS, NULL}, {NULL, NULL, 0, NULL} }; -- cgit v1.2.3 From 55c210b57ed803d8f6fd16132e44c9c272703af1 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Fri, 30 Mar 2012 13:04:29 +0000 Subject: Fix [#30709] Renaming a bone renames all drivers' targets using a bone of that name, regardless of the armature. This fix adds a "ref_id" ID pointer to BKE_all_animdata_fix_paths_rename() & co, which is the ID against which prefix+oldName/NewName is "applied", currently only used for drivers' bones targets. Just pass NULL to get same behavior as previously. A bit annoying to make such a change for such a specific case, but there seems to be no other way to go... :/ --- source/blender/blenkernel/BKE_animsys.h | 6 ++++-- source/blender/blenkernel/intern/anim_sys.c | 19 +++++++++++-------- source/blender/blenkernel/intern/sequencer.c | 2 +- source/blender/editors/armature/editarmature.c | 5 ++++- source/blender/editors/render/render_shading.c | 12 ++++++------ source/blender/makesrna/intern/rna_constraint.c | 2 +- source/blender/makesrna/intern/rna_key.c | 2 +- source/blender/makesrna/intern/rna_modifier.c | 2 +- source/blender/makesrna/intern/rna_nodetree.c | 2 +- source/blender/makesrna/intern/rna_sequencer.c | 4 ++-- 10 files changed, 32 insertions(+), 24 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/BKE_animsys.h b/source/blender/blenkernel/BKE_animsys.h index 59dc2f2fc70..e648523aec3 100644 --- a/source/blender/blenkernel/BKE_animsys.h +++ b/source/blender/blenkernel/BKE_animsys.h @@ -105,10 +105,12 @@ void BKE_keyingsets_free(struct ListBase *list); /* Path Fixing API */ /* Fix all the paths for the given ID+AnimData */ -void BKE_animdata_fix_paths_rename(struct ID *owner_id, struct AnimData *adt, const char *prefix, const char *oldName, const char *newName, int oldSubscript, int newSubscript, int verify_paths); +void BKE_animdata_fix_paths_rename(struct ID *owner_id, struct AnimData *adt, struct ID *ref_id, const char *prefix, + const char *oldName, const char *newName, int oldSubscript, int newSubscript, + int verify_paths); /* Fix all the paths for the entire database... */ -void BKE_all_animdata_fix_paths_rename(const char *prefix, const char *oldName, const char *newName); +void BKE_all_animdata_fix_paths_rename(ID *ref_id, const char *prefix, const char *oldName, const char *newName); /* -------------------------------------- */ diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index fd3fb6815f0..552c4c4e82b 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -45,6 +45,7 @@ #include "DNA_anim_types.h" #include "DNA_lamp_types.h" #include "DNA_material_types.h" +#include "DNA_object_types.h" #include "DNA_scene_types.h" #include "DNA_texture_types.h" #include "DNA_world_types.h" @@ -632,7 +633,8 @@ static void fcurves_path_rename_fix (ID *owner_id, const char *prefix, char *old } /* Check RNA-Paths for a list of Drivers */ -static void drivers_path_rename_fix (ID *owner_id, const char *prefix, const char *oldName, const char *newName, const char *oldKey, const char *newKey, ListBase *curves, int verify_paths) +static void drivers_path_rename_fix(ID *owner_id, ID *ref_id, const char *prefix, const char *oldName, const char *newName, + const char *oldKey, const char *newKey, ListBase *curves, int verify_paths) { FCurve *fcu; @@ -658,7 +660,7 @@ static void drivers_path_rename_fix (ID *owner_id, const char *prefix, const cha /* also fix the bone-name (if applicable) */ if (strstr(prefix, "bones")) { - if ( ((dtar->id) && (GS(dtar->id->name) == ID_OB)) && + if ( ((dtar->id) && (GS(dtar->id->name) == ID_OB) && (!ref_id || ((Object*)(dtar->id))->data == ref_id)) && (dtar->pchan_name[0]) && (strcmp(oldName, dtar->pchan_name)==0) ) { BLI_strncpy(dtar->pchan_name, newName, sizeof(dtar->pchan_name)); @@ -692,7 +694,8 @@ static void nlastrips_path_rename_fix (ID *owner_id, const char *prefix, char *o * NOTE: it is assumed that the structure we're replacing is <["><"]> * i.e. pose.bones["Bone"] */ -void BKE_animdata_fix_paths_rename (ID *owner_id, AnimData *adt, const char *prefix, const char *oldName, const char *newName, int oldSubscript, int newSubscript, int verify_paths) +void BKE_animdata_fix_paths_rename(ID *owner_id, AnimData *adt, ID *ref_id, const char *prefix, const char *oldName, + const char *newName, int oldSubscript, int newSubscript, int verify_paths) { NlaTrack *nlt; char *oldN, *newN; @@ -718,7 +721,7 @@ void BKE_animdata_fix_paths_rename (ID *owner_id, AnimData *adt, const char *pre fcurves_path_rename_fix(owner_id, prefix, oldN, newN, &adt->tmpact->curves, verify_paths); /* Drivers - Drivers are really F-Curves */ - drivers_path_rename_fix(owner_id, prefix, oldName, newName, oldN, newN, &adt->drivers, verify_paths); + drivers_path_rename_fix(owner_id, ref_id, prefix, oldName, newName, oldN, newN, &adt->drivers, verify_paths); /* NLA Data - Animation Data for Strips */ for (nlt= adt->nla_tracks.first; nlt; nlt= nlt->next) @@ -812,7 +815,7 @@ void BKE_animdata_main_cb (Main *mainptr, ID_AnimData_Edit_Callback func, void * * i.e. pose.bones["Bone"] */ /* TODO: use BKE_animdata_main_cb for looping over all data */ -void BKE_all_animdata_fix_paths_rename (const char *prefix, const char *oldName, const char *newName) +void BKE_all_animdata_fix_paths_rename(ID *ref_id, const char *prefix, const char *oldName, const char *newName) { Main *mainptr= G.main; ID *id; @@ -824,7 +827,7 @@ void BKE_all_animdata_fix_paths_rename (const char *prefix, const char *oldName, #define RENAMEFIX_ANIM_IDS(first) \ for (id= first; id; id= id->next) { \ AnimData *adt= BKE_animdata_from_id(id); \ - BKE_animdata_fix_paths_rename(id, adt, prefix, oldName, newName, 0, 0, 1);\ + BKE_animdata_fix_paths_rename(id, adt, ref_id, prefix, oldName, newName, 0, 0, 1);\ } /* another version of this macro for nodetrees */ @@ -834,9 +837,9 @@ void BKE_all_animdata_fix_paths_rename (const char *prefix, const char *oldName, NtId_Type *ntp= (NtId_Type *)id; \ if (ntp->nodetree) { \ AnimData *adt2= BKE_animdata_from_id((ID *)ntp); \ - BKE_animdata_fix_paths_rename((ID *)ntp, adt2, prefix, oldName, newName, 0, 0, 1);\ + BKE_animdata_fix_paths_rename((ID *)ntp, adt2, ref_id, prefix, oldName, newName, 0, 0, 1);\ } \ - BKE_animdata_fix_paths_rename(id, adt, prefix, oldName, newName, 0, 0, 1);\ + BKE_animdata_fix_paths_rename(id, adt, ref_id, prefix, oldName, newName, 0, 0, 1);\ } /* nodes */ diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 9cd50e18233..10cc64890b9 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -3589,7 +3589,7 @@ void seq_dupe_animdata(Scene *scene, const char *name_src, const char *name_dst) } /* notice validate is 0, keep this because the seq may not be added to the scene yet */ - BKE_animdata_fix_paths_rename(&scene->id, scene->adt, "sequence_editor.sequences_all", name_src, name_dst, 0, 0, 0); + BKE_animdata_fix_paths_rename(&scene->id, scene->adt, NULL, "sequence_editor.sequences_all", name_src, name_dst, 0, 0, 0); /* add the original fcurves back */ BLI_movelisttolist(&scene->adt->action->curves, &lb); diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index 2211e6929a2..0d93f9401a3 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -5393,7 +5393,10 @@ void ED_armature_bone_rename(bArmature *arm, const char *oldnamep, const char *n /* Fix all animdata that may refer to this bone - we can't just do the ones attached to objects, since * other ID-blocks may have drivers referring to this bone [#29822] */ - BKE_all_animdata_fix_paths_rename("pose.bones", oldname, newname); + { + + BKE_all_animdata_fix_paths_rename(&arm->id, "pose.bones", oldname, newname); + } /* correct view locking */ { diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index 6e2a83c13bb..14f7e337f91 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -588,9 +588,9 @@ static int texture_slot_move(bContext *C, wmOperator *op) mtex_ar[act] = mtex_ar[act - 1]; mtex_ar[act - 1] = mtexswap; - BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, act - 1, -1, 0); - BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, act, act - 1, 0); - BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, -1, act, 0); + BKE_animdata_fix_paths_rename(id, adt, NULL, "texture_slots", NULL, NULL, act - 1, -1, 0); + BKE_animdata_fix_paths_rename(id, adt, NULL, "texture_slots", NULL, NULL, act, act - 1, 0); + BKE_animdata_fix_paths_rename(id, adt, NULL, "texture_slots", NULL, NULL, -1, act, 0); if (GS(id->name) == ID_MA) { Material *ma = (Material *)id; @@ -610,9 +610,9 @@ static int texture_slot_move(bContext *C, wmOperator *op) mtex_ar[act] = mtex_ar[act + 1]; mtex_ar[act + 1] = mtexswap; - BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, act + 1, -1, 0); - BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, act, act + 1, 0); - BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, -1, act, 0); + BKE_animdata_fix_paths_rename(id, adt, NULL, "texture_slots", NULL, NULL, act + 1, -1, 0); + BKE_animdata_fix_paths_rename(id, adt, NULL, "texture_slots", NULL, NULL, act, act + 1, 0); + BKE_animdata_fix_paths_rename(id, adt, NULL, "texture_slots", NULL, NULL, -1, act, 0); if (GS(id->name) == ID_MA) { Material *ma = (Material *)id; diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c index 8c219e94407..511239f6697 100644 --- a/source/blender/makesrna/intern/rna_constraint.c +++ b/source/blender/makesrna/intern/rna_constraint.c @@ -211,7 +211,7 @@ static void rna_Constraint_name_set(PointerRNA *ptr, const char *value) } /* fix all the animation data which may link to this */ - BKE_all_animdata_fix_paths_rename("constraints", oldname, con->name); + BKE_all_animdata_fix_paths_rename(NULL, "constraints", oldname, con->name); } static char *rna_Constraint_path(PointerRNA *ptr) diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c index 834a9fd18dd..e4ee67c746d 100644 --- a/source/blender/makesrna/intern/rna_key.c +++ b/source/blender/makesrna/intern/rna_key.c @@ -83,7 +83,7 @@ void rna_ShapeKey_name_set(PointerRNA *ptr, const char *value) } /* fix all the animation data which may link to this */ - BKE_all_animdata_fix_paths_rename("key_blocks", oldname, kb->name); + BKE_all_animdata_fix_paths_rename(NULL, "key_blocks", oldname, kb->name); } static void rna_ShapeKey_value_set(PointerRNA *ptr, float value) diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 1782d075c16..f170d7df6f0 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -227,7 +227,7 @@ void rna_Modifier_name_set(PointerRNA *ptr, const char *value) } /* fix all the animation data which may link to this */ - BKE_all_animdata_fix_paths_rename("modifiers", oldname, md->name); + BKE_all_animdata_fix_paths_rename(NULL, "modifiers", oldname, md->name); } static char *rna_Modifier_path(PointerRNA *ptr) diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index a583b1e5959..9b00e0e4fc3 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -401,7 +401,7 @@ static void rna_Node_name_set(PointerRNA *ptr, const char *value) nodeUniqueName(ntree, node); /* fix all the animation data which may link to this */ - BKE_all_animdata_fix_paths_rename("nodes", oldname, node->name); + BKE_all_animdata_fix_paths_rename(NULL, "nodes", oldname, node->name); } static void rna_NodeSocket_update(Main *bmain, Scene *scene, PointerRNA *ptr) diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c index 3491371ac06..2ed2f295cb6 100644 --- a/source/blender/makesrna/intern/rna_sequencer.c +++ b/source/blender/makesrna/intern/rna_sequencer.c @@ -378,10 +378,10 @@ static void rna_Sequence_name_set(PointerRNA *ptr, const char *value) /* fix all the animation data which may link to this */ /* don't rename everywhere because these are per scene */ - /* BKE_all_animdata_fix_paths_rename("sequence_editor.sequences_all", oldname, seq->name+2); */ + /* BKE_all_animdata_fix_paths_rename(NULL, "sequence_editor.sequences_all", oldname, seq->name+2); */ adt = BKE_animdata_from_id(&scene->id); if (adt) - BKE_animdata_fix_paths_rename(&scene->id, adt, "sequence_editor.sequences_all", oldname, seq->name+2, 0, 0, 1); + BKE_animdata_fix_paths_rename(&scene->id, adt, NULL, "sequence_editor.sequences_all", oldname, seq->name+2, 0, 0, 1); } static StructRNA* rna_Sequence_refine(struct PointerRNA *ptr) -- cgit v1.2.3 From 83ec6dd1bd574ad0102c4a9b8ec9a59294ff2c24 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Fri, 30 Mar 2012 13:49:32 +0000 Subject: Fix out-of-date slot type sizes. The BMO_OPSLOT_TYPEINFO array was out of date, the last two entries were off by one. Updated with correct values and added comments to make it easier to match up in future. Also changed the alloc string for mapping slot's ghash to something more descriptive than "bemsh op". --- source/blender/bmesh/intern/bmesh_operators.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'source/blender') diff --git a/source/blender/bmesh/intern/bmesh_operators.c b/source/blender/bmesh/intern/bmesh_operators.c index d658b9a5bf2..3c348b91f78 100644 --- a/source/blender/bmesh/intern/bmesh_operators.c +++ b/source/blender/bmesh/intern/bmesh_operators.c @@ -64,16 +64,17 @@ static const char *bmo_error_messages[] = { /* operator slot type information - size of one element of the type given. */ const int BMO_OPSLOT_TYPEINFO[BMO_OP_SLOT_TOTAL_TYPES] = { - 0, - sizeof(int), - sizeof(int), - sizeof(float), - sizeof(void *), - 0, /* unused */ - 0, /* unused */ - 0, /* unused */ - sizeof(void *), /* pointer buffer */ - sizeof(BMOElemMapping) + 0, /* 0: BMO_OP_SLOT_SENTINEL */ + sizeof(int), /* 1: BMO_OP_SLOT_BOOL */ + sizeof(int), /* 2: BMO_OP_SLOT_INT */ + sizeof(float), /* 3: BMO_OP_SLOT_FLT */ + sizeof(void *), /* 4: BMO_OP_SLOT_PNT */ + sizeof(void *), /* 5: BMO_OP_SLOT_PNT */ + 0, /* 6: unused */ + 0, /* 7: unused */ + sizeof(float) * 3, /* 8: BMO_OP_SLOT_VEC */ + sizeof(void *), /* 9: BMO_OP_SLOT_ELEMENT_BUF */ + sizeof(BMOElemMapping) /* 10: BMO_OP_SLOT_MAPPING */ }; /* Dummy slot so there is something to return when slot name lookup fails */ @@ -546,7 +547,7 @@ void BMO_slot_map_insert(BMesh *UNUSED(bm), BMOperator *op, const char *slotname if (!slot->data.ghash) { slot->data.ghash = BLI_ghash_new(BLI_ghashutil_ptrhash, - BLI_ghashutil_ptrcmp, "bmesh op"); + BLI_ghashutil_ptrcmp, "bmesh slot map hash"); } BLI_ghash_insert(slot->data.ghash, element, mapping); -- cgit v1.2.3 From 953af01d2ae4cc18789616edcb75454851ef4202 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 30 Mar 2012 16:08:48 +0000 Subject: Fix #30708: pressing escape in the color picker popup did not reset to the previous color. --- source/blender/editors/interface/interface_handlers.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source/blender') diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 4213a67130b..420cae87851 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -1014,9 +1014,14 @@ static void ui_apply_button(bContext *C, uiBlock *block, uiBut *but, uiHandleBut case ICONTEXTROW: case BLOCK: case PULLDOWN: - case COL: ui_apply_but_BLOCK(C, but, data); break; + case COL: + if(data->cancel) + ui_apply_but_VEC(C, but, data); + else + ui_apply_but_BLOCK(C, but, data); + break; case BUTM: ui_apply_but_BUTM(C, but, data); break; -- cgit v1.2.3 From f469e0652aa3152752845834477f2939c40f908d Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 30 Mar 2012 16:09:05 +0000 Subject: Node socket values now only have soft limits, rather than hard limits, so you can type in any value, and only when sliding the number value there is a limit. It was already possible to assign any value to a socket with node linking, so this shouldn't cause any new issues. Also raised the limits on the math nodes, with a patch by Agustin Benavidez. --- source/blender/makesrna/intern/makesrna.c | 8 ++-- source/blender/makesrna/intern/rna_access.c | 46 ++++++++++++++-------- source/blender/makesrna/intern/rna_action.c | 2 +- source/blender/makesrna/intern/rna_animation.c | 2 +- source/blender/makesrna/intern/rna_boid.c | 4 +- source/blender/makesrna/intern/rna_color.c | 8 ++-- source/blender/makesrna/intern/rna_constraint.c | 2 +- source/blender/makesrna/intern/rna_curve.c | 4 +- source/blender/makesrna/intern/rna_dynamicpaint.c | 2 +- source/blender/makesrna/intern/rna_fcurve.c | 18 ++++----- .../blender/makesrna/intern/rna_internal_types.h | 4 +- source/blender/makesrna/intern/rna_key.c | 14 +++---- source/blender/makesrna/intern/rna_material.c | 4 +- source/blender/makesrna/intern/rna_mesh.c | 2 +- source/blender/makesrna/intern/rna_mesh_utils.h | 3 +- source/blender/makesrna/intern/rna_modifier.c | 2 +- source/blender/makesrna/intern/rna_nodetree.c | 18 ++++----- source/blender/makesrna/intern/rna_object.c | 8 ++-- source/blender/makesrna/intern/rna_object_force.c | 4 +- source/blender/makesrna/intern/rna_particle.c | 6 +-- source/blender/makesrna/intern/rna_pose.c | 4 +- source/blender/makesrna/intern/rna_scene.c | 2 +- source/blender/makesrna/intern/rna_space.c | 2 +- source/blender/makesrna/intern/rna_tracking.c | 4 +- .../blender/nodes/shader/nodes/node_shader_math.c | 4 +- .../nodes/shader/nodes/node_shader_vectMath.c | 4 +- 26 files changed, 98 insertions(+), 83 deletions(-) (limited to 'source/blender') diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index 987d7c1ade2..6f73fc65151 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -687,15 +687,15 @@ static void rna_clamp_value_range(FILE *f, PropertyRNA *prop) if (prop->type == PROP_FLOAT) { FloatPropertyRNA *fprop = (FloatPropertyRNA*)prop; if (fprop->range) { - fprintf(f, " float prop_clamp_min, prop_clamp_max;\n"); - fprintf(f, " %s(ptr, &prop_clamp_min, &prop_clamp_max);\n", rna_function_string(fprop->range)); + fprintf(f, " float prop_clamp_min = -FLT_MAX, prop_clamp_max = FLT_MAX, prop_soft_min, prop_soft_max;\n"); + fprintf(f, " %s(ptr, &prop_clamp_min, &prop_clamp_max, &prop_soft_min, &prop_soft_max);\n", rna_function_string(fprop->range)); } } else if (prop->type == PROP_INT) { IntPropertyRNA *iprop = (IntPropertyRNA*)prop; if (iprop->range) { - fprintf(f, " int prop_clamp_min, prop_clamp_max;\n"); - fprintf(f, " %s(ptr, &prop_clamp_min, &prop_clamp_max);\n", rna_function_string(iprop->range)); + fprintf(f, " int prop_clamp_min = INT_MIN, prop_clamp_max = INT_MAX, prop_soft_min, prop_soft_max;\n"); + fprintf(f, " %s(ptr, &prop_clamp_min, &prop_clamp_max, &prop_soft_min, &prop_soft_max);\n", rna_function_string(iprop->range)); } } } diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index d2537f9fabd..d5363b33fe9 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -901,6 +901,7 @@ int RNA_property_array_item_index(PropertyRNA *prop, char name) void RNA_property_int_range(PointerRNA *ptr, PropertyRNA *prop, int *hardmin, int *hardmax) { IntPropertyRNA *iprop = (IntPropertyRNA*)rna_ensure_property(prop); + int softmin, softmax; if (prop->magic != RNA_MAGIC) { /* attempt to get the local ID values */ @@ -920,7 +921,10 @@ void RNA_property_int_range(PointerRNA *ptr, PropertyRNA *prop, int *hardmin, in } if (iprop->range) { - iprop->range(ptr, hardmin, hardmax); + *hardmin = INT_MIN; + *hardmax = INT_MAX; + + iprop->range(ptr, hardmin, hardmax, &softmin, &softmax); } else { *hardmin = iprop->hardmin; @@ -953,14 +957,17 @@ void RNA_property_int_ui_range(PointerRNA *ptr, PropertyRNA *prop, int *softmin, } } + *softmin = iprop->softmin; + *softmax = iprop->softmax; + if (iprop->range) { - iprop->range(ptr, &hardmin, &hardmax); - *softmin = MAX2(iprop->softmin, hardmin); - *softmax = MIN2(iprop->softmax, hardmax); - } - else { - *softmin = iprop->softmin; - *softmax = iprop->softmax; + hardmin = INT_MIN; + hardmax = INT_MAX; + + iprop->range(ptr, &hardmin, &hardmax, softmin, softmax); + + *softmin = MAX2(*softmin, hardmin); + *softmax = MIN2(*softmax, hardmax); } *step = iprop->step; @@ -969,6 +976,7 @@ void RNA_property_int_ui_range(PointerRNA *ptr, PropertyRNA *prop, int *softmin, void RNA_property_float_range(PointerRNA *ptr, PropertyRNA *prop, float *hardmin, float *hardmax) { FloatPropertyRNA *fprop = (FloatPropertyRNA*)rna_ensure_property(prop); + float softmin, softmax; if (prop->magic != RNA_MAGIC) { /* attempt to get the local ID values */ @@ -988,7 +996,10 @@ void RNA_property_float_range(PointerRNA *ptr, PropertyRNA *prop, float *hardmin } if (fprop->range) { - fprop->range(ptr, hardmin, hardmax); + *hardmin = -FLT_MAX; + *hardmax = FLT_MAX; + + fprop->range(ptr, hardmin, hardmax, &softmin, &softmax); } else { *hardmin = fprop->hardmin; @@ -1025,14 +1036,17 @@ void RNA_property_float_ui_range(PointerRNA *ptr, PropertyRNA *prop, float *soft } } + *softmin = fprop->softmin; + *softmax = fprop->softmax; + if (fprop->range) { - fprop->range(ptr, &hardmin, &hardmax); - *softmin = MAX2(fprop->softmin, hardmin); - *softmax = MIN2(fprop->softmax, hardmax); - } - else { - *softmin = fprop->softmin; - *softmax = fprop->softmax; + hardmin = -FLT_MAX; + hardmax = FLT_MAX; + + fprop->range(ptr, &hardmin, &hardmax, softmin, softmax); + + *softmin = MAX2(*softmin, hardmin); + *softmax = MIN2(*softmax, hardmax); } *step = fprop->step; diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c index fe729f1c44b..1159a1ba20e 100644 --- a/source/blender/makesrna/intern/rna_action.c +++ b/source/blender/makesrna/intern/rna_action.c @@ -180,7 +180,7 @@ static void rna_Action_active_pose_marker_index_set(PointerRNA *ptr, int value) act->active_marker = value+1; } -static void rna_Action_active_pose_marker_index_range(PointerRNA *ptr, int *min, int *max) +static void rna_Action_active_pose_marker_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax) { bAction *act = (bAction*)ptr->data; diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c index fce618228b3..94ea79099c2 100644 --- a/source/blender/makesrna/intern/rna_animation.c +++ b/source/blender/makesrna/intern/rna_animation.c @@ -321,7 +321,7 @@ static void rna_KeyingSet_active_ksPath_index_set(PointerRNA *ptr, int value) ks->active_path = value+1; } -static void rna_KeyingSet_active_ksPath_index_range(PointerRNA *ptr, int *min, int *max) +static void rna_KeyingSet_active_ksPath_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax) { KeyingSet *ks = (KeyingSet *)ptr->data; diff --git a/source/blender/makesrna/intern/rna_boid.c b/source/blender/makesrna/intern/rna_boid.c index 3767a019a62..1e77959a971 100644 --- a/source/blender/makesrna/intern/rna_boid.c +++ b/source/blender/makesrna/intern/rna_boid.c @@ -151,7 +151,7 @@ static PointerRNA rna_BoidState_active_boid_rule_get(PointerRNA *ptr) } return rna_pointer_inherit_refine(ptr, &RNA_BoidRule, NULL); } -static void rna_BoidState_active_boid_rule_index_range(PointerRNA *ptr, int *min, int *max) +static void rna_BoidState_active_boid_rule_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax) { BoidState *state = (BoidState*)ptr->data; *min = 0; @@ -217,7 +217,7 @@ static PointerRNA rna_BoidSettings_active_boid_state_get(PointerRNA *ptr) } return rna_pointer_inherit_refine(ptr, &RNA_BoidState, NULL); } -static void rna_BoidSettings_active_boid_state_index_range(PointerRNA *ptr, int *min, int *max) +static void rna_BoidSettings_active_boid_state_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax) { BoidSettings *boids = (BoidSettings*)ptr->data; *min = 0; diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c index 6ea59dc12e5..ed2283dedab 100644 --- a/source/blender/makesrna/intern/rna_color.c +++ b/source/blender/makesrna/intern/rna_color.c @@ -100,7 +100,7 @@ static void rna_CurveMapping_white_level_set(PointerRNA *ptr, const float *value curvemapping_set_black_white(cumap, NULL, NULL); } -static void rna_CurveMapping_clipminx_range(PointerRNA *ptr, float *min, float *max) +static void rna_CurveMapping_clipminx_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax) { CurveMapping *cumap = (CurveMapping*)ptr->data; @@ -108,7 +108,7 @@ static void rna_CurveMapping_clipminx_range(PointerRNA *ptr, float *min, float * *max = cumap->clipr.xmax; } -static void rna_CurveMapping_clipminy_range(PointerRNA *ptr, float *min, float *max) +static void rna_CurveMapping_clipminy_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax) { CurveMapping *cumap = (CurveMapping*)ptr->data; @@ -116,7 +116,7 @@ static void rna_CurveMapping_clipminy_range(PointerRNA *ptr, float *min, float * *max = cumap->clipr.ymax; } -static void rna_CurveMapping_clipmaxx_range(PointerRNA *ptr, float *min, float *max) +static void rna_CurveMapping_clipmaxx_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax) { CurveMapping *cumap = (CurveMapping*)ptr->data; @@ -124,7 +124,7 @@ static void rna_CurveMapping_clipmaxx_range(PointerRNA *ptr, float *min, float * *max = 100.0f; } -static void rna_CurveMapping_clipmaxy_range(PointerRNA *ptr, float *min, float *max) +static void rna_CurveMapping_clipmaxy_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax) { CurveMapping *cumap = (CurveMapping*)ptr->data; diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c index 511239f6697..6519b9ad5a0 100644 --- a/source/blender/makesrna/intern/rna_constraint.c +++ b/source/blender/makesrna/intern/rna_constraint.c @@ -307,7 +307,7 @@ static EnumPropertyItem *rna_Constraint_target_space_itemf(bContext *UNUSED(C), return space_object_items; } -static void rna_ActionConstraint_minmax_range(PointerRNA *ptr, float *min, float *max) +static void rna_ActionConstraint_minmax_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax) { bConstraint *con = (bConstraint*)ptr->data; bActionConstraint *acon = (bActionConstraint *)con->data; diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index 94ef3018812..17023e391a2 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -248,7 +248,7 @@ static void rna_Curve_texspace_size_set(PointerRNA *ptr, const float *values) copy_v3_v3(cu->size, values); } -static void rna_Curve_material_index_range(PointerRNA *ptr, int *min, int *max) +static void rna_Curve_material_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax) { Curve *cu = (Curve*)ptr->id.data; *min = 0; @@ -256,7 +256,7 @@ static void rna_Curve_material_index_range(PointerRNA *ptr, int *min, int *max) *max = MAX2(0, *max); } -static void rna_Curve_active_textbox_index_range(PointerRNA *ptr, int *min, int *max) +static void rna_Curve_active_textbox_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax) { Curve *cu = (Curve*)ptr->id.data; *min = 0; diff --git a/source/blender/makesrna/intern/rna_dynamicpaint.c b/source/blender/makesrna/intern/rna_dynamicpaint.c index 1e47965be15..b3e89a4e5f8 100644 --- a/source/blender/makesrna/intern/rna_dynamicpaint.c +++ b/source/blender/makesrna/intern/rna_dynamicpaint.c @@ -186,7 +186,7 @@ static void rna_Surface_active_point_index_set(struct PointerRNA *ptr, int value return; } -static void rna_Surface_active_point_range(PointerRNA *ptr, int *min, int *max) +static void rna_Surface_active_point_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax) { DynamicPaintCanvasSettings *canvas = (DynamicPaintCanvasSettings*)ptr->data; diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c index 2108daf23be..ac199e67a1b 100644 --- a/source/blender/makesrna/intern/rna_fcurve.c +++ b/source/blender/makesrna/intern/rna_fcurve.c @@ -453,7 +453,7 @@ static void rna_FModifier_active_set(PointerRNA *ptr, int UNUSED(value)) fm->flag |= FMODIFIER_FLAG_ACTIVE; } -static void rna_FModifier_start_frame_range(PointerRNA *ptr, float *min, float *max) +static void rna_FModifier_start_frame_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax) { FModifier *fcm = (FModifier*)ptr->data; @@ -461,7 +461,7 @@ static void rna_FModifier_start_frame_range(PointerRNA *ptr, float *min, float * *max = (fcm->flag & FMODIFIER_FLAG_RANGERESTRICT)? fcm->efra : MAXFRAMEF; } -static void rna_FModifier_end_frame_range(PointerRNA *ptr, float *min, float *max) +static void rna_FModifier_end_frame_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax) { FModifier *fcm = (FModifier*)ptr->data; @@ -469,7 +469,7 @@ static void rna_FModifier_end_frame_range(PointerRNA *ptr, float *min, float *ma *max = MAXFRAMEF; } -static void rna_FModifier_blending_range(PointerRNA *ptr, float *min, float *max) +static void rna_FModifier_blending_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax) { FModifier *fcm = (FModifier*)ptr->data; @@ -520,7 +520,7 @@ static void rna_FModifierGenerator_coefficients_set(PointerRNA *ptr, const float memcpy(gen->coefficients, values, gen->arraysize * sizeof(float)); } -static void rna_FModifierLimits_minx_range(PointerRNA *ptr, float *min, float *max) +static void rna_FModifierLimits_minx_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax) { FModifier *fcm = (FModifier*)ptr->data; FMod_Limits *data = fcm->data; @@ -529,7 +529,7 @@ static void rna_FModifierLimits_minx_range(PointerRNA *ptr, float *min, float *m *max = (data->flag & FCM_LIMIT_XMAX)? data->rect.xmax : MAXFRAMEF; } -static void rna_FModifierLimits_maxx_range(PointerRNA *ptr, float *min, float *max) +static void rna_FModifierLimits_maxx_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax) { FModifier *fcm = (FModifier*)ptr->data; FMod_Limits *data = fcm->data; @@ -538,7 +538,7 @@ static void rna_FModifierLimits_maxx_range(PointerRNA *ptr, float *min, float *m *max = MAXFRAMEF; } -static void rna_FModifierLimits_miny_range(PointerRNA *ptr, float *min, float *max) +static void rna_FModifierLimits_miny_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax) { FModifier *fcm = (FModifier*)ptr->data; FMod_Limits *data = fcm->data; @@ -547,7 +547,7 @@ static void rna_FModifierLimits_miny_range(PointerRNA *ptr, float *min, float *m *max = (data->flag & FCM_LIMIT_YMAX)? data->rect.ymax : FLT_MAX; } -static void rna_FModifierLimits_maxy_range(PointerRNA *ptr, float *min, float *max) +static void rna_FModifierLimits_maxy_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax) { FModifier *fcm = (FModifier*)ptr->data; FMod_Limits *data = fcm->data; @@ -557,7 +557,7 @@ static void rna_FModifierLimits_maxy_range(PointerRNA *ptr, float *min, float *m } -static void rna_FModifierStepped_start_frame_range(PointerRNA *ptr, float *min, float *max) +static void rna_FModifierStepped_start_frame_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax) { FModifier *fcm = (FModifier*)ptr->data; FMod_Stepped *data = fcm->data; @@ -566,7 +566,7 @@ static void rna_FModifierStepped_start_frame_range(PointerRNA *ptr, float *min, *max = (data->flag & FCM_STEPPED_NO_AFTER)? data->end_frame : MAXFRAMEF; } -static void rna_FModifierStepped_end_frame_range(PointerRNA *ptr, float *min, float *max) +static void rna_FModifierStepped_end_frame_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax) { FModifier *fcm = (FModifier*)ptr->data; FMod_Stepped *data = fcm->data; diff --git a/source/blender/makesrna/intern/rna_internal_types.h b/source/blender/makesrna/intern/rna_internal_types.h index 3fc6b0e4599..ccfb83b61e3 100644 --- a/source/blender/makesrna/intern/rna_internal_types.h +++ b/source/blender/makesrna/intern/rna_internal_types.h @@ -77,12 +77,12 @@ typedef int (*PropIntGetFunc)(struct PointerRNA *ptr); typedef void (*PropIntSetFunc)(struct PointerRNA *ptr, int value); typedef void (*PropIntArrayGetFunc)(struct PointerRNA *ptr, int *values); typedef void (*PropIntArraySetFunc)(struct PointerRNA *ptr, const int *values); -typedef void (*PropIntRangeFunc)(struct PointerRNA *ptr, int *min, int *max); +typedef void (*PropIntRangeFunc)(struct PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax); typedef float (*PropFloatGetFunc)(struct PointerRNA *ptr); typedef void (*PropFloatSetFunc)(struct PointerRNA *ptr, float value); typedef void (*PropFloatArrayGetFunc)(struct PointerRNA *ptr, float *values); typedef void (*PropFloatArraySetFunc)(struct PointerRNA *ptr, const float *values); -typedef void (*PropFloatRangeFunc)(struct PointerRNA *ptr, float *min, float *max); +typedef void (*PropFloatRangeFunc)(struct PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax); typedef void (*PropStringGetFunc)(struct PointerRNA *ptr, char *value); typedef int (*PropStringLengthFunc)(struct PointerRNA *ptr); typedef void (*PropStringSetFunc)(struct PointerRNA *ptr, const char *value); diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c index e4ee67c746d..304af04ec27 100644 --- a/source/blender/makesrna/intern/rna_key.c +++ b/source/blender/makesrna/intern/rna_key.c @@ -93,7 +93,7 @@ static void rna_ShapeKey_value_set(PointerRNA *ptr, float value) data->curval = value; } -static void rna_ShapeKey_value_range(PointerRNA *ptr, float *min, float *max) +static void rna_ShapeKey_value_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax) { KeyBlock *data = (KeyBlock*)ptr->data; @@ -104,7 +104,7 @@ static void rna_ShapeKey_value_range(PointerRNA *ptr, float *min, float *max) /* epsilon for how close one end of shapekey range can get to the other */ #define SHAPEKEY_SLIDER_TOL 0.001f -static void rna_ShapeKey_slider_min_range(PointerRNA *ptr, float *min, float *max) +static void rna_ShapeKey_slider_min_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax) { KeyBlock *data = (KeyBlock*)ptr->data; @@ -115,14 +115,14 @@ static void rna_ShapeKey_slider_min_range(PointerRNA *ptr, float *min, float *ma static void rna_ShapeKey_slider_min_set(PointerRNA *ptr, float value) { KeyBlock *data = (KeyBlock*)ptr->data; - float min, max; + float min, max, softmin, softmax; - rna_ShapeKey_slider_min_range(ptr, &min, &max); + rna_ShapeKey_slider_min_range(ptr, &min, &max, &softmin, &softmax); CLAMP(value, min, max); data->slidermin = value; } -static void rna_ShapeKey_slider_max_range(PointerRNA *ptr, float *min, float *max) +static void rna_ShapeKey_slider_max_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax) { KeyBlock *data = (KeyBlock*)ptr->data; @@ -133,9 +133,9 @@ static void rna_ShapeKey_slider_max_range(PointerRNA *ptr, float *min, float *ma static void rna_ShapeKey_slider_max_set(PointerRNA *ptr, float value) { KeyBlock *data = (KeyBlock*)ptr->data; - float min, max; + float min, max, softmin, softmax; - rna_ShapeKey_slider_max_range(ptr, &min, &max); + rna_ShapeKey_slider_max_range(ptr, &min, &max, &softmin, &softmax); CLAMP(value, min, max); data->slidermax = value; } diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c index a765cbb6690..7802241a25b 100644 --- a/source/blender/makesrna/intern/rna_material.c +++ b/source/blender/makesrna/intern/rna_material.c @@ -195,7 +195,7 @@ static void rna_Material_active_node_material_set(PointerRNA *ptr, PointerRNA va nodeSetActiveID(ma->nodetree, ID_MA, &ma_act->id); } -static void rna_MaterialStrand_start_size_range(PointerRNA *ptr, float *min, float *max) +static void rna_MaterialStrand_start_size_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax) { Material *ma = (Material*)ptr->id.data; @@ -209,7 +209,7 @@ static void rna_MaterialStrand_start_size_range(PointerRNA *ptr, float *min, flo } } -static void rna_MaterialStrand_end_size_range(PointerRNA *ptr, float *min, float *max) +static void rna_MaterialStrand_end_size_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax) { Material *ma = (Material*)ptr->id.data; diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index 5a724526960..2421cebeaf3 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -937,7 +937,7 @@ static void rna_MeshPoly_vertices_set(PointerRNA *ptr, const int *values) } } -static void rna_MeshPoly_material_index_range(PointerRNA *ptr, int *min, int *max) +static void rna_MeshPoly_material_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax) { Mesh *me = rna_mesh(ptr); *min = 0; diff --git a/source/blender/makesrna/intern/rna_mesh_utils.h b/source/blender/makesrna/intern/rna_mesh_utils.h index f262e717eef..932a69680af 100644 --- a/source/blender/makesrna/intern/rna_mesh_utils.h +++ b/source/blender/makesrna/intern/rna_mesh_utils.h @@ -64,7 +64,8 @@ return data ? CustomData_number_of_layers(data, layer_type) : 0; \ } \ /* index range */ \ - static void rna_Mesh_##collection_name##_index_range(PointerRNA *ptr, int *min, int *max) \ + static void rna_Mesh_##collection_name##_index_range(PointerRNA *ptr, int *min, int *max, \ + int *softmin, int *softmax) \ { \ CustomData *data = rna_mesh_##customdata_type(ptr); \ *min = 0; \ diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index f170d7df6f0..8b2bf6197dd 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -470,7 +470,7 @@ static void rna_WeightVGModifier_mask_uvlayer_set(PointerRNA *ptr, const char *v } } -static void rna_MultiresModifier_level_range(PointerRNA *ptr, int *min, int *max) +static void rna_MultiresModifier_level_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax) { MultiresModifierData *mmd = (MultiresModifierData*)ptr->data; diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 9b00e0e4fc3..b14f2b7fb90 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -436,28 +436,28 @@ static void rna_NodeLink_update(Main *bmain, Scene *scene, PointerRNA *ptr) } #endif -static void rna_NodeSocketInt_range(PointerRNA *ptr, int *min, int *max) +static void rna_NodeSocketInt_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax) { bNodeSocket *sock = (bNodeSocket*)ptr->data; bNodeSocketValueInt *val = (bNodeSocketValueInt*)sock->default_value; - *min = val->min; - *max = val->max; + *softmin = val->min; + *softmax = val->max; } -static void rna_NodeSocketFloat_range(PointerRNA *ptr, float *min, float *max) +static void rna_NodeSocketFloat_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax) { bNodeSocket *sock = (bNodeSocket*)ptr->data; bNodeSocketValueFloat *val = (bNodeSocketValueFloat*)sock->default_value; - *min = val->min; - *max = val->max; + *softmin = val->min; + *softmax = val->max; } -static void rna_NodeSocketVector_range(PointerRNA *ptr, float *min, float *max) +static void rna_NodeSocketVector_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax) { bNodeSocket *sock = (bNodeSocket*)ptr->data; bNodeSocketValueVector *val = (bNodeSocketValueVector*)sock->default_value; - *min = val->min; - *max = val->max; + *softmin = val->min; + *softmax = val->max; } static void rna_Node_image_layer_update(Main *bmain, Scene *scene, PointerRNA *ptr) diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 71a826f1351..d06dfdb8e7f 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -506,7 +506,7 @@ static void rna_Object_active_vertex_group_index_set(PointerRNA *ptr, int value) ob->actdef = value+1; } -static void rna_Object_active_vertex_group_index_range(PointerRNA *ptr, int *min, int *max) +static void rna_Object_active_vertex_group_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax) { Object *ob = (Object*)ptr->id.data; @@ -618,7 +618,7 @@ static void rna_Object_active_material_index_set(PointerRNA *ptr, int value) } } -static void rna_Object_active_material_index_range(PointerRNA *ptr, int *min, int *max) +static void rna_Object_active_material_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax) { Object *ob = (Object*)ptr->id.data; *min = 0; @@ -643,7 +643,7 @@ static void rna_Object_active_material_set(PointerRNA *ptr, PointerRNA value) assign_material(ob, value.data, ob->actcol); } -static void rna_Object_active_particle_system_index_range(PointerRNA *ptr, int *min, int *max) +static void rna_Object_active_particle_system_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax) { Object *ob = (Object*)ptr->id.data; *min = 0; @@ -1066,7 +1066,7 @@ static void rna_GameObjectSettings_used_state_get(PointerRNA *ptr, int *values) } } -static void rna_Object_active_shape_key_index_range(PointerRNA *ptr, int *min, int *max) +static void rna_Object_active_shape_key_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax) { Object *ob = (Object*)ptr->id.data; Key *key = ob_get_key(ob); diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c index be28300eb01..7a4361d1504 100644 --- a/source/blender/makesrna/intern/rna_object_force.c +++ b/source/blender/makesrna/intern/rna_object_force.c @@ -225,7 +225,7 @@ static void rna_Cache_list_begin(CollectionPropertyIterator *iter, PointerRNA *p rna_iterator_listbase_begin(iter, &lb, NULL); } -static void rna_Cache_active_point_cache_index_range(PointerRNA *ptr, int *min, int *max) +static void rna_Cache_active_point_cache_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax) { Object *ob = ptr->id.data; PointCache *cache = ptr->data; @@ -289,7 +289,7 @@ static void rna_Cache_active_point_cache_index_set(struct PointerRNA *ptr, int v BLI_freelistN(&pidlist); } -static void rna_PointCache_frame_step_range(PointerRNA *ptr, int *min, int *max) +static void rna_PointCache_frame_step_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax) { Object *ob = ptr->id.data; PointCache *cache = ptr->data; diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index 81d0e01d6a2..18bbf2bca12 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -470,7 +470,7 @@ static float rna_PartSetting_linelentail_get(struct PointerRNA *ptr) ParticleSettings *settings = (ParticleSettings*)ptr->data; return settings->draw_line[0]; } -static void rna_PartSetting_pathstartend_range(PointerRNA *ptr, float *min, float *max) +static void rna_PartSetting_pathstartend_range(PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax) { ParticleSettings *settings = (ParticleSettings*)ptr->data; @@ -526,7 +526,7 @@ static PointerRNA rna_ParticleSystem_active_particle_target_get(PointerRNA *ptr) } return rna_pointer_inherit_refine(ptr, &RNA_ParticleTarget, NULL); } -static void rna_ParticleSystem_active_particle_target_index_range(PointerRNA *ptr, int *min, int *max) +static void rna_ParticleSystem_active_particle_target_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax) { ParticleSystem *psys = (ParticleSystem*)ptr->data; *min = 0; @@ -666,7 +666,7 @@ static PointerRNA rna_ParticleDupliWeight_active_get(PointerRNA *ptr) } return rna_pointer_inherit_refine(ptr, &RNA_ParticleTarget, NULL); } -static void rna_ParticleDupliWeight_active_index_range(PointerRNA *ptr, int *min, int *max) +static void rna_ParticleDupliWeight_active_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax) { ParticleSettings *part = (ParticleSettings*)ptr->id.data; *min = 0; diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c index 4b1090c2ae0..b6153162fc7 100644 --- a/source/blender/makesrna/intern/rna_pose.c +++ b/source/blender/makesrna/intern/rna_pose.c @@ -365,7 +365,7 @@ static void rna_PoseChannel_bone_group_index_set(PointerRNA *ptr, int value) pchan->agrp_index = value+1; } -static void rna_PoseChannel_bone_group_index_range(PointerRNA *ptr, int *min, int *max) +static void rna_PoseChannel_bone_group_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax) { Object *ob = (Object*)ptr->id.data; bPose *pose = (ob) ? ob->pose : NULL; @@ -404,7 +404,7 @@ static void rna_Pose_active_bone_group_index_set(PointerRNA *ptr, int value) pose->active_group = value+1; } -static void rna_Pose_active_bone_group_index_range(PointerRNA *ptr, int *min, int *max) +static void rna_Pose_active_bone_group_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax) { bPose *pose = (bPose*)ptr->data; diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 67710817de3..94bcda6a1e1 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -962,7 +962,7 @@ static void rna_RenderSettings_active_layer_index_set(PointerRNA *ptr, int value rd->actlay = value; } -static void rna_RenderSettings_active_layer_index_range(PointerRNA *ptr, int *min, int *max) +static void rna_RenderSettings_active_layer_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax) { RenderData *rd = (RenderData*)ptr->data; diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 50336d525e6..42e83e662d1 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -776,7 +776,7 @@ static void rna_ConsoleLine_body_set(PointerRNA *ptr, const char *value) ci->cursor = len; } -static void rna_ConsoleLine_cursor_index_range(PointerRNA *ptr, int *min, int *max) +static void rna_ConsoleLine_cursor_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax) { ConsoleLine *ci = (ConsoleLine*)ptr->data; diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c index 70af5599a15..5fe13336e83 100644 --- a/source/blender/makesrna/intern/rna_tracking.c +++ b/source/blender/makesrna/intern/rna_tracking.c @@ -128,7 +128,7 @@ static void rna_tracking_active_object_index_set(PointerRNA *ptr, int value) clip->tracking.objectnr = value; } -static void rna_tracking_active_object_index_range(PointerRNA *ptr, int *min, int *max) +static void rna_tracking_active_object_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax) { MovieClip *clip = (MovieClip*)ptr->id.data; @@ -302,7 +302,7 @@ static void rna_tracking_stabTracks_active_index_set(PointerRNA *ptr, int value) clip->tracking.stabilization.act_track = value; } -static void rna_tracking_stabTracks_active_index_range(PointerRNA *ptr, int *min, int *max) +static void rna_tracking_stabTracks_active_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax) { MovieClip *clip = (MovieClip*)ptr->id.data; diff --git a/source/blender/nodes/shader/nodes/node_shader_math.c b/source/blender/nodes/shader/nodes/node_shader_math.c index 045fef1b010..44df496f5d6 100644 --- a/source/blender/nodes/shader/nodes/node_shader_math.c +++ b/source/blender/nodes/shader/nodes/node_shader_math.c @@ -35,8 +35,8 @@ /* **************** SCALAR MATH ******************** */ static bNodeSocketTemplate sh_node_math_in[]= { - { SOCK_FLOAT, 1, "Value", 0.5f, 0.5f, 0.5f, 1.0f, -100.0f, 100.0f, PROP_NONE}, - { SOCK_FLOAT, 1, "Value", 0.5f, 0.5f, 0.5f, 1.0f, -100.0f, 100.0f, PROP_NONE}, + { SOCK_FLOAT, 1, "Value", 0.5f, 0.5f, 0.5f, 1.0f, -10000.0f, 10000.0f, PROP_NONE}, + { SOCK_FLOAT, 1, "Value", 0.5f, 0.5f, 0.5f, 1.0f, -10000.0f, 10000.0f, PROP_NONE}, { -1, 0, "" } }; diff --git a/source/blender/nodes/shader/nodes/node_shader_vectMath.c b/source/blender/nodes/shader/nodes/node_shader_vectMath.c index 9b57780cd9d..a0fe67d591d 100644 --- a/source/blender/nodes/shader/nodes/node_shader_vectMath.c +++ b/source/blender/nodes/shader/nodes/node_shader_vectMath.c @@ -36,8 +36,8 @@ /* **************** VECTOR MATH ******************** */ static bNodeSocketTemplate sh_node_vect_math_in[]= { - { SOCK_VECTOR, 1, "Vector", 0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 1.0f, PROP_NONE}, - { SOCK_VECTOR, 1, "Vector", 0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 1.0f, PROP_NONE}, + { SOCK_VECTOR, 1, "Vector", 0.5f, 0.5f, 0.5f, 1.0f, -10000.0f, 10000.0f, PROP_NONE}, + { SOCK_VECTOR, 1, "Vector", 0.5f, 0.5f, 0.5f, 1.0f, -10000.0f, 10000.0f, PROP_NONE}, { -1, 0, "" } }; -- cgit v1.2.3 From d5ffec12a078050dc2572d5c85b9ba2b235f92aa Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 30 Mar 2012 16:09:12 +0000 Subject: Image editor: shortcuts 1-key to 8-key for switching between render slots, patch by Damir Prebeg. Also changed back J-key slot switching to only cycle through used slots, not used slots + 1. This is much more useful to compare two renders easily, rather than being shown an empty slot each time. --- source/blender/editors/space_image/image_ops.c | 4 ---- source/blender/editors/space_image/space_image.c | 8 ++++++++ 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 3ed115be345..ad4921d225c 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -2350,10 +2350,6 @@ static int image_cycle_render_slot_exec(bContext *C, wmOperator *op) ima->render_slot = slot; break; } - else if ((slot - 1) == ima->last_render_slot && slot < IMA_MAX_RENDER_SLOT) { - ima->render_slot = slot; - break; - } } if (a == IMA_MAX_RENDER_SLOT) diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index b743038f74f..c6d36842207 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -497,6 +497,7 @@ static void image_keymap(struct wmKeyConfig *keyconf) { wmKeyMap *keymap = WM_keymap_find(keyconf, "Image Generic", SPACE_IMAGE, 0); wmKeyMapItem *kmi; + int i; WM_keymap_add_item(keymap, "IMAGE_OT_new", NKEY, KM_PRESS, KM_ALT, 0); WM_keymap_add_item(keymap, "IMAGE_OT_open", OKEY, KM_PRESS, KM_ALT, 0); @@ -543,6 +544,13 @@ static void image_keymap(struct wmKeyConfig *keyconf) kmi = WM_keymap_add_item(keymap, "OBJECT_OT_mode_set", TABKEY, KM_PRESS, 0, 0); RNA_enum_set(kmi->ptr, "mode", OB_MODE_EDIT); RNA_boolean_set(kmi->ptr, "toggle", TRUE); + + /* fast switch to render slots */ + for(i = 0; i < MAX2(IMA_MAX_RENDER_SLOT, 9); i++) { + kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_int", ONEKEY+i, KM_PRESS, 0, 0); + RNA_string_set(kmi->ptr, "data_path", "space_data.image.render_slot"); + RNA_int_set(kmi->ptr, "value", i); + } } /* dropboxes */ -- cgit v1.2.3 From bbbbe1b00ea9dc46a4d837239748bfeceeda65e7 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Fri, 30 Mar 2012 17:30:24 +0000 Subject: Add BMO function to append to a buffer slot. --- source/blender/bmesh/intern/bmesh_operator_api.h | 4 +++ source/blender/bmesh/intern/bmesh_operators.c | 32 ++++++++++++++++++++++++ 2 files changed, 36 insertions(+) (limited to 'source/blender') diff --git a/source/blender/bmesh/intern/bmesh_operator_api.h b/source/blender/bmesh/intern/bmesh_operator_api.h index e840026b540..e2062bdf8f8 100644 --- a/source/blender/bmesh/intern/bmesh_operator_api.h +++ b/source/blender/bmesh/intern/bmesh_operator_api.h @@ -289,6 +289,10 @@ void BMO_slot_mat3_set(BMOperator *op, const char *slotname, float r_mat[3][3]); void BMO_mesh_flag_disable_all(BMesh *bm, BMOperator *op, const char htype, const short oflag); +/* copies the values from another slot to the end of the output slot */ +void BMO_slot_buffer_append(BMOperator *output_op, const char *output_op_slot, + BMOperator *other_op, const char *other_op_slot); + /* puts every element of type type (which is a bitmask) with tool flag flag, * into a slot. */ void BMO_slot_buffer_from_flag(BMesh *bm, BMOperator *op, const char *slotname, diff --git a/source/blender/bmesh/intern/bmesh_operators.c b/source/blender/bmesh/intern/bmesh_operators.c index 3c348b91f78..58c38def33f 100644 --- a/source/blender/bmesh/intern/bmesh_operators.c +++ b/source/blender/bmesh/intern/bmesh_operators.c @@ -724,6 +724,38 @@ void BMO_slot_buffer_from_hflag(BMesh *bm, BMOperator *op, const char *slotname, } } +/** + * Copies the values from another slot to the end of the output slot. + */ +void BMO_slot_buffer_append(BMOperator *output_op, const char *output_slot_name, + BMOperator *other_op, const char *other_slot_name) +{ + BMOpSlot *output_slot = BMO_slot_get(output_op, output_slot_name); + BMOpSlot *other_slot = BMO_slot_get(other_op, other_slot_name); + + BLI_assert(output_slot->slottype == BMO_OP_SLOT_ELEMENT_BUF && + other_slot->slottype == BMO_OP_SLOT_ELEMENT_BUF); + + if (output_slot->len == 0) { + /* output slot is empty, copy rather than append */ + BMO_slot_copy(other_op, output_op, other_slot_name, output_slot_name); + } + else if (other_slot->len != 0) { + int elem_size = BMO_OPSLOT_TYPEINFO[output_slot->slottype]; + int alloc_size = elem_size * (output_slot->len + other_slot->len); + /* allocate new buffer */ + void *buf = BLI_memarena_alloc(output_op->arena, alloc_size); + + /* copy slot data */ + memcpy(buf, output_slot->data.buf, elem_size * output_slot->len); + memcpy(((char*)buf) + elem_size * output_slot->len, + other_slot->data.buf, elem_size * other_slot->len); + + output_slot->data.buf = buf; + output_slot->len += other_slot->len; + } +} + /** * \brief BMO_FLAG_TO_SLOT * -- cgit v1.2.3 From c7aed8b2af38f7b99f9df9d8e18006421ccb900e Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Fri, 30 Mar 2012 17:30:49 +0000 Subject: For BMesh functions that test flags, add enabled/disabled variants. --- source/blender/bmesh/intern/bmesh_marking.c | 22 +++-- source/blender/bmesh/intern/bmesh_marking.h | 3 +- source/blender/bmesh/intern/bmesh_operator_api.h | 41 ++++++--- source/blender/bmesh/intern/bmesh_operators.c | 109 ++++++++++++++++++----- source/blender/bmesh/operators/bmo_bevel.c | 4 +- source/blender/bmesh/operators/bmo_connect.c | 2 +- source/blender/bmesh/operators/bmo_create.c | 4 +- source/blender/bmesh/operators/bmo_dissolve.c | 2 +- source/blender/bmesh/operators/bmo_dupe.c | 6 +- source/blender/bmesh/operators/bmo_edgesplit.c | 2 +- source/blender/bmesh/operators/bmo_extrude.c | 8 +- source/blender/bmesh/operators/bmo_inset.c | 2 +- source/blender/bmesh/operators/bmo_mirror.c | 2 +- source/blender/bmesh/operators/bmo_primitive.c | 14 +-- source/blender/bmesh/operators/bmo_subdivide.c | 10 +-- source/blender/bmesh/operators/bmo_triangulate.c | 8 +- source/blender/bmesh/operators/bmo_utils.c | 14 +-- source/blender/editors/mesh/editmesh_tools.c | 4 +- 18 files changed, 175 insertions(+), 82 deletions(-) (limited to 'source/blender') diff --git a/source/blender/bmesh/intern/bmesh_marking.c b/source/blender/bmesh/intern/bmesh_marking.c index 0318fd94b92..2116acc337e 100644 --- a/source/blender/bmesh/intern/bmesh_marking.c +++ b/source/blender/bmesh/intern/bmesh_marking.c @@ -437,36 +437,48 @@ void BM_select_mode_set(BMesh *bm, int selectmode) } /** - * counts number of elements with flag set + * counts number of elements with flag enabled/disabled */ -int BM_mesh_count_flag(BMesh *bm, const char htype, const char hflag, int respecthide) +static int bm_mesh_flag_count(BMesh *bm, const char htype, const char hflag, + int respecthide, int test_for_enabled) { BMElem *ele; BMIter iter; + int test = (test_for_enabled ? hflag : 0); int tot = 0; if (htype & BM_VERT) { for (ele = BM_iter_new(&iter, bm, BM_VERTS_OF_MESH, NULL); ele; ele = BM_iter_step(&iter)) { if (respecthide && BM_elem_flag_test(ele, BM_ELEM_HIDDEN)) continue; - if (BM_elem_flag_test(ele, hflag)) tot++; + if (BM_elem_flag_test(ele, hflag) == test) tot++; } } if (htype & BM_EDGE) { for (ele = BM_iter_new(&iter, bm, BM_EDGES_OF_MESH, NULL); ele; ele = BM_iter_step(&iter)) { if (respecthide && BM_elem_flag_test(ele, BM_ELEM_HIDDEN)) continue; - if (BM_elem_flag_test(ele, hflag)) tot++; + if (BM_elem_flag_test(ele, hflag) == test) tot++; } } if (htype & BM_FACE) { for (ele = BM_iter_new(&iter, bm, BM_FACES_OF_MESH, NULL); ele; ele = BM_iter_step(&iter)) { if (respecthide && BM_elem_flag_test(ele, BM_ELEM_HIDDEN)) continue; - if (BM_elem_flag_test(ele, hflag)) tot++; + if (BM_elem_flag_test(ele, hflag) == test) tot++; } } return tot; } +int BM_mesh_enabled_flag_count(BMesh *bm, const char htype, const char hflag, int respecthide) +{ + return bm_mesh_flag_count(bm, htype, hflag, respecthide, TRUE); +} + +int BM_mesh_disabled_flag_count(BMesh *bm, const char htype, const char hflag, int respecthide) +{ + return bm_mesh_flag_count(bm, htype, hflag, respecthide, FALSE); +} + /** * \note use BM_elem_flag_test(ele, BM_ELEM_SELECT) to test selection * \note by design, this will not touch the editselection history stuff diff --git a/source/blender/bmesh/intern/bmesh_marking.h b/source/blender/bmesh/intern/bmesh_marking.h index f0e81b1dd9f..a02931b0e88 100644 --- a/source/blender/bmesh/intern/bmesh_marking.h +++ b/source/blender/bmesh/intern/bmesh_marking.h @@ -60,7 +60,8 @@ void BM_mesh_select_mode_flush(BMesh *bm); void BM_mesh_deselect_flush(BMesh *bm); void BM_mesh_select_flush(BMesh *bm); -int BM_mesh_count_flag(BMesh *bm, const char htype, const char hflag, int respecthide); +int BM_mesh_enabled_flag_count(BMesh *bm, const char htype, const char hflag, int respecthide); +int BM_mesh_disabled_flag_count(BMesh *bm, const char htype, const char hflag, int respecthide); /* edit selection stuff */ void BM_active_face_set(BMesh *em, BMFace *f); diff --git a/source/blender/bmesh/intern/bmesh_operator_api.h b/source/blender/bmesh/intern/bmesh_operator_api.h index e2062bdf8f8..bb980a63861 100644 --- a/source/blender/bmesh/intern/bmesh_operator_api.h +++ b/source/blender/bmesh/intern/bmesh_operator_api.h @@ -182,9 +182,13 @@ void BMO_op_exec(BMesh *bm, BMOperator *op); * after it finishes executing in BMO_op_exec).*/ void BMO_op_finish(BMesh *bm, BMOperator *op); -/* count the number of elements with a specific flag. +/* count the number of elements with the specified flag enabled. * type can be a bitmask of BM_FACE, BM_EDGE, or BM_FACE. */ -int BMO_mesh_flag_count(BMesh *bm, const char htype, const short oflag); +int BMO_mesh_enabled_flag_count(BMesh *bm, const char htype, const short oflag); + +/* count the number of elements with the specified flag disabled. + * type can be a bitmask of BM_FACE, BM_EDGE, or BM_FACE. */ +int BMO_mesh_disabled_flag_count(BMesh *bm, const char htype, const short oflag); /*---------formatted operator initialization/execution-----------*/ /* @@ -209,8 +213,10 @@ int BMO_mesh_flag_count(BMesh *bm, const char htype, const short oflag); * so e.g. %hf will do faces, %hfe will do faces and edges, * %hv will do verts, etc. must pass in at least one * element type letter. + * %H[f/e/v] - same as %h, but tests if the flag is disabled * %f[f/e/v] - same as %h, except it deals with tool flags instead of * header flags. + * %F[f/e/v] - same as %f, but tests if the flag is disabled * %a[f/e/v] - pass all elements (of types specified by f/e/v) to the * slot. * %e - pass in a single element. @@ -293,10 +299,15 @@ void BMO_mesh_flag_disable_all(BMesh *bm, BMOperator *op, const char htype, cons void BMO_slot_buffer_append(BMOperator *output_op, const char *output_op_slot, BMOperator *other_op, const char *other_op_slot); -/* puts every element of type type (which is a bitmask) with tool flag flag, - * into a slot. */ -void BMO_slot_buffer_from_flag(BMesh *bm, BMOperator *op, const char *slotname, - const char htype, const short oflag); +/* puts every element of type 'type' (which is a bitmask) with tool + * flag 'flag', into a slot. */ +void BMO_slot_buffer_from_enabled_flag(BMesh *bm, BMOperator *op, const char *slotname, + const char htype, const short oflag); + +/* puts every element of type 'type' (which is a bitmask) without tool + * flag 'flag', into a slot. */ +void BMO_slot_buffer_from_disabled_flag(BMesh *bm, BMOperator *op, const char *slotname, + const char htype, const short oflag); /* tool-flags all elements inside an element slot array with flag flag. */ void BMO_slot_buffer_flag_enable(BMesh *bm, BMOperator *op, const char *slotname, @@ -312,11 +323,19 @@ void BMO_slot_buffer_hflag_enable(BMesh *bm, BMOperator *op, const char *slotnam void BMO_slot_buffer_hflag_disable(BMesh *bm, BMOperator *op, const char *slotname, const char htype, const char hflag, const char do_flush); -/* puts every element of type type (which is a bitmask) with header flag - * flag, into a slot. note: ignores hidden elements (e.g. elements with - * header flag BM_ELEM_HIDDEN set).*/ -void BMO_slot_buffer_from_hflag(BMesh *bm, BMOperator *op, const char *slotname, - const char htype, const char hflag); +/* puts every element of type 'type' (which is a bitmask) with header + * flag 'flag', into a slot. note: ignores hidden elements + * (e.g. elements with header flag BM_ELEM_HIDDEN set).*/ +void BMO_slot_buffer_from_enabled_hflag(BMesh *bm, BMOperator *op, + const char *slotname, + const char htype, const char hflag); + +/* puts every element of type 'type' (which is a bitmask) without + * header flag 'flag', into a slot. note: ignores hidden elements + * (e.g. elements with header flag BM_ELEM_HIDDEN set).*/ +void BMO_slot_buffer_from_disabled_hflag(BMesh *bm, BMOperator *op, + const char *slotname, + const char htype, const char hflag); /* counts number of elements inside a slot array. */ int BMO_slot_buffer_count(BMesh *bm, BMOperator *op, const char *slotname); diff --git a/source/blender/bmesh/intern/bmesh_operators.c b/source/blender/bmesh/intern/bmesh_operators.c index 58c38def33f..e09be79633e 100644 --- a/source/blender/bmesh/intern/bmesh_operators.c +++ b/source/blender/bmesh/intern/bmesh_operators.c @@ -451,32 +451,34 @@ void BMO_slot_vec_get(BMOperator *op, const char *slotname, float r_vec[3]) /* * BMO_COUNTFLAG * - * Counts the number of elements of a certain type that - * have a specific flag set. + * Counts the number of elements of a certain type that have a + * specific flag enabled (or disabled if test_for_enabled is false). * */ -int BMO_mesh_flag_count(BMesh *bm, const char htype, const short oflag) +static int bmo_mesh_flag_count(BMesh *bm, const char htype, const short oflag, + int test_for_enabled) { BMIter elements; int count = 0; BMElemF *ele_f; + int test = (test_for_enabled ? oflag : 0); if (htype & BM_VERT) { for (ele_f = BM_iter_new(&elements, bm, BM_VERTS_OF_MESH, bm); ele_f; ele_f = BM_iter_step(&elements)) { - if (BMO_elem_flag_test(bm, ele_f, oflag)) + if (BMO_elem_flag_test(bm, ele_f, oflag) == test) count++; } } if (htype & BM_EDGE) { for (ele_f = BM_iter_new(&elements, bm, BM_EDGES_OF_MESH, bm); ele_f; ele_f = BM_iter_step(&elements)) { - if (BMO_elem_flag_test(bm, ele_f, oflag)) + if (BMO_elem_flag_test(bm, ele_f, oflag) == test) count++; } } if (htype & BM_FACE) { for (ele_f = BM_iter_new(&elements, bm, BM_FACES_OF_MESH, bm); ele_f; ele_f = BM_iter_step(&elements)) { - if (BMO_elem_flag_test(bm, ele_f, oflag)) + if (BMO_elem_flag_test(bm, ele_f, oflag) == test) count++; } } @@ -484,6 +486,17 @@ int BMO_mesh_flag_count(BMesh *bm, const char htype, const short oflag) return count; } + +int BMO_mesh_enabled_flag_count(BMesh *bm, const char htype, const short oflag) +{ + return bmo_mesh_flag_count(bm, htype, oflag, TRUE); +} + +int BMO_mesh_disabled_flag_count(BMesh *bm, const char htype, const short oflag) +{ + return bmo_mesh_flag_count(bm, htype, oflag, FALSE); +} + void BMO_mesh_flag_disable_all(BMesh *bm, BMOperator *UNUSED(op), const char htype, const short oflag) { const char iter_types[3] = {BM_VERTS_OF_MESH, @@ -676,25 +689,32 @@ static void BMO_slot_buffer_from_all(BMesh *bm, BMOperator *op, const char *slot /** * \brief BMO_HEADERFLAG_TO_SLOT * - * Copies elements of a certain type, which have a certain header flag set - * into a slot for an operator. + * Copies elements of a certain type, which have a certain header flag + * enabled/disabled into a slot for an operator. */ -void BMO_slot_buffer_from_hflag(BMesh *bm, BMOperator *op, const char *slotname, - const char htype, const char hflag) +static void bmo_slot_buffer_from_hflag(BMesh *bm, BMOperator *op, const char *slotname, + const char htype, const char hflag, + int test_for_enabled) { BMIter elements; BMElem *ele; BMOpSlot *output = BMO_slot_get(op, slotname); int totelement = 0, i = 0; - - totelement = BM_mesh_count_flag(bm, htype, hflag, TRUE); + + if (test_for_enabled) + totelement = BM_mesh_enabled_flag_count(bm, htype, hflag, TRUE); + else + totelement = BM_mesh_disabled_flag_count(bm, htype, hflag, TRUE); if (totelement) { + int test = (test_for_enabled ? hflag : 0); + bmo_slot_buffer_alloc(op, slotname, totelement); if (htype & BM_VERT) { for (ele = BM_iter_new(&elements, bm, BM_VERTS_OF_MESH, bm); ele; ele = BM_iter_step(&elements)) { - if (!BM_elem_flag_test(ele, BM_ELEM_HIDDEN) && BM_elem_flag_test(ele, hflag)) { + if (!BM_elem_flag_test(ele, BM_ELEM_HIDDEN) && + BM_elem_flag_test(ele, hflag) == test) { ((BMElem **)output->data.p)[i] = ele; i++; } @@ -703,7 +723,8 @@ void BMO_slot_buffer_from_hflag(BMesh *bm, BMOperator *op, const char *slotname, if (htype & BM_EDGE) { for (ele = BM_iter_new(&elements, bm, BM_EDGES_OF_MESH, bm); ele; ele = BM_iter_step(&elements)) { - if (!BM_elem_flag_test(ele, BM_ELEM_HIDDEN) && BM_elem_flag_test(ele, hflag)) { + if (!BM_elem_flag_test(ele, BM_ELEM_HIDDEN) && + BM_elem_flag_test(ele, hflag) == test) { ((BMElem **)output->data.p)[i] = ele; i++; } @@ -712,7 +733,8 @@ void BMO_slot_buffer_from_hflag(BMesh *bm, BMOperator *op, const char *slotname, if (htype & BM_FACE) { for (ele = BM_iter_new(&elements, bm, BM_FACES_OF_MESH, bm); ele; ele = BM_iter_step(&elements)) { - if (!BM_elem_flag_test(ele, BM_ELEM_HIDDEN) && BM_elem_flag_test(ele, hflag)) { + if (!BM_elem_flag_test(ele, BM_ELEM_HIDDEN) && + BM_elem_flag_test(ele, hflag) == test) { ((BMElem **)output->data.p)[i] = ele; i++; } @@ -724,6 +746,18 @@ void BMO_slot_buffer_from_hflag(BMesh *bm, BMOperator *op, const char *slotname, } } +void BMO_slot_buffer_from_enabled_hflag(BMesh *bm, BMOperator *op, const char *slotname, + const char htype, const char hflag) +{ + bmo_slot_buffer_from_hflag(bm, op, slotname, htype, hflag, TRUE); +} + +void BMO_slot_buffer_from_disabled_hflag(BMesh *bm, BMOperator *op, const char *slotname, + const char htype, const char hflag) +{ + bmo_slot_buffer_from_hflag(bm, op, slotname, htype, hflag, FALSE); +} + /** * Copies the values from another slot to the end of the output slot. */ @@ -762,18 +796,25 @@ void BMO_slot_buffer_append(BMOperator *output_op, const char *output_slot_name, * Copies elements of a certain type, which have a certain flag set * into an output slot for an operator. */ -void BMO_slot_buffer_from_flag(BMesh *bm, BMOperator *op, const char *slotname, - const char htype, const short oflag) +static void bmo_slot_buffer_from_flag(BMesh *bm, BMOperator *op, const char *slotname, + const char htype, const short oflag, + int test_for_enabled) { BMIter elements; BMOpSlot *slot = BMO_slot_get(op, slotname); - int totelement = BMO_mesh_flag_count(bm, htype, oflag), i = 0; + int totelement, i = 0; + + if (test_for_enabled) + totelement = BMO_mesh_enabled_flag_count(bm, htype, oflag); + else + totelement = BMO_mesh_disabled_flag_count(bm, htype, oflag); BLI_assert(slot->slottype == BMO_OP_SLOT_ELEMENT_BUF); if (totelement) { BMHeader *ele; BMHeader **ele_array; + int test = (test_for_enabled ? oflag : 0); bmo_slot_buffer_alloc(op, slotname, totelement); @@ -781,7 +822,7 @@ void BMO_slot_buffer_from_flag(BMesh *bm, BMOperator *op, const char *slotname, if (htype & BM_VERT) { for (ele = BM_iter_new(&elements, bm, BM_VERTS_OF_MESH, bm); ele; ele = BM_iter_step(&elements)) { - if (BMO_elem_flag_test(bm, (BMElemF *)ele, oflag)) { + if (BMO_elem_flag_test(bm, (BMElemF *)ele, oflag) == test) { ele_array[i] = ele; i++; } @@ -790,7 +831,7 @@ void BMO_slot_buffer_from_flag(BMesh *bm, BMOperator *op, const char *slotname, if (htype & BM_EDGE) { for (ele = BM_iter_new(&elements, bm, BM_EDGES_OF_MESH, bm); ele; ele = BM_iter_step(&elements)) { - if (BMO_elem_flag_test(bm, (BMElemF *)ele, oflag)) { + if (BMO_elem_flag_test(bm, (BMElemF *)ele, oflag) == test) { ele_array[i] = ele; i++; } @@ -799,7 +840,7 @@ void BMO_slot_buffer_from_flag(BMesh *bm, BMOperator *op, const char *slotname, if (htype & BM_FACE) { for (ele = BM_iter_new(&elements, bm, BM_FACES_OF_MESH, bm); ele; ele = BM_iter_step(&elements)) { - if (BMO_elem_flag_test(bm, (BMElemF *)ele, oflag)) { + if (BMO_elem_flag_test(bm, (BMElemF *)ele, oflag) == test) { ele_array[i] = ele; i++; } @@ -811,6 +852,18 @@ void BMO_slot_buffer_from_flag(BMesh *bm, BMOperator *op, const char *slotname, } } +void BMO_slot_buffer_from_enabled_flag(BMesh *bm, BMOperator *op, const char *slotname, + const char htype, const short oflag) +{ + bmo_slot_buffer_from_flag(bm, op, slotname, htype, oflag, TRUE); +} + +void BMO_slot_buffer_from_disabled_flag(BMesh *bm, BMOperator *op, const char *slotname, + const char htype, const short oflag) +{ + bmo_slot_buffer_from_flag(bm, op, slotname, htype, oflag, FALSE); +} + /** * \brief BMO_FLAG_BUFFER * @@ -1403,7 +1456,9 @@ int BMO_op_vinitf(BMesh *bm, BMOperator *op, const char *_fmt, va_list vlist) state = 1; break; case 'f': + case 'F': case 'h': + case 'H': case 'a': type = *fmt; @@ -1430,13 +1485,19 @@ int BMO_op_vinitf(BMesh *bm, BMOperator *op, const char *_fmt, va_list vlist) } if (type == 'h') { - BMO_slot_buffer_from_hflag(bm, op, slotname, htype, va_arg(vlist, int)); + BMO_slot_buffer_from_enabled_hflag(bm, op, slotname, htype, va_arg(vlist, int)); + } + else if (type == 'H') { + BMO_slot_buffer_from_disabled_hflag(bm, op, slotname, htype, va_arg(vlist, int)); } else if (type == 'a') { BMO_slot_buffer_from_all(bm, op, slotname, htype); } - else { - BMO_slot_buffer_from_flag(bm, op, slotname, htype, va_arg(vlist, int)); + else if (type == 'f') { + BMO_slot_buffer_from_enabled_flag(bm, op, slotname, htype, va_arg(vlist, int)); + } + else if (type == 'F') { + BMO_slot_buffer_from_disabled_flag(bm, op, slotname, htype, va_arg(vlist, int)); } } diff --git a/source/blender/bmesh/operators/bmo_bevel.c b/source/blender/bmesh/operators/bmo_bevel.c index 3be3000e4ae..ab57c80ff1a 100644 --- a/source/blender/bmesh/operators/bmo_bevel.c +++ b/source/blender/bmesh/operators/bmo_bevel.c @@ -877,6 +877,6 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op) BLI_array_free(edges); BLI_array_free(faces); - BMO_slot_buffer_from_flag(bm, op, "face_spans", BM_FACE, FACE_SPAN); - BMO_slot_buffer_from_flag(bm, op, "face_holes", BM_FACE, FACE_HOLE); + BMO_slot_buffer_from_enabled_flag(bm, op, "face_spans", BM_FACE, FACE_SPAN); + BMO_slot_buffer_from_enabled_flag(bm, op, "face_holes", BM_FACE, FACE_HOLE); } diff --git a/source/blender/bmesh/operators/bmo_connect.c b/source/blender/bmesh/operators/bmo_connect.c index 20af3463891..5c60704d0ee 100644 --- a/source/blender/bmesh/operators/bmo_connect.c +++ b/source/blender/bmesh/operators/bmo_connect.c @@ -116,7 +116,7 @@ void bmo_connectverts_exec(BMesh *bm, BMOperator *op) } } - BMO_slot_buffer_from_flag(bm, op, "edgeout", BM_EDGE, EDGE_OUT); + BMO_slot_buffer_from_enabled_flag(bm, op, "edgeout", BM_EDGE, EDGE_OUT); BLI_array_free(loops); BLI_array_free(verts); diff --git a/source/blender/bmesh/operators/bmo_create.c b/source/blender/bmesh/operators/bmo_create.c index a761520dabb..876d440a0fa 100644 --- a/source/blender/bmesh/operators/bmo_create.c +++ b/source/blender/bmesh/operators/bmo_create.c @@ -1053,7 +1053,7 @@ void bmo_edgenet_fill_exec(BMesh *bm, BMOperator *op) edge_free_path(pathbase, path); } - BMO_slot_buffer_from_flag(bm, op, "faceout", BM_FACE, FACE_NEW); + BMO_slot_buffer_from_enabled_flag(bm, op, "faceout", BM_FACE, FACE_NEW); BLI_array_free(edges); BLI_array_free(verts); @@ -1250,7 +1250,7 @@ void bmo_edgenet_prepare(BMesh *bm, BMOperator *op) } } - BMO_slot_buffer_from_flag(bm, op, "edgeout", BM_EDGE, ELE_NEW); + BMO_slot_buffer_from_enabled_flag(bm, op, "edgeout", BM_EDGE, ELE_NEW); BLI_array_free(edges1); BLI_array_free(edges2); diff --git a/source/blender/bmesh/operators/bmo_dissolve.c b/source/blender/bmesh/operators/bmo_dissolve.c index fe5c8cd048e..40650f45fed 100644 --- a/source/blender/bmesh/operators/bmo_dissolve.c +++ b/source/blender/bmesh/operators/bmo_dissolve.c @@ -181,7 +181,7 @@ void bmo_dissolve_faces_exec(BMesh *bm, BMOperator *op) goto cleanup; } - BMO_slot_buffer_from_flag(bm, op, "regionout", BM_FACE, FACE_NEW); + BMO_slot_buffer_from_enabled_flag(bm, op, "regionout", BM_FACE, FACE_NEW); cleanup: /* free/cleanup */ diff --git a/source/blender/bmesh/operators/bmo_dupe.c b/source/blender/bmesh/operators/bmo_dupe.c index 4c6ad7e268a..814045f2528 100644 --- a/source/blender/bmesh/operators/bmo_dupe.c +++ b/source/blender/bmesh/operators/bmo_dupe.c @@ -336,7 +336,7 @@ void bmo_dupe_exec(BMesh *bm, BMOperator *op) BMO_slot_copy(dupeop, dupeop, "geom", "origout"); /* Now alloc the new output buffers */ - BMO_slot_buffer_from_flag(bm, dupeop, "newout", BM_ALL, DUPE_NEW); + BMO_slot_buffer_from_enabled_flag(bm, dupeop, "newout", BM_ALL, DUPE_NEW); } #if 0 /* UNUSED */ @@ -349,7 +349,7 @@ void BMO_dupe_from_flag(BMesh *bm, int htype, const char hflag) BMOperator dupeop; BMO_op_init(bm, &dupeop, "dupe"); - BMO_slot_buffer_from_hflag(bm, &dupeop, "geom", htype, hflag); + BMO_slot_buffer_from_enabled_hflag(bm, &dupeop, "geom", htype, hflag); BMO_op_exec(bm, &dupeop); BMO_op_finish(bm, &dupeop); @@ -430,7 +430,7 @@ void bmo_split_exec(BMesh *bm, BMOperator *op) /* connect outputs of dupe to delete, exluding keep geometry */ BMO_slot_int_set(&delop, "context", DEL_FACES); - BMO_slot_buffer_from_flag(bm, &delop, "geom", BM_ALL, SPLIT_INPUT); + BMO_slot_buffer_from_enabled_flag(bm, &delop, "geom", BM_ALL, SPLIT_INPUT); BMO_op_exec(bm, &delop); diff --git a/source/blender/bmesh/operators/bmo_edgesplit.c b/source/blender/bmesh/operators/bmo_edgesplit.c index 549f773a250..6601fb1cd48 100644 --- a/source/blender/bmesh/operators/bmo_edgesplit.c +++ b/source/blender/bmesh/operators/bmo_edgesplit.c @@ -161,5 +161,5 @@ void bmo_edgesplit_exec(BMesh *bm, BMOperator *op) } } - BMO_slot_buffer_from_hflag(bm, op, "edgeout", BM_EDGE, BM_ELEM_INTERNAL_TAG); + BMO_slot_buffer_from_enabled_hflag(bm, op, "edgeout", BM_EDGE, BM_ELEM_INTERNAL_TAG); } diff --git a/source/blender/bmesh/operators/bmo_extrude.c b/source/blender/bmesh/operators/bmo_extrude.c index bfafd778837..77ba69b2372 100644 --- a/source/blender/bmesh/operators/bmo_extrude.c +++ b/source/blender/bmesh/operators/bmo_extrude.c @@ -110,7 +110,7 @@ void bmo_extrude_face_indiv_exec(BMesh *bm, BMOperator *op) BLI_array_free(edges); BMO_op_callf(bm, "del geom=%ff context=%i", EXT_DEL, DEL_ONLYFACES); - BMO_slot_buffer_from_flag(bm, op, "faceout", BM_FACE, EXT_KEEP); + BMO_slot_buffer_from_enabled_flag(bm, op, "faceout", BM_FACE, EXT_KEEP); } static void bm_extrude_copy_face_loop_attributes(BMesh *bm, BMFace *f, BMEdge *e, BMEdge *newedge) @@ -211,7 +211,7 @@ void bmo_extrude_edge_only_exec(BMesh *bm, BMOperator *op) BMO_op_finish(bm, &dupeop); - BMO_slot_buffer_from_flag(bm, op, "geomout", BM_ALL, EXT_KEEP); + BMO_slot_buffer_from_enabled_flag(bm, op, "geomout", BM_ALL, EXT_KEEP); } void bmo_extrude_vert_indiv_exec(BMesh *bm, BMOperator *op) @@ -230,8 +230,8 @@ void bmo_extrude_vert_indiv_exec(BMesh *bm, BMOperator *op) BMO_elem_flag_enable(bm, dupev, EXT_KEEP); } - BMO_slot_buffer_from_flag(bm, op, "vertout", BM_VERT, EXT_KEEP); - BMO_slot_buffer_from_flag(bm, op, "edgeout", BM_EDGE, EXT_KEEP); + BMO_slot_buffer_from_enabled_flag(bm, op, "vertout", BM_VERT, EXT_KEEP); + BMO_slot_buffer_from_enabled_flag(bm, op, "edgeout", BM_EDGE, EXT_KEEP); } void bmo_extrude_face_region_exec(BMesh *bm, BMOperator *op) diff --git a/source/blender/bmesh/operators/bmo_inset.c b/source/blender/bmesh/operators/bmo_inset.c index c8804877723..4a426b40995 100644 --- a/source/blender/bmesh/operators/bmo_inset.c +++ b/source/blender/bmesh/operators/bmo_inset.c @@ -482,5 +482,5 @@ void bmo_inset_exec(BMesh *bm, BMOperator *op) MEM_freeN(edge_info); /* we could flag new edges/verts too, is it useful? */ - BMO_slot_buffer_from_flag(bm, op, "faceout", BM_FACE, ELE_NEW); + BMO_slot_buffer_from_enabled_flag(bm, op, "faceout", BM_FACE, ELE_NEW); } diff --git a/source/blender/bmesh/operators/bmo_mirror.c b/source/blender/bmesh/operators/bmo_mirror.c index 268009dc9af..c516b8a7605 100644 --- a/source/blender/bmesh/operators/bmo_mirror.c +++ b/source/blender/bmesh/operators/bmo_mirror.c @@ -120,7 +120,7 @@ void bmo_mirror_exec(BMesh *bm, BMOperator *op) BMO_op_finish(bm, &weldop); BMO_op_finish(bm, &dupeop); - BMO_slot_buffer_from_flag(bm, op, "newout", BM_ALL, ELE_NEW); + BMO_slot_buffer_from_enabled_flag(bm, op, "newout", BM_ALL, ELE_NEW); BLI_array_free(vmap); BLI_array_free(emap); diff --git a/source/blender/bmesh/operators/bmo_primitive.c b/source/blender/bmesh/operators/bmo_primitive.c index 76d7e08f74a..3d3cbf09f9a 100644 --- a/source/blender/bmesh/operators/bmo_primitive.c +++ b/source/blender/bmesh/operators/bmo_primitive.c @@ -283,7 +283,7 @@ void bmo_create_grid_exec(BMesh *bm, BMOperator *op) if (a) BMO_op_finish(bm, &bmop); - BMO_slot_buffer_from_flag(bm, op, "vertout", BM_VERT, VERT_MARK); + BMO_slot_buffer_from_enabled_flag(bm, op, "vertout", BM_VERT, VERT_MARK); } void bmo_create_uvsphere_exec(BMesh *bm, BMOperator *op) @@ -372,7 +372,7 @@ void bmo_create_uvsphere_exec(BMesh *bm, BMOperator *op) } } - BMO_slot_buffer_from_flag(bm, op, "vertout", BM_VERT, VERT_MARK); + BMO_slot_buffer_from_enabled_flag(bm, op, "vertout", BM_VERT, VERT_MARK); } void bmo_create_icosphere_exec(BMesh *bm, BMOperator *op) @@ -439,7 +439,7 @@ void bmo_create_icosphere_exec(BMesh *bm, BMOperator *op) } } - BMO_slot_buffer_from_flag(bm, op, "vertout", BM_VERT, VERT_MARK); + BMO_slot_buffer_from_enabled_flag(bm, op, "vertout", BM_VERT, VERT_MARK); } void bmo_create_monkey_exec(BMesh *bm, BMOperator *op) @@ -486,7 +486,7 @@ void bmo_create_monkey_exec(BMesh *bm, BMOperator *op) MEM_freeN(tv); - BMO_slot_buffer_from_flag(bm, op, "vertout", BM_VERT, VERT_MARK); + BMO_slot_buffer_from_enabled_flag(bm, op, "vertout", BM_VERT, VERT_MARK); } @@ -558,7 +558,7 @@ void bmo_create_circle_exec(BMesh *bm, BMOperator *op) BMO_op_callf(bm, "dissolve_faces faces=%ff", FACE_NEW); } - BMO_slot_buffer_from_flag(bm, op, "vertout", BM_VERT, VERT_MARK); + BMO_slot_buffer_from_enabled_flag(bm, op, "vertout", BM_VERT, VERT_MARK); } void bmo_create_cone_exec(BMesh *bm, BMOperator *op) @@ -654,7 +654,7 @@ void bmo_create_cone_exec(BMesh *bm, BMOperator *op) BM_face_create_quad_tri(bm, v1, v2, firstv2, firstv1, NULL, FALSE); BMO_op_callf(bm, "removedoubles verts=%fv dist=%f", VERT_MARK, 0.000001); - BMO_slot_buffer_from_flag(bm, op, "vertout", BM_VERT, VERT_MARK); + BMO_slot_buffer_from_enabled_flag(bm, op, "vertout", BM_VERT, VERT_MARK); } void bmo_create_cube_exec(BMesh *bm, BMOperator *op) @@ -732,5 +732,5 @@ void bmo_create_cube_exec(BMesh *bm, BMOperator *op) BM_face_create_quad_tri(bm, v1, v2, v3, v4, NULL, FALSE); BM_face_create_quad_tri(bm, v8, v7, v6, v5, NULL, FALSE); - BMO_slot_buffer_from_flag(bm, op, "vertout", BM_VERT, VERT_MARK); + BMO_slot_buffer_from_enabled_flag(bm, op, "vertout", BM_VERT, VERT_MARK); } diff --git a/source/blender/bmesh/operators/bmo_subdivide.c b/source/blender/bmesh/operators/bmo_subdivide.c index f0683d8f49d..03f9fe04394 100644 --- a/source/blender/bmesh/operators/bmo_subdivide.c +++ b/source/blender/bmesh/operators/bmo_subdivide.c @@ -744,7 +744,7 @@ void bmo_esubd_exec(BMesh *bmesh, BMOperator *op) } /* first go through and tag edges */ - BMO_slot_buffer_from_flag(bmesh, op, "edges", BM_EDGE, SUBD_SPLIT); + BMO_slot_buffer_from_enabled_flag(bmesh, op, "edges", BM_EDGE, SUBD_SPLIT); params.numcuts = numcuts; params.op = op; @@ -1015,10 +1015,10 @@ void bmo_esubd_exec(BMesh *bmesh, BMOperator *op) BLI_array_free(splits); BLI_array_free(loops); - BMO_slot_buffer_from_flag(bmesh, op, "outinner", BM_ALL, ELE_INNER); - BMO_slot_buffer_from_flag(bmesh, op, "outsplit", BM_ALL, ELE_SPLIT); + BMO_slot_buffer_from_enabled_flag(bmesh, op, "outinner", BM_ALL, ELE_INNER); + BMO_slot_buffer_from_enabled_flag(bmesh, op, "outsplit", BM_ALL, ELE_SPLIT); - BMO_slot_buffer_from_flag(bmesh, op, "geomout", BM_ALL, ELE_INNER|ELE_SPLIT|SUBD_SPLIT); + BMO_slot_buffer_from_enabled_flag(bmesh, op, "geomout", BM_ALL, ELE_INNER|ELE_SPLIT|SUBD_SPLIT); } /* editmesh-emulating function */ @@ -1106,7 +1106,7 @@ void bmo_edgebisect_exec(BMesh *bm, BMOperator *op) bm_subdivide_multicut(bm, e, ¶ms, e->v1, e->v2); } - BMO_slot_buffer_from_flag(bm, op, "outsplit", BM_ALL, ELE_SPLIT); + BMO_slot_buffer_from_enabled_flag(bm, op, "outsplit", BM_ALL, ELE_SPLIT); BM_data_layer_free_n(bm, &bm->vdata, CD_SHAPEKEY, skey); } diff --git a/source/blender/bmesh/operators/bmo_triangulate.c b/source/blender/bmesh/operators/bmo_triangulate.c index 679efdcf030..47d17717567 100644 --- a/source/blender/bmesh/operators/bmo_triangulate.c +++ b/source/blender/bmesh/operators/bmo_triangulate.c @@ -72,8 +72,8 @@ void bmo_triangulate_exec(BMesh *bm, BMOperator *op) } } - BMO_slot_buffer_from_flag(bm, op, "edgeout", BM_EDGE, EDGE_NEW); - BMO_slot_buffer_from_flag(bm, op, "faceout", BM_FACE, FACE_NEW); + BMO_slot_buffer_from_enabled_flag(bm, op, "edgeout", BM_EDGE, EDGE_NEW); + BMO_slot_buffer_from_enabled_flag(bm, op, "faceout", BM_FACE, FACE_NEW); BLI_array_free(projectverts); BLI_array_free(newfaces); @@ -152,7 +152,7 @@ void bmo_beautify_fill_exec(BMesh *bm, BMOperator *op) } } - BMO_slot_buffer_from_flag(bm, op, "geomout", BM_EDGE|BM_FACE, ELE_NEW); + BMO_slot_buffer_from_enabled_flag(bm, op, "geomout", BM_EDGE|BM_FACE, ELE_NEW); } void bmo_triangle_fill_exec(BMesh *bm, BMOperator *op) @@ -216,5 +216,5 @@ void bmo_triangle_fill_exec(BMesh *bm, BMOperator *op) BMO_slot_buffer_flag_enable(bm, &bmop, "geomout", BM_FACE|BM_EDGE, ELE_NEW); BMO_op_finish(bm, &bmop); - BMO_slot_buffer_from_flag(bm, op, "geomout", BM_EDGE|BM_FACE, ELE_NEW); + BMO_slot_buffer_from_enabled_flag(bm, op, "geomout", BM_EDGE|BM_FACE, ELE_NEW); } diff --git a/source/blender/bmesh/operators/bmo_utils.c b/source/blender/bmesh/operators/bmo_utils.c index 100cf788054..6a994524e5f 100644 --- a/source/blender/bmesh/operators/bmo_utils.c +++ b/source/blender/bmesh/operators/bmo_utils.c @@ -49,7 +49,7 @@ void bmo_makevert_exec(BMesh *bm, BMOperator *op) BMO_slot_vec_get(op, "co", vec); BMO_elem_flag_enable(bm, BM_vert_create(bm, vec, NULL), 1); - BMO_slot_buffer_from_flag(bm, op, "newvertout", BM_VERT, 1); + BMO_slot_buffer_from_enabled_flag(bm, op, "newvertout", BM_VERT, 1); } void bmo_transform_exec(BMesh *bm, BMOperator *op) @@ -163,7 +163,7 @@ void bmo_edgerotate_exec(BMesh *bm, BMOperator *op) } } - BMO_slot_buffer_from_flag(bm, op, "edgeout", BM_EDGE, EDGE_OUT); + BMO_slot_buffer_from_enabled_flag(bm, op, "edgeout", BM_EDGE, EDGE_OUT); #undef EDGE_OUT #undef FACE_TAINT @@ -266,7 +266,7 @@ void bmo_regionextend_exec(BMesh *bm, BMOperator *op) else bmo_regionextend_extend(bm, op, use_faces); - BMO_slot_buffer_from_flag(bm, op, "geomout", BM_ALL, SEL_FLAG); + BMO_slot_buffer_from_enabled_flag(bm, op, "geomout", BM_ALL, SEL_FLAG); } /********* righthand faces implementation ****** */ @@ -686,7 +686,7 @@ void bmo_similarfaces_exec(BMesh *bm, BMOperator *op) MEM_freeN(indices); /* transfer all marked faces to the output slot */ - BMO_slot_buffer_from_flag(bm, op, "faceout", BM_FACE, FACE_MARK); + BMO_slot_buffer_from_enabled_flag(bm, op, "faceout", BM_FACE, FACE_MARK); } /**************************************************************************** * @@ -883,7 +883,7 @@ void bmo_similaredges_exec(BMesh *bm, BMOperator *op) MEM_freeN(indices); /* transfer all marked edges to the output slot */ - BMO_slot_buffer_from_flag(bm, op, "edgeout", BM_EDGE, EDGE_MARK); + BMO_slot_buffer_from_enabled_flag(bm, op, "edgeout", BM_EDGE, EDGE_MARK); } /**************************************************************************** * @@ -999,7 +999,7 @@ void bmo_similarverts_exec(BMesh *bm, BMOperator *op) MEM_freeN(indices); MEM_freeN(v_ext); - BMO_slot_buffer_from_flag(bm, op, "vertout", BM_VERT, VERT_MARK); + BMO_slot_buffer_from_enabled_flag(bm, op, "vertout", BM_VERT, VERT_MARK); } /**************************************************************************** * @@ -1327,5 +1327,5 @@ void bmo_vertexshortestpath_exec(BMesh *bm, BMOperator *op) BLI_heap_free(h, NULL); MEM_freeN(vert_list); - BMO_slot_buffer_from_flag(bm, op, "vertout", BM_VERT, VERT_MARK); + BMO_slot_buffer_from_enabled_flag(bm, op, "vertout", BM_VERT, VERT_MARK); } diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index 824166798e9..45cef5ca7ef 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -258,7 +258,7 @@ static short edbm_extrude_edge(Object *obedit, BMEditMesh *em, const char hflag, BMElem *ele; BMO_op_init(bm, &extop, "extrude_face_region"); - BMO_slot_buffer_from_hflag(bm, &extop, "edgefacein", BM_VERT | BM_EDGE | BM_FACE, hflag); + BMO_slot_buffer_from_enabled_hflag(bm, &extop, "edgefacein", BM_VERT | BM_EDGE | BM_FACE, hflag); /* If a mirror modifier with clipping is on, we need to adjust some * of the cases above to handle edges on the line of symmetry. @@ -2977,7 +2977,7 @@ static int edbm_knife_cut_exec(bContext *C, wmOperator *op) } } - BMO_slot_buffer_from_flag(bm, &bmop, "edges", BM_EDGE, 1); + BMO_slot_buffer_from_enabled_flag(bm, &bmop, "edges", BM_EDGE, 1); if (mode == KNIFE_MIDPOINT) numcuts = 1; BMO_slot_int_set(&bmop, "numcuts", numcuts); -- cgit v1.2.3 From ebb229110e4af5d2df5613b6345da2f602b90092 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Fri, 30 Mar 2012 17:30:56 +0000 Subject: Fix bug 30195, Array modifier fails to merge vertices. All cases should work now -- that's adjacent duplicate merging, first-last duplicate merging, and start/end cap merging. A lot of complexity really, wonder if it might not be better to just do a full "remove doubles" rather than try to match pre-BMesh behavior exactly. --- source/blender/modifiers/intern/MOD_array.c | 180 +++++++++++++++++++--------- 1 file changed, 121 insertions(+), 59 deletions(-) (limited to 'source/blender') diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c index ceae07f1f43..84b5d7deb6f 100644 --- a/source/blender/modifiers/intern/MOD_array.c +++ b/source/blender/modifiers/intern/MOD_array.c @@ -162,30 +162,6 @@ static float vertarray_size(MVert *mvert, int numVerts, int axis) return max_co - min_co; } -/* Used for start/end cap. - * - * this function expects all existing vertices to be tagged, - * so we can know new verts are not tagged. - * - * All verts will be tagged on exit. - */ -static void bm_merge_dm_transform(BMesh* bm, DerivedMesh *dm, float mat[4][4]) -{ - BMVert *v; - BMIter iter; - - DM_to_bmesh_ex(dm, bm); - - /* transform all verts */ - BM_ITER(v, &iter, bm, BM_VERTS_OF_MESH, NULL) { - if (!BM_elem_flag_test(v, BM_ELEM_TAG)) { - mul_m4_v3(mat, v->co); - BM_elem_flag_enable(v, BM_ELEM_TAG); - } - } -} - - static int *find_doubles_index_map(BMesh *bm, BMOperator *dupe_op, const ArrayModifierData *amd, int *index_map_length) @@ -231,6 +207,95 @@ static int *find_doubles_index_map(BMesh *bm, BMOperator *dupe_op, return index_map; } +/* Used for start/end cap. + * + * this function expects all existing vertices to be tagged, + * so we can know new verts are not tagged. + * + * All verts will be tagged on exit. + */ +static void bm_merge_dm_transform(BMesh* bm, DerivedMesh *dm, float mat[4][4], + const ArrayModifierData *amd, + BMOperator *dupe_op, + const char *dupe_slot_name, + BMOperator *weld_op) +{ + BMVert *v, *v2; + BMIter iter; + + DM_to_bmesh_ex(dm, bm); + + if (amd->flags & MOD_ARR_MERGE) { + /* if merging is enabled, find doubles */ + + BMOIter oiter; + BMOperator find_op; + + BMO_op_initf(bm, &find_op, + "finddoubles verts=%Hv dist=%f keepverts=%s", + BM_ELEM_TAG, amd->merge_dist, + dupe_op, dupe_slot_name); + + /* append the dupe's geom to the findop input verts */ + BMO_slot_buffer_append(&find_op, "verts", dupe_op, dupe_slot_name); + + /* transform and tag verts */ + BM_ITER(v, &iter, bm, BM_VERTS_OF_MESH, NULL) { + if (!BM_elem_flag_test(v, BM_ELEM_TAG)) { + mul_m4_v3(mat, v->co); + BM_elem_flag_enable(v, BM_ELEM_TAG); + } + } + + BMO_op_exec(bm, &find_op); + + /* add new merge targets to weld operator */ + BMO_ITER(v, &oiter, bm, &find_op, "targetmapout", 0) { + v2 = BMO_iter_map_value_p(&oiter); + BMO_slot_map_ptr_insert(bm, weld_op, "targetmap", v, v2); + } + + BMO_op_finish(bm, &find_op); + } + else { + /* transform and tag verts */ + BM_ITER(v, &iter, bm, BM_VERTS_OF_MESH, NULL) { + if (!BM_elem_flag_test(v, BM_ELEM_TAG)) { + mul_m4_v3(mat, v->co); + BM_elem_flag_enable(v, BM_ELEM_TAG); + } + } + } +} + +static void merge_first_last(BMesh* bm, + const ArrayModifierData *amd, + BMOperator *dupe_first, + BMOperator *dupe_last, + BMOperator *weld_op) +{ + BMOperator find_op; + BMOIter oiter; + BMVert *v, *v2; + + BMO_op_initf(bm, &find_op, + "finddoubles verts=%s dist=%f keepverts=%s", + dupe_first, "geom", amd->merge_dist, + dupe_first, "geom"); + + /* append the last dupe's geom to the findop input verts */ + BMO_slot_buffer_append(&find_op, "verts", dupe_last, "newout"); + + BMO_op_exec(bm, &find_op); + + /* add new merge targets to weld operator */ + BMO_ITER(v, &oiter, bm, &find_op, "targetmapout", 0) { + v2 = BMO_iter_map_value_p(&oiter); + BMO_slot_map_ptr_insert(bm, weld_op, "targetmap", v, v2); + } + + BMO_op_finish(bm, &find_op); +} static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, Scene *scene, Object *ob, DerivedMesh *dm, @@ -238,7 +303,7 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, { DerivedMesh *result; BMEditMesh *em = DM_to_editbmesh(dm, NULL, FALSE); - BMOperator dupe_op, old_dupe_op, weld_op; + BMOperator first_dupe_op, dupe_op, old_dupe_op, weld_op; BMVert **first_geom = NULL; int i, j, indexLen; /* offset matrix */ @@ -340,15 +405,16 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, if (amd->flags & MOD_ARR_MERGE) BMO_op_init(em->bm, &weld_op, "weldverts"); - + + BMO_op_initf(em->bm, &dupe_op, "dupe geom=%avef"); + first_dupe_op = dupe_op; + for (j=0; j < count - 1; j++) { BMVert *v, *v2, *v3; BMOpSlot *geom_slot; BMOpSlot *newout_slot; - if (j == 0) - BMO_op_initf(em->bm, &dupe_op, "dupe geom=%avef"); - else + if (j != 0) BMO_op_initf(em->bm, &dupe_op, "dupe geom=%s", &old_dupe_op, "newout"); BMO_op_exec(em->bm, &dupe_op); @@ -390,61 +456,57 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, BMO_slot_map_ptr_insert(em->bm, &weld_op, "targetmap", v, v2); } - if ((amd->flags & MOD_ARR_MERGEFINAL) && j == count - 2) { - /* special case for merging first and last */ - for (i=0; i < indexLen; i++) { - if (!indexMap[i]) continue; - - /* merge v (from 'newout') into v2 (from XXX) */ - v = _E(newout_slot, indexMap[i]-1); - v2 = first_geom[i - geom_slot->len]; - - /* check in case the target vertex (v2) is already marked - for merging */ - while((v3 = BMO_slot_map_ptr_get(em->bm, &weld_op, "targetmap", v2))) - v2 = v3; - - BMO_slot_map_ptr_insert(em->bm, &weld_op, "targetmap", v, v2); - } - } - #undef _E } - if (j != 0) + /* already copied earlier, but after executation more slot + memory may be allocated */ + if (j == 0) + first_dupe_op = dupe_op; + + if (j >= 2) BMO_op_finish(em->bm, &old_dupe_op); old_dupe_op = dupe_op; } - if (j > 0) BMO_op_finish(em->bm, &dupe_op); + if ((amd->flags & MOD_ARR_MERGE) && + (amd->flags & MOD_ARR_MERGEFINAL) && + (count > 1)) { + /* Merge first and last copies. Note that we can't use the + indexMap for this because (unless the array is forming a + loop) the offset between first and last is different from + dupe X to dupe X+1. */ - /* BMESH_TODO - cap ends are not welded, even though weld is called after */ + merge_first_last(em->bm, amd, &first_dupe_op, &dupe_op, &weld_op); + } /* start capping */ - if ((start_cap || end_cap) && - - /* BMESH_TODO - theres a bug in DM_to_bmesh_ex() when in editmode! - * this needs investigation, but for now at least don't crash */ - ob->mode != OB_MODE_EDIT - - ) + if (start_cap || end_cap) { BM_mesh_elem_flag_enable_all(em->bm, BM_VERT, BM_ELEM_TAG); if (start_cap) { float startoffset[4][4]; invert_m4_m4(startoffset, offset); - bm_merge_dm_transform(em->bm, start_cap, startoffset); + bm_merge_dm_transform(em->bm, start_cap, startoffset, amd, + &first_dupe_op, "geom", &weld_op); } if (end_cap) { float endoffset[4][4]; mult_m4_m4m4(endoffset, offset, final_offset); - bm_merge_dm_transform(em->bm, end_cap, endoffset); + bm_merge_dm_transform(em->bm, end_cap, endoffset, amd, + &dupe_op, count == 1 ? "geom" : "newout", &weld_op); } } /* done capping */ + /* free remaining dupe operators */ + BMO_op_finish(em->bm, &first_dupe_op); + if (count > 2) + BMO_op_finish(em->bm, &dupe_op); + + /* run merge operator */ if (amd->flags & MOD_ARR_MERGE) { BMO_op_exec(em->bm, &weld_op); BMO_op_finish(em->bm, &weld_op); -- cgit v1.2.3 From 5b88712ff932fcbcd0bb0fb257e8e9c2e247a82a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 31 Mar 2012 00:59:17 +0000 Subject: move debug flag into its own global var (G.debug), split up debug options. --debug --debug-ffmpeg --debug-python --debug-events --debug-wm This makes debug output easier to read - event debug prints would flood output too much before. For convenience: --debug-all turns all debug flags on (works as --debug did before). also removed some redundant whitespace in debug prints and prefix some prints with __func__ to give some context. --- source/blender/blenfont/intern/blf_lang.c | 8 +-- source/blender/blenkernel/BKE_global.h | 15 ++++- source/blender/blenkernel/intern/DerivedMesh.c | 2 +- source/blender/blenkernel/intern/anim_sys.c | 34 +++++----- source/blender/blenkernel/intern/blender.c | 7 +- source/blender/blenkernel/intern/bmfont.c | 6 +- source/blender/blenkernel/intern/constraint.c | 6 +- source/blender/blenkernel/intern/depsgraph.c | 28 ++++---- source/blender/blenkernel/intern/fcurve.c | 24 +++---- source/blender/blenkernel/intern/fmodifier.c | 8 +-- source/blender/blenkernel/intern/gpencil.c | 4 +- source/blender/blenkernel/intern/ipo.c | 62 +++++++++--------- source/blender/blenkernel/intern/library.c | 13 ++-- source/blender/blenkernel/intern/nla.c | 8 +-- source/blender/blenkernel/intern/object.c | 4 +- source/blender/blenkernel/intern/ocean.c | 12 ++-- source/blender/blenkernel/intern/particle_system.c | 8 +-- source/blender/blenkernel/intern/pointcache.c | 18 ++--- source/blender/blenkernel/intern/softbody.c | 36 +++++----- source/blender/blenlib/intern/path_util.c | 2 +- source/blender/blenloader/intern/readblenentry.c | 2 +- source/blender/blenloader/intern/readfile.c | 14 ++-- source/blender/collada/AnimationImporter.cpp | 2 +- source/blender/collada/DocumentImporter.cpp | 12 ++-- source/blender/collada/ImageExporter.cpp | 2 +- source/blender/collada/MeshImporter.cpp | 2 +- .../blender/editors/animation/anim_channels_edit.c | 18 ++--- source/blender/editors/animation/anim_filter.c | 8 +-- source/blender/editors/animation/anim_markers.c | 2 +- source/blender/editors/animation/fmodifier_ui.c | 6 +- source/blender/editors/animation/keyframes_draw.c | 4 +- source/blender/editors/animation/keyframing.c | 36 +++++----- source/blender/editors/armature/editarmature.c | 10 +-- .../editors/armature/editarmature_retarget.c | 2 +- source/blender/editors/armature/reeb.c | 4 +- source/blender/editors/curve/editcurve.c | 2 +- source/blender/editors/gpencil/drawgpencil.c | 4 +- source/blender/editors/gpencil/gpencil_buttons.c | 2 +- source/blender/editors/gpencil/gpencil_paint.c | 76 +++++++++++----------- source/blender/editors/interface/interface_anim.c | 4 +- .../blender/editors/interface/interface_handlers.c | 2 +- source/blender/editors/interface/interface_icons.c | 10 +-- source/blender/editors/interface/interface_ops.c | 2 +- source/blender/editors/interface/interface_style.c | 2 +- source/blender/editors/interface/view2d.c | 4 +- source/blender/editors/object/object_constraint.c | 6 +- source/blender/editors/object/object_relations.c | 4 +- source/blender/editors/physics/particle_edit.c | 4 +- source/blender/editors/physics/particle_object.c | 2 +- source/blender/editors/physics/physics_fluid.c | 8 +-- source/blender/editors/render/render_internal.c | 4 +- source/blender/editors/screen/area.c | 2 +- source/blender/editors/screen/screen_edit.c | 10 +-- source/blender/editors/screen/screen_ops.c | 2 +- source/blender/editors/sculpt_paint/paint_image.c | 6 +- source/blender/editors/sculpt_paint/paint_undo.c | 8 ++- .../blender/editors/space_action/action_select.c | 2 +- source/blender/editors/space_graph/graph_edit.c | 2 +- source/blender/editors/space_nla/nla_channels.c | 8 +-- source/blender/editors/space_nla/nla_edit.c | 2 +- source/blender/editors/space_nla/nla_select.c | 2 +- source/blender/editors/space_node/node_edit.c | 4 +- source/blender/editors/space_view3d/drawobject.c | 2 +- source/blender/editors/util/editmode_undo.c | 4 +- source/blender/editors/util/undo.c | 10 +-- source/blender/gpu/intern/gpu_codegen.c | 6 +- source/blender/gpu/intern/gpu_extensions.c | 4 +- source/blender/imbuf/intern/cineon/cineon_dpx.c | 4 +- source/blender/imbuf/intern/tiff.c | 2 +- source/blender/imbuf/intern/util.c | 2 +- source/blender/makesdna/intern/dna_genfile.c | 2 +- source/blender/makesdna/intern/makesdna.c | 10 +-- source/blender/makesrna/intern/rna_fcurve.c | 2 +- source/blender/makesrna/intern/rna_screen.c | 2 +- .../blender/nodes/composite/node_composite_tree.c | 2 +- source/blender/python/intern/bpy_app.c | 23 ++++--- source/blender/python/intern/bpy_interface.c | 2 +- source/blender/python/intern/bpy_rna.c | 6 +- source/blender/python/intern/bpy_rna_array.c | 2 +- .../render/intern/raytrace/rayobject_octree.cpp | 4 +- .../render/intern/raytrace/rayobject_vbvh.cpp | 2 +- source/blender/render/intern/raytrace/reorganize.h | 2 +- source/blender/render/intern/raytrace/svbvh.h | 2 +- .../blender/render/intern/source/convertblender.c | 6 +- .../blender/render/intern/source/volume_precache.c | 10 +-- source/blender/windowmanager/intern/wm_cursors.c | 4 +- .../blender/windowmanager/intern/wm_event_system.c | 34 ++++++---- source/blender/windowmanager/intern/wm_init_exit.c | 2 +- source/blender/windowmanager/intern/wm_operators.c | 2 +- source/blender/windowmanager/intern/wm_subwindow.c | 5 +- source/blender/windowmanager/intern/wm_window.c | 35 ++++++---- 91 files changed, 424 insertions(+), 382 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenfont/intern/blf_lang.c b/source/blender/blenfont/intern/blf_lang.c index ee825b8179d..035aa732537 100644 --- a/source/blender/blenfont/intern/blf_lang.c +++ b/source/blender/blenfont/intern/blf_lang.c @@ -192,7 +192,7 @@ void BLF_lang_set(const char *str) locreturn = setlocale(LC_ALL, long_locale); if (locreturn == NULL) { - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("Could not change locale to %s\n", long_locale); ok = 0; @@ -209,14 +209,14 @@ void BLF_lang_set(const char *str) get_language_variable("LANGUAGE", default_language, sizeof(default_language)); if (short_locale[0]) { - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("Setting LANG= and LANGUAGE to %s\n", short_locale); BLI_setenv("LANG", short_locale); BLI_setenv("LANGUAGE", short_locale); } else { - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("Setting LANG=%s and LANGUAGE=%s\n", default_lang, default_language); BLI_setenv("LANG", default_lang); @@ -238,7 +238,7 @@ void BLF_lang_set(const char *str) get_language(long_locale, default_lang, language, sizeof(language)); - if (G.f & G_DEBUG) { + if (G.debug & G_DEBUG) { if (short_locale[0]) printf("Could not change locale to %s nor %s\n", short_locale, short_locale_utf8); else diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h index 80c9244d232..5f230e5fad9 100644 --- a/source/blender/blenkernel/BKE_global.h +++ b/source/blender/blenkernel/BKE_global.h @@ -69,6 +69,7 @@ typedef struct Global { short rt; int f; + int debug; /* Used for BMesh transformations */ struct BME_Glob *editBMesh; @@ -104,16 +105,26 @@ typedef struct Global { /* #define G_FACESELECT (1 << 8) use (mesh->editflag & ME_EDIT_PAINT_MASK) */ -#define G_DEBUG (1 << 12) #define G_SCRIPT_AUTOEXEC (1 << 13) #define G_SCRIPT_OVERRIDE_PREF (1 << 14) /* when this flag is set ignore the userprefs */ -#define G_DEBUG_FFMPEG (1 << 15) /* #define G_NOFROZEN (1 << 17) also removed */ /* #define G_GREASEPENCIL (1 << 17) also removed */ /* #define G_AUTOMATKEYS (1 << 30) also removed */ +/* G.debug */ +enum { + G_DEBUG = (1 << 0), /* general debug flag, print more info in unexpected cases */ + G_DEBUG_FFMPEG = (1 << 1), + G_DEBUG_PYTHON = (1 << 2), /* extra python info */ + G_DEBUG_EVENTS = (1 << 3), /* input/window/screen events */ + G_DEBUG_WM = (1 << 4) /* operator, undo */ +}; + +#define G_DEBUG_ALL (G_DEBUG | G_DEBUG_FFMPEG | G_DEBUG_PYTHON | G_DEBUG_EVENTS | G_DEBUG_WM) + + /* G.fileflags */ #define G_AUTOPACK (1 << 0) diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index a03bcb1fde9..0041553ec44 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -445,7 +445,7 @@ void DM_update_tessface_data(DerivedMesh *dm) numTex, numCol, hasPCol, hasOrigSpace); } - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("Updated tessellated customdata of dm %p\n", dm); dm->dirty &= ~DM_DIRTY_TESS_CDLAYERS; diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index 552c4c4e82b..fc58799eb18 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -399,7 +399,7 @@ void action_move_fcurves_by_basepath (bAction *srcAct, bAction *dstAct, const ch /* sanity checks */ if (ELEM3(NULL, srcAct, dstAct, basepath)) { - if (G.f & G_DEBUG) { + if (G.debug & G_DEBUG) { printf("ERROR: action_partition_fcurves_by_basepath(%p, %p, %p) has insufficient info to work with\n", (void *)srcAct, (void *)dstAct, (void *)basepath); } @@ -480,7 +480,7 @@ void BKE_animdata_separate_by_basepath (ID *srcID, ID *dstID, ListBase *basepath /* sanity checks */ if (ELEM(NULL, srcID, dstID)) { - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("ERROR: no source or destination ID to separate AnimData with\n"); return; } @@ -490,7 +490,7 @@ void BKE_animdata_separate_by_basepath (ID *srcID, ID *dstID, ListBase *basepath dstAdt = BKE_id_add_animdata(dstID); if (ELEM(NULL, srcAdt, dstAdt)) { - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("ERROR: no AnimData for this pair of ID's\n"); return; } @@ -980,20 +980,20 @@ KS_Path *BKE_keyingset_add_path (KeyingSet *ks, ID *id, const char group_name[], /* sanity checks */ if (ELEM(NULL, ks, rna_path)) { - printf("ERROR: no Keying Set and/or RNA Path to add path with \n"); + printf("ERROR: no Keying Set and/or RNA Path to add path with\n"); return NULL; } /* ID is required for all types of KeyingSets */ if (id == NULL) { - printf("ERROR: No ID provided for Keying Set Path. \n"); + printf("ERROR: No ID provided for Keying Set Path\n"); return NULL; } /* don't add if there is already a matching KS_Path in the KeyingSet */ if (BKE_keyingset_find_path(ks, id, group_name, rna_path, array_index, groupmode)) { - if (G.f & G_DEBUG) - printf("ERROR: destination already exists in Keying Set \n"); + if (G.debug & G_DEBUG) + printf("ERROR: destination already exists in Keying Set\n"); return NULL; } @@ -1138,8 +1138,8 @@ static short animsys_write_rna_setting (PointerRNA *ptr, char *path, int array_i int array_len= RNA_property_array_length(&new_ptr, prop); if (array_len && array_index >= array_len) { - if (G.f & G_DEBUG) { - printf("Animato: Invalid array index. ID = '%s', '%s[%d]', array length is %d \n", + if (G.debug & G_DEBUG) { + printf("Animato: Invalid array index. ID = '%s', '%s[%d]', array length is %d\n", (ptr && ptr->id.data) ? (((ID *)ptr->id.data)->name+2) : "", path, array_index, array_len-1); } @@ -1211,8 +1211,8 @@ static short animsys_write_rna_setting (PointerRNA *ptr, char *path, int array_i /* failed to get path */ // XXX don't tag as failed yet though, as there are some legit situations (Action Constraint) // where some channels will not exist, but shouldn't lock up Action - if (G.f & G_DEBUG) { - printf("Animato: Invalid path. ID = '%s', '%s[%d]' \n", + if (G.debug & G_DEBUG) { + printf("Animato: Invalid path. ID = '%s', '%s[%d]'\n", (ptr && ptr->id.data) ? (((ID *)ptr->id.data)->name+2) : "", path, array_index); } @@ -1326,7 +1326,7 @@ static void action_idcode_patch_check (ID *id, bAction *act) } else if (act->idroot != idcode) { /* only report this error if debug mode is enabled (to save performance everywhere else) */ - if (G.f & G_DEBUG) { + if (G.debug & G_DEBUG) { printf("AnimSys Safety Check Failed: Action '%s' is not meant to be used from ID-Blocks of type %d such as '%s'\n", act->id.name+2, idcode, id->name); } @@ -1592,12 +1592,12 @@ static NlaEvalChannel *nlaevalchan_verify (PointerRNA *ptr, ListBase *channels, /* a valid property must be available, and it must be animatable */ if (RNA_path_resolve(ptr, path, &new_ptr, &prop) == 0) { - if (G.f & G_DEBUG) printf("NLA Strip Eval: Cannot resolve path \n"); + if (G.debug & G_DEBUG) printf("NLA Strip Eval: Cannot resolve path\n"); return NULL; } /* only ok if animatable */ else if (RNA_property_animateable(&new_ptr, prop) == 0) { - if (G.f & G_DEBUG) printf("NLA Strip Eval: Property not animatable \n"); + if (G.debug & G_DEBUG) printf("NLA Strip Eval: Property not animatable\n"); return NULL; } @@ -2252,8 +2252,8 @@ void BKE_animsys_evaluate_all_animation (Main *main, Scene *scene, float ctime) { ID *id; - if (G.f & G_DEBUG) - printf("Evaluate all animation - %f \n", ctime); + if (G.debug & G_DEBUG) + printf("Evaluate all animation - %f\n", ctime); /* macros for less typing * - only evaluate animation data for id if it has users (and not just fake ones) @@ -2295,7 +2295,7 @@ void BKE_animsys_evaluate_all_animation (Main *main, Scene *scene, float ctime) * set correctly, so this optimization must be skipped in that case... */ if ((main->action.first == NULL) && (main->curve.first == NULL)) { - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("\tNo Actions, so no animation needs to be evaluated...\n"); return; diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c index bb52af86e00..f111640145f 100644 --- a/source/blender/blenkernel/intern/blender.c +++ b/source/blender/blenkernel/intern/blender.c @@ -281,7 +281,7 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, const char *filepath /* special cases, override loaded flags: */ if (G.f != bfd->globalf) { - const int flags_keep= (G_DEBUG | G_DEBUG_FFMPEG | G_SWAP_EXCHANGE | G_SCRIPT_AUTOEXEC | G_SCRIPT_OVERRIDE_PREF); + const int flags_keep = (G_SWAP_EXCHANGE | G_SCRIPT_AUTOEXEC | G_SCRIPT_OVERRIDE_PREF); bfd->globalf= (bfd->globalf & ~flags_keep) | (G.f & flags_keep); } @@ -606,20 +606,19 @@ void BKE_undo_step(bContext *C, int step) /* curundo should never be NULL, after restart or load file it should call undo_save */ if (curundo==NULL || curundo->prev==NULL) ; // XXX error("No undo available"); else { - if (G.f & G_DEBUG) printf("undo %s\n", curundo->name); + if (G.debug & G_DEBUG) printf("undo %s\n", curundo->name); curundo= curundo->prev; read_undosave(C, curundo); } } else { - /* curundo has to remain current situation! */ if (curundo==NULL || curundo->next==NULL) ; // XXX error("No redo available"); else { read_undosave(C, curundo->next); curundo= curundo->next; - if (G.f & G_DEBUG) printf("redo %s\n", curundo->name); + if (G.debug & G_DEBUG) printf("redo %s\n", curundo->name); } } } diff --git a/source/blender/blenkernel/intern/bmfont.c b/source/blender/blenkernel/intern/bmfont.c index 278dbe30a95..04ac6cbfb4c 100644 --- a/source/blender/blenkernel/intern/bmfont.c +++ b/source/blender/blenkernel/intern/bmfont.c @@ -138,14 +138,14 @@ void readBitmapFontVersion0(ImBuf * ibuf, unsigned char * rect, int step) bmfont->glyphs[i].sizey = buffer[index++]; bmfont->glyphs[i].advance = buffer[index++]; bmfont->glyphs[i].reserved = buffer[index++]; - if (G.f & G_DEBUG) { + if (G.debug & G_DEBUG) { printfGlyph(&bmfont->glyphs[i]); } } MEM_freeN(buffer); - if (G.f & G_DEBUG) { + if (G.debug & G_DEBUG) { printf("Oldy = %d Newy = %d\n", ibuf->y, ibuf->y - ysize); printf("glyphcount = %d\n", glyphcount); printf("bytes = %d\n", bytes); @@ -286,7 +286,7 @@ void matrixGlyph(ImBuf * ibuf, unsigned short unicode, *advance = 2.0f * bmfont->glyphs[index].advance / (float) bmfont->glyphs[0].advance; // printfGlyph(&bmfont->glyphs[index]); - // printf("%c %d %0.5f %0.5f %0.5f %0.5f %0.5f \n", unicode, index, *sizex, *sizey, *transx, *transy, *advance); + // printf("%c %d %0.5f %0.5f %0.5f %0.5f %0.5f\n", unicode, index, *sizex, *sizey, *transx, *transy, *advance); } } } diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index 8177d09c7e3..0a6e8a163cc 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -2182,8 +2182,8 @@ static void actcon_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstraint CLAMP(s, 0, 1); t = (s * (data->end-data->start)) + data->start; - if (G.f & G_DEBUG) - printf("do Action Constraint %s - Ob %s Pchan %s \n", con->name, cob->ob->id.name+2, (cob->pchan)?cob->pchan->name:NULL); + if (G.debug & G_DEBUG) + printf("do Action Constraint %s - Ob %s Pchan %s\n", con->name, cob->ob->id.name+2, (cob->pchan)?cob->pchan->name:NULL); /* Get the appropriate information from the action */ if (cob->type == CONSTRAINT_OBTYPE_BONE) { @@ -4300,7 +4300,7 @@ bConstraintTypeInfo *get_constraint_typeinfo (int type) return constraintsTypeInfo[type]; } else { - printf("No valid constraint type-info data available. Type = %i \n", type); + printf("No valid constraint type-info data available. Type = %i\n", type); } return NULL; diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c index a1a2465ceac..dd8471f0a1f 100644 --- a/source/blender/blenkernel/intern/depsgraph.c +++ b/source/blender/blenkernel/intern/depsgraph.c @@ -156,7 +156,7 @@ void push_queue(DagNodeQueue *queue, DagNode *node) int i; if (node == NULL) { - fprintf(stderr,"pushing null node \n"); + fprintf(stderr,"pushing null node\n"); return; } /*fprintf(stderr,"BFS push : %s %d\n",((ID *) node->ob)->name, queue->count);*/ @@ -267,7 +267,7 @@ DagNode * pop_queue(DagNodeQueue *queue) return node; } else { - fprintf(stderr,"return null \n"); + fprintf(stderr,"return null\n"); return NULL; } } @@ -398,7 +398,7 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O for (ct= targets.first; ct; ct= ct->next) { if (ct->tar && ct->tar != ob) { - // fprintf(stderr,"armature %s target :%s \n", ob->id.name, target->id.name); + // fprintf(stderr,"armature %s target :%s\n", ob->id.name, target->id.name); node3 = dag_get_node(dag, ct->tar); if (ct->subtarget[0]) { @@ -1115,7 +1115,7 @@ void graph_bfs(void) DagAdjList *itA; int minheight; - /* fprintf(stderr,"starting BFS \n ------------\n"); */ + /* fprintf(stderr,"starting BFS\n ------------\n"); */ nqueue = queue_create(DAGQUEUEALLOC); for ( i=0; i<50; i++) pos[i] = 0; @@ -1150,7 +1150,7 @@ void graph_bfs(void) } else { - fprintf(stderr,"bfs not dag tree edge color :%i \n",itA->node->color); + fprintf(stderr,"bfs not dag tree edge color :%i\n",itA->node->color); } @@ -1187,7 +1187,7 @@ int pre_and_post_source_BFS(DagForest *dag, short mask, DagNode *source, graph_a DagNodeQueue *nqueue; DagAdjList *itA; int retval = 0; - /* fprintf(stderr,"starting BFS \n ------------\n"); */ + /* fprintf(stderr,"starting BFS\n ------------\n"); */ /* Init * dagnode.first is always the root (scene) @@ -1248,7 +1248,7 @@ DagNodeQueue * graph_dfs(void) int maxpos=0; /* int is_cycle = 0; */ /* UNUSED */ /* - *fprintf(stderr,"starting DFS \n ------------\n"); + *fprintf(stderr,"starting DFS\n ------------\n"); */ nqueue = queue_create(DAGQUEUEALLOC); retqueue = queue_create(MainDag->numNodes); @@ -1302,7 +1302,7 @@ DagNodeQueue * graph_dfs(void) } else { if (itA->node->color == DAG_GRAY) { // back edge - fprintf(stderr,"dfs back edge :%15s %15s \n",((ID *) node->ob)->name, ((ID *) itA->node->ob)->name); + fprintf(stderr,"dfs back edge :%15s %15s\n",((ID *) node->ob)->name, ((ID *) itA->node->ob)->name); /* is_cycle = 1; */ /* UNUSED */ } else if (itA->node->color == DAG_BLACK) { @@ -1313,7 +1313,7 @@ DagNodeQueue * graph_dfs(void) /*if (node->DFS_dist >= itA->node->DFS_dist) itA->node->DFS_dist = node->DFS_dist + 1; - fprintf(stderr,"dfs forward or cross edge :%15s %i-%i %15s %i-%i \n", + fprintf(stderr,"dfs forward or cross edge :%15s %i-%i %15s %i-%i\n", ((ID *) node->ob)->name, node->DFS_dvtm, node->DFS_fntm, @@ -1323,7 +1323,7 @@ DagNodeQueue * graph_dfs(void) */ } else - fprintf(stderr,"dfs unknown edge \n"); + fprintf(stderr,"dfs unknown edge\n"); } itA = itA->next; } @@ -1354,7 +1354,7 @@ DagNodeQueue * graph_dfs(void) } node = node->next; } while (node); -// fprintf(stderr,"i size : %i \n", maxpos); +// fprintf(stderr,"i size : %i\n", maxpos); queue_delete(nqueue); return(retqueue); @@ -1378,7 +1378,7 @@ int pre_and_post_source_DFS(DagForest *dag, short mask, DagNode *source, graph_a int skip = 0; int retval = 0; /* - *fprintf(stderr,"starting DFS \n ------------\n"); + *fprintf(stderr,"starting DFS\n ------------\n"); */ nqueue = queue_create(DAGQUEUEALLOC); @@ -1800,7 +1800,7 @@ void DAG_scene_sort(Main *bmain, Scene *sce) while (base) { BLI_remlink(&sce->base,base); BLI_addhead(&tempbase,base); - //if(G.f & G_DEBUG) + //if(G.debug & G_DEBUG) printf("cyclic %s\n", base->object->id.name); base = sce->base.first; } @@ -1811,7 +1811,7 @@ void DAG_scene_sort(Main *bmain, Scene *sce) /* all groups with objects in this scene gets resorted too */ scene_sort_groups(bmain, sce); - if (G.f & G_DEBUG) { + if (G.debug & G_DEBUG) { printf("\nordered\n"); for (base = sce->base.first; base; base= base->next) { printf(" %s\n", base->object->id.name); diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index 5f1201ec378..bb8cfe37a88 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -370,7 +370,7 @@ int binarysearch_bezt_index (BezTriple array[], float frame, int arraylen, short * - keyframe to be added would replace one of the existing ones on bounds */ if ((arraylen <= 0) || (array == NULL)) { - printf("Warning: binarysearch_bezt_index() encountered invalid array \n"); + printf("Warning: binarysearch_bezt_index() encountered invalid array\n"); return 0; } else { @@ -420,10 +420,10 @@ int binarysearch_bezt_index (BezTriple array[], float frame, int arraylen, short /* print error if loop-limit exceeded */ if (loopbreaker == (maxloop-1)) { - printf("Error: binarysearch_bezt_index() was taking too long \n"); + printf("Error: binarysearch_bezt_index() was taking too long\n"); // include debug info - printf("\tround = %d: start = %d, end = %d, arraylen = %d \n", loopbreaker, start, end, arraylen); + printf("\tround = %d: start = %d, end = %d, arraylen = %d\n", loopbreaker, start, end, arraylen); } /* not found, so return where to place it */ @@ -546,7 +546,7 @@ void calc_fcurve_bounds (FCurve *fcu, float *xmin, float *xmax, float *ymin, flo if (ymax) *ymax= ymaxv; } else { - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("F-Curve calc bounds didn't find anything, so assuming minimum bounds of 1.0\n"); if (xmin) *xmin= 0.0f; @@ -743,7 +743,7 @@ void fcurve_store_samples (FCurve *fcu, void *data, int start, int end, FcuSampl return; } if (start >= end) { - printf("Error: Frame range for Sampled F-Curve creation is inappropriate \n"); + printf("Error: Frame range for Sampled F-Curve creation is inappropriate\n"); return; } @@ -1009,8 +1009,8 @@ static float dtar_get_prop_val (ChannelDriver *driver, DriverTarget *dtar) /* error check for missing pointer... */ // TODO: tag the specific target too as having issues if (id == NULL) { - printf("Error: driver has an invalid target to use \n"); - if (G.f & G_DEBUG) printf("\tpath = %s\n", dtar->rna_path); + printf("Error: driver has an invalid target to use\n"); + if (G.debug & G_DEBUG) printf("\tpath = %s\n", dtar->rna_path); driver->flag |= DRIVER_FLAG_INVALID; return 0.0f; } @@ -1060,8 +1060,8 @@ static float dtar_get_prop_val (ChannelDriver *driver, DriverTarget *dtar) } else { - if (G.f & G_DEBUG) - printf("Driver Evaluation Error: cannot resolve target for %s -> %s \n", id->name, dtar->rna_path); + if (G.debug & G_DEBUG) + printf("Driver Evaluation Error: cannot resolve target for %s -> %s\n", id->name, dtar->rna_path); driver->flag |= DRIVER_FLAG_INVALID; return 0.0f; @@ -1118,11 +1118,11 @@ static float dvar_eval_rotDiff (ChannelDriver *driver, DriverVar *dvar) /* check what the error was */ if ((pchan == NULL) && (pchan2 == NULL)) - printf("Driver Evaluation Error: Rotational difference failed - first 2 targets invalid \n"); + printf("Driver Evaluation Error: Rotational difference failed - first 2 targets invalid\n"); else if (pchan == NULL) - printf("Driver Evaluation Error: Rotational difference failed - first target not valid PoseChannel \n"); + printf("Driver Evaluation Error: Rotational difference failed - first target not valid PoseChannel\n"); else if (pchan2 == NULL) - printf("Driver Evaluation Error: Rotational difference failed - second target not valid PoseChannel \n"); + printf("Driver Evaluation Error: Rotational difference failed - second target not valid PoseChannel\n"); /* stop here... */ return 0.0f; diff --git a/source/blender/blenkernel/intern/fmodifier.c b/source/blender/blenkernel/intern/fmodifier.c index 693c036d124..bbd07693cea 100644 --- a/source/blender/blenkernel/intern/fmodifier.c +++ b/source/blender/blenkernel/intern/fmodifier.c @@ -369,7 +369,7 @@ static void fcm_fn_generator_evaluate (FCurve *UNUSED(fcu), FModifier *fcm, floa break; default: - printf("Invalid Function-Generator for F-Modifier - %d \n", data->type); + printf("Invalid Function-Generator for F-Modifier - %d\n", data->type); } /* execute function callback to set value if appropriate */ @@ -973,7 +973,7 @@ FModifierTypeInfo *get_fmodifier_typeinfo (int type) return fmodifiersTypeInfo[type]; } else { - printf("No valid F-Curve Modifier type-info data available. Type = %i \n", type); + printf("No valid F-Curve Modifier type-info data available. Type = %i\n", type); } return NULL; @@ -1007,7 +1007,7 @@ FModifier *add_fmodifier (ListBase *modifiers, int type) if ((modifiers->first) && (type == FMODIFIER_TYPE_CYCLES)) { /* cycles modifier must be first in stack, so for now, don't add if it can't be */ // TODO: perhaps there is some better way, but for now, - printf("Error: Cannot add 'Cycles' modifier to F-Curve, as 'Cycles' modifier can only be first in stack. \n"); + printf("Error: Cannot add 'Cycles' modifier to F-Curve, as 'Cycles' modifier can only be first in stack.\n"); return NULL; } @@ -1106,7 +1106,7 @@ int remove_fmodifier (ListBase *modifiers, FModifier *fcm) } else { // XXX this case can probably be removed some day, as it shouldn't happen... - printf("remove_fmodifier() - no modifier stack given \n"); + printf("remove_fmodifier() - no modifier stack given\n"); MEM_freeN(fcm); return 0; } diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c index adbc0f03528..811cb881f6e 100644 --- a/source/blender/blenkernel/intern/gpencil.c +++ b/source/blender/blenkernel/intern/gpencil.c @@ -151,7 +151,7 @@ bGPDframe *gpencil_frame_addnew (bGPDlayer *gpl, int cframe) /* check whether frame was added successfully */ if (state == -1) { MEM_freeN(gpf); - printf("Error: frame (%d) existed already for this layer \n", cframe); + printf("Error: frame (%d) existed already for this layer\n", cframe); } else if (state == 0) { /* add to end then! */ @@ -428,7 +428,7 @@ bGPDframe *gpencil_layer_getframe (bGPDlayer *gpl, int cframe, short addnew) gpl->actframe= gpf; else { /* unresolved errogenous situation! */ - printf("Error: cannot find appropriate gp-frame \n"); + printf("Error: cannot find appropriate gp-frame\n"); /* gpl->actframe should still be NULL */ } } diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c index c454acd7c81..51c4caa1cf4 100644 --- a/source/blender/blenkernel/intern/ipo.c +++ b/source/blender/blenkernel/intern/ipo.c @@ -97,8 +97,8 @@ void free_ipo (Ipo *ipo) BLI_freelinkN(&ipo->curve, icu); } - if (G.f & G_DEBUG) - printf("Freed %d (Unconverted) Ipo-Curves from IPO '%s' \n", n, ipo->id.name+2); + if (G.debug & G_DEBUG) + printf("Freed %d (Unconverted) Ipo-Curves from IPO '%s'\n", n, ipo->id.name+2); } /* *************************************************** */ @@ -296,7 +296,7 @@ static const char *pchan_adrcodes_to_paths (int adrcode, int *array_index) } /* for debugging only */ - printf("ERROR: unmatched PoseChannel setting (code %d) \n", adrcode); + printf("ERROR: unmatched PoseChannel setting (code %d)\n", adrcode); return NULL; } @@ -893,7 +893,7 @@ static char *get_rna_access (int blocktype, int adrcode, char actname[], char co // TODO... add other blocktypes... default: - printf("IPO2ANIMATO WARNING: No path for blocktype %d, adrcode %d yet \n", blocktype, adrcode); + printf("IPO2ANIMATO WARNING: No path for blocktype %d, adrcode %d yet\n", blocktype, adrcode); break; } @@ -1199,7 +1199,7 @@ static void icu_to_fcurves (ID *id, ListBase *groups, ListBase *list, IpoCurve * FCurve *fcurve; int b; - if (G.f & G_DEBUG) printf("\tconvert bitflag ipocurve, totbits = %d \n", totbits); + if (G.debug & G_DEBUG) printf("\tconvert bitflag ipocurve, totbits = %d\n", totbits); /* add the 'only int values' flag */ fcu->flag |= (FCURVE_INT_VALUES|FCURVE_DISCRETE_VALUES); @@ -1396,7 +1396,7 @@ static void ipo_to_animato (ID *id, Ipo *ipo, char actname[], char constname[], if (ELEM3(NULL, ipo, anim, drivers)) return; - if (G.f & G_DEBUG) printf("ipo_to_animato \n"); + if (G.debug & G_DEBUG) printf("ipo_to_animato\n"); /* validate actname and constname * - clear actname if it was one of the generic ones (i.e. 'Object', or 'Shapes') @@ -1521,12 +1521,12 @@ static void ipo_to_animdata (ID *id, Ipo *ipo, char actname[], char constname[], if (ELEM(NULL, id, ipo)) return; if (adt == NULL) { - printf("ERROR ipo_to_animdata(): adt invalid \n"); + printf("ERROR ipo_to_animdata(): adt invalid\n"); return; } - if (G.f & G_DEBUG) { - printf("ipo to animdata - ID:%s, IPO:%s, actname:%s constname:%s seqname:%s curves:%d \n", + if (G.debug & G_DEBUG) { + printf("ipo to animdata - ID:%s, IPO:%s, actname:%s constname:%s seqname:%s curves:%d\n", id->name+2, ipo->id.name+2, (actname)?actname:"", (constname)?constname:"", (seq)?(seq->name+2):"", BLI_countlist(&ipo->curve)); } @@ -1539,7 +1539,7 @@ static void ipo_to_animdata (ID *id, Ipo *ipo, char actname[], char constname[], /* deal with animation first */ if (anim.first) { - if (G.f & G_DEBUG) printf("\thas anim \n"); + if (G.debug & G_DEBUG) printf("\thas anim\n"); /* try to get action */ if (adt->action == NULL) { char nameBuf[MAX_ID_NAME]; @@ -1547,7 +1547,7 @@ static void ipo_to_animdata (ID *id, Ipo *ipo, char actname[], char constname[], BLI_snprintf(nameBuf, sizeof(nameBuf), "CDA:%s", ipo->id.name+2); adt->action= add_empty_action(nameBuf); - if (G.f & G_DEBUG) printf("\t\tadded new action - '%s' \n", nameBuf); + if (G.debug & G_DEBUG) printf("\t\tadded new action - '%s'\n", nameBuf); } /* add F-Curves to action */ @@ -1556,7 +1556,7 @@ static void ipo_to_animdata (ID *id, Ipo *ipo, char actname[], char constname[], /* deal with drivers */ if (drivers.first) { - if (G.f & G_DEBUG) printf("\thas drivers \n"); + if (G.debug & G_DEBUG) printf("\thas drivers\n"); /* add drivers to end of driver stack */ BLI_movelisttolist(&adt->drivers, &drivers); } @@ -1576,7 +1576,7 @@ static void action_to_animdata (ID *id, bAction *act) /* check if we need to set this Action as the AnimData's action */ if (adt->action == NULL) { /* set this Action as AnimData's Action */ - if (G.f & G_DEBUG) printf("act_to_adt - set adt action to act \n"); + if (G.debug & G_DEBUG) printf("act_to_adt - set adt action to act\n"); adt->action= act; } @@ -1685,17 +1685,17 @@ void do_versions_ipos_to_animato(Main *main) ID *id; if (main == NULL) { - printf("Argh! Main is NULL in do_versions_ipos_to_animato() \n"); + printf("Argh! Main is NULL in do_versions_ipos_to_animato()\n"); return; } /* only convert if version is right */ if (main->versionfile >= 250) { - printf("WARNING: Animation data too new to convert (Version %d) \n", main->versionfile); + printf("WARNING: Animation data too new to convert (Version %d)\n", main->versionfile); return; } - else if (G.f & G_DEBUG) - printf("INFO: Converting to Animato... \n"); + else if (G.debug & G_DEBUG) + printf("INFO: Converting to Animato...\n"); /* ----------- Animation Attached to Data -------------- */ @@ -1706,7 +1706,7 @@ void do_versions_ipos_to_animato(Main *main) bConstraint *con; bConstraintChannel *conchan, *conchann; - if (G.f & G_DEBUG) printf("\tconverting ob %s \n", id->name+2); + if (G.debug & G_DEBUG) printf("\tconverting ob %s\n", id->name+2); /* check if object has any animation data */ if (ob->nlastrips.first) { @@ -1831,7 +1831,7 @@ void do_versions_ipos_to_animato(Main *main) for (id= main->key.first; id; id= id->next) { Key *key= (Key *)id; - if (G.f & G_DEBUG) printf("\tconverting key %s \n", id->name+2); + if (G.debug & G_DEBUG) printf("\tconverting key %s\n", id->name+2); /* we're only interested in the IPO * NOTE: for later, it might be good to port these over to Object instead, as many of these @@ -1856,7 +1856,7 @@ void do_versions_ipos_to_animato(Main *main) for (id= main->mat.first; id; id= id->next) { Material *ma= (Material *)id; - if (G.f & G_DEBUG) printf("\tconverting material %s \n", id->name+2); + if (G.debug & G_DEBUG) printf("\tconverting material %s\n", id->name+2); /* we're only interested in the IPO */ if (ma->ipo) { @@ -1878,7 +1878,7 @@ void do_versions_ipos_to_animato(Main *main) for (id= main->world.first; id; id= id->next) { World *wo= (World *)id; - if (G.f & G_DEBUG) printf("\tconverting world %s \n", id->name+2); + if (G.debug & G_DEBUG) printf("\tconverting world %s\n", id->name+2); /* we're only interested in the IPO */ if (wo->ipo) { @@ -1909,8 +1909,8 @@ void do_versions_ipos_to_animato(Main *main) IpoCurve *icu = (seq->ipo) ? seq->ipo->curve.first : NULL; short adrcode = SEQ_FAC1; - if (G.f & G_DEBUG) - printf("\tconverting sequence strip %s \n", seq->name+2); + if (G.debug & G_DEBUG) + printf("\tconverting sequence strip %s\n", seq->name+2); if (ELEM(NULL, seq->ipo, icu)) { seq->flag |= SEQ_USE_EFFECT_DEFAULT_FADE; @@ -1953,7 +1953,7 @@ void do_versions_ipos_to_animato(Main *main) for (id= main->tex.first; id; id= id->next) { Tex *te= (Tex *)id; - if (G.f & G_DEBUG) printf("\tconverting texture %s \n", id->name+2); + if (G.debug & G_DEBUG) printf("\tconverting texture %s\n", id->name+2); /* we're only interested in the IPO */ if (te->ipo) { @@ -1975,7 +1975,7 @@ void do_versions_ipos_to_animato(Main *main) for (id= main->camera.first; id; id= id->next) { Camera *ca= (Camera *)id; - if (G.f & G_DEBUG) printf("\tconverting camera %s \n", id->name+2); + if (G.debug & G_DEBUG) printf("\tconverting camera %s\n", id->name+2); /* we're only interested in the IPO */ if (ca->ipo) { @@ -1997,7 +1997,7 @@ void do_versions_ipos_to_animato(Main *main) for (id= main->lamp.first; id; id= id->next) { Lamp *la= (Lamp *)id; - if (G.f & G_DEBUG) printf("\tconverting lamp %s \n", id->name+2); + if (G.debug & G_DEBUG) printf("\tconverting lamp %s\n", id->name+2); /* we're only interested in the IPO */ if (la->ipo) { @@ -2019,7 +2019,7 @@ void do_versions_ipos_to_animato(Main *main) for (id= main->curve.first; id; id= id->next) { Curve *cu= (Curve *)id; - if (G.f & G_DEBUG) printf("\tconverting curve %s \n", id->name+2); + if (G.debug & G_DEBUG) printf("\tconverting curve %s\n", id->name+2); /* we're only interested in the IPO */ if (cu->ipo) { @@ -2052,7 +2052,7 @@ void do_versions_ipos_to_animato(Main *main) for (id= main->action.first; id; id= id->next) { bAction *act= (bAction *)id; - if (G.f & G_DEBUG) printf("\tconverting action %s \n", id->name+2); + if (G.debug & G_DEBUG) printf("\tconverting action %s\n", id->name+2); /* if old action, it will be object-only... */ if (act->chanbase.first) @@ -2066,7 +2066,7 @@ void do_versions_ipos_to_animato(Main *main) for (id= main->ipo.first; id; id= id->next) { Ipo *ipo= (Ipo *)id; - if (G.f & G_DEBUG) printf("\tconverting ipo %s \n", id->name+2); + if (G.debug & G_DEBUG) printf("\tconverting ipo %s\n", id->name+2); /* most likely this IPO has already been processed, so check if any curves left to convert */ if (ipo->curve.first) { @@ -2086,7 +2086,7 @@ void do_versions_ipos_to_animato(Main *main) /* free unused drivers from actions + ipos */ free_fcurves(&drivers); - if (G.f & G_DEBUG) - printf("INFO: Animato convert done \n"); + if (G.debug & G_DEBUG) + printf("INFO: Animato convert done\n"); } diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index 2dcfb744cd2..3c6c3f8c232 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -165,12 +165,15 @@ void id_us_plus(ID *id) void id_us_min(ID *id) { if (id) { - if (id->us<2 && (id->flag & LIB_FAKEUSER)) - id->us= 1; - else if (id->us<=0) - printf("ID user decrement error: %s \n", id->name); - else + if (id->us < 2 && (id->flag & LIB_FAKEUSER)) { + id->us= 1; + } + else if (id->us <= 0) { + printf("ID user decrement error: %s\n", id->name); + } + else { id->us--; + } } } diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c index 9c8bda97435..56fec119cce 100644 --- a/source/blender/blenkernel/intern/nla.c +++ b/source/blender/blenkernel/intern/nla.c @@ -1484,7 +1484,7 @@ void BKE_nla_action_pushdown (AnimData *adt) */ // TODO: what about modifiers? if (action_has_motion(adt->action) == 0) { - printf("BKE_nla_action_pushdown(): action has no data \n"); + printf("BKE_nla_action_pushdown(): action has no data\n"); return; } @@ -1576,9 +1576,9 @@ short BKE_nla_tweakmode_enter (AnimData *adt) } if (ELEM3(NULL, activeTrack, activeStrip, activeStrip->act)) { - if (G.f & G_DEBUG) { - printf("NLA tweakmode enter - neither active requirement found \n"); - printf("\tactiveTrack = %p, activeStrip = %p \n", (void *)activeTrack, (void *)activeStrip); + if (G.debug & G_DEBUG) { + printf("NLA tweakmode enter - neither active requirement found\n"); + printf("\tactiveTrack = %p, activeStrip = %p\n", (void *)activeTrack, (void *)activeStrip); } return 0; } diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index cc5e59a6e92..c62653b29e7 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -2530,7 +2530,7 @@ void object_handle_update(Scene *scene, Object *ob) // XXX: should this case be OB_RECALC_OB instead? if (ob->recalc & OB_RECALC_ALL) { - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("recalcob %s\n", ob->id.name+2); /* handle proxy copy for target */ @@ -2558,7 +2558,7 @@ void object_handle_update(Scene *scene, Object *ob) ListBase pidlist; PTCacheID *pid; - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("recalcdata %s\n", ob->id.name+2); if (adt) { diff --git a/source/blender/blenkernel/intern/ocean.c b/source/blender/blenkernel/intern/ocean.c index ae13613fc14..907de7888cb 100644 --- a/source/blender/blenkernel/intern/ocean.c +++ b/source/blender/blenkernel/intern/ocean.c @@ -1173,18 +1173,18 @@ void BKE_simulate_ocean_cache(struct OceanCache *och, int frame) cache_filename(string, och->bakepath, och->relbase, frame, CACHE_TYPE_DISPLACE); och->ibufs_disp[f] = IMB_loadiffname(string, 0); - //if (och->ibufs_disp[f] == NULL) printf("error loading %s \n", string); - //else printf("loaded cache %s \n", string); + //if (och->ibufs_disp[f] == NULL) printf("error loading %s\n", string); + //else printf("loaded cache %s\n", string); cache_filename(string, och->bakepath, och->relbase, frame, CACHE_TYPE_FOAM); och->ibufs_foam[f] = IMB_loadiffname(string, 0); - //if (och->ibufs_foam[f] == NULL) printf("error loading %s \n", string); - //else printf("loaded cache %s \n", string); + //if (och->ibufs_foam[f] == NULL) printf("error loading %s\n", string); + //else printf("loaded cache %s\n", string); cache_filename(string, och->bakepath, och->relbase, frame, CACHE_TYPE_NORMAL); och->ibufs_norm[f] = IMB_loadiffname(string, 0); - //if (och->ibufs_norm[f] == NULL) printf("error loading %s \n", string); - //else printf("loaded cache %s \n", string); + //if (och->ibufs_norm[f] == NULL) printf("error loading %s\n", string); + //else printf("loaded cache %s\n", string); } diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 445e34e43c7..aadd9d675b0 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -1131,7 +1131,7 @@ static int distribute_threads_init_data(ParticleThread *threads, Scene *scene, D if (totelem == 0) { distribute_invalid(scene, psys, children ? PART_FROM_CHILD : 0); - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) fprintf(stderr,"Particle distribution error: Nothing to emit from!\n"); if (dm != finaldm) dm->release(dm); @@ -4076,7 +4076,7 @@ static void particles_fluid_step(ParticleSimulationData *sim, int UNUSED(cfra)) gzf = BLI_gzopen(filename, "rb"); if (!gzf) { - BLI_snprintf(debugStrBuffer, sizeof(debugStrBuffer),"readFsPartData::error - Unable to open file for reading '%s' \n", filename); + BLI_snprintf(debugStrBuffer, sizeof(debugStrBuffer),"readFsPartData::error - Unable to open file for reading '%s'\n", filename); // XXX bad level call elbeemDebugOut(debugStrBuffer); return; } @@ -4125,7 +4125,7 @@ static void particles_fluid_step(ParticleSimulationData *sim, int UNUSED(cfra)) pa->dietime = sim->scene->r.efra + 1; pa->lifetime = sim->scene->r.efra; pa->alive = PARS_ALIVE; - //if(a<25) fprintf(stderr,"FSPARTICLE debug set %s , a%d = %f,%f,%f , life=%f \n", filename, a, pa->co[0],pa->co[1],pa->co[2], pa->lifetime ); + //if(a<25) fprintf(stderr,"FSPARTICLE debug set %s , a%d = %f,%f,%f , life=%f\n", filename, a, pa->co[0],pa->co[1],pa->co[2], pa->lifetime ); } else { // skip... @@ -4138,7 +4138,7 @@ static void particles_fluid_step(ParticleSimulationData *sim, int UNUSED(cfra)) gzclose(gzf); totpart = psys->totpart = activeParts; - BLI_snprintf(debugStrBuffer,sizeof(debugStrBuffer),"readFsPartData::done - particles:%d, active:%d, file:%d, mask:%d \n", psys->totpart,activeParts,fileParts,readMask); + BLI_snprintf(debugStrBuffer,sizeof(debugStrBuffer),"readFsPartData::done - particles:%d, active:%d, file:%d, mask:%d\n", psys->totpart,activeParts,fileParts,readMask); // bad level call // XXX elbeemDebugOut(debugStrBuffer); diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 76195c29fb3..a383fac07c9 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -1623,7 +1623,7 @@ static PTCacheMem *ptcache_disk_frame_to_mem(PTCacheID *pid, int cfra) ptcache_file_close(pf); - if (error && G.f & G_DEBUG) + if (error && G.debug & G_DEBUG) printf("Error reading from disk cache\n"); return pm; @@ -1638,7 +1638,7 @@ static int ptcache_mem_frame_to_disk(PTCacheID *pid, PTCacheMem *pm) pf = ptcache_file_open(pid, PTCACHE_FILE_WRITE, pm->frame); if (pf==NULL) { - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("Error opening disk cache file for writing\n"); return 0; } @@ -1707,7 +1707,7 @@ static int ptcache_mem_frame_to_disk(PTCacheID *pid, PTCacheMem *pm) ptcache_file_close(pf); - if (error && G.f & G_DEBUG) + if (error && G.debug & G_DEBUG) printf("Error writing to disk cache\n"); return error==0; @@ -1722,7 +1722,7 @@ static int ptcache_read_stream(PTCacheID *pid, int cfra) return 0; if (pf == NULL) { - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("Error opening disk cache file for reading\n"); return 0; } @@ -1933,7 +1933,7 @@ static int ptcache_write_stream(PTCacheID *pid, int cfra, int totpoint) pf = ptcache_file_open(pid, PTCACHE_FILE_WRITE, cfra); if (pf==NULL) { - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("Error opening disk cache file for writing\n"); return 0; } @@ -1951,7 +1951,7 @@ static int ptcache_write_stream(PTCacheID *pid, int cfra, int totpoint) ptcache_file_close(pf); - if (error && G.f & G_DEBUG) + if (error && G.debug & G_DEBUG) printf("Error writing to disk cache\n"); return error == 0; @@ -2750,7 +2750,7 @@ static void *ptcache_bake_thread(void *ptr) ptcache_dt_to_str(run, ctime-stime); ptcache_dt_to_str(etd, fetd); - printf("Baked for %s, current frame: %i/%i (%.3fs), ETC: %s \r", run, *data->cfra_ptr-sfra+1, efra-sfra+1, ctime-ptime, etd); + printf("Baked for %s, current frame: %i/%i (%.3fs), ETC: %s\r", run, *data->cfra_ptr-sfra+1, efra-sfra+1, ctime-ptime, etd); } ptime = ctime; } @@ -2758,7 +2758,7 @@ static void *ptcache_bake_thread(void *ptr) if (usetimer) { ptcache_dt_to_str(run, PIL_check_seconds_timer()-stime); - printf("Bake %s %s (%i frames simulated). \n", (data->break_operation ? "canceled after" : "finished in"), run, *data->cfra_ptr-sfra); + printf("Bake %s %s (%i frames simulated).\n", (data->break_operation ? "canceled after" : "finished in"), run, *data->cfra_ptr-sfra); } data->thread_ended = TRUE; @@ -3034,7 +3034,7 @@ void BKE_ptcache_toggle_disk_cache(PTCacheID *pid) if (!G.relbase_valid) { cache->flag &= ~PTCACHE_DISK_CACHE; - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("File must be saved before using disk cache!\n"); return; } diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c index 4206c9921df..dc7a211a3c1 100644 --- a/source/blender/blenkernel/intern/softbody.c +++ b/source/blender/blenkernel/intern/softbody.c @@ -236,7 +236,7 @@ static float _final_goal(Object *ob,BodyPoint *bp)/*jow_go_for2_5 */ return (f); } } - printf("_final_goal failed! sb or bp ==NULL \n" ); + printf("_final_goal failed! sb or bp ==NULL\n" ); return f; /*using crude but spot able values some times helps debuggin */ } @@ -248,7 +248,7 @@ static float _final_mass(Object *ob,BodyPoint *bp) return(bp->mass*sb->nodemass); } } - printf("_final_mass failed! sb or bp ==NULL \n" ); + printf("_final_mass failed! sb or bp ==NULL\n" ); return 1.0f; } /* helper functions for everything is animateble jow_go_for2_5 ------*/ @@ -1067,7 +1067,7 @@ static int sb_detect_aabb_collisionCached( float UNUSED(force[3]), unsigned int } else { /*aye that should be cached*/ - printf("missing cache error \n"); + printf("missing cache error\n"); BLI_ghashIterator_step(ihash); continue; } @@ -1134,7 +1134,7 @@ static int sb_detect_face_pointCached(float face_v1[3],float face_v2[3],float fa } else { /*aye that should be cached*/ - printf("missing cache error \n"); + printf("missing cache error\n"); BLI_ghashIterator_step(ihash); continue; } @@ -1229,7 +1229,7 @@ static int sb_detect_face_collisionCached(float face_v1[3],float face_v2[3],floa } else { /*aye that should be cached*/ - printf("missing cache error \n"); + printf("missing cache error\n"); BLI_ghashIterator_step(ihash); continue; } @@ -1457,7 +1457,7 @@ static int sb_detect_edge_collisionCached(float edge_v1[3],float edge_v2[3],floa } else { /*aye that should be cached*/ - printf("missing cache error \n"); + printf("missing cache error\n"); BLI_ghashIterator_step(ihash); continue; } @@ -1794,7 +1794,7 @@ static int sb_detect_vertex_collisionCached(float opco[3], float facenormal[3], } else { /*aye that should be cached*/ - printf("missing cache error \n"); + printf("missing cache error\n"); BLI_ghashIterator_step(ihash); continue; } @@ -2185,7 +2185,7 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, Object *ob, flo /* --- could be done on object level to squeeze out the last bits of it */ } else { - printf("Error expected a SB here \n"); + printf("Error expected a SB here\n"); return (999); } @@ -2395,7 +2395,7 @@ static void sb_cf_threads_run(Scene *scene, Object *ob, float forcetime, float t totthread--; } - /* printf("sb_cf_threads_run spawning %d threads \n",totthread); */ + /* printf("sb_cf_threads_run spawning %d threads\n",totthread); */ sb_threads= MEM_callocN(sizeof(SB_thread_context)*totthread, "SBThread"); memset(sb_threads, 0, sizeof(SB_thread_context)*totthread); @@ -2874,7 +2874,7 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa */ } else { - printf("Matrix inversion failed \n"); + printf("Matrix inversion failed\n"); for (a=sb->totpoint, bp= sb->bpoint; a>0; a--, bp++) { copy_v3_v3(bp->impdv,bp->force); } @@ -3017,7 +3017,7 @@ static void softbody_apply_forces(Object *ob, float forcetime, int mode, float * *err = MAX2(maxerrpos,maxerrvel); else *err = maxerrpos; - //printf("EP %f EV %f \n",maxerrpos,maxerrvel); + //printf("EP %f EV %f\n",maxerrpos,maxerrvel); if (fuzzy) { *err /= sb->fuzzyness; } @@ -3308,11 +3308,11 @@ static void mesh_to_softbody(Scene *scene, Object *ob) if (sb->namedVG_Mass[0]) { int grp= defgroup_name_index (ob,sb->namedVG_Mass); - /* printf("VGN %s %d \n",sb->namedVG_Mass,grp); */ + /* printf("VGN %s %d\n",sb->namedVG_Mass,grp); */ if (grp > -1) { get_scalar_from_vertexgroup(ob, a,(short) (grp), &bp->mass); /* 2.5 bp->mass = bp->mass * sb->nodemass; */ - /* printf("bp->mass %f \n",bp->mass); */ + /* printf("bp->mass %f\n",bp->mass); */ } } @@ -3322,10 +3322,10 @@ static void mesh_to_softbody(Scene *scene, Object *ob) if (sb->namedVG_Spring_K[0]) { int grp= defgroup_name_index (ob,sb->namedVG_Spring_K); - //printf("VGN %s %d \n",sb->namedVG_Spring_K,grp); + //printf("VGN %s %d\n",sb->namedVG_Spring_K,grp); if (grp > -1) { get_scalar_from_vertexgroup(ob, a,(short) (grp), &bp->springweight); - //printf("bp->springweight %f \n",bp->springweight); + //printf("bp->springweight %f\n",bp->springweight); } } @@ -3405,7 +3405,7 @@ static void reference_to_scratch(Object *ob) } mul_v3_fl(accu_pos,1.0f/accu_mass); copy_v3_v3(sb->scratch->Ref.com,accu_pos); - /* printf("reference_to_scratch \n"); */ + /* printf("reference_to_scratch\n"); */ } /* @@ -4012,7 +4012,7 @@ static void softbody_step(Scene *scene, Object *ob, SoftBody *sb, float dtime) interpolate_exciter(ob, 2, 2); softbody_apply_goalsnap(ob); - // if (G.f & G_DEBUG) { + // if (G.debug & G_DEBUG) { if (sb->solverflags & SBSO_MONITOR ) { if (loops > HEUNWARNLIMIT) /* monitor high loop counts */ printf("\r needed %d steps/frame",loops); @@ -4039,7 +4039,7 @@ static void softbody_step(Scene *scene, Object *ob, SoftBody *sb, float dtime) if (sb->solverflags & SBSO_MONITOR ) { sct=PIL_check_seconds_timer(); - if ((sct-sst > 0.5f) || (G.f & G_DEBUG)) printf(" solver time %f sec %s \n",sct-sst,ob->id.name); + if ((sct-sst > 0.5f) || (G.debug & G_DEBUG)) printf(" solver time %f sec %s\n",sct-sst,ob->id.name); } } diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c index 2bbc4517da1..df711150b97 100644 --- a/source/blender/blenlib/intern/path_util.c +++ b/source/blender/blenlib/intern/path_util.c @@ -1657,7 +1657,7 @@ int BKE_rebase_path(char *abs, size_t abs_len, char *rel, size_t rel_len, const /* return 2 if src=dest */ if (BLI_path_cmp(path, dest_path) == 0) { - // if (G.f & G_DEBUG) printf("%s and %s are the same file\n", path, dest_path); + // if (G.debug & G_DEBUG) printf("%s and %s are the same file\n", path, dest_path); return 2; } diff --git a/source/blender/blenloader/intern/readblenentry.c b/source/blender/blenloader/intern/readblenentry.c index 6f138d5df23..ccf0c226570 100644 --- a/source/blender/blenloader/intern/readblenentry.c +++ b/source/blender/blenloader/intern/readblenentry.c @@ -115,7 +115,7 @@ void BLO_blendhandle_print_sizes(BlendHandle *bh, void *fp) buf[2]= buf[2]?buf[2]:' '; buf[3]= buf[3]?buf[3]:' '; - fprintf(fp, "['%.4s', '%s', %d, %ld ], \n", buf, name, bhead->nr, (long int)(bhead->len+sizeof(BHead))); + fprintf(fp, "['%.4s', '%s', %d, %ld ],\n", buf, name, bhead->nr, (long int)(bhead->len+sizeof(BHead))); } } fprintf(fp, "]\n"); diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index d8a874872b4..0780a7b6292 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -544,7 +544,7 @@ static Main *blo_find_main(FileData *fd, ListBase *mainlist, const char *filepat char *libname= (m->curlib)?m->curlib->filepath:m->name; if (BLI_path_cmp(name1, libname) == 0) { - if (G.f & G_DEBUG) printf("blo_find_main: found library %s\n", libname); + if (G.debug & G_DEBUG) printf("blo_find_main: found library %s\n", libname); return m; } } @@ -560,7 +560,7 @@ static Main *blo_find_main(FileData *fd, ListBase *mainlist, const char *filepat read_file_version(fd, m); - if (G.f & G_DEBUG) printf("blo_find_main: added new lib %s\n", filepath); + if (G.debug & G_DEBUG) printf("blo_find_main: added new lib %s\n", filepath); return m; } @@ -7253,7 +7253,7 @@ static void versions_gpencil_add_main(ListBase *lb, ID *id, const char *name) new_id(lb, id, name); /* alphabetic insterion: is in new_id */ - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("Converted GPencil to ID: %s\n", id->name+2); } @@ -7810,7 +7810,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main) { /* WATCH IT!!!: pointers from libdata have not been converted */ - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("read file %s\n Version %d sub %d svn r%d\n", fd->relabase, main->versionfile, main->subversionfile, main->revision); if (main->versionfile == 100) { @@ -13671,7 +13671,7 @@ static void expand_doit(FileData *fd, Main *mainvar, void *old) if (id==NULL) { read_libblock(fd, ptr, bhead, LIB_READ+LIB_INDIRECT, NULL); // commented because this can print way too much - // if (G.f & G_DEBUG) printf("expand_doit: other lib %s\n", lib->name); + // if (G.debug & G_DEBUG) printf("expand_doit: other lib %s\n", lib->name); /* for outliner dependency only */ ptr->curlib->parent= mainvar->curlib; @@ -13691,7 +13691,7 @@ static void expand_doit(FileData *fd, Main *mainvar, void *old) change_idid_adr_fd(fd, bhead->old, id); // commented because this can print way too much - // if (G.f & G_DEBUG) printf("expand_doit: already linked: %s lib: %s\n", id->name, lib->name); + // if (G.debug & G_DEBUG) printf("expand_doit: already linked: %s lib: %s\n", id->name, lib->name); } MEM_freeN(lib); @@ -13707,7 +13707,7 @@ static void expand_doit(FileData *fd, Main *mainvar, void *old) happens which invokes same ID... in that case the lookup table needs this entry */ oldnewmap_insert(fd->libmap, bhead->old, id, 1); // commented because this can print way too much - // if (G.f & G_DEBUG) printf("expand: already read %s\n", id->name); + // if (G.debug & G_DEBUG) printf("expand: already read %s\n", id->name); } } } diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp index 3f132eb4212..e0079fbb8a0 100644 --- a/source/blender/collada/AnimationImporter.cpp +++ b/source/blender/collada/AnimationImporter.cpp @@ -261,7 +261,7 @@ bool AnimationImporter::write_animation(const COLLADAFW::Animation* anim) // XXX Don't know if it's necessary // Should we check outPhysicalDimension? if (curve->getInPhysicalDimension() != COLLADAFW::PHYSICAL_DIMENSION_TIME) { - fprintf(stderr, "Inputs physical dimension is not time. \n"); + fprintf(stderr, "Inputs physical dimension is not time.\n"); return true; } diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp index 18e421779cc..bc0606107ab 100644 --- a/source/blender/collada/DocumentImporter.cpp +++ b/source/blender/collada/DocumentImporter.cpp @@ -312,7 +312,7 @@ Object* DocumentImporter::create_lamp_object(COLLADAFW::InstanceLight *lamp, Sce { const COLLADAFW::UniqueId& lamp_uid = lamp->getInstanciatedObjectId(); if (uid_lamp_map.find(lamp_uid) == uid_lamp_map.end()) { - fprintf(stderr, "Couldn't find lamp by UID. \n"); + fprintf(stderr, "Couldn't find lamp by UID.\n"); return NULL; } Object *ob = add_object(sce, OB_LAMP); @@ -782,7 +782,7 @@ bool DocumentImporter::writeCamera( const COLLADAFW::Camera* camera ) else cam = (Camera*)add_camera((char*)cam_id.c_str()); if (!cam) { - fprintf(stderr, "Cannot create camera. \n"); + fprintf(stderr, "Cannot create camera.\n"); return true; } cam->clipsta = camera->getNearClippingPlane().getValue(); @@ -802,7 +802,7 @@ bool DocumentImporter::writeCamera( const COLLADAFW::Camera* camera ) break; case COLLADAFW::Camera::UNDEFINED_CAMERATYPE: { - fprintf(stderr, "Current camera type is not supported. \n"); + fprintf(stderr, "Current camera type is not supported.\n"); cam->type = CAM_PERSP; } break; @@ -899,7 +899,7 @@ bool DocumentImporter::writeImage( const COLLADAFW::Image* image ) BLI_join_dirfile(full_path, sizeof(full_path), dir, filepath.c_str()); Image *ima = BKE_add_image_file(full_path); if (!ima) { - fprintf(stderr, "Cannot create image. \n"); + fprintf(stderr, "Cannot create image.\n"); return true; } this->uid_image_map[image->getUniqueId()] = ima; @@ -929,7 +929,7 @@ bool DocumentImporter::writeLight( const COLLADAFW::Light* light ) else lamp = (Lamp*)add_lamp((char*)la_id.c_str()); if (!lamp) { - fprintf(stderr, "Cannot create lamp. \n"); + fprintf(stderr, "Cannot create lamp.\n"); return true; } @@ -1069,7 +1069,7 @@ bool DocumentImporter::writeLight( const COLLADAFW::Light* light ) break; case COLLADAFW::Light::UNDEFINED: { - fprintf(stderr, "Current lamp type is not supported. \n"); + fprintf(stderr, "Current lamp type is not supported.\n"); lamp->type = LA_LOCAL; } break; diff --git a/source/blender/collada/ImageExporter.cpp b/source/blender/collada/ImageExporter.cpp index 3775a63c71d..946effda832 100644 --- a/source/blender/collada/ImageExporter.cpp +++ b/source/blender/collada/ImageExporter.cpp @@ -109,7 +109,7 @@ void ImagesExporter::operator()(Material *ma, Object *ob) BLI_make_existing_file(abs); if (BLI_copy(src, abs) != 0) { - fprintf(stderr, "Cannot copy image to file's directory. \n"); + fprintf(stderr, "Cannot copy image to file's directory.\n"); } } diff --git a/source/blender/collada/MeshImporter.cpp b/source/blender/collada/MeshImporter.cpp index 1c83f0c4081..5c01c31bd0d 100644 --- a/source/blender/collada/MeshImporter.cpp +++ b/source/blender/collada/MeshImporter.cpp @@ -180,7 +180,7 @@ void MeshImporter::set_face_indices(MFace *mface, unsigned int *indices, bool qu if (quad) mface->v4 = indices[3]; else mface->v4 = 0; #ifdef COLLADA_DEBUG - // fprintf(stderr, "%u, %u, %u \n", indices[0], indices[1], indices[2]); + // fprintf(stderr, "%u, %u, %u\n", indices[0], indices[1], indices[2]); #endif } diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index aa15d53abe6..fb6a65a585f 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -394,14 +394,14 @@ void ANIM_flush_setting_anim_channels (bAnimContext *ac, ListBase *anim_data, bA } } if (match == NULL) { - printf("ERROR: no channel matching the one changed was found \n"); + printf("ERROR: no channel matching the one changed was found\n"); return; } else { bAnimChannelType *acf= ANIM_channel_get_typeinfo(ale_setting); if (acf == NULL) { - printf("ERROR: no channel info for the changed channel \n"); + printf("ERROR: no channel info for the changed channel\n"); return; } @@ -1085,7 +1085,7 @@ static int animchannels_rearrange_exec(bContext *C, wmOperator *op) default: /* some collection of actions */ if (adt->action) rearrange_action_channels(&ac, adt->action, mode); - else if (G.f & G_DEBUG) + else if (G.debug & G_DEBUG) printf("Animdata has no action\n"); break; } @@ -1967,8 +1967,8 @@ static void rename_anim_channels (bAnimContext *ac, int channel_index) ale= BLI_findlink(&anim_data, channel_index); if (ale == NULL) { /* channel not found */ - if (G.f & G_DEBUG) - printf("Error: animation channel (index = %d) not found in rename_anim_channels() \n", channel_index); + if (G.debug & G_DEBUG) + printf("Error: animation channel (index = %d) not found in rename_anim_channels()\n", channel_index); BLI_freelistN(&anim_data); return; @@ -2068,8 +2068,8 @@ static int mouse_anim_channels (bAnimContext *ac, float UNUSED(x), int channel_i ale= BLI_findlink(&anim_data, channel_index); if (ale == NULL) { /* channel not found */ - if (G.f & G_DEBUG) - printf("Error: animation channel (index = %d) not found in mouse_anim_channels() \n", channel_index); + if (G.debug & G_DEBUG) + printf("Error: animation channel (index = %d) not found in mouse_anim_channels()\n", channel_index); BLI_freelistN(&anim_data); return 0; @@ -2288,8 +2288,8 @@ static int mouse_anim_channels (bAnimContext *ac, float UNUSED(x), int channel_i } break; default: - if (G.f & G_DEBUG) - printf("Error: Invalid channel type in mouse_anim_channels() \n"); + if (G.debug & G_DEBUG) + printf("Error: Invalid channel type in mouse_anim_channels()\n"); } /* free channels */ diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c index a17d15d144f..5729ee79cef 100644 --- a/source/blender/editors/animation/anim_filter.c +++ b/source/blender/editors/animation/anim_filter.c @@ -1396,8 +1396,8 @@ static size_t animdata_filter_ds_textures (bAnimContext *ac, ListBase *anim_data default: { /* invalid/unsupported option */ - if (G.f & G_DEBUG) - printf("ERROR: unsupported owner_id (i.e. texture stack) for filter textures - %s \n", owner_id->name); + if (G.debug & G_DEBUG) + printf("ERROR: unsupported owner_id (i.e. texture stack) for filter textures - %s\n", owner_id->name); return 0; } } @@ -1994,8 +1994,8 @@ static size_t animdata_filter_dopesheet (bAnimContext *ac, ListBase *anim_data, /* check that we do indeed have a scene */ if ((ads->source == NULL) || (GS(ads->source->name)!=ID_SCE)) { printf("DopeSheet Error: Not scene!\n"); - if (G.f & G_DEBUG) - printf("\tPointer = %p, Name = '%s' \n", (void *)ads->source, (ads->source)?ads->source->name:NULL); + if (G.debug & G_DEBUG) + printf("\tPointer = %p, Name = '%s'\n", (void *)ads->source, (ads->source)?ads->source->name:NULL); return 0; } diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c index 86e3c8050c2..73dba91207f 100644 --- a/source/blender/editors/animation/anim_markers.c +++ b/source/blender/editors/animation/anim_markers.c @@ -201,7 +201,7 @@ void ED_markers_get_minmax (ListBase *markers, short sel, float *first, float *l int selcount = 0; /* sanity check */ - //printf("markers = %p - %p, %p \n", markers, markers->first, markers->last); + //printf("markers = %p - %p, %p\n", markers, markers->first, markers->last); if (markers == NULL) { *first = 0.0f; *last = 0.0f; diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c index d19a137a6a8..d5ec98da588 100644 --- a/source/blender/editors/animation/fmodifier_ui.c +++ b/source/blender/editors/animation/fmodifier_ui.c @@ -341,7 +341,7 @@ static int binarysearch_fcm_envelopedata_index (FCM_EnvelopeData array[], float * - keyframe to be added would replace one of the existing ones on bounds */ if ((arraylen <= 0) || (array == NULL)) { - printf("Warning: binarysearch_fcm_envelopedata_index() encountered invalid array \n"); + printf("Warning: binarysearch_fcm_envelopedata_index() encountered invalid array\n"); return 0; } else { @@ -391,10 +391,10 @@ static int binarysearch_fcm_envelopedata_index (FCM_EnvelopeData array[], float /* print error if loop-limit exceeded */ if (loopbreaker == (maxloop-1)) { - printf("Error: binarysearch_fcm_envelopedata_index() was taking too long \n"); + printf("Error: binarysearch_fcm_envelopedata_index() was taking too long\n"); // include debug info - printf("\tround = %d: start = %d, end = %d, arraylen = %d \n", loopbreaker, start, end, arraylen); + printf("\tround = %d: start = %d, end = %d, arraylen = %d\n", loopbreaker, start, end, arraylen); } /* not found, so return where to place it */ diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c index 146aea401ec..0e0ff0defbb 100644 --- a/source/blender/editors/animation/keyframes_draw.c +++ b/source/blender/editors/animation/keyframes_draw.c @@ -269,8 +269,8 @@ static void nupdate_abk_bezt (void *node, void *data) if (abk->numBezts >= MAX_ABK_BUFSIZE) { // TODO: need to allocate new array to cater... //bezts_extra= MEM_callocN(...); - if (G.f & G_DEBUG) - printf("FIXME: nupdate_abk_bezt() missing case for too many overlapping BezTriples \n"); + if (G.debug & G_DEBUG) + printf("FIXME: nupdate_abk_bezt() missing case for too many overlapping BezTriples\n"); } else { /* just store an extra one */ diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index ba413fda00c..47972ca2c6f 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -131,7 +131,7 @@ bAction *verify_adt_action (ID *id, short add) adt= BKE_id_add_animdata(id); if (adt == NULL) { /* if still none (as not allowed to add, or ID doesn't have animdata for some reason) */ - printf("ERROR: Couldn't add AnimData (ID = %s) \n", (id) ? (id->name) : ""); + printf("ERROR: Couldn't add AnimData (ID = %s)\n", (id) ? (id->name) : ""); return NULL; } @@ -584,7 +584,7 @@ static short visualkey_can_use (PointerRNA *ptr, PropertyRNA *prop) searchtype= VISUALKEY_ROT; } else { - printf("%s failed: identifier - '%s' \n", __func__, identifier); + printf("%s failed: identifier - '%s'\n", __func__, identifier); return 0; } @@ -1007,7 +1007,7 @@ short delete_keyframe (ReportList *reports, ID *id, bAction *act, const char gro cfra= BKE_nla_tweakedit_remap(adt, cfra, NLATIME_CONVERT_UNMAP); } else { - BKE_reportf(reports, RPT_ERROR, "No Action to delete keyframes from for ID = %s \n", id->name); + BKE_reportf(reports, RPT_ERROR, "No Action to delete keyframes from for ID = %s\n", id->name); return 0; } } @@ -1036,8 +1036,8 @@ short delete_keyframe (ReportList *reports, ID *id, bAction *act, const char gro continue; if ( (fcu->flag & FCURVE_PROTECTED) || ((fcu->grp) && (fcu->grp->flag & AGRP_PROTECTED)) ) { - if (G.f & G_DEBUG) - printf("WARNING: not deleting keyframe for locked F-Curve \n"); + if (G.debug & G_DEBUG) + printf("WARNING: not deleting keyframe for locked F-Curve\n"); continue; } @@ -1128,8 +1128,8 @@ static int insert_key_exec (bContext *C, wmOperator *op) /* try to insert keyframes for the channels specified by KeyingSet */ success= ANIM_apply_keyingset(C, NULL, NULL, ks, MODIFYKEY_MODE_INSERT, cfra); - if (G.f & G_DEBUG) - BKE_reportf(op->reports, RPT_INFO, "KeyingSet '%s' - Successfully added %d Keyframes \n", ks->name, success); + if (G.debug & G_DEBUG) + BKE_reportf(op->reports, RPT_INFO, "KeyingSet '%s' - Successfully added %d Keyframes\n", ks->name, success); /* report failure or do updates? */ if (success == MODIFYKEY_INVALID_CONTEXT) { @@ -1284,8 +1284,8 @@ static int delete_key_exec (bContext *C, wmOperator *op) /* try to delete keyframes for the channels specified by KeyingSet */ success= ANIM_apply_keyingset(C, NULL, NULL, ks, MODIFYKEY_MODE_DELETE, cfra); - if (G.f & G_DEBUG) - printf("KeyingSet '%s' - Successfully removed %d Keyframes \n", ks->name, success); + if (G.debug & G_DEBUG) + printf("KeyingSet '%s' - Successfully removed %d Keyframes\n", ks->name, success); /* report failure or do updates? */ if (success == MODIFYKEY_INVALID_CONTEXT) { @@ -1448,17 +1448,17 @@ static int insert_key_button_exec (bContext *C, wmOperator *op) success+= insert_keyframe_direct(op->reports, ptr, prop, fcu, cfra, 0); } else { - if (G.f & G_DEBUG) - printf("Button Insert-Key: no path to property \n"); + if (G.debug & G_DEBUG) + printf("Button Insert-Key: no path to property\n"); BKE_report(op->reports, RPT_WARNING, "Failed to resolve path to property. Try using a Keying Set instead"); } } - else if (G.f & G_DEBUG) { + else if (G.debug & G_DEBUG) { printf("ptr.data = %p, prop = %p,", (void *)ptr.data, (void *)prop); if (prop) - printf("animatable = %d \n", RNA_property_animateable(&ptr, prop)); + printf("animatable = %d\n", RNA_property_animateable(&ptr, prop)); else - printf("animatable = NULL \n"); + printf("animatable = NULL\n"); } if (success) { @@ -1525,11 +1525,11 @@ static int delete_key_button_exec (bContext *C, wmOperator *op) MEM_freeN(path); } - else if (G.f & G_DEBUG) - printf("Button Delete-Key: no path to property \n"); + else if (G.debug & G_DEBUG) + printf("Button Delete-Key: no path to property\n"); } - else if (G.f & G_DEBUG) { - printf("ptr.data = %p, prop = %p \n", (void *)ptr.data, (void *)prop); + else if (G.debug & G_DEBUG) { + printf("ptr.data = %p, prop = %p\n", (void *)ptr.data, (void *)prop); } diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c index 0d93f9401a3..a09722f78b6 100644 --- a/source/blender/editors/armature/editarmature.c +++ b/source/blender/editors/armature/editarmature.c @@ -395,7 +395,7 @@ void ED_armature_from_edit(Object *obedit) if (fBone->parent==eBone) fBone->parent= eBone->parent; } - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("Warning: removed zero sized bone: %s\n", eBone->name); bone_free(arm, eBone); } @@ -2933,7 +2933,7 @@ static int armature_fill_bones_exec (bContext *C, wmOperator *op) } else { // FIXME.. figure out a method for multiple bones - BKE_reportf(op->reports, RPT_ERROR, "Too many points selected: %d \n", count); + BKE_reportf(op->reports, RPT_ERROR, "Too many points selected: %d\n", count); BLI_freelistN(&points); return OPERATOR_CANCELLED; } @@ -2976,9 +2976,9 @@ static void bones_merge(Object *obedit, EditBone *start, EditBone *end, EditBone /* check if same bone */ if (start == end) { - if (G.f & G_DEBUG) { - printf("Error: same bone! \n"); - printf("\tstart = %s, end = %s \n", start->name, end->name); + if (G.debug & G_DEBUG) { + printf("Error: same bone!\n"); + printf("\tstart = %s, end = %s\n", start->name, end->name); } } diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c index 261018329ab..f554b7b1c50 100644 --- a/source/blender/editors/armature/editarmature_retarget.c +++ b/source/blender/editors/armature/editarmature_retarget.c @@ -2657,7 +2657,7 @@ static void findCorrespondingArc(RigGraph *rigg, RigArc *start_arc, RigNode *sta if (next_earc->flag == ARC_FREE && next_earc->symmetry_level == symmetry_level) { -// printf("USING: \n"); +// printf("USING:\n"); // printf("flag %i -- level %i -- flag %i -- group %i\n", next_earc->flag, next_earc->symmetry_level, next_earc->symmetry_flag, next_earc->symmetry_group); matchMultiResolutionArc(rigg, start_node, next_iarc, next_earc); break; diff --git a/source/blender/editors/armature/reeb.c b/source/blender/editors/armature/reeb.c index 30f929c9603..546bcb1f40f 100644 --- a/source/blender/editors/armature/reeb.c +++ b/source/blender/editors/armature/reeb.c @@ -554,12 +554,12 @@ static void verifyBucketsArc(ReebGraph *UNUSED(rg), ReebArc *arc) if (ceilf(head->weight) != arc->buckets[0].val) { printArc(arc); - printf("alloc error in first bucket: %f should be %f \n", arc->buckets[0].val, ceil(head->weight)); + printf("alloc error in first bucket: %f should be %f\n", arc->buckets[0].val, ceil(head->weight)); } if (floorf(tail->weight) != arc->buckets[arc->bcount - 1].val) { printArc(arc); - printf("alloc error in last bucket: %f should be %f \n", arc->buckets[arc->bcount - 1].val, floor(tail->weight)); + printf("alloc error in last bucket: %f should be %f\n", arc->buckets[arc->bcount - 1].val, floor(tail->weight)); } } } diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index aeab4f27179..a5188ea769e 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -1944,7 +1944,7 @@ static void adduplicateflagNurb(Object *obedit, short flag) } } if (newu==0 || newv==0) { - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("Can't duplicate Nurb\n"); } else { diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c index 528991e31f0..8f0ea378a2a 100644 --- a/source/blender/editors/gpencil/drawgpencil.c +++ b/source/blender/editors/gpencil/drawgpencil.c @@ -117,7 +117,7 @@ static void gp_draw_stroke_buffer (tGPspoint *points, int totpoints, short thick float oldpressure = points[0].pressure; /* draw stroke curve */ - if (G.f & G_DEBUG) setlinestyle(2); + if (G.debug & G_DEBUG) setlinestyle(2); glLineWidth(oldpressure * thickness); glBegin(GL_LINE_STRIP); @@ -147,7 +147,7 @@ static void gp_draw_stroke_buffer (tGPspoint *points, int totpoints, short thick /* reset for predictable OpenGL context */ glLineWidth(1.0f); - if (G.f & G_DEBUG) setlinestyle(0); + if (G.debug & G_DEBUG) setlinestyle(0); } } diff --git a/source/blender/editors/gpencil/gpencil_buttons.c b/source/blender/editors/gpencil/gpencil_buttons.c index 62e2e62b880..263c842ed08 100644 --- a/source/blender/editors/gpencil/gpencil_buttons.c +++ b/source/blender/editors/gpencil/gpencil_buttons.c @@ -204,7 +204,7 @@ static void gp_drawui_layer(uiLayout *layout, bGPdata *gpd, bGPDlayer *gpl, cons uiItemR(col, &ptr, "line_width", UI_ITEM_R_SLIDER, NULL, ICON_NONE); /* debugging options */ - if (G.f & G_DEBUG) { + if (G.debug & G_DEBUG) { uiItemR(col, &ptr, "show_points", 0, NULL, ICON_NONE); } diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index 20111fc66b2..c366de6fa43 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -569,8 +569,8 @@ static void gp_stroke_newfrombuffer (tGPsdata *p) /* exit with error if no valid points from this stroke */ if (totelem == 0) { - if (G.f & G_DEBUG) - printf("Error: No valid points in stroke buffer to convert (tot=%d) \n", gpd->sbuffer_size); + if (G.debug & G_DEBUG) + printf("Error: No valid points in stroke buffer to convert (tot=%d)\n", gpd->sbuffer_size); return; } @@ -987,8 +987,8 @@ static int gp_session_initdata (bContext *C, tGPsdata *p) /* make sure the active view (at the starting time) is a 3d-view */ if (curarea == NULL) { p->status= GP_STATUS_ERROR; - if (G.f & G_DEBUG) - printf("Error: No active view for painting \n"); + if (G.debug & G_DEBUG) + printf("Error: No active view for painting\n"); return 0; } @@ -1013,8 +1013,8 @@ static int gp_session_initdata (bContext *C, tGPsdata *p) if (ar->regiondata == NULL) { p->status= GP_STATUS_ERROR; - if (G.f & G_DEBUG) - printf("Error: 3D-View active region doesn't have any region data, so cannot be drawable \n"); + if (G.debug & G_DEBUG) + printf("Error: 3D-View active region doesn't have any region data, so cannot be drawable\n"); return 0; } @@ -1022,8 +1022,8 @@ static int gp_session_initdata (bContext *C, tGPsdata *p) /* check that gpencil data is allowed to be drawn */ if ((v3d->flag2 & V3D_DISPGP)==0) { p->status= GP_STATUS_ERROR; - if (G.f & G_DEBUG) - printf("Error: In active view, Grease Pencil not shown \n"); + if (G.debug & G_DEBUG) + printf("Error: In active view, Grease Pencil not shown\n"); return 0; } #endif @@ -1043,8 +1043,8 @@ static int gp_session_initdata (bContext *C, tGPsdata *p) /* check that gpencil data is allowed to be drawn */ if ((snode->flag & SNODE_DISPGP)==0) { p->status= GP_STATUS_ERROR; - if (G.f & G_DEBUG) - printf("Error: In active view, Grease Pencil not shown \n"); + if (G.debug & G_DEBUG) + printf("Error: In active view, Grease Pencil not shown\n"); return 0; } #endif @@ -1063,14 +1063,14 @@ static int gp_session_initdata (bContext *C, tGPsdata *p) /* check that gpencil data is allowed to be drawn */ if (sseq->mainb == SEQ_DRAW_SEQUENCE) { p->status= GP_STATUS_ERROR; - if (G.f & G_DEBUG) - printf("Error: In active view (sequencer), active mode doesn't support Grease Pencil \n"); + if (G.debug & G_DEBUG) + printf("Error: In active view (sequencer), active mode doesn't support Grease Pencil\n"); return 0; } if ((sseq->flag & SEQ_DRAW_GPENCIL)==0) { p->status= GP_STATUS_ERROR; - if (G.f & G_DEBUG) - printf("Error: In active view, Grease Pencil not shown \n"); + if (G.debug & G_DEBUG) + printf("Error: In active view, Grease Pencil not shown\n"); return 0; } } @@ -1090,8 +1090,8 @@ static int gp_session_initdata (bContext *C, tGPsdata *p) /* check that gpencil data is allowed to be drawn */ if ((sima->flag & SI_DISPGP)==0) { p->status= GP_STATUS_ERROR; - if (G.f & G_DEBUG) - printf("Error: In active view, Grease Pencil not shown \n"); + if (G.debug & G_DEBUG) + printf("Error: In active view, Grease Pencil not shown\n"); return 0; } #endif @@ -1121,8 +1121,8 @@ static int gp_session_initdata (bContext *C, tGPsdata *p) default: { p->status= GP_STATUS_ERROR; - if (G.f & G_DEBUG) - printf("Error: Active view not appropriate for Grease Pencil drawing \n"); + if (G.debug & G_DEBUG) + printf("Error: Active view not appropriate for Grease Pencil drawing\n"); return 0; } break; @@ -1132,8 +1132,8 @@ static int gp_session_initdata (bContext *C, tGPsdata *p) gpd_ptr= gpencil_data_get_pointers(C, &p->ownerPtr); if (gpd_ptr == NULL) { p->status= GP_STATUS_ERROR; - if (G.f & G_DEBUG) - printf("Error: Current context doesn't allow for any Grease Pencil data \n"); + if (G.debug & G_DEBUG) + printf("Error: Current context doesn't allow for any Grease Pencil data\n"); return 0; } else { @@ -1209,8 +1209,8 @@ static void gp_paint_initstroke (tGPsdata *p, short paintmode) } if (p->gpl->flag & GP_LAYER_LOCKED) { p->status= GP_STATUS_ERROR; - if (G.f & G_DEBUG) - printf("Error: Cannot paint on locked layer \n"); + if (G.debug & G_DEBUG) + printf("Error: Cannot paint on locked layer\n"); return; } @@ -1218,8 +1218,8 @@ static void gp_paint_initstroke (tGPsdata *p, short paintmode) p->gpf= gpencil_layer_getframe(p->gpl, p->scene->r.cfra, 1); if (p->gpf == NULL) { p->status= GP_STATUS_ERROR; - if (G.f & G_DEBUG) - printf("Error: No frame created (gpencil_paint_init) \n"); + if (G.debug & G_DEBUG) + printf("Error: No frame created (gpencil_paint_init)\n"); return; } else @@ -1519,8 +1519,8 @@ static void gpencil_draw_apply (wmOperator *op, tGPsdata *p) BKE_report(op->reports, RPT_ERROR, "Cannot paint stroke"); p->status = GP_STATUS_ERROR; - if (G.f & G_DEBUG) - printf("Error: Grease-Pencil Paint - Add Point Invalid \n"); + if (G.debug & G_DEBUG) + printf("Error: Grease-Pencil Paint - Add Point Invalid\n"); return; } @@ -1595,18 +1595,18 @@ static int gpencil_draw_exec (bContext *C, wmOperator *op) { tGPsdata *p = NULL; - //printf("GPencil - Starting Re-Drawing \n"); + //printf("GPencil - Starting Re-Drawing\n"); /* try to initialize context data needed while drawing */ if (!gpencil_draw_init(C, op)) { if (op->customdata) MEM_freeN(op->customdata); - //printf("\tGP - no valid data \n"); + //printf("\tGP - no valid data\n"); return OPERATOR_CANCELLED; } else p= op->customdata; - //printf("\tGP - Start redrawing stroke \n"); + //printf("\tGP - Start redrawing stroke\n"); /* loop over the stroke RNA elements recorded (i.e. progress of mouse movement), * setting the relevant values in context at each step, then applying @@ -1614,7 +1614,7 @@ static int gpencil_draw_exec (bContext *C, wmOperator *op) RNA_BEGIN(op->ptr, itemptr, "stroke") { float mousef[2]; - //printf("\t\tGP - stroke elem \n"); + //printf("\t\tGP - stroke elem\n"); /* get relevant data for this point from stroke */ RNA_float_get_array(&itemptr, "mouse", mousef); @@ -1647,7 +1647,7 @@ static int gpencil_draw_exec (bContext *C, wmOperator *op) } RNA_END; - //printf("\tGP - done \n"); + //printf("\tGP - done\n"); /* cleanup */ gpencil_draw_exit(C, op); @@ -1667,15 +1667,15 @@ static int gpencil_draw_invoke (bContext *C, wmOperator *op, wmEvent *event) tGPsdata *p = NULL; wmWindow *win= CTX_wm_window(C); - if (G.f & G_DEBUG) - printf("GPencil - Starting Drawing \n"); + if (G.debug & G_DEBUG) + printf("GPencil - Starting Drawing\n"); /* try to initialize context data needed while drawing */ if (!gpencil_draw_init(C, op)) { if (op->customdata) MEM_freeN(op->customdata); - if (G.f & G_DEBUG) - printf("\tGP - no valid data \n"); + if (G.debug & G_DEBUG) + printf("\tGP - no valid data\n"); return OPERATOR_CANCELLED; } else @@ -1742,11 +1742,11 @@ static tGPsdata *gpencil_stroke_begin(bContext *C, wmOperator *op) * otherwise we could crash (see bug #20586) */ if (CTX_wm_area(C) != p->sa) { - printf("\t\t\tGP - wrong area execution abort! \n"); + printf("\t\t\tGP - wrong area execution abort!\n"); p->status= GP_STATUS_ERROR; } - //printf("\t\tGP - start stroke \n"); + //printf("\t\tGP - start stroke\n"); /* we may need to set up paint env again if we're resuming */ // XXX: watch it with the paintmode! in future, it'd be nice to allow changing paint-mode when in sketching-sessions @@ -1858,7 +1858,7 @@ static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event) /* finish painting operation if anything went wrong just now */ if (p->status == GP_STATUS_ERROR) { - printf("\t\t\t\tGP - add error done! \n"); + printf("\t\t\t\tGP - add error done!\n"); estate = OPERATOR_CANCELLED; } else { diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c index 955d564e111..c7f8ad521fa 100644 --- a/source/blender/editors/interface/interface_anim.c +++ b/source/blender/editors/interface/interface_anim.c @@ -135,7 +135,7 @@ int ui_but_anim_expression_create(uiBut *but, const char *str) /* button must have RNA-pointer to a numeric-capable property */ if (ELEM(NULL, but->rnapoin.data, but->rnaprop)) { - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("ERROR: create expression failed - button has no RNA info attached\n"); return 0; } @@ -144,7 +144,7 @@ int ui_but_anim_expression_create(uiBut *but, const char *str) // FIXME: until materials can be handled by depsgraph, don't allow drivers to be created for them id = (ID *)but->rnapoin.id.data; if ((id == NULL) || (GS(id->name) == ID_MA) || (GS(id->name) == ID_TE)) { - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("ERROR: create expression failed - invalid id-datablock for adding drivers (%p)\n", id); return 0; } diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 420cae87851..887ae250c1b 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -4585,7 +4585,7 @@ static int ui_but_menu(bContext *C, uiBut *but) } } - /* perhaps we should move this into (G.f & G_DEBUG) - campbell */ + /* perhaps we should move this into (G.debug & G_DEBUG) - campbell */ uiItemFullO(layout, "UI_OT_editsource", "Edit Source", ICON_NONE, NULL, WM_OP_INVOKE_DEFAULT, 0); uiPupMenuEnd(C, pup); diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index 24881c034f4..d028fcd93ae 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -757,7 +757,7 @@ int UI_icon_get_width(int icon_id) icon = BKE_icon_get(icon_id); if (icon == NULL) { - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("%s: Internal error, no icon for icon ID: %d\n", __func__, icon_id); return 0; } @@ -782,7 +782,7 @@ int UI_icon_get_height(int icon_id) icon = BKE_icon_get(icon_id); if (icon == NULL) { - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("%s: Internal error, no icon for icon ID: %d\n", __func__, icon_id); return 0; } @@ -830,7 +830,7 @@ static void icon_create_rect(struct PreviewImage *prv_img, enum eIconSizes size) unsigned int render_size = preview_render_size(size); if (!prv_img) { - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("%s, error: requested preview image does not exist", __func__); } if (!prv_img->rect[size]) { @@ -847,7 +847,7 @@ static void icon_create_rect(struct PreviewImage *prv_img, enum eIconSizes size) static void icon_set_image(bContext *C, ID *id, PreviewImage *prv_img, enum eIconSizes size) { if (!prv_img) { - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("%s: no preview image for this ID: %s\n", __func__, id->name); return; } @@ -967,7 +967,7 @@ static void icon_draw_size(float x, float y, int icon_id, float aspect, float al alpha *= btheme->tui.icon_alpha; if (icon == NULL) { - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("%s: Internal error, no icon for icon ID: %d\n", __func__, icon_id); return; } diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c index 34116f24901..ebaef26082f 100644 --- a/source/blender/editors/interface/interface_ops.c +++ b/source/blender/editors/interface/interface_ops.c @@ -460,7 +460,7 @@ static int reports_to_text_exec(bContext *C, wmOperator *UNUSED(op)) * - if commandline debug option enabled, show debug reports too * - otherwise, up to info (which is what users normally see) */ - str = BKE_reports_string(reports, (G.f & G_DEBUG) ? RPT_DEBUG : RPT_INFO); + str = BKE_reports_string(reports, (G.debug & G_DEBUG) ? RPT_DEBUG : RPT_INFO); if (str) { write_text(txt, str); diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c index 91e3b99e23b..5d527667170 100644 --- a/source/blender/editors/interface/interface_style.c +++ b/source/blender/editors/interface/interface_style.c @@ -356,7 +356,7 @@ void uiStyleInit(void) } if (font->blf_id == -1) { - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("%s: error, no fonts available\n", __func__); } else { diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index 5c05e9d2ba1..7eac3050b97 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -852,8 +852,8 @@ void UI_view2d_totRect_set_resize(View2D *v2d, int width, int height, int resize height -= V2D_SCROLL_HEIGHT; if (ELEM3(0, v2d, width, height)) { - if (G.f & G_DEBUG) - printf("Error: View2D totRect set exiting: v2d=%p width=%d height=%d \n", (void *)v2d, width, height); // XXX temp debug info + if (G.debug & G_DEBUG) + printf("Error: View2D totRect set exiting: v2d=%p width=%d height=%d\n", (void *)v2d, width, height); // XXX temp debug info return; } diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index 5b2aaf30897..ec3567454df 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -589,19 +589,19 @@ static bConstraint *edit_constraint_property_get(wmOperator *op, Object *ob, int if (pchan) list = &pchan->constraints; else { - //if (G.f & G_DEBUG) + //if (G.debug & G_DEBUG) //printf("edit_constraint_property_get: No active bone for object '%s'\n", (ob)? ob->id.name+2 : ""); return NULL; } } else { - //if (G.f & G_DEBUG) + //if (G.debug & G_DEBUG) //printf("edit_constraint_property_get: defaulting to getting list in the standard way\n"); list = get_active_constraints(ob); } con = constraints_findByName(list, constraint_name); - //if (G.f & G_DEBUG) + //if (G.debug & G_DEBUG) //printf("constraint found = %p, %s\n", (void *)con, (con)?con->name:""); if (con && (type != 0) && (con->type != type)) diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index a6fb946c83f..57d0de522a1 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -1504,8 +1504,8 @@ static void single_obdata_users(Main *bmain, Scene *scene, int flag) ob->data= copy_speaker(ob->data); break; default: - if (G.f & G_DEBUG) - printf("ERROR single_obdata_users: can't copy %s\n", id->name); + if (G.debug & G_DEBUG) + printf("ERROR %s: can't copy %s\n", __func__, id->name); return; } diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index bf3a9fff4e2..53e0e2b4056 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -3937,7 +3937,7 @@ void PE_undo_step(Scene *scene, int step) if (edit->curundo==NULL || edit->curundo->prev==NULL); else { - if (G.f & G_DEBUG) printf("undo %s\n", edit->curundo->name); + if (G.debug & G_DEBUG) printf("undo %s\n", edit->curundo->name); edit->curundo= edit->curundo->prev; get_PTCacheUndo(edit, edit->curundo); } @@ -3949,7 +3949,7 @@ void PE_undo_step(Scene *scene, int step) else { get_PTCacheUndo(edit, edit->curundo->next); edit->curundo= edit->curundo->next; - if (G.f & G_DEBUG) printf("redo %s\n", edit->curundo->name); + if (G.debug & G_DEBUG) printf("redo %s\n", edit->curundo->name); } } diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c index 1e71cf61817..3d50ec26a40 100644 --- a/source/blender/editors/physics/particle_object.c +++ b/source/blender/editors/physics/particle_object.c @@ -670,7 +670,7 @@ static void connect_hair(Scene *scene, Object *ob, ParticleSystem *psys) BLI_bvhtree_find_nearest(bvhtree.tree, key->co, &nearest, bvhtree.nearest_callback, &bvhtree); if (nearest.index == -1) { - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("No nearest point found for hair root!"); continue; } diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c index 23765b03d35..6a074a542c3 100644 --- a/source/blender/editors/physics/physics_fluid.c +++ b/source/blender/editors/physics/physics_fluid.c @@ -224,17 +224,17 @@ static void fluidsimPrintChannel(FILE *file, float *channel, int paramsize, char // invalid, cant happen? } - fprintf(file, " CHANNEL %s = \n", str); + fprintf(file, " CHANNEL %s =\n", str); for (i=0; inoOfFrames); - //printf("elbeem blender cb s%d, f%d, domainid:%d noOfFrames: %d \n", status,frame, settings->domainId, settings->noOfFrames ); // DEBUG + //printf("elbeem blender cb s%d, f%d, domainid:%d noOfFrames: %d\n", status,frame, settings->domainId, settings->noOfFrames ); // DEBUG } if (fluidbake_breakjob(fb)) { diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c index 97fd80fc946..47a4c376f96 100644 --- a/source/blender/editors/render/render_internal.c +++ b/source/blender/editors/render/render_internal.c @@ -317,8 +317,8 @@ static void make_renderinfo_string(RenderStats *rs, Scene *scene, char *str) /* very weak... but 512 characters is quite safe */ if (spos >= str + IMA_MAX_RENDER_TEXT) - if (G.f & G_DEBUG) - printf("WARNING! renderwin text beyond limit \n"); + if (G.debug & G_DEBUG) + printf("WARNING! renderwin text beyond limit\n"); } diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 8f429321fbb..43b917c2186 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -1037,7 +1037,7 @@ static void region_rect_recursive(ScrArea *sa, ARegion *ar, rcti *remainder, int if (count!=4) { /* let's stop adding regions */ BLI_init_rcti(remainder, 0, 0, 0, 0); - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("region quadsplit failed\n"); } else quad= 1; diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 9deb64ef60a..1b56feb09d1 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -531,7 +531,7 @@ int screen_area_join(bContext *C, bScreen* scr, ScrArea *sa1, ScrArea *sa2) int dir; dir = area_getorientation(sa1, sa2); - /*printf("dir is : %i \n", dir);*/ + /*printf("dir is : %i\n", dir);*/ if (dir < 0) { if (sa1 ) sa1->flag &= ~AREA_FLAG_DRAWJOINFROM; @@ -1101,7 +1101,9 @@ void ED_screen_refresh(wmWindowManager *wm, wmWindow *win) WM_event_timer_sleep(wm, win, win->screen->animtimer, 0); } - if (G.f & G_DEBUG) printf("set screen\n"); + if (G.debug & G_DEBUG_EVENTS) { + printf("%s: set screen\n", __func__); + } win->screen->do_refresh= 0; win->screen->context= ed_screen_context; @@ -1634,8 +1636,8 @@ ScrArea *ED_screen_full_toggle(bContext *C, wmWindow *win, ScrArea *sa) for (old= sc->areabase.first; old; old= old->next) if (old->full) break; if (old==NULL) { - if (G.f & G_DEBUG) - printf("something wrong in areafullscreen\n"); + if (G.debug & G_DEBUG) + printf("%s: something wrong in areafullscreen\n", __func__); return NULL; } diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index f0dbdf18826..e427e1e21cf 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -3374,7 +3374,7 @@ static int scene_delete_exec(bContext *C, wmOperator *UNUSED(op)) ED_screen_delete_scene(C, scene); - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("scene delete %p\n", scene); WM_event_add_notifier(C, NC_SCENE|NA_REMOVED, scene); diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index f553084cfd9..9cf8cc21996 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -1037,7 +1037,7 @@ static int pixel_bounds_uv( bounds_px->xmax = (int)(ibuf_x * max_uv[0]) + 1; bounds_px->ymax = (int)(ibuf_y * max_uv[1]) + 1; - /*printf("%d %d %d %d \n", min_px[0], min_px[1], max_px[0], max_px[1]);*/ + /*printf("%d %d %d %d\n", min_px[0], min_px[1], max_px[0], max_px[1]);*/ /* face uses no UV area when quantized to pixels? */ return (bounds_px->xmin == bounds_px->xmax || bounds_px->ymin == bounds_px->ymax) ? 0 : 1; @@ -1065,7 +1065,7 @@ static int pixel_bounds_array(float (*uv)[2], rcti *bounds_px, const int ibuf_x, bounds_px->xmax = (int)(ibuf_x * max_uv[0]) + 1; bounds_px->ymax = (int)(ibuf_y * max_uv[1]) + 1; - /*printf("%d %d %d %d \n", min_px[0], min_px[1], max_px[0], max_px[1]);*/ + /*printf("%d %d %d %d\n", min_px[0], min_px[1], max_px[0], max_px[1]);*/ /* face uses no UV area when quantized to pixels? */ return (bounds_px->xmin == bounds_px->xmax || bounds_px->ymin == bounds_px->ymax) ? 0 : 1; @@ -3643,7 +3643,7 @@ static int project_bucket_iter_next(ProjPaintState *ps, int *bucket_index, rctf if (ps->thread_tot > 1) BLI_lock_thread(LOCK_CUSTOM1); - //printf("%d %d \n", ps->context_bucket_x, ps->context_bucket_y); + //printf("%d %d\n", ps->context_bucket_x, ps->context_bucket_y); for (; ps->context_bucket_y < ps->bucketMax[1]; ps->context_bucket_y++) { for (; ps->context_bucket_x < ps->bucketMax[0]; ps->context_bucket_x++) { diff --git a/source/blender/editors/sculpt_paint/paint_undo.c b/source/blender/editors/sculpt_paint/paint_undo.c index fbf83dd8df5..65bcfcb7024 100644 --- a/source/blender/editors/sculpt_paint/paint_undo.c +++ b/source/blender/editors/sculpt_paint/paint_undo.c @@ -160,7 +160,9 @@ static int undo_stack_step(bContext *C, UndoStack *stack, int step, const char * if (stack->current == NULL) ; else { if (!name || strcmp(stack->current->name, name) == 0) { - if (G.f & G_DEBUG) printf("undo %s\n", stack->current->name); + if (G.debug & G_DEBUG_WM) { + printf("%s: undo '%s'\n", __func__, stack->current->name); + } undo_restore(C, stack, stack->current); stack->current = stack->current->prev; return 1; @@ -174,7 +176,9 @@ static int undo_stack_step(bContext *C, UndoStack *stack, int step, const char * undo = (stack->current && stack->current->next) ? stack->current->next : stack->elems.first; undo_restore(C, stack, undo); stack->current = undo; - if (G.f & G_DEBUG) printf("redo %s\n", undo->name); + if (G.debug & G_DEBUG_WM) { + printf("%s: redo %s\n", __func__, undo->name); + } return 1; } } diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c index 630bb75ed5d..f76f5f6523e 100644 --- a/source/blender/editors/space_action/action_select.c +++ b/source/blender/editors/space_action/action_select.c @@ -997,7 +997,7 @@ static void mouse_action_keys (bAnimContext *ac, const int mval[2], short select ale= BLI_findlink(&anim_data, channel_index); if (ale == NULL) { /* channel not found */ - printf("Error: animation channel (index = %d) not found in mouse_action_keys() \n", channel_index); + printf("Error: animation channel (index = %d) not found in mouse_action_keys()\n", channel_index); BLI_freelistN(&anim_data); return; } diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index c0cd2a882c8..76a2c926522 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -291,7 +291,7 @@ static void create_ghost_curves (bAnimContext *ac, int start, int end) /* sanity check */ if (start >= end) { - printf("Error: Frame range for Ghost F-Curve creation is inappropriate \n"); + printf("Error: Frame range for Ghost F-Curve creation is inappropriate\n"); return; } diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c index c242a1c1323..1d323cb6a4f 100644 --- a/source/blender/editors/space_nla/nla_channels.c +++ b/source/blender/editors/space_nla/nla_channels.c @@ -92,8 +92,8 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho ale= BLI_findlink(&anim_data, channel_index); if (ale == NULL) { /* channel not found */ - if (G.f & G_DEBUG) - printf("Error: animation channel (index = %d) not found in mouse_anim_channels() \n", channel_index); + if (G.debug & G_DEBUG) + printf("Error: animation channel (index = %d) not found in mouse_anim_channels()\n", channel_index); BLI_freelistN(&anim_data); return 0; @@ -284,8 +284,8 @@ static int mouse_nla_channels (bAnimContext *ac, float x, int channel_index, sho break; default: - if (G.f & G_DEBUG) - printf("Error: Invalid channel type in mouse_nla_channels() \n"); + if (G.debug & G_DEBUG) + printf("Error: Invalid channel type in mouse_nla_channels()\n"); } /* free channels */ diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c index 0c2dc7493e2..1a94b1160be 100644 --- a/source/blender/editors/space_nla/nla_edit.c +++ b/source/blender/editors/space_nla/nla_edit.c @@ -399,7 +399,7 @@ static int nlaedit_add_actionclip_exec (bContext *C, wmOperator *op) if (act == NULL) { BKE_report(op->reports, RPT_ERROR, "No valid Action to add"); - //printf("Add strip - actname = '%s' \n", actname); + //printf("Add strip - actname = '%s'\n", actname); return OPERATOR_CANCELLED; } else if (act->idroot == 0) { diff --git a/source/blender/editors/space_nla/nla_select.c b/source/blender/editors/space_nla/nla_select.c index 1434bd8ddc2..b0cd59ea7ad 100644 --- a/source/blender/editors/space_nla/nla_select.c +++ b/source/blender/editors/space_nla/nla_select.c @@ -538,7 +538,7 @@ static void mouse_nla_strips (bContext *C, bAnimContext *ac, const int mval[2], ale= BLI_findlink(&anim_data, channel_index); if (ale == NULL) { /* channel not found */ - printf("Error: animation channel (index = %d) not found in mouse_nla_strips() \n", channel_index); + printf("Error: animation channel (index = %d) not found in mouse_nla_strips()\n", channel_index); BLI_freelistN(&anim_data); return; } diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index d95947142f9..cf2b3730462 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -370,7 +370,7 @@ void ED_node_composit_default(Scene *sce) /* but lets check it anyway */ if (sce->nodetree) { - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("error in composite initialize\n"); return; } @@ -410,7 +410,7 @@ void ED_node_texture_default(Tex *tx) /* but lets check it anyway */ if (tx->nodetree) { - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("error in texture initialize\n"); return; } diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 258debc8e60..6d76da3b0e0 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -3167,7 +3167,7 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d, draw_em_measure_stats(v3d, ob, em, &scene->unit); } - if ((G.f & G_DEBUG) && (me->drawflag & ME_DRAWEXTRA_INDICES) && + if ((G.debug & G_DEBUG) && (me->drawflag & ME_DRAWEXTRA_INDICES) && !(v3d->flag2 & V3D_RENDER_OVERRIDE)) { draw_em_indices(em); } diff --git a/source/blender/editors/util/editmode_undo.c b/source/blender/editors/util/editmode_undo.c index 8849a9af9c0..ac0f8306259 100644 --- a/source/blender/editors/util/editmode_undo.c +++ b/source/blender/editors/util/editmode_undo.c @@ -252,7 +252,7 @@ void undo_editmode_step(bContext *C, int step) if (curundo == NULL || curundo->prev == NULL) error("No more steps to undo"); else { - if (G.f & G_DEBUG) printf("undo %s\n", curundo->name); + if (G.debug & G_DEBUG) printf("undo %s\n", curundo->name); curundo = curundo->prev; undo_restore(curundo, curundo->getdata(C), obedit->data); } @@ -264,7 +264,7 @@ void undo_editmode_step(bContext *C, int step) else { undo_restore(curundo->next, curundo->getdata(C), obedit->data); curundo = curundo->next; - if (G.f & G_DEBUG) printf("redo %s\n", curundo->name); + if (G.debug & G_DEBUG) printf("redo %s\n", curundo->name); } } diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c index 62d761238e4..ac264c1a6af 100644 --- a/source/blender/editors/util/undo.c +++ b/source/blender/editors/util/undo.c @@ -82,7 +82,7 @@ void ED_undo_push(bContext *C, const char *str) Object *obedit = CTX_data_edit_object(C); Object *obact = CTX_data_active_object(C); - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("undo push %s\n", str); if (obedit) { @@ -361,7 +361,7 @@ int ED_undo_operator_repeat(bContext *C, struct wmOperator *op) { int retval; - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("redo_cb: operator redo %s\n", op->type->name); ED_undo_pop_op(C, op); @@ -371,7 +371,7 @@ int ED_undo_operator_repeat(bContext *C, struct wmOperator *op) retval = WM_operator_repeat(C, op); if ((retval & OPERATOR_FINISHED) == 0) { - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("redo_cb: operator redo failed: %s, return %d\n", op->type->name, retval); ED_undo_redo(C); } @@ -380,7 +380,7 @@ int ED_undo_operator_repeat(bContext *C, struct wmOperator *op) } } else { - if (G.f & G_DEBUG) { + if (G.debug & G_DEBUG) { printf("redo_cb: WM_operator_repeat_check returned false %s\n", op->type->name); } } @@ -389,7 +389,7 @@ int ED_undo_operator_repeat(bContext *C, struct wmOperator *op) CTX_wm_region_set(C, ar); } else { - if (G.f & G_DEBUG) { + if (G.debug & G_DEBUG) { printf("redo_cb: ED_undo_operator_repeat called with NULL 'op'\n"); } } diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c index 76291aef584..14d6428bf50 100644 --- a/source/blender/gpu/intern/gpu_codegen.c +++ b/source/blender/gpu/intern/gpu_codegen.c @@ -587,7 +587,7 @@ static char *code_generate_fragment(ListBase *nodes, GPUOutput *output, const ch codegen_set_unique_ids(nodes); codegen_print_uniforms_functions(ds, nodes); - //if(G.f & G_DEBUG) + //if(G.debug & G_DEBUG) // BLI_dynstr_appendf(ds, "/* %s */\n", name); BLI_dynstr_append(ds, "void main(void)\n"); @@ -602,7 +602,7 @@ static char *code_generate_fragment(ListBase *nodes, GPUOutput *output, const ch code = BLI_dynstr_get_cstring(ds); BLI_dynstr_free(ds); - //if(G.f & G_DEBUG) printf("%s\n", code); + //if(G.debug & G_DEBUG) printf("%s\n", code); return code; } @@ -645,7 +645,7 @@ static char *code_generate_vertex(ListBase *nodes) BLI_dynstr_free(ds); - //if(G.f & G_DEBUG) printf("%s\n", code); + //if(G.debug & G_DEBUG) printf("%s\n", code); return code; } diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c index 846ee2850be..40e6a8b2a35 100644 --- a/source/blender/gpu/intern/gpu_extensions.c +++ b/source/blender/gpu/intern/gpu_extensions.c @@ -220,7 +220,7 @@ int GPU_print_error(const char *str) { GLenum errCode; - if (G.f & G_DEBUG) { + if (G.debug & G_DEBUG) { if ((errCode = glGetError()) != GL_NO_ERROR) { fprintf(stderr, "%s opengl error: %s\n", str, gluErrorString(errCode)); return 1; @@ -942,7 +942,7 @@ static void shader_print_errors(const char *task, char *log, const char *code) fprintf(stderr, "GPUShader: %s error:\n", task); - if (G.f & G_DEBUG) { + if (G.debug & G_DEBUG) { c = code; while ((c < end) && (pos = strchr(c, '\n'))) { fprintf(stderr, "%2d ", line); diff --git a/source/blender/imbuf/intern/cineon/cineon_dpx.c b/source/blender/imbuf/intern/cineon/cineon_dpx.c index c1222d3cea3..a7d168d42a2 100644 --- a/source/blender/imbuf/intern/cineon/cineon_dpx.c +++ b/source/blender/imbuf/intern/cineon/cineon_dpx.c @@ -72,7 +72,7 @@ static struct ImBuf *imb_load_dpx_cineon(unsigned char *mem, int use_cineon, int int width, height, depth; float *frow; - logImageSetVerbose((G.f & G_DEBUG) ? 1:0); + logImageSetVerbose((G.debug & G_DEBUG) ? 1:0); image = logImageOpenFromMem(mem, size, use_cineon); @@ -149,7 +149,7 @@ static int imb_save_dpx_cineon(ImBuf *ibuf, const char *filename, int use_cineon return 0; } - logImageSetVerbose((G.f & G_DEBUG) ? 1:0); + logImageSetVerbose((G.debug & G_DEBUG) ? 1:0); logImage = logImageCreate(filename, use_cineon, width, height, depth); if (!logImage) return 0; diff --git a/source/blender/imbuf/intern/tiff.c b/source/blender/imbuf/intern/tiff.c index 3fbeb6a957d..f81fb740ff0 100644 --- a/source/blender/imbuf/intern/tiff.c +++ b/source/blender/imbuf/intern/tiff.c @@ -492,7 +492,7 @@ static int imb_read_tiff_pixels(ImBuf *ibuf, TIFF *image, int premul) void imb_inittiff(void) { - if (!(G.f & G_DEBUG)) + if (!(G.debug & G_DEBUG)) TIFFSetErrorHandler(NULL); } diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c index c21c58a114a..9c5b39e180d 100644 --- a/source/blender/imbuf/intern/util.c +++ b/source/blender/imbuf/intern/util.c @@ -231,7 +231,7 @@ void do_init_ffmpeg(void) ffmpeg_init = 1; av_register_all(); avdevice_register_all(); - if ((G.f & G_DEBUG_FFMPEG) == 0) { + if ((G.debug & G_DEBUG_FFMPEG) == 0) { silence_log_ffmpeg(1); } else { diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c index 5e4c244dbc2..ef7a2746d37 100644 --- a/source/blender/makesdna/intern/dna_genfile.c +++ b/source/blender/makesdna/intern/dna_genfile.c @@ -783,7 +783,7 @@ static void cast_pointer(int curlen, int oldlen, const char *name, char *curdata } else { /* for debug */ - printf("errpr: illegal pointersize! \n"); + printf("errpr: illegal pointersize!\n"); } olddata+= oldlen; diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index bd04698107c..ae6432dcbe4 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -312,10 +312,10 @@ static int add_name(const char *str) j++; /* j beyond closing brace ? */ while ((str[j] != 0) && (str[j] != ')' )) { - if (debugSDNA > 3) printf("seen %c ( %d) \n", str[j], str[j]); + if (debugSDNA > 3) printf("seen %c ( %d)\n", str[j], str[j]); j++; } - if (debugSDNA > 3) printf("seen %c ( %d) \n" + if (debugSDNA > 3) printf("seen %c ( %d)\n" "special after offset%d\n", str[j], str[j], j); @@ -848,7 +848,7 @@ static int calculate_structlens(int firststruct) printf("ERROR: still %d structs unknown\n", unknown); if (debugSDNA) { - printf("*** Known structs : \n"); + printf("*** Known structs :\n"); for (a=0; anewscene); WM_event_add_notifier(C, NC_SCENE|ND_SCENEBROWSE, sc->newscene); - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("scene set %p\n", sc->newscene); sc->newscene = NULL; diff --git a/source/blender/nodes/composite/node_composite_tree.c b/source/blender/nodes/composite/node_composite_tree.c index b60e962f534..7bd0d03322d 100644 --- a/source/blender/nodes/composite/node_composite_tree.c +++ b/source/blender/nodes/composite/node_composite_tree.c @@ -523,7 +523,7 @@ static void freeExecutableNode(bNodeTreeExec *exec) if (ns && ns->data) { free_compbuf(ns->data); ns->data= NULL; - // printf("freed buf node %s \n", node->name); + // printf("freed buf node %s\n", node->name); } } } diff --git a/source/blender/python/intern/bpy_app.c b/source/blender/python/intern/bpy_app.c index aab1f508e32..44979700d94 100644 --- a/source/blender/python/intern/bpy_app.c +++ b/source/blender/python/intern/bpy_app.c @@ -166,24 +166,26 @@ static PyObject *make_app_info(void) * they are not static */ PyDoc_STRVAR(bpy_app_debug_doc, -"Boolean, set when blender is running in debug mode (started with --debug)" +"Boolean, for debug info (started with --debug / --debug_* matching this attribute name)" ); -static PyObject *bpy_app_debug_get(PyObject *UNUSED(self), void *UNUSED(closure)) +static PyObject *bpy_app_debug_get(PyObject *UNUSED(self), void *closure) { - return PyBool_FromLong(G.f & G_DEBUG); + const int flag = GET_INT_FROM_POINTER(closure); + return PyBool_FromLong(G.debug & flag); } -static int bpy_app_debug_set(PyObject *UNUSED(self), PyObject *value, void *UNUSED(closure)) +static int bpy_app_debug_set(PyObject *UNUSED(self), PyObject *value, void *closure) { - int param = PyObject_IsTrue(value); + const int flag = GET_INT_FROM_POINTER(closure); + const int param = PyObject_IsTrue(value); if (param < 0) { PyErr_SetString(PyExc_TypeError, "bpy.app.debug can only be True/False"); return -1; } - if (param) G.f |= G_DEBUG; - else G.f &= ~G_DEBUG; + if (param) G.debug |= flag; + else G.debug &= ~flag; return 0; } @@ -236,7 +238,12 @@ static PyObject *bpy_app_driver_dict_get(PyObject *UNUSED(self), void *UNUSED(cl static PyGetSetDef bpy_app_getsets[] = { - {(char *)"debug", bpy_app_debug_get, bpy_app_debug_set, (char *)bpy_app_debug_doc, NULL}, + {(char *)"debug", bpy_app_debug_get, bpy_app_debug_set, (char *)bpy_app_debug_doc, (void *)G_DEBUG}, + {(char *)"debug_ffmpeg", bpy_app_debug_get, bpy_app_debug_set, (char *)bpy_app_debug_doc, (void *)G_DEBUG_FFMPEG}, + {(char *)"debug_python", bpy_app_debug_get, bpy_app_debug_set, (char *)bpy_app_debug_doc, (void *)G_DEBUG_PYTHON}, + {(char *)"debug_events", bpy_app_debug_get, bpy_app_debug_set, (char *)bpy_app_debug_doc, (void *)G_DEBUG_EVENTS}, + {(char *)"debug_wm", bpy_app_debug_get, bpy_app_debug_set, (char *)bpy_app_debug_doc, (void *)G_DEBUG_WM}, + {(char *)"debug_value", bpy_app_debug_value_get, bpy_app_debug_value_set, (char *)bpy_app_debug_value_doc, NULL}, {(char *)"tempdir", bpy_app_tempdir_get, NULL, (char *)bpy_app_tempdir_doc, NULL}, {(char *)"driver_namespace", bpy_app_driver_dict_get, NULL, (char *)bpy_app_driver_dict_doc, NULL}, diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index 61b3f7b1575..7b362e56c73 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -696,7 +696,7 @@ int BPY_context_member_get(bContext *C, const char *member, bContextDataResult * else printf("PyContext '%s' not found\n", member); } else { - if (G.f & G_DEBUG) { + if (G.debug & G_DEBUG_PYTHON) { printf("PyContext '%s' found\n", member); } } diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 1f284ae01cb..7af53b489bd 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -6033,7 +6033,7 @@ static PyObject *pyrna_srna_ExternalType(StructRNA *srna) newclass = NULL; } else { - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG_PYTHON) fprintf(stderr, "SRNA Subclassed: '%s'\n", idname); } } @@ -7145,7 +7145,7 @@ static void bpy_class_free(void *pyob_ptr) PyErr_Clear(); #if 0 /* needs further investigation, too annoying so quiet for now */ - if (G.f & G_DEBUG) { + if (G.debug & G_DEBUG_PYTHON) { if (self->ob_refcnt > 1) { PyC_ObSpit("zombie class - ref should be 1", self); } @@ -7444,7 +7444,7 @@ static PyObject *pyrna_unregister_class(PyObject *UNUSED(self), PyObject *py_cla } /* should happen all the time but very slow */ - if (G.f & G_DEBUG) { + if (G.debug & G_DEBUG_PYTHON) { /* remove all properties using this class */ StructRNA *srna_iter; PointerRNA ptr_rna; diff --git a/source/blender/python/intern/bpy_rna_array.c b/source/blender/python/intern/bpy_rna_array.c index 8d8219df188..5c59c1e620a 100644 --- a/source/blender/python/intern/bpy_rna_array.c +++ b/source/blender/python/intern/bpy_rna_array.c @@ -664,7 +664,7 @@ PyObject *pyrna_py_from_array_index(BPy_PropertyArrayRNA *self, PointerRNA *ptr, len = RNA_property_multi_array_length(ptr, prop, arraydim); if (index >= len || index < 0) { /* this shouldn't happen because higher level funcs must check for invalid index */ - if (G.f & G_DEBUG) printf("pyrna_py_from_array_index: invalid index %d for array with length=%d\n", index, len); + if (G.debug & G_DEBUG_PYTHON) printf("pyrna_py_from_array_index: invalid index %d for array with length=%d\n", index, len); PyErr_SetString(PyExc_IndexError, "out of range"); return NULL; diff --git a/source/blender/render/intern/raytrace/rayobject_octree.cpp b/source/blender/render/intern/raytrace/rayobject_octree.cpp index 197b3f14c7a..ea1d5c2573c 100644 --- a/source/blender/render/intern/raytrace/rayobject_octree.cpp +++ b/source/blender/render/intern/raytrace/rayobject_octree.cpp @@ -440,8 +440,8 @@ static void RE_rayobject_octree_free(RayObject *tree) #if 0 printf("branches %d nodes %d\n", oc->branchcount, oc->nodecount); - printf("raycount %d \n", raycount); - printf("ray coherent %d \n", coherent_ray); + printf("raycount %d\n", raycount); + printf("ray coherent %d\n", coherent_ray); printf("accepted %d rejected %d\n", accepted, rejected); #endif if (oc->ocface) diff --git a/source/blender/render/intern/raytrace/rayobject_vbvh.cpp b/source/blender/render/intern/raytrace/rayobject_vbvh.cpp index 84395a9ad50..e82623f1da9 100644 --- a/source/blender/render/intern/raytrace/rayobject_vbvh.cpp +++ b/source/blender/render/intern/raytrace/rayobject_vbvh.cpp @@ -161,7 +161,7 @@ void bfree(VBVHTree *tree) { if (tot_pushup + tot_pushdown + tot_hints + tot_moves) { - if (G.f & G_DEBUG) { + if (G.debug & G_DEBUG) { printf("tot pushups: %d\n", tot_pushup); printf("tot pushdowns: %d\n", tot_pushdown); printf("tot moves: %d\n", tot_moves); diff --git a/source/blender/render/intern/raytrace/reorganize.h b/source/blender/render/intern/raytrace/reorganize.h index be131100021..68b2b22ecdd 100644 --- a/source/blender/render/intern/raytrace/reorganize.h +++ b/source/blender/render/intern/raytrace/reorganize.h @@ -529,7 +529,7 @@ struct VBVH_optimalPackSIMD if(num == 0) { num++; first = true; } calc_costs(node); - if((G.f & G_DEBUG) && first) printf("expected cost = %f (%d)\n", node->cut_cost[0], node->best_cutsize ); + if((G.debug & G_DEBUG) && first) printf("expected cost = %f (%d)\n", node->cut_cost[0], node->best_cutsize ); node->optimize(); } return node; diff --git a/source/blender/render/intern/raytrace/svbvh.h b/source/blender/render/intern/raytrace/svbvh.h index fba9bb9ad41..e0e96781f36 100644 --- a/source/blender/render/intern/raytrace/svbvh.h +++ b/source/blender/render/intern/raytrace/svbvh.h @@ -224,7 +224,7 @@ struct Reorganize_SVBVH ~Reorganize_SVBVH() { - if(G.f & G_DEBUG) { + if(G.debug & G_DEBUG) { printf("%f childs per node\n", childs_per_node / nodes); printf("%d childs BB are useless\n", useless_bb); for(int i=0; i<16; i++) diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c index ff6f83cc946..b8935b5f960 100644 --- a/source/blender/render/intern/source/convertblender.c +++ b/source/blender/render/intern/source/convertblender.c @@ -3231,7 +3231,7 @@ static void init_camera_inside_volumes(Render *re) /* debug { MatInside *m; for (m=re->render_volumes_inside.first; m; m=m->next) { - printf("matinside: ma: %s \n", m->ma->id.name+2); + printf("matinside: ma: %s\n", m->ma->id.name+2); } }*/ } @@ -4649,7 +4649,7 @@ void RE_Database_Free(Render *re) LampRen *lar; /* statistics for debugging render memory usage */ - if ((G.f & G_DEBUG) && (G.rendering)) { + if ((G.debug & G_DEBUG) && (G.rendering)) { if ((re->r.scemode & R_PREVIEWBUTS)==0) { BKE_image_print_memlist(); MEM_printmemlist_stats(); @@ -5516,7 +5516,7 @@ static int load_fluidsimspeedvectors(Render *re, ObjectInstanceRen *obi, float * // set both to the same value speed[0]= speed[2]= zco[0]; speed[1]= speed[3]= zco[1]; - //if(a<20) fprintf(stderr,"speed %d %f,%f | camco %f,%f,%f | hoco %f,%f,%f,%f \n", a, speed[0], speed[1], camco[0],camco[1], camco[2], hoco[0],hoco[1], hoco[2],hoco[3]); // NT DEBUG + //if(a<20) fprintf(stderr,"speed %d %f,%f | camco %f,%f,%f | hoco %f,%f,%f,%f\n", a, speed[0], speed[1], camco[0],camco[1], camco[2], hoco[0],hoco[1], hoco[2],hoco[3]); // NT DEBUG } return 1; diff --git a/source/blender/render/intern/source/volume_precache.c b/source/blender/render/intern/source/volume_precache.c index bd01c75ef3f..bb3ef082500 100644 --- a/source/blender/render/intern/source/volume_precache.c +++ b/source/blender/render/intern/source/volume_precache.c @@ -485,11 +485,11 @@ static void *vol_precache_part_test(void *data) { VolPrecachePart *pa = data; - printf("part number: %d \n", pa->num); - printf("done: %d \n", pa->done); - printf("x min: %d x max: %d \n", pa->minx, pa->maxx); - printf("y min: %d y max: %d \n", pa->miny, pa->maxy); - printf("z min: %d z max: %d \n", pa->minz, pa->maxz); + printf("part number: %d\n", pa->num); + printf("done: %d\n", pa->done); + printf("x min: %d x max: %d\n", pa->minx, pa->maxx); + printf("y min: %d y max: %d\n", pa->miny, pa->maxy); + printf("z min: %d z max: %d\n", pa->minz, pa->maxz); return NULL; } diff --git a/source/blender/windowmanager/intern/wm_cursors.c b/source/blender/windowmanager/intern/wm_cursors.c index 80a25913481..f97391c0d6e 100644 --- a/source/blender/windowmanager/intern/wm_cursors.c +++ b/source/blender/windowmanager/intern/wm_cursors.c @@ -188,7 +188,7 @@ void WM_cursor_grab(wmWindow *win, int wrap, int hide, int *bounds) if (hide) mode = GHOST_kGrabHide; else if (wrap) mode = GHOST_kGrabWrap; - if ((G.f & G_DEBUG) == 0) { + if ((G.debug & G_DEBUG) == 0) { if (win && win->ghostwin) { const GHOST_TabletData *tabletdata = GHOST_GetTabletData(win->ghostwin); // Note: There is no tabletdata on Windows if no tablet device is connected. @@ -204,7 +204,7 @@ void WM_cursor_grab(wmWindow *win, int wrap, int hide, int *bounds) void WM_cursor_ungrab(wmWindow *win) { - if ((G.f & G_DEBUG) == 0) { + if ((G.debug & G_DEBUG) == 0) { if (win && win->ghostwin) { GHOST_SetCursorGrab(win->ghostwin, GHOST_kGrabDisable, NULL); win->grabcursor = GHOST_kGrabDisable; diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 2327ca46862..42fb03d5d64 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -213,13 +213,13 @@ void wm_event_do_notifiers(bContext *C) if (note->category == NC_SCREEN) { if (note->data == ND_SCREENBROWSE) { ED_screen_set(C, note->reference); // XXX hrms, think this over! - if (G.f & G_DEBUG) - printf("screen set %p\n", note->reference); + if (G.debug & G_DEBUG_EVENTS) + printf("%s: screen set %p\n", __func__, note->reference); } else if (note->data == ND_SCREENDELETE) { ED_screen_delete(C, note->reference); // XXX hrms, think this over! - if (G.f & G_DEBUG) - printf("screen delete %p\n", note->reference); + if (G.debug & G_DEBUG_EVENTS) + printf("%s: screen delete %p\n", __func__, note->reference); } } } @@ -482,7 +482,7 @@ static void wm_operator_reports(bContext *C, wmOperator *op, int retval, int cal } if (retval & OPERATOR_FINISHED) { - if (G.f & G_DEBUG) { + if (G.debug & G_DEBUG_WM) { /* todo - this print may double up, might want to check more flags then the FINISHED */ wm_operator_print(C, op); } @@ -544,7 +544,7 @@ static void wm_operator_finished(bContext *C, wmOperator *op, int repeat) ED_undo_push_op(C, op); if (repeat == 0) { - if (G.f & G_DEBUG) { + if (G.debug & G_DEBUG_WM) { char *buf = WM_operator_pystring(C, op->type, op->ptr, 1); BKE_report(CTX_wm_reports(C), RPT_OPERATOR, buf); MEM_freeN(buf); @@ -754,7 +754,9 @@ int WM_operator_last_properties_init(wmOperator *op) if (op->type->last_properties) { PropertyRNA *iterprop; - if (G.f & G_DEBUG) printf("%s: loading previous properties for '%s'\n", __func__, op->type->idname); + if (G.debug & G_DEBUG_WM) { + printf("%s: loading previous properties for '%s'\n", __func__, op->type->idname); + } iterprop = RNA_struct_iterator_property(op->type->srna); @@ -792,7 +794,9 @@ int WM_operator_last_properties_store(wmOperator *op) } if (op->properties) { - if (G.f & G_DEBUG) printf("%s: storing properties for '%s'\n", __func__, op->type->idname); + if (G.debug & G_DEBUG_WM) { + printf("%s: storing properties for '%s'\n", __func__, op->type->idname); + } op->type->last_properties = IDP_CopyProperty(op->properties); return TRUE; } @@ -819,8 +823,9 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, P WM_operator_last_properties_init(op); } - if ((G.f & G_DEBUG) && event && event->type != MOUSEMOVE) - printf("handle evt %d win %d op %s\n", event ? event->type : 0, CTX_wm_screen(C)->subwinactive, ot->idname); + if ((G.debug & G_DEBUG_EVENTS) && event && event->type != MOUSEMOVE) { + printf("%s: handle evt %d win %d op %s\n", __func__, event ? event->type : 0, CTX_wm_screen(C)->subwinactive, ot->idname); + } if (op->type->invoke && event) { wm_region_mouse_co(C, event); @@ -1540,7 +1545,7 @@ static int wm_handler_fileselect_call(bContext *C, ListBase *handlers, wmEventHa wm->op_undo_depth--; if (retval & OPERATOR_FINISHED) - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG_WM) wm_operator_print(C, handler->op); /* XXX check this carefully, CTX_wm_manager(C) == wm is a bit hackish */ @@ -1965,9 +1970,10 @@ void wm_event_do_handlers(bContext *C) while ( (event = win->queue.first) ) { int action = WM_HANDLER_CONTINUE; - if ((G.f & G_DEBUG) && event && !ELEM(event->type, MOUSEMOVE, INBETWEEN_MOUSEMOVE)) - printf("pass on evt %d val %d\n", event->type, event->val); - + if ((G.debug & G_DEBUG_EVENTS) && event && !ELEM(event->type, MOUSEMOVE, INBETWEEN_MOUSEMOVE)) { + printf("%s: pass on evt %d val %d\n", __func__, event->type, event->val); + } + wm_eventemulation(event); CTX_wm_window_set(C, win); diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c index a9f17359573..39651cea3ab 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.c +++ b/source/blender/windowmanager/intern/wm_init_exit.c @@ -448,7 +448,7 @@ void WM_exit_ext(bContext *C, const short do_python) #ifdef WIN32 /* ask user to press enter when in debug mode */ - if (G.f & G_DEBUG) { + if (G.debug & G_DEBUG) { printf("press enter key to exit...\n\n"); getchar(); } diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 94de4293a6e..123cc60e4fa 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -1371,7 +1371,7 @@ static void operator_search_cb(const struct bContext *C, void *UNUSED(arg), cons for (; !BLI_ghashIterator_isDone(iter); BLI_ghashIterator_step(iter)) { wmOperatorType *ot = BLI_ghashIterator_getValue(iter); - if ((ot->flag & OPTYPE_INTERNAL) && (G.f & G_DEBUG) == 0) + if ((ot->flag & OPTYPE_INTERNAL) && (G.debug & G_DEBUG_WM) == 0) continue; if (BLI_strcasestr(ot->name, str)) { diff --git a/source/blender/windowmanager/intern/wm_subwindow.c b/source/blender/windowmanager/intern/wm_subwindow.c index 564fa963d6e..6ffb28ba013 100644 --- a/source/blender/windowmanager/intern/wm_subwindow.c +++ b/source/blender/windowmanager/intern/wm_subwindow.c @@ -163,7 +163,10 @@ int wm_subwindow_open(wmWindow *win, rcti *winrct) win->curswin = swin = MEM_callocN(sizeof(wmSubWindow), "swinopen"); BLI_addtail(&win->subwindows, swin); - if (G.f & G_DEBUG) printf("swin %d added\n", freewinid); + if (G.debug & G_DEBUG_EVENTS) { + printf("%s: swin %d added\n", __func__, freewinid); + } + swin->swinid = freewinid; swin->winrct = *winrct; diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index fd9d789ffd4..031cfe90042 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -625,7 +625,9 @@ void wm_window_make_drawable(bContext *C, wmWindow *win) // win->lmbut= 0; /* keeps hanging when mousepressed while other window opened */ wm->windrawable = win; - if (G.f & G_DEBUG) printf("set drawable %d\n", win->winid); + if (G.debug & G_DEBUG_EVENTS) { + printf("%s: set drawable %d\n", __func__, win->winid); + } GHOST_ActivateWindowDrawingContext(win->ghostwin); } } @@ -716,7 +718,9 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr private) break; } case GHOST_kEventWindowUpdate: { - if (G.f & G_DEBUG) printf("ghost redraw\n"); + if (G.debug & G_DEBUG_EVENTS) { + printf("%s: ghost redraw %d\n", __func__, win->winid); + } wm_window_make_drawable(C, win); WM_event_add_notifier(C, NC_WINDOW, NULL); @@ -765,29 +769,32 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr private) win->posy = posy; /* debug prints */ - if (0) { + if (G.debug & G_DEBUG_EVENTS) { + const char *state_str; state = GHOST_GetWindowState(win->ghostwin); - + if (state == GHOST_kWindowStateNormal) { - if (G.f & G_DEBUG) printf("window state: normal\n"); + state_str = "normal"; } else if (state == GHOST_kWindowStateMinimized) { - if (G.f & G_DEBUG) printf("window state: minimized\n"); + state_str = "minimized"; } else if (state == GHOST_kWindowStateMaximized) { - if (G.f & G_DEBUG) printf("window state: maximized\n"); + state_str = "maximized"; } else if (state == GHOST_kWindowStateFullScreen) { - if (G.f & G_DEBUG) printf("window state: fullscreen\n"); + state_str = "fullscreen"; } - + else { + state_str = ""; + } + + printf("%s: window %d state = %s\n", __func__, win->winid, state_str); + if (type != GHOST_kEventWindowSize) { - if (G.f & G_DEBUG) { - printf("win move event pos %d %d size %d %d\n", - win->posx, win->posy, win->sizex, win->sizey); - } + printf("win move event pos %d %d size %d %d\n", + win->posx, win->posy, win->sizex, win->sizey); } - } wm_window_make_drawable(C, win); -- cgit v1.2.3 From f3792b0f2b37be665e70f94bcf2bbbe152bdf0ff Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 31 Mar 2012 03:36:15 +0000 Subject: code cleanup: use uppercase for defines and dont end macro's with ; --- source/blender/blenkernel/intern/fmodifier.c | 2 +- source/blender/blenkernel/intern/mesh.c | 10 +++--- source/blender/blenlib/intern/noise.c | 50 +++++++++++++++------------- 3 files changed, 34 insertions(+), 28 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/fmodifier.c b/source/blender/blenkernel/intern/fmodifier.c index bbd07693cea..ed5cf5e7924 100644 --- a/source/blender/blenkernel/intern/fmodifier.c +++ b/source/blender/blenkernel/intern/fmodifier.c @@ -335,7 +335,7 @@ static void fcm_fn_generator_evaluate (FCurve *UNUSED(fcu), FModifier *fcm, floa case FCM_GENERATOR_FN_TAN: /* tangent wave */ { /* check that argument is not on one of the discontinuities (i.e. 90deg, 270 deg, etc) */ - if IS_EQ(fmod((arg - M_PI_2), M_PI), 0.0) { + if (IS_EQ(fmod((arg - M_PI_2), M_PI), 0.0)) { if ((data->flag & FCM_GENERATOR_ADDITIVE) == 0) *cvalue = 0.0f; /* no value possible here */ } diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index ed2b71cdb52..ea061c99156 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -2406,6 +2406,7 @@ int mesh_recalcTessellation(CustomData *fdata, BLI_array_append(mface_orig_index, \ poly_orig_index[poly_index]); \ } \ + (void)0 /* ALMOST IDENTICAL TO DEFINE ABOVE (see EXCEPTION) */ #define ML_TO_MF_QUAD() \ @@ -2425,20 +2426,21 @@ int mesh_recalcTessellation(CustomData *fdata, poly_orig_index[poly_index]); \ } \ mf->edcode |= TESSFACE_IS_QUAD; /* EXCEPTION */ \ + (void)0 else if (mp->totloop == 3) { - ML_TO_MF(0, 1, 2) + ML_TO_MF(0, 1, 2); mface_index++; } else if (mp->totloop == 4) { #ifdef USE_TESSFACE_QUADS - ML_TO_MF_QUAD() + ML_TO_MF_QUAD(); mface_index++; #else - ML_TO_MF(0, 1, 2) + ML_TO_MF(0, 1, 2); mface_index++; - ML_TO_MF(0, 2, 3) + ML_TO_MF(0, 2, 3); mface_index++; #endif } diff --git a/source/blender/blenlib/intern/noise.c b/source/blender/blenlib/intern/noise.c index 93c1a696f03..f1749d0b7cd 100644 --- a/source/blender/blenlib/intern/noise.c +++ b/source/blender/blenlib/intern/noise.c @@ -919,12 +919,14 @@ static float g[512+2][3]= { {-0.944031, -0.326599, -0.045624}, }; -#define setup(i,b0,b1,r0,r1) \ - t = vec[i] + 10000.0f; \ - b0 = ((int)t) & 255; \ - b1 = (b0+1) & 255; \ - r0 = t - floorf(t); \ - r1 = r0 - 1.0f; +#define SETUP(val, b0, b1, r0, r1) \ + { \ + t = val + 10000.0f; \ + b0 = ((int)t) & 255; \ + b1 = (b0 + 1) & 255; \ + r0 = t - floorf(t); \ + r1 = r0 - 1.0f; \ + } static float noise3_perlin(float vec[3]) @@ -934,9 +936,9 @@ static float noise3_perlin(float vec[3]) register int i, j; - setup(0, bx0,bx1, rx0,rx1); - setup(1, by0,by1, ry0,ry1); - setup(2, bz0,bz1, rz0,rz1); + SETUP(vec[0], bx0, bx1, rx0, rx1); + SETUP(vec[1], by0, by1, ry0, ry1); + SETUP(vec[2], bz0, bz1, rz0, rz1); i = p[ bx0 ]; j = p[ bx1 ]; @@ -946,46 +948,48 @@ static float noise3_perlin(float vec[3]) b01 = p[ i + by1 ]; b11 = p[ j + by1 ]; -#define at(rx,ry,rz) ( rx * q[0] + ry * q[1] + rz * q[2] ) - -#define surve(t) ( t * t * (3.0f - 2.0f * t) ) +#define VALUE_AT(rx,ry,rz) (rx * q[0] + ry * q[1] + rz * q[2]) +#define SURVE(t) (t * t * (3.0f - 2.0f * t)) /* lerp moved to improved perlin above */ - sx = surve(rx0); - sy = surve(ry0); - sz = surve(rz0); + sx = SURVE(rx0); + sy = SURVE(ry0); + sz = SURVE(rz0); q = g[ b00 + bz0 ]; - u = at(rx0,ry0,rz0); + u = VALUE_AT(rx0,ry0,rz0); q = g[ b10 + bz0 ]; - v = at(rx1,ry0,rz0); + v = VALUE_AT(rx1,ry0,rz0); a = lerp(sx, u, v); q = g[ b01 + bz0 ]; - u = at(rx0,ry1,rz0); + u = VALUE_AT(rx0,ry1,rz0); q = g[ b11 + bz0 ]; - v = at(rx1,ry1,rz0); + v = VALUE_AT(rx1,ry1,rz0); b = lerp(sx, u, v); c = lerp(sy, a, b); /* interpolate in y at lo x */ q = g[ b00 + bz1 ]; - u = at(rx0,ry0,rz1); + u = VALUE_AT(rx0,ry0,rz1); q = g[ b10 + bz1 ]; - v = at(rx1,ry0,rz1); + v = VALUE_AT(rx1,ry0,rz1); a = lerp(sx, u, v); q = g[ b01 + bz1 ]; - u = at(rx0,ry1,rz1); + u = VALUE_AT(rx0,ry1,rz1); q = g[ b11 + bz1 ]; - v = at(rx1,ry1,rz1); + v = VALUE_AT(rx1,ry1,rz1); b = lerp(sx, u, v); d = lerp(sy, a, b); /* interpolate in y at hi x */ return 1.5f * lerp(sz, c, d); /* interpolate in z */ + +#undef VALUE_AT +#undef SURVE } #if 0 -- cgit v1.2.3 From 21ac9ae461e19fa51c95c0e0a0413878cfd85d09 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 31 Mar 2012 04:04:58 +0000 Subject: code cleanup: use uppercase defines and change drawFCurveFade into static function. --- source/blender/editors/space_graph/graph_draw.c | 28 +++----- source/blender/imbuf/intern/radiance_hdr.c | 2 +- .../blender/nodes/composite/node_composite_util.c | 8 +-- .../composite/nodes/node_composite_colorSpill.c | 14 ++-- source/blender/python/bmesh/bmesh_py_types.c | 46 ++++++------- source/blender/render/intern/source/sunsky.c | 80 ++++++++++++---------- .../blender/render/intern/source/volume_precache.c | 10 +-- 7 files changed, 91 insertions(+), 97 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c index 279e6ce0400..25998e7bce2 100644 --- a/source/blender/editors/space_graph/graph_draw.c +++ b/source/blender/editors/space_graph/graph_draw.c @@ -73,18 +73,10 @@ * drawing components for some F-Curve (fcu) * - selected F-Curves should be more visible than partially visible ones */ -#define drawFCurveFade(fcu) ( ((fcu)->flag & FCURVE_SELECTED)? 1.0f : U.fcu_inactive_alpha ) - -/* set the color for some point from some value given packed into an int - * - intV: integer value containing color info packed into an int - * - alpha: float value describing the - */ -#define cpackA(intVC, alpha) \ - { \ - float _cpackCol[3]; \ - cpack_to_rgb(intVC, &_cpackCol[0], &_cpackCol[1], &_cpackCol[2]); \ - glColor4f(_cpackCol[0], _cpackCol[1], _cpackCol[2], alpha); \ - } +static float fcurve_display_alpha(FCurve *fcu) +{ + return (fcu->flag & FCURVE_SELECTED) ? 1.0f : U.fcu_inactive_alpha; +} /* *************************** */ /* F-Curve Modifier Drawing */ @@ -263,7 +255,7 @@ static void draw_fcurve_vertices_handles (FCurve *fcu, SpaceIpo *sipo, View2D *v static void set_fcurve_vertex_color (FCurve *fcu, short sel) { /* Fade the 'intensity' of the vertices based on the selection of the curves too */ - int alphaOffset= (int)((drawFCurveFade(fcu) - 1.0f) * 255); + int alphaOffset= (int)((fcurve_display_alpha(fcu) - 1.0f) * 255); /* Set color of curve vertex based on state of curve (i.e. 'Edit' Mode) */ if ((fcu->flag & FCURVE_PROTECTED)==0) { @@ -369,7 +361,7 @@ static void draw_fcurve_handles (SpaceIpo *sipo, FCurve *fcu) /* only draw first handle if previous segment had handles */ if ((!prevbezt && (bezt->ipo==BEZT_IPO_BEZ)) || (prevbezt && (prevbezt->ipo==BEZT_IPO_BEZ))) { UI_GetThemeColor3ubv(basecol + bezt->h1, col); - col[3]= drawFCurveFade(fcu) * 255; + col[3]= fcurve_display_alpha(fcu) * 255; glColor4ubv((GLubyte *)col); glVertex2fv(fp); glVertex2fv(fp+3); @@ -378,7 +370,7 @@ static void draw_fcurve_handles (SpaceIpo *sipo, FCurve *fcu) /* only draw second handle if this segment is bezier */ if (bezt->ipo == BEZT_IPO_BEZ) { UI_GetThemeColor3ubv(basecol + bezt->h2, col); - col[3]= drawFCurveFade(fcu) * 255; + col[3]= fcurve_display_alpha(fcu) * 255; glColor4ubv((GLubyte *)col); glVertex2fv(fp+3); glVertex2fv(fp+6); @@ -391,7 +383,7 @@ static void draw_fcurve_handles (SpaceIpo *sipo, FCurve *fcu) { fp= bezt->vec[0]; UI_GetThemeColor3ubv(basecol + bezt->h1, col); - col[3]= drawFCurveFade(fcu) * 255; + col[3]= fcurve_display_alpha(fcu) * 255; glColor4ubv((GLubyte *)col); glVertex2fv(fp); glVertex2fv(fp+3); @@ -403,7 +395,7 @@ static void draw_fcurve_handles (SpaceIpo *sipo, FCurve *fcu) { fp= bezt->vec[1]; UI_GetThemeColor3ubv(basecol + bezt->h2, col); - col[3]= drawFCurveFade(fcu) * 255; + col[3]= fcurve_display_alpha(fcu) * 255; glColor4ubv((GLubyte *)col); glVertex2fv(fp); glVertex2fv(fp+3); @@ -867,7 +859,7 @@ void graph_draw_curves (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGri /* set whatever color the curve has set * - unselected curves draw less opaque to help distinguish the selected ones */ - glColor4f(fcu->color[0], fcu->color[1], fcu->color[2], drawFCurveFade(fcu)); + glColor4f(fcu->color[0], fcu->color[1], fcu->color[2], fcurve_display_alpha(fcu)); } /* draw active F-Curve thicker than the rest to make it stand out */ diff --git a/source/blender/imbuf/intern/radiance_hdr.c b/source/blender/imbuf/intern/radiance_hdr.c index 5b093dc6cac..524f96b72af 100644 --- a/source/blender/imbuf/intern/radiance_hdr.c +++ b/source/blender/imbuf/intern/radiance_hdr.c @@ -43,7 +43,7 @@ #include "MEM_guardedalloc.h" -#include "BLI_blenlib.h" +#include "BLI_fileops.h" #include "imbuf.h" diff --git a/source/blender/nodes/composite/node_composite_util.c b/source/blender/nodes/composite/node_composite_util.c index 8e98c055157..ab3a363e703 100644 --- a/source/blender/nodes/composite/node_composite_util.c +++ b/source/blender/nodes/composite/node_composite_util.c @@ -881,12 +881,12 @@ static void FHT2D(fREAL *data, unsigned int Mx, unsigned int My, else { // rectangular unsigned int k, Nym = Ny-1, stm = 1 << (Mx + My); for (i=0; stm>0; i++) { - #define pred(k) (((k & Nym) << Mx) + (k >> My)) - for (j=pred(i); j>i; j=pred(j)); + #define PRED(k) (((k & Nym) << Mx) + (k >> My)) + for (j=PRED(i); j>i; j=PRED(j)); if (j < i) continue; - for (k=i, j=pred(i); j!=i; k=j, j=pred(j), stm--) + for (k=i, j=PRED(i); j!=i; k=j, j=PRED(j), stm--) { t=data[j], data[j]=data[k], data[k]=t; } - #undef pred + #undef PRED stm--; } } diff --git a/source/blender/nodes/composite/nodes/node_composite_colorSpill.c b/source/blender/nodes/composite/nodes/node_composite_colorSpill.c index 026d74aafc4..46d7c620aa8 100644 --- a/source/blender/nodes/composite/nodes/node_composite_colorSpill.c +++ b/source/blender/nodes/composite/nodes/node_composite_colorSpill.c @@ -33,7 +33,7 @@ #include "node_composite_util.h" -#define avg(a,b) ((a+b)/2) +#define AVG(a, b) ((a + b) / 2) /* ******************* Color Spill Supression ********************************* */ static bNodeSocketTemplate cmp_node_color_spill_in[]={ @@ -96,7 +96,7 @@ static void do_average_spillmap_red(bNode *node, float* out, float *in) { NodeColorspill *ncs; ncs=node->storage; - out[0]=in[0]-(ncs->limscale * avg(in[1], in[2]) ); + out[0]=in[0]-(ncs->limscale * AVG(in[1], in[2]) ); } static void do_average_spillmap_red_fac(bNode *node, float* out, float *in, float *fac) @@ -104,14 +104,14 @@ static void do_average_spillmap_red_fac(bNode *node, float* out, float *in, floa NodeColorspill *ncs; ncs=node->storage; - out[0] = *fac * (in[0]-(ncs->limscale * avg(in[1], in[2]) )); + out[0] = *fac * (in[0]-(ncs->limscale * AVG(in[1], in[2]) )); } static void do_average_spillmap_green(bNode *node, float* out, float *in) { NodeColorspill *ncs; ncs=node->storage; - out[0]=in[1]-(ncs->limscale * avg(in[0], in[2]) ); + out[0]=in[1]-(ncs->limscale * AVG(in[0], in[2]) ); } static void do_average_spillmap_green_fac(bNode *node, float* out, float *in, float *fac) @@ -119,14 +119,14 @@ static void do_average_spillmap_green_fac(bNode *node, float* out, float *in, fl NodeColorspill *ncs; ncs=node->storage; - out[0] = *fac * (in[0]-(ncs->limscale * avg(in[0], in[2]) )); + out[0] = *fac * (in[0]-(ncs->limscale * AVG(in[0], in[2]) )); } static void do_average_spillmap_blue(bNode *node, float* out, float *in) { NodeColorspill *ncs; ncs=node->storage; - out[0]=in[2]-(ncs->limscale * avg(in[0], in[1]) ); + out[0]=in[2]-(ncs->limscale * AVG(in[0], in[1]) ); } static void do_average_spillmap_blue_fac(bNode *node, float* out, float *in, float *fac) @@ -134,7 +134,7 @@ static void do_average_spillmap_blue_fac(bNode *node, float* out, float *in, flo NodeColorspill *ncs; ncs=node->storage; - out[0] = *fac * (in[0]-(ncs->limscale * avg(in[0], in[1]) )); + out[0] = *fac * (in[0]-(ncs->limscale * AVG(in[0], in[1]) )); } static void do_apply_spillmap_red(bNode *node, float* out, float *in, float *map) diff --git a/source/blender/python/bmesh/bmesh_py_types.c b/source/blender/python/bmesh/bmesh_py_types.c index b2eed6d99d8..4b4dc7caa7f 100644 --- a/source/blender/python/bmesh/bmesh_py_types.c +++ b/source/blender/python/bmesh/bmesh_py_types.c @@ -2809,36 +2809,36 @@ PyObject *BPyInit_bmesh_types(void) submodule = PyModule_Create(&BPy_BM_types_module_def); -#define mod_type_add(s, t) \ +#define MODULE_TYPE_ADD(s, t) \ PyModule_AddObject(s, t.tp_name, (PyObject *)&t); Py_INCREF((PyObject *)&t) /* bmesh_py_types.c */ - mod_type_add(submodule, BPy_BMesh_Type); - mod_type_add(submodule, BPy_BMVert_Type); - mod_type_add(submodule, BPy_BMEdge_Type); - mod_type_add(submodule, BPy_BMFace_Type); - mod_type_add(submodule, BPy_BMLoop_Type); - mod_type_add(submodule, BPy_BMElemSeq_Type); - mod_type_add(submodule, BPy_BMVertSeq_Type); - mod_type_add(submodule, BPy_BMEdgeSeq_Type); - mod_type_add(submodule, BPy_BMFaceSeq_Type); - mod_type_add(submodule, BPy_BMLoopSeq_Type); - mod_type_add(submodule, BPy_BMIter_Type); + MODULE_TYPE_ADD(submodule, BPy_BMesh_Type); + MODULE_TYPE_ADD(submodule, BPy_BMVert_Type); + MODULE_TYPE_ADD(submodule, BPy_BMEdge_Type); + MODULE_TYPE_ADD(submodule, BPy_BMFace_Type); + MODULE_TYPE_ADD(submodule, BPy_BMLoop_Type); + MODULE_TYPE_ADD(submodule, BPy_BMElemSeq_Type); + MODULE_TYPE_ADD(submodule, BPy_BMVertSeq_Type); + MODULE_TYPE_ADD(submodule, BPy_BMEdgeSeq_Type); + MODULE_TYPE_ADD(submodule, BPy_BMFaceSeq_Type); + MODULE_TYPE_ADD(submodule, BPy_BMLoopSeq_Type); + MODULE_TYPE_ADD(submodule, BPy_BMIter_Type); /* bmesh_py_types_select.c */ - mod_type_add(submodule, BPy_BMEditSelSeq_Type); - mod_type_add(submodule, BPy_BMEditSelIter_Type); + MODULE_TYPE_ADD(submodule, BPy_BMEditSelSeq_Type); + MODULE_TYPE_ADD(submodule, BPy_BMEditSelIter_Type); /* bmesh_py_types_customdata.c */ - mod_type_add(submodule, BPy_BMLayerAccessVert_Type); - mod_type_add(submodule, BPy_BMLayerAccessEdge_Type); - mod_type_add(submodule, BPy_BMLayerAccessFace_Type); - mod_type_add(submodule, BPy_BMLayerAccessLoop_Type); - mod_type_add(submodule, BPy_BMLayerCollection_Type); - mod_type_add(submodule, BPy_BMLayerItem_Type); + MODULE_TYPE_ADD(submodule, BPy_BMLayerAccessVert_Type); + MODULE_TYPE_ADD(submodule, BPy_BMLayerAccessEdge_Type); + MODULE_TYPE_ADD(submodule, BPy_BMLayerAccessFace_Type); + MODULE_TYPE_ADD(submodule, BPy_BMLayerAccessLoop_Type); + MODULE_TYPE_ADD(submodule, BPy_BMLayerCollection_Type); + MODULE_TYPE_ADD(submodule, BPy_BMLayerItem_Type); /* bmesh_py_types_meshdata.c */ - mod_type_add(submodule, BPy_BMLoopUV_Type); - mod_type_add(submodule, BPy_BMDeformVert_Type); + MODULE_TYPE_ADD(submodule, BPy_BMLoopUV_Type); + MODULE_TYPE_ADD(submodule, BPy_BMDeformVert_Type); -#undef mod_type_add +#undef MODULE_TYPE_ADD return submodule; } diff --git a/source/blender/render/intern/source/sunsky.c b/source/blender/render/intern/source/sunsky.c index 1fa18c4ebb4..00370fb51bf 100644 --- a/source/blender/render/intern/source/sunsky.c +++ b/source/blender/render/intern/source/sunsky.c @@ -41,30 +41,36 @@ * compute v1 = v2 op v3 * v1, v2 and v3 are vectors contains 3 float * */ -#define vec3opv(v1, v2, op, v3) \ - v1[0] = (v2[0] op v3[0]); \ - v1[1] = (v2[1] op v3[1]);\ - v1[2] = (v2[2] op v3[2]); +#define VEC3OPV(v1, v2, op, v3) \ + { \ + v1[0] = (v2[0] op v3[0]); \ + v1[1] = (v2[1] op v3[1]); \ + v1[2] = (v2[2] op v3[2]); \ + } (void)0 /** * compute v1 = v2 op f1 * v1, v2 are vectors contains 3 float * and f1 is a float * */ -#define vec3opf(v1, v2, op, f1)\ - v1[0] = (v2[0] op (f1));\ - v1[1] = (v2[1] op (f1));\ - v1[2] = (v2[2] op (f1)); +#define VEC3OPF(v1, v2, op, f1) \ + { \ + v1[0] = (v2[0] op (f1)); \ + v1[1] = (v2[1] op (f1)); \ + v1[2] = (v2[2] op (f1)); \ + } (void)0 /** * compute v1 = f1 op v2 * v1, v2 are vectors contains 3 float * and f1 is a float * */ -#define fopvec3(v1, f1, op, v2)\ - v1[0] = ((f1) op v2[0]);\ - v1[1] = ((f1) op v2[1]);\ - v1[2] = ((f1) op v2[2]); +#define FOPVEC3(v1, f1, op, v2) \ + { \ + v1[0] = ((f1) op v2[0]); \ + v1[1] = ((f1) op v2[1]); \ + v1[2] = ((f1) op v2[2]); \ + } (void)0 /** * ClipColor: @@ -408,19 +414,19 @@ void InitAtmosphere(struct SunSky *sunSky, float sun_intens, float mief, float r fTemp = pi*pi*(n*n-1)*(n*n-1)*(6+3*pn)/(6-7*pn)/N; fBeta = 8*fTemp*pi/3; - vec3opf(sunSky->atm_BetaRay, vLambda4, *, fBeta); + VEC3OPF(sunSky->atm_BetaRay, vLambda4, *, fBeta); fBetaDash = fTemp/2; - vec3opf(sunSky->atm_BetaDashRay, vLambda4,*, fBetaDash); + VEC3OPF(sunSky->atm_BetaDashRay, vLambda4,*, fBetaDash); // Mie scattering constants. fTemp2 = 0.434f*c*(2*pi)*(2*pi)*0.5f; - vec3opf(sunSky->atm_BetaDashMie, vLambda2, *, fTemp2); + VEC3OPF(sunSky->atm_BetaDashMie, vLambda2, *, fTemp2); fTemp3 = 0.434f*c*pi*(2*pi)*(2*pi); - vec3opv(vBetaMieTemp, K, *, fLambda); - vec3opf(sunSky->atm_BetaMie, vBetaMieTemp,*, fTemp3); + VEC3OPV(vBetaMieTemp, K, *, fLambda); + VEC3OPF(sunSky->atm_BetaMie, vBetaMieTemp,*, fTemp3); } @@ -459,12 +465,12 @@ void AtmospherePixleShader( struct SunSky* sunSky, float view[3], float s, float costheta = dot_v3v3(view, sunDirection); // cos(theta) Phase_1 = 1 + (costheta * costheta); // Phase_1 - vec3opf(sunSky->atm_BetaRay, sunSky->atm_BetaRay, *, sunSky->atm_BetaRayMultiplier); - vec3opf(sunSky->atm_BetaMie, sunSky->atm_BetaMie, *, sunSky->atm_BetaMieMultiplier); - vec3opv(sunSky->atm_BetaRM, sunSky->atm_BetaRay, +, sunSky->atm_BetaMie); + VEC3OPF(sunSky->atm_BetaRay, sunSky->atm_BetaRay, *, sunSky->atm_BetaRayMultiplier); + VEC3OPF(sunSky->atm_BetaMie, sunSky->atm_BetaMie, *, sunSky->atm_BetaMieMultiplier); + VEC3OPV(sunSky->atm_BetaRM, sunSky->atm_BetaRay, +, sunSky->atm_BetaMie); //e^(-(beta_1 + beta_2) * s) = E1 - vec3opf(E1, sunSky->atm_BetaRM, *, -s/(float)M_LN2); + VEC3OPF(E1, sunSky->atm_BetaRM, *, -s/(float)M_LN2); E1[0] = exp(E1[0]); E1[1] = exp(E1[1]); E1[2] = exp(E1[2]); @@ -476,32 +482,32 @@ void AtmospherePixleShader( struct SunSky* sunSky, float view[3], float s, float fTemp = fTemp * sqrtf(fTemp); Phase_2 = (1 - sunSky->atm_HGg * sunSky->atm_HGg)/fTemp; - vec3opf(vTemp1, sunSky->atm_BetaDashRay, *, Phase_1); - vec3opf(vTemp2, sunSky->atm_BetaDashMie, *, Phase_2); + VEC3OPF(vTemp1, sunSky->atm_BetaDashRay, *, Phase_1); + VEC3OPF(vTemp2, sunSky->atm_BetaDashMie, *, Phase_2); - vec3opv(vTemp1, vTemp1, +, vTemp2); - fopvec3(vTemp2, 1.0f, -, E1); - vec3opv(vTemp1, vTemp1, *, vTemp2); + VEC3OPV(vTemp1, vTemp1, +, vTemp2); + FOPVEC3(vTemp2, 1.0f, -, E1); + VEC3OPV(vTemp1, vTemp1, *, vTemp2); - fopvec3(vTemp2, 1.0f, / , sunSky->atm_BetaRM); + FOPVEC3(vTemp2, 1.0f, / , sunSky->atm_BetaRM); - vec3opv(I, vTemp1, *, vTemp2); + VEC3OPV(I, vTemp1, *, vTemp2); - vec3opf(I, I, *, sunSky->atm_InscatteringMultiplier); - vec3opf(E, E, *, sunSky->atm_ExtinctionMultiplier); + VEC3OPF(I, I, *, sunSky->atm_InscatteringMultiplier); + VEC3OPF(E, E, *, sunSky->atm_ExtinctionMultiplier); //scale to color sun ComputeAttenuatedSunlight(sunSky->theta, sunSky->turbidity, sunColor); - vec3opv(E, E, *, sunColor); + VEC3OPV(E, E, *, sunColor); - vec3opf(I, I, *, sunSky->atm_SunIntensity); + VEC3OPF(I, I, *, sunSky->atm_SunIntensity); - vec3opv(rgb, rgb, *, E); - vec3opv(rgb, rgb, +, I); + VEC3OPV(rgb, rgb, *, E); + VEC3OPV(rgb, rgb, +, I); } -#undef vec3opv -#undef vec3opf -#undef fopvec3 +#undef VEC3OPV +#undef VEC3OPF +#undef FOPVEC3 /* EOF */ diff --git a/source/blender/render/intern/source/volume_precache.c b/source/blender/render/intern/source/volume_precache.c index bb3ef082500..759bc622bc2 100644 --- a/source/blender/render/intern/source/volume_precache.c +++ b/source/blender/render/intern/source/volume_precache.c @@ -57,10 +57,6 @@ #include "volumetric.h" #include "volume_precache.h" -#if defined( _MSC_VER ) && !defined( __cplusplus ) -# define inline __inline -#endif // defined( _MSC_VER ) && !defined( __cplusplus ) - #include "BKE_global.h" /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */ @@ -265,19 +261,19 @@ static void lightcache_filter2(VolumePrecache *vp) } #endif -static inline int ms_I(int x, int y, int z, int *n) //has a pad of 1 voxel surrounding the core for boundary simulation +BLI_INLINE int ms_I(int x, int y, int z, int *n) //has a pad of 1 voxel surrounding the core for boundary simulation { /* different ordering to light cache */ return x*(n[1]+2)*(n[2]+2) + y*(n[2]+2) + z; } -static inline int v_I_pad(int x, int y, int z, int *n) //has a pad of 1 voxel surrounding the core for boundary simulation +BLI_INLINE int v_I_pad(int x, int y, int z, int *n) //has a pad of 1 voxel surrounding the core for boundary simulation { /* same ordering to light cache, with padding */ return z*(n[1]+2)*(n[0]+2) + y*(n[0]+2) + x; } -static inline int lc_to_ms_I(int x, int y, int z, int *n) +BLI_INLINE int lc_to_ms_I(int x, int y, int z, int *n) { /* converting light cache index to multiple scattering index */ return (x-1)*(n[1]*n[2]) + (y-1)*(n[2]) + z-1; -- cgit v1.2.3 From cbf9c1eb48a79bcaef745b6f70d979d542e2a17e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 31 Mar 2012 04:24:02 +0000 Subject: style cleanup: text editor --- source/blender/editors/space_text/space_text.c | 132 +-- source/blender/editors/space_text/text_draw.c | 974 +++++++++---------- source/blender/editors/space_text/text_header.c | 30 +- source/blender/editors/space_text/text_ops.c | 1149 ++++++++++++----------- source/blender/editors/space_text/text_python.c | 308 +++--- 5 files changed, 1298 insertions(+), 1295 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c index cc9ce10d017..beccca51265 100644 --- a/source/blender/editors/space_text/space_text.c +++ b/source/blender/editors/space_text/space_text.c @@ -60,7 +60,7 @@ #include "RNA_access.h" -#include "text_intern.h" // own include +#include "text_intern.h" // own include /* ******************** default callbacks for text space ***************** */ @@ -69,25 +69,25 @@ static SpaceLink *text_new(const bContext *UNUSED(C)) ARegion *ar; SpaceText *stext; - stext= MEM_callocN(sizeof(SpaceText), "inittext"); - stext->spacetype= SPACE_TEXT; + stext = MEM_callocN(sizeof(SpaceText), "inittext"); + stext->spacetype = SPACE_TEXT; - stext->lheight= 12; - stext->tabnumber= 4; - stext->margin_column= 80; + stext->lheight = 12; + stext->tabnumber = 4; + stext->margin_column = 80; /* header */ - ar= MEM_callocN(sizeof(ARegion), "header for text"); + ar = MEM_callocN(sizeof(ARegion), "header for text"); BLI_addtail(&stext->regionbase, ar); - ar->regiontype= RGN_TYPE_HEADER; - ar->alignment= RGN_ALIGN_BOTTOM; + ar->regiontype = RGN_TYPE_HEADER; + ar->alignment = RGN_ALIGN_BOTTOM; /* main area */ - ar= MEM_callocN(sizeof(ARegion), "main area for text"); + ar = MEM_callocN(sizeof(ARegion), "main area for text"); BLI_addtail(&stext->regionbase, ar); - ar->regiontype= RGN_TYPE_WINDOW; + ar->regiontype = RGN_TYPE_WINDOW; return (SpaceLink *)stext; } @@ -95,9 +95,9 @@ static SpaceLink *text_new(const bContext *UNUSED(C)) /* not spacelink itself */ static void text_free(SpaceLink *sl) { - SpaceText *stext= (SpaceText*) sl; + SpaceText *stext = (SpaceText *) sl; - stext->text= NULL; + stext->text = NULL; text_free_caches(stext); } @@ -110,21 +110,21 @@ static void text_init(struct wmWindowManager *UNUSED(wm), ScrArea *UNUSED(sa)) static SpaceLink *text_duplicate(SpaceLink *sl) { - SpaceText *stextn= MEM_dupallocN(sl); + SpaceText *stextn = MEM_dupallocN(sl); /* clear or remove stuff from old */ - stextn->drawcache= NULL; /* space need it's own cache */ + stextn->drawcache = NULL; /* space need it's own cache */ return (SpaceLink *)stextn; } static void text_listener(ScrArea *sa, wmNotifier *wmn) { - SpaceText *st= sa->spacedata.first; + SpaceText *st = sa->spacedata.first; /* context changes */ - switch(wmn->category) { + switch (wmn->category) { case NC_TEXT: /* check if active text was changed, no need to redraw if text isn't active * reference==NULL means text was unlinked, should update anyway for this @@ -132,7 +132,7 @@ static void text_listener(ScrArea *sa, wmNotifier *wmn) if (wmn->reference && wmn->reference != st->text) break; - switch(wmn->data) { + switch (wmn->data) { case ND_DISPLAY: ED_area_tag_redraw(sa); break; @@ -144,7 +144,7 @@ static void text_listener(ScrArea *sa, wmNotifier *wmn) break; } - switch(wmn->action) { + switch (wmn->action) { case NA_EDITED: if (st->text) { text_drawcache_tag_update(st, 1); @@ -152,7 +152,7 @@ static void text_listener(ScrArea *sa, wmNotifier *wmn) } ED_area_tag_redraw(sa); - /* no break -- fall down to tag redraw */ + /* no break -- fall down to tag redraw */ case NA_ADDED: case NA_REMOVED: ED_area_tag_redraw(sa); @@ -245,17 +245,17 @@ static void text_keymap(struct wmKeyConfig *keyconf) RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move", UPARROWKEY, KM_PRESS, KM_OSKEY, 0)->ptr, "type", FILE_TOP); RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move", DOWNARROWKEY, KM_PRESS, KM_OSKEY, 0)->ptr, "type", FILE_BOTTOM); - RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", LEFTARROWKEY, KM_PRESS, KM_SHIFT|KM_OSKEY, 0)->ptr, "type", LINE_BEGIN); - RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", RIGHTARROWKEY, KM_PRESS, KM_SHIFT|KM_OSKEY, 0)->ptr, "type", LINE_END); - RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", LEFTARROWKEY, KM_PRESS, KM_SHIFT|KM_ALT, 0)->ptr, "type", PREV_WORD); - RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", RIGHTARROWKEY, KM_PRESS, KM_SHIFT|KM_ALT, 0)->ptr, "type", NEXT_WORD); - RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", UPARROWKEY, KM_PRESS, KM_SHIFT|KM_OSKEY, 0)->ptr, "type", FILE_TOP); - RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", DOWNARROWKEY, KM_PRESS, KM_SHIFT|KM_OSKEY, 0)->ptr, "type", FILE_BOTTOM); + RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", LEFTARROWKEY, KM_PRESS, KM_SHIFT | KM_OSKEY, 0)->ptr, "type", LINE_BEGIN); + RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", RIGHTARROWKEY, KM_PRESS, KM_SHIFT | KM_OSKEY, 0)->ptr, "type", LINE_END); + RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", LEFTARROWKEY, KM_PRESS, KM_SHIFT | KM_ALT, 0)->ptr, "type", PREV_WORD); + RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", RIGHTARROWKEY, KM_PRESS, KM_SHIFT | KM_ALT, 0)->ptr, "type", NEXT_WORD); + RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", UPARROWKEY, KM_PRESS, KM_SHIFT | KM_OSKEY, 0)->ptr, "type", FILE_TOP); + RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", DOWNARROWKEY, KM_PRESS, KM_SHIFT | KM_OSKEY, 0)->ptr, "type", FILE_BOTTOM); RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_delete", BACKSPACEKEY, KM_PRESS, KM_ALT, 0)->ptr, "type", DEL_PREV_WORD); - WM_keymap_add_item(keymap, "TEXT_OT_save", SKEY, KM_PRESS, KM_ALT|KM_OSKEY, 0); - WM_keymap_add_item(keymap, "TEXT_OT_save_as", SKEY, KM_PRESS, KM_ALT|KM_SHIFT|KM_OSKEY, 0); + WM_keymap_add_item(keymap, "TEXT_OT_save", SKEY, KM_PRESS, KM_ALT | KM_OSKEY, 0); + WM_keymap_add_item(keymap, "TEXT_OT_save_as", SKEY, KM_PRESS, KM_ALT | KM_SHIFT | KM_OSKEY, 0); WM_keymap_add_item(keymap, "TEXT_OT_cut", XKEY, KM_PRESS, KM_OSKEY, 0); WM_keymap_add_item(keymap, "TEXT_OT_copy", CKEY, KM_PRESS, KM_OSKEY, 0); WM_keymap_add_item(keymap, "TEXT_OT_paste", VKEY, KM_PRESS, KM_OSKEY, 0); @@ -263,7 +263,7 @@ static void text_keymap(struct wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "TEXT_OT_find_set_selected", EKEY, KM_PRESS, KM_OSKEY, 0); WM_keymap_add_item(keymap, "TEXT_OT_find", GKEY, KM_PRESS, KM_OSKEY, 0); WM_keymap_add_item(keymap, "TEXT_OT_select_all", AKEY, KM_PRESS, KM_OSKEY, 0); - WM_keymap_add_item(keymap, "TEXT_OT_select_line", AKEY, KM_PRESS, KM_SHIFT|KM_OSKEY, 0); + WM_keymap_add_item(keymap, "TEXT_OT_select_line", AKEY, KM_PRESS, KM_SHIFT | KM_OSKEY, 0); #endif kmi = WM_keymap_add_item(keymap, "WM_OT_context_cycle_int", WHEELUPMOUSE, KM_PRESS, KM_CTRL, 0); @@ -286,7 +286,7 @@ static void text_keymap(struct wmKeyConfig *keyconf) WM_keymap_add_item(keymap, "TEXT_OT_open", OKEY, KM_PRESS, KM_ALT, 0); WM_keymap_add_item(keymap, "TEXT_OT_reload", RKEY, KM_PRESS, KM_ALT, 0); WM_keymap_add_item(keymap, "TEXT_OT_save", SKEY, KM_PRESS, KM_ALT, 0); - WM_keymap_add_item(keymap, "TEXT_OT_save_as", SKEY, KM_PRESS, KM_ALT|KM_SHIFT|KM_CTRL, 0); + WM_keymap_add_item(keymap, "TEXT_OT_save_as", SKEY, KM_PRESS, KM_ALT | KM_SHIFT | KM_CTRL, 0); WM_keymap_add_item(keymap, "TEXT_OT_run_script", PKEY, KM_PRESS, KM_ALT, 0); @@ -315,19 +315,19 @@ static void text_keymap(struct wmKeyConfig *keyconf) RNA_boolean_set(kmi->ptr, "split_lines", TRUE); WM_keymap_add_item(keymap, "TEXT_OT_select_all", AKEY, KM_PRESS, KM_CTRL, 0); - WM_keymap_add_item(keymap, "TEXT_OT_select_line", AKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0); + WM_keymap_add_item(keymap, "TEXT_OT_select_line", AKEY, KM_PRESS, KM_SHIFT | KM_CTRL, 0); WM_keymap_add_item(keymap, "TEXT_OT_select_word", LEFTMOUSE, KM_DBL_CLICK, 0, 0); WM_keymap_add_item(keymap, "TEXT_OT_indent", TABKEY, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "TEXT_OT_unindent", TABKEY, KM_PRESS, KM_SHIFT, 0); - WM_keymap_add_item(keymap, "TEXT_OT_uncomment", DKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0); + WM_keymap_add_item(keymap, "TEXT_OT_uncomment", DKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0); RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move", HOMEKEY, KM_PRESS, 0, 0)->ptr, "type", LINE_BEGIN); RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move", ENDKEY, KM_PRESS, 0, 0)->ptr, "type", LINE_END); RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move", EKEY, KM_PRESS, KM_CTRL, 0)->ptr, "type", LINE_END); - RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move", EKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0)->ptr, "type", LINE_END); + RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move", EKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0)->ptr, "type", LINE_END); RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move", LEFTARROWKEY, KM_PRESS, 0, 0)->ptr, "type", PREV_CHAR); RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move", RIGHTARROWKEY, KM_PRESS, 0, 0)->ptr, "type", NEXT_CHAR); RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move", LEFTARROWKEY, KM_PRESS, KM_CTRL, 0)->ptr, "type", PREV_WORD); @@ -343,14 +343,14 @@ static void text_keymap(struct wmKeyConfig *keyconf) RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", ENDKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", LINE_END); RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", LEFTARROWKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", PREV_CHAR); RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", RIGHTARROWKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", NEXT_CHAR); - RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", LEFTARROWKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0)->ptr, "type", PREV_WORD); - RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", RIGHTARROWKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0)->ptr, "type", NEXT_WORD); + RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", LEFTARROWKEY, KM_PRESS, KM_SHIFT | KM_CTRL, 0)->ptr, "type", PREV_WORD); + RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", RIGHTARROWKEY, KM_PRESS, KM_SHIFT | KM_CTRL, 0)->ptr, "type", NEXT_WORD); RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", UPARROWKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", PREV_LINE); RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", DOWNARROWKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", NEXT_LINE); RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", PAGEUPKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", PREV_PAGE); RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", PAGEDOWNKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "type", NEXT_PAGE); - RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", HOMEKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0)->ptr, "type", FILE_TOP); - RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", ENDKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0)->ptr, "type", FILE_BOTTOM); + RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", HOMEKEY, KM_PRESS, KM_SHIFT | KM_CTRL, 0)->ptr, "type", FILE_TOP); + RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_move_select", ENDKEY, KM_PRESS, KM_SHIFT | KM_CTRL, 0)->ptr, "type", FILE_BOTTOM); RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_delete", DELKEY, KM_PRESS, 0, 0)->ptr, "type", DEL_NEXT_CHAR); RNA_enum_set(WM_keymap_add_item(keymap, "TEXT_OT_delete", DKEY, KM_PRESS, KM_CTRL, 0)->ptr, "type", DEL_NEXT_CHAR); @@ -386,7 +386,7 @@ const char *text_context_dir[] = {"edit_text", NULL}; static int text_context(const bContext *C, const char *member, bContextDataResult *result) { - SpaceText *st= CTX_wm_space_text(C); + SpaceText *st = CTX_wm_space_text(C); if (CTX_data_dir(member)) { CTX_data_dir_set(result, text_context_dir); @@ -423,7 +423,7 @@ static void text_main_area_init(wmWindowManager *wm, ARegion *ar) static void text_main_area_draw(const bContext *C, ARegion *ar) { /* draw entirely, view changes should be handled here */ - SpaceText *st= CTX_wm_space_text(C); + SpaceText *st = CTX_wm_space_text(C); //View2D *v2d= &ar->v2d; /* clear and setup matrix */ @@ -452,8 +452,8 @@ static void text_cursor(wmWindow *win, ScrArea *UNUSED(sa), ARegion *UNUSED(ar)) static int text_drop_poll(bContext *UNUSED(C), wmDrag *drag, wmEvent *UNUSED(event)) { - if (drag->type==WM_DRAG_PATH) - if (ELEM(drag->icon, ICON_FILE_SCRIPT, ICON_FILE_BLANK)) /* rule might not work? */ + if (drag->type == WM_DRAG_PATH) + if (ELEM(drag->icon, ICON_FILE_SCRIPT, ICON_FILE_BLANK)) /* rule might not work? */ return 1; return 0; } @@ -467,7 +467,7 @@ static void text_drop_copy(wmDrag *drag, wmDropBox *drop) /* this region dropbox definition */ static void text_dropboxes(void) { - ListBase *lb= WM_dropboxmap_find("Text", SPACE_TEXT, RGN_TYPE_WINDOW); + ListBase *lb = WM_dropboxmap_find("Text", SPACE_TEXT, RGN_TYPE_WINDOW); WM_dropbox_add(lb, "TEXT_OT_open", text_drop_poll, text_drop_copy); @@ -507,49 +507,49 @@ static void text_properties_area_draw(const bContext *C, ARegion *ar) /* only called once, from space/spacetypes.c */ void ED_spacetype_text(void) { - SpaceType *st= MEM_callocN(sizeof(SpaceType), "spacetype text"); + SpaceType *st = MEM_callocN(sizeof(SpaceType), "spacetype text"); ARegionType *art; - st->spaceid= SPACE_TEXT; + st->spaceid = SPACE_TEXT; strncpy(st->name, "Text", BKE_ST_MAXNAME); - st->new= text_new; - st->free= text_free; - st->init= text_init; - st->duplicate= text_duplicate; - st->operatortypes= text_operatortypes; - st->keymap= text_keymap; - st->listener= text_listener; - st->context= text_context; + st->new = text_new; + st->free = text_free; + st->init = text_init; + st->duplicate = text_duplicate; + st->operatortypes = text_operatortypes; + st->keymap = text_keymap; + st->listener = text_listener; + st->context = text_context; st->dropboxes = text_dropboxes; /* regions: main window */ - art= MEM_callocN(sizeof(ARegionType), "spacetype text region"); + art = MEM_callocN(sizeof(ARegionType), "spacetype text region"); art->regionid = RGN_TYPE_WINDOW; - art->init= text_main_area_init; - art->draw= text_main_area_draw; - art->cursor= text_cursor; + art->init = text_main_area_init; + art->draw = text_main_area_draw; + art->cursor = text_cursor; BLI_addhead(&st->regiontypes, art); /* regions: properties */ - art= MEM_callocN(sizeof(ARegionType), "spacetype text region"); + art = MEM_callocN(sizeof(ARegionType), "spacetype text region"); art->regionid = RGN_TYPE_UI; - art->prefsizex= UI_COMPACT_PANEL_WIDTH; - art->keymapflag= ED_KEYMAP_UI; + art->prefsizex = UI_COMPACT_PANEL_WIDTH; + art->keymapflag = ED_KEYMAP_UI; - art->init= text_properties_area_init; - art->draw= text_properties_area_draw; + art->init = text_properties_area_init; + art->draw = text_properties_area_draw; BLI_addhead(&st->regiontypes, art); /* regions: header */ - art= MEM_callocN(sizeof(ARegionType), "spacetype text region"); + art = MEM_callocN(sizeof(ARegionType), "spacetype text region"); art->regionid = RGN_TYPE_HEADER; - art->prefsizey= HEADERY; - art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D|ED_KEYMAP_HEADER; + art->prefsizey = HEADERY; + art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_HEADER; - art->init= text_header_area_init; - art->draw= text_header_area_draw; + art->init = text_header_area_init; + art->draw = text_header_area_draw; BLI_addhead(&st->regiontypes, art); diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index b2259aac035..98560be477d 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -83,8 +83,8 @@ static int text_font_draw(SpaceText *UNUSED(st), int x, int y, const char *str) static int text_font_draw_character(SpaceText *st, int x, int y, char c) { char str[2]; - str[0]= c; - str[1]= '\0'; + str[0] = c; + str[1] = '\0'; BLF_position(mono, x, y, 0); BLF_draw(mono, str, 1); @@ -94,10 +94,10 @@ static int text_font_draw_character(SpaceText *st, int x, int y, char c) static int text_font_draw_character_utf8(SpaceText *st, int x, int y, const char *c) { - char str[BLI_UTF8_MAX+1]; + char str[BLI_UTF8_MAX + 1]; size_t len = BLI_str_utf8_size(c); memcpy(str, c, len); - str[len]= '\0'; + str[len] = '\0'; BLF_position(mono, x, y, 0); BLF_draw(mono, str, len); @@ -111,12 +111,12 @@ static void flatten_string_append(FlattenString *fs, const char *c, int accum, i { int i; - if (fs->pos+len > fs->len) { + if (fs->pos + len > fs->len) { char *nbuf; int *naccum; - fs->len*= 2; + fs->len *= 2; - nbuf= MEM_callocN(sizeof(*fs->buf)*fs->len, "fs->buf"); - naccum= MEM_callocN(sizeof(*fs->accum)*fs->len, "fs->accum"); + nbuf = MEM_callocN(sizeof(*fs->buf) * fs->len, "fs->buf"); + naccum = MEM_callocN(sizeof(*fs->accum) * fs->len, "fs->accum"); memcpy(nbuf, fs->buf, fs->pos * sizeof(*fs->buf)); memcpy(naccum, fs->accum, fs->pos * sizeof(*fs->accum)); @@ -126,17 +126,17 @@ static void flatten_string_append(FlattenString *fs, const char *c, int accum, i MEM_freeN(fs->accum); } - fs->buf= nbuf; - fs->accum= naccum; + fs->buf = nbuf; + fs->accum = naccum; } for (i = 0; i < len; i++) { - fs->buf[fs->pos+i]= c[i]; - fs->accum[fs->pos+i]= accum; + fs->buf[fs->pos + i] = c[i]; + fs->accum[fs->pos + i] = accum; } - fs->pos+= len; + fs->pos += len; } int flatten_string(SpaceText *st, FlattenString *fs, const char *in) @@ -144,14 +144,14 @@ int flatten_string(SpaceText *st, FlattenString *fs, const char *in) int r, i, total = 0; memset(fs, 0, sizeof(FlattenString)); - fs->buf= fs->fixedbuf; - fs->accum= fs->fixedaccum; + fs->buf = fs->fixedbuf; + fs->accum = fs->fixedaccum; fs->len = sizeof(fs->fixedbuf); for (r = 0, i = 0; *in; r++) { - if (*in=='\t') { - i= st->tabnumber - (total%st->tabnumber); - total+= i; + if (*in == '\t') { + i = st->tabnumber - (total % st->tabnumber); + total += i; while (i--) flatten_string_append(fs, " ", r, 1); @@ -159,7 +159,7 @@ int flatten_string(SpaceText *st, FlattenString *fs, const char *in) in++; } else { - size_t len= BLI_str_utf8_size(in); + size_t len = BLI_str_utf8_size(in); flatten_string_append(fs, in, r, len); in += len; total++; @@ -190,30 +190,30 @@ static int find_builtinfunc(char *string) { int a, i; char builtinfuncs[][9] = {"and", "as", "assert", "break", "class", "continue", "def", - "del", "elif", "else", "except", "exec", "finally", - "for", "from", "global", "if", "import", "in", - "is", "lambda", "not", "or", "pass", "print", - "raise", "return", "try", "while", "yield", "with"}; + "del", "elif", "else", "except", "exec", "finally", + "for", "from", "global", "if", "import", "in", + "is", "lambda", "not", "or", "pass", "print", + "raise", "return", "try", "while", "yield", "with"}; - for (a=0; a < sizeof(builtinfuncs)/sizeof(builtinfuncs[0]); a++) { + for (a = 0; a < sizeof(builtinfuncs) / sizeof(builtinfuncs[0]); a++) { i = 0; while (1) { /* If we hit the end of a keyword... (eg. "def") */ - if (builtinfuncs[a][i]=='\0') { + if (builtinfuncs[a][i] == '\0') { /* If we still have identifier chars in the source (eg. "definate") */ if (text_check_identifier(string[i])) - i = -1; /* No match */ + i = -1; /* No match */ break; /* Next keyword if no match, otherwise we're done */ - /* If chars mismatch, move on to next keyword */ + /* If chars mismatch, move on to next keyword */ } - else if (string[i]!=builtinfuncs[a][i]) { + else if (string[i] != builtinfuncs[a][i]) { i = -1; break; /* Break inner loop, start next keyword */ } i++; } - if (i>0) break; /* If we have a match, we're done */ + if (i > 0) break; /* If we have a match, we're done */ } return i; } @@ -229,13 +229,13 @@ static int find_specialvar(char *string) { int i = 0; /* Check for "def" */ - if (string[0]=='d' && string[1]=='e' && string[2]=='f') + if (string[0] == 'd' && string[1] == 'e' && string[2] == 'f') i = 3; /* Check for "class" */ - else if (string[0]=='c' && string[1]=='l' && string[2]=='a' && string[3]=='s' && string[4]=='s') + else if (string[0] == 'c' && string[1] == 'l' && string[2] == 'a' && string[3] == 's' && string[4] == 's') i = 5; /* If next source char is an identifier (eg. 'i' in "definate") no match */ - if (i==0 || text_check_identifier(string[i])) + if (i == 0 || text_check_identifier(string[i])) return -1; return i; } @@ -256,16 +256,16 @@ static int find_bool(char *string) { int i = 0; /* Check for "False" */ - if (string[0]=='F' && string[1]=='a' && string[2]=='l' && string[3]=='s' && string[4]=='e') + if (string[0] == 'F' && string[1] == 'a' && string[2] == 'l' && string[3] == 's' && string[4] == 'e') i = 5; /* Check for "True" */ - else if (string[0]=='T' && string[1]=='r' && string[2]=='u' && string[3]=='e') + else if (string[0] == 'T' && string[1] == 'r' && string[2] == 'u' && string[3] == 'e') i = 4; /* Check for "None" */ - else if (string[0]=='N' && string[1]=='o' && string[2]=='n' && string[3]=='e') + else if (string[0] == 'N' && string[1] == 'o' && string[2] == 'n' && string[3] == 'e') i = 4; /* If next source char is an identifier (eg. 'i' in "definate") no match */ - if (i==0 || text_check_identifier(string[i])) + if (i == 0 || text_check_identifier(string[i])) return -1; return i; } @@ -277,12 +277,12 @@ static int text_check_format_len(TextLine *line, unsigned int len) if (line->format) { if (strlen(line->format) < len) { MEM_freeN(line->format); - line->format = MEM_mallocN(len+2, "SyntaxFormat"); + line->format = MEM_mallocN(len + 2, "SyntaxFormat"); if (!line->format) return 0; } } else { - line->format = MEM_mallocN(len+2, "SyntaxFormat"); + line->format = MEM_mallocN(len + 2, "SyntaxFormat"); if (!line->format) return 0; } @@ -311,15 +311,15 @@ static void txt_format_line(SpaceText *st, TextLine *line, int do_next) /* Get continuation from previous line */ if (line->prev && line->prev->format != NULL) { - fmt= line->prev->format; - cont = fmt[strlen(fmt)+1]; /* Just after the null-terminator */ + fmt = line->prev->format; + cont = fmt[strlen(fmt) + 1]; /* Just after the null-terminator */ } else cont = 0; /* Get original continuation from this line */ if (line->format != NULL) { - fmt= line->format; - orig = fmt[strlen(fmt)+1]; /* Just after the null-terminator */ + fmt = line->format; + orig = fmt[strlen(fmt) + 1]; /* Just after the null-terminator */ } else orig = 0xFF; @@ -344,12 +344,12 @@ static void txt_format_line(SpaceText *st, TextLine *line, int do_next) /* Triple strings ("""...""" or '''...''') */ if (cont & TXT_TRISTR) { find = (cont & TXT_DBLQUOTSTR) ? '"' : '\''; - if (*str==find && *(str+1)==find && *(str+2)==find) { + if (*str == find && *(str + 1) == find && *(str + 2) == find) { *fmt = 'l'; fmt++; str++; *fmt = 'l'; fmt++; str++; cont = 0; } - /* Handle other strings */ + /* Handle other strings */ } else { find = (cont & TXT_DBLQUOTSTR) ? '"' : '\''; @@ -369,8 +369,8 @@ static void txt_format_line(SpaceText *st, TextLine *line, int do_next) else if (*str == '"' || *str == '\'') { /* Strings */ find = *str; - cont = (*str== '"') ? TXT_DBLQUOTSTR : TXT_SNGQUOTSTR; - if (*(str+1) == find && *(str+2) == find) { + cont = (*str == '"') ? TXT_DBLQUOTSTR : TXT_SNGQUOTSTR; + if (*(str + 1) == find && *(str + 2) == find) { *fmt = 'l'; fmt++; str++; *fmt = 'l'; fmt++; str++; cont |= TXT_TRISTR; @@ -381,12 +381,12 @@ static void txt_format_line(SpaceText *st, TextLine *line, int do_next) else if (*str == ' ') *fmt = '_'; /* Numbers (digits not part of an identifier and periods followed by digits) */ - else if ((prev != 'q' && text_check_digit(*str)) || (*str == '.' && text_check_digit(*(str+1)))) + else if ((prev != 'q' && text_check_digit(*str)) || (*str == '.' && text_check_digit(*(str + 1)))) *fmt = 'n'; /* Booleans */ - else if (prev != 'q' && (i=find_bool(str)) != -1) - if (i>0) { - while (i>1) { + else if (prev != 'q' && (i = find_bool(str)) != -1) + if (i > 0) { + while (i > 1) { *fmt = 'n'; fmt++; str++; i--; } @@ -407,14 +407,14 @@ static void txt_format_line(SpaceText *st, TextLine *line, int do_next) /* Not ws, a digit, punct, or continuing text. Must be new, check for special words */ else { /* Special vars(v) or built-in keywords(b) */ - if ((i=find_specialvar(str)) != -1) + if ((i = find_specialvar(str)) != -1) prev = 'v'; - else if ((i=find_builtinfunc(str)) != -1) + else if ((i = find_builtinfunc(str)) != -1) prev = 'b'; - else if ((i=find_decorator(str)) != -1) - prev = 'v'; /* could have a new color for this */ - if (i>0) { - while (i>1) { + else if ((i = find_decorator(str)) != -1) + prev = 'v'; /* could have a new color for this */ + if (i > 0) { + while (i > 1) { *fmt = prev; fmt++; str++; i--; } @@ -436,7 +436,7 @@ static void txt_format_line(SpaceText *st, TextLine *line, int do_next) *fmt = cont; /* If continuation has changed and we're allowed, process the next line */ - if (cont!=orig && do_next && line->next) { + if (cont != orig && do_next && line->next) { txt_format_line(st, line->next, do_next); } @@ -451,7 +451,7 @@ static void txt_format_text(SpaceText *st) if (!st->text) return; - for (linep=st->text->lines.first; linep; linep=linep->next) + for (linep = st->text->lines.first; linep; linep = linep->next) txt_format_line(st, linep, 0); } #endif @@ -515,12 +515,12 @@ static void format_draw_color(char formatchar) int wrap_width(SpaceText *st, ARegion *ar) { - int winx= ar->winx - TXT_SCROLL_WIDTH; + int winx = ar->winx - TXT_SCROLL_WIDTH; int x, max; - x= st->showlinenrs ? TXT_OFFSET + TEXTXLOC : TXT_OFFSET; - max= st->cwidth ? (winx-x)/st->cwidth : 0; - return max>8 ? max : 8; + x = st->showlinenrs ? TXT_OFFSET + TEXTXLOC : TXT_OFFSET; + max = st->cwidth ? (winx - x) / st->cwidth : 0; + return max > 8 ? max : 8; } /* Sets (offl, offc) for transforming (line, curs) to its wrapped position */ @@ -531,18 +531,18 @@ void wrap_offset(SpaceText *st, ARegion *ar, TextLine *linein, int cursin, int * int i, j, start, end, max, chop; char ch; - *offl= *offc= 0; + *offl = *offc = 0; if (!st->text) return; if (!st->wordwrap) return; - text= st->text; + text = st->text; /* Move pointer to first visible line (top) */ - linep= text->lines.first; - i= st->top; - while (i>0 && linep) { - int lines= text_get_visible_lines(st, ar, linep->line); + linep = text->lines.first; + i = st->top; + while (i > 0 && linep) { + int lines = text_get_visible_lines(st, ar, linep->line); /* Line before top */ if (linep == linein) { @@ -551,67 +551,67 @@ void wrap_offset(SpaceText *st, ARegion *ar, TextLine *linein, int cursin, int * return; } - if (i-lines<0) { + if (i - lines < 0) { break; } else { - linep= linep->next; - (*offl)+= lines-1; - i-= lines; + linep = linep->next; + (*offl) += lines - 1; + i -= lines; } } - max= wrap_width(st, ar); + max = wrap_width(st, ar); cursin = txt_utf8_offset_to_index(linein->line, cursin); while (linep) { - start= 0; - end= max; - chop= 1; - *offc= 0; - for (i=0, j=0; linep->line[j]; j+=BLI_str_utf8_size(linep->line+j)) { + start = 0; + end = max; + chop = 1; + *offc = 0; + for (i = 0, j = 0; linep->line[j]; j += BLI_str_utf8_size(linep->line + j)) { int chars; /* Mimic replacement of tabs */ - ch= linep->line[j]; - if (ch=='\t') { - chars= st->tabnumber-i%st->tabnumber; - if (linep==linein && iline[j]; + if (ch == '\t') { + chars = st->tabnumber - i % st->tabnumber; + if (linep == linein && i < cursin) cursin += chars - 1; + ch = ' '; } else { - chars= 1; + chars = 1; } while (chars--) { - if (i-start>=max) { - if (chop && linep==linein && i >= cursin) { - if (i==cursin) { + if (i - start >= max) { + if (chop && linep == linein && i >= cursin) { + if (i == cursin) { (*offl)++; - *offc -= end-start; + *offc -= end - start; } return; } (*offl)++; - *offc -= end-start; + *offc -= end - start; - start= end; + start = end; end += max; - chop= 1; + chop = 1; } - else if (ch==' ' || ch=='-') { - end = i+1; - chop= 0; - if (linep==linein && i >= cursin) + else if (ch == ' ' || ch == '-') { + end = i + 1; + chop = 0; + if (linep == linein && i >= cursin) return; } i++; } } - if (linep==linein) break; - linep= linep->next; + if (linep == linein) break; + linep = linep->next; } } @@ -621,52 +621,52 @@ void wrap_offset_in_line(SpaceText *st, ARegion *ar, TextLine *linein, int cursi int i, j, start, end, chars, max, chop; char ch; - *offl= *offc= 0; + *offl = *offc = 0; if (!st->text) return; if (!st->wordwrap) return; - max= wrap_width(st, ar); + max = wrap_width(st, ar); - start= 0; - end= max; - chop= 1; - *offc= 0; + start = 0; + end = max; + chop = 1; + *offc = 0; cursin = txt_utf8_offset_to_index(linein->line, cursin); - for (i=0, j=0; linein->line[j]; j += BLI_str_utf8_size(linein->line + j)) { + for (i = 0, j = 0; linein->line[j]; j += BLI_str_utf8_size(linein->line + j)) { /* Mimic replacement of tabs */ - ch= linein->line[j]; - if (ch=='\t') { - chars= st->tabnumber-i%st->tabnumber; - if (iline[j]; + if (ch == '\t') { + chars = st->tabnumber - i % st->tabnumber; + if (i < cursin) cursin += chars - 1; + ch = ' '; } else - chars= 1; + chars = 1; while (chars--) { - if (i-start>=max) { + if (i - start >= max) { if (chop && i >= cursin) { - if (i==cursin) { + if (i == cursin) { (*offl)++; - *offc -= end-start; + *offc -= end - start; } return; } (*offl)++; - *offc -= end-start; + *offc -= end - start; - start= end; + start = end; end += max; - chop= 1; + chop = 1; } - else if (ch==' ' || ch=='-') { - end = i+1; - chop= 0; + else if (ch == ' ' || ch == '-') { + end = i + 1; + chop = 0; if (i >= cursin) return; } @@ -677,11 +677,11 @@ void wrap_offset_in_line(SpaceText *st, ARegion *ar, TextLine *linein, int cursi int text_get_char_pos(SpaceText *st, const char *line, int cur) { - int a=0, i; + int a = 0, i; - for (i=0; itabnumber-a%st->tabnumber; + for (i = 0; i < cur && line[i]; i += BLI_str_utf8_size(line + i)) { + if (line[i] == '\t') + a += st->tabnumber - a % st->tabnumber; else a++; } @@ -690,9 +690,9 @@ int text_get_char_pos(SpaceText *st, const char *line, int cur) static const char *txt_utf8_get_nth(const char *str, int n) { - int pos= 0; + int pos = 0; while (str[pos] && n--) { - pos+= BLI_str_utf8_size(str + pos); + pos += BLI_str_utf8_size(str + pos); } return str + pos; } @@ -704,49 +704,49 @@ static int text_draw_wrapped(SpaceText *st, const char *str, int x, int y, int w int mi, ma, mstart, mend; /* mem */ flatten_string(st, &fs, str); - str= fs.buf; - max= w/st->cwidth; - if (max<8) max= 8; - basex= x; - lines= 1; + str = fs.buf; + max = w / st->cwidth; + if (max < 8) max = 8; + basex = x; + lines = 1; - start= 0; mstart= 0; - end= max; mend= txt_utf8_get_nth(str, max) - str; + start = 0; mstart = 0; + end = max; mend = txt_utf8_get_nth(str, max) - str; - for (i=0, mi=0; str[mi]; i++, mi+=BLI_str_utf8_size(str+mi)) { - if (i-start >= max) { + for (i = 0, mi = 0; str[mi]; i++, mi += BLI_str_utf8_size(str + mi)) { + if (i - start >= max) { /* skip hidden part of line */ if (skip) { skip--; - start= end; mstart= mend; - end += max; mend= txt_utf8_get_nth(str+mend, max) - str; + start = end; mstart = mend; + end += max; mend = txt_utf8_get_nth(str + mend, max) - str; continue; } /* Draw the visible portion of text on the overshot line */ - for (a=start, ma=mstart; ashowsyntax && format) format_draw_color(format[a]); x += text_font_draw_character_utf8(st, x, y, str + ma); } y -= st->lheight; - x= basex; + x = basex; lines++; - start= end; mstart= mend; - end += max; mend= txt_utf8_get_nth(str+mend, max) - str; + start = end; mstart = mend; + end += max; mend = txt_utf8_get_nth(str + mend, max) - str; - if (y<=0) break; + if (y <= 0) break; } - else if (str[mi]==' ' || str[mi]=='-') { - end = i+1; mend = mi+1; + else if (str[mi] == ' ' || str[mi] == '-') { + end = i + 1; mend = mi + 1; } } /* Draw the remaining text */ - for (a=start, ma=mstart; str[ma] && y > 0; a++, ma+=BLI_str_utf8_size(str+ma)) { + for (a = start, ma = mstart; str[ma] && y > 0; a++, ma += BLI_str_utf8_size(str + ma)) { if (st->showsyntax && format) format_draw_color(format[a]); - x += text_font_draw_character_utf8(st, x, y, str+ma); + x += text_font_draw_character_utf8(st, x, y, str + ma); } flatten_string_free(&fs); @@ -757,25 +757,25 @@ static int text_draw_wrapped(SpaceText *st, const char *str, int x, int y, int w static int text_draw(SpaceText *st, char *str, int cshift, int maxwidth, int draw, int x, int y, const char *format) { FlattenString fs; - int *acc, r=0; + int *acc, r = 0; const char *in; - int w= flatten_string(st, &fs, str); + int w = flatten_string(st, &fs, str); if (w < cshift) { flatten_string_free(&fs); return 0; /* String is shorter than shift */ } - in= txt_utf8_get_nth(fs.buf, cshift); - acc= fs.accum+cshift; - w= w-cshift; + in = txt_utf8_get_nth(fs.buf, cshift); + acc = fs.accum + cshift; + w = w - cshift; if (draw) { int amount = maxwidth ? MIN2(w, maxwidth) : w; if (st->showsyntax && format) { - int a, str_shift= 0; - format = format+cshift; + int a, str_shift = 0; + format = format + cshift; for (a = 0; a < amount; a++) { format_draw_color(format[a]); @@ -787,17 +787,17 @@ static int text_draw(SpaceText *st, char *str, int cshift, int maxwidth, int dra } else { while (w-- && *acc++ < maxwidth) - r+= st->cwidth; + r += st->cwidth; } flatten_string_free(&fs); - if (cshift && r==0) + if (cshift && r == 0) return 0; else if (st->showlinenrs) - return r+TXT_OFFSET+TEXTXLOC; + return r + TXT_OFFSET + TEXTXLOC; else - return r+TXT_OFFSET; + return r + TXT_OFFSET; } /************************ cache utilities *****************************/ @@ -819,36 +819,36 @@ typedef struct DrawCache { static void text_drawcache_init(SpaceText *st) { - DrawCache *drawcache= MEM_callocN(sizeof (DrawCache), "text draw cache"); + DrawCache *drawcache = MEM_callocN(sizeof (DrawCache), "text draw cache"); - drawcache->winx= -1; - drawcache->nlines= BLI_countlist(&st->text->lines); - drawcache->text_id[0]= '\0'; + drawcache->winx = -1; + drawcache->nlines = BLI_countlist(&st->text->lines); + drawcache->text_id[0] = '\0'; - st->drawcache= drawcache; + st->drawcache = drawcache; } static void text_update_drawcache(SpaceText *st, ARegion *ar) { DrawCache *drawcache; - int full_update= 0, nlines= 0; - Text *txt= st->text; + int full_update = 0, nlines = 0; + Text *txt = st->text; if (!st->drawcache) text_drawcache_init(st); text_update_character_width(st); - drawcache= (DrawCache *)st->drawcache; - nlines= drawcache->nlines; + drawcache = (DrawCache *)st->drawcache; + nlines = drawcache->nlines; /* check if full cache update is needed */ - full_update|= drawcache->winx != ar->winx; /* area was resized */ - full_update|= drawcache->wordwrap != st->wordwrap; /* word-wrapping option was toggled */ - full_update|= drawcache->showlinenrs != st->showlinenrs; /* word-wrapping option was toggled */ - full_update|= drawcache->tabnumber != st->tabnumber; /* word-wrapping option was toggled */ - full_update|= drawcache->lheight != st->lheight; /* word-wrapping option was toggled */ - full_update|= drawcache->cwidth != st->cwidth; /* word-wrapping option was toggled */ - full_update|= strncmp(drawcache->text_id, txt->id.name, MAX_ID_NAME); /* text datablock was changed */ + full_update |= drawcache->winx != ar->winx; /* area was resized */ + full_update |= drawcache->wordwrap != st->wordwrap; /* word-wrapping option was toggled */ + full_update |= drawcache->showlinenrs != st->showlinenrs; /* word-wrapping option was toggled */ + full_update |= drawcache->tabnumber != st->tabnumber; /* word-wrapping option was toggled */ + full_update |= drawcache->lheight != st->lheight; /* word-wrapping option was toggled */ + full_update |= drawcache->cwidth != st->cwidth; /* word-wrapping option was toggled */ + full_update |= strncmp(drawcache->text_id, txt->id.name, MAX_ID_NAME); /* text datablock was changed */ if (st->wordwrap) { /* update line heights */ @@ -859,65 +859,65 @@ static void text_update_drawcache(SpaceText *st, ARegion *ar) } if (drawcache->update_flag) { - TextLine *line= st->text->lines.first; - int lineno= 0, size, lines_count; - int *fp= drawcache->line_height, *new_tail, *old_tail; + TextLine *line = st->text->lines.first; + int lineno = 0, size, lines_count; + int *fp = drawcache->line_height, *new_tail, *old_tail; - nlines= BLI_countlist(&txt->lines); - size= sizeof(int)*nlines; + nlines = BLI_countlist(&txt->lines); + size = sizeof(int) * nlines; - if (fp) fp= MEM_reallocN(fp, size); - else fp= MEM_callocN(size, "text drawcache line_height"); + if (fp) fp = MEM_reallocN(fp, size); + else fp = MEM_callocN(size, "text drawcache line_height"); - drawcache->valid_tail= drawcache->valid_head= 0; - old_tail= fp + drawcache->nlines - drawcache->valid_tail; - new_tail= fp + nlines - drawcache->valid_tail; + drawcache->valid_tail = drawcache->valid_head = 0; + old_tail = fp + drawcache->nlines - drawcache->valid_tail; + new_tail = fp + nlines - drawcache->valid_tail; memmove(new_tail, old_tail, drawcache->valid_tail); - drawcache->total_lines= 0; + drawcache->total_lines = 0; if (st->showlinenrs) - st->linenrs_tot= (int)floor(log10((float)nlines)) + 1; + st->linenrs_tot = (int)floor(log10((float)nlines)) + 1; while (line) { if (drawcache->valid_head) { /* we're inside valid head lines */ - lines_count= fp[lineno]; + lines_count = fp[lineno]; drawcache->valid_head--; } else if (lineno > new_tail - fp) { /* we-re inside valid tail lines */ - lines_count= fp[lineno]; + lines_count = fp[lineno]; } else { - lines_count= text_get_visible_lines(st, ar, line->line); + lines_count = text_get_visible_lines(st, ar, line->line); } - fp[lineno]= lines_count; + fp[lineno] = lines_count; - line= line->next; + line = line->next; lineno++; - drawcache->total_lines+= lines_count; + drawcache->total_lines += lines_count; } - drawcache->line_height= fp; + drawcache->line_height = fp; } } else { if (drawcache->line_height) { MEM_freeN(drawcache->line_height); - drawcache->line_height= NULL; + drawcache->line_height = NULL; } if (full_update || drawcache->update_flag) { - nlines= BLI_countlist(&txt->lines); + nlines = BLI_countlist(&txt->lines); if (st->showlinenrs) - st->linenrs_tot= (int)floor(log10((float)nlines)) + 1; + st->linenrs_tot = (int)floor(log10((float)nlines)) + 1; } - drawcache->total_lines= nlines; + drawcache->total_lines = nlines; } - drawcache->nlines= nlines; + drawcache->nlines = nlines; /* store settings */ drawcache->winx = ar->winx; @@ -942,8 +942,8 @@ void text_drawcache_tag_update(SpaceText *st, int full) return; if (st->drawcache) { - DrawCache *drawcache= (DrawCache *)st->drawcache; - Text *txt= st->text; + DrawCache *drawcache = (DrawCache *)st->drawcache; + Text *txt = st->text; if (drawcache->update_flag) { /* happens when tagging update from space listener */ @@ -952,36 +952,36 @@ void text_drawcache_tag_update(SpaceText *st, int full) } if (!full) { - int sellno= BLI_findindex(&txt->lines, txt->sell); - int curlno= BLI_findindex(&txt->lines, txt->curl); + int sellno = BLI_findindex(&txt->lines, txt->sell); + int curlno = BLI_findindex(&txt->lines, txt->curl); if (curlno < sellno) { - drawcache->valid_head= curlno; - drawcache->valid_tail= drawcache->nlines - sellno - 1; + drawcache->valid_head = curlno; + drawcache->valid_tail = drawcache->nlines - sellno - 1; } else { - drawcache->valid_head= sellno; - drawcache->valid_tail= drawcache->nlines - curlno - 1; + drawcache->valid_head = sellno; + drawcache->valid_tail = drawcache->nlines - curlno - 1; } /* quick cache recalculation is also used in delete operator, * which could merge lines which are adjacent to current selection lines * expand recalculate area to this lines */ - if (drawcache->valid_head>0) drawcache->valid_head--; - if (drawcache->valid_tail>0) drawcache->valid_tail--; + if (drawcache->valid_head > 0) drawcache->valid_head--; + if (drawcache->valid_tail > 0) drawcache->valid_tail--; } else { - drawcache->valid_head= 0; - drawcache->valid_tail= 0; + drawcache->valid_head = 0; + drawcache->valid_tail = 0; } - drawcache->update_flag= 1; + drawcache->update_flag = 1; } } void text_free_caches(SpaceText *st) { - DrawCache *drawcache= (DrawCache *)st->drawcache; + DrawCache *drawcache = (DrawCache *)st->drawcache; if (drawcache) { if (drawcache->line_height) @@ -996,7 +996,7 @@ void text_free_caches(SpaceText *st) /* cache should be updated in caller */ static int text_get_visible_lines_no(SpaceText *st, int lineno) { - DrawCache *drawcache= (DrawCache *)st->drawcache; + DrawCache *drawcache = (DrawCache *)st->drawcache; return drawcache->line_height[lineno]; } @@ -1006,27 +1006,27 @@ int text_get_visible_lines(SpaceText *st, ARegion *ar, const char *str) int i, j, start, end, max, lines, chars; char ch; - max= wrap_width(st, ar); - lines= 1; - start= 0; - end= max; - for (i= 0, j= 0; str[j]; j+=BLI_str_utf8_size(str+j)) { + max = wrap_width(st, ar); + lines = 1; + start = 0; + end = max; + for (i = 0, j = 0; str[j]; j += BLI_str_utf8_size(str + j)) { /* Mimic replacement of tabs */ - ch= str[j]; - if (ch=='\t') { - chars= st->tabnumber-i%st->tabnumber; - ch= ' '; + ch = str[j]; + if (ch == '\t') { + chars = st->tabnumber - i % st->tabnumber; + ch = ' '; } - else chars= 1; + else chars = 1; while (chars--) { - if (i-start >= max) { + if (i - start >= max) { lines++; - start= end; + start = end; end += max; } - else if (ch==' ' || ch=='-') { - end= i+1; + else if (ch == ' ' || ch == '-') { + end = i + 1; } i++; @@ -1039,14 +1039,14 @@ int text_get_visible_lines(SpaceText *st, ARegion *ar, const char *str) int text_get_span_wrap(SpaceText *st, ARegion *ar, TextLine *from, TextLine *to) { if (st->wordwrap) { - int ret=0; - TextLine *tmp= from; + int ret = 0; + TextLine *tmp = from; /* Look forwards */ while (tmp) { if (tmp == to) return ret; - ret+= text_get_visible_lines(st, ar, tmp->line); - tmp= tmp->next; + ret += text_get_visible_lines(st, ar, tmp->line); + tmp = tmp->next; } return ret; @@ -1059,7 +1059,7 @@ int text_get_total_lines(SpaceText *st, ARegion *ar) DrawCache *drawcache; text_update_drawcache(st, ar); - drawcache= (DrawCache *)st->drawcache; + drawcache = (DrawCache *)st->drawcache; return drawcache->total_lines; } @@ -1067,32 +1067,32 @@ int text_get_total_lines(SpaceText *st, ARegion *ar) /* Move pointer to first visible line (top) */ static TextLine *first_visible_line(SpaceText *st, ARegion *ar, int *wrap_top) { - Text *text= st->text; - TextLine* pline= text->lines.first; - int i= st->top, lineno= 0; + Text *text = st->text; + TextLine *pline = text->lines.first; + int i = st->top, lineno = 0; text_update_drawcache(st, ar); - if (wrap_top) *wrap_top= 0; + if (wrap_top) *wrap_top = 0; if (st->wordwrap) { - while (i>0 && pline) { - int lines= text_get_visible_lines_no(st, lineno); + while (i > 0 && pline) { + int lines = text_get_visible_lines_no(st, lineno); - if (i-lines<0) { - if (wrap_top) *wrap_top= i; + if (i - lines < 0) { + if (wrap_top) *wrap_top = i; break; } else { - pline= pline->next; - i-= lines; + pline = pline->next; + i -= lines; lineno++; } } } else { - for (i=st->top; pline->next && i>0; i--) - pline= pline->next; + for (i = st->top; pline->next && i > 0; i--) + pline = pline->next; } return pline; @@ -1109,11 +1109,11 @@ static void calc_text_rcts(SpaceText *st, ARegion *ar, rcti *scroll, rcti *back) pix_top_margin = 8; pix_bottom_margin = 4; pix_available = ar->winy - pix_top_margin - pix_bottom_margin; - ltexth= text_get_total_lines(st, ar); + ltexth = text_get_total_lines(st, ar); blank_lines = st->viewlines / 2; /* nicer code: use scroll rect for entire bar */ - back->xmin = ar->winx -18; + back->xmin = ar->winx - 18; back->xmax = ar->winx; back->ymin = 0; back->ymax = ar->winy; @@ -1121,7 +1121,7 @@ static void calc_text_rcts(SpaceText *st, ARegion *ar, rcti *scroll, rcti *back) scroll->xmin = ar->winx - 17; scroll->xmax = ar->winx - 5; scroll->ymin = 4; - scroll->ymax = 4+pix_available; + scroll->ymax = 4 + pix_available; /* when re-sizing a view-port with the bar at the bottom to a greater height more blank lines will be added */ if (ltexth + blank_lines < st->top + st->viewlines) { @@ -1130,32 +1130,32 @@ static void calc_text_rcts(SpaceText *st, ARegion *ar, rcti *scroll, rcti *back) ltexth += blank_lines; - barheight = (ltexth > 0)? (st->viewlines*pix_available)/ltexth: 0; + barheight = (ltexth > 0) ? (st->viewlines * pix_available) / ltexth : 0; pix_bardiff = 0; if (barheight < 20) { pix_bardiff = 20 - barheight; /* take into account the now non-linear sizing of the bar */ barheight = 20; } - barstart = (ltexth > 0)? ((pix_available - pix_bardiff) * st->top)/ltexth: 0; + barstart = (ltexth > 0) ? ((pix_available - pix_bardiff) * st->top) / ltexth : 0; - st->txtbar= *scroll; + st->txtbar = *scroll; st->txtbar.ymax -= barstart; st->txtbar.ymin = st->txtbar.ymax - barheight; CLAMP(st->txtbar.ymin, pix_bottom_margin, ar->winy - pix_top_margin); CLAMP(st->txtbar.ymax, pix_bottom_margin, ar->winy - pix_top_margin); - st->pix_per_line= (pix_available > 0)? (float) ltexth/pix_available: 0; - if (st->pix_per_line < 0.1f) st->pix_per_line=0.1f; + st->pix_per_line = (pix_available > 0) ? (float) ltexth / pix_available : 0; + if (st->pix_per_line < 0.1f) st->pix_per_line = 0.1f; - curl_off= text_get_span_wrap(st, ar, st->text->lines.first, st->text->curl); - sell_off= text_get_span_wrap(st, ar, st->text->lines.first, st->text->sell); + curl_off = text_get_span_wrap(st, ar, st->text->lines.first, st->text->curl); + sell_off = text_get_span_wrap(st, ar, st->text->lines.first, st->text->sell); lhlstart = MIN2(curl_off, sell_off); lhlend = MAX2(curl_off, sell_off); if (ltexth > 0) { - hlstart = (lhlstart * pix_available)/ltexth; - hlend = (lhlend * pix_available)/ltexth; + hlstart = (lhlstart * pix_available) / ltexth; + hlend = (lhlend * pix_available) / ltexth; /* the scrollbar is non-linear sized */ if (pix_bardiff > 0) { @@ -1180,7 +1180,7 @@ static void calc_text_rcts(SpaceText *st, ARegion *ar, rcti *scroll, rcti *back) /* the end of the highlight is in the current viewport */ if (ltexth && st->viewlines && lhlend >= st->top && lhlend <= st->top + st->viewlines) { /* speed the progresion of the end of the highlight through the scrollbar */ - hlend = (((pix_available - pix_bardiff )*lhlend)/ltexth) + (pix_bardiff * (lhlend - st->top)/st->viewlines); + hlend = (((pix_available - pix_bardiff) * lhlend) / ltexth) + (pix_bardiff * (lhlend - st->top) / st->viewlines); } else if (lhlend < st->top && hlend >= barstart - 2 && hlend < barstart + barheight) { /* push hl end up */ @@ -1205,7 +1205,7 @@ static void calc_text_rcts(SpaceText *st, ARegion *ar, rcti *scroll, rcti *back) hlend = hlstart + 2; } - st->txtscroll= *scroll; + st->txtscroll = *scroll; st->txtscroll.ymax = ar->winy - pix_top_margin - hlstart; st->txtscroll.ymin = ar->winy - pix_top_margin - hlend; @@ -1215,23 +1215,23 @@ static void calc_text_rcts(SpaceText *st, ARegion *ar, rcti *scroll, rcti *back) static void draw_textscroll(SpaceText *st, rcti *scroll, rcti *back) { - bTheme *btheme= UI_GetTheme(); - uiWidgetColors wcol= btheme->tui.wcol_scroll; + bTheme *btheme = UI_GetTheme(); + uiWidgetColors wcol = btheme->tui.wcol_scroll; unsigned char col[4]; float rad; UI_ThemeColor(TH_BACK); glRecti(back->xmin, back->ymin, back->xmax, back->ymax); - uiWidgetScrollDraw(&wcol, scroll, &st->txtbar, (st->flags & ST_SCROLL_SELECT)?UI_SCROLL_PRESSED:0); + uiWidgetScrollDraw(&wcol, scroll, &st->txtbar, (st->flags & ST_SCROLL_SELECT) ? UI_SCROLL_PRESSED : 0); uiSetRoundBox(UI_CNR_ALL); - rad= 0.4f*MIN2(st->txtscroll.xmax - st->txtscroll.xmin, st->txtscroll.ymax - st->txtscroll.ymin); + rad = 0.4f * MIN2(st->txtscroll.xmax - st->txtscroll.xmin, st->txtscroll.ymax - st->txtscroll.ymin); UI_GetThemeColor3ubv(TH_HILITE, col); - col[3]= 48; + col[3] = 48; glColor4ubv(col); glEnable(GL_BLEND); - uiRoundBox(st->txtscroll.xmin+1, st->txtscroll.ymin, st->txtscroll.xmax-1, st->txtscroll.ymax, rad); + uiRoundBox(st->txtscroll.xmin + 1, st->txtscroll.ymin, st->txtscroll.xmax - 1, st->txtscroll.ymax, rad); glDisable(GL_BLEND); } @@ -1239,28 +1239,28 @@ static void draw_textscroll(SpaceText *st, rcti *scroll, rcti *back) static void draw_markers(SpaceText *st, ARegion *ar) { - Text *text= st->text; + Text *text = st->text; TextMarker *marker, *next; TextLine *top, *line; int offl, offc, i, x1, x2, y1, y2, x, y; int topi, topy; /* Move pointer to first visible line (top) */ - top= first_visible_line(st, ar, NULL); - topi= BLI_findindex(&text->lines, top); + top = first_visible_line(st, ar, NULL); + topi = BLI_findindex(&text->lines, top); - topy= txt_get_span(text->lines.first, top); + topy = txt_get_span(text->lines.first, top); - for (marker= text->markers.first; marker; marker= next) { - next= marker->next; + for (marker = text->markers.first; marker; marker = next) { + next = marker->next; /* invisible line (before top) */ - if (marker->linenolineno < topi) continue; - line= BLI_findlink(&text->lines, marker->lineno); + line = BLI_findlink(&text->lines, marker->lineno); /* Remove broken markers */ - if (marker->end>line->len || marker->start>marker->end) { + if (marker->end > line->len || marker->start > marker->end) { BLI_freelinkN(&text->markers, marker); continue; } @@ -1274,46 +1274,46 @@ static void draw_markers(SpaceText *st, ARegion *ar) x2 = text_get_char_pos(st, line->line, marker->end) - st->left + offc; /* invisible part of line (before top, after last visible line) */ - if (y2 < 0 || y1 > st->top+st->viewlines) continue; + if (y2 < 0 || y1 > st->top + st->viewlines) continue; glColor3ubv(marker->color); - x= st->showlinenrs ? TXT_OFFSET + TEXTXLOC : TXT_OFFSET; - y= ar->winy-3; + x = st->showlinenrs ? TXT_OFFSET + TEXTXLOC : TXT_OFFSET; + y = ar->winy - 3; - if (y1==y2) { - y -= y1*st->lheight; + if (y1 == y2) { + y -= y1 * st->lheight; glBegin(GL_LINE_LOOP); - glVertex2i(x+x2*st->cwidth+1, y); - glVertex2i(x+x1*st->cwidth-2, y); - glVertex2i(x+x1*st->cwidth-2, y-st->lheight); - glVertex2i(x+x2*st->cwidth+1, y-st->lheight); + glVertex2i(x + x2 * st->cwidth + 1, y); + glVertex2i(x + x1 * st->cwidth - 2, y); + glVertex2i(x + x1 * st->cwidth - 2, y - st->lheight); + glVertex2i(x + x2 * st->cwidth + 1, y - st->lheight); glEnd(); } else { - y -= y1*st->lheight; + y -= y1 * st->lheight; glBegin(GL_LINE_STRIP); glVertex2i(ar->winx, y); - glVertex2i(x+x1*st->cwidth-2, y); - glVertex2i(x+x1*st->cwidth-2, y-st->lheight); - glVertex2i(ar->winx, y-st->lheight); + glVertex2i(x + x1 * st->cwidth - 2, y); + glVertex2i(x + x1 * st->cwidth - 2, y - st->lheight); + glVertex2i(ar->winx, y - st->lheight); glEnd(); - y-=st->lheight; + y -= st->lheight; - for (i=y1+1; iwinx, y); - glVertex2i(x, y-st->lheight); - glVertex2i(ar->winx, y-st->lheight); + glVertex2i(x, y - st->lheight); + glVertex2i(ar->winx, y - st->lheight); glEnd(); - y-=st->lheight; + y -= st->lheight; } glBegin(GL_LINE_STRIP); glVertex2i(x, y); - glVertex2i(x+x2*st->cwidth+1, y); - glVertex2i(x+x2*st->cwidth+1, y-st->lheight); - glVertex2i(x, y-st->lheight); + glVertex2i(x + x2 * st->cwidth + 1, y); + glVertex2i(x + x2 * st->cwidth + 1, y - st->lheight); + glVertex2i(x, y - st->lheight); glEnd(); } } @@ -1324,7 +1324,7 @@ static void draw_markers(SpaceText *st, ARegion *ar) static void draw_documentation(SpaceText *st, ARegion *ar) { TextLine *tmp; - char *docs, buf[DOC_WIDTH+1], *p; + char *docs, buf[DOC_WIDTH + 1], *p; int i, br, lines; int boxw, boxh, l, x, y /* , top */ /* UNUSED */; @@ -1336,67 +1336,67 @@ static void draw_documentation(SpaceText *st, ARegion *ar) if (!docs) return; /* Count the visible lines to the cursor */ - for (tmp=st->text->curl, l=-st->top; tmp; tmp=tmp->prev, l++); - if (l<0) return; + for (tmp = st->text->curl, l = -st->top; tmp; tmp = tmp->prev, l++) ; + if (l < 0) return; if (st->showlinenrs) { - x= st->cwidth*(st->text->curc-st->left) + TXT_OFFSET + TEXTXLOC - 4; + x = st->cwidth * (st->text->curc - st->left) + TXT_OFFSET + TEXTXLOC - 4; } else { - x= st->cwidth*(st->text->curc-st->left) + TXT_OFFSET - 4; + x = st->cwidth * (st->text->curc - st->left) + TXT_OFFSET - 4; } if (texttool_suggest_first()) { - x += SUGG_LIST_WIDTH*st->cwidth + 50; + x += SUGG_LIST_WIDTH * st->cwidth + 50; } - /* top= */ /* UNUSED */ y= ar->winy - st->lheight*l - 2; - boxw= DOC_WIDTH*st->cwidth + 20; - boxh= (DOC_HEIGHT+1)*st->lheight; + /* top= */ /* UNUSED */ y = ar->winy - st->lheight * l - 2; + boxw = DOC_WIDTH * st->cwidth + 20; + boxh = (DOC_HEIGHT + 1) * st->lheight; /* Draw panel */ UI_ThemeColor(TH_BACK); - glRecti(x, y, x+boxw, y-boxh); + glRecti(x, y, x + boxw, y - boxh); UI_ThemeColor(TH_SHADE1); glBegin(GL_LINE_LOOP); glVertex2i(x, y); - glVertex2i(x+boxw, y); - glVertex2i(x+boxw, y-boxh); - glVertex2i(x, y-boxh); + glVertex2i(x + boxw, y); + glVertex2i(x + boxw, y - boxh); + glVertex2i(x, y - boxh); glEnd(); glBegin(GL_LINE_LOOP); - glVertex2i(x+boxw-10, y-7); - glVertex2i(x+boxw-4, y-7); - glVertex2i(x+boxw-7, y-2); + glVertex2i(x + boxw - 10, y - 7); + glVertex2i(x + boxw - 4, y - 7); + glVertex2i(x + boxw - 7, y - 2); glEnd(); glBegin(GL_LINE_LOOP); - glVertex2i(x+boxw-10, y-boxh+7); - glVertex2i(x+boxw-4, y-boxh+7); - glVertex2i(x+boxw-7, y-boxh+2); + glVertex2i(x + boxw - 10, y - boxh + 7); + glVertex2i(x + boxw - 4, y - boxh + 7); + glVertex2i(x + boxw - 7, y - boxh + 2); glEnd(); UI_ThemeColor(TH_TEXT); - i= 0; br= DOC_WIDTH; lines= 0; // XXX -doc_scroll; - for (p=docs; *p; p++) { - if (*p == '\r' && *(++p) != '\n') *(--p)= '\n'; /* Fix line endings */ + i = 0; br = DOC_WIDTH; lines = 0; // XXX -doc_scroll; + for (p = docs; *p; p++) { + if (*p == '\r' && *(++p) != '\n') *(--p) = '\n'; /* Fix line endings */ if (*p == ' ' || *p == '\t') - br= i; + br = i; else if (*p == '\n') { - buf[i]= '\0'; - if (lines>=0) { + buf[i] = '\0'; + if (lines >= 0) { y -= st->lheight; - text_draw(st, buf, 0, 0, 1, x+4, y-3, NULL); + text_draw(st, buf, 0, 0, 1, x + 4, y - 3, NULL); } - i= 0; br= DOC_WIDTH; lines++; + i = 0; br = DOC_WIDTH; lines++; } - buf[i++]= *p; + buf[i++] = *p; if (i == DOC_WIDTH) { /* Reached the width, go to last break and wrap there */ - buf[br]= '\0'; - if (lines>=0) { + buf[br] = '\0'; + if (lines >= 0) { y -= st->lheight; - text_draw(st, buf, 0, 0, 1, x+4, y-3, NULL); + text_draw(st, buf, 0, 0, 1, x + 4, y - 3, NULL); } - p -= i-br-1; /* Rewind pointer to last break */ - i= 0; br= DOC_WIDTH; lines++; + p -= i - br - 1; /* Rewind pointer to last break */ + i = 0; br = DOC_WIDTH; lines++; } if (lines >= DOC_HEIGHT) break; } @@ -1413,8 +1413,8 @@ static void draw_suggestion_list(SpaceText *st, ARegion *ar) { SuggItem *item, *first, *last, *sel; TextLine *tmp; - char str[SUGG_LIST_WIDTH+1]; - int w, boxw=0, boxh, i, l, x, y, b, *top; + char str[SUGG_LIST_WIDTH + 1]; + int w, boxw = 0, boxh, i, l, x, y, b, *top; if (!st || !st->text) return; if (!texttool_text_is_active(st->text)) return; @@ -1429,29 +1429,29 @@ static void draw_suggestion_list(SpaceText *st, ARegion *ar) top = texttool_suggest_top(); /* Count the visible lines to the cursor */ - for (tmp=st->text->curl, l=-st->top; tmp; tmp=tmp->prev, l++); - if (l<0) return; + for (tmp = st->text->curl, l = -st->top; tmp; tmp = tmp->prev, l++) ; + if (l < 0) return; if (st->showlinenrs) { - x = st->cwidth*(st->text->curc-st->left) + TXT_OFFSET + TEXTXLOC - 4; + x = st->cwidth * (st->text->curc - st->left) + TXT_OFFSET + TEXTXLOC - 4; } else { - x = st->cwidth*(st->text->curc-st->left) + TXT_OFFSET - 4; + x = st->cwidth * (st->text->curc - st->left) + TXT_OFFSET - 4; } - y = ar->winy - st->lheight*l - 2; + y = ar->winy - st->lheight * l - 2; - boxw = SUGG_LIST_WIDTH*st->cwidth + 20; - boxh = SUGG_LIST_SIZE*st->lheight + 8; + boxw = SUGG_LIST_WIDTH * st->cwidth + 20; + boxh = SUGG_LIST_SIZE * st->lheight + 8; UI_ThemeColor(TH_SHADE1); - glRecti(x-1, y+1, x+boxw+1, y-boxh-1); + glRecti(x - 1, y + 1, x + boxw + 1, y - boxh - 1); UI_ThemeColor(TH_BACK); - glRecti(x, y, x+boxw, y-boxh); + glRecti(x, y, x + boxw, y - boxh); /* Set the top 'item' of the visible list */ - for (i=0, item=first; i<*top && item->next; i++, item=item->next); + for (i = 0, item = first; i < *top && item->next; i++, item = item->next) ; - for (i=0; inext) { + for (i = 0; i < SUGG_LIST_SIZE && item; i++, item = item->next) { y -= st->lheight; @@ -1461,21 +1461,21 @@ static void draw_suggestion_list(SpaceText *st, ARegion *ar) if (item == sel) { UI_ThemeColor(TH_SHADE2); - glRecti(x+16, y-3, x+16+w, y+st->lheight-3); + glRecti(x + 16, y - 3, x + 16 + w, y + st->lheight - 3); } - b=1; /* b=1 color block, text is default. b=0 no block, color text */ + b = 1; /* b=1 color block, text is default. b=0 no block, color text */ switch (item->type) { - case 'k': UI_ThemeColor(TH_SYNTAX_B); b=0; break; + case 'k': UI_ThemeColor(TH_SYNTAX_B); b = 0; break; case 'm': UI_ThemeColor(TH_TEXT); break; case 'f': UI_ThemeColor(TH_SYNTAX_L); break; case 'v': UI_ThemeColor(TH_SYNTAX_N); break; - case '?': UI_ThemeColor(TH_TEXT); b=0; break; + case '?': UI_ThemeColor(TH_TEXT); b = 0; break; } if (b) { - glRecti(x+8, y+2, x+11, y+5); + glRecti(x + 8, y + 2, x + 11, y + 5); UI_ThemeColor(TH_TEXT); } - text_draw(st, str, 0, 0, 1, x+16, y-1, NULL); + text_draw(st, str, 0, 0, 1, x + 16, y - 1, NULL); if (item == last) break; } @@ -1485,12 +1485,12 @@ static void draw_suggestion_list(SpaceText *st, ARegion *ar) static void draw_cursor(SpaceText *st, ARegion *ar) { - Text *text= st->text; - int vcurl, vcurc, vsell, vselc, hidden=0; + Text *text = st->text; + int vcurl, vcurc, vsell, vselc, hidden = 0; int x, y, w, i; /* Draw the selection */ - if (text->curl!=text->sell || text->curc!=text->selc) { + if (text->curl != text->sell || text->curc != text->selc) { int offl, offc; /* Convert all to view space character coordinates */ wrap_offset(st, ar, text->curl, text->curc, &offl, &offc); @@ -1500,38 +1500,38 @@ static void draw_cursor(SpaceText *st, ARegion *ar) vsell = txt_get_span(text->lines.first, text->sell) - st->top + offl; vselc = text_get_char_pos(st, text->sell->line, text->selc) - st->left + offc; - if (vcurc<0) vcurc=0; - if (vselc<0) vselc=0, hidden=1; + if (vcurc < 0) vcurc = 0; + if (vselc < 0) vselc = 0, hidden = 1; UI_ThemeColor(TH_SHADE2); - x= st->showlinenrs ? TXT_OFFSET + TEXTXLOC : TXT_OFFSET; - y= ar->winy-2; + x = st->showlinenrs ? TXT_OFFSET + TEXTXLOC : TXT_OFFSET; + y = ar->winy - 2; - if (vcurl==vsell) { - y -= vcurl*st->lheight; + if (vcurl == vsell) { + y -= vcurl * st->lheight; if (vcurc < vselc) - glRecti(x+vcurc*st->cwidth-1, y, x+vselc*st->cwidth, y-st->lheight); + glRecti(x + vcurc * st->cwidth - 1, y, x + vselc * st->cwidth, y - st->lheight); else - glRecti(x+vselc*st->cwidth-1, y, x+vcurc*st->cwidth, y-st->lheight); + glRecti(x + vselc * st->cwidth - 1, y, x + vcurc * st->cwidth, y - st->lheight); } else { int froml, fromc, tol, toc; if (vcurl < vsell) { - froml= vcurl; tol= vsell; - fromc= vcurc; toc= vselc; + froml = vcurl; tol = vsell; + fromc = vcurc; toc = vselc; } else { - froml= vsell; tol= vcurl; - fromc= vselc; toc= vcurc; + froml = vsell; tol = vcurl; + fromc = vselc; toc = vcurc; } - y -= froml*st->lheight; - glRecti(x+fromc*st->cwidth-1, y, ar->winx, y-st->lheight); y-=st->lheight; - for (i=froml+1; iwinx, y-st->lheight), y-=st->lheight; + y -= froml * st->lheight; + glRecti(x + fromc * st->cwidth - 1, y, ar->winx, y - st->lheight); y -= st->lheight; + for (i = froml + 1; i < tol; i++) + glRecti(x - 4, y, ar->winx, y - st->lheight), y -= st->lheight; - glRecti(x-4, y, x+toc*st->cwidth, y-st->lheight); y-=st->lheight; + glRecti(x - 4, y, x + toc * st->cwidth, y - st->lheight); y -= st->lheight; } } else { @@ -1540,9 +1540,9 @@ static void draw_cursor(SpaceText *st, ARegion *ar) vsell = txt_get_span(text->lines.first, text->sell) - st->top + offl; vselc = text_get_char_pos(st, text->sell->line, text->selc) - st->left + offc; - if (vselc<0) { - vselc= 0; - hidden= 1; + if (vselc < 0) { + vselc = 0; + hidden = 1; } } @@ -1555,45 +1555,45 @@ static void draw_cursor(SpaceText *st, ARegion *ar) wrap_offset_in_line(st, ar, text->sell, text->selc, &offl, &offc); - y1= ar->winy-2 - (vsell-offl)*st->lheight; - y2= y1-st->lheight*visible_lines+1; + y1 = ar->winy - 2 - (vsell - offl) * st->lheight; + y2 = y1 - st->lheight * visible_lines + 1; } else { - y1= ar->winy-2 - vsell*st->lheight; - y2= y1-st->lheight+1; + y1 = ar->winy - 2 - vsell * st->lheight; + y2 = y1 - st->lheight + 1; } - if (!(y1<0 || y2 > ar->winy)) { /* check we need to draw */ - x1= st->showlinenrs ? TXT_OFFSET + TEXTXLOC : TXT_OFFSET; - x2= x1 + ar->winx; + if (!(y1 < 0 || y2 > ar->winy)) { /* check we need to draw */ + x1 = st->showlinenrs ? TXT_OFFSET + TEXTXLOC : TXT_OFFSET; + x2 = x1 + ar->winx; glColor4ub(255, 255, 255, 32); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_BLEND); - glRecti(x1-4, y1, x2, y2); + glRecti(x1 - 4, y1, x2, y2); glDisable(GL_BLEND); } } if (!hidden) { /* Draw the cursor itself (we draw the sel. cursor as this is the leading edge) */ - x= st->showlinenrs ? TXT_OFFSET + TEXTXLOC : TXT_OFFSET; - x += vselc*st->cwidth; - y= ar->winy-2 - vsell*st->lheight; + x = st->showlinenrs ? TXT_OFFSET + TEXTXLOC : TXT_OFFSET; + x += vselc * st->cwidth; + y = ar->winy - 2 - vsell * st->lheight; if (st->overwrite) { - char ch= text->sell->line[text->selc]; + char ch = text->sell->line[text->selc]; - w= st->cwidth; - if (ch=='\t') w*= st->tabnumber-(vselc+st->left)%st->tabnumber; + w = st->cwidth; + if (ch == '\t') w *= st->tabnumber - (vselc + st->left) % st->tabnumber; UI_ThemeColor(TH_HILITE); - glRecti(x, y-st->lheight-1, x+w, y-st->lheight+1); + glRecti(x, y - st->lheight - 1, x + w, y - st->lheight + 1); } else { UI_ThemeColor(TH_HILITE); - glRecti(x-1, y, x+1, y-st->lheight); + glRecti(x - 1, y, x + 1, y - st->lheight); } } } @@ -1612,116 +1612,116 @@ static void draw_brackets(SpaceText *st, ARegion *ar) // showsyntax must be on or else the format string will be null if (!text->curl || !st->showsyntax) return; - startl= text->curl; - startc= text->curc; - b= text_check_bracket(startl->line[startc]); - if (b==0 && startc>0) b = text_check_bracket(startl->line[--startc]); - if (b==0) return; - - linep= startl; - c= startc; - fc= txt_utf8_offset_to_index(linep->line, startc); - endl= NULL; - endc= -1; - find= -b; - stack= 0; + startl = text->curl; + startc = text->curc; + b = text_check_bracket(startl->line[startc]); + if (b == 0 && startc > 0) b = text_check_bracket(startl->line[--startc]); + if (b == 0) return; + + linep = startl; + c = startc; + fc = txt_utf8_offset_to_index(linep->line, startc); + endl = NULL; + endc = -1; + find = -b; + stack = 0; /* Don't highlight backets if syntax HL is off or bracket in string or comment. */ if (!linep->format || linep->format[fc] == 'l' || linep->format[fc] == '#') return; - if (b>0) { + if (b > 0) { /* opening bracket, search forward for close */ fc++; - c+= BLI_str_utf8_size(linep->line+c); + c += BLI_str_utf8_size(linep->line + c); while (linep) { - while (clen) { + while (c < linep->len) { if (linep->format && linep->format[fc] != 'l' && linep->format[fc] != '#') { - b= text_check_bracket(linep->line[c]); - if (b==find) { - if (stack==0) { - endl= linep; - endc= c; + b = text_check_bracket(linep->line[c]); + if (b == find) { + if (stack == 0) { + endl = linep; + endc = c; break; } stack--; } - else if (b==-find) { + else if (b == -find) { stack++; } } fc++; - c+= BLI_str_utf8_size(linep->line+c); + c += BLI_str_utf8_size(linep->line + c); } if (endl) break; - linep= linep->next; - c= 0; - fc= 0; + linep = linep->next; + c = 0; + fc = 0; } } else { /* closing bracket, search backward for open */ fc--; - if (c>0) c -= linep->line+c-BLI_str_prev_char_utf8(linep->line+c); + if (c > 0) c -= linep->line + c - BLI_str_prev_char_utf8(linep->line + c); while (linep) { - while (fc>=0) { + while (fc >= 0) { if (linep->format && linep->format[fc] != 'l' && linep->format[fc] != '#') { - b= text_check_bracket(linep->line[c]); - if (b==find) { - if (stack==0) { - endl= linep; - endc= c; + b = text_check_bracket(linep->line[c]); + if (b == find) { + if (stack == 0) { + endl = linep; + endc = c; break; } stack--; } - else if (b==-find) { + else if (b == -find) { stack++; } } fc--; - if (c>0) c -= linep->line+c-BLI_str_prev_char_utf8(linep->line+c); + if (c > 0) c -= linep->line + c - BLI_str_prev_char_utf8(linep->line + c); } if (endl) break; - linep= linep->prev; + linep = linep->prev; if (linep) { - if (linep->format) fc= strlen(linep->format)-1; - else fc= -1; - if (linep->len) c= BLI_str_prev_char_utf8(linep->line+linep->len)-linep->line; - else fc= -1; + if (linep->format) fc = strlen(linep->format) - 1; + else fc = -1; + if (linep->len) c = BLI_str_prev_char_utf8(linep->line + linep->len) - linep->line; + else fc = -1; } } } - if (!endl || endc==-1) + if (!endl || endc == -1) return; UI_ThemeColor(TH_HILITE); - x= st->showlinenrs ? TXT_OFFSET + TEXTXLOC : TXT_OFFSET; - y= ar->winy - st->lheight; + x = st->showlinenrs ? TXT_OFFSET + TEXTXLOC : TXT_OFFSET; + y = ar->winy - st->lheight; /* draw opening bracket */ - ch= startl->line[startc]; + ch = startl->line[startc]; wrap_offset(st, ar, startl, startc, &offl, &offc); - viewc= text_get_char_pos(st, startl->line, startc) - st->left + offc; + viewc = text_get_char_pos(st, startl->line, startc) - st->left + offc; if (viewc >= 0) { - viewl= txt_get_span(text->lines.first, startl) - st->top + offl; + viewl = txt_get_span(text->lines.first, startl) - st->top + offl; - text_font_draw_character(st, x+viewc*st->cwidth, y-viewl*st->lheight, ch); - text_font_draw_character(st, x+viewc*st->cwidth+1, y-viewl*st->lheight, ch); + text_font_draw_character(st, x + viewc * st->cwidth, y - viewl * st->lheight, ch); + text_font_draw_character(st, x + viewc * st->cwidth + 1, y - viewl * st->lheight, ch); } /* draw closing bracket */ - ch= endl->line[endc]; + ch = endl->line[endc]; wrap_offset(st, ar, endl, endc, &offl, &offc); - viewc= text_get_char_pos(st, endl->line, endc) - st->left + offc; + viewc = text_get_char_pos(st, endl->line, endc) - st->left + offc; if (viewc >= 0) { - viewl= txt_get_span(text->lines.first, endl) - st->top + offl; + viewl = txt_get_span(text->lines.first, endl) - st->top + offl; - text_font_draw_character(st, x+viewc*st->cwidth, y-viewl*st->lheight, ch); - text_font_draw_character(st, x+viewc*st->cwidth+1, y-viewl*st->lheight, ch); + text_font_draw_character(st, x + viewc * st->cwidth, y - viewl * st->lheight, ch); + text_font_draw_character(st, x + viewc * st->cwidth + 1, y - viewl * st->lheight, ch); } } @@ -1729,15 +1729,15 @@ static void draw_brackets(SpaceText *st, ARegion *ar) void draw_text_main(SpaceText *st, ARegion *ar) { - Text *text= st->text; + Text *text = st->text; TextLine *tmp; rcti scroll, back; char linenr[12]; - int i, x, y, winx, linecount= 0, lineno= 0; - int wraplinecount= 0, wrap_skip= 0; + int i, x, y, winx, linecount = 0, lineno = 0; + int wraplinecount = 0, wrap_skip = 0; - if (st->lheight) st->viewlines= (int)ar->winy/st->lheight; - else st->viewlines= 0; + if (st->lheight) st->viewlines = (int)ar->winy / st->lheight; + else st->viewlines = 0; /* if no text, nothing to do */ if (!text) @@ -1750,30 +1750,30 @@ void draw_text_main(SpaceText *st, ARegion *ar) txt_clean_text(text); /* update rects for scroll */ - calc_text_rcts(st, ar, &scroll, &back); /* scroll will hold the entire bar size */ + calc_text_rcts(st, ar, &scroll, &back); /* scroll will hold the entire bar size */ /* update syntax formatting if needed */ - tmp= text->lines.first; - lineno= 0; - for (i= 0; itop && tmp; i++) { + tmp = text->lines.first; + lineno = 0; + for (i = 0; i < st->top && tmp; i++) { if (st->showsyntax && !tmp->format) txt_format_line(st, tmp, 0); if (st->wordwrap) { - int lines= text_get_visible_lines_no(st, lineno); + int lines = text_get_visible_lines_no(st, lineno); - if (wraplinecount+lines>st->top) { - wrap_skip= st->top-wraplinecount; + if (wraplinecount + lines > st->top) { + wrap_skip = st->top - wraplinecount; break; } else { - wraplinecount+= lines; - tmp= tmp->next; + wraplinecount += lines; + tmp = tmp->next; linecount++; } } else { - tmp= tmp->next; + tmp = tmp->next; linecount++; } @@ -1781,22 +1781,22 @@ void draw_text_main(SpaceText *st, ARegion *ar) } text_font_begin(st); - st->cwidth= BLF_fixed_width(mono); - st->cwidth= MAX2(st->cwidth, 1); + st->cwidth = BLF_fixed_width(mono); + st->cwidth = MAX2(st->cwidth, 1); /* draw line numbers background */ if (st->showlinenrs) { - x= TXT_OFFSET + TEXTXLOC; + x = TXT_OFFSET + TEXTXLOC; UI_ThemeColor(TH_GRID); - glRecti((TXT_OFFSET-12), 0, (TXT_OFFSET-5) + TEXTXLOC, ar->winy - 2); + glRecti((TXT_OFFSET - 12), 0, (TXT_OFFSET - 5) + TEXTXLOC, ar->winy - 2); } else { - st->linenrs_tot= 0; /* not used */ - x= TXT_OFFSET; + st->linenrs_tot = 0; /* not used */ + x = TXT_OFFSET; } - y= ar->winy-st->lheight; - winx= ar->winx - TXT_SCROLL_WIDTH; + y = ar->winy - st->lheight; + winx = ar->winx - TXT_SCROLL_WIDTH; /* draw cursor */ draw_cursor(st, ar); @@ -1804,7 +1804,7 @@ void draw_text_main(SpaceText *st, ARegion *ar) /* draw the text */ UI_ThemeColor(TH_TEXT); - for (i=0; y>0 && iviewlines && tmp; i++, tmp= tmp->next) { + for (i = 0; y > 0 && i < st->viewlines && tmp; i++, tmp = tmp->next) { if (st->showsyntax && !tmp->format) txt_format_line(st, tmp, 0); @@ -1824,24 +1824,24 @@ void draw_text_main(SpaceText *st, ARegion *ar) if (st->wordwrap) { /* draw word wrapped text */ - int lines = text_draw_wrapped(st, tmp->line, x, y, winx-x, tmp->format, wrap_skip); - y -= lines*st->lheight; + int lines = text_draw_wrapped(st, tmp->line, x, y, winx - x, tmp->format, wrap_skip); + y -= lines * st->lheight; } else { /* draw unwrapped text */ - text_draw(st, tmp->line, st->left, ar->winx/st->cwidth, 1, x, y, tmp->format); + text_draw(st, tmp->line, st->left, ar->winx / st->cwidth, 1, x, y, tmp->format); y -= st->lheight; } - wrap_skip= 0; + wrap_skip = 0; } - if (st->flags&ST_SHOW_MARGIN) { + if (st->flags & ST_SHOW_MARGIN) { UI_ThemeColor(TH_HILITE); glBegin(GL_LINES); - glVertex2i(x+st->cwidth*st->margin_column, 0); - glVertex2i(x+st->cwidth*st->margin_column, ar->winy - 2); + glVertex2i(x + st->cwidth * st->margin_column, 0); + glVertex2i(x + st->cwidth * st->margin_column, ar->winy - 2); glEnd(); } @@ -1861,8 +1861,8 @@ void draw_text_main(SpaceText *st, ARegion *ar) void text_update_character_width(SpaceText *st) { text_font_begin(st); - st->cwidth= BLF_fixed_width(mono); - st->cwidth= MAX2(st->cwidth, 1); + st->cwidth = BLF_fixed_width(mono); + st->cwidth = MAX2(st->cwidth, 1); text_font_end(st); } @@ -1871,16 +1871,16 @@ void text_update_character_width(SpaceText *st) void text_scroll_to_cursor(SpaceText *st, ScrArea *sa) { Text *text; - ARegion *ar= NULL; - int i, x, winx= 0; + ARegion *ar = NULL; + int i, x, winx = 0; if (ELEM3(NULL, st, st->text, st->text->curl)) return; - text= st->text; + text = st->text; - for (ar=sa->regionbase.first; ar; ar= ar->next) - if (ar->regiontype==RGN_TYPE_WINDOW) { - winx= ar->winx; + for (ar = sa->regionbase.first; ar; ar = ar->next) + if (ar->regiontype == RGN_TYPE_WINDOW) { + winx = ar->winx; break; } @@ -1888,34 +1888,34 @@ void text_scroll_to_cursor(SpaceText *st, ScrArea *sa) text_update_character_width(st); - i= txt_get_span(text->lines.first, text->sell); + i = txt_get_span(text->lines.first, text->sell); if (st->wordwrap) { int offl, offc; wrap_offset(st, ar, text->sell, text->selc, &offl, &offc); - i+= offl; + i += offl; } - if (st->top+st->viewlines <= i || st->top > i) - st->top= i - st->viewlines/2; + if (st->top + st->viewlines <= i || st->top > i) + st->top = i - st->viewlines / 2; if (st->wordwrap) { - st->left= 0; + st->left = 0; } else { - x= text_draw(st, text->sell->line, st->left, text->selc, 0, 0, 0, NULL); + x = text_draw(st, text->sell->line, st->left, text->selc, 0, 0, 0, NULL); - if (x==0 || x>winx) - st->left= text->curc-0.5*winx/st->cwidth; + if (x == 0 || x > winx) + st->left = text->curc - 0.5 * winx / st->cwidth; } - if (st->top < 0) st->top= 0; - if (st->left <0) st->left= 0; + if (st->top < 0) st->top = 0; + if (st->left < 0) st->left = 0; } void text_update_cursor_moved(bContext *C) { - ScrArea *sa= CTX_wm_area(C); - SpaceText *st= CTX_wm_space_text(C); + ScrArea *sa = CTX_wm_area(C); + SpaceText *st = CTX_wm_space_text(C); text_scroll_to_cursor(st, sa); } diff --git a/source/blender/editors/space_text/text_header.c b/source/blender/editors/space_text/text_header.c index f4f92ac8db3..a7b455a6ff3 100644 --- a/source/blender/editors/space_text/text_header.c +++ b/source/blender/editors/space_text/text_header.c @@ -68,7 +68,7 @@ #include "text_intern.h" -#define HEADER_PATH_MAX 260 +#define HEADER_PATH_MAX 260 /* ************************ header area region *********************** */ @@ -78,20 +78,20 @@ static ARegion *text_has_properties_region(ScrArea *sa) { ARegion *ar, *arnew; - ar= BKE_area_find_region_type(sa, RGN_TYPE_UI); + ar = BKE_area_find_region_type(sa, RGN_TYPE_UI); if (ar) return ar; /* add subdiv level; after header */ - ar= BKE_area_find_region_type(sa, RGN_TYPE_HEADER); + ar = BKE_area_find_region_type(sa, RGN_TYPE_HEADER); /* is error! */ - if (ar==NULL) return NULL; + if (ar == NULL) return NULL; - arnew= MEM_callocN(sizeof(ARegion), "properties region"); + arnew = MEM_callocN(sizeof(ARegion), "properties region"); BLI_insertlinkafter(&sa->regionbase, ar, arnew); - arnew->regiontype= RGN_TYPE_UI; - arnew->alignment= RGN_ALIGN_LEFT; + arnew->regiontype = RGN_TYPE_UI; + arnew->alignment = RGN_ALIGN_LEFT; arnew->flag = RGN_FLAG_HIDDEN; @@ -105,8 +105,8 @@ static int text_properties_poll(bContext *C) static int text_properties_exec(bContext *C, wmOperator *UNUSED(op)) { - ScrArea *sa= CTX_wm_area(C); - ARegion *ar= text_has_properties_region(sa); + ScrArea *sa = CTX_wm_area(C); + ARegion *ar = text_has_properties_region(sa); if (ar) ED_region_toggle_hidden(C, ar); @@ -135,7 +135,7 @@ void TEXT_OT_properties(wmOperatorType *ot) uiPopupMenu *pup; if (text) { - pup= uiPupMenuBegin(C, "Text", ICON_NONE); + pup = uiPupMenuBegin(C, "Text", ICON_NONE); if (txt_has_sel(text)) { uiItemO(layout, NULL, ICON_NONE, "TEXT_OT_cut"); uiItemO(layout, NULL, ICON_NONE, "TEXT_OT_copy"); @@ -149,7 +149,7 @@ void TEXT_OT_properties(wmOperatorType *ot) uiPupMenuEnd(C, pup); } else { - pup= uiPupMenuBegin(C, "File", ICON_NONE); + pup = uiPupMenuBegin(C, "File", ICON_NONE); uiItemO(layout, NULL, ICON_NONE, "TEXT_OT_new"); uiItemO(layout, NULL, ICON_NONE, "TEXT_OT_open"); uiPupMenuEnd(C, pup); @@ -161,7 +161,7 @@ void TEXT_OT_properties(wmOperatorType *ot) uiPopupMenu *pup; - pup= uiPupMenuBegin(C, "Edit", ICON_NONE); + pup = uiPupMenuBegin(C, "Edit", ICON_NONE); uiItemO(layout, NULL, ICON_NONE, "TEXT_OT_cut"); uiItemO(layout, NULL, ICON_NONE, "TEXT_OT_copy"); uiItemO(layout, NULL, ICON_NONE, "TEXT_OT_paste"); @@ -174,7 +174,7 @@ void TEXT_OT_properties(wmOperatorType *ot) uiPopupMenu *pup; if (text) { - pup= uiPupMenuBegin(C, "Text", ICON_NONE); + pup = uiPupMenuBegin(C, "Text", ICON_NONE); uiItemO(layout, NULL, ICON_NONE, "TEXT_OT_new"); uiItemO(layout, NULL, ICON_NONE, "TEXT_OT_open"); uiItemO(layout, NULL, ICON_NONE, "TEXT_OT_save"); @@ -183,7 +183,7 @@ void TEXT_OT_properties(wmOperatorType *ot) uiPupMenuEnd(C, pup); } else { - pup= uiPupMenuBegin(C, "File", ICON_NONE); + pup = uiPupMenuBegin(C, "File", ICON_NONE); uiItemO(layout, NULL, ICON_NONE, "TEXT_OT_new"); uiItemO(layout, NULL, ICON_NONE, "TEXT_OT_open"); uiPupMenuEnd(C, pup); @@ -195,7 +195,7 @@ void TEXT_OT_properties(wmOperatorType *ot) uiPopupMenu *pup; - pup= uiPupMenuBegin(C, "Text", ICON_NONE); + pup = uiPupMenuBegin(C, "Text", ICON_NONE); uiItemEnumO(layout, "TEXT_OT_move", "Top of File", 0, "type", FILE_TOP); uiItemEnumO(layout, "TEXT_OT_move", "Bottom of File", 0, "type", FILE_BOTTOM); uiItemEnumO(layout, "TEXT_OT_move", "Page Up", 0, "type", PREV_PAGE); diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index de26fa1f8ca..730dfb7d979 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -87,7 +87,7 @@ static int text_new_poll(bContext *UNUSED(C)) static int text_edit_poll(bContext *C) { - Text *text= CTX_data_edit_text(C); + Text *text = CTX_data_edit_text(C); if (!text) return 0; @@ -102,8 +102,8 @@ static int text_edit_poll(bContext *C) static int text_space_edit_poll(bContext *C) { - SpaceText *st= CTX_wm_space_text(C); - Text *text= CTX_data_edit_text(C); + SpaceText *st = CTX_wm_space_text(C); + Text *text = CTX_data_edit_text(C); if (!st || !text) return 0; @@ -118,9 +118,9 @@ static int text_space_edit_poll(bContext *C) static int text_region_edit_poll(bContext *C) { - SpaceText *st= CTX_wm_space_text(C); - Text *text= CTX_data_edit_text(C); - ARegion *ar= CTX_wm_region(C); + SpaceText *st = CTX_wm_space_text(C); + Text *text = CTX_data_edit_text(C); + ARegion *ar = CTX_wm_region(C); if (!st || !text) return 0; @@ -146,7 +146,7 @@ void text_update_line_edited(TextLine *line) /* we just free format here, and let it rebuild during draw */ if (line->format) { MEM_freeN(line->format); - line->format= NULL; + line->format = NULL; } } @@ -154,7 +154,7 @@ void text_update_edited(Text *text) { TextLine *line; - for (line=text->lines.first; line; line=line->next) + for (line = text->lines.first; line; line = line->next) text_update_line_edited(line); } @@ -162,12 +162,12 @@ void text_update_edited(Text *text) static int text_new_exec(bContext *C, wmOperator *UNUSED(op)) { - SpaceText *st= CTX_wm_space_text(C); + SpaceText *st = CTX_wm_space_text(C); Text *text; PointerRNA ptr, idptr; PropertyRNA *prop; - text= add_empty_text("Text"); + text = add_empty_text("Text"); /* hook into UI */ uiIDContextProperty(C, &ptr, &prop); @@ -176,7 +176,7 @@ static int text_new_exec(bContext *C, wmOperator *UNUSED(op)) /* when creating new ID blocks, use is already 1, but RNA * pointer se also increases user, so this compensates it */ /* doesnt always seem to happen... (ton) */ - if (text->id.us>1) + if (text->id.us > 1) text->id.us--; RNA_id_pointer_create(&text->id, &idptr); @@ -184,12 +184,12 @@ static int text_new_exec(bContext *C, wmOperator *UNUSED(op)) RNA_property_update(C, &ptr, prop); } else if (st) { - st->text= text; - st->top= 0; + st->text = text; + st->top = 0; text_drawcache_tag_update(st, 1); } - WM_event_add_notifier(C, NC_TEXT|NA_ADDED, text); + WM_event_add_notifier(C, NC_TEXT | NA_ADDED, text); return OPERATOR_FINISHED; } @@ -215,7 +215,7 @@ static void text_open_init(bContext *C, wmOperator *op) { PropertyPointerRNA *pprop; - op->customdata= pprop= MEM_callocN(sizeof(PropertyPointerRNA), "OpenPropertyPointerRNA"); + op->customdata = pprop = MEM_callocN(sizeof(PropertyPointerRNA), "OpenPropertyPointerRNA"); uiIDContextProperty(C, &pprop->ptr, &pprop->prop); } @@ -227,7 +227,7 @@ static int text_open_cancel(bContext *UNUSED(C), wmOperator *op) static int text_open_exec(bContext *C, wmOperator *op) { - SpaceText *st= CTX_wm_space_text(C); + SpaceText *st = CTX_wm_space_text(C); Text *text; PropertyPointerRNA *pprop; PointerRNA idptr; @@ -236,7 +236,7 @@ static int text_open_exec(bContext *C, wmOperator *op) RNA_string_get(op->ptr, "filepath", str); - text= add_text(str, G.main->name); + text = add_text(str, G.main->name); if (!text) { if (op->customdata) MEM_freeN(op->customdata); @@ -247,7 +247,7 @@ static int text_open_exec(bContext *C, wmOperator *op) text_open_init(C, op); /* hook into UI */ - pprop= op->customdata; + pprop = op->customdata; if (pprop->prop) { /* when creating new ID blocks, use is already 1, but RNA @@ -259,8 +259,8 @@ static int text_open_exec(bContext *C, wmOperator *op) RNA_property_update(C, &pprop->ptr, pprop->prop); } else if (st) { - st->text= text; - st->top= 0; + st->text = text; + st->top = 0; } if (internal) { @@ -271,7 +271,7 @@ static int text_open_exec(bContext *C, wmOperator *op) } text_drawcache_tag_update(st, 1); - WM_event_add_notifier(C, NC_TEXT|NA_ADDED, text); + WM_event_add_notifier(C, NC_TEXT | NA_ADDED, text); MEM_freeN(op->customdata); @@ -280,8 +280,8 @@ static int text_open_exec(bContext *C, wmOperator *op) static int text_open_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { - Text *text= CTX_data_edit_text(C); - char *path= (text && text->name)? text->name: G.main->name; + Text *text = CTX_data_edit_text(C); + char *path = (text && text->name) ? text->name : G.main->name; if (RNA_struct_property_is_set(op->ptr, "filepath")) return text_open_exec(C, op); @@ -310,7 +310,7 @@ void TEXT_OT_open(wmOperatorType *ot) ot->flag = OPTYPE_UNDO; /* properties */ - WM_operator_properties_filesel(ot, FOLDERFILE|TEXTFILE|PYSCRIPTFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY); //XXX TODO, relative_path + WM_operator_properties_filesel(ot, FOLDERFILE | TEXTFILE | PYSCRIPTFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY); //XXX TODO, relative_path RNA_def_boolean(ot->srna, "internal", 0, "Make internal", "Make text file internal after loading"); } @@ -318,7 +318,7 @@ void TEXT_OT_open(wmOperatorType *ot) static int text_reload_exec(bContext *C, wmOperator *op) { - Text *text= CTX_data_edit_text(C); + Text *text = CTX_data_edit_text(C); if (!reopen_text(text)) { BKE_report(op->reports, RPT_ERROR, "Could not reopen file"); @@ -333,7 +333,7 @@ static int text_reload_exec(bContext *C, wmOperator *op) text_update_edited(text); text_update_cursor_moved(C); text_drawcache_tag_update(CTX_wm_space_text(C), 1); - WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text); + WM_event_add_notifier(C, NC_TEXT | NA_EDITED, text); return OPERATOR_FINISHED; } @@ -361,21 +361,21 @@ static int text_unlink_poll(bContext *C) static int text_unlink_exec(bContext *C, wmOperator *UNUSED(op)) { - Main *bmain= CTX_data_main(C); - SpaceText *st= CTX_wm_space_text(C); - Text *text= CTX_data_edit_text(C); + Main *bmain = CTX_data_main(C); + SpaceText *st = CTX_wm_space_text(C); + Text *text = CTX_data_edit_text(C); /* make the previous text active, if its not there make the next text active */ if (st) { if (text->id.prev) { st->text = text->id.prev; text_update_cursor_moved(C); - WM_event_add_notifier(C, NC_TEXT|ND_CURSOR, st->text); + WM_event_add_notifier(C, NC_TEXT | ND_CURSOR, st->text); } else if (text->id.next) { st->text = text->id.next; text_update_cursor_moved(C); - WM_event_add_notifier(C, NC_TEXT|ND_CURSOR, st->text); + WM_event_add_notifier(C, NC_TEXT | ND_CURSOR, st->text); } } @@ -383,7 +383,7 @@ static int text_unlink_exec(bContext *C, wmOperator *UNUSED(op)) free_libblock(&bmain->text, text); text_drawcache_tag_update(st, 1); - WM_event_add_notifier(C, NC_TEXT|NA_REMOVED, NULL); + WM_event_add_notifier(C, NC_TEXT | NA_REMOVED, NULL); return OPERATOR_FINISHED; } @@ -408,17 +408,17 @@ void TEXT_OT_unlink(wmOperatorType *ot) static int text_make_internal_exec(bContext *C, wmOperator *UNUSED(op)) { - Text *text= CTX_data_edit_text(C); + Text *text = CTX_data_edit_text(C); text->flags |= TXT_ISMEM | TXT_ISDIRTY; if (text->name) { MEM_freeN(text->name); - text->name= NULL; + text->name = NULL; } text_update_cursor_moved(C); - WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text); + WM_event_add_notifier(C, NC_TEXT | NA_EDITED, text); return OPERATOR_FINISHED; } @@ -442,7 +442,7 @@ void TEXT_OT_make_internal(wmOperatorType *ot) static int text_save_poll(bContext *C) { - Text *text= CTX_data_edit_text(C); + Text *text = CTX_data_edit_text(C); if (!text_edit_poll(C)) return 0; @@ -460,27 +460,27 @@ static void txt_write_file(Text *text, ReportList *reports) BLI_strncpy(filepath, text->name, FILE_MAX); BLI_path_abs(filepath, G.main->name); - fp= BLI_fopen(filepath, "w"); - if (fp==NULL) { + fp = BLI_fopen(filepath, "w"); + if (fp == NULL) { BKE_reportf(reports, RPT_ERROR, "Unable to save \"%s\": %s", filepath, errno ? strerror(errno) : "Unknown error writing file"); return; } - tmp= text->lines.first; + tmp = text->lines.first; while (tmp) { if (tmp->next) fprintf(fp, "%s\n", tmp->line); else fprintf(fp, "%s", tmp->line); - tmp= tmp->next; + tmp = tmp->next; } - fclose (fp); + fclose(fp); if (stat(filepath, &st) == 0) { - text->mtime= st.st_mtime; + text->mtime = st.st_mtime; } else { - text->mtime= 0; + text->mtime = 0; BKE_reportf(reports, RPT_WARNING, "Unable to stat \"%s\": %s", filepath, errno ? strerror(errno) : "Unknown error starrng file"); } @@ -490,12 +490,12 @@ static void txt_write_file(Text *text, ReportList *reports) static int text_save_exec(bContext *C, wmOperator *op) { - Text *text= CTX_data_edit_text(C); + Text *text = CTX_data_edit_text(C); txt_write_file(text, op->reports); text_update_cursor_moved(C); - WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text); + WM_event_add_notifier(C, NC_TEXT | NA_EDITED, text); return OPERATOR_FINISHED; } @@ -516,7 +516,7 @@ void TEXT_OT_save(wmOperatorType *ot) static int text_save_as_exec(bContext *C, wmOperator *op) { - Text *text= CTX_data_edit_text(C); + Text *text = CTX_data_edit_text(C); char str[FILE_MAX]; if (!text) @@ -525,31 +525,31 @@ static int text_save_as_exec(bContext *C, wmOperator *op) RNA_string_get(op->ptr, "filepath", str); if (text->name) MEM_freeN(text->name); - text->name= BLI_strdup(str); + text->name = BLI_strdup(str); text->flags &= ~TXT_ISMEM; txt_write_file(text, op->reports); text_update_cursor_moved(C); - WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text); + WM_event_add_notifier(C, NC_TEXT | NA_EDITED, text); return OPERATOR_FINISHED; } static int text_save_as_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { - Text *text= CTX_data_edit_text(C); + Text *text = CTX_data_edit_text(C); char *str; if (RNA_struct_property_is_set(op->ptr, "filepath")) return text_save_as_exec(C, op); if (text->name) - str= text->name; + str = text->name; else if (text->flags & TXT_ISMEM) - str= text->id.name+2; + str = text->id.name + 2; else - str= G.main->name; + str = G.main->name; RNA_string_set(op->ptr, "filepath", str); WM_event_add_fileselect(C, op); @@ -570,7 +570,7 @@ void TEXT_OT_save_as(wmOperatorType *ot) ot->poll = text_edit_poll; /* properties */ - WM_operator_properties_filesel(ot, FOLDERFILE|TEXTFILE|PYSCRIPTFILE, FILE_SPECIAL, FILE_SAVE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY); //XXX TODO, relative_path + WM_operator_properties_filesel(ot, FOLDERFILE | TEXTFILE | PYSCRIPTFILE, FILE_SPECIAL, FILE_SAVE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY); //XXX TODO, relative_path } /******************* run script operator *********************/ @@ -583,17 +583,17 @@ static int text_run_script_poll(bContext *C) static int text_run_script(bContext *C, ReportList *reports) { #ifdef WITH_PYTHON - Text *text= CTX_data_edit_text(C); - const short is_live= (reports == NULL); + Text *text = CTX_data_edit_text(C); + const short is_live = (reports == NULL); /* only for comparison */ - void *curl_prev= text->curl; - int curc_prev= text->curc; + void *curl_prev = text->curl; + int curc_prev = text->curc; if (BPY_text_exec(C, text, reports, !is_live)) { if (is_live) { /* for nice live updates */ - WM_event_add_notifier(C, NC_WINDOW|NA_EDITED, NULL); + WM_event_add_notifier(C, NC_WINDOW | NA_EDITED, NULL); } return OPERATOR_FINISHED; } @@ -602,7 +602,7 @@ static int text_run_script(bContext *C, ReportList *reports) if (!is_live) { if (text->curl != curl_prev || curc_prev != text->curc) { text_update_cursor_moved(C); - WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text); + WM_event_add_notifier(C, NC_TEXT | NA_EDITED, text); } BKE_report(reports, RPT_ERROR, "Python script fail, look in the console for now..."); @@ -639,7 +639,7 @@ void TEXT_OT_run_script(wmOperatorType *ot) ot->exec = text_run_script_exec; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } /******************* refresh pyconstraints operator *********************/ @@ -648,31 +648,31 @@ static int text_refresh_pyconstraints_exec(bContext *UNUSED(C), wmOperator *UNUS { #ifdef WITH_PYTHON #if 0 - Text *text= CTX_data_edit_text(C); + Text *text = CTX_data_edit_text(C); Object *ob; bConstraint *con; short update; /* check all pyconstraints */ - for (ob= CTX_data_main(C)->object.first; ob; ob= ob->id.next) { + for (ob = CTX_data_main(C)->object.first; ob; ob = ob->id.next) { update = 0; - if (ob->type==OB_ARMATURE && ob->pose) { + if (ob->type == OB_ARMATURE && ob->pose) { bPoseChannel *pchan; - for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) { - for (con = pchan->constraints.first; con; con= con->next) { - if (con->type==CONSTRAINT_TYPE_PYTHON) { + for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { + for (con = pchan->constraints.first; con; con = con->next) { + if (con->type == CONSTRAINT_TYPE_PYTHON) { bPythonConstraint *data = con->data; - if (data->text==text) BPY_pyconstraint_update(ob, con); + if (data->text == text) BPY_pyconstraint_update(ob, con); update = 1; } } } } - for (con = ob->constraints.first; con; con= con->next) { - if (con->type==CONSTRAINT_TYPE_PYTHON) { + for (con = ob->constraints.first; con; con = con->next) { + if (con->type == CONSTRAINT_TYPE_PYTHON) { bPythonConstraint *data = con->data; - if (data->text==text) BPY_pyconstraint_update(ob, con); + if (data->text == text) BPY_pyconstraint_update(ob, con); update = 1; } } @@ -704,8 +704,8 @@ void TEXT_OT_refresh_pyconstraints(wmOperatorType *ot) static char *txt_copy_selected(Text *text) { TextLine *tmp, *linef, *linel; - char *buf= NULL; - int charf, charl, length= 0; + char *buf = NULL; + int charf, charl, length = 0; if (!text) return NULL; if (!text->curl) return NULL; @@ -713,71 +713,71 @@ static char *txt_copy_selected(Text *text) if (!txt_has_sel(text)) return NULL; - if (text->curl==text->sell) { - linef= linel= text->curl; + if (text->curl == text->sell) { + linef = linel = text->curl; if (text->curc < text->selc) { - charf= text->curc; - charl= text->selc; + charf = text->curc; + charl = text->selc; } else { - charf= text->selc; - charl= text->curc; + charf = text->selc; + charl = text->curc; } } - else if (txt_get_span(text->curl, text->sell)<0) { - linef= text->sell; - linel= text->curl; + else if (txt_get_span(text->curl, text->sell) < 0) { + linef = text->sell; + linel = text->curl; - charf= text->selc; - charl= text->curc; + charf = text->selc; + charl = text->curc; } else { - linef= text->curl; - linel= text->sell; + linef = text->curl; + linel = text->sell; - charf= text->curc; - charl= text->selc; + charf = text->curc; + charl = text->selc; } if (linef == linel) { - length= charl-charf; + length = charl - charf; - buf= MEM_callocN(length+1, "cut buffera"); + buf = MEM_callocN(length + 1, "cut buffera"); - BLI_strncpy(buf, linef->line + charf, length+1); + BLI_strncpy(buf, linef->line + charf, length + 1); } else { - length+= linef->len - charf; - length+= charl; + length += linef->len - charf; + length += charl; length++; /* For the '\n' */ - tmp= linef->next; - while (tmp && tmp!= linel) { - length+= tmp->len+1; - tmp= tmp->next; + tmp = linef->next; + while (tmp && tmp != linel) { + length += tmp->len + 1; + tmp = tmp->next; } - buf= MEM_callocN(length+1, "cut bufferb"); + buf = MEM_callocN(length + 1, "cut bufferb"); - strncpy(buf, linef->line+ charf, linef->len-charf); - length= linef->len-charf; + strncpy(buf, linef->line + charf, linef->len - charf); + length = linef->len - charf; - buf[length++]='\n'; + buf[length++] = '\n'; - tmp= linef->next; - while (tmp && tmp!=linel) { - strncpy(buf+length, tmp->line, tmp->len); - length+= tmp->len; + tmp = linef->next; + while (tmp && tmp != linel) { + strncpy(buf + length, tmp->line, tmp->len); + length += tmp->len; - buf[length++]='\n'; + buf[length++] = '\n'; - tmp= tmp->next; + tmp = tmp->next; } - strncpy(buf+length, linel->line, charl); - length+= charl; + strncpy(buf + length, linel->line, charl); + length += charl; - buf[length]=0; + buf[length] = 0; } return buf; @@ -785,11 +785,11 @@ static char *txt_copy_selected(Text *text) static int text_paste_exec(bContext *C, wmOperator *op) { - Text *text= CTX_data_edit_text(C); + Text *text = CTX_data_edit_text(C); char *buf; - int selection= RNA_boolean_get(op->ptr, "selection"); + int selection = RNA_boolean_get(op->ptr, "selection"); - buf= WM_clipboard_text_get(selection); + buf = WM_clipboard_text_get(selection); if (!buf) return OPERATOR_CANCELLED; @@ -802,7 +802,7 @@ static int text_paste_exec(bContext *C, wmOperator *op) MEM_freeN(buf); text_update_cursor_moved(C); - WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text); + WM_event_add_notifier(C, NC_TEXT | NA_EDITED, text); /* run the script while editing, evil but useful */ if (CTX_wm_space_text(C)->live_edit) @@ -832,7 +832,7 @@ static void txt_copy_clipboard(Text *text) { char *buf; - buf= txt_copy_selected(text); + buf = txt_copy_selected(text); if (buf) { WM_clipboard_text_set(buf, 0); @@ -842,7 +842,7 @@ static void txt_copy_clipboard(Text *text) static int text_copy_exec(bContext *C, wmOperator *UNUSED(op)) { - Text *text= CTX_data_edit_text(C); + Text *text = CTX_data_edit_text(C); txt_copy_clipboard(text); @@ -865,7 +865,7 @@ void TEXT_OT_copy(wmOperatorType *ot) static int text_cut_exec(bContext *C, wmOperator *UNUSED(op)) { - Text *text= CTX_data_edit_text(C); + Text *text = CTX_data_edit_text(C); text_drawcache_tag_update(CTX_wm_space_text(C), 0); @@ -873,7 +873,7 @@ static int text_cut_exec(bContext *C, wmOperator *UNUSED(op)) txt_delete_selected(text); text_update_cursor_moved(C); - WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text); + WM_event_add_notifier(C, NC_TEXT | NA_EDITED, text); /* run the script while editing, evil but useful */ if (CTX_wm_space_text(C)->live_edit) @@ -898,7 +898,7 @@ void TEXT_OT_cut(wmOperatorType *ot) static int text_indent_exec(bContext *C, wmOperator *UNUSED(op)) { - Text *text= CTX_data_edit_text(C); + Text *text = CTX_data_edit_text(C); text_drawcache_tag_update(CTX_wm_space_text(C), 0); @@ -912,7 +912,7 @@ static int text_indent_exec(bContext *C, wmOperator *UNUSED(op)) text_update_edited(text); text_update_cursor_moved(C); - WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text); + WM_event_add_notifier(C, NC_TEXT | NA_EDITED, text); return OPERATOR_FINISHED; } @@ -933,7 +933,7 @@ void TEXT_OT_indent(wmOperatorType *ot) static int text_unindent_exec(bContext *C, wmOperator *UNUSED(op)) { - Text *text= CTX_data_edit_text(C); + Text *text = CTX_data_edit_text(C); if (txt_has_sel(text)) { text_drawcache_tag_update(CTX_wm_space_text(C), 0); @@ -944,7 +944,7 @@ static int text_unindent_exec(bContext *C, wmOperator *UNUSED(op)) text_update_edited(text); text_update_cursor_moved(C); - WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text); + WM_event_add_notifier(C, NC_TEXT | NA_EDITED, text); return OPERATOR_FINISHED; } @@ -968,18 +968,18 @@ void TEXT_OT_unindent(wmOperatorType *ot) static int text_line_break_exec(bContext *C, wmOperator *UNUSED(op)) { - SpaceText *st= CTX_wm_space_text(C); - Text *text= CTX_data_edit_text(C); + SpaceText *st = CTX_wm_space_text(C); + Text *text = CTX_data_edit_text(C); int a, curts; int space = (text->flags & TXT_TABSTOSPACES) ? st->tabnumber : 1; text_drawcache_tag_update(st, 0); // double check tabs/spaces before splitting the line - curts= setcurr_tab_spaces(text, space); + curts = setcurr_tab_spaces(text, space); txt_split_curline(text); - for (a=0; a < curts; a++) { + for (a = 0; a < curts; a++) { if (text->flags & TXT_TABSTOSPACES) { txt_add_char(text, ' '); } @@ -995,7 +995,7 @@ static int text_line_break_exec(bContext *C, wmOperator *UNUSED(op)) } text_update_cursor_moved(C); - WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text); + WM_event_add_notifier(C, NC_TEXT | NA_EDITED, text); return OPERATOR_CANCELLED; } @@ -1016,7 +1016,7 @@ void TEXT_OT_line_break(wmOperatorType *ot) static int text_comment_exec(bContext *C, wmOperator *UNUSED(op)) { - Text *text= CTX_data_edit_text(C); + Text *text = CTX_data_edit_text(C); if (txt_has_sel(text)) { text_drawcache_tag_update(CTX_wm_space_text(C), 0); @@ -1026,7 +1026,7 @@ static int text_comment_exec(bContext *C, wmOperator *UNUSED(op)) text_update_edited(text); text_update_cursor_moved(C); - WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text); + WM_event_add_notifier(C, NC_TEXT | NA_EDITED, text); return OPERATOR_FINISHED; } @@ -1049,7 +1049,7 @@ void TEXT_OT_comment(wmOperatorType *ot) static int text_uncomment_exec(bContext *C, wmOperator *UNUSED(op)) { - Text *text= CTX_data_edit_text(C); + Text *text = CTX_data_edit_text(C); if (txt_has_sel(text)) { text_drawcache_tag_update(CTX_wm_space_text(C), 0); @@ -1059,7 +1059,7 @@ static int text_uncomment_exec(bContext *C, wmOperator *UNUSED(op)) text_update_edited(text); text_update_cursor_moved(C); - WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text); + WM_event_add_notifier(C, NC_TEXT | NA_EDITED, text); return OPERATOR_FINISHED; } @@ -1082,32 +1082,32 @@ void TEXT_OT_uncomment(wmOperatorType *ot) /******************* convert whitespace operator *********************/ enum { TO_SPACES, TO_TABS }; -static EnumPropertyItem whitespace_type_items[]= { +static EnumPropertyItem whitespace_type_items[] = { {TO_SPACES, "SPACES", 0, "To Spaces", NULL}, {TO_TABS, "TABS", 0, "To Tabs", NULL}, {0, NULL, 0, NULL, NULL}}; static int text_convert_whitespace_exec(bContext *C, wmOperator *op) { - SpaceText *st= CTX_wm_space_text(C); - Text *text= CTX_data_edit_text(C); + SpaceText *st = CTX_wm_space_text(C); + Text *text = CTX_data_edit_text(C); TextLine *tmp; FlattenString fs; size_t a, j; char *text_check_line, *new_line; int extra, number; //unknown for now - int type= RNA_enum_get(op->ptr, "type"); + int type = RNA_enum_get(op->ptr, "type"); tmp = text->lines.first; //first convert to all space, this make it a lot easier to convert to tabs because there is no mixtures of ' ' && '\t' while (tmp) { text_check_line = tmp->line; - number = flatten_string(st, &fs, text_check_line)+1; + number = flatten_string(st, &fs, text_check_line) + 1; flatten_string_free(&fs); new_line = MEM_callocN(number, "Converted_Line"); j = 0; - for (a=0; a < strlen(text_check_line); a++) { //foreach char in line + for (a = 0; a < strlen(text_check_line); a++) { //foreach char in line if (text_check_line[a] == '\t') { //checking for tabs //get the number of spaces this tabs is showing //i don't like doing it this way but will look into it later @@ -1115,8 +1115,8 @@ static int text_convert_whitespace_exec(bContext *C, wmOperator *op) number = flatten_string(st, &fs, new_line); flatten_string_free(&fs); new_line[j] = '\t'; - new_line[j+1] = '\0'; - number = flatten_string(st, &fs, new_line)-number; + new_line[j + 1] = '\0'; + number = flatten_string(st, &fs, new_line) - number; flatten_string_free(&fs); for (extra = 0; extra < number; extra++) { @@ -1150,26 +1150,26 @@ static int text_convert_whitespace_exec(bContext *C, wmOperator *op) for (a = 0; a < strlen(text_check_line); a++) { number = 0; for (j = 0; j < (size_t)st->tabnumber; j++) { - if ((a+j) <= strlen(text_check_line)) { //check to make sure we are not pass the end of the line - if (text_check_line[a+j] != ' ') { + if ((a + j) <= strlen(text_check_line)) { //check to make sure we are not pass the end of the line + if (text_check_line[a + j] != ' ') { number = 1; } } } if (!number) { //found all number of space to equal a tab - a = a+(st->tabnumber-1); - extra = extra+1; + a = a + (st->tabnumber - 1); + extra = extra + 1; } } - if ( extra > 0 ) { //got tabs make malloc and do what you have to do - new_line = MEM_callocN(strlen(text_check_line)-(((st->tabnumber*extra)-extra)-1), "Converted_Line"); + if (extra > 0) { //got tabs make malloc and do what you have to do + new_line = MEM_callocN(strlen(text_check_line) - (((st->tabnumber * extra) - extra) - 1), "Converted_Line"); extra = 0; //reuse vars for (a = 0; a < strlen(text_check_line); a++) { number = 0; for (j = 0; j < (size_t)st->tabnumber; j++) { - if ((a+j) <= strlen(text_check_line)) { //check to make sure we are not pass the end of the line - if (text_check_line[a+j] != ' ') { + if ((a + j) <= strlen(text_check_line)) { //check to make sure we are not pass the end of the line + if (text_check_line[a + j] != ' ') { number = 1; } } @@ -1177,7 +1177,7 @@ static int text_convert_whitespace_exec(bContext *C, wmOperator *op) if (!number) { //found all number of space to equal a tab new_line[extra] = '\t'; - a = a+(st->tabnumber-1); + a = a + (st->tabnumber - 1); ++extra; } @@ -1202,7 +1202,7 @@ static int text_convert_whitespace_exec(bContext *C, wmOperator *op) text_update_edited(text); text_update_cursor_moved(C); text_drawcache_tag_update(st, 1); - WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text); + WM_event_add_notifier(C, NC_TEXT | NA_EDITED, text); return OPERATOR_FINISHED; } @@ -1226,12 +1226,12 @@ void TEXT_OT_convert_whitespace(wmOperatorType *ot) static int text_select_all_exec(bContext *C, wmOperator *UNUSED(op)) { - Text *text= CTX_data_edit_text(C); + Text *text = CTX_data_edit_text(C); txt_sel_all(text); text_update_cursor_moved(C); - WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text); + WM_event_add_notifier(C, NC_TEXT | NA_EDITED, text); return OPERATOR_FINISHED; } @@ -1252,12 +1252,12 @@ void TEXT_OT_select_all(wmOperatorType *ot) static int text_select_line_exec(bContext *C, wmOperator *UNUSED(op)) { - Text *text= CTX_data_edit_text(C); + Text *text = CTX_data_edit_text(C); txt_sel_line(text); text_update_cursor_moved(C); - WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text); + WM_event_add_notifier(C, NC_TEXT | NA_EDITED, text); return OPERATOR_FINISHED; } @@ -1278,13 +1278,13 @@ void TEXT_OT_select_line(wmOperatorType *ot) static int text_select_word_exec(bContext *C, wmOperator *UNUSED(op)) { - Text *text= CTX_data_edit_text(C); + Text *text = CTX_data_edit_text(C); txt_jump_left(text, 0); txt_jump_right(text, 1); text_update_cursor_moved(C); - WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text); + WM_event_add_notifier(C, NC_TEXT | NA_EDITED, text); return OPERATOR_FINISHED; } @@ -1305,22 +1305,22 @@ void TEXT_OT_select_word(wmOperatorType *ot) static int text_previous_marker_exec(bContext *C, wmOperator *UNUSED(op)) { - Text *text= CTX_data_edit_text(C); + Text *text = CTX_data_edit_text(C); TextMarker *mrk; int lineno; - lineno= txt_get_span(text->lines.first, text->curl); - mrk= text->markers.last; - while (mrk && (mrk->lineno>lineno || (mrk->lineno==lineno && mrk->end > text->curc))) - mrk= mrk->prev; - if (!mrk) mrk= text->markers.last; + lineno = txt_get_span(text->lines.first, text->curl); + mrk = text->markers.last; + while (mrk && (mrk->lineno > lineno || (mrk->lineno == lineno && mrk->end > text->curc))) + mrk = mrk->prev; + if (!mrk) mrk = text->markers.last; if (mrk) { txt_move_to(text, mrk->lineno, mrk->start, 0); txt_move_to(text, mrk->lineno, mrk->end, 1); } text_update_cursor_moved(C); - WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text); + WM_event_add_notifier(C, NC_TEXT | NA_EDITED, text); return OPERATOR_FINISHED; } @@ -1341,22 +1341,22 @@ void TEXT_OT_previous_marker(wmOperatorType *ot) static int text_next_marker_exec(bContext *C, wmOperator *UNUSED(op)) { - Text *text= CTX_data_edit_text(C); + Text *text = CTX_data_edit_text(C); TextMarker *mrk; int lineno; - lineno= txt_get_span(text->lines.first, text->curl); - mrk= text->markers.first; - while (mrk && (mrk->linenolineno==lineno && mrk->start <= text->curc))) - mrk= mrk->next; - if (!mrk) mrk= text->markers.first; + lineno = txt_get_span(text->lines.first, text->curl); + mrk = text->markers.first; + while (mrk && (mrk->lineno < lineno || (mrk->lineno == lineno && mrk->start <= text->curc))) + mrk = mrk->next; + if (!mrk) mrk = text->markers.first; if (mrk) { txt_move_to(text, mrk->lineno, mrk->start, 0); txt_move_to(text, mrk->lineno, mrk->end, 1); } text_update_cursor_moved(C); - WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text); + WM_event_add_notifier(C, NC_TEXT | NA_EDITED, text); return OPERATOR_FINISHED; } @@ -1377,12 +1377,12 @@ void TEXT_OT_next_marker(wmOperatorType *ot) static int text_clear_all_markers_exec(bContext *C, wmOperator *UNUSED(op)) { - Text *text= CTX_data_edit_text(C); + Text *text = CTX_data_edit_text(C); txt_clear_markers(text, 0, 0); text_update_cursor_moved(C); - WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text); + WM_event_add_notifier(C, NC_TEXT | NA_EDITED, text); return OPERATOR_FINISHED; } @@ -1401,7 +1401,7 @@ void TEXT_OT_markers_clear(wmOperatorType *ot) /************************ move operator ************************/ -static EnumPropertyItem move_type_items[]= { +static EnumPropertyItem move_type_items[] = { {LINE_BEGIN, "LINE_BEGIN", 0, "Line Begin", ""}, {LINE_END, "LINE_END", 0, "Line End", ""}, {FILE_TOP, "FILE_TOP", 0, "File Top", ""}, @@ -1417,78 +1417,78 @@ static EnumPropertyItem move_type_items[]= { {0, NULL, 0, NULL, NULL}}; /* get cursor position in line by relative wrapped line and column positions */ -static int text_get_cursor_rel(SpaceText* st, ARegion *ar, TextLine *linein, int rell, int relc) +static int text_get_cursor_rel(SpaceText *st, ARegion *ar, TextLine *linein, int rell, int relc) { int i, j, start, end, max, chop, curs, loop, endj, found, selc; char ch; - max= wrap_width(st, ar); + max = wrap_width(st, ar); - selc= start= endj= curs= found= 0; - end= max; - chop= loop= 1; + selc = start = endj = curs = found = 0; + end = max; + chop = loop = 1; - for (i=0, j=0; loop; j+=BLI_str_utf8_size(linein->line+j)) { + for (i = 0, j = 0; loop; j += BLI_str_utf8_size(linein->line + j)) { int chars; /* Mimic replacement of tabs */ - ch= linein->line[j]; - if (ch=='\t') { - chars= st->tabnumber-i%st->tabnumber; - ch= ' '; + ch = linein->line[j]; + if (ch == '\t') { + chars = st->tabnumber - i % st->tabnumber; + ch = ' '; } - else chars= 1; + else chars = 1; while (chars--) { - if (rell==0 && i-start==relc) { + if (rell == 0 && i - start == relc) { /* current position could be wrapped to next line */ /* this should be checked when end of current line would be reached */ - selc= j; - found= 1; + selc = j; + found = 1; } - else if (i-end==relc) { - curs= j; + else if (i - end == relc) { + curs = j; } - if (i-start>=max) { + if (i - start >= max) { if (found) { /* exact cursor position was found, check if it's */ /* still on needed line (hasn't been wrapped) */ - if (selc>endj && !chop) selc= endj; - loop= 0; + if (selc > endj && !chop) selc = endj; + loop = 0; break; } - if (chop) endj= j; + if (chop) endj = j; - start= end; + start = end; end += max; - chop= 1; + chop = 1; rell--; - if (rell==0 && i-start>=relc) { - selc= curs; - loop= 0; + if (rell == 0 && i - start >= relc) { + selc = curs; + loop = 0; break; } } - else if (ch=='\0') { - if (!found) selc= linein->len; - loop= 0; + else if (ch == '\0') { + if (!found) selc = linein->len; + loop = 0; break; } - else if (ch==' ' || ch=='-') { + else if (ch == ' ' || ch == '-') { if (found) { - loop= 0; + loop = 0; break; } - if (rell==0 && i-start>=relc) { - selc= curs; - loop= 0; + if (rell == 0 && i - start >= relc) { + selc = curs; + loop = 0; break; } - end= i+1; - endj= j; - chop= 0; + end = i + 1; + endj = j; + chop = 0; } i++; } @@ -1497,87 +1497,87 @@ static int text_get_cursor_rel(SpaceText* st, ARegion *ar, TextLine *linein, int return selc; } -static int cursor_skip_find_line(SpaceText* st, ARegion *ar, - int lines, TextLine **linep, int *charp, int *rell, int *relc) +static int cursor_skip_find_line(SpaceText *st, ARegion *ar, + int lines, TextLine **linep, int *charp, int *rell, int *relc) { int offl, offc, visible_lines; wrap_offset_in_line(st, ar, *linep, *charp, &offl, &offc); - *relc= text_get_char_pos(st, (*linep)->line, *charp) + offc; - *rell= lines; + *relc = text_get_char_pos(st, (*linep)->line, *charp) + offc; + *rell = lines; /* handle current line */ - if (lines>0) { - visible_lines= text_get_visible_lines(st, ar, (*linep)->line); + if (lines > 0) { + visible_lines = text_get_visible_lines(st, ar, (*linep)->line); - if (*rell-visible_lines+offl>=0) { + if (*rell - visible_lines + offl >= 0) { if (!(*linep)->next) { - if (offl < visible_lines-1) { - *rell= visible_lines-1; + if (offl < visible_lines - 1) { + *rell = visible_lines - 1; return 1; } - *charp= (*linep)->len; + *charp = (*linep)->len; return 0; } - *rell-= visible_lines-offl; - *linep=(*linep)->next; + *rell -= visible_lines - offl; + *linep = (*linep)->next; } else { - *rell+= offl; + *rell += offl; return 1; } } else { - if (*rell+offl<=0) { + if (*rell + offl <= 0) { if (!(*linep)->prev) { if (offl) { - *rell= 0; + *rell = 0; return 1; } - *charp= 0; + *charp = 0; return 0; } - *rell+= offl; - *linep=(*linep)->prev; + *rell += offl; + *linep = (*linep)->prev; } else { - *rell+= offl; + *rell += offl; return 1; } } /* skip lines and find destination line and offsets */ while (*linep) { - visible_lines= text_get_visible_lines(st, ar, (*linep)->line); + visible_lines = text_get_visible_lines(st, ar, (*linep)->line); - if (lines<0) { /* moving top */ - if (*rell+visible_lines >= 0) { - *rell+= visible_lines; + if (lines < 0) { /* moving top */ + if (*rell + visible_lines >= 0) { + *rell += visible_lines; break; } if (!(*linep)->prev) { - *rell= 0; + *rell = 0; break; } - *rell+= visible_lines; - *linep=(*linep)->prev; + *rell += visible_lines; + *linep = (*linep)->prev; } else { /* moving bottom */ - if (*rell-visible_lines < 0) break; + if (*rell - visible_lines < 0) break; if (!(*linep)->next) { - *rell= visible_lines-1; + *rell = visible_lines - 1; break; } - *rell-= visible_lines; - *linep=(*linep)->next; + *rell -= visible_lines; + *linep = (*linep)->next; } } @@ -1586,7 +1586,7 @@ static int cursor_skip_find_line(SpaceText* st, ARegion *ar, static void txt_wrap_move_bol(SpaceText *st, ARegion *ar, short sel) { - Text *text= st->text; + Text *text = st->text; TextLine **linep; int *charp; int oldl, oldc, i, j, max, start, end, endj, chop, loop; @@ -1594,67 +1594,67 @@ static void txt_wrap_move_bol(SpaceText *st, ARegion *ar, short sel) text_update_character_width(st); - if (sel) linep= &text->sell, charp= &text->selc; - else linep= &text->curl, charp= &text->curc; + if (sel) linep = &text->sell, charp = &text->selc; + else linep = &text->curl, charp = &text->curc; - oldc= *charp; - oldl= txt_get_span(text->lines.first, *linep); + oldc = *charp; + oldl = txt_get_span(text->lines.first, *linep); - max= wrap_width(st, ar); + max = wrap_width(st, ar); - start= endj= 0; - end= max; - chop= loop= 1; - *charp= 0; + start = endj = 0; + end = max; + chop = loop = 1; + *charp = 0; - for (i=0, j=0; loop; j+=BLI_str_utf8_size((*linep)->line+j)) { + for (i = 0, j = 0; loop; j += BLI_str_utf8_size((*linep)->line + j)) { int chars; /* Mimic replacement of tabs */ - ch= (*linep)->line[j]; - if (ch=='\t') { - chars= st->tabnumber-i%st->tabnumber; - ch= ' '; + ch = (*linep)->line[j]; + if (ch == '\t') { + chars = st->tabnumber - i % st->tabnumber; + ch = ' '; } - else chars= 1; + else chars = 1; while (chars--) { - if (i-start>=max) { - *charp= endj; + if (i - start >= max) { + *charp = endj; - if (j>=oldc) { - if (ch=='\0') *charp= txt_utf8_index_to_offset((*linep)->line, start); - loop= 0; + if (j >= oldc) { + if (ch == '\0') *charp = txt_utf8_index_to_offset((*linep)->line, start); + loop = 0; break; } - if (chop) endj= j; + if (chop) endj = j; - start= end; + start = end; end += max; - chop= 1; + chop = 1; } - else if (ch==' ' || ch=='-' || ch=='\0') { - if (j>=oldc) { - *charp= txt_utf8_index_to_offset((*linep)->line, start); - loop= 0; + else if (ch == ' ' || ch == '-' || ch == '\0') { + if (j >= oldc) { + *charp = txt_utf8_index_to_offset((*linep)->line, start); + loop = 0; break; } - end= i+1; - endj= j+1; - chop= 0; + end = i + 1; + endj = j + 1; + chop = 0; } i++; } } if (!sel) txt_pop_sel(text); - txt_undo_add_toop(text, sel?UNDO_STO:UNDO_CTO, oldl, oldc, oldl, *charp); + txt_undo_add_toop(text, sel ? UNDO_STO : UNDO_CTO, oldl, oldc, oldl, *charp); } static void txt_wrap_move_eol(SpaceText *st, ARegion *ar, short sel) { - Text *text= st->text; + Text *text = st->text; TextLine **linep; int *charp; int oldl, oldc, i, j, max, start, end, endj, chop, loop; @@ -1662,134 +1662,134 @@ static void txt_wrap_move_eol(SpaceText *st, ARegion *ar, short sel) text_update_character_width(st); - if (sel) linep= &text->sell, charp= &text->selc; - else linep= &text->curl, charp= &text->curc; + if (sel) linep = &text->sell, charp = &text->selc; + else linep = &text->curl, charp = &text->curc; - oldc= *charp; - oldl= txt_get_span(text->lines.first, *linep); + oldc = *charp; + oldl = txt_get_span(text->lines.first, *linep); - max= wrap_width(st, ar); + max = wrap_width(st, ar); - start= endj= 0; - end= max; - chop= loop= 1; - *charp= 0; + start = endj = 0; + end = max; + chop = loop = 1; + *charp = 0; - for (i=0, j=0; loop; j+=BLI_str_utf8_size((*linep)->line+j)) { + for (i = 0, j = 0; loop; j += BLI_str_utf8_size((*linep)->line + j)) { int chars; /* Mimic replacement of tabs */ - ch= (*linep)->line[j]; - if (ch=='\t') { - chars= st->tabnumber-i%st->tabnumber; - ch= ' '; + ch = (*linep)->line[j]; + if (ch == '\t') { + chars = st->tabnumber - i % st->tabnumber; + ch = ' '; } - else chars= 1; + else chars = 1; while (chars--) { - if (i-start>=max) { - if (chop) endj= BLI_str_prev_char_utf8((*linep)->line+j)-(*linep)->line; + if (i - start >= max) { + if (chop) endj = BLI_str_prev_char_utf8((*linep)->line + j) - (*linep)->line; - if (endj>=oldc) { - if (ch=='\0') *charp= (*linep)->len; - else *charp= endj; - loop= 0; + if (endj >= oldc) { + if (ch == '\0') *charp = (*linep)->len; + else *charp = endj; + loop = 0; break; } - start= end; + start = end; end += max; - chop= 1; + chop = 1; } - else if (ch=='\0') { - *charp= (*linep)->len; - loop= 0; + else if (ch == '\0') { + *charp = (*linep)->len; + loop = 0; break; } - else if (ch==' ' || ch=='-') { - end= i+1; - endj= j; - chop= 0; + else if (ch == ' ' || ch == '-') { + end = i + 1; + endj = j; + chop = 0; } i++; } } if (!sel) txt_pop_sel(text); - txt_undo_add_toop(text, sel?UNDO_STO:UNDO_CTO, oldl, oldc, oldl, *charp); + txt_undo_add_toop(text, sel ? UNDO_STO : UNDO_CTO, oldl, oldc, oldl, *charp); } static void txt_wrap_move_up(SpaceText *st, ARegion *ar, short sel) { - Text *text= st->text; + Text *text = st->text; TextLine **linep; int *charp; int oldl, oldc, offl, offc, col, newl; text_update_character_width(st); - if (sel) linep= &text->sell, charp= &text->selc; - else linep= &text->curl, charp= &text->curc; + if (sel) linep = &text->sell, charp = &text->selc; + else linep = &text->curl, charp = &text->curc; /* store previous position */ - oldc= *charp; - newl= oldl= txt_get_span(text->lines.first, *linep); + oldc = *charp; + newl = oldl = txt_get_span(text->lines.first, *linep); wrap_offset_in_line(st, ar, *linep, *charp, &offl, &offc); - col= text_get_char_pos(st, (*linep)->line, *charp) + offc; + col = text_get_char_pos(st, (*linep)->line, *charp) + offc; if (offl) { - *charp= text_get_cursor_rel(st, ar, *linep, offl-1, col); - newl= BLI_findindex(&text->lines, linep); + *charp = text_get_cursor_rel(st, ar, *linep, offl - 1, col); + newl = BLI_findindex(&text->lines, linep); } else { if ((*linep)->prev) { int visible_lines; - *linep= (*linep)->prev; - visible_lines= text_get_visible_lines(st, ar, (*linep)->line); - *charp= text_get_cursor_rel(st, ar, *linep, visible_lines-1, col); + *linep = (*linep)->prev; + visible_lines = text_get_visible_lines(st, ar, (*linep)->line); + *charp = text_get_cursor_rel(st, ar, *linep, visible_lines - 1, col); newl--; } - else *charp= 0; + else *charp = 0; } if (!sel) txt_pop_sel(text); - txt_undo_add_toop(text, sel?UNDO_STO:UNDO_CTO, oldl, oldc, newl, *charp); + txt_undo_add_toop(text, sel ? UNDO_STO : UNDO_CTO, oldl, oldc, newl, *charp); } static void txt_wrap_move_down(SpaceText *st, ARegion *ar, short sel) { - Text *text= st->text; + Text *text = st->text; TextLine **linep; int *charp; int oldl, oldc, offl, offc, col, newl, visible_lines; text_update_character_width(st); - if (sel) linep= &text->sell, charp= &text->selc; - else linep= &text->curl, charp= &text->curc; + if (sel) linep = &text->sell, charp = &text->selc; + else linep = &text->curl, charp = &text->curc; /* store previous position */ - oldc= *charp; - newl= oldl= txt_get_span(text->lines.first, *linep); + oldc = *charp; + newl = oldl = txt_get_span(text->lines.first, *linep); wrap_offset_in_line(st, ar, *linep, *charp, &offl, &offc); - col= text_get_char_pos(st, (*linep)->line, *charp) + offc; - visible_lines= text_get_visible_lines(st, ar, (*linep)->line); - if (offllines, linep); + col = text_get_char_pos(st, (*linep)->line, *charp) + offc; + visible_lines = text_get_visible_lines(st, ar, (*linep)->line); + if (offl < visible_lines - 1) { + *charp = text_get_cursor_rel(st, ar, *linep, offl + 1, col); + newl = BLI_findindex(&text->lines, linep); } else { if ((*linep)->next) { - *linep= (*linep)->next; - *charp= text_get_cursor_rel(st, ar, *linep, 0, col); + *linep = (*linep)->next; + *charp = text_get_cursor_rel(st, ar, *linep, 0, col); newl++; } - else *charp= (*linep)->len; + else *charp = (*linep)->len; } if (!sel) txt_pop_sel(text); - txt_undo_add_toop(text, sel?UNDO_STO:UNDO_CTO, oldl, oldc, newl, *charp); + txt_undo_add_toop(text, sel ? UNDO_STO : UNDO_CTO, oldl, oldc, newl, *charp); } /* Moves the cursor vertically by the specified number of lines. @@ -1798,51 +1798,51 @@ static void txt_wrap_move_down(SpaceText *st, ARegion *ar, short sel) * * This is to replace screen_skip for PageUp/Down operations. */ -static void cursor_skip(SpaceText* st, ARegion *ar, Text *text, int lines, int sel) +static void cursor_skip(SpaceText *st, ARegion *ar, Text *text, int lines, int sel) { TextLine **linep; int oldl, oldc, *charp; - if (sel) linep= &text->sell, charp= &text->selc; - else linep= &text->curl, charp= &text->curc; - oldl= txt_get_span(text->lines.first, *linep); - oldc= *charp; + if (sel) linep = &text->sell, charp = &text->selc; + else linep = &text->curl, charp = &text->curc; + oldl = txt_get_span(text->lines.first, *linep); + oldc = *charp; if (st && ar && st->wordwrap) { int rell, relc; /* find line and offsets inside it needed to set cursor position */ if (cursor_skip_find_line(st, ar, lines, linep, charp, &rell, &relc)) - *charp= text_get_cursor_rel (st, ar, *linep, rell, relc); + *charp = text_get_cursor_rel(st, ar, *linep, rell, relc); } else { - while (lines>0 && (*linep)->next) { - *linep= (*linep)->next; + while (lines > 0 && (*linep)->next) { + *linep = (*linep)->next; lines--; } - while (lines<0 && (*linep)->prev) { - *linep= (*linep)->prev; + while (lines < 0 && (*linep)->prev) { + *linep = (*linep)->prev; lines++; } } - if (*charp > (*linep)->len) *charp= (*linep)->len; + if (*charp > (*linep)->len) *charp = (*linep)->len; if (!sel) txt_pop_sel(text); - txt_undo_add_toop(text, sel?UNDO_STO:UNDO_CTO, oldl, oldc, txt_get_span(text->lines.first, *linep), *charp); + txt_undo_add_toop(text, sel ? UNDO_STO : UNDO_CTO, oldl, oldc, txt_get_span(text->lines.first, *linep), *charp); } static int text_move_cursor(bContext *C, int type, int select) { - SpaceText *st= CTX_wm_space_text(C); - Text *text= CTX_data_edit_text(C); - ARegion *ar= CTX_wm_region(C); + SpaceText *st = CTX_wm_space_text(C); + Text *text = CTX_data_edit_text(C); + ARegion *ar = CTX_wm_region(C); /* ensure we have the right region, it's optional */ if (ar && ar->regiontype != RGN_TYPE_WINDOW) - ar= NULL; + ar = NULL; - switch(type) { + switch (type) { case LINE_BEGIN: if (st && st->wordwrap && ar) txt_wrap_move_bol(st, ar, select); else txt_move_bol(text, select); @@ -1899,14 +1899,14 @@ static int text_move_cursor(bContext *C, int type, int select) } text_update_cursor_moved(C); - WM_event_add_notifier(C, NC_TEXT|ND_CURSOR, text); + WM_event_add_notifier(C, NC_TEXT | ND_CURSOR, text); return OPERATOR_FINISHED; } static int text_move_exec(bContext *C, wmOperator *op) { - int type= RNA_enum_get(op->ptr, "type"); + int type = RNA_enum_get(op->ptr, "type"); return text_move_cursor(C, type, 0); } @@ -1930,7 +1930,7 @@ void TEXT_OT_move(wmOperatorType *ot) static int text_move_select_exec(bContext *C, wmOperator *op) { - int type= RNA_enum_get(op->ptr, "type"); + int type = RNA_enum_get(op->ptr, "type"); return text_move_cursor(C, type, 1); } @@ -1954,26 +1954,26 @@ void TEXT_OT_move_select(wmOperatorType *ot) static int text_jump_exec(bContext *C, wmOperator *op) { - Text *text= CTX_data_edit_text(C); - int line= RNA_int_get(op->ptr, "line"); - short nlines= txt_get_span(text->lines.first, text->lines.last)+1; + Text *text = CTX_data_edit_text(C); + int line = RNA_int_get(op->ptr, "line"); + short nlines = txt_get_span(text->lines.first, text->lines.last) + 1; if (line < 1) txt_move_toline(text, 1, 0); else if (line > nlines) - txt_move_toline(text, nlines-1, 0); + txt_move_toline(text, nlines - 1, 0); else - txt_move_toline(text, line-1, 0); + txt_move_toline(text, line - 1, 0); text_update_cursor_moved(C); - WM_event_add_notifier(C, NC_TEXT|ND_CURSOR, text); + WM_event_add_notifier(C, NC_TEXT | ND_CURSOR, text); return OPERATOR_FINISHED; } static int text_jump_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { - return WM_operator_props_dialog_popup(C,op,200,100); + return WM_operator_props_dialog_popup(C, op, 200, 100); } @@ -1995,7 +1995,7 @@ void TEXT_OT_jump(wmOperatorType *ot) /******************* delete operator **********************/ -static EnumPropertyItem delete_type_items[]= { +static EnumPropertyItem delete_type_items[] = { {DEL_NEXT_CHAR, "NEXT_CHARACTER", 0, "Next Character", ""}, {DEL_PREV_CHAR, "PREVIOUS_CHARACTER", 0, "Previous Character", ""}, {DEL_NEXT_WORD, "NEXT_WORD", 0, "Next Word", ""}, @@ -2004,8 +2004,8 @@ static EnumPropertyItem delete_type_items[]= { static int text_delete_exec(bContext *C, wmOperator *op) { - Text *text= CTX_data_edit_text(C); - int type= RNA_enum_get(op->ptr, "type"); + Text *text = CTX_data_edit_text(C); + int type = RNA_enum_get(op->ptr, "type"); text_drawcache_tag_update(CTX_wm_space_text(C), 0); @@ -2021,7 +2021,7 @@ static int text_delete_exec(bContext *C, wmOperator *op) text_update_line_edited(text->curl); text_update_cursor_moved(C); - WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text); + WM_event_add_notifier(C, NC_TEXT | NA_EDITED, text); /* run the script while editing, evil but useful */ if (CTX_wm_space_text(C)->live_edit) @@ -2049,11 +2049,11 @@ void TEXT_OT_delete(wmOperatorType *ot) static int text_toggle_overwrite_exec(bContext *C, wmOperator *UNUSED(op)) { - SpaceText *st= CTX_wm_space_text(C); + SpaceText *st = CTX_wm_space_text(C); - st->overwrite= !st->overwrite; + st->overwrite = !st->overwrite; - WM_event_add_notifier(C, NC_TEXT|ND_CURSOR, st->text); + WM_event_add_notifier(C, NC_TEXT | ND_CURSOR, st->text); return OPERATOR_FINISHED; } @@ -2079,11 +2079,11 @@ static void txt_screen_skip(SpaceText *st, ARegion *ar, int lines) st->top += lines; - last= text_get_total_lines(st, ar); - last= last - (st->viewlines/2); + last = text_get_total_lines(st, ar); + last = last - (st->viewlines / 2); - if (st->top>last) st->top= last; - if (st->top<0) st->top= 0; + if (st->top > last) st->top = last; + if (st->top < 0) st->top = 0; } /* quick enum for tsc->zone (scroller handles) */ @@ -2111,15 +2111,15 @@ static int text_scroll_poll(bContext *C) static int text_scroll_exec(bContext *C, wmOperator *op) { - SpaceText *st= CTX_wm_space_text(C); - ARegion *ar= CTX_wm_region(C); + SpaceText *st = CTX_wm_space_text(C); + ARegion *ar = CTX_wm_region(C); - int lines= RNA_int_get(op->ptr, "lines"); + int lines = RNA_int_get(op->ptr, "lines"); if (lines == 0) return OPERATOR_CANCELLED; - txt_screen_skip(st, ar, lines*U.wheellinescroll); + txt_screen_skip(st, ar, lines * U.wheellinescroll); ED_area_tag_redraw(CTX_wm_area(C)); @@ -2128,56 +2128,56 @@ static int text_scroll_exec(bContext *C, wmOperator *op) static void text_scroll_apply(bContext *C, wmOperator *op, wmEvent *event) { - SpaceText *st= CTX_wm_space_text(C); - ARegion *ar= CTX_wm_region(C); - TextScroll *tsc= op->customdata; - int mval[2]= {event->x, event->y}; + SpaceText *st = CTX_wm_space_text(C); + ARegion *ar = CTX_wm_region(C); + TextScroll *tsc = op->customdata; + int mval[2] = {event->x, event->y}; short txtdelta[2] = {0, 0}; text_update_character_width(st); if (tsc->first) { - tsc->old[0]= mval[0]; - tsc->old[1]= mval[1]; - tsc->first= 0; + tsc->old[0] = mval[0]; + tsc->old[1] = mval[1]; + tsc->first = 0; } - tsc->delta[0]+= mval[0] - tsc->old[0]; - tsc->delta[1]+= mval[1] - tsc->old[1]; + tsc->delta[0] += mval[0] - tsc->old[0]; + tsc->delta[1] += mval[1] - tsc->old[1]; if (!tsc->scrollbar) { - txtdelta[0]= -tsc->delta[0]/st->cwidth; - txtdelta[1]= tsc->delta[1]/st->lheight; + txtdelta[0] = -tsc->delta[0] / st->cwidth; + txtdelta[1] = tsc->delta[1] / st->lheight; - tsc->delta[0]%= st->cwidth; - tsc->delta[1]%= st->lheight; + tsc->delta[0] %= st->cwidth; + tsc->delta[1] %= st->lheight; } else { - txtdelta[1]= -tsc->delta[1]*st->pix_per_line; - tsc->delta[1]+= txtdelta[1]/st->pix_per_line; + txtdelta[1] = -tsc->delta[1] * st->pix_per_line; + tsc->delta[1] += txtdelta[1] / st->pix_per_line; } if (txtdelta[0] || txtdelta[1]) { txt_screen_skip(st, ar, txtdelta[1]); if (st->wordwrap) { - st->left= 0; + st->left = 0; } else { - st->left+= txtdelta[0]; - if (st->left<0) st->left= 0; + st->left += txtdelta[0]; + if (st->left < 0) st->left = 0; } ED_area_tag_redraw(CTX_wm_area(C)); } - tsc->old[0]= mval[0]; - tsc->old[1]= mval[1]; + tsc->old[0] = mval[0]; + tsc->old[1] = mval[1]; } static void scroll_exit(bContext *C, wmOperator *op) { - SpaceText *st= CTX_wm_space_text(C); + SpaceText *st = CTX_wm_space_text(C); st->flags &= ~ST_SCROLL_SELECT; MEM_freeN(op->customdata); @@ -2185,11 +2185,11 @@ static void scroll_exit(bContext *C, wmOperator *op) static int text_scroll_modal(bContext *C, wmOperator *op, wmEvent *event) { - TextScroll *tsc= op->customdata; - SpaceText *st= CTX_wm_space_text(C); - ARegion *ar= CTX_wm_region(C); + TextScroll *tsc = op->customdata; + SpaceText *st = CTX_wm_space_text(C); + ARegion *ar = CTX_wm_region(C); - switch(event->type) { + switch (event->type) { case MOUSEMOVE: if (tsc->zone == SCROLLHANDLE_BAR) text_scroll_apply(C, op, event); @@ -2200,10 +2200,10 @@ static int text_scroll_modal(bContext *C, wmOperator *op, wmEvent *event) if (ELEM(tsc->zone, SCROLLHANDLE_MIN_OUTSIDE, SCROLLHANDLE_MAX_OUTSIDE)) { int last; - st->top+= st->viewlines * (tsc->zone==SCROLLHANDLE_MIN_OUTSIDE ? 1 : -1); + st->top += st->viewlines * (tsc->zone == SCROLLHANDLE_MIN_OUTSIDE ? 1 : -1); - last= text_get_total_lines(st, ar); - last= last - (st->viewlines/2); + last = text_get_total_lines(st, ar); + last = last - (st->viewlines / 2); CLAMP(st->top, 0, last); @@ -2225,18 +2225,18 @@ static int text_scroll_cancel(bContext *C, wmOperator *op) static int text_scroll_invoke(bContext *C, wmOperator *op, wmEvent *event) { - SpaceText *st= CTX_wm_space_text(C); + SpaceText *st = CTX_wm_space_text(C); TextScroll *tsc; if (RNA_struct_property_is_set(op->ptr, "lines")) return text_scroll_exec(C, op); - tsc= MEM_callocN(sizeof(TextScroll), "TextScroll"); - tsc->first= 1; - tsc->zone= SCROLLHANDLE_BAR; - op->customdata= tsc; + tsc = MEM_callocN(sizeof(TextScroll), "TextScroll"); + tsc->first = 1; + tsc->zone = SCROLLHANDLE_BAR; + op->customdata = tsc; - st->flags|= ST_SCROLL_SELECT; + st->flags |= ST_SCROLL_SELECT; if (event->type == MOUSEPAN) { text_update_character_width(st); @@ -2244,8 +2244,8 @@ static int text_scroll_invoke(bContext *C, wmOperator *op, wmEvent *event) tsc->old[0] = event->x; tsc->old[1] = event->y; /* Sensitivity of scroll set to 4pix per line/char */ - tsc->delta[0] = (event->x - event->prevx)*st->cwidth/4; - tsc->delta[1] = (event->y - event->prevy)*st->lheight/4; + tsc->delta[0] = (event->x - event->prevx) * st->cwidth / 4; + tsc->delta[1] = (event->y - event->prevy) * st->lheight / 4; tsc->first = 0; tsc->scrollbar = 0; text_scroll_apply(C, op, event); @@ -2276,7 +2276,7 @@ void TEXT_OT_scroll(wmOperatorType *ot) ot->poll = text_scroll_poll; /* flags */ - ot->flag = OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER; + ot->flag = OPTYPE_BLOCKING | OPTYPE_GRAB_POINTER; /* properties */ RNA_def_int(ot->srna, "lines", 1, INT_MIN, INT_MAX, "Lines", "Number of lines to scroll", -100, 100); @@ -2287,9 +2287,9 @@ void TEXT_OT_scroll(wmOperatorType *ot) static int text_region_scroll_poll(bContext *C) { /* same as text_region_edit_poll except it works on libdata too */ - SpaceText *st= CTX_wm_space_text(C); - Text *text= CTX_data_edit_text(C); - ARegion *ar= CTX_wm_region(C); + SpaceText *st = CTX_wm_space_text(C); + Text *text = CTX_data_edit_text(C); + ARegion *ar = CTX_wm_region(C); if (!st || !text) return 0; @@ -2302,24 +2302,24 @@ static int text_region_scroll_poll(bContext *C) static int text_scroll_bar_invoke(bContext *C, wmOperator *op, wmEvent *event) { - SpaceText *st= CTX_wm_space_text(C); - ARegion *ar= CTX_wm_region(C); + SpaceText *st = CTX_wm_space_text(C); + ARegion *ar = CTX_wm_region(C); TextScroll *tsc; - const int *mval= event->mval; - int zone= -1; + const int *mval = event->mval; + int zone = -1; if (RNA_struct_property_is_set(op->ptr, "lines")) return text_scroll_exec(C, op); /* verify we are in the right zone */ - if (mval[0]>st->txtbar.xmin && mval[0]txtbar.xmax) { - if (mval[1]>=st->txtbar.ymin && mval[1]<=st->txtbar.ymax) { + if (mval[0] > st->txtbar.xmin && mval[0] < st->txtbar.xmax) { + if (mval[1] >= st->txtbar.ymin && mval[1] <= st->txtbar.ymax) { /* mouse inside scroll handle */ zone = SCROLLHANDLE_BAR; } - else if (mval[1]>TXT_SCROLL_SPACE && mval[1]winy-TXT_SCROLL_SPACE) { - if (mval[1]txtbar.ymin) zone= SCROLLHANDLE_MIN_OUTSIDE; - else zone= SCROLLHANDLE_MAX_OUTSIDE; + else if (mval[1] > TXT_SCROLL_SPACE && mval[1] < ar->winy - TXT_SCROLL_SPACE) { + if (mval[1] < st->txtbar.ymin) zone = SCROLLHANDLE_MIN_OUTSIDE; + else zone = SCROLLHANDLE_MAX_OUTSIDE; } } @@ -2328,12 +2328,12 @@ static int text_scroll_bar_invoke(bContext *C, wmOperator *op, wmEvent *event) return OPERATOR_PASS_THROUGH; } - tsc= MEM_callocN(sizeof(TextScroll), "TextScroll"); - tsc->first= 1; - tsc->scrollbar= 1; - tsc->zone= zone; - op->customdata= tsc; - st->flags|= ST_SCROLL_SELECT; + tsc = MEM_callocN(sizeof(TextScroll), "TextScroll"); + tsc->first = 1; + tsc->scrollbar = 1; + tsc->zone = zone; + op->customdata = tsc; + st->flags |= ST_SCROLL_SELECT; /* jump scroll, works in v2d but needs to be added here too :S */ if (event->type == MIDDLEMOUSE) { @@ -2343,7 +2343,7 @@ static int text_scroll_bar_invoke(bContext *C, wmOperator *op, wmEvent *event) tsc->delta[0] = 0; tsc->delta[1] = 0; tsc->first = 0; - tsc->zone= SCROLLHANDLE_BAR; + tsc->zone = SCROLLHANDLE_BAR; text_scroll_apply(C, op, event); } @@ -2387,9 +2387,9 @@ static int flatten_len(SpaceText *st, const char *str) { int i, total = 0; - for (i = 0; str[i]; i += BLI_str_utf8_size(str+i)) { - if (str[i]=='\t') { - total += st->tabnumber - total%st->tabnumber; + for (i = 0; str[i]; i += BLI_str_utf8_size(str + i)) { + if (str[i] == '\t') { + total += st->tabnumber - total % st->tabnumber; } else total++; } @@ -2400,9 +2400,9 @@ static int flatten_len(SpaceText *st, const char *str) static int flatten_index_to_offset(SpaceText *st, const char *str, int index) { int i, j; - for (i= 0, j= 0; i < index; j += BLI_str_utf8_size(str+j)) - if (str[j]=='\t') - i += st->tabnumber - i%st->tabnumber; + for (i = 0, j = 0; i < index; j += BLI_str_utf8_size(str + j)) + if (str[j] == '\t') + i += st->tabnumber - i % st->tabnumber; else i++; @@ -2416,7 +2416,7 @@ static TextLine *get_first_visible_line(SpaceText *st, ARegion *ar, int *y) for (i = st->top; i > 0 && linep; ) { int lines = text_get_visible_lines(st, ar, linep->line); - if (i-lines < 0) { + if (i - lines < 0) { *y += i; break; } @@ -2444,13 +2444,13 @@ static void text_cursor_set_to_pos_wrapped(SpaceText *st, ARegion *ar, int x, in int j = 0, curs = 0, endj = 0; /* mem */ int chop = 1; /* flags */ - for (; loop; j += BLI_str_utf8_size(linep->line+j)) { + for (; loop; j += BLI_str_utf8_size(linep->line + j)) { int chars; /* Mimic replacement of tabs */ ch = linep->line[j]; if (ch == '\t') { - chars = st->tabnumber - i%st->tabnumber; + chars = st->tabnumber - i % st->tabnumber; ch = ' '; } else chars = 1; @@ -2463,10 +2463,10 @@ static void text_cursor_set_to_pos_wrapped(SpaceText *st, ARegion *ar, int x, in break; /* Exactly at the cursor */ } - else if (y == 0 && i-start == x) { + else if (y == 0 && i - start == x) { /* current position could be wrapped to next line */ /* this should be checked when end of current line would be reached */ - charp = curs= j; + charp = curs = j; found = 1; /* Prepare curs for next wrap */ } @@ -2477,7 +2477,7 @@ static void text_cursor_set_to_pos_wrapped(SpaceText *st, ARegion *ar, int x, in if (found) { /* exact cursor position was found, check if it's */ /* still on needed line (hasn't been wrapped) */ - if (charp > endj && !chop && ch!='\0') charp = endj; + if (charp > endj && !chop && ch != '\0') charp = endj; loop = 0; break; } @@ -2490,7 +2490,7 @@ static void text_cursor_set_to_pos_wrapped(SpaceText *st, ARegion *ar, int x, in y--; chop = 1; - if (y == 0 && i-start >= x) { + if (y == 0 && i - start >= x) { charp = curs; loop = 0; break; @@ -2502,7 +2502,7 @@ static void text_cursor_set_to_pos_wrapped(SpaceText *st, ARegion *ar, int x, in break; } - if (y == 0 && i-start >= x) { + if (y == 0 && i - start >= x) { charp = curs; loop = 0; break; @@ -2542,14 +2542,14 @@ static void text_cursor_set_to_pos_wrapped(SpaceText *st, ARegion *ar, int x, in static void text_cursor_set_to_pos(SpaceText *st, ARegion *ar, int x, int y, int sel) { - Text *text= st->text; + Text *text = st->text; text_update_character_width(st); - y= (ar->winy - 2 - y)/st->lheight; + y = (ar->winy - 2 - y) / st->lheight; - if (st->showlinenrs) x-= TXT_OFFSET+TEXTXLOC; - else x-= TXT_OFFSET; + if (st->showlinenrs) x -= TXT_OFFSET + TEXTXLOC; + else x -= TXT_OFFSET; - if (x<0) x= 0; + if (x < 0) x = 0; x = text_pixel_x_to_index(st, x) + st->left; if (st->wordwrap) { @@ -2560,67 +2560,67 @@ static void text_cursor_set_to_pos(SpaceText *st, ARegion *ar, int x, int y, int int *charp; int w; - if (sel) { linep= &text->sell; charp= &text->selc; } - else { linep= &text->curl; charp= &text->curc; } + if (sel) { linep = &text->sell; charp = &text->selc; } + else { linep = &text->curl; charp = &text->curc; } - y-= txt_get_span(text->lines.first, *linep) - st->top; + y -= txt_get_span(text->lines.first, *linep) - st->top; - if (y>0) { - while (y-- != 0) if ((*linep)->next) *linep= (*linep)->next; + if (y > 0) { + while (y-- != 0) if ((*linep)->next) *linep = (*linep)->next; } - else if (y<0) { - while (y++ != 0) if ((*linep)->prev) *linep= (*linep)->prev; + else if (y < 0) { + while (y++ != 0) if ((*linep)->prev) *linep = (*linep)->prev; } - w= flatten_len(st, (*linep)->line); - if (xline, x); - else *charp= (*linep)->len; + w = flatten_len(st, (*linep)->line); + if (x < w) *charp = flatten_index_to_offset(st, (*linep)->line, x); + else *charp = (*linep)->len; } if (!sel) txt_pop_sel(text); } static void text_cursor_set_apply(bContext *C, wmOperator *op, wmEvent *event) { - SpaceText *st= CTX_wm_space_text(C); - ARegion *ar= CTX_wm_region(C); - SetSelection *ssel= op->customdata; + SpaceText *st = CTX_wm_space_text(C); + ARegion *ar = CTX_wm_region(C); + SetSelection *ssel = op->customdata; - if (event->mval[1]<0 || event->mval[1]>ar->winy) { - int d= (ssel->old[1]-event->mval[1])*st->pix_per_line; + if (event->mval[1] < 0 || event->mval[1] > ar->winy) { + int d = (ssel->old[1] - event->mval[1]) * st->pix_per_line; if (d) txt_screen_skip(st, ar, d); - text_cursor_set_to_pos(st, ar, event->mval[0], event->mval[1]<0?0:ar->winy, 1); + text_cursor_set_to_pos(st, ar, event->mval[0], event->mval[1] < 0 ? 0 : ar->winy, 1); text_update_cursor_moved(C); - WM_event_add_notifier(C, NC_TEXT|ND_CURSOR, st->text); + WM_event_add_notifier(C, NC_TEXT | ND_CURSOR, st->text); } - else if (!st->wordwrap && (event->mval[0]<0 || event->mval[0]>ar->winx)) { - if (event->mval[0]>ar->winx) st->left++; - else if (event->mval[0]<0 && st->left>0) st->left--; + else if (!st->wordwrap && (event->mval[0] < 0 || event->mval[0] > ar->winx)) { + if (event->mval[0] > ar->winx) st->left++; + else if (event->mval[0] < 0 && st->left > 0) st->left--; text_cursor_set_to_pos(st, ar, event->mval[0], event->mval[1], 1); text_update_cursor_moved(C); - WM_event_add_notifier(C, NC_TEXT|ND_CURSOR, st->text); + WM_event_add_notifier(C, NC_TEXT | ND_CURSOR, st->text); // XXX PIL_sleep_ms(10); } else { text_cursor_set_to_pos(st, ar, event->mval[0], event->mval[1], 1); text_update_cursor_moved(C); - WM_event_add_notifier(C, NC_TEXT|ND_CURSOR, st->text); + WM_event_add_notifier(C, NC_TEXT | ND_CURSOR, st->text); - ssel->old[0]= event->mval[0]; - ssel->old[1]= event->mval[1]; + ssel->old[0] = event->mval[0]; + ssel->old[1] = event->mval[1]; } } static void text_cursor_set_exit(bContext *C, wmOperator *op) { - SpaceText *st= CTX_wm_space_text(C); - Text *text= st->text; - SetSelection *ssel= op->customdata; + SpaceText *st = CTX_wm_space_text(C); + Text *text = st->text; + SetSelection *ssel = op->customdata; int linep2, charp2; char *buffer; @@ -2630,35 +2630,35 @@ static void text_cursor_set_exit(bContext *C, wmOperator *op) MEM_freeN(buffer); } - linep2= txt_get_span(st->text->lines.first, st->text->sell); - charp2= st->text->selc; + linep2 = txt_get_span(st->text->lines.first, st->text->sell); + charp2 = st->text->selc; - if (ssel->sell!=linep2 || ssel->selc!=charp2) + if (ssel->sell != linep2 || ssel->selc != charp2) txt_undo_add_toop(st->text, UNDO_STO, ssel->sell, ssel->selc, linep2, charp2); text_update_cursor_moved(C); - WM_event_add_notifier(C, NC_TEXT|ND_CURSOR, st->text); + WM_event_add_notifier(C, NC_TEXT | ND_CURSOR, st->text); MEM_freeN(ssel); } static int text_set_selection_invoke(bContext *C, wmOperator *op, wmEvent *event) { - SpaceText *st= CTX_wm_space_text(C); + SpaceText *st = CTX_wm_space_text(C); SetSelection *ssel; - if (event->mval[0]>=st->txtbar.xmin) + if (event->mval[0] >= st->txtbar.xmin) return OPERATOR_PASS_THROUGH; - op->customdata= MEM_callocN(sizeof(SetSelection), "SetCursor"); - ssel= op->customdata; - ssel->selecting= RNA_boolean_get(op->ptr, "select"); + op->customdata = MEM_callocN(sizeof(SetSelection), "SetCursor"); + ssel = op->customdata; + ssel->selecting = RNA_boolean_get(op->ptr, "select"); - ssel->old[0]= event->mval[0]; - ssel->old[1]= event->mval[1]; + ssel->old[0] = event->mval[0]; + ssel->old[1] = event->mval[1]; - ssel->sell= txt_get_span(st->text->lines.first, st->text->sell); - ssel->selc= st->text->selc; + ssel->sell = txt_get_span(st->text->lines.first, st->text->sell); + ssel->selc = st->text->selc; WM_event_add_modal_handler(C, op); @@ -2669,7 +2669,7 @@ static int text_set_selection_invoke(bContext *C, wmOperator *op, wmEvent *event static int text_set_selection_modal(bContext *C, wmOperator *op, wmEvent *event) { - switch(event->type) { + switch (event->type) { case LEFTMOUSE: case MIDDLEMOUSE: case RIGHTMOUSE: @@ -2710,31 +2710,31 @@ void TEXT_OT_selection_set(wmOperatorType *ot) static int text_cursor_set_exec(bContext *C, wmOperator *op) { - SpaceText *st= CTX_wm_space_text(C); - Text *text= st->text; - ARegion *ar= CTX_wm_region(C); - int x= RNA_int_get(op->ptr, "x"); - int y= RNA_int_get(op->ptr, "y"); + SpaceText *st = CTX_wm_space_text(C); + Text *text = st->text; + ARegion *ar = CTX_wm_region(C); + int x = RNA_int_get(op->ptr, "x"); + int y = RNA_int_get(op->ptr, "y"); int oldl, oldc; - oldl= txt_get_span(text->lines.first, text->curl); - oldc= text->curc; + oldl = txt_get_span(text->lines.first, text->curl); + oldc = text->curc; text_cursor_set_to_pos(st, ar, x, y, 0); txt_undo_add_toop(text, UNDO_CTO, oldl, oldc, txt_get_span(text->lines.first, text->curl), text->curc); text_update_cursor_moved(C); - WM_event_add_notifier(C, NC_TEXT|ND_CURSOR, st->text); + WM_event_add_notifier(C, NC_TEXT | ND_CURSOR, st->text); return OPERATOR_PASS_THROUGH; } static int text_cursor_set_invoke(bContext *C, wmOperator *op, wmEvent *event) { - SpaceText *st= CTX_wm_space_text(C); + SpaceText *st = CTX_wm_space_text(C); - if (event->mval[0]>=st->txtbar.xmin) + if (event->mval[0] >= st->txtbar.xmin) return OPERATOR_PASS_THROUGH; RNA_int_set(op->ptr, "x", event->mval[0]); @@ -2764,37 +2764,37 @@ void TEXT_OT_cursor_set(wmOperatorType *ot) static int text_line_number_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event) { - SpaceText *st= CTX_wm_space_text(C); - Text *text= CTX_data_edit_text(C); - ARegion *ar= CTX_wm_region(C); - const int *mval= event->mval; + SpaceText *st = CTX_wm_space_text(C); + Text *text = CTX_data_edit_text(C); + ARegion *ar = CTX_wm_region(C); + const int *mval = event->mval; double time; - static int jump_to= 0; - static double last_jump= 0; + static int jump_to = 0; + static double last_jump = 0; text_update_character_width(st); if (!st->showlinenrs) return OPERATOR_PASS_THROUGH; - if (!(mval[0]>2 && mval[0]<(TXT_OFFSET + TEXTXLOC) && mval[1]>2 && mval[1]winy-2)) + if (!(mval[0] > 2 && mval[0] < (TXT_OFFSET + TEXTXLOC) && mval[1] > 2 && mval[1] < ar->winy - 2)) return OPERATOR_PASS_THROUGH; - if (!(event->ascii>='0' && event->ascii<='9')) + if (!(event->ascii >= '0' && event->ascii <= '9')) return OPERATOR_PASS_THROUGH; time = PIL_check_seconds_timer(); - if (last_jump < time-1) - jump_to= 0; + if (last_jump < time - 1) + jump_to = 0; jump_to *= 10; - jump_to += (int)(event->ascii-'0'); + jump_to += (int)(event->ascii - '0'); - txt_move_toline(text, jump_to-1, 0); - last_jump= time; + txt_move_toline(text, jump_to - 1, 0); + last_jump = time; text_update_cursor_moved(C); - WM_event_add_notifier(C, NC_TEXT|ND_CURSOR, text); + WM_event_add_notifier(C, NC_TEXT | ND_CURSOR, text); return OPERATOR_FINISHED; } @@ -2815,8 +2815,8 @@ void TEXT_OT_line_number(wmOperatorType *ot) static int text_insert_exec(bContext *C, wmOperator *op) { - SpaceText *st= CTX_wm_space_text(C); - Text *text= CTX_data_edit_text(C); + SpaceText *st = CTX_wm_space_text(C); + Text *text = CTX_data_edit_text(C); char *str; int done = 0; size_t i = 0; @@ -2824,7 +2824,7 @@ static int text_insert_exec(bContext *C, wmOperator *op) text_drawcache_tag_update(st, 0); - str= RNA_string_get_alloc(op->ptr, "text", NULL, 0); + str = RNA_string_get_alloc(op->ptr, "text", NULL, 0); if (st && st->overwrite) { while (str[i]) { @@ -2847,7 +2847,7 @@ static int text_insert_exec(bContext *C, wmOperator *op) text_update_line_edited(text->curl); text_update_cursor_moved(C); - WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text); + WM_event_add_notifier(C, NC_TEXT | NA_EDITED, text); return OPERATOR_FINISHED; } @@ -2863,7 +2863,7 @@ static int text_insert_invoke(bContext *C, wmOperator *op, wmEvent *event) return OPERATOR_PASS_THROUGH; } else { - char str[BLI_UTF8_MAX+1]; + char str[BLI_UTF8_MAX + 1]; size_t len; if (event->utf8_buf[0]) { @@ -2874,7 +2874,7 @@ static int text_insert_invoke(bContext *C, wmOperator *op, wmEvent *event) /* in theory, ghost can set value to extended ascii here */ len = BLI_str_utf8_from_unicode(event->ascii, str); } - str[len]= '\0'; + str[len] = '\0'; RNA_string_set(op->ptr, "text", str); } } @@ -2882,7 +2882,7 @@ static int text_insert_invoke(bContext *C, wmOperator *op, wmEvent *event) ret = text_insert_exec(C, op); /* run the script while editing, evil but useful */ - if (ret==OPERATOR_FINISHED && CTX_wm_space_text(C)->live_edit) + if (ret == OPERATOR_FINISHED && CTX_wm_space_text(C)->live_edit) text_run_script(C, NULL); return ret; @@ -2910,97 +2910,97 @@ void TEXT_OT_insert(wmOperatorType *ot) /******************* find operator *********************/ /* mode */ -#define TEXT_FIND 0 -#define TEXT_REPLACE 1 -#define TEXT_MARK_ALL 2 +#define TEXT_FIND 0 +#define TEXT_REPLACE 1 +#define TEXT_MARK_ALL 2 static int text_find_and_replace(bContext *C, wmOperator *op, short mode) { - Main *bmain= CTX_data_main(C); - SpaceText *st= CTX_wm_space_text(C); - Text *start= NULL, *text= st->text; - int flags, first= 1; + Main *bmain = CTX_data_main(C); + SpaceText *st = CTX_wm_space_text(C); + Text *start = NULL, *text = st->text; + int flags, first = 1; int found = 0; char *tmp; if (!st->findstr[0] || (mode == TEXT_REPLACE && !st->replacestr[0])) return OPERATOR_CANCELLED; - flags= st->flags; + flags = st->flags; if (flags & ST_FIND_ALL) flags ^= ST_FIND_WRAP; do { - int proceed= 0; + int proceed = 0; if (first) { if (text->markers.first) - WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text); + WM_event_add_notifier(C, NC_TEXT | NA_EDITED, text); txt_clear_markers(text, TMARK_GRP_FINDALL, 0); } - first= 0; + first = 0; /* Replace current */ - if (mode!=TEXT_FIND && txt_has_sel(text)) { - tmp= txt_sel_to_buf(text); + if (mode != TEXT_FIND && txt_has_sel(text)) { + tmp = txt_sel_to_buf(text); - if (flags & ST_MATCH_CASE) proceed= strcmp(st->findstr, tmp)==0; - else proceed= BLI_strcasecmp(st->findstr, tmp)==0; + if (flags & ST_MATCH_CASE) proceed = strcmp(st->findstr, tmp) == 0; + else proceed = BLI_strcasecmp(st->findstr, tmp) == 0; if (proceed) { - if (mode==TEXT_REPLACE) { + if (mode == TEXT_REPLACE) { txt_insert_buf(text, st->replacestr); if (text->curl && text->curl->format) { MEM_freeN(text->curl->format); - text->curl->format= NULL; + text->curl->format = NULL; } text_update_cursor_moved(C); - WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text); + WM_event_add_notifier(C, NC_TEXT | NA_EDITED, text); text_drawcache_tag_update(CTX_wm_space_text(C), 1); } - else if (mode==TEXT_MARK_ALL) { + else if (mode == TEXT_MARK_ALL) { unsigned char color[4]; UI_GetThemeColor4ubv(TH_SHADE2, color); if (txt_find_marker(text, text->curl, text->selc, TMARK_GRP_FINDALL, 0)) { - if (tmp) MEM_freeN(tmp), tmp=NULL; + if (tmp) MEM_freeN(tmp), tmp = NULL; break; } txt_add_marker(text, text->curl, text->curc, text->selc, color, TMARK_GRP_FINDALL, TMARK_EDITALL); text_update_cursor_moved(C); - WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text); + WM_event_add_notifier(C, NC_TEXT | NA_EDITED, text); } } MEM_freeN(tmp); - tmp= NULL; + tmp = NULL; } /* Find next */ if (txt_find_string(text, st->findstr, flags & ST_FIND_WRAP, flags & ST_MATCH_CASE)) { text_update_cursor_moved(C); - WM_event_add_notifier(C, NC_TEXT|ND_CURSOR, text); + WM_event_add_notifier(C, NC_TEXT | ND_CURSOR, text); } else if (flags & ST_FIND_ALL) { - if (text==start) break; - if (!start) start= text; + if (text == start) break; + if (!start) start = text; if (text->id.next) - text= st->text= text->id.next; + text = st->text = text->id.next; else - text= st->text= bmain->text.first; + text = st->text = bmain->text.first; txt_move_toline(text, 0, 0); text_update_cursor_moved(C); - WM_event_add_notifier(C, NC_TEXT|ND_CURSOR, text); - first= 1; + WM_event_add_notifier(C, NC_TEXT | ND_CURSOR, text); + first = 1; } else { if (!found && !proceed) BKE_reportf(op->reports, RPT_ERROR, "Text not found: %s", st->findstr); break; } found = 1; - } while (mode==TEXT_MARK_ALL); + } while (mode == TEXT_MARK_ALL); return OPERATOR_FINISHED; } @@ -3064,11 +3064,11 @@ void TEXT_OT_mark_all(wmOperatorType *ot) static int text_find_set_selected_exec(bContext *C, wmOperator *op) { - SpaceText *st= CTX_wm_space_text(C); - Text *text= CTX_data_edit_text(C); + SpaceText *st = CTX_wm_space_text(C); + Text *text = CTX_data_edit_text(C); char *tmp; - tmp= txt_sel_to_buf(text); + tmp = txt_sel_to_buf(text); BLI_strncpy(st->findstr, tmp, ST_MAX_FIND_STR); MEM_freeN(tmp); @@ -3094,11 +3094,11 @@ void TEXT_OT_find_set_selected(wmOperatorType *ot) static int text_replace_set_selected_exec(bContext *C, wmOperator *UNUSED(op)) { - SpaceText *st= CTX_wm_space_text(C); - Text *text= CTX_data_edit_text(C); + SpaceText *st = CTX_wm_space_text(C); + Text *text = CTX_data_edit_text(C); char *tmp; - tmp= txt_sel_to_buf(text); + tmp = txt_sel_to_buf(text); BLI_strncpy(st->replacestr, tmp, ST_MAX_FIND_STR); MEM_freeN(tmp); @@ -3120,12 +3120,13 @@ void TEXT_OT_replace_set_selected(wmOperatorType *ot) /****************** resolve conflict operator ******************/ enum { RESOLVE_IGNORE, RESOLVE_RELOAD, RESOLVE_SAVE, RESOLVE_MAKE_INTERNAL }; -static EnumPropertyItem resolution_items[]= { +static EnumPropertyItem resolution_items[] = { {RESOLVE_IGNORE, "IGNORE", 0, "Ignore", ""}, {RESOLVE_RELOAD, "RELOAD", 0, "Reload", ""}, {RESOLVE_SAVE, "SAVE", 0, "Save", ""}, {RESOLVE_MAKE_INTERNAL, "MAKE_INTERNAL", 0, "Make Internal", ""}, - {0, NULL, 0, NULL, NULL}}; + {0, NULL, 0, NULL, NULL} +}; /* returns 0 if file on disk is the same or Text is in memory only * returns 1 if file has been modified on disk since last local edit @@ -3179,15 +3180,15 @@ static void text_ignore_modified(Text *text) if (result == -1 || (st.st_mode & S_IFMT) != S_IFREG) return; - text->mtime= st.st_mtime; + text->mtime = st.st_mtime; } static int text_resolve_conflict_exec(bContext *C, wmOperator *op) { - Text *text= CTX_data_edit_text(C); - int resolution= RNA_enum_get(op->ptr, "resolution"); + Text *text = CTX_data_edit_text(C); + int resolution = RNA_enum_get(op->ptr, "resolution"); - switch(resolution) { + switch (resolution) { case RESOLVE_RELOAD: return text_reload_exec(C, op); case RESOLVE_SAVE: @@ -3204,24 +3205,24 @@ static int text_resolve_conflict_exec(bContext *C, wmOperator *op) static int text_resolve_conflict_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)) { - Text *text= CTX_data_edit_text(C); + Text *text = CTX_data_edit_text(C); uiPopupMenu *pup; uiLayout *layout; - switch(text_file_modified(text)) { + switch (text_file_modified(text)) { case 1: if (text->flags & TXT_ISDIRTY) { /* modified locally and externally, ahhh. offer more possibilites. */ - pup= uiPupMenuBegin(C, "File Modified Outside and Inside Blender", ICON_NONE); - layout= uiPupMenuLayout(pup); + pup = uiPupMenuBegin(C, "File Modified Outside and Inside Blender", ICON_NONE); + layout = uiPupMenuLayout(pup); uiItemEnumO_ptr(layout, op->type, "Reload from disk (ignore local changes)", 0, "resolution", RESOLVE_RELOAD); uiItemEnumO_ptr(layout, op->type, "Save to disk (ignore outside changes)", 0, "resolution", RESOLVE_SAVE); uiItemEnumO_ptr(layout, op->type, "Make text internal (separate copy)", 0, "resolution", RESOLVE_MAKE_INTERNAL); uiPupMenuEnd(C, pup); } else { - pup= uiPupMenuBegin(C, "File Modified Outside Blender", ICON_NONE); - layout= uiPupMenuLayout(pup); + pup = uiPupMenuBegin(C, "File Modified Outside Blender", ICON_NONE); + layout = uiPupMenuLayout(pup); uiItemEnumO_ptr(layout, op->type, "Reload from disk", 0, "resolution", RESOLVE_RELOAD); uiItemEnumO_ptr(layout, op->type, "Make text internal (separate copy)", 0, "resolution", RESOLVE_MAKE_INTERNAL); uiItemEnumO_ptr(layout, op->type, "Ignore", 0, "resolution", RESOLVE_IGNORE); @@ -3229,8 +3230,8 @@ static int text_resolve_conflict_invoke(bContext *C, wmOperator *op, wmEvent *UN } break; case 2: - pup= uiPupMenuBegin(C, "File Deleted Outside Blender", ICON_NONE); - layout= uiPupMenuLayout(pup); + pup = uiPupMenuBegin(C, "File Deleted Outside Blender", ICON_NONE); + layout = uiPupMenuLayout(pup); uiItemEnumO_ptr(layout, op->type, "Make text internal", 0, "resolution", RESOLVE_MAKE_INTERNAL); uiItemEnumO_ptr(layout, op->type, "Recreate file", 0, "resolution", RESOLVE_SAVE); uiPupMenuEnd(C, pup); @@ -3260,8 +3261,8 @@ void TEXT_OT_resolve_conflict(wmOperatorType *ot) static int text_to_3d_object_exec(bContext *C, wmOperator *op) { - Text *text= CTX_data_edit_text(C); - int split_lines= RNA_boolean_get(op->ptr, "split_lines"); + Text *text = CTX_data_edit_text(C); + int split_lines = RNA_boolean_get(op->ptr, "split_lines"); ED_text_to_object(C, text, split_lines); @@ -3280,7 +3281,7 @@ void TEXT_OT_to_3d_object(wmOperatorType *ot) ot->poll = text_edit_poll; /* flags */ - ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO; + ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; /* properties */ RNA_def_boolean(ot->srna, "split_lines", 0, "Split Lines", "Create one object per line in the text"); @@ -3291,20 +3292,20 @@ void TEXT_OT_to_3d_object(wmOperatorType *ot) void ED_text_undo_step(bContext *C, int step) { - Text *text= CTX_data_edit_text(C); + Text *text = CTX_data_edit_text(C); if (!text) return; - if (step==1) + if (step == 1) txt_do_undo(text); - else if (step==-1) + else if (step == -1) txt_do_redo(text); text_update_edited(text); text_update_cursor_moved(C); text_drawcache_tag_update(CTX_wm_space_text(C), 1); - WM_event_add_notifier(C, NC_TEXT|NA_EDITED, text); + WM_event_add_notifier(C, NC_TEXT | NA_EDITED, text); } diff --git a/source/blender/editors/space_text/text_python.c b/source/blender/editors/space_text/text_python.c index 452f74e8826..c24af998835 100644 --- a/source/blender/editors/space_text/text_python.c +++ b/source/blender/editors/space_text/text_python.c @@ -67,36 +67,36 @@ int text_do_suggest_select(SpaceText *st, ARegion *ar) return 0; /* Count the visible lines to the cursor */ - for (tmp=st->text->curl, l=-st->top; tmp; tmp=tmp->prev, l++); - if (l<0) return 0; + for (tmp = st->text->curl, l = -st->top; tmp; tmp = tmp->prev, l++) ; + if (l < 0) return 0; text_update_character_width(st); if (st->showlinenrs) { - x = st->cwidth*(st->text->curc-st->left) + TXT_OFFSET + TEXTXLOC - 4; + x = st->cwidth * (st->text->curc - st->left) + TXT_OFFSET + TEXTXLOC - 4; } else { - x = st->cwidth*(st->text->curc-st->left) + TXT_OFFSET - 4; + x = st->cwidth * (st->text->curc - st->left) + TXT_OFFSET - 4; } - y = ar->winy - st->lheight*l - 2; + y = ar->winy - st->lheight * l - 2; - w = SUGG_LIST_WIDTH*st->cwidth + 20; - h = SUGG_LIST_SIZE*st->lheight + 8; + w = SUGG_LIST_WIDTH * st->cwidth + 20; + h = SUGG_LIST_SIZE * st->lheight + 8; // XXX getmouseco_areawin(mval); - if (mval[0]next; i++, item=item->next); + for (i = 0, item = first; i < *top && item->next; i++, item = item->next) ; /* Work out the target item index in the visible list */ - tgti = (y-mval[1]-4) / st->lheight; - if (tgti<0 || tgti>SUGG_LIST_SIZE) + tgti = (y - mval[1] - 4) / st->lheight; + if (tgti < 0 || tgti > SUGG_LIST_SIZE) return 1; - for (i=tgti; i>0 && item->next; i--, item=item->next); + for (i = tgti; i > 0 && item->next; i--, item = item->next) ; if (item) texttool_suggest_select(item); return 1; @@ -107,19 +107,19 @@ void text_pop_suggest_list(void) SuggItem *item, *sel; int *top, i; - item= texttool_suggest_first(); - sel= texttool_suggest_selected(); - top= texttool_suggest_top(); + item = texttool_suggest_first(); + sel = texttool_suggest_selected(); + top = texttool_suggest_top(); - i= 0; + i = 0; while (item && item != sel) { - item= item->next; + item = item->next; i++; } - if (i > *top+SUGG_LIST_SIZE-1) - *top= i-SUGG_LIST_SIZE+1; + if (i > *top + SUGG_LIST_SIZE - 1) + *top = i - SUGG_LIST_SIZE + 1; else if (i < *top) - *top= i; + *top = i; } static void get_suggest_prefix(Text *text, int offset) @@ -130,25 +130,25 @@ static void get_suggest_prefix(Text *text, int offset) if (!text) return; if (!texttool_text_is_active(text)) return; - line= text->curl->line; - for (i=text->curc-1+offset; i>=0; i--) + line = text->curl->line; + for (i = text->curc - 1 + offset; i >= 0; i--) if (!text_check_identifier(line[i])) break; i++; - len= text->curc-i+offset; + len = text->curc - i + offset; if (len > 255) { printf("Suggestion prefix too long\n"); len = 255; } - BLI_strncpy(tmp, line+i, len); - tmp[len]= '\0'; + BLI_strncpy(tmp, line + i, len); + tmp[len] = '\0'; texttool_suggest_prefix(tmp); } static void confirm_suggestion(Text *text, int skipleft) { SuggItem *sel; - int i, over=0; + int i, over = 0; char *line; if (!text) return; @@ -157,23 +157,23 @@ static void confirm_suggestion(Text *text, int skipleft) sel = texttool_suggest_selected(); if (!sel) return; - line= text->curl->line; - i=text->curc-skipleft-1; - while (i>=0) { + line = text->curl->line; + i = text->curc - skipleft - 1; + while (i >= 0) { if (!text_check_identifier(line[i])) break; over++; i--; } - for (i=0; iname); - for (i=0; itext)) return 0; if (!st->text || st->text->id.lib) return 0; @@ -213,50 +213,50 @@ static short UNUSED_FUNCTION(do_texttools)(SpaceText *st, char ascii, unsigned s else if ((st->overwrite && txt_replace_char(st->text, ascii)) || txt_add_char(st->text, ascii)) { get_suggest_prefix(st->text, 0); text_pop_suggest_list(); - swallow= 1; - draw= 1; + swallow = 1; + draw = 1; } } - if (tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll= 0, draw= 1; + if (tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll = 0, draw = 1; } - else if (val==1 && evnt) { + else if (val == 1 && evnt) { switch (evnt) { case LEFTMOUSE: if (text_do_suggest_select(st, ar)) - swallow= 1; + swallow = 1; else { if (tools & TOOL_SUGG_LIST) texttool_suggest_clear(); - if (tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll= 0; + if (tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll = 0; } - draw= 1; + draw = 1; break; case MIDDLEMOUSE: if (text_do_suggest_select(st, ar)) { confirm_suggestion(st->text, 0); text_update_line_edited(st->text->curl); - swallow= 1; + swallow = 1; } else { if (tools & TOOL_SUGG_LIST) texttool_suggest_clear(); - if (tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll= 0; + if (tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll = 0; } - draw= 1; + draw = 1; break; case ESCKEY: - draw= swallow= 1; + draw = swallow = 1; if (tools & TOOL_SUGG_LIST) texttool_suggest_clear(); - else if (tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll= 0; - else draw= swallow= 0; + else if (tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll = 0; + else draw = swallow = 0; break; case RETKEY: if (tools & TOOL_SUGG_LIST) { confirm_suggestion(st->text, 0); text_update_line_edited(st->text->curl); - swallow= 1; - draw= 1; + swallow = 1; + draw = 1; } - if (tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll= 0, draw= 1; + if (tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll = 0, draw = 1; break; case LEFTARROWKEY: case BACKSPACEKEY: @@ -266,8 +266,8 @@ static short UNUSED_FUNCTION(do_texttools)(SpaceText *st, char ascii, unsigned s else { /* Work out which char we are about to delete/pass */ if (st->text->curl && st->text->curc > 0) { - char ch= st->text->curl->line[st->text->curc-1]; - if ((ch=='_' || !ispunct(ch)) && !text_check_whitespace(ch)) { + char ch = st->text->curl->line[st->text->curc - 1]; + if ((ch == '_' || !ispunct(ch)) && !text_check_whitespace(ch)) { get_suggest_prefix(st->text, -1); text_pop_suggest_list(); } @@ -278,7 +278,7 @@ static short UNUSED_FUNCTION(do_texttools)(SpaceText *st, char ascii, unsigned s texttool_suggest_clear(); } } - if (tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll= 0; + if (tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll = 0; break; case RIGHTARROWKEY: if (tools & TOOL_SUGG_LIST) { @@ -287,8 +287,8 @@ static short UNUSED_FUNCTION(do_texttools)(SpaceText *st, char ascii, unsigned s else { /* Work out which char we are about to pass */ if (st->text->curl && st->text->curc < st->text->curl->len) { - char ch= st->text->curl->line[st->text->curc+1]; - if ((ch=='_' || !ispunct(ch)) && !text_check_whitespace(ch)) { + char ch = st->text->curl->line[st->text->curc + 1]; + if ((ch == '_' || !ispunct(ch)) && !text_check_whitespace(ch)) { get_suggest_prefix(st->text, 1); text_pop_suggest_list(); } @@ -299,16 +299,16 @@ static short UNUSED_FUNCTION(do_texttools)(SpaceText *st, char ascii, unsigned s texttool_suggest_clear(); } } - if (tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll= 0; + if (tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll = 0; break; case PAGEDOWNKEY: - scroll= SUGG_LIST_SIZE-1; + scroll = SUGG_LIST_SIZE - 1; case WHEELDOWNMOUSE: case DOWNARROWKEY: if (tools & TOOL_DOCUMENT) { doc_scroll++; - swallow= 1; - draw= 1; + swallow = 1; + draw = 1; break; } else if (tools & TOOL_SUGG_LIST) { @@ -316,42 +316,44 @@ static short UNUSED_FUNCTION(do_texttools)(SpaceText *st, char ascii, unsigned s if (!sel) { texttool_suggest_select(texttool_suggest_first()); } - else while (sel && sel!=texttool_suggest_last() && sel->next && scroll--) { - texttool_suggest_select(sel->next); - sel= sel->next; + else { + while (sel && sel != texttool_suggest_last() && sel->next && scroll--) { + texttool_suggest_select(sel->next); + sel = sel->next; + } } text_pop_suggest_list(); - swallow= 1; - draw= 1; + swallow = 1; + draw = 1; break; } case PAGEUPKEY: - scroll= SUGG_LIST_SIZE-1; + scroll = SUGG_LIST_SIZE - 1; case WHEELUPMOUSE: case UPARROWKEY: if (tools & TOOL_DOCUMENT) { - if (doc_scroll>0) doc_scroll--; - swallow= 1; - draw= 1; + if (doc_scroll > 0) doc_scroll--; + swallow = 1; + draw = 1; break; } else if (tools & TOOL_SUGG_LIST) { SuggItem *sel = texttool_suggest_selected(); - while (sel && sel!=texttool_suggest_first() && sel->prev && scroll--) { + while (sel && sel != texttool_suggest_first() && sel->prev && scroll--) { texttool_suggest_select(sel->prev); - sel= sel->prev; + sel = sel->prev; } text_pop_suggest_list(); - swallow= 1; - draw= 1; + swallow = 1; + draw = 1; break; } case RIGHTSHIFTKEY: case LEFTSHIFTKEY: break; default: - if (tools & TOOL_SUGG_LIST) texttool_suggest_clear(), draw= 1; - if (tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll= 0, draw= 1; + if (tools & TOOL_SUGG_LIST) texttool_suggest_clear(), draw = 1; + if (tools & TOOL_DOCUMENT) texttool_docs_clear(), doc_scroll = 0, draw = 1; } } @@ -364,75 +366,75 @@ static short UNUSED_FUNCTION(do_texttools)(SpaceText *st, char ascii, unsigned s #if 0 #ifdef WITH_PYTHON - /* Run text plugin scripts if enabled */ - if (st->doplugins && event && val) { - if (BPY_menu_do_shortcut(PYMENU_TEXTPLUGIN, event, qual)) { - do_draw= 1; - } +/* Run text plugin scripts if enabled */ +if (st->doplugins && event && val) { + if (BPY_menu_do_shortcut(PYMENU_TEXTPLUGIN, event, qual)) { + do_draw = 1; } +} #endif - if (do_draw) - ; // XXX redraw_alltext(); +if (do_draw) + ; // XXX redraw_alltext(); #endif -static short UNUSED_FUNCTION(do_textmarkers)(SpaceText *st, char ascii, unsigned short evnt, short val) +static short UNUSED_FUNCTION(do_textmarkers) (SpaceText * st, char ascii, unsigned short evnt, short val) { Text *text; TextMarker *marker, *mrk, *nxt; - int c, s, draw=0, swallow=0; - int qual= 0; // XXX + int c, s, draw = 0, swallow = 0; + int qual = 0; // XXX - text= st->text; + text = st->text; if (!text || text->id.lib || text->curl != text->sell) return 0; - marker= txt_find_marker(text, text->sell, text->selc, 0, 0); + marker = txt_find_marker(text, text->sell, text->selc, 0, 0); if (marker && (marker->start > text->curc || marker->end < text->curc)) - marker= NULL; + marker = NULL; if (!marker) { /* Find the next temporary marker */ - if (evnt==TABKEY) { - int lineno= txt_get_span(text->lines.first, text->curl); - mrk= text->markers.first; + if (evnt == TABKEY) { + int lineno = txt_get_span(text->lines.first, text->curl); + mrk = text->markers.first; while (mrk) { - if (!marker && (mrk->flags & TMARK_TEMP)) marker= mrk; - if ((mrk->flags & TMARK_TEMP) && (mrk->lineno > lineno || (mrk->lineno==lineno && mrk->end > text->curc))) { - marker= mrk; + if (!marker && (mrk->flags & TMARK_TEMP)) marker = mrk; + if ((mrk->flags & TMARK_TEMP) && (mrk->lineno > lineno || (mrk->lineno == lineno && mrk->end > text->curc))) { + marker = mrk; break; } - mrk= mrk->next; + mrk = mrk->next; } if (marker) { txt_move_to(text, marker->lineno, marker->start, 0); txt_move_to(text, marker->lineno, marker->end, 1); // XXX text_update_cursor_moved(C); // XXX WM_event_add_notifier(C, NC_TEXT|ND_CURSOR, text); - evnt= ascii= val= 0; - draw= 1; - swallow= 1; + evnt = ascii = val = 0; + draw = 1; + swallow = 1; } } - else if (evnt==ESCKEY) { - if (txt_clear_markers(text, 0, TMARK_TEMP)) swallow= 1; - else if (txt_clear_markers(text, 0, 0)) swallow= 1; + else if (evnt == ESCKEY) { + if (txt_clear_markers(text, 0, TMARK_TEMP)) swallow = 1; + else if (txt_clear_markers(text, 0, 0)) swallow = 1; else return 0; - evnt= ascii= val= 0; - draw= 1; + evnt = ascii = val = 0; + draw = 1; } if (!swallow) return 0; } if (ascii) { if (marker->flags & TMARK_EDITALL) { - c= text->curc-marker->start; - s= text->selc-marker->start; - if (s<0 || s>marker->end-marker->start) return 0; + c = text->curc - marker->start; + s = text->selc - marker->start; + if (s < 0 || s > marker->end - marker->start) return 0; - mrk= txt_next_marker(text, marker); + mrk = txt_next_marker(text, marker); while (mrk) { - nxt=txt_next_marker(text, mrk); /* mrk may become invalid */ - txt_move_to(text, mrk->lineno, mrk->start+c, 0); - if (s!=c) txt_move_to(text, mrk->lineno, mrk->start+s, 1); + nxt = txt_next_marker(text, mrk); /* mrk may become invalid */ + txt_move_to(text, mrk->lineno, mrk->start + c, 0); + if (s != c) txt_move_to(text, mrk->lineno, mrk->start + s, 1); if (st->overwrite) { if (txt_replace_char(text, ascii)) text_update_line_edited(st->text->curl); @@ -443,101 +445,101 @@ static short UNUSED_FUNCTION(do_textmarkers)(SpaceText *st, char ascii, unsigned } } - if (mrk==marker || mrk==nxt) break; - mrk=nxt; + if (mrk == marker || mrk == nxt) break; + mrk = nxt; } - swallow= 1; - draw= 1; + swallow = 1; + draw = 1; } } else if (val) { - switch(evnt) { + switch (evnt) { case BACKSPACEKEY: if (marker->flags & TMARK_EDITALL) { - c= text->curc-marker->start; - s= text->selc-marker->start; - if (s<0 || s>marker->end-marker->start) return 0; + c = text->curc - marker->start; + s = text->selc - marker->start; + if (s < 0 || s > marker->end - marker->start) return 0; - mrk= txt_next_marker(text, marker); + mrk = txt_next_marker(text, marker); while (mrk) { - nxt= txt_next_marker(text, mrk); /* mrk may become invalid */ - txt_move_to(text, mrk->lineno, mrk->start+c, 0); - if (s!=c) txt_move_to(text, mrk->lineno, mrk->start+s, 1); + nxt = txt_next_marker(text, mrk); /* mrk may become invalid */ + txt_move_to(text, mrk->lineno, mrk->start + c, 0); + if (s != c) txt_move_to(text, mrk->lineno, mrk->start + s, 1); txt_backspace_char(text); text_update_line_edited(st->text->curl); - if (mrk==marker || mrk==nxt) break; - mrk= nxt; + if (mrk == marker || mrk == nxt) break; + mrk = nxt; } - swallow= 1; - draw= 1; + swallow = 1; + draw = 1; } break; case DELKEY: if (marker->flags & TMARK_EDITALL) { - c= text->curc-marker->start; - s= text->selc-marker->start; - if (s<0 || s>marker->end-marker->start) return 0; + c = text->curc - marker->start; + s = text->selc - marker->start; + if (s < 0 || s > marker->end - marker->start) return 0; - mrk= txt_next_marker(text, marker); + mrk = txt_next_marker(text, marker); while (mrk) { - nxt= txt_next_marker(text, mrk); /* mrk may become invalid */ - txt_move_to(text, mrk->lineno, mrk->start+c, 0); - if (s!=c) txt_move_to(text, mrk->lineno, mrk->start+s, 1); + nxt = txt_next_marker(text, mrk); /* mrk may become invalid */ + txt_move_to(text, mrk->lineno, mrk->start + c, 0); + if (s != c) txt_move_to(text, mrk->lineno, mrk->start + s, 1); txt_delete_char(text); text_update_line_edited(st->text->curl); - if (mrk==marker || mrk==nxt) break; - mrk= nxt; + if (mrk == marker || mrk == nxt) break; + mrk = nxt; } - swallow= 1; - draw= 1; + swallow = 1; + draw = 1; } break; case TABKEY: if (qual & LR_SHIFTKEY) { - nxt= marker->prev; - if (!nxt) nxt= text->markers.last; + nxt = marker->prev; + if (!nxt) nxt = text->markers.last; } else { - nxt= marker->next; - if (!nxt) nxt= text->markers.first; + nxt = marker->next; + if (!nxt) nxt = text->markers.first; } if (marker->flags & TMARK_TEMP) { - if (nxt==marker) nxt= NULL; + if (nxt == marker) nxt = NULL; BLI_freelinkN(&text->markers, marker); } - mrk= nxt; + mrk = nxt; if (mrk) { txt_move_to(text, mrk->lineno, mrk->start, 0); txt_move_to(text, mrk->lineno, mrk->end, 1); // XXX text_update_cursor_moved(C); // XXX WM_event_add_notifier(C, NC_TEXT|ND_CURSOR, text); } - swallow= 1; - draw= 1; + swallow = 1; + draw = 1; break; /* Events that should clear markers */ case UKEY: if (!(qual & LR_ALTKEY)) break; - case ZKEY: if (evnt==ZKEY && !(qual & LR_CTRLKEY)) break; + case ZKEY: if (evnt == ZKEY && !(qual & LR_CTRLKEY)) break; case RETKEY: case ESCKEY: if (marker->flags & (TMARK_EDITALL | TMARK_TEMP)) txt_clear_markers(text, marker->group, 0); else BLI_freelinkN(&text->markers, marker); - swallow= 1; - draw= 1; + swallow = 1; + draw = 1; break; case RIGHTMOUSE: /* Marker context menu? */ case LEFTMOUSE: break; case FKEY: /* Allow find */ - if (qual & LR_SHIFTKEY) swallow= 1; + if (qual & LR_SHIFTKEY) swallow = 1; break; default: - if (qual!=0 && qual!=LR_SHIFTKEY) - swallow= 1; /* Swallow all other shortcut events */ + if (qual != 0 && qual != LR_SHIFTKEY) + swallow = 1; /* Swallow all other shortcut events */ } } -- cgit v1.2.3 From 6904d9727e73ddaea5af6f8ecc007b9dac2504f5 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Sat, 31 Mar 2012 12:29:17 +0000 Subject: Minor code cleanups for bmo_dupe.c. --- source/blender/bmesh/operators/bmo_dupe.c | 36 ++++++++++++++----------------- 1 file changed, 16 insertions(+), 20 deletions(-) (limited to 'source/blender') diff --git a/source/blender/bmesh/operators/bmo_dupe.c b/source/blender/bmesh/operators/bmo_dupe.c index 814045f2528..4b559400bb8 100644 --- a/source/blender/bmesh/operators/bmo_dupe.c +++ b/source/blender/bmesh/operators/bmo_dupe.c @@ -191,22 +191,19 @@ static void copy_mesh(BMOperator *op, BMesh *source, BMesh *target) BMVert **vtar = NULL; BMEdge **edar = NULL; - BMIter verts; - BMIter edges; - BMIter faces; - - GHash *vhash; - GHash *ehash; + BMIter viter, eiter, fiter; + GHash *vhash, *ehash; /* initialize pointer hashes */ - vhash = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "bmesh dupeops v"); - ehash = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "bmesh dupeops e"); + vhash = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, + "bmesh dupeops v"); + ehash = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, + "bmesh dupeops e"); /* duplicate flagged vertices */ - for (v = BM_iter_new(&verts, source, BM_VERTS_OF_MESH, source); v; v = BM_iter_step(&verts)) { - if ( BMO_elem_flag_test(source, v, DUPE_INPUT) && - !BMO_elem_flag_test(source, v, DUPE_DONE)) - { + BM_ITER(v, &viter, source, BM_VERTS_OF_MESH, source) { + if (BMO_elem_flag_test(source, v, DUPE_INPUT) && + !BMO_elem_flag_test(source, v, DUPE_DONE)) { BMIter iter; int isolated = 1; @@ -237,10 +234,9 @@ static void copy_mesh(BMOperator *op, BMesh *source, BMesh *target) } /* now we dupe all the edges */ - for (e = BM_iter_new(&edges, source, BM_EDGES_OF_MESH, source); e; e = BM_iter_step(&edges)) { - if ( BMO_elem_flag_test(source, e, DUPE_INPUT) && - !BMO_elem_flag_test(source, e, DUPE_DONE)) - { + BM_ITER(e, &eiter, source, BM_EDGES_OF_MESH, source) { + if (BMO_elem_flag_test(source, e, DUPE_INPUT) && + !BMO_elem_flag_test(source, e, DUPE_DONE)) { /* make sure that verts are copied */ if (!BMO_elem_flag_test(source, e->v1, DUPE_DONE)) { copy_vertex(source, e->v1, target, vhash); @@ -257,10 +253,10 @@ static void copy_mesh(BMOperator *op, BMesh *source, BMesh *target) } /* first we dupe all flagged faces and their elements from source */ - for (f = BM_iter_new(&faces, source, BM_FACES_OF_MESH, source); f; f = BM_iter_step(&faces)) { + BM_ITER(f, &fiter, source, BM_FACES_OF_MESH, source) { if (BMO_elem_flag_test(source, f, DUPE_INPUT)) { /* vertex pass */ - for (v = BM_iter_new(&verts, source, BM_VERTS_OF_FACE, f); v; v = BM_iter_step(&verts)) { + BM_ITER(v, &viter, source, BM_VERTS_OF_FACE, f) { if (!BMO_elem_flag_test(source, v, DUPE_DONE)) { copy_vertex(source, v, target, vhash); BMO_elem_flag_enable(source, v, DUPE_DONE); @@ -268,7 +264,7 @@ static void copy_mesh(BMOperator *op, BMesh *source, BMesh *target) } /* edge pass */ - for (e = BM_iter_new(&edges, source, BM_EDGES_OF_FACE, f); e; e = BM_iter_step(&edges)) { + BM_ITER(e, &eiter, source, BM_EDGES_OF_FACE, f) { if (!BMO_elem_flag_test(source, e, DUPE_DONE)) { copy_edge(op, source, e, target, vhash, ehash); BMO_elem_flag_enable(source, e, DUPE_DONE); @@ -325,7 +321,7 @@ void bmo_dupe_exec(BMesh *bm, BMOperator *op) if (!bm2) bm2 = bm; - /* flag inpu */ + /* flag input */ BMO_slot_buffer_flag_enable(bm, dupeop, "geom", BM_ALL, DUPE_INPUT); /* use the internal copy function */ -- cgit v1.2.3 From ce8f3b4afabb4f0ba11025399eddda07f9f238c5 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Sat, 31 Mar 2012 12:29:41 +0000 Subject: Small array modifier performance improvement. Transform vertices directly rather than using BMOp. --- source/blender/modifiers/intern/MOD_array.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source/blender') diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c index 84b5d7deb6f..d552e73bc32 100644 --- a/source/blender/modifiers/intern/MOD_array.c +++ b/source/blender/modifiers/intern/MOD_array.c @@ -413,6 +413,7 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, BMVert *v, *v2, *v3; BMOpSlot *geom_slot; BMOpSlot *newout_slot; + BMOIter oiter; if (j != 0) BMO_op_initf(em->bm, &dupe_op, "dupe geom=%s", &old_dupe_op, "newout"); @@ -430,7 +431,10 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd, memcpy(first_geom, geom_slot->data.buf, first_geom_bytes); } - BMO_op_callf(em->bm, "transform mat=%m4 verts=%s", offset, &dupe_op, "newout"); + /* apply transformation matrix */ + BMO_ITER(v, &oiter, em->bm, &dupe_op, "newout", BM_VERT) { + mul_m4_v3(offset, v->co); + } if (amd->flags & MOD_ARR_MERGE) { /*calculate merge mapping*/ -- cgit v1.2.3 From 8f949dd58decac45fd49f9a93152f2cddc98d901 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Sat, 31 Mar 2012 14:22:22 +0000 Subject: Fixing kyrgyz language (code is ky_KG, just ky does not work...). These keycodes are a mess, and impossible to test them all under linux, as you always have to install the corresponding locales... :( --- source/blender/blenfont/intern/blf_lang.c | 2 +- source/blender/makesrna/intern/rna_userdef.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenfont/intern/blf_lang.c b/source/blender/blenfont/intern/blf_lang.c index 035aa732537..8a4f8818f40 100644 --- a/source/blender/blenfont/intern/blf_lang.c +++ b/source/blender/blenfont/intern/blf_lang.c @@ -104,7 +104,7 @@ static const char *locales[] = { "persian", "fa_IR", "indonesian", "id_ID", "serbian (latin)", "sr_RS@latin", - "kyrgyz", "ky", + "kyrgyz", "ky_KG", }; void BLF_lang_init(void) diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 2087ba7ee5f..0490282f617 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -2880,7 +2880,7 @@ static void rna_def_userdef_system(BlenderRNA *brna) {23, "GREEK", 0, "Greek (Ελληνικά)", "el_GR"}, {27, "INDONESIAN", 0, "Indonesian (Bahasa indonesia)", "id_ID"}, { 2, "JAPANESE", 0, "Japanese (日本語)", "ja_JP"}, - {29, "KYRGYZ", 0, "Kyrgyz (Kyrgyz tili)", "ki"}, + {29, "KYRGYZ", 0, "Kyrgyz (Кыргыз тили)", "ki_KG"}, {24, "KOREAN", 0, "Korean (한국 언어)", "ko_KR"}, {25, "NEPALI", 0, "Nepali (नेपाली)", "ne_NP"}, /* using the utf8 flipped form of Persian (فارسی) */ -- cgit v1.2.3