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:
authorSriharsha Kotcharlakot <k.venkatsriharsha@gmail.com>2020-10-05 19:17:11 +0300
committerSriharsha Kotcharlakot <k.venkatsriharsha@gmail.com>2020-10-05 20:42:48 +0300
commitff89d101e7cbed7c84349953a789380fee47f839 (patch)
treead12737ea5ffdd75a9e744fb783fce1ff327a3d3 /source/blender
parentffd46014470567fa75a5b6492677137f07936428 (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')
-rw-r--r--source/blender/makesrna/intern/rna_fluid.c13
-rw-r--r--source/blender/makesrna/intern/rna_volume.c16
2 files changed, 6 insertions, 23 deletions
diff --git a/source/blender/makesrna/intern/rna_fluid.c b/source/blender/makesrna/intern/rna_fluid.c
index 9d7359bb8f0..cb64d81533f 100644
--- a/source/blender/makesrna/intern/rna_fluid.c
+++ b/source/blender/makesrna/intern/rna_fluid.c
@@ -1306,12 +1306,6 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL},
};
- static const EnumPropertyItem axis_slice_method_items[] = {
- {AXIS_SLICE_FULL, "FULL", 0, "Full", "Slice the whole domain object"},
- {AXIS_SLICE_SINGLE, "SINGLE", 0, "Single", "Perform a single slice of the domain object"},
- {0, NULL, 0, NULL, NULL},
- };
-
static const EnumPropertyItem interp_method_item[] = {
{FLUID_DISPLAY_INTERP_LINEAR, "LINEAR", 0, "Linear", "Good smoothness and speed"},
{FLUID_DISPLAY_INTERP_CUBIC,
@@ -2439,10 +2433,9 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
/* display settings */
- prop = RNA_def_property(srna, "axis_slice_method", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "axis_slice_method");
- 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", AXIS_SLICE_SINGLE);
+ RNA_def_property_ui_text(prop, "Slice", "Perform a single slice of the domain object");
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);
prop = RNA_def_property(srna, "slice_axis", PROP_ENUM, PROP_NONE);
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);