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>2013-04-24 04:14:16 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-04-24 04:14:16 +0400
commitad6cc0d0ac49ad7321ebfe72e0d8627bb9cf4f71 (patch)
tree53daa46ac8c209fbb78b242e8971cc1214c3bac2 /release/scripts/freestyle
parentb64ec6c51e869ae432a2f2f0ecd28b81f874ce51 (diff)
Fix for broken Material color/alpha/thickness modifiers.
Reverted part of the trunk revision 56234 (RNA attribute consistency edits).
Diffstat (limited to 'release/scripts/freestyle')
-rw-r--r--release/scripts/freestyle/style_modules/parameter_editor.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/release/scripts/freestyle/style_modules/parameter_editor.py b/release/scripts/freestyle/style_modules/parameter_editor.py
index e267b513ba4..77710e08ece 100644
--- a/release/scripts/freestyle/style_modules/parameter_editor.py
+++ b/release/scripts/freestyle/style_modules/parameter_editor.py
@@ -356,9 +356,9 @@ def iter_material_color(stroke, material_attribute):
while not it.is_end:
material = func(Interface0DIterator(it))
if material_attribute == 'DIFF':
- color = material.diffuse[:]
+ color = material.diffuse[0:3]
elif material_attribute == 'SPEC':
- color = material.specular[:]
+ color = material.specular[0:3]
else:
raise ValueError("unexpected material attribute: " + material_attribute)
yield it, color
@@ -370,7 +370,7 @@ def iter_material_value(stroke, material_attribute):
while not it.is_end:
material = func(Interface0DIterator(it))
if material_attribute == 'DIFF':
- r, g, b = material.diffuse
+ r, g, b = material.diffuse[0:3]
t = 0.35 * r + 0.45 * r + 0.2 * b
elif material_attribute == 'DIFF_R':
t = material.diffuse[0]
@@ -379,7 +379,7 @@ def iter_material_value(stroke, material_attribute):
elif material_attribute == 'DIFF_B':
t = material.diffuse[2]
elif material_attribute == 'SPEC':
- r, g, b = material.specular
+ r, g, b = material.specular[0:3]
t = 0.35 * r + 0.45 * r + 0.2 * b
elif material_attribute == 'SPEC_R':
t = material.specular[0]