Skip to content

Commit

Permalink
new demo version 0.6.2!
Browse files Browse the repository at this point in the history
  • Loading branch information
rlguy committed Mar 28, 2023
1 parent 2356baf commit 4b2b759
Show file tree
Hide file tree
Showing 589 changed files with 149,991 additions and 370 deletions.
2 changes: 1 addition & 1 deletion LICENSE_MIT.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (C) 2022 Ryan L. Guy
Copyright (C) 2023 Ryan L. Guy

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Want to try the FLIP Fluids addon before buying the [full marketplace product](h

### Getting Started

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)
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)

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.

Expand Down
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Blender FLIP Fluids Add-on
# Copyright (C) 2022 Ryan L. Guy
# Copyright (C) 2023 Ryan L. Guy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion build.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License
#
# Copyright (C) 2022 Ryan L. Guy
# Copyright (C) 2023 Ryan L. Guy
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 3 additions & 3 deletions cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#[[
Copyright (C) 2022 Ryan L. Guy
Copyright (C) 2023 Ryan L. Guy

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -53,8 +53,8 @@ set(CMAKE_BUILD_TYPE Release)
set(FLUIDENGINE_VERSION_TYPE_IS_STABLE_BUILD TRUE)
set(FLUIDENGINE_VERSION_MAJOR 0)
set(FLUIDENGINE_VERSION_MINOR 6)
set(FLUIDENGINE_VERSION_REVISION 1)
set(FLUIDENGINE_VERSION_DATE "06-JAN-2022")
set(FLUIDENGINE_VERSION_REVISION 2)
set(FLUIDENGINE_VERSION_DATE "29-MAR-2023")

if(FLUIDENGINE_VERSION_TYPE_IS_STABLE_BUILD)
set(FLUIDENGINE_VERSION_TYPE_LABEL "Demo")
Expand Down
2 changes: 1 addition & 1 deletion src/addon/__init__.py.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Blender FLIP Fluids Add-on
# Copyright (C) 2022 Ryan L. Guy
# Copyright (C) 2023 Ryan L. Guy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
63 changes: 60 additions & 3 deletions src/addon/bake.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Blender FLIP Fluids Add-on
# Copyright (C) 2022 Ryan L. Guy
# Copyright (C) 2023 Ryan L. Guy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -821,6 +821,12 @@ def __initialize_fluid_simulation_settings(fluidsim, data):
fluidsim.set_domain_offset(bbox.x, bbox.y, bbox.z)
fluidsim.set_domain_scale(1.0 / dprops.initialize.scale)

fluid_boundary_collisions = __get_parameter_data(dprops.simulation.fluid_boundary_collisions, frameno)
fluidsim.fluid_boundary_collisions = fluid_boundary_collisions

open_boundary_width = __get_parameter_data(dprops.simulation.fluid_open_boundary_width, frameno)
fluidsim.fluid_open_boundary_width = open_boundary_width

# Whitewater Simulation Settings

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

boundary_collisions_mode = __get_parameter_data(whitewater.whitewater_boundary_collisions_mode, frameno)
if boundary_collisions_mode == 'BOUNDARY_COLLISIONS_MODE_INHERIT':
fluid_boundary_collisions = __get_parameter_data(dprops.simulation.fluid_boundary_collisions, frameno)
foam_boundary_collisions = fluid_boundary_collisions
bubble_boundary_collisions = fluid_boundary_collisions
spray_boundary_collisions = fluid_boundary_collisions
dust_boundary_collisions = fluid_boundary_collisions
else:
foam_boundary_collisions = __get_parameter_data(whitewater.foam_boundary_collisions, frameno)
bubble_boundary_collisions = __get_parameter_data(whitewater.bubble_boundary_collisions, frameno)
spray_boundary_collisions = __get_parameter_data(whitewater.spray_boundary_collisions, frameno)
dust_boundary_collisions = __get_parameter_data(whitewater.dust_boundary_collisions, frameno)

fluidsim.foam_boundary_collisions = foam_boundary_collisions
fluidsim.bubble_boundary_collisions = bubble_boundary_collisions
fluidsim.spray_boundary_collisions = spray_boundary_collisions
fluidsim.dust_boundary_collisions = dust_boundary_collisions

"""
foam_behaviour = __get_parameter_data(whitewater.foam_boundary_behaviour, frameno)
bubble_behaviour = __get_parameter_data(whitewater.bubble_boundary_behaviour, frameno)
spray_behaviour = __get_parameter_data(whitewater.spray_boundary_behaviour, frameno)
Expand All @@ -921,6 +946,7 @@ def __initialize_fluid_simulation_settings(fluidsim, data):
fluidsim.diffuse_bubble_active_boundary_sides = bubble_active_sides
fluidsim.diffuse_spray_active_boundary_sides = spray_active_sides
fluidsim.diffuse_dust_active_boundary_sides = dust_active_sides
"""

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

fluidsim.enable_surface_velocity_attribute = \
__get_parameter_data(surface.enable_velocity_vector_attribute, frameno)
fluidsim.enable_surface_velocity_attribute_against_obstacles = \
__get_parameter_data(surface.enable_velocity_vector_attribute_against_obstacles, frameno)

# Option should always be enabled
# fluidsim.enable_surface_velocity_attribute_against_obstacles = \
# __get_parameter_data(surface.enable_velocity_vector_attribute_against_obstacles, frameno)
fluidsim.enable_surface_velocity_attribute_against_obstacles = True

fluidsim.enable_surface_speed_attribute = \
__get_parameter_data(surface.enable_speed_attribute, frameno)
fluidsim.enable_surface_vorticity_attribute = \
Expand Down Expand Up @@ -1705,6 +1735,13 @@ def __set_meshing_volume_object(fluidsim, data, frameid=0):
def __update_animatable_domain_properties(fluidsim, data, frameno):
dprops = data.domain_data

# Simulation Settings
fluid_boundary_collisions = __get_parameter_data(dprops.simulation.fluid_boundary_collisions, frameno)
__set_property(fluidsim, 'fluid_boundary_collisions', fluid_boundary_collisions)

open_boundary_width = __get_parameter_data(dprops.simulation.fluid_open_boundary_width, frameno)
__set_property(fluidsim, 'fluid_open_boundary_width', open_boundary_width)

# Whitewater Simulation Settings
whitewater = dprops.whitewater
if __get_parameter_data(whitewater.enable_whitewater_simulation):
Expand Down Expand Up @@ -1771,6 +1808,25 @@ def __update_animatable_domain_properties(fluidsim, data, frameno):
__set_property(fluidsim, 'spray_particle_lifetime_modifier', 1.0 / max(spray_modifier, 1e-6))
__set_property(fluidsim, 'dust_particle_lifetime_modifier', 1.0 / max(dust_modifier, 1e-6))

boundary_collisions_mode = __get_parameter_data(whitewater.whitewater_boundary_collisions_mode, frameno)
if boundary_collisions_mode == 'BOUNDARY_COLLISIONS_MODE_INHERIT':
fluid_boundary_collisions = __get_parameter_data(dprops.simulation.fluid_boundary_collisions, frameno)
foam_boundary_collisions = fluid_boundary_collisions
bubble_boundary_collisions = fluid_boundary_collisions
spray_boundary_collisions = fluid_boundary_collisions
dust_boundary_collisions = fluid_boundary_collisions
else:
foam_boundary_collisions = __get_parameter_data(whitewater.foam_boundary_collisions, frameno)
bubble_boundary_collisions = __get_parameter_data(whitewater.bubble_boundary_collisions, frameno)
spray_boundary_collisions = __get_parameter_data(whitewater.spray_boundary_collisions, frameno)
dust_boundary_collisions = __get_parameter_data(whitewater.dust_boundary_collisions, frameno)

__set_property(fluidsim, 'foam_boundary_collisions', foam_boundary_collisions)
__set_property(fluidsim, 'bubble_boundary_collisions', bubble_boundary_collisions)
__set_property(fluidsim, 'spray_boundary_collisions', spray_boundary_collisions)
__set_property(fluidsim, 'dust_boundary_collisions', dust_boundary_collisions)

"""
foam_behaviour = __get_parameter_data(whitewater.foam_boundary_behaviour, frameno)
bubble_behaviour = __get_parameter_data(whitewater.bubble_boundary_behaviour, frameno)
spray_behaviour = __get_parameter_data(whitewater.spray_boundary_behaviour, frameno)
Expand All @@ -1792,6 +1848,7 @@ def __update_animatable_domain_properties(fluidsim, data, frameno):
__set_property(fluidsim, 'diffuse_bubble_active_boundary_sides', bubble_active_sides)
__set_property(fluidsim, 'diffuse_spray_active_boundary_sides', spray_active_sides)
__set_property(fluidsim, 'diffuse_dust_active_boundary_sides', dust_active_sides)
"""

strength = __get_parameter_data(whitewater.foam_advection_strength, frameno)
foam_depth = __get_parameter_data(whitewater.foam_layer_depth, frameno)
Expand Down
2 changes: 1 addition & 1 deletion src/addon/exit_handler.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Blender FLIP Fluids Add-on
# Copyright (C) 2022 Ryan L. Guy
# Copyright (C) 2023 Ryan L. Guy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
3 changes: 2 additions & 1 deletion src/addon/export.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Blender FLIP Fluids Add-on
# Copyright (C) 2022 Ryan L. Guy
# Copyright (C) 2023 Ryan L. Guy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -132,6 +132,7 @@ def __get_domain_data_dict(context, dobj):

d['initialize'] = initialize_properties

dprops.advanced.initialize_num_threads_auto_detect()
d['advanced']['num_threads_auto_detect'] = dprops.advanced.num_threads_auto_detect
d['simulation']['frames_per_second'] = dprops.simulation.get_frame_rate_data_dict()
d['world']['gravity'] = dprops.world.get_gravity_data_dict()
Expand Down
2 changes: 1 addition & 1 deletion src/addon/filesystem/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Blender FLIP Fluids Add-on
# Copyright (C) 2022 Ryan L. Guy
# Copyright (C) 2023 Ryan L. Guy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/addon/filesystem/filesystem_protection_layer.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Blender FLIP Fluids Add-on
# Copyright (C) 2022 Ryan L. Guy
# Copyright (C) 2023 Ryan L. Guy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/addon/materials/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Blender FLIP Fluids Add-on
# Copyright (C) 2022 Ryan L. Guy
# Copyright (C) 2023 Ryan L. Guy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/addon/materials/material_library.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Blender FLIP Fluids Add-on
# Copyright (C) 2022 Ryan L. Guy
# Copyright (C) 2023 Ryan L. Guy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/addon/objects/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Blender FLIP Fluids Add-on
# Copyright (C) 2022 Ryan L. Guy
# Copyright (C) 2023 Ryan L. Guy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/addon/objects/flip_fluid_aabb.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Blender FLIP Fluids Add-on
# Copyright (C) 2022 Ryan L. Guy
# Copyright (C) 2023 Ryan L. Guy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
8 changes: 5 additions & 3 deletions src/addon/objects/flip_fluid_cache.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Blender FLIP Fluids Add-on
# Copyright (C) 2022 Ryan L. Guy
# Copyright (C) 2023 Ryan L. Guy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -244,8 +244,10 @@ def reset_cache_object(self):
is_smooth = self._is_mesh_smooth(mesh_data)
octane_mesh_type = self._get_octane_mesh_type(cache_object)

mesh_data.clear_geometry()
mesh_data.from_pydata([], [], [])
vcu.swap_object_mesh_data_geometry(cache_object, [], [],
mesh_data,
is_smooth,
octane_mesh_type)

self._set_mesh_smoothness(mesh_data, is_smooth)
self._set_octane_settings(cache_object, octane_mesh_type)
Expand Down
2 changes: 1 addition & 1 deletion src/addon/objects/flip_fluid_geometry_database.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Blender FLIP Fluids Add-on
# Copyright (C) 2022 Ryan L. Guy
# Copyright (C) 2023 Ryan L. Guy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/addon/objects/flip_fluid_geometry_export_object.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Blender FLIP Fluids Add-on
# Copyright (C) 2022 Ryan L. Guy
# Copyright (C) 2023 Ryan L. Guy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/addon/objects/flip_fluid_geometry_exporter.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Blender FLIP Fluids Add-on
# Copyright (C) 2022 Ryan L. Guy
# Copyright (C) 2023 Ryan L. Guy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/addon/objects/flip_fluid_map.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Blender FLIP Fluids Add-on
# Copyright (C) 2022 Ryan L. Guy
# Copyright (C) 2023 Ryan L. Guy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/addon/objects/flip_fluid_material_library.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Blender FLIP Fluids Add-on
# Copyright (C) 2022 Ryan L. Guy
# Copyright (C) 2023 Ryan L. Guy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/addon/objects/flip_fluid_preset_stack.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Blender FLIP Fluids Add-on
# Copyright (C) 2022 Ryan L. Guy
# Copyright (C) 2023 Ryan L. Guy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/addon/operators/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Blender FLIP Fluids Add-on
# Copyright (C) 2022 Ryan L. Guy
# Copyright (C) 2023 Ryan L. Guy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/addon/operators/bake_operators.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Blender FLIP Fluids Add-on
# Copyright (C) 2022 Ryan L. Guy
# Copyright (C) 2023 Ryan L. Guy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion src/addon/operators/cache_operators.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Blender FLIP Fluids Add-on
# Copyright (C) 2022 Ryan L. Guy
# Copyright (C) 2023 Ryan L. Guy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down
18 changes: 15 additions & 3 deletions src/addon/operators/draw_force_field_operators.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Blender FLIP Fluids Add-on
# Copyright (C) 2022 Ryan L. Guy
# Copyright (C) 2023 Ryan L. Guy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand All @@ -14,7 +14,14 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import bpy, bgl, blf, math, colorsys
import bpy, blf, math, colorsys

try:
import bgl
except ImportError:
# bgl module may be deprecated depending on Blender version
pass

from bpy.props import (
IntProperty
)
Expand Down Expand Up @@ -182,7 +189,12 @@ def draw_callback_3d(self, context):
if vcu.is_blender_28():
global particle_shader
global particle_batch_draw
bgl.glPointSize(dprops.debug.force_field_line_size)
if vcu.is_blender_35():
# Warnings in Blender 3.5 when using bgl module, which is to
# be deprecated in Blender 3.7. Use gpu module instead.
gpu.state.point_size_set(dprops.debug.force_field_line_size)
else:
bgl.glPointSize(dprops.debug.force_field_line_size)
particle_batch_draw.draw(particle_shader)
else:
bgl.glPointSize(dprops.debug.force_field_line_size)
Expand Down
11 changes: 9 additions & 2 deletions src/addon/operators/draw_grid_operators.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Blender FLIP Fluids Add-on
# Copyright (C) 2022 Ryan L. Guy
# Copyright (C) 2023 Ryan L. Guy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand All @@ -14,7 +14,14 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import bpy, bgl, blf, math, colorsys
import bpy, blf, math, colorsys

try:
import bgl
except ImportError:
# bgl module may be deprecated depending on Blender version
pass

from bpy.props import (
IntProperty
)
Expand Down
Loading

0 comments on commit 4b2b759

Please sign in to comment.