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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-09-06 23:22:56 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-09-07 00:39:37 +0300
commitbcdfb9b216b950024874e8f536c9d977908aa4b7 (patch)
tree9e5e2b80b96ab8b21249c2f8fd5bde9a347c9eec /io_scene_fbx
parentc3348263dc26d6272db88ed94b73caa3ddb3a3fd (diff)
Fix part of T69526: FBX import/export error after recent mapping node changes
There are still other add-ons to fix.
Diffstat (limited to 'io_scene_fbx')
-rw-r--r--io_scene_fbx/import_fbx.py17
1 files changed, 5 insertions, 12 deletions
diff --git a/io_scene_fbx/import_fbx.py b/io_scene_fbx/import_fbx.py
index c63cc0db..5556f968 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