Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <mail@jlucke.com>2019-01-30 14:44:08 +0300
committerJacques Lucke <mail@jlucke.com>2019-01-30 14:44:08 +0300
commit4e8ddec4e1be8e67da90fe244707fb2077837604 (patch)
tree1e116292da425f16ee9f6818ee5deda7aa84cd24 /io_curve_svg
parent04dc7f2acbe3d7b6dc5c85ce259aba17bd747448 (diff)
Fix: Material.diffuse_color has an alpha component now
Diffstat (limited to 'io_curve_svg')
-rw-r--r--io_curve_svg/import_svg.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/io_curve_svg/import_svg.py b/io_curve_svg/import_svg.py
index c7302711..072bbc19 100644
--- a/io_curve_svg/import_svg.py
+++ b/io_curve_svg/import_svg.py
@@ -52,7 +52,7 @@ def srgb_to_linearrgb(c):
return pow((c + 0.055) * (1.0 / 1.055), 2.4)
def check_points_equal(point_a, point_b):
- return (abs(point_a[0] - point_b[0]) < 1e-6 and
+ return (abs(point_a[0] - point_b[0]) < 1e-6 and
abs(point_a[1] - point_b[1]) < 1e-6)
@@ -308,7 +308,7 @@ def SVGGetMaterial(color, context):
diffuse_color[2] = srgb_to_linearrgb(diffuse_color[2])
mat = bpy.data.materials.new(name='SVGMat')
- mat.diffuse_color = diffuse_color
+ mat.diffuse_color = (*diffuse_color, 1.0)
materials[color] = mat