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:
Diffstat (limited to 'source/blender/makesrna/intern/rna_fluid.c')
-rw-r--r--source/blender/makesrna/intern/rna_fluid.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_fluid.c b/source/blender/makesrna/intern/rna_fluid.c
index 71b8eee9d50..47e0333edb1 100644
--- a/source/blender/makesrna/intern/rna_fluid.c
+++ b/source/blender/makesrna/intern/rna_fluid.c
@@ -1024,14 +1024,18 @@ static void rna_Fluid_flowtype_set(struct PointerRNA *ptr, int value)
FluidFlowSettings *settings = (FluidFlowSettings *)ptr->data;
if (value != settings->type) {
+ short prev_value = settings->type;
settings->type = value;
- /* Force flow source to mesh */
+ /* Force flow source to mesh for liquids.
+ * Also use different surface emission. Liquids should by default not emit around surface. */
if (value == FLUID_FLOW_TYPE_LIQUID) {
rna_Fluid_flowsource_set(ptr, FLUID_FLOW_SOURCE_MESH);
settings->surface_distance = 0.0f;
}
- else {
+ /* Use some surface emission when switching to a gas emitter. Gases should by default emit a
+ * bit around surface. */
+ if (prev_value == FLUID_FLOW_TYPE_LIQUID) {
settings->surface_distance = 1.5f;
}
}
@@ -1683,6 +1687,15 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
"and reduce the boundary smoothening effect)");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset");
+ prop = RNA_def_property(srna, "sys_particle_maximum", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "sys_particle_maximum");
+ RNA_def_property_range(prop, 0, INT_MAX);
+ RNA_def_property_ui_text(
+ prop,
+ "System Maximum",
+ "Maximum number of fluid particles that are allowed in this simulation");
+ RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_datacache_reset");
+
/* diffusion options */
prop = RNA_def_property(srna, "use_diffusion", PROP_BOOLEAN, PROP_NONE);
@@ -2376,7 +2389,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
prop = RNA_def_property(srna, "openvdb_cache_compress_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "openvdb_compression");
RNA_def_property_enum_items(prop, prop_compression_items);
- RNA_def_property_ui_text(prop, "Compression", "facession method to be used");
+ RNA_def_property_ui_text(prop, "Compression", "Compression method to be used");
prop = RNA_def_property(srna, "openvdb_data_depth", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "openvdb_data_depth");