goat3d

annotate exporters/blendgoat/src/__init__.py @ 103:45a9d493e98c

fixed the input latency issue by calling QWidget::update() instead of QGLWidget::updateGL() update schedules an update instead of redrawing immediately.
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 12 Sep 2015 17:40:02 +0300
parents 60f2037680ee
children
rev   line source
nuclear@38 1 bl_info = {
nuclear@38 2 "name": "Goat3D scene",
nuclear@38 3 "author": "John Tsiombikas",
nuclear@38 4 "version": (0, 1),
nuclear@39 5 "blender": (2, 63, 0),
nuclear@38 6 "location": "File > Import-Export",
nuclear@38 7 "description": "Mutant Stargoat, Goat3D scene file format: http://code.google.com/p/goat3d/",
nuclear@38 8 "category": "Import-Export"
nuclear@38 9 }
nuclear@38 10
nuclear@38 11 if "bpy" in locals():
nuclear@38 12 import imp
nuclear@38 13 if "export_goat" in locals():
nuclear@38 14 imp.reload(export_goat)
nuclear@38 15
nuclear@38 16 import bpy
nuclear@38 17 from bpy_extras.io_utils import ExportHelper
nuclear@38 18
nuclear@38 19 class ExportGoat3D(bpy.types.Operator, ExportHelper):
nuclear@38 20 bl_idname = "export_scene.goat3d"
nuclear@38 21 bl_label = "Export Goat3D Scene"
nuclear@38 22 bl_options = {'PRESET'}
nuclear@38 23 filename_ext = ".goatsce"
nuclear@38 24 filter_glob = bpy.props.StringProperty(default="*.goatsce", options={'HIDDEN'})
nuclear@38 25
nuclear@38 26 def execute(self, ctx):
nuclear@38 27 from . import export_goat
nuclear@38 28 if not export_goat.export(self, ctx, self.filepath):
nuclear@38 29 return {'CANCELLED'}
nuclear@38 30 return {'FINISHED'}
nuclear@38 31
nuclear@38 32 def menu_func(self, ctx):
nuclear@38 33 self.layout.operator_context = 'INVOKE_DEFAULT'
nuclear@38 34 self.layout.operator(ExportGoat3D.bl_idname, text="Goat3D scene export (.goatsce)")
nuclear@38 35
nuclear@38 36 def register():
nuclear@38 37 bpy.utils.register_module(__name__)
nuclear@38 38 bpy.types.INFO_MT_file_export.append(menu_func)
nuclear@38 39
nuclear@38 40 def unregister():
nuclear@38 41 bpy.utils.unregister_module(__name__)
nuclear@38 42 bpy.types.INFO_MT_file_export.remove(menu_func)
nuclear@38 43
nuclear@38 44 if __name__ == "__main__":
nuclear@38 45 register()