2026-02-16
This commit is contained in:
+45
-52
@@ -30,9 +30,8 @@ from ..utils import version_compatibility_utils as vcu
|
||||
|
||||
|
||||
class DomainAdvancedProperties(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
|
||||
min_max_time_steps_per_frame = NewMinMaxIntProperty(
|
||||
min_max_time_steps_per_frame: NewMinMaxIntProperty(
|
||||
name_min="Min Substeps",
|
||||
description_min="Minimum number of substeps per frame calculation",
|
||||
min_min=1, max_min=1000000,
|
||||
@@ -44,24 +43,24 @@ class DomainAdvancedProperties(bpy.types.PropertyGroup):
|
||||
min_max=1, max_max=1000000,
|
||||
soft_max_max=100,
|
||||
default_max=24,
|
||||
); exec(conv("min_max_time_steps_per_frame"))
|
||||
enable_adaptive_obstacle_time_stepping = BoolProperty(
|
||||
)
|
||||
enable_adaptive_obstacle_time_stepping: BoolProperty(
|
||||
name="Enable Adaptive Time Stepping for Obstacles",
|
||||
description="Include obstacle velocities when calculating number"
|
||||
" of frame substeps. Enabling may improve the accuracy of"
|
||||
" fluid-solid interaction for fast moving obstacles, but"
|
||||
" may take longer to simulate",
|
||||
default = False,
|
||||
); exec(conv("enable_adaptive_obstacle_time_stepping"))
|
||||
enable_adaptive_force_field_time_stepping = BoolProperty(
|
||||
)
|
||||
enable_adaptive_force_field_time_stepping: BoolProperty(
|
||||
name="Enable Adaptive Time Stepping for Force Fields",
|
||||
description="Include force field velocities when calculating number"
|
||||
" of frame substeps. Enabling may improve the accuracy of"
|
||||
" fluid-forcefield interaction for fast moving force fields, but"
|
||||
" will take longer to simulate",
|
||||
default = False,
|
||||
); exec(conv("enable_adaptive_force_field_time_stepping"))
|
||||
particle_jitter_factor = FloatProperty(
|
||||
)
|
||||
particle_jitter_factor: FloatProperty(
|
||||
name="Particle Jitter",
|
||||
description="Amount of random jitter that is added to newly spawned"
|
||||
" fluid particles. Higher values may improve simulation accuracy",
|
||||
@@ -69,8 +68,8 @@ class DomainAdvancedProperties(bpy.types.PropertyGroup):
|
||||
default=1.0,
|
||||
precision=2,
|
||||
subtype='FACTOR',
|
||||
); exec(conv("particle_jitter_factor"))
|
||||
jitter_surface_particles = BoolProperty(
|
||||
)
|
||||
jitter_surface_particles: BoolProperty(
|
||||
name="Jitter Surface Particles",
|
||||
description="If disabled, a random jitter position will only be applied to particles within"
|
||||
" the interior of the Inflow/Fluid object shape. If enabled, all emitted particles"
|
||||
@@ -79,31 +78,31 @@ class DomainAdvancedProperties(bpy.types.PropertyGroup):
|
||||
" Enabling is recommended for fluid particle effects and results in"
|
||||
" more natural particle generation",
|
||||
default=False,
|
||||
); exec(conv("jitter_surface_particles"))
|
||||
pressure_solver_max_iterations = IntProperty(
|
||||
)
|
||||
pressure_solver_max_iterations: IntProperty(
|
||||
name="Pressure Solver Max Iterations",
|
||||
description="Maximum number of iterations that the pressure solver is allowed"
|
||||
" to run during a substep. The default value of 900 is often a good choice and does"
|
||||
" not need to be changed. See documentation for more information on this setting",
|
||||
min=1, soft_max=10000,
|
||||
default=900,
|
||||
); exec(conv("pressure_solver_max_iterations"))
|
||||
viscosity_solver_max_iterations = IntProperty(
|
||||
)
|
||||
viscosity_solver_max_iterations: IntProperty(
|
||||
name="Viscosity Solver Max Iterations",
|
||||
description="Maximum number of iterations that the viscosity solver is allowed"
|
||||
" to run during a substep. The default value of 900 is often a good choice and does"
|
||||
" not need to be changed. See documentation for more information on this setting",
|
||||
min=1, soft_max=10000,
|
||||
default=900,
|
||||
); exec(conv("viscosity_solver_max_iterations"))
|
||||
velocity_transfer_method = EnumProperty(
|
||||
)
|
||||
velocity_transfer_method: EnumProperty(
|
||||
name="Velocity Transfer Method",
|
||||
description="Simulation method to use",
|
||||
items=types.velocity_transfer_methods,
|
||||
default='VELOCITY_TRANSFER_METHOD_FLIP',
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("velocity_transfer_method"))
|
||||
PICFLIP_ratio = FloatProperty(
|
||||
)
|
||||
PICFLIP_ratio: FloatProperty(
|
||||
name="PIC/FLIP Ratio",
|
||||
description="Ratio of PIC velocity to FLIP velocity update mixture."
|
||||
" PIC velocity method is not very accurate, but stable. FLIP"
|
||||
@@ -114,16 +113,16 @@ class DomainAdvancedProperties(bpy.types.PropertyGroup):
|
||||
default=0.05,
|
||||
precision=2,
|
||||
subtype='FACTOR',
|
||||
); exec(conv("PICFLIP_ratio"))
|
||||
PICAPIC_ratio = FloatProperty(
|
||||
)
|
||||
PICAPIC_ratio: FloatProperty(
|
||||
name="PIC/APIC Ratio",
|
||||
description="Placeholder",
|
||||
min=0.0, max=1.0,
|
||||
default=0.00,
|
||||
precision=2,
|
||||
subtype='FACTOR',
|
||||
); exec(conv("PICAPIC_ratio"))
|
||||
CFL_condition_number = IntProperty(
|
||||
)
|
||||
CFL_condition_number: IntProperty(
|
||||
name="Safety Factor (CFL Number)",
|
||||
description="Maximum number of voxels that a particle can travel"
|
||||
" in a single substep. A larger number may speed up simulation"
|
||||
@@ -131,8 +130,8 @@ class DomainAdvancedProperties(bpy.types.PropertyGroup):
|
||||
" cost of simulation accuracy",
|
||||
min=1, max=30,
|
||||
default=5,
|
||||
); exec(conv("CFL_condition_number"))
|
||||
enable_extreme_velocity_removal = BoolProperty(
|
||||
)
|
||||
enable_extreme_velocity_removal: BoolProperty(
|
||||
name="Remove particles with extreme velocities",
|
||||
description="Attempt to remove extreme particle velocities that"
|
||||
" cause the simulator to exceed the maximum number of allowed"
|
||||
@@ -141,8 +140,8 @@ class DomainAdvancedProperties(bpy.types.PropertyGroup):
|
||||
" this option outside of experimentation and testing. Disabling"
|
||||
" can result in unstable simulations and/or extreme simulation times",
|
||||
default=True,
|
||||
); exec(conv("enable_extreme_velocity_removal"))
|
||||
enable_gpu_features = BoolProperty(
|
||||
)
|
||||
enable_gpu_features: BoolProperty(
|
||||
name="Enable GPU Features",
|
||||
description="Enable simulator to accelerate some computations"
|
||||
" with your GPU device. TIP: Compare simulation performance"
|
||||
@@ -150,28 +149,28 @@ class DomainAdvancedProperties(bpy.types.PropertyGroup):
|
||||
" hardware setup. Note: you may only notice a difference on"
|
||||
" higher resolution simulations",
|
||||
default=True
|
||||
); exec(conv("enable_gpu_features"))
|
||||
num_threads_auto_detect = IntProperty(
|
||||
)
|
||||
num_threads_auto_detect: IntProperty(
|
||||
name="Threads",
|
||||
description="Number of threads to use simultaneously while simulating",
|
||||
min=1, max=1024,
|
||||
default=1,
|
||||
); exec(conv("num_threads_auto_detect"))
|
||||
num_threads_fixed = IntProperty(
|
||||
)
|
||||
num_threads_fixed: IntProperty(
|
||||
name="Threads",
|
||||
description="Number of threads to use simultaneously while simulating",
|
||||
min=1, max=1024,
|
||||
default=4,
|
||||
); exec(conv("num_threads_fixed"))
|
||||
threading_mode = EnumProperty(
|
||||
)
|
||||
threading_mode: EnumProperty(
|
||||
name="Threading Mode",
|
||||
description="Determing the amount of simulation threads used",
|
||||
items=types.threading_modes,
|
||||
default='THREADING_MODE_AUTO_DETECT',
|
||||
update=lambda self, context: self.initialize_num_threads_auto_detect(),
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("threading_mode"))
|
||||
enable_fracture_optimization = BoolProperty(
|
||||
)
|
||||
enable_fracture_optimization: BoolProperty(
|
||||
name="Enable Fracture Optimizations",
|
||||
description="Enable optimizations when using animated fracture simulations as"
|
||||
" FLIP obstacles. These optimizations can greatly improve simulation performance"
|
||||
@@ -181,30 +180,30 @@ class DomainAdvancedProperties(bpy.types.PropertyGroup):
|
||||
" this option can increase memory requirements",
|
||||
default = False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("enable_fracture_optimization"))
|
||||
enable_asynchronous_meshing = BoolProperty(
|
||||
)
|
||||
enable_asynchronous_meshing: BoolProperty(
|
||||
name="Enable Async Meshing",
|
||||
description="Run mesh generation process in a separate thread while"
|
||||
" the simulation is running. May increase simulation performance"
|
||||
" but will use more RAM if enabled",
|
||||
default = True,
|
||||
); exec(conv("enable_asynchronous_meshing"))
|
||||
precompute_static_obstacles = BoolProperty(
|
||||
)
|
||||
precompute_static_obstacles: BoolProperty(
|
||||
name="Precompute Static Obstacles",
|
||||
description="Precompute data for static obstacles. If enabled,"
|
||||
" the simulator will avoid recomputing data for non-animated"
|
||||
" obstacles. Increases simulation performance but will use"
|
||||
" more RAM if enabled",
|
||||
default = True,
|
||||
); exec(conv("precompute_static_obstacles"))
|
||||
reserve_temporary_grids = BoolProperty(
|
||||
)
|
||||
reserve_temporary_grids: BoolProperty(
|
||||
name="Reserve Temporary Grid Memory",
|
||||
description="Reserve space in memory for temporary grids. Increases"
|
||||
" simulation performance for scenes with animated or keyframed"
|
||||
" obstacles but will use more RAM if enabled",
|
||||
default = True,
|
||||
); exec(conv("reserve_temporary_grids"))
|
||||
disable_changing_topology_warning = BoolProperty(
|
||||
)
|
||||
disable_changing_topology_warning: BoolProperty(
|
||||
name="Disable Changing Topology Warning",
|
||||
description="Disable warning that is displayed when exporting an"
|
||||
" animated mesh with changing topology. WARNING: mesh velocity"
|
||||
@@ -213,23 +212,17 @@ class DomainAdvancedProperties(bpy.types.PropertyGroup):
|
||||
" not be able to push around the fluid",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("disable_changing_topology_warning"))
|
||||
)
|
||||
|
||||
surface_tension_substeps_exceeded_tooltip = BoolProperty(
|
||||
surface_tension_substeps_exceeded_tooltip: BoolProperty(
|
||||
name="Warning: Not Enough Max Substeps",
|
||||
description="The estimated number of Surface Tension substeps per frame exceeds the Max Frame"
|
||||
" Substeps value. This can cause an unstable simulation. Either decrease the amount of"
|
||||
" Surface Tension in the FLIP Fluid World panel to lower the number of required substeps or"
|
||||
" increase the number of allowed Max Frame Substeps in the FLIP Fluid Advanced panel",
|
||||
default=True,
|
||||
); exec(conv("surface_tension_substeps_exceeded_tooltip"))
|
||||
|
||||
frame_substeps_expanded = BoolProperty(default=True); exec(conv("frame_substeps_expanded"))
|
||||
simulation_method_expanded = BoolProperty(default=True); exec(conv("simulation_method_expanded"))
|
||||
simulation_stability_expanded = BoolProperty(default=False); exec(conv("simulation_stability_expanded"))
|
||||
multithreading_expanded = BoolProperty(default=True); exec(conv("multithreading_expanded"))
|
||||
warnings_and_errors_expanded = BoolProperty(default=False); exec(conv("warnings_and_errors_expanded"))
|
||||
|
||||
)
|
||||
|
||||
|
||||
def register_preset_properties(self, registry, path):
|
||||
add = registry.add_property
|
||||
|
||||
@@ -32,37 +32,36 @@ IS_SAVESTATE_ENUMS_INITIALIZED = False
|
||||
|
||||
|
||||
class DomainBakeProperties(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
|
||||
is_export_operator_running = BoolProperty(default=False); exec(conv("is_export_operator_running"))
|
||||
is_export_operator_cancelled = BoolProperty(default=False); exec(conv("is_export_operator_cancelled"))
|
||||
export_progress = FloatProperty(default=0.0); exec(conv("export_progress"))
|
||||
export_stage = StringProperty(default=""); exec(conv("export_stage"))
|
||||
is_export_operator_running: BoolProperty(default=False)
|
||||
is_export_operator_cancelled: BoolProperty(default=False)
|
||||
export_progress: FloatProperty(default=0.0)
|
||||
export_stage: StringProperty(default="")
|
||||
|
||||
export_filename = StringProperty(default='flipdata.sim'); exec(conv("export_filename"))
|
||||
export_directory_name = StringProperty(default='export'); exec(conv("export_directory_name"))
|
||||
export_filepath = StringProperty(default=""); exec(conv("export_filepath"))
|
||||
export_success = BoolProperty(default=False); exec(conv("export_success"))
|
||||
export_filename: StringProperty(default='flipdata.sim')
|
||||
export_directory_name: StringProperty(default='export')
|
||||
export_filepath: StringProperty(default="")
|
||||
export_success: BoolProperty(default=False)
|
||||
|
||||
is_simulation_running = BoolProperty(default=False); exec(conv("is_simulation_running"))
|
||||
bake_progress = FloatProperty(default=0.0); exec(conv("bake_progress"))
|
||||
is_bake_initialized = BoolProperty(default=False); exec(conv("is_bake_initialized"))
|
||||
is_bake_cancelled = BoolProperty(default=False); exec(conv("is_bake_cancelled"))
|
||||
num_baked_frames = IntProperty(default=0); exec(conv("num_baked_frames"))
|
||||
is_simulation_running: BoolProperty(default=False)
|
||||
bake_progress: FloatProperty(default=0.0)
|
||||
is_bake_initialized: BoolProperty(default=False)
|
||||
is_bake_cancelled: BoolProperty(default=False)
|
||||
num_baked_frames: IntProperty(default=0)
|
||||
|
||||
is_autosave_available = BoolProperty(default=False); exec(conv("is_autosave_available"))
|
||||
is_autosave_last_frame = BoolProperty(default=False); exec(conv("is_autosave_last_frame"))
|
||||
is_safe_to_exit = BoolProperty(default=False); exec(conv("is_safe_to_exit"))
|
||||
autosave_frame_id = IntProperty(default=-1); exec(conv("autosave_frame_id"))
|
||||
autosave_frame = IntProperty(default=-1); exec(conv("autosave_frame"))
|
||||
is_autosave_available: BoolProperty(default=False)
|
||||
is_autosave_last_frame: BoolProperty(default=False)
|
||||
is_safe_to_exit: BoolProperty(default=False)
|
||||
autosave_frame_id: IntProperty(default=-1)
|
||||
autosave_frame: IntProperty(default=-1)
|
||||
|
||||
original_frame_start = IntProperty(
|
||||
original_frame_start: IntProperty(
|
||||
name="Start Frame",
|
||||
description="First frame of the simulation cache. Cannot be changed"
|
||||
" after beginning a simulation",
|
||||
default=-1,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("original_frame_start"))
|
||||
)
|
||||
|
||||
|
||||
def register_preset_properties(self, registry, path):
|
||||
|
||||
@@ -28,18 +28,15 @@ from .. import exit_handler
|
||||
from ..utils import version_compatibility_utils as vcu
|
||||
|
||||
class DomainCacheProperties(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
temp_directory = vcu.get_blender_preferences_temporary_directory()
|
||||
default_cache_directory_str = os.path.join(temp_directory, "untitled_flip_fluid_cache")
|
||||
|
||||
option_path_supports_blend_relative = set()
|
||||
if vcu.is_blender_45():
|
||||
# required for relative path support in Blender 4.5+
|
||||
# https://docs.blender.org/api/4.5/bpy_types_enum_items/property_flag_items.html#rna-enum-property-flag-items
|
||||
option_path_supports_blend_relative = {'PATH_SUPPORTS_BLEND_RELATIVE'}
|
||||
# required for relative path support in Blender 4.5+
|
||||
# https://docs.blender.org/api/4.5/bpy_types_enum_items/property_flag_items.html#rna-enum-property-flag-items
|
||||
option_path_supports_blend_relative = {'PATH_SUPPORTS_BLEND_RELATIVE'}
|
||||
|
||||
|
||||
cache_directory = StringProperty(
|
||||
cache_directory: StringProperty(
|
||||
name="",
|
||||
description="Simulation files will be saved to this directory."
|
||||
" It is recommended to save your .blend file before beginning a simulation",
|
||||
@@ -47,46 +44,46 @@ class DomainCacheProperties(bpy.types.PropertyGroup):
|
||||
subtype='DIR_PATH',
|
||||
options=option_path_supports_blend_relative,
|
||||
update=lambda self, context: self._update_cache_directory(context),
|
||||
); exec(conv("cache_directory"))
|
||||
default_cache_directory = StringProperty(
|
||||
)
|
||||
default_cache_directory: StringProperty(
|
||||
default=default_cache_directory_str,
|
||||
subtype='DIR_PATH',
|
||||
options=option_path_supports_blend_relative,
|
||||
); exec(conv("default_cache_directory"))
|
||||
move_cache_directory = StringProperty(
|
||||
)
|
||||
move_cache_directory: StringProperty(
|
||||
name="",
|
||||
description="Cache directory will be moved to this location",
|
||||
default=temp_directory,
|
||||
subtype='DIR_PATH',
|
||||
options=option_path_supports_blend_relative,
|
||||
); exec(conv("move_cache_directory"))
|
||||
rename_cache_directory = StringProperty(
|
||||
)
|
||||
rename_cache_directory: StringProperty(
|
||||
name="",
|
||||
description="Cache directory will be renamed to this value",
|
||||
default="untitled_flip_fluid_cache",
|
||||
); exec(conv("rename_cache_directory"))
|
||||
copy_cache_directory = StringProperty(
|
||||
)
|
||||
copy_cache_directory: StringProperty(
|
||||
name="",
|
||||
description="Cache directory contents will be copied to this location",
|
||||
default=default_cache_directory_str,
|
||||
subtype='DIR_PATH',
|
||||
options=option_path_supports_blend_relative,
|
||||
); exec(conv("copy_cache_directory"))
|
||||
clear_cache_directory_logs = BoolProperty(
|
||||
)
|
||||
clear_cache_directory_logs: BoolProperty(
|
||||
name="Clear log files",
|
||||
description="Also delete log files when freeing cache directory",
|
||||
default=False,
|
||||
); exec(conv("clear_cache_directory_logs"))
|
||||
clear_cache_directory_export = BoolProperty(
|
||||
)
|
||||
clear_cache_directory_export: BoolProperty(
|
||||
name="Clear export files",
|
||||
description="Also delete exported settings and objects when freeing cache directory",
|
||||
default=False,
|
||||
); exec(conv("clear_cache_directory_export"))
|
||||
logfile_name = StringProperty(
|
||||
)
|
||||
logfile_name: StringProperty(
|
||||
default=os.path.join(temp_directory, "flip_fluid_log.txt"),
|
||||
subtype='FILE_NAME',
|
||||
); exec(conv("logfile_name"))
|
||||
linked_geometry_directory = StringProperty(
|
||||
)
|
||||
linked_geometry_directory: StringProperty(
|
||||
name="",
|
||||
description="select an existing cache directory. Link exported geometry data from another cache directory."
|
||||
" Use if you want to re-use exported geometry that is located in another cache. Useful if you have a"
|
||||
@@ -94,13 +91,9 @@ class DomainCacheProperties(bpy.types.PropertyGroup):
|
||||
default="",
|
||||
subtype='DIR_PATH',
|
||||
options=option_path_supports_blend_relative,
|
||||
); exec(conv("linked_geometry_directory"))
|
||||
)
|
||||
|
||||
is_cache_directory_set = BoolProperty(default=False); exec(conv("is_cache_directory_set"))
|
||||
|
||||
cache_directory_expanded = BoolProperty(default=True); exec(conv("cache_directory_expanded"))
|
||||
link_exported_geometry_expanded = BoolProperty(default=False); exec(conv("link_exported_geometry_expanded"))
|
||||
cache_operators_expanded = BoolProperty(default=False); exec(conv("cache_operators_expanded"))
|
||||
is_cache_directory_set: BoolProperty(default=False)
|
||||
|
||||
|
||||
def register_preset_properties(self, registry, path):
|
||||
|
||||
@@ -49,11 +49,10 @@ _LOGGING_DISABLED_MESSAGE = "(Blend file logging disabled in host preferences)"
|
||||
|
||||
|
||||
class VersionHistoryItem(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
blender_version = StringProperty(default="-1"); exec(conv("blender_version"))
|
||||
flip_fluids_version = StringProperty(default="-1"); exec(conv("flip_fluids_version"))
|
||||
flip_fluids_label = StringProperty(default="-1"); exec(conv("flip_fluids_label"))
|
||||
operating_system = StringProperty(default="-1"); exec(conv("operating_system"))
|
||||
blender_version: StringProperty(default="-1")
|
||||
flip_fluids_version: StringProperty(default="-1")
|
||||
flip_fluids_label: StringProperty(default="-1")
|
||||
operating_system: StringProperty(default="-1")
|
||||
|
||||
|
||||
def get_info_string(self):
|
||||
@@ -61,9 +60,8 @@ class VersionHistoryItem(bpy.types.PropertyGroup):
|
||||
|
||||
|
||||
class DomainDebugProperties(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
|
||||
display_simulation_grid = BoolProperty(
|
||||
display_simulation_grid: BoolProperty(
|
||||
name="Display Domain Grid",
|
||||
description="Visualize the domain voxel grid in the 3D viewport."
|
||||
" Try scaling different sides of the domain to better understand how the grid works."
|
||||
@@ -71,15 +69,15 @@ class DomainDebugProperties(bpy.types.PropertyGroup):
|
||||
" the differences in how the grid changes as the domain is resized",
|
||||
default=False,
|
||||
update=lambda self, context: self._update_display_simulation_grid(context),
|
||||
); exec(conv("display_simulation_grid"))
|
||||
grid_display_mode = EnumProperty(
|
||||
)
|
||||
grid_display_mode: EnumProperty(
|
||||
name="Grid Display Mode",
|
||||
description="Type of grid debug info to display",
|
||||
items=types.grid_display_modes,
|
||||
default='GRID_DISPLAY_SIMULATION',
|
||||
update=lambda self, context: self._update_debug_grid_geometry(context),
|
||||
); exec(conv("grid_display_mode"))
|
||||
grid_display_scale = IntProperty(
|
||||
)
|
||||
grid_display_scale: IntProperty(
|
||||
name="Grid Display Scale",
|
||||
description="Number of voxels that a single grid spacing in the"
|
||||
" viewport represents",
|
||||
@@ -87,37 +85,37 @@ class DomainDebugProperties(bpy.types.PropertyGroup):
|
||||
default=1,
|
||||
step=1,
|
||||
update=lambda self, context: self._update_debug_grid_geometry(context),
|
||||
); exec(conv("grid_display_scale"))
|
||||
enabled_debug_grids = BoolVectorProperty(
|
||||
)
|
||||
enabled_debug_grids: BoolVectorProperty(
|
||||
name="Enabled Debug Grids",
|
||||
description="Select which debug grids are displayed in the viewport",
|
||||
default=(True, True, True),
|
||||
size=3,
|
||||
subtype='XYZ',
|
||||
update=lambda self, context: self._update_debug_grid_geometry(context),
|
||||
); exec(conv("enabled_debug_grids"))
|
||||
x_grid_color = FloatVectorProperty(
|
||||
)
|
||||
x_grid_color: FloatVectorProperty(
|
||||
name="X Grid Color",
|
||||
subtype='COLOR',
|
||||
default=(0.5, 0.0, 0.0),
|
||||
min=0.0, max=1.0,
|
||||
description="X grid display color"
|
||||
); exec(conv("x_grid_color"))
|
||||
y_grid_color = FloatVectorProperty(
|
||||
)
|
||||
y_grid_color: FloatVectorProperty(
|
||||
name="Y Grid Color",
|
||||
subtype='COLOR',
|
||||
default=(0.0, 0.5, 0.0),
|
||||
min=0.0, max=1.0,
|
||||
description="Y grid display color"
|
||||
); exec(conv("y_grid_color"))
|
||||
z_grid_color = FloatVectorProperty(
|
||||
)
|
||||
z_grid_color: FloatVectorProperty(
|
||||
name="Z Grid Color",
|
||||
subtype='COLOR',
|
||||
default=(0.0, 0.0, 0.5),
|
||||
min=0.0, max=1.0,
|
||||
description="Z grid display color"
|
||||
); exec(conv("z_grid_color"))
|
||||
debug_grid_offsets = FloatVectorProperty(
|
||||
)
|
||||
debug_grid_offsets: FloatVectorProperty(
|
||||
name="Debug Grid Offsets",
|
||||
description="Offset at which an axis' grid is displayed in the viewport",
|
||||
min = 0.0, max = 1.0,
|
||||
@@ -126,14 +124,14 @@ class DomainDebugProperties(bpy.types.PropertyGroup):
|
||||
step=1,
|
||||
subtype='XYZ',
|
||||
update=lambda self, context: self._update_debug_grid_geometry(context),
|
||||
); exec(conv("debug_grid_offsets"))
|
||||
snap_offsets_to_grid = BoolProperty(
|
||||
)
|
||||
snap_offsets_to_grid: BoolProperty(
|
||||
name="Snap Offsets to Grid",
|
||||
description="Align debug grids to gridcell locations",
|
||||
default=True,
|
||||
update=lambda self, context: self._update_debug_grid_geometry(context),
|
||||
); exec(conv("snap_offsets_to_grid"))
|
||||
display_domain_bounds = BoolProperty(
|
||||
)
|
||||
display_domain_bounds: BoolProperty(
|
||||
name="Display Bounds",
|
||||
description="Display the true bounds of the domain object." +
|
||||
" The domain boundary contains a thin solid layer. Enabling" +
|
||||
@@ -141,154 +139,154 @@ class DomainDebugProperties(bpy.types.PropertyGroup):
|
||||
" the domain",
|
||||
default=False,
|
||||
update=lambda self, context: self._update_display_domain_bounds(context),
|
||||
); exec(conv("display_domain_bounds"))
|
||||
domain_bounds_color = FloatVectorProperty(
|
||||
)
|
||||
domain_bounds_color: FloatVectorProperty(
|
||||
name="Domain Bounds Color",
|
||||
subtype='COLOR',
|
||||
default=(1.0, 1.0, 0.0),
|
||||
min=0.0, max=1.0,
|
||||
description="Color of the domain bounds visualization",
|
||||
update=lambda self, context: self._update_debug_grid_geometry(context),
|
||||
); exec(conv("domain_bounds_color"))
|
||||
)
|
||||
|
||||
enable_fluid_particle_debug_output = BoolProperty(
|
||||
enable_fluid_particle_debug_output: BoolProperty(
|
||||
name="Enable Fluid Particle Debugging",
|
||||
description="Enable to export simulator fluid particle data and to"
|
||||
" visualize and debug problems with fluid behaviour. Enable"
|
||||
" this option before baking a simulation to use this feature",
|
||||
default=False,
|
||||
update=lambda self, context: self._update_enable_fluid_particle_debug_output(context),
|
||||
); exec(conv("enable_fluid_particle_debug_output"))
|
||||
fluid_particles_visibility = BoolProperty(
|
||||
)
|
||||
fluid_particles_visibility: BoolProperty(
|
||||
name="Fluid Particle Visibility",
|
||||
description="Show fluid particles in the viewport",
|
||||
default=True,
|
||||
update=lambda self, context: self._update_enable_fluid_particle_debug_output(context),
|
||||
); exec(conv("fluid_particles_visibility"))
|
||||
low_speed_particle_color = FloatVectorProperty(
|
||||
)
|
||||
low_speed_particle_color: FloatVectorProperty(
|
||||
name="Low Speed Color",
|
||||
subtype='COLOR',
|
||||
default=(0.0, 0.0, 1.0),
|
||||
min=0.0, max=1.0,
|
||||
description="Color for low velocity fluid particles",
|
||||
update=lambda self, context: self._update_debug_particle_geometry(context),
|
||||
); exec(conv("low_speed_particle_color"))
|
||||
high_speed_particle_color = FloatVectorProperty(
|
||||
)
|
||||
high_speed_particle_color: FloatVectorProperty(
|
||||
name="High Speed Color",
|
||||
subtype='COLOR',
|
||||
default=(1.0, 1.0, 1.0),
|
||||
min=0.0, max=1.0,
|
||||
description="Color for high velocity fluid particles",
|
||||
update=lambda self, context: self._update_debug_particle_geometry(context),
|
||||
); exec(conv("high_speed_particle_color"))
|
||||
min_gradient_speed = FloatProperty(
|
||||
)
|
||||
min_gradient_speed: FloatProperty(
|
||||
name="Low Color Speed",
|
||||
description="Low speed value for visualizing fluid particle velocity",
|
||||
min=0,
|
||||
default=0.0,
|
||||
precision=2,
|
||||
update=lambda self, context: self._update_min_gradient_speed(context),
|
||||
); exec(conv("min_gradient_speed"))
|
||||
max_gradient_speed = FloatProperty(
|
||||
)
|
||||
max_gradient_speed: FloatProperty(
|
||||
name="High Color Speed",
|
||||
description="High speed value for visualizing fluid particle velocity",
|
||||
min=0,
|
||||
default=5.0,
|
||||
precision=2,
|
||||
update=lambda self, context: self._update_max_gradient_speed(context),
|
||||
); exec(conv("max_gradient_speed"))
|
||||
fluid_particle_gradient_mode = EnumProperty(
|
||||
)
|
||||
fluid_particle_gradient_mode: EnumProperty(
|
||||
name="Gradient Mode",
|
||||
description="Type of color gradient",
|
||||
items=types.gradient_interpolation_modes,
|
||||
default='GRADIENT_RGB',
|
||||
update=lambda self, context: self._update_max_gradient_speed(context),
|
||||
); exec(conv("fluid_particle_gradient_mode"))
|
||||
particle_size = IntProperty(
|
||||
)
|
||||
particle_size: IntProperty(
|
||||
name="Particle Size",
|
||||
description="Size to draw particles for visualization",
|
||||
min=1, soft_max=10,
|
||||
default=1,
|
||||
update=lambda self, context: self._update_debug_particle_geometry(context),
|
||||
); exec(conv("particle_size"))
|
||||
particle_draw_aabb = PointerProperty(
|
||||
)
|
||||
particle_draw_aabb: PointerProperty(
|
||||
name="Visualization Bounds",
|
||||
description="If set, only particles inside the object's axis-aligned"
|
||||
" bounding box will be drawn",
|
||||
type=bpy.types.Object,
|
||||
update=lambda self, context: self._update_debug_particle_geometry(context),
|
||||
); exec(conv("particle_draw_aabb"))
|
||||
)
|
||||
|
||||
export_force_field = BoolProperty(
|
||||
export_force_field: BoolProperty(
|
||||
name="Enable Force Field Debugging",
|
||||
description="Enable to export simulator force field data and to"
|
||||
" visualize force field lines. Enable this option before baking"
|
||||
" a simulation to use this feature",
|
||||
default=False,
|
||||
update=lambda self, context: self._update_export_force_field(context),
|
||||
); exec(conv("export_force_field"))
|
||||
force_field_visibility = BoolProperty(
|
||||
)
|
||||
force_field_visibility: BoolProperty(
|
||||
name="Force Field Visibility",
|
||||
description="Show force fields in the viewport",
|
||||
default=True,
|
||||
update=lambda self, context: self._update_export_force_field(context),
|
||||
); exec(conv("force_field_visibility"))
|
||||
low_force_field_color = FloatVectorProperty(
|
||||
)
|
||||
low_force_field_color: FloatVectorProperty(
|
||||
name="Low Force Color",
|
||||
subtype='COLOR',
|
||||
default=(1.0, 1.0, 1.0),
|
||||
min=0.0, max=1.0,
|
||||
description="Color for low strength forces",
|
||||
update=lambda self, context: self._update_export_force_field(context),
|
||||
); exec(conv("low_force_field_color"))
|
||||
high_force_field_color = FloatVectorProperty(
|
||||
)
|
||||
high_force_field_color: FloatVectorProperty(
|
||||
name="High Force Color",
|
||||
subtype='COLOR',
|
||||
default=(1.0, 0.0, 0.0),
|
||||
min=0.0, max=1.0,
|
||||
description="Color for high strength forces",
|
||||
update=lambda self, context: self._update_export_force_field(context),
|
||||
); exec(conv("high_force_field_color"))
|
||||
min_gradient_force = FloatProperty(
|
||||
)
|
||||
min_gradient_force: FloatProperty(
|
||||
name="Low Color Force",
|
||||
description="Low force strength value for visualizing force field lines",
|
||||
min=0,
|
||||
default=0.0,
|
||||
precision=2,
|
||||
update=lambda self, context: self._update_min_gradient_force(context),
|
||||
); exec(conv("min_gradient_force"))
|
||||
max_gradient_force = FloatProperty(
|
||||
)
|
||||
max_gradient_force: FloatProperty(
|
||||
name="High Color Force",
|
||||
description="High force strength value for visualizing force field lines",
|
||||
min=0,
|
||||
default=15.0,
|
||||
precision=2,
|
||||
update=lambda self, context: self._update_max_gradient_force(context),
|
||||
); exec(conv("max_gradient_force"))
|
||||
force_field_gradient_mode = EnumProperty(
|
||||
)
|
||||
force_field_gradient_mode: EnumProperty(
|
||||
name="Gradient Mode",
|
||||
description="Type of color gradient",
|
||||
items=types.gradient_interpolation_modes,
|
||||
default='GRADIENT_RGB',
|
||||
update=lambda self, context: self._update_max_gradient_force(context),
|
||||
); exec(conv("force_field_gradient_mode"))
|
||||
force_field_display_amount = IntProperty(
|
||||
)
|
||||
force_field_display_amount: IntProperty(
|
||||
name="Display Amount",
|
||||
description="Amount of force field lines to display in the viewport",
|
||||
min=0, max=100,
|
||||
default=25,
|
||||
subtype='PERCENTAGE',
|
||||
update=lambda self, context: self._update_force_field_geometry(context),
|
||||
); exec(conv("force_field_display_amount"))
|
||||
force_field_line_size = IntProperty(
|
||||
)
|
||||
force_field_line_size: IntProperty(
|
||||
name="Line Size",
|
||||
description="Line thickness for force field visualization",
|
||||
min=1, soft_max=10,
|
||||
default=2,
|
||||
update=lambda self, context: self._update_force_field_geometry(context),
|
||||
); exec(conv("force_field_line_size"))
|
||||
)
|
||||
|
||||
export_internal_obstacle_mesh = BoolProperty(
|
||||
export_internal_obstacle_mesh: BoolProperty(
|
||||
name="Enable Obstacle Debugging",
|
||||
description="Enable to export simulator obstacle data"
|
||||
" and to visualize and debug problems with obstacles."
|
||||
@@ -296,41 +294,37 @@ class DomainDebugProperties(bpy.types.PropertyGroup):
|
||||
" use this feature",
|
||||
default=False,
|
||||
update=lambda self, context: self._update_export_internal_obstacle_mesh(context),
|
||||
); exec(conv("export_internal_obstacle_mesh"))
|
||||
internal_obstacle_mesh_visibility = BoolProperty(
|
||||
)
|
||||
internal_obstacle_mesh_visibility: BoolProperty(
|
||||
name="Obstacle Debugging Visibility",
|
||||
description="Show obstacle debug mesh in the viewport. If disabled, this prevents debug obstacle"
|
||||
" mesh data from being loaded into Blender. Frame must be reloaded after enabling this option for"
|
||||
" mesh to reload and become visible",
|
||||
default=True,
|
||||
update=lambda self, context: self._update_export_internal_obstacle_mesh(context),
|
||||
); exec(conv("internal_obstacle_mesh_visibility"))
|
||||
)
|
||||
|
||||
display_console_output = BoolProperty(
|
||||
display_console_output: BoolProperty(
|
||||
name="Display Console Output",
|
||||
description="Display simulation info in the Blender system console",
|
||||
default=True,
|
||||
update=lambda self, context: self._update_display_console_output(context),
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("display_console_output"))
|
||||
)
|
||||
|
||||
display_render_passes_console_output = BoolProperty(
|
||||
display_render_passes_console_output: BoolProperty(
|
||||
name="Display Render Passes Console Output",
|
||||
description="Display Compositing Tools Passes Rendering debug info in the Blender system console",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("display_render_passes_console_output"))
|
||||
)
|
||||
|
||||
is_draw_debug_grid_operator_running = BoolProperty(default=False); exec(conv("is_draw_debug_grid_operator_running"))
|
||||
is_draw_gl_particles_operator_running = BoolProperty(default=False); exec(conv("is_draw_gl_particles_operator_running"))
|
||||
is_draw_gl_force_field_operator_running = BoolProperty(default=False); exec(conv("is_draw_gl_force_field_operator_running"))
|
||||
is_draw_debug_grid_operator_running: BoolProperty(default=False)
|
||||
is_draw_gl_particles_operator_running: BoolProperty(default=False)
|
||||
is_draw_gl_force_field_operator_running: BoolProperty(default=False)
|
||||
|
||||
grid_display_settings_expanded = BoolProperty(default=True); exec(conv("grid_display_settings_expanded"))
|
||||
particle_debug_settings_expanded = BoolProperty(default=False); exec(conv("particle_debug_settings_expanded"))
|
||||
force_field_debug_settings_expanded = BoolProperty(default=False); exec(conv("force_field_debug_settings_expanded"))
|
||||
|
||||
version_history = CollectionProperty(type=VersionHistoryItem); exec(conv("version_history"))
|
||||
system_info = StringProperty(default=""); exec(conv("system_info"))
|
||||
version_history: CollectionProperty(type=VersionHistoryItem)
|
||||
system_info: StringProperty(default="")
|
||||
|
||||
|
||||
def register_preset_properties(self, registry, path):
|
||||
@@ -410,11 +404,7 @@ class DomainDebugProperties(bpy.types.PropertyGroup):
|
||||
preferences = vcu.get_addon_preferences()
|
||||
if preferences.enable_blend_file_logging:
|
||||
# Save Version History
|
||||
if vcu.is_blender_42():
|
||||
bl_info_dict = bl_info
|
||||
else:
|
||||
bl_info_dict = sys.modules[installation_utils.get_module_name()].bl_info
|
||||
|
||||
bl_info_dict = bl_info
|
||||
vdata = self.version_history.add()
|
||||
vdata.blender_version = bpy.app.version_string
|
||||
vdata.flip_fluids_version = str(bl_info_dict.get('version', (-1, -1, -1)))
|
||||
|
||||
+20
-21
@@ -27,24 +27,23 @@ from ..utils import version_compatibility_utils as vcu
|
||||
|
||||
|
||||
class DomainMaterialsProperties(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
|
||||
surface_material = EnumProperty(
|
||||
surface_material: EnumProperty(
|
||||
name="Fluid Surface",
|
||||
description="Select a material for the fluid surface. Tip: materials can also be"
|
||||
" created and assigned to the fluid_surface object in Blender's Material"
|
||||
" Properties panel",
|
||||
items=material_library.get_surface_material_enums_ui,
|
||||
update=lambda self, context: self._update_surface_material(context),
|
||||
); exec(conv("surface_material"))
|
||||
fluid_particles_material = EnumProperty(
|
||||
)
|
||||
fluid_particles_material: EnumProperty(
|
||||
name="Fluid Particles",
|
||||
description="Select a material for the fluid particles. Tip: If the object contains"
|
||||
" a Point Cloud geometry node modifier, the material can be set in the modifier settings",
|
||||
items=material_library.get_fluid_particles_material_enums_ui,
|
||||
update=lambda self, context: self._update_fluid_particles_material(context),
|
||||
); exec(conv("fluid_particles_material"))
|
||||
whitewater_foam_material = EnumProperty(
|
||||
)
|
||||
whitewater_foam_material: EnumProperty(
|
||||
name="Whitewater Foam",
|
||||
description="Select a material for the foam particles. Tip: materials can also be"
|
||||
" created and assigned to the whitewater_foam object in Blender's Material"
|
||||
@@ -52,8 +51,8 @@ class DomainMaterialsProperties(bpy.types.PropertyGroup):
|
||||
" the material can be set in the modifier settings",
|
||||
items=material_library.get_whitewater_material_enums_ui,
|
||||
update=lambda self, context: self._update_whitewater_foam_material(context),
|
||||
); exec(conv("whitewater_foam_material"))
|
||||
whitewater_bubble_material = EnumProperty(
|
||||
)
|
||||
whitewater_bubble_material: EnumProperty(
|
||||
name="Whitewater Bubble",
|
||||
description="Select a material for the bubble particles. Tip: materials can also be"
|
||||
" created and assigned to the whitewater_bubble object in Blender's Material"
|
||||
@@ -61,8 +60,8 @@ class DomainMaterialsProperties(bpy.types.PropertyGroup):
|
||||
" the material can be set in the modifier settings",
|
||||
items=material_library.get_whitewater_material_enums_ui,
|
||||
update=lambda self, context: self._update_whitewater_bubble_material(context),
|
||||
); exec(conv("whitewater_bubble_material"))
|
||||
whitewater_spray_material = EnumProperty(
|
||||
)
|
||||
whitewater_spray_material: EnumProperty(
|
||||
name="Whitewater Spray",
|
||||
description="Select a material for the spray particles. Tip: materials can also be"
|
||||
" created and assigned to the whitewater_spray object in Blender's Material"
|
||||
@@ -70,8 +69,8 @@ class DomainMaterialsProperties(bpy.types.PropertyGroup):
|
||||
" the material can be set in the modifier settings",
|
||||
items=material_library.get_whitewater_material_enums_ui,
|
||||
update=lambda self, context: self._update_whitewater_spray_material(context),
|
||||
); exec(conv("whitewater_spray_material"))
|
||||
whitewater_dust_material = EnumProperty(
|
||||
)
|
||||
whitewater_dust_material: EnumProperty(
|
||||
name="Whitewater Dust",
|
||||
description="Select a material for the dust particles. Tip: materials can also be"
|
||||
" created and assigned to the whitewater_dust object in Blender's Material"
|
||||
@@ -79,19 +78,19 @@ class DomainMaterialsProperties(bpy.types.PropertyGroup):
|
||||
" the material can be set in the modifier settings",
|
||||
items=material_library.get_whitewater_material_enums_ui,
|
||||
update=lambda self, context: self._update_whitewater_dust_material(context),
|
||||
); exec(conv("whitewater_dust_material"))
|
||||
material_import = EnumProperty(
|
||||
)
|
||||
material_import: EnumProperty(
|
||||
name="Import",
|
||||
description="Import materials into this scene",
|
||||
items=material_library.get_material_import_enums_ui,
|
||||
); exec(conv("material_import"))
|
||||
)
|
||||
|
||||
last_surface_material = StringProperty(default=""); exec(conv("last_surface_material"))
|
||||
last_fluid_particles_material = StringProperty(default=""); exec(conv("last_fluid_particles_material"))
|
||||
last_whitewater_foam_material = StringProperty(default=""); exec(conv("last_whitewater_foam_material"))
|
||||
last_whitewater_bubble_material = StringProperty(default=""); exec(conv("last_whitewater_bubble_material"))
|
||||
last_whitewater_spray_material = StringProperty(default=""); exec(conv("last_whitewater_spray_material"))
|
||||
last_whitewater_dust_material = StringProperty(default=""); exec(conv("last_whitewater_dust_material"))
|
||||
last_surface_material: StringProperty(default="")
|
||||
last_fluid_particles_material: StringProperty(default="")
|
||||
last_whitewater_foam_material: StringProperty(default="")
|
||||
last_whitewater_bubble_material: StringProperty(default="")
|
||||
last_whitewater_spray_material: StringProperty(default="")
|
||||
last_whitewater_dust_material: StringProperty(default="")
|
||||
|
||||
|
||||
def load_post(self):
|
||||
|
||||
+32
-41
@@ -28,16 +28,15 @@ from ..utils import version_compatibility_utils as vcu
|
||||
|
||||
|
||||
class DomainParticlesProperties(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
|
||||
enable_fluid_particle_output = BoolProperty(
|
||||
enable_fluid_particle_output: BoolProperty(
|
||||
name="Enable Fluid Particle Export",
|
||||
description="Enable fluid particle data to be exported to the simulation cache",
|
||||
default=False,
|
||||
update=lambda self, context: self._update_enable_fluid_particle_output(context),
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("enable_fluid_particle_output"))
|
||||
fluid_particle_output_amount = FloatProperty(
|
||||
)
|
||||
fluid_particle_output_amount: FloatProperty(
|
||||
name="Particle Export Amount",
|
||||
description="Amount of fluid particles to export. A value of 1.0 will export all fluid particles."
|
||||
" Decrease this value to reduce cache size if not all particles will need to be displayed or"
|
||||
@@ -48,36 +47,36 @@ class DomainParticlesProperties(bpy.types.PropertyGroup):
|
||||
precision=5,
|
||||
subtype='FACTOR',
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("fluid_particle_output_amount"))
|
||||
enable_fluid_particle_surface_output = BoolProperty(
|
||||
)
|
||||
enable_fluid_particle_surface_output: BoolProperty(
|
||||
name="Export Surface Particles",
|
||||
description="Export fluid particles near the fluid surface. Particles are considered"
|
||||
" to be surface particles if they are near empty air, but are not near the domain boundary",
|
||||
default=True,
|
||||
); exec(conv("enable_fluid_particle_surface_output"))
|
||||
enable_fluid_particle_boundary_output = BoolProperty(
|
||||
)
|
||||
enable_fluid_particle_boundary_output: BoolProperty(
|
||||
name="Export Boundary Particles",
|
||||
description="Export fluid particles near the domain boundary. Particles are considered to"
|
||||
" be boundary particles if they are near the boundary of the domain. If a surface"
|
||||
" Meshing Volume object is set, particles near the surface of this object are considered"
|
||||
" boundary particles",
|
||||
default=True,
|
||||
); exec(conv("enable_fluid_particle_boundary_output"))
|
||||
enable_fluid_particle_interior_output = BoolProperty(
|
||||
)
|
||||
enable_fluid_particle_interior_output: BoolProperty(
|
||||
name="Export Interior Particles",
|
||||
description="Export fluid particles inside of the fluid surface. Particles are considered"
|
||||
" to be interior particles if they are not classified as either surface or boundary particles",
|
||||
default=True,
|
||||
); exec(conv("enable_fluid_particle_interior_output"))
|
||||
fluid_particle_source_id_blacklist = IntProperty(
|
||||
)
|
||||
fluid_particle_source_id_blacklist: IntProperty(
|
||||
name="Skip Source ID",
|
||||
description="If the Source ID attribute is enabled, do not export fluid particles with the specified"
|
||||
" Source ID value. Useful to reduce cache size and speed up playback in situations where particles"
|
||||
" are not needed from specific Fluid or Inflow objects",
|
||||
min=-1,
|
||||
default=-1,
|
||||
); exec(conv("fluid_particle_source_id_blacklist"))
|
||||
enable_fluid_particle_velocity_vector_attribute = BoolProperty(
|
||||
)
|
||||
enable_fluid_particle_velocity_vector_attribute: BoolProperty(
|
||||
name="Generate Velocity Attributes",
|
||||
description="Generate fluid 3D velocity vector attributes for the fluid particles. After"
|
||||
" baking, the velocity vectors (in m/s) can be accessed in a Cycles Attribute"
|
||||
@@ -86,24 +85,24 @@ class DomainParticlesProperties(bpy.types.PropertyGroup):
|
||||
" direction is not needed, use Generate Speed Attributes instead",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("enable_fluid_particle_velocity_vector_attribute"))
|
||||
enable_fluid_particle_speed_attribute = BoolProperty(
|
||||
)
|
||||
enable_fluid_particle_speed_attribute: BoolProperty(
|
||||
name="Generate Speed Attributes",
|
||||
description="Generate fluid speed attributes for the fluid particles. After"
|
||||
" baking, the speed values (in m/s) can be accessed in a Cycles Attribute"
|
||||
" Node or in Geometry Nodes with the name 'flip_speed' from the Fac output",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("enable_fluid_particle_speed_attribute"))
|
||||
enable_fluid_particle_vorticity_vector_attribute = BoolProperty(
|
||||
)
|
||||
enable_fluid_particle_vorticity_vector_attribute: BoolProperty(
|
||||
name="Generate Vorticity Attributes",
|
||||
description="Generate fluid 3D vorticity vector attributes for the fluid particles. After"
|
||||
" baking, the vorticity vectors can be accessed in a Cycles Attribute"
|
||||
" Node or in Geometry Nodes with the name 'flip_vorticity' from the Vector output",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("enable_fluid_particle_vorticity_vector_attribute"))
|
||||
enable_fluid_particle_color_attribute = BoolProperty(
|
||||
)
|
||||
enable_fluid_particle_color_attribute: BoolProperty(
|
||||
name="Generate Color Attributes",
|
||||
description="Generate fluid color attributes for the fluid particles. Each"
|
||||
" Inflow/Fluid object can set to assign color to the generated fluid. After"
|
||||
@@ -112,8 +111,8 @@ class DomainParticlesProperties(bpy.types.PropertyGroup):
|
||||
" liquid effects",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("enable_fluid_particle_color_attribute"))
|
||||
enable_fluid_particle_age_attribute = BoolProperty(
|
||||
)
|
||||
enable_fluid_particle_age_attribute: BoolProperty(
|
||||
name="Generate Age Attributes",
|
||||
description="Generate fluid age attributes for the fluid particles."
|
||||
" The age attribute starts at 0.0 when the liquid is spawned and counts up in"
|
||||
@@ -121,8 +120,8 @@ class DomainParticlesProperties(bpy.types.PropertyGroup):
|
||||
" Node or in Geometry Nodes with the name 'flip_age' from the Fac output",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("enable_fluid_particle_age_attribute"))
|
||||
enable_fluid_particle_lifetime_attribute = BoolProperty(
|
||||
)
|
||||
enable_fluid_particle_lifetime_attribute: BoolProperty(
|
||||
name="Generate Lifetime Attributes",
|
||||
description="Generate fluid lifetime attributes for the fluid particles. This attribute allows the"
|
||||
" fluid to start with a lifetime value that counts down in seconds and once the lifetime reaches 0,"
|
||||
@@ -132,8 +131,8 @@ class DomainParticlesProperties(bpy.types.PropertyGroup):
|
||||
" the Fac output",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("enable_fluid_particle_lifetime_attribute"))
|
||||
enable_fluid_particle_whitewater_proximity_attribute = BoolProperty(
|
||||
)
|
||||
enable_fluid_particle_whitewater_proximity_attribute: BoolProperty(
|
||||
name="Generate Whitewater Proximity Attributes",
|
||||
description="Generate whitewater proximity attributes for the fluid particles. The attribute values represent"
|
||||
" how many foam, bubble, or spray particles are near a fluid particle and can be used in a material to shade"
|
||||
@@ -142,8 +141,8 @@ class DomainParticlesProperties(bpy.types.PropertyGroup):
|
||||
" and 'flip_spray_proximity' from the Fac output",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("enable_fluid_particle_whitewater_proximity_attribute"))
|
||||
enable_fluid_particle_source_id_attribute = BoolProperty(
|
||||
)
|
||||
enable_fluid_particle_source_id_attribute: BoolProperty(
|
||||
name="Generate Source ID Attributes",
|
||||
description="Generate fluid source identifiers for the fluid particles. Each"
|
||||
" Inflow/Fluid object can set to assign a source ID to the generated particles. After"
|
||||
@@ -153,8 +152,8 @@ class DomainParticlesProperties(bpy.types.PropertyGroup):
|
||||
" not supported with sheeting effects or resolution upscaling features",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("enable_fluid_particle_source_id_attribute"))
|
||||
enable_fluid_particle_uid_attribute = BoolProperty(
|
||||
)
|
||||
enable_fluid_particle_uid_attribute: BoolProperty(
|
||||
name="Generate UID Attributes",
|
||||
description="Generate Unique IDs for fluid particles. After"
|
||||
" baking, the UID values can be accessed in a Cycles Attribute Node or in Geometry nodes with the name"
|
||||
@@ -164,8 +163,8 @@ class DomainParticlesProperties(bpy.types.PropertyGroup):
|
||||
" leave this attribute disabled",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("enable_fluid_particle_uid_attribute"))
|
||||
enable_fluid_particle_uid_attribute_reuse = BoolProperty(
|
||||
)
|
||||
enable_fluid_particle_uid_attribute_reuse: BoolProperty(
|
||||
name="Reuse UIDs",
|
||||
description="Reuse UID attribute values. If enabled, particles that are removed from the simulation may have"
|
||||
" their UID reused in a later frame. If a particle is removed from the simulation, the UID will not be"
|
||||
@@ -175,15 +174,7 @@ class DomainParticlesProperties(bpy.types.PropertyGroup):
|
||||
" in geometry nodes",
|
||||
default=True,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("enable_fluid_particle_uid_attribute_reuse"))
|
||||
|
||||
fluid_particles_expanded = BoolProperty(default=True); exec(conv("fluid_particles_expanded"))
|
||||
fluid_particle_generation_expanded = BoolProperty(default=False); exec(conv("fluid_particle_generation_expanded"))
|
||||
fluid_particle_display_settings_expanded = BoolProperty(default=False); exec(conv("fluid_particle_display_settings_expanded"))
|
||||
geometry_attributes_expanded = BoolProperty(default=False); exec(conv("geometry_attributes_expanded"))
|
||||
velocity_attributes_expanded = BoolProperty(default=False); exec(conv("velocity_attributes_expanded"))
|
||||
color_attributes_expanded = BoolProperty(default=False); exec(conv("color_attributes_expanded"))
|
||||
other_attributes_expanded = BoolProperty(default=False); exec(conv("other_attributes_expanded"))
|
||||
)
|
||||
|
||||
|
||||
def register_preset_properties(self, registry, path):
|
||||
|
||||
@@ -30,81 +30,79 @@ from ..utils import version_compatibility_utils as vcu
|
||||
|
||||
|
||||
class DomainPresetsProperties(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
|
||||
enable_presets = BoolProperty(
|
||||
enable_presets: BoolProperty(
|
||||
name="Enable Presets",
|
||||
description="Enable functionality to apply fluid presets",
|
||||
default=False,
|
||||
update=lambda self, context: self._update_enable_presets(context),
|
||||
); exec(conv("enable_presets"))
|
||||
current_package = EnumProperty(
|
||||
)
|
||||
current_package: EnumProperty(
|
||||
name="Package",
|
||||
description="Preset package",
|
||||
items=preset_library.get_all_package_enums,
|
||||
update=lambda self, context: self._update_current_package(context),
|
||||
); exec(conv("current_package"))
|
||||
current_preset = EnumProperty(
|
||||
)
|
||||
current_preset: EnumProperty(
|
||||
items=preset_library.get_current_package_preset_enums,
|
||||
name="Preset",
|
||||
description="Fluid Preset",
|
||||
update=lambda self, context: self._update_current_preset(context),
|
||||
); exec(conv("current_preset"))
|
||||
preview_preset = BoolProperty(
|
||||
)
|
||||
preview_preset: BoolProperty(
|
||||
name="Preview",
|
||||
description="Automatically assign preset on change (without"
|
||||
" needing to add to the preset stack)",
|
||||
default=False,
|
||||
update=lambda self, context: self._update_preview_preset(context),
|
||||
); exec(conv("preview_preset"))
|
||||
new_package_settings = PointerProperty(
|
||||
)
|
||||
new_package_settings: PointerProperty(
|
||||
name="New Package Settings",
|
||||
description="",
|
||||
type=preset_properties.NewPresetPackageSettings,
|
||||
); exec(conv("new_package_settings"))
|
||||
delete_package_settings = PointerProperty(
|
||||
)
|
||||
delete_package_settings: PointerProperty(
|
||||
name="Delete Package Settings",
|
||||
description="",
|
||||
type=preset_properties.DeletePresetPackageSettings,
|
||||
); exec(conv("delete_package_settings"))
|
||||
new_preset_settings = PointerProperty(
|
||||
)
|
||||
new_preset_settings: PointerProperty(
|
||||
name="New Preset Settings",
|
||||
description="",
|
||||
type=preset_properties.NewPresetSettings,
|
||||
); exec(conv("new_preset_settings"))
|
||||
delete_preset_settings = PointerProperty(
|
||||
)
|
||||
delete_preset_settings: PointerProperty(
|
||||
name="Delete Preset Settings",
|
||||
description="",
|
||||
type=preset_properties.DeletePresetSettings,
|
||||
); exec(conv("delete_preset_settings"))
|
||||
edit_preset_settings = PointerProperty(
|
||||
)
|
||||
edit_preset_settings: PointerProperty(
|
||||
name="Edit Preset Settings",
|
||||
description="",
|
||||
type=preset_properties.EditPresetSettings,
|
||||
); exec(conv("edit_preset_settings"))
|
||||
display_preset_settings = PointerProperty(
|
||||
)
|
||||
display_preset_settings: PointerProperty(
|
||||
name="Display Preset Settings",
|
||||
description="",
|
||||
type=preset_properties.DisplayPresetInfoSettings,
|
||||
); exec(conv("display_preset_settings"))
|
||||
export_package_settings = PointerProperty(
|
||||
)
|
||||
export_package_settings: PointerProperty(
|
||||
name="Export Package Settings",
|
||||
description="",
|
||||
type=preset_properties.ExportPresetPackageSettings,
|
||||
); exec(conv("export_package_settings"))
|
||||
import_package_settings = PointerProperty(
|
||||
)
|
||||
import_package_settings: PointerProperty(
|
||||
name="Import Package Settings",
|
||||
description="",
|
||||
type=preset_properties.ImportPresetPackageSettings,
|
||||
); exec(conv("import_package_settings"))
|
||||
preset_stack = PointerProperty(
|
||||
)
|
||||
preset_stack: PointerProperty(
|
||||
name="Flip Fluid Preset Stack",
|
||||
description="",
|
||||
type=flip_fluid_preset_stack.FlipFluidPresetStack,
|
||||
); exec(conv("preset_stack"))
|
||||
|
||||
preset_manager_expanded = BoolProperty(default=False); exec(conv("preset_manager_expanded"))
|
||||
deprecated_presets_disabled_on_load = BoolProperty(default=False); exec(conv("deprecated_presets_disabled_on_load"))
|
||||
)
|
||||
|
||||
deprecated_presets_disabled_on_load: BoolProperty(default=False)
|
||||
|
||||
|
||||
def register_preset_properties(self, registry, path):
|
||||
|
||||
@@ -70,97 +70,94 @@ from ..utils import api_workaround_utils
|
||||
|
||||
|
||||
class FlipFluidDomainProperties(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
|
||||
render = PointerProperty(
|
||||
render: PointerProperty(
|
||||
name="Domain Render Properties",
|
||||
description="",
|
||||
type=domain_render_properties.DomainRenderProperties,
|
||||
); exec(conv("render"))
|
||||
bake = PointerProperty(
|
||||
)
|
||||
bake: PointerProperty(
|
||||
name="Domain Bake Properties",
|
||||
description="",
|
||||
type=domain_bake_properties.DomainBakeProperties,
|
||||
); exec(conv("bake"))
|
||||
simulation = PointerProperty(
|
||||
)
|
||||
simulation: PointerProperty(
|
||||
name="Domain Simulation Properties",
|
||||
description="",
|
||||
type=domain_simulation_properties.DomainSimulationProperties,
|
||||
); exec(conv("simulation"))
|
||||
cache = PointerProperty(
|
||||
)
|
||||
cache: PointerProperty(
|
||||
name="Domain Cache Properties",
|
||||
description="",
|
||||
type=domain_cache_properties.DomainCacheProperties,
|
||||
); exec(conv("cache"))
|
||||
particles = PointerProperty(
|
||||
)
|
||||
particles: PointerProperty(
|
||||
name="Domain Surface Properties",
|
||||
description="",
|
||||
type=domain_particles_properties.DomainParticlesProperties,
|
||||
); exec(conv("particles"))
|
||||
surface = PointerProperty(
|
||||
)
|
||||
surface: PointerProperty(
|
||||
name="Domain Surface Properties",
|
||||
description="",
|
||||
type=domain_surface_properties.DomainSurfaceProperties,
|
||||
); exec(conv("surface"))
|
||||
whitewater = PointerProperty(
|
||||
)
|
||||
whitewater: PointerProperty(
|
||||
name="Domain Whitewater Properties",
|
||||
description="",
|
||||
type=domain_whitewater_properties.DomainWhitewaterProperties,
|
||||
); exec(conv("whitewater"))
|
||||
world = PointerProperty(
|
||||
)
|
||||
world: PointerProperty(
|
||||
name="Domain World Properties",
|
||||
description="",
|
||||
type=domain_world_properties.DomainWorldProperties,
|
||||
); exec(conv("world"))
|
||||
presets = PointerProperty(
|
||||
)
|
||||
presets: PointerProperty(
|
||||
name="Domain Presets Properties",
|
||||
description="",
|
||||
type=domain_presets_properties.DomainPresetsProperties,
|
||||
); exec(conv("presets"))
|
||||
materials = PointerProperty(
|
||||
)
|
||||
materials: PointerProperty(
|
||||
name="Domain Materials Properties",
|
||||
description="",
|
||||
type=domain_materials_properties.DomainMaterialsProperties,
|
||||
); exec(conv("materials"))
|
||||
advanced = PointerProperty(
|
||||
)
|
||||
advanced: PointerProperty(
|
||||
name="Domain Advanced Properties",
|
||||
description="",
|
||||
type=domain_advanced_properties.DomainAdvancedProperties,
|
||||
); exec(conv("advanced"))
|
||||
debug = PointerProperty(
|
||||
)
|
||||
debug: PointerProperty(
|
||||
name="Domain Debug Properties",
|
||||
description="",
|
||||
type=domain_debug_properties.DomainDebugProperties,
|
||||
); exec(conv("debug"))
|
||||
stats = PointerProperty(
|
||||
)
|
||||
stats: PointerProperty(
|
||||
name="Domain Stats Properties",
|
||||
description="",
|
||||
type=domain_stats_properties.DomainStatsProperties,
|
||||
); exec(conv("stats"))
|
||||
mesh_cache = PointerProperty(
|
||||
)
|
||||
mesh_cache: PointerProperty(
|
||||
name="Domain Mesh Cache",
|
||||
description="",
|
||||
type=flip_fluid_cache.FlipFluidCache,
|
||||
); exec(conv("mesh_cache"))
|
||||
property_registry = PointerProperty(
|
||||
)
|
||||
property_registry: PointerProperty(
|
||||
name="Domain Property Registry",
|
||||
description="",
|
||||
type=preset_properties.PresetRegistry,
|
||||
); exec(conv("property_registry"))
|
||||
)
|
||||
|
||||
domain_settings_tabbed_panel_view = EnumProperty(
|
||||
domain_settings_tabbed_panel_view: EnumProperty(
|
||||
name="Domain Panel View",
|
||||
description="Select settings panel to display",
|
||||
items=types.domain_settings_panel,
|
||||
default='DOMAIN_SETTINGS_PANEL_SIMULATION',
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("domain_settings_tabbed_panel_view"))
|
||||
)
|
||||
|
||||
is_updated_to_flip_fluids_version_180 = BoolProperty(default=False)
|
||||
exec(conv("is_updated_to_flip_fluids_version_180"));
|
||||
|
||||
is_updated_to_flip_fluids_version_184 = BoolProperty(default=False)
|
||||
exec(conv("is_updated_to_flip_fluids_version_184"));
|
||||
is_updated_to_flip_fluids_version_180: BoolProperty(default=False)
|
||||
is_updated_to_flip_fluids_version_184: BoolProperty(default=False)
|
||||
is_updated_to_flip_fluids_version_185: BoolProperty(default=False)
|
||||
|
||||
|
||||
def initialize(self):
|
||||
@@ -443,6 +440,28 @@ class FlipFluidDomainProperties(bpy.types.PropertyGroup):
|
||||
self.is_updated_to_flip_fluids_version_184 = True
|
||||
|
||||
|
||||
def _update_to_flip_fluids_version_185(self):
|
||||
dprops = bpy.context.scene.flip_fluid.get_domain_properties()
|
||||
if dprops is None:
|
||||
return
|
||||
|
||||
if self.is_updated_to_flip_fluids_version_185:
|
||||
return
|
||||
|
||||
print("\n*** Begin updating FLIP Domain to FLIP Fluids version 1.8.5+ ***")
|
||||
|
||||
parent_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
blend_resource_filename = "geometry_nodes_library.blend"
|
||||
resource_filepath = os.path.join(parent_path, "resources", "geometry_nodes", blend_resource_filename)
|
||||
|
||||
# Fluid surface should now always have a FF_GeometryNodesSurface modifier
|
||||
mesh_cache_surface = dprops.mesh_cache.surface.get_cache_object()
|
||||
gn_modifier = helper_operators.add_geometry_node_modifier(mesh_cache_surface, resource_filepath, "FF_GeometryNodesSurface")
|
||||
|
||||
print("*** Finished updating FLIP Domain to FLIP Fluids version 1.8.5+ ***\n")
|
||||
self.is_updated_to_flip_fluids_version_185 = True
|
||||
|
||||
|
||||
def scene_update_post(self, scene):
|
||||
self.render.scene_update_post(scene)
|
||||
self.simulation.scene_update_post(scene)
|
||||
@@ -479,6 +498,7 @@ class FlipFluidDomainProperties(bpy.types.PropertyGroup):
|
||||
api_workaround_utils.load_post_update_cycles_visibility_forward_compatibility_from_blender_3()
|
||||
self._update_to_flip_fluids_version_180()
|
||||
self._update_to_flip_fluids_version_184()
|
||||
self._update_to_flip_fluids_version_185()
|
||||
|
||||
|
||||
def save_pre(self):
|
||||
|
||||
@@ -33,21 +33,20 @@ def object_is_mesh_type_poll(self, obj):
|
||||
|
||||
|
||||
class DomainRenderProperties(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
|
||||
render_display = EnumProperty(
|
||||
render_display: EnumProperty(
|
||||
name="Render Display Mode",
|
||||
description="How to display the surface mesh for rendering",
|
||||
items=types.display_modes,
|
||||
default='DISPLAY_FINAL',
|
||||
); exec(conv("render_display"))
|
||||
viewport_display = EnumProperty(
|
||||
)
|
||||
viewport_display: EnumProperty(
|
||||
name="Viewport Display Mode",
|
||||
description="How to display the surface mesh in the viewport",
|
||||
items=types.display_modes,
|
||||
default='DISPLAY_FINAL',
|
||||
); exec(conv("viewport_display"))
|
||||
render_surface_motion_blur = BoolProperty(
|
||||
)
|
||||
render_surface_motion_blur: BoolProperty(
|
||||
name="Render Motion Blur",
|
||||
description="Enable surface motion blur rendering. Motion blur"
|
||||
" vectors must be generated to render motion blur. See"
|
||||
@@ -55,8 +54,8 @@ class DomainRenderProperties(bpy.types.PropertyGroup):
|
||||
" Motion blur must also be enabled in the Cycles render"
|
||||
" properties",
|
||||
default=True,
|
||||
); exec(conv("render_surface_motion_blur"))
|
||||
surface_motion_blur_scale = FloatProperty(
|
||||
)
|
||||
surface_motion_blur_scale: FloatProperty(
|
||||
name="Scale",
|
||||
description="Scale of the surface motion blur vectors. Increasing this"
|
||||
" value will increase the amount of motion blur. Negative"
|
||||
@@ -65,22 +64,22 @@ class DomainRenderProperties(bpy.types.PropertyGroup):
|
||||
min=-10.0, max=10.0,
|
||||
step=0.1,
|
||||
precision=3,
|
||||
); exec(conv("surface_motion_blur_scale"))
|
||||
)
|
||||
|
||||
|
||||
fluid_particle_render_display = EnumProperty(
|
||||
fluid_particle_render_display: EnumProperty(
|
||||
name="Fluid Particle Render Display Mode",
|
||||
description="How to display the fluid particles for rendering",
|
||||
items=types.display_modes,
|
||||
default='DISPLAY_FINAL',
|
||||
); exec(conv("fluid_particle_render_display"))
|
||||
fluid_particle_viewport_display = EnumProperty(
|
||||
)
|
||||
fluid_particle_viewport_display: EnumProperty(
|
||||
name="Whitewater Viewport Display Mode",
|
||||
description="How to display the fluid particles in the viewport",
|
||||
items=types.display_modes,
|
||||
default='DISPLAY_PREVIEW',
|
||||
); exec(conv("fluid_particle_viewport_display"))
|
||||
render_fluid_particle_surface_pct = FloatProperty(
|
||||
)
|
||||
render_fluid_particle_surface_pct: FloatProperty(
|
||||
name="Surface",
|
||||
description="Amount of total surface fluid particles to display during render. Surface"
|
||||
" particles are near the fluid surface and border empty air, but are not near"
|
||||
@@ -88,16 +87,16 @@ class DomainRenderProperties(bpy.types.PropertyGroup):
|
||||
min=0.0, max=1.0,
|
||||
default=1.0,
|
||||
precision=5,
|
||||
); exec(conv("render_fluid_particle_surface_pct"))
|
||||
render_fluid_particle_boundary_pct = FloatProperty(
|
||||
)
|
||||
render_fluid_particle_boundary_pct: FloatProperty(
|
||||
name="Boundary",
|
||||
description="Amount of total boundary fluid particles to display during render. Boundary"
|
||||
" particles are located near the domain boundary",
|
||||
min=0.0, max=1.0,
|
||||
default=1.0,
|
||||
precision=5,
|
||||
); exec(conv("render_fluid_particle_boundary_pct"))
|
||||
render_fluid_particle_interior_pct = FloatProperty(
|
||||
)
|
||||
render_fluid_particle_interior_pct: FloatProperty(
|
||||
name="Interior",
|
||||
description="Amount of total interior fluid particles to display during render. Interior"
|
||||
" particles are within the fluid and are particles that have not been classified"
|
||||
@@ -105,48 +104,48 @@ class DomainRenderProperties(bpy.types.PropertyGroup):
|
||||
min=0.0, max=1.0,
|
||||
default=1.0,
|
||||
precision=5,
|
||||
); exec(conv("render_fluid_particle_interior_pct"))
|
||||
viewport_fluid_particle_surface_pct = FloatProperty(
|
||||
)
|
||||
viewport_fluid_particle_surface_pct: FloatProperty(
|
||||
name="Surface",
|
||||
description="Amount of total surface fluid particles to display in the viewport. Surface"
|
||||
" particles are near the fluid surface or obstacles, but are not near"
|
||||
" the domain boundary",
|
||||
min=0.0, max=1.0,
|
||||
default=0.5,
|
||||
default=0.1,
|
||||
precision=5,
|
||||
); exec(conv("viewport_fluid_particle_surface_pct"))
|
||||
viewport_fluid_particle_boundary_pct = FloatProperty(
|
||||
)
|
||||
viewport_fluid_particle_boundary_pct: FloatProperty(
|
||||
name="Boundary",
|
||||
description="Amount of total boundary fluid particles to display in the viewport. Boundary"
|
||||
" particles are located near the domain boundary",
|
||||
min=0.0, max=1.0,
|
||||
default=0.25,
|
||||
default=0.1,
|
||||
precision=5,
|
||||
); exec(conv("viewport_fluid_particle_boundary_pct"))
|
||||
viewport_fluid_particle_interior_pct = FloatProperty(
|
||||
)
|
||||
viewport_fluid_particle_interior_pct: FloatProperty(
|
||||
name="Interior",
|
||||
description="Amount of total interior fluid particles to display in the viewport. Interior"
|
||||
" particles are within the fluid and are particles that have not been classified"
|
||||
" as either surface or boundary particles ",
|
||||
min=0.0, max=1.0,
|
||||
default=0.05,
|
||||
default=0.1,
|
||||
precision=5,
|
||||
); exec(conv("viewport_fluid_particle_interior_pct"))
|
||||
)
|
||||
|
||||
|
||||
whitewater_render_display = EnumProperty(
|
||||
whitewater_render_display: EnumProperty(
|
||||
name="Whitewater Render Display Mode",
|
||||
description="How to display the whitewater particles for rendering",
|
||||
items=types.display_modes,
|
||||
default='DISPLAY_FINAL',
|
||||
); exec(conv("whitewater_render_display"))
|
||||
whitewater_viewport_display = EnumProperty(
|
||||
)
|
||||
whitewater_viewport_display: EnumProperty(
|
||||
name="Whitewater Viewport Display Mode",
|
||||
description="How to display the whitewater particles in the viewport",
|
||||
items=types.display_modes,
|
||||
default='DISPLAY_FINAL',
|
||||
); exec(conv("whitewater_viewport_display"))
|
||||
render_whitewater_motion_blur = BoolProperty(
|
||||
)
|
||||
render_whitewater_motion_blur: BoolProperty(
|
||||
name="Render Motion Blur",
|
||||
description="Enable whitewater motion blur rendering. Motion blur"
|
||||
" vectors must be generated to render motion blur. See"
|
||||
@@ -154,8 +153,8 @@ class DomainRenderProperties(bpy.types.PropertyGroup):
|
||||
" Motion blur must also be enabled in the Cycles render"
|
||||
" properties",
|
||||
default=True,
|
||||
); exec(conv("render_whitewater_motion_blur"))
|
||||
whitewater_motion_blur_scale = FloatProperty(
|
||||
)
|
||||
whitewater_motion_blur_scale: FloatProperty(
|
||||
name="Scale",
|
||||
description="Scale of the whitewater motion blur vectors. Increasing this"
|
||||
" value will increase the amount of motion blur. Negative"
|
||||
@@ -164,163 +163,158 @@ class DomainRenderProperties(bpy.types.PropertyGroup):
|
||||
min=-10.0, max=10.0,
|
||||
step=0.1,
|
||||
precision=3,
|
||||
); exec(conv("whitewater_motion_blur_scale"))
|
||||
render_whitewater_pct = IntProperty(
|
||||
)
|
||||
render_whitewater_pct: IntProperty(
|
||||
name="Whitewater",
|
||||
description="Percentage of total whitewater particles to display",
|
||||
min=0, max=100,
|
||||
default=100,
|
||||
subtype='PERCENTAGE',
|
||||
); exec(conv("render_whitewater_pct"))
|
||||
render_foam_pct = IntProperty(
|
||||
)
|
||||
render_foam_pct: IntProperty(
|
||||
name="Foam",
|
||||
description="Percentage of total foam particles to display",
|
||||
min=0, max=100,
|
||||
default=100,
|
||||
subtype='PERCENTAGE',
|
||||
); exec(conv("render_foam_pct"))
|
||||
render_bubble_pct = IntProperty(
|
||||
)
|
||||
render_bubble_pct: IntProperty(
|
||||
name="Bubble",
|
||||
description="Percentage of total bubble particles to display",
|
||||
min=0, max=100,
|
||||
default=100,
|
||||
subtype='PERCENTAGE',
|
||||
); exec(conv("render_bubble_pct"))
|
||||
render_spray_pct = IntProperty(
|
||||
)
|
||||
render_spray_pct: IntProperty(
|
||||
name="Spray",
|
||||
description="Percentage of total spray particles to display",
|
||||
min=0, max=100,
|
||||
default=100,
|
||||
subtype='PERCENTAGE',
|
||||
); exec(conv("render_spray_pct"))
|
||||
render_dust_pct = IntProperty(
|
||||
)
|
||||
render_dust_pct: IntProperty(
|
||||
name="Dust",
|
||||
description="Percentage of total dust particles to display",
|
||||
min=0, max=100,
|
||||
default=100,
|
||||
subtype='PERCENTAGE',
|
||||
); exec(conv("render_dust_pct"))
|
||||
viewport_whitewater_pct = IntProperty(
|
||||
)
|
||||
viewport_whitewater_pct: IntProperty(
|
||||
name="Whitewater",
|
||||
description="Percentage of total whitewater particles to display",
|
||||
min=0, max=100,
|
||||
default=5,
|
||||
subtype='PERCENTAGE',
|
||||
); exec(conv("viewport_whitewater_pct"))
|
||||
viewport_foam_pct = IntProperty(
|
||||
)
|
||||
viewport_foam_pct: IntProperty(
|
||||
name="Foam",
|
||||
description="Percentage of total foam particles to display",
|
||||
min=0, max=100,
|
||||
default=5,
|
||||
subtype='PERCENTAGE',
|
||||
); exec(conv("viewport_foam_pct"))
|
||||
viewport_bubble_pct = IntProperty(
|
||||
)
|
||||
viewport_bubble_pct: IntProperty(
|
||||
name="Bubble",
|
||||
description="Percentage of total bubble particles to display",
|
||||
min=0, max=100,
|
||||
default=5,
|
||||
subtype='PERCENTAGE',
|
||||
); exec(conv("viewport_bubble_pct"))
|
||||
viewport_spray_pct = IntProperty(
|
||||
)
|
||||
viewport_spray_pct: IntProperty(
|
||||
name="Spray",
|
||||
description="Percentage of total spray particles to display",
|
||||
min=0, max=100,
|
||||
default=5,
|
||||
subtype='PERCENTAGE',
|
||||
); exec(conv("viewport_spray_pct"))
|
||||
viewport_dust_pct = IntProperty(
|
||||
)
|
||||
viewport_dust_pct: IntProperty(
|
||||
name="Dust",
|
||||
description="Percentage of total dust particles to display",
|
||||
min=0, max=100,
|
||||
default=5,
|
||||
subtype='PERCENTAGE',
|
||||
); exec(conv("viewport_dust_pct"))
|
||||
)
|
||||
|
||||
whitewater_view_settings_mode = EnumProperty(
|
||||
whitewater_view_settings_mode: EnumProperty(
|
||||
name="View Settings Mode",
|
||||
description="How display settings will be applied to whitewater particles",
|
||||
items=types.whitewater_view_settings_modes,
|
||||
default='VIEW_SETTINGS_WHITEWATER',
|
||||
); exec(conv("whitewater_view_settings_mode"))
|
||||
whitewater_particle_object_settings_mode = EnumProperty(
|
||||
)
|
||||
whitewater_particle_object_settings_mode: EnumProperty(
|
||||
name="Particle Object Settings Mode",
|
||||
description="How particle object settings will be applied to whitewater particles",
|
||||
items=types.whitewater_object_settings_modes,
|
||||
default='WHITEWATER_OBJECT_SETTINGS_WHITEWATER',
|
||||
); exec(conv("whitewater_particle_object_settings_mode"))
|
||||
)
|
||||
|
||||
# Particle scale settings are no longer used in FLIP Fluids 1.8.0+
|
||||
# Only used to update Blend files created in FLIP Fluids 1.7.5 and earlier
|
||||
# to newer addon versions.
|
||||
whitewater_particle_scale = FloatProperty(
|
||||
whitewater_particle_scale: FloatProperty(
|
||||
name="Scale",
|
||||
description="Scale of the whitewater particle object",
|
||||
min=0.0,
|
||||
default=0.008,
|
||||
step=0.01,
|
||||
precision=4,
|
||||
); exec(conv("whitewater_particle_scale"))
|
||||
foam_particle_scale = FloatProperty(
|
||||
)
|
||||
foam_particle_scale: FloatProperty(
|
||||
name="Scale",
|
||||
description="Scale of the foam particle object",
|
||||
min=0.0,
|
||||
default=0.008,
|
||||
step=0.01,
|
||||
precision=4,
|
||||
); exec(conv("foam_particle_scale"))
|
||||
bubble_particle_scale = FloatProperty(
|
||||
)
|
||||
bubble_particle_scale: FloatProperty(
|
||||
name="Scale",
|
||||
description="Scale of the bubble particle object",
|
||||
min=0.0,
|
||||
default=0.008,
|
||||
step=0.01,
|
||||
precision=4,
|
||||
); exec(conv("bubble_particle_scale"))
|
||||
spray_particle_scale = FloatProperty(
|
||||
)
|
||||
spray_particle_scale: FloatProperty(
|
||||
name="Scale",
|
||||
description="Scale of the spray particle object",
|
||||
min=0.0,
|
||||
default=0.008,
|
||||
step=0.01,
|
||||
precision=4,
|
||||
); exec(conv("spray_particle_scale"))
|
||||
dust_particle_scale = FloatProperty(
|
||||
)
|
||||
dust_particle_scale: FloatProperty(
|
||||
name="Scale",
|
||||
description="Scale of the dust particle object",
|
||||
min=0.0,
|
||||
default=0.008,
|
||||
step=0.01,
|
||||
precision=4,
|
||||
); exec(conv("dust_particle_scale"))
|
||||
)
|
||||
|
||||
simulation_playback_mode = EnumProperty(
|
||||
simulation_playback_mode: EnumProperty(
|
||||
name="Simulation Playback Mode",
|
||||
description="How to playback the simulation animation",
|
||||
items=types.simulation_playback_mode,
|
||||
default='PLAYBACK_MODE_TIMELINE',
|
||||
); exec(conv("simulation_playback_mode"))
|
||||
override_frame = FloatProperty(
|
||||
)
|
||||
override_frame: FloatProperty(
|
||||
name="Override Frame",
|
||||
description="The custom frame number to override. If this value is not a whole number,"
|
||||
" the frame to be loaded will be rounded down. TIP: This value can be keyframed for"
|
||||
" complex control of simulation playback",
|
||||
default=1.000,
|
||||
); exec(conv("override_frame"))
|
||||
hold_frame_number = IntProperty(
|
||||
)
|
||||
hold_frame_number: IntProperty(
|
||||
name="Hold Frame",
|
||||
description="Frame number to be held in place",
|
||||
min=0,
|
||||
default=0,
|
||||
options = {'HIDDEN'},
|
||||
); exec(conv("hold_frame_number"))
|
||||
)
|
||||
|
||||
|
||||
whitewater_display_settings_expanded = BoolProperty(default=False); exec(conv("whitewater_display_settings_expanded"))
|
||||
fluid_particle_display_settings_expanded = BoolProperty(default=False); exec(conv("fluid_particle_display_settings_expanded"))
|
||||
surface_display_settings_expanded = BoolProperty(default=True); exec(conv("surface_display_settings_expanded"))
|
||||
simulation_display_settings_expanded = BoolProperty(default=False); exec(conv("simulation_display_settings_expanded"))
|
||||
current_frame = IntProperty(default=-1); exec(conv("current_frame"))
|
||||
is_hold_frame_number_set = BoolProperty(default=False); exec(conv("is_hold_frame_number_set"))
|
||||
current_frame: IntProperty(default=-1)
|
||||
is_hold_frame_number_set: BoolProperty(default=False)
|
||||
|
||||
|
||||
def register_preset_properties(self, registry, path):
|
||||
|
||||
+86
-84
@@ -36,16 +36,15 @@ from ..utils import export_utils
|
||||
|
||||
|
||||
class DomainSimulationProperties(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
|
||||
frame_range_mode = EnumProperty(
|
||||
frame_range_mode: EnumProperty(
|
||||
name="Frame Range Mode",
|
||||
description="Frame range to use for baking the simulation",
|
||||
items=types.frame_range_modes,
|
||||
default='FRAME_RANGE_TIMELINE',
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("frame_range_mode"))
|
||||
frame_range_custom = NewMinMaxIntProperty(
|
||||
)
|
||||
frame_range_custom: NewMinMaxIntProperty(
|
||||
name_min="Start Frame",
|
||||
description_min="First frame of the simulation cache",
|
||||
min_min=0,
|
||||
@@ -57,63 +56,63 @@ class DomainSimulationProperties(bpy.types.PropertyGroup):
|
||||
min_max=0,
|
||||
default_max=250,
|
||||
options_max={'HIDDEN'},
|
||||
); exec(conv("frame_range_custom"))
|
||||
update_settings_on_resume = BoolProperty(
|
||||
)
|
||||
update_settings_on_resume: BoolProperty(
|
||||
name="Update Settings on Resume",
|
||||
description="Update simulation settings and meshes when resuming a bake."
|
||||
" If disabled, the simulator will use the original settings and meshes"
|
||||
" from when the bake was started",
|
||||
default=True,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("update_settings_on_resume"))
|
||||
mesh_reexport_type_filter = EnumProperty(
|
||||
)
|
||||
mesh_reexport_type_filter: EnumProperty(
|
||||
name="Object Motion Type",
|
||||
description="Filter objects by motion type for skip re-export list display",
|
||||
items=types.motion_filter_types,
|
||||
default='MOTION_FILTER_TYPE_ANIMATED',
|
||||
); exec(conv("mesh_reexport_type_filter"))
|
||||
enable_savestates = BoolProperty(
|
||||
)
|
||||
enable_savestates: BoolProperty(
|
||||
name="Enable Savestates",
|
||||
description="Generate savestates/checkpoints as the simulation progresses."
|
||||
" Savestates will allow you to rollback the simulation to an earlier"
|
||||
" point so that you can re-simulate from a previous frame",
|
||||
default=True,
|
||||
options = {'HIDDEN'},
|
||||
); exec(conv("enable_savestates"))
|
||||
savestate_interval = IntProperty(
|
||||
)
|
||||
savestate_interval: IntProperty(
|
||||
name="Savestate Interval",
|
||||
description="Number of frames between each savestate",
|
||||
min=1,
|
||||
default=50,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("savestate_interval"))
|
||||
delete_outdated_savestates = BoolProperty(
|
||||
)
|
||||
delete_outdated_savestates: BoolProperty(
|
||||
name="Delete Outdated Savestates on Resume",
|
||||
description="When resuming a simulation from a previous frame, delete"
|
||||
" all savestates that are ahead in the timeline",
|
||||
default=True,
|
||||
options = {'HIDDEN'},
|
||||
); exec(conv("delete_outdated_savestates"))
|
||||
delete_outdated_meshes = BoolProperty(
|
||||
)
|
||||
delete_outdated_meshes: BoolProperty(
|
||||
name="Delete Outdated Meshes on Resume",
|
||||
description="When resuming a simulation from a previous frame, delete"
|
||||
" all simulation meshes that are ahead in the timeline",
|
||||
default=True,
|
||||
options = {'HIDDEN'},
|
||||
); exec(conv("delete_outdated_meshes"))
|
||||
selected_savestate = EnumProperty(
|
||||
)
|
||||
selected_savestate: EnumProperty(
|
||||
name="Selected Savestate",
|
||||
description="Resume simulation from this savestate frame",
|
||||
update=lambda self, context: self._update_selected_savestate(context),
|
||||
items=lambda self, context: self._get_savestate_enums(context),
|
||||
); exec(conv("selected_savestate"))
|
||||
selected_savestate_int = IntProperty(
|
||||
)
|
||||
selected_savestate_int: IntProperty(
|
||||
name="Selected Savestate",
|
||||
description="Resume simulation from this savestate frame",
|
||||
update=lambda self, context: self._update_selected_savestate_int(context),
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("selected_savestate_int"))
|
||||
resolution = IntProperty(
|
||||
)
|
||||
resolution: IntProperty(
|
||||
name="Resolution",
|
||||
description="Domain grid resolution. This value specifies the number of"
|
||||
" grid voxels on the longest side of the domain. See the tooltips in"
|
||||
@@ -123,8 +122,8 @@ class DomainSimulationProperties(bpy.types.PropertyGroup):
|
||||
default=65,
|
||||
update=lambda self, context: self._update_resolution(context),
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("resolution"))
|
||||
preview_resolution = IntProperty(
|
||||
)
|
||||
preview_resolution: IntProperty(
|
||||
name="Preview Resolution",
|
||||
description="The resolution to use for generating lower quality meshes for"
|
||||
" the preview fluid surface. Increasing this value will take no extra time"
|
||||
@@ -133,16 +132,16 @@ class DomainSimulationProperties(bpy.types.PropertyGroup):
|
||||
default=45,
|
||||
update=lambda self, context: self._update_preview_resolution(context),
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("preview_resolution"))
|
||||
auto_preview_resolution = BoolProperty(
|
||||
)
|
||||
auto_preview_resolution: BoolProperty(
|
||||
name="Recommended",
|
||||
description="Set recommended preview resolution based on domain resolution and"
|
||||
" mesh generation settings",
|
||||
default=True,
|
||||
update=lambda self, context: self._update_auto_preview_resolution(context),
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("auto_preview_resolution"))
|
||||
lock_cell_size = BoolProperty(
|
||||
)
|
||||
lock_cell_size: BoolProperty(
|
||||
name="Lock Voxel Size",
|
||||
description="Lock the current voxel size and update the grid"
|
||||
" resolution as the domain dimensions are changed. Enable this"
|
||||
@@ -151,16 +150,16 @@ class DomainSimulationProperties(bpy.types.PropertyGroup):
|
||||
default=False,
|
||||
update=lambda self, context: self._update_lock_cell_size(context),
|
||||
options = {'HIDDEN'},
|
||||
); exec(conv("lock_cell_size"))
|
||||
fluid_boundary_collisions = BoolVectorProperty(
|
||||
)
|
||||
fluid_boundary_collisions: BoolVectorProperty(
|
||||
name="",
|
||||
description="Enable collisions on the corresponding side of the domain."
|
||||
" If disabled, this side of the boundary will be open and will act"
|
||||
" as an outflow",
|
||||
default=(True, True, True, True, True, True),
|
||||
size=6,
|
||||
); exec(conv("fluid_boundary_collisions"))
|
||||
fluid_open_boundary_width = IntProperty(
|
||||
)
|
||||
fluid_open_boundary_width: IntProperty(
|
||||
name="Open Boundary Width",
|
||||
description="The distance (in number of voxels) from the domain boundary that fluid will be"
|
||||
" removed for open boundary sides. Note: This setting is for testing purposes and may"
|
||||
@@ -168,22 +167,22 @@ class DomainSimulationProperties(bpy.types.PropertyGroup):
|
||||
soft_min=2, min=1,
|
||||
soft_max=10,
|
||||
default=4,
|
||||
); exec(conv("fluid_open_boundary_width"))
|
||||
frame_rate_mode = EnumProperty(
|
||||
)
|
||||
frame_rate_mode: EnumProperty(
|
||||
name="Frame Rate Mode",
|
||||
description="Select the frame rate for the simulation animation",
|
||||
items=types.frame_rate_modes,
|
||||
default='FRAME_RATE_MODE_SCENE',
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("frame_rate_mode"))
|
||||
frame_rate_custom = FloatProperty(
|
||||
)
|
||||
frame_rate_custom: FloatProperty(
|
||||
name="Frame Rate",
|
||||
description="Frame rate in frames per second",
|
||||
min=0.001,
|
||||
default=60.0,
|
||||
precision=2,
|
||||
); exec(conv("frame_rate_custom"))
|
||||
time_scale_mode = EnumProperty(
|
||||
)
|
||||
time_scale_mode: EnumProperty(
|
||||
name="Time Scale Mode",
|
||||
description="Select the time scale mode for the simulation. Use either a custom"
|
||||
" value or match the value of another simulation. The simulation speed will be"
|
||||
@@ -191,13 +190,16 @@ class DomainSimulationProperties(bpy.types.PropertyGroup):
|
||||
items=types.time_scale_modes,
|
||||
default='TIME_SCALE_MODE_CUSTOM',
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("time_scale_mode"))
|
||||
)
|
||||
|
||||
|
||||
def time_scale_object_soft_body_poll(self, bl_object):
|
||||
for mod in bl_object.modifiers:
|
||||
if mod.type == 'SOFT_BODY':
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def get_selected_time_scale_object_soft_body_modifier(self):
|
||||
if self.time_scale_object_soft_body is None:
|
||||
return None
|
||||
@@ -205,18 +207,23 @@ class DomainSimulationProperties(bpy.types.PropertyGroup):
|
||||
if mod.type == 'SOFT_BODY':
|
||||
return mod
|
||||
return None
|
||||
time_scale_object_soft_body = PointerProperty(
|
||||
|
||||
|
||||
time_scale_object_soft_body: PointerProperty(
|
||||
name="Soft Body Object",
|
||||
type=bpy.types.Object,
|
||||
poll=time_scale_object_soft_body_poll,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("time_scale_object_soft_body"))
|
||||
)
|
||||
|
||||
|
||||
def time_scale_object_cloth_poll(self, bl_object):
|
||||
for mod in bl_object.modifiers:
|
||||
if mod.type == 'CLOTH':
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def get_selected_time_scale_object_cloth_modifier(self):
|
||||
if self.time_scale_object_cloth is None:
|
||||
return None
|
||||
@@ -224,37 +231,40 @@ class DomainSimulationProperties(bpy.types.PropertyGroup):
|
||||
if mod.type == 'CLOTH':
|
||||
return mod
|
||||
return None
|
||||
time_scale_object_cloth = PointerProperty(
|
||||
|
||||
|
||||
time_scale_object_cloth: PointerProperty(
|
||||
name="Cloth Object",
|
||||
type=bpy.types.Object,
|
||||
poll=time_scale_object_cloth_poll,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("time_scale_object_cloth"))
|
||||
)
|
||||
|
||||
|
||||
def time_scale_object_fluid_poll(self, bl_object):
|
||||
if not vcu.is_blender_282():
|
||||
return False
|
||||
for mod in bl_object.modifiers:
|
||||
if mod.type == 'FLUID' and mod.fluid_type == 'DOMAIN':
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def get_selected_time_scale_object_fluid_modifier(self):
|
||||
if not vcu.is_blender_282():
|
||||
return False
|
||||
if self.time_scale_object_fluid is None:
|
||||
return None
|
||||
for mod in self.time_scale_object_fluid.modifiers:
|
||||
if mod.type == 'FLUID' and mod.fluid_type == 'DOMAIN':
|
||||
return mod
|
||||
return None
|
||||
time_scale_object_fluid = PointerProperty(
|
||||
|
||||
|
||||
time_scale_object_fluid: PointerProperty(
|
||||
name="Fluid Domain Object",
|
||||
type=bpy.types.Object,
|
||||
poll=time_scale_object_fluid_poll,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("time_scale_object_fluid"))
|
||||
)
|
||||
|
||||
time_scale = FloatProperty(
|
||||
time_scale: FloatProperty(
|
||||
name="Custom Time Scale",
|
||||
description="Scale the simulation speed by this value. If set to less than"
|
||||
" 1.0, the simulation will appear in slow motion. If set to greater than"
|
||||
@@ -262,60 +272,52 @@ class DomainSimulationProperties(bpy.types.PropertyGroup):
|
||||
min=0.0,
|
||||
default=1.0,
|
||||
precision=3,
|
||||
); exec(conv("time_scale"))
|
||||
)
|
||||
|
||||
locked_cell_size = FloatProperty(default=-1.0); exec(conv("locked_cell_size"))
|
||||
frame_start = IntProperty(default=-1); exec(conv("frame_start"))
|
||||
frame_end = IntProperty(default=-1); exec(conv("frame_end"))
|
||||
locked_cell_size: FloatProperty(default=-1.0)
|
||||
frame_start: IntProperty(default=-1)
|
||||
frame_end: IntProperty(default=-1)
|
||||
|
||||
last_selected_savestate_int: IntProperty(default=-1)
|
||||
selected_savestate_int_label: StringProperty(default="")
|
||||
|
||||
more_bake_settings_expanded = BoolProperty(default=False); exec(conv("more_bake_settings_expanded"))
|
||||
skip_mesh_reexport_expanded = BoolProperty(default=False); exec(conv("skip_mesh_reexport_expanded"))
|
||||
simulation_resolution_expanded = BoolProperty(default=False); exec(conv("simulation_resolution_expanded"))
|
||||
grid_info_expanded = BoolProperty(default=False); exec(conv("grid_info_expanded"))
|
||||
simulation_method_expanded = BoolProperty(default=False); exec(conv("simulation_method_expanded"))
|
||||
world_scale_expanded = BoolProperty(default=False); exec(conv("world_scale_expanded"))
|
||||
boundary_collisions_expanded = BoolProperty(default=False); exec(conv("boundary_collisions_expanded"))
|
||||
frame_rate_and_time_scale_expanded = BoolProperty(default=False); exec(conv("frame_rate_and_time_scale_expanded"))
|
||||
last_selected_savestate_int = IntProperty(default=-1); exec(conv("last_selected_savestate_int"))
|
||||
selected_savestate_int_label = StringProperty(default=""); exec(conv("selected_savestate_int_label"))
|
||||
current_isize: IntProperty(default=-1)
|
||||
current_jsize: IntProperty(default=-1)
|
||||
current_ksize: IntProperty(default=-1)
|
||||
current_dx: FloatProperty(default=-1.0)
|
||||
|
||||
current_isize = IntProperty(default=-1); exec(conv("current_isize"))
|
||||
current_jsize = IntProperty(default=-1); exec(conv("current_jsize"))
|
||||
current_ksize = IntProperty(default=-1); exec(conv("current_ksize"))
|
||||
current_dx = FloatProperty(default=-1.0); exec(conv("current_dx"))
|
||||
savestate_isize: IntProperty(default=-1)
|
||||
savestate_jsize: IntProperty(default=-1)
|
||||
savestate_ksize: IntProperty(default=-1)
|
||||
savestate_dx: FloatProperty(default=-1.0)
|
||||
|
||||
savestate_isize = IntProperty(default=-1); exec(conv("savestate_isize"))
|
||||
savestate_jsize = IntProperty(default=-1); exec(conv("savestate_jsize"))
|
||||
savestate_ksize = IntProperty(default=-1); exec(conv("savestate_ksize"))
|
||||
savestate_dx = FloatProperty(default=-1.0); exec(conv("savestate_dx"))
|
||||
upscale_trigger_factor: FloatProperty(default=0.05)
|
||||
|
||||
upscale_trigger_factor = FloatProperty(default=0.05); exec(conv("upscale_trigger_factor"))
|
||||
|
||||
upscale_resolution_tooltip = BoolProperty(
|
||||
upscale_resolution_tooltip: BoolProperty(
|
||||
name="Upscale Resolution Tooltip",
|
||||
description="Upscaling converts a lower resolution savestate to a higher resolution savestate"
|
||||
" so that the simulation can resume baking at the increased resolution",
|
||||
default=True,
|
||||
); exec(conv("upscale_resolution_tooltip"))
|
||||
)
|
||||
|
||||
grid_voxels_tooltip = BoolProperty(
|
||||
grid_voxels_tooltip: BoolProperty(
|
||||
name="Grid Voxels Tooltip",
|
||||
description="The domain is a 3D grid of cubes called voxels, or cells. This info shows the"
|
||||
" number of voxels on each of the X/Y/Z axis of the domain. The voxels in the 3D grid are"
|
||||
" similar to the 2D pixels in a 2D image, except instead of storing color data, the voxels store"
|
||||
" physics data",
|
||||
default=True,
|
||||
); exec(conv("grid_voxels_tooltip"))
|
||||
)
|
||||
|
||||
grid_dimensions_tooltip = BoolProperty(
|
||||
grid_dimensions_tooltip: BoolProperty(
|
||||
name="Grid Dimensions Tooltip",
|
||||
description="Displays the physical scale of the domain on the X/Y/Z axis in meters."
|
||||
" Setting an appropriate scale can be an important factor for realistic motion and speed"
|
||||
" of your simulated fluid",
|
||||
default=True,
|
||||
); exec(conv("grid_dimensions_tooltip"))
|
||||
)
|
||||
|
||||
grid_voxel_size_tooltip = BoolProperty(
|
||||
grid_voxel_size_tooltip: BoolProperty(
|
||||
name="Voxel Size Tooltip",
|
||||
description="Displays the physical size of a single voxel. You can think of a voxel as"
|
||||
" the 3D version of a 2D image pixel. In an image, the pixel size is the minimum"
|
||||
@@ -323,16 +325,16 @@ class DomainSimulationProperties(bpy.types.PropertyGroup):
|
||||
" the minimum amount of physics detail that can be resolved in the simulation such as the"
|
||||
" smallest droplets and ripples or the thinnest splashes",
|
||||
default=True,
|
||||
); exec(conv("grid_voxel_size_tooltip"))
|
||||
)
|
||||
|
||||
grid_voxel_count_tooltip = BoolProperty(
|
||||
grid_voxel_count_tooltip: BoolProperty(
|
||||
name="Voxel Count Tooltip",
|
||||
description="Displays the total number of voxels in the domain. Physics are computed for each"
|
||||
" voxel and the total count can be a measure for how much work your system will be doing."
|
||||
" Small simulation = around 2 Million. Medium = around 10M. Large = around 40M."
|
||||
" Very Large = over 80M",
|
||||
default=True,
|
||||
); exec(conv("grid_voxel_count_tooltip"))
|
||||
)
|
||||
|
||||
|
||||
def register_preset_properties(self, registry, path):
|
||||
|
||||
@@ -34,12 +34,11 @@ from ..operators import bake_operators
|
||||
# ##############################################################################
|
||||
|
||||
class ByteProperty(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
bytes = FloatProperty(
|
||||
bytes: FloatProperty(
|
||||
default=-1.0,
|
||||
get=lambda self: self._get_bytes(),
|
||||
set=lambda self, value: self._set_bytes(value),
|
||||
); exec(conv("bytes"))
|
||||
)
|
||||
|
||||
|
||||
def get(self):
|
||||
@@ -62,27 +61,25 @@ class ByteProperty(bpy.types.PropertyGroup):
|
||||
|
||||
|
||||
class MeshStatsProperties(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
enabled = bpy.props.BoolProperty(default=False); exec(conv("enabled"))
|
||||
verts = bpy.props.IntProperty(default=-1); exec(conv("verts"))
|
||||
faces = bpy.props.IntProperty(default=-1); exec(conv("faces"))
|
||||
bytes = PointerProperty(type=ByteProperty); exec(conv("bytes"))
|
||||
enabled: bpy.props.BoolProperty(default=False)
|
||||
verts: bpy.props.IntProperty(default=-1)
|
||||
faces: bpy.props.IntProperty(default=-1)
|
||||
bytes: PointerProperty(type=ByteProperty)
|
||||
|
||||
|
||||
class TimeStatsProperties(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
time = FloatProperty(
|
||||
time: FloatProperty(
|
||||
default=-1.0,
|
||||
precision = 1
|
||||
); exec(conv("time"))
|
||||
pct = FloatProperty(
|
||||
)
|
||||
pct: FloatProperty(
|
||||
min=0, max=100,
|
||||
default=0.0,
|
||||
precision = 1,
|
||||
subtype='PERCENTAGE',
|
||||
get=lambda self: self._get_time_pct(),
|
||||
set=lambda self, value: None,
|
||||
); exec(conv("pct"))
|
||||
)
|
||||
|
||||
|
||||
def set_time_pct(self, value):
|
||||
@@ -97,8 +94,7 @@ class TimeStatsProperties(bpy.types.PropertyGroup):
|
||||
|
||||
|
||||
class SolverStressProperties(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
stress_level = FloatProperty(
|
||||
stress_level: FloatProperty(
|
||||
name="Stress Level",
|
||||
description="Amount of stress experienced by the solver. If the stress level exceeds"
|
||||
" 80% for multiple consecutive frames, this may indicate that the simulator requires"
|
||||
@@ -112,7 +108,7 @@ class SolverStressProperties(bpy.types.PropertyGroup):
|
||||
subtype='PERCENTAGE',
|
||||
get=lambda self: self._get_stress_level_pct(),
|
||||
set=lambda self, value: None,
|
||||
); exec(conv("stress_level"))
|
||||
)
|
||||
|
||||
|
||||
def set_stress_level_pct(self, value):
|
||||
@@ -127,178 +123,172 @@ class SolverStressProperties(bpy.types.PropertyGroup):
|
||||
|
||||
|
||||
class DomainStatsProperties(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
|
||||
option_path_supports_blend_relative = set()
|
||||
if vcu.is_blender_45():
|
||||
# required for relative path support in Blender 4.5+
|
||||
# https://docs.blender.org/api/4.5/bpy_types_enum_items/property_flag_items.html#rna-enum-property-flag-items
|
||||
option_path_supports_blend_relative = {'PATH_SUPPORTS_BLEND_RELATIVE'}
|
||||
# required for relative path support in Blender 4.5+
|
||||
# https://docs.blender.org/api/4.5/bpy_types_enum_items/property_flag_items.html#rna-enum-property-flag-items
|
||||
option_path_supports_blend_relative = {'PATH_SUPPORTS_BLEND_RELATIVE'}
|
||||
|
||||
cache_info_type = EnumProperty(
|
||||
cache_info_type: EnumProperty(
|
||||
name="Cache Info Display Mode",
|
||||
description="Type of cache info to display",
|
||||
items=types.cache_info_modes,
|
||||
default='CACHE_INFO',
|
||||
update=lambda self, context: self._update_cache_info_type(context),
|
||||
); exec(conv("cache_info_type"))
|
||||
current_info_frame = IntProperty(
|
||||
)
|
||||
current_info_frame: IntProperty(
|
||||
name="Frame",
|
||||
description="Select frame number",
|
||||
min=0,
|
||||
default=0,
|
||||
update=lambda self, context: self._update_current_info_frame(context),
|
||||
); exec(conv("current_info_frame"))
|
||||
lock_info_frame_to_timeline = BoolProperty(
|
||||
)
|
||||
lock_info_frame_to_timeline: BoolProperty(
|
||||
name="Lock To Timeline",
|
||||
description="Set frame number to current frame in timeline",
|
||||
default=True,
|
||||
update=lambda self, context: self._update_lock_info_frame_to_timeline(context),
|
||||
); exec(conv("lock_info_frame_to_timeline"))
|
||||
)
|
||||
temp_directory = vcu.get_blender_preferences_temporary_directory()
|
||||
csv_save_filepath = StringProperty(
|
||||
csv_save_filepath: StringProperty(
|
||||
name="",
|
||||
default=os.path.join(temp_directory, "flip_fluid_stats.csv"),
|
||||
subtype='FILE_PATH',
|
||||
options=option_path_supports_blend_relative,
|
||||
); exec(conv("csv_save_filepath"))
|
||||
csv_region_format = EnumProperty(
|
||||
)
|
||||
csv_region_format: EnumProperty(
|
||||
name="Region Format",
|
||||
description="CSV region formatting",
|
||||
items=types.csv_regions,
|
||||
default='CSV_REGION_US',
|
||||
); exec(conv("csv_region_format"))
|
||||
)
|
||||
|
||||
stats_filename = bpy.props.StringProperty(default='flipstats.data'); exec(conv("stats_filename"))
|
||||
is_stats_current = bpy.props.BoolProperty(default=False); exec(conv("is_stats_current"))
|
||||
stats_filename: bpy.props.StringProperty(default='flipstats.data')
|
||||
is_stats_current: bpy.props.BoolProperty(default=False)
|
||||
|
||||
# Cache Info
|
||||
cache_info_simulation_stats_expanded = BoolProperty(default=True); exec(conv("cache_info_simulation_stats_expanded"))
|
||||
cache_info_timing_stats_expanded = BoolProperty(default=True); exec(conv("cache_info_timing_stats_expanded"))
|
||||
cache_info_mesh_stats_expanded = BoolProperty(default=True); exec(conv("cache_info_mesh_stats_expanded"))
|
||||
cache_info_solver_stats_expanded = BoolProperty(default=True); exec(conv("cache_info_solver_stats_expanded"))
|
||||
cache_info_pressure_solver_stats_expanded = BoolProperty(default=True); exec(conv("cache_info_pressure_solver_stats_expanded"))
|
||||
cache_info_viscosity_solver_stats_expanded = BoolProperty(default=True); exec(conv("cache_info_viscosity_solver_stats_expanded"))
|
||||
is_cache_info_available = BoolProperty(default=False); exec(conv("is_cache_info_available"))
|
||||
frame_start = IntProperty(default=-1); exec(conv("frame_start"))
|
||||
num_cache_frames = IntProperty(default=-1); exec(conv("num_cache_frames"))
|
||||
is_average_performance_score_enabled = BoolProperty(default=False); exec(conv("is_average_performance_score_enabled"))
|
||||
average_performance_score = IntProperty(default=-1); exec(conv("average_performance_score"))
|
||||
estimated_frame_speed = FloatProperty(default=-1); exec(conv("estimated_frame_speed"))
|
||||
estimated_time_remaining = IntProperty(default=-1); exec(conv("estimated_time_remaining"))
|
||||
estimated_time_remaining_timestamp = IntProperty(default=-1); exec(conv("estimated_time_remaining_timestamp"))
|
||||
is_estimated_time_remaining_available = BoolProperty(default=False); exec(conv("is_estimated_time_remaining_available"))
|
||||
cache_bytes = PointerProperty(type=ByteProperty); exec(conv("cache_bytes"))
|
||||
is_cache_info_available: BoolProperty(default=False)
|
||||
frame_start: IntProperty(default=-1)
|
||||
num_cache_frames: IntProperty(default=-1)
|
||||
is_average_performance_score_enabled: BoolProperty(default=False)
|
||||
average_performance_score: IntProperty(default=-1)
|
||||
estimated_frame_speed: FloatProperty(default=-1)
|
||||
estimated_time_remaining: IntProperty(default=-1)
|
||||
estimated_time_remaining_timestamp: IntProperty(default=-1)
|
||||
is_estimated_time_remaining_available: BoolProperty(default=False)
|
||||
cache_bytes: PointerProperty(type=ByteProperty)
|
||||
|
||||
pressure_solver_enabled = BoolProperty(default=False); exec(conv("pressure_solver_enabled"))
|
||||
pressure_solver_failures = IntProperty(default=-1); exec(conv("pressure_solver_failures"))
|
||||
pressure_solver_steps = IntProperty(default=-1); exec(conv("pressure_solver_steps"))
|
||||
pressure_solver_max_iterations = IntProperty(default=-1); exec(conv("pressure_solver_max_iterations"))
|
||||
pressure_solver_max_iterations_frame = IntProperty(default=-1); exec(conv("pressure_solver_max_iterations_frame"))
|
||||
pressure_solver_max_error = FloatProperty(default=-1); exec(conv("pressure_solver_max_error"))
|
||||
pressure_solver_max_error_frame = IntProperty(default=-1); exec(conv("pressure_solver_max_error_frame"))
|
||||
pressure_solver_max_stress = FloatProperty(default=-1); exec(conv("pressure_solver_max_stress"))
|
||||
pressure_solver_max_stress_frame = IntProperty(default=-1); exec(conv("pressure_solver_max_stress_frame"))
|
||||
pressure_solver_enabled: BoolProperty(default=False)
|
||||
pressure_solver_failures: IntProperty(default=-1)
|
||||
pressure_solver_steps: IntProperty(default=-1)
|
||||
pressure_solver_max_iterations: IntProperty(default=-1)
|
||||
pressure_solver_max_iterations_frame: IntProperty(default=-1)
|
||||
pressure_solver_max_error: FloatProperty(default=-1)
|
||||
pressure_solver_max_error_frame: IntProperty(default=-1)
|
||||
pressure_solver_max_stress: FloatProperty(default=-1)
|
||||
pressure_solver_max_stress_frame: IntProperty(default=-1)
|
||||
|
||||
viscosity_solver_enabled = BoolProperty(default=False); exec(conv("viscosity_solver_enabled"))
|
||||
viscosity_solver_failures = IntProperty(default=-1); exec(conv("viscosity_solver_failures"))
|
||||
viscosity_solver_steps = IntProperty(default=-1); exec(conv("viscosity_solver_steps"))
|
||||
viscosity_solver_max_iterations = IntProperty(default=-1); exec(conv("viscosity_solver_max_iterations"))
|
||||
viscosity_solver_max_iterations_frame = IntProperty(default=-1); exec(conv("viscosity_solver_max_iterations_frame"))
|
||||
viscosity_solver_max_error = FloatProperty(default=-1); exec(conv("viscosity_solver_max_error"))
|
||||
viscosity_solver_max_error_frame = IntProperty(default=-1); exec(conv("viscosity_solver_max_error_frame"))
|
||||
viscosity_solver_max_stress = FloatProperty(default=-1); exec(conv("viscosity_solver_max_stress"))
|
||||
viscosity_solver_max_stress_frame = IntProperty(default=-1); exec(conv("viscosity_solver_max_stress_frame"))
|
||||
viscosity_solver_enabled: BoolProperty(default=False)
|
||||
viscosity_solver_failures: IntProperty(default=-1)
|
||||
viscosity_solver_steps: IntProperty(default=-1)
|
||||
viscosity_solver_max_iterations: IntProperty(default=-1)
|
||||
viscosity_solver_max_iterations_frame: IntProperty(default=-1)
|
||||
viscosity_solver_max_error: FloatProperty(default=-1)
|
||||
viscosity_solver_max_error_frame: IntProperty(default=-1)
|
||||
viscosity_solver_max_stress: FloatProperty(default=-1)
|
||||
viscosity_solver_max_stress_frame: IntProperty(default=-1)
|
||||
|
||||
# Frame Info
|
||||
frame_info_simulation_stats_expanded = BoolProperty(default=True); exec(conv("frame_info_simulation_stats_expanded"))
|
||||
frame_info_solver_stats_expanded = BoolProperty(default=True); exec(conv("frame_info_solver_stats_expanded"))
|
||||
frame_info_pressure_solver_stats_expanded = BoolProperty(default=True); exec(conv("frame_info_pressure_solver_stats_expanded"))
|
||||
frame_info_viscosity_solver_stats_expanded = BoolProperty(default=True); exec(conv("frame_info_viscosity_solver_stats_expanded"))
|
||||
frame_info_timing_stats_expanded = BoolProperty(default=True); exec(conv("frame_info_timing_stats_expanded"))
|
||||
frame_info_mesh_stats_expanded = BoolProperty(default=True); exec(conv("frame_info_mesh_stats_expanded"))
|
||||
display_frame_viscosity_timing_stats = BoolProperty(default=False); exec(conv("display_frame_viscosity_timing_stats"))
|
||||
display_frame_diffuse_timing_stats = BoolProperty(default=False); exec(conv("display_frame_diffuse_timing_stats"))
|
||||
display_frame_diffuse_particle_stats = BoolProperty(default=False); exec(conv("display_frame_diffuse_particle_stats"))
|
||||
is_frame_info_available = bpy.props.BoolProperty(default=False); exec(conv("is_frame_info_available"))
|
||||
frame_info_id = IntProperty(default=-1); exec(conv("frame_info_id"))
|
||||
frame_substeps = IntProperty(default=-1); exec(conv("frame_substeps"))
|
||||
frame_delta_time = FloatProperty(default=0.0); exec(conv("frame_delta_time"))
|
||||
frame_fluid_particles = IntProperty(default=-1); exec(conv("frame_fluid_particles"))
|
||||
frame_diffuse_particles = IntProperty(default=-1); exec(conv("frame_diffuse_particles"))
|
||||
frame_performance_score = IntProperty(default=-1); exec(conv("frame_performance_score"))
|
||||
frame_info_simulation_stats_expanded: BoolProperty(default=True)
|
||||
frame_info_solver_stats_expanded: BoolProperty(default=True)
|
||||
frame_info_pressure_solver_stats_expanded: BoolProperty(default=True)
|
||||
frame_info_viscosity_solver_stats_expanded: BoolProperty(default=True)
|
||||
frame_info_timing_stats_expanded: BoolProperty(default=True)
|
||||
frame_info_mesh_stats_expanded: BoolProperty(default=True)
|
||||
display_frame_viscosity_timing_stats: BoolProperty(default=False)
|
||||
display_frame_diffuse_timing_stats: BoolProperty(default=False)
|
||||
display_frame_diffuse_particle_stats: BoolProperty(default=False)
|
||||
is_frame_info_available: bpy.props.BoolProperty(default=False)
|
||||
frame_info_id: IntProperty(default=-1)
|
||||
frame_substeps: IntProperty(default=-1)
|
||||
frame_delta_time: FloatProperty(default=0.0)
|
||||
frame_fluid_particles: IntProperty(default=-1)
|
||||
frame_diffuse_particles: IntProperty(default=-1)
|
||||
frame_performance_score: IntProperty(default=-1)
|
||||
|
||||
frame_pressure_solver_enabled = BoolProperty(default=False); exec(conv("frame_pressure_solver_enabled"))
|
||||
frame_pressure_solver_success = BoolProperty(default=True); exec(conv("frame_pressure_solver_success"))
|
||||
frame_pressure_solver_error = FloatProperty(default=0.0); exec(conv("frame_pressure_solver_error"))
|
||||
frame_pressure_solver_iterations = IntProperty(default=-1); exec(conv("frame_pressure_solver_iterations"))
|
||||
frame_pressure_solver_max_iterations = IntProperty(default=-1); exec(conv("frame_pressure_solver_max_iterations"))
|
||||
frame_pressure_solver_stress = PointerProperty(type=SolverStressProperties); exec(conv("frame_pressure_solver_stress"))
|
||||
frame_pressure_solver_enabled: BoolProperty(default=False)
|
||||
frame_pressure_solver_success: BoolProperty(default=True)
|
||||
frame_pressure_solver_error: FloatProperty(default=0.0)
|
||||
frame_pressure_solver_iterations: IntProperty(default=-1)
|
||||
frame_pressure_solver_max_iterations: IntProperty(default=-1)
|
||||
frame_pressure_solver_stress: PointerProperty(type=SolverStressProperties)
|
||||
|
||||
frame_viscosity_solver_enabled = BoolProperty(default=False); exec(conv("frame_viscosity_solver_enabled"))
|
||||
frame_viscosity_solver_success = BoolProperty(default=True); exec(conv("frame_viscosity_solver_success"))
|
||||
frame_viscosity_solver_error = FloatProperty(default=0.0); exec(conv("frame_viscosity_solver_error"))
|
||||
frame_viscosity_solver_iterations = IntProperty(default=-1); exec(conv("frame_viscosity_solver_iterations"))
|
||||
frame_viscosity_solver_max_iterations = IntProperty(default=-1); exec(conv("frame_viscosity_solver_max_iterations"))
|
||||
frame_viscosity_solver_stress = PointerProperty(type=SolverStressProperties); exec(conv("frame_viscosity_solver_stress"))
|
||||
frame_viscosity_solver_enabled: BoolProperty(default=False)
|
||||
frame_viscosity_solver_success: BoolProperty(default=True)
|
||||
frame_viscosity_solver_error: FloatProperty(default=0.0)
|
||||
frame_viscosity_solver_iterations: IntProperty(default=-1)
|
||||
frame_viscosity_solver_max_iterations: IntProperty(default=-1)
|
||||
frame_viscosity_solver_stress: PointerProperty(type=SolverStressProperties)
|
||||
|
||||
# Mesh Info
|
||||
surface_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("surface_mesh"))
|
||||
preview_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("preview_mesh"))
|
||||
surfaceblur_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("surfaceblur_mesh"))
|
||||
surfacevelocity_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("surfacevelocity_mesh"))
|
||||
surfacespeed_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("surfacespeed_mesh"))
|
||||
surfacevorticity_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("surfacevorticity_mesh"))
|
||||
surfaceage_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("surfaceage_mesh"))
|
||||
surfacelifetime_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("surfacelifetime_mesh"))
|
||||
surfacewhitewaterproximity_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("surfacewhitewaterproximity_mesh"))
|
||||
surfacecolor_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("surfacecolor_mesh"))
|
||||
surfacesourceid_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("surfacesourceid_mesh"))
|
||||
surfaceviscosity_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("surfaceviscosity_mesh"))
|
||||
foam_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("foam_mesh"))
|
||||
bubble_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("bubble_mesh"))
|
||||
spray_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("spray_mesh"))
|
||||
dust_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("dust_mesh"))
|
||||
foamblur_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("foamblur_mesh"))
|
||||
bubbleblur_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("bubbleblur_mesh"))
|
||||
sprayblur_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("sprayblur_mesh"))
|
||||
dustblur_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("dustblur_mesh"))
|
||||
foamvelocity_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("foamvelocity_mesh"))
|
||||
bubblevelocity_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("bubblevelocity_mesh"))
|
||||
sprayvelocity_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("sprayvelocity_mesh"))
|
||||
dustvelocity_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("dustvelocity_mesh"))
|
||||
foamid_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("foamid_mesh"))
|
||||
bubbleid_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("bubbleid_mesh"))
|
||||
sprayid_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("sprayid_mesh"))
|
||||
dustid_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("dustid_mesh"))
|
||||
foamlifetime_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("foamlifetime_mesh"))
|
||||
bubblelifetime_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("bubblelifetime_mesh"))
|
||||
spraylifetime_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("spraylifetime_mesh"))
|
||||
dustlifetime_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("dustlifetime_mesh"))
|
||||
fluid_particle_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("fluid_particle_mesh"))
|
||||
fluid_particle_id_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("fluid_particle_id_mesh"))
|
||||
fluid_particle_velocity_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("fluid_particle_velocity_mesh"))
|
||||
fluid_particle_speed_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("fluid_particle_speed_mesh"))
|
||||
fluid_particle_vorticity_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("fluid_particle_vorticity_mesh"))
|
||||
fluid_particle_color_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("fluid_particle_color_mesh"))
|
||||
fluid_particle_age_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("fluid_particle_age_mesh"))
|
||||
fluid_particle_lifetime_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("fluid_particle_lifetime_mesh"))
|
||||
fluid_particle_viscosity_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("fluid_particle_viscosity_mesh"))
|
||||
fluid_particle_whitewater_proximity_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("fluid_particle_whitewater_proximity_mesh"))
|
||||
fluid_particle_source_id_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("fluid_particle_source_id_mesh"))
|
||||
fluid_particle_uid_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("fluid_particle_uid_mesh"))
|
||||
debug_particle_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("debug_particle_mesh"))
|
||||
obstacle_mesh = PointerProperty(type=MeshStatsProperties); exec(conv("obstacle_mesh"))
|
||||
surface_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
preview_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
surfaceblur_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
surfacevelocity_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
surfacespeed_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
surfacevorticity_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
surfaceage_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
surfacelifetime_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
surfacewhitewaterproximity_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
surfacecolor_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
surfacesourceid_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
surfaceviscosity_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
surfacedensity_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
foam_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
bubble_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
spray_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
dust_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
foamblur_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
bubbleblur_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
sprayblur_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
dustblur_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
foamvelocity_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
bubblevelocity_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
sprayvelocity_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
dustvelocity_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
foamid_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
bubbleid_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
sprayid_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
dustid_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
foamlifetime_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
bubblelifetime_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
spraylifetime_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
dustlifetime_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
fluid_particle_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
fluid_particle_id_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
fluid_particle_velocity_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
fluid_particle_speed_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
fluid_particle_vorticity_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
fluid_particle_color_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
fluid_particle_age_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
fluid_particle_lifetime_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
fluid_particle_viscosity_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
fluid_particle_density_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
fluid_particle_density_average_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
fluid_particle_whitewater_proximity_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
fluid_particle_source_id_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
fluid_particle_uid_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
debug_particle_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
obstacle_mesh: PointerProperty(type=MeshStatsProperties)
|
||||
|
||||
# Time Info
|
||||
time_mesh = PointerProperty(type=TimeStatsProperties); exec(conv("time_mesh"))
|
||||
time_advection = PointerProperty(type=TimeStatsProperties); exec(conv("time_advection"))
|
||||
time_particles = PointerProperty(type=TimeStatsProperties); exec(conv("time_particles"))
|
||||
time_pressure = PointerProperty(type=TimeStatsProperties); exec(conv("time_pressure"))
|
||||
time_diffuse = PointerProperty(type=TimeStatsProperties); exec(conv("time_diffuse"))
|
||||
time_viscosity = PointerProperty(type=TimeStatsProperties); exec(conv("time_viscosity"))
|
||||
time_objects = PointerProperty(type=TimeStatsProperties); exec(conv("time_objects"))
|
||||
time_other = PointerProperty(type=TimeStatsProperties); exec(conv("time_other"))
|
||||
time_mesh: PointerProperty(type=TimeStatsProperties)
|
||||
time_advection: PointerProperty(type=TimeStatsProperties)
|
||||
time_particles: PointerProperty(type=TimeStatsProperties)
|
||||
time_pressure: PointerProperty(type=TimeStatsProperties)
|
||||
time_diffuse: PointerProperty(type=TimeStatsProperties)
|
||||
time_viscosity: PointerProperty(type=TimeStatsProperties)
|
||||
time_objects: PointerProperty(type=TimeStatsProperties)
|
||||
time_other: PointerProperty(type=TimeStatsProperties)
|
||||
|
||||
|
||||
def register_preset_properties(self, registry, path):
|
||||
@@ -366,6 +356,7 @@ class DomainStatsProperties(bpy.types.PropertyGroup):
|
||||
"surfacecolor_mesh",
|
||||
"surfacesourceid_mesh",
|
||||
"surfaceviscosity_mesh",
|
||||
"surfacedensity_mesh",
|
||||
"foam_mesh",
|
||||
"bubble_mesh",
|
||||
"spray_mesh",
|
||||
@@ -395,6 +386,8 @@ class DomainStatsProperties(bpy.types.PropertyGroup):
|
||||
"fluid_particle_age_mesh",
|
||||
"fluid_particle_lifetime_mesh",
|
||||
"fluid_particle_viscosity_mesh",
|
||||
"fluid_particle_density_mesh",
|
||||
"fluid_particle_density_average_mesh",
|
||||
"fluid_particle_whitewater_proximity_mesh",
|
||||
"fluid_particle_source_id_mesh",
|
||||
"fluid_particle_uid_mesh",
|
||||
@@ -582,6 +575,10 @@ class DomainStatsProperties(bpy.types.PropertyGroup):
|
||||
# If statement to support older caches that do not have a surfaceviscosity entry
|
||||
self._set_mesh_stats_data(self.surfaceviscosity_mesh, data['surfaceviscosity'])
|
||||
|
||||
if 'surfacedensity' in data:
|
||||
# If statement to support older caches that do not have a surfacedensity entry
|
||||
self._set_mesh_stats_data(self.surfacedensity_mesh, data['surfacedensity'])
|
||||
|
||||
self._set_mesh_stats_data(self.foam_mesh, data['foam'])
|
||||
self._set_mesh_stats_data(self.bubble_mesh, data['bubble'])
|
||||
self._set_mesh_stats_data(self.spray_mesh, data['spray'])
|
||||
@@ -661,6 +658,14 @@ class DomainStatsProperties(bpy.types.PropertyGroup):
|
||||
# If statement to support older caches that do not have a fluidparticlesviscosity entry
|
||||
self._set_mesh_stats_data(self.fluid_particle_viscosity_mesh, data['fluidparticlesviscosity'])
|
||||
|
||||
if 'fluidparticlesdensity' in data:
|
||||
# If statement to support older caches that do not have a fluidparticlesdensity entry
|
||||
self._set_mesh_stats_data(self.fluid_particle_density_mesh, data['fluidparticlesdensity'])
|
||||
|
||||
if 'fluidparticlesdensityaverage' in data:
|
||||
# If statement to support older caches that do not have a fluidparticlesdensityaverage entry
|
||||
self._set_mesh_stats_data(self.fluid_particle_density_average_mesh, data['fluidparticlesdensityaverage'])
|
||||
|
||||
if 'fluidparticleswhitewaterproximity' in data:
|
||||
# If statement to support older caches that do not have a fluidparticleswhitewaterproximity entry
|
||||
self._set_mesh_stats_data(self.fluid_particle_whitewater_proximity_mesh, data['fluidparticleswhitewaterproximity'])
|
||||
@@ -765,6 +770,8 @@ class DomainStatsProperties(bpy.types.PropertyGroup):
|
||||
cache_size += fdata['surfacesourceid']['bytes']
|
||||
if 'surfaceviscosity' in fdata and fdata['surfaceviscosity']['enabled']: # If statement to support caches without a surfaceviscosity entry
|
||||
cache_size += fdata['surfaceviscosity']['bytes']
|
||||
if 'surfacedensity' in fdata and fdata['surfacedensity']['enabled']: # If statement to support caches without a surfacedensity entry
|
||||
cache_size += fdata['surfacedensity']['bytes']
|
||||
if fdata['foam']['enabled']:
|
||||
cache_size += fdata['foam']['bytes']
|
||||
if fdata['bubble']['enabled']:
|
||||
@@ -823,6 +830,10 @@ class DomainStatsProperties(bpy.types.PropertyGroup):
|
||||
cache_size += fdata['fluidparticleslifetime']['bytes']
|
||||
if 'fluidparticlesviscosity' in fdata and fdata['fluidparticlesviscosity']['enabled']:
|
||||
cache_size += fdata['fluidparticlesviscosity']['bytes']
|
||||
if 'fluidparticlesdensity' in fdata and fdata['fluidparticlesdensity']['enabled']:
|
||||
cache_size += fdata['fluidparticlesdensity']['bytes']
|
||||
if 'fluidparticlesdensityaverage' in fdata and fdata['fluidparticlesdensityaverage']['enabled']:
|
||||
cache_size += fdata['fluidparticlesdensityaverage']['bytes']
|
||||
if 'fluidparticleswhitewaterproximity' in fdata and fdata['fluidparticleswhitewaterproximity']['enabled']:
|
||||
cache_size += fdata['fluidparticleswhitewaterproximity']['bytes']
|
||||
if 'fluidparticlessourceid' in fdata and fdata['fluidparticlessourceid']['enabled']:
|
||||
@@ -870,6 +881,7 @@ class DomainStatsProperties(bpy.types.PropertyGroup):
|
||||
is_surfacecolor_enabled = False
|
||||
is_surfacesourceid_enabled = False
|
||||
is_surfaceviscosity_enabled = False
|
||||
is_surfacedensity_enabled = False
|
||||
is_foam_enabled = False
|
||||
is_bubble_enabled = False
|
||||
is_spray_enabled = False
|
||||
@@ -899,6 +911,8 @@ class DomainStatsProperties(bpy.types.PropertyGroup):
|
||||
is_fluid_particles_age_enabled = False
|
||||
is_fluid_particles_lifetime_enabled = False
|
||||
is_fluid_particles_viscosity_enabled = False
|
||||
is_fluid_particles_density_enabled = False
|
||||
is_fluid_particles_density_average_enabled = False
|
||||
is_fluid_particles_whitewater_proximity_enabled = False
|
||||
is_fluid_particles_source_id_enabled = False
|
||||
is_fluid_particles_uid_enabled = False
|
||||
@@ -916,6 +930,7 @@ class DomainStatsProperties(bpy.types.PropertyGroup):
|
||||
surfacecolor_bytes = 0
|
||||
surfacesourceid_bytes = 0
|
||||
surfaceviscosity_bytes = 0
|
||||
surfacedensity_bytes = 0
|
||||
foam_bytes = 0
|
||||
bubble_bytes = 0
|
||||
spray_bytes = 0
|
||||
@@ -945,6 +960,8 @@ class DomainStatsProperties(bpy.types.PropertyGroup):
|
||||
fluid_particles_age_bytes = 0
|
||||
fluid_particles_lifetime_bytes = 0
|
||||
fluid_particles_viscosity_bytes = 0
|
||||
fluid_particles_density_bytes = 0
|
||||
fluid_particles_density_average_bytes = 0
|
||||
fluid_particles_whitewater_proximity_bytes = 0
|
||||
fluid_particles_source_id_bytes = 0
|
||||
fluid_particles_uid_bytes = 0
|
||||
@@ -1015,6 +1032,9 @@ class DomainStatsProperties(bpy.types.PropertyGroup):
|
||||
if 'surfaceviscosity' in fdata and fdata['surfaceviscosity']['enabled']: # If statement to support caches without a surfaceviscosity entry
|
||||
is_surfaceviscosity_enabled = True
|
||||
surfaceviscosity_bytes += fdata['surfaceviscosity']['bytes']
|
||||
if 'surfacedensity' in fdata and fdata['surfacedensity']['enabled']: # If statement to support caches without a surfacedensity entry
|
||||
is_surfacedensity_enabled = True
|
||||
surfacedensity_bytes += fdata['surfacedensity']['bytes']
|
||||
if fdata['foam']['enabled']:
|
||||
is_foam_enabled = True
|
||||
foam_bytes += fdata['foam']['bytes']
|
||||
@@ -1102,6 +1122,12 @@ class DomainStatsProperties(bpy.types.PropertyGroup):
|
||||
if 'fluidparticlesviscosity' in fdata and fdata['fluidparticlesviscosity']['enabled']:
|
||||
is_fluid_particles_viscosity_enabled = True
|
||||
fluid_particles_viscosity_bytes += fdata['fluidparticlesviscosity']['bytes']
|
||||
if 'fluidparticlesdensity' in fdata and fdata['fluidparticlesdensity']['enabled']:
|
||||
is_fluid_particles_density_enabled = True
|
||||
fluid_particles_density_bytes += fdata['fluidparticlesdensity']['bytes']
|
||||
if 'fluidparticlesdensityaverage' in fdata and fdata['fluidparticlesdensityaverage']['enabled']:
|
||||
is_fluid_particles_density_average_enabled = True
|
||||
fluid_particles_density_average_bytes += fdata['fluidparticlesdensityaverage']['bytes']
|
||||
if 'fluidparticleswhitewaterproximity' in fdata and fdata['fluidparticleswhitewaterproximity']['enabled']:
|
||||
is_fluid_particles_whitewater_proximity_enabled = True
|
||||
fluid_particles_whitewater_proximity_bytes += fdata['fluidparticleswhitewaterproximity']['bytes']
|
||||
@@ -1154,6 +1180,7 @@ class DomainStatsProperties(bpy.types.PropertyGroup):
|
||||
self.surfacecolor_mesh.enabled = is_surfacecolor_enabled
|
||||
self.surfacesourceid_mesh.enabled = is_surfacesourceid_enabled
|
||||
self.surfaceviscosity_mesh.enabled = is_surfaceviscosity_enabled
|
||||
self.surfacedensity_mesh.enabled = is_surfacedensity_enabled
|
||||
self.foam_mesh.enabled = is_foam_enabled
|
||||
self.bubble_mesh.enabled = is_bubble_enabled
|
||||
self.spray_mesh.enabled = is_spray_enabled
|
||||
@@ -1183,6 +1210,8 @@ class DomainStatsProperties(bpy.types.PropertyGroup):
|
||||
self.fluid_particle_age_mesh.enabled = is_fluid_particles_age_enabled
|
||||
self.fluid_particle_lifetime_mesh.enabled = is_fluid_particles_lifetime_enabled
|
||||
self.fluid_particle_viscosity_mesh.enabled = is_fluid_particles_viscosity_enabled
|
||||
self.fluid_particle_density_mesh.enabled = is_fluid_particles_density_enabled
|
||||
self.fluid_particle_density_average_mesh.enabled = is_fluid_particles_density_average_enabled
|
||||
self.fluid_particle_whitewater_proximity_mesh.enabled = is_fluid_particles_whitewater_proximity_enabled
|
||||
self.fluid_particle_source_id_mesh.enabled = is_fluid_particles_source_id_enabled
|
||||
self.fluid_particle_uid_mesh.enabled = is_fluid_particles_uid_enabled
|
||||
@@ -1201,6 +1230,7 @@ class DomainStatsProperties(bpy.types.PropertyGroup):
|
||||
self.surfacecolor_mesh.bytes.set(surfacecolor_bytes)
|
||||
self.surfacesourceid_mesh.bytes.set(surfacesourceid_bytes)
|
||||
self.surfaceviscosity_mesh.bytes.set(surfaceviscosity_bytes)
|
||||
self.surfacedensity_mesh.bytes.set(surfacedensity_bytes)
|
||||
self.foam_mesh.bytes.set(foam_bytes)
|
||||
self.bubble_mesh.bytes.set(bubble_bytes)
|
||||
self.spray_mesh.bytes.set(spray_bytes)
|
||||
@@ -1230,6 +1260,8 @@ class DomainStatsProperties(bpy.types.PropertyGroup):
|
||||
self.fluid_particle_age_mesh.bytes.set(fluid_particles_age_bytes)
|
||||
self.fluid_particle_lifetime_mesh.bytes.set(fluid_particles_lifetime_bytes)
|
||||
self.fluid_particle_viscosity_mesh.bytes.set(fluid_particles_viscosity_bytes)
|
||||
self.fluid_particle_density_mesh.bytes.set(fluid_particles_density_bytes)
|
||||
self.fluid_particle_density_average_mesh.bytes.set(fluid_particles_density_average_bytes)
|
||||
self.fluid_particle_whitewater_proximity_mesh.bytes.set(fluid_particles_whitewater_proximity_bytes)
|
||||
self.fluid_particle_source_id_mesh.bytes.set(fluid_particles_source_id_bytes)
|
||||
self.fluid_particle_uid_mesh.bytes.set(fluid_particles_uid_bytes)
|
||||
|
||||
+87
-106
@@ -30,17 +30,16 @@ from ..objects import flip_fluid_cache
|
||||
from ..utils import version_compatibility_utils as vcu
|
||||
|
||||
class DomainSurfaceProperties(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
|
||||
enable_surface_mesh_generation = BoolProperty(
|
||||
enable_surface_mesh_generation: BoolProperty(
|
||||
name="Enable Surface Mesh Generation",
|
||||
description="Enable the generation of the liquid surface mesh. If disabled, "
|
||||
"the surface mesh and any surface attributes will not be generated or exported"
|
||||
" to the simulation cache",
|
||||
default=True,
|
||||
update=lambda self, context: self._update_enable_surface_mesh_generation(context),
|
||||
); exec(conv("enable_surface_mesh_generation"))
|
||||
subdivisions = IntProperty(
|
||||
)
|
||||
subdivisions: IntProperty(
|
||||
name="Subdivisions",
|
||||
description="The level of detail of the generated surface mesh."
|
||||
" This value is the number of times that the simulation grid"
|
||||
@@ -51,88 +50,88 @@ class DomainSurfaceProperties(bpy.types.PropertyGroup):
|
||||
min=0,
|
||||
soft_max=2,
|
||||
default=1,
|
||||
); exec(conv("subdivisions"))
|
||||
compute_chunks_auto = IntProperty(
|
||||
)
|
||||
compute_chunks_auto: IntProperty(
|
||||
name="Compute Chunks",
|
||||
description="Number of chunks to break up mesh into during"
|
||||
" computation. Increase to reduce memory usage",
|
||||
min=1,
|
||||
default=1,
|
||||
); exec(conv("compute_chunks_auto"))
|
||||
compute_chunks_fixed = IntProperty(
|
||||
)
|
||||
compute_chunks_fixed: IntProperty(
|
||||
name="Compute Chunks",
|
||||
description="Number of chunks to break up surface into during"
|
||||
" mesh generation. Increase to reduce memory usage",
|
||||
min=1,
|
||||
default=1,
|
||||
); exec(conv("compute_chunks_fixed"))
|
||||
compute_chunk_mode = EnumProperty(
|
||||
)
|
||||
compute_chunk_mode: EnumProperty(
|
||||
name="Threading Mode",
|
||||
description="Determine the number of compute chunks to use when"
|
||||
" generating the surface mesh",
|
||||
items=types.surface_compute_chunk_modes,
|
||||
default='COMPUTE_CHUNK_MODE_AUTO',
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("compute_chunk_mode"))
|
||||
meshing_volume_mode = EnumProperty(
|
||||
)
|
||||
meshing_volume_mode: EnumProperty(
|
||||
name="Meshing Volume Mode",
|
||||
description="Determing which parts of the fluid will be meshed",
|
||||
items=types.meshing_volume_modes,
|
||||
default='MESHING_VOLUME_MODE_DOMAIN',
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("meshing_volume_mode"))
|
||||
meshing_volume_object = PointerProperty(
|
||||
)
|
||||
meshing_volume_object: PointerProperty(
|
||||
name="Meshing Object",
|
||||
description="Only fluid that is inside of this object will be meshed",
|
||||
type=bpy.types.Object,
|
||||
update=lambda self, context: self._update_meshing_volume_object(context),
|
||||
poll=lambda self, obj: self._poll_meshing_volume_object(obj),
|
||||
); exec(conv("meshing_volume_object"))
|
||||
export_animated_meshing_volume_object = BoolProperty(
|
||||
)
|
||||
export_animated_meshing_volume_object: BoolProperty(
|
||||
name="Export Animated Mesh",
|
||||
description="Export this mesh as an animated one (slower, only use"
|
||||
" if really necessary [e.g. armatures or parented objects],"
|
||||
" animated pos/rot/scale F-curves do not require it",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("export_animated_meshing_volume_object"))
|
||||
enable_meshing_offset = BoolProperty(
|
||||
)
|
||||
enable_meshing_offset: BoolProperty(
|
||||
name="Enable",
|
||||
description="Enable smooth meshing against obstacles. If disabled,"
|
||||
" obstacles will not be considered during meshing and all fluid"
|
||||
" particles will be converted to a mesh",
|
||||
default=True,
|
||||
); exec(conv("enable_meshing_offset"))
|
||||
obstacle_meshing_mode = EnumProperty(
|
||||
)
|
||||
obstacle_meshing_mode: EnumProperty(
|
||||
name="Obstacle Meshing Mode",
|
||||
description="How the fluid surface will be meshed against obstacles",
|
||||
items=types.obstacle_meshing_modes,
|
||||
default='MESHING_MODE_INSIDE_SURFACE',
|
||||
); exec(conv("obstacle_meshing_mode"))
|
||||
remove_mesh_near_domain = BoolProperty(
|
||||
)
|
||||
remove_mesh_near_domain: BoolProperty(
|
||||
name="Remove Mesh Near Boundary",
|
||||
description="Remove parts of the surface mesh that are near the"
|
||||
" domain boundary. If a meshing volume object is set, parts"
|
||||
" of the mesh that are near the volume object boundary will"
|
||||
" also be removed",
|
||||
default=False,
|
||||
); exec(conv("remove_mesh_near_domain"))
|
||||
remove_mesh_near_domain_distance = IntProperty(
|
||||
)
|
||||
remove_mesh_near_domain_distance: IntProperty(
|
||||
name="Distance",
|
||||
description="Distance from domain boundary to remove mesh parts."
|
||||
" This value is in number of voxels. If a meshing volume"
|
||||
" object is set, this distance will be limited to 1 voxel",
|
||||
min=1,
|
||||
default=1,
|
||||
); exec(conv("remove_mesh_near_domain_distance"))
|
||||
remove_mesh_near_domain_sides = BoolVectorProperty(
|
||||
)
|
||||
remove_mesh_near_domain_sides: BoolVectorProperty(
|
||||
name="",
|
||||
description="Remove mesh on the corresponding side of the domain."
|
||||
" If disabled, this side of the mesh will not be removed",
|
||||
default=(True, True, True, True, True, True),
|
||||
size=6,
|
||||
); exec(conv("remove_mesh_near_domain_sides"))
|
||||
smoothing_value = FloatProperty(
|
||||
)
|
||||
smoothing_value: FloatProperty(
|
||||
name="Factor",
|
||||
description="Amount of surface smoothing. Tip: use a smooth modifier"
|
||||
" to increase amount of smoothing",
|
||||
@@ -140,37 +139,37 @@ class DomainSurfaceProperties(bpy.types.PropertyGroup):
|
||||
default=0.5,
|
||||
precision=3,
|
||||
subtype='FACTOR',
|
||||
); exec(conv("smoothing_value"))
|
||||
smoothing_iterations = IntProperty(
|
||||
)
|
||||
smoothing_iterations: IntProperty(
|
||||
name="Repeat",
|
||||
description="Number of smoothing iterations Tip: use a smooth modifier"
|
||||
" to increase amount of iterations",
|
||||
min=0, max=30,
|
||||
default=2,
|
||||
); exec(conv("smoothing_iterations"))
|
||||
particle_scale = FloatProperty(
|
||||
)
|
||||
particle_scale: FloatProperty(
|
||||
name="Particle Scale",
|
||||
description = "Size of particles for mesh generation. A value less than 1.0"
|
||||
" is not recommended and may result in an incomplete mesh",
|
||||
soft_min=1.0, soft_max=3.0,
|
||||
default=1.0,
|
||||
precision=2,
|
||||
); exec(conv("particle_scale"))
|
||||
invert_contact_normals = BoolProperty(
|
||||
)
|
||||
invert_contact_normals: BoolProperty(
|
||||
name="Invert Fluid-Obstacle Contact Normals",
|
||||
description="Invert surface mesh normals that contact obstacle"
|
||||
" surfaces. Enable for correct refraction rendering with"
|
||||
" water-glass interfaces. Note: 'Mesh Around Obstacles'"
|
||||
" should be enabled when using this feature",
|
||||
default=False,
|
||||
); exec(conv("invert_contact_normals"))
|
||||
generate_motion_blur_data = BoolProperty(
|
||||
)
|
||||
generate_motion_blur_data: BoolProperty(
|
||||
name="Generate Motion Blur Vectors",
|
||||
description="Generate fluid surface speed vectors for motion blur"
|
||||
" rendering. See documentation for limitations",
|
||||
default=False,
|
||||
); exec(conv("generate_motion_blur_data"))
|
||||
enable_velocity_vector_attribute = BoolProperty(
|
||||
)
|
||||
enable_velocity_vector_attribute: BoolProperty(
|
||||
name="Generate Velocity Attributes",
|
||||
description="Generate fluid 3D velocity vector attributes for the fluid surface. After"
|
||||
" baking, the velocity vectors (in m/s) can be accessed in a Cycles Attribute"
|
||||
@@ -179,8 +178,8 @@ class DomainSurfaceProperties(bpy.types.PropertyGroup):
|
||||
" direction is not needed, use Generate Speed Attributes instead",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("enable_velocity_vector_attribute"))
|
||||
enable_velocity_vector_attribute_against_obstacles = BoolProperty(
|
||||
)
|
||||
enable_velocity_vector_attribute_against_obstacles: BoolProperty(
|
||||
name="Generate Against Obstacles",
|
||||
description="Generate velocity-based attribute data against obstacles."
|
||||
" Velocity-based attributes are the velocity/speed/vorticity attributes."
|
||||
@@ -192,24 +191,24 @@ class DomainSurfaceProperties(bpy.types.PropertyGroup):
|
||||
" in the render",
|
||||
default=True,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("enable_velocity_vector_attribute_against_obstacles"))
|
||||
enable_speed_attribute = BoolProperty(
|
||||
)
|
||||
enable_speed_attribute: BoolProperty(
|
||||
name="Generate Speed Attributes",
|
||||
description="Generate fluid speed attributes for the fluid surface. After"
|
||||
" baking, the speed values (in m/s) can be accessed in a Cycles Attribute"
|
||||
" Node or in Geometry Nodes with the name 'flip_speed' from the Fac output",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("enable_speed_attribute"))
|
||||
enable_vorticity_vector_attribute = BoolProperty(
|
||||
)
|
||||
enable_vorticity_vector_attribute: BoolProperty(
|
||||
name="Generate Vorticity Attributes",
|
||||
description="Generate fluid 3D vorticity vector attributes for the fluid surface. After"
|
||||
" baking, the vorticity vectors can be accessed in a Cycles Attribute"
|
||||
" Node or in Geometry Nodes with the name 'flip_vorticity' from the Vector output",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("enable_vorticity_vector_attribute"))
|
||||
enable_age_attribute = BoolProperty(
|
||||
)
|
||||
enable_age_attribute: BoolProperty(
|
||||
name="Generate Age Attributes",
|
||||
description="Generate fluid age attributes for the fluid surface."
|
||||
" The age attribute starts at 0.0 when the liquid is spawned and counts up in"
|
||||
@@ -217,8 +216,8 @@ class DomainSurfaceProperties(bpy.types.PropertyGroup):
|
||||
" Node or in Geometry Nodes with the name 'flip_age' from the Fac output",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("enable_age_attribute"))
|
||||
age_attribute_radius = FloatProperty(
|
||||
)
|
||||
age_attribute_radius: FloatProperty(
|
||||
name="Smoothing Radius",
|
||||
description = "Amount of smoothing when transferring the age attribute to the surface mesh."
|
||||
" Higher values result in smoother attribute transitions at the cost of simulation"
|
||||
@@ -227,8 +226,8 @@ class DomainSurfaceProperties(bpy.types.PropertyGroup):
|
||||
min=0.0,
|
||||
default=3.0,
|
||||
precision=1,
|
||||
); exec(conv("age_attribute_radius"))
|
||||
enable_lifetime_attribute = BoolProperty(
|
||||
)
|
||||
enable_lifetime_attribute: BoolProperty(
|
||||
name="Generate Lifetime Attributes",
|
||||
description="Generate fluid lifetime attributes for the fluid surface. This attribute allows the"
|
||||
" fluid to start with a lifetime value that counts down in seconds and once the lifetime reaches 0,"
|
||||
@@ -238,8 +237,8 @@ class DomainSurfaceProperties(bpy.types.PropertyGroup):
|
||||
" the Fac output",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("enable_lifetime_attribute"))
|
||||
lifetime_attribute_radius = FloatProperty(
|
||||
)
|
||||
lifetime_attribute_radius: FloatProperty(
|
||||
name="Smoothing Radius",
|
||||
description = "Amount of smoothing when transferring the lifetime attribute to the surface mesh."
|
||||
" Higher values result in smoother attribute transitions at the cost of simulation"
|
||||
@@ -248,8 +247,8 @@ class DomainSurfaceProperties(bpy.types.PropertyGroup):
|
||||
min=0.0,
|
||||
default=3.0,
|
||||
precision=1,
|
||||
); exec(conv("lifetime_attribute_radius"))
|
||||
lifetime_attribute_death_time = FloatProperty(
|
||||
)
|
||||
lifetime_attribute_death_time: FloatProperty(
|
||||
name="Base Death Time",
|
||||
description = "Base time in seconds at which fluid is removed from the simulation. At the default of 0.0,"
|
||||
" fluid will be removed when their lifetime attribute counts down to 0.0. Increase or decrease this"
|
||||
@@ -257,8 +256,8 @@ class DomainSurfaceProperties(bpy.types.PropertyGroup):
|
||||
" Decreasing will result in fluid dying later",
|
||||
default=0.0,
|
||||
precision=2,
|
||||
); exec(conv("lifetime_attribute_death_time"))
|
||||
enable_whitewater_proximity_attribute = BoolProperty(
|
||||
)
|
||||
enable_whitewater_proximity_attribute: BoolProperty(
|
||||
name="Whitewater Proximity Attributes",
|
||||
description="Generate whitewater proximity attributes for the fluid surface. The attribute values represent"
|
||||
" how many foam, bubble, or spray particles are near the surface mesh and can be used in a material to shade"
|
||||
@@ -267,8 +266,8 @@ class DomainSurfaceProperties(bpy.types.PropertyGroup):
|
||||
" and 'flip_spray_proximity' from the Fac output",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("enable_whitewater_proximity_attribute"))
|
||||
whitewater_proximity_attribute_radius = FloatProperty(
|
||||
)
|
||||
whitewater_proximity_attribute_radius: FloatProperty(
|
||||
name="Smoothing Radius",
|
||||
description = "Amount of smoothing when transferring the whitewater proximity attribute to the surface mesh."
|
||||
" Higher values result in smoother attribute transitions at the cost of simulation"
|
||||
@@ -277,8 +276,8 @@ class DomainSurfaceProperties(bpy.types.PropertyGroup):
|
||||
min=0.0,
|
||||
default=2.0,
|
||||
precision=1,
|
||||
); exec(conv("whitewater_proximity_attribute_radius"))
|
||||
enable_color_attribute = BoolProperty(
|
||||
)
|
||||
enable_color_attribute: BoolProperty(
|
||||
name="Generate Color Attributes",
|
||||
description="Generate fluid color attributes for the fluid surface. Each"
|
||||
" Inflow/Fluid object can set to assign color to the generated fluid. After"
|
||||
@@ -287,8 +286,8 @@ class DomainSurfaceProperties(bpy.types.PropertyGroup):
|
||||
" liquid effects",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("enable_color_attribute"))
|
||||
color_attribute_radius = FloatProperty(
|
||||
)
|
||||
color_attribute_radius: FloatProperty(
|
||||
name="Smoothing Radius",
|
||||
description = "Amount of smoothing when transferring the color attribute to the surface mesh."
|
||||
" Higher values result in smoother attribute transitions at the cost of simulation"
|
||||
@@ -297,14 +296,14 @@ class DomainSurfaceProperties(bpy.types.PropertyGroup):
|
||||
min=0.0,
|
||||
default=3.0,
|
||||
precision=1,
|
||||
); exec(conv("color_attribute_radius"))
|
||||
enable_color_attribute_mixing = BoolProperty(
|
||||
)
|
||||
enable_color_attribute_mixing: BoolProperty(
|
||||
name="Enable Mixing",
|
||||
description="Simulate basic color mixing. If enabled, particles will absorb color attributes"
|
||||
" from nearby particles. If disabled, particles will hold a static color value",
|
||||
default=False,
|
||||
); exec(conv("enable_color_attribute_mixing"))
|
||||
color_attribute_mixing_rate = FloatProperty(
|
||||
)
|
||||
color_attribute_mixing_rate: FloatProperty(
|
||||
name="Mixing Rate",
|
||||
description = "Controls how quickly particles will absorb color from nearby particles. Higher"
|
||||
" values will cause colors to mix and spread more quickly. Lower values will cause colors to"
|
||||
@@ -313,8 +312,8 @@ class DomainSurfaceProperties(bpy.types.PropertyGroup):
|
||||
min=0.0,
|
||||
default=12,
|
||||
precision=2,
|
||||
); exec(conv("color_attribute_mixing_rate"))
|
||||
color_attribute_mixing_radius = FloatProperty(
|
||||
)
|
||||
color_attribute_mixing_radius: FloatProperty(
|
||||
name="Mixing Radius",
|
||||
description = "Radius in which a particle can absorb color from nearby particles. Increasing"
|
||||
" this value can result in smoother mixing transitions at the cost of simulation performance."
|
||||
@@ -323,15 +322,15 @@ class DomainSurfaceProperties(bpy.types.PropertyGroup):
|
||||
min=0.0,
|
||||
default=1.0,
|
||||
precision=2,
|
||||
); exec(conv("color_attribute_mixing_radius"))
|
||||
color_attribute_mixing_mode = EnumProperty(
|
||||
)
|
||||
color_attribute_mixing_mode: EnumProperty(
|
||||
name="Mixing Mode",
|
||||
description="Method of simulating color attribute mixing",
|
||||
items=types.color_mixing_modes,
|
||||
default='COLOR_MIXING_MODE_MIXBOX',
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("color_attribute_mixing_mode"))
|
||||
enable_source_id_attribute = BoolProperty(
|
||||
)
|
||||
enable_source_id_attribute: BoolProperty(
|
||||
name="Generate Source ID Attributes",
|
||||
description="Generate fluid source identifiers for the fluid surface. Each"
|
||||
" Inflow/Fluid object can set to assign a source ID to the generated fluid. After"
|
||||
@@ -341,43 +340,33 @@ class DomainSurfaceProperties(bpy.types.PropertyGroup):
|
||||
" not supported with sheeting effects or resolution upscaling features",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("enable_source_id_attribute"))
|
||||
enable_viscosity_attribute = BoolProperty(
|
||||
)
|
||||
enable_viscosity_attribute: BoolProperty(
|
||||
name="Enable Variable Viscosity",
|
||||
description="Enable the variable viscosity solver for mixed viscosity simulations."
|
||||
" After enabling, each Fluid/Inflow object can be set to assign a viscosity value"
|
||||
" to the generated fluid. When enabled, viscosity value attributes will also"
|
||||
" be generated for the fluid surface. After baking, the viscosity values can"
|
||||
" be generated for the fluid surface and fluid particles. After baking, the viscosity values can"
|
||||
" be accessed in a Cycles Attribute Node with the name 'flip_viscosity' from"
|
||||
" the Fac output",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("enable_viscosity_attribute"))
|
||||
)
|
||||
|
||||
native_particle_scale = FloatProperty(default=3.0); exec(conv("native_particle_scale"))
|
||||
default_cells_per_compute_chunk = FloatProperty(default=15.0); exec(conv("default_cells_per_compute_chunk")) # in millions
|
||||
native_particle_scale: FloatProperty(default=3.0)
|
||||
default_cells_per_compute_chunk: FloatProperty(default=15.0) # in millions
|
||||
|
||||
surface_mesh_expanded = BoolProperty(default=True); exec(conv("surface_mesh_expanded"))
|
||||
meshing_volume_expanded = BoolProperty(default=False); exec(conv("meshing_volume_expanded"))
|
||||
meshing_against_boundary_expanded = BoolProperty(default=False); exec(conv("meshing_against_boundary_expanded"))
|
||||
meshing_against_obstacles_expanded = BoolProperty(default=False); exec(conv("meshing_against_obstacles_expanded"))
|
||||
surface_display_settings_expanded = BoolProperty(default=False); exec(conv("surface_display_settings_expanded"))
|
||||
geometry_attributes_expanded = BoolProperty(default=False); exec(conv("geometry_attributes_expanded"))
|
||||
velocity_attributes_expanded = BoolProperty(default=False); exec(conv("velocity_attributes_expanded"))
|
||||
color_attributes_expanded = BoolProperty(default=False); exec(conv("color_attributes_expanded"))
|
||||
other_attributes_expanded = BoolProperty(default=False); exec(conv("other_attributes_expanded"))
|
||||
show_smoothing_radius_in_ui: BoolProperty(default=False)
|
||||
is_smoothing_radius_updated_to_default: BoolProperty(default=False)
|
||||
|
||||
show_smoothing_radius_in_ui = BoolProperty(default=False); exec(conv("show_smoothing_radius_in_ui"))
|
||||
is_smoothing_radius_updated_to_default = BoolProperty(default=False); exec(conv("is_smoothing_radius_updated_to_default"))
|
||||
|
||||
preview_mode_attributes_tooltip = BoolProperty(
|
||||
preview_mode_attributes_tooltip: BoolProperty(
|
||||
name="Preview Mode Attributes Tooltip",
|
||||
description="The fluid surface mesh is currently set to Preview Mode within the viewport and attributes"
|
||||
" will not be loaded. Attributes will not be displayed correctly in viewport render mode."
|
||||
" Surface attributes will only be loaded in Final Mode. The surface mesh display"
|
||||
" mode can be set in the 'Domain > Display Settings' panel",
|
||||
default=True,
|
||||
); exec(conv("preview_mode_attributes_tooltip"))
|
||||
)
|
||||
|
||||
|
||||
def register_preset_properties(self, registry, path):
|
||||
@@ -511,20 +500,12 @@ class DomainSurfaceProperties(bpy.types.PropertyGroup):
|
||||
|
||||
try:
|
||||
# Cycles may not be enabled in the user's preferences
|
||||
if vcu.is_blender_30():
|
||||
obj.visible_camera = is_enabled
|
||||
obj.visible_diffuse = is_enabled
|
||||
obj.visible_glossy = is_enabled
|
||||
obj.visible_transmission = is_enabled
|
||||
obj.visible_volume_scatter = is_enabled
|
||||
obj.visible_shadow = is_enabled
|
||||
else:
|
||||
obj.cycles_visibility.camera = is_enabled
|
||||
obj.cycles_visibility.transmission = is_enabled
|
||||
obj.cycles_visibility.diffuse = is_enabled
|
||||
obj.cycles_visibility.scatter = is_enabled
|
||||
obj.cycles_visibility.glossy = is_enabled
|
||||
obj.cycles_visibility.shadow = is_enabled
|
||||
obj.visible_camera = is_enabled
|
||||
obj.visible_diffuse = is_enabled
|
||||
obj.visible_glossy = is_enabled
|
||||
obj.visible_transmission = is_enabled
|
||||
obj.visible_volume_scatter = is_enabled
|
||||
obj.visible_shadow = is_enabled
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
+106
-116
@@ -33,35 +33,34 @@ from ..objects import flip_fluid_cache
|
||||
|
||||
|
||||
class DomainWhitewaterProperties(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
|
||||
whitewater_ui_mode = EnumProperty(
|
||||
whitewater_ui_mode: EnumProperty(
|
||||
name="Whitewater UI Mode",
|
||||
description="Whitewater UI mode",
|
||||
items=types.whitewater_ui_modes,
|
||||
default='WHITEWATER_UI_MODE_BASIC',
|
||||
); exec(conv("whitewater_ui_mode"))
|
||||
highlight_advanced_settings = BoolProperty(
|
||||
)
|
||||
highlight_advanced_settings: BoolProperty(
|
||||
name="Highlight Advanced Settings",
|
||||
description="Highlight advanced parameters in red",
|
||||
default=True,
|
||||
); exec(conv("highlight_advanced_settings"))
|
||||
enable_whitewater_simulation = BoolProperty(
|
||||
)
|
||||
enable_whitewater_simulation: BoolProperty(
|
||||
name="Enable Whitewater Simulation",
|
||||
description="Enable whitewater foam/bubble/spray particle solver",
|
||||
default=False,
|
||||
update=lambda self, context: self._update_enable_whitewater_simulation(context),
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("enable_whitewater_simulation"))
|
||||
enable_foam = BoolProperty(
|
||||
)
|
||||
enable_foam: BoolProperty(
|
||||
name="Foam",
|
||||
description="Enable solving for foam particles. Foam particles form"
|
||||
" a layer on the fluid surface and are advected with the fluid"
|
||||
" velocity. If disabled, any particles that enter the foam layer"
|
||||
" will be destroyed",
|
||||
default=True,
|
||||
); exec(conv("enable_foam"))
|
||||
enable_bubbles = BoolProperty(
|
||||
)
|
||||
enable_bubbles: BoolProperty(
|
||||
name = "Bubbles",
|
||||
description="Enable solving for bubble particles. Bubble particles"
|
||||
" below the foam layer are advected with the fluid velocity and"
|
||||
@@ -70,30 +69,30 @@ class DomainWhitewaterProperties(bpy.types.PropertyGroup):
|
||||
" particles are a large contributor to the foam layer and"
|
||||
" disabling may severely limit the amount of generated foam",
|
||||
default=True,
|
||||
); exec(conv("enable_bubbles"))
|
||||
enable_spray = BoolProperty(
|
||||
)
|
||||
enable_spray: BoolProperty(
|
||||
name="Spray",
|
||||
description="Enable solving for spray particles. Spray particles"
|
||||
" above the foam layer are simulated ballistically with"
|
||||
" gravity. If disabled, any particles that move above the foam"
|
||||
" layer will be destroyed",
|
||||
default=True,
|
||||
); exec(conv("enable_spray"))
|
||||
enable_dust = BoolProperty(
|
||||
)
|
||||
enable_dust: BoolProperty(
|
||||
name="Dust",
|
||||
description="Enable solving for dust particles. Dust particles are"
|
||||
" generated near obstacle surfaces and are advected with the"
|
||||
" fluid velocity while sinking towards the ground. If disabled,"
|
||||
" these particles will not be generated",
|
||||
default=False,
|
||||
); exec(conv("enable_dust"))
|
||||
generate_whitewater_motion_blur_data = BoolProperty(
|
||||
)
|
||||
generate_whitewater_motion_blur_data: BoolProperty(
|
||||
name="Generate Motion Blur Vectors",
|
||||
description="Generate whitewater speed vectors for motion blur"
|
||||
" rendering",
|
||||
default=False,
|
||||
); exec(conv("generate_whitewater_motion_blur_data"))
|
||||
enable_velocity_vector_attribute = BoolProperty(
|
||||
)
|
||||
enable_velocity_vector_attribute: BoolProperty(
|
||||
name="Generate Velocity Attributes",
|
||||
description="Generate fluid 3D velocity vector attributes for whitewater particles. After"
|
||||
" baking, the velocity vectors (in m/s) can be accessed in a Cycles Attribute"
|
||||
@@ -101,8 +100,8 @@ class DomainWhitewaterProperties(bpy.types.PropertyGroup):
|
||||
" instanced particles, only supported on pointclouds",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("enable_velocity_vector_attribute"))
|
||||
enable_id_attribute = BoolProperty(
|
||||
)
|
||||
enable_id_attribute: BoolProperty(
|
||||
name="Generate ID Attributes",
|
||||
description="Generate stable ID attributes for whitewater particles. After"
|
||||
" baking, the ID values can be accessed in a Cycles Attribute"
|
||||
@@ -111,8 +110,8 @@ class DomainWhitewaterProperties(bpy.types.PropertyGroup):
|
||||
" size or color. Not supported on instanced particles, only supported on pointclouds",
|
||||
default=True,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("enable_id_attribute"))
|
||||
enable_lifetime_attribute = BoolProperty(
|
||||
)
|
||||
enable_lifetime_attribute: BoolProperty(
|
||||
name="Generate Lifetime Attributes",
|
||||
description="Generate remaining lifetime attributes for whitewater particles. After"
|
||||
" baking, the lifetime values can be accessed in a Cycles Attribute Node or in"
|
||||
@@ -121,21 +120,21 @@ class DomainWhitewaterProperties(bpy.types.PropertyGroup):
|
||||
" only supported on pointclouds",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("enable_lifetime_attribute"))
|
||||
enable_whitewater_emission = bpy.props.BoolProperty(
|
||||
)
|
||||
enable_whitewater_emission: bpy.props.BoolProperty(
|
||||
name="Enable Whitewater Emission",
|
||||
description="Allow whitewater emitters to generate new particles",
|
||||
default=True,
|
||||
); exec(conv("enable_whitewater_emission"))
|
||||
whitewater_emitter_generation_rate = IntProperty(
|
||||
)
|
||||
whitewater_emitter_generation_rate: IntProperty(
|
||||
name="Emitter Generation Rate (Percent)",
|
||||
description="Controls how many whitewater emitters are generated."
|
||||
" Emitters are generated at wavecrests and in areas high"
|
||||
" turbulence where fluid is likely to be aerated",
|
||||
min=0, max=100,
|
||||
default=100,
|
||||
); exec(conv("whitewater_emitter_generation_rate"))
|
||||
wavecrest_emission_rate = FloatProperty(
|
||||
)
|
||||
wavecrest_emission_rate: FloatProperty(
|
||||
name="Max Wavecrest Emission Rate",
|
||||
description="Maximum number of whitewater particles that a"
|
||||
" single wavecrest emitter may generate per simulation second",
|
||||
@@ -143,8 +142,8 @@ class DomainWhitewaterProperties(bpy.types.PropertyGroup):
|
||||
default=175,
|
||||
step=30,
|
||||
precision=0,
|
||||
); exec(conv("wavecrest_emission_rate"))
|
||||
turbulence_emission_rate = FloatProperty(
|
||||
)
|
||||
turbulence_emission_rate: FloatProperty(
|
||||
name="Max Turbulence Emission Rate",
|
||||
description="Maximum number of whitewater particles that a"
|
||||
" single turbulence emitter may generate per simulation second",
|
||||
@@ -152,8 +151,8 @@ class DomainWhitewaterProperties(bpy.types.PropertyGroup):
|
||||
default=175,
|
||||
step=30,
|
||||
precision=0,
|
||||
); exec(conv("turbulence_emission_rate"))
|
||||
dust_emission_rate = FloatProperty(
|
||||
)
|
||||
dust_emission_rate: FloatProperty(
|
||||
name="Max Dust Emission Rate",
|
||||
description="Maximum number of dust particles that a"
|
||||
" single dust emitter may generate per simulation second",
|
||||
@@ -161,16 +160,16 @@ class DomainWhitewaterProperties(bpy.types.PropertyGroup):
|
||||
default=175,
|
||||
step=30,
|
||||
precision=0,
|
||||
); exec(conv("dust_emission_rate"))
|
||||
spray_emission_speed = FloatProperty(
|
||||
)
|
||||
spray_emission_speed: FloatProperty(
|
||||
name="Spray Emission Speed",
|
||||
description="Speed scaling factor for spray particle emission. Increasing"
|
||||
" this value will generate more spread out and exaggerated spray effects",
|
||||
min=0.0, soft_min=1.0,
|
||||
soft_max=3.0,
|
||||
default=1.2,
|
||||
); exec(conv("spray_emission_speed"))
|
||||
min_max_whitewater_energy_speed = NewMinMaxFloatProperty(
|
||||
)
|
||||
min_max_whitewater_energy_speed: NewMinMaxFloatProperty(
|
||||
name_min="Min Energy Speed",
|
||||
description_min="Fluid with speed less than this value will generate"
|
||||
" no whitewater",
|
||||
@@ -185,8 +184,8 @@ class DomainWhitewaterProperties(bpy.types.PropertyGroup):
|
||||
min_max=0,
|
||||
default_max=3.0,
|
||||
precision_max=2,
|
||||
); exec(conv("min_max_whitewater_energy_speed"))
|
||||
min_max_whitewater_wavecrest_curvature = NewMinMaxFloatProperty(
|
||||
)
|
||||
min_max_whitewater_wavecrest_curvature: NewMinMaxFloatProperty(
|
||||
name_min="Min Curvature",
|
||||
description_min="Wavecrests with curvature less than this value will"
|
||||
" generate no whitewater. This value rarely needs to be changed",
|
||||
@@ -202,8 +201,8 @@ class DomainWhitewaterProperties(bpy.types.PropertyGroup):
|
||||
min_max=0.0, max_max=5.0,
|
||||
default_max=1.0,
|
||||
precision_max=2,
|
||||
); exec(conv("min_max_whitewater_wavecrest_curvature"))
|
||||
min_max_whitewater_turbulence = NewMinMaxFloatProperty(
|
||||
)
|
||||
min_max_whitewater_turbulence: NewMinMaxFloatProperty(
|
||||
name_min="Min Turbulence",
|
||||
description_min="Fluid with turbulence less than this value will"
|
||||
" generate no whitewater. This value rarely needs to be changed",
|
||||
@@ -219,8 +218,8 @@ class DomainWhitewaterProperties(bpy.types.PropertyGroup):
|
||||
min_max=0,
|
||||
default_max=200,
|
||||
precision_max=0,
|
||||
); exec(conv("min_max_whitewater_turbulence"))
|
||||
max_whitewater_particles = FloatProperty(
|
||||
)
|
||||
max_whitewater_particles: FloatProperty(
|
||||
name="Max Particles (in millions)",
|
||||
description="Maximum number of whitewater particles (in millions)"
|
||||
" to simulate. The solver will stop generating new whitewater"
|
||||
@@ -231,20 +230,20 @@ class DomainWhitewaterProperties(bpy.types.PropertyGroup):
|
||||
min=0, max=357,
|
||||
default=12,
|
||||
precision=2,
|
||||
); exec(conv("max_whitewater_particles"))
|
||||
enable_whitewater_emission_near_boundary = BoolProperty(
|
||||
)
|
||||
enable_whitewater_emission_near_boundary: BoolProperty(
|
||||
name="Enable Emission Near Domain Boundary",
|
||||
description="Allow whitewater emitters to generate particles at"
|
||||
" the domain boundary",
|
||||
default=False,
|
||||
); exec(conv("enable_whitewater_emission_near_boundary"))
|
||||
enable_dust_emission_near_boundary = BoolProperty(
|
||||
)
|
||||
enable_dust_emission_near_boundary: BoolProperty(
|
||||
name="Enable Dust Emission Near Domain Boundary",
|
||||
description="Allow whitewater emitters to generate dust particles near"
|
||||
" the domain floor",
|
||||
default=False,
|
||||
); exec(conv("enable_dust_emission_near_boundary"))
|
||||
min_max_whitewater_lifespan = NewMinMaxFloatProperty(
|
||||
)
|
||||
min_max_whitewater_lifespan: NewMinMaxFloatProperty(
|
||||
name_min="Min Lifespan",
|
||||
description_min="Minimum whitewater particle lifespan in seconds",
|
||||
min_min=0.0,
|
||||
@@ -256,44 +255,44 @@ class DomainWhitewaterProperties(bpy.types.PropertyGroup):
|
||||
min_max=0.0,
|
||||
default_max=6.0,
|
||||
precision_max=2,
|
||||
); exec(conv("min_max_whitewater_lifespan"))
|
||||
whitewater_lifespan_variance = FloatProperty(
|
||||
)
|
||||
whitewater_lifespan_variance: FloatProperty(
|
||||
name="Lifespan Variance",
|
||||
description ="A random number of seconds in this range will be added"
|
||||
" or subtracted from the whitewater particle lifespan",
|
||||
min=0.0,
|
||||
default=3.0,
|
||||
precision=2,
|
||||
); exec(conv("whitewater_lifespan_variance"))
|
||||
foam_lifespan_modifier = FloatProperty(
|
||||
)
|
||||
foam_lifespan_modifier: FloatProperty(
|
||||
name="Foam Lifespan Modifier",
|
||||
description="Multiply the lifespan of a foam particle by this value",
|
||||
min=0.0,
|
||||
default=1.0,
|
||||
precision=1,
|
||||
); exec(conv("foam_lifespan_modifier"))
|
||||
bubble_lifespan_modifier = FloatProperty(
|
||||
)
|
||||
bubble_lifespan_modifier: FloatProperty(
|
||||
name="Bubble Lifespan Modifier",
|
||||
description="Multiply the lifespan of a bubble particle by this value",
|
||||
min=0.0,
|
||||
default=4.0,
|
||||
precision=1,
|
||||
); exec(conv("bubble_lifespan_modifier"))
|
||||
spray_lifespan_modifier = FloatProperty(
|
||||
)
|
||||
spray_lifespan_modifier: FloatProperty(
|
||||
name="Spray Lifespan Modifier",
|
||||
description="Multiply the lifespan of a spray particle by this value",
|
||||
min=0.0,
|
||||
default=5.0,
|
||||
precision=1,
|
||||
); exec(conv("spray_lifespan_modifier"))
|
||||
dust_lifespan_modifier = FloatProperty(
|
||||
)
|
||||
dust_lifespan_modifier: FloatProperty(
|
||||
name="Dust Lifespan Modifier",
|
||||
description="Multiply the lifespan of a dust particle by this value",
|
||||
min=0.0,
|
||||
default=2.0,
|
||||
precision=1,
|
||||
); exec(conv("dust_lifespan_modifier"))
|
||||
foam_advection_strength = FloatProperty(
|
||||
)
|
||||
foam_advection_strength: FloatProperty(
|
||||
name="Foam Advection Strength",
|
||||
description="Controls how much the foam moves along with the motion"
|
||||
" of the fluid surface. High values cause tighter streaks of"
|
||||
@@ -303,8 +302,8 @@ class DomainWhitewaterProperties(bpy.types.PropertyGroup):
|
||||
default=1.0,
|
||||
precision=2,
|
||||
subtype='FACTOR',
|
||||
); exec(conv("foam_advection_strength"))
|
||||
foam_layer_depth = FloatProperty(
|
||||
)
|
||||
foam_layer_depth: FloatProperty(
|
||||
name="Foam Layer Depth",
|
||||
description="Set the thickness of the whitewater foam layer",
|
||||
min=0.0,
|
||||
@@ -312,8 +311,8 @@ class DomainWhitewaterProperties(bpy.types.PropertyGroup):
|
||||
default=0.4,
|
||||
precision=2,
|
||||
subtype='FACTOR',
|
||||
); exec(conv("foam_layer_depth"))
|
||||
foam_layer_offset = FloatProperty(
|
||||
)
|
||||
foam_layer_offset: FloatProperty(
|
||||
name="Foam Layer Offset",
|
||||
description="Set the offset of the whitewater foam layer above/below"
|
||||
" the fluid surface. If set to a value of 1, the foam layer will"
|
||||
@@ -324,15 +323,15 @@ class DomainWhitewaterProperties(bpy.types.PropertyGroup):
|
||||
default=0.25,
|
||||
precision=2,
|
||||
subtype='FACTOR',
|
||||
); exec(conv("foam_layer_offset"))
|
||||
preserve_foam = BoolProperty(
|
||||
)
|
||||
preserve_foam: BoolProperty(
|
||||
name="Preserve Foam",
|
||||
description="Increase the lifespan of foam particles based on the"
|
||||
" local density of foam particles, which can help create clumps"
|
||||
" and streaks of foam on the liquid surface over time",
|
||||
default=True,
|
||||
); exec(conv("preserve_foam"))
|
||||
foam_preservation_rate = FloatProperty(
|
||||
)
|
||||
foam_preservation_rate: FloatProperty(
|
||||
name="Foam Preservation Rate",
|
||||
description="Rate to add to the lifetime of preserved foam. This"
|
||||
" value is the number of seconds to add per second, so if"
|
||||
@@ -340,8 +339,8 @@ class DomainWhitewaterProperties(bpy.types.PropertyGroup):
|
||||
" clumps from every being killed",
|
||||
default=0.75,
|
||||
precision=2,
|
||||
); exec(conv("foam_preservation_rate"))
|
||||
min_max_foam_density = NewMinMaxIntProperty(
|
||||
)
|
||||
min_max_foam_density: NewMinMaxIntProperty(
|
||||
name_min="Min Foam Density",
|
||||
description_min="Foam densities less than this value will not increase"
|
||||
" the lifetime of a foam particle. Foam density units are in"
|
||||
@@ -356,8 +355,8 @@ class DomainWhitewaterProperties(bpy.types.PropertyGroup):
|
||||
" density units are in number of particles per voxel",
|
||||
min_max=0,
|
||||
default_max=45,
|
||||
); exec(conv("min_max_foam_density"))
|
||||
bubble_drag_coefficient = FloatProperty(
|
||||
)
|
||||
bubble_drag_coefficient: FloatProperty(
|
||||
name="Bubble Drag Coefficient",
|
||||
description="Controls how quickly bubble particles are dragged with"
|
||||
" the fluid velocity. If set to 1, bubble particles will be"
|
||||
@@ -366,8 +365,8 @@ class DomainWhitewaterProperties(bpy.types.PropertyGroup):
|
||||
default=0.8,
|
||||
precision=2,
|
||||
subtype='FACTOR',
|
||||
); exec(conv("bubble_drag_coefficient"))
|
||||
bubble_bouyancy_coefficient = FloatProperty(
|
||||
)
|
||||
bubble_bouyancy_coefficient: FloatProperty(
|
||||
name="Bubble Buoyancy Coefficient",
|
||||
description="Controls how quickly bubble particles float towards"
|
||||
" the fluid surface. If set to a negative value, bubbles will"
|
||||
@@ -375,15 +374,15 @@ class DomainWhitewaterProperties(bpy.types.PropertyGroup):
|
||||
default=2.5,
|
||||
precision=2,
|
||||
step=0.3,
|
||||
); exec(conv("bubble_bouyancy_coefficient"))
|
||||
spray_drag_coefficient = FloatProperty(
|
||||
)
|
||||
spray_drag_coefficient: FloatProperty(
|
||||
name="Spray Drag Coefficient",
|
||||
description="Controls amount of air resistance on a spray particle",
|
||||
min=0.0, max=5.0,
|
||||
default=3.0,
|
||||
precision=2,
|
||||
); exec(conv("spray_drag_coefficient"))
|
||||
dust_drag_coefficient = FloatProperty(
|
||||
)
|
||||
dust_drag_coefficient: FloatProperty(
|
||||
name="Dust Drag Coefficient",
|
||||
description="Controls how quickly dust particles are dragged with"
|
||||
" the fluid velocity. If set to 1, dust particles will be"
|
||||
@@ -392,8 +391,8 @@ class DomainWhitewaterProperties(bpy.types.PropertyGroup):
|
||||
default=0.75,
|
||||
precision=2,
|
||||
subtype='FACTOR',
|
||||
); exec(conv("dust_drag_coefficient"))
|
||||
dust_bouyancy_coefficient = FloatProperty(
|
||||
)
|
||||
dust_bouyancy_coefficient: FloatProperty(
|
||||
name="Dust Buoyancy Coefficient",
|
||||
description="Controls how quickly dust particles sink towards"
|
||||
" the ground. Decreasing this value will cause particles to sink"
|
||||
@@ -402,86 +401,86 @@ class DomainWhitewaterProperties(bpy.types.PropertyGroup):
|
||||
default=-3.0,
|
||||
precision=2,
|
||||
step=0.3,
|
||||
); exec(conv("dust_bouyancy_coefficient"))
|
||||
foam_boundary_behaviour = EnumProperty(
|
||||
)
|
||||
foam_boundary_behaviour: EnumProperty(
|
||||
name="Foam Behaviour At Limits",
|
||||
description="Specifies the foam particle behavior when hitting the"
|
||||
" domain boundary",
|
||||
items=types.boundary_behaviours,
|
||||
default='BEHAVIOUR_COLLIDE',
|
||||
); exec(conv("foam_boundary_behaviour"))
|
||||
bubble_boundary_behaviour = EnumProperty(
|
||||
)
|
||||
bubble_boundary_behaviour: EnumProperty(
|
||||
name="Bubble Behaviour At Limits",
|
||||
description="Specifies the bubble particle behavior when hitting"
|
||||
" the domain boundary",
|
||||
items=types.boundary_behaviours,
|
||||
default='BEHAVIOUR_COLLIDE',
|
||||
); exec(conv("bubble_boundary_behaviour"))
|
||||
spray_boundary_behaviour = EnumProperty(
|
||||
)
|
||||
spray_boundary_behaviour: EnumProperty(
|
||||
name="Spray Behaviour At Limits",
|
||||
description="Specifies the spray particle behavior when hitting the"
|
||||
" domain boundary",
|
||||
items=types.boundary_behaviours,
|
||||
default='BEHAVIOUR_COLLIDE',
|
||||
); exec(conv("spray_boundary_behaviour"))
|
||||
foam_boundary_active = BoolVectorProperty(
|
||||
)
|
||||
foam_boundary_active: BoolVectorProperty(
|
||||
name="",
|
||||
description="Activate behaviour on the corresponding side of the domain",
|
||||
default=(True, True, True, True, False, True),
|
||||
size=6,
|
||||
); exec(conv("foam_boundary_active"))
|
||||
bubble_boundary_active = BoolVectorProperty(
|
||||
)
|
||||
bubble_boundary_active: BoolVectorProperty(
|
||||
name="",
|
||||
description="Activate behaviour on the corresponding side of the domain",
|
||||
default=(True, True, True, True, False, True),
|
||||
size=6,
|
||||
); exec(conv("bubble_boundary_active"))
|
||||
spray_boundary_active = BoolVectorProperty(
|
||||
)
|
||||
spray_boundary_active: BoolVectorProperty(
|
||||
name="",
|
||||
description="Activate behaviour on the corresponding side of the domain",
|
||||
default=(True, True, True, True, False, True),
|
||||
size=6,
|
||||
); exec(conv("spray_boundary_active"))
|
||||
whitewater_boundary_collisions_mode = EnumProperty(
|
||||
)
|
||||
whitewater_boundary_collisions_mode: EnumProperty(
|
||||
name="Domain Boundary Collisions Mode",
|
||||
description="Select how to set the domain boundary collisions",
|
||||
items=types.boundary_collisions_modes,
|
||||
default='BOUNDARY_COLLISIONS_MODE_INHERIT',
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("whitewater_boundary_collisions_mode"))
|
||||
foam_boundary_collisions = BoolVectorProperty(
|
||||
)
|
||||
foam_boundary_collisions: BoolVectorProperty(
|
||||
name="",
|
||||
description="Enable collisions on the corresponding side of the domain for whitewater foam particles."
|
||||
" If disabled, this side of the boundary will be open and will act"
|
||||
" as an outflow",
|
||||
default=(True, True, True, True, True, True),
|
||||
size=6,
|
||||
); exec(conv("foam_boundary_collisions"))
|
||||
bubble_boundary_collisions = BoolVectorProperty(
|
||||
)
|
||||
bubble_boundary_collisions: BoolVectorProperty(
|
||||
name="",
|
||||
description="Enable collisions on the corresponding side of the domain for whitewater bubble particles."
|
||||
" If disabled, this side of the boundary will be open and will act"
|
||||
" as an outflow",
|
||||
default=(True, True, True, True, True, True),
|
||||
size=6,
|
||||
); exec(conv("bubble_boundary_collisions"))
|
||||
spray_boundary_collisions = BoolVectorProperty(
|
||||
)
|
||||
spray_boundary_collisions: BoolVectorProperty(
|
||||
name="",
|
||||
description="Enable collisions on the corresponding side of the domain for whitewater spray particles."
|
||||
" If disabled, this side of the boundary will be open and will act"
|
||||
" as an outflow",
|
||||
default=(True, True, True, True, True, True),
|
||||
size=6,
|
||||
); exec(conv("spray_boundary_collisions"))
|
||||
dust_boundary_collisions = BoolVectorProperty(
|
||||
)
|
||||
dust_boundary_collisions: BoolVectorProperty(
|
||||
name="",
|
||||
description="Enable collisions on the corresponding side of the domain for whitewater dust particles."
|
||||
" If disabled, this side of the boundary will be open and will act"
|
||||
" as an outflow",
|
||||
default=(True, True, True, True, True, True),
|
||||
size=6,
|
||||
); exec(conv("dust_boundary_collisions"))
|
||||
obstacle_influence_base_level = FloatProperty(
|
||||
)
|
||||
obstacle_influence_base_level: FloatProperty(
|
||||
name="Influence Base Level",
|
||||
description="The default value of whitewater influence. If a location"
|
||||
" is not affected by an obstacle's influence, the amount"
|
||||
@@ -492,8 +491,8 @@ class DomainWhitewaterProperties(bpy.types.PropertyGroup):
|
||||
min=0.0,
|
||||
default=1.0,
|
||||
precision=2,
|
||||
); exec(conv("obstacle_influence_base_level"))
|
||||
obstacle_influence_decay_rate = FloatProperty(
|
||||
)
|
||||
obstacle_influence_decay_rate: FloatProperty(
|
||||
name="Influence Decay Rate",
|
||||
description="The rate at which influence will decay towards the"
|
||||
" base level. If a keyframed/animated obstacle leaves an"
|
||||
@@ -504,16 +503,7 @@ class DomainWhitewaterProperties(bpy.types.PropertyGroup):
|
||||
min=0.0,
|
||||
default=5.0,
|
||||
precision=2,
|
||||
); exec(conv("obstacle_influence_decay_rate"))
|
||||
|
||||
settings_view_mode_expanded = BoolProperty(default=False); exec(conv("settings_view_mode_expanded"))
|
||||
whitewater_simulation_particles_expanded = BoolProperty(default=False); exec(conv("whitewater_simulation_particles_expanded"))
|
||||
emitter_settings_expanded = BoolProperty(default=True); exec(conv("emitter_settings_expanded"))
|
||||
particle_settings_expanded = BoolProperty(default=False); exec(conv("particle_settings_expanded"))
|
||||
boundary_behaviour_settings_expanded = BoolProperty(default=False); exec(conv("boundary_behaviour_settings_expanded"))
|
||||
obstacle_settings_expanded = BoolProperty(default=False); exec(conv("obstacle_settings_expanded"))
|
||||
whitewater_display_settings_expanded = BoolProperty(default=False); exec(conv("whitewater_display_settings_expanded"))
|
||||
geometry_attributes_expanded = BoolProperty(default=False); exec(conv("geometry_attributes_expanded"))
|
||||
)
|
||||
|
||||
|
||||
def register_preset_properties(self, registry, path):
|
||||
|
||||
@@ -30,16 +30,15 @@ from ..objects.flip_fluid_aabb import AABB
|
||||
|
||||
|
||||
class DomainWorldProperties(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
|
||||
world_scale_mode = EnumProperty(
|
||||
world_scale_mode: EnumProperty(
|
||||
name="World Scaling Mode",
|
||||
description="Scaling mode for the physical size of the domain",
|
||||
items=types.world_scale_mode,
|
||||
default='WORLD_SCALE_MODE_RELATIVE',
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("world_scale_mode"))
|
||||
world_scale_relative = FloatProperty(
|
||||
)
|
||||
world_scale_relative: FloatProperty(
|
||||
name="Meters",
|
||||
description="Size of a Blender unit in meters. If set to 1.0, each blender unit will be equal to 1.0 meter in the simulation",
|
||||
min=0.0001,
|
||||
@@ -47,8 +46,8 @@ class DomainWorldProperties(bpy.types.PropertyGroup):
|
||||
precision=3,
|
||||
update=lambda self, context: self._update_world_scale_relative(context),
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("world_scale_relative"))
|
||||
world_scale_absolute = FloatProperty(
|
||||
)
|
||||
world_scale_absolute: FloatProperty(
|
||||
name="Meters",
|
||||
description="Size of the longest side of the domain in meters",
|
||||
min=0.001,
|
||||
@@ -56,23 +55,23 @@ class DomainWorldProperties(bpy.types.PropertyGroup):
|
||||
precision=3,
|
||||
update=lambda self, context: self._update_world_scale_absolute(context),
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("world_scale_absolute"))
|
||||
gravity_type = EnumProperty(
|
||||
)
|
||||
gravity_type: EnumProperty(
|
||||
name="Gravity Type",
|
||||
description="Gravity Type",
|
||||
items=types.gravity_types,
|
||||
default='GRAVITY_TYPE_SCENE',
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("gravity_type"))
|
||||
gravity = FloatVectorProperty(
|
||||
)
|
||||
gravity: FloatVectorProperty(
|
||||
name="Gravity",
|
||||
description="Gravity in X, Y, and Z direction",
|
||||
default=(0.0, 0.0, -9.81),
|
||||
precision=3,
|
||||
size=3,
|
||||
subtype='ACCELERATION',
|
||||
); exec(conv("gravity"))
|
||||
force_field_resolution = EnumProperty(
|
||||
)
|
||||
force_field_resolution: EnumProperty(
|
||||
name="Force Field Resolution",
|
||||
description="Amount of grid resolution to use when evaluating force fields."
|
||||
" Higher resolution improves force field accuracy at the cost of speed"
|
||||
@@ -82,18 +81,18 @@ class DomainWorldProperties(bpy.types.PropertyGroup):
|
||||
items=types.force_field_resolution_modes,
|
||||
default='FORCE_FIELD_RESOLUTION_ULTRA',
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("force_field_resolution"))
|
||||
force_field_weight_fluid_particles = FloatProperty(
|
||||
)
|
||||
force_field_weight_fluid_particles: FloatProperty(
|
||||
name="Fluid Particles",
|
||||
description="Force field object weight for fluid particles",
|
||||
description="Global force field weight for fluid particles. Applies to all force field objects",
|
||||
soft_min=0.0,
|
||||
soft_max=1.0,
|
||||
default=1.0,
|
||||
precision=3,
|
||||
); exec(conv("force_field_weight_fluid_particles"))
|
||||
force_field_weight_whitewater_foam = FloatProperty(
|
||||
)
|
||||
force_field_weight_whitewater_foam: FloatProperty(
|
||||
name="Whitewater Foam",
|
||||
description="Force field object weight for whitewater foam particles. Note: This setting"
|
||||
description="Global force field weight for whitewater foam particles. Applies to all force field objects. Note: This setting"
|
||||
" currently has no effect on the simulation. The movement of foam particles is"
|
||||
" controlled only by the motion of the fluid surface. Force fields and gravity"
|
||||
" currently have no effect on foam particles",
|
||||
@@ -101,10 +100,10 @@ class DomainWorldProperties(bpy.types.PropertyGroup):
|
||||
soft_max=1.0,
|
||||
default=1.0,
|
||||
precision=3,
|
||||
); exec(conv("force_field_weight_whitewater_foam"))
|
||||
force_field_weight_whitewater_bubble = FloatProperty(
|
||||
)
|
||||
force_field_weight_whitewater_bubble: FloatProperty(
|
||||
name="Whitewater Bubble",
|
||||
description="Force field object weight for whitewater bubble particles. Note: Bubble particles"
|
||||
description="Global force field weight for whitewater bubble particles. Applies to all force field objects. Note: Bubble particles"
|
||||
" are assumed to be lower density than the containing liquid and due to buoyancy, bubbles"
|
||||
" will drift the opposite direction of the force fields. If you desire bubble particles"
|
||||
" to move with the direction of the force fields, set this weight to a negative value",
|
||||
@@ -112,45 +111,45 @@ class DomainWorldProperties(bpy.types.PropertyGroup):
|
||||
soft_max=1.0,
|
||||
default=1.0,
|
||||
precision=3,
|
||||
); exec(conv("force_field_weight_whitewater_bubble"))
|
||||
force_field_weight_whitewater_spray = FloatProperty(
|
||||
)
|
||||
force_field_weight_whitewater_spray: FloatProperty(
|
||||
name="Whitewater Spray",
|
||||
description="Force field object weight for whitewater spray particles. Tip: Spray particles are"
|
||||
description="Global force field weight for whitewater spray particles. Applies to all force field objects. Tip: Spray particles are"
|
||||
" often lower a lower density than the fluid. Depending on the desired effect, setting a higher"
|
||||
" weight value can be a good choice",
|
||||
soft_min=0.0,
|
||||
soft_max=1.0,
|
||||
default=1.0,
|
||||
precision=3,
|
||||
); exec(conv("force_field_weight_whitewater_spray"))
|
||||
force_field_weight_whitewater_dust = FloatProperty(
|
||||
)
|
||||
force_field_weight_whitewater_dust: FloatProperty(
|
||||
name="Whitewater Dust",
|
||||
description="Force field object weight for whitewater dust particles",
|
||||
description="Global force field weight for whitewater dust particles. Applies to all force field objects",
|
||||
soft_min=0.0,
|
||||
soft_max=1.0,
|
||||
default=1.0,
|
||||
precision=3,
|
||||
); exec(conv("force_field_weight_whitewater_dust"))
|
||||
force_field_resolution_tooltip = BoolProperty(
|
||||
)
|
||||
force_field_resolution_tooltip: BoolProperty(
|
||||
name="Force Field Grid Resolution",
|
||||
description="Exact force field grid resolution calculated from the domain"
|
||||
" resolution. See Debug Panel for force field visualization tools",
|
||||
default=True,
|
||||
); exec(conv("force_field_resolution_tooltip"))
|
||||
enable_viscosity = BoolProperty(
|
||||
)
|
||||
enable_viscosity: BoolProperty(
|
||||
name="Enable Viscosity",
|
||||
description="Enable viscosity solver",
|
||||
default=False,
|
||||
); exec(conv("enable_viscosity"))
|
||||
viscosity = FloatProperty(
|
||||
)
|
||||
viscosity: FloatProperty(
|
||||
name="Viscosity",
|
||||
description="Viscosity base value. This value is multipled by 10 to the"
|
||||
" power of (exponent * -1)",
|
||||
min=0.0,
|
||||
default=5.0,
|
||||
precision=3,
|
||||
); exec(conv("viscosity"))
|
||||
viscosity_exponent = IntProperty(
|
||||
)
|
||||
viscosity_exponent: IntProperty(
|
||||
name="Viscosity Exponent",
|
||||
description="Viscosity exponent. Negative exponent for the viscosity value"
|
||||
" to simplify entering small values (ex: 5.0 * 10^-3 = 0.005)",
|
||||
@@ -159,8 +158,8 @@ class DomainWorldProperties(bpy.types.PropertyGroup):
|
||||
default=0,
|
||||
update=lambda self, context: self._update_viscosity_exponent(context),
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("viscosity_exponent"))
|
||||
viscosity_solver_error_tolerance = IntProperty(
|
||||
)
|
||||
viscosity_solver_error_tolerance: IntProperty(
|
||||
description="Accuracy of the viscosity solver. Decrease to speed up baking at the cost of accuracy,"
|
||||
" increase to improve accuracy at the cost of baking speed. High viscosity thick or stiff fluids"
|
||||
" benefit the most from increasing accuracy. Low viscosity thin fluids often work well at the lowest"
|
||||
@@ -169,21 +168,21 @@ class DomainWorldProperties(bpy.types.PropertyGroup):
|
||||
min=1, max=6,
|
||||
soft_max=4,
|
||||
default=4,
|
||||
); exec(conv("viscosity_solver_error_tolerance"))
|
||||
enable_surface_tension = BoolProperty(
|
||||
)
|
||||
enable_surface_tension: BoolProperty(
|
||||
name="Enable Surface Tension",
|
||||
description="Enable surface tension forces",
|
||||
default=False,
|
||||
); exec(conv("enable_surface_tension"))
|
||||
surface_tension = FloatProperty(
|
||||
)
|
||||
surface_tension: FloatProperty(
|
||||
name="Surface Tension",
|
||||
description="Surface tension base value. This value is multipled by 10 to the"
|
||||
" power of (exponent * -1)",
|
||||
min=0.0,
|
||||
default=0.25,
|
||||
precision=3,
|
||||
); exec(conv("surface_tension"))
|
||||
surface_tension_exponent = IntProperty(
|
||||
)
|
||||
surface_tension_exponent: IntProperty(
|
||||
name="Viscosity Exponent",
|
||||
description="Viscosity exponent. Negative exponent for the surface tension value"
|
||||
" to simplify entering small values (ex: 5.0 * 10^-3 = 0.005)",
|
||||
@@ -192,8 +191,8 @@ class DomainWorldProperties(bpy.types.PropertyGroup):
|
||||
default=0,
|
||||
update=lambda self, context: self._update_surface_tension_exponent(context),
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("surface_tension_exponent"))
|
||||
surface_tension_accuracy = IntProperty(
|
||||
)
|
||||
surface_tension_accuracy: IntProperty(
|
||||
name="Surface Tension Accuracy",
|
||||
description="Amount of accuracy when calculating surface tension."
|
||||
" Increasing accuracy will produce more accurate surface tension"
|
||||
@@ -202,15 +201,15 @@ class DomainWorldProperties(bpy.types.PropertyGroup):
|
||||
min=0, max=100,
|
||||
default=95,
|
||||
subtype='PERCENTAGE',
|
||||
); exec(conv("surface_tension_accuracy"))
|
||||
surface_tension_solver_method = EnumProperty(
|
||||
)
|
||||
surface_tension_solver_method: EnumProperty(
|
||||
name="Surface Tension Solver",
|
||||
description="Surface tension solving method to use",
|
||||
items=types.surface_tension_solver_methods,
|
||||
default='SURFACE_TENSION_SOLVER_METHOD_REGULAR',
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("surface_tension_solver_method"))
|
||||
enable_sheet_seeding = BoolProperty(
|
||||
)
|
||||
enable_sheet_seeding: BoolProperty(
|
||||
name="Enable Sheeting Effects",
|
||||
description="Fluid sheeting fills in gaps between fluid particles to"
|
||||
" help preserve thin fluid sheets and splashes. Tip: Sheeting will"
|
||||
@@ -218,8 +217,8 @@ class DomainWorldProperties(bpy.types.PropertyGroup):
|
||||
" fluid volume. Keyframing the Sheeting Strength down to 0.0 when no longer"
|
||||
" needed can help prevent increased volume",
|
||||
default=False,
|
||||
); exec(conv("enable_sheet_seeding"))
|
||||
sheet_fill_rate = FloatProperty(
|
||||
)
|
||||
sheet_fill_rate: FloatProperty(
|
||||
name="Sheeting Strength",
|
||||
description="The rate at which new sheeting particles are added."
|
||||
" A higher value will add sheeting particles more often and"
|
||||
@@ -227,16 +226,27 @@ class DomainWorldProperties(bpy.types.PropertyGroup):
|
||||
min=0.0, max=1.0,
|
||||
default=0.5,
|
||||
precision=2,
|
||||
); exec(conv("sheet_fill_rate"))
|
||||
sheet_fill_threshold = FloatProperty(
|
||||
)
|
||||
sheet_fill_threshold: FloatProperty(
|
||||
name="Sheeting Thickness",
|
||||
description="Controls how thick to fill in gaps",
|
||||
min=0.0, max=1.0,
|
||||
soft_min=0.05,
|
||||
default=0.1,
|
||||
precision=2,
|
||||
); exec(conv("sheet_fill_threshold"))
|
||||
boundary_friction = FloatProperty(
|
||||
)
|
||||
enable_density_attribute: BoolProperty(
|
||||
name="Enable Variable Density",
|
||||
description="Enable the variable density solver for mixed density simulations."
|
||||
" After enabling, each Fluid/Inflow object can be set to assign a density value"
|
||||
" to the generated fluid. When enabled, density value attributes will also"
|
||||
" be generated for the fluid surface and fluid particles. After baking, the density values can"
|
||||
" be accessed in a Cycles Attribute Node with the name 'flip_density' from"
|
||||
" the Fac output",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
)
|
||||
boundary_friction: FloatProperty(
|
||||
name="Boundary Friction",
|
||||
description="Amount of friction on the domain boundary walls",
|
||||
min=0.0,
|
||||
@@ -244,21 +254,14 @@ class DomainWorldProperties(bpy.types.PropertyGroup):
|
||||
default=0.0,
|
||||
precision=2,
|
||||
subtype='FACTOR',
|
||||
); exec(conv("boundary_friction"))
|
||||
)
|
||||
|
||||
last_viscosity_exponent = IntProperty(default=0)
|
||||
exec(conv("last_viscosity_exponent"))
|
||||
last_viscosity_exponent: IntProperty(default=0)
|
||||
last_surface_tension_exponent: IntProperty(default=0)
|
||||
native_surface_tension_scale: FloatProperty(default=0.1)
|
||||
minimum_surface_tension_substeps: IntProperty(default=-1)
|
||||
|
||||
last_surface_tension_exponent = IntProperty(default=0)
|
||||
exec(conv("last_surface_tension_exponent"))
|
||||
|
||||
native_surface_tension_scale = FloatProperty(default=0.1)
|
||||
exec(conv("native_surface_tension_scale"))
|
||||
|
||||
minimum_surface_tension_substeps = IntProperty(default=-1)
|
||||
exec(conv("minimum_surface_tension_substeps"))
|
||||
|
||||
surface_tension_substeps_tooltip = BoolProperty(
|
||||
surface_tension_substeps_tooltip: BoolProperty(
|
||||
name="Estimated Substeps",
|
||||
description="The estimated number of substeps per frame that the"
|
||||
" simulator will run in order to keep simulation stable during surface"
|
||||
@@ -266,30 +269,19 @@ class DomainWorldProperties(bpy.types.PropertyGroup):
|
||||
" and size, framerate, amount of surface tension, and surface tension"
|
||||
" accuracy",
|
||||
default=True,
|
||||
); exec(conv("surface_tension_substeps_tooltip"))
|
||||
)
|
||||
|
||||
surface_tension_substeps_exceeded_tooltip = BoolProperty(
|
||||
surface_tension_substeps_exceeded_tooltip: BoolProperty(
|
||||
name="Warning: Too Many Substeps",
|
||||
description="The estimated number of Surface Tension substeps per frame exceeds the Max Frame"
|
||||
" Substeps value. This can cause an unstable simulation. Either decrease the amount of"
|
||||
" Surface Tension in the FLIP Fluid World panel to lower the number of required substeps or"
|
||||
" increase the number of allowed Max Frame Substeps in the FLIP Fluid Advanced panel",
|
||||
default=True,
|
||||
); exec(conv("surface_tension_substeps_exceeded_tooltip"))
|
||||
)
|
||||
|
||||
minimum_surface_tension_cfl = FloatProperty(default=0.25)
|
||||
exec(conv("minimum_surface_tension_cfl"))
|
||||
|
||||
maximum_surface_tension_cfl = FloatProperty(default=5.0)
|
||||
exec(conv("maximum_surface_tension_cfl"))
|
||||
|
||||
world_scale_settings_expanded = BoolProperty(default=True); exec(conv("world_scale_settings_expanded"))
|
||||
force_field_settings_expanded = BoolProperty(default=False); exec(conv("force_field_settings_expanded"))
|
||||
viscosity_settings_expanded = BoolProperty(default=False); exec(conv("viscosity_settings_expanded"))
|
||||
surface_tension_settings_expanded = BoolProperty(default=False); exec(conv("surface_tension_settings_expanded"))
|
||||
sheeting_settings_expanded = BoolProperty(default=False); exec(conv("sheeting_settings_expanded"))
|
||||
friction_settings_expanded = BoolProperty(default=False); exec(conv("friction_settings_expanded"))
|
||||
obstacle_friction_expanded = BoolProperty(default=False); exec(conv("obstacle_friction_expanded"))
|
||||
minimum_surface_tension_cfl: FloatProperty(default=0.25)
|
||||
maximum_surface_tension_cfl: FloatProperty(default=5.0)
|
||||
|
||||
|
||||
def scene_update_post(self, scene):
|
||||
@@ -327,6 +319,7 @@ class DomainWorldProperties(bpy.types.PropertyGroup):
|
||||
add(path + ".enable_sheet_seeding", "Enable Sheeting Effects", group_id=0)
|
||||
add(path + ".sheet_fill_rate", "Sheeting Strength", group_id=0)
|
||||
add(path + ".sheet_fill_threshold", "Sheeting Thickness", group_id=0)
|
||||
add(path + ".enable_density_attribute", "Enable Variable Density", group_id=0)
|
||||
add(path + ".boundary_friction", "Boundary Friction", group_id=0)
|
||||
|
||||
|
||||
|
||||
@@ -25,22 +25,21 @@ from ..utils import version_compatibility_utils as vcu
|
||||
|
||||
|
||||
class FlipFluidProperties(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
|
||||
show_render = BoolProperty(
|
||||
show_render: BoolProperty(
|
||||
name="Show Render",
|
||||
description="Display simulation in render. If disabled, simulation data will not be loaded in the render",
|
||||
default=True,
|
||||
); exec(conv("show_render"))
|
||||
show_viewport = BoolProperty(
|
||||
)
|
||||
show_viewport: BoolProperty(
|
||||
name="Show Viewport",
|
||||
description="Display simulation in viewport. If disabled, simulation data will not be loaded in the viewport."
|
||||
" Disable to speed up playback while working on other areas of your scene",
|
||||
default=True,
|
||||
); exec(conv("show_viewport"))
|
||||
)
|
||||
|
||||
logo_name = StringProperty("flip_fluids_logo"); exec(conv("logo_name"))
|
||||
domain_object_name = StringProperty(default=""); exec(conv("domain_object_name"))
|
||||
logo_name: StringProperty("flip_fluids_logo")
|
||||
domain_object_name: StringProperty(default="")
|
||||
|
||||
|
||||
@classmethod
|
||||
@@ -242,10 +241,7 @@ class FlipFluidProperties(bpy.types.PropertyGroup):
|
||||
|
||||
def _initialize_custom_icons(self):
|
||||
addon_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
if vcu.is_blender_28():
|
||||
icon_filename = "flip_fluids_logo_28.png"
|
||||
else:
|
||||
icon_filename = "flip_fluids_logo_27.png"
|
||||
icon_filename = "flip_fluids_logo_28.png"
|
||||
logo_path = os.path.join(addon_dir, "icons", icon_filename)
|
||||
self.custom_icons.clear()
|
||||
if os.path.isfile(logo_path):
|
||||
|
||||
@@ -31,23 +31,22 @@ from ..utils import version_compatibility_utils as vcu
|
||||
|
||||
|
||||
class FlipFluidFluidProperties(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
|
||||
initial_velocity = FloatVectorProperty(
|
||||
initial_velocity: FloatVectorProperty(
|
||||
name="Initial Velocity",
|
||||
description="Initial velocity of fluid (m/s)",
|
||||
default =(0.0, 0.0, 0.0),
|
||||
size=3,
|
||||
precision=3,
|
||||
subtype='VELOCITY',
|
||||
); exec(conv("initial_velocity"))
|
||||
append_object_velocity = BoolProperty(
|
||||
)
|
||||
append_object_velocity: BoolProperty(
|
||||
name="Add Object Velocity to Fluid",
|
||||
description="Add the velocity of the object to the initial velocity"
|
||||
" of the fluid. Object mesh must be rigid (non-deformable)",
|
||||
default=False,
|
||||
); exec(conv("append_object_velocity"))
|
||||
append_object_velocity_influence = FloatProperty(
|
||||
)
|
||||
append_object_velocity_influence: FloatProperty(
|
||||
name="Influence",
|
||||
description="Amount of velocity that is added to the fluid."
|
||||
" A value of 1.0 is normal, less than 1.0 will dampen the"
|
||||
@@ -57,8 +56,8 @@ class FlipFluidFluidProperties(bpy.types.PropertyGroup):
|
||||
soft_min=0.0, soft_max=1.0,
|
||||
default=1.0,
|
||||
precision=2,
|
||||
); exec(conv("append_object_velocity_influence"))
|
||||
priority = IntProperty(
|
||||
)
|
||||
priority: IntProperty(
|
||||
name="Priority",
|
||||
description="Priority that this fluid object is added to the simulation"
|
||||
" during a frame. If multiple fluid/inflow objects are adding fluid"
|
||||
@@ -68,38 +67,38 @@ class FlipFluidFluidProperties(bpy.types.PropertyGroup):
|
||||
" objects",
|
||||
min=-1000000, max=1000000,
|
||||
default=0,
|
||||
); exec(conv("priority"))
|
||||
use_initial_velocity_target = BoolProperty(
|
||||
)
|
||||
use_initial_velocity_target: BoolProperty(
|
||||
name ="Set towards target",
|
||||
description="Set initial velocity towards a target object",
|
||||
default=False,
|
||||
options={'HIDDEN'}
|
||||
); exec(conv("use_initial_velocity_target"))
|
||||
fluid_velocity_mode = EnumProperty(
|
||||
)
|
||||
fluid_velocity_mode: EnumProperty(
|
||||
name="Velocity Mode",
|
||||
description="Set how the inital fluid velocity is calculated",
|
||||
items=types.fluid_velocity_modes,
|
||||
default='FLUID_VELOCITY_MANUAL',
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("fluid_velocity_mode"))
|
||||
initial_speed = bpy.props.FloatProperty(
|
||||
)
|
||||
initial_speed: bpy.props.FloatProperty(
|
||||
name="Speed",
|
||||
description="Initial speed of fluid towards target (m/s)",
|
||||
default=0.0,
|
||||
precision=3,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("initial_speed"))
|
||||
fluid_axis_mode = EnumProperty(
|
||||
)
|
||||
fluid_axis_mode: EnumProperty(
|
||||
name="Local Axis",
|
||||
description="Set local axis direction of fluid",
|
||||
items=types.local_axis_directions,
|
||||
default='LOCAL_AXIS_POS_X',
|
||||
); exec(conv("fluid_axis_mode"))
|
||||
target_object = PointerProperty(
|
||||
)
|
||||
target_object: PointerProperty(
|
||||
name="Target Object",
|
||||
type=bpy.types.Object
|
||||
); exec(conv("target_object"))
|
||||
source_id = IntProperty(
|
||||
)
|
||||
source_id: IntProperty(
|
||||
name="Source ID Attribute",
|
||||
description="Assign this identifier value to the fluid generated by this object. After"
|
||||
" baking, the source ID attribute values can be accessed in a Cycles Attribute Node"
|
||||
@@ -109,34 +108,45 @@ class FlipFluidFluidProperties(bpy.types.PropertyGroup):
|
||||
min=0, soft_max=16,
|
||||
default=0,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("source_id"))
|
||||
viscosity = FloatProperty(
|
||||
)
|
||||
viscosity: FloatProperty(
|
||||
name="Viscosity Attribute",
|
||||
description="Assign this viscosity value to the fluid generated by this object. After"
|
||||
" baking, the viscosity attribute values can be accessed in a Cycles Attribute Node"
|
||||
" with the name 'flip_viscosity' from the Fac output. This feature can be used to create"
|
||||
" variable viscosity liquid effects. Enable this viscosity feature in the Domain FLIP"
|
||||
" Fluid World panel",
|
||||
" variable viscosity liquid effects. Enable this viscosity feature in the Domain"
|
||||
" World panel",
|
||||
min=0.0,
|
||||
default=0.0,
|
||||
); exec(conv("viscosity"))
|
||||
lifetime = FloatProperty(
|
||||
)
|
||||
density: FloatProperty(
|
||||
name="Density Attribute",
|
||||
description="Assign this density value in g/cm^3 to the fluid generated by this object. After"
|
||||
" baking, the density attribute values can be accessed in a Cycles Attribute Node"
|
||||
" with the name 'flip_density' from the Fac output. This feature"
|
||||
" can be used to create variable density liquids that float or sink. Enable this density feature"
|
||||
" in the Domain World panel",
|
||||
soft_min = 0.05, soft_max=20.0,
|
||||
min=0.0001,
|
||||
default=1.0,
|
||||
)
|
||||
lifetime: FloatProperty(
|
||||
name="Lifetime Attribute",
|
||||
description="Assign this starting lifetime value to the fluid generated by this object."
|
||||
" This value is the amount of time remaining (in seconds) before the fluid is removed from the"
|
||||
" simulation. After baking, the lifetime attribute values can be accessed in a Cycles Attribute Node"
|
||||
" with the name 'flip_lifetime' from the Fac output. Enable this feature in the Domain FLIP"
|
||||
" Fluid Surface panel",
|
||||
" with the name 'flip_lifetime' from the Fac output. Enable this feature in the Domain "
|
||||
" Surface or Particles panel",
|
||||
min=0.0,
|
||||
default=1000.0,
|
||||
); exec(conv("lifetime"))
|
||||
lifetime_variance = FloatProperty(
|
||||
)
|
||||
lifetime_variance: FloatProperty(
|
||||
name="Lifetime Variance",
|
||||
description="Add or subtract a random value in seconds to the starting lifetime within the range of this variance value",
|
||||
min=0.0,
|
||||
default=0.0,
|
||||
); exec(conv("lifetime_variance"))
|
||||
color = FloatVectorProperty(
|
||||
)
|
||||
color: FloatVectorProperty(
|
||||
name="Color Attribute",
|
||||
description="Assign this color to the fluid generated by this object. After"
|
||||
" baking, the color attribute values can be accessed in a Cycles Attribute Node"
|
||||
@@ -148,8 +158,8 @@ class FlipFluidFluidProperties(bpy.types.PropertyGroup):
|
||||
size=3,
|
||||
precision=3,
|
||||
subtype='COLOR',
|
||||
); exec(conv("color"))
|
||||
export_animated_target = BoolProperty(
|
||||
)
|
||||
export_animated_target: BoolProperty(
|
||||
name="Export Animated Target",
|
||||
description="Export this object as an animated mesh. Exporting animated meshes are"
|
||||
" slower, only use when necessary. This option is required for any animation that"
|
||||
@@ -158,24 +168,24 @@ class FlipFluidFluidProperties(bpy.types.PropertyGroup):
|
||||
" not needed for static objects",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("export_animated_target"))
|
||||
export_animated_mesh = BoolProperty(
|
||||
)
|
||||
export_animated_mesh: BoolProperty(
|
||||
name="Export Animated Mesh",
|
||||
description="Export this mesh as an animated one (slower, only use"
|
||||
" if really necessary [e.g. armatures or parented objects],"
|
||||
" animated pos/rot/scale F-curves do not require it",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("export_animated_mesh"))
|
||||
skip_reexport = BoolProperty(
|
||||
)
|
||||
skip_reexport: BoolProperty(
|
||||
name="Skip Re-Export",
|
||||
description="Skip re-exporting this mesh when starting or resuming"
|
||||
" a bake. If this mesh has not been exported or is missing files,"
|
||||
" the addon will automatically export the required files",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("skip_reexport"))
|
||||
force_reexport_on_next_bake = BoolProperty(
|
||||
)
|
||||
force_reexport_on_next_bake: BoolProperty(
|
||||
name="Force Re-Export On Next Bake",
|
||||
description="Override the 'Skip Re-Export' option and force this mesh to be"
|
||||
" re-exported and updated on the next time a simulation start/resumes"
|
||||
@@ -184,43 +194,43 @@ class FlipFluidFluidProperties(bpy.types.PropertyGroup):
|
||||
" This option is only applicable if 'Skip Re-Export' is enabled",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("force_reexport_on_next_bake"))
|
||||
frame_offset_type = EnumProperty(
|
||||
)
|
||||
frame_offset_type: EnumProperty(
|
||||
name="Trigger Type",
|
||||
description="When to trigger fluid object",
|
||||
items=types.frame_offset_types,
|
||||
default='OFFSET_TYPE_FRAME',
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("frame_offset_type"))
|
||||
frame_offset = IntProperty(
|
||||
)
|
||||
frame_offset: IntProperty(
|
||||
name="",
|
||||
description="Frame offset from start of simulation to add fluid object"
|
||||
" to domain",
|
||||
min=0,
|
||||
default=0,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("frame_offset"))
|
||||
timeline_offset = bpy.props.IntProperty(
|
||||
)
|
||||
timeline_offset: bpy.props.IntProperty(
|
||||
name="",
|
||||
description="Timeline frame to add fluid object to domain",
|
||||
min=0,
|
||||
default=0,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("timeline_offset"))
|
||||
property_registry = PointerProperty(
|
||||
)
|
||||
property_registry: PointerProperty(
|
||||
name="Fluid Property Registry",
|
||||
description="",
|
||||
type=preset_properties.PresetRegistry,
|
||||
); exec(conv("property_registry"))
|
||||
)
|
||||
|
||||
disabled_in_viewport_tooltip = BoolProperty(
|
||||
disabled_in_viewport_tooltip: BoolProperty(
|
||||
name="Object Disabled in Viewport",
|
||||
description="This fluid object is currently disabled in the viewport within the"
|
||||
" outliner (Monitor Icon) and will not be included in the simulation. If you"
|
||||
" want the object hidden in the viewport, but still have the object included in the"
|
||||
" simulation, use the outliner Hide in Viewport option instead (Eye Icon)",
|
||||
default=True,
|
||||
); exec(conv("disabled_in_viewport_tooltip"))
|
||||
)
|
||||
|
||||
|
||||
def initialize(self):
|
||||
@@ -244,6 +254,7 @@ class FlipFluidFluidProperties(bpy.types.PropertyGroup):
|
||||
add("fluid.fluid_axis_mode", "")
|
||||
add("fluid.source_id", "")
|
||||
add("fluid.viscosity", "")
|
||||
add("fluid.density", "")
|
||||
add("inflow.lifetime", "")
|
||||
add("inflow.lifetime_variance", "")
|
||||
add("fluid.color", "")
|
||||
|
||||
@@ -32,29 +32,28 @@ from ..utils import version_compatibility_utils as vcu
|
||||
|
||||
|
||||
class FlipFluidForceFieldProperties(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
|
||||
force_field_type = EnumProperty(
|
||||
force_field_type: EnumProperty(
|
||||
name="Type",
|
||||
description="Type of force field",
|
||||
items=types.force_field_types,
|
||||
default='FORCE_FIELD_TYPE_POINT',
|
||||
update=lambda self, context: self._update_force_field_type(context),
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("force_field_type"))
|
||||
is_enabled = BoolProperty(
|
||||
)
|
||||
is_enabled: BoolProperty(
|
||||
name="Enabled",
|
||||
description="Force field is active in the fluid simulation",
|
||||
default=True,
|
||||
); exec(conv("is_enabled"))
|
||||
strength = FloatProperty(
|
||||
)
|
||||
strength: FloatProperty(
|
||||
name="Strength",
|
||||
description="Strength of the force field. A negative value pulls fluid in,"
|
||||
" a positive value pushes fluid away",
|
||||
default=-9.81,
|
||||
precision=2,
|
||||
); exec(conv("strength"))
|
||||
falloff_power = FloatProperty(
|
||||
)
|
||||
falloff_power: FloatProperty(
|
||||
name="Falloff Power",
|
||||
description="How quickly force strength decreases with distance. If "
|
||||
" r is the distance from the force object, the force strength changes"
|
||||
@@ -64,18 +63,18 @@ class FlipFluidForceFieldProperties(bpy.types.PropertyGroup):
|
||||
min=0.0,
|
||||
soft_max=3.0, max=6.0,
|
||||
precision=2,
|
||||
); exec(conv("falloff_power"))
|
||||
enable_min_distance = BoolProperty(
|
||||
)
|
||||
enable_min_distance: BoolProperty(
|
||||
name="Enable Min Distance",
|
||||
description="Use a minimum distance for the force field falloff",
|
||||
default=False,
|
||||
); exec(conv("enable_min_distance"))
|
||||
enable_max_distance = BoolProperty(
|
||||
)
|
||||
enable_max_distance: BoolProperty(
|
||||
name="Enable Max Distance",
|
||||
description="Use a maximum distance for the force field to work",
|
||||
default=False,
|
||||
); exec(conv("enable_max_distance"))
|
||||
min_max_distance = NewMinMaxFloatProperty(
|
||||
)
|
||||
min_max_distance: NewMinMaxFloatProperty(
|
||||
name_min="Min Distance",
|
||||
description_min="The distance from the force object at which the strength"
|
||||
" begins to falloff",
|
||||
@@ -90,8 +89,8 @@ class FlipFluidForceFieldProperties(bpy.types.PropertyGroup):
|
||||
min_max=0,
|
||||
default_max=0.0,
|
||||
precision_max=3,
|
||||
); exec(conv("min_max_distance"))
|
||||
maximum_force_limit_factor = FloatProperty(
|
||||
)
|
||||
maximum_force_limit_factor: FloatProperty(
|
||||
name="Max Force Limit Factor",
|
||||
description="The maximum force in the field will be limited to the Strength"
|
||||
" multiplied by this value",
|
||||
@@ -99,8 +98,8 @@ class FlipFluidForceFieldProperties(bpy.types.PropertyGroup):
|
||||
min=0.0,
|
||||
soft_max=10.0,
|
||||
precision=2,
|
||||
); exec(conv("maximum_force_limit_factor"))
|
||||
export_animated_mesh = bpy.props.BoolProperty(
|
||||
)
|
||||
export_animated_mesh: bpy.props.BoolProperty(
|
||||
name="Export Animated Mesh",
|
||||
description="Export this object as an animated mesh. Exporting animated meshes are"
|
||||
" slower, only use when necessary. This option is required for any animation that"
|
||||
@@ -109,16 +108,16 @@ class FlipFluidForceFieldProperties(bpy.types.PropertyGroup):
|
||||
" not needed for static objects",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("export_animated_mesh"))
|
||||
skip_reexport = BoolProperty(
|
||||
name="Skip re-export",
|
||||
)
|
||||
skip_reexport: BoolProperty(
|
||||
name="Skip Re-export",
|
||||
description="Skip re-exporting this mesh when starting or resuming"
|
||||
" a bake. If this mesh has not been exported or is missing files,"
|
||||
" the addon will automatically export the required files",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("skip_reexport"))
|
||||
force_reexport_on_next_bake = BoolProperty(
|
||||
)
|
||||
force_reexport_on_next_bake: BoolProperty(
|
||||
name="Force Re-Export On Next Bake",
|
||||
description="Override the 'Skip Re-Export' option and force this mesh to be"
|
||||
" re-exported and updated on the next time a simulation start/resumes"
|
||||
@@ -127,9 +126,9 @@ class FlipFluidForceFieldProperties(bpy.types.PropertyGroup):
|
||||
" This option is only applicable if 'Skip Re-Export' is enabled",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("force_reexport_on_next_bake"))
|
||||
)
|
||||
|
||||
maximum_strength_tooltip = BoolProperty(
|
||||
maximum_strength_tooltip: BoolProperty(
|
||||
name="Maximum Force",
|
||||
description="This value estimates the maximum possible force field strength"
|
||||
" generated by this object. Force field strengths are inversely proportional"
|
||||
@@ -137,7 +136,7 @@ class FlipFluidForceFieldProperties(bpy.types.PropertyGroup):
|
||||
" Force Limit Factor to reduce the maximum force. For reference, a force strength"
|
||||
" value of 9.81 is equal to the default strength of gravity",
|
||||
default=True,
|
||||
); exec(conv("maximum_strength_tooltip"))
|
||||
)
|
||||
|
||||
|
||||
#
|
||||
@@ -145,94 +144,94 @@ class FlipFluidForceFieldProperties(bpy.types.PropertyGroup):
|
||||
#
|
||||
|
||||
# Point Force Field
|
||||
falloff_shape = EnumProperty(
|
||||
falloff_shape: EnumProperty(
|
||||
name="Falloff Shape",
|
||||
description="(Placeholder, TODO) Specifies the shape of the force field. Only takes"
|
||||
" effect if the Falloff Power is greater than 0",
|
||||
items=types.force_field_falloff_shapes,
|
||||
default='FORCE_FIELD_FALLOFF_SPHERE',
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("falloff_shape"))
|
||||
gravity_scale_point = FloatProperty(
|
||||
)
|
||||
gravity_scale_point: FloatProperty(
|
||||
name="Gravity Scale",
|
||||
description="Scale the force of gravity around this point by this value. A scale"
|
||||
" of 0.0 is zero gravity, a scale of 1.0 is full gravity",
|
||||
default=1.0,
|
||||
soft_min=0.0, soft_max=1.0,
|
||||
precision=2,
|
||||
); exec(conv("gravity_scale_point"))
|
||||
gravity_scale_width_point = FloatProperty(
|
||||
)
|
||||
gravity_scale_width_point: FloatProperty(
|
||||
name="Gravity Scale Width",
|
||||
description="The distance around this point that gravity scaling will take effect",
|
||||
default=1.0,
|
||||
min=0.0, soft_max=5.0,
|
||||
precision=2,
|
||||
); exec(conv("gravity_scale_width_point"))
|
||||
)
|
||||
|
||||
# Surface Force Field
|
||||
enable_frontfacing = BoolProperty(
|
||||
enable_frontfacing: BoolProperty(
|
||||
name="Front",
|
||||
description="Enable force field on the front-facing side of the surface."
|
||||
" This is the side where face normals point outwards",
|
||||
default=True,
|
||||
); exec(conv("enable_frontfacing"))
|
||||
enable_backfacing = BoolProperty(
|
||||
)
|
||||
enable_backfacing: BoolProperty(
|
||||
name="Back",
|
||||
description="Enable force field on back-facing polygons."
|
||||
" This is the side opposite of the face normal",
|
||||
default=True,
|
||||
); exec(conv("enable_backfacing"))
|
||||
enable_edgefacing = BoolProperty(
|
||||
)
|
||||
enable_edgefacing: BoolProperty(
|
||||
name="Edge",
|
||||
description="Enable force field on planar edges."
|
||||
" These are edges of the object that are not connected to any other polygons."
|
||||
" Must have at lease one of Front or Back sides enabled",
|
||||
default=True,
|
||||
); exec(conv("enable_edgefacing"))
|
||||
gravity_scale_surface = FloatProperty(
|
||||
)
|
||||
gravity_scale_surface: FloatProperty(
|
||||
name="Gravity Scale",
|
||||
description="Scale the force of gravity near the surface by this value. A scale"
|
||||
" of 0.0 is zero gravity, a scale of 1.0 is full gravity",
|
||||
default=1.0,
|
||||
soft_min=0.0, soft_max=1.0,
|
||||
precision=2,
|
||||
); exec(conv("gravity_scale_surface"))
|
||||
gravity_scale_width_surface = FloatProperty(
|
||||
)
|
||||
gravity_scale_width_surface: FloatProperty(
|
||||
name="Gravity Scale Width",
|
||||
description="The distance from the surface that gravity scaling will take effect",
|
||||
default=1.0,
|
||||
min=0.0, soft_max=5.0,
|
||||
precision=2,
|
||||
); exec(conv("gravity_scale_width_surface"))
|
||||
)
|
||||
|
||||
# Volume Force Field
|
||||
gravity_scale_volume = FloatProperty(
|
||||
gravity_scale_volume: FloatProperty(
|
||||
name="Gravity Scale",
|
||||
description="Scale the force of gravity inside the volume by this value. A scale"
|
||||
" of 0.0 is zero gravity, a scale of 1.0 is full gravity",
|
||||
default=1.0,
|
||||
soft_min=0.0, soft_max=1.0,
|
||||
precision=2,
|
||||
); exec(conv("gravity_scale_volume"))
|
||||
gravity_scale_width_volume = FloatProperty(
|
||||
)
|
||||
gravity_scale_width_volume: FloatProperty(
|
||||
name="Gravity Scale Width",
|
||||
description="The distance from the outside of the volume's surface that gravity"
|
||||
" scaling will take effect",
|
||||
default=0.0,
|
||||
min=0.0, soft_max=5.0,
|
||||
precision=2,
|
||||
); exec(conv("gravity_scale_width_volume"))
|
||||
)
|
||||
|
||||
# Curve Force Field
|
||||
flow_strength = FloatProperty(
|
||||
flow_strength: FloatProperty(
|
||||
name="Flow Strength",
|
||||
description="Strength of the flow along the direction of the curve. The curve direction"
|
||||
" is in the vertex order of the Blender Curve object. A negative value will reverse"
|
||||
" the direction",
|
||||
default=0.0,
|
||||
precision=2,
|
||||
); exec(conv("flow_strength"))
|
||||
spin_strength = FloatProperty(
|
||||
)
|
||||
spin_strength: FloatProperty(
|
||||
name="Spin Strength",
|
||||
description="Strength of the the force that directs fluid to spin around the curve. A positive"
|
||||
" strength uses the 'Right Hand Rule:' take your right hand and point your thumb in"
|
||||
@@ -241,46 +240,46 @@ class FlipFluidForceFieldProperties(bpy.types.PropertyGroup):
|
||||
" direction",
|
||||
default=0.0,
|
||||
precision=2,
|
||||
); exec(conv("spin_strength"))
|
||||
gravity_scale_curve = FloatProperty(
|
||||
)
|
||||
gravity_scale_curve: FloatProperty(
|
||||
name="Gravity Scale",
|
||||
description="Scale the force of gravity near the curve by this value. A scale"
|
||||
" of 0.0 is zero gravity, a scale of 1.0 is full gravity",
|
||||
default=1.0,
|
||||
soft_min=0.0, soft_max=1.0,
|
||||
precision=2,
|
||||
); exec(conv("gravity_scale_curve"))
|
||||
gravity_scale_width_curve = FloatProperty(
|
||||
)
|
||||
gravity_scale_width_curve: FloatProperty(
|
||||
name="Gravity Scale Width",
|
||||
description="The distance from the curve that gravity"
|
||||
" scaling will take effect",
|
||||
default=1.0,
|
||||
min=0.0, soft_max=5.0,
|
||||
precision=2,
|
||||
); exec(conv("gravity_scale_width_curve"))
|
||||
enable_endcaps = BoolProperty(
|
||||
)
|
||||
enable_endcaps: BoolProperty(
|
||||
name="Enable End Caps",
|
||||
description="Whether fluid is attracted towards the ends of the curve segment. Disable"
|
||||
" to allow fluid to flow past the ends of the curve segment",
|
||||
default=True,
|
||||
); exec(conv("enable_endcaps"))
|
||||
)
|
||||
|
||||
|
||||
property_registry = PointerProperty(
|
||||
property_registry: PointerProperty(
|
||||
name="Outflow Property Registry",
|
||||
description="",
|
||||
type=preset_properties.PresetRegistry,
|
||||
); exec(conv("property_registry"))
|
||||
)
|
||||
|
||||
|
||||
disabled_in_viewport_tooltip = BoolProperty(
|
||||
disabled_in_viewport_tooltip: BoolProperty(
|
||||
name="Object Disabled in Viewport",
|
||||
description="This force field object is currently disabled in the viewport within the"
|
||||
" outliner (Monitor Icon) and will not be included in the simulation. If you"
|
||||
" want the object hidden in the viewport, but still have the object included in the"
|
||||
" simulation, use the outliner Hide in Viewport option instead (Eye Icon)",
|
||||
default=True,
|
||||
); exec(conv("disabled_in_viewport_tooltip"))
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -547,21 +547,18 @@ class FlipFluidHelperPropertiesShadowCatcherState(bpy.types.PropertyGroup):
|
||||
|
||||
# Properties:
|
||||
class FlipFluidHelperProperties(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
|
||||
option_path_supports_blend_relative = set()
|
||||
if vcu.is_blender_45():
|
||||
# required for relative path support in Blender 4.5+
|
||||
# https://docs.blender.org/api/4.5/bpy_types_enum_items/property_flag_items.html#rna-enum-property-flag-items
|
||||
option_path_supports_blend_relative = {'PATH_SUPPORTS_BLEND_RELATIVE'}
|
||||
# required for relative path support in Blender 4.5+
|
||||
# https://docs.blender.org/api/4.5/bpy_types_enum_items/property_flag_items.html#rna-enum-property-flag-items
|
||||
option_path_supports_blend_relative = {'PATH_SUPPORTS_BLEND_RELATIVE'}
|
||||
|
||||
enable_auto_frame_load = BoolProperty(
|
||||
enable_auto_frame_load: BoolProperty(
|
||||
name="Auto-Load Baked Frames",
|
||||
description="Automatically load frames as they finish baking",
|
||||
default=False,
|
||||
update=lambda self, context: self._update_enable_auto_frame_load_cmd(context),
|
||||
); exec(conv("enable_auto_frame_load"))
|
||||
enable_auto_frame_load_cmd = BoolProperty(
|
||||
)
|
||||
enable_auto_frame_load_cmd: BoolProperty(
|
||||
name="Sync With CMD Bake",
|
||||
description="Automatically load frames as they finish baking when running a command"
|
||||
" line bake. Note: this feature may decrease Blender performance and responsiveness"
|
||||
@@ -569,27 +566,27 @@ class FlipFluidHelperProperties(bpy.types.PropertyGroup):
|
||||
" this option when a CMD bake is not running",
|
||||
default=False,
|
||||
update=lambda self, context: self._update_enable_auto_frame_load_cmd(context),
|
||||
); exec(conv("enable_auto_frame_load_cmd"))
|
||||
playback_frame_offset = IntProperty(
|
||||
)
|
||||
playback_frame_offset: IntProperty(
|
||||
name="Frame Offset",
|
||||
description="Frame offset for simulation playback. A positive offset will shift simulation playback forwards in the timeline while a negative offset will shift playback backwards in the timeline",
|
||||
default=0,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("playback_frame_offset"))
|
||||
)
|
||||
|
||||
cmd_bake_and_render = BoolProperty(
|
||||
cmd_bake_and_render: BoolProperty(
|
||||
name="Bake and Render",
|
||||
description="Enable both baking and rendering in the command line process",
|
||||
default=False,
|
||||
); exec(conv("cmd_bake_and_render"))
|
||||
cmd_bake_and_render_mode = EnumProperty(
|
||||
)
|
||||
cmd_bake_and_render_mode: EnumProperty(
|
||||
name="CMD Bake and Render Mode",
|
||||
description="How to bake and render the simulation",
|
||||
items=types.cmd_bake_and_render_mode,
|
||||
default='CMD_BAKE_AND_RENDER_MODE_SEQUENCE',
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("cmd_bake_and_render_mode"))
|
||||
cmd_bake_and_render_interleaved_instances = IntProperty(
|
||||
)
|
||||
cmd_bake_and_render_interleaved_instances: IntProperty(
|
||||
name="Render Instances",
|
||||
description="Maximum number of render instances to run simultaneously. This number is how many frames"
|
||||
" are allowed to be rendered at the same time. More render instances maximizes system resource usage"
|
||||
@@ -599,42 +596,42 @@ class FlipFluidHelperProperties(bpy.types.PropertyGroup):
|
||||
min=1,
|
||||
soft_max=8,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("cmd_bake_and_render_interleaved_instances"))
|
||||
cmd_bake_and_render_interleaved_no_overwrite = BoolProperty(
|
||||
)
|
||||
cmd_bake_and_render_interleaved_no_overwrite: BoolProperty(
|
||||
name="Continue render from last rendered frame",
|
||||
description="Skip rendering frames that already exist in the render output directory. Useful for continuing a render from the last completed frame. If disabled, rendered frames will be overwritten",
|
||||
default=True,
|
||||
); exec(conv("cmd_bake_and_render_interleaved_no_overwrite"))
|
||||
cmd_launch_render_animation_mode = EnumProperty(
|
||||
)
|
||||
cmd_launch_render_animation_mode: EnumProperty(
|
||||
name="Animation Render Mode",
|
||||
description="How to render the animation",
|
||||
items=types.cmd_render_animation_mode,
|
||||
default='CMD_RENDER_MODE_NORMAL',
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("cmd_launch_render_animation_mode"))
|
||||
cmd_launch_render_passes_animation_mode = EnumProperty(
|
||||
)
|
||||
cmd_launch_render_passes_animation_mode: EnumProperty(
|
||||
name="Animation Render Mode",
|
||||
description="How to render the compositing tools render passes animation",
|
||||
items=types.cmd_render_passes_animation_mode,
|
||||
default='CMD_RENDER_MODE_RENDER_PASSES',
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("cmd_launch_render_passes_animation_mode"))
|
||||
cmd_launch_render_normal_animation_no_overwrite = BoolProperty(
|
||||
)
|
||||
cmd_launch_render_normal_animation_no_overwrite: BoolProperty(
|
||||
name="Skip rendered frames",
|
||||
description="Skip rendering frames that already exist in the render output directory. Useful for continuing a render from the last completed frame. If disabled, rendered frames will be overwritten",
|
||||
default=False,
|
||||
); exec(conv("cmd_launch_render_normal_animation_no_overwrite"))
|
||||
cmd_launch_render_animation_no_overwrite = BoolProperty(
|
||||
)
|
||||
cmd_launch_render_animation_no_overwrite: BoolProperty(
|
||||
name="Skip rendered frames",
|
||||
description="Skip rendering frames that already exist in the render output directory. Useful for continuing a render from the last completed frame. If disabled, rendered frames will be overwritten",
|
||||
default=True,
|
||||
); exec(conv("cmd_launch_render_animation_no_overwrite"))
|
||||
cmd_launch_render_passes_animation_no_overwrite = BoolProperty(
|
||||
)
|
||||
cmd_launch_render_passes_animation_no_overwrite: BoolProperty(
|
||||
name="Skip rendered frames",
|
||||
description="Skip rendering compositing pass frames that already exist in the render output directory. Useful for continuing a render from the last completed compositing pass frame. If disabled, rendered frames will be overwritten",
|
||||
default=True,
|
||||
); exec(conv("cmd_launch_render_passes_animation_no_overwrite"))
|
||||
cmd_launch_render_animation_instances = IntProperty(
|
||||
)
|
||||
cmd_launch_render_animation_instances: IntProperty(
|
||||
name="Render Instances",
|
||||
description="Maximum number of render instances to run simultaneously. This number is how many frames"
|
||||
" are allowed to be rendered at the same time. More render instances maximizes system resource usage"
|
||||
@@ -643,8 +640,8 @@ class FlipFluidHelperProperties(bpy.types.PropertyGroup):
|
||||
min=1,
|
||||
soft_max=8,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("cmd_launch_render_animation_instances"))
|
||||
cmd_launch_render_passes_animation_instances = IntProperty(
|
||||
)
|
||||
cmd_launch_render_passes_animation_instances: IntProperty(
|
||||
name="Render Instances",
|
||||
description="Maximum number of render instances to run simultaneously. This number is how many compositing pass frames"
|
||||
" are allowed to be rendered at the same time. More render instances maximizes system resource usage"
|
||||
@@ -653,29 +650,29 @@ class FlipFluidHelperProperties(bpy.types.PropertyGroup):
|
||||
min=1,
|
||||
soft_max=8,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("cmd_launch_render_passes_animation_instances"))
|
||||
cmd_open_image_after_render = BoolProperty(
|
||||
)
|
||||
cmd_open_image_after_render: BoolProperty(
|
||||
name="Open Image After Render",
|
||||
description="After the command line render process is finished, open the image in your default OS image program",
|
||||
default=True,
|
||||
); exec(conv("cmd_open_image_after_render"))
|
||||
cmd_close_window_after_render = BoolProperty(
|
||||
)
|
||||
cmd_close_window_after_render: BoolProperty(
|
||||
name="Close CMD Window After Render",
|
||||
description="After the command line render process is finished, open the image in your default OS image program",
|
||||
default=False,
|
||||
); exec(conv("cmd_close_window_after_render"))
|
||||
)
|
||||
|
||||
|
||||
### NEW RENDER PASSES ###
|
||||
|
||||
# Disabled by default for the release of FLIP Fluids 1.8.0
|
||||
display_compositing_tools_in_ui = BoolProperty(default=False); exec(conv("display_compositing_tools_in_ui"))
|
||||
display_compositing_tools_in_ui: BoolProperty(default=False)
|
||||
|
||||
render_passes = BoolProperty(
|
||||
render_passes: BoolProperty(
|
||||
name="Activate Passes Rendering",
|
||||
description="Activate rendering of selected passes",
|
||||
default=False
|
||||
); exec(conv("render_passes"))
|
||||
)
|
||||
|
||||
render_passes_objectlist: bpy.props.CollectionProperty(type=FlipFluidHelperPropertiesRenderPassesObjectslist)
|
||||
render_passes_fg_elementslist: bpy.props.CollectionProperty(type=FlipFluidHelperPropertiesRenderPassesObjectslist)
|
||||
@@ -999,68 +996,80 @@ class FlipFluidHelperProperties(bpy.types.PropertyGroup):
|
||||
|
||||
### END OF PASSES ###
|
||||
|
||||
alembic_export_surface = BoolProperty(
|
||||
alembic_export_engine: EnumProperty(
|
||||
name="Alembic Export Engine",
|
||||
description="Select the Alembic export engine",
|
||||
items=types.alembic_export_engines,
|
||||
default='ALEMBIC_EXPORT_ENGINE_BLENDER',
|
||||
options={'HIDDEN'},
|
||||
)
|
||||
alembic_export_surface: BoolProperty(
|
||||
name="Surface",
|
||||
description="Include fluid surface mesh in the Alembic export",
|
||||
default=True,
|
||||
); exec(conv("alembic_export_surface"))
|
||||
alembic_export_fluid_particles = BoolProperty(
|
||||
)
|
||||
alembic_export_surface_preview: BoolProperty(
|
||||
name="Preview",
|
||||
description="Include fluid surface preview mesh in the Alembic export",
|
||||
default=False,
|
||||
)
|
||||
alembic_export_fluid_particles: BoolProperty(
|
||||
name="Fluid Particles",
|
||||
description="Include fluid particles in the Alembic export",
|
||||
default=False,
|
||||
); exec(conv("alembic_export_fluid_particles"))
|
||||
alembic_export_foam = BoolProperty(
|
||||
)
|
||||
alembic_export_foam: BoolProperty(
|
||||
name="Foam",
|
||||
description="Include whitewater foam mesh in the Alembic export if applicable. This mesh will be exported as a vertex-only mesh",
|
||||
default=True,
|
||||
); exec(conv("alembic_export_foam"))
|
||||
alembic_export_bubble = BoolProperty(
|
||||
)
|
||||
alembic_export_bubble: BoolProperty(
|
||||
name="Bubble",
|
||||
description="Include whitewater bubble mesh in the Alembic export if applicable. This mesh will be exported as a vertex-only mesh",
|
||||
default=True,
|
||||
); exec(conv("alembic_export_bubble"))
|
||||
alembic_export_spray = BoolProperty(
|
||||
)
|
||||
alembic_export_spray: BoolProperty(
|
||||
name="Spray",
|
||||
description="Include whitewater spray mesh in the Alembic export if applicable. This mesh will be exported as a vertex-only mesh",
|
||||
default=True,
|
||||
); exec(conv("alembic_export_spray"))
|
||||
alembic_export_dust = BoolProperty(
|
||||
)
|
||||
alembic_export_dust: BoolProperty(
|
||||
name="Dust",
|
||||
description="Include whitewater dust mesh in the Alembic export if applicable. This mesh will be exported as a vertex-only mesh",
|
||||
default=True,
|
||||
); exec(conv("alembic_export_dust"))
|
||||
alembic_export_velocity = BoolProperty(
|
||||
)
|
||||
alembic_export_velocity: BoolProperty(
|
||||
name="Export Velocity",
|
||||
description="Include velocity data in the Alembic export. This data will be available"
|
||||
" under the 'velocity' point attribute of the Alembic export and can be used for motion"
|
||||
" blur rendering. Velocity attributes for the surface, fluid particles, and/or whitewater are required to"
|
||||
" be baked before export",
|
||||
default=False,
|
||||
); exec(conv("alembic_export_velocity"))
|
||||
alembic_export_color = BoolProperty(
|
||||
)
|
||||
alembic_export_color: BoolProperty(
|
||||
name="Export Color",
|
||||
description="Include color attribute data in the Alembic export. This data will be available"
|
||||
" under the 'color' face-corner attribute of the Alembic export and can be used for material shading."
|
||||
" This attribute is only supported for the Surface mesh."
|
||||
" Color attributes for the surface are required to be baked before export",
|
||||
default=False,
|
||||
); exec(conv("alembic_export_color"))
|
||||
alembic_global_scale = FloatProperty(
|
||||
)
|
||||
alembic_global_scale: FloatProperty(
|
||||
name="Scale",
|
||||
description="Scale value by which to enlarge or shrink the simulation meshes with respect to the world's origin",
|
||||
min=0.0001,
|
||||
max=1000.0,
|
||||
default=1.0,
|
||||
precision=3,
|
||||
); exec(conv("alembic_global_scale"))
|
||||
alembic_frame_range_mode = EnumProperty(
|
||||
)
|
||||
alembic_frame_range_mode: EnumProperty(
|
||||
name="Frame Range Mode",
|
||||
description="Frame range to use for Alembic Export",
|
||||
items=types.frame_range_modes,
|
||||
default='FRAME_RANGE_TIMELINE',
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("alembic_frame_range_mode"))
|
||||
alembic_frame_range_custom = NewMinMaxIntProperty(
|
||||
)
|
||||
alembic_frame_range_custom: NewMinMaxIntProperty(
|
||||
name_min="Start Frame",
|
||||
description_min="First frame of the Alembic export",
|
||||
min_min=0,
|
||||
@@ -1072,8 +1081,8 @@ class FlipFluidHelperProperties(bpy.types.PropertyGroup):
|
||||
min_max=0,
|
||||
default_max=250,
|
||||
options_max={'HIDDEN'},
|
||||
); exec(conv("alembic_frame_range_custom"))
|
||||
alembic_output_filepath = StringProperty(
|
||||
)
|
||||
alembic_output_filepath: StringProperty(
|
||||
name="",
|
||||
description="Alembic export will be saved to this filepath. Remember to save the Blend file before"
|
||||
" starting the Alembic export",
|
||||
@@ -1081,68 +1090,68 @@ class FlipFluidHelperProperties(bpy.types.PropertyGroup):
|
||||
subtype='FILE_PATH',
|
||||
options=option_path_supports_blend_relative,
|
||||
update=lambda self, context: self._update_alembic_output_filepath(context),
|
||||
); exec(conv("alembic_output_filepath"))
|
||||
is_alembic_output_filepath_set = BoolProperty(default=False); exec(conv("is_alembic_output_filepath_set"))
|
||||
)
|
||||
is_alembic_output_filepath_set: BoolProperty(default=False)
|
||||
|
||||
unsaved_blend_file_tooltip = BoolProperty(
|
||||
unsaved_blend_file_tooltip: BoolProperty(
|
||||
name="Unsaved Blend File Tooltip",
|
||||
description="This is currently an unsaved .blend file. We recommend saving your file before baking a"
|
||||
" simulation so you do not accidentally lose your simulation progress or settings",
|
||||
default=True,
|
||||
); exec(conv("unsaved_blend_file_tooltip"))
|
||||
)
|
||||
|
||||
turbo_tools_render_tooltip = BoolProperty(
|
||||
turbo_tools_render_tooltip: BoolProperty(
|
||||
name="Turbo Tools command line rendering support",
|
||||
description="An installation of the Turbo Tools addon has been detected. Use these operators to launch"
|
||||
" a Turbo Tools render process or copy the render command. Refer to the Turbo Tools documentation for more info"
|
||||
" on command line rendering",
|
||||
default=True,
|
||||
); exec(conv("turbo_tools_render_tooltip"))
|
||||
)
|
||||
|
||||
flip_fluids_remesh_skip_hide_render_objects = BoolProperty(
|
||||
flip_fluids_remesh_skip_hide_render_objects: BoolProperty(
|
||||
name="Skip Hidden Render Objects",
|
||||
description="Skip remeshing objects in the collection that are hidden from render (outliner camera icon)",
|
||||
default=False,
|
||||
); exec(conv("flip_fluids_remesh_skip_hide_render_objects"))
|
||||
flip_fluids_remesh_apply_object_modifiers = BoolProperty(
|
||||
)
|
||||
flip_fluids_remesh_apply_object_modifiers: BoolProperty(
|
||||
name="Apply Object Modifiers",
|
||||
description="Automatically apply modifiers to objects in collection. If disabled, objects with modifiers will"
|
||||
" need to have modifiers applied manually or excluded from the viewport (disable outliner monitor icon)"
|
||||
" before proceeding with the remesh process. Modifiers may not be applied in the intended order and objects"
|
||||
" with complex modifier dependencies may need to be applied manually for accuracy",
|
||||
default=True,
|
||||
); exec(conv("flip_fluids_remesh_apply_object_modifiers"))
|
||||
flip_fluids_remesh_convert_objects_to_mesh = BoolProperty(
|
||||
)
|
||||
flip_fluids_remesh_convert_objects_to_mesh: BoolProperty(
|
||||
name="Convert Objects to Mesh",
|
||||
description="Automatically convert non-mesh type objects in the collection to a mesh type if applicable. If an object cannot"
|
||||
" be converted to a mesh (empties, armatures, etc), the object will be skipped from the remeshing process."
|
||||
" If disabled, non-mesh type objects will need to be manually converted to a mesh or excluded from the viewport"
|
||||
" (disable outliner monitor icon) before proceeding with the remesh process",
|
||||
default=True,
|
||||
); exec(conv("flip_fluids_remesh_convert_objects_to_mesh"))
|
||||
update_object_speed_data_on_frame_change = BoolProperty(
|
||||
)
|
||||
update_object_speed_data_on_frame_change: BoolProperty(
|
||||
name="Update on frame change",
|
||||
description="Update the object speed measurement for the active object after changing a frame. Not recommended"
|
||||
" to leave this option enabled when not in use as this could slow down Blender when measuring complex or high poly geometry",
|
||||
default=False,
|
||||
); exec(conv("update_object_speed_data_on_frame_change"))
|
||||
measure_object_speed_units_mode = EnumProperty(
|
||||
)
|
||||
measure_object_speed_units_mode: EnumProperty(
|
||||
name="Measurement Units",
|
||||
description="Display speed in metric or imperial units",
|
||||
items=types.measurement_units_mode,
|
||||
default='MEASUREMENT_UNITS_MODE_METRIC',
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("measure_object_speed_units_mode"))
|
||||
)
|
||||
|
||||
disable_addon_in_blend_file = BoolProperty(
|
||||
disable_addon_in_blend_file: BoolProperty(
|
||||
name="Disable Addon in Blend File",
|
||||
description="",
|
||||
default=False,
|
||||
); exec(conv("disable_addon_in_blend_file"))
|
||||
)
|
||||
|
||||
is_auto_frame_load_cmd_operator_running = BoolProperty(default=False); exec(conv("is_auto_frame_load_cmd_operator_running"))
|
||||
is_auto_frame_load_cmd_operator_running: BoolProperty(default=False)
|
||||
|
||||
export_animated_mesh_parent_tooltip = BoolProperty(
|
||||
export_animated_mesh_parent_tooltip: BoolProperty(
|
||||
name="Hint: Export Animated Mesh",
|
||||
description="A parented relation has been detected on this object. If this object"
|
||||
" is moving, enabling the 'Export Animated Mesh' option is required to evaluate"
|
||||
@@ -1150,41 +1159,18 @@ class FlipFluidHelperProperties(bpy.types.PropertyGroup):
|
||||
" animation that is more complex than keyframed loc/rot/scale such as parented objects."
|
||||
" If the object is static, keep this option disabled",
|
||||
default=True,
|
||||
); exec(conv("export_animated_mesh_parent_tooltip"))
|
||||
)
|
||||
|
||||
# Used in Helper Operators > FlipFluidMeasureObjectSpeed operator
|
||||
is_translation_data_available = BoolProperty(default=False); exec(conv("is_translation_data_available"))
|
||||
min_vertex_translation = FloatProperty(default=0.0); exec(conv("min_vertex_translation"))
|
||||
max_vertex_translation = FloatProperty(default=0.0); exec(conv("max_vertex_translation"))
|
||||
avg_vertex_translation = FloatProperty(default=0.0); exec(conv("avg_vertex_translation"))
|
||||
center_translation = FloatProperty(default=0.0); exec(conv("center_translation"))
|
||||
translation_data_object_name = StringProperty(default="Name Not Available"); exec(conv("translation_data_object_name"))
|
||||
translation_data_object_vertices = IntProperty(default=-1); exec(conv("translation_data_object_vertices"))
|
||||
translation_data_object_frame = IntProperty(default=-1); exec(conv("translation_data_object_frame"))
|
||||
translation_data_object_compute_time = IntProperty(default=-1); exec(conv("translation_data_object_compute_time"))
|
||||
|
||||
prepare_geometry_tools_expanded = BoolProperty(default=False); exec(conv("prepare_geometry_tools_expanded"))
|
||||
bake_simulation_expanded = BoolProperty(default=True); exec(conv("bake_simulation_expanded"))
|
||||
add_remove_objects_expanded = BoolProperty(default=False); exec(conv("add_remove_objects_expanded"))
|
||||
outliner_organization_expanded = BoolProperty(default=False); exec(conv("outliner_organization_expanded"))
|
||||
quick_select_expanded = BoolProperty(default=False); exec(conv("quick_select_expanded"))
|
||||
|
||||
command_line_tools_expanded = BoolProperty(default=True); exec(conv("command_line_tools_expanded"))
|
||||
command_line_bake_expanded = BoolProperty(default=False); exec(conv("command_line_bake_expanded"))
|
||||
command_line_render_passes_expanded = BoolProperty(default=False); exec(conv("command_line_render_passes_expanded"))
|
||||
command_line_render_expanded = BoolProperty(default=False); exec(conv("command_line_render_expanded"))
|
||||
command_line_render_frame_expanded = BoolProperty(default=False); exec(conv("command_line_render_frame_expanded"))
|
||||
command_line_render_turbo_tools_expanded = BoolProperty(default=False); exec(conv("command_line_render_turbo_tools_expanded"))
|
||||
command_line_alembic_export_expanded = BoolProperty(default=False); exec(conv("command_line_alembic_export_expanded"))
|
||||
|
||||
geometry_node_tools_expanded = BoolProperty(default=False); exec(conv("geometry_node_tools_expanded"))
|
||||
object_speed_measurement_tools_expanded = BoolProperty(default=False); exec(conv("object_speed_measurement_tools_expanded"))
|
||||
beginner_tools_expanded = BoolProperty(default=False); exec(conv("beginner_tools_expanded"))
|
||||
disable_addon_expanded = BoolProperty(default=False); exec(conv("disable_addon_expanded"))
|
||||
|
||||
quick_viewport_display_expanded = BoolProperty(default=True); exec(conv("quick_viewport_display_expanded"))
|
||||
simulation_playback_expanded = BoolProperty(default=False); exec(conv("simulation_playback_expanded"))
|
||||
render_tools_expanded = BoolProperty(default=False); exec(conv("render_tools_expanded"))
|
||||
is_translation_data_available: BoolProperty(default=False)
|
||||
min_vertex_translation: FloatProperty(default=0.0)
|
||||
max_vertex_translation: FloatProperty(default=0.0)
|
||||
avg_vertex_translation: FloatProperty(default=0.0)
|
||||
center_translation: FloatProperty(default=0.0)
|
||||
translation_data_object_name: StringProperty(default="Name Not Available")
|
||||
translation_data_object_vertices: IntProperty(default=-1)
|
||||
translation_data_object_frame: IntProperty(default=-1)
|
||||
translation_data_object_compute_time: IntProperty(default=-1)
|
||||
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -31,14 +31,13 @@ from ..utils import version_compatibility_utils as vcu
|
||||
|
||||
|
||||
class FlipFluidInflowProperties(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
|
||||
is_enabled = BoolProperty(
|
||||
is_enabled: BoolProperty(
|
||||
name="Enabled",
|
||||
description="Inflow emits fluid into the domain. Tip: keyframe this option on/off to start and stop inflow emission",
|
||||
default=True,
|
||||
); exec(conv("is_enabled"))
|
||||
substep_emissions = IntProperty(
|
||||
)
|
||||
substep_emissions: IntProperty(
|
||||
name="Substep Emissions",
|
||||
description="Number of times fluid is emitted from the inflow"
|
||||
" per simulation substep. Increase to reduce stuttering"
|
||||
@@ -47,22 +46,22 @@ class FlipFluidInflowProperties(bpy.types.PropertyGroup):
|
||||
" substep of a frame",
|
||||
min=0, soft_max=8,
|
||||
default=1,
|
||||
); exec(conv("substep_emissions"))
|
||||
inflow_velocity = FloatVectorProperty(
|
||||
)
|
||||
inflow_velocity: FloatVectorProperty(
|
||||
name="Inflow Velocity",
|
||||
description="Initial velocity of fluid (m/s)",
|
||||
default=(0.0, 0.0, 0.0),
|
||||
subtype='VELOCITY',
|
||||
precision=3,
|
||||
size=3,
|
||||
); exec(conv("inflow_velocity"))
|
||||
append_object_velocity = BoolProperty(
|
||||
)
|
||||
append_object_velocity: BoolProperty(
|
||||
name="Add Object Velocity to Infow",
|
||||
description="Add the velocity of the object to the inflow fluid"
|
||||
" velocity",
|
||||
default=False,
|
||||
); exec(conv("append_object_velocity"))
|
||||
append_object_velocity_influence = FloatProperty(
|
||||
)
|
||||
append_object_velocity_influence: FloatProperty(
|
||||
name="Influence",
|
||||
description="Amount of velocity that is added to the inflow fluid."
|
||||
" A value of 1.0 is normal, less than 1.0 will dampen the"
|
||||
@@ -72,8 +71,8 @@ class FlipFluidInflowProperties(bpy.types.PropertyGroup):
|
||||
soft_min=0.0, soft_max=1.0,
|
||||
default=1.0,
|
||||
precision=2,
|
||||
); exec(conv("append_object_velocity_influence"))
|
||||
priority = IntProperty(
|
||||
)
|
||||
priority: IntProperty(
|
||||
name="Priority",
|
||||
description="Priority that this fluid object is added to the simulation"
|
||||
" during a frame. If multiple fluid/inflow objects are adding fluid"
|
||||
@@ -83,31 +82,31 @@ class FlipFluidInflowProperties(bpy.types.PropertyGroup):
|
||||
" objects",
|
||||
min=-1000000, max=1000000,
|
||||
default=0,
|
||||
); exec(conv("priority"))
|
||||
inflow_velocity_mode = EnumProperty(
|
||||
)
|
||||
inflow_velocity_mode: EnumProperty(
|
||||
name="Velocity Mode",
|
||||
description="Set how the inflow fluid velocity is calculated",
|
||||
items=types.inflow_velocity_modes,
|
||||
default='INFLOW_VELOCITY_MANUAL',
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("inflow_velocity_mode"))
|
||||
inflow_speed = FloatProperty(
|
||||
)
|
||||
inflow_speed: FloatProperty(
|
||||
name="Speed",
|
||||
description="Initial speed of fluid towards target (m/s)",
|
||||
default=0.0,
|
||||
precision=3,
|
||||
); exec(conv("inflow_speed"))
|
||||
inflow_axis_mode = EnumProperty(
|
||||
)
|
||||
inflow_axis_mode: EnumProperty(
|
||||
name="Local Axis",
|
||||
description="Set local axis direction of fluid",
|
||||
items=types.local_axis_directions,
|
||||
default='LOCAL_AXIS_POS_X',
|
||||
); exec(conv("inflow_axis_mode"))
|
||||
target_object = PointerProperty(
|
||||
)
|
||||
target_object: PointerProperty(
|
||||
name="Target Object",
|
||||
type=bpy.types.Object
|
||||
); exec(conv("target_object"))
|
||||
export_animated_target = BoolProperty(
|
||||
)
|
||||
export_animated_target: BoolProperty(
|
||||
name="Export Animated Target",
|
||||
description="Export this object as an animated mesh. Exporting animated meshes are"
|
||||
" slower, only use when necessary. This option is required for any animation that"
|
||||
@@ -116,8 +115,8 @@ class FlipFluidInflowProperties(bpy.types.PropertyGroup):
|
||||
" not needed for static objects",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("export_animated_target"))
|
||||
constrain_fluid_velocity = BoolProperty(
|
||||
)
|
||||
constrain_fluid_velocity: BoolProperty(
|
||||
name="Constrain Fluid Velocity",
|
||||
description="Force fluid inside of the inflow to match the inflow" +
|
||||
" emission velocity. If enabled, the inflow will continue to" +
|
||||
@@ -125,8 +124,8 @@ class FlipFluidInflowProperties(bpy.types.PropertyGroup):
|
||||
" values will have the effect of slowing down fluid emission",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("constrain_fluid_velocity"))
|
||||
source_id = IntProperty(
|
||||
)
|
||||
source_id: IntProperty(
|
||||
name="Source ID Attribute",
|
||||
description="Assign this identifier value to the fluid generated by this inflow. After"
|
||||
" baking, the source ID attribute values can be accessed in a Cycles Attribute Node"
|
||||
@@ -136,8 +135,8 @@ class FlipFluidInflowProperties(bpy.types.PropertyGroup):
|
||||
min=0, soft_max=16,
|
||||
default=0,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("source_id"))
|
||||
viscosity = FloatProperty(
|
||||
)
|
||||
viscosity: FloatProperty(
|
||||
name="Viscosity Attribute",
|
||||
description="Assign this viscosity value to the fluid generated by this object. After"
|
||||
" baking, the viscosity attribute values can be accessed in a Cycles Attribute Node"
|
||||
@@ -146,8 +145,19 @@ class FlipFluidInflowProperties(bpy.types.PropertyGroup):
|
||||
" Fluid World panel",
|
||||
min=0.0,
|
||||
default=0.0,
|
||||
); exec(conv("viscosity"))
|
||||
lifetime = FloatProperty(
|
||||
)
|
||||
density: FloatProperty(
|
||||
name="Density Attribute",
|
||||
description="Assign this density value in g/cm^3 to the fluid generated by this object. After"
|
||||
" baking, the density attribute values can be accessed in a Cycles Attribute Node"
|
||||
" with the name 'flip_density' from the Fac output. This feature"
|
||||
" can be used to create variable density liquids that float or sink. Enable this density feature"
|
||||
" in the Domain World panel",
|
||||
soft_min = 0.05, soft_max=20.0,
|
||||
min=0.0001,
|
||||
default=1.0,
|
||||
)
|
||||
lifetime: FloatProperty(
|
||||
name="Lifetime Attribute",
|
||||
description="Assign this starting lifetime value to the fluid generated by this object."
|
||||
" This value is the amount of time remaining (in seconds) before the fluid is removed from the"
|
||||
@@ -156,14 +166,14 @@ class FlipFluidInflowProperties(bpy.types.PropertyGroup):
|
||||
" Fluid Surface panel",
|
||||
min=0.0,
|
||||
default=1000.0,
|
||||
); exec(conv("lifetime"))
|
||||
lifetime_variance = FloatProperty(
|
||||
)
|
||||
lifetime_variance: FloatProperty(
|
||||
name="Lifetime Variance",
|
||||
description="Add or subtract a random value in seconds to the starting lifetime within the range of this variance value",
|
||||
min=0.0,
|
||||
default=0.0,
|
||||
); exec(conv("lifetime_variance"))
|
||||
color = FloatVectorProperty(
|
||||
)
|
||||
color: FloatVectorProperty(
|
||||
name="Color Attribute",
|
||||
description="Assign this color to the fluid generated by this object. After"
|
||||
" baking, the color attribute values can be accessed in a Cycles Attribute Node"
|
||||
@@ -175,24 +185,24 @@ class FlipFluidInflowProperties(bpy.types.PropertyGroup):
|
||||
size=3,
|
||||
precision=3,
|
||||
subtype='COLOR',
|
||||
); exec(conv("color"))
|
||||
export_animated_mesh = BoolProperty(
|
||||
)
|
||||
export_animated_mesh: BoolProperty(
|
||||
name="Export Animated Mesh",
|
||||
description="Export this mesh as an animated one (slower, only use"
|
||||
" if really necessary [e.g. armatures or parented objects],"
|
||||
" animated pos/rot/scale F-curves do not require it",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("export_animated_mesh"))
|
||||
skip_reexport = BoolProperty(
|
||||
name="Skip re-export",
|
||||
)
|
||||
skip_reexport: BoolProperty(
|
||||
name="Skip Re-export",
|
||||
description="Skip re-exporting this mesh when starting or resuming"
|
||||
" a bake. If this mesh has not been exported or is missing files,"
|
||||
" the addon will automatically export the required files",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("skip_reexport"))
|
||||
force_reexport_on_next_bake = BoolProperty(
|
||||
)
|
||||
force_reexport_on_next_bake: BoolProperty(
|
||||
name="Force Re-Export On Next Bake",
|
||||
description="Override the 'Skip Re-Export' option and force this mesh to be"
|
||||
" re-exported and updated on the next time a simulation start/resumes"
|
||||
@@ -201,22 +211,22 @@ class FlipFluidInflowProperties(bpy.types.PropertyGroup):
|
||||
" This option is only applicable if 'Skip Re-Export' is enabled",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("force_reexport_on_next_bake"))
|
||||
property_registry = PointerProperty(
|
||||
)
|
||||
property_registry: PointerProperty(
|
||||
name="Inflow Property Registry",
|
||||
description="",
|
||||
type=preset_properties.PresetRegistry,
|
||||
); exec(conv("property_registry"))
|
||||
)
|
||||
|
||||
|
||||
disabled_in_viewport_tooltip = BoolProperty(
|
||||
disabled_in_viewport_tooltip: BoolProperty(
|
||||
name="Object Disabled in Viewport",
|
||||
description="This inflow object is currently disabled in the viewport within the"
|
||||
" outliner (Monitor Icon) and will not be included in the simulation. If you"
|
||||
" want the object hidden in the viewport, but still have the object included in the"
|
||||
" simulation, use the outliner Hide in Viewport option instead (Eye Icon)",
|
||||
default=True,
|
||||
); exec(conv("disabled_in_viewport_tooltip"))
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -244,6 +254,7 @@ class FlipFluidInflowProperties(bpy.types.PropertyGroup):
|
||||
add("inflow.inflow_axis_mode", "")
|
||||
add("inflow.source_id", "")
|
||||
add("inflow.viscosity", "")
|
||||
add("inflow.density", "")
|
||||
add("inflow.lifetime", "")
|
||||
add("inflow.lifetime_variance", "")
|
||||
add("inflow.color", "")
|
||||
|
||||
@@ -26,20 +26,19 @@ from ..utils import version_compatibility_utils as vcu
|
||||
|
||||
|
||||
class FlipFluidMaterialLibraryProperties(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
|
||||
# Material Library Data
|
||||
is_library_material = BoolProperty(default=False); exec(conv("is_library_material"))
|
||||
library_name = StringProperty(default=""); exec(conv("library_name"))
|
||||
imported_name = StringProperty(default=""); exec(conv("imported_name"))
|
||||
data_block_id = StringProperty(default="-1"); exec(conv("data_block_id"))
|
||||
is_library_material: BoolProperty(default=False)
|
||||
library_name: StringProperty(default="")
|
||||
imported_name: StringProperty(default="")
|
||||
data_block_id: StringProperty(default="-1")
|
||||
|
||||
# Preset Library Data
|
||||
is_preset_material = BoolProperty(default=False); exec(conv("is_preset_material"))
|
||||
preset_identifier = StringProperty(default=""); exec(conv("preset_identifier"))
|
||||
preset_blend_identifier = StringProperty(default=""); exec(conv("preset_blend_identifier"))
|
||||
is_fake_user_set_by_addon = BoolProperty(default=False); exec(conv("is_fake_user_set_by_addon"))
|
||||
skip_preset_unload = BoolProperty(default=False); exec(conv("skip_preset_unload"))
|
||||
is_preset_material: BoolProperty(default=False)
|
||||
preset_identifier: StringProperty(default="")
|
||||
preset_blend_identifier: StringProperty(default="")
|
||||
is_fake_user_set_by_addon: BoolProperty(default=False)
|
||||
skip_preset_unload: BoolProperty(default=False)
|
||||
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -54,47 +54,45 @@ from ..utils import api_workaround_utils
|
||||
|
||||
|
||||
class ObjectViewSettings(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
hide_render = BoolProperty(default=False); exec(conv("hide_render"))
|
||||
show_name = BoolProperty(default=False); exec(conv("show_name"))
|
||||
draw_type = StringProperty(default=""); exec(conv("draw_type"))
|
||||
layers = BoolVectorProperty(size=20); exec(conv("layers"))
|
||||
hide_render: BoolProperty(default=False)
|
||||
show_name: BoolProperty(default=False)
|
||||
draw_type: StringProperty(default="")
|
||||
layers: BoolVectorProperty(size=20)
|
||||
|
||||
|
||||
class FlipFluidObjectProperties(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
|
||||
domain = PointerProperty(
|
||||
domain: PointerProperty(
|
||||
name="Flip Fluid Domain Properties",
|
||||
description="",
|
||||
type=domain_properties.FlipFluidDomainProperties,
|
||||
); exec(conv("domain"))
|
||||
fluid = PointerProperty(
|
||||
)
|
||||
fluid: PointerProperty(
|
||||
name="Flip Fluid Fluid Properties",
|
||||
description="",
|
||||
type=fluid_properties.FlipFluidFluidProperties,
|
||||
); exec(conv("fluid"))
|
||||
obstacle = PointerProperty(
|
||||
)
|
||||
obstacle: PointerProperty(
|
||||
name="Flip Fluid Obstacle Properties",
|
||||
description="",
|
||||
type=obstacle_properties.FlipFluidObstacleProperties,
|
||||
); exec(conv("obstacle"))
|
||||
inflow = PointerProperty(
|
||||
)
|
||||
inflow: PointerProperty(
|
||||
name="Flip Fluid Inflow Properties",
|
||||
description="",
|
||||
type=inflow_properties.FlipFluidInflowProperties,
|
||||
); exec(conv("inflow"))
|
||||
outflow = PointerProperty(
|
||||
)
|
||||
outflow: PointerProperty(
|
||||
name="Flip Fluid Outflow Properties",
|
||||
description="",
|
||||
type=outflow_properties.FlipFluidOutflowProperties,
|
||||
); exec(conv("outflow"))
|
||||
force_field = PointerProperty(
|
||||
)
|
||||
force_field: PointerProperty(
|
||||
name="Flip Fluid Force Field Properties",
|
||||
description="",
|
||||
type=force_field_properties.FlipFluidForceFieldProperties,
|
||||
); exec(conv("force_field"))
|
||||
object_type = EnumProperty(
|
||||
)
|
||||
object_type: EnumProperty(
|
||||
name="Type",
|
||||
description="Type of participation in the FLIP fluid simulation",
|
||||
items=types.object_types,
|
||||
@@ -102,16 +100,16 @@ class FlipFluidObjectProperties(bpy.types.PropertyGroup):
|
||||
set=lambda self, value: self._set_object_type(value),
|
||||
update=lambda self, context: self._update_object_type(context),
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("object_type"))
|
||||
saved_view_settings = PointerProperty(
|
||||
)
|
||||
saved_view_settings: PointerProperty(
|
||||
name="Saved View Settings",
|
||||
description="",
|
||||
type=ObjectViewSettings,
|
||||
); exec(conv("saved_view_settings"))
|
||||
)
|
||||
|
||||
is_active = BoolProperty(default=False); exec(conv("is_active"))
|
||||
is_view_settings_saved = BoolProperty(default=False); exec(conv("is_view_settings_saved"))
|
||||
last_hide_render_state = BoolProperty(default=False); exec(conv("last_hide_render_state"))
|
||||
is_active: BoolProperty(default=False)
|
||||
is_view_settings_saved: BoolProperty(default=False)
|
||||
last_hide_render_state: BoolProperty(default=False)
|
||||
|
||||
|
||||
@classmethod
|
||||
@@ -198,20 +196,12 @@ class FlipFluidObjectProperties(bpy.types.PropertyGroup):
|
||||
def _toggle_cycles_ray_visibility(self, obj, is_enabled):
|
||||
# Cycles may not be enabled in the user's preferences
|
||||
try:
|
||||
if vcu.is_blender_30():
|
||||
obj.visible_camera = is_enabled
|
||||
obj.visible_diffuse = is_enabled
|
||||
obj.visible_glossy = is_enabled
|
||||
obj.visible_transmission = is_enabled
|
||||
obj.visible_volume_scatter = is_enabled
|
||||
obj.visible_shadow = is_enabled
|
||||
else:
|
||||
obj.cycles_visibility.camera = is_enabled
|
||||
obj.cycles_visibility.transmission = is_enabled
|
||||
obj.cycles_visibility.diffuse = is_enabled
|
||||
obj.cycles_visibility.scatter = is_enabled
|
||||
obj.cycles_visibility.glossy = is_enabled
|
||||
obj.cycles_visibility.shadow = is_enabled
|
||||
obj.visible_camera = is_enabled
|
||||
obj.visible_diffuse = is_enabled
|
||||
obj.visible_glossy = is_enabled
|
||||
obj.visible_transmission = is_enabled
|
||||
obj.visible_volume_scatter = is_enabled
|
||||
obj.visible_shadow = is_enabled
|
||||
except:
|
||||
pass
|
||||
|
||||
@@ -220,8 +210,6 @@ class FlipFluidObjectProperties(bpy.types.PropertyGroup):
|
||||
# Should only be executed upon creation of a domain object in Blender 2.8x.
|
||||
# Locking the Blender interface is necessary to prevent crashes in Blender >= v2.81
|
||||
# and helps prevent crashes in Blender 2.80
|
||||
if not vcu.is_blender_28():
|
||||
return
|
||||
bpy.context.scene.render.use_lock_interface = True
|
||||
|
||||
|
||||
@@ -283,8 +271,6 @@ class FlipFluidObjectProperties(bpy.types.PropertyGroup):
|
||||
|
||||
def _update_object_type(self, context):
|
||||
obj = vcu.get_active_object(context)
|
||||
primary_layer = 0
|
||||
object_layer = 14
|
||||
|
||||
if self.object_type == 'TYPE_DOMAIN':
|
||||
if bpy.context.scene.flip_fluid.get_num_domain_objects() > 1:
|
||||
@@ -346,6 +332,18 @@ class FlipFluidObjectProperties(bpy.types.PropertyGroup):
|
||||
self.object_type = 'TYPE_NONE'
|
||||
return
|
||||
|
||||
if obj.type == 'POINTCLOUD' and self.object_type != 'TYPE_NONE':
|
||||
errmsg = "Point Cloud type objects are not supported."
|
||||
errdesc = "Point Cloud objects are not supported as a FLIP Fluid object type."
|
||||
bpy.ops.flip_fluid_operators.display_error(
|
||||
'INVOKE_DEFAULT',
|
||||
error_message=errmsg,
|
||||
error_description=errdesc,
|
||||
popup_width=600
|
||||
)
|
||||
self.object_type = 'TYPE_NONE'
|
||||
return
|
||||
|
||||
if obj.type == 'META' and self.object_type != 'TYPE_NONE':
|
||||
errmsg = "Metaball type objects are not supported."
|
||||
errdesc = "Metaball type objects are not supported. Please convert to a mesh object before setting as FLIP Fluid object."
|
||||
@@ -459,44 +457,31 @@ class FlipFluidObjectProperties(bpy.types.PropertyGroup):
|
||||
obj.hide_render = True
|
||||
vcu.set_object_display_type(obj, 'BOUNDS')
|
||||
obj.show_name = True
|
||||
self._set_object_layer(obj, object_layer)
|
||||
self._set_scene_layer(context.scene, object_layer)
|
||||
|
||||
elif self.object_type == 'TYPE_FLUID':
|
||||
obj.hide_render = True
|
||||
vcu.set_object_display_type(obj, 'WIRE')
|
||||
obj.show_name = True
|
||||
self._set_object_layer(obj, object_layer)
|
||||
self._set_scene_layer(context.scene, object_layer)
|
||||
|
||||
elif self.object_type == 'TYPE_OBSTACLE':
|
||||
obj.hide_render = False
|
||||
vcu.set_object_display_type(obj, 'TEXTURED')
|
||||
obj.show_name = True
|
||||
self._set_object_layers(obj, [primary_layer, object_layer])
|
||||
self._set_scene_layer(context.scene, primary_layer)
|
||||
self._set_scene_layer(context.scene, object_layer)
|
||||
|
||||
elif self.object_type == 'TYPE_INFLOW':
|
||||
obj.hide_render = True
|
||||
vcu.set_object_display_type(obj, 'WIRE')
|
||||
obj.show_name = True
|
||||
self._set_object_layer(obj, object_layer)
|
||||
self._set_scene_layer(context.scene, object_layer)
|
||||
|
||||
elif self.object_type == 'TYPE_OUTFLOW':
|
||||
obj.hide_render = True
|
||||
vcu.set_object_display_type(obj, 'WIRE')
|
||||
obj.show_name = True
|
||||
self._set_object_layer(obj, object_layer)
|
||||
self._set_scene_layer(context.scene, object_layer)
|
||||
|
||||
elif self.object_type == 'TYPE_FORCE_FIELD':
|
||||
obj.hide_render = True
|
||||
vcu.set_object_display_type(obj, 'WIRE')
|
||||
obj.show_name = True
|
||||
self._set_object_layer(obj, object_layer)
|
||||
self._set_scene_layer(context.scene, object_layer)
|
||||
|
||||
if obj.type == 'CURVE':
|
||||
ff_props = obj.flip_fluid.get_property_group()
|
||||
@@ -510,12 +495,6 @@ class FlipFluidObjectProperties(bpy.types.PropertyGroup):
|
||||
self.saved_view_settings.hide_render = obj.hide_render
|
||||
self.saved_view_settings.show_name = obj.show_name
|
||||
self.saved_view_settings.draw_type = vcu.get_object_display_type(obj)
|
||||
|
||||
# Layers do not seem to be in Blender 2.80
|
||||
if not vcu.is_blender_28():
|
||||
for i in range(20):
|
||||
self.saved_view_settings.layers[i] = obj.layers[i]
|
||||
|
||||
self.is_view_settings_saved = True
|
||||
|
||||
|
||||
@@ -526,45 +505,9 @@ class FlipFluidObjectProperties(bpy.types.PropertyGroup):
|
||||
obj.hide_render = self.saved_view_settings.hide_render
|
||||
obj.show_name = self.saved_view_settings.show_name
|
||||
vcu.set_object_display_type(obj, self.saved_view_settings.draw_type)
|
||||
|
||||
# Layers do not seem to be in Blender 2.80
|
||||
if not vcu.is_blender_28():
|
||||
for i in range(20):
|
||||
obj.layers[i] = True
|
||||
for i in range(20):
|
||||
obj.layers[i] = self.saved_view_settings.layers[i]
|
||||
|
||||
self.is_view_settings_saved = False
|
||||
|
||||
|
||||
def _set_object_layer(self, obj, layeridx):
|
||||
if vcu.is_blender_28():
|
||||
# Layers do not seem to be in Blender 2.80
|
||||
return
|
||||
|
||||
obj.layers[layeridx] = True
|
||||
for i in range(20):
|
||||
obj.layers[i] = (i == layeridx)
|
||||
|
||||
|
||||
def _set_object_layers(self, obj, layers):
|
||||
if vcu.is_blender_28():
|
||||
# Layers do not seem to be in Blender 2.80
|
||||
return
|
||||
|
||||
obj.layers[layers[0]] = True
|
||||
for i in range(20):
|
||||
obj.layers[i] = (i in layers)
|
||||
|
||||
|
||||
def _set_scene_layer(self, scene, layeridx):
|
||||
if vcu.is_blender_28():
|
||||
# Layers do not seem to be in Blender 2.80
|
||||
return
|
||||
|
||||
scene.layers[layeridx] = True
|
||||
|
||||
|
||||
def scene_update_post(scene):
|
||||
domain_properties.scene_update_post(scene)
|
||||
|
||||
|
||||
@@ -26,14 +26,13 @@ from ..utils import version_compatibility_utils as vcu
|
||||
|
||||
|
||||
class FlipFluidObstacleProperties(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
|
||||
is_enabled = BoolProperty(
|
||||
is_enabled: BoolProperty(
|
||||
name="Enabled",
|
||||
description="Obstacle is present in the fluid simulation",
|
||||
default=True,
|
||||
); exec(conv("is_enabled"))
|
||||
is_inversed = BoolProperty(
|
||||
)
|
||||
is_inversed: BoolProperty(
|
||||
name="Inverse",
|
||||
description="Turn the obstacle 'inside-out'. Enabling this option will make the inside solid parts"
|
||||
" of this obstacle empty while everything outside of the obstacle will become solid."
|
||||
@@ -44,8 +43,8 @@ class FlipFluidObstacleProperties(bpy.types.PropertyGroup):
|
||||
" can prevent fluid from generating",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("is_inversed"))
|
||||
export_animated_mesh = BoolProperty(
|
||||
)
|
||||
export_animated_mesh: BoolProperty(
|
||||
name="Export Animated Mesh",
|
||||
description="Export this object as an animated mesh. Exporting animated meshes are"
|
||||
" slower, only use when necessary. This option is required for any animation that"
|
||||
@@ -54,16 +53,16 @@ class FlipFluidObstacleProperties(bpy.types.PropertyGroup):
|
||||
" not needed for static objects",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("export_animated_mesh"))
|
||||
skip_reexport = BoolProperty(
|
||||
name="Skip Mesh Re-Export",
|
||||
)
|
||||
skip_reexport: BoolProperty(
|
||||
name="Skip Re-Export",
|
||||
description="Skip re-exporting this mesh when starting or resuming"
|
||||
" a bake. If this mesh has not been exported or is missing files,"
|
||||
" the addon will automatically export the required files",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("skip_reexport"))
|
||||
force_reexport_on_next_bake = BoolProperty(
|
||||
)
|
||||
force_reexport_on_next_bake: BoolProperty(
|
||||
name="Force Re-Export On Next Bake",
|
||||
description="Override the 'Skip Re-Export' option and force this mesh to be"
|
||||
" re-exported and updated on the next time a simulation start/resumes"
|
||||
@@ -72,16 +71,16 @@ class FlipFluidObstacleProperties(bpy.types.PropertyGroup):
|
||||
" This option is only applicable if 'Skip Re-Export' is enabled",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("force_reexport_on_next_bake"))
|
||||
friction = FloatProperty(
|
||||
)
|
||||
friction: FloatProperty(
|
||||
name="Friction",
|
||||
description="Amount of friction between the fluid and the surface"
|
||||
" of the obstacle",
|
||||
min=0.0, max=1.0,
|
||||
default=0.0,
|
||||
precision=2,
|
||||
); exec(conv("friction"))
|
||||
velocity_scale = FloatProperty(
|
||||
)
|
||||
velocity_scale: FloatProperty(
|
||||
name="Velocity Scale",
|
||||
description="Scale the object velocity by this amount. Values greater than 1.0"
|
||||
" will exaggerate the velocity and the simulation will behave as if the object"
|
||||
@@ -91,8 +90,8 @@ class FlipFluidObstacleProperties(bpy.types.PropertyGroup):
|
||||
soft_min=0.0, soft_max=5.0,
|
||||
default=1.0,
|
||||
precision=2,
|
||||
); exec(conv("velocity_scale"))
|
||||
whitewater_influence = FloatProperty(
|
||||
)
|
||||
whitewater_influence: FloatProperty(
|
||||
name="Whitewater Influence",
|
||||
description="Scale the amount of whitewater generated near this"
|
||||
" obstacle by this value. A value of 1.0 will generate the"
|
||||
@@ -101,8 +100,8 @@ class FlipFluidObstacleProperties(bpy.types.PropertyGroup):
|
||||
min=0.0,
|
||||
default=1.0,
|
||||
precision=2,
|
||||
); exec(conv("whitewater_influence"))
|
||||
dust_emission_strength = FloatProperty(
|
||||
)
|
||||
dust_emission_strength: FloatProperty(
|
||||
name="Dust Emission Strength",
|
||||
description="Scale the amount of whitewater dust particles generated"
|
||||
" near this obstacle by this value. A value of 1.0 will generate the"
|
||||
@@ -112,8 +111,8 @@ class FlipFluidObstacleProperties(bpy.types.PropertyGroup):
|
||||
min=0.0,
|
||||
default=1.0,
|
||||
precision=2,
|
||||
); exec(conv("dust_emission_strength"))
|
||||
sheeting_strength = FloatProperty(
|
||||
)
|
||||
sheeting_strength: FloatProperty(
|
||||
name="Sheeting Strength Multiplier",
|
||||
description="Scale the amount of fluid sheeting strength against this"
|
||||
" obstacle by this value. This parameter will only take effect if"
|
||||
@@ -121,8 +120,8 @@ class FlipFluidObstacleProperties(bpy.types.PropertyGroup):
|
||||
min=0.0,
|
||||
default=1.0,
|
||||
precision=2,
|
||||
); exec(conv("sheeting_strength"))
|
||||
mesh_expansion = FloatProperty(
|
||||
)
|
||||
mesh_expansion: FloatProperty(
|
||||
name="Expand Geometry",
|
||||
description="Expand the obstacle mesh by this value. This setting"
|
||||
" can be used to prevent fluid from slipping through small"
|
||||
@@ -134,22 +133,22 @@ class FlipFluidObstacleProperties(bpy.types.PropertyGroup):
|
||||
soft_min=-0.05, soft_max=0.05,
|
||||
step=0.01,
|
||||
precision=5,
|
||||
); exec(conv("mesh_expansion"))
|
||||
property_registry = PointerProperty(
|
||||
)
|
||||
property_registry: PointerProperty(
|
||||
name="Obstacle Property Registry",
|
||||
description="",
|
||||
type=preset_properties.PresetRegistry,
|
||||
); exec(conv("property_registry"))
|
||||
)
|
||||
|
||||
|
||||
disabled_in_viewport_tooltip = BoolProperty(
|
||||
disabled_in_viewport_tooltip: BoolProperty(
|
||||
name="Object Disabled in Viewport",
|
||||
description="This obstacle object is currently disabled in the viewport within the"
|
||||
" outliner (Monitor Icon) and will not be included in the simulation. If you"
|
||||
" want the object hidden in the viewport, but still have the object included in the"
|
||||
" simulation, use the outliner Hide in Viewport option instead (Eye Icon)",
|
||||
default=True,
|
||||
); exec(conv("disabled_in_viewport_tooltip"))
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -25,32 +25,31 @@ from ..utils import version_compatibility_utils as vcu
|
||||
|
||||
|
||||
class FlipFluidOutflowProperties(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
|
||||
is_enabled = BoolProperty(
|
||||
is_enabled: BoolProperty(
|
||||
name="Enabled",
|
||||
description="Object is active in the fluid simulation",
|
||||
default=True,
|
||||
); exec(conv("is_enabled"))
|
||||
remove_fluid = BoolProperty(
|
||||
)
|
||||
remove_fluid: BoolProperty(
|
||||
name="Remove Fluid",
|
||||
description="Enable removing fluid particles from the domain",
|
||||
default=True,
|
||||
); exec(conv("remove_fluid"))
|
||||
remove_whitewater = bpy.props.BoolProperty(
|
||||
)
|
||||
remove_whitewater: bpy.props.BoolProperty(
|
||||
name="Remove Whitewater",
|
||||
description="Enable removing whitewater particles from the domain",
|
||||
default=True,
|
||||
); exec(conv("remove_whitewater"))
|
||||
is_inversed = BoolProperty(
|
||||
)
|
||||
is_inversed: BoolProperty(
|
||||
name="Inverse",
|
||||
description="Turn the outflow object 'inside-out'. If enabled,"
|
||||
" the outflow will remove fluid that is outside of the mesh"
|
||||
" instead of removing fluid that is inside of the mesh",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("is_inversed"))
|
||||
export_animated_mesh = bpy.props.BoolProperty(
|
||||
)
|
||||
export_animated_mesh: bpy.props.BoolProperty(
|
||||
name="Export Animated Mesh",
|
||||
description="Export this object as an animated mesh. Exporting animated meshes are"
|
||||
" slower, only use when necessary. This option is required for any animation that"
|
||||
@@ -59,16 +58,16 @@ class FlipFluidOutflowProperties(bpy.types.PropertyGroup):
|
||||
" not needed for static objects",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("export_animated_mesh"))
|
||||
skip_reexport = BoolProperty(
|
||||
name="Skip re-export",
|
||||
)
|
||||
skip_reexport: BoolProperty(
|
||||
name="Skip Re-export",
|
||||
description="Skip re-exporting this mesh when starting or resuming"
|
||||
" a bake. If this mesh has not been exported or is missing files,"
|
||||
" the addon will automatically export the required files",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("skip_reexport"))
|
||||
force_reexport_on_next_bake = BoolProperty(
|
||||
)
|
||||
force_reexport_on_next_bake: BoolProperty(
|
||||
name="Force Re-Export On Next Bake",
|
||||
description="Override the 'Skip Re-Export' option and force this mesh to be"
|
||||
" re-exported and updated on the next time a simulation start/resumes"
|
||||
@@ -77,22 +76,22 @@ class FlipFluidOutflowProperties(bpy.types.PropertyGroup):
|
||||
" This option is only applicable if 'Skip Re-Export' is enabled",
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
); exec(conv("force_reexport_on_next_bake"))
|
||||
property_registry = PointerProperty(
|
||||
)
|
||||
property_registry: PointerProperty(
|
||||
name="Outflow Property Registry",
|
||||
description="",
|
||||
type=preset_properties.PresetRegistry,
|
||||
); exec(conv("property_registry"))
|
||||
)
|
||||
|
||||
|
||||
disabled_in_viewport_tooltip = BoolProperty(
|
||||
disabled_in_viewport_tooltip: BoolProperty(
|
||||
name="Object Disabled in Viewport",
|
||||
description="This outflow object is currently disabled in the viewport within the"
|
||||
" outliner (Monitor Icon) and will not be included in the simulation. If you"
|
||||
" want the object hidden in the viewport, but still have the object included in the"
|
||||
" simulation, use the outliner Hide in Viewport option instead (Eye Icon)",
|
||||
default=True,
|
||||
); exec(conv("disabled_in_viewport_tooltip"))
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -50,32 +50,22 @@ def get_addon_preferences(context=None):
|
||||
context = bpy.context
|
||||
|
||||
prefs = vcu.get_blender_preferences(context)
|
||||
if vcu.is_blender_42():
|
||||
id_name = base_package
|
||||
return prefs.addons[id_name].preferences
|
||||
else:
|
||||
id_name = __name__.split(".")[0]
|
||||
if id_name not in prefs.addons:
|
||||
global FAKE_PREFERENCES
|
||||
return FAKE_PREFERENCES
|
||||
return prefs.addons[id_name].preferences
|
||||
id_name = base_package
|
||||
return prefs.addons[id_name].preferences
|
||||
|
||||
|
||||
class FLIPFluidGPUDevice(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
name = StringProperty(); exec(conv("name"))
|
||||
description = StringProperty(); exec(conv("description"))
|
||||
score = FloatProperty(); exec(conv("score"))
|
||||
name: StringProperty()
|
||||
description: StringProperty()
|
||||
score: FloatProperty()
|
||||
|
||||
|
||||
class FLIPFluidColorMixbox(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
color = FloatVectorProperty(default=(0, 0, 0), subtype='COLOR', description="Color mix using Mixbox blending"); exec(conv("color"))
|
||||
color: FloatVectorProperty(default=(0, 0, 0), subtype='COLOR', description="Color mix using Mixbox blending")
|
||||
|
||||
|
||||
class FLIPFluidColorRGB(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
color = FloatVectorProperty(default=(0, 0, 0), subtype='COLOR', description="Color mix using basic RGB blending"); exec(conv("color"))
|
||||
color: FloatVectorProperty(default=(0, 0, 0), subtype='COLOR', description="Color mix using basic RGB blending")
|
||||
|
||||
|
||||
def update_helper_category_name(self, context):
|
||||
@@ -102,27 +92,23 @@ def update_helper_category_name(self, context):
|
||||
|
||||
class FLIPFluidAddonPreferences(bpy.types.AddonPreferences):
|
||||
global FAKE_PREFERENCES
|
||||
if vcu.is_blender_42():
|
||||
bl_idname = base_package
|
||||
else:
|
||||
bl_idname = __name__.split(".")[0]
|
||||
|
||||
bl_idname = base_package
|
||||
option_path_supports_blend_relative = set()
|
||||
if vcu.is_blender_45():
|
||||
# required for relative path support in Blender 4.5+
|
||||
# https://docs.blender.org/api/4.5/bpy_types_enum_items/property_flag_items.html#rna-enum-property-flag-items
|
||||
option_path_supports_blend_relative = {'PATH_SUPPORTS_BLEND_RELATIVE'}
|
||||
|
||||
# required for relative path support in Blender 4.5+
|
||||
# https://docs.blender.org/api/4.5/bpy_types_enum_items/property_flag_items.html#rna-enum-property-flag-items
|
||||
option_path_supports_blend_relative = {'PATH_SUPPORTS_BLEND_RELATIVE'}
|
||||
|
||||
|
||||
preferences_menu_view_mode = EnumProperty(
|
||||
preferences_menu_view_mode: EnumProperty(
|
||||
name="Preferences Menu View",
|
||||
description="Select the preferences category to view",
|
||||
items=types.preferences_menu_view_modes,
|
||||
default='PREFERENCES_MENU_VIEW_GENERAL',
|
||||
options={'HIDDEN'},
|
||||
); exec(vcu.convert_attribute_to_28("preferences_menu_view_mode"))
|
||||
)
|
||||
|
||||
enable_helper = BoolProperty(
|
||||
enable_helper: BoolProperty(
|
||||
name="Enable Helper Sidebar",
|
||||
description="Enable the FLIP Fluid helper menu in the 3D view sidebar."
|
||||
" This menu contains operators to help with workflow and simulation setup",
|
||||
@@ -130,19 +116,17 @@ class FLIPFluidAddonPreferences(bpy.types.AddonPreferences):
|
||||
update=lambda self, context: self._update_enable_helper(context),
|
||||
options={'HIDDEN'},
|
||||
)
|
||||
exec(vcu.convert_attribute_to_28("enable_helper"))
|
||||
FAKE_PREFERENCES.enable_helper = True
|
||||
|
||||
helper_category_name = StringProperty(
|
||||
helper_category_name: StringProperty(
|
||||
name="Panel Category",
|
||||
description="Choose a category for the FLIP Fluids helper panel tab in the sidebar",
|
||||
default="FLIP Fluids",
|
||||
update=lambda self, context: self._update_helper_category_name(context),
|
||||
)
|
||||
exec(vcu.convert_attribute_to_28("helper_category_name"))
|
||||
FAKE_PREFERENCES.helper_category_name = "FLIP Fluids"
|
||||
|
||||
engine_debug_mode = BoolProperty(
|
||||
engine_debug_mode: BoolProperty(
|
||||
name="Engine Debug Mode",
|
||||
description="Enable to run simulation engine in debug mode (slower, but is able to"
|
||||
" generate crash errors). Disabling can speed up simulation by 10% - 15%, but if"
|
||||
@@ -152,10 +136,9 @@ class FLIPFluidAddonPreferences(bpy.types.AddonPreferences):
|
||||
" situation. Running with debug mode on or off will not affect simulation results",
|
||||
default=False,
|
||||
);
|
||||
exec(vcu.convert_attribute_to_28("engine_debug_mode"))
|
||||
FAKE_PREFERENCES.engine_debug_mode = False
|
||||
|
||||
enable_blend_file_logging = BoolProperty(
|
||||
enable_blend_file_logging: BoolProperty(
|
||||
name="Save Blender Installation and Simulation Info to Blend File",
|
||||
description="If enabled, save info about your Blender installation and simulation set up into the"
|
||||
" Blend file. Saving this info into the Blend file helps improve turnaround time when requesting"
|
||||
@@ -165,46 +148,41 @@ class FLIPFluidAddonPreferences(bpy.types.AddonPreferences):
|
||||
" additional items and info when requesting support",
|
||||
default=True,
|
||||
);
|
||||
exec(vcu.convert_attribute_to_28("enable_blend_file_logging"))
|
||||
FAKE_PREFERENCES.enable_blend_file_logging = True
|
||||
|
||||
enable_experimental_build_warning = BoolProperty(
|
||||
enable_experimental_build_warning: BoolProperty(
|
||||
name="Show Experimental Build Warning",
|
||||
description="Disable to hide the experimental build warning/notification in the Physics menu",
|
||||
default=True,
|
||||
);
|
||||
exec(vcu.convert_attribute_to_28("enable_experimental_build_warning"))
|
||||
FAKE_PREFERENCES.enable_experimental_build_warning = True
|
||||
|
||||
enable_extra_features = BoolProperty(
|
||||
enable_extra_features: BoolProperty(
|
||||
name="Enable Extra Features",
|
||||
description="Enable to unlock extra features"
|
||||
" that may be considered unstable for rendering, baking, and exporting due to current bugs in Blender."
|
||||
" Rendering issues can be completely avoided by rendering from the command line",
|
||||
default=True,
|
||||
);
|
||||
exec(vcu.convert_attribute_to_28("enable_extra_features"))
|
||||
FAKE_PREFERENCES.enable_extra_features = False
|
||||
|
||||
enable_support_tools = BoolProperty(
|
||||
enable_support_tools: BoolProperty(
|
||||
name="Enable Technical Support Tools",
|
||||
description="Used by the developers to assist in technical support requests",
|
||||
default=False,
|
||||
);
|
||||
exec(vcu.convert_attribute_to_28("enable_support_tools"))
|
||||
FAKE_PREFERENCES.enable_support_tools = False
|
||||
|
||||
cmd_save_blend_file_before_launch = BoolProperty(
|
||||
cmd_save_blend_file_before_launch: BoolProperty(
|
||||
name="Autosave Blend file before launching command line operators",
|
||||
description="Command line operators require the Blend file to be saved for changes to take effect when using command"
|
||||
" line operators. If enabled, the Blend file will be automatically saved when using command line operators so that"
|
||||
" manual saving is not necessary",
|
||||
default=True,
|
||||
);
|
||||
exec(vcu.convert_attribute_to_28("cmd_save_blend_file_before_launch"))
|
||||
FAKE_PREFERENCES.cmd_save_blend_file_before_launch = True
|
||||
|
||||
cmd_bake_max_attempts = IntProperty(
|
||||
cmd_bake_max_attempts: IntProperty(
|
||||
name="Max Attempts",
|
||||
description="When using the command line baking operator, if a bake fails due to a crash or an error, attempt"
|
||||
" to automatically re-launch and resume the baking process. This value is the maximum number of attempts that"
|
||||
@@ -213,20 +191,18 @@ class FLIPFluidAddonPreferences(bpy.types.AddonPreferences):
|
||||
default=5,
|
||||
options={'HIDDEN'},
|
||||
)
|
||||
exec(vcu.convert_attribute_to_28("cmd_bake_max_attempts"))
|
||||
FAKE_PREFERENCES.cmd_bake_max_attempts = False
|
||||
|
||||
enable_bake_alarm = BoolProperty(
|
||||
enable_bake_alarm: BoolProperty(
|
||||
name="Play alarm after simulation finishes",
|
||||
description="Play an alarm sound when the simulation baking process completes. The alarm will sound on both a"
|
||||
" successful bake as well as a bake where an error is encountered. This feature may not work correctly if"
|
||||
" a crash is encountered",
|
||||
default=False,
|
||||
);
|
||||
exec(vcu.convert_attribute_to_28("enable_bake_alarm"))
|
||||
FAKE_PREFERENCES.enable_experimental_build_warning = False
|
||||
|
||||
enable_presets = BoolProperty(
|
||||
enable_presets: BoolProperty(
|
||||
name="Enable Presets",
|
||||
description="Presets are a deprecated feature that will no longer be updated. Enable to use the older preset"
|
||||
" features, but be aware that you may encounter bugs or issues. Use at your own risk. Blender must be"
|
||||
@@ -234,82 +210,71 @@ class FLIPFluidAddonPreferences(bpy.types.AddonPreferences):
|
||||
default=False,
|
||||
options={'HIDDEN'},
|
||||
)
|
||||
exec(vcu.convert_attribute_to_28("enable_presets"))
|
||||
FAKE_PREFERENCES.enable_presets = False
|
||||
|
||||
selected_gpu_device = EnumProperty(
|
||||
selected_gpu_device: EnumProperty(
|
||||
name="GPU Compute Device",
|
||||
description="Device that will be used for GPU acceleration features",
|
||||
items=lambda self, context=None: self._get_gpu_device_enums(context),
|
||||
)
|
||||
exec(vcu.convert_attribute_to_28("selected_gpu_device"))
|
||||
FAKE_PREFERENCES.selected_gpu_device = None
|
||||
|
||||
gpu_devices = CollectionProperty(type=FLIPFluidGPUDevice)
|
||||
exec(vcu.convert_attribute_to_28("gpu_devices"))
|
||||
gpu_devices: CollectionProperty(type=FLIPFluidGPUDevice)
|
||||
FAKE_PREFERENCES.gpu_devices = []
|
||||
|
||||
is_gpu_devices_initialized = BoolProperty(False)
|
||||
exec(vcu.convert_attribute_to_28("is_gpu_devices_initialized"))
|
||||
is_gpu_devices_initialized: BoolProperty(False)
|
||||
FAKE_PREFERENCES.is_gpu_devices_initialized = False
|
||||
|
||||
show_mixbox_menu = BoolProperty(default=False)
|
||||
exec(vcu.convert_attribute_to_28("show_mixbox_menu"))
|
||||
show_mixbox_menu: BoolProperty(default=False)
|
||||
FAKE_PREFERENCES.show_mixbox_menu = False
|
||||
|
||||
is_mixbox_installation_error = BoolProperty(default=False)
|
||||
exec(vcu.convert_attribute_to_28("is_mixbox_installation_error"))
|
||||
is_mixbox_installation_error: BoolProperty(default=False)
|
||||
FAKE_PREFERENCES.is_mixbox_installation_error = False
|
||||
|
||||
mixbox_installation_error_message = StringProperty(default="")
|
||||
exec(vcu.convert_attribute_to_28("mixbox_installation_error_message"))
|
||||
mixbox_installation_error_message: StringProperty(default="")
|
||||
FAKE_PREFERENCES.mixbox_installation_error_message = ""
|
||||
|
||||
mixbox_color1 = FloatVectorProperty(
|
||||
mixbox_color1: FloatVectorProperty(
|
||||
name="Color 1",
|
||||
subtype='COLOR',
|
||||
default=(0.0, 0.0, 0.24),
|
||||
min=0.0, max=1.0,
|
||||
description="Color Input 1",
|
||||
update=lambda self, context: self._update_mixbox_color_test(context),
|
||||
); exec(vcu.convert_attribute_to_28("mixbox_color1"))
|
||||
)
|
||||
|
||||
mixbox_color2 = FloatVectorProperty(
|
||||
mixbox_color2: FloatVectorProperty(
|
||||
name="Color 2",
|
||||
subtype='COLOR',
|
||||
default=(0.7, 0.7, 0.0),
|
||||
min=0.0, max=1.0,
|
||||
description="Color Input 2",
|
||||
update=lambda self, context: self._update_mixbox_color_test(context),
|
||||
); exec(vcu.convert_attribute_to_28("mixbox_color2"))
|
||||
)
|
||||
|
||||
num_gradient_samples = IntProperty(default=25)
|
||||
exec(vcu.convert_attribute_to_28("num_gradient_samples"))
|
||||
num_gradient_samples: IntProperty(default=25)
|
||||
FAKE_PREFERENCES.num_gradient_samples = 0
|
||||
|
||||
mixbox_gradient_result = CollectionProperty(type=FLIPFluidColorMixbox)
|
||||
exec(vcu.convert_attribute_to_28("mixbox_gradient_result"))
|
||||
mixbox_gradient_result: CollectionProperty(type=FLIPFluidColorMixbox)
|
||||
FAKE_PREFERENCES.mixbox_gradient_result = []
|
||||
|
||||
rgb_gradient_result = CollectionProperty(type=FLIPFluidColorRGB)
|
||||
exec(vcu.convert_attribute_to_28("rgb_gradient_result"))
|
||||
rgb_gradient_result: CollectionProperty(type=FLIPFluidColorRGB)
|
||||
FAKE_PREFERENCES.rgb_gradient_result = []
|
||||
|
||||
test_mixbox_expanded = BoolProperty(
|
||||
test_mixbox_expanded: BoolProperty(
|
||||
default=False,
|
||||
update=lambda self, context: self._update_mixbox_color_test(context)
|
||||
);
|
||||
exec(vcu.convert_attribute_to_28("test_mixbox_expanded"))
|
||||
|
||||
preset_library_install_mode = EnumProperty(
|
||||
preset_library_install_mode: EnumProperty(
|
||||
name="Preset Library Install Method",
|
||||
description="Installation Method",
|
||||
items=types.preset_library_install_modes,
|
||||
default='PRESET_LIBRARY_INSTALL_ZIP',
|
||||
options={'HIDDEN'},
|
||||
); exec(vcu.convert_attribute_to_28("preset_library_install_mode"))
|
||||
)
|
||||
|
||||
preset_library_install_location = StringProperty(
|
||||
preset_library_install_location: StringProperty(
|
||||
name="",
|
||||
description="Select a location to install the Preset Scenes Library."
|
||||
" This should be a location on your system where you have read and write file permissions",
|
||||
@@ -317,21 +282,17 @@ class FLIPFluidAddonPreferences(bpy.types.AddonPreferences):
|
||||
subtype='DIR_PATH',
|
||||
options=option_path_supports_blend_relative,
|
||||
);
|
||||
exec(vcu.convert_attribute_to_28("preset_library_install_location"))
|
||||
FAKE_PREFERENCES.preset_library_install_location = ""
|
||||
|
||||
is_preset_library_installation_error = BoolProperty(default=False)
|
||||
exec(vcu.convert_attribute_to_28("is_preset_library_installation_error"))
|
||||
is_preset_library_installation_error: BoolProperty(default=False)
|
||||
FAKE_PREFERENCES.is_preset_library_installation_error = False
|
||||
|
||||
preset_library_installation_error_message = StringProperty(default="")
|
||||
exec(vcu.convert_attribute_to_28("preset_library_installation_error_message"))
|
||||
preset_library_installation_error_message: StringProperty(default="")
|
||||
FAKE_PREFERENCES.preset_library_installation_error_message = ""
|
||||
|
||||
preset_library_installations_expanded = BoolProperty(default=True);
|
||||
exec(vcu.convert_attribute_to_28("preset_library_installations_expanded"))
|
||||
preset_library_installations_expanded: BoolProperty(default=True);
|
||||
|
||||
dismiss_T88811_crash_warning = BoolProperty(
|
||||
dismiss_T88811_crash_warning: BoolProperty(
|
||||
name="Dismiss render crash bug warnings",
|
||||
description="Dismiss warnings in UI when features are enabled that can trigger a"
|
||||
" bug in Blender (T88811) that can cause frequent render crashes or incorrect"
|
||||
@@ -340,10 +301,9 @@ class FLIPFluidAddonPreferences(bpy.types.AddonPreferences):
|
||||
" cmd render. This option can be reset in the addon preferences",
|
||||
default=False,
|
||||
);
|
||||
exec(vcu.convert_attribute_to_28("dismiss_T88811_crash_warning"))
|
||||
FAKE_PREFERENCES.dismiss_T88811_crash_warning = False
|
||||
|
||||
dismiss_persistent_data_render_warning = BoolProperty(
|
||||
dismiss_persistent_data_render_warning: BoolProperty(
|
||||
name="Dismiss persistent data warnings",
|
||||
description="Dismiss warnings in UI when the Cycles Persistent Data option is enabled."
|
||||
" This render option is not compatible with the simulation meshes and can cause render"
|
||||
@@ -353,10 +313,9 @@ class FLIPFluidAddonPreferences(bpy.types.AddonPreferences):
|
||||
" automatically launch a cmd render. This option can be reset in the addon preferences",
|
||||
default=False,
|
||||
);
|
||||
exec(vcu.convert_attribute_to_28("dismiss_persistent_data_render_warning"))
|
||||
FAKE_PREFERENCES.dismiss_persistent_data_render_warning = False
|
||||
|
||||
dismiss_rtx_driver_warning = BoolProperty(
|
||||
dismiss_rtx_driver_warning: BoolProperty(
|
||||
name="Dismiss NVIDIA GeForce RTX Driver Warning",
|
||||
description="Dismiss warning in the FLIP Fluids preferences menu related to a recent NVIDIA"
|
||||
" GeForce RTX 'Game Ready Driver' update that may cause Blender to crash frequently when baking"
|
||||
@@ -365,10 +324,9 @@ class FLIPFluidAddonPreferences(bpy.types.AddonPreferences):
|
||||
" creation software",
|
||||
default=False,
|
||||
);
|
||||
exec(vcu.convert_attribute_to_28("dismiss_rtx_driver_warning"))
|
||||
FAKE_PREFERENCES.dismiss_rtx_driver_warning = False
|
||||
|
||||
dismiss_export_animated_mesh_parented_relation_hint = BoolProperty(
|
||||
dismiss_export_animated_mesh_parented_relation_hint: BoolProperty(
|
||||
name="Dismiss 'Export Animated Mesh' parented relation hint",
|
||||
description="Dismiss hints about enabling 'Export Animated Mesh' in the FLIP object UI"
|
||||
" when parented relations are detected. The 'Export Animated Mesh' option is required"
|
||||
@@ -377,10 +335,9 @@ class FLIPFluidAddonPreferences(bpy.types.AddonPreferences):
|
||||
" This option is not needed for static objects",
|
||||
default=False,
|
||||
);
|
||||
exec(vcu.convert_attribute_to_28("dismiss_export_animated_mesh_parented_relation_hint"))
|
||||
FAKE_PREFERENCES.dismiss_export_animated_mesh_parented_relation_hint = False
|
||||
|
||||
enable_tabbed_domain_settings_view = BoolProperty(
|
||||
enable_tabbed_domain_settings_view: BoolProperty(
|
||||
name="Enable Tabbed Domain Settings",
|
||||
description="Enable tabbed domain settings view. If enabled, domain panel categories will be displayed"
|
||||
" using a tab header selector. If disabled, the classic view will display all domain panel categories"
|
||||
@@ -388,7 +345,6 @@ class FLIPFluidAddonPreferences(bpy.types.AddonPreferences):
|
||||
default=True,
|
||||
options={'HIDDEN'},
|
||||
)
|
||||
exec(vcu.convert_attribute_to_28("enable_tabbed_domain_settings_view"))
|
||||
FAKE_PREFERENCES.enable_tabbed_domain_settings_view = True
|
||||
|
||||
|
||||
@@ -482,12 +438,8 @@ class FLIPFluidAddonPreferences(bpy.types.AddonPreferences):
|
||||
icon="URL"
|
||||
).url = "https://scrtwpns.com/mixbox/"
|
||||
return
|
||||
|
||||
if not vcu.is_blender_293():
|
||||
box.label(text="Blender 2.93 or later is required for this feature", icon='ERROR')
|
||||
|
||||
column = box.column(align=True)
|
||||
column.enabled = vcu.is_blender_293()
|
||||
if not is_installed:
|
||||
subbox = column.box()
|
||||
sub_column = subbox.column(align=True)
|
||||
@@ -624,9 +576,6 @@ class FLIPFluidAddonPreferences(bpy.types.AddonPreferences):
|
||||
box = self.layout.box()
|
||||
box.label(text="Install Preset Scenes Library:")
|
||||
|
||||
if not vcu.is_blender_33():
|
||||
box.label(text="Blender 3.3 or later is required for this feature", icon="ERROR")
|
||||
|
||||
subbox = box.box()
|
||||
column = subbox.column(align=True)
|
||||
column.label(text="This is an initial test phase for the new Preset Library integration into the", icon="INFO")
|
||||
@@ -638,7 +587,6 @@ class FLIPFluidAddonPreferences(bpy.types.AddonPreferences):
|
||||
).url = "https://github.com/rlguy/Blender-FLIP-Fluids/wiki/Preset-Library-Installation-and-Uninstallation"
|
||||
|
||||
column = box.column(align=True)
|
||||
column.enabled = vcu.is_blender_33()
|
||||
|
||||
row = column.row()
|
||||
row.prop(self, "preset_library_install_mode", expand=True)
|
||||
@@ -812,15 +760,14 @@ class FLIPFluidAddonPreferences(bpy.types.AddonPreferences):
|
||||
row.label(text="")
|
||||
helper_column.separator()
|
||||
|
||||
if vcu.is_blender_28():
|
||||
box = self.layout.box()
|
||||
box.enabled = is_installation_complete
|
||||
helper_column = box.column(align=True)
|
||||
helper_column.label(text="Sounds:")
|
||||
row = helper_column.row(align=True)
|
||||
row.alignment = 'LEFT'
|
||||
row.prop(self, "enable_bake_alarm")
|
||||
row.operator("flip_fluid_operators.test_bake_alarm", icon='PLAY_SOUND')
|
||||
box = self.layout.box()
|
||||
box.enabled = is_installation_complete
|
||||
helper_column = box.column(align=True)
|
||||
helper_column.label(text="Sounds:")
|
||||
row = helper_column.row(align=True)
|
||||
row.alignment = 'LEFT'
|
||||
row.prop(self, "enable_bake_alarm")
|
||||
row.operator("flip_fluid_operators.test_bake_alarm", icon='PLAY_SOUND')
|
||||
|
||||
box = self.layout.box()
|
||||
box.enabled = is_installation_complete
|
||||
@@ -981,8 +928,8 @@ class FLIPFluidAddonPreferences(bpy.types.AddonPreferences):
|
||||
).url = "https://www.instagram.com/flip.fluids/"
|
||||
row.operator(
|
||||
"wm.url_open",
|
||||
text="Twitter",
|
||||
).url = "https://twitter.com/flipfluids"
|
||||
text="X (Twitter)",
|
||||
).url = "https://x.com/flipfluids"
|
||||
row.operator(
|
||||
"wm.url_open",
|
||||
text="Facebook",
|
||||
|
||||
@@ -37,18 +37,16 @@ DUMMY_DOMAIN_OBJECT = None
|
||||
|
||||
|
||||
class PresetRegistryProperty(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
path = StringProperty(); exec(conv("path"))
|
||||
label = StringProperty(); exec(conv("label"))
|
||||
is_key = BoolProperty(); exec(conv("is_key"))
|
||||
key_path = StringProperty(); exec(conv("key_path"))
|
||||
key_value = StringProperty(); exec(conv("key_value"))
|
||||
group_id = IntProperty(); exec(conv("group_id"))
|
||||
path: StringProperty()
|
||||
label: StringProperty()
|
||||
is_key: BoolProperty()
|
||||
key_path: StringProperty()
|
||||
key_value: StringProperty()
|
||||
group_id: IntProperty()
|
||||
|
||||
|
||||
class PresetRegistry(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
properties = CollectionProperty(type=PresetRegistryProperty); exec(conv("properties"))
|
||||
properties: CollectionProperty(type=PresetRegistryProperty)
|
||||
|
||||
|
||||
def clear(self):
|
||||
@@ -75,28 +73,27 @@ class PresetRegistry(bpy.types.PropertyGroup):
|
||||
|
||||
|
||||
class NewPresetPackageSettings(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
name = StringProperty(
|
||||
name: StringProperty(
|
||||
name="",
|
||||
description="Preset package name",
|
||||
default="New Package"
|
||||
); exec(conv("name"))
|
||||
author = StringProperty(
|
||||
)
|
||||
author: StringProperty(
|
||||
name="",
|
||||
description="Preset package author (optional)",
|
||||
default=""
|
||||
); exec(conv("author"))
|
||||
description = StringProperty(
|
||||
)
|
||||
description: StringProperty(
|
||||
name="",
|
||||
description="Preset package description (optional)",
|
||||
default=""
|
||||
); exec(conv("description"))
|
||||
use_custom_icons = BoolProperty(
|
||||
)
|
||||
use_custom_icons: BoolProperty(
|
||||
name="",
|
||||
description="Use custom icon images for package presets. "
|
||||
"Images should be 256x256 resolution and PNG format",
|
||||
default=False
|
||||
); exec(conv("use_custom_icons"))
|
||||
)
|
||||
|
||||
|
||||
def reset(self):
|
||||
@@ -116,12 +113,11 @@ class NewPresetPackageSettings(bpy.types.PropertyGroup):
|
||||
|
||||
|
||||
class DeletePresetPackageSettings(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
package = EnumProperty(
|
||||
package: EnumProperty(
|
||||
name="Remove Package",
|
||||
description="Select a package to remove",
|
||||
items=preset_library.get_deletable_package_enums,
|
||||
); exec(conv("package"))
|
||||
)
|
||||
|
||||
|
||||
def reset(self):
|
||||
@@ -129,12 +125,11 @@ class DeletePresetPackageSettings(bpy.types.PropertyGroup):
|
||||
|
||||
|
||||
class PresetPropertyUI(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
path = StringProperty(default=""); exec(conv("path"))
|
||||
label = StringProperty(default=""); exec(conv("label"))
|
||||
value = StringProperty(default=""); exec(conv("value"))
|
||||
enabled = BoolProperty(default=True); exec(conv("enabled"))
|
||||
dummy_prop = BoolProperty(default=True); exec(conv("dummy_prop"))
|
||||
path: StringProperty(default="")
|
||||
label: StringProperty(default="")
|
||||
value: StringProperty(default="")
|
||||
enabled: BoolProperty(default=True)
|
||||
dummy_prop: BoolProperty(default=True)
|
||||
|
||||
|
||||
def set_value(self, value):
|
||||
@@ -148,17 +143,16 @@ class PresetPropertyUI(bpy.types.PropertyGroup):
|
||||
|
||||
|
||||
class PresetPropertiesUI(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
simulation = CollectionProperty(type=PresetPropertyUI); exec(conv("simulation"))
|
||||
render = CollectionProperty(type=PresetPropertyUI); exec(conv("render"))
|
||||
surface = CollectionProperty(type=PresetPropertyUI); exec(conv("surface"))
|
||||
whitewater = CollectionProperty(type=PresetPropertyUI); exec(conv("whitewater"))
|
||||
world = CollectionProperty(type=PresetPropertyUI); exec(conv("world"))
|
||||
materials = CollectionProperty(type=PresetPropertyUI); exec(conv("materials"))
|
||||
advanced = CollectionProperty(type=PresetPropertyUI); exec(conv("advanced"))
|
||||
debug = CollectionProperty(type=PresetPropertyUI); exec(conv("debug"))
|
||||
stats = CollectionProperty(type=PresetPropertyUI); exec(conv("stats"))
|
||||
is_initialized = BoolProperty(default=False); exec(conv("is_initialized"))
|
||||
simulation: CollectionProperty(type=PresetPropertyUI)
|
||||
render: CollectionProperty(type=PresetPropertyUI)
|
||||
surface: CollectionProperty(type=PresetPropertyUI)
|
||||
whitewater: CollectionProperty(type=PresetPropertyUI)
|
||||
world: CollectionProperty(type=PresetPropertyUI)
|
||||
materials: CollectionProperty(type=PresetPropertyUI)
|
||||
advanced: CollectionProperty(type=PresetPropertyUI)
|
||||
debug: CollectionProperty(type=PresetPropertyUI)
|
||||
stats: CollectionProperty(type=PresetPropertyUI)
|
||||
is_initialized: BoolProperty(default=False)
|
||||
|
||||
|
||||
def initialize(self):
|
||||
@@ -406,24 +400,23 @@ class PresetPropertiesUI(bpy.types.PropertyGroup):
|
||||
|
||||
|
||||
class NewPresetSettings(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
|
||||
package = EnumProperty(
|
||||
package: EnumProperty(
|
||||
name="Preset Package",
|
||||
description="Add preset to this package",
|
||||
items=preset_library.get_user_package_enums,
|
||||
); exec(conv("package"))
|
||||
name = StringProperty(
|
||||
)
|
||||
name: StringProperty(
|
||||
name="Name",
|
||||
description="Preset name",
|
||||
default="New Preset"
|
||||
); exec(conv("name"))
|
||||
description = StringProperty(
|
||||
)
|
||||
description: StringProperty(
|
||||
name="Description",
|
||||
description="Preset description (optional)",
|
||||
default=""
|
||||
); exec(conv("description"))
|
||||
icon = StringProperty(
|
||||
)
|
||||
icon: StringProperty(
|
||||
name="Icon",
|
||||
description="Icons should be 256x256 resolution and in PNG format."
|
||||
" Images must be imported into the Blender UV/Image Editor before"
|
||||
@@ -431,87 +424,87 @@ class NewPresetSettings(bpy.types.PropertyGroup):
|
||||
" this popup",
|
||||
default="",
|
||||
update=lambda self, context=None: self._update_icon(context),
|
||||
); exec(conv("icon"))
|
||||
display_icon = EnumProperty(
|
||||
)
|
||||
display_icon: EnumProperty(
|
||||
name="Preset Icon",
|
||||
description="",
|
||||
items=lambda self, context=None: self._get_display_icon_enum(context),
|
||||
); exec(conv("display_icon"))
|
||||
export_simulation = BoolProperty(
|
||||
)
|
||||
export_simulation: BoolProperty(
|
||||
name="Simulation",
|
||||
description="Export 'FLIP Fluid Simulation' panel settings",
|
||||
default=False,
|
||||
update=lambda self, context=None: self._check_current_display_panel(context),
|
||||
); exec(conv("export_simulation"))
|
||||
export_display = BoolProperty(
|
||||
)
|
||||
export_display: BoolProperty(
|
||||
name="Display Settings",
|
||||
description="Export 'FLIP Fluid Display Settings' panel settings",
|
||||
default=False,
|
||||
update=lambda self, context=None: self._check_current_display_panel(context),
|
||||
); exec(conv("export_display"))
|
||||
export_surface = BoolProperty(
|
||||
)
|
||||
export_surface: BoolProperty(
|
||||
name="Surface",
|
||||
description="Export 'FLIP Fluid Surface' panel settings",
|
||||
default=False,
|
||||
update=lambda self, context=None: self._check_current_display_panel(context),
|
||||
); exec(conv("export_surface"))
|
||||
export_whitewater = BoolProperty(
|
||||
)
|
||||
export_whitewater: BoolProperty(
|
||||
name="Whitewater",
|
||||
description="Export 'FLIP Fluid Whitewater' panel settings",
|
||||
default=False,
|
||||
update=lambda self, context=None: self._check_current_display_panel(context),
|
||||
); exec(conv("export_whitewater"))
|
||||
export_world = BoolProperty(
|
||||
)
|
||||
export_world: BoolProperty(
|
||||
name="World",
|
||||
description="Export 'FLIP Fluid World' panel settings",
|
||||
default=False,
|
||||
update=lambda self, context=None: self._check_current_display_panel(context),
|
||||
); exec(conv("export_world"))
|
||||
export_materials = BoolProperty(
|
||||
)
|
||||
export_materials: BoolProperty(
|
||||
name="Materials",
|
||||
description="Export 'FLIP Fluid Materials' panel settings",
|
||||
default=False,
|
||||
update=lambda self, context=None: self._check_current_display_panel(context),
|
||||
); exec(conv("export_materials"))
|
||||
export_advanced = BoolProperty(
|
||||
)
|
||||
export_advanced: BoolProperty(
|
||||
name="Advanced",
|
||||
description="Export 'FLIP Fluid Advanced' panel settings",
|
||||
default=False,
|
||||
update=lambda self, context=None: self._check_current_display_panel(context),
|
||||
); exec(conv("export_advanced"))
|
||||
export_debug = BoolProperty(
|
||||
)
|
||||
export_debug: BoolProperty(
|
||||
name="Debug",
|
||||
description="Export 'FLIP Fluid Debug' panel settings",
|
||||
default=False,
|
||||
update=lambda self, context=None: self._check_current_display_panel(context),
|
||||
); exec(conv("export_debug"))
|
||||
export_stats = BoolProperty(
|
||||
)
|
||||
export_stats: BoolProperty(
|
||||
name="Stats",
|
||||
description="Export 'FLIP Fluid Stats' panel settings",
|
||||
default=False,
|
||||
update=lambda self, context=None: self._check_current_display_panel(context),
|
||||
); exec(conv("export_stats"))
|
||||
ui_sort = BoolProperty(
|
||||
)
|
||||
ui_sort: BoolProperty(
|
||||
name="Sort Attributes",
|
||||
description="Sort attributes by enabled/disabled",
|
||||
default=False,
|
||||
); exec(conv("ui_sort"))
|
||||
current_display_panel = EnumProperty(
|
||||
)
|
||||
current_display_panel: EnumProperty(
|
||||
name="Current Preset Display",
|
||||
description="Current preset panel to display",
|
||||
items=lambda self, context=None: self.get_preset_panel_selector_enums(context),
|
||||
); exec(conv("current_display_panel"))
|
||||
)
|
||||
|
||||
|
||||
ui_properties = PointerProperty(type=PresetPropertiesUI); exec(conv("ui_properties"))
|
||||
is_unedited = BoolProperty(default=True); exec(conv("is_unedited"))
|
||||
ui_properties: PointerProperty(type=PresetPropertiesUI)
|
||||
is_unedited: BoolProperty(default=True)
|
||||
|
||||
# If set to 'True', new preset menu will automatically select which
|
||||
# panels to export by comparing current property values to system devault
|
||||
# values.
|
||||
# If set to 'False', new preset menu will start with a blank panel
|
||||
# export selection.
|
||||
autoselect_exported_panels = BoolProperty(default=False); exec(conv("autoselect_exported_panels"))
|
||||
autoselect_exported_panels: BoolProperty(default=False)
|
||||
|
||||
|
||||
def initialize(self):
|
||||
@@ -768,18 +761,17 @@ class NewPresetSettings(bpy.types.PropertyGroup):
|
||||
|
||||
|
||||
class DeletePresetSettings(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
|
||||
package = EnumProperty(
|
||||
package: EnumProperty(
|
||||
name="Package",
|
||||
description="Select preset package",
|
||||
items=preset_library.get_user_package_enums,
|
||||
); exec(conv("package"))
|
||||
preset = EnumProperty(
|
||||
)
|
||||
preset: EnumProperty(
|
||||
name="Remove Preset",
|
||||
description="Select a preset to remove",
|
||||
items=preset_library.get_deletable_preset_enums,
|
||||
); exec(conv("preset"))
|
||||
)
|
||||
|
||||
|
||||
def reset(self):
|
||||
@@ -811,45 +803,42 @@ class DeletePresetSettings(bpy.types.PropertyGroup):
|
||||
|
||||
|
||||
class ExportPresetPackageSettings(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
|
||||
option_path_supports_blend_relative = set()
|
||||
if vcu.is_blender_45():
|
||||
# required for relative path support in Blender 4.5+
|
||||
# https://docs.blender.org/api/4.5/bpy_types_enum_items/property_flag_items.html#rna-enum-property-flag-items
|
||||
option_path_supports_blend_relative = {'PATH_SUPPORTS_BLEND_RELATIVE'}
|
||||
# required for relative path support in Blender 4.5+
|
||||
# https://docs.blender.org/api/4.5/bpy_types_enum_items/property_flag_items.html#rna-enum-property-flag-items
|
||||
option_path_supports_blend_relative = {'PATH_SUPPORTS_BLEND_RELATIVE'}
|
||||
|
||||
package = EnumProperty(
|
||||
package: EnumProperty(
|
||||
name="Export Package",
|
||||
description="Select a package to export",
|
||||
items=preset_library.get_exportable_package_enums,
|
||||
update=lambda self, context: self._initialize_export_filename(),
|
||||
); exec(conv("package"))
|
||||
export_directory = StringProperty(
|
||||
)
|
||||
export_directory: StringProperty(
|
||||
name="",
|
||||
description="Preset package will be exported to this directory",
|
||||
default=vcu.get_blender_preferences_temporary_directory(),
|
||||
subtype='DIR_PATH',
|
||||
options=option_path_supports_blend_relative,
|
||||
); exec(conv("export_directory"))
|
||||
export_filename = StringProperty(
|
||||
)
|
||||
export_filename: StringProperty(
|
||||
name="",
|
||||
description="Filename of exported package",
|
||||
default="",
|
||||
update=lambda self, context: self._initialize_export_filepath(),
|
||||
); exec(conv("export_filename"))
|
||||
export_filepath = StringProperty(
|
||||
)
|
||||
export_filepath: StringProperty(
|
||||
name="",
|
||||
description="",
|
||||
default="",
|
||||
subtype='FILE_PATH',
|
||||
options=option_path_supports_blend_relative,
|
||||
); exec(conv("export_filepath"))
|
||||
create_subdirectories = BoolProperty(
|
||||
)
|
||||
create_subdirectories: BoolProperty(
|
||||
name="Create Missing Subdirectories",
|
||||
description="Create missing subdirectories if export directory does not exist",
|
||||
default=True,
|
||||
); exec(conv("create_subdirectories"))
|
||||
)
|
||||
|
||||
|
||||
def reset(self):
|
||||
@@ -905,30 +894,28 @@ class ExportPresetPackageSettings(bpy.types.PropertyGroup):
|
||||
|
||||
|
||||
class MaterialPropertyInfo(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
preset_id = StringProperty(); exec(conv("preset_id"))
|
||||
loaded_id = StringProperty(); exec(conv("loaded_id"))
|
||||
is_owner = BoolProperty(default=False); exec(conv("is_owner"))
|
||||
preset_id: StringProperty()
|
||||
loaded_id: StringProperty()
|
||||
is_owner: BoolProperty(default=False)
|
||||
|
||||
|
||||
class DisplayPresetInfoSettings(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
|
||||
display_icon = EnumProperty(
|
||||
display_icon: EnumProperty(
|
||||
name="Preset Icon",
|
||||
description="",
|
||||
items=lambda self, context=None: self._get_display_icon_enum(context),
|
||||
); exec(conv("display_icon"))
|
||||
current_display_panel = EnumProperty(
|
||||
)
|
||||
current_display_panel: EnumProperty(
|
||||
name="Current Preset Display",
|
||||
description="Current preset panel to display",
|
||||
items=lambda self, context=None: self.get_preset_panel_selector_enums(context),
|
||||
update=lambda self, context: self._initialize_dummy_domain_values(),
|
||||
); exec(conv("current_display_panel"))
|
||||
)
|
||||
|
||||
identifier = StringProperty(default=""); exec(conv("identifier"))
|
||||
ui_properties = PointerProperty(type=PresetPropertiesUI); exec(conv("ui_properties"))
|
||||
loaded_materials = CollectionProperty(type=MaterialPropertyInfo); exec(conv("loaded_materials"))
|
||||
identifier: StringProperty(default="")
|
||||
ui_properties: PointerProperty(type=PresetPropertiesUI)
|
||||
loaded_materials: CollectionProperty(type=MaterialPropertyInfo)
|
||||
|
||||
|
||||
def initialize(self):
|
||||
@@ -1055,34 +1042,31 @@ class DisplayPresetInfoSettings(bpy.types.PropertyGroup):
|
||||
|
||||
|
||||
class PresetProperty(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
path = StringProperty(); exec(conv("path"))
|
||||
value = StringProperty(); exec(conv("value"))
|
||||
path: StringProperty()
|
||||
value: StringProperty()
|
||||
|
||||
|
||||
class PresetInfo(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
name = StringProperty(); exec(conv("name"))
|
||||
description = StringProperty(); exec(conv("description"))
|
||||
identifier = StringProperty(); exec(conv("identifier"))
|
||||
is_system_preset = BoolProperty(); exec(conv("is_system_preset"))
|
||||
uid = IntProperty(); exec(conv("uid"))
|
||||
icon_id = IntProperty(default=-1); exec(conv("icon_id"))
|
||||
material_blend = StringProperty(default=""); exec(conv("material_blend"))
|
||||
properties = CollectionProperty(type=PresetProperty); exec(conv("properties"))
|
||||
name: StringProperty()
|
||||
description: StringProperty()
|
||||
identifier: StringProperty()
|
||||
is_system_preset: BoolProperty()
|
||||
uid: IntProperty()
|
||||
icon_id: IntProperty(default=-1)
|
||||
material_blend: StringProperty(default="")
|
||||
properties: CollectionProperty(type=PresetProperty)
|
||||
|
||||
|
||||
class PresetPackageInfo(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
name = StringProperty(); exec(conv("name"))
|
||||
author = StringProperty(); exec(conv("author"))
|
||||
description = StringProperty(); exec(conv("description"))
|
||||
identifier = StringProperty(); exec(conv("identifier"))
|
||||
is_system_package = BoolProperty(); exec(conv("is_system_package"))
|
||||
is_default_user_package = BoolProperty(); exec(conv("is_default_user_package"))
|
||||
use_custom_icons = BoolProperty(); exec(conv("use_custom_icons"))
|
||||
uid = IntProperty(); exec(conv("uid"))
|
||||
presets = CollectionProperty(type=PresetInfo); exec(conv("presets"))
|
||||
name: StringProperty()
|
||||
author: StringProperty()
|
||||
description: StringProperty()
|
||||
identifier: StringProperty()
|
||||
is_system_package: BoolProperty()
|
||||
is_default_user_package: BoolProperty()
|
||||
use_custom_icons: BoolProperty()
|
||||
uid: IntProperty()
|
||||
presets: CollectionProperty(type=PresetInfo)
|
||||
|
||||
|
||||
@classmethod
|
||||
@@ -1135,34 +1119,33 @@ class PresetPackageInfo(bpy.types.PropertyGroup):
|
||||
|
||||
|
||||
class ImportPresetPackageSettings(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
|
||||
package_filepath = StringProperty(
|
||||
package_filepath: StringProperty(
|
||||
name="",
|
||||
description="Package zip file",
|
||||
default="",
|
||||
); exec(conv("package_filepath"))
|
||||
selected_preset = EnumProperty(
|
||||
)
|
||||
selected_preset: EnumProperty(
|
||||
name="Preset",
|
||||
description="Select a package preset to view details",
|
||||
items=lambda self, context=None: self.get_package_preset_enums(context),
|
||||
update=lambda self, context: self._update_selected_package(context),
|
||||
); exec(conv("selected_preset"))
|
||||
display_icon = EnumProperty(
|
||||
)
|
||||
display_icon: EnumProperty(
|
||||
name="Preset Icon",
|
||||
description="",
|
||||
items=lambda self, context=None: self._get_display_icon_enum(context),
|
||||
); exec(conv("display_icon"))
|
||||
current_display_panel = EnumProperty(
|
||||
)
|
||||
current_display_panel: EnumProperty(
|
||||
name="Current Preset Display",
|
||||
description="Current preset panel to display",
|
||||
items=lambda self, context=None: self.get_preset_panel_selector_enums(context),
|
||||
update=lambda self, context: self._initialize_dummy_domain_values(),
|
||||
); exec(conv("current_display_panel"))
|
||||
)
|
||||
|
||||
ui_properties = PointerProperty(type=PresetPropertiesUI); exec(conv("ui_properties"))
|
||||
loaded_materials = CollectionProperty(type=MaterialPropertyInfo); exec(conv("loaded_materials"))
|
||||
package_info = PointerProperty(type=PresetPackageInfo); exec(conv("package_info"))
|
||||
ui_properties: PointerProperty(type=PresetPropertiesUI)
|
||||
loaded_materials: CollectionProperty(type=MaterialPropertyInfo)
|
||||
package_info: PointerProperty(type=PresetPackageInfo)
|
||||
|
||||
|
||||
def initialize(self, data):
|
||||
@@ -1330,36 +1313,35 @@ class ImportPresetPackageSettings(bpy.types.PropertyGroup):
|
||||
|
||||
|
||||
class EditPresetSettings(bpy.types.PropertyGroup):
|
||||
conv = vcu.convert_attribute_to_28
|
||||
|
||||
edit_package = EnumProperty(
|
||||
edit_package: EnumProperty(
|
||||
name="Preset Package",
|
||||
description="Edit preset from this package",
|
||||
items=preset_library.get_user_package_enums,
|
||||
update=lambda self, context=None: self._update_edit_package(context),
|
||||
); exec(conv("edit_package"))
|
||||
edit_preset = EnumProperty(
|
||||
)
|
||||
edit_preset: EnumProperty(
|
||||
name="Edit Preset",
|
||||
description="Select a preset to edit",
|
||||
items=lambda self, context=None: preset_library.get_package_preset_enums(self, context, self.edit_package),
|
||||
update=lambda self, context=None: self._update_edit_preset(context),
|
||||
); exec(conv("edit_preset"))
|
||||
package = EnumProperty(
|
||||
)
|
||||
package: EnumProperty(
|
||||
name="Preset Package",
|
||||
description="Move preset to this package",
|
||||
items=preset_library.get_user_package_enums,
|
||||
); exec(conv("package"))
|
||||
name = StringProperty(
|
||||
)
|
||||
name: StringProperty(
|
||||
name="Name",
|
||||
description="New preset name",
|
||||
default="New Preset"
|
||||
); exec(conv("name"))
|
||||
description = StringProperty(
|
||||
)
|
||||
description: StringProperty(
|
||||
name="Description",
|
||||
description="New preset description (optional)",
|
||||
default=""
|
||||
); exec(conv("description"))
|
||||
icon = StringProperty(
|
||||
)
|
||||
icon: StringProperty(
|
||||
name="Icon",
|
||||
description="Icons should be 256x256 resolution and in PNG format."
|
||||
" Images must be imported into the Blender UV/Image Editor before"
|
||||
@@ -1367,82 +1349,82 @@ class EditPresetSettings(bpy.types.PropertyGroup):
|
||||
" this popup",
|
||||
default="",
|
||||
update=lambda self, context=None: self._update_icon(context),
|
||||
); exec(conv("icon"))
|
||||
display_icon = display_icon = EnumProperty(
|
||||
)
|
||||
display_icon: display_icon = EnumProperty(
|
||||
name="Preset Icon",
|
||||
description="",
|
||||
items=lambda self, context=None: self._get_display_icon_enum(context),
|
||||
); exec(conv("display_icon"))
|
||||
export_simulation = BoolProperty(
|
||||
)
|
||||
export_simulation: BoolProperty(
|
||||
name="Simulation",
|
||||
description="Export 'FLIP Fluid Simulation' panel settings",
|
||||
default=False,
|
||||
update=lambda self, context=None: self._check_current_display_panel(context),
|
||||
); exec(conv("export_simulation"))
|
||||
export_display = BoolProperty(
|
||||
)
|
||||
export_display: BoolProperty(
|
||||
name="Display Settings",
|
||||
description="Export 'FLIP Fluid Display Settings' panel settings",
|
||||
default=False,
|
||||
update=lambda self, context=None: self._check_current_display_panel(context),
|
||||
); exec(conv("export_display"))
|
||||
export_surface = BoolProperty(
|
||||
)
|
||||
export_surface: BoolProperty(
|
||||
name="Surface",
|
||||
description="Export 'FLIP Fluid Surface' panel settings",
|
||||
default=False,
|
||||
update=lambda self, context=None: self._check_current_display_panel(context),
|
||||
); exec(conv("export_surface"))
|
||||
export_whitewater = BoolProperty(
|
||||
)
|
||||
export_whitewater: BoolProperty(
|
||||
name="Whitewater",
|
||||
description="Export 'FLIP Fluid Whitewater' panel settings",
|
||||
default=False,
|
||||
update=lambda self, context=None: self._check_current_display_panel(context),
|
||||
); exec(conv("export_whitewater"))
|
||||
export_world = BoolProperty(
|
||||
)
|
||||
export_world: BoolProperty(
|
||||
name="World",
|
||||
description="Export 'FLIP Fluid World' panel settings",
|
||||
default=False,
|
||||
update=lambda self, context=None: self._check_current_display_panel(context),
|
||||
); exec(conv("export_world"))
|
||||
export_materials = BoolProperty(
|
||||
)
|
||||
export_materials: BoolProperty(
|
||||
name="Materials",
|
||||
description="Export 'FLIP Fluid Materials' panel settings",
|
||||
default=False,
|
||||
update=lambda self, context=None: self._check_current_display_panel(context),
|
||||
); exec(conv("export_materials"))
|
||||
export_advanced = BoolProperty(
|
||||
)
|
||||
export_advanced: BoolProperty(
|
||||
name="Advanced",
|
||||
description="Export 'FLIP Fluid Advanced' panel settings",
|
||||
default=False,
|
||||
update=lambda self, context=None: self._check_current_display_panel(context),
|
||||
); exec(conv("export_advanced"))
|
||||
export_debug = BoolProperty(
|
||||
)
|
||||
export_debug: BoolProperty(
|
||||
name="Debug",
|
||||
description="Export 'FLIP Fluid Debug' panel settings",
|
||||
default=False,
|
||||
update=lambda self, context=None: self._check_current_display_panel(context),
|
||||
); exec(conv("export_debug"))
|
||||
export_stats = BoolProperty(
|
||||
)
|
||||
export_stats: BoolProperty(
|
||||
name="Stats",
|
||||
description="Export 'FLIP Fluid Stats' panel settings",
|
||||
default=False,
|
||||
update=lambda self, context=None: self._check_current_display_panel(context),
|
||||
); exec(conv("export_stats"))
|
||||
ui_sort = BoolProperty(
|
||||
)
|
||||
ui_sort: BoolProperty(
|
||||
name="Sort Attributes",
|
||||
description="Sort attributes by enabled/disabled",
|
||||
default=False,
|
||||
); exec(conv("ui_sort"))
|
||||
current_display_panel = EnumProperty(
|
||||
)
|
||||
current_display_panel: EnumProperty(
|
||||
name="Current Preset Display",
|
||||
description="Current preset panel to display",
|
||||
items=lambda self, context=None: self.get_preset_panel_selector_enums(context),
|
||||
); exec(conv("current_display_panel"))
|
||||
)
|
||||
|
||||
|
||||
ui_properties = PointerProperty(type=PresetPropertiesUI); exec(conv("ui_properties"))
|
||||
loaded_icon_image_name = StringProperty(""); exec(conv("loaded_icon_image_name"))
|
||||
loaded_materials = CollectionProperty(type=MaterialPropertyInfo); exec(conv("loaded_materials"))
|
||||
is_unedited = BoolProperty(default=True); exec(conv("is_unedited"))
|
||||
ui_properties: PointerProperty(type=PresetPropertiesUI)
|
||||
loaded_icon_image_name: StringProperty("")
|
||||
loaded_materials: CollectionProperty(type=MaterialPropertyInfo)
|
||||
is_unedited: BoolProperty(default=True)
|
||||
|
||||
|
||||
def initialize(self):
|
||||
|
||||
Reference in New Issue
Block a user