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
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/fluid.c2
-rw-r--r--source/blender/makesdna/DNA_fluid_types.h3
-rw-r--r--source/blender/makesrna/intern/rna_fluid.c9
3 files changed, 13 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c
index 286da4977e3..079b436a3ea 100644
--- a/source/blender/blenkernel/intern/fluid.c
+++ b/source/blender/blenkernel/intern/fluid.c
@@ -4856,6 +4856,7 @@ void BKE_fluid_modifier_create_type_data(struct FluidModifierData *fmd)
fmd->domain->particle_radius = 1.0f;
fmd->domain->particle_band_width = 3.0f;
fmd->domain->fractions_threshold = 0.05f;
+ fmd->domain->sys_particle_maximum = 0;
/* diffusion options*/
fmd->domain->surface_tension = 0.0f;
@@ -5100,6 +5101,7 @@ void BKE_fluid_modifier_copy(const struct FluidModifierData *fmd,
tfds->particle_radius = fds->particle_radius;
tfds->particle_band_width = fds->particle_band_width;
tfds->fractions_threshold = fds->fractions_threshold;
+ tfds->sys_particle_maximum = fds->sys_particle_maximum;
/* diffusion options*/
tfds->surface_tension = fds->surface_tension;
diff --git a/source/blender/makesdna/DNA_fluid_types.h b/source/blender/makesdna/DNA_fluid_types.h
index 909170523a3..90440d9af8a 100644
--- a/source/blender/makesdna/DNA_fluid_types.h
+++ b/source/blender/makesdna/DNA_fluid_types.h
@@ -524,8 +524,9 @@ typedef struct FluidDomainSettings {
float particle_band_width;
float fractions_threshold;
float flip_ratio;
+ int sys_particle_maximum;
short simulation_method;
- char _pad4[6];
+ char _pad4[2];
/* Diffusion options. */
float surface_tension;
diff --git a/source/blender/makesrna/intern/rna_fluid.c b/source/blender/makesrna/intern/rna_fluid.c
index 71b8eee9d50..ab8f97ae3c2 100644
--- a/source/blender/makesrna/intern/rna_fluid.c
+++ b/source/blender/makesrna/intern/rna_fluid.c
@@ -1683,6 +1683,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);