Operating system: Tested Windows 10, x64, various Mac OS versions
Tested: Blender 2.80-2.82a2
Short description of error
I am not sure if this is a bug or me not understanding this API. I am the maintainer of XPlane2Blender, an exporter for our flight sim's own 3D format. My users noticed that exported geometry can sometimes shift or rotate (and other weird side-effects, such as the Blender Object itself having moved after export) after each time hitting export. The common theme we found was that things with Scale transformations and modifiers on the objects seemed to trigger it. The fix is to either restart Blender or Apply All Transformations to all objects and bones.
I tracked this issue down to one parameter of in my call to Object.to_mesh: if preserve_all_data_layers is set to False these problems (as far as I've seen) go away.
I am very confused by this. I thought this API (depsgraph_get, evaluated_get, to_mesh, to_mesh_clear) was all read only and any side effects would only be applied to the temporary mesh from to_mesh.
- Is this a bug then or does "preserving_all_data_layers" also mean making some stateful-ness.
- I would also like to know what exact data layers get dropped when preserving_all_data_layers is set to False.
Exact steps for others to reproduce the error
- Unless you really want to install and use the addon, I've provided the outputted files (look at how the VT entries change) and a screenshot
- The relevant code is in a file called xplane_mesh.py, lines 60-63 and 136. See on github (https://github.com/X-Plane/XPlane2Blender/blob/399-blender-28-support/io_xplane2blender/xplane_types/xplane_mesh.py)