[Bf-blender-cvs] [c8eeffe8e4a] soc-2020-fluid-tools: Fluid: Removed the option 'Slicing' in 'Viewport Display'.

Sriharsha Kotcharlakot noreply at git.blender.org
Mon Jun 22 16:16:54 CEST 2020


Commit: c8eeffe8e4a02637a81a21ffb75bbaec5b5659df
Author: Sriharsha Kotcharlakot
Date:   Mon Jun 22 19:46:27 2020 +0530
Branches: soc-2020-fluid-tools
https://developer.blender.org/rBc8eeffe8e4a02637a81a21ffb75bbaec5b5659df

Fluid: Removed the option 'Slicing' in 'Viewport Display'.

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

M	release/scripts/modules/rna_manual_reference.py
M	release/scripts/startup/bl_ui/properties_physics_fluid.py
M	source/blender/blenkernel/intern/fluid.c
M	source/blender/draw/engines/overlay/overlay_extra.c
M	source/blender/draw/engines/workbench/workbench_volume.c
M	source/blender/makesdna/DNA_fluid_types.h
M	source/blender/makesrna/intern/rna_fluid.c

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

diff --git a/release/scripts/modules/rna_manual_reference.py b/release/scripts/modules/rna_manual_reference.py
index b76f57c4545..8c44fc0cfa6 100644
--- a/release/scripts/modules/rna_manual_reference.py
+++ b/release/scripts/modules/rna_manual_reference.py
@@ -207,7 +207,6 @@ url_manual_mapping = (
 	("bpy.types.fluiddomainsettings.guide_source*", "physics/fluid/type/domain/guides.html#bpy-types-fluiddomainsettings-guide-source"),
 	("bpy.types.fluiddomainsettings.particle_max*", "physics/fluid/type/domain/settings.html#bpy-types-fluiddomainsettings-particle-max"),
 	("bpy.types.fluiddomainsettings.particle_min*", "physics/fluid/type/domain/settings.html#bpy-types-fluiddomainsettings-particle-min"),
-	("bpy.types.fluiddomainsettings.slice_method*", "physics/fluid/type/domain/gas/viewport_display.html#bpy-types-fluiddomainsettings-slice-method"),
 	("bpy.types.fluiddomainsettings.vector_scale*", "physics/fluid/type/domain/gas/viewport_display.html#bpy-types-fluiddomainsettings-vector-scale"),
 	("bpy.types.fluideffectorsettings.guide_mode*", "physics/fluid/type/effector.html#bpy-types-fluideffectorsettings-guide-mode"),
 	("bpy.types.fluidflowsettings.texture_offset*", "physics/fluid/type/flow.html#bpy-types-fluidflowsettings-texture-offset"),
diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py
index 43af2e8ae27..7aff36f2c3f 100644
--- a/release/scripts/startup/bl_ui/properties_physics_fluid.py
+++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py
@@ -1244,10 +1244,8 @@ class PHYSICS_PT_viewport_display(PhysicButtonsPanel, Panel):
         flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=True)
 
         domain = context.fluid.domain_settings
-        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')
 
         col = flow.column(align=False)
@@ -1256,18 +1254,14 @@ class PHYSICS_PT_viewport_display(PhysicButtonsPanel, Panel):
         col.separator()
 
         col = flow.column()
-        col.prop(domain, "slice_method", text="Slicing")
-
-        col = col.column()
-        col.active = do_axis_slicing
         col.prop(domain, "axis_slice_method")
 
-        if not do_full_slicing and do_axis_slicing:
+        if not do_full_slicing:
             col.prop(domain, "slice_axis")
             col.prop(domain, "slice_depth")
 
         col = col.column()
-        col.active = do_full_slicing or not do_axis_slicing
+        col.active = do_full_slicing
         col.prop(domain, "slice_per_voxel")
 
 
diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c
index 988c58579bb..a386bf27a4d 100644
--- a/source/blender/blenkernel/intern/fluid.c
+++ b/source/blender/blenkernel/intern/fluid.c
@@ -4983,7 +4983,6 @@ void BKE_fluid_modifier_create_type_data(struct FluidModifierData *mmd)
     mmd->domain->timesteps_maximum = 4;
 
     /* display options */
-    mmd->domain->slice_method = FLUID_DOMAIN_SLICE_VIEW_ALIGNED;
     mmd->domain->axis_slice_method = AXIS_SLICE_FULL;
     mmd->domain->slice_axis = 0;
     mmd->domain->interp_method = 0;
@@ -5222,7 +5221,6 @@ void BKE_fluid_modifier_copy(const struct FluidModifierData *mmd,
     tmds->timesteps_maximum = mds->timesteps_maximum;
 
     /* display options */
-    tmds->slice_method = mds->slice_method;
     tmds->axis_slice_method = mds->axis_slice_method;
     tmds->slice_axis = mds->slice_axis;
     tmds->interp_method = mds->interp_method;
diff --git a/source/blender/draw/engines/overlay/overlay_extra.c b/source/blender/draw/engines/overlay/overlay_extra.c
index 15bf26a5fa8..2733b859187 100644
--- a/source/blender/draw/engines/overlay/overlay_extra.c
+++ b/source/blender/draw/engines/overlay/overlay_extra.c
@@ -1390,8 +1390,7 @@ static void OVERLAY_volume_extra(OVERLAY_ExtraCallBuffers *cb,
     int slice_axis = -1;
     line_count *= mds->res[0] * mds->res[1] * mds->res[2];
 
-    if (mds->slice_method == FLUID_DOMAIN_SLICE_AXIS_ALIGNED &&
-        mds->axis_slice_method == AXIS_SLICE_SINGLE) {
+    if (mds->axis_slice_method == AXIS_SLICE_SINGLE) {
       float viewinv[4][4];
       DRW_view_viewmat_get(NULL, viewinv, true);
 
diff --git a/source/blender/draw/engines/workbench/workbench_volume.c b/source/blender/draw/engines/workbench/workbench_volume.c
index e346c03f6ee..84c796dfc46 100644
--- a/source/blender/draw/engines/workbench/workbench_volume.c
+++ b/source/blender/draw/engines/workbench/workbench_volume.c
@@ -93,8 +93,7 @@ static void workbench_volume_modifier_cache_populate(WORKBENCH_Data *vedata,
     return;
   }
 
-  const bool use_slice = (mds->slice_method == FLUID_DOMAIN_SLICE_AXIS_ALIGNED &&
-                          mds->axis_slice_method == AXIS_SLICE_SINGLE);
+  const bool use_slice = (mds->axis_slice_method == AXIS_SLICE_SINGLE);
   const InterpType cubic_interp = (InterpType)mds->interp_method;
   const bool show_phi = (mds->coba_field == FLUID_DOMAIN_FIELD_PHI ||
                          mds->coba_field == FLUID_DOMAIN_FIELD_PHI_IN ||
diff --git a/source/blender/makesdna/DNA_fluid_types.h b/source/blender/makesdna/DNA_fluid_types.h
index 540212a267c..ccb5215191f 100644
--- a/source/blender/makesdna/DNA_fluid_types.h
+++ b/source/blender/makesdna/DNA_fluid_types.h
@@ -66,12 +66,6 @@ enum {
   FLUID_DOMAIN_FILE_BIN_OBJECT = (1 << 4),
 };
 
-/* Slice method. */
-enum {
-  FLUID_DOMAIN_SLICE_VIEW_ALIGNED = 0,
-  FLUID_DOMAIN_SLICE_AXIS_ALIGNED = 1,
-};
-
 /* Axis aligned method. */
 enum {
   AXIS_SLICE_FULL = 0,
@@ -589,20 +583,21 @@ typedef struct FluidDomainSettings {
   int timesteps_maximum;
 
   /* Display options. */
-  char slice_method, axis_slice_method;
-  char slice_axis, draw_velocity;
   float slice_per_voxel;
   float slice_depth;
   float display_thickness;
-  struct ColorBand *coba;
   float grid_scale;
+  struct ColorBand *coba;
   float vector_scale;
+  char axis_slice_method;
+  char slice_axis;
+  char draw_velocity;
   char vector_draw_type;
   char vector_draw_grid_type;
   char use_coba;
   char coba_field; /* Simulation field used for the color mapping. */
   char interp_method;
-  char _pad9[3]; /* Unused. */
+  char _pad9[4]; /* Unused. */
 
   /* -- Deprecated / unsed options (below). -- */
 
diff --git a/source/blender/makesrna/intern/rna_fluid.c b/source/blender/makesrna/intern/rna_fluid.c
index e175d81da90..4f483e1f8c8 100644
--- a/source/blender/makesrna/intern/rna_fluid.c
+++ b/source/blender/makesrna/intern/rna_fluid.c
@@ -1247,20 +1247,6 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
       {0, NULL, 0, NULL, NULL},
   };
 
-  static const EnumPropertyItem view_items[] = {
-      {FLUID_DOMAIN_SLICE_VIEW_ALIGNED,
-       "VIEW_ALIGNED",
-       0,
-       "View",
-       "Slice volume parallel to the view plane"},
-      {FLUID_DOMAIN_SLICE_AXIS_ALIGNED,
-       "AXIS_ALIGNED",
-       0,
-       "Axis",
-       "Slice volume parallel to the major axis"},
-      {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"},
@@ -2320,12 +2306,6 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
 
   /* display settings */
 
-  prop = RNA_def_property(srna, "slice_method", PROP_ENUM, PROP_NONE);
-  RNA_def_property_enum_sdna(prop, NULL, "slice_method");
-  RNA_def_property_enum_items(prop, view_items);
-  RNA_def_property_ui_text(prop, "View Method", "How to slice the volume for viewport rendering");
-  RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);
-
   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);



More information about the Bf-blender-cvs mailing list