Page MenuHome

T50630: Fixed Windows fluid simulation with Unicode characters in path
AbandonedPublic

Authored by João Esteves (Joao611) on Dec 8 2017, 12:55 PM.

Details

Summary

Fluid simulation baking would not progress in Windows, as it was unable to open files for creation in the chosen cache path if this one involved Unicode characters such as cyrillic. Yet, it was able to open them to play the animation if they existed, so it was possible to create the files in another path and then copy them to the problematic path.

It was found the file creation was using gzopen() from zlib and given a (char *) string, which in Windows does not work with Unicode even though it does in Linux, and the existing files' access was done with BLI_gzopen(), a function implemented by Blender which does support Unicode.

Therefore, the fix was simple: replace gzopen() by BLI_gzopen() and include in CMake its respective folder.

Diff Detail

Repository
rB Blender

Event Timeline

João Esteves (Joao611) edited the summary of this revision. (Show Details)

Re-added a comment which was removed by mistake.

João Esteves (Joao611) edited the summary of this revision. (Show Details)Dec 8 2017, 1:15 PM
This comment was removed by João Esteves (Joao611).

Nice fix but uses bad level calls, think we can use defines in CMake to pass in gzopen overrides.

Will add and apply.

This revision is now accepted and ready to land.Dec 13 2017, 12:42 PM
Campbell Barton (campbellbarton) requested changes to this revision.Dec 14 2017, 1:50 AM

I don't have access to Win32 at the moment, P576 @João Esteves (Joao611), could you check if this works?

This revision now requires changes to proceed.Dec 14 2017, 1:50 AM

I apologize for only getting back to you now. Your CMake definition of "LBM_GZIP_OPEN_FN" is not working and I'm not experienced enough with CMake to figure out a solution.