64 lines
2 KiB
Python
64 lines
2 KiB
Python
# -*- coding: utf-8 -*-
|
|
# Copyright (C) 2023 Ilia Kurochkin <brothermechanic@gmail.com>
|
|
#
|
|
# This program 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.
|
|
'''
|
|
DESCRIPTION.
|
|
Collada mesh exporter.
|
|
Exports all objects in scene.
|
|
You can set export path and subdir.
|
|
'''
|
|
__version__ = "0.2"
|
|
|
|
import bpy
|
|
from blender.export import export_decorator
|
|
|
|
|
|
@export_decorator
|
|
def export_dae(**kwargs):
|
|
outpath = ('{}.dae'.format(kwargs['outpath']))
|
|
|
|
bpy.ops.wm.collada_export(
|
|
filepath=outpath,
|
|
check_existing=False,
|
|
apply_modifiers=True,
|
|
export_mesh_type=0,
|
|
export_mesh_type_selection='view',
|
|
export_global_forward_selection='Y',
|
|
export_global_up_selection='Z',
|
|
apply_global_orientation=False,
|
|
selected=True,
|
|
include_children=False,
|
|
include_armatures=False,
|
|
include_shapekeys=False,
|
|
deform_bones_only=False,
|
|
include_animations=False,
|
|
include_all_actions=True,
|
|
export_animation_type_selection='sample',
|
|
sampling_rate=1,
|
|
keep_smooth_curves=False,
|
|
keep_keyframes=False,
|
|
keep_flat_curves=False,
|
|
active_uv_only=False,
|
|
use_texture_copies=True,
|
|
triangulate=True,
|
|
use_object_instantiation=True,
|
|
use_blender_profile=True,
|
|
sort_by_name=False,
|
|
export_object_transformation_type=0,
|
|
export_object_transformation_type_selection='matrix',
|
|
export_animation_transformation_type=0,
|
|
export_animation_transformation_type_selection='matrix',
|
|
open_sim=False,
|
|
limit_precision=False,
|
|
keep_bind_info=False)
|
|
|
|
return outpath
|