Commit: dd364de83129bb32a5d63ab0f20e2709f3cf8b06
Author: ishbosamiya
Date:   Sun Aug 1 22:42:59 2021 +0530
Branches: soc-2021-adaptive-cloth
https://developer.blender.org/rBdd364de83129bb32a5d63ab0f20e2709f3cf8b06

adaptive_cloth: filename_gen: number has 0's to make length 3

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

M       source/blender/blenkernel/BKE_cloth_remesh.hh

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

diff --git a/source/blender/blenkernel/BKE_cloth_remesh.hh 
b/source/blender/blenkernel/BKE_cloth_remesh.hh
index 44530f9b0f0..900d6728937 100644
--- a/source/blender/blenkernel/BKE_cloth_remesh.hh
+++ b/source/blender/blenkernel/BKE_cloth_remesh.hh
@@ -201,12 +201,18 @@ class FilenameGen {
 
   std::string get_curr()
   {
-    return this->prefix + "_" + std::to_string(this->number) + this->suffix;
+    char number_str_c[16];
+    BLI_snprintf(number_str_c, 16, "%03lu", this->number);
+    std::string number_str(number_str_c);
+    return this->prefix + "_" + number_str + this->suffix;
   }
 
   std::string get_curr(const std::string pre_suffix)
   {
-    return this->prefix + "_" + std::to_string(this->number) + "_" + 
pre_suffix + this->suffix;
+    char number_str_c[16];
+    BLI_snprintf(number_str_c, 16, "%03lu", this->number);
+    std::string number_str(number_str_c);
+    return this->prefix + "_" + number_str + "_" + pre_suffix + this->suffix;
   }
 };

_______________________________________________
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