[Bf-blender-cvs] [448ee22] master: Volume slice settings: tweak/fix UI enabling conditions.

Kévin Dietrich noreply at git.blender.org
Sun Sep 25 21:55:49 CEST 2016


Commit: 448ee227be612ca4627c4ddc5e2650ebe2a3a28e
Author: Kévin Dietrich
Date:   Sun Sep 25 21:55:29 2016 +0200
Branches: master
https://developer.blender.org/rB448ee227be612ca4627c4ddc5e2650ebe2a3a28e

Volume slice settings: tweak/fix UI enabling conditions.

It was still possible to have some properties enabled when it does not
make sense to have them so.

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

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

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

diff --git a/release/scripts/startup/bl_ui/properties_physics_smoke.py b/release/scripts/startup/bl_ui/properties_physics_smoke.py
index 41a0194..df03f23 100644
--- a/release/scripts/startup/bl_ui/properties_physics_smoke.py
+++ b/release/scripts/startup/bl_ui/properties_physics_smoke.py
@@ -373,17 +373,20 @@ class PHYSICS_PT_smoke_display_settings(PhysicButtonsPanel, Panel):
         slice_method = domain.slice_method
         axis_slice_method = domain.axis_slice_method
 
+        do_axis_slicing = (slice_method == 'AXIS_ALIGNED')
+        do_full_slicing = (axis_slice_method == 'FULL')
+
         row = layout.row();
-        row.enabled = (slice_method == 'AXIS_ALIGNED')
+        row.enabled = do_axis_slicing
         row.prop(domain, "axis_slice_method")
 
         col = layout.column();
-        col.enabled = (axis_slice_method == 'SINGLE')
+        col.enabled = not do_full_slicing and do_axis_slicing
         col.prop(domain, "slice_axis")
         col.prop(domain, "slice_depth")
 
         row = layout.row();
-        row.enabled = (axis_slice_method == 'FULL')
+        row.enabled = do_full_slicing or not do_axis_slicing
         row.prop(domain, "slice_per_voxel")
 
         layout.separator()




More information about the Bf-blender-cvs mailing list