diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-10-27 05:25:07 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-10-27 05:25:07 +0400 |
commit | cd852ce1a199da11f119394ea719f9699c76c995 (patch) | |
tree | 4c23079e83b758bce8ffb9a3c4bb030d3c5d3fbf /source/blender/editors/space_info | |
parent | 4772b72951513d6554a79b94d401414265698daf (diff) |
- remove bpath iterator and replace all uses with visitor.
- added flag to optionally receive all paths as absolute.
Diffstat (limited to 'source/blender/editors/space_info')
-rw-r--r-- | source/blender/editors/space_info/info_ops.c | 17 |
1 files changed, 9 insertions, 8 deletions
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; } |