rlguy/Blender-FLIP-Fluids

"Launch Render" button doesn't sanitize spaces in file paths (Linux compatibility issue)

Tallone55 opened this issue · 2 comments

System Information

Blender Version: Blender 3.5.0 1be25cfff18b
FLIP Fluids Version: 1.6.2
Operating System: Linux Mint 21.1
CPU: AMD Ryzen 9 3900X
GFX: Nvidia RTX 3090 24 GB
RAM: 64 GB

Bug description

The "Launch Render" and "Launch Frame Render" (and probably "Launch Bake", though I didn't want to risk invalidating my cache to test it) buttons do not properly sanitize spaces in file paths when clicked, resulting in the message bash: line 1: /media/thomas/E: No such file or directory The file path truncates at the space in the path to the .blend file.

The command output by the adjacent copy command button outputs "/home/thomas/Blender/App/blenderlatest/blender" -b "/media/thomas/E Drive/Blender/models/Scenes/afile.blend" -a which, notably, works without issue when directly pasted into a terminal.

To Reproduce

1: Save a new .blend file in a folder containing a space in the name
2: Attempt to use the "Launch Render" button located in the FLIP Fluids viewport panel
3: Observe the error message in the newly launched terminal window

Expected Behaviour

The render process should begin in the newly launched terminal window when the button is clicked.

Actual Behaviour

The new terminal window displays a bash error from an incomplete file path due to unsanitized space.

Screenshots

Two screenshots included
Screenshot from 2023-04-02 07-08-42

Screenshot from 2023-04-02 07-14-40

rlguy commented

Thanks for the report!

I was able to reproduce this issue using Ubuntu 16.04.1. It appears that this issue may be specific to Linux operating systems. Paths with spaces seem to be working correctly on Windows and MacOS after brief testing.

We'll look further into this issue at a later time and will add any updates to this thread. We will likely be releasing a new addon version (FLIP Fluids 1.6.3) in about two weeks containing small fixes, so a fix should be available soon.

Until this is fixed, the workaround will be to use the Copy Command operator to manually paste the command into the terminal.

rlguy commented

This issue has been fixed and will be available in FLIP Fluids 1.6.3, to be released in about two weeks.

The issue was caused by a change between FLIP Fluids version 1.6.1 and 1.6.2 where the default terminal to launch was switched from Xterm to Bash. Bash required a small change in how the command was formulated in order to handle spaces in the filepath.