[Bf-blender-cvs] [ae112a38ab8] blender-v2.82-release: Fluid: Removed UI locks for cache file types

Sebastián Barschkis noreply at git.blender.org
Thu Feb 6 15:59:20 CET 2020


Commit: ae112a38ab8d5b6cb7fe8e9209aa7e0e0209a6db
Author: Sebastián Barschkis
Date:   Thu Feb 6 15:59:10 2020 +0100
Branches: blender-v2.82-release
https://developer.blender.org/rBae112a38ab8d5b6cb7fe8e9209aa7e0e0209a6db

Fluid: Removed UI locks for cache file types

Caches that haven't been baked yet should not be locked.

===================================================================

M	release/scripts/startup/bl_ui/properties_physics_fluid.py

===================================================================

diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py
index 28c9895f53b..2a918f0c58b 100644
--- a/release/scripts/startup/bl_ui/properties_physics_fluid.py
+++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py
@@ -680,7 +680,7 @@ class PHYSICS_PT_noise(PhysicButtonsPanel, Panel):
         domain = context.fluid.domain_settings
 
         # Deactivate UI if guides are enabled but not baked yet.
-        layout.active = domain.use_noise and not self.check_domain_has_unbaked_guide(domain)
+        layout.enabled = domain.use_noise and not self.check_domain_has_unbaked_guide(domain)
 
         is_baking_any = domain.is_cache_baking_any
         has_baked_noise = domain.has_cache_baked_noise
@@ -746,7 +746,7 @@ class PHYSICS_PT_mesh(PhysicButtonsPanel, Panel):
         domain = context.fluid.domain_settings
 
         # Deactivate UI if guides are enabled but not baked yet.
-        layout.active = domain.use_mesh and not self.check_domain_has_unbaked_guide(domain)
+        layout.enabled = domain.use_mesh and not self.check_domain_has_unbaked_guide(domain)
 
         is_baking_any = domain.is_cache_baking_any
         has_baked_mesh = domain.has_cache_baked_mesh
@@ -818,7 +818,7 @@ class PHYSICS_PT_particles(PhysicButtonsPanel, Panel):
         domain = context.fluid.domain_settings
 
         # Deactivate UI if guides are enabled but not baked yet.
-        layout.active = not self.check_domain_has_unbaked_guide(domain)
+        layout.enabled = not self.check_domain_has_unbaked_guide(domain)
 
         is_baking_any = domain.is_cache_baking_any
         has_baked_particles = domain.has_cache_baked_particles
@@ -1072,7 +1072,10 @@ class PHYSICS_PT_cache(PhysicButtonsPanel, Panel):
         domain = context.fluid.domain_settings
 
         is_baking_any = domain.is_cache_baking_any
-        has_baked_any = domain.has_cache_baked_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="")
@@ -1096,18 +1099,24 @@ class PHYSICS_PT_cache(PhysicButtonsPanel, Panel):
         col.separator()
 
         col = flow.column()
-        col.enabled = not is_baking_any and not has_baked_any
+        col.enabled = not is_baking_any and not has_baked_data
         col.prop(domain, "cache_data_format", text="Data File Format")
 
         if md.domain_settings.domain_type in {'GAS'}:
             if domain.use_noise:
+                col = flow.column()
+                col.enabled = not is_baking_any and not has_baked_noise
                 col.prop(domain, "cache_noise_format", text="Noise File Format")
 
         if md.domain_settings.domain_type in {'LIQUID'}:
             # File format for all particle systemes (FLIP and secondary)
+            col = flow.column()
+            col.enabled = not is_baking_any and not has_baked_particles
             col.prop(domain, "cache_particle_format", text="Particle File Format")
 
             if domain.use_mesh:
+                col = flow.column()
+                col.enabled = not is_baking_any and not has_baked_mesh
                 col.prop(domain, "cache_mesh_format", text="Mesh File Format")
 
         if domain.cache_type == 'FINAL':



More information about the Bf-blender-cvs mailing list