[Bf-blender-cvs] [a5a9493ffdc] master: UI: Cleanup Liquid Settings Code Style

Aaron Carlisle noreply at git.blender.org
Sat Feb 8 23:20:08 CET 2020


Commit: a5a9493ffdc5c964ddd9cfc2ae344dfef3db3dc2
Author: Aaron Carlisle
Date:   Sat Feb 8 17:19:34 2020 -0500
Branches: master
https://developer.blender.org/rBa5a9493ffdc5c964ddd9cfc2ae344dfef3db3dc2

UI: Cleanup Liquid Settings Code Style

This makes the code more consitent with the rest of blender

The `fractions_threshold` was changed to be active than enabled which is 
also more consistent. This needs to be changed in other areas also.

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

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 cdd6a31aeda..de99d282f9f 100644
--- a/release/scripts/startup/bl_ui/properties_physics_fluid.py
+++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py
@@ -445,32 +445,27 @@ class PHYSICS_PT_liquid(PhysicButtonsPanel, Panel):
         is_baking_any = domain.is_cache_baking_any
         has_baked_data = domain.has_cache_baked_data
 
+        layout.enabled = not is_baking_any and not has_baked_data
         flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
 
         col = flow.column()
-        col0 = col.column()
-        col0.enabled = not is_baking_any and not has_baked_data
-        col0.prop(domain, "simulation_method", expand=False)
-        col0.prop(domain, "flip_ratio", text="FLIP Ratio")
-        col0.prop(domain, "particle_radius", text="Particle Radius")
-
-        col1 = flow.column(align=True)
-        col1.enabled = not is_baking_any and not has_baked_data
-        col1.prop(domain, "particle_max", text="Particles Maximum")
-        col1.prop(domain, "particle_min", text="Minimum")
-
-        col1 = flow.column()
-        col1.enabled = not is_baking_any and not has_baked_data
-        col1.prop(domain, "particle_number", text="Particle Sampling")
-        col1.prop(domain, "particle_band_width", text="Narrow Band Width")
-        col1.prop(domain, "particle_randomness", text="Particle Randomness")
-
-        col2 = flow.column()
-        col2.enabled = not is_baking_any and not has_baked_data
-        col2.prop(domain, "use_fractions", text="Fractional Obstacles")
-        col3 = col2.column()
-        col3.enabled = domain.use_fractions and col2.enabled
-        col3.prop(domain, "fractions_threshold", text="Obstacle-Fluid Threshold")
+        col.prop(domain, "simulation_method", expand=False)
+        col.prop(domain, "flip_ratio", text="FLIP Ratio")
+        col.prop(domain, "particle_radius", text="Particle Radius")
+
+        col = flow.column()
+        col.prop(domain, "particle_max", text="Particles Maximum")
+        col.prop(domain, "particle_min", text="Minimum")
+
+        col = flow.column()
+        col.prop(domain, "particle_number", text="Particle Sampling")
+        col.prop(domain, "particle_band_width", text="Narrow Band Width")
+        col.prop(domain, "particle_randomness", text="Particle Randomness")
+
+        col = flow.column()
+        col.prop(domain, "use_fractions", text="Fractional Obstacles")
+        col.active = domain.use_fractions
+        col.prop(domain, "fractions_threshold", text="Obstacle-Fluid Threshold")
 
 
 class PHYSICS_PT_flow_source(PhysicButtonsPanel, Panel):



More information about the Bf-blender-cvs mailing list