1
# ##### BEGIN GPL LICENSE BLOCK #####
3
# This program is free software; you can redistribute it and/or
4
# modify it under the terms of the GNU General Public License
5
# as published by the Free Software Foundation; either version 2
6
# of the License, or (at your option) any later version.
8
# This program is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
# GNU General Public License for more details.
13
# You should have received a copy of the GNU General Public License
14
# along with this program; if not, write to the Free Software Foundation,
15
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
# ##### END GPL LICENSE BLOCK #####
21
# To support reload properly, try to access a package var, if it's there, reload everything
24
if "export_x3d" in locals():
25
imp.reload(export_x3d)
29
from bpy.props import *
30
from io_utils import ExportHelper
33
class ExportX3D(bpy.types.Operator, ExportHelper):
34
'''Export selection to Extensible 3D file (.x3d)'''
35
bl_idname = "export_scene.x3d"
36
bl_label = 'Export X3D'
39
filter_glob = StringProperty(default="*.x3d", options={'HIDDEN'})
41
use_apply_modifiers = BoolProperty(name="Apply Modifiers", description="Use transformed mesh data from each object", default=True)
42
use_triangulate = BoolProperty(name="Triangulate", description="Triangulate quads.", default=False)
43
use_compress = BoolProperty(name="Compress", description="GZip the resulting file, requires a full python install", default=False)
45
def execute(self, context):
46
from . import export_x3d
47
return export_x3d.save(self, context, **self.as_keywords(ignore=("check_existing", "filter_glob")))
50
def menu_func(self, context):
51
self.layout.operator(ExportX3D.bl_idname, text="X3D Extensible 3D (.x3d)")
55
bpy.types.INFO_MT_file_export.append(menu_func)
59
bpy.types.INFO_MT_file_export.remove(menu_func)
62
# - blender version is hardcoded
64
if __name__ == "__main__":