From cd852ce1a199da11f119394ea719f9699c76c995 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 27 Oct 2011 01:25:07 +0000 Subject: - remove bpath iterator and replace all uses with visitor. - added flag to optionally receive all paths as absolute. --- source/blender/editors/space_info/info_ops.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'source/blender/editors/space_info/info_ops.c') diff --git a/source/blender/editors/space_info/info_ops.c b/source/blender/editors/space_info/info_ops.c index 2b3785e2810..deff1c77912 100644 --- a/source/blender/editors/space_info/info_ops.c +++ b/source/blender/editors/space_info/info_ops.c @@ -253,10 +253,12 @@ void FILE_OT_make_paths_absolute(wmOperatorType *ot) /********************* report missing files operator *********************/ -static int report_missing_files_exec(bContext *UNUSED(C), wmOperator *op) +static int report_missing_files_exec(bContext *C, wmOperator *op) { + Main *bmain= CTX_data_main(C); + /* run the missing file check */ - checkMissingFiles(G.main, op->reports); + checkMissingFiles(bmain, op->reports); return OPERATOR_FINISHED; } @@ -276,13 +278,12 @@ void FILE_OT_report_missing_files(wmOperatorType *ot) /********************* find missing files operator *********************/ -static int find_missing_files_exec(bContext *UNUSED(C), wmOperator *op) +static int find_missing_files_exec(bContext *C, wmOperator *op) { - char *path; - - path= RNA_string_get_alloc(op->ptr, "filepath", NULL, 0); - findMissingFiles(G.main, path); - MEM_freeN(path); + Main *bmain= CTX_data_main(C); + const char *searchpath= RNA_string_get_alloc(op->ptr, "filepath", NULL, 0); + findMissingFiles(bmain, searchpath, op->reports); + MEM_freeN((void *)searchpath); return OPERATOR_FINISHED; } -- cgit v1.2.3