You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Windows, they happen to be in the desired order (probably because of some property of NTFS) but on Linux it returns them in a seemingly random order.
I "fixed" this by sorting the directory list first:
sorted_dirs = os.listdir(savestates_directory)
sorted_dirs.sort()
subdirs = [d for d in sorted_dirs if os.path.isdir(os.path.join(savestates_directory, d))]
...but my python is rusty and an actual fix probably needs to do natural sorting, which I think .sort() does not do natively.
Thanks for looking into this!
The text was updated successfully, but these errors were encountered:
Just had a chance to look into this and I think your solution should work fine. The filename numbers are all padded with zeroes to be 6 digits, so regular sort() should work.
This fix will be included in FLIP Fluids 1.7.2, release TBA, but likely will be released shortly before the release of Blender 4.0 on Nov 7, 2023.
System Information
Blender Version (including hash): 3.6.2
FLIP Fluids Version: 1.7.1
Operating System: Ubuntu 22.04
CPU: i7-3770k
GFX: Nvidia GTX 1070
RAM: 32GB
Describe the bug
Savestates on windows are listed in order, while on Linux they are arbitrarily ordered
_update_savestate_enums() in domain_bake_properties.py reads each savestate in the savestates directory and iterates through them in the order that os.listdir() returns them. This order is not guaranteed to be stable according to Python docs.
On Windows, they happen to be in the desired order (probably because of some property of NTFS) but on Linux it returns them in a seemingly random order.
I "fixed" this by sorting the directory list first:
...but my python is rusty and an actual fix probably needs to do natural sorting, which I think .sort() does not do natively.
Thanks for looking into this!
The text was updated successfully, but these errors were encountered: