WIP: Fix #116458: Added decay factor for flattening brushes. #118699

Draft
Raul Fernandez Hernandez wants to merge 87 commits from farsthary/blender:Fix-#116458-Sculpt-Clay-strip-sculpts-on-back-face-when-front-face-only-is-turned-on into blender-v4.1-release

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 changed files with 18 additions and 18 deletions
Showing only changes of commit 024230b827 - Show all commits

View File

@ -477,29 +477,29 @@ int BLI_rename(const char *from, const char *to)
return urename(from, to, false);
#elif defined(__APPLE__)
return renamex_np(from, to, RENAME_EXCL);
#elif defined(__GLIBC_PREREQ)
# if __GLIBC_PREREQ(2, 28)
/* Most common Linux cases. */
int ret = renameat2(AT_FDCWD, from, AT_FDCWD, to, RENAME_NOREPLACE);
if (ret < 0 && errno == EINVAL) {
/* Most likely a filesystem that doesn't support RENAME_NOREPLACE.
* (For example NFS, Samba, exFAT, NTFS, etc)
* Retry with a non atomic operation.
*/
if (BLI_exists(to)) {
return 1;
}
return rename(from, to);
}
return ret;
# endif
#else
/* At least all BSD's currently. */
# if defined(__GLIBC_PREREQ)
# if __GLIBC_PREREQ(2, 28)
/* Most common Linux case, use `RENAME_NOREPLACE` when available. */
{
const int ret = renameat2(AT_FDCWD, from, AT_FDCWD, to, RENAME_NOREPLACE);
if (!(ret < 0 && errno == EINVAL)) {
return ret;
}
/* Most likely a file-system that doesn't support RENAME_NOREPLACE.
* (For example NFS, Samba, exFAT, NTFS, etc)
* Fall through to use the generic UNIX non atomic operation, see #116049. */
}
# endif /* __GLIBC_PREREQ(2, 28) */
# endif /* __GLIBC_PREREQ */
/* All BSD's currently & fallback for Linux. */
if (BLI_exists(to)) {
return 1;
}
return rename(from, to);
#endif
#endif /* !defined(WIN32) && !defined(__APPLE__) */
}
int BLI_rename_overwrite(const char *from, const char *to)