Skip to content

Bug: Triangulate export skips nested objects and leaves modifier instead of baking #288

@Weisl

Description

@Weisl

Problem

apply_triangulate_modifiers had two issues:

  1. It iterated collection.objects with a obj.parent is not None guard, so any object that was parented (nested) was silently skipped during triangulated exports.
  2. The triangulate modifier was added to live mesh data and removed after export, but never actually baked — the exported file may not have contained triangulated geometry depending on the exporter.

Expected behaviour

All mesh objects in the collection (including nested ones) should be triangulated before export and restored cleanly afterwards without any leftover modifiers.

Fix

  • Switch to collection.all_objects to include nested objects.
  • Bake the triangulated mesh via new_from_object(eval_obj), swap obj.data, export, then restore the original mesh and remove the temp mesh.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions