Blender-ZeroEngine-MSH2-Plugin/src/blender_addon/io_mesh_msh2/export_msh2.py

75 lines
2.6 KiB
Python

# ##### 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 version 2
# as published by the Free Software Foundation.
#
# 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.
"""
This script exports a MSH2 file from Blender.
Usage:
Run this script from "File->Export" menu and then MSH2 file.
Note, This exports mesh objects and materials only, nurbs and curves are not supported.
https://schlechtwetterfront.github.io/ze_filetypes/msh.html
"""
# def save(context,
# filepath,
# *,
# use_triangles=False,
# use_edges=True,
# use_normals=False,
# use_smooth_groups=False,
# use_smooth_groups_bitflags=False,
# use_uvs=True,
# use_materials=True,
# use_mesh_modifiers=True,
# use_mesh_modifiers_render=False,
# use_blen_objects=True,
# group_by_object=False,
# group_by_material=False,
# keep_vertex_order=False,
# use_vertex_groups=False,
# use_nurbs=True,
# use_selection=True,
# use_animation=False,
# global_matrix=None,
# path_mode='AUTO'
# ):
#
# _write(context, filepath,
# EXPORT_TRI=use_triangles,
# EXPORT_EDGES=use_edges,
# EXPORT_SMOOTH_GROUPS=use_smooth_groups,
# EXPORT_SMOOTH_GROUPS_BITFLAGS=use_smooth_groups_bitflags,
# EXPORT_NORMALS=use_normals,
# EXPORT_UV=use_uvs,
# EXPORT_MTL=use_materials,
# EXPORT_APPLY_MODIFIERS=use_mesh_modifiers,
# EXPORT_APPLY_MODIFIERS_RENDER=use_mesh_modifiers_render,
# EXPORT_BLEN_OBS=use_blen_objects,
# EXPORT_GROUP_BY_OB=group_by_object,
# EXPORT_GROUP_BY_MAT=group_by_material,
# EXPORT_KEEP_VERT_ORDER=keep_vertex_order,
# EXPORT_POLYGROUPS=use_vertex_groups,
# EXPORT_CURVE_AS_NURBS=use_nurbs,
# EXPORT_SEL_ONLY=use_selection,
# EXPORT_ANIMATION=use_animation,
# EXPORT_GLOBAL_MATRIX=global_matrix,
# EXPORT_PATH_MODE=path_mode,
# )
#
# return {'FINISHED'}