Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'release/scripts/obj_export.py')
-rw-r--r--release/scripts/obj_export.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/release/scripts/obj_export.py b/release/scripts/obj_export.py
index 8d52a06d6d9..814f9b481a2 100644
--- a/release/scripts/obj_export.py
+++ b/release/scripts/obj_export.py
@@ -150,6 +150,8 @@ def save_obj(filename):
# Dosent work properly,
matrix = getWorldMat(ob)
+
+ smooth = 0
# Vert
for v in m.verts:
@@ -210,6 +212,16 @@ def save_obj(filename):
elif currentImgName != NULL_IMG: # Not using an image so set to NULL_IMG
currentImgName = NULL_IMG
file.write( 'usemat ' + stripPath(currentImgName) +'\n') # Set a new image for all following faces
+
+ if f.smooth == 1:
+ if smooth == 0:
+ smooth = 1
+ file.write('s 1\n')
+
+ if f.smooth == 0:
+ if smooth == 1:
+ smooth = 0
+ file.write('s off\n')
file.write('f ')
for v in f.v: