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:
authorCampbell Barton <ideasman42@gmail.com>2018-04-16 18:23:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-04-16 18:24:20 +0300
commit9a11aeb300cef2eef5df3b606468a6bcdaca3550 (patch)
tree7265ef366b503021c8d18497d04b49a374309829 /source/blender/blenkernel/intern/effect.c
parent3a14a0381288ae9f49d1ab489a250cd29a00e771 (diff)
parent95eb9f22e69622c5817707fa9534521613e7d7cc (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/blenkernel/intern/effect.c')
-rw-r--r--source/blender/blenkernel/intern/effect.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c
index b54093555f5..a919353644d 100644
--- a/source/blender/blenkernel/intern/effect.c
+++ b/source/blender/blenkernel/intern/effect.c
@@ -507,28 +507,28 @@ float effector_falloff(EffectorCache *eff, EffectorData *efd, EffectedPoint *UNU
falloff=0.0f;
else {
switch (eff->pd->falloff) {
- case PFIELD_FALL_SPHERE:
- falloff*= falloff_func_dist(eff->pd, efd->distance);
- break;
-
- case PFIELD_FALL_TUBE:
- falloff*= falloff_func_dist(eff->pd, ABS(fac));
- if (falloff == 0.0f)
+ case PFIELD_FALL_SPHERE:
+ falloff*= falloff_func_dist(eff->pd, efd->distance);
break;
- madd_v3_v3v3fl(temp, efd->vec_to_point2, efd->nor, -fac);
- r_fac= len_v3(temp);
- falloff*= falloff_func_rad(eff->pd, r_fac);
- break;
- case PFIELD_FALL_CONE:
- falloff*= falloff_func_dist(eff->pd, ABS(fac));
- if (falloff == 0.0f)
+ case PFIELD_FALL_TUBE:
+ falloff*= falloff_func_dist(eff->pd, ABS(fac));
+ if (falloff == 0.0f)
+ break;
+
+ madd_v3_v3v3fl(temp, efd->vec_to_point2, efd->nor, -fac);
+ r_fac= len_v3(temp);
+ falloff*= falloff_func_rad(eff->pd, r_fac);
break;
+ case PFIELD_FALL_CONE:
+ falloff*= falloff_func_dist(eff->pd, ABS(fac));
+ if (falloff == 0.0f)
+ break;
- r_fac= RAD2DEGF(saacos(fac/len_v3(efd->vec_to_point)));
- falloff*= falloff_func_rad(eff->pd, r_fac);
+ r_fac= RAD2DEGF(saacos(fac/len_v3(efd->vec_to_point)));
+ falloff*= falloff_func_rad(eff->pd, r_fac);
- break;
+ break;
}
}