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:
authorHans Goudey <h.goudey@me.com>2020-08-12 04:59:16 +0300
committerHans Goudey <h.goudey@me.com>2020-08-12 04:59:16 +0300
commitef11238c743e6985fe325280fb13e05d6ec27378 (patch)
tree1dd2605a676bee52296535825b99f000a9c255eb /source/blender/simulation/intern/hair_volume.cpp
parent1f768bbe4145daed111636ca09dd53b25b8d29b5 (diff)
parentec5f39208785c1bbe723054ffe69e1ac2ab470dd (diff)
Merge branch 'master' into property-search-uiproperty-search-ui
Diffstat (limited to 'source/blender/simulation/intern/hair_volume.cpp')
-rw-r--r--source/blender/simulation/intern/hair_volume.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/source/blender/simulation/intern/hair_volume.cpp b/source/blender/simulation/intern/hair_volume.cpp
index c80ae69ce73..c24b7154d13 100644
--- a/source/blender/simulation/intern/hair_volume.cpp
+++ b/source/blender/simulation/intern/hair_volume.cpp
@@ -710,9 +710,8 @@ BLI_INLINE float hair_volume_density_divergence(float density,
if (density > density_threshold && density > target_density) {
return strength * logf(target_density / density);
}
- else {
- return 0.0f;
- }
+
+ return 0.0f;
}
bool SIM_hair_volume_solve_divergence(HairGrid *grid,
@@ -1030,14 +1029,13 @@ bool SIM_hair_volume_solve_divergence(HairGrid *grid,
return true;
}
- else {
- /* Clear result in case of error */
- for (i = 0, vert = grid->verts; i < num_cells; i++, vert++) {
- zero_v3(vert->velocity_smooth);
- }
- return false;
+ /* Clear result in case of error */
+ for (i = 0, vert = grid->verts; i < num_cells; i++, vert++) {
+ zero_v3(vert->velocity_smooth);
}
+
+ return false;
}
#if 0 /* XXX weighting is incorrect, disabled for now */