diff options
-rw-r--r-- | source/blender/blenkernel/BKE_editmesh_bvh.h | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/BKE_image.h | 6 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/cloth.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/paint.c | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/subdiv_ccg.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/text.c | 2 | ||||
-rw-r--r-- | source/blender/blenlib/BLI_math_geom.h | 6 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_250.c | 12 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_legacy.c | 40 | ||||
-rw-r--r-- | source/blender/draw/engines/workbench/workbench_studiolight.c | 2 | ||||
-rw-r--r-- | source/blender/editors/animation/keyframes_draw.c | 3 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 4 | ||||
-rw-r--r-- | source/blender/editors/interface/resources.c | 1 | ||||
-rw-r--r-- | source/blender/editors/object/object_add.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_outliner/outliner_draw.c | 1 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_generics.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_main_api.c | 2 |
17 files changed, 39 insertions, 53 deletions
diff --git a/source/blender/blenkernel/BKE_editmesh_bvh.h b/source/blender/blenkernel/BKE_editmesh_bvh.h index e86408076cd..7c8a9452023 100644 --- a/source/blender/blenkernel/BKE_editmesh_bvh.h +++ b/source/blender/blenkernel/BKE_editmesh_bvh.h @@ -72,8 +72,8 @@ struct BMFace *BKE_bmbvh_ray_cast_filter(BMBVHTree *tree, float *r_dist, float r_hitout[3], float r_cagehit[3], - BMBVHTree_FaceFilter filter, - void *filter_cb); + BMBVHTree_FaceFilter filter_cb, + void *filter_userdata); /* find a vert closest to co in a sphere of radius dist_max */ struct BMVert *BKE_bmbvh_find_vert_closest(BMBVHTree *tree, diff --git a/source/blender/blenkernel/BKE_image.h b/source/blender/blenkernel/BKE_image.h index 234b74eece3..82c831ae8e0 100644 --- a/source/blender/blenkernel/BKE_image.h +++ b/source/blender/blenkernel/BKE_image.h @@ -309,11 +309,11 @@ void BKE_image_get_aspect(struct Image *image, float *aspx, float *aspy); /* image_gen.c */ void BKE_image_buf_fill_color( unsigned char *rect, float *rect_float, int width, int height, const float color[4]); -void BKE_image_buf_fill_checker(unsigned char *rect, float *rect_float, int height, int width); +void BKE_image_buf_fill_checker(unsigned char *rect, float *rect_float, int width, int height); void BKE_image_buf_fill_checker_color(unsigned char *rect, float *rect_float, - int height, - int width); + int width, + int height); /* Cycles hookup */ unsigned char *BKE_image_get_pixels_for_frame(struct Image *image, int frame); diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 63d58f7e32e..463cbd4f378 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -772,7 +772,7 @@ static int cloth_from_object( clmd->clothObject->old_solver_type = 255; clmd->clothObject->edgeset = NULL; } - else if (!clmd->clothObject) { + else { modifier_setError(&(clmd->modifier), "Out of memory on allocating clmd->clothObject"); return 0; } diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c index 983127372ca..143b8debce7 100644 --- a/source/blender/blenkernel/intern/paint.c +++ b/source/blender/blenkernel/intern/paint.c @@ -224,7 +224,6 @@ const EnumPropertyItem *BKE_paint_get_tool_enum_from_paintmode(ePaintMode mode) return rna_enum_brush_image_tool_items; case PAINT_MODE_SCULPT_UV: return rna_enum_brush_uv_sculpt_tool_items; - return NULL; case PAINT_MODE_GPENCIL: return rna_enum_brush_gpencil_types_items; case PAINT_MODE_INVALID: diff --git a/source/blender/blenkernel/intern/subdiv_ccg.c b/source/blender/blenkernel/intern/subdiv_ccg.c index 471cca53900..9ae0841bc82 100644 --- a/source/blender/blenkernel/intern/subdiv_ccg.c +++ b/source/blender/blenkernel/intern/subdiv_ccg.c @@ -593,7 +593,7 @@ Mesh *BKE_subdiv_to_ccg_mesh(Subdiv *subdiv, BKE_subdiv_stats_begin(&subdiv->stats, SUBDIV_STATS_SUBDIV_TO_CCG); if (!BKE_subdiv_eval_update_from_mesh(subdiv, coarse_mesh, NULL)) { if (coarse_mesh->totpoly) { - return false; + return NULL; } } BKE_subdiv_stats_end(&subdiv->stats, SUBDIV_STATS_SUBDIV_TO_CCG); diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index 83be64e84c9..6b8e33e3a01 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -352,7 +352,7 @@ Text *BKE_text_load_ex(Main *bmain, const char *file, const char *relpath, const buffer = BLI_file_read_text_as_mem(filepath_abs, 0, &buffer_len); if (buffer == NULL) { - return false; + return NULL; } ta = BKE_libblock_alloc(bmain, ID_TXT, BLI_path_basename(filepath_abs), 0); diff --git a/source/blender/blenlib/BLI_math_geom.h b/source/blender/blenlib/BLI_math_geom.h index 87517ebe060..eec5d214473 100644 --- a/source/blender/blenlib/BLI_math_geom.h +++ b/source/blender/blenlib/BLI_math_geom.h @@ -97,10 +97,10 @@ bool is_quad_convex_v3(const float v1[3], const float v2[3], const float v3[3], bool is_quad_convex_v2(const float v1[2], const float v2[2], const float v3[2], const float v4[2]); bool is_poly_convex_v2(const float verts[][2], unsigned int nr); int is_quad_flip_v3(const float v1[3], const float v2[3], const float v3[3], const float v4[3]); -bool is_quad_flip_v3_first_third_fast(const float v0[3], - const float v1[3], +bool is_quad_flip_v3_first_third_fast(const float v1[3], const float v2[3], - const float v3[3]); + const float v3[3], + const float v4[3]); /********************************* Distance **********************************/ diff --git a/source/blender/blenloader/intern/versioning_250.c b/source/blender/blenloader/intern/versioning_250.c index 72013bc6eed..d8e4f3d97a5 100644 --- a/source/blender/blenloader/intern/versioning_250.c +++ b/source/blender/blenloader/intern/versioning_250.c @@ -1673,15 +1673,13 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain) } for (scene = bmain->scenes.first; scene; scene = scene->id.next) { - if (scene) { - Sequence *seq; - SEQ_BEGIN (scene->ed, seq) { - if (seq->sat == 0.0f) { - seq->sat = 1.0f; - } + Sequence *seq; + SEQ_BEGIN (scene->ed, seq) { + if (seq->sat == 0.0f) { + seq->sat = 1.0f; } - SEQ_END; } + SEQ_END; } /* GSOC 2010 Sculpt - New settings for Brush */ diff --git a/source/blender/blenloader/intern/versioning_legacy.c b/source/blender/blenloader/intern/versioning_legacy.c index 62bd605a2c2..1b30c7371a2 100644 --- a/source/blender/blenloader/intern/versioning_legacy.c +++ b/source/blender/blenloader/intern/versioning_legacy.c @@ -1705,19 +1705,17 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) /* add default radius values to old curve points */ for (cu = bmain->curves.first; cu; cu = cu->id.next) { for (nu = cu->nurb.first; nu; nu = nu->next) { - if (nu) { - if (nu->bezt) { - for (bezt = nu->bezt, a = 0; a < nu->pntsu; a++, bezt++) { - if (!bezt->radius) { - bezt->radius = 1.0; - } + if (nu->bezt) { + for (bezt = nu->bezt, a = 0; a < nu->pntsu; a++, bezt++) { + if (!bezt->radius) { + bezt->radius = 1.0; } } - else if (nu->bp) { - for (bp = nu->bp, a = 0; a < nu->pntsu * nu->pntsv; a++, bp++) { - if (!bp->radius) { - bp->radius = 1.0; - } + } + else if (nu->bp) { + for (bp = nu->bp, a = 0; a < nu->pntsu * nu->pntsv; a++, bp++) { + if (!bp->radius) { + bp->radius = 1.0; } } } @@ -2515,17 +2513,15 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain) for (cu = bmain->curves.first; cu; cu = cu->id.next) { for (nu = cu->nurb.first; nu; nu = nu->next) { - if (nu) { - nu->radius_interp = 3; - - /* resolu and resolv are now used differently for surfaces - * rather than using the resolution to define the entire number of divisions, - * use it for the number of divisions per segment - */ - if (nu->pntsv > 1) { - nu->resolu = MAX2(1, (int)(((float)nu->resolu / (float)nu->pntsu) + 0.5f)); - nu->resolv = MAX2(1, (int)(((float)nu->resolv / (float)nu->pntsv) + 0.5f)); - } + nu->radius_interp = 3; + + /* resolu and resolv are now used differently for surfaces + * rather than using the resolution to define the entire number of divisions, + * use it for the number of divisions per segment + */ + if (nu->pntsv > 1) { + nu->resolu = MAX2(1, (int)(((float)nu->resolu / (float)nu->pntsu) + 0.5f)); + nu->resolv = MAX2(1, (int)(((float)nu->resolv / (float)nu->pntsv) + 0.5f)); } } } diff --git a/source/blender/draw/engines/workbench/workbench_studiolight.c b/source/blender/draw/engines/workbench/workbench_studiolight.c index ac27ff0b736..941a6741998 100644 --- a/source/blender/draw/engines/workbench/workbench_studiolight.c +++ b/source/blender/draw/engines/workbench/workbench_studiolight.c @@ -131,7 +131,7 @@ void studiolight_update_world(WORKBENCH_PrivateData *wpd, static void compute_parallel_lines_nor_and_dist(const float v1[2], const float v2[2], const float v3[2], - float r_line[2]) + float r_line[4]) { sub_v2_v2v2(r_line, v2, v1); /* Find orthogonal vector. */ diff --git a/source/blender/editors/animation/keyframes_draw.c b/source/blender/editors/animation/keyframes_draw.c index c174ce83bea..479e7192b0e 100644 --- a/source/blender/editors/animation/keyframes_draw.c +++ b/source/blender/editors/animation/keyframes_draw.c @@ -545,8 +545,7 @@ int actkeyblock_get_valid_hold(ActKeyColumn *ac) return 0; } - const int hold_mask = (ACTKEYBLOCK_FLAG_ANY_HOLD | ACTKEYBLOCK_FLAG_STATIC_HOLD | - ACTKEYBLOCK_FLAG_ANY_HOLD); + const int hold_mask = (ACTKEYBLOCK_FLAG_ANY_HOLD | ACTKEYBLOCK_FLAG_STATIC_HOLD); return (ac->block.flag & ~ac->block.conflict) & hold_mask; } diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index e0442ebcca2..174c2710863 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -9816,9 +9816,7 @@ static int ui_pie_handler(bContext *C, const wmEvent *event, uiPopupBlockHandle if (but && (U.pie_menu_confirm > 0) && (dist >= U.dpi_fac * (U.pie_menu_threshold + U.pie_menu_confirm))) { - if (but) { - return ui_but_pie_menu_apply(C, menu, but, true); - } + return ui_but_pie_menu_apply(C, menu, but, true); } retval = ui_but_pie_menu_apply(C, menu, but, true); diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index c9bfafbe764..99594cf0803 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -371,7 +371,6 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid) case TH_OBCENTER_DIA: cp = &ts->obcenter_dia; break; - break; case TH_EDGE: cp = ts->edge; break; diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 52618ba4dfc..2f8141bef95 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -1030,7 +1030,7 @@ static int empty_drop_named_image_invoke(bContext *C, wmOperator *op, const wmEv return OPERATOR_CANCELLED; } /* handled below */ - id_us_min((ID *)ima); + id_us_min(&ima->id); Object *ob = NULL; Object *ob_cursor = ED_view3d_give_object_under_cursor(C, event->mval); diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index a2ca3254b30..3b86e04308e 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -2419,7 +2419,6 @@ TreeElementIcon tree_element_get_icon(TreeStoreElem *tselem, TreeElement *te) case OB_GPENCIL: data.icon = ICON_OUTLINER_OB_GREASEPENCIL; break; - break; } } else { diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 53e36f86a64..083b5b94c48 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -1832,7 +1832,7 @@ static void freeTransCustomData(TransInfo *t, TransDataContainer *tc, TransCusto custom_data->data = NULL; } /* In case modes are switched in the same transform session. */ - custom_data->free_cb = false; + custom_data->free_cb = NULL; custom_data->use_free = false; } diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c index fec991e16da..2c42dba9131 100644 --- a/source/blender/makesrna/intern/rna_main_api.c +++ b/source/blender/makesrna/intern/rna_main_api.c @@ -461,8 +461,6 @@ static VFont *rna_Main_fonts_load(Main *bmain, "Cannot read '%s': %s", filepath, errno ? strerror(errno) : TIP_("unsupported font format")); - - id_us_min((ID *)font); } return font; } |