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>2017-01-17 14:31:58 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2017-01-17 14:31:58 +0300
commita746a84f8aaf3a4843eb3f4ce3f5a0464872077a (patch)
tree598f6784f6d692cf954a21f2f2e4bef07853da7c /io_scene_obj/export_obj.py
parent18099be5f837a3141f7150fdc6c068e297b7da47 (diff)
Fix T50453: Add option to OBJ export to apply render or preview modifiers.
Diffstat (limited to 'io_scene_obj/export_obj.py')
-rw-r--r--io_scene_obj/export_obj.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/io_scene_obj/export_obj.py b/io_scene_obj/export_obj.py
index 803191f3..a94080c7 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 write_file(filepath, objects, scene,
# 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,