mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
Get the "front end" working nicely.
Proper enable/disable of export, file filtering and no exceptions :)
This commit is contained in:
parent
2ca39e7f75
commit
84f65a0171
1 changed files with 9 additions and 2 deletions
|
@ -55,10 +55,11 @@ class ImportMDL6(bpy.types.Operator, ImportHelper):
|
|||
bl_label = "Import MDL"
|
||||
|
||||
filename_ext = ".mdl"
|
||||
filter_glob = StringProperty(default="*.mdl", options={'HIDDEN'})
|
||||
|
||||
def execute(self, context):
|
||||
from . import import_mdl
|
||||
keywords = self.as_keywords ()
|
||||
keywords = self.as_keywords (ignore=("filter_glob",))
|
||||
return import_mdl.import_mdl(self, context, **keywords)
|
||||
|
||||
class ExportMDL6(bpy.types.Operator, ExportHelper):
|
||||
|
@ -68,10 +69,16 @@ class ExportMDL6(bpy.types.Operator, ExportHelper):
|
|||
bl_label = "Export MDL"
|
||||
|
||||
filename_ext = ".mdl"
|
||||
filter_glob = StringProperty(default="*.mdl", options={'HIDDEN'})
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return (context.active_object != None
|
||||
and type(context.active_object.data) == bpy.types.Mesh)
|
||||
|
||||
def execute(self, context):
|
||||
from . import export_mdl
|
||||
keywords = self.as_keywords ()
|
||||
keywords = self.as_keywords (ignore=("check_existing", "filter_glob"))
|
||||
return export_mdl.export_mdl(self, context, **keywords)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue