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
path: root/source
diff options
context:
space:
mode:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2014-10-13 19:53:08 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-10-15 18:30:17 +0400
commit1800bfb8ca8218675c98e063494ac1e24b20fe07 (patch)
tree91b90d05c24238fd1e309eb6900d44c74a8f9d0a /source
parent74ce45eed52bdb2e53e97b8122af523a061aa1ba (diff)
Fix T42198: Linked lines only work with linked objects.
The reported issue was caused by a backward incompatibility due to careless code changes made when per-material Freestyle line colors were introduced in rB7915d7277ac8c605f016f30f943080556244fb59. In 2.71 line style Material color/alpha/thickness modifiers was retrieving alpha transparency from Material.alpha, whereas in 2.72 Material.line_color[3] was referenced. The present fix reverts the aforementioned code changes. This issue is a regression from 2.71, so the fix is appropriate for inclusion in the 2.72a release.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/linestyle.c2
-rw-r--r--source/blender/makesdna/DNA_linestyle_types.h1
-rw-r--r--source/blender/makesrna/intern/rna_linestyle.c1
3 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/linestyle.c b/source/blender/blenkernel/intern/linestyle.c
index 45695844101..ebebe4e0fcd 100644
--- a/source/blender/blenkernel/intern/linestyle.c
+++ b/source/blender/blenkernel/intern/linestyle.c
@@ -440,7 +440,7 @@ LineStyleModifier *BKE_linestyle_alpha_modifier_add(FreestyleLineStyle *linestyl
{
LineStyleAlphaModifier_Material *p = (LineStyleAlphaModifier_Material *)m;
p->curve = curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
- p->mat_attr = LS_MODIFIER_MATERIAL_ALPHA;
+ p->mat_attr = LS_MODIFIER_MATERIAL_LINE_A;
break;
}
default:
diff --git a/source/blender/makesdna/DNA_linestyle_types.h b/source/blender/makesdna/DNA_linestyle_types.h
index bac03b4efd7..2b97fbd3961 100644
--- a/source/blender/makesdna/DNA_linestyle_types.h
+++ b/source/blender/makesdna/DNA_linestyle_types.h
@@ -203,6 +203,7 @@ typedef struct LineStyleThicknessModifier_DistanceFromObject {
#define LS_MODIFIER_MATERIAL_LINE_R 12
#define LS_MODIFIER_MATERIAL_LINE_G 13
#define LS_MODIFIER_MATERIAL_LINE_B 14
+#define LS_MODIFIER_MATERIAL_LINE_A 15
typedef struct LineStyleColorModifier_Material {
struct LineStyleModifier modifier;
diff --git a/source/blender/makesrna/intern/rna_linestyle.c b/source/blender/makesrna/intern/rna_linestyle.c
index 96b81f12620..2d4f7f9ae95 100644
--- a/source/blender/makesrna/intern/rna_linestyle.c
+++ b/source/blender/makesrna/intern/rna_linestyle.c
@@ -698,6 +698,7 @@ static void rna_def_modifier_material_common(StructRNA *srna)
{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_LINE_A, "LINE_A", 0, "Line Color Alpha", ""},
{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", ""},