[Bf-extensions-cvs] [93f61d1e] master: Fix T95455, T102384: Correct RGB color construction
Mark Blair
noreply at git.blender.org
Mon Nov 21 12:52:29 CET 2022
Commit: 93f61d1ef75ce341f3789df9c7ea4cc0352a2fe4
Author: Mark Blair
Date: Mon Nov 21 08:50:16 2022 -0300
Branches: master
https://developer.blender.org/rBA93f61d1ef75ce341f3789df9c7ea4cc0352a2fe4
Fix T95455, T102384: Correct RGB color construction
Per notes on T95455:
An exception is occurring in the import_x3d module, https://developer.blender.org/diffusion/BA/browse/master/io_scene_x3d/import_x3d.py
the appearance_CreateDefaultMaterial function; at line 2764 the base color is being set to (0.8,0.8,0.8,1.0), that is, an RGBA color.
In further processing, this value gets passed to utilty rgb_to_rgba in node_shader_utils.py ( https://developer.blender.org/diffusion/BS/browse/master/release/scripts/modules/bpy_extras/node_shader_utils.py )
Another value 1.0 is added t the color - tuple, leading to a invalid value of 5 numeric elements.
Reviewed By: mano-wii
Differential Revision: https://developer.blender.org/D16453
===================================================================
M io_scene_x3d/__init__.py
M io_scene_x3d/import_x3d.py
===================================================================
diff --git a/io_scene_x3d/__init__.py b/io_scene_x3d/__init__.py
index dd41fd15..46283d54 100644
--- a/io_scene_x3d/__init__.py
+++ b/io_scene_x3d/__init__.py
@@ -3,7 +3,7 @@
bl_info = {
"name": "Web3D X3D/VRML2 format",
"author": "Campbell Barton, Bart, Bastien Montagne, Seva Alekseyev",
- "version": (2, 3, 0),
+ "version": (2, 3, 1),
"blender": (2, 93, 0),
"location": "File > Import-Export",
"description": "Import-Export X3D, Import VRML2",
diff --git a/io_scene_x3d/import_x3d.py b/io_scene_x3d/import_x3d.py
index f89be897..480bb787 100644
--- a/io_scene_x3d/import_x3d.py
+++ b/io_scene_x3d/import_x3d.py
@@ -2738,7 +2738,7 @@ def appearance_CreateDefaultMaterial():
bpymat_wrap = node_shader_utils.PrincipledBSDFWrapper(bpymat, is_readonly=False)
bpymat_wrap.roughness = 0.8
- bpymat_wrap.base_color = (0.8, 0.8, 0.8, 1.0)
+ bpymat_wrap.base_color = (0.8, 0.8, 0.8)
#bpymat.mirror_color = (0, 0, 0)
#bpymat.emit = 0
More information about the Bf-extensions-cvs
mailing list