Commit: 59774d64f056373d6e6b420c7affc3666541ad00
Author: Campbell Barton
Date:   Thu Dec 16 16:52:47 2021 +1100
Branches: master
https://developer.blender.org/rB59774d64f056373d6e6b420c7affc3666541ad00

Docs: add doc-strings for BLI_path functions

===================================================================

M       source/blender/blenlib/BLI_path_util.h
M       source/blender/blenlib/intern/path_util.c

===================================================================

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;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to