Page MenuHome

obj: remove Python based obj importer/exporter addon (for 3.6+)
Changes PlannedPublic

Authored by Aras Pranckevicius (aras_p) on Aug 25 2022, 10:30 AM.

Details

Summary

New C++ based exporter has existed since 3.1, importer since 3.2, and both have been marked as non-experimental since 3.3 (the python one was marked as legacy since 3.3). The new I/O OBJ code is both many times faster, and has more features (vertex color attributes for import/export, multi-file import).

So this removes the Python based addon. Together with this change, the io_scene_obj folder from blender-addons repository should be removed, which is bulk of the code (~2500 lines).

So far I did not hear many opinions whether it's important to keep backwards compatibility with the old addon. Only Bastien expressed an opinion that backwards compat should not be attempted, i.e. any operators are not official API to begin with, and even more so for operator functions coming from an addon. This blurb has been in 3.3 release notes already:

The Python based OBJ importer/exporter is marked as "legacy" in the menu item now; the new C++ based one got "experimental" label removed. Addons using bpy.ops.import_scene.obj and bpy.ops.export_scene.obj APIs are strongly encouraged to switch to bpy.ops.wm.obj_import and bpy.ops.wm.obj_export.

Together with the addon removal, this also removes Python OBJ addon tests. The C++ based OBJ I/O has way more extensive tests as part of gtests suite.

Diff Detail

Repository
rB Blender

Event Timeline

Aras Pranckevicius (aras_p) requested review of this revision.Aug 25 2022, 10:30 AM
Aras Pranckevicius (aras_p) created this revision.

LGTM, adding @Campbell Barton (campbellbarton) and @Dalai Felinto (dfelinto) as reviewers especially for the topic of whether we do want to preserve 'API' compatibility or not here.

I indeed don't think we should, as I would not consider any add-on code as being part of Blender API.

This revision is now accepted and ready to land.Aug 29 2022, 2:02 PM

Since the new I/O is yet to be available to the public at large I think it is a bit premature to remove the old one.

Remember that not everyone uses the experimental features, and Blender 3.3 LTS hasn't even be out yet.

Is there any advantage of removing it other than cleanup/technical debt? I would argue towards letting the old API co-exist for a few cycles until we can make sure we have one LTS with a stable battle-tested OBJ I/O (either the 3.3 LTS with fixes backported, or 3.7 LTS).

Dalai Felinto (dfelinto) requested changes to this revision.Aug 31 2022, 12:16 PM
This revision now requires changes to proceed.Aug 31 2022, 12:16 PM
Aras Pranckevicius (aras_p) planned changes to this revision.Aug 31 2022, 12:31 PM

Ok let's do this sometime later, after 3.3 LTS has been out for a while.

Aras Pranckevicius (aras_p) retitled this revision from obj: remove Python based obj importer/exporter addon to obj: remove Python based obj importer/exporter addon (for 3.6+).Sep 1 2022, 12:45 PM