Skip to content

Commit 48112c0

Browse files
committed
new demo version 0.7.1!
1 parent ae971e6 commit 48112c0

Some content is hidden

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

47 files changed

+1481
-112
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ Want to try the FLIP Fluids addon before buying the [full marketplace product](h
99

1010
### Getting Started
1111

12-
Download the latest FLIP Fluids Demo installation file here: [FLIP_Fluids_addon_0.7.0_demo_(27_jun_2023.zip)](https://github.com/rlguy/Blender-FLIP-Fluids/releases/download/v0.7.0/FLIP_Fluids_addon_0.7.0_demo_.27_jun_2023.zip)
12+
Download the latest FLIP Fluids Demo installation file here: [FLIP_Fluids_addon_0.7.1_demo_(25_jul_2023.zip)](https://github.com/rlguy/Blender-FLIP-Fluids/releases/download/v0.7.1/FLIP_Fluids_addon_0.7.1_demo_.25_jul_2023.zip)
1313

1414
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.
1515

1616
Get started creating your first simulation with our [beginners guide](https://github.com/rlguy/Blender-FLIP-Fluids/wiki/Creating-Your-First-FLIP-Fluids-Simulation) or [video learning series](https://github.com/rlguy/Blender-FLIP-Fluids/wiki/Video-Learning-Series)!
1717

1818
### Have any questions?
1919

20-
Feel free to send us a message on any of the [official marketplaces](https://github.com/rlguy/Blender-FLIP-Fluids/wiki/Official-Marketplaces-of-the-FLIP-Fluids-Addon), or send us an email at [email protected]. We're always glad to help!
20+
Feel free to send us a message on any of the [official marketplaces](https://github.com/rlguy/Blender-FLIP-Fluids/wiki/Official-Marketplaces-of-the-FLIP-Fluids-Addon), or send us an email at [email protected]. We're always glad to help!

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 7)
56-
set(FLUIDENGINE_VERSION_REVISION 0)
57-
set(FLUIDENGINE_VERSION_DATE "27-JUN-2023")
56+
set(FLUIDENGINE_VERSION_REVISION 1)
57+
set(FLUIDENGINE_VERSION_DATE "25-JUL-2023")
5858

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

src/addon/__init__.py.in

+32-1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ from .utils import version_compatibility_utils as vcu
7474

7575
@bpy.app.handlers.persistent
7676
def scene_update_post(scene):
77+
if scene.flip_fluid.is_addon_disabled_in_blend_file():
78+
return
79+
7780
installation_utils.scene_update_post(scene)
7881
if installation_utils.is_addon_active():
7982
if not render.is_rendering():
@@ -86,42 +89,64 @@ def scene_update_post(scene):
8689

8790
@bpy.app.handlers.persistent
8891
def render_init(scene):
92+
if scene.flip_fluid.is_addon_disabled_in_blend_file():
93+
return
94+
8995
render.render_init(scene)
9096

9197

9298
@bpy.app.handlers.persistent
9399
def render_complete(scene):
100+
if scene.flip_fluid.is_addon_disabled_in_blend_file():
101+
return
102+
94103
render.render_complete(scene)
95104

96105

97106
@bpy.app.handlers.persistent
98107
def render_cancel(scene):
108+
if scene.flip_fluid.is_addon_disabled_in_blend_file():
109+
return
110+
99111
render.render_cancel(scene)
100112

101113

102114
@bpy.app.handlers.persistent
103115
def frame_change_pre(scene, depsgraph=None):
104-
pass
116+
if scene.flip_fluid.is_addon_disabled_in_blend_file():
117+
return
105118

106119

107120
@bpy.app.handlers.persistent
108121
def frame_change_post(scene, depsgraph=None):
122+
if scene.flip_fluid.is_addon_disabled_in_blend_file():
123+
return
124+
109125
properties.frame_change_post(scene, depsgraph)
110126
render.frame_change_post(scene, depsgraph)
111127

112128

113129
@bpy.app.handlers.persistent
114130
def render_pre(scene, depsgraph=None):
131+
if scene.flip_fluid.is_addon_disabled_in_blend_file():
132+
return
133+
115134
render.render_pre(scene)
116135

117136

118137
@bpy.app.handlers.persistent
119138
def load_pre(nonedata):
139+
if bpy.context.scene.flip_fluid.is_addon_disabled_in_blend_file():
140+
return
141+
120142
properties.load_pre()
121143

122144

123145
@bpy.app.handlers.persistent
124146
def load_post(nonedata):
147+
if bpy.context.scene.flip_fluid.is_addon_disabled_in_blend_file():
148+
return
149+
125150
if vcu.is_blender_28() and not vcu.is_blender_281():
126151
print("FLIP FLUIDS WARNING: Blender 2.80 contains bugs that can cause frequent crashes during render, Alembic export, and rigid/cloth simulation baking. Blender version 2.81 or higher is recommended.")
127152

@@ -134,11 +159,17 @@ def load_post(nonedata):
134159

135160
@bpy.app.handlers.persistent
136161
def save_pre(nonedata):
162+
if bpy.context.scene.flip_fluid.is_addon_disabled_in_blend_file():
163+
return
164+
137165
properties.save_pre()
138166

139167

140168
@bpy.app.handlers.persistent
141169
def save_post(nonedata):
170+
if bpy.context.scene.flip_fluid.is_addon_disabled_in_blend_file():
171+
return
172+
142173
properties.save_post()
143174
exit_handler.save_post()
144175

src/addon/bake.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1649,10 +1649,11 @@ def __update_animatable_obstacle_properties(data, frameid):
16491649

16501650
mesh_object.enable = __get_parameter_data(data.is_enabled, frameid)
16511651
mesh_object.friction = __get_parameter_data(data.friction, frameid, value_min=0.0)
1652+
mesh_object.velocity_scale = __get_parameter_data(data.velocity_scale, frameid)
16521653
mesh_object.whitewater_influence = __get_parameter_data(data.whitewater_influence, frameid, value_min=0.0)
16531654
mesh_object.dust_emission_strength = __get_parameter_data(data.dust_emission_strength, frameid, value_min=0.0)
16541655
mesh_object.sheeting_strength = __get_parameter_data(data.sheeting_strength, frameid, value_min=0.0)
1655-
mesh_object.mesh_expansion = __get_parameter_data(data.mesh_expansion, frameid, value_min=0.0)
1656+
mesh_object.mesh_expansion = __get_parameter_data(data.mesh_expansion, frameid)
16561657

16571658

16581659
def __update_animatable_meshing_volume_properties(data, frameid):

src/addon/objects/flip_fluid_cache.py

+12
Original file line numberDiff line numberDiff line change
@@ -1727,6 +1727,18 @@ def initialize_cache_settings(self):
17271727
self.obstacle.cache_object_type = "CACHE_OBJECT_TYPE_OBSTACLE"
17281728

17291729

1730+
def is_simulation_mesh_load_enabled(self, mesh_name):
1731+
return render.is_simulation_mesh_load_enabled(mesh_name)
1732+
1733+
1734+
def enable_simulation_mesh_load(self, mesh_name):
1735+
return render.enable_simulation_mesh_load(mesh_name)
1736+
1737+
1738+
def disable_simulation_mesh_load(self, mesh_name):
1739+
return render.disable_simulation_mesh_load(mesh_name)
1740+
1741+
17301742
def load_post(self):
17311743
self._update_deprecated_mesh_storage()
17321744

src/addon/operators/bake_operators.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ def execute(self, context):
324324
os.makedirs(cache_directory)
325325
except:
326326
msg = "Unable to create cache directory: <" + cache_directory + "> "
327-
msg += "Set the FLIP Fluid Cache directory to a location with write permissions."
327+
msg += "Set the cache directory in the 'Domain > FLIP Fluid Cache panel' to a location on your system with write permissions."
328328
self.report({"ERROR_INVALID_INPUT"}, msg)
329329
return {'CANCELLED'}
330330

src/addon/operators/cache_operators.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
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, os, re
17+
import bpy, os, re, shutil
1818

1919
from ..filesystem import filesystem_protection_layer as fpl
2020
from ..utils import version_compatibility_utils as vcu

src/addon/operators/draw_force_field_operators.py

+20-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,18 @@ def update_debug_force_field_geometry(context):
117117
}
118118
"""
119119

120-
particle_shader = gpu.types.GPUShader(vertex_shader, fragment_shader)
120+
if vcu.is_blender_35():
121+
# Needed for support on MacOS Apple Silicon systems in Blender 3.5 or later
122+
# Could possibly be a Blender regression bug why the below method no longer
123+
# works in Blender 3.5 or later for MacOS. Should file a report.
124+
shader_name = '3D_SMOOTH_COLOR'
125+
if vcu.is_blender_40():
126+
shader_name = 'SMOOTH_COLOR'
127+
128+
particle_shader = gpu.shader.from_builtin(shader_name)
129+
else:
130+
particle_shader = gpu.types.GPUShader(vertex_shader, fragment_shader)
131+
121132
particle_batch_draw = batch_for_shader(
122133
particle_shader, 'POINTS',
123134
{"pos": particle_vertices, "color": particle_vertex_colors},
@@ -192,7 +203,15 @@ def draw_callback_3d(self, context):
192203
# importing bgl generates a warning, and possibly an error in Blender >= 4.0.
193204
import bgl
194205
bgl.glPointSize(dprops.debug.force_field_line_size)
206+
207+
if vcu.is_blender_35():
208+
# Can be drawn with depth in Blender 3.5 or later
209+
gpu.state.depth_test_set('LESS_EQUAL')
210+
gpu.state.depth_mask_set(True)
195211
particle_batch_draw.draw(particle_shader)
212+
if vcu.is_blender_35():
213+
gpu.state.depth_mask_set(False)
214+
196215
else:
197216
# only attempt to import bgl when necessary (older versions of Blender). In Blender >= 3.5,
198217
# importing bgl generates a warning, and possibly an error in Blender >= 4.0.

src/addon/operators/draw_grid_operators.py

+25
Original file line numberDiff line numberDiff line change
@@ -373,25 +373,50 @@ def draw_callback_3d(self, context):
373373
batch = batch_for_shader(shader, 'LINES', {"pos": z_coords})
374374
shader.bind()
375375
shader.uniform_float("color", (z_color[0], z_color[1], z_color[2], 1.0))
376+
377+
if vcu.is_blender_35():
378+
# Can be drawn with depth in Blender 3.5 or later
379+
gpu.state.depth_test_set('LESS_EQUAL')
380+
gpu.state.depth_mask_set(True)
376381
batch.draw(shader)
382+
if vcu.is_blender_35():
383+
gpu.state.depth_mask_set(False)
377384
if display_grid and dprops.debug.enabled_debug_grids[1]:
378385
shader = gpu.shader.from_builtin(line_draw_mode)
379386
batch = batch_for_shader(shader, 'LINES', {"pos": y_coords})
380387
shader.bind()
381388
shader.uniform_float("color", (y_color[0], y_color[1], y_color[2], 1.0))
389+
if vcu.is_blender_35():
390+
# Can be drawn with depth in Blender 3.5 or later
391+
gpu.state.depth_test_set('LESS_EQUAL')
392+
gpu.state.depth_mask_set(True)
382393
batch.draw(shader)
394+
if vcu.is_blender_35():
395+
gpu.state.depth_mask_set(False)
383396
if display_grid and dprops.debug.enabled_debug_grids[0]:
384397
shader = gpu.shader.from_builtin(line_draw_mode)
385398
batch = batch_for_shader(shader, 'LINES', {"pos": x_coords})
386399
shader.bind()
387400
shader.uniform_float("color", (x_color[0], x_color[1], x_color[2], 1.0))
401+
if vcu.is_blender_35():
402+
# Can be drawn with depth in Blender 3.5 or later
403+
gpu.state.depth_test_set('LESS_EQUAL')
404+
gpu.state.depth_mask_set(True)
388405
batch.draw(shader)
406+
if vcu.is_blender_35():
407+
gpu.state.depth_mask_set(False)
389408
if dprops.debug.display_domain_bounds:
390409
shader = gpu.shader.from_builtin(line_draw_mode)
391410
batch = batch_for_shader(shader, 'LINES', {"pos": bounds_coords})
392411
shader.bind()
393412
shader.uniform_float("color", (bounds_color[0], bounds_color[1], bounds_color[2], 1.0))
413+
if vcu.is_blender_35():
414+
# Can be drawn with depth in Blender 3.5 or later
415+
gpu.state.depth_test_set('LESS_EQUAL')
416+
gpu.state.depth_mask_set(True)
394417
batch.draw(shader)
418+
if vcu.is_blender_35():
419+
gpu.state.depth_mask_set(False)
395420
else:
396421
import bgl
397422
bgl.glLineWidth(1)

src/addon/operators/draw_particles_operators.py

+20-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,18 @@ def update_debug_particle_geometry(context):
116116
}
117117
"""
118118

119-
particle_shader = gpu.types.GPUShader(vertex_shader, fragment_shader)
119+
if vcu.is_blender_35():
120+
# Needed for support on MacOS Apple Silicon systems in Blender 3.5 or later
121+
# Could possibly be a Blender regression bug why the below method no longer
122+
# works in Blender 3.5 or later for MacOS. Should file a report.
123+
shader_name = '3D_SMOOTH_COLOR'
124+
if vcu.is_blender_40():
125+
shader_name = 'SMOOTH_COLOR'
126+
127+
particle_shader = gpu.shader.from_builtin(shader_name)
128+
else:
129+
particle_shader = gpu.types.GPUShader(vertex_shader, fragment_shader)
130+
120131
particle_batch_draw = batch_for_shader(
121132
particle_shader, 'POINTS',
122133
{"pos": particle_vertices, "color": particle_vertex_colors},
@@ -231,7 +242,15 @@ def draw_callback_3d(self, context):
231242
# importing bgl generates a warning, and possibly an error in Blender >= 4.0.
232243
import bgl
233244
bgl.glPointSize(dprops.debug.particle_size)
245+
246+
if vcu.is_blender_35():
247+
# Can be drawn with depth in Blender 3.5 or later
248+
gpu.state.depth_test_set('LESS_EQUAL')
249+
gpu.state.depth_mask_set(True)
234250
particle_batch_draw.draw(particle_shader)
251+
if vcu.is_blender_35():
252+
gpu.state.depth_mask_set(False)
253+
235254
else:
236255
# only attempt to import bgl when necessary (older versions of Blender). In Blender >= 3.5,
237256
# importing bgl generates a warning, and possibly an error in Blender >= 4.0.

0 commit comments

Comments
 (0)