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:
authorBastien Montagne <montagne29@wanadoo.fr>2015-02-09 22:54:57 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-02-09 22:54:57 +0300
commit95633e7f1b1bb40f058cbb6d7ed0d7afd1512a24 (patch)
tree23723e58ac62b93e350199df0d1f5913e86e378b /io_scene_fbx/import_fbx.py
parent1c602ef7b58ac1e06098e82ce99e4fd82878351a (diff)
Fix T43582: FBX IO: Handling of 'smooth edges' was rather flacky on both export and import.
On export, we also want to tage as sharp edges from flat faces, and edges shared by more than two faces. On import, we want to tag all faces as smooth and enable autosmooth, when we only have smooth edge data...
Diffstat (limited to 'io_scene_fbx/import_fbx.py')
-rw-r--r--io_scene_fbx/import_fbx.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/io_scene_fbx/import_fbx.py b/io_scene_fbx/import_fbx.py
index dc2e69b3..ccc5caef 100644
--- a/io_scene_fbx/import_fbx.py
+++ b/io_scene_fbx/import_fbx.py
@@ -987,17 +987,21 @@ def blen_read_geom_layer_smooth(fbx_obj, mesh):
if fbx_layer_mapping == b'ByEdge':
# some models have bad edge data, we cant use this info...
if not mesh.edges:
+ print("warning skipping sharp edges data, no valid edges...")
return False
blen_data = mesh.edges
- ok_smooth = blen_read_geom_array_mapped_edge(
+ blen_read_geom_array_mapped_edge(
mesh, blen_data, "use_edge_sharp",
fbx_layer_data, None,
fbx_layer_mapping, fbx_layer_ref,
1, 1, layer_id,
xform=lambda s: not s,
)
- return ok_smooth
+ # We only set sharp edges here, not face smoothing itself...
+ mesh.use_auto_smooth = True
+ mesh.show_edge_sharp = True
+ return False
elif fbx_layer_mapping == b'ByPolygon':
blen_data = mesh.polygons
return blen_read_geom_array_mapped_polygon(