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-07-07 10:54:46 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2014-07-07 11:19:51 +0400
commit7915d7277ac8c605f016f30f943080556244fb59 (patch)
tree4e137b5a4e98fad4911815a938cae8fd00783030 /source/blender/makesrna/intern/rna_linestyle.c
parentdc40928087e9b1183a6df2b38bb6a9a610e4ed13 (diff)
Per-material line color settings for Freestyle.
New properties 'line_color' and 'line_priority' are added to Material ID data blocks. The 'line_color' property allows users to specify a per-material line color that can be used as a Freestyle line color through Material color modifiers of line style settings. The new line color property is intended to provide a solution for line color stylization when a proper Freestyle support for Cycles is implemented (likely as part of the upcoming Blender 2.72 release; see Patch D632). Materials in Cycles are usually set up using shader nodes, and Freestyle won't be capable of retrieving colors and other properties from node-based materials any soon. The new line color property of materials addresses this foreseen limitation by providing artists with an intuitive alternative mean to specify line colors on a per-material basis independently from node trees. The 'line_priority' property gives users a way to control line colors at material boundaries. When a line is drawn along a feature edge at material boundaries, one of the two materials on both sides of the edge has to be picked up to determine the line color. So far there was no way to control this selection (which was in effect at random). Now the material with a higher line color priority will be selected. The new per-material line settings are shown in the new Freestyle Line tab in the Material context of the Properties window (only when Freestyle is enabled).
Diffstat (limited to 'source/blender/makesrna/intern/rna_linestyle.c')
-rw-r--r--source/blender/makesrna/intern/rna_linestyle.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/source/blender/makesrna/intern/rna_linestyle.c b/source/blender/makesrna/intern/rna_linestyle.c
index ef3ed4084f2..faff39e679a 100644
--- a/source/blender/makesrna/intern/rna_linestyle.c
+++ b/source/blender/makesrna/intern/rna_linestyle.c
@@ -681,16 +681,20 @@ static void rna_def_modifier_material_common(StructRNA *srna)
PropertyRNA *prop;
static EnumPropertyItem mat_attr_items[] = {
- {LS_MODIFIER_MATERIAL_DIFF, "DIFF", 0, "Diffuse", ""},
- {LS_MODIFIER_MATERIAL_DIFF_R, "DIFF_R", 0, "Diffuse Red", ""},
- {LS_MODIFIER_MATERIAL_DIFF_G, "DIFF_G", 0, "Diffuse Green", ""},
- {LS_MODIFIER_MATERIAL_DIFF_B, "DIFF_B", 0, "Diffuse Blue", ""},
- {LS_MODIFIER_MATERIAL_SPEC, "SPEC", 0, "Specular", ""},
- {LS_MODIFIER_MATERIAL_SPEC_R, "SPEC_R", 0, "Specular Red", ""},
- {LS_MODIFIER_MATERIAL_SPEC_G, "SPEC_G", 0, "Specular Green", ""},
- {LS_MODIFIER_MATERIAL_SPEC_B, "SPEC_B", 0, "Specular Blue", ""},
+ {LS_MODIFIER_MATERIAL_LINE, "LINE", 0, "Line Color", ""},
+ {LS_MODIFIER_MATERIAL_LINE_R, "LINE_R", 0, "Line Color Red", ""},
+ {LS_MODIFIER_MATERIAL_LINE_G, "LINE_G", 0, "Line Color Green", ""},
+ {LS_MODIFIER_MATERIAL_LINE_B, "LINE_B", 0, "Line Color Blue", ""},
+ {LS_MODIFIER_MATERIAL_DIFF, "DIFF", 0, "Diffuse Color", ""},
+ {LS_MODIFIER_MATERIAL_DIFF_R, "DIFF_R", 0, "Diffuse Color Red", ""},
+ {LS_MODIFIER_MATERIAL_DIFF_G, "DIFF_G", 0, "Diffuse Color Green", ""},
+ {LS_MODIFIER_MATERIAL_DIFF_B, "DIFF_B", 0, "Diffuse Color Blue", ""},
+ {LS_MODIFIER_MATERIAL_SPEC, "SPEC", 0, "Specular Color", ""},
+ {LS_MODIFIER_MATERIAL_SPEC_R, "SPEC_R", 0, "Specular Color Red", ""},
+ {LS_MODIFIER_MATERIAL_SPEC_G, "SPEC_G", 0, "Specular Color Green", ""},
+ {LS_MODIFIER_MATERIAL_SPEC_B, "SPEC_B", 0, "Specular Color Blue", ""},
{LS_MODIFIER_MATERIAL_SPEC_HARD, "SPEC_HARD", 0, "Specular Hardness", ""},
- {LS_MODIFIER_MATERIAL_ALPHA, "ALPHA", 0, "Alpha", ""},
+ {LS_MODIFIER_MATERIAL_ALPHA, "ALPHA", 0, "Alpha Transparency", ""},
{0, NULL, 0, NULL, NULL}
};