# ***** BEGIN GPL LICENSE BLOCK ***** # # Copyright (C) 2024 Ilia Kurochkin # # Created by Ilia Kurochkin (brothermechanic) # contact: brothermechanic@yandex.com # # This 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 3 # 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, see . # # ***** END GPL LICENSE BLOCK ***** # # coding: utf-8 ''' DESCRIPTION. PLY object exporter. ''' __version__ = "0.3" import bpy from . import export_decorator @export_decorator def export(**kwargs): file_path = ('{}.ply'.format(kwargs['outpath'])) bpy.ops.wm.ply_export( filepath=file_path, check_existing=False, forward_axis=kwargs['axis_forward'], up_axis=kwargs['axis_up'], global_scale=kwargs['global_scale'], apply_modifiers=True, export_selected_objects=True, export_uv=True, export_normals=True, export_colors='SRGB', export_attributes=True, export_triangulated_mesh=True, ascii_format=True) return file_path