diff options
Diffstat (limited to 'source/blender/editors')
29 files changed, 44 insertions, 43 deletions
diff --git a/source/blender/editors/armature/pose_slide.c b/source/blender/editors/armature/pose_slide.c index f01afcfc578..1a1685e4a01 100644 --- a/source/blender/editors/armature/pose_slide.c +++ b/source/blender/editors/armature/pose_slide.c @@ -833,7 +833,7 @@ static void pose_slide_apply_quat(tPoseSlideOp *pso, tPChanFCurveLink *pfl) float prevFrameF, nextFrameF; if (!pose_frame_range_from_object_get(pso, pfl->ob, &prevFrameF, &nextFrameF)) { - BLI_assert(!"Invalid pfl data"); + BLI_assert_msg(0, "Invalid pfl data"); return; } diff --git a/source/blender/editors/curve/editcurve_add.c b/source/blender/editors/curve/editcurve_add.c index 065763764c1..2be55accd3a 100644 --- a/source/blender/editors/curve/editcurve_add.c +++ b/source/blender/editors/curve/editcurve_add.c @@ -485,7 +485,7 @@ Nurb *ED_curve_add_nurbs_primitive( break; default: /* should never happen */ - BLI_assert(!"invalid nurbs type"); + BLI_assert_msg(0, "invalid nurbs type"); return NULL; } diff --git a/source/blender/editors/gpencil/gpencil_convert.c b/source/blender/editors/gpencil/gpencil_convert.c index 2cb1e09d9a6..ee3536c2f3f 100644 --- a/source/blender/editors/gpencil/gpencil_convert.c +++ b/source/blender/editors/gpencil/gpencil_convert.c @@ -1409,7 +1409,7 @@ static void gpencil_layer_to_curve(bContext *C, gtd); break; default: - BLI_assert(!"invalid mode"); + BLI_assert_msg(0, "invalid mode"); break; } prev_gps = gps; diff --git a/source/blender/editors/gpencil/gpencil_select.c b/source/blender/editors/gpencil/gpencil_select.c index c33b43247fd..69734fa1ba8 100644 --- a/source/blender/editors/gpencil/gpencil_select.c +++ b/source/blender/editors/gpencil/gpencil_select.c @@ -689,7 +689,7 @@ static int gpencil_select_grouped_exec(bContext *C, wmOperator *op) break; default: - BLI_assert(!"unhandled select grouped gpencil mode"); + BLI_assert_msg(0, "unhandled select grouped gpencil mode"); break; } diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 0e45970a165..3136ca64e0f 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -6513,7 +6513,7 @@ static void ui_ndofedit_but_HSVCUBE(uiButHSVCube *hsv_but, CLAMP(hsv[2], hsv_but->but.softmin, hsv_but->but.softmax); break; default: - BLI_assert(!"invalid hsv type"); + BLI_assert_msg(0, "invalid hsv type"); break; } diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index aa957afbf8f..2a505abe257 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -1500,7 +1500,7 @@ static void icon_draw_rect(float x, /* sanity check */ 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"); + BLI_assert_msg(0, "invalid icon size"); return; } /* modulate color */ diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 72847fb2476..8abff4ad0d8 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -3115,7 +3115,7 @@ void ui_draw_gradient(const rcti *rect, copy_v3_v3(col1[3], col1[2]); break; default: - BLI_assert(!"invalid 'type' argument"); + BLI_assert_msg(0, "invalid 'type' argument"); hsv_to_rgb(1.0, 1.0, 1.0, &col1[2][0], &col1[2][1], &col1[2][2]); copy_v3_v3(col1[0], col1[2]); copy_v3_v3(col1[1], col1[2]); @@ -5374,7 +5374,7 @@ void ui_draw_menu_item(const uiFontStyle *fstyle, } } else { - BLI_assert(!"Unknwon menu item separator type"); + BLI_assert_msg(0, "Unknwon menu item separator type"); } if (fstyle->kerning == 1) { diff --git a/source/blender/editors/interface/view2d_edge_pan.c b/source/blender/editors/interface/view2d_edge_pan.c index ca32a754f1d..1d300c7b275 100644 --- a/source/blender/editors/interface/view2d_edge_pan.c +++ b/source/blender/editors/interface/view2d_edge_pan.c @@ -160,7 +160,7 @@ static float edge_pan_speed(View2DEdgePanData *vpd, distance = min - event_loc; } else { - BLI_assert(!"Calculating speed outside of pan zones"); + BLI_assert_msg(0, "Calculating speed outside of pan zones"); return 0.0f; } float distance_factor = distance / (vpd->speed_ramp * U.widget_unit); diff --git a/source/blender/editors/mask/mask_ops.c b/source/blender/editors/mask/mask_ops.c index 3476f1ca735..6fa7457ce14 100644 --- a/source/blender/editors/mask/mask_ops.c +++ b/source/blender/editors/mask/mask_ops.c @@ -390,7 +390,7 @@ static void select_sliding_point(Mask *mask, point->bezt.f3 |= SELECT; break; default: - BLI_assert(!"Unexpected situation in select_sliding_point()"); + BLI_assert_msg(0, "Unexpected situation in select_sliding_point()"); } mask_layer->act_spline = spline; diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index d7177eabcba..c61965b3e23 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -2022,7 +2022,7 @@ static void single_obdata_users( break; default: printf("ERROR %s: can't copy %s\n", __func__, id->name); - BLI_assert(!"This should never happen."); + BLI_assert_msg(0, "This should never happen."); /* We need to end the FOREACH_OBJECT_FLAG_BEGIN iterator to prevent memory leak. */ BKE_scene_objects_iterator_end(&iter_macro); diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index e8f69aded5b..7f7ee45a803 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -253,7 +253,7 @@ static const char *preview_collection_name(const char pr_type) case MA_ATMOS: return "Atmosphere"; default: - BLI_assert(!"Unknown preview type"); + BLI_assert_msg(0, "Unknown preview type"); return ""; } } @@ -335,7 +335,7 @@ static ID *duplicate_ids(ID *id, const bool allow_failure) return NULL; default: if (!allow_failure) { - BLI_assert(!"ID type preview not supported."); + BLI_assert_msg(0, "ID type preview not supported."); } return NULL; } @@ -1469,7 +1469,7 @@ static int icon_previewimg_size_index_get(const IconPreviewSize *icon_size, } } - BLI_assert(!"The searched icon size does not match any in the preview image"); + BLI_assert_msg(0, "The searched icon size does not match any in the preview image"); return -1; } diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index 9595a66173b..d2b1ebdad78 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -2418,7 +2418,7 @@ static void paste_mtex_copybuf(ID *id) mtex = &(((FreestyleLineStyle *)id)->mtex[(int)((FreestyleLineStyle *)id)->texact]); break; default: - BLI_assert(!"invalid id type"); + BLI_assert_msg(0, "invalid id type"); return; } diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 39de63c22a9..f4109981aae 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -3672,7 +3672,7 @@ static void region_visible_rect_calc(ARegion *region, rcti *rect) /* Skip floating. */ } else { - BLI_assert(!"Region overlap with unknown alignment"); + BLI_assert_msg(0, "Region overlap with unknown alignment"); } } } diff --git a/source/blender/editors/screen/area_query.c b/source/blender/editors/screen/area_query.c index d569e56e11b..fd4f3964398 100644 --- a/source/blender/editors/screen/area_query.c +++ b/source/blender/editors/screen/area_query.c @@ -88,7 +88,7 @@ bool ED_region_panel_category_gutter_calc_rect(const ARegion *region, rcti *r_re r_region_gutter->xmin = r_region_gutter->xmax - category_tabs_width; } else { - BLI_assert(!"Unsupported alignment"); + BLI_assert_msg(0, "Unsupported alignment"); } return true; } diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c index e366760a55d..f651fd4fb61 100644 --- a/source/blender/editors/screen/glutil.c +++ b/source/blender/editors/screen/glutil.c @@ -126,7 +126,7 @@ void immDrawPixelsTexScaled_clipping(IMMDrawPixelsTexState *state, components = 1; } else { - BLI_assert(!"Incompatible format passed to immDrawPixels"); + BLI_assert_msg(0, "Incompatible format passed to immDrawPixels"); return; } @@ -426,7 +426,7 @@ void ED_draw_imbuf_clipping(ImBuf *ibuf, format = GPU_RGBA16F; } else { - BLI_assert(!"Incompatible number of channels for GLSL display"); + BLI_assert_msg(0, "Incompatible number of channels for GLSL display"); } if (format != 0) { diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 54b6f3d3590..83388c1aef2 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -2394,7 +2394,7 @@ static float brush_strength(const Sculpt *sd, case BRUSH_MASK_SMOOTH: return alpha * pressure * feather; } - BLI_assert(!"Not supposed to happen"); + BLI_assert_msg(0, "Not supposed to happen"); return 0.0f; case SCULPT_TOOL_CREASE: diff --git a/source/blender/editors/sculpt_paint/sculpt_automasking.c b/source/blender/editors/sculpt_paint/sculpt_automasking.c index 5f5fb51d75f..35f48400fe2 100644 --- a/source/blender/editors/sculpt_paint/sculpt_automasking.c +++ b/source/blender/editors/sculpt_paint/sculpt_automasking.c @@ -209,7 +209,7 @@ static float *SCULPT_topology_automasking_init(Sculpt *sd, Object *ob, float *au Brush *brush = BKE_paint_brush(&sd->paint); if (BKE_pbvh_type(ss->pbvh) == PBVH_FACES && !ss->pmap) { - BLI_assert(!"Topology masking: pmap missing"); + BLI_assert_msg(0, "Topology masking: pmap missing"); return NULL; } @@ -248,7 +248,7 @@ static float *sculpt_face_sets_automasking_init(Sculpt *sd, Object *ob, float *a } if (BKE_pbvh_type(ss->pbvh) == PBVH_FACES && !ss->pmap) { - BLI_assert(!"Face Sets automasking: pmap missing"); + BLI_assert_msg(0, "Face Sets automasking: pmap missing"); return NULL; } @@ -273,7 +273,7 @@ float *SCULPT_boundary_automasking_init(Object *ob, SculptSession *ss = ob->sculpt; if (!ss->pmap) { - BLI_assert(!"Boundary Edges masking: pmap missing"); + BLI_assert_msg(0, "Boundary Edges masking: pmap missing"); return NULL; } diff --git a/source/blender/editors/sculpt_paint/sculpt_smooth.c b/source/blender/editors/sculpt_paint/sculpt_smooth.c index 61984610a5a..eabbfe43e03 100644 --- a/source/blender/editors/sculpt_paint/sculpt_smooth.c +++ b/source/blender/editors/sculpt_paint/sculpt_smooth.c @@ -367,7 +367,7 @@ void SCULPT_smooth(Sculpt *sd, last = max_iterations * (bstrength - count * fract); if (type == PBVH_FACES && !ss->pmap) { - BLI_assert(!"sculpt smooth: pmap missing"); + BLI_assert_msg(0, "sculpt smooth: pmap missing"); return; } diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c index f21c900941b..501a1e53276 100644 --- a/source/blender/editors/sculpt_paint/sculpt_undo.c +++ b/source/blender/editors/sculpt_paint/sculpt_undo.c @@ -766,7 +766,7 @@ static void sculpt_undo_restore_list(bContext *C, Depsgraph *depsgraph, ListBase case SCULPT_UNDO_DYNTOPO_BEGIN: case SCULPT_UNDO_DYNTOPO_END: case SCULPT_UNDO_DYNTOPO_SYMMETRIZE: - BLI_assert(!"Dynamic topology should've already been handled"); + BLI_assert_msg(0, "Dynamic topology should've already been handled"); break; } } @@ -1065,7 +1065,7 @@ static SculptUndoNode *sculpt_undo_alloc_node(Object *ob, PBVHNode *node, Sculpt case SCULPT_UNDO_DYNTOPO_BEGIN: case SCULPT_UNDO_DYNTOPO_END: case SCULPT_UNDO_DYNTOPO_SYMMETRIZE: - BLI_assert(!"Dynamic topology should've already been handled"); + BLI_assert_msg(0, "Dynamic topology should've already been handled"); case SCULPT_UNDO_GEOMETRY: case SCULPT_UNDO_FACE_SETS: break; @@ -1355,7 +1355,7 @@ SculptUndoNode *SCULPT_undo_push_node(Object *ob, PBVHNode *node, SculptUndoType case SCULPT_UNDO_DYNTOPO_BEGIN: case SCULPT_UNDO_DYNTOPO_END: case SCULPT_UNDO_DYNTOPO_SYMMETRIZE: - BLI_assert(!"Dynamic topology should've already been handled"); + BLI_assert_msg(0, "Dynamic topology should've already been handled"); case SCULPT_UNDO_GEOMETRY: case SCULPT_UNDO_FACE_SETS: break; diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c index 2da13646a8b..67b4fd61d38 100644 --- a/source/blender/editors/space_clip/clip_editor.c +++ b/source/blender/editors/space_clip/clip_editor.c @@ -1025,7 +1025,7 @@ static void prefetch_startjob(void *pjv, short *stop, short *do_update, float *p progress); } else { - BLI_assert(!"Unknown movie clip source when prefetching frames"); + BLI_assert_msg(0, "Unknown movie clip source when prefetching frames"); } } diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index b7accbf71e5..7ab93df81d2 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -378,7 +378,7 @@ FileSelectParams *ED_fileselect_ensure_active_params(SpaceFile *sfile) return &sfile->asset_params->base_params; } - BLI_assert(!"Invalid browse mode set in file space."); + BLI_assert_msg(0, "Invalid browse mode set in file space."); return NULL; } @@ -399,7 +399,7 @@ FileSelectParams *ED_fileselect_get_active_params(const SpaceFile *sfile) return (FileSelectParams *)sfile->asset_params; } - BLI_assert(!"Invalid browse mode set in file space."); + BLI_assert_msg(0, "Invalid browse mode set in file space."); return NULL; } diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c index c08707b7a6a..c5ec656080a 100644 --- a/source/blender/editors/space_outliner/outliner_tree.c +++ b/source/blender/editors/space_outliner/outliner_tree.c @@ -592,7 +592,7 @@ static void outliner_add_id_contents(SpaceOutliner *space_outliner, switch (GS(id->name)) { case ID_LI: case ID_SCE: - BLI_assert(!"ID type expected to be expanded through new tree-element design"); + BLI_assert_msg(0, "ID type expected to be expanded through new tree-element design"); break; case ID_OB: { outliner_add_object_contents(space_outliner, te, tselem, (Object *)id); @@ -905,12 +905,13 @@ TreeElement *outliner_add_element(SpaceOutliner *space_outliner, } else if (type == TSE_SOME_ID) { if (!te->type) { - BLI_assert(!"Expected this ID type to be ported to new Outliner tree-element design"); + BLI_assert_msg(0, "Expected this ID type to be ported to new Outliner tree-element design"); } } else if (ELEM(type, TSE_LIBRARY_OVERRIDE_BASE, TSE_LIBRARY_OVERRIDE)) { if (!te->type) { - BLI_assert(!"Expected override types to be ported to new Outliner tree-element design"); + BLI_assert_msg(0, + "Expected override types to be ported to new Outliner tree-element design"); } } else { diff --git a/source/blender/editors/space_outliner/tree/tree_element_id.cc b/source/blender/editors/space_outliner/tree/tree_element_id.cc index ce99b954204..7ff5a3285f1 100644 --- a/source/blender/editors/space_outliner/tree/tree_element_id.cc +++ b/source/blender/editors/space_outliner/tree/tree_element_id.cc @@ -85,7 +85,7 @@ TreeElementID *TreeElementID::createFromID(TreeElement &legacy_te, ID &id) return new TreeElementID(legacy_te, id); /* Deprecated */ case ID_IP: - BLI_assert(!"Outliner trying to build tree-element for deprecated ID type"); + BLI_assert_msg(0, "Outliner trying to build tree-element for deprecated ID type"); return nullptr; } diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index 8371a634a78..cdbe5bc63ce 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -1556,7 +1556,7 @@ static void *sequencer_OCIO_transform_ibuf(const bContext *C, *r_format = GPU_RGB16F; } else { - BLI_assert(!"Incompatible number of channels for float buffer in sequencer"); + BLI_assert_msg(0, "Incompatible number of channels for float buffer in sequencer"); *r_format = GPU_RGBA16F; display_buffer = NULL; } diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index 210dd7311a4..ecf43c734e2 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -1378,7 +1378,7 @@ static bool view3d_lasso_select(bContext *C, changed = do_lasso_select_meta(vc, mcoords, mcoords_len, sel_op); break; default: - BLI_assert(!"lasso select on incorrect object type"); + BLI_assert_msg(0, "lasso select on incorrect object type"); break; } @@ -3604,7 +3604,7 @@ static int view3d_box_select_exec(bContext *C, wmOperator *op) } break; default: - BLI_assert(!"box select on incorrect object type"); + BLI_assert_msg(0, "box select on incorrect object type"); break; } changed_multi |= changed; diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 575d9c0828e..aaac8e21cb9 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -910,7 +910,7 @@ void calculateCenterCursor2D(TransInfo *t, float r_center[2]) BKE_mask_coord_from_movieclip(space_clip->clip, &space_clip->user, co, cursor); } else { - BLI_assert(!"Shall not happen"); + BLI_assert_msg(0, "Shall not happen"); } r_center[0] = co[0] * t->aspect[0]; diff --git a/source/blender/editors/transform/transform_mode_edge_slide.c b/source/blender/editors/transform/transform_mode_edge_slide.c index bdd074666a2..066a2853dc7 100644 --- a/source/blender/editors/transform/transform_mode_edge_slide.c +++ b/source/blender/editors/transform/transform_mode_edge_slide.c @@ -107,7 +107,7 @@ static TransDataContainer *edge_slide_container_first_ok(TransInfo *t) return tc; } } - BLI_assert(!"Should never happen, at least one EdgeSlideData should be valid"); + BLI_assert_msg(0, "Should never happen, at least one EdgeSlideData should be valid"); return NULL; } diff --git a/source/blender/editors/undo/ed_undo.c b/source/blender/editors/undo/ed_undo.c index 00efdb87fea..23161028e03 100644 --- a/source/blender/editors/undo/ed_undo.c +++ b/source/blender/editors/undo/ed_undo.c @@ -321,7 +321,7 @@ static int ed_undo_step_by_name(bContext *C, const char *undo_name, ReportList * /* FIXME: See comments in `ed_undo_step_direction`. */ if (ED_gpencil_session_active()) { - BLI_assert(!"Not implemented currently."); + BLI_assert_msg(0, "Not implemented currently."); } wmWindowManager *wm = CTX_wm_manager(C); @@ -369,7 +369,7 @@ static int ed_undo_step_by_index(bContext *C, const int undo_index, ReportList * /* FIXME: See comments in `ed_undo_step_direction`. */ if (ED_gpencil_session_active()) { - BLI_assert(!"Not implemented currently."); + BLI_assert_msg(0, "Not implemented currently."); } wmWindowManager *wm = CTX_wm_manager(C); diff --git a/source/blender/editors/util/select_utils.c b/source/blender/editors/util/select_utils.c index 4e8cf1e92e6..5681edd2f5c 100644 --- a/source/blender/editors/util/select_utils.c +++ b/source/blender/editors/util/select_utils.c @@ -41,7 +41,7 @@ int ED_select_op_action(const eSelectOp sel_op, const bool is_select, const bool case SEL_OP_XOR: return (is_select && is_inside) ? 0 : ((!is_select && is_inside) ? 1 : -1); } - BLI_assert(!"invalid sel_op"); + BLI_assert_msg(0, "invalid sel_op"); return -1; } /** @@ -67,7 +67,7 @@ int ED_select_op_action_deselected(const eSelectOp sel_op, case SEL_OP_XOR: return (is_select && is_inside) ? 0 : ((!is_select && is_inside) ? 1 : -1); } - BLI_assert(!"invalid sel_op"); + BLI_assert_msg(0, "invalid sel_op"); return -1; } |