diff options
author | Sriharsha Kotcharlakot <k.venkatsriharsha@gmail.com> | 2020-10-05 19:17:11 +0300 |
---|---|---|
committer | Sriharsha Kotcharlakot <k.venkatsriharsha@gmail.com> | 2020-10-05 20:42:48 +0300 |
commit | ff89d101e7cbed7c84349953a789380fee47f839 (patch) | |
tree | ad12737ea5ffdd75a9e744fb783fce1ff327a3d3 /source/blender/makesrna/intern/rna_volume.c | |
parent | ffd46014470567fa75a5b6492677137f07936428 (diff) |
UI: Changes to Viewport Display UI of Volume Object and Fluid
- Density, interpolation and slicing options in Volume Object's
Viewport Display are now not aligned to each other as they are not
closely related.
- Changed the enum property for slicing ('Method') to a boolean
property 'Slice' and added a sub-panel for slicing options under
the 'Viewport Display' panel in Volume Object and Fluid for better
clarity.
- Renamed `axis_slice_method` to `use_slice` in the python API for
Volume Object and Fluid.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D9097
Diffstat (limited to 'source/blender/makesrna/intern/rna_volume.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_volume.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/source/blender/makesrna/intern/rna_volume.c b/source/blender/makesrna/intern/rna_volume.c index 054f108099b..8a5e25c52fb 100644 --- a/source/blender/makesrna/intern/rna_volume.c +++ b/source/blender/makesrna/intern/rna_volume.c @@ -406,16 +406,6 @@ static void rna_def_volume_display(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}, }; - static const EnumPropertyItem axis_slice_method_items[] = { - {VOLUME_AXIS_SLICE_FULL, "FULL", 0, "Full", "Slice the whole domain object"}, - {VOLUME_AXIS_SLICE_SINGLE, - "SINGLE", - 0, - "Single", - "Perform a single slice of the domain object"}, - {0, NULL, 0, NULL, NULL}, - }; - static const EnumPropertyItem axis_slice_position_items[] = { {VOLUME_SLICE_AXIS_AUTO, "AUTO", @@ -444,9 +434,9 @@ static void rna_def_volume_display(BlenderRNA *brna) prop, "Interpolation", "Interpolation method to use for volumes in solid mode"); RNA_def_property_update(prop, 0, "rna_Volume_update_display"); - prop = RNA_def_property(srna, "axis_slice_method", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_items(prop, axis_slice_method_items); - RNA_def_property_ui_text(prop, "Method", ""); + prop = RNA_def_property(srna, "use_slice", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "axis_slice_method", VOLUME_AXIS_SLICE_SINGLE); + RNA_def_property_ui_text(prop, "Slice", "Perform a single slice of the domain object"); RNA_def_property_update(prop, 0, "rna_Volume_update_display"); prop = RNA_def_property(srna, "slice_axis", PROP_ENUM, PROP_NONE); |