diff options
-rw-r--r-- | io_scene_fbx/__init__.py | 2 | ||||
-rw-r--r-- | io_scene_fbx/export_fbx_bin.py | 5 | ||||
-rw-r--r-- | io_scene_fbx/import_fbx.py | 5 |
3 files changed, 10 insertions, 2 deletions
diff --git a/io_scene_fbx/__init__.py b/io_scene_fbx/__init__.py index 495e62d2..a9c58915 100644 --- a/io_scene_fbx/__init__.py +++ b/io_scene_fbx/__init__.py @@ -21,7 +21,7 @@ bl_info = { "name": "FBX format", "author": "Campbell Barton, Bastien Montagne, Jens Restemeier", - "version": (4, 24, 0), + "version": (4, 25, 0), "blender": (2, 90, 0), "location": "File > Import-Export", "description": "FBX IO meshes, UV's, vertex colors, materials, textures, cameras, lamps and actions", diff --git a/io_scene_fbx/export_fbx_bin.py b/io_scene_fbx/export_fbx_bin.py index 3950ed5b..09dfaa9f 100644 --- a/io_scene_fbx/export_fbx_bin.py +++ b/io_scene_fbx/export_fbx_bin.py @@ -879,7 +879,10 @@ def fbx_data_mesh_elements(root, me_obj, scene_data, done_meshes): if last_subsurf: elem_data_single_int32(geom, b"Smoothness", 2) # Display control mesh and smoothed - elem_data_single_int32(geom, b"BoundaryRule", 2) # Round edges like Blender + if last_subsurf.boundary_smooth == "PRESERVE_CORNERS": + elem_data_single_int32(geom, b"BoundaryRule", 2) # CreaseAll + else: + elem_data_single_int32(geom, b"BoundaryRule", 1) # CreaseEdge elem_data_single_int32(geom, b"PreviewDivisionLevels", last_subsurf.levels) elem_data_single_int32(geom, b"RenderDivisionLevels", last_subsurf.render_levels) diff --git a/io_scene_fbx/import_fbx.py b/io_scene_fbx/import_fbx.py index ba11757a..a07e919e 100644 --- a/io_scene_fbx/import_fbx.py +++ b/io_scene_fbx/import_fbx.py @@ -2928,6 +2928,11 @@ def load(operator, context, filepath="", mod = parent.bl_obj.modifiers.new('subsurf', 'SUBSURF') mod.levels = preview_levels mod.render_levels = render_levels + boundary_rule = elem_prop_first(elem_find_first(fbx_sdata, b'BoundaryRule'), default=1) + if boundary_rule == 2: + mod.boundary_smooth = "PRESERVE_CORNERS" + else: + mod.boundary_smooth = "ALL" _(); del _ |