Skip to content

Commit 4b2b759

Browse files
committed
new demo version 0.6.2!
1 parent 2356baf commit 4b2b759

File tree

589 files changed

+149991
-370
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

589 files changed

+149991
-370
lines changed

LICENSE_MIT.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (C) 2022 Ryan L. Guy
1+
Copyright (C) 2023 Ryan L. Guy
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

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.1_demo_(06_jan_2023.zip)](https://github.com/rlguy/Blender-FLIP-Fluids/releases/download/v0.6.1/FLIP_Fluids_addon_0.6.1_demo_.06_jan_2023.zip)
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)
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

__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Blender FLIP Fluids Add-on
2-
# Copyright (C) 2022 Ryan L. Guy
2+
# Copyright (C) 2023 Ryan L. Guy
33
#
44
# This program is free software: you can redistribute it and/or modify
55
# it under the terms of the GNU General Public License as published by

build.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MIT License
22
#
3-
# Copyright (C) 2022 Ryan L. Guy
3+
# Copyright (C) 2023 Ryan L. Guy
44
#
55
# Permission is hereby granted, free of charge, to any person obtaining a copy
66
# of this software and associated documentation files (the "Software"), to deal

cmake/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#[[
2-
Copyright (C) 2022 Ryan L. Guy
2+
Copyright (C) 2023 Ryan L. Guy
33
44
Permission is hereby granted, free of charge, to any person obtaining a copy
55
of this software and associated documentation files (the "Software"), to deal
@@ -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 1)
57-
set(FLUIDENGINE_VERSION_DATE "06-JAN-2022")
56+
set(FLUIDENGINE_VERSION_REVISION 2)
57+
set(FLUIDENGINE_VERSION_DATE "29-MAR-2023")
5858

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

src/addon/__init__.py.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Blender FLIP Fluids Add-on
2-
# Copyright (C) 2022 Ryan L. Guy
2+
# Copyright (C) 2023 Ryan L. Guy
33
#
44
# This program is free software: you can redistribute it and/or modify
55
# it under the terms of the GNU General Public License as published by

src/addon/bake.py

+60-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Blender FLIP Fluids Add-on
2-
# Copyright (C) 2022 Ryan L. Guy
2+
# Copyright (C) 2023 Ryan L. Guy
33
#
44
# This program is free software: you can redistribute it and/or modify
55
# it under the terms of the GNU General Public License as published by
@@ -821,6 +821,12 @@ def __initialize_fluid_simulation_settings(fluidsim, data):
821821
fluidsim.set_domain_offset(bbox.x, bbox.y, bbox.z)
822822
fluidsim.set_domain_scale(1.0 / dprops.initialize.scale)
823823

824+
fluid_boundary_collisions = __get_parameter_data(dprops.simulation.fluid_boundary_collisions, frameno)
825+
fluidsim.fluid_boundary_collisions = fluid_boundary_collisions
826+
827+
open_boundary_width = __get_parameter_data(dprops.simulation.fluid_open_boundary_width, frameno)
828+
fluidsim.fluid_open_boundary_width = open_boundary_width
829+
824830
# Whitewater Simulation Settings
825831

826832
whitewater = dprops.whitewater
@@ -900,6 +906,25 @@ def __initialize_fluid_simulation_settings(fluidsim, data):
900906
fluidsim.spray_particle_lifetime_modifier = 1.0 / max(spray_modifier, 1e-6)
901907
fluidsim.dust_particle_lifetime_modifier = 1.0 / max(dust_modifier, 1e-6)
902908

909+
boundary_collisions_mode = __get_parameter_data(whitewater.whitewater_boundary_collisions_mode, frameno)
910+
if boundary_collisions_mode == 'BOUNDARY_COLLISIONS_MODE_INHERIT':
911+
fluid_boundary_collisions = __get_parameter_data(dprops.simulation.fluid_boundary_collisions, frameno)
912+
foam_boundary_collisions = fluid_boundary_collisions
913+
bubble_boundary_collisions = fluid_boundary_collisions
914+
spray_boundary_collisions = fluid_boundary_collisions
915+
dust_boundary_collisions = fluid_boundary_collisions
916+
else:
917+
foam_boundary_collisions = __get_parameter_data(whitewater.foam_boundary_collisions, frameno)
918+
bubble_boundary_collisions = __get_parameter_data(whitewater.bubble_boundary_collisions, frameno)
919+
spray_boundary_collisions = __get_parameter_data(whitewater.spray_boundary_collisions, frameno)
920+
dust_boundary_collisions = __get_parameter_data(whitewater.dust_boundary_collisions, frameno)
921+
922+
fluidsim.foam_boundary_collisions = foam_boundary_collisions
923+
fluidsim.bubble_boundary_collisions = bubble_boundary_collisions
924+
fluidsim.spray_boundary_collisions = spray_boundary_collisions
925+
fluidsim.dust_boundary_collisions = dust_boundary_collisions
926+
927+
"""
903928
foam_behaviour = __get_parameter_data(whitewater.foam_boundary_behaviour, frameno)
904929
bubble_behaviour = __get_parameter_data(whitewater.bubble_boundary_behaviour, frameno)
905930
spray_behaviour = __get_parameter_data(whitewater.spray_boundary_behaviour, frameno)
@@ -921,6 +946,7 @@ def __initialize_fluid_simulation_settings(fluidsim, data):
921946
fluidsim.diffuse_bubble_active_boundary_sides = bubble_active_sides
922947
fluidsim.diffuse_spray_active_boundary_sides = spray_active_sides
923948
fluidsim.diffuse_dust_active_boundary_sides = dust_active_sides
949+
"""
924950

925951
strength = __get_parameter_data(whitewater.foam_advection_strength, frameno)
926952
foam_depth = __get_parameter_data(whitewater.foam_layer_depth, frameno)
@@ -1054,8 +1080,12 @@ def __initialize_fluid_simulation_settings(fluidsim, data):
10541080

10551081
fluidsim.enable_surface_velocity_attribute = \
10561082
__get_parameter_data(surface.enable_velocity_vector_attribute, frameno)
1057-
fluidsim.enable_surface_velocity_attribute_against_obstacles = \
1058-
__get_parameter_data(surface.enable_velocity_vector_attribute_against_obstacles, frameno)
1083+
1084+
# Option should always be enabled
1085+
# fluidsim.enable_surface_velocity_attribute_against_obstacles = \
1086+
# __get_parameter_data(surface.enable_velocity_vector_attribute_against_obstacles, frameno)
1087+
fluidsim.enable_surface_velocity_attribute_against_obstacles = True
1088+
10591089
fluidsim.enable_surface_speed_attribute = \
10601090
__get_parameter_data(surface.enable_speed_attribute, frameno)
10611091
fluidsim.enable_surface_vorticity_attribute = \
@@ -1705,6 +1735,13 @@ def __set_meshing_volume_object(fluidsim, data, frameid=0):
17051735
def __update_animatable_domain_properties(fluidsim, data, frameno):
17061736
dprops = data.domain_data
17071737

1738+
# Simulation Settings
1739+
fluid_boundary_collisions = __get_parameter_data(dprops.simulation.fluid_boundary_collisions, frameno)
1740+
__set_property(fluidsim, 'fluid_boundary_collisions', fluid_boundary_collisions)
1741+
1742+
open_boundary_width = __get_parameter_data(dprops.simulation.fluid_open_boundary_width, frameno)
1743+
__set_property(fluidsim, 'fluid_open_boundary_width', open_boundary_width)
1744+
17081745
# Whitewater Simulation Settings
17091746
whitewater = dprops.whitewater
17101747
if __get_parameter_data(whitewater.enable_whitewater_simulation):
@@ -1771,6 +1808,25 @@ def __update_animatable_domain_properties(fluidsim, data, frameno):
17711808
__set_property(fluidsim, 'spray_particle_lifetime_modifier', 1.0 / max(spray_modifier, 1e-6))
17721809
__set_property(fluidsim, 'dust_particle_lifetime_modifier', 1.0 / max(dust_modifier, 1e-6))
17731810

1811+
boundary_collisions_mode = __get_parameter_data(whitewater.whitewater_boundary_collisions_mode, frameno)
1812+
if boundary_collisions_mode == 'BOUNDARY_COLLISIONS_MODE_INHERIT':
1813+
fluid_boundary_collisions = __get_parameter_data(dprops.simulation.fluid_boundary_collisions, frameno)
1814+
foam_boundary_collisions = fluid_boundary_collisions
1815+
bubble_boundary_collisions = fluid_boundary_collisions
1816+
spray_boundary_collisions = fluid_boundary_collisions
1817+
dust_boundary_collisions = fluid_boundary_collisions
1818+
else:
1819+
foam_boundary_collisions = __get_parameter_data(whitewater.foam_boundary_collisions, frameno)
1820+
bubble_boundary_collisions = __get_parameter_data(whitewater.bubble_boundary_collisions, frameno)
1821+
spray_boundary_collisions = __get_parameter_data(whitewater.spray_boundary_collisions, frameno)
1822+
dust_boundary_collisions = __get_parameter_data(whitewater.dust_boundary_collisions, frameno)
1823+
1824+
__set_property(fluidsim, 'foam_boundary_collisions', foam_boundary_collisions)
1825+
__set_property(fluidsim, 'bubble_boundary_collisions', bubble_boundary_collisions)
1826+
__set_property(fluidsim, 'spray_boundary_collisions', spray_boundary_collisions)
1827+
__set_property(fluidsim, 'dust_boundary_collisions', dust_boundary_collisions)
1828+
1829+
"""
17741830
foam_behaviour = __get_parameter_data(whitewater.foam_boundary_behaviour, frameno)
17751831
bubble_behaviour = __get_parameter_data(whitewater.bubble_boundary_behaviour, frameno)
17761832
spray_behaviour = __get_parameter_data(whitewater.spray_boundary_behaviour, frameno)
@@ -1792,6 +1848,7 @@ def __update_animatable_domain_properties(fluidsim, data, frameno):
17921848
__set_property(fluidsim, 'diffuse_bubble_active_boundary_sides', bubble_active_sides)
17931849
__set_property(fluidsim, 'diffuse_spray_active_boundary_sides', spray_active_sides)
17941850
__set_property(fluidsim, 'diffuse_dust_active_boundary_sides', dust_active_sides)
1851+
"""
17951852

17961853
strength = __get_parameter_data(whitewater.foam_advection_strength, frameno)
17971854
foam_depth = __get_parameter_data(whitewater.foam_layer_depth, frameno)

src/addon/exit_handler.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Blender FLIP Fluids Add-on
2-
# Copyright (C) 2022 Ryan L. Guy
2+
# Copyright (C) 2023 Ryan L. Guy
33
#
44
# This program is free software: you can redistribute it and/or modify
55
# it under the terms of the GNU General Public License as published by

src/addon/export.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Blender FLIP Fluids Add-on
2-
# Copyright (C) 2022 Ryan L. Guy
2+
# Copyright (C) 2023 Ryan L. Guy
33
#
44
# This program is free software: you can redistribute it and/or modify
55
# it under the terms of the GNU General Public License as published by
@@ -132,6 +132,7 @@ def __get_domain_data_dict(context, dobj):
132132

133133
d['initialize'] = initialize_properties
134134

135+
dprops.advanced.initialize_num_threads_auto_detect()
135136
d['advanced']['num_threads_auto_detect'] = dprops.advanced.num_threads_auto_detect
136137
d['simulation']['frames_per_second'] = dprops.simulation.get_frame_rate_data_dict()
137138
d['world']['gravity'] = dprops.world.get_gravity_data_dict()

src/addon/filesystem/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Blender FLIP Fluids Add-on
2-
# Copyright (C) 2022 Ryan L. Guy
2+
# Copyright (C) 2023 Ryan L. Guy
33
#
44
# This program is free software: you can redistribute it and/or modify
55
# it under the terms of the GNU General Public License as published by

src/addon/filesystem/filesystem_protection_layer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Blender FLIP Fluids Add-on
2-
# Copyright (C) 2022 Ryan L. Guy
2+
# Copyright (C) 2023 Ryan L. Guy
33
#
44
# This program is free software: you can redistribute it and/or modify
55
# it under the terms of the GNU General Public License as published by

src/addon/materials/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Blender FLIP Fluids Add-on
2-
# Copyright (C) 2022 Ryan L. Guy
2+
# Copyright (C) 2023 Ryan L. Guy
33
#
44
# This program is free software: you can redistribute it and/or modify
55
# it under the terms of the GNU General Public License as published by

src/addon/materials/material_library.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Blender FLIP Fluids Add-on
2-
# Copyright (C) 2022 Ryan L. Guy
2+
# Copyright (C) 2023 Ryan L. Guy
33
#
44
# This program is free software: you can redistribute it and/or modify
55
# it under the terms of the GNU General Public License as published by

src/addon/objects/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Blender FLIP Fluids Add-on
2-
# Copyright (C) 2022 Ryan L. Guy
2+
# Copyright (C) 2023 Ryan L. Guy
33
#
44
# This program is free software: you can redistribute it and/or modify
55
# it under the terms of the GNU General Public License as published by

src/addon/objects/flip_fluid_aabb.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Blender FLIP Fluids Add-on
2-
# Copyright (C) 2022 Ryan L. Guy
2+
# Copyright (C) 2023 Ryan L. Guy
33
#
44
# This program is free software: you can redistribute it and/or modify
55
# it under the terms of the GNU General Public License as published by

src/addon/objects/flip_fluid_cache.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Blender FLIP Fluids Add-on
2-
# Copyright (C) 2022 Ryan L. Guy
2+
# Copyright (C) 2023 Ryan L. Guy
33
#
44
# This program is free software: you can redistribute it and/or modify
55
# it under the terms of the GNU General Public License as published by
@@ -244,8 +244,10 @@ def reset_cache_object(self):
244244
is_smooth = self._is_mesh_smooth(mesh_data)
245245
octane_mesh_type = self._get_octane_mesh_type(cache_object)
246246

247-
mesh_data.clear_geometry()
248-
mesh_data.from_pydata([], [], [])
247+
vcu.swap_object_mesh_data_geometry(cache_object, [], [],
248+
mesh_data,
249+
is_smooth,
250+
octane_mesh_type)
249251

250252
self._set_mesh_smoothness(mesh_data, is_smooth)
251253
self._set_octane_settings(cache_object, octane_mesh_type)

src/addon/objects/flip_fluid_geometry_database.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Blender FLIP Fluids Add-on
2-
# Copyright (C) 2022 Ryan L. Guy
2+
# Copyright (C) 2023 Ryan L. Guy
33
#
44
# This program is free software: you can redistribute it and/or modify
55
# it under the terms of the GNU General Public License as published by

src/addon/objects/flip_fluid_geometry_export_object.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Blender FLIP Fluids Add-on
2-
# Copyright (C) 2022 Ryan L. Guy
2+
# Copyright (C) 2023 Ryan L. Guy
33
#
44
# This program is free software: you can redistribute it and/or modify
55
# it under the terms of the GNU General Public License as published by

src/addon/objects/flip_fluid_geometry_exporter.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Blender FLIP Fluids Add-on
2-
# Copyright (C) 2022 Ryan L. Guy
2+
# Copyright (C) 2023 Ryan L. Guy
33
#
44
# This program is free software: you can redistribute it and/or modify
55
# it under the terms of the GNU General Public License as published by

src/addon/objects/flip_fluid_map.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Blender FLIP Fluids Add-on
2-
# Copyright (C) 2022 Ryan L. Guy
2+
# Copyright (C) 2023 Ryan L. Guy
33
#
44
# This program is free software: you can redistribute it and/or modify
55
# it under the terms of the GNU General Public License as published by

src/addon/objects/flip_fluid_material_library.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Blender FLIP Fluids Add-on
2-
# Copyright (C) 2022 Ryan L. Guy
2+
# Copyright (C) 2023 Ryan L. Guy
33
#
44
# This program is free software: you can redistribute it and/or modify
55
# it under the terms of the GNU General Public License as published by

src/addon/objects/flip_fluid_preset_stack.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Blender FLIP Fluids Add-on
2-
# Copyright (C) 2022 Ryan L. Guy
2+
# Copyright (C) 2023 Ryan L. Guy
33
#
44
# This program is free software: you can redistribute it and/or modify
55
# it under the terms of the GNU General Public License as published by

src/addon/operators/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Blender FLIP Fluids Add-on
2-
# Copyright (C) 2022 Ryan L. Guy
2+
# Copyright (C) 2023 Ryan L. Guy
33
#
44
# This program is free software: you can redistribute it and/or modify
55
# it under the terms of the GNU General Public License as published by

src/addon/operators/bake_operators.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Blender FLIP Fluids Add-on
2-
# Copyright (C) 2022 Ryan L. Guy
2+
# Copyright (C) 2023 Ryan L. Guy
33
#
44
# This program is free software: you can redistribute it and/or modify
55
# it under the terms of the GNU General Public License as published by

src/addon/operators/cache_operators.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Blender FLIP Fluids Add-on
2-
# Copyright (C) 2022 Ryan L. Guy
2+
# Copyright (C) 2023 Ryan L. Guy
33
#
44
# This program is free software: you can redistribute it and/or modify
55
# it under the terms of the GNU General Public License as published by

src/addon/operators/draw_force_field_operators.py

+15-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Blender FLIP Fluids Add-on
2-
# Copyright (C) 2022 Ryan L. Guy
2+
# Copyright (C) 2023 Ryan L. Guy
33
#
44
# This program is free software: you can redistribute it and/or modify
55
# it under the terms of the GNU General Public License as published by
@@ -14,7 +14,14 @@
1414
# You should have received a copy of the GNU General Public License
1515
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1616

17-
import bpy, bgl, blf, math, colorsys
17+
import bpy, blf, math, colorsys
18+
19+
try:
20+
import bgl
21+
except ImportError:
22+
# bgl module may be deprecated depending on Blender version
23+
pass
24+
1825
from bpy.props import (
1926
IntProperty
2027
)
@@ -182,7 +189,12 @@ def draw_callback_3d(self, context):
182189
if vcu.is_blender_28():
183190
global particle_shader
184191
global particle_batch_draw
185-
bgl.glPointSize(dprops.debug.force_field_line_size)
192+
if vcu.is_blender_35():
193+
# Warnings in Blender 3.5 when using bgl module, which is to
194+
# be deprecated in Blender 3.7. Use gpu module instead.
195+
gpu.state.point_size_set(dprops.debug.force_field_line_size)
196+
else:
197+
bgl.glPointSize(dprops.debug.force_field_line_size)
186198
particle_batch_draw.draw(particle_shader)
187199
else:
188200
bgl.glPointSize(dprops.debug.force_field_line_size)

src/addon/operators/draw_grid_operators.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Blender FLIP Fluids Add-on
2-
# Copyright (C) 2022 Ryan L. Guy
2+
# Copyright (C) 2023 Ryan L. Guy
33
#
44
# This program is free software: you can redistribute it and/or modify
55
# it under the terms of the GNU General Public License as published by
@@ -14,7 +14,14 @@
1414
# You should have received a copy of the GNU General Public License
1515
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1616

17-
import bpy, bgl, blf, math, colorsys
17+
import bpy, blf, math, colorsys
18+
19+
try:
20+
import bgl
21+
except ImportError:
22+
# bgl module may be deprecated depending on Blender version
23+
pass
24+
1825
from bpy.props import (
1926
IntProperty
2027
)

0 commit comments

Comments
 (0)