[Bf-blender-cvs] [231b313c559] master: Mantaflow: Remove Noise Type Option

Aaron Carlisle noreply at git.blender.org
Mon Jul 26 17:00:01 CEST 2021


Commit: 231b313c559b6a4969051e2f0fb978c59cf3d044
Author: Aaron Carlisle
Date:   Mon Jul 26 10:59:49 2021 -0400
Branches: master
https://developer.blender.org/rB231b313c559b6a4969051e2f0fb978c59cf3d044

Mantaflow: Remove Noise Type Option

Mantflow only supports wavelet noise, thus the parameter with only one option is no longer useful.

Differential Revision: https://developer.blender.org/D6770

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

M	release/scripts/startup/bl_ui/properties_physics_fluid.py
M	source/blender/blenkernel/intern/fluid.c
M	source/blender/makesdna/DNA_fluid_defaults.h
M	source/blender/makesdna/DNA_fluid_types.h
M	source/blender/makesrna/intern/rna_fluid.c

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

diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py
index d168d9ab6dd..6408d4096fe 100644
--- a/release/scripts/startup/bl_ui/properties_physics_fluid.py
+++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py
@@ -734,11 +734,9 @@ class PHYSICS_PT_noise(PhysicButtonsPanel, Panel):
 
         col = flow.column()
         col.prop(domain, "noise_scale", text="Upres Factor")
-        # TODO (sebbas): Mantaflow only supports wavelet noise. Maybe get rid of noise type field.
-        col.prop(domain, "noise_type", text="Noise Method")
+        col.prop(domain, "noise_strength", text="Strength")
 
         col = flow.column()
-        col.prop(domain, "noise_strength", text="Strength")
         col.prop(domain, "noise_pos_scale", text="Scale")
         col.prop(domain, "noise_time_anim", text="Time")
 
diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c
index 1d8dc97d2af..92fd220549a 100644
--- a/source/blender/blenkernel/intern/fluid.c
+++ b/source/blender/blenkernel/intern/fluid.c
@@ -5005,7 +5005,6 @@ void BKE_fluid_modifier_copy(const struct FluidModifierData *fmd,
     tfds->noise_pos_scale = fds->noise_pos_scale;
     tfds->noise_time_anim = fds->noise_time_anim;
     tfds->noise_scale = fds->noise_scale;
-    tfds->noise_type = fds->noise_type;
 
     /* liquid domain options */
     tfds->flip_ratio = fds->flip_ratio;
diff --git a/source/blender/makesdna/DNA_fluid_defaults.h b/source/blender/makesdna/DNA_fluid_defaults.h
index 9454342654c..95f5b8b66b0 100644
--- a/source/blender/makesdna/DNA_fluid_defaults.h
+++ b/source/blender/makesdna/DNA_fluid_defaults.h
@@ -101,7 +101,6 @@
     .noise_time_anim = 0.1f, \
     .res_noise = {0, 0, 0}, \
     .noise_scale = 2, \
-    .noise_type = FLUID_NOISE_TYPE_WAVELET, \
     .particle_randomness = 0.1f, \
     .particle_number = 2, \
     .particle_minimum = 8, \
diff --git a/source/blender/makesdna/DNA_fluid_types.h b/source/blender/makesdna/DNA_fluid_types.h
index cec6eb0d044..57523f1c4d8 100644
--- a/source/blender/makesdna/DNA_fluid_types.h
+++ b/source/blender/makesdna/DNA_fluid_types.h
@@ -198,11 +198,6 @@ enum {
   FLUID_DOMAIN_TYPE_LIQUID = 1,
 };
 
-/* Smoke noise types. */
-enum {
-  FLUID_NOISE_TYPE_WAVELET = (1 << 0),
-};
-
 /* Mesh levelset generator types. */
 enum {
   FLUID_DOMAIN_MESH_IMPROVED = 0,
@@ -580,8 +575,7 @@ typedef struct FluidDomainSettings {
   float noise_time_anim;
   int res_noise[3];
   int noise_scale;
-  short noise_type; /* Noise type: wave, curl, anisotropic. */
-  char _pad3[2];    /* Unused. */
+  char _pad3[4];    /* Unused. */
 
   /* Liquid domain options. */
   float particle_randomness;
diff --git a/source/blender/makesrna/intern/rna_fluid.c b/source/blender/makesrna/intern/rna_fluid.c
index 5e015af8e20..10e899b7ee3 100644
--- a/source/blender/makesrna/intern/rna_fluid.c
+++ b/source/blender/makesrna/intern/rna_fluid.c
@@ -1268,11 +1268,6 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
       {FLUID_DOMAIN_TYPE_LIQUID, "LIQUID", 0, "Liquid", "Create domain for liquids"},
       {0, NULL, 0, NULL, NULL}};
 
-  static const EnumPropertyItem prop_noise_type_items[] = {
-      {FLUID_NOISE_TYPE_WAVELET, "NOISEWAVE", 0, "Wavelet", ""},
-      {0, NULL, 0, NULL, NULL},
-  };
-
   static const EnumPropertyItem prop_compression_items[] = {
       {VDB_COMPRESSION_ZIP, "ZIP", 0, "Zip", "Effective but slow compression"},
 #  ifdef WITH_OPENVDB_BLOSC
@@ -1813,14 +1808,6 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
   RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
   RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_domain_noise_reset");
 
-  prop = RNA_def_property(srna, "noise_type", PROP_ENUM, PROP_NONE);
-  RNA_def_property_enum_sdna(prop, NULL, "noise_type");
-  RNA_def_property_enum_items(prop, prop_noise_type_items);
-  RNA_def_property_ui_text(
-      prop, "Noise Method", "Noise method which is used during the high-res simulation");
-  RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
-  RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_domain_noise_reset");
-
   prop = RNA_def_property(srna, "use_noise", PROP_BOOLEAN, PROP_NONE);
   RNA_def_property_boolean_sdna(prop, NULL, "flags", FLUID_DOMAIN_USE_NOISE);
   RNA_def_property_ui_text(prop, "Use Noise", "Enable fluid noise (using amplification)");



More information about the Bf-blender-cvs mailing list