Skip to content

Commit 9b4f628

Browse files
committed
new demo version 0.6.3!
1 parent 4b2b759 commit 9b4f628

17 files changed

+166
-125
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Want to try the FLIP Fluids addon before buying the [full marketplace product](h
88

99
### Getting Started
1010

11-
Download the latest FLIP Fluids Demo installation file here: [FLIP_Fluids_addon_0.6.2_demo_(29_mar_2023.zip)](https://github.com/rlguy/Blender-FLIP-Fluids/releases/download/v0.6.2/FLIP_Fluids_addon_0.6.2_demo_.29_mar_2023.zip)
11+
Download the latest FLIP Fluids Demo installation file here: [FLIP_Fluids_addon_0.6.3_demo_(20_apr_2023.zip)](https://github.com/rlguy/Blender-FLIP-Fluids/releases/download/v0.6.3/FLIP_Fluids_addon_0.6.3_demo_.20_apr_2023.zip)
1212

1313
After downloading the demo addon, follow our [Installation Instructions](https://github.com/rlguy/Blender-FLIP-Fluids/wiki/Addon-Installation-and-Uninstallation). The instructions are similar to installing any other Blender addon.
1414

cmake/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ set(CMAKE_BUILD_TYPE Release)
5353
set(FLUIDENGINE_VERSION_TYPE_IS_STABLE_BUILD TRUE)
5454
set(FLUIDENGINE_VERSION_MAJOR 0)
5555
set(FLUIDENGINE_VERSION_MINOR 6)
56-
set(FLUIDENGINE_VERSION_REVISION 2)
57-
set(FLUIDENGINE_VERSION_DATE "29-MAR-2023")
56+
set(FLUIDENGINE_VERSION_REVISION 3)
57+
set(FLUIDENGINE_VERSION_DATE "20-APR-2023")
5858

5959
if(FLUIDENGINE_VERSION_TYPE_IS_STABLE_BUILD)
6060
set(FLUIDENGINE_VERSION_TYPE_LABEL "Demo")

src/addon/bake.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -722,6 +722,7 @@ def __delete_outdated_savestates(cache_directory, savestate_id):
722722
if savestate_number > savestate_id:
723723
path = os.path.join(savestate_directory, d)
724724
try:
725+
print("Delete savestate", path)
725726
fpl.delete_files_in_directory(path, extensions, remove_directory=True)
726727
except:
727728
print("Error: unable to delete directory <" + path + "> (skipping)")
@@ -786,11 +787,14 @@ def __load_save_state_data(fluidsim, data, cache_directory, savestate_id):
786787
current_autosave_directory = os.path.join(savestate_directory, "autosave")
787788
if savestate_name != "autosave" and os.path.isdir(current_autosave_directory):
788789
backup_autosave_directory = current_autosave_directory + ".backup"
790+
if os.path.isdir(backup_autosave_directory):
791+
# Backup autosave directory may already exist from a previous bake, remove if so
792+
fpl.delete_files_in_directory(backup_autosave_directory, [".state", ".data"], remove_directory=True)
789793
os.rename(current_autosave_directory, backup_autosave_directory)
790794
try:
791795
old_directory = autosave_directory
792796
new_directory = os.path.join(savestate_directory, "autosave")
793-
os.rename(old_directory, new_directory)
797+
shutil.copytree(old_directory, new_directory, dirs_exist_ok=True)
794798
fpl.delete_files_in_directory(backup_autosave_directory, [".state", ".data"], remove_directory=True)
795799
except Exception as e:
796800
os.rename(backup_autosave_directory, current_autosave_directory)

src/addon/operators/draw_force_field_operators.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@
1616

1717
import bpy, blf, math, colorsys
1818

19-
try:
20-
import bgl
21-
except ImportError:
22-
# bgl module may be deprecated depending on Blender version
23-
pass
24-
2519
from bpy.props import (
2620
IntProperty
2721
)
@@ -194,9 +188,15 @@ def draw_callback_3d(self, context):
194188
# be deprecated in Blender 3.7. Use gpu module instead.
195189
gpu.state.point_size_set(dprops.debug.force_field_line_size)
196190
else:
191+
# only attempt to import bgl when necessary (older versions of Blender). In Blender >= 3.5,
192+
# importing bgl generates a warning, and possibly an error in Blender >= 4.0.
193+
import bgl
197194
bgl.glPointSize(dprops.debug.force_field_line_size)
198195
particle_batch_draw.draw(particle_shader)
199196
else:
197+
# only attempt to import bgl when necessary (older versions of Blender). In Blender >= 3.5,
198+
# importing bgl generates a warning, and possibly an error in Blender >= 4.0.
199+
import bgl
200200
bgl.glPointSize(dprops.debug.force_field_line_size)
201201
bgl.glBegin(bgl.GL_POINTS)
202202

src/addon/operators/draw_grid_operators.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@
1616

1717
import bpy, blf, math, colorsys
1818

19-
try:
20-
import bgl
21-
except ImportError:
22-
# bgl module may be deprecated depending on Blender version
23-
pass
24-
2519
from bpy.props import (
2620
IntProperty
2721
)
@@ -395,6 +389,7 @@ def draw_callback_3d(self, context):
395389
shader.uniform_float("color", (bounds_color[0], bounds_color[1], bounds_color[2], 1.0))
396390
batch.draw(shader)
397391
else:
392+
import bgl
398393
bgl.glLineWidth(1)
399394
bgl.glBegin(bgl.GL_LINES)
400395

src/addon/operators/draw_particles_operators.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@
1616

1717
import bpy, blf, math, colorsys
1818

19-
try:
20-
import bgl
21-
except ImportError:
22-
# bgl module may be deprecated depending on Blender version
23-
pass
24-
2519
from bpy.props import (
2620
IntProperty
2721
)
@@ -233,9 +227,15 @@ def draw_callback_3d(self, context):
233227
# be deprecated in Blender 3.7. Use gpu module instead.
234228
gpu.state.point_size_set(dprops.debug.particle_size)
235229
else:
230+
# only attempt to import bgl when necessary (older versions of Blender). In Blender >= 3.5,
231+
# importing bgl generates a warning, and possibly an error in Blender >= 4.0.
232+
import bgl
236233
bgl.glPointSize(dprops.debug.particle_size)
237234
particle_batch_draw.draw(particle_shader)
238235
else:
236+
# only attempt to import bgl when necessary (older versions of Blender). In Blender >= 3.5,
237+
# importing bgl generates a warning, and possibly an error in Blender >= 4.0.
238+
import bgl
239239
bgl.glPointSize(dprops.debug.particle_size)
240240
bgl.glBegin(bgl.GL_POINTS)
241241

src/addon/operators/helper_operators.py

+6
Original file line numberDiff line numberDiff line change
@@ -1380,6 +1380,8 @@ def execute(self, context):
13801380
subprocess.call(["open", "-a", "Terminal", script_filepath])
13811381
else:
13821382
if shutil.which("gnome-terminal") is not None and shutil.which("bash") is not None:
1383+
# Requited to escape spaces for the script_filepath + "; exec bash" command to run
1384+
script_filepath = script_filepath.replace(" ", "\\ ")
13831385
subprocess.call(["gnome-terminal", "--", "bash", "-c", script_filepath + "; exec bash"])
13841386
elif shutil.which("xterm") is not None:
13851387
subprocess.call(["xterm", "-hold", "-e", script_filepath])
@@ -1517,6 +1519,8 @@ def execute(self, context):
15171519
subprocess.call(["open", "-a", "Terminal", script_filepath])
15181520
else:
15191521
if shutil.which("gnome-terminal") is not None and shutil.which("bash") is not None:
1522+
# Requited to escape spaces for the script_filepath + "; exec bash" command to run
1523+
script_filepath = script_filepath.replace(" ", "\\ ")
15201524
subprocess.call(["gnome-terminal", "--", "bash", "-c", script_filepath + "; exec bash"])
15211525
elif shutil.which("xterm") is not None:
15221526
subprocess.call(["xterm", "-hold", "-e", script_filepath])
@@ -1658,6 +1662,8 @@ def execute(self, context):
16581662
subprocess.call(["open", "-a", "Terminal", script_filepath])
16591663
else:
16601664
if shutil.which("gnome-terminal") is not None and shutil.which("bash") is not None:
1665+
# Requited to escape spaces for the script_filepath + "; exec bash" command to run
1666+
script_filepath = script_filepath.replace(" ", "\\ ")
16611667
subprocess.call(["gnome-terminal", "--", "bash", "-c", script_filepath + "; exec bash"])
16621668
elif shutil.which("xterm") is not None:
16631669
subprocess.call(["xterm", "-hold", "-e", script_filepath])

src/addon/properties/domain_advanced_properties.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,9 @@ class DomainAdvancedProperties(bpy.types.PropertyGroup):
133133
description="Attempt to remove extreme particle velocities that"
134134
" cause the simulator to exceed the maximum number of allowed"
135135
" frame substeps. Enabling this option may prevent simulation"
136-
" blow-up in extreme cases. Disable this option if fast moving"
137-
" fluid is disappearing from the simulation domain",
136+
" blow-up in extreme cases. It is not recommended to disable"
137+
" this option outside of experimentation and testing. Disabling"
138+
" can result in unstable simulations and/or extreme simulation times",
138139
default=True,
139140
); exec(conv("enable_extreme_velocity_removal"))
140141
enable_gpu_features = BoolProperty(

src/addon/properties/domain_cache_properties.py

+1
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ def is_linked_geometry_directory(self):
132132
if os.path.isdir(linked_export_directory):
133133
return True
134134
else:
135+
database_filename = "export_data.sqlite3"
135136
incorrect_filepath_test = os.path.join(linked_geometry_directory, database_filename)
136137
if os.path.isfile(incorrect_filepath_test):
137138
return True

src/addon/properties/domain_whitewater_properties.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,10 @@ class DomainWhitewaterProperties(bpy.types.PropertyGroup):
223223
name="Max Particles (in millions)",
224224
description="Maximum number of whitewater particles (in millions)"
225225
" to simulate. The solver will stop generating new whitewater"
226-
" particles to prevent exceeding this limit",
226+
" particles to prevent exceeding this limit. If set to 0, the"
227+
" solver will not limit the number of whitewater particles,"
228+
" however this may require large amounts of storage space depending"
229+
" on the simulation",
227230
min=0, max=2000,
228231
default=12,
229232
precision=2,

src/addon/properties/fluid_properties.py

+26-21
Original file line numberDiff line numberDiff line change
@@ -205,27 +205,32 @@ def refresh_property_registry(self):
205205

206206

207207
def _initialize_property_registry(self):
208-
self.property_registry.clear()
209-
add = self.property_registry.add_property
210-
add("fluid.initial_velocity", "")
211-
add("fluid.append_object_velocity", "")
212-
add("fluid.append_object_velocity_influence", "")
213-
add("fluid.priority", "")
214-
add("fluid.fluid_velocity_mode", "")
215-
add("fluid.initial_speed", "")
216-
add("fluid.fluid_axis_mode", "")
217-
add("fluid.source_id", "")
218-
add("fluid.viscosity", "")
219-
add("fluid.color", "")
220-
add("fluid.target_object", "")
221-
add("fluid.export_animated_target", "")
222-
add("fluid.export_animated_mesh", "")
223-
add("fluid.skip_reexport", "")
224-
add("fluid.force_reexport_on_next_bake", "")
225-
add("fluid.frame_offset_type", "")
226-
add("fluid.frame_offset", "")
227-
add("fluid.timeline_offset", "")
228-
self._validate_property_registry()
208+
try:
209+
self.property_registry.clear()
210+
add = self.property_registry.add_property
211+
add("fluid.initial_velocity", "")
212+
add("fluid.append_object_velocity", "")
213+
add("fluid.append_object_velocity_influence", "")
214+
add("fluid.priority", "")
215+
add("fluid.fluid_velocity_mode", "")
216+
add("fluid.initial_speed", "")
217+
add("fluid.fluid_axis_mode", "")
218+
add("fluid.source_id", "")
219+
add("fluid.viscosity", "")
220+
add("fluid.color", "")
221+
add("fluid.target_object", "")
222+
add("fluid.export_animated_target", "")
223+
add("fluid.export_animated_mesh", "")
224+
add("fluid.skip_reexport", "")
225+
add("fluid.force_reexport_on_next_bake", "")
226+
add("fluid.frame_offset_type", "")
227+
add("fluid.frame_offset", "")
228+
add("fluid.timeline_offset", "")
229+
self._validate_property_registry()
230+
except:
231+
# Object is immutable if it is a linked library or library_override
232+
# In this case, pass on modifying the object
233+
pass
229234

230235

231236
def _validate_property_registry(self):

src/addon/properties/force_field_properties.py

+34-29
Original file line numberDiff line numberDiff line change
@@ -281,35 +281,40 @@ def refresh_property_registry(self):
281281

282282

283283
def _initialize_property_registry(self):
284-
self.property_registry.clear()
285-
add = self.property_registry.add_property
286-
add("force_field.force_field_type", "")
287-
add("force_field.is_enabled", "")
288-
add("force_field.strength", "")
289-
add("force_field.flow_strength", "")
290-
add("force_field.spin_strength", "")
291-
add("force_field.enable_endcaps", "")
292-
add("force_field.falloff_power", "")
293-
add("force_field.falloff_shape", "")
294-
add("force_field.enable_min_distance", "")
295-
add("force_field.enable_max_distance", "")
296-
add("force_field.min_max_distance", "")
297-
add("force_field.maximum_force_limit_factor", "")
298-
add("force_field.gravity_scale_point", "")
299-
add("force_field.gravity_scale_surface", "")
300-
add("force_field.enable_frontfacing", "")
301-
add("force_field.enable_backfacing", "")
302-
add("force_field.enable_edgefacing", "")
303-
add("force_field.gravity_scale_volume", "")
304-
add("force_field.gravity_scale_curve", "")
305-
add("force_field.gravity_scale_width_point", "")
306-
add("force_field.gravity_scale_width_surface", "")
307-
add("force_field.gravity_scale_width_volume", "")
308-
add("force_field.gravity_scale_width_curve", "")
309-
add("force_field.export_animated_mesh", "")
310-
add("force_field.skip_reexport", "")
311-
add("force_field.force_reexport_on_next_bake", "")
312-
self._validate_property_registry()
284+
try:
285+
self.property_registry.clear()
286+
add = self.property_registry.add_property
287+
add("force_field.force_field_type", "")
288+
add("force_field.is_enabled", "")
289+
add("force_field.strength", "")
290+
add("force_field.flow_strength", "")
291+
add("force_field.spin_strength", "")
292+
add("force_field.enable_endcaps", "")
293+
add("force_field.falloff_power", "")
294+
add("force_field.falloff_shape", "")
295+
add("force_field.enable_min_distance", "")
296+
add("force_field.enable_max_distance", "")
297+
add("force_field.min_max_distance", "")
298+
add("force_field.maximum_force_limit_factor", "")
299+
add("force_field.gravity_scale_point", "")
300+
add("force_field.gravity_scale_surface", "")
301+
add("force_field.enable_frontfacing", "")
302+
add("force_field.enable_backfacing", "")
303+
add("force_field.enable_edgefacing", "")
304+
add("force_field.gravity_scale_volume", "")
305+
add("force_field.gravity_scale_curve", "")
306+
add("force_field.gravity_scale_width_point", "")
307+
add("force_field.gravity_scale_width_surface", "")
308+
add("force_field.gravity_scale_width_volume", "")
309+
add("force_field.gravity_scale_width_curve", "")
310+
add("force_field.export_animated_mesh", "")
311+
add("force_field.skip_reexport", "")
312+
add("force_field.force_reexport_on_next_bake", "")
313+
self._validate_property_registry()
314+
except:
315+
# Object is immutable if it is a linked library or library_override
316+
# In this case, pass on modifying the object
317+
pass
313318

314319

315320
def _validate_property_registry(self):

src/addon/properties/inflow_properties.py

+26-21
Original file line numberDiff line numberDiff line change
@@ -200,27 +200,32 @@ def refresh_property_registry(self):
200200

201201

202202
def _initialize_property_registry(self):
203-
self.property_registry.clear()
204-
add = self.property_registry.add_property
205-
add("inflow.is_enabled", "")
206-
add("inflow.substep_emissions", "")
207-
add("inflow.inflow_velocity_mode", "")
208-
add("inflow.inflow_velocity", "")
209-
add("inflow.append_object_velocity", "")
210-
add("inflow.append_object_velocity_influence", "")
211-
add("inflow.priority", "")
212-
add("inflow.constrain_fluid_velocity", "")
213-
add("inflow.inflow_speed", "")
214-
add("inflow.inflow_axis_mode", "")
215-
add("inflow.source_id", "")
216-
add("inflow.viscosity", "")
217-
add("inflow.color", "")
218-
add("inflow.target_object", "")
219-
add("inflow.export_animated_target", "")
220-
add("inflow.export_animated_mesh", "")
221-
add("inflow.skip_reexport", "")
222-
add("inflow.force_reexport_on_next_bake", "")
223-
self._validate_property_registry()
203+
try:
204+
self.property_registry.clear()
205+
add = self.property_registry.add_property
206+
add("inflow.is_enabled", "")
207+
add("inflow.substep_emissions", "")
208+
add("inflow.inflow_velocity_mode", "")
209+
add("inflow.inflow_velocity", "")
210+
add("inflow.append_object_velocity", "")
211+
add("inflow.append_object_velocity_influence", "")
212+
add("inflow.priority", "")
213+
add("inflow.constrain_fluid_velocity", "")
214+
add("inflow.inflow_speed", "")
215+
add("inflow.inflow_axis_mode", "")
216+
add("inflow.source_id", "")
217+
add("inflow.viscosity", "")
218+
add("inflow.color", "")
219+
add("inflow.target_object", "")
220+
add("inflow.export_animated_target", "")
221+
add("inflow.export_animated_mesh", "")
222+
add("inflow.skip_reexport", "")
223+
add("inflow.force_reexport_on_next_bake", "")
224+
self._validate_property_registry()
225+
except:
226+
# Object is immutable if it is a linked library or library_override
227+
# In this case, pass on modifying the object
228+
pass
224229

225230

226231
def _validate_property_registry(self):

src/addon/properties/obstacle_properties.py

+18-13
Original file line numberDiff line numberDiff line change
@@ -134,19 +134,24 @@ def refresh_property_registry(self):
134134

135135

136136
def _initialize_property_registry(self):
137-
self.property_registry.clear()
138-
add = self.property_registry.add_property
139-
add("obstacle.is_enabled", "")
140-
add("obstacle.is_inversed", "")
141-
add("obstacle.export_animated_mesh", "")
142-
add("obstacle.skip_reexport", "")
143-
add("obstacle.force_reexport_on_next_bake", "")
144-
add("obstacle.friction", "")
145-
add("obstacle.whitewater_influence", "")
146-
add("obstacle.dust_emission_strength", "")
147-
add("obstacle.sheeting_strength", "")
148-
add("obstacle.mesh_expansion", "")
149-
self._validate_property_registry()
137+
try:
138+
self.property_registry.clear()
139+
add = self.property_registry.add_property
140+
add("obstacle.is_enabled", "")
141+
add("obstacle.is_inversed", "")
142+
add("obstacle.export_animated_mesh", "")
143+
add("obstacle.skip_reexport", "")
144+
add("obstacle.force_reexport_on_next_bake", "")
145+
add("obstacle.friction", "")
146+
add("obstacle.whitewater_influence", "")
147+
add("obstacle.dust_emission_strength", "")
148+
add("obstacle.sheeting_strength", "")
149+
add("obstacle.mesh_expansion", "")
150+
self._validate_property_registry()
151+
except:
152+
# Object is immutable if it is a linked library or library_override
153+
# In this case, pass on modifying the object
154+
pass
150155

151156

152157
def _validate_property_registry(self):

0 commit comments

Comments
 (0)