diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2016-09-25 18:02:46 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2016-09-25 18:02:46 +0300 |
commit | ae69986b70611f358491759f39fd91efd015dab9 (patch) | |
tree | 43c6dd858dc50a0c673e76993cc5447640263a72 /release | |
parent | 335ee5ce5aee3a92415d1608cc66acf3da995598 (diff) |
Viewport smoke: fix a couple of issues in the new display settings.
- WITH_SMOKE macro was not defined so some code was not compiled, though
it was still accessible from the UI
- some UI elements were disappearing due to bad indentation, also rework
the UI code to not hide but rather disable/grey out button in the UI
- Display thickness was not used due to bad manual merge of the code
from the patch.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_physics_smoke.py | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/release/scripts/startup/bl_ui/properties_physics_smoke.py b/release/scripts/startup/bl_ui/properties_physics_smoke.py index 3cf77135622..41a0194e31b 100644 --- a/release/scripts/startup/bl_ui/properties_physics_smoke.py +++ b/release/scripts/startup/bl_ui/properties_physics_smoke.py @@ -373,23 +373,26 @@ class PHYSICS_PT_smoke_display_settings(PhysicButtonsPanel, Panel): slice_method = domain.slice_method axis_slice_method = domain.axis_slice_method - if slice_method == 'AXIS_ALIGNED': - layout.prop(domain, "axis_slice_method") - - if axis_slice_method == 'SINGLE': - layout.prop(domain, "slice_axis") - layout.prop(domain, "slice_depth") - - if axis_slice_method == 'FULL': - layout.prop(domain, "slice_per_voxel") - - layout.separator() - layout.label(text="Debug:") - layout.prop(domain, "draw_velocity") - col = layout.column(); - col.enabled = domain.draw_velocity - col.prop(domain, "vector_draw_type") - col.prop(domain, "vector_scale") + row = layout.row(); + row.enabled = (slice_method == 'AXIS_ALIGNED') + row.prop(domain, "axis_slice_method") + + col = layout.column(); + col.enabled = (axis_slice_method == 'SINGLE') + col.prop(domain, "slice_axis") + col.prop(domain, "slice_depth") + + row = layout.row(); + row.enabled = (axis_slice_method == 'FULL') + row.prop(domain, "slice_per_voxel") + + layout.separator() + layout.label(text="Debug:") + layout.prop(domain, "draw_velocity") + col = layout.column(); + col.enabled = domain.draw_velocity + col.prop(domain, "vector_draw_type") + col.prop(domain, "vector_scale") if __name__ == "__main__": # only for live edit. |