[Bf-blender-cvs] [3bdfb5f982b] fluid-mantaflow: made textual descriptions of new min max particle fields a bit clearer

Sebastián Barschkis noreply at git.blender.org
Sat Jul 29 00:44:25 CEST 2017


Commit: 3bdfb5f982b282c4fb6e561998a2b3b3b027717c
Author: Sebastián Barschkis
Date:   Sun Jul 23 19:23:22 2017 +0200
Branches: fluid-mantaflow
https://developer.blender.org/rB3bdfb5f982b282c4fb6e561998a2b3b3b027717c

made textual descriptions of new min max particle fields a bit clearer

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

M	intern/mantaflow/intern/FLUID.cpp
M	intern/mantaflow/intern/strings/liquid_script.h
M	release/scripts/startup/bl_ui/properties_physics_smoke.py
M	source/blender/blenkernel/intern/smoke.c
M	source/blender/makesdna/DNA_smoke_types.h
M	source/blender/makesrna/intern/rna_smoke.c

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

diff --git a/intern/mantaflow/intern/FLUID.cpp b/intern/mantaflow/intern/FLUID.cpp
index 1aff2477d54..9990bcba47d 100644
--- a/intern/mantaflow/intern/FLUID.cpp
+++ b/intern/mantaflow/intern/FLUID.cpp
@@ -653,10 +653,10 @@ std::string FLUID::getRealValue(const std::string& varName,  SmokeModifierData *
 		ss << smd->domain->particle_randomness;
 	else if (varName == "PARTICLE_NUMBER")
 		ss << smd->domain->particle_number;
-	else if (varName == "PARTICLE_SEED")
-		ss << smd->domain->particle_seed;
-	else if (varName == "PARTICLE_KILL")
-		ss << smd->domain->particle_kill;
+	else if (varName == "PARTICLE_MINIMUM")
+		ss << smd->domain->particle_minimum;
+	else if (varName == "PARTICLE_MAXIMUM")
+		ss << smd->domain->particle_maximum;
 	else if (varName == "PARTICLE_RADIUS")
 		ss << smd->domain->particle_radius;
 	else if (varName == "PARTICLE_BAND_WIDTH")
diff --git a/intern/mantaflow/intern/strings/liquid_script.h b/intern/mantaflow/intern/strings/liquid_script.h
index cef9361adc3..e83411bf8e1 100644
--- a/intern/mantaflow/intern/strings/liquid_script.h
+++ b/intern/mantaflow/intern/strings/liquid_script.h
@@ -40,8 +40,8 @@ combineBandWidth_s$ID$        = narrowBandWidth_s$ID$ - 1\n\
 adjustedNarrowBandWidth_s$ID$ = $PARTICLE_BAND_WIDTH$ # only used in adjustNumber to control band width\n\
 \n\
 particleNumber_s$ID$ = $PARTICLE_NUMBER$\n\
-minParticles_s$ID$   = $PARTICLE_SEED$\n\
-maxParticles_s$ID$   = $PARTICLE_KILL$\n\
+minParticles_s$ID$   = $PARTICLE_MINIMUM$\n\
+maxParticles_s$ID$   = $PARTICLE_MAXIMUM$\n\
 radiusFactor_s$ID$   = $PARTICLE_RADIUS$\n\
 randomness_s$ID$     = $PARTICLE_RANDOMNESS$\n\
 maxVel_s$ID$         = 1 # just declared here, do not set\n\
diff --git a/release/scripts/startup/bl_ui/properties_physics_smoke.py b/release/scripts/startup/bl_ui/properties_physics_smoke.py
index ddf6b9d8e38..c34949aa18e 100644
--- a/release/scripts/startup/bl_ui/properties_physics_smoke.py
+++ b/release/scripts/startup/bl_ui/properties_physics_smoke.py
@@ -132,13 +132,13 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel, Panel):
                 col.label(text="Liquid:")
                 col.prop(domain, "particle_randomness")
                 col.prop(domain, "particle_radius")
-                col.prop(domain, "particle_seed")
+                col.prop(domain, "particle_minimum")
 
                 col = split.column()
                 col.label()
                 col.prop(domain, "particle_number")
                 col.prop(domain, "particle_band_width")
-                col.prop(domain, "particle_kill")
+                col.prop(domain, "particle_maximum")
 
         elif md.smoke_type == 'FLOW':
             flow = md.flow_settings
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index cb6cc79ae9b..177e033258f 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -540,8 +540,8 @@ void smokeModifier_createType(struct SmokeModifierData *smd)
 			/* liquid */
 			smd->domain->particle_randomness = 0.1f;
 			smd->domain->particle_number = 2;
-			smd->domain->particle_seed = 8;
-			smd->domain->particle_kill = 16;
+			smd->domain->particle_minimum = 8;
+			smd->domain->particle_maximum = 16;
 			smd->domain->particle_radius = 1.0f;
 			smd->domain->particle_band_width = 3.0f;
 			smd->domain->particle_velocity_threshold = 2.0f;
@@ -668,8 +668,8 @@ void smokeModifier_copy(struct SmokeModifierData *smd, struct SmokeModifierData
 
 		tsmd->domain->particle_randomness = smd->domain->particle_randomness;
 		tsmd->domain->particle_number = smd->domain->particle_number;
-		tsmd->domain->particle_seed = smd->domain->particle_seed;
-		tsmd->domain->particle_kill = smd->domain->particle_kill;
+		tsmd->domain->particle_minimum = smd->domain->particle_minimum;
+		tsmd->domain->particle_maximum = smd->domain->particle_maximum;
 		tsmd->domain->particle_radius = smd->domain->particle_radius;
 		tsmd->domain->particle_band_width = smd->domain->particle_band_width;
 		tsmd->domain->particle_velocity_threshold = smd->domain->particle_velocity_threshold;
diff --git a/source/blender/makesdna/DNA_smoke_types.h b/source/blender/makesdna/DNA_smoke_types.h
index 96178a7f7cf..c25860b9041 100644
--- a/source/blender/makesdna/DNA_smoke_types.h
+++ b/source/blender/makesdna/DNA_smoke_types.h
@@ -245,8 +245,8 @@ typedef struct SmokeDomainSettings {
 	/* liquid parameters */
 	float particle_randomness;
 	int particle_number;
-	int particle_seed;
-	int particle_kill;
+	int particle_minimum;
+	int particle_maximum;
 	float particle_radius;
 	float particle_band_width;
 	float particle_velocity_threshold;
diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c
index ad928721d32..d504f59ea85 100644
--- a/source/blender/makesrna/intern/rna_smoke.c
+++ b/source/blender/makesrna/intern/rna_smoke.c
@@ -1236,16 +1236,16 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
 	RNA_def_property_ui_text(prop, "Number", "Particle number factor (higher value results in more particles)");
 	RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_resetCache");
 
-	prop = RNA_def_property(srna, "particle_seed", PROP_INT, PROP_NONE);
-	RNA_def_property_range(prop, 1, 10);
+	prop = RNA_def_property(srna, "particle_minimum", PROP_INT, PROP_NONE);
+	RNA_def_property_range(prop, 0, 1000);
 	RNA_def_property_ui_range(prop, 1, 5, 2, -1);
-	RNA_def_property_ui_text(prop, "Seed", "Amount of particles seeded per cell (higher value results in more particles)");
+	RNA_def_property_ui_text(prop, "Minimum", "Minimum number of particles per cell (ensures that each cell has at least this amount of particles)");
 	RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_resetCache");
 
-	prop = RNA_def_property(srna, "particle_kill", PROP_INT, PROP_NONE);
-	RNA_def_property_range(prop, 1, 10);
+	prop = RNA_def_property(srna, "particle_maximum", PROP_INT, PROP_NONE);
+	RNA_def_property_range(prop, 0, 1000);
 	RNA_def_property_ui_range(prop, 1, 5, 2, -1);
-	RNA_def_property_ui_text(prop, "Kill", "Maximum number of particles allowed per cell (higher value results in more particles)");
+	RNA_def_property_ui_text(prop, "Maximum", "Maximum number of particles per cell (affects only non-surface regions, defined by particle radius factor)");
 	RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_resetCache");
 
 	prop = RNA_def_property(srna, "particle_radius", PROP_FLOAT, PROP_NONE);




More information about the Bf-blender-cvs mailing list