diff options
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_operators/object_quick_effects.py | 3 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/properties_physics_fluid.py | 57 |
2 files changed, 32 insertions, 28 deletions
diff --git a/release/scripts/startup/bl_operators/object_quick_effects.py b/release/scripts/startup/bl_operators/object_quick_effects.py index 71153ba8b74..59b66b427f1 100644 --- a/release/scripts/startup/bl_operators/object_quick_effects.py +++ b/release/scripts/startup/bl_operators/object_quick_effects.py @@ -399,9 +399,6 @@ class QuickSmoke(ObjectModeOperator, Operator): if self.style == 'FIRE' or self.style == 'BOTH': obj.modifiers[-1].domain_settings.use_noise = True - # set correct cache file format for smoke - obj.modifiers[-1].domain_settings.cache_data_format = 'UNI' - # Setup material # Cycles and Eevee diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index 833cd05dd81..1727771637d 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -213,7 +213,7 @@ class PHYSICS_PT_settings(PhysicButtonsPanel, Panel): split.enabled = note_flag bake_incomplete = (domain.cache_frame_pause_data < domain.cache_frame_end) - if domain.has_cache_baked_data and not domain.is_cache_baking_data and bake_incomplete: + if domain.cache_resumable and domain.has_cache_baked_data and not domain.is_cache_baking_data and bake_incomplete: col = split.column() col.operator("fluid.bake_data", text="Resume") col = split.column() @@ -1119,9 +1119,7 @@ class PHYSICS_PT_cache(PhysicButtonsPanel, Panel): is_baking_any = domain.is_cache_baking_any has_baked_data = domain.has_cache_baked_data - has_baked_noise = domain.has_cache_baked_noise has_baked_mesh = domain.has_cache_baked_mesh - has_baked_particles = domain.has_cache_baked_particles col = layout.column() col.prop(domain, "cache_directory", text="") @@ -1146,35 +1144,32 @@ class PHYSICS_PT_cache(PhysicButtonsPanel, Panel): col.separator() col = flow.column() + col.enabled = not is_baking_any and not has_baked_data + col.prop(domain, "cache_resumable", text="Is Resumable") + row = col.row() row.enabled = not is_baking_any and not has_baked_data - row.prop(domain, "cache_data_format", text="Data File Format") - - if md.domain_settings.domain_type in {'GAS'}: - if domain.use_noise: - row = col.row() - row.enabled = not is_baking_any and not has_baked_noise - row.prop(domain, "cache_noise_format", text="Noise File Format") + row.prop(domain, "cache_data_format", text="Format Volumes") - if md.domain_settings.domain_type in {'LIQUID'}: - # File format for all particle systemes (FLIP and secondary) + if md.domain_settings.domain_type in {'LIQUID'} and domain.use_mesh: row = col.row() - row.enabled = not is_baking_any and not has_baked_particles and not has_baked_data - row.prop(domain, "cache_particle_format", text="Particle File Format") + row.enabled = not is_baking_any and not has_baked_mesh + row.prop(domain, "cache_mesh_format", text="Meshes") - if domain.use_mesh: - row = col.row() - row.enabled = not is_baking_any and not has_baked_mesh - row.prop(domain, "cache_mesh_format", text="Mesh File Format") - - if domain.cache_type == 'FINAL': + if domain.cache_type == 'ALL': col.separator() split = layout.split() - if domain.is_cache_baking_data and not domain.has_cache_baked_data: + bake_incomplete = (domain.cache_frame_pause_data < domain.cache_frame_end) + if domain.cache_resumable and domain.has_cache_baked_data and not domain.is_cache_baking_data and bake_incomplete: + col = split.column() + col.operator("fluid.bake_all", text="Resume") + col = split.column() + col.operator("fluid.free_all", text="Free") + elif domain.is_cache_baking_data and not domain.has_cache_baked_data: split.enabled = False - split.operator("fluid.pause_bake", text="Baking All - ESC to cancel") + split.operator("fluid.pause_bake", text="Baking All - ESC to pause") elif not domain.has_cache_baked_data and not domain.is_cache_baking_data: split.operator("fluid.bake_all", text="Bake All") else: @@ -1189,8 +1184,8 @@ class PHYSICS_PT_export(PhysicButtonsPanel, Panel): @classmethod def poll(cls, context): - # Only show the advanced panel to advanced users who know Mantaflow's birthday :) - if not PhysicButtonsPanel.poll_fluid_domain(context) or bpy.app.debug_value != 3001: + domain = context.fluid.domain_settings + if not PhysicButtonsPanel.poll_fluid_domain(context) or (domain.cache_data_format != 'OPENVDB' and bpy.app.debug_value != 3001): return False return (context.engine in cls.COMPAT_ENGINES) @@ -1203,12 +1198,24 @@ class PHYSICS_PT_export(PhysicButtonsPanel, Panel): is_baking_any = domain.is_cache_baking_any has_baked_any = domain.has_cache_baked_any + has_baked_data = domain.has_cache_baked_data flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False) flow.enabled = not is_baking_any and not has_baked_any col = flow.column() - col.prop(domain, "export_manta_script", text="Export Mantaflow Script") + + if domain.cache_data_format == 'OPENVDB': + col.enabled = not is_baking_any and not has_baked_data + col.prop(domain, "openvdb_cache_compress_type", text="Compression Volumes") + + col = flow.column() + col.prop(domain, "openvdb_data_depth", text="Precision Volumes") + + # Only show the advanced panel to advanced users who know Mantaflow's birthday :) + if bpy.app.debug_value == 3001: + col = flow.column() + col.prop(domain, "export_manta_script", text="Export Mantaflow Script") class PHYSICS_PT_field_weights(PhysicButtonsPanel, Panel): |