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>2014-04-18 09:59:02 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2014-04-18 10:02:45 +0400
commitf60a66f41784de388a01c4c882c969730d675375 (patch)
treea469d0acdfa48cefa2611837d268f2c636225372 /source/blender/makesdna/DNA_linestyle_types.h
parent6a94e73a854286f711bffa81d351d640b4cf3675 (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/makesdna/DNA_linestyle_types.h')
-rw-r--r--source/blender/makesdna/DNA_linestyle_types.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_linestyle_types.h b/source/blender/makesdna/DNA_linestyle_types.h
index 19c4e057a96..8d5f81ede5a 100644
--- a/source/blender/makesdna/DNA_linestyle_types.h
+++ b/source/blender/makesdna/DNA_linestyle_types.h
@@ -368,6 +368,8 @@ typedef struct LineStyleThicknessModifier_Calligraphy {
#define LS_MAX_2D_ANGLE (1 << 8)
#define LS_SPLIT_LENGTH (1 << 9)
#define LS_SPLIT_PATTERN (1 << 10)
+#define LS_NO_SORTING (1 << 11)
+#define LS_REVERSE_ORDER (1 << 12) /* for sorting */
/* FreestyleLineStyle::chaining */
#define LS_CHAINING_PLAIN 1
@@ -384,6 +386,17 @@ typedef struct LineStyleThicknessModifier_Calligraphy {
#define LS_THICKNESS_OUTSIDE 3
#define LS_THICKNESS_RELATIVE 4 /* thickness_ratio is used */
+/* FreestyleLineStyle::sort_key */
+#define LS_SORT_KEY_DISTANCE_FROM_CAMERA 1
+#define LS_SORT_KEY_2D_LENGTH 2
+
+/* FreestyleLineStyle::integration_type */
+#define LS_INTEGRATION_MEAN 1
+#define LS_INTEGRATION_MIN 2
+#define LS_INTEGRATION_MAX 3
+#define LS_INTEGRATION_FIRST 4
+#define LS_INTEGRATION_LAST 5
+
typedef struct FreestyleLineStyle {
ID id;
struct AnimData *adt;
@@ -401,6 +414,7 @@ typedef struct FreestyleLineStyle {
unsigned short split_dash1, split_gap1;
unsigned short split_dash2, split_gap2;
unsigned short split_dash3, split_gap3;
+ int sort_key, integration_type;
int pad;
unsigned short dash1, gap1, dash2, gap2, dash3, gap3;
int panel; /* for UI */