Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKévin Dietrich <kevin.dietrich@mailoo.org>2016-09-25 22:55:29 +0300
committerKévin Dietrich <kevin.dietrich@mailoo.org>2016-09-25 22:55:29 +0300
commit448ee227be612ca4627c4ddc5e2650ebe2a3a28e (patch)
tree65675317949f4b66ee7cdac3d8c5e3133e9473fb /release
parent584288a97c2b1f28dc0e29b2bd986830df233947 (diff)
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.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_smoke.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/release/scripts/startup/bl_ui/properties_physics_smoke.py b/release/scripts/startup/bl_ui/properties_physics_smoke.py
index 41a0194e31b..df03f23a4b5 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()