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
This commit is contained in:
parent
eb33ab4107
commit
93f61d1ef7
Notes:
blender-bot
2023-02-14 18:24:54 +01:00
Referenced by issue #102384, Failure importing x3d file Referenced by issue #95455, Exception raised and failure in importing an X3D file with no Material node
|
@ -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",
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue