From 4682a0882f02c50b20aa3c4bf9abe9f7ec2e834b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 24 Mar 2022 16:33:32 +1100 Subject: Cleanup: use "filepath" instead of "filename" for full paths Reserve "filename" when only the name component is used. --- source/blender/render/RE_engine.h | 4 ++-- source/blender/render/intern/pipeline.c | 18 +++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'source/blender/render') diff --git a/source/blender/render/RE_engine.h b/source/blender/render/RE_engine.h index e8e47b1f646..e56e7b8d2e4 100644 --- a/source/blender/render/RE_engine.h +++ b/source/blender/render/RE_engine.h @@ -169,10 +169,10 @@ void RE_engine_free(RenderEngine *engine); * x/y offsets are only used on a partial copy when dimensions don't match. */ void RE_layer_load_from_file( - struct RenderLayer *layer, struct ReportList *reports, const char *filename, int x, int y); + struct RenderLayer *layer, struct ReportList *reports, const char *filepath, int x, int y); void RE_result_load_from_file(struct RenderResult *result, struct ReportList *reports, - const char *filename); + const char *filepath); struct RenderResult *RE_engine_begin_result( RenderEngine *engine, int x, int y, int w, int h, const char *layername, const char *viewname); diff --git a/source/blender/render/intern/pipeline.c b/source/blender/render/intern/pipeline.c index a6c2e9eb194..cf400bdfc77 100644 --- a/source/blender/render/intern/pipeline.c +++ b/source/blender/render/intern/pipeline.c @@ -2480,10 +2480,10 @@ bool RE_ReadRenderResult(Scene *scene, Scene *scenode) } void RE_layer_load_from_file( - RenderLayer *layer, ReportList *reports, const char *filename, int x, int y) + RenderLayer *layer, ReportList *reports, const char *filepath, int x, int y) { /* OCIO_TODO: assume layer was saved in default color space */ - ImBuf *ibuf = IMB_loadiffname(filename, IB_rect, NULL); + ImBuf *ibuf = IMB_loadiffname(filepath, IB_rect, NULL); RenderPass *rpass = NULL; /* multiview: since the API takes no 'view', we use the first combined pass found */ @@ -2498,7 +2498,7 @@ void RE_layer_load_from_file( RPT_ERROR, "%s: no Combined pass found in the render layer '%s'", __func__, - filename); + filepath); } if (ibuf && (ibuf->rect || ibuf->rect_float)) { @@ -2527,7 +2527,7 @@ void RE_layer_load_from_file( } else { BKE_reportf( - reports, RPT_ERROR, "%s: failed to allocate clip buffer '%s'", __func__, filename); + reports, RPT_ERROR, "%s: failed to allocate clip buffer '%s'", __func__, filepath); } } else { @@ -2535,21 +2535,21 @@ void RE_layer_load_from_file( RPT_ERROR, "%s: incorrect dimensions for partial copy '%s'", __func__, - filename); + filepath); } } IMB_freeImBuf(ibuf); } else { - BKE_reportf(reports, RPT_ERROR, "%s: failed to load '%s'", __func__, filename); + BKE_reportf(reports, RPT_ERROR, "%s: failed to load '%s'", __func__, filepath); } } -void RE_result_load_from_file(RenderResult *result, ReportList *reports, const char *filename) +void RE_result_load_from_file(RenderResult *result, ReportList *reports, const char *filepath) { - if (!render_result_exr_file_read_path(result, NULL, filename)) { - BKE_reportf(reports, RPT_ERROR, "%s: failed to load '%s'", __func__, filename); + if (!render_result_exr_file_read_path(result, NULL, filepath)) { + BKE_reportf(reports, RPT_ERROR, "%s: failed to load '%s'", __func__, filepath); return; } } -- cgit v1.2.3