소스 검색

Blender exporter now has options to export (or not) vertices and faces too.
Also renamed some vars for consistency reasons, hope I didn't break anything...

Mr.doob 14 년 전
부모
커밋
eb411d1bef

+ 5 - 2
build/custom/ThreeWebGL.js

@@ -68,8 +68,11 @@ THREE.Camera.prototype.translate=function(b,d){this.matrix.rotateAxis(d);this.po
 THREE.Camera.prototype.update=function(b,d,e){if(this.useTarget){this.matrix.lookAt(this.position,this.target.position,this.up);this.matrix.setPosition(this.position);b?this.matrixWorld.multiply(b,this.matrix):this.matrixWorld.copy(this.matrix);THREE.Matrix4.makeInvert(this.matrixWorld,this.matrixWorldInverse);d=!0}else{this.matrixAutoUpdate&&(d|=this.updateMatrix());if(d||this.matrixWorldNeedsUpdate){b?this.matrixWorld.multiply(b,this.matrix):this.matrixWorld.copy(this.matrix);this.matrixWorldNeedsUpdate=
 !1;d=!0;THREE.Matrix4.makeInvert(this.matrixWorld,this.matrixWorldInverse)}}for(b=0;b<this.children.length;b++)this.children[b].update(this.matrixWorld,d,e)};THREE.Light=function(b){THREE.Object3D.call(this);this.color=new THREE.Color(b)};THREE.Light.prototype=new THREE.Object3D;THREE.Light.prototype.constructor=THREE.Light;THREE.Light.prototype.supr=THREE.Object3D.prototype;THREE.AmbientLight=function(b){THREE.Light.call(this,b)};THREE.AmbientLight.prototype=new THREE.Light;
 THREE.AmbientLight.prototype.constructor=THREE.AmbientLight;THREE.DirectionalLight=function(b,d,e){THREE.Light.call(this,b);this.position=new THREE.Vector3(0,1,0);this.intensity=d||1;this.distance=e||0};THREE.DirectionalLight.prototype=new THREE.Light;THREE.DirectionalLight.prototype.constructor=THREE.DirectionalLight;THREE.PointLight=function(b,d,e){THREE.Light.call(this,b);this.position=new THREE.Vector3;this.intensity=d||1;this.distance=e||0};THREE.PointLight.prototype=new THREE.Light;
-THREE.PointLight.prototype.constructor=THREE.PointLight;THREE.Material=function(b){this.id=THREE.MaterialCounter.value++;b=b||{};this.opacity=b.opacity!==undefined?b.opacity:1;this.transparent=b.transparent!==undefined?b.transparent:!1;this.blending=b.blending!==undefined?b.blending:THREE.NormalBlending;this.depthTest=b.depthTest!==undefined?b.depthTest:!0};THREE.NoShading=0;THREE.FlatShading=1;THREE.SmoothShading=2;THREE.NoColors=0;THREE.FaceColors=1;THREE.VertexColors=2;THREE.NormalBlending=0;
-THREE.AdditiveBlending=1;THREE.SubtractiveBlending=2;THREE.MultiplyBlending=3;THREE.AdditiveAlphaBlending=4;THREE.MaterialCounter={value:0};THREE.CubeReflectionMapping=function(){};THREE.CubeRefractionMapping=function(){};THREE.LatitudeReflectionMapping=function(){};THREE.LatitudeRefractionMapping=function(){};THREE.SphericalReflectionMapping=function(){};THREE.SphericalRefractionMapping=function(){};THREE.UVMapping=function(){};
+THREE.PointLight.prototype.constructor=THREE.PointLight;THREE.LensFlare=function(b,d,e,g){THREE.Object3D.call(this);this.positionScreen=new THREE.Vector3;this.lensFlares=[];this.customUpdateCallback=undefined;b!==undefined&&this.add(b,d,e,g)};THREE.LensFlare.prototype=new THREE.Object3D;THREE.LensFlare.prototype.constructor=THREE.LensFlare;THREE.LensFlare.prototype.supr=THREE.Object3D.prototype;
+THREE.LensFlare.prototype.add=function(b,d,e,g){d===undefined&&(d=-1);e===undefined&&(e=0);if(g===undefined)g=THREE.BillboardBlending;e=Math.min(e,Math.max(0,e));this.lensFlares.push({texture:b,size:d,distance:e,x:0,y:0,z:0,scale:1,rotation:1,opacity:1,blending:g})};
+THREE.LensFlare.prototype.updateLensFlares=function(){var b,d=this.lensFlares.length,e,g=-this.positionScreen.x*2,h=-this.positionScreen.y*2;for(b=0;b<d;b++){e=this.lensFlares[b];e.x=this.positionScreen.x+g*e.distance;e.y=this.positionScreen.y+h*e.distance;e.wantedRotation=e.x*Math.PI*0.25;e.rotation+=(e.wantedRotation-e.rotation)*0.25}};
+THREE.Material=function(b){this.id=THREE.MaterialCounter.value++;b=b||{};this.opacity=b.opacity!==undefined?b.opacity:1;this.transparent=b.transparent!==undefined?b.transparent:!1;this.blending=b.blending!==undefined?b.blending:THREE.NormalBlending;this.depthTest=b.depthTest!==undefined?b.depthTest:!0};THREE.NoShading=0;THREE.FlatShading=1;THREE.SmoothShading=2;THREE.NoColors=0;THREE.FaceColors=1;THREE.VertexColors=2;THREE.NormalBlending=0;THREE.AdditiveBlending=1;THREE.SubtractiveBlending=2;
+THREE.MultiplyBlending=3;THREE.AdditiveAlphaBlending=4;THREE.MaterialCounter={value:0};THREE.CubeReflectionMapping=function(){};THREE.CubeRefractionMapping=function(){};THREE.LatitudeReflectionMapping=function(){};THREE.LatitudeRefractionMapping=function(){};THREE.SphericalReflectionMapping=function(){};THREE.SphericalRefractionMapping=function(){};THREE.UVMapping=function(){};
 THREE.LineBasicMaterial=function(b){THREE.Material.call(this,b);b=b||{};this.color=b.color!==undefined?new THREE.Color(b.color):new THREE.Color(16777215);this.linewidth=b.linewidth!==undefined?b.linewidth:1;this.linecap=b.linecap!==undefined?b.linecap:"round";this.linejoin=b.linejoin!==undefined?b.linejoin:"round";this.vertexColors=b.vertexColors?b.vertexColors:!1};THREE.LineBasicMaterial.prototype=new THREE.Material;THREE.LineBasicMaterial.prototype.constructor=THREE.LineBasicMaterial;
 THREE.MeshBasicMaterial=function(b){THREE.Material.call(this,b);b=b||{};this.color=b.color!==undefined?new THREE.Color(b.color):new THREE.Color(16777215);this.map=b.map!==undefined?b.map:null;this.lightMap=b.lightMap!==undefined?b.lightMap:null;this.envMap=b.envMap!==undefined?b.envMap:null;this.combine=b.combine!==undefined?b.combine:THREE.MultiplyOperation;this.reflectivity=b.reflectivity!==undefined?b.reflectivity:1;this.refractionRatio=b.refractionRatio!==undefined?b.refractionRatio:0.98;this.shading=
 b.shading!==undefined?b.shading:THREE.SmoothShading;this.wireframe=b.wireframe!==undefined?b.wireframe:!1;this.wireframeLinewidth=b.wireframeLinewidth!==undefined?b.wireframeLinewidth:1;this.wireframeLinecap=b.wireframeLinecap!==undefined?b.wireframeLinecap:"round";this.wireframeLinejoin=b.wireframeLinejoin!==undefined?b.wireframeLinejoin:"round";this.vertexColors=b.vertexColors!==undefined?b.vertexColors:!1;this.skinning=b.skinning!==undefined?b.skinning:!1;this.morphTargets=b.morphTargets!==undefined?

+ 1 - 0
utils/build.py

@@ -256,6 +256,7 @@ WEBGL_FILES = [
 'lights/AmbientLight.js',
 'lights/DirectionalLight.js',
 'lights/PointLight.js',
+'lights/LensFlare.js',
 'materials/Material.js',
 'materials/Mappings.js',
 'materials/LineBasicMaterial.js',

+ 34 - 26
utils/exporters/blender/2.56/scripts/op/io_mesh_threejs/__init__.py

@@ -96,7 +96,7 @@ class ImportTHREEJS(bpy.types.Operator, ImportHelper):
 
     option_flip_yz = BoolProperty(name="Flip YZ", description="Flip YZ", default=True)
     recalculate_normals = BoolProperty(name="Recalculate normals", description="Recalculate vertex normals", default=True)
-    
+
     def execute(self, context):
         import io_mesh_threejs.import_threejs
         return io_mesh_threejs.import_threejs.load(self, context, **self.properties)
@@ -147,11 +147,11 @@ def save_settings_export(properties):
 
     "option_flip_yz"      : properties.option_flip_yz,
 
-    "use_materials"       : properties.use_materials,
-    "use_normals"         : properties.use_normals,
-    "use_colors"          : properties.use_colors,
-    "use_uv_coords"       : properties.use_uv_coords,
-    "use_edges"           : properties.use_edges,
+    "option_materials"       : properties.option_materials,
+    "option_normals"         : properties.option_normals,
+    "option_colors"          : properties.option_colors,
+    "option_uv_coords"       : properties.option_uv_coords,
+    "option_edges"           : properties.option_edges,
 
     "option_truncate"     : properties.option_truncate,
     "option_scale"        : properties.option_scale,
@@ -176,11 +176,11 @@ def restore_settings_export(properties):
 
     properties.option_flip_yz = settings.get("option_flip_yz", True)
 
-    properties.use_materials = settings.get("use_materials", True)
-    properties.use_normals = settings.get("use_normals", True)
-    properties.use_colors = settings.get("use_colors", True)
-    properties.use_uv_coords = settings.get("use_uv_coords", True)
-    properties.use_edges = settings.get("use_edges", False)
+    properties.option_materials = settings.get("option_materials", True)
+    properties.option_normals = settings.get("option_normals", True)
+    properties.option_colors = settings.get("option_colors", True)
+    properties.option_uv_coords = settings.get("option_uv_coords", True)
+    properties.option_edges = settings.get("option_edges", False)
     
     properties.option_truncate = settings.get("option_truncate", False)
     properties.option_scale = settings.get("option_scale", 1.0)
@@ -201,24 +201,27 @@ class ExportTHREEJS(bpy.types.Operator, ExportHelper):
 
     option_flip_yz = BoolProperty(name = "Flip YZ", description = "Flip YZ", default = True)
 
-    use_materials = BoolProperty(name = "Materials", description = "Export materials", default = True)
-    use_normals = BoolProperty(name = "Normals", description = "Export normals", default = True)
-    use_colors = BoolProperty(name = "Colors", description = "Export vertex colors", default = True)
-    use_uv_coords = BoolProperty(name = "UVs", description = "Export texture coordinates", default = True)
-    use_edges = BoolProperty(name = "Edges", description = "Export edges", default = False)
-    
+    option_vertices = BoolProperty(name = "Vertices", description = "Export vertices", default = True)
+    option_faces = BoolProperty(name = "Faces", description = "Export faces", default = True)
+    option_normals = BoolProperty(name = "Normals", description = "Export normals", default = True)
+    option_edges = BoolProperty(name = "Edges", description = "Export edges", default = False)
+
+    option_colors = BoolProperty(name = "Colors", description = "Export vertex colors", default = True)
+    option_uv_coords = BoolProperty(name = "UVs", description = "Export texture coordinates", default = True)
+    option_materials = BoolProperty(name = "Materials", description = "Export materials", default = True)
+
     option_export_scene = BoolProperty(name = "Scene", description = "Export scene", default = False)
-    
+
     option_truncate = BoolProperty(name = "Truncate", description = "Truncate decimals", default = False)
     option_scale = FloatProperty(name = "Scale", description = "Scale data", min = 0.01, max = 1000.0, soft_min = 0.01, soft_max = 1000.0, default = 1.0)
 
     align_types = [("None","None","None"), ("Center","Center","Center"), ("Bottom","Bottom","Bottom"), ("Top","Top","Top")]
     align_model = EnumProperty(name = "Align model", description = "Align model", items = align_types, default = "None")
-    
+
     def invoke(self, context, event):
         restore_settings_export(self.properties)
         return ExportHelper.invoke(self, context, event)
-        
+
     @classmethod
     def poll(cls, context):
         return context.active_object != None
@@ -230,7 +233,7 @@ class ExportTHREEJS(bpy.types.Operator, ExportHelper):
             raise Exception("filename not set")
 
         save_settings_export(self.properties)
-        
+
         filepath = self.filepath
         import io_mesh_threejs.export_threejs
         return io_mesh_threejs.export_threejs.save(self, context, **self.properties)
@@ -251,13 +254,18 @@ class ExportTHREEJS(bpy.types.Operator, ExportHelper):
         layout.separator()
 
         row = layout.row()
-        row.prop(self.properties, "use_normals")
-        row.prop(self.properties, "use_colors")
+        row.prop(self.properties, "option_vertices")
+        row.prop(self.properties, "option_normals")
+        row = layout.row()
+        row.prop(self.properties, "option_faces")
+        row.prop(self.properties, "option_edges")
+        layout.separator()
+
         row = layout.row()
-        row.prop(self.properties, "use_uv_coords")
-        row.prop(self.properties, "use_materials")
+        row.prop(self.properties, "option_uv_coords")
+        row.prop(self.properties, "option_colors")
         row = layout.row()
-        row.prop(self.properties, "use_edges")
+        row.prop(self.properties, "option_materials")
         layout.separator()
 
         row = layout.row()

+ 103 - 79
utils/exporters/blender/2.56/scripts/op/io_mesh_threejs/export_threejs.py

@@ -415,12 +415,18 @@ def bottom(vertices):
 
 def hexcolor(c):
     return ( int(c[0] * 255) << 16  ) + ( int(c[1] * 255) << 8 ) + int(c[2] * 255)
-    
-def generate_vertex(v, truncate):
-    if truncate:
-        return TEMPLATE_VERTEX_TRUNCATE % (v.co.x, v.co.y, v.co.z)
-    else:
+
+def generate_vertices(vertices, option_truncate, option_vertices):
+    if not option_vertices:
+        return ""
+
+    return ",".join(generate_vertex(v, option_truncate) for v in vertices)
+
+def generate_vertex(v, option_truncate):
+    if not option_truncate:
         return TEMPLATE_VERTEX % (v.co.x, v.co.y, v.co.z)
+    else:
+        return TEMPLATE_VERTEX_TRUNCATE % (v.co.x, v.co.y, v.co.z)
 
 def generate_normal(n):
     return TEMPLATE_N % (n[0], n[1], n[2])
@@ -444,9 +450,15 @@ def setBit(value, position, on):
         return (value | mask)
     else:
         mask = ~(1 << position)
-        return (value & mask)    
-    
-def generate_face(f, faceIndex, normals, uvs, colors, mesh, use_normals, use_colors, use_uv_coords, use_materials, flipyz):
+        return (value & mask)
+
+def generate_faces(normals, uvs, colors, mesh, option_normals, option_colors, option_uv_coords, option_materials, flipyz, option_faces):
+    if not option_faces:
+        return ""
+
+    return ",".join(generate_face(f, i, normals, uvs, colors, mesh, option_normals, option_colors, option_uv_coords, option_materials, flipyz) for i, f in enumerate(mesh.faces))
+
+def generate_face(f, faceIndex, normals, uvs, colors, mesh, option_normals, option_colors, option_uv_coords, option_materials, flipyz):
     isTriangle = ( len(f.vertices) == 3 )
     
     if isTriangle:
@@ -454,16 +466,16 @@ def generate_face(f, faceIndex, normals, uvs, colors, mesh, use_normals, use_col
     else:
         nVertices = 4
         
-    hasMaterial = use_materials
+    hasMaterial = option_materials
     
     hasFaceUvs = False # not supported in Blender
-    hasFaceVertexUvs = use_uv_coords
+    hasFaceVertexUvs = option_uv_coords
 
     hasFaceNormals = False # don't export any face normals (as they are computed in engine)
-    hasFaceVertexNormals = use_normals
+    hasFaceVertexNormals = option_normals
     
     hasFaceColors = False       # not supported in Blender
-    hasFaceVertexColors = use_colors
+    hasFaceVertexColors = option_colors
 
     faceType = 0
     faceType = setBit(faceType, 0, not isTriangle)
@@ -523,8 +535,8 @@ def generate_face(f, faceIndex, normals, uvs, colors, mesh, use_normals, use_col
 # Model exporter - normals
 # #####################################################
 
-def extract_vertex_normals(mesh, use_normals):
-    if not use_normals:
+def extract_vertex_normals(mesh, option_normals):
+    if not option_normals:
         return {}, 0
 
     count = 0
@@ -542,8 +554,8 @@ def extract_vertex_normals(mesh, use_normals):
 
     return normals, count
 
-def generate_normals(normals, use_normals):
-    if not use_normals:
+def generate_normals(normals, option_normals):
+    if not option_normals:
         return ""
 
     chunks = []
@@ -556,9 +568,9 @@ def generate_normals(normals, use_normals):
 # Model exporter - vertex colors
 # #####################################################
 
-def extract_vertex_colors(mesh, use_colors):
+def extract_vertex_colors(mesh, option_colors):
     
-    if not use_colors:
+    if not option_colors:
         return {}, 0
 
     count = 0
@@ -579,8 +591,8 @@ def extract_vertex_colors(mesh, use_colors):
 
     return colors, count
 
-def generate_vertex_colors(colors, use_colors):
-    if not use_colors:
+def generate_vertex_colors(colors, option_colors):
+    if not option_colors:
         return ""
 
     chunks = []
@@ -593,9 +605,9 @@ def generate_vertex_colors(colors, use_colors):
 # Model exporter - UVs
 # #####################################################
 
-def extract_uvs(mesh, use_uv_coords):
+def extract_uvs(mesh, option_uv_coords):
 
-    if not use_uv_coords:
+    if not option_uv_coords:
         return {}, 0
 
     count = 0
@@ -614,8 +626,8 @@ def extract_uvs(mesh, use_uv_coords):
 
     return uvs, count
 
-def generate_uvs(uvs, use_uv_coords):
-    if not use_uv_coords:
+def generate_uvs(uvs, option_uv_coords):
+    if not option_uv_coords:
         return ""
 
     chunks = []
@@ -692,7 +704,7 @@ def generate_materials(mtl, materials, draw_type):
 
     return ",\n\n".join([m for i,m in sorted(mtl_array)]), len(mtl_array)
 
-def extract_materials(mesh, scene, use_colors):
+def extract_materials(mesh, scene, option_colors):
     world = scene.world
 
     materials = {}
@@ -731,7 +743,7 @@ def extract_materials(mesh, scene, use_colors):
                 fn_strip = os.path.basename(fn)
                 material['mapDiffuse'] = fn_strip
 
-            material["vertexColors"] = m.THREE_useVertexColors and use_colors
+            material["vertexColors"] = m.THREE_useVertexColors and option_colors
             
             # can't really use this reliably to tell apart Phong from Lambert
             # as Blender defaults to non-zero specular color
@@ -742,7 +754,7 @@ def extract_materials(mesh, scene, use_colors):
 
     return materials
 
-def generate_materials_string(mesh, scene, use_colors, draw_type):
+def generate_materials_string(mesh, scene, option_colors, draw_type):
 
     random.seed(42) # to get well defined color order for debug materials
 
@@ -764,7 +776,7 @@ def generate_materials_string(mesh, scene, use_colors, draw_type):
 
     # extract real materials from the mesh
     
-    mtl.update(extract_materials(mesh, scene, use_colors))
+    mtl.update(extract_materials(mesh, scene, option_colors))
 
     return generate_materials(mtl, materials, draw_type)
 
@@ -773,18 +785,20 @@ def generate_materials_string(mesh, scene, use_colors, draw_type):
 # #####################################################
 
 def generate_ascii_model(mesh, scene, 
-                         use_normals, 
-                         use_colors, 
-                         use_uv_coords, 
-                         use_materials,
-                         use_edges,
+                         option_vertices, 
+                         option_faces, 
+                         option_normals, 
+                         option_edges, 
+                         option_uv_coords, 
+                         option_materials, 
+                         option_colors, 
                          align_model, 
                          flipyz, 
                          option_truncate, 
                          option_scale, 
                          draw_type):
 
-    vertices = mesh.vertices[:]    
+    vertices = mesh.vertices[:]
 
     if align_model == 1:
         center(vertices)
@@ -793,9 +807,9 @@ def generate_ascii_model(mesh, scene,
     elif align_model == 3:
         top(vertices)
 
-    normals, nnormal = extract_vertex_normals(mesh, use_normals)
-    colors, ncolor = extract_vertex_colors(mesh, use_colors)
-    uvs, nuv = extract_uvs(mesh, use_uv_coords)
+    normals, nnormal = extract_vertex_normals(mesh, option_normals)
+    colors, ncolor = extract_vertex_colors(mesh, option_colors)
+    uvs, nuv = extract_uvs(mesh, option_uv_coords)
 
     materials_string = ""
     nmaterial = 0
@@ -803,13 +817,13 @@ def generate_ascii_model(mesh, scene,
     edges_string = ""
     nedges = 0
     
-    if use_materials:
-        materials_string, nmaterial = generate_materials_string(mesh, scene, use_colors, draw_type)
-    
-    if use_edges:
+    if option_materials:
+        materials_string, nmaterial = generate_materials_string(mesh, scene, option_colors, draw_type)
+
+    if option_edges:
         nedges = len(mesh.edges) 
         edges_string  = ",".join(generate_edge(e) for e in mesh.edges)
-        
+
     text = TEMPLATE_FILE_ASCII % {
     "nvertex"   : len(mesh.vertices),
     "nface"     : len(mesh.faces),
@@ -818,18 +832,18 @@ def generate_ascii_model(mesh, scene,
     "ncolor"    : ncolor,
     "nmaterial" : nmaterial,
     "nedges"    : nedges,
-    
+
     "scale" : option_scale,
 
-    "uvs"           : generate_uvs(uvs, use_uv_coords),
-    "normals"       : generate_normals(normals, use_normals),
-    "colors"        : generate_vertex_colors(colors, use_colors),
+    "uvs"           : generate_uvs(uvs, option_uv_coords),
+    "normals"       : generate_normals(normals, option_normals),
+    "colors"        : generate_vertex_colors(colors, option_colors),
 
     "materials" : materials_string,
 
-    "vertices" : ",".join(generate_vertex(v, option_truncate) for v in vertices),
+    "vertices" : generate_vertices(vertices, option_truncate, option_vertices),
 
-    "faces"    : ",".join(generate_face(f, i, normals, uvs, colors, mesh, use_normals, use_colors, use_uv_coords, use_materials, flipyz) for i, f in enumerate(mesh.faces)),
+    "faces"    : generate_faces(normals, uvs, colors, mesh, option_normals, option_colors, option_uv_coords, option_materials, flipyz, option_faces),
 
     "edges"    : edges_string
 
@@ -843,11 +857,13 @@ def generate_ascii_model(mesh, scene,
 # #####################################################
 
 def export_mesh(obj, scene, filepath, 
-                use_normals, 
-                use_colors, 
-                use_uv_coords, 
-                use_materials, 
-                use_edges, 
+                option_vertices, 
+                option_faces, 
+                option_normals, 
+                option_edges, 
+                option_uv_coords, 
+                option_materials, 
+                option_colors, 
                 align_model, 
                 flipyz, 
                 option_truncate, 
@@ -879,27 +895,29 @@ def export_mesh(obj, scene, filepath,
     vertexColors = len(mesh.vertex_colors) > 0
 
     if not vertexColors:
-        use_colors = False
+        option_colors = False
 
     if (not faceUV) and (not vertexUV):
-        use_uv_coords = False
+        option_uv_coords = False
 
     if faceUV:
         active_uv_layer = mesh.uv_textures.active
         if not active_uv_layer:
-            use_uv_coords = False
+            option_uv_coords = False
 
     if vertexColors:
         active_col_layer = mesh.vertex_colors.active
         if not active_col_layer:
-            use_colors = False
+            option_colors = False
 
     text = generate_ascii_model(mesh, scene, 
-                                use_normals, 
-                                use_colors, 
-                                use_uv_coords, 
-                                use_materials,
-                                use_edges,
+                                option_vertices, 
+                                option_faces, 
+                                option_normals, 
+                                option_edges, 
+                                option_uv_coords, 
+                                option_materials, 
+                                option_colors, 
                                 align_model, 
                                 flipyz, 
                                 option_truncate, 
@@ -1130,7 +1148,7 @@ def extract_material_data(m):
             if ts.use and t.type == 'IMAGE':
                 name = t.image.name
 
-                if t.use_normal_map:
+                if t.option_normal_map:
                     material['mapNormal'] = name
                 else:
                     if not material['mapDiffuse']:
@@ -1351,11 +1369,13 @@ def export_scene(scene, filepath, flipyz):
 
 def save(operator, context, filepath = "", 
          option_flip_yz = True, 
-         use_normals = True, 
-         use_colors = True, 
-         use_uv_coords = True, 
-         use_materials = True, 
-         use_edges = False, 
+         option_vertices = True, 
+         option_faces = True, 
+         option_normals = True, 
+         option_edges = False, 
+         option_uv_coords = True, 
+         option_materials = True, 
+         option_colors = True, 
          align_model = 0, 
          option_export_scene = False, 
          option_truncate = False, 
@@ -1391,17 +1411,19 @@ def save(operator, context, filepath = "",
                 if name not in geo_set:
                     fname = generate_mesh_filename(name, filepath)
                     export_mesh(obj, scene, fname, 
-                                use_normals, 
-                                use_colors, 
-                                use_uv_coords, 
-                                use_materials, 
-                                use_edges, 
+                                option_vertices, 
+                                option_faces, 
+                                option_normals, 
+                                option_edges, 
+                                option_uv_coords, 
+                                option_materials, 
+                                option_colors, 
                                 False, 
                                 option_flip_yz, 
                                 option_truncate, 
                                 option_scale, 
                                 False)
-                    
+
                     geo_set.add(name)
 
     else:
@@ -1411,11 +1433,13 @@ def save(operator, context, filepath = "",
             raise Exception("Error, Select 1 active object or select 'export scene'")
 
         export_mesh(obj, scene, filepath, 
-                    use_normals, 
-                    use_colors, 
-                    use_uv_coords, 
-                    use_materials, 
-                    use_edges, 
+                    option_vertices, 
+                    option_faces, 
+                    option_normals, 
+                    option_edges, 
+                    option_uv_coords, 
+                    option_materials, 
+                    option_colors, 
                     align_model, 
                     option_flip_yz, 
                     option_truncate,