Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-12-16 08:52:47 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-12-16 13:58:04 +0300
commit59774d64f056373d6e6b420c7affc3666541ad00 (patch)
tree6ec0c29bc88fcd29ccbea0b6c8dcf622a6d1e627
parent21c7689b777ff5f46a3cecbda21f6afa012bdb28 (diff)
Docs: add doc-strings for BLI_path functions
-rw-r--r--source/blender/blenlib/BLI_path_util.h12
-rw-r--r--source/blender/blenlib/intern/path_util.c2
2 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/blenlib/BLI_path_util.h b/source/blender/blenlib/BLI_path_util.h
index 3cffecae187..8b54ee52322 100644
--- a/source/blender/blenlib/BLI_path_util.h
+++ b/source/blender/blenlib/BLI_path_util.h
@@ -207,6 +207,10 @@ bool BLI_path_extension_replace(char *path, size_t maxlen, const char *ext) ATTR
* Strip's trailing '.'s and adds the extension only when needed
*/
bool BLI_path_extension_ensure(char *path, size_t maxlen, const char *ext) ATTR_NONNULL();
+/**
+ * Ensure `filepath` has a file component, adding `filename` when it's empty or ends with a slash.
+ * \return true if the `filename` was appended to `filepath`.
+ */
bool BLI_path_filename_ensure(char *filepath, size_t maxlen, const char *filename) ATTR_NONNULL();
/**
* Looks for a sequence of decimal digits in string, preceding any filename extension,
@@ -318,7 +322,13 @@ bool BLI_path_frame_range(char *path, int sta, int end, int digits) ATTR_NONNULL
* Get the frame from a filename formatted by blender's frame scheme
*/
bool BLI_path_frame_get(char *path, int *r_frame, int *numdigits) ATTR_NONNULL();
-void BLI_path_frame_strip(char *path, char *ext) ATTR_NONNULL();
+/**
+ * Given a `path` with digits representing frame numbers, replace the digits with the '#'
+ * character and extract the extension.
+ * So: `/some/path_123.jpeg`
+ * Becomes: `/some/path_###` with `r_ext` set to `.jpeg`.
+ */
+void BLI_path_frame_strip(char *path, char *r_ext) ATTR_NONNULL();
/**
* Check if we have '#' chars, usable for #BLI_path_frame, #BLI_path_frame_range
*/
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
index 8f7180a5b96..c824def9104 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -144,8 +144,6 @@ void BLI_path_sequence_encode(
static int BLI_path_unc_prefix_len(const char *path); /* defined below in same file */
-/* ******************** string encoding ***************** */
-
void BLI_path_normalize(const char *relabase, char *path)
{
ptrdiff_t a;