forked from bartvdbraak/blender
Fix for broken Material color/alpha/thickness modifiers.
Reverted part of the trunk revision 56234 (RNA attribute consistency edits).
This commit is contained in:
parent
b64ec6c51e
commit
ad6cc0d0ac
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user