diff options
Diffstat (limited to 'io_scene_fbx/import_fbx.py')
-rw-r--r-- | io_scene_fbx/import_fbx.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/io_scene_fbx/import_fbx.py b/io_scene_fbx/import_fbx.py index 9b8fbad1..93b01b9f 100644 --- a/io_scene_fbx/import_fbx.py +++ b/io_scene_fbx/import_fbx.py @@ -1427,6 +1427,10 @@ def blen_read_material(fbx_tmpl, fbx_obj, settings): # elem_props_get_color_rgb(fbx_props, b'ReflectionColor', const_color_white) # (x / 7.142) is only a guess, cycles usable range is (0.0 -> 0.5) ma_wrap.normalmap_strength = elem_props_get_number(fbx_props, b'BumpFactor', 2.5) / 7.142 + # For emission color we can take into account the factor, but only for default values, not in case of texture. + emission_factor = elem_props_get_number(fbx_props, b'EmissiveFactor', 1.0) + ma_wrap.emission_color = [c * emission_factor + for c in elem_props_get_color_rgb(fbx_props, b'EmissiveColor', const_color_black)] nodal_material_wrap_map[ma] = ma_wrap @@ -3111,6 +3115,9 @@ def load(operator, context, filepath="", elif lnk_type == b'Bump': # TODO displacement... """ + elif lnk_type in {b'EmissiveColor'}: + ma_wrap.emission_color_texture.image = image + texture_mapping_set(fbx_lnk, ma_wrap.emission_color_texture) else: print("WARNING: material link %r ignored" % lnk_type) |