diff --git a/io_scene_obj/__init__.py b/io_scene_obj/__init__.py index daeed2322..b0ff12c3d 100644 --- a/io_scene_obj/__init__.py +++ b/io_scene_obj/__init__.py @@ -21,7 +21,7 @@ bl_info = { "name": "Wavefront OBJ format", "author": "Campbell Barton, Bastien Montagne", - "version": (2, 3, 1), + "version": (2, 3, 2), "blender": (2, 77, 0), "location": "File > Import-Export", "description": "Import-Export OBJ, Import OBJ mesh, UV's, materials and textures", @@ -201,9 +201,14 @@ class ExportOBJ(bpy.types.Operator, ExportHelper, IOOBJOrientationHelper): # object group use_mesh_modifiers = BoolProperty( name="Apply Modifiers", - description="Apply modifiers (preview resolution)", + description="Apply modifiers", default=True, ) + use_mesh_modifiers_render = BoolProperty( + name="Use Modifiers Render Settings", + description="Use render settings when applying modifiers to mesh objects", + default=False, + ) # extra data group use_edges = BoolProperty( diff --git a/io_scene_obj/export_obj.py b/io_scene_obj/export_obj.py index 803191f38..a94080c75 100644 --- a/io_scene_obj/export_obj.py +++ b/io_scene_obj/export_obj.py @@ -280,6 +280,7 @@ def write_file(filepath, objects, scene, EXPORT_UV=True, EXPORT_MTL=True, EXPORT_APPLY_MODIFIERS=True, + EXPORT_APPLY_MODIFIERS_RENDER=False, EXPORT_BLEN_OBS=True, EXPORT_GROUP_BY_OB=False, EXPORT_GROUP_BY_MAT=False, @@ -387,7 +388,8 @@ def findVertexGroupName(face, vWeightMap): # END NURBS try: - me = ob.to_mesh(scene, EXPORT_APPLY_MODIFIERS, 'PREVIEW', calc_tessface=False) + me = ob.to_mesh(scene, EXPORT_APPLY_MODIFIERS, calc_tessface=False, + settings='RENDER' if EXPORT_APPLY_MODIFIERS_RENDER else 'PREVIEW') except RuntimeError: me = None @@ -720,6 +722,7 @@ def _write(context, filepath, EXPORT_UV, # ok EXPORT_MTL, EXPORT_APPLY_MODIFIERS, # ok + EXPORT_APPLY_MODIFIERS_RENDER, # ok EXPORT_BLEN_OBS, EXPORT_GROUP_BY_OB, EXPORT_GROUP_BY_MAT, @@ -776,6 +779,7 @@ def _write(context, filepath, EXPORT_UV, EXPORT_MTL, EXPORT_APPLY_MODIFIERS, + EXPORT_APPLY_MODIFIERS_RENDER, EXPORT_BLEN_OBS, EXPORT_GROUP_BY_OB, EXPORT_GROUP_BY_MAT, @@ -810,6 +814,7 @@ def save(context, use_uvs=True, use_materials=True, use_mesh_modifiers=True, + use_mesh_modifiers_render=False, use_blen_objects=True, group_by_object=False, group_by_material=False, @@ -831,6 +836,7 @@ def save(context, EXPORT_UV=use_uvs, EXPORT_MTL=use_materials, EXPORT_APPLY_MODIFIERS=use_mesh_modifiers, + EXPORT_APPLY_MODIFIERS_RENDER=use_mesh_modifiers_render, EXPORT_BLEN_OBS=use_blen_objects, EXPORT_GROUP_BY_OB=group_by_object, EXPORT_GROUP_BY_MAT=group_by_material,