[Bf-blender-cvs] [a663ece5a30] blender-v2.82-release: Fluid: Better default values and cleanup

Sebastián Barschkis noreply at git.blender.org
Fri Jan 31 13:51:21 CET 2020


Commit: a663ece5a3065a745947647c7f68221e496fccf7
Author: Sebastián Barschkis
Date:   Fri Jan 31 11:40:49 2020 +0100
Branches: blender-v2.82-release
https://developer.blender.org/rBa663ece5a3065a745947647c7f68221e496fccf7

Fluid: Better default values and cleanup

Use OpenVDB by default, smaller particle radius to avoid volume increase, and shorter names for combined fluid particle systems.

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

M	source/blender/blenkernel/intern/fluid.c
M	source/blender/makesrna/intern/rna_fluid.c

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

diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c
index 12c65027e25..b8d7429fa94 100644
--- a/source/blender/blenkernel/intern/fluid.c
+++ b/source/blender/blenkernel/intern/fluid.c
@@ -4012,7 +4012,7 @@ void BKE_fluid_particle_system_create(struct Main *bmain,
 
   part->type = psys_type;
   part->totpart = 0;
-  part->draw_size = 0.01f;  // make fluid particles more subtle in viewport
+  part->draw_size = 0.01f; /* Make fluid particles more subtle in viewport. */
   part->draw_col = PART_DRAW_COL_VEL;
   psys->part = part;
   psys->pointcache = BKE_ptcache_add(&psys->ptcaches);
@@ -4386,7 +4386,7 @@ void BKE_fluid_modifier_create_type_data(struct FluidModifierData *mmd)
     mmd->domain->particle_number = 2;
     mmd->domain->particle_minimum = 8;
     mmd->domain->particle_maximum = 16;
-    mmd->domain->particle_radius = 1.5f;
+    mmd->domain->particle_radius = 1.0f;
     mmd->domain->particle_band_width = 3.0f;
     mmd->domain->fractions_threshold = 0.05f;
 
@@ -4445,9 +4445,9 @@ void BKE_fluid_modifier_create_type_data(struct FluidModifierData *mmd)
     mmd->domain->cache_flag = 0;
     mmd->domain->cache_type = FLUID_DOMAIN_CACHE_MODULAR;
     mmd->domain->cache_mesh_format = FLUID_DOMAIN_FILE_BIN_OBJECT;
-    mmd->domain->cache_data_format = FLUID_DOMAIN_FILE_UNI;
-    mmd->domain->cache_particle_format = FLUID_DOMAIN_FILE_UNI;
-    mmd->domain->cache_noise_format = FLUID_DOMAIN_FILE_UNI;
+    mmd->domain->cache_data_format = FLUID_DOMAIN_FILE_OPENVDB;
+    mmd->domain->cache_particle_format = FLUID_DOMAIN_FILE_OPENVDB;
+    mmd->domain->cache_noise_format = FLUID_DOMAIN_FILE_OPENVDB;
     modifier_path_init(mmd->domain->cache_directory,
                        sizeof(mmd->domain->cache_directory),
                        FLUID_DOMAIN_DIR_DEFAULT);
diff --git a/source/blender/makesrna/intern/rna_fluid.c b/source/blender/makesrna/intern/rna_fluid.c
index 3c29f8ec8c0..01f240e715b 100644
--- a/source/blender/makesrna/intern/rna_fluid.c
+++ b/source/blender/makesrna/intern/rna_fluid.c
@@ -246,7 +246,7 @@ static void rna_Fluid_tracer_parts_update(Main *bmain, Scene *UNUSED(scene), Poi
     rna_Fluid_parts_create(bmain,
                            ptr,
                            "TracerParticleSettings",
-                           "Tracer Particles",
+                           "Tracers",
                            "Tracer Particle System",
                            PART_FLUID_TRACER);
     mmd->domain->particle_type |= FLUID_DOMAIN_PARTICLE_TRACER;
@@ -290,7 +290,7 @@ static void rna_Fluid_combined_export_update(Main *bmain, Scene *scene, PointerR
       rna_Fluid_parts_create(bmain,
                              ptr,
                              "SprayFoamParticleSettings",
-                             "Spray + Foam Particles",
+                             "Spray + Foam",
                              "Spray + Foam Particle System",
                              PART_FLUID_SPRAYFOAM);
 
@@ -316,7 +316,7 @@ static void rna_Fluid_combined_export_update(Main *bmain, Scene *scene, PointerR
       rna_Fluid_parts_create(bmain,
                              ptr,
                              "SprayBubbleParticleSettings",
-                             "Spray + Bubble Particles",
+                             "Spray + Bubbles",
                              "Spray + Bubble Particle System",
                              PART_FLUID_SPRAYBUBBLE);
 
@@ -369,7 +369,7 @@ static void rna_Fluid_combined_export_update(Main *bmain, Scene *scene, PointerR
       rna_Fluid_parts_create(bmain,
                              ptr,
                              "SprayFoamBubbleParticleSettings",
-                             "Spray + Foam + Bubble Particles",
+                             "Spray + Foam + Bubbles",
                              "Spray + Foam + Bubble Particle System",
                              PART_FLUID_SPRAYFOAMBUBBLE);
 
@@ -1522,10 +1522,10 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
 
   prop = RNA_def_property(srna, "particle_radius", PROP_FLOAT, PROP_NONE);
   RNA_def_property_range(prop, 0.0, 10.0);
-  RNA_def_property_ui_text(
-      prop,
-      "Radius",
-      "Particle radius factor. Adjust this parameter when the simulation appears to leak volume");
+  RNA_def_property_ui_text(prop,
+                           "Radius",
+                           "Particle radius factor. Increase this value if the simulation appears "
+                           "to leak volume, decrease it if the simulation seems to gain volume");
   RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache");
 
   prop = RNA_def_property(srna, "particle_band_width", PROP_FLOAT, PROP_NONE);



More information about the Bf-blender-cvs mailing list