racer_mesh_export.py

Go to the documentation of this file.
00001 #!BPY
00002 # This Python file uses the following encoding: utf-8
00003 
00004 """
00005 Name: 'Racer Mesh Exporter'
00006 Blender: 244
00007 Group: 'Export'
00008 Tooltip: 'Export meshes to the racer game'
00009 """
00010 
00011 ##@file python/racer_mesh_export.py
00012 #@brief Provide a Blender exporter for mesh objects.
00013 #@author James Legg
00014 
00015 # Copyright © 2009, 2010 James Legg.
00016 # This program is free software: you can redistribute it and/or modify
00017 # it under the terms of the GNU General Public License as published by
00018 # the Free Software Foundation, either version 3 of the License, or
00019 # (at your option) any later version.
00020 
00021 ## @package racer_mesh_export
00022 #  Export a single mesh for the racer game.
00023 # This is used for cars and the track boosters for example.
00024 #
00025 # For more information about making cars see
00026 # http://sourceforge.net/apps/mediawiki/racer/index.php?title=Making_cars.
00027 
00028 import Blender
00029 import bpy
00030 import racer_theme_export
00031 
00032 ## Write a mesh file to the given filename.
00033 #@param filename The filename to write the mesh to.
00034 def write(filename):
00035     out = file(filename, "w")
00036     sce= bpy.data.scenes.active
00037     for ob in Blender.Object.GetSelected():
00038         print ob.getType()
00039         if ob.getType() == 'Mesh':
00040             racer_theme_export.write_mesh(out, ob)
00041 
00042 Blender.Window.FileSelector(write, "Export")
00043 

Get Racer at SourceForge.net. Fast, secure and Free Open Source software downloads

Generated at Mon Sep 6 00:41:12 2010 by Doxygen version 1.4.7 for Racer version svn335.