Start working on the exporter.

This commit is contained in:
Bill Currie 2011-09-21 17:37:32 +09:00
parent 4b9a421928
commit 2ca39e7f75
2 changed files with 38 additions and 1 deletions

View file

@ -54,6 +54,8 @@ class ImportMDL6(bpy.types.Operator, ImportHelper):
bl_idname = "import_mesh.quake_mdl_v6" bl_idname = "import_mesh.quake_mdl_v6"
bl_label = "Import MDL" bl_label = "Import MDL"
filename_ext = ".mdl"
def execute(self, context): def execute(self, context):
from . import import_mdl from . import import_mdl
keywords = self.as_keywords () keywords = self.as_keywords ()
@ -63,9 +65,13 @@ class ExportMDL6(bpy.types.Operator, ExportHelper):
'''Save a Quake MDL (v6) File''' '''Save a Quake MDL (v6) File'''
bl_idname = "export_mesh.quake_mdl_v6" bl_idname = "export_mesh.quake_mdl_v6"
bl_label = 'Export MDL' bl_label = "Export MDL"
filename_ext = ".mdl"
def execute(self, context): def execute(self, context):
from . import export_mdl
keywords = self.as_keywords ()
return export_mdl.export_mdl(self, context, **keywords) return export_mdl.export_mdl(self, context, **keywords)

31
tools/qfmdl/export_mdl.py Normal file
View file

@ -0,0 +1,31 @@
# vim:ts=4:et
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>
import bpy
from bpy_extras.object_utils import object_data_add
from mathutils import Vector,Matrix
from . import quakepal
from . import mdl
MDL = mdl.MDL
def export_mdl(operator, context, filepath):
return {'FINISHED'}