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:
authorOmar Emara <OmarSquircleArt>2021-03-23 10:26:13 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-03-23 10:34:46 +0300
commitec97450ac6160a8892a339a746a507e40b7d2fce (patch)
treec1294ae63a80d803172e6a6322952cac7ca8f459 /source/blender/blenkernel/intern/displist.c
parentf2f796e623237504790b421e54a4a82549e68c92 (diff)
Curves: add taper mode option
Currently, when a taper object is specified, the radius of the spline is ignored. This patch adds a new option to control how the taper object affect the effective radius of the spline. The option allow three modes of operation: - Override: The old method. The radius of the spline is ignored and overridden. - Multiply: The radius of the spline is multiplied by the taper radius. - Add: The radius of the spline is added to the taper radius. Ref D10779
Diffstat (limited to 'source/blender/blenkernel/intern/displist.c')
-rw-r--r--source/blender/blenkernel/intern/displist.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c
index 708b1971bd5..d4581991566 100644
--- a/source/blender/blenkernel/intern/displist.c
+++ b/source/blender/blenkernel/intern/displist.c
@@ -1650,6 +1650,13 @@ static void do_makeDispListCurveTypes(Depsgraph *depsgraph,
}
radius_factor = displist_calc_taper(depsgraph, scene, cu->taperobj, taper_factor);
+
+ if (cu->taper_radius_mode == CU_TAPER_RADIUS_MULTIPLY) {
+ radius_factor *= bevp->radius;
+ }
+ else if (cu->taper_radius_mode == CU_TAPER_RADIUS_ADD) {
+ radius_factor += bevp->radius;
+ }
}
if (bevp->split_tag) {