Page MenuHome

OBJ: fix export of Poly curves, fix export crash when object contains multiple curve types
ClosedPublic

Authored by Aras Pranckevicius (aras_p) on Apr 9 2022, 6:55 PM.

Details

Summary

Fixes T97095: the new 3.1+ OBJ exporter had several issues w.r.t. export of curves:

  • It was not exporting "Poly" curves at all,
  • It had a crash when a single object contains multiple curves of different types -- it had a check for "is this nurbs compatible?" only for the first curve, and then proceeded to treat the other curves as nurbs as well, without checking for validity.

Fixed both issues by doing the same logic as in the old python exporter:

  • Poly curves are supported,
  • Treat object as "nurbs compatible" only if all the curves within it are nurbs compatible.

Added test coverage in the gtest suite. While at it, made "all_curves" test use the "golden obj file template" style test, instead of a manually coded test that checks intermediate objects but does not check the final exported result.

all_curves.blend, all_objects.obj and all_objects_mat_groups.obj are files to be modified in svn tests repo; all_curves.obj and all_curves_as_nurbs.obj are to be added into svn tests repo.

Diff Detail

Repository
rB Blender

Event Timeline

Aras Pranckevicius (aras_p) requested review of this revision.Apr 9 2022, 6:55 PM
Aras Pranckevicius (aras_p) created this revision.

Thanks for fixing this. Looks good to submit.

This revision is now accepted and ready to land.Apr 16 2022, 3:58 PM