[Bf-blender-cvs] [c29ce9bafa1] fluid-mantaflow: fix for particle UI and mesh name update
Sebastián Barschkis
noreply at git.blender.org
Mon Aug 27 16:15:40 CEST 2018
Commit: c29ce9bafa16b0d0e3e8cc592e32c88279acec26
Author: Sebastián Barschkis
Date: Mon Aug 27 16:15:30 2018 +0200
Branches: fluid-mantaflow
https://developer.blender.org/rBc29ce9bafa16b0d0e3e8cc592e32c88279acec26
fix for particle UI and mesh name update
===================================================================
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 7c67df19d0c..e229d69d97e 100644
--- a/intern/mantaflow/intern/FLUID.cpp
+++ b/intern/mantaflow/intern/FLUID.cpp
@@ -741,10 +741,10 @@ std::string FLUID::getRealValue(const std::string& varName, SmokeModifierData *
ss << smd->domain->particle_maximum;
else if (varName == "PARTICLE_RADIUS")
ss << smd->domain->particle_radius;
- else if (varName == "MESH_SMOOTHEN_UPPER")
- ss << smd->domain->mesh_smoothen_upper;
- else if (varName == "MESH_SMOOTHEN_LOWER")
- ss << smd->domain->mesh_smoothen_lower;
+ else if (varName == "MESH_CONCAVE_UPPER")
+ ss << smd->domain->mesh_concave_upper;
+ else if (varName == "MESH_CONCAVE_LOWER")
+ ss << smd->domain->mesh_concave_lower;
else if (varName == "MESH_SMOOTHEN_POS")
ss << smd->domain->mesh_smoothen_pos;
else if (varName == "MESH_SMOOTHEN_NEG")
diff --git a/intern/mantaflow/intern/strings/liquid_script.h b/intern/mantaflow/intern/strings/liquid_script.h
index b473feb435a..b80c6cb2d3d 100644
--- a/intern/mantaflow/intern/strings/liquid_script.h
+++ b/intern/mantaflow/intern/strings/liquid_script.h
@@ -44,8 +44,8 @@ maxParticles_s$ID$ = $PARTICLE_MAXIMUM$\n\
radiusFactor_s$ID$ = $PARTICLE_RADIUS$\n\
using_mesh_s$ID$ = $USING_MESH$\n\
using_final_mesh_s$ID$ = $USING_IMPROVED_MESH$\n\
-smoothenUpper_s$ID$ = $MESH_SMOOTHEN_UPPER$\n\
-smoothenLower_s$ID$ = $MESH_SMOOTHEN_LOWER$\n\
+concaveUpper_s$ID$ = $MESH_CONCAVE_UPPER$\n\
+concaveLower_s$ID$ = $MESH_CONCAVE_LOWER$\n\
smoothenPos_s$ID$ = $MESH_SMOOTHEN_POS$\n\
smoothenNeg_s$ID$ = $MESH_SMOOTHEN_NEG$\n\
randomness_s$ID$ = $PARTICLE_RANDOMNESS$\n\
@@ -243,7 +243,7 @@ def liquid_step_mesh_$ID$():\n\
\n\
if using_final_mesh_s$ID$:\n\
mantaMsg('Liquid using improved particle levelset')\n\
- improvedParticleLevelset(pp_sm$ID$, pindex_sm$ID$, flags_sm$ID$, gpi_sm$ID$, phiParts_sm$ID$, radiusFactor_s$ID$, smoothenPos_s$ID$, smoothenNeg_s$ID$, smoothenLower_s$ID$, smoothenUpper_s$ID$)\n\
+ improvedParticleLevelset(pp_sm$ID$, pindex_sm$ID$, flags_sm$ID$, gpi_sm$ID$, phiParts_sm$ID$, radiusFactor_s$ID$, smoothenPos_s$ID$, smoothenNeg_s$ID$, concaveLower_s$ID$, concaveUpper_s$ID$)\n\
else:\n\
mantaMsg('Liquid using union particle levelset')\n\
unionParticleLevelset(pp_sm$ID$, pindex_sm$ID$, flags_sm$ID$, gpi_sm$ID$, phiParts_sm$ID$, radiusFactor_s$ID$)\n\
diff --git a/release/scripts/startup/bl_ui/properties_physics_smoke.py b/release/scripts/startup/bl_ui/properties_physics_smoke.py
index f6c4a355942..2baae7a235f 100644
--- a/release/scripts/startup/bl_ui/properties_physics_smoke.py
+++ b/release/scripts/startup/bl_ui/properties_physics_smoke.py
@@ -472,14 +472,14 @@ class PHYSICS_PT_manta_mesh(PhysicButtonsPanel, Panel):
split.enabled = not baking_any and not baked_mesh
col = split.column(align=True)
- col.label(text="Smoothening")
+ col.label(text="Smoothing:")
col.prop(domain, "mesh_smoothen_pos")
col.prop(domain, "mesh_smoothen_neg")
col = split.column(align=True)
- col.label(text="")
- col.prop(domain, "mesh_smoothen_upper")
- col.prop(domain, "mesh_smoothen_lower")
+ col.label(text="Concavity:")
+ col.prop(domain, "mesh_concave_upper")
+ col.prop(domain, "mesh_concave_lower")
# TODO (sebbas): for now just interpolate any upres grids, ie not sampling highres grids
#col = split.column()
@@ -531,26 +531,26 @@ class PHYSICS_PT_manta_particles(PhysicButtonsPanel, Panel):
split.enabled = not baking_any and not baked_particles
col = split.column()
- col.prop(domain, "use_drop_particles", text="Drop")
+ col.prop(domain, "use_spray_particles", text="Drop")
sub = col.column(align=True)
- sub.active = domain.use_drop_particles
+ sub.active = domain.use_spray_particles
sub.prop(domain, "particle_droplet_threshold", text="Threshold")
sub.prop(domain, "particle_droplet_amount", text="Generate")
sub.prop(domain, "particle_droplet_life", text="Life")
sub.prop(domain, "particle_droplet_max", text="Maximum")
sub2 = col.column()
- sub2.active = domain.use_drop_particles
+ sub2.active = domain.use_spray_particles
sub2.prop(domain, "use_bubble_particles", text="Bubble")
sub3 = col.column(align=True)
- sub3.active = domain.use_drop_particles and domain.use_bubble_particles
+ sub3.active = domain.use_spray_particles and domain.use_bubble_particles
sub3.prop(domain, "particle_bubble_rise", text="Rise")
sub3.prop(domain, "particle_bubble_life", text="Life")
sub3.prop(domain, "particle_bubble_max", text="Maximum")
col = split.column()
- col.prop(domain, "use_floater_particles", text="Float")
+ col.prop(domain, "use_foam_particles", text="Float")
sub = col.column(align=True)
- sub.active = domain.use_floater_particles
+ sub.active = domain.use_foam_particles
sub.prop(domain, "particle_floater_amount", text="Generate")
sub.prop(domain, "particle_floater_life", text="Life")
sub.prop(domain, "particle_floater_max", text="Maximum")
@@ -562,7 +562,7 @@ class PHYSICS_PT_manta_particles(PhysicButtonsPanel, Panel):
sub2.prop(domain, "particle_tracer_max", text="Maximum")
split = layout.split()
- split.enabled = domain.cache_baked_data and (domain.use_drop_particles or domain.use_bubble_particles or domain.use_floater_particles or domain.use_tracer_particles)
+ split.enabled = domain.cache_baked_data and (domain.use_spray_particles or domain.use_bubble_particles or domain.use_foam_particles or domain.use_tracer_particles)
bake_incomplete = (domain.cache_frame_pause_particles < domain.cache_frame_end)
if domain.cache_baked_particles and not domain.cache_baking_particles and bake_incomplete:
col = split.column()
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index e8b830a11f4..73270ce55c3 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -527,8 +527,8 @@ void smokeModifier_createType(struct SmokeModifierData *smd)
/* mesh options */
smd->domain->mesh_velocities = NULL;
- smd->domain->mesh_smoothen_upper = 3.5f;
- smd->domain->mesh_smoothen_lower = 0.4f;
+ smd->domain->mesh_concave_upper = 3.5f;
+ smd->domain->mesh_concave_lower = 0.4f;
smd->domain->mesh_smoothen_pos = 1;
smd->domain->mesh_smoothen_neg = 1;
smd->domain->mesh_scale = 2;
@@ -752,8 +752,8 @@ void smokeModifier_copy(const struct SmokeModifierData *smd, struct SmokeModifie
if (smd->domain->mesh_velocities) {
tsmd->domain->mesh_velocities = MEM_dupallocN(smd->domain->mesh_velocities);
}
- tsmd->domain->mesh_smoothen_upper = smd->domain->mesh_smoothen_upper;
- tsmd->domain->mesh_smoothen_lower = smd->domain->mesh_smoothen_lower;
+ tsmd->domain->mesh_concave_upper = smd->domain->mesh_concave_upper;
+ tsmd->domain->mesh_concave_lower = smd->domain->mesh_concave_lower;
tsmd->domain->mesh_smoothen_pos = smd->domain->mesh_smoothen_pos;
tsmd->domain->mesh_smoothen_neg = smd->domain->mesh_smoothen_neg;
tsmd->domain->mesh_scale = smd->domain->mesh_scale;
diff --git a/source/blender/makesdna/DNA_smoke_types.h b/source/blender/makesdna/DNA_smoke_types.h
index a4bae87b6cd..d0e22c4dd33 100644
--- a/source/blender/makesdna/DNA_smoke_types.h
+++ b/source/blender/makesdna/DNA_smoke_types.h
@@ -281,8 +281,8 @@ typedef struct SmokeDomainSettings {
float domain_size;
/* mesh options */
- float mesh_smoothen_upper;
- float mesh_smoothen_lower;
+ float mesh_concave_upper;
+ float mesh_concave_lower;
int mesh_smoothen_pos;
int mesh_smoothen_neg;
int mesh_scale;
diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c
index d47aa5d4156..bd0683c6524 100644
--- a/source/blender/makesrna/intern/rna_smoke.c
+++ b/source/blender/makesrna/intern/rna_smoke.c
@@ -1380,14 +1380,14 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
/* mesh options options */
- prop = RNA_def_property(srna, "mesh_smoothen_upper", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "mesh_concave_upper", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 10.0);
- RNA_def_property_ui_text(prop, "Smoothen Upper", "Upper mesh smoothening bound (high values tend to smoothen and fill out concave regions)");
+ RNA_def_property_ui_text(prop, "Upper Concavity", "Upper mesh concavity bound (high values tend to smoothen and fill out concave regions)");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_resetCache");
- prop = RNA_def_property(srna, "mesh_smoothen_lower", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "mesh_concave_lower", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0, 10.0);
- RNA_def_property_ui_text(prop, "Smoothen Lower", "Lower mesh smoothening bound (high values tend to smoothen and fill out concave regions)");
+ RNA_def_property_ui_text(prop, "Lower Concavity", "Lower mesh concavity bound (high values tend to smoothen and fill out concave regions)");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_resetCache");
prop = RNA_def_property(srna, "mesh_smoothen_pos", PROP_INT, PROP_NONE);
More information about the Bf-blender-cvs
mailing list