diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2014-04-18 09:59:02 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2014-04-18 10:02:45 +0400 |
commit | f60a66f41784de388a01c4c882c969730d675375 (patch) | |
tree | a469d0acdfa48cefa2611837d268f2c636225372 /source/blender/blenkernel/intern/linestyle.c | |
parent | 6a94e73a854286f711bffa81d351d640b4cf3675 (diff) |
Freestyle: New options for sorting to arrange the stacking order of lines.
Line styles now have a set of new options for rearranging the stacking order of lines.
This gives artists more control to determine which lines should be drawn on top of others.
Two available sort keys are the distance from camera and curvilinear 2D length.
Since the distance of a line from camera may vary over vertices, another option called
integration type is used to compute the sort key for a line from the values computed at
individual vertices. Available integration types are MEAN, MIN, MAX, FIRST and LAST
(see the tool tips for more detail).
Diffstat (limited to 'source/blender/blenkernel/intern/linestyle.c')
-rw-r--r-- | source/blender/blenkernel/intern/linestyle.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/linestyle.c b/source/blender/blenkernel/intern/linestyle.c index f826e611a11..78d062ce1f7 100644 --- a/source/blender/blenkernel/intern/linestyle.c +++ b/source/blender/blenkernel/intern/linestyle.c @@ -81,7 +81,7 @@ static void default_linestyle_settings(FreestyleLineStyle *linestyle) linestyle->thickness = 3.0f; linestyle->thickness_position = LS_THICKNESS_CENTER; linestyle->thickness_ratio = 0.5f; - linestyle->flag = LS_SAME_OBJECT; + linestyle->flag = LS_SAME_OBJECT | LS_NO_SORTING; linestyle->chaining = LS_CHAINING_PLAIN; linestyle->rounds = 3; linestyle->min_angle = DEG2RADF(0.0f); @@ -89,6 +89,8 @@ static void default_linestyle_settings(FreestyleLineStyle *linestyle) linestyle->min_length = 0.0f; linestyle->max_length = 10000.0f; linestyle->split_length = 100; + linestyle->sort_key = LS_SORT_KEY_DISTANCE_FROM_CAMERA; + linestyle->integration_type = LS_INTEGRATION_MEAN; BLI_listbase_clear(&linestyle->color_modifiers); BLI_listbase_clear(&linestyle->alpha_modifiers); |