code cleanup: add break statements in switch ()'s, (even at the last case).
This commit is contained in:
@@ -112,7 +112,7 @@ AviError AVI_set_compress_option(AviMovie *movie, int option_type, int stream, A
|
||||
awrite(movie, movie->streams[i].sf, 1, movie->streams[i].sf_size, movie->fp, AVI_BITMAPH);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
fseek(movie->fp, movie->offset_table[0], SEEK_SET);
|
||||
|
||||
@@ -1329,6 +1329,7 @@ void BKE_pchan_mat3_to_rot(bPoseChannel *pchan, float mat[3][3], short use_compa
|
||||
mat3_to_compatible_eulO(pchan->eul, pchan->eul, pchan->rotmode, mat);
|
||||
else
|
||||
mat3_to_eulO(pchan->eul, pchan->rotmode, mat);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2173,6 +2173,7 @@ static void make_bevel_list_3D(BevList *bl, int smooth_iter, int twist_mode)
|
||||
break;
|
||||
default: /* CU_TWIST_Z_UP default, pre 2.49c */
|
||||
make_bevel_list_3D_zup(bl);
|
||||
break;
|
||||
}
|
||||
|
||||
if (bl->poly == -1) /* check its not cyclic */
|
||||
|
||||
@@ -2391,6 +2391,7 @@ bool CustomData_bmesh_merge(CustomData *source, CustomData *dest,
|
||||
BLI_assert(!"invalid type given");
|
||||
iter_type = BM_VERTS_OF_MESH;
|
||||
totelem = bm->totvert;
|
||||
break;
|
||||
}
|
||||
|
||||
dest->pool = NULL;
|
||||
|
||||
@@ -373,5 +373,6 @@ void BKE_editmesh_color_ensure(BMEditMesh *em, const char htype)
|
||||
break;
|
||||
default:
|
||||
BLI_assert(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1764,6 +1764,7 @@ static float evaluate_driver(ChannelDriver *driver, const float evaltime)
|
||||
* This is currently used as the mechanism which allows animated settings to be able
|
||||
* to be changed via the UI.
|
||||
*/
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -343,6 +343,8 @@ static void fcm_fn_generator_evaluate(FCurve *UNUSED(fcu), FModifier *fcm, float
|
||||
}
|
||||
default:
|
||||
printf("Invalid Function-Generator for F-Modifier - %d\n", data->type);
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
/* execute function callback to set value if appropriate */
|
||||
|
||||
@@ -445,6 +445,7 @@ void IDP_SyncGroupValues(IDProperty *dest, IDProperty *src)
|
||||
|
||||
IDP_FreeProperty(tmp);
|
||||
MEM_freeN(tmp);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -709,9 +710,7 @@ int IDP_EqualsProperties_ex(IDProperty *prop1, IDProperty *prop2, const int is_s
|
||||
if (prop1->len == prop2->len && prop1->subtype == prop2->subtype) {
|
||||
return memcmp(IDP_Array(prop1), IDP_Array(prop2), idp_size_table[(int)prop1->subtype] * prop1->len);
|
||||
}
|
||||
else {
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
case IDP_GROUP:
|
||||
{
|
||||
IDProperty *link1, *link2;
|
||||
@@ -813,9 +812,7 @@ IDProperty *IDP_New(const int type, const IDPropertyTemplate *val, const char *n
|
||||
prop->len = prop->totallen = val->array.len;
|
||||
break;
|
||||
}
|
||||
else {
|
||||
return NULL;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
case IDP_STRING:
|
||||
{
|
||||
@@ -911,5 +908,6 @@ void IDP_UnlinkProperty(IDProperty *prop)
|
||||
switch (prop->type) {
|
||||
case IDP_ID:
|
||||
IDP_UnlinkID(prop);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -695,6 +695,7 @@ static ImBuf *add_ibuf_size(unsigned int width, unsigned int height, const char
|
||||
break;
|
||||
default:
|
||||
BKE_image_buf_fill_color(rect, rect_float, width, height, color);
|
||||
break;
|
||||
}
|
||||
|
||||
if (rect_float) {
|
||||
@@ -1120,6 +1121,7 @@ char BKE_imtype_valid_channels(const char imtype)
|
||||
case R_IMF_IMTYPE_QUICKTIME:
|
||||
case R_IMF_IMTYPE_DPX:
|
||||
chan_flag |= IMA_CHAN_FLAG_ALPHA;
|
||||
break;
|
||||
}
|
||||
|
||||
/* bw */
|
||||
@@ -1131,6 +1133,7 @@ char BKE_imtype_valid_channels(const char imtype)
|
||||
case R_IMF_IMTYPE_TIFF:
|
||||
case R_IMF_IMTYPE_IRIS:
|
||||
chan_flag |= IMA_CHAN_FLAG_BW;
|
||||
break;
|
||||
}
|
||||
|
||||
return chan_flag;
|
||||
|
||||
@@ -1057,6 +1057,7 @@ void free_main(Main *mainvar)
|
||||
case 32: BKE_libblock_free(lb, id); break;
|
||||
default:
|
||||
BLI_assert(0);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1614,6 +1614,7 @@ void BKE_object_mat3_to_rot(Object *ob, float mat[3][3], bool use_compat)
|
||||
|
||||
if (use_compat) mat3_to_compatible_eulO(ob->rot, ob->rot, ob->rotmode, tmat);
|
||||
else mat3_to_eulO(ob->rot, ob->rotmode, tmat);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,6 +85,7 @@ int seekPackedFile(PackedFile *pf, int offset, int whence)
|
||||
break;
|
||||
default:
|
||||
oldseek = -1;
|
||||
break;
|
||||
}
|
||||
if (seek < 0) {
|
||||
seek = 0;
|
||||
@@ -448,7 +449,8 @@ char *unpackFile(ReportList *reports, const char *abs_name, const char *local_na
|
||||
temp = local_name;
|
||||
break;
|
||||
}
|
||||
/* else fall through and create it */
|
||||
/* else create it */
|
||||
/* fall-through */
|
||||
case PF_WRITE_LOCAL:
|
||||
if (writePackedFile(reports, local_name, pf, 1) == RET_OK) {
|
||||
temp = local_name;
|
||||
@@ -461,7 +463,8 @@ char *unpackFile(ReportList *reports, const char *abs_name, const char *local_na
|
||||
temp = abs_name;
|
||||
break;
|
||||
}
|
||||
/* else fall through and create it */
|
||||
/* else create it */
|
||||
/* fall-through */
|
||||
case PF_WRITE_ORIGINAL:
|
||||
if (writePackedFile(reports, abs_name, pf, 1) == RET_OK) {
|
||||
temp = abs_name;
|
||||
|
||||
@@ -139,8 +139,7 @@ Paint *BKE_paint_get_active(Scene *sce)
|
||||
case OB_MODE_EDIT:
|
||||
if (ts->use_uv_sculpt)
|
||||
return &ts->uvsculpt->paint;
|
||||
else
|
||||
return &ts->imapaint.paint;
|
||||
return &ts->imapaint.paint;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,8 +186,7 @@ Paint *BKE_paint_get_active_from_context(const bContext *C)
|
||||
case OB_MODE_EDIT:
|
||||
if (ts->use_uv_sculpt)
|
||||
return &ts->uvsculpt->paint;
|
||||
else
|
||||
return &ts->imapaint.paint;
|
||||
return &ts->imapaint.paint;
|
||||
default:
|
||||
return &ts->imapaint.paint;
|
||||
}
|
||||
@@ -238,8 +236,7 @@ PaintMode BKE_paintmode_get_active_from_context(const bContext *C)
|
||||
case OB_MODE_EDIT:
|
||||
if (ts->use_uv_sculpt)
|
||||
return PAINT_SCULPT_UV;
|
||||
else
|
||||
return PAINT_TEXTURE_2D;
|
||||
return PAINT_TEXTURE_2D;
|
||||
default:
|
||||
return PAINT_TEXTURE_2D;
|
||||
}
|
||||
|
||||
@@ -602,7 +602,7 @@ void BKE_rigidbody_validate_sim_constraint(RigidBodyWorld *rbw, Object *ob, shor
|
||||
RB_constraint_set_damping_6dof_spring(rbc->physics_constraint, RB_LIMIT_LIN_Z, rbc->spring_damping_z);
|
||||
|
||||
RB_constraint_set_equilibrium_6dof_spring(rbc->physics_constraint);
|
||||
/* fall through */
|
||||
/* fall-through */
|
||||
case RBC_TYPE_6DOF:
|
||||
if (rbc->type == RBC_TYPE_6DOF) /* a litte awkward but avoids duplicate code for limits */
|
||||
rbc->physics_constraint = RB_constraint_new_6dof(loc, rot, rb1, rb2);
|
||||
|
||||
@@ -1607,6 +1607,7 @@ void txt_print_undo(Text *text)
|
||||
c_len = BLI_str_utf8_from_unicode(uc, c);
|
||||
c[c_len] = '\0';
|
||||
puts(c);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1850,6 +1851,7 @@ static unsigned int txt_undo_read_unicode(const char *undo_buf, int *undo_pos, s
|
||||
/* should never happen */
|
||||
BLI_assert(0);
|
||||
unicode = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
return unicode;
|
||||
@@ -1925,6 +1927,7 @@ static unsigned int txt_redo_read_unicode(const char *undo_buf, int *undo_pos, s
|
||||
/* should never happen */
|
||||
BLI_assert(0);
|
||||
unicode = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
return unicode;
|
||||
|
||||
@@ -877,6 +877,7 @@ static int start_ffmpeg_impl(struct RenderData *rd, int rectx, int recty, Report
|
||||
break;
|
||||
case FFMPEG_MP3:
|
||||
fmt->audio_codec = CODEC_ID_MP3;
|
||||
/* fall-through */
|
||||
case FFMPEG_WAV:
|
||||
fmt->video_codec = CODEC_ID_NONE;
|
||||
break;
|
||||
|
||||
@@ -150,6 +150,7 @@ void rgb_to_ycc(float r, float g, float b, float *ly, float *lcb, float *lcr, in
|
||||
break;
|
||||
default:
|
||||
assert(!"invalid colorspace");
|
||||
break;
|
||||
}
|
||||
|
||||
*ly = y;
|
||||
@@ -183,7 +184,8 @@ void ycc_to_rgb(float y, float cb, float cr, float *lr, float *lg, float *lb, in
|
||||
b = y + 1.772f * cb - 226.816f;
|
||||
break;
|
||||
default:
|
||||
assert(!"invalid colorspace");
|
||||
BLI_assert(0);
|
||||
break;
|
||||
}
|
||||
*lr = r / 255.0f;
|
||||
*lg = g / 255.0f;
|
||||
|
||||
@@ -839,6 +839,7 @@ void orthogonalize_m3(float mat[3][3], int axis)
|
||||
break;
|
||||
default:
|
||||
BLI_assert(0);
|
||||
break;
|
||||
}
|
||||
mul_v3_fl(mat[0], size[0]);
|
||||
mul_v3_fl(mat[1], size[1]);
|
||||
@@ -922,6 +923,7 @@ void orthogonalize_m4(float mat[4][4], int axis)
|
||||
break;
|
||||
default:
|
||||
BLI_assert(0);
|
||||
break;
|
||||
}
|
||||
mul_v3_fl(mat[0], size[0]);
|
||||
mul_v3_fl(mat[1], size[1]);
|
||||
|
||||
@@ -857,7 +857,8 @@ void single_axis_angle_to_mat3(float mat[3][3], const char axis, const float ang
|
||||
mat[2][2] = 1.0f;
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
BLI_assert(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1252,6 +1252,7 @@ void voronoi(float x, float y, float z, float *da, float *pa, float me, int dtyp
|
||||
case 0:
|
||||
default:
|
||||
distfunc = dist_Real;
|
||||
break;
|
||||
}
|
||||
|
||||
xi = (int)(floor(x));
|
||||
@@ -1467,6 +1468,7 @@ float BLI_gNoise(float noisesize, float x, float y, float z, int hard, int noise
|
||||
x += 1;
|
||||
y += 1;
|
||||
z += 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1522,6 +1524,7 @@ float BLI_gTurbulence(float noisesize, float x, float y, float z, int oct, int h
|
||||
x += 1;
|
||||
y += 1;
|
||||
z += 1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (noisesize != 0.0f) {
|
||||
@@ -1596,6 +1599,7 @@ float mg_fBm(float x, float y, float z, float H, float lacunarity, float octaves
|
||||
default:
|
||||
{
|
||||
noisefunc = orgBlenderNoiseS;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1667,6 +1671,7 @@ float mg_MultiFractal(float x, float y, float z, float H, float lacunarity, floa
|
||||
default:
|
||||
{
|
||||
noisefunc = orgBlenderNoiseS;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1734,6 +1739,7 @@ float mg_HeteroTerrain(float x, float y, float z, float H, float lacunarity, flo
|
||||
default:
|
||||
{
|
||||
noisefunc = orgBlenderNoiseS;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1808,6 +1814,7 @@ float mg_HybridMultiFractal(float x, float y, float z, float H, float lacunarity
|
||||
default:
|
||||
{
|
||||
noisefunc = orgBlenderNoiseS;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1884,6 +1891,7 @@ float mg_RidgedMultiFractal(float x, float y, float z, float H, float lacunarity
|
||||
default:
|
||||
{
|
||||
noisefunc = orgBlenderNoiseS;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1950,6 +1958,7 @@ float mg_VLNoise(float x, float y, float z, float distortion, int nbas1, int nba
|
||||
default:
|
||||
{
|
||||
noisefunc1 = orgBlenderNoiseS;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1985,6 +1994,7 @@ float mg_VLNoise(float x, float y, float z, float distortion, int nbas1, int nba
|
||||
default:
|
||||
{
|
||||
noisefunc2 = orgBlenderNoiseS;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1228,6 +1228,7 @@ const char *BLI_get_folder(int folder_id, const char *subfolder)
|
||||
|
||||
default:
|
||||
BLI_assert(0);
|
||||
break;
|
||||
}
|
||||
|
||||
return path;
|
||||
@@ -1256,7 +1257,9 @@ const char *BLI_get_user_folder_notest(int folder_id, const char *subfolder)
|
||||
break;
|
||||
default:
|
||||
BLI_assert(0);
|
||||
break;
|
||||
}
|
||||
|
||||
if ('\0' == path[0]) {
|
||||
return NULL;
|
||||
}
|
||||
@@ -1306,6 +1309,7 @@ const char *BLI_get_folder_version(const int id, const int ver, const bool do_ch
|
||||
path[0] = '\0'; /* in case do_check is false */
|
||||
ok = false;
|
||||
BLI_assert(!"incorrect ID");
|
||||
break;
|
||||
}
|
||||
|
||||
if (!ok && do_check) {
|
||||
|
||||
@@ -240,6 +240,7 @@ size_t BLI_strescape(char *__restrict dst, const char *__restrict src, const siz
|
||||
goto escape_finish;
|
||||
case '\\':
|
||||
case '"':
|
||||
/* fall-through */
|
||||
|
||||
/* less common but should also be support */
|
||||
case '\t':
|
||||
@@ -253,9 +254,10 @@ size_t BLI_strescape(char *__restrict dst, const char *__restrict src, const siz
|
||||
/* not enough space to escape */
|
||||
break;
|
||||
}
|
||||
/* intentionally pass through */
|
||||
/* fall-through */
|
||||
default:
|
||||
*dst = *src;
|
||||
break;
|
||||
}
|
||||
dst++;
|
||||
src++;
|
||||
|
||||
@@ -853,6 +853,7 @@ void BM_elem_attrs_copy_ex(BMesh *bm_src, BMesh *bm_dst, const void *ele_src_v,
|
||||
break;
|
||||
default:
|
||||
BLI_assert(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -502,6 +502,7 @@ int bmesh_elem_check(void *element, const char htype)
|
||||
}
|
||||
default:
|
||||
BLI_assert(0);
|
||||
break;
|
||||
}
|
||||
|
||||
BMESH_ASSERT(err == 0);
|
||||
|
||||
@@ -1890,6 +1890,7 @@ float bmesh_subd_falloff_calc(const int falloff, float val)
|
||||
break;
|
||||
default:
|
||||
BLI_assert(0);
|
||||
break;
|
||||
}
|
||||
|
||||
return val;
|
||||
|
||||
@@ -262,6 +262,7 @@ void bmo_similar_faces_exec(BMesh *bm, BMOperator *op)
|
||||
#endif
|
||||
default:
|
||||
BLI_assert(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -495,6 +496,7 @@ void bmo_similar_edges_exec(BMesh *bm, BMOperator *op)
|
||||
#endif
|
||||
default:
|
||||
BLI_assert(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -627,6 +629,7 @@ void bmo_similar_verts_exec(BMesh *bm, BMOperator *op)
|
||||
break;
|
||||
default:
|
||||
BLI_assert(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -121,10 +121,12 @@ float *BlurBaseOperation::make_dist_fac_inverse(int rad, int falloff)
|
||||
val = val * val;
|
||||
break;
|
||||
case PROP_LIN:
|
||||
/* fall-through */
|
||||
#ifndef NDEBUG
|
||||
/* uninitialized! */
|
||||
case -1:
|
||||
/* uninitialized! */
|
||||
BLI_assert(0);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
/* nothing */
|
||||
|
||||
@@ -574,8 +574,7 @@ static void *acf_scene_setting_ptr(bAnimListElem *ale, int setting, short *type)
|
||||
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
|
||||
if (scene->adt)
|
||||
return GET_ACF_FLAG_PTR(scene->adt->flag, type);
|
||||
else
|
||||
return NULL;
|
||||
return NULL;
|
||||
|
||||
default: /* unsupported */
|
||||
return NULL;
|
||||
@@ -719,9 +718,8 @@ static void *acf_object_setting_ptr(bAnimListElem *ale, int setting, short *type
|
||||
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
|
||||
if (ob->adt)
|
||||
return GET_ACF_FLAG_PTR(ob->adt->flag, type);
|
||||
else
|
||||
return NULL;
|
||||
|
||||
return NULL;
|
||||
|
||||
default: /* unsupported */
|
||||
return NULL;
|
||||
}
|
||||
@@ -1053,9 +1051,8 @@ static void *acf_fillactd_setting_ptr(bAnimListElem *ale, int setting, short *ty
|
||||
if (adt) {
|
||||
return GET_ACF_FLAG_PTR(adt->flag, type);
|
||||
}
|
||||
else
|
||||
return NULL;
|
||||
|
||||
return NULL;
|
||||
|
||||
case ACHANNEL_SETTING_EXPAND: /* expanded */
|
||||
return GET_ACF_FLAG_PTR(act->flag, type);
|
||||
|
||||
@@ -1213,9 +1210,8 @@ static void *acf_dsmat_setting_ptr(bAnimListElem *ale, int setting, short *type)
|
||||
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
|
||||
if (ma->adt)
|
||||
return GET_ACF_FLAG_PTR(ma->adt->flag, type);
|
||||
else
|
||||
return NULL;
|
||||
|
||||
return NULL;
|
||||
|
||||
default: /* unsupported */
|
||||
return NULL;
|
||||
}
|
||||
@@ -1290,8 +1286,7 @@ static void *acf_dslam_setting_ptr(bAnimListElem *ale, int setting, short *type)
|
||||
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
|
||||
if (la->adt)
|
||||
return GET_ACF_FLAG_PTR(la->adt->flag, type);
|
||||
else
|
||||
return NULL;
|
||||
return NULL;
|
||||
|
||||
default: /* unsupported */
|
||||
return NULL;
|
||||
@@ -1374,8 +1369,7 @@ static void *acf_dstex_setting_ptr(bAnimListElem *ale, int setting, short *type)
|
||||
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
|
||||
if (tex->adt)
|
||||
return GET_ACF_FLAG_PTR(tex->adt->flag, type);
|
||||
else
|
||||
return NULL;
|
||||
return NULL;
|
||||
|
||||
default: /* unsupported */
|
||||
return NULL;
|
||||
@@ -1451,8 +1445,7 @@ static void *acf_dscam_setting_ptr(bAnimListElem *ale, int setting, short *type)
|
||||
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
|
||||
if (ca->adt)
|
||||
return GET_ACF_FLAG_PTR(ca->adt->flag, type);
|
||||
else
|
||||
return NULL;
|
||||
return NULL;
|
||||
|
||||
default: /* unsupported */
|
||||
return NULL;
|
||||
@@ -1538,8 +1531,7 @@ static void *acf_dscur_setting_ptr(bAnimListElem *ale, int setting, short *type)
|
||||
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
|
||||
if (cu->adt)
|
||||
return GET_ACF_FLAG_PTR(cu->adt->flag, type);
|
||||
else
|
||||
return NULL;
|
||||
return NULL;
|
||||
|
||||
default: /* unsupported */
|
||||
return NULL;
|
||||
@@ -1615,8 +1607,7 @@ static void *acf_dsskey_setting_ptr(bAnimListElem *ale, int setting, short *type
|
||||
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
|
||||
if (key->adt)
|
||||
return GET_ACF_FLAG_PTR(key->adt->flag, type);
|
||||
else
|
||||
return NULL;
|
||||
return NULL;
|
||||
|
||||
default: /* unsupported */
|
||||
return NULL;
|
||||
@@ -1692,8 +1683,7 @@ static void *acf_dswor_setting_ptr(bAnimListElem *ale, int setting, short *type)
|
||||
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
|
||||
if (wo->adt)
|
||||
return GET_ACF_FLAG_PTR(wo->adt->flag, type);
|
||||
else
|
||||
return NULL;
|
||||
return NULL;
|
||||
|
||||
default: /* unsupported */
|
||||
return NULL;
|
||||
@@ -1769,8 +1759,7 @@ static void *acf_dspart_setting_ptr(bAnimListElem *ale, int setting, short *type
|
||||
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
|
||||
if (part->adt)
|
||||
return GET_ACF_FLAG_PTR(part->adt->flag, type);
|
||||
else
|
||||
return NULL;
|
||||
return NULL;
|
||||
|
||||
default: /* unsupported */
|
||||
return NULL;
|
||||
@@ -1846,8 +1835,7 @@ static void *acf_dsmball_setting_ptr(bAnimListElem *ale, int setting, short *typ
|
||||
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
|
||||
if (mb->adt)
|
||||
return GET_ACF_FLAG_PTR(mb->adt->flag, type);
|
||||
else
|
||||
return NULL;
|
||||
return NULL;
|
||||
|
||||
default: /* unsupported */
|
||||
return NULL;
|
||||
@@ -1923,8 +1911,7 @@ static void *acf_dsarm_setting_ptr(bAnimListElem *ale, int setting, short *type)
|
||||
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
|
||||
if (arm->adt)
|
||||
return GET_ACF_FLAG_PTR(arm->adt->flag, type);
|
||||
else
|
||||
return NULL;
|
||||
return NULL;
|
||||
|
||||
default: /* unsupported */
|
||||
return NULL;
|
||||
@@ -2011,8 +1998,7 @@ static void *acf_dsntree_setting_ptr(bAnimListElem *ale, int setting, short *typ
|
||||
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
|
||||
if (ntree->adt)
|
||||
return GET_ACF_FLAG_PTR(ntree->adt->flag, type);
|
||||
else
|
||||
return NULL;
|
||||
return NULL;
|
||||
|
||||
default: /* unsupported */
|
||||
return NULL;
|
||||
@@ -2088,8 +2074,7 @@ static void *acf_dslinestyle_setting_ptr(bAnimListElem *ale, int setting, short
|
||||
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
|
||||
if (linestyle->adt)
|
||||
return GET_ACF_FLAG_PTR(linestyle->adt->flag, type);
|
||||
else
|
||||
return NULL;
|
||||
return NULL;
|
||||
|
||||
default: /* unsupported */
|
||||
return NULL;
|
||||
@@ -2165,8 +2150,7 @@ static void *acf_dsmesh_setting_ptr(bAnimListElem *ale, int setting, short *type
|
||||
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
|
||||
if (me->adt)
|
||||
return GET_ACF_FLAG_PTR(me->adt->flag, type);
|
||||
else
|
||||
return NULL;
|
||||
return NULL;
|
||||
|
||||
default: /* unsupported */
|
||||
return NULL;
|
||||
@@ -2242,8 +2226,7 @@ static void *acf_dslat_setting_ptr(bAnimListElem *ale, int setting, short *type)
|
||||
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
|
||||
if (lt->adt)
|
||||
return GET_ACF_FLAG_PTR(lt->adt->flag, type);
|
||||
else
|
||||
return NULL;
|
||||
return NULL;
|
||||
|
||||
default: /* unsupported */
|
||||
return NULL;
|
||||
@@ -2319,8 +2302,7 @@ static void *acf_dsspk_setting_ptr(bAnimListElem *ale, int setting, short *type)
|
||||
case ACHANNEL_SETTING_VISIBLE: /* visible (for Graph Editor only) */
|
||||
if (spk->adt)
|
||||
return GET_ACF_FLAG_PTR(spk->adt->flag, type);
|
||||
else
|
||||
return NULL;
|
||||
return NULL;
|
||||
|
||||
default: /* unsupported */
|
||||
return NULL;
|
||||
@@ -3439,6 +3421,7 @@ static void draw_setting_widget(bAnimContext *ac, bAnimListElem *ale, bAnimChann
|
||||
case ACHANNEL_SETTING_EXPAND: /* expanding - cannot flush, otherwise all would open/close at once */
|
||||
default:
|
||||
uiButSetFunc(but, achannel_setting_widget_cb, NULL, NULL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2576,6 +2576,7 @@ static int mouse_anim_channels(bAnimContext *ac, float UNUSED(x), int channel_in
|
||||
default:
|
||||
if (G.debug & G_DEBUG)
|
||||
printf("Error: Invalid channel type in mouse_anim_channels()\n");
|
||||
break;
|
||||
}
|
||||
|
||||
/* free channels */
|
||||
|
||||
@@ -763,7 +763,6 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, const wmEvent *even
|
||||
MarkerMove *mm = op->customdata;
|
||||
View2D *v2d = UI_view2d_fromcontext(C);
|
||||
TimeMarker *marker, *selmarker = NULL;
|
||||
float dx, fac;
|
||||
char str[256];
|
||||
|
||||
switch (event->type) {
|
||||
@@ -791,6 +790,9 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, const wmEvent *even
|
||||
}
|
||||
break;
|
||||
case MOUSEMOVE:
|
||||
{
|
||||
float dx, fac;
|
||||
|
||||
if (hasNumInput(&mm->num))
|
||||
break;
|
||||
|
||||
@@ -863,6 +865,8 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, const wmEvent *even
|
||||
|
||||
ED_area_headerprint(CTX_wm_area(C), str);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (event->val == KM_PRESS) {
|
||||
|
||||
@@ -1962,10 +1962,11 @@ short id_frame_has_keyframe(ID *id, float frame, short filter)
|
||||
return object_frame_has_keyframe((Object *)id, frame, filter);
|
||||
break;
|
||||
|
||||
case ID_SCE: /* scene */
|
||||
#if 0
|
||||
// XXX TODO... for now, just use 'normal' behavior
|
||||
// break;
|
||||
|
||||
case ID_SCE: /* scene */
|
||||
break;
|
||||
#endif
|
||||
default: /* 'normal type' */
|
||||
{
|
||||
AnimData *adt = BKE_animdata_from_id(id);
|
||||
|
||||
@@ -2525,6 +2525,7 @@ void ui_check_but(uiBut *but)
|
||||
break;
|
||||
default:
|
||||
BLI_strncpy(but->drawstr, but->str, UI_MAX_DRAW_STR);
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -2183,7 +2183,7 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
|
||||
ui_searchbox_event(C, data->searchbox, but, event);
|
||||
break;
|
||||
}
|
||||
/* pass on purposedly */
|
||||
/* fall-through */
|
||||
case ENDKEY:
|
||||
ui_textedit_move(but, data, STRCUR_DIR_NEXT,
|
||||
event->shift, STRCUR_JUMP_ALL);
|
||||
@@ -2198,7 +2198,7 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
|
||||
ui_searchbox_event(C, data->searchbox, but, event);
|
||||
break;
|
||||
}
|
||||
/* pass on purposedly */
|
||||
/* fall-through */
|
||||
case HOMEKEY:
|
||||
ui_textedit_move(but, data, STRCUR_DIR_PREV,
|
||||
event->shift, STRCUR_JUMP_ALL);
|
||||
@@ -3722,6 +3722,7 @@ static bool ui_numedit_but_HSVCUBE(uiBut *but, uiHandleButtonData *data, int mx,
|
||||
break;
|
||||
default:
|
||||
BLI_assert(0);
|
||||
break;
|
||||
}
|
||||
|
||||
hsv_to_rgb_v(hsv, rgb);
|
||||
@@ -3794,6 +3795,7 @@ static void ui_ndofedit_but_HSVCUBE(uiBut *but, uiHandleButtonData *data, wmNDOF
|
||||
break;
|
||||
default:
|
||||
assert(!"invalid hsv type");
|
||||
break;
|
||||
}
|
||||
|
||||
hsv_to_rgb_v(hsv, rgb);
|
||||
@@ -6300,11 +6302,11 @@ static int ui_handle_button_event(bContext *C, const wmEvent *event, uiBut *but)
|
||||
case MIDDLEMOUSE:
|
||||
case MOUSEPAN:
|
||||
button_timers_tooltip_remove(C, but);
|
||||
|
||||
/* pass on purposedly */
|
||||
/* fall-through */
|
||||
default:
|
||||
/* handle button type specific events */
|
||||
retval = ui_do_button(C, block, but, event);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (data->state == BUTTON_STATE_WAIT_RELEASE) {
|
||||
@@ -6354,6 +6356,7 @@ static int ui_handle_button_event(bContext *C, const wmEvent *event, uiBut *but)
|
||||
if (event->customdata == data->flashtimer) {
|
||||
button_activate_state(C, but, BUTTON_STATE_EXIT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2060,6 +2060,7 @@ void ui_draw_gradient(const rcti *rect, const float hsv[3], const int type, cons
|
||||
copy_v3_v3(col1[0], col1[2]);
|
||||
copy_v3_v3(col1[1], col1[2]);
|
||||
copy_v3_v3(col1[3], col1[2]);
|
||||
break;
|
||||
}
|
||||
|
||||
/* old below */
|
||||
@@ -2969,7 +2970,7 @@ static uiWidgetType *widget_type(uiWidgetTypeEnum type)
|
||||
|
||||
case UI_WTYPE_LISTLABEL:
|
||||
wt.wcol_theme = &btheme->tui.wcol_list_item;
|
||||
/* No break, we use usual label code too. */
|
||||
/* fall-through */ /* we use usual label code too. */
|
||||
case UI_WTYPE_LABEL:
|
||||
wt.draw = NULL;
|
||||
break;
|
||||
@@ -3198,9 +3199,9 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct
|
||||
case SEPR:
|
||||
ui_draw_separator(rect, &tui->wcol_menu_item);
|
||||
break;
|
||||
|
||||
default:
|
||||
wt = widget_type(UI_WTYPE_MENU_ITEM);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (but->dt == UI_EMBOSSN) {
|
||||
@@ -3385,6 +3386,7 @@ void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rct
|
||||
|
||||
default:
|
||||
wt = widget_type(UI_WTYPE_REGULAR);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1353,7 +1353,8 @@ void UI_make_axis_color(const unsigned char src_col[3], unsigned char dst_col[3]
|
||||
UI_GetColorPtrBlendShade3ubv(src_col, col, dst_col, 0.5f, -10);
|
||||
break;
|
||||
default:
|
||||
BLI_assert(!"invalid axis arg");
|
||||
BLI_assert(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -655,8 +655,7 @@ static int slide_point_modal(bContext *C, wmOperator *op, const wmEvent *event)
|
||||
if (ELEM(event->type, LEFTSHIFTKEY, RIGHTSHIFTKEY))
|
||||
data->accurate = (event->val == KM_PRESS);
|
||||
|
||||
/* no break! update CV position */
|
||||
|
||||
/* fall-through */ /* update CV position */
|
||||
case MOUSEMOVE:
|
||||
{
|
||||
ScrArea *sa = CTX_wm_area(C);
|
||||
|
||||
@@ -1706,6 +1706,7 @@ bool EDBM_selectmode_toggle(bContext *C, const short selectmode_new,
|
||||
break;
|
||||
default:
|
||||
BLI_assert(0);
|
||||
break;
|
||||
}
|
||||
|
||||
switch (selectmode_new) {
|
||||
|
||||
@@ -1622,6 +1622,7 @@ static int edbm_merge_exec(bContext *C, wmOperator *op)
|
||||
break;
|
||||
default:
|
||||
BLI_assert(0);
|
||||
break;
|
||||
}
|
||||
|
||||
if (!ok) {
|
||||
|
||||
@@ -116,6 +116,7 @@ static CustomData *mesh_customdata_get_type(Mesh *me, const char htype, int *r_t
|
||||
BLI_assert(0);
|
||||
tot = 0;
|
||||
data = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
*r_tot = tot;
|
||||
|
||||
@@ -1501,36 +1501,38 @@ static const char *object_mode_op_string(int mode)
|
||||
|
||||
/* checks the mode to be set is compatible with the object
|
||||
* should be made into a generic function */
|
||||
static int object_mode_set_compat(bContext *UNUSED(C), wmOperator *op, Object *ob)
|
||||
static bool object_mode_set_compat(bContext *UNUSED(C), wmOperator *op, Object *ob)
|
||||
{
|
||||
ObjectMode mode = RNA_enum_get(op->ptr, "mode");
|
||||
|
||||
if (ob) {
|
||||
if (mode == OB_MODE_OBJECT)
|
||||
return 1;
|
||||
return true;
|
||||
|
||||
switch (ob->type) {
|
||||
case OB_MESH:
|
||||
if (mode & (OB_MODE_EDIT | OB_MODE_SCULPT | OB_MODE_VERTEX_PAINT | OB_MODE_WEIGHT_PAINT | OB_MODE_TEXTURE_PAINT | OB_MODE_PARTICLE_EDIT))
|
||||
return 1;
|
||||
return 0;
|
||||
return true;
|
||||
break;
|
||||
case OB_CURVE:
|
||||
case OB_SURF:
|
||||
case OB_FONT:
|
||||
case OB_MBALL:
|
||||
if (mode & (OB_MODE_EDIT))
|
||||
return 1;
|
||||
return 0;
|
||||
return true;
|
||||
break;
|
||||
case OB_LATTICE:
|
||||
if (mode & (OB_MODE_EDIT | OB_MODE_WEIGHT_PAINT))
|
||||
return 1;
|
||||
return true;
|
||||
break;
|
||||
case OB_ARMATURE:
|
||||
if (mode & (OB_MODE_EDIT | OB_MODE_POSE))
|
||||
return 1;
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
static int object_mode_set_exec(bContext *C, wmOperator *op)
|
||||
|
||||
@@ -318,12 +318,10 @@ static bool object_hook_index_array(Scene *scene, Object *obedit, int *tot, int
|
||||
BKE_editmesh_tessface_calc(em);
|
||||
|
||||
/* check selected vertices first */
|
||||
if (return_editmesh_indexar(em, tot, indexar, cent_r)) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
if (return_editmesh_indexar(em, tot, indexar, cent_r) == 0) {
|
||||
return return_editmesh_vgroup(obedit, em, name, cent_r);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
case OB_CURVE:
|
||||
case OB_SURF:
|
||||
|
||||
@@ -178,7 +178,7 @@ void load_editLatt(Object *obedit)
|
||||
static int lattice_select_random_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Object *obedit = CTX_data_edit_object(C);
|
||||
Lattice *lt = ((Lattice*)obedit->data)->editlatt->latt;
|
||||
Lattice *lt = ((Lattice *)obedit->data)->editlatt->latt;
|
||||
const float randfac = RNA_float_get(op->ptr, "percent") / 100.0f;
|
||||
int tot;
|
||||
BPoint *bp;
|
||||
|
||||
@@ -290,9 +290,7 @@ static bool ED_vgroup_give_parray(ID *id, MDeformVert ***dvert_arr, int *dvert_t
|
||||
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
case ID_LT:
|
||||
{
|
||||
@@ -320,9 +318,7 @@ static bool ED_vgroup_give_parray(ID *id, MDeformVert ***dvert_arr, int *dvert_t
|
||||
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1098,6 +1094,7 @@ static void ED_vgroup_nr_vert_add(Object *ob,
|
||||
|
||||
/* we checked if the vertex was added before so no need to test again, simply add */
|
||||
defvert_add_index_notest(dv, def_nr, weight);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1154,7 +1154,7 @@ static int area_move_modal(bContext *C, wmOperator *op, const wmEvent *event)
|
||||
/* execute the events */
|
||||
switch (event->type) {
|
||||
case MOUSEMOVE:
|
||||
|
||||
{
|
||||
x = RNA_int_get(op->ptr, "x");
|
||||
y = RNA_int_get(op->ptr, "y");
|
||||
|
||||
@@ -1164,9 +1164,9 @@ static int area_move_modal(bContext *C, wmOperator *op, const wmEvent *event)
|
||||
|
||||
area_move_apply(C, op);
|
||||
break;
|
||||
|
||||
}
|
||||
case EVT_MODAL_MAP:
|
||||
|
||||
{
|
||||
switch (event->val) {
|
||||
case KM_MODAL_APPLY:
|
||||
area_move_exit(C, op);
|
||||
@@ -1182,6 +1182,8 @@ static int area_move_modal(bContext *C, wmOperator *op, const wmEvent *event)
|
||||
md->step = 0;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return OPERATOR_RUNNING_MODAL;
|
||||
|
||||
@@ -540,8 +540,9 @@ bool paint_supports_dynamic_size(Brush *br, PaintMode mode)
|
||||
case PAINT_SCULPT:
|
||||
if (sculpt_is_grab_tool(br))
|
||||
return false;
|
||||
break;
|
||||
default:
|
||||
;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -559,8 +560,9 @@ bool paint_supports_smooth_stroke(Brush *br, PaintMode mode)
|
||||
case PAINT_SCULPT:
|
||||
if (sculpt_is_grab_tool(br))
|
||||
return false;
|
||||
break;
|
||||
default:
|
||||
;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -575,6 +577,7 @@ bool paint_supports_dynamic_tex_coords(Brush *br, PaintMode mode)
|
||||
case PAINT_SCULPT:
|
||||
if (sculpt_is_grab_tool(br))
|
||||
return false;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1177,6 +1177,7 @@ static void calc_sculpt_normal(Sculpt *sd, Object *ob,
|
||||
|
||||
case SCULPT_DISP_DIR_AREA:
|
||||
calc_area_normal(sd, ob, an, nodes, totnode);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
@@ -2457,6 +2458,7 @@ static void calc_sculpt_plane(Sculpt *sd, Object *ob, PBVHNode **nodes, int totn
|
||||
|
||||
case SCULPT_DISP_DIR_AREA:
|
||||
calc_area_normal_and_flatten_center(sd, ob, nodes, totnode, an, fc);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -304,6 +304,7 @@ static void action_channel_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa
|
||||
default:
|
||||
if (wmn->data == ND_KEYS)
|
||||
ED_region_tag_redraw(ar);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -351,6 +352,7 @@ static void action_main_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa),
|
||||
default:
|
||||
if (wmn->data == ND_KEYS)
|
||||
ED_region_tag_redraw(ar);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -348,7 +348,7 @@ static void clip_listener(bScreen *UNUSED(sc), ScrArea *sa, wmNotifier *wmn)
|
||||
switch (wmn->data) {
|
||||
case ND_FRAME:
|
||||
clip_scopes_tag_refresh(sa);
|
||||
/* no break! */
|
||||
/* fall-through */
|
||||
|
||||
case ND_FRAME_RANGE:
|
||||
ED_area_tag_redraw(sa);
|
||||
@@ -368,7 +368,7 @@ static void clip_listener(bScreen *UNUSED(sc), ScrArea *sa, wmNotifier *wmn)
|
||||
case NA_EDITED:
|
||||
case NA_EVALUATED:
|
||||
clip_stabilization_tag_refresh(sa);
|
||||
/* no break! */
|
||||
/* fall-through */
|
||||
|
||||
case NA_SELECTED:
|
||||
clip_scopes_tag_refresh(sa);
|
||||
|
||||
@@ -788,8 +788,7 @@ static int slide_marker_modal(bContext *C, wmOperator *op, const wmEvent *event)
|
||||
if (ELEM(event->type, LEFTSHIFTKEY, RIGHTSHIFTKEY))
|
||||
data->accurate = event->val == KM_PRESS;
|
||||
|
||||
/* no break! update area size */
|
||||
|
||||
/* fall-through */
|
||||
case MOUSEMOVE:
|
||||
mdelta[0] = event->mval[0] - data->mval[0];
|
||||
mdelta[1] = event->mval[1] - data->mval[1];
|
||||
|
||||
@@ -535,6 +535,7 @@ FileList *filelist_new(short type)
|
||||
default:
|
||||
p->readf = filelist_read_dir;
|
||||
p->filterf = is_filtered_file;
|
||||
break;
|
||||
|
||||
}
|
||||
return p;
|
||||
@@ -993,6 +994,7 @@ void filelist_sort(struct FileList *filelist, short sort)
|
||||
break;
|
||||
case FILE_SORT_EXTENSION:
|
||||
qsort(filelist->filelist, filelist->numfiles, sizeof(struct direntry), compare_extension);
|
||||
break;
|
||||
}
|
||||
|
||||
filelist_filter(filelist);
|
||||
|
||||
@@ -436,6 +436,7 @@ static void graph_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), AReg
|
||||
default:
|
||||
if (wmn->data == ND_KEYS)
|
||||
ED_region_tag_redraw(ar);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -512,6 +512,7 @@ static void image_listener(bScreen *UNUSED(sc), ScrArea *sa, wmNotifier *wmn)
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -271,6 +271,7 @@ static void info_header_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegi
|
||||
case NC_ID:
|
||||
if (wmn->action == NA_RENAME)
|
||||
ED_region_tag_redraw(ar);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -319,6 +319,7 @@ static int mouse_nla_channels(bAnimContext *ac, float x, int channel_index, shor
|
||||
default:
|
||||
if (G.debug & G_DEBUG)
|
||||
printf("Error: Invalid channel type in mouse_nla_channels()\n");
|
||||
break;
|
||||
}
|
||||
|
||||
/* free channels */
|
||||
|
||||
@@ -307,8 +307,8 @@ static void nla_draw_strip(SpaceNla *snla, AnimData *adt, NlaTrack *nlt, NlaStri
|
||||
glVertex2f(strip->start, yminc);
|
||||
glEnd();
|
||||
}
|
||||
/* no break needed... */
|
||||
|
||||
/* fall-through */
|
||||
|
||||
/* this only draws after the strip */
|
||||
case NLASTRIP_EXTEND_HOLD_FORWARD:
|
||||
/* only need to try and draw if the next strip doesn't occur immediately after */
|
||||
|
||||
@@ -427,6 +427,7 @@ static void nla_main_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARe
|
||||
default:
|
||||
if (wmn->data == ND_KEYS)
|
||||
ED_region_tag_redraw(ar);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -457,10 +458,10 @@ static void nla_channel_area_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa),
|
||||
if (wmn->action == NA_RENAME)
|
||||
ED_region_tag_redraw(ar);
|
||||
break;
|
||||
|
||||
default:
|
||||
if (wmn->data == ND_KEYS)
|
||||
ED_region_tag_redraw(ar);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -929,6 +929,7 @@ static void keymap_type_cb(bContext *C, void *kmi_v, void *UNUSED(arg_v))
|
||||
case OL_KM_SPECIALS:
|
||||
kmi->type = AKEY;
|
||||
kmi->val = KM_PRESS;
|
||||
break;
|
||||
}
|
||||
ED_region_tag_redraw(CTX_wm_region(C));
|
||||
}
|
||||
|
||||
@@ -173,6 +173,7 @@ static void get_seq_color3ubv(Scene *curscene, Sequence *seq, unsigned char col[
|
||||
|
||||
default:
|
||||
col[0] = 10; col[1] = 255; col[2] = 40;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -558,6 +558,7 @@ int seq_effect_find_selected(Scene *scene, Sequence *activeseq, int type, Sequen
|
||||
return 0;
|
||||
}
|
||||
if (seq3 == NULL) seq3 = seq2;
|
||||
break;
|
||||
}
|
||||
|
||||
if (seq1 == NULL && seq2 == NULL && seq3 == NULL) {
|
||||
|
||||
@@ -149,7 +149,7 @@ static void text_listener(bScreen *UNUSED(sc), ScrArea *sa, wmNotifier *wmn)
|
||||
}
|
||||
|
||||
ED_area_tag_redraw(sa);
|
||||
/* no break -- fall down to tag redraw */
|
||||
/* fall-through */ /* fall down to tag redraw */
|
||||
case NA_ADDED:
|
||||
case NA_REMOVED:
|
||||
ED_area_tag_redraw(sa);
|
||||
|
||||
@@ -433,6 +433,7 @@ static int text_autocomplete_modal(bContext *C, wmOperator *op, const wmEvent *e
|
||||
break;
|
||||
case PAGEDOWNKEY:
|
||||
scroll = SUGG_LIST_SIZE - 1;
|
||||
/* fall-through */
|
||||
case WHEELDOWNMOUSE:
|
||||
case DOWNARROWKEY:
|
||||
if (event->val == KM_PRESS) {
|
||||
@@ -460,6 +461,7 @@ static int text_autocomplete_modal(bContext *C, wmOperator *op, const wmEvent *e
|
||||
break;
|
||||
case PAGEUPKEY:
|
||||
scroll = SUGG_LIST_SIZE - 1;
|
||||
/* fall-through */
|
||||
case WHEELUPMOUSE:
|
||||
case UPARROWKEY:
|
||||
if (event->val == KM_PRESS) {
|
||||
|
||||
@@ -201,9 +201,10 @@ static void time_draw_cache(SpaceTime *stime, Object *ob, Scene *scene)
|
||||
col[3] = 0.1;
|
||||
break;
|
||||
default:
|
||||
BLI_assert(0);
|
||||
col[0] = 1.0; col[1] = 0.0; col[2] = 1.0;
|
||||
col[3] = 0.1;
|
||||
BLI_assert(0);
|
||||
break;
|
||||
}
|
||||
glColor4fv(col);
|
||||
|
||||
|
||||
@@ -4430,7 +4430,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
|
||||
copy_m4_m4(imat, rv3d->viewinv);
|
||||
normalize_v3(imat[0]);
|
||||
normalize_v3(imat[1]);
|
||||
/* no break! */
|
||||
/* fall-through */
|
||||
case PART_DRAW_CROSS:
|
||||
case PART_DRAW_AXIS:
|
||||
/* lets calculate the scale: */
|
||||
@@ -4604,6 +4604,8 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
|
||||
break;
|
||||
default:
|
||||
intensity = 1.0f; /* should never happen */
|
||||
BLI_assert(0);
|
||||
break;
|
||||
}
|
||||
CLAMP(intensity, 0.f, 1.f);
|
||||
weight_to_rgb(ma_col, intensity);
|
||||
@@ -6905,6 +6907,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
|
||||
if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) {
|
||||
drawaxes(1.0, OB_ARROWS);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) {
|
||||
|
||||
@@ -518,7 +518,7 @@ static void flyEvent(FlyInfo *fly, const wmEvent *event)
|
||||
#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
|
||||
|
||||
@@ -856,6 +856,7 @@ static void view3d_lasso_select(bContext *C, ViewContext *vc,
|
||||
break;
|
||||
default:
|
||||
assert(!"lasso select on incorrect object type");
|
||||
break;
|
||||
}
|
||||
|
||||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, vc->obedit->data);
|
||||
@@ -2110,6 +2111,7 @@ static int view3d_borderselect_exec(bContext *C, wmOperator *op)
|
||||
break;
|
||||
default:
|
||||
assert(!"border select on incorrect object type");
|
||||
break;
|
||||
}
|
||||
}
|
||||
else { /* no editmode, unified for bones and objects */
|
||||
|
||||
@@ -1432,6 +1432,7 @@ static void drawArrow(ArrowDirection d, short offset, short length, short size)
|
||||
offset = -offset;
|
||||
length = -length;
|
||||
size = -size;
|
||||
/* fall-through */
|
||||
case RIGHT:
|
||||
glBegin(GL_LINES);
|
||||
glVertex2s(offset, 0);
|
||||
@@ -1442,10 +1443,12 @@ static void drawArrow(ArrowDirection d, short offset, short length, short size)
|
||||
glVertex2s(offset + length - size, size);
|
||||
glEnd();
|
||||
break;
|
||||
|
||||
case DOWN:
|
||||
offset = -offset;
|
||||
length = -length;
|
||||
size = -size;
|
||||
/* fall-through */
|
||||
case UP:
|
||||
glBegin(GL_LINES);
|
||||
glVertex2s(0, offset);
|
||||
@@ -1464,6 +1467,7 @@ static void drawArrowHead(ArrowDirection d, short size)
|
||||
switch (d) {
|
||||
case LEFT:
|
||||
size = -size;
|
||||
/* fall-through */
|
||||
case RIGHT:
|
||||
glBegin(GL_LINES);
|
||||
glVertex2s(0, 0);
|
||||
@@ -1472,8 +1476,10 @@ static void drawArrowHead(ArrowDirection d, short size)
|
||||
glVertex2s(-size, size);
|
||||
glEnd();
|
||||
break;
|
||||
|
||||
case DOWN:
|
||||
size = -size;
|
||||
/* fall-through */
|
||||
case UP:
|
||||
glBegin(GL_LINES);
|
||||
glVertex2s(0, 0);
|
||||
@@ -1747,6 +1753,7 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
|
||||
break;
|
||||
default:
|
||||
proportional = PROP_EDIT_OFF;
|
||||
break;
|
||||
}
|
||||
|
||||
// If modal, save settings back in scene if not set as operator argument
|
||||
@@ -2934,6 +2941,7 @@ static void headerResize(TransInfo *t, float vec[3], char *str)
|
||||
case 2:
|
||||
ofs += BLI_snprintf(str + ofs, MAX_INFO_LEN - ofs, IFACE_("Scale: %s : %s : %s%s %s"), &tvec[0],
|
||||
&tvec[NUM_STR_REP_LEN], &tvec[NUM_STR_REP_LEN * 2], t->con.text, t->proptext);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -3900,6 +3908,7 @@ static void headerTranslation(TransInfo *t, float vec[3], char *str)
|
||||
ofs += BLI_snprintf(str + ofs, MAX_INFO_LEN - ofs, "D: %s D: %s D: %s (%s)%s %s %s",
|
||||
&tvec[0], &tvec[NUM_STR_REP_LEN], &tvec[NUM_STR_REP_LEN * 2], distvec,
|
||||
t->con.text, t->proptext, autoik);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -5690,6 +5699,7 @@ int handleEventEdgeSlide(struct TransInfo *t, const struct wmEvent *event)
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
@@ -6222,6 +6232,7 @@ int handleEventVertSlide(struct TransInfo *t, const struct wmEvent *event)
|
||||
calcVertSlideMouseActiveEdges(t, event->mval);
|
||||
}
|
||||
calcVertSlideCustomPoints(t);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -1667,7 +1667,7 @@ void calculateCenter(TransInfo *t)
|
||||
projectIntView(t, t->center, t->center2d);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1803,6 +1803,7 @@ void calculatePropRatio(TransInfo *t)
|
||||
break;
|
||||
default:
|
||||
td->factor = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1830,6 +1831,7 @@ void calculatePropRatio(TransInfo *t)
|
||||
break;
|
||||
default:
|
||||
t->proptext[0] = '\0';
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -602,7 +602,7 @@ int calc_manipulator_stats(const bContext *C)
|
||||
break;
|
||||
}
|
||||
/* if not gimbal, fall through to normal */
|
||||
/* pass through */
|
||||
/* fall-through */
|
||||
}
|
||||
case V3D_MANIP_NORMAL:
|
||||
{
|
||||
@@ -613,7 +613,7 @@ int calc_manipulator_stats(const bContext *C)
|
||||
break;
|
||||
}
|
||||
/* no break we define 'normal' as 'local' in Object mode */
|
||||
/* pass through */
|
||||
/* fall-through */
|
||||
}
|
||||
case V3D_MANIP_LOCAL:
|
||||
{
|
||||
@@ -840,7 +840,8 @@ static void manipulator_setcolor(View3D *v3d, char axis, int colcode, unsigned c
|
||||
UI_GetThemeColor3ubv(TH_AXIS_Z, col);
|
||||
break;
|
||||
default:
|
||||
BLI_assert(!"invalid axis arg");
|
||||
BLI_assert(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -466,14 +466,14 @@ void initTransformOrientation(bContext *C, TransInfo *t)
|
||||
strcpy(t->spacename, IFACE_("gimbal"));
|
||||
break;
|
||||
}
|
||||
/* no gimbal fallthrough to normal */
|
||||
/* fall-through */ /* no gimbal fallthrough to normal */
|
||||
case V3D_MANIP_NORMAL:
|
||||
if (obedit || (ob && ob->mode & OB_MODE_POSE)) {
|
||||
strcpy(t->spacename, IFACE_("normal"));
|
||||
ED_getTransformOrientationMatrix(C, t->spacemtx, (v3d->around == V3D_ACTIVE));
|
||||
break;
|
||||
}
|
||||
/* no break we define 'normal' as 'local' in Object mode */
|
||||
/* fall-through */ /* we define 'normal' as 'local' in Object mode */
|
||||
case V3D_MANIP_LOCAL:
|
||||
strcpy(t->spacename, IFACE_("local"));
|
||||
|
||||
|
||||
@@ -109,6 +109,7 @@ void outputNumInput(NumInput *n, char *str)
|
||||
break;
|
||||
default:
|
||||
BLI_snprintf(&str[j * ln], ln, "%s%.4e%c", inv, n->val[i], cur);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -201,8 +202,7 @@ char handleNumInput(NumInput *n, const wmEvent *event)
|
||||
n->inv[idx] = 0;
|
||||
}
|
||||
break;
|
||||
case PERIODKEY:
|
||||
case PADPERIOD:
|
||||
case PERIODKEY: case PADPERIOD:
|
||||
if (n->flag & NUM_NO_FRACTION)
|
||||
return 0;
|
||||
|
||||
@@ -213,11 +213,13 @@ char handleNumInput(NumInput *n, const wmEvent *event)
|
||||
break;
|
||||
case -1:
|
||||
n->ctrl[idx] = -10;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case PADMINUS:
|
||||
if (event->alt)
|
||||
break;
|
||||
/* fall-through */
|
||||
case MINUSKEY:
|
||||
if (n->flag & NUM_NO_NEGATIVE)
|
||||
return 0;
|
||||
@@ -229,8 +231,7 @@ char handleNumInput(NumInput *n, const wmEvent *event)
|
||||
else
|
||||
n->ctrl[idx] = -1;
|
||||
break;
|
||||
case PADSLASHKEY:
|
||||
case SLASHKEY:
|
||||
case PADSLASHKEY: case SLASHKEY:
|
||||
if (n->flag & NUM_NO_FRACTION)
|
||||
return 0;
|
||||
|
||||
@@ -245,35 +246,34 @@ char handleNumInput(NumInput *n, const wmEvent *event)
|
||||
idx = 0;
|
||||
n->idx = idx;
|
||||
break;
|
||||
case PAD9:
|
||||
case NINEKEY:
|
||||
case PAD9: case NINEKEY:
|
||||
Val += 1.0f;
|
||||
case PAD8:
|
||||
case EIGHTKEY:
|
||||
/* fall-through */
|
||||
case PAD8: case EIGHTKEY:
|
||||
Val += 1.0f;
|
||||
case PAD7:
|
||||
case SEVENKEY:
|
||||
/* fall-through */
|
||||
case PAD7: case SEVENKEY:
|
||||
Val += 1.0f;
|
||||
case PAD6:
|
||||
case SIXKEY:
|
||||
/* fall-through */
|
||||
case PAD6: case SIXKEY:
|
||||
Val += 1.0f;
|
||||
case PAD5:
|
||||
case FIVEKEY:
|
||||
/* fall-through */
|
||||
case PAD5: case FIVEKEY:
|
||||
Val += 1.0f;
|
||||
case PAD4:
|
||||
case FOURKEY:
|
||||
/* fall-through */
|
||||
case PAD4: case FOURKEY:
|
||||
Val += 1.0f;
|
||||
case PAD3:
|
||||
case THREEKEY:
|
||||
/* fall-through */
|
||||
case PAD3: case THREEKEY:
|
||||
Val += 1.0f;
|
||||
case PAD2:
|
||||
case TWOKEY:
|
||||
/* fall-through */
|
||||
case PAD2: case TWOKEY:
|
||||
Val += 1.0f;
|
||||
case PAD1:
|
||||
case ONEKEY:
|
||||
/* fall-through */
|
||||
case PAD1: case ONEKEY:
|
||||
Val += 1.0f;
|
||||
case PAD0:
|
||||
case ZEROKEY:
|
||||
/* fall-through */
|
||||
case PAD0: case ZEROKEY:
|
||||
if (!n->ctrl[idx])
|
||||
n->ctrl[idx] = 1;
|
||||
|
||||
|
||||
@@ -1470,6 +1470,7 @@ static int convertRGBAToLogElement(float *src, float *dst, LogImageFile *logImag
|
||||
case descriptor_YA: /* this descriptor is for internal use only */
|
||||
default:
|
||||
rvalue = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (srcIsLinearRGB != 0) {
|
||||
|
||||
@@ -1094,6 +1094,7 @@ const char *IMB_colormanagement_role_colorspace_name_get(int role)
|
||||
default:
|
||||
printf("Unknown role was passed to %s\n", __func__);
|
||||
BLI_assert(0);
|
||||
break;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
||||
@@ -366,6 +366,7 @@ static ImBuf *ibJpegImageFromCinfo(struct jpeg_decompress_struct *cinfo, int fla
|
||||
rect[0] = r;
|
||||
rect += 4;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -549,7 +550,8 @@ next_stamp_info:
|
||||
break;
|
||||
/* default was missing... intentional ? */
|
||||
default:
|
||||
; /* do nothing */
|
||||
/* do nothing */
|
||||
break;
|
||||
}
|
||||
|
||||
jpeg_write_scanlines(cinfo, row_pointer, 1);
|
||||
@@ -594,7 +596,8 @@ static int init_jpeg(FILE *outfile, struct jpeg_compress_struct *cinfo, struct I
|
||||
break;
|
||||
/* default was missing... intentional ? */
|
||||
default:
|
||||
; /* do nothing */
|
||||
/* do nothing */
|
||||
break;
|
||||
}
|
||||
jpeg_set_defaults(cinfo);
|
||||
|
||||
|
||||
@@ -567,6 +567,7 @@ ImBuf *imb_loadpng(unsigned char *mem, size_t size, int flags, char colorspace[I
|
||||
default:
|
||||
printf("PNG format not supported\n");
|
||||
longjmp(png_jmpbuf(png_ptr), 1);
|
||||
break;
|
||||
}
|
||||
|
||||
ibuf = IMB_allocImBuf(width, height, 8 * bytesperpixel, 0);
|
||||
|
||||
@@ -184,9 +184,8 @@ static void valuefn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
|
||||
}
|
||||
default:
|
||||
{
|
||||
fprintf(stderr,
|
||||
"%s:%d: unhandeld value in switch statement: %d\n",
|
||||
__FILE__, __LINE__, node->custom1);
|
||||
BLI_assert(0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -507,6 +507,7 @@ static int bpy_slot_from_py(BMesh *bm, BMOperator *bmop, BMOpSlot *slot, PyObjec
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
/* fall-through */
|
||||
}
|
||||
default:
|
||||
/* TODO --- many others */
|
||||
|
||||
@@ -704,6 +704,7 @@ PyObject *pyrna_math_object_from_array(PointerRNA *ptr, PropertyRNA *prop)
|
||||
ret = col_cb; /* return the color instead */
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -776,7 +777,8 @@ static PyObject *pyrna_struct_richcmp(PyObject *a, PyObject *b, int op)
|
||||
|
||||
switch (op) {
|
||||
case Py_NE:
|
||||
ok = !ok; /* pass through */
|
||||
ok = !ok;
|
||||
/* fall-through */
|
||||
case Py_EQ:
|
||||
res = ok ? Py_False : Py_True;
|
||||
break;
|
||||
@@ -805,7 +807,8 @@ static PyObject *pyrna_prop_richcmp(PyObject *a, PyObject *b, int op)
|
||||
|
||||
switch (op) {
|
||||
case Py_NE:
|
||||
ok = !ok; /* pass through */
|
||||
ok = !ok;
|
||||
/* fall-through */
|
||||
case Py_EQ:
|
||||
res = ok ? Py_False : Py_True;
|
||||
break;
|
||||
@@ -2380,6 +2383,7 @@ static PyObject *pyrna_prop_array_subscript_slice(BPy_PropertyArrayRNA *self, Po
|
||||
PyErr_SetString(PyExc_TypeError, "not an array type");
|
||||
Py_DECREF(tuple);
|
||||
tuple = NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return tuple;
|
||||
@@ -2719,6 +2723,7 @@ static int prop_subscript_ass_array_slice(PointerRNA *ptr, PropertyRNA *prop,
|
||||
default:
|
||||
PyErr_SetString(PyExc_TypeError, "not an array type");
|
||||
ret = -1;
|
||||
break;
|
||||
}
|
||||
|
||||
Py_DECREF(value);
|
||||
@@ -3588,6 +3593,7 @@ static PyObject *pyrna_struct_getattro(BPy_StructRNA *self, PyObject *pyname)
|
||||
"bpy_struct: Context type invalid %d, can't get \"%.200s\" from context",
|
||||
newtype, name);
|
||||
ret = NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (done == -1) { /* found but not set */
|
||||
@@ -4863,13 +4869,13 @@ static PyObject *pyrna_param_to_py(PointerRNA *ptr, PropertyRNA *prop, void *dat
|
||||
ret = Matrix_CreatePyObject(data, 3, 3, Py_NEW, NULL);
|
||||
break;
|
||||
}
|
||||
/* pass through */
|
||||
/* fall-through */
|
||||
#endif
|
||||
default:
|
||||
ret = PyTuple_New(len);
|
||||
for (a = 0; a < len; a++)
|
||||
PyTuple_SET_ITEM(ret, a, PyFloat_FromDouble(((float *)data)[a]));
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -7001,21 +7007,23 @@ static int bpy_class_validate_recursive(PointerRNA *dummyptr, StructRNA *srna, v
|
||||
/* Sneaky workaround to use the class name as the bl_idname */
|
||||
|
||||
#define BPY_REPLACEMENT_STRING(rna_attr, py_attr) \
|
||||
(STREQ(identifier, rna_attr)) { \
|
||||
item = PyObject_GetAttr(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); \
|
||||
} /* intentionally allow else here */
|
||||
else if (STREQ(identifier, rna_attr)) { \
|
||||
if ((item = PyObject_GetAttr(py_class, py_attr))) { \
|
||||
if (item != Py_None) { \
|
||||
if (pyrna_py_to_prop(dummyptr, prop, NULL, \
|
||||
item, "validating class:") != 0) \
|
||||
{ \
|
||||
Py_DECREF(item); \
|
||||
return -1; \
|
||||
} \
|
||||
} \
|
||||
Py_DECREF(item); \
|
||||
} \
|
||||
} /* intentionally allow else here */
|
||||
|
||||
if BPY_REPLACEMENT_STRING("bl_idname", bpy_intern_str___name__)
|
||||
else if BPY_REPLACEMENT_STRING("bl_description", bpy_intern_str___doc__)
|
||||
if (false) {} /* needed for macro */
|
||||
BPY_REPLACEMENT_STRING("bl_idname", bpy_intern_str___name__)
|
||||
BPY_REPLACEMENT_STRING("bl_description", bpy_intern_str___doc__)
|
||||
|
||||
#undef BPY_REPLACEMENT_STRING
|
||||
|
||||
|
||||
@@ -580,6 +580,7 @@ int pyrna_py_to_array(PointerRNA *ptr, PropertyRNA *prop, char *param_data,
|
||||
default:
|
||||
PyErr_SetString(PyExc_TypeError, "not an array type");
|
||||
ret = -1;
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -605,6 +606,7 @@ int pyrna_py_to_array_index(PointerRNA *ptr, PropertyRNA *prop, int arraydim, in
|
||||
default:
|
||||
PyErr_SetString(PyExc_TypeError, "not an array type");
|
||||
ret = -1;
|
||||
break;
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -627,6 +629,7 @@ PyObject *pyrna_array_index(PointerRNA *ptr, PropertyRNA *prop, int index)
|
||||
default:
|
||||
PyErr_SetString(PyExc_TypeError, "not an array type");
|
||||
item = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
return item;
|
||||
|
||||
@@ -170,7 +170,8 @@ static PyObject *Color_richcmpr(PyObject *a, PyObject *b, int op)
|
||||
|
||||
switch (op) {
|
||||
case Py_NE:
|
||||
ok = !ok; /* pass through */
|
||||
ok = !ok;
|
||||
/* fall-through */
|
||||
case Py_EQ:
|
||||
res = ok ? Py_False : Py_True;
|
||||
break;
|
||||
|
||||
@@ -64,7 +64,7 @@ static PyObject *Euler_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||
case 2:
|
||||
if ((order = euler_order_from_string(order_str, "mathutils.Euler()")) == -1)
|
||||
return NULL;
|
||||
/* intentionally pass through */
|
||||
/* fall-through */
|
||||
case 1:
|
||||
if (mathutils_array_parse(eul, EULER_SIZE, EULER_SIZE, seq, "mathutils.Euler()") == -1)
|
||||
return NULL;
|
||||
@@ -356,7 +356,8 @@ static PyObject *Euler_richcmpr(PyObject *a, PyObject *b, int op)
|
||||
|
||||
switch (op) {
|
||||
case Py_NE:
|
||||
ok = !ok; /* pass through */
|
||||
ok = !ok;
|
||||
/* fall-through */
|
||||
case Py_EQ:
|
||||
res = ok ? Py_False : Py_True;
|
||||
break;
|
||||
|
||||
@@ -371,6 +371,7 @@ static PyObject *Matrix_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1752,7 +1753,8 @@ static PyObject *Matrix_richcmpr(PyObject *a, PyObject *b, int op)
|
||||
|
||||
switch (op) {
|
||||
case Py_NE:
|
||||
ok = !ok; /* pass through */
|
||||
ok = !ok;
|
||||
/* fall-through */
|
||||
case Py_EQ:
|
||||
res = ok ? Py_False : Py_True;
|
||||
break;
|
||||
|
||||
@@ -529,7 +529,8 @@ static PyObject *Quaternion_richcmpr(PyObject *a, PyObject *b, int op)
|
||||
|
||||
switch (op) {
|
||||
case Py_NE:
|
||||
ok = !ok; /* pass through */
|
||||
ok = !ok;
|
||||
/* fall-through */
|
||||
case Py_EQ:
|
||||
res = ok ? Py_False : Py_True;
|
||||
break;
|
||||
|
||||
@@ -720,8 +720,8 @@ static PyObject *M_Geometry_intersect_line_sphere(PyObject *UNUSED(self), PyObje
|
||||
return NULL;
|
||||
}
|
||||
else {
|
||||
short use_a = TRUE;
|
||||
short use_b = TRUE;
|
||||
bool use_a = true;
|
||||
bool use_b = true;
|
||||
float lambda;
|
||||
|
||||
PyObject *ret = PyTuple_New(2);
|
||||
@@ -729,15 +729,16 @@ static PyObject *M_Geometry_intersect_line_sphere(PyObject *UNUSED(self), PyObje
|
||||
switch (isect_line_sphere_v3(line_a->vec, line_b->vec, sphere_co->vec, sphere_radius, isect_a, isect_b)) {
|
||||
case 1:
|
||||
if (!(!clip || (((lambda = line_point_factor_v3(isect_a, line_a->vec, line_b->vec)) >= 0.0f) && (lambda <= 1.0f)))) use_a = FALSE;
|
||||
use_b = FALSE;
|
||||
use_b = false;
|
||||
break;
|
||||
case 2:
|
||||
if (!(!clip || (((lambda = line_point_factor_v3(isect_a, line_a->vec, line_b->vec)) >= 0.0f) && (lambda <= 1.0f)))) use_a = FALSE;
|
||||
if (!(!clip || (((lambda = line_point_factor_v3(isect_b, line_a->vec, line_b->vec)) >= 0.0f) && (lambda <= 1.0f)))) use_b = FALSE;
|
||||
break;
|
||||
default:
|
||||
use_a = FALSE;
|
||||
use_b = FALSE;
|
||||
use_a = false;
|
||||
use_b = false;
|
||||
break;
|
||||
}
|
||||
|
||||
if (use_a) { PyTuple_SET_ITEM(ret, 0, Vector_CreatePyObject(isect_a, 3, Py_NEW, NULL)); }
|
||||
@@ -811,6 +812,7 @@ static PyObject *M_Geometry_intersect_line_sphere_2d(PyObject *UNUSED(self), PyO
|
||||
default:
|
||||
use_a = false;
|
||||
use_b = false;
|
||||
break;
|
||||
}
|
||||
|
||||
if (use_a) { PyTuple_SET_ITEM(ret, 0, Vector_CreatePyObject(isect_a, 2, Py_NEW, NULL)); }
|
||||
|
||||
@@ -1116,6 +1116,7 @@ static int wm_operator_call_internal(bContext *C, wmOperatorType *ot, PointerRNA
|
||||
break;
|
||||
default:
|
||||
event = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
switch (context) {
|
||||
@@ -1362,40 +1363,17 @@ int WM_userdef_event_map(int kmitype)
|
||||
{
|
||||
switch (kmitype) {
|
||||
case SELECTMOUSE:
|
||||
if (U.flag & USER_LMOUSESELECT)
|
||||
return LEFTMOUSE;
|
||||
else
|
||||
return RIGHTMOUSE;
|
||||
|
||||
return (U.flag & USER_LMOUSESELECT) ? LEFTMOUSE : RIGHTMOUSE;
|
||||
case ACTIONMOUSE:
|
||||
if (U.flag & USER_LMOUSESELECT)
|
||||
return RIGHTMOUSE;
|
||||
else
|
||||
return LEFTMOUSE;
|
||||
|
||||
case WHEELOUTMOUSE:
|
||||
if (U.uiflag & USER_WHEELZOOMDIR)
|
||||
return WHEELUPMOUSE;
|
||||
else
|
||||
return WHEELDOWNMOUSE;
|
||||
|
||||
case WHEELINMOUSE:
|
||||
if (U.uiflag & USER_WHEELZOOMDIR)
|
||||
return WHEELDOWNMOUSE;
|
||||
else
|
||||
return WHEELUPMOUSE;
|
||||
|
||||
return (U.flag & USER_LMOUSESELECT) ? RIGHTMOUSE : LEFTMOUSE;
|
||||
case EVT_TWEAK_A:
|
||||
if (U.flag & USER_LMOUSESELECT)
|
||||
return EVT_TWEAK_R;
|
||||
else
|
||||
return EVT_TWEAK_L;
|
||||
|
||||
return (U.flag & USER_LMOUSESELECT) ? EVT_TWEAK_R : EVT_TWEAK_L;
|
||||
case EVT_TWEAK_S:
|
||||
if (U.flag & USER_LMOUSESELECT)
|
||||
return EVT_TWEAK_L;
|
||||
else
|
||||
return EVT_TWEAK_R;
|
||||
return (U.flag & USER_LMOUSESELECT) ? EVT_TWEAK_L : EVT_TWEAK_R;
|
||||
case WHEELOUTMOUSE:
|
||||
return (U.uiflag & USER_WHEELZOOMDIR) ? WHEELUPMOUSE : WHEELDOWNMOUSE;
|
||||
case WHEELINMOUSE:
|
||||
return (U.uiflag & USER_WHEELZOOMDIR) ? WHEELDOWNMOUSE : WHEELUPMOUSE;
|
||||
}
|
||||
|
||||
return kmitype;
|
||||
|
||||
@@ -404,7 +404,8 @@ static PyObject *KX_PythonSeq_richcmp(PyObject *a, PyObject *b, int op)
|
||||
|
||||
switch (op) {
|
||||
case Py_NE:
|
||||
ok = !ok; /* pass through */
|
||||
ok = !ok;
|
||||
/* fall-through */
|
||||
case Py_EQ:
|
||||
res = ok ? Py_False : Py_True;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user