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>2011-07-25 03:29:19 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2011-07-25 03:29:19 +0400
commit0a9094a8e30c86945a428d35d21fc683261cfe5c (patch)
treed49763f5084a723ec83250e2ee8414895b13058c /source/blender/makesdna/DNA_linestyle_types.h
parentce03ec4b866a3e1a6f19a266bf2c38c2c4b4afd0 (diff)
New line style modifiers for changing line color, alpha transparency, and
line thickness based on object materials. Accessible material attributes are diffuse color, specular color, specular hardness, and alpha.
Diffstat (limited to 'source/blender/makesdna/DNA_linestyle_types.h')
-rw-r--r--source/blender/makesdna/DNA_linestyle_types.h58
1 files changed, 55 insertions, 3 deletions
diff --git a/source/blender/makesdna/DNA_linestyle_types.h b/source/blender/makesdna/DNA_linestyle_types.h
index 88e44294ed4..75662b9cd10 100644
--- a/source/blender/makesdna/DNA_linestyle_types.h
+++ b/source/blender/makesdna/DNA_linestyle_types.h
@@ -47,16 +47,20 @@ typedef struct LineStyleModifier {
int pad;
} LineStyleModifier;
-/* LineStyleColorModifier::type */
+/* LineStyleModifier::type */
#define LS_MODIFIER_ALONG_STROKE 1
#define LS_MODIFIER_DISTANCE_FROM_CAMERA 2
#define LS_MODIFIER_DISTANCE_FROM_OBJECT 3
-#define LS_MODIFIER_NUM 4
+#define LS_MODIFIER_MATERIAL 4
+#define LS_MODIFIER_NUM 5
-/* LineStyleColorModifier::flags */
+/* LineStyleModifier::flags */
#define LS_MODIFIER_ENABLED 1
#define LS_MODIFIER_EXPANDED 2
+/* flags (for color) */
+#define LS_MODIFIER_USE_RAMP 1
+
/* flags (for alpha & thickness) */
#define LS_MODIFIER_USE_CURVE 1
#define LS_MODIFIER_INVERT 2
@@ -170,6 +174,54 @@ typedef struct LineStyleThicknessModifier_DistanceFromObject {
} LineStyleThicknessModifier_DistanceFromObject;
+/* Material modifiers */
+
+/* mat_attr */
+#define LS_MODIFIER_MATERIAL_DIFF 1
+#define LS_MODIFIER_MATERIAL_DIFF_R 2
+#define LS_MODIFIER_MATERIAL_DIFF_G 3
+#define LS_MODIFIER_MATERIAL_DIFF_B 4
+#define LS_MODIFIER_MATERIAL_SPEC 5
+#define LS_MODIFIER_MATERIAL_SPEC_R 6
+#define LS_MODIFIER_MATERIAL_SPEC_G 7
+#define LS_MODIFIER_MATERIAL_SPEC_B 8
+#define LS_MODIFIER_MATERIAL_SPEC_HARD 9
+#define LS_MODIFIER_MATERIAL_ALPHA 10
+
+typedef struct LineStyleColorModifier_Material {
+ struct LineStyleModifier modifier;
+
+ struct ColorBand *color_ramp;
+ int blend;
+ int flags;
+ int mat_attr;
+ int pad;
+
+} LineStyleColorModifier_Material;
+
+typedef struct LineStyleAlphaModifier_Material {
+ struct LineStyleModifier modifier;
+
+ struct CurveMapping *curve;
+ int blend;
+ int flags;
+ int mat_attr;
+ int pad;
+
+} LineStyleAlphaModifier_Material;
+
+typedef struct LineStyleThicknessModifier_Material {
+ struct LineStyleModifier modifier;
+
+ struct CurveMapping *curve;
+ int blend;
+ int flags;
+ float value_min, value_max;
+ int mat_attr;
+ int pad;
+
+} LineStyleThicknessModifier_Material;
+
/* FreestyleLineStyle::panel */
#define LS_PANEL_COLOR 1
#define LS_PANEL_ALPHA 2