From 716a8241d387180fd8ad69cdec33633bc7a0f963 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 23 Jun 2020 09:54:14 +1000 Subject: Cleanup: rename 'name' to 'filepath' for DNA types Using 'name' for the full path of a file reads badly, especially when id.name is used in related code. --- source/blender/blenkernel/intern/image_save.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/blenkernel/intern/image_save.c') diff --git a/source/blender/blenkernel/intern/image_save.c b/source/blender/blenkernel/intern/image_save.c index c034fe895a6..19eb3380b8e 100644 --- a/source/blender/blenkernel/intern/image_save.c +++ b/source/blender/blenkernel/intern/image_save.c @@ -73,7 +73,7 @@ static void image_save_post(ReportList *reports, if (opts->do_newpath) { BLI_strncpy(ibuf->name, filepath, sizeof(ibuf->name)); - BLI_strncpy(ima->name, filepath, sizeof(ima->name)); + BLI_strncpy(ima->filepath, filepath, sizeof(ima->filepath)); } ibuf->userflags &= ~IB_BITMAPDIRTY; @@ -106,7 +106,7 @@ static void image_save_post(ReportList *reports, /* only image path, never ibuf */ if (opts->relative) { const char *relbase = ID_BLEND_PATH(opts->bmain, &ima->id); - BLI_path_rel(ima->name, relbase); /* only after saving */ + BLI_path_rel(ima->filepath, relbase); /* only after saving */ } ColorManagedColorspaceSettings old_colorspace_settings; @@ -135,7 +135,7 @@ static void imbuf_save_post(ImBuf *ibuf, ImBuf *colormanaged_ibuf) /** * \return success. - * \note ``ima->name`` and ``ibuf->name`` should end up the same. + * \note ``ima->filepath`` and ``ibuf->name`` should end up the same. * \note for multiview the first ``ibuf`` is important to get the settings. */ static bool image_save_single(ReportList *reports, -- cgit v1.2.3