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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-04-07 21:28:09 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-04-07 21:28:09 +0400
commite94abda66dae7d01260839a7c5c5ff271f3ae33d (patch)
treebeba13ff569e188bc6c2a9c21762c9765abd6d09 /source/blender/blenkernel/intern/linestyle.c
parent8ea8b6a1baecdbc3271a65cc9089b43aaeae743e (diff)
New options in the Parameter Editor mode for controling the position of stroke thickness.
The new options enable a better control on the position of stroke thickness with respect to stroke backbone geometry. Three predefined positions are: * center: thickness is evenly split to the left and right side of the stroke geometry. * inside: strokes are drawn within object boundary. * outside: strokes are drawn outside the object boundary. Another option called "relative" allows users to specify the relative position by a number between 0 (inside) and 1 (outside). The thickness position options are applied only to strokes of the edge types SILHOUETTE and BORDER, since these are the only edge types defined in terms of object boundary. Strokes of other edge types are always using the "center" option.
Diffstat (limited to 'source/blender/blenkernel/intern/linestyle.c')
-rw-r--r--source/blender/blenkernel/intern/linestyle.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/linestyle.c b/source/blender/blenkernel/intern/linestyle.c
index dcacfeea5bc..b2c2cb27e31 100644
--- a/source/blender/blenkernel/intern/linestyle.c
+++ b/source/blender/blenkernel/intern/linestyle.c
@@ -75,6 +75,8 @@ static void default_linestyle_settings(FreestyleLineStyle *linestyle)
linestyle->r = linestyle->g = linestyle->b = 0.0;
linestyle->alpha = 1.0;
linestyle->thickness = 1.0;
+ linestyle->thickness_position = LS_THICKNESS_CENTER;
+ linestyle->thickness_ratio = 0.5f;
linestyle->chaining = LS_CHAINING_PLAIN;
linestyle->rounds = 3;
linestyle->min_angle = 0.0f;
@@ -135,6 +137,8 @@ FreestyleLineStyle *FRS_copy_linestyle(FreestyleLineStyle *linestyle)
new_linestyle->b = linestyle->b;
new_linestyle->alpha = linestyle->alpha;
new_linestyle->thickness = linestyle->thickness;
+ new_linestyle->thickness_position = linestyle->thickness_position;
+ new_linestyle->thickness_ratio = linestyle->thickness_ratio;
new_linestyle->flag = linestyle->flag;
new_linestyle->caps = linestyle->caps;
new_linestyle->chaining = linestyle->chaining;