Page MenuHome

collada export is wrong when done through the API
Closed, ResolvedPublic


System Information
All vendors

Blender Version
Broken: latest master

Short description of error
When exporting models through the API, the file created are smaller and make other program crash when trying to import. The exact same objects with the exact same export settings exported through the UI is bigger and import flawlessly in other programs.

Exact steps for others to reproduce the error
Run this script on any file with at least one object selected (like the startup scene with default cube) and try to import the created file (created in the temp folder) in another program like sketchup, it crashes. Blender can import such file.

import bpy

path = bpy.context.user_preferences.filepaths.temporary_directory + "test" +".dae"
bpy.context.scene.collada_export(filepath=path, apply_modifiers=True, export_mesh_type=0, selected=True, include_children=False, include_armatures=False, include_shapekeys=False, deform_bones_only=False, active_uv_only=False, include_uv_textures=True, include_material_textures=True, use_texture_copies=True, use_ngons=False, use_object_instantiation=True, use_blender_profile=False, sort_by_name=False, open_sim=False, export_transformation_type=0)

export the same object(s) through the UI,. Note that the file is bigger and it import flawlessly in other programs.

Event Timeline

Hi John;
Thank you for reporting.

The main issue here is that we have some duplication of code which is very likely to deviate. But this will be cleaned up for 2.8 anyways.


thanks for the very quick fix :)