diff --git a/io_scene_fbx/import_fbx.py b/io_scene_fbx/import_fbx.py index c63cc0dbdc6ce8206f8db2a69677c0a991aa9a18..5556f96845d1cbf3d7bc93fb47c5118c430232c7 100644 --- a/io_scene_fbx/import_fbx.py +++ b/io_scene_fbx/import_fbx.py @@ -3044,27 +3044,20 @@ def load(operator, context, filepath="", rot = tuple(-r for r in elem_props_get_vector_3d(fbx_props, b'Rotation', (0.0, 0.0, 0.0))) scale = tuple(((1.0 / s) if s != 0.0 else 1.0) for s in elem_props_get_vector_3d(fbx_props, b'Scaling', (1.0, 1.0, 1.0))) - clamp_uv = (bool(elem_props_get_enum(fbx_props, b'WrapModeU', 0)), - bool(elem_props_get_enum(fbx_props, b'WrapModeV', 0))) + clamp = (bool(elem_props_get_enum(fbx_props, b'WrapModeU', 0)) or + bool(elem_props_get_enum(fbx_props, b'WrapModeV', 0))) if (loc == (0.0, 0.0, 0.0) and rot == (0.0, 0.0, 0.0) and scale == (1.0, 1.0, 1.0) and - clamp_uv == (False, False)): + clamp == False): return node_texture.translation = loc node_texture.rotation = rot node_texture.scale = scale - - # awkward conversion UV clamping to min/max - node_texture.min = (0.0, 0.0, 0.0) - node_texture.max = (1.0, 1.0, 1.0) - node_texture.use_min = node_texture.use_max = clamp_uv[0] or clamp_uv[1] - if clamp_uv[0] != clamp_uv[1]: - # use bool as index - node_texture.min[not clamp[0]] = -1e9 - node_texture.max[not clamp[0]] = 1e9 + if clamp: + node_texture.extension = 'EXTEND' for fbx_uuid, fbx_item in fbx_table_nodes.items(): fbx_obj, blen_data = fbx_item